azure-maps-control 3.0.2 → 3.1.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/ReadMe.md +2 -2
- package/dist/atlas-core-bare-snr-min.js +1 -1
- package/dist/atlas-core-bare-snr.js +199 -189
- package/dist/atlas-core-bare.js +386 -319
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +808 -407
- package/dist/atlas-core.js +995 -537
- package/dist/atlas-core.min.js +4 -4
- package/dist/atlas-esm.js +118707 -0
- package/dist/atlas-esm.min.js +108 -0
- package/dist/atlas.js +2869 -910
- package/dist/atlas.min.js +4 -4
- package/package.json +15 -13
- package/thirdpartynotices.txt +0 -0
- package/typings/index.d.ts +77 -2
package/dist/atlas-core.js
CHANGED
|
@@ -91,10 +91,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
91
91
|
|
|
92
92
|
var azuremapsMaplibreGlDev = {exports: {}};
|
|
93
93
|
|
|
94
|
-
/* Build timestamp:
|
|
94
|
+
/* Build timestamp: Thu, 16 Nov 2023 20:40:59 GMT */
|
|
95
95
|
|
|
96
96
|
(function (module, exports) {
|
|
97
|
-
/* The Azure Maps fork of MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v3.
|
|
97
|
+
/* The Azure Maps fork of MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v3.6.1/LICENSE.txt */
|
|
98
98
|
(function (global, factory) {
|
|
99
99
|
module.exports = factory() ;
|
|
100
100
|
})(commonjsGlobal, (function () {
|
|
@@ -121,7 +121,22 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
|
|
124
|
-
define(['exports'], (function (exports) {
|
|
124
|
+
define(['exports'], (function (exports) {
|
|
125
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
126
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
127
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
128
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
129
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
130
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
131
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
136
|
+
var e = new Error(message);
|
|
137
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
138
|
+
};
|
|
139
|
+
|
|
125
140
|
function getDefaultExportFromCjs (x) {
|
|
126
141
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
127
142
|
}
|
|
@@ -518,6 +533,52 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
518
533
|
|
|
519
534
|
var UnitBezier$1 = /*@__PURE__*/getDefaultExportFromCjs(unitbezier);
|
|
520
535
|
|
|
536
|
+
let supportsOffscreenCanvas;
|
|
537
|
+
function offscreenCanvasSupported() {
|
|
538
|
+
if (supportsOffscreenCanvas == null) {
|
|
539
|
+
supportsOffscreenCanvas = typeof OffscreenCanvas !== 'undefined' &&
|
|
540
|
+
new OffscreenCanvas(1, 1).getContext('2d') &&
|
|
541
|
+
typeof createImageBitmap === 'function';
|
|
542
|
+
}
|
|
543
|
+
return supportsOffscreenCanvas;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
let offscreenCanvasDistorted;
|
|
547
|
+
/**
|
|
548
|
+
* Some browsers don't return the exact pixels from a canvas to prevent user fingerprinting (see #3185).
|
|
549
|
+
* This function writes pixels to an OffscreenCanvas and reads them back using getImageData, returning false
|
|
550
|
+
* if they don't match.
|
|
551
|
+
*
|
|
552
|
+
* @returns true if the browser supports OffscreenCanvas but it distorts getImageData results, false otherwise.
|
|
553
|
+
*/
|
|
554
|
+
function isOffscreenCanvasDistorted() {
|
|
555
|
+
if (offscreenCanvasDistorted == null) {
|
|
556
|
+
offscreenCanvasDistorted = false;
|
|
557
|
+
if (offscreenCanvasSupported()) {
|
|
558
|
+
const size = 5;
|
|
559
|
+
const canvas = new OffscreenCanvas(size, size);
|
|
560
|
+
const context = canvas.getContext('2d', { willReadFrequently: true });
|
|
561
|
+
if (context) {
|
|
562
|
+
// fill each pixel with an RGB value that should make the byte at index i equal to i (except alpha channel):
|
|
563
|
+
// [0, 1, 2, 255, 4, 5, 6, 255, 8, 9, 10, 255, ...]
|
|
564
|
+
for (let i = 0; i < size * size; i++) {
|
|
565
|
+
const base = i * 4;
|
|
566
|
+
context.fillStyle = `rgb(${base},${base + 1},${base + 2})`;
|
|
567
|
+
context.fillRect(i % size, Math.floor(i / size), 1, 1);
|
|
568
|
+
}
|
|
569
|
+
const data = context.getImageData(0, 0, size, size).data;
|
|
570
|
+
for (let i = 0; i < size * size * 4; i++) {
|
|
571
|
+
if (i % 4 !== 3 && data[i] !== i) {
|
|
572
|
+
offscreenCanvasDistorted = true;
|
|
573
|
+
break;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
return offscreenCanvasDistorted || false;
|
|
580
|
+
}
|
|
581
|
+
|
|
521
582
|
/**
|
|
522
583
|
* Given a value `t` that varies between 0 and 1, return
|
|
523
584
|
* an interpolation function that eases between 0 and 1 in a pleasing
|
|
@@ -943,6 +1004,143 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
943
1004
|
const blob = new Blob([new Uint8Array(data)], { type: 'image/png' });
|
|
944
1005
|
img.src = data.byteLength ? URL.createObjectURL(blob) : transparentPngUrl;
|
|
945
1006
|
}
|
|
1007
|
+
/**
|
|
1008
|
+
* Computes the webcodecs VideoFrame API options to select a rectangle out of
|
|
1009
|
+
* an image and write it into the destination rectangle.
|
|
1010
|
+
*
|
|
1011
|
+
* Rect (x/y/width/height) select the overlapping rectangle from the source image
|
|
1012
|
+
* and layout (offset/stride) write that overlapping rectangle to the correct place
|
|
1013
|
+
* in the destination image.
|
|
1014
|
+
*
|
|
1015
|
+
* Offset is the byte offset in the dest image that the first pixel appears at
|
|
1016
|
+
* and stride is the number of bytes to the start of the next row:
|
|
1017
|
+
* ┌───────────┐
|
|
1018
|
+
* │ dest │
|
|
1019
|
+
* │ ┌───┼───────┐
|
|
1020
|
+
* │offset→│▓▓▓│ source│
|
|
1021
|
+
* │ │▓▓▓│ │
|
|
1022
|
+
* │ └───┼───────┘
|
|
1023
|
+
* │stride ⇠╌╌╌│
|
|
1024
|
+
* │╌╌╌╌╌╌→ │
|
|
1025
|
+
* └───────────┘
|
|
1026
|
+
*
|
|
1027
|
+
* @param image - source image containing a width and height attribute
|
|
1028
|
+
* @param x - top-left x coordinate to read from the image
|
|
1029
|
+
* @param y - top-left y coordinate to read from the image
|
|
1030
|
+
* @param width - width of the rectangle to read from the image
|
|
1031
|
+
* @param height - height of the rectangle to read from the image
|
|
1032
|
+
* @returns the layout and rect options to pass into VideoFrame API
|
|
1033
|
+
*/
|
|
1034
|
+
function computeVideoFrameParameters(image, x, y, width, height) {
|
|
1035
|
+
const destRowOffset = Math.max(-x, 0) * 4;
|
|
1036
|
+
const firstSourceRow = Math.max(0, y);
|
|
1037
|
+
const firstDestRow = firstSourceRow - y;
|
|
1038
|
+
const offset = firstDestRow * width * 4 + destRowOffset;
|
|
1039
|
+
const stride = width * 4;
|
|
1040
|
+
const sourceLeft = Math.max(0, x);
|
|
1041
|
+
const sourceTop = Math.max(0, y);
|
|
1042
|
+
const sourceRight = Math.min(image.width, x + width);
|
|
1043
|
+
const sourceBottom = Math.min(image.height, y + height);
|
|
1044
|
+
return {
|
|
1045
|
+
rect: {
|
|
1046
|
+
x: sourceLeft,
|
|
1047
|
+
y: sourceTop,
|
|
1048
|
+
width: sourceRight - sourceLeft,
|
|
1049
|
+
height: sourceBottom - sourceTop
|
|
1050
|
+
},
|
|
1051
|
+
layout: [{ offset, stride }]
|
|
1052
|
+
};
|
|
1053
|
+
}
|
|
1054
|
+
/**
|
|
1055
|
+
* Reads pixels from an ImageBitmap/Image/canvas using webcodec VideoFrame API.
|
|
1056
|
+
*
|
|
1057
|
+
* @param data - image, imagebitmap, or canvas to parse
|
|
1058
|
+
* @param x - top-left x coordinate to read from the image
|
|
1059
|
+
* @param y - top-left y coordinate to read from the image
|
|
1060
|
+
* @param width - width of the rectangle to read from the image
|
|
1061
|
+
* @param height - height of the rectangle to read from the image
|
|
1062
|
+
* @returns a promise containing the parsed RGBA pixel values of the image, or the error if an error occurred
|
|
1063
|
+
*/
|
|
1064
|
+
function readImageUsingVideoFrame(image, x, y, width, height) {
|
|
1065
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1066
|
+
if (typeof VideoFrame === 'undefined') {
|
|
1067
|
+
throw new Error('VideoFrame not supported');
|
|
1068
|
+
}
|
|
1069
|
+
const frame = new VideoFrame(image, { timestamp: 0 });
|
|
1070
|
+
try {
|
|
1071
|
+
const format = frame === null || frame === void 0 ? void 0 : frame.format;
|
|
1072
|
+
if (!format || !(format.startsWith('BGR') || format.startsWith('RGB'))) {
|
|
1073
|
+
throw new Error(`Unrecognized format ${format}`);
|
|
1074
|
+
}
|
|
1075
|
+
const swapBR = format.startsWith('BGR');
|
|
1076
|
+
const result = new Uint8ClampedArray(width * height * 4);
|
|
1077
|
+
yield frame.copyTo(result, computeVideoFrameParameters(image, x, y, width, height));
|
|
1078
|
+
if (swapBR) {
|
|
1079
|
+
for (let i = 0; i < result.length; i += 4) {
|
|
1080
|
+
const tmp = result[i];
|
|
1081
|
+
result[i] = result[i + 2];
|
|
1082
|
+
result[i + 2] = tmp;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
return result;
|
|
1086
|
+
}
|
|
1087
|
+
finally {
|
|
1088
|
+
frame.close();
|
|
1089
|
+
}
|
|
1090
|
+
});
|
|
1091
|
+
}
|
|
1092
|
+
let offscreenCanvas;
|
|
1093
|
+
let offscreenCanvasContext;
|
|
1094
|
+
/**
|
|
1095
|
+
* Reads pixels from an ImageBitmap/Image/canvas using OffscreenCanvas
|
|
1096
|
+
*
|
|
1097
|
+
* @param data - image, imagebitmap, or canvas to parse
|
|
1098
|
+
* @param x - top-left x coordinate to read from the image
|
|
1099
|
+
* @param y - top-left y coordinate to read from the image
|
|
1100
|
+
* @param width - width of the rectangle to read from the image
|
|
1101
|
+
* @param height - height of the rectangle to read from the image
|
|
1102
|
+
* @returns a promise containing the parsed RGBA pixel values of the image, or the error if an error occurred
|
|
1103
|
+
*/
|
|
1104
|
+
function readImageDataUsingOffscreenCanvas(imgBitmap, x, y, width, height) {
|
|
1105
|
+
const origWidth = imgBitmap.width;
|
|
1106
|
+
const origHeight = imgBitmap.height;
|
|
1107
|
+
// Lazily initialize OffscreenCanvas
|
|
1108
|
+
if (!offscreenCanvas || !offscreenCanvasContext) {
|
|
1109
|
+
// Dem tiles are typically 256x256
|
|
1110
|
+
offscreenCanvas = new OffscreenCanvas(origWidth, origHeight);
|
|
1111
|
+
offscreenCanvasContext = offscreenCanvas.getContext('2d', { willReadFrequently: true });
|
|
1112
|
+
}
|
|
1113
|
+
offscreenCanvas.width = origWidth;
|
|
1114
|
+
offscreenCanvas.height = origHeight;
|
|
1115
|
+
offscreenCanvasContext.drawImage(imgBitmap, 0, 0, origWidth, origHeight);
|
|
1116
|
+
const imgData = offscreenCanvasContext.getImageData(x, y, width, height);
|
|
1117
|
+
offscreenCanvasContext.clearRect(0, 0, origWidth, origHeight);
|
|
1118
|
+
return imgData.data;
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* Reads RGBA pixels from an preferring OffscreenCanvas, but falling back to VideoFrame if supported and
|
|
1122
|
+
* the browser is mangling OffscreenCanvas getImageData results.
|
|
1123
|
+
*
|
|
1124
|
+
* @param data - image, imagebitmap, or canvas to parse
|
|
1125
|
+
* @param x - top-left x coordinate to read from the image
|
|
1126
|
+
* @param y - top-left y coordinate to read from the image
|
|
1127
|
+
* @param width - width of the rectangle to read from the image
|
|
1128
|
+
* @param height - height of the rectangle to read from the image
|
|
1129
|
+
* @returns a promise containing the parsed RGBA pixel values of the image
|
|
1130
|
+
*/
|
|
1131
|
+
function getImageData(image, x, y, width, height) {
|
|
1132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1133
|
+
if (isOffscreenCanvasDistorted()) {
|
|
1134
|
+
try {
|
|
1135
|
+
return yield readImageUsingVideoFrame(image, x, y, width, height);
|
|
1136
|
+
}
|
|
1137
|
+
catch (e) {
|
|
1138
|
+
// fall back to OffscreenCanvas
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
return readImageDataUsingOffscreenCanvas(image, x, y, width, height);
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
946
1144
|
|
|
947
1145
|
const now = typeof performance !== 'undefined' && performance && performance.now ?
|
|
948
1146
|
performance.now.bind(performance) :
|
|
@@ -1579,10 +1777,28 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
1579
1777
|
terrarium: {
|
|
1580
1778
|
},
|
|
1581
1779
|
mapbox: {
|
|
1780
|
+
},
|
|
1781
|
+
custom: {
|
|
1582
1782
|
}
|
|
1583
1783
|
},
|
|
1584
1784
|
"default": "mapbox"
|
|
1585
1785
|
},
|
|
1786
|
+
redFactor: {
|
|
1787
|
+
type: "number",
|
|
1788
|
+
"default": 1
|
|
1789
|
+
},
|
|
1790
|
+
blueFactor: {
|
|
1791
|
+
type: "number",
|
|
1792
|
+
"default": 1
|
|
1793
|
+
},
|
|
1794
|
+
greenFactor: {
|
|
1795
|
+
type: "number",
|
|
1796
|
+
"default": 1
|
|
1797
|
+
},
|
|
1798
|
+
baseShift: {
|
|
1799
|
+
type: "number",
|
|
1800
|
+
"default": 0
|
|
1801
|
+
},
|
|
1586
1802
|
volatile: {
|
|
1587
1803
|
type: "boolean",
|
|
1588
1804
|
"default": false
|
|
@@ -8856,6 +9072,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
8856
9072
|
}
|
|
8857
9073
|
}
|
|
8858
9074
|
}
|
|
9075
|
+
function isZoomExpression(expression) {
|
|
9076
|
+
return expression._styleExpression !== undefined;
|
|
9077
|
+
}
|
|
8859
9078
|
function createPropertyExpression(expressionInput, propertySpec) {
|
|
8860
9079
|
const expression = createExpression(expressionInput, propertySpec);
|
|
8861
9080
|
if (expression.result === 'error') {
|
|
@@ -9871,6 +10090,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
9871
10090
|
else if (sourceType === 'vector' && type === 'raster') {
|
|
9872
10091
|
errors.push(new ValidationError(key, layer.source, `layer "${layer.id}" requires a raster source`));
|
|
9873
10092
|
}
|
|
10093
|
+
else if (sourceType !== 'raster-dem' && type === 'hillshade') {
|
|
10094
|
+
errors.push(new ValidationError(key, layer.source, `layer "${layer.id}" requires a raster-dem source`));
|
|
10095
|
+
}
|
|
9874
10096
|
else if (sourceType === 'raster' && type !== 'raster') {
|
|
9875
10097
|
errors.push(new ValidationError(key, layer.source, `layer "${layer.id}" requires a vector source`));
|
|
9876
10098
|
}
|
|
@@ -9957,6 +10179,47 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
9957
10179
|
return [];
|
|
9958
10180
|
}
|
|
9959
10181
|
|
|
10182
|
+
function validateRasterDEMSource(options) {
|
|
10183
|
+
var _a;
|
|
10184
|
+
const sourceName = (_a = options.sourceName) !== null && _a !== void 0 ? _a : '';
|
|
10185
|
+
const rasterDEM = options.value;
|
|
10186
|
+
const styleSpec = options.styleSpec;
|
|
10187
|
+
const rasterDEMSpec = styleSpec.source_raster_dem;
|
|
10188
|
+
const style = options.style;
|
|
10189
|
+
let errors = [];
|
|
10190
|
+
const rootType = getType(rasterDEM);
|
|
10191
|
+
if (rasterDEM === undefined) {
|
|
10192
|
+
return errors;
|
|
10193
|
+
}
|
|
10194
|
+
else if (rootType !== 'object') {
|
|
10195
|
+
errors.push(new ValidationError('source_raster_dem', rasterDEM, `object expected, ${rootType} found`));
|
|
10196
|
+
return errors;
|
|
10197
|
+
}
|
|
10198
|
+
const encoding = unbundle(rasterDEM.encoding);
|
|
10199
|
+
const isCustomEncoding = encoding === 'custom';
|
|
10200
|
+
const customEncodingKeys = ['redFactor', 'greenFactor', 'blueFactor', 'baseShift'];
|
|
10201
|
+
const encodingName = options.value.encoding ? `"${options.value.encoding}"` : 'Default';
|
|
10202
|
+
for (const key in rasterDEM) {
|
|
10203
|
+
if (!isCustomEncoding && customEncodingKeys.includes(key)) {
|
|
10204
|
+
errors.push(new ValidationError(key, rasterDEM[key], `In "${sourceName}": "${key}" is only valid when "encoding" is set to "custom". ${encodingName} encoding found`));
|
|
10205
|
+
}
|
|
10206
|
+
else if (rasterDEMSpec[key]) {
|
|
10207
|
+
errors = errors.concat(options.validateSpec({
|
|
10208
|
+
key,
|
|
10209
|
+
value: rasterDEM[key],
|
|
10210
|
+
valueSpec: rasterDEMSpec[key],
|
|
10211
|
+
validateSpec: options.validateSpec,
|
|
10212
|
+
style,
|
|
10213
|
+
styleSpec
|
|
10214
|
+
}));
|
|
10215
|
+
}
|
|
10216
|
+
else {
|
|
10217
|
+
errors.push(new ValidationError(key, rasterDEM[key], `unknown property "${key}"`));
|
|
10218
|
+
}
|
|
10219
|
+
}
|
|
10220
|
+
return errors;
|
|
10221
|
+
}
|
|
10222
|
+
|
|
9960
10223
|
const objectElementValidators = {
|
|
9961
10224
|
promoteId: validatePromoteId
|
|
9962
10225
|
};
|
|
@@ -9974,7 +10237,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
9974
10237
|
switch (type) {
|
|
9975
10238
|
case 'vector':
|
|
9976
10239
|
case 'raster':
|
|
9977
|
-
case 'raster-dem':
|
|
9978
10240
|
errors = validateObject({
|
|
9979
10241
|
key,
|
|
9980
10242
|
value,
|
|
@@ -9985,6 +10247,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
9985
10247
|
validateSpec,
|
|
9986
10248
|
});
|
|
9987
10249
|
return errors;
|
|
10250
|
+
case 'raster-dem':
|
|
10251
|
+
errors = validateRasterDEMSource({
|
|
10252
|
+
sourceName: key,
|
|
10253
|
+
value,
|
|
10254
|
+
style: options.style,
|
|
10255
|
+
styleSpec,
|
|
10256
|
+
validateSpec,
|
|
10257
|
+
});
|
|
10258
|
+
return errors;
|
|
9988
10259
|
case 'geojson':
|
|
9989
10260
|
errors = validateObject({
|
|
9990
10261
|
key,
|
|
@@ -10698,7 +10969,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
10698
10969
|
klass.serialize(input, transferables) : {};
|
|
10699
10970
|
if (!klass.serialize) {
|
|
10700
10971
|
for (const key in input) {
|
|
10701
|
-
// any cast due to https://github.com/facebook/flow/issues/5393
|
|
10702
10972
|
if (!input.hasOwnProperty(key))
|
|
10703
10973
|
continue; // eslint-disable-line no-prototype-builtins
|
|
10704
10974
|
if (registry[name].omit.indexOf(key) >= 0)
|
|
@@ -18641,8 +18911,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
18641
18911
|
}
|
|
18642
18912
|
_handleSpecialPaintPropertyUpdate(name) {
|
|
18643
18913
|
if (name === 'line-gradient') {
|
|
18644
|
-
const expression = this.
|
|
18645
|
-
|
|
18914
|
+
const expression = this.gradientExpression();
|
|
18915
|
+
if (isZoomExpression(expression)) {
|
|
18916
|
+
this.stepInterpolant = expression._styleExpression.expression instanceof Step;
|
|
18917
|
+
}
|
|
18918
|
+
else {
|
|
18919
|
+
this.stepInterpolant = false;
|
|
18920
|
+
}
|
|
18646
18921
|
this.gradientVersion = (this.gradientVersion + 1) % Number.MAX_SAFE_INTEGER;
|
|
18647
18922
|
}
|
|
18648
18923
|
}
|
|
@@ -20492,7 +20767,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20492
20767
|
/**
|
|
20493
20768
|
* Called when shapedIcon.image.contentMatch is set.
|
|
20494
20769
|
* Determines the dimensions of a content rectangle using the value in contentMatch.
|
|
20495
|
-
*
|
|
20770
|
+
*
|
|
20771
|
+
* @param shapedIcon - The icon that will be resized.
|
|
20496
20772
|
* @returns Extents of the shapedIcon with contentMatch adjustments if necessary.
|
|
20497
20773
|
*/
|
|
20498
20774
|
function applyContentMatch(shapedIcon) {
|
|
@@ -21275,7 +21551,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21275
21551
|
*/
|
|
21276
21552
|
function resolveTokens(properties, text) {
|
|
21277
21553
|
return text.replace(/{([^{}]+)}/g, (match, key) => {
|
|
21278
|
-
return key in properties ? String(properties[key]) : '';
|
|
21554
|
+
return properties && key in properties ? String(properties[key]) : '';
|
|
21279
21555
|
});
|
|
21280
21556
|
}
|
|
21281
21557
|
|
|
@@ -21769,8 +22045,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21769
22045
|
if (callback) {
|
|
21770
22046
|
this.callbacks[id] = callback;
|
|
21771
22047
|
}
|
|
21772
|
-
const buffers =
|
|
21773
|
-
|
|
22048
|
+
const buffers = [];
|
|
22049
|
+
const message = {
|
|
21774
22050
|
id,
|
|
21775
22051
|
type,
|
|
21776
22052
|
hasCallback: !!callback,
|
|
@@ -21778,19 +22054,21 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21778
22054
|
mustQueue,
|
|
21779
22055
|
sourceMapId: this.mapId,
|
|
21780
22056
|
data: serialize(data, buffers)
|
|
21781
|
-
}
|
|
22057
|
+
};
|
|
22058
|
+
this.target.postMessage(message, { transfer: buffers });
|
|
21782
22059
|
return {
|
|
21783
22060
|
cancel: () => {
|
|
21784
22061
|
if (callback) {
|
|
21785
22062
|
// Set the callback to null so that it never fires after the request is aborted.
|
|
21786
22063
|
delete this.callbacks[id];
|
|
21787
22064
|
}
|
|
21788
|
-
|
|
22065
|
+
const cancelMessage = {
|
|
21789
22066
|
id,
|
|
21790
22067
|
type: '<cancel>',
|
|
21791
22068
|
targetMapId,
|
|
21792
22069
|
sourceMapId: this.mapId
|
|
21793
|
-
}
|
|
22070
|
+
};
|
|
22071
|
+
this.target.postMessage(cancelMessage);
|
|
21794
22072
|
}
|
|
21795
22073
|
};
|
|
21796
22074
|
}
|
|
@@ -21812,17 +22090,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21812
22090
|
}
|
|
21813
22091
|
else {
|
|
21814
22092
|
let completed = false;
|
|
21815
|
-
const buffers =
|
|
22093
|
+
const buffers = [];
|
|
21816
22094
|
const done = task.hasCallback ? (err, data) => {
|
|
21817
22095
|
completed = true;
|
|
21818
22096
|
delete this.cancelCallbacks[id];
|
|
21819
|
-
|
|
22097
|
+
const responseMessage = {
|
|
21820
22098
|
id,
|
|
21821
22099
|
type: '<response>',
|
|
21822
22100
|
sourceMapId: this.mapId,
|
|
21823
22101
|
error: err ? serialize(err) : null,
|
|
21824
22102
|
data: serialize(data, buffers)
|
|
21825
|
-
}
|
|
22103
|
+
};
|
|
22104
|
+
this.target.postMessage(responseMessage, { transfer: buffers });
|
|
21826
22105
|
} : (_) => {
|
|
21827
22106
|
completed = true;
|
|
21828
22107
|
};
|
|
@@ -21832,7 +22111,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21832
22111
|
// task.type == 'loadTile', 'removeTile', etc.
|
|
21833
22112
|
callback = this.parent[task.type](task.sourceMapId, params, done);
|
|
21834
22113
|
}
|
|
21835
|
-
else if (this.parent
|
|
22114
|
+
else if ('getWorkerSource' in this.parent) {
|
|
21836
22115
|
// task.type == sourcetype.method
|
|
21837
22116
|
const keys = task.type.split('.');
|
|
21838
22117
|
const scope = this.parent.getWorkerSource(task.sourceMapId, keys[0], params.source);
|
|
@@ -22332,29 +22611,45 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
22332
22611
|
register('CanonicalTileID', CanonicalTileID);
|
|
22333
22612
|
register('OverscaledTileID', OverscaledTileID, { omit: ['posMatrix'] });
|
|
22334
22613
|
|
|
22335
|
-
// DEMData is a data structure for decoding, backfilling, and storing elevation data for processing in the hillshade shaders
|
|
22336
|
-
// data can be populated either from a pngraw image tile or from serliazed data sent back from a worker. When data is initially
|
|
22337
|
-
// loaded from a image tile, we decode the pixel values using the appropriate decoding formula, but we store the
|
|
22338
|
-
// elevation data as an Int32 value. we add 65536 (2^16) to eliminate negative values and enable the use of
|
|
22339
|
-
// integer overflow when creating the texture used in the hillshadePrepare step.
|
|
22340
|
-
// DEMData also handles the backfilling of data from a tile's neighboring tiles. This is necessary because we use a pixel's 8
|
|
22341
|
-
// surrounding pixel values to compute the slope at that pixel, and we cannot accurately calculate the slope at pixels on a
|
|
22342
|
-
// tile's edge without backfilling from neighboring tiles.
|
|
22343
22614
|
class DEMData {
|
|
22344
22615
|
// RGBAImage data has uniform 1px padding on all sides: square tile edge size defines stride
|
|
22345
22616
|
// and dim is calculated as stride - 2.
|
|
22346
|
-
constructor(uid, data, encoding) {
|
|
22617
|
+
constructor(uid, data, encoding, redFactor = 1.0, greenFactor = 1.0, blueFactor = 1.0, baseShift = 0.0) {
|
|
22347
22618
|
this.uid = uid;
|
|
22348
22619
|
if (data.height !== data.width)
|
|
22349
22620
|
throw new RangeError('DEM tiles must be square');
|
|
22350
|
-
if (encoding &&
|
|
22351
|
-
warnOnce(`"${encoding}" is not a valid encoding type. Valid types include "mapbox" and "
|
|
22621
|
+
if (encoding && !['mapbox', 'terrarium', 'custom'].includes(encoding)) {
|
|
22622
|
+
warnOnce(`"${encoding}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);
|
|
22352
22623
|
return;
|
|
22353
22624
|
}
|
|
22354
22625
|
this.stride = data.height;
|
|
22355
22626
|
const dim = this.dim = data.height - 2;
|
|
22356
22627
|
this.data = new Uint32Array(data.data.buffer);
|
|
22357
|
-
|
|
22628
|
+
switch (encoding) {
|
|
22629
|
+
case 'terrarium':
|
|
22630
|
+
// unpacking formula for mapzen terrarium:
|
|
22631
|
+
// https://aws.amazon.com/public-datasets/terrain/
|
|
22632
|
+
this.redFactor = 256.0;
|
|
22633
|
+
this.greenFactor = 1.0;
|
|
22634
|
+
this.blueFactor = 1.0 / 256.0;
|
|
22635
|
+
this.baseShift = 32768.0;
|
|
22636
|
+
break;
|
|
22637
|
+
case 'custom':
|
|
22638
|
+
this.redFactor = redFactor;
|
|
22639
|
+
this.greenFactor = greenFactor;
|
|
22640
|
+
this.blueFactor = blueFactor;
|
|
22641
|
+
this.baseShift = baseShift;
|
|
22642
|
+
break;
|
|
22643
|
+
case 'mapbox':
|
|
22644
|
+
default:
|
|
22645
|
+
// unpacking formula for mapbox.terrain-rgb:
|
|
22646
|
+
// https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb
|
|
22647
|
+
this.redFactor = 6553.6;
|
|
22648
|
+
this.greenFactor = 25.6;
|
|
22649
|
+
this.blueFactor = 0.1;
|
|
22650
|
+
this.baseShift = 10000.0;
|
|
22651
|
+
break;
|
|
22652
|
+
}
|
|
22358
22653
|
// in order to avoid flashing seams between tiles, here we are initially populating a 1px border of pixels around the image
|
|
22359
22654
|
// with the data of the nearest pixel from the image. this data is eventually replaced when the tile's neighboring
|
|
22360
22655
|
// tiles are loaded and the accurate data can be backfilled using DEMData#backfillBorder
|
|
@@ -22389,26 +22684,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
22389
22684
|
get(x, y) {
|
|
22390
22685
|
const pixels = new Uint8Array(this.data.buffer);
|
|
22391
22686
|
const index = this._idx(x, y) * 4;
|
|
22392
|
-
|
|
22393
|
-
return unpack(pixels[index], pixels[index + 1], pixels[index + 2]);
|
|
22687
|
+
return this.unpack(pixels[index], pixels[index + 1], pixels[index + 2]);
|
|
22394
22688
|
}
|
|
22395
22689
|
getUnpackVector() {
|
|
22396
|
-
return this.
|
|
22690
|
+
return [this.redFactor, this.greenFactor, this.blueFactor, this.baseShift];
|
|
22397
22691
|
}
|
|
22398
22692
|
_idx(x, y) {
|
|
22399
22693
|
if (x < -1 || x >= this.dim + 1 || y < -1 || y >= this.dim + 1)
|
|
22400
22694
|
throw new RangeError('out of range source coordinates for DEM data');
|
|
22401
22695
|
return (y + 1) * this.stride + (x + 1);
|
|
22402
22696
|
}
|
|
22403
|
-
|
|
22404
|
-
|
|
22405
|
-
// https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb
|
|
22406
|
-
return ((r * 256 * 256 + g * 256.0 + b) / 10.0 - 10000.0);
|
|
22407
|
-
}
|
|
22408
|
-
_unpackTerrarium(r, g, b) {
|
|
22409
|
-
// unpacking formula for mapzen terrarium:
|
|
22410
|
-
// https://aws.amazon.com/public-datasets/terrain/
|
|
22411
|
-
return ((r * 256 + g + b / 256) - 32768.0);
|
|
22697
|
+
unpack(r, g, b) {
|
|
22698
|
+
return (r * this.redFactor + g * this.greenFactor + b * this.blueFactor - this.baseShift);
|
|
22412
22699
|
}
|
|
22413
22700
|
getPixels() {
|
|
22414
22701
|
return new RGBAImage({ width: this.stride, height: this.stride }, new Uint8Array(this.data.buffer));
|
|
@@ -23107,10 +23394,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
23107
23394
|
verticalizedLabelOffset = builtInOffset;
|
|
23108
23395
|
builtInOffset = [0, 0];
|
|
23109
23396
|
}
|
|
23397
|
+
const textureScale = positionedGlyph.metrics.isDoubleResolution ? 2 : 1;
|
|
23110
23398
|
const x1 = (positionedGlyph.metrics.left - rectBuffer) * positionedGlyph.scale - halfAdvance + builtInOffset[0];
|
|
23111
23399
|
const y1 = (-positionedGlyph.metrics.top - rectBuffer) * positionedGlyph.scale + builtInOffset[1];
|
|
23112
|
-
const x2 = x1 + textureRect.w * positionedGlyph.scale / pixelRatio;
|
|
23113
|
-
const y2 = y1 + textureRect.h * positionedGlyph.scale / pixelRatio;
|
|
23400
|
+
const x2 = x1 + textureRect.w / textureScale * positionedGlyph.scale / pixelRatio;
|
|
23401
|
+
const y2 = y1 + textureRect.h / textureScale * positionedGlyph.scale / pixelRatio;
|
|
23114
23402
|
const tl = new Point$2(x1, y1);
|
|
23115
23403
|
const tr = new Point$2(x2, y1);
|
|
23116
23404
|
const bl = new Point$2(x1, y2);
|
|
@@ -23454,7 +23742,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
23454
23742
|
if (radialOffset < 0)
|
|
23455
23743
|
radialOffset = 0; // Ignore negative offset.
|
|
23456
23744
|
// solve for r where r^2 + r^2 = radialOffset^2
|
|
23457
|
-
const hypotenuse = radialOffset / Math.
|
|
23745
|
+
const hypotenuse = radialOffset / Math.SQRT2;
|
|
23458
23746
|
switch (anchor) {
|
|
23459
23747
|
case 'top-right':
|
|
23460
23748
|
case 'top-left':
|
|
@@ -24475,6 +24763,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
24475
24763
|
exports.UnwrappedTileID = UnwrappedTileID;
|
|
24476
24764
|
exports.ValidationError = ValidationError;
|
|
24477
24765
|
exports.ZoomHistory = ZoomHistory;
|
|
24766
|
+
exports.__awaiter = __awaiter;
|
|
24478
24767
|
exports.add = add$4;
|
|
24479
24768
|
exports.addDynamicAttributes = addDynamicAttributes;
|
|
24480
24769
|
exports.arrayBufferToImage = arrayBufferToImage;
|
|
@@ -24520,6 +24809,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
24520
24809
|
exports.getAnchorJustification = getAnchorJustification;
|
|
24521
24810
|
exports.getArrayBuffer = getArrayBuffer;
|
|
24522
24811
|
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
24812
|
+
exports.getImageData = getImageData;
|
|
24523
24813
|
exports.getJSON = getJSON;
|
|
24524
24814
|
exports.getOverlapMode = getOverlapMode;
|
|
24525
24815
|
exports.getProtocolAction = getProtocolAction;
|
|
@@ -24531,6 +24821,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
24531
24821
|
exports.interpolate = interpolate;
|
|
24532
24822
|
exports.invert = invert$2;
|
|
24533
24823
|
exports.isImageBitmap = isImageBitmap;
|
|
24824
|
+
exports.isOffscreenCanvasDistorted = isOffscreenCanvasDistorted;
|
|
24534
24825
|
exports.isSafari = isSafari;
|
|
24535
24826
|
exports.isWorker = isWorker;
|
|
24536
24827
|
exports.keysDifference = keysDifference;
|
|
@@ -24545,6 +24836,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
24545
24836
|
exports.multiply = multiply$5;
|
|
24546
24837
|
exports.nextPowerOfTwo = nextPowerOfTwo;
|
|
24547
24838
|
exports.normalize = normalize$4;
|
|
24839
|
+
exports.offscreenCanvasSupported = offscreenCanvasSupported;
|
|
24548
24840
|
exports.operations = operations;
|
|
24549
24841
|
exports.ortho = ortho;
|
|
24550
24842
|
exports.parseCacheControl = parseCacheControl;
|
|
@@ -24557,6 +24849,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
24557
24849
|
exports.pointGeometry = pointGeometry;
|
|
24558
24850
|
exports.polygonIntersectsPolygon = polygonIntersectsPolygon;
|
|
24559
24851
|
exports.potpack = potpack;
|
|
24852
|
+
exports.readImageUsingVideoFrame = readImageUsingVideoFrame;
|
|
24560
24853
|
exports.register = register;
|
|
24561
24854
|
exports.registerForPluginStateChange = registerForPluginStateChange;
|
|
24562
24855
|
exports.renderColorRamp = renderColorRamp;
|
|
@@ -24871,12 +25164,27 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
24871
25164
|
callback(err);
|
|
24872
25165
|
}
|
|
24873
25166
|
else if (data) {
|
|
24874
|
-
|
|
24875
|
-
vectorTile
|
|
24876
|
-
|
|
24877
|
-
|
|
24878
|
-
|
|
24879
|
-
|
|
25167
|
+
try {
|
|
25168
|
+
const vectorTile = new performance.vectorTile.VectorTile(new performance.Protobuf(data));
|
|
25169
|
+
callback(null, {
|
|
25170
|
+
vectorTile,
|
|
25171
|
+
rawData: data,
|
|
25172
|
+
cacheControl,
|
|
25173
|
+
expires
|
|
25174
|
+
});
|
|
25175
|
+
}
|
|
25176
|
+
catch (ex) {
|
|
25177
|
+
const bytes = new Uint8Array(data);
|
|
25178
|
+
const isGzipped = bytes[0] === 0x1f && bytes[1] === 0x8b;
|
|
25179
|
+
let errorMessage = `Unable to parse the tile at ${params.request.url}, `;
|
|
25180
|
+
if (isGzipped) {
|
|
25181
|
+
errorMessage += 'please make sure the data is not gzipped and that you have configured the relevant header in the server';
|
|
25182
|
+
}
|
|
25183
|
+
else {
|
|
25184
|
+
errorMessage += `got error: ${ex.messge}`;
|
|
25185
|
+
}
|
|
25186
|
+
callback(new Error(errorMessage));
|
|
25187
|
+
}
|
|
24880
25188
|
}
|
|
24881
25189
|
});
|
|
24882
25190
|
return () => {
|
|
@@ -25025,28 +25333,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
25025
25333
|
this.loaded = {};
|
|
25026
25334
|
}
|
|
25027
25335
|
loadTile(params, callback) {
|
|
25028
|
-
|
|
25029
|
-
|
|
25030
|
-
|
|
25031
|
-
|
|
25032
|
-
|
|
25033
|
-
|
|
25034
|
-
|
|
25035
|
-
|
|
25036
|
-
|
|
25037
|
-
|
|
25038
|
-
|
|
25039
|
-
|
|
25040
|
-
this.offscreenCanvas = new OffscreenCanvas(imgBitmap.width, imgBitmap.height);
|
|
25041
|
-
this.offscreenCanvasContext = this.offscreenCanvas.getContext('2d', { willReadFrequently: true });
|
|
25042
|
-
}
|
|
25043
|
-
this.offscreenCanvas.width = imgBitmap.width;
|
|
25044
|
-
this.offscreenCanvas.height = imgBitmap.height;
|
|
25045
|
-
this.offscreenCanvasContext.drawImage(imgBitmap, 0, 0, imgBitmap.width, imgBitmap.height);
|
|
25046
|
-
// Insert an additional 1px padding around the image to allow backfilling for neighboring data.
|
|
25047
|
-
const imgData = this.offscreenCanvasContext.getImageData(-1, -1, imgBitmap.width + 2, imgBitmap.height + 2);
|
|
25048
|
-
this.offscreenCanvasContext.clearRect(0, 0, this.offscreenCanvas.width, this.offscreenCanvas.height);
|
|
25049
|
-
return new performance.RGBAImage({ width: imgData.width, height: imgData.height }, imgData.data);
|
|
25336
|
+
return performance.__awaiter(this, void 0, void 0, function* () {
|
|
25337
|
+
const { uid, encoding, rawImageData, redFactor, greenFactor, blueFactor, baseShift } = params;
|
|
25338
|
+
const width = rawImageData.width + 2;
|
|
25339
|
+
const height = rawImageData.height + 2;
|
|
25340
|
+
const imagePixels = performance.isImageBitmap(rawImageData) ?
|
|
25341
|
+
new performance.RGBAImage({ width, height }, yield performance.getImageData(rawImageData, -1, -1, width, height)) :
|
|
25342
|
+
rawImageData;
|
|
25343
|
+
const dem = new performance.DEMData(uid, imagePixels, encoding, redFactor, greenFactor, blueFactor, baseShift);
|
|
25344
|
+
this.loaded = this.loaded || {};
|
|
25345
|
+
this.loaded[uid] = dem;
|
|
25346
|
+
callback(null, dem);
|
|
25347
|
+
});
|
|
25050
25348
|
}
|
|
25051
25349
|
removeTile(params) {
|
|
25052
25350
|
const loaded = this.loaded, uid = params.uid;
|
|
@@ -26787,10 +27085,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
26787
27085
|
// note: removeAllProperties gives us a new properties object, so we can skip the clone step
|
|
26788
27086
|
const cloneProperties = !update.removeAllProperties && (((_a = update.removeProperties) === null || _a === void 0 ? void 0 : _a.length) > 0 || ((_b = update.addOrUpdateProperties) === null || _b === void 0 ? void 0 : _b.length) > 0);
|
|
26789
27087
|
if (cloneFeature || cloneProperties) {
|
|
26790
|
-
feature = {
|
|
27088
|
+
feature = Object.assign({}, feature);
|
|
26791
27089
|
updateable.set(update.id, feature);
|
|
26792
27090
|
if (cloneProperties) {
|
|
26793
|
-
feature.properties = {
|
|
27091
|
+
feature.properties = Object.assign({}, feature.properties);
|
|
26794
27092
|
}
|
|
26795
27093
|
}
|
|
26796
27094
|
if (update.newGeometry) {
|
|
@@ -26815,34 +27113,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
26815
27113
|
}
|
|
26816
27114
|
}
|
|
26817
27115
|
|
|
26818
|
-
function loadGeoJSONTile(params, callback) {
|
|
26819
|
-
const canonical = params.tileID.canonical;
|
|
26820
|
-
if (!this._geoJSONIndex) {
|
|
26821
|
-
return callback(null, null); // we couldn't load the file
|
|
26822
|
-
}
|
|
26823
|
-
const geoJSONTile = this._geoJSONIndex.getTile(canonical.z, canonical.x, canonical.y);
|
|
26824
|
-
if (!geoJSONTile) {
|
|
26825
|
-
return callback(null, null); // nothing in the given tile
|
|
26826
|
-
}
|
|
26827
|
-
const geojsonWrapper = new GeoJSONWrapper$2(geoJSONTile.features);
|
|
26828
|
-
// Encode the geojson-vt tile into binary vector tile form. This
|
|
26829
|
-
// is a convenience that allows `FeatureIndex` to operate the same way
|
|
26830
|
-
// across `VectorTileSource` and `GeoJSONSource` data.
|
|
26831
|
-
let pbf = vtpbf(geojsonWrapper);
|
|
26832
|
-
if (pbf.byteOffset !== 0 || pbf.byteLength !== pbf.buffer.byteLength) {
|
|
26833
|
-
// Compatibility with node Buffer (https://github.com/mapbox/pbf/issues/35)
|
|
26834
|
-
pbf = new Uint8Array(pbf);
|
|
26835
|
-
}
|
|
26836
|
-
callback(null, {
|
|
26837
|
-
vectorTile: geojsonWrapper,
|
|
26838
|
-
rawData: pbf.buffer
|
|
26839
|
-
});
|
|
26840
|
-
}
|
|
26841
27116
|
/**
|
|
26842
27117
|
* The {@link WorkerSource} implementation that supports {@link GeoJSONSource}.
|
|
26843
27118
|
* This class is designed to be easily reused to support custom source types
|
|
26844
27119
|
* for data formats that can be parsed/converted into an in-memory GeoJSON
|
|
26845
|
-
* representation.
|
|
27120
|
+
* representation. To do so, create it with
|
|
26846
27121
|
* `new GeoJSONWorkerSource(actor, layerIndex, customLoadGeoJSONFunction)`.
|
|
26847
27122
|
* For a full example, see [mapbox-gl-topojson](https://github.com/developmentseed/mapbox-gl-topojson).
|
|
26848
27123
|
*/
|
|
@@ -26853,7 +27128,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
26853
27128
|
* See {@link GeoJSONWorkerSource#loadGeoJSON}.
|
|
26854
27129
|
*/
|
|
26855
27130
|
constructor(actor, layerIndex, availableImages, loadGeoJSON) {
|
|
26856
|
-
super(actor, layerIndex, availableImages
|
|
27131
|
+
super(actor, layerIndex, availableImages);
|
|
26857
27132
|
this._dataUpdateable = new Map();
|
|
26858
27133
|
/**
|
|
26859
27134
|
* Fetch and parse GeoJSON according to the given params. Calls `callback`
|
|
@@ -26902,10 +27177,34 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
26902
27177
|
}
|
|
26903
27178
|
return { cancel: () => { } };
|
|
26904
27179
|
};
|
|
27180
|
+
this.loadVectorData = this.loadGeoJSONTile;
|
|
26905
27181
|
if (loadGeoJSON) {
|
|
26906
27182
|
this.loadGeoJSON = loadGeoJSON;
|
|
26907
27183
|
}
|
|
26908
27184
|
}
|
|
27185
|
+
loadGeoJSONTile(params, callback) {
|
|
27186
|
+
const canonical = params.tileID.canonical;
|
|
27187
|
+
if (!this._geoJSONIndex) {
|
|
27188
|
+
return callback(null, null); // we couldn't load the file
|
|
27189
|
+
}
|
|
27190
|
+
const geoJSONTile = this._geoJSONIndex.getTile(canonical.z, canonical.x, canonical.y);
|
|
27191
|
+
if (!geoJSONTile) {
|
|
27192
|
+
return callback(null, null); // nothing in the given tile
|
|
27193
|
+
}
|
|
27194
|
+
const geojsonWrapper = new GeoJSONWrapper$2(geoJSONTile.features);
|
|
27195
|
+
// Encode the geojson-vt tile into binary vector tile form. This
|
|
27196
|
+
// is a convenience that allows `FeatureIndex` to operate the same way
|
|
27197
|
+
// across `VectorTileSource` and `GeoJSONSource` data.
|
|
27198
|
+
let pbf = vtpbf(geojsonWrapper);
|
|
27199
|
+
if (pbf.byteOffset !== 0 || pbf.byteLength !== pbf.buffer.byteLength) {
|
|
27200
|
+
// Compatibility with node Buffer (https://github.com/mapbox/pbf/issues/35)
|
|
27201
|
+
pbf = new Uint8Array(pbf);
|
|
27202
|
+
}
|
|
27203
|
+
callback(null, {
|
|
27204
|
+
vectorTile: geojsonWrapper,
|
|
27205
|
+
rawData: pbf.buffer
|
|
27206
|
+
});
|
|
27207
|
+
}
|
|
26909
27208
|
/**
|
|
26910
27209
|
* Fetches (if appropriate), parses, and index geojson data into tiles. This
|
|
26911
27210
|
* preparatory method must be called before {@link GeoJSONWorkerSource#loadTile}
|
|
@@ -27187,12 +27486,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27187
27486
|
}
|
|
27188
27487
|
return layerIndexes;
|
|
27189
27488
|
}
|
|
27190
|
-
getWorkerSource(mapId,
|
|
27489
|
+
getWorkerSource(mapId, sourceType, sourceName) {
|
|
27191
27490
|
if (!this.workerSources[mapId])
|
|
27192
27491
|
this.workerSources[mapId] = {};
|
|
27193
|
-
if (!this.workerSources[mapId][
|
|
27194
|
-
this.workerSources[mapId][
|
|
27195
|
-
if (!this.workerSources[mapId][
|
|
27492
|
+
if (!this.workerSources[mapId][sourceType])
|
|
27493
|
+
this.workerSources[mapId][sourceType] = {};
|
|
27494
|
+
if (!this.workerSources[mapId][sourceType][sourceName]) {
|
|
27196
27495
|
// use a wrapped actor so that we can attach a target mapId param
|
|
27197
27496
|
// to any messages invoked by the WorkerSource
|
|
27198
27497
|
const actor = {
|
|
@@ -27200,9 +27499,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27200
27499
|
this.actor.send(type, data, callback, mapId);
|
|
27201
27500
|
}
|
|
27202
27501
|
};
|
|
27203
|
-
this.workerSources[mapId][
|
|
27502
|
+
this.workerSources[mapId][sourceType][sourceName] = new this.workerSourceTypes[sourceType](actor, this.getLayerIndex(mapId), this.getAvailableImages(mapId));
|
|
27204
27503
|
}
|
|
27205
|
-
return this.workerSources[mapId][
|
|
27504
|
+
return this.workerSources[mapId][sourceType][sourceName];
|
|
27206
27505
|
}
|
|
27207
27506
|
getDEMWorkerSource(mapId, source) {
|
|
27208
27507
|
if (!this.demWorkerSources[mapId])
|
|
@@ -27224,7 +27523,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27224
27523
|
define(['./shared'], (function (performance) {
|
|
27225
27524
|
var name = "azuremaps-maplibre-gl";
|
|
27226
27525
|
var description = "BSD licensed community fork of mapbox-gl, a WebGL interactive maps library";
|
|
27227
|
-
var version$2 = "3.
|
|
27526
|
+
var version$2 = "3.6.1";
|
|
27228
27527
|
var main = "dist/azuremaps-maplibre-gl.js";
|
|
27229
27528
|
var style = "dist/azuremaps-maplibre-gl.css";
|
|
27230
27529
|
var license = "BSD-3-Clause";
|
|
@@ -27243,12 +27542,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27243
27542
|
"@mapbox/unitbezier": "^0.0.1",
|
|
27244
27543
|
"@mapbox/vector-tile": "^1.3.1",
|
|
27245
27544
|
"@mapbox/whoots-js": "^3.1.0",
|
|
27246
|
-
"@maplibre/maplibre-gl-style-spec": "^19.3.
|
|
27247
|
-
"@types/geojson": "^7946.0.
|
|
27248
|
-
"@types/mapbox__point-geometry": "^0.1.
|
|
27249
|
-
"@types/mapbox__vector-tile": "^1.3.
|
|
27250
|
-
"@types/pbf": "^3.0.
|
|
27251
|
-
"@types/supercluster": "^7.1.
|
|
27545
|
+
"@maplibre/maplibre-gl-style-spec": "^19.3.3",
|
|
27546
|
+
"@types/geojson": "^7946.0.13",
|
|
27547
|
+
"@types/mapbox__point-geometry": "^0.1.4",
|
|
27548
|
+
"@types/mapbox__vector-tile": "^1.3.3",
|
|
27549
|
+
"@types/pbf": "^3.0.4",
|
|
27550
|
+
"@types/supercluster": "^7.1.3",
|
|
27252
27551
|
earcut: "^2.2.4",
|
|
27253
27552
|
"geojson-vt": "^3.2.1",
|
|
27254
27553
|
"gl-matrix": "^3.4.3",
|
|
@@ -27265,94 +27564,94 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27265
27564
|
var devDependencies = {
|
|
27266
27565
|
"@mapbox/mapbox-gl-rtl-text": "^0.2.3",
|
|
27267
27566
|
"@mapbox/mvt-fixtures": "^3.10.0",
|
|
27268
|
-
"@rollup/plugin-commonjs": "^25.0.
|
|
27269
|
-
"@rollup/plugin-json": "^6.0.
|
|
27270
|
-
"@rollup/plugin-node-resolve": "^15.
|
|
27271
|
-
"@rollup/plugin-replace": "^5.0.
|
|
27272
|
-
"@rollup/plugin-strip": "^3.0.
|
|
27273
|
-
"@rollup/plugin-terser": "^0.4.
|
|
27274
|
-
"@rollup/plugin-typescript": "^11.1.
|
|
27275
|
-
"@types/benchmark": "^2.1.
|
|
27567
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
27568
|
+
"@rollup/plugin-json": "^6.0.1",
|
|
27569
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
27570
|
+
"@rollup/plugin-replace": "^5.0.5",
|
|
27571
|
+
"@rollup/plugin-strip": "^3.0.4",
|
|
27572
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
27573
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
|
27574
|
+
"@types/benchmark": "^2.1.5",
|
|
27276
27575
|
"@types/cssnano": "^5.0.0",
|
|
27277
|
-
"@types/d3": "^7.4.
|
|
27278
|
-
"@types/diff": "^5.0.
|
|
27279
|
-
"@types/earcut": "^2.1.
|
|
27280
|
-
"@types/eslint": "^8.44.
|
|
27281
|
-
"@types/
|
|
27576
|
+
"@types/d3": "^7.4.2",
|
|
27577
|
+
"@types/diff": "^5.0.8",
|
|
27578
|
+
"@types/earcut": "^2.1.4",
|
|
27579
|
+
"@types/eslint": "^8.44.7",
|
|
27580
|
+
"@types/geojson-vt": "3.2.4",
|
|
27581
|
+
"@types/gl": "^6.0.4",
|
|
27282
27582
|
"@types/glob": "^8.1.0",
|
|
27283
|
-
"@types/jest": "^29.5.
|
|
27284
|
-
"@types/jsdom": "^21.1.
|
|
27285
|
-
"@types/minimist": "^1.2.
|
|
27286
|
-
"@types/murmurhash-js": "^1.0.
|
|
27287
|
-
"@types/nise": "^1.4.
|
|
27288
|
-
"@types/node": "^20.
|
|
27289
|
-
"@types/offscreencanvas": "^2019.7.
|
|
27290
|
-
"@types/pixelmatch": "^5.2.
|
|
27291
|
-
"@types/pngjs": "^6.0.
|
|
27292
|
-
"@types/react": "^18.2.
|
|
27293
|
-
"@types/react-dom": "^18.2.
|
|
27294
|
-
"@types/request": "^2.48.
|
|
27295
|
-
"@types/shuffle-seed": "^1.1.
|
|
27296
|
-
"@types/window-or-global": "^1.0.
|
|
27297
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
27298
|
-
"@typescript-eslint/parser": "^6.
|
|
27299
|
-
address: "^
|
|
27583
|
+
"@types/jest": "^29.5.8",
|
|
27584
|
+
"@types/jsdom": "^21.1.5",
|
|
27585
|
+
"@types/minimist": "^1.2.5",
|
|
27586
|
+
"@types/murmurhash-js": "^1.0.5",
|
|
27587
|
+
"@types/nise": "^1.4.4",
|
|
27588
|
+
"@types/node": "^20.9.0",
|
|
27589
|
+
"@types/offscreencanvas": "^2019.7.3",
|
|
27590
|
+
"@types/pixelmatch": "^5.2.5",
|
|
27591
|
+
"@types/pngjs": "^6.0.4",
|
|
27592
|
+
"@types/react": "^18.2.35",
|
|
27593
|
+
"@types/react-dom": "^18.2.14",
|
|
27594
|
+
"@types/request": "^2.48.12",
|
|
27595
|
+
"@types/shuffle-seed": "^1.1.2",
|
|
27596
|
+
"@types/window-or-global": "^1.0.6",
|
|
27597
|
+
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
|
27598
|
+
"@typescript-eslint/parser": "^6.10.0",
|
|
27599
|
+
address: "^2.0.1",
|
|
27300
27600
|
benchmark: "^2.1.4",
|
|
27301
27601
|
canvas: "^2.11.2",
|
|
27302
27602
|
cssnano: "^6.0.1",
|
|
27303
27603
|
d3: "^7.8.5",
|
|
27304
27604
|
"d3-queue": "^3.0.7",
|
|
27305
|
-
"devtools-protocol": "^0.0.
|
|
27605
|
+
"devtools-protocol": "^0.0.1219864",
|
|
27306
27606
|
diff: "^5.1.0",
|
|
27307
|
-
"dts-bundle-generator": "^8.
|
|
27308
|
-
eslint: "^8.
|
|
27607
|
+
"dts-bundle-generator": "^8.1.2",
|
|
27608
|
+
eslint: "^8.53.0",
|
|
27309
27609
|
"eslint-config-mourner": "^3.0.0",
|
|
27310
27610
|
"eslint-plugin-html": "^7.1.0",
|
|
27311
|
-
"eslint-plugin-import": "^2.
|
|
27312
|
-
"eslint-plugin-jest": "^27.
|
|
27313
|
-
"eslint-plugin-react": "^7.33.
|
|
27611
|
+
"eslint-plugin-import": "^2.29.0",
|
|
27612
|
+
"eslint-plugin-jest": "^27.6.0",
|
|
27613
|
+
"eslint-plugin-react": "^7.33.2",
|
|
27314
27614
|
"eslint-plugin-tsdoc": "0.2.17",
|
|
27315
|
-
expect: "^29.
|
|
27615
|
+
expect: "^29.7.0",
|
|
27316
27616
|
gl: "^6.0.2",
|
|
27317
|
-
glob: "^10.3.
|
|
27617
|
+
glob: "^10.3.10",
|
|
27318
27618
|
"is-builtin-module": "^3.2.1",
|
|
27319
|
-
jest: "^29.
|
|
27619
|
+
jest: "^29.7.0",
|
|
27320
27620
|
"jest-canvas-mock": "^2.5.2",
|
|
27321
|
-
"jest-environment-jsdom": "^29.
|
|
27621
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
27322
27622
|
jsdom: "^22.1.0",
|
|
27323
27623
|
"json-stringify-pretty-compact": "^4.0.0",
|
|
27324
27624
|
minimist: "^1.2.8",
|
|
27325
27625
|
"mock-geolocation": "^1.0.11",
|
|
27326
|
-
nise: "^5.1.
|
|
27327
|
-
"node-plantuml": "^0.9.0",
|
|
27626
|
+
nise: "^5.1.5",
|
|
27328
27627
|
"npm-font-open-sans": "^1.1.0",
|
|
27329
27628
|
"npm-run-all": "^4.1.5",
|
|
27330
27629
|
"pdf-merger-js": "^4.3.0",
|
|
27331
27630
|
pixelmatch: "^5.3.0",
|
|
27332
27631
|
pngjs: "^7.0.0",
|
|
27333
|
-
postcss: "^8.4.
|
|
27632
|
+
postcss: "^8.4.31",
|
|
27334
27633
|
"postcss-cli": "^10.1.0",
|
|
27335
27634
|
"postcss-inline-svg": "^6.0.0",
|
|
27336
27635
|
"pretty-bytes": "^6.1.1",
|
|
27337
|
-
puppeteer: "^21.
|
|
27636
|
+
puppeteer: "^21.5.1",
|
|
27338
27637
|
react: "^18.2.0",
|
|
27339
27638
|
"react-dom": "^18.2.0",
|
|
27340
|
-
rollup: "^
|
|
27639
|
+
rollup: "^4.4.0",
|
|
27341
27640
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
27342
27641
|
rw: "^1.3.3",
|
|
27343
27642
|
semver: "^7.5.4",
|
|
27344
27643
|
"shuffle-seed": "^1.1.6",
|
|
27345
27644
|
"source-map-explorer": "^2.5.3",
|
|
27346
27645
|
st: "^3.0.0",
|
|
27347
|
-
stylelint: "^15.
|
|
27646
|
+
stylelint: "^15.11.0",
|
|
27348
27647
|
"stylelint-config-standard": "^34.0.0",
|
|
27349
27648
|
"ts-jest": "^29.1.1",
|
|
27350
27649
|
"ts-node": "^10.9.1",
|
|
27351
|
-
tslib: "^2.6.
|
|
27352
|
-
typedoc: "^0.
|
|
27353
|
-
"typedoc-plugin-markdown": "^3.
|
|
27354
|
-
"typedoc-plugin-missing-exports": "^2.0
|
|
27355
|
-
typescript: "^5.
|
|
27650
|
+
tslib: "^2.6.2",
|
|
27651
|
+
typedoc: "^0.25.3",
|
|
27652
|
+
"typedoc-plugin-markdown": "^3.17.1",
|
|
27653
|
+
"typedoc-plugin-missing-exports": "^2.1.0",
|
|
27654
|
+
typescript: "^5.2.2"
|
|
27356
27655
|
};
|
|
27357
27656
|
var overrides = {
|
|
27358
27657
|
"postcss-inline-svg": {
|
|
@@ -27378,11 +27677,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27378
27677
|
"build-csp": "rollup --configPlugin @rollup/plugin-typescript -c rollup.config.csp.ts",
|
|
27379
27678
|
"build-csp-dev": "rollup --configPlugin @rollup/plugin-typescript -c rollup.config.csp.ts --environment BUILD:dev",
|
|
27380
27679
|
"build-css": "postcss -o dist/azuremaps-maplibre-gl.css src/css/azuremaps-maplibre-gl.css",
|
|
27381
|
-
"build-diagrams": "cd docs/diagrams; ls *.plantuml | xargs -I {} puml generate --svg {} -o {}.svg",
|
|
27382
27680
|
"watch-css": "postcss --watch -o dist/azuremaps-maplibre-gl.css src/css/azuremaps-maplibre-gl.css",
|
|
27383
27681
|
"build-benchmarks": "npm run build-dev && rollup --configPlugin @rollup/plugin-typescript -c test/bench/rollup_config_benchmarks.ts",
|
|
27384
27682
|
"watch-benchmarks": "rollup --configPlugin @rollup/plugin-typescript -c test/bench/rollup_config_benchmarks.ts --watch",
|
|
27385
27683
|
"start-server": "st --no-cache -H 0.0.0.0 --port 9966 .",
|
|
27684
|
+
"start-docs": "docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material",
|
|
27386
27685
|
start: "run-p watch-css watch-dev start-server",
|
|
27387
27686
|
"start-bench": "run-p watch-css watch-benchmarks start-server",
|
|
27388
27687
|
lint: "eslint --cache --ext .ts,.tsx,.js,.html --ignore-path .gitignore .",
|
|
@@ -28554,6 +28853,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28554
28853
|
if (!this._doesCharSupportLocalGlyph(id)) {
|
|
28555
28854
|
return;
|
|
28556
28855
|
}
|
|
28856
|
+
// Client-generated glyphs are rendered at 2x texture scale,
|
|
28857
|
+
// because CJK glyphs are more detailed than others.
|
|
28858
|
+
const textureScale = 2;
|
|
28557
28859
|
let tinySDF = entry.tinySDF;
|
|
28558
28860
|
if (!tinySDF) {
|
|
28559
28861
|
let fontWeight = '400';
|
|
@@ -28567,9 +28869,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28567
28869
|
fontWeight = '200';
|
|
28568
28870
|
}
|
|
28569
28871
|
tinySDF = entry.tinySDF = new GlyphManager.TinySDF({
|
|
28570
|
-
fontSize: 24,
|
|
28571
|
-
buffer: 3,
|
|
28572
|
-
radius: 8,
|
|
28872
|
+
fontSize: 24 * textureScale,
|
|
28873
|
+
buffer: 3 * textureScale,
|
|
28874
|
+
radius: 8 * textureScale,
|
|
28573
28875
|
cutoff: 0.25,
|
|
28574
28876
|
fontFamily,
|
|
28575
28877
|
fontWeight
|
|
@@ -28589,16 +28891,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28589
28891
|
* To approximately align TinySDF glyphs with server-provided glyphs, we use this baseline adjustment
|
|
28590
28892
|
* factor calibrated to be in between DIN Pro and Arial Unicode (but closer to Arial Unicode)
|
|
28591
28893
|
*/
|
|
28592
|
-
const topAdjustment = 27;
|
|
28894
|
+
const topAdjustment = 27.5;
|
|
28895
|
+
const leftAdjustment = 0.5;
|
|
28593
28896
|
return {
|
|
28594
28897
|
id,
|
|
28595
|
-
bitmap: new performance.AlphaImage({ width: char.width || 30, height: char.height || 30 }, char.data),
|
|
28898
|
+
bitmap: new performance.AlphaImage({ width: char.width || 30 * textureScale, height: char.height || 30 * textureScale }, char.data),
|
|
28596
28899
|
metrics: {
|
|
28597
|
-
width: char.glyphWidth || 24,
|
|
28598
|
-
height: char.glyphHeight || 24,
|
|
28599
|
-
left: char.glyphLeft || 0,
|
|
28600
|
-
top: char.glyphTop - topAdjustment || -8,
|
|
28601
|
-
advance: char.glyphAdvance || 24
|
|
28900
|
+
width: char.glyphWidth / textureScale || 24,
|
|
28901
|
+
height: char.glyphHeight / textureScale || 24,
|
|
28902
|
+
left: (char.glyphLeft / textureScale + leftAdjustment) || 0,
|
|
28903
|
+
top: char.glyphTop / textureScale - topAdjustment || -8,
|
|
28904
|
+
advance: char.glyphAdvance / textureScale || 24,
|
|
28905
|
+
isDoubleResolution: true
|
|
28602
28906
|
}
|
|
28603
28907
|
};
|
|
28604
28908
|
}
|
|
@@ -28856,7 +29160,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28856
29160
|
const workers = this.workerPool.acquire(mapId);
|
|
28857
29161
|
for (let i = 0; i < workers.length; i++) {
|
|
28858
29162
|
const worker = workers[i];
|
|
28859
|
-
const actor = new
|
|
29163
|
+
const actor = new performance.Actor(worker, parent, mapId);
|
|
28860
29164
|
actor.name = `Worker ${i}`;
|
|
28861
29165
|
this.actors.push(actor);
|
|
28862
29166
|
}
|
|
@@ -28887,7 +29191,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28887
29191
|
this.workerPool.release(this.id);
|
|
28888
29192
|
}
|
|
28889
29193
|
}
|
|
28890
|
-
Dispatcher.Actor = performance.Actor;
|
|
28891
29194
|
|
|
28892
29195
|
function loadTileJson(options, requestManager, callback) {
|
|
28893
29196
|
const loaded = function (err, tileJSON) {
|
|
@@ -29258,7 +29561,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29258
29561
|
* map.getSource('some id').setTiles(['https://d25uarhxywzl1j.cloudfront.net/v0.1/{z}/{x}/{y}.mvt']);
|
|
29259
29562
|
* ```
|
|
29260
29563
|
* @see [Add a vector tile source](https://maplibre.org/maplibre-gl-js/docs/examples/vector-source/)
|
|
29261
|
-
* @see [Add a third party vector tile source](https://maplibre.org/maplibre-gl-js/docs/examples/third-party/)
|
|
29262
29564
|
*/
|
|
29263
29565
|
class VectorTileSource extends performance.Evented {
|
|
29264
29566
|
constructor(id, options, dispatcher, eventedParent) {
|
|
@@ -29428,7 +29730,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29428
29730
|
* ```ts
|
|
29429
29731
|
* map.addSource('raster-source', {
|
|
29430
29732
|
* 'type': 'raster',
|
|
29431
|
-
* 'tiles': ['https://
|
|
29733
|
+
* 'tiles': ['https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg'],
|
|
29432
29734
|
* 'tileSize': 256,
|
|
29433
29735
|
* });
|
|
29434
29736
|
* ```
|
|
@@ -29498,6 +29800,25 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29498
29800
|
this._tileJSONRequest = null;
|
|
29499
29801
|
}
|
|
29500
29802
|
}
|
|
29803
|
+
setSourceProperty(callback) {
|
|
29804
|
+
if (this._tileJSONRequest) {
|
|
29805
|
+
this._tileJSONRequest.cancel();
|
|
29806
|
+
}
|
|
29807
|
+
callback();
|
|
29808
|
+
this.load();
|
|
29809
|
+
}
|
|
29810
|
+
/**
|
|
29811
|
+
* Sets the source `tiles` property and re-renders the map.
|
|
29812
|
+
*
|
|
29813
|
+
* @param tiles - An array of one or more tile source URLs, as in the raster tiles spec (See the [Style Specification](https://maplibre.org/maplibre-style-spec/)
|
|
29814
|
+
* @returns `this`
|
|
29815
|
+
*/
|
|
29816
|
+
setTiles(tiles) {
|
|
29817
|
+
this.setSourceProperty(() => {
|
|
29818
|
+
this._options.tiles = tiles;
|
|
29819
|
+
});
|
|
29820
|
+
return this;
|
|
29821
|
+
}
|
|
29501
29822
|
serialize() {
|
|
29502
29823
|
return performance.extend({}, this._options);
|
|
29503
29824
|
}
|
|
@@ -29554,16 +29875,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29554
29875
|
}
|
|
29555
29876
|
}
|
|
29556
29877
|
|
|
29557
|
-
let supportsOffscreenCanvas;
|
|
29558
|
-
function offscreenCanvasSupported() {
|
|
29559
|
-
if (supportsOffscreenCanvas == null) {
|
|
29560
|
-
supportsOffscreenCanvas = typeof OffscreenCanvas !== 'undefined' &&
|
|
29561
|
-
new OffscreenCanvas(1, 1).getContext('2d') &&
|
|
29562
|
-
typeof createImageBitmap === 'function';
|
|
29563
|
-
}
|
|
29564
|
-
return supportsOffscreenCanvas;
|
|
29565
|
-
}
|
|
29566
|
-
|
|
29567
29878
|
/**
|
|
29568
29879
|
* A source containing raster DEM tiles (See the [Style Specification](https://maplibre.org/maplibre-style-spec/) for detailed documentation of options.)
|
|
29569
29880
|
* This source can be used to show hillshading and 3D terrain
|
|
@@ -29587,12 +29898,16 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29587
29898
|
this.maxzoom = 22;
|
|
29588
29899
|
this._options = performance.extend({ type: 'raster-dem' }, options);
|
|
29589
29900
|
this.encoding = options.encoding || 'mapbox';
|
|
29901
|
+
this.redFactor = options.redFactor;
|
|
29902
|
+
this.greenFactor = options.greenFactor;
|
|
29903
|
+
this.blueFactor = options.blueFactor;
|
|
29904
|
+
this.baseShift = options.baseShift;
|
|
29590
29905
|
}
|
|
29591
29906
|
loadTile(tile, callback) {
|
|
29592
29907
|
const url = tile.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme);
|
|
29593
|
-
|
|
29908
|
+
const request = this.map._requestManager.transformRequest(url, ResourceType.Tile);
|
|
29594
29909
|
tile.neighboringTiles = this._getNeighboringTiles(tile.tileID);
|
|
29595
|
-
|
|
29910
|
+
tile.request = ImageRequest.getImage(request, (err, img, expiry) => performance.__awaiter(this, void 0, void 0, function* () {
|
|
29596
29911
|
delete tile.request;
|
|
29597
29912
|
if (tile.aborted) {
|
|
29598
29913
|
tile.state = 'unloaded';
|
|
@@ -29604,23 +29919,40 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29604
29919
|
}
|
|
29605
29920
|
else if (img) {
|
|
29606
29921
|
if (this.map._refreshExpiredTiles)
|
|
29607
|
-
tile.setExpiryData(
|
|
29608
|
-
|
|
29609
|
-
|
|
29610
|
-
const transfer = performance.isImageBitmap(img) && offscreenCanvasSupported();
|
|
29611
|
-
const rawImageData = transfer ? img : performance.browser.getImageData(img, 1);
|
|
29922
|
+
tile.setExpiryData(expiry);
|
|
29923
|
+
const transfer = performance.isImageBitmap(img) && performance.offscreenCanvasSupported();
|
|
29924
|
+
const rawImageData = transfer ? img : yield readImageNow(img);
|
|
29612
29925
|
const params = {
|
|
29613
29926
|
uid: tile.uid,
|
|
29614
29927
|
coord: tile.tileID,
|
|
29615
29928
|
source: this.id,
|
|
29616
29929
|
rawImageData,
|
|
29617
|
-
encoding: this.encoding
|
|
29930
|
+
encoding: this.encoding,
|
|
29931
|
+
redFactor: this.redFactor,
|
|
29932
|
+
greenFactor: this.greenFactor,
|
|
29933
|
+
blueFactor: this.blueFactor,
|
|
29934
|
+
baseShift: this.baseShift
|
|
29618
29935
|
};
|
|
29619
29936
|
if (!tile.actor || tile.state === 'expired') {
|
|
29620
29937
|
tile.actor = this.dispatcher.getActor();
|
|
29621
|
-
tile.actor.send('loadDEMTile', params, done
|
|
29938
|
+
tile.actor.send('loadDEMTile', params, done);
|
|
29622
29939
|
}
|
|
29623
29940
|
}
|
|
29941
|
+
}), this.map._refreshExpiredTiles);
|
|
29942
|
+
function readImageNow(img) {
|
|
29943
|
+
return performance.__awaiter(this, void 0, void 0, function* () {
|
|
29944
|
+
if (typeof VideoFrame !== 'undefined' && performance.isOffscreenCanvasDistorted()) {
|
|
29945
|
+
const width = img.width + 2;
|
|
29946
|
+
const height = img.height + 2;
|
|
29947
|
+
try {
|
|
29948
|
+
return new performance.RGBAImage({ width, height }, yield performance.readImageUsingVideoFrame(img, -1, -1, width, height));
|
|
29949
|
+
}
|
|
29950
|
+
catch (e) {
|
|
29951
|
+
// fall-back to browser canvas decoding
|
|
29952
|
+
}
|
|
29953
|
+
}
|
|
29954
|
+
return performance.browser.getImageData(img, 1);
|
|
29955
|
+
});
|
|
29624
29956
|
}
|
|
29625
29957
|
function done(err, data) {
|
|
29626
29958
|
if (err) {
|
|
@@ -29954,8 +30286,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29954
30286
|
performance.extend(data, { resourceTiming });
|
|
29955
30287
|
// although GeoJSON sources contain no metadata, we fire this event to let the SourceCache
|
|
29956
30288
|
// know its ok to start requesting tiles.
|
|
29957
|
-
this.fire(new performance.Event('data', {
|
|
29958
|
-
this.fire(new performance.Event('data', {
|
|
30289
|
+
this.fire(new performance.Event('data', Object.assign(Object.assign({}, data), { sourceDataType: 'metadata' })));
|
|
30290
|
+
this.fire(new performance.Event('data', Object.assign(Object.assign({}, data), { sourceDataType: 'content' })));
|
|
29959
30291
|
});
|
|
29960
30292
|
}
|
|
29961
30293
|
loaded() {
|
|
@@ -30288,6 +30620,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
30288
30620
|
* map.removeSource('some id'); // remove
|
|
30289
30621
|
* ```
|
|
30290
30622
|
* @see [Add a video](https://maplibre.org/maplibre-gl-js/docs/examples/video-on-a-map/)
|
|
30623
|
+
*
|
|
30624
|
+
* Note that when rendered as a raster layer, the layer's `raster-fade-duration` property will cause the video to fade in.
|
|
30625
|
+
* This happens when playback is started, paused and resumed, or when the video's coordinates are updated. To avoid this behavior,
|
|
30626
|
+
* set the layer's `raster-fade-duration` property to `0`.
|
|
30291
30627
|
*/
|
|
30292
30628
|
class VideoSource extends ImageSource {
|
|
30293
30629
|
constructor(id, options, dispatcher, eventedParent) {
|
|
@@ -34837,6 +35173,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
34837
35173
|
this._load(empty, { validate: false });
|
|
34838
35174
|
}
|
|
34839
35175
|
_load(json, options, previousStyle) {
|
|
35176
|
+
var _a;
|
|
34840
35177
|
const nextState = options.transformStyle ? options.transformStyle(previousStyle, json) : json;
|
|
34841
35178
|
if (options.validate && emitValidationErrors(this, performance.validateStyle(nextState))) {
|
|
34842
35179
|
return;
|
|
@@ -34855,7 +35192,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
34855
35192
|
this.glyphManager.setURL(nextState.glyphs);
|
|
34856
35193
|
this._createLayers();
|
|
34857
35194
|
this.light = new Light(this.stylesheet.light);
|
|
34858
|
-
this.map.setTerrain(this.stylesheet.terrain);
|
|
35195
|
+
this.map.setTerrain((_a = this.stylesheet.terrain) !== null && _a !== void 0 ? _a : null);
|
|
34859
35196
|
this.fire(new performance.Event('data', { dataType: 'style' }));
|
|
34860
35197
|
this.fire(new performance.Event('style.load'));
|
|
34861
35198
|
}
|
|
@@ -35147,6 +35484,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
35147
35484
|
this[op.command].apply(this, op.args);
|
|
35148
35485
|
}
|
|
35149
35486
|
this.stylesheet = nextState;
|
|
35487
|
+
// reset serialization field, to be populated only when needed
|
|
35488
|
+
this._serializedLayers = null;
|
|
35150
35489
|
return true;
|
|
35151
35490
|
}
|
|
35152
35491
|
addImage(id, image) {
|
|
@@ -35273,7 +35612,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
35273
35612
|
layer = performance.createStyleLayer(layerObject);
|
|
35274
35613
|
}
|
|
35275
35614
|
else {
|
|
35276
|
-
if (typeof layerObject.source === 'object') {
|
|
35615
|
+
if ('source' in layerObject && typeof layerObject.source === 'object') {
|
|
35277
35616
|
this.addSource(id, layerObject.source);
|
|
35278
35617
|
layerObject = performance.clone$1(layerObject);
|
|
35279
35618
|
layerObject = performance.extend(layerObject, { source: id });
|
|
@@ -35384,7 +35723,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
35384
35723
|
return this._layers[id];
|
|
35385
35724
|
}
|
|
35386
35725
|
/**
|
|
35387
|
-
*
|
|
35726
|
+
* Return the ids of all layers currently in the style, including custom layers, in order.
|
|
35727
|
+
*
|
|
35728
|
+
* @returns ids of layers, in order
|
|
35729
|
+
*/
|
|
35730
|
+
getLayersOrder() {
|
|
35731
|
+
return [...this._order];
|
|
35732
|
+
}
|
|
35733
|
+
/**
|
|
35734
|
+
* Checks if a specific layer is present within the style.
|
|
35388
35735
|
*
|
|
35389
35736
|
* @param id - the id of the desired layer
|
|
35390
35737
|
* @returns a boolean specifying if the given layer is present
|
|
@@ -35557,6 +35904,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
35557
35904
|
return;
|
|
35558
35905
|
const sources = performance.mapObject(this.sourceCaches, (source) => source.serialize());
|
|
35559
35906
|
const layers = this._serializeByIds(this._order);
|
|
35907
|
+
const terrain = this.map.getTerrain() || undefined;
|
|
35560
35908
|
const myStyleSheet = this.stylesheet;
|
|
35561
35909
|
return performance.filterObject({
|
|
35562
35910
|
version: myStyleSheet.version,
|
|
@@ -35571,7 +35919,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
35571
35919
|
glyphs: myStyleSheet.glyphs,
|
|
35572
35920
|
transition: myStyleSheet.transition,
|
|
35573
35921
|
sources,
|
|
35574
|
-
layers
|
|
35922
|
+
layers,
|
|
35923
|
+
terrain
|
|
35575
35924
|
}, (value) => { return value !== undefined; });
|
|
35576
35925
|
}
|
|
35577
35926
|
_updateLayer(layer) {
|
|
@@ -36474,6 +36823,9 @@ uniform ${precision} ${type} u_${name};
|
|
|
36474
36823
|
}
|
|
36475
36824
|
gl.shaderSource(fragmentShader, fragmentSource);
|
|
36476
36825
|
gl.compileShader(fragmentShader);
|
|
36826
|
+
if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {
|
|
36827
|
+
throw new Error(`Could not compile fragment shader: ${gl.getShaderInfoLog(fragmentShader)}`);
|
|
36828
|
+
}
|
|
36477
36829
|
gl.attachShader(this.program, fragmentShader);
|
|
36478
36830
|
const vertexShader = gl.createShader(gl.VERTEX_SHADER);
|
|
36479
36831
|
if (gl.isContextLost()) {
|
|
@@ -36482,6 +36834,9 @@ uniform ${precision} ${type} u_${name};
|
|
|
36482
36834
|
}
|
|
36483
36835
|
gl.shaderSource(vertexShader, vertexSource);
|
|
36484
36836
|
gl.compileShader(vertexShader);
|
|
36837
|
+
if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {
|
|
36838
|
+
throw new Error(`Could not compile vertex shader: ${gl.getShaderInfoLog(vertexShader)}`);
|
|
36839
|
+
}
|
|
36485
36840
|
gl.attachShader(this.program, vertexShader);
|
|
36486
36841
|
this.attributes = {};
|
|
36487
36842
|
const uniformLocations = {};
|
|
@@ -36493,6 +36848,9 @@ uniform ${precision} ${type} u_${name};
|
|
|
36493
36848
|
}
|
|
36494
36849
|
}
|
|
36495
36850
|
gl.linkProgram(this.program);
|
|
36851
|
+
if (!gl.getProgramParameter(this.program, gl.LINK_STATUS)) {
|
|
36852
|
+
throw new Error(`Program failed to link: ${gl.getProgramInfoLog(this.program)}`);
|
|
36853
|
+
}
|
|
36496
36854
|
gl.deleteShader(vertexShader);
|
|
36497
36855
|
gl.deleteShader(fragmentShader);
|
|
36498
36856
|
for (let it = 0; it < allUniformsInfo.length; it++) {
|
|
@@ -37296,11 +37654,12 @@ uniform ${precision} ${type} u_${name};
|
|
|
37296
37654
|
|
|
37297
37655
|
const cache = new WeakMap();
|
|
37298
37656
|
function isWebGL2(gl) {
|
|
37657
|
+
var _a;
|
|
37299
37658
|
if (cache.has(gl)) {
|
|
37300
37659
|
return cache.get(gl);
|
|
37301
37660
|
}
|
|
37302
37661
|
else {
|
|
37303
|
-
const value = gl.getParameter(gl.VERSION).startsWith('WebGL 2.0');
|
|
37662
|
+
const value = (_a = gl.getParameter(gl.VERSION)) === null || _a === void 0 ? void 0 : _a.startsWith('WebGL 2.0');
|
|
37304
37663
|
cache.set(gl, value);
|
|
37305
37664
|
return value;
|
|
37306
37665
|
}
|
|
@@ -40732,16 +41091,20 @@ uniform ${precision} ${type} u_${name};
|
|
|
40732
41091
|
function throttle(fn, time) {
|
|
40733
41092
|
let pending = false;
|
|
40734
41093
|
let timerId = null;
|
|
41094
|
+
let lastCallContext = null;
|
|
41095
|
+
let lastCallArgs;
|
|
40735
41096
|
const later = () => {
|
|
40736
41097
|
timerId = null;
|
|
40737
41098
|
if (pending) {
|
|
40738
|
-
fn();
|
|
41099
|
+
fn.apply(lastCallContext, lastCallArgs);
|
|
40739
41100
|
timerId = setTimeout(later, time);
|
|
40740
41101
|
pending = false;
|
|
40741
41102
|
}
|
|
40742
41103
|
};
|
|
40743
|
-
return () => {
|
|
41104
|
+
return (...args) => {
|
|
40744
41105
|
pending = true;
|
|
41106
|
+
lastCallContext = this;
|
|
41107
|
+
lastCallArgs = args;
|
|
40745
41108
|
if (!timerId) {
|
|
40746
41109
|
later();
|
|
40747
41110
|
}
|
|
@@ -42548,6 +42911,12 @@ uniform ${precision} ${type} u_${name};
|
|
|
42548
42911
|
}
|
|
42549
42912
|
reset() {
|
|
42550
42913
|
this._active = false;
|
|
42914
|
+
this._zooming = false;
|
|
42915
|
+
delete this._targetZoom;
|
|
42916
|
+
if (this._finishTimeout) {
|
|
42917
|
+
clearTimeout(this._finishTimeout);
|
|
42918
|
+
delete this._finishTimeout;
|
|
42919
|
+
}
|
|
42551
42920
|
}
|
|
42552
42921
|
}
|
|
42553
42922
|
|
|
@@ -43327,7 +43696,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
43327
43696
|
this._updatingCamera = true;
|
|
43328
43697
|
const inertialEase = this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions);
|
|
43329
43698
|
const shouldSnapToNorth = bearing => bearing !== 0 && -this._bearingSnap < bearing && bearing < this._bearingSnap;
|
|
43330
|
-
if (inertialEase) {
|
|
43699
|
+
if (inertialEase && (inertialEase.essential || !performance.browser.prefersReducedMotion)) {
|
|
43331
43700
|
if (shouldSnapToNorth(inertialEase.bearing || this._map.getBearing())) {
|
|
43332
43701
|
inertialEase.bearing = 0;
|
|
43333
43702
|
}
|
|
@@ -43368,7 +43737,8 @@ uniform ${precision} ${type} u_${name};
|
|
|
43368
43737
|
this._renderFrameCallback = () => {
|
|
43369
43738
|
const t = Math.min((performance.browser.now() - this._easeStart) / this._easeOptions.duration, 1);
|
|
43370
43739
|
this._onEaseFrame(this._easeOptions.easing(t));
|
|
43371
|
-
if
|
|
43740
|
+
// if _stop is called during _onEaseFrame from _fireMoveEvents we should avoid a new _requestRenderFrame, checking it by ensuring _easeFrameId was not deleted
|
|
43741
|
+
if (t < 1 && this._easeFrameId) {
|
|
43372
43742
|
this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback);
|
|
43373
43743
|
}
|
|
43374
43744
|
else {
|
|
@@ -45555,14 +45925,17 @@ uniform ${precision} ${type} u_${name};
|
|
|
45555
45925
|
if (typeof window !== 'undefined') {
|
|
45556
45926
|
addEventListener('online', this._onWindowOnline, false);
|
|
45557
45927
|
let initialResizeEventCaptured = false;
|
|
45928
|
+
const throttledResizeCallback = throttle((entries) => {
|
|
45929
|
+
if (this._trackResize && !this._removed) {
|
|
45930
|
+
this.resize(entries)._update();
|
|
45931
|
+
}
|
|
45932
|
+
}, 50);
|
|
45558
45933
|
this._resizeObserver = new ResizeObserver((entries) => {
|
|
45559
45934
|
if (!initialResizeEventCaptured) {
|
|
45560
45935
|
initialResizeEventCaptured = true;
|
|
45561
45936
|
return;
|
|
45562
45937
|
}
|
|
45563
|
-
|
|
45564
|
-
this.resize(entries)._update();
|
|
45565
|
-
}
|
|
45938
|
+
throttledResizeCallback(entries);
|
|
45566
45939
|
});
|
|
45567
45940
|
this._resizeObserver.observe(this._container);
|
|
45568
45941
|
}
|
|
@@ -45764,7 +46137,6 @@ uniform ${precision} ${type} u_${name};
|
|
|
45764
46137
|
* @internal
|
|
45765
46138
|
* Return the map's pixel ratio eventually scaled down to respect maxCanvasSize.
|
|
45766
46139
|
* Internally you should use this and not getPixelRatio().
|
|
45767
|
-
* @hidden
|
|
45768
46140
|
*/
|
|
45769
46141
|
_getClampedPixelRatio(width, height) {
|
|
45770
46142
|
const { 0: maxCanvasWidth, 1: maxCanvasHeight } = this._maxCanvasSize;
|
|
@@ -46655,7 +47027,8 @@ uniform ${precision} ${type} u_${name};
|
|
|
46655
47027
|
* ```
|
|
46656
47028
|
*/
|
|
46657
47029
|
getTerrain() {
|
|
46658
|
-
|
|
47030
|
+
var _a, _b;
|
|
47031
|
+
return (_b = (_a = this.terrain) === null || _a === void 0 ? void 0 : _a.options) !== null && _b !== void 0 ? _b : null;
|
|
46659
47032
|
}
|
|
46660
47033
|
/**
|
|
46661
47034
|
* Returns a Boolean indicating whether all tiles in the viewport from all sources on
|
|
@@ -46945,7 +47318,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
46945
47318
|
*
|
|
46946
47319
|
* @param layer - The layer to add,
|
|
46947
47320
|
* conforming to either the MapLibre Style Specification's [layer definition](https://maplibre.org/maplibre-style-spec/layers) or,
|
|
46948
|
-
* less commonly, the {@link CustomLayerInterface} specification.
|
|
47321
|
+
* less commonly, the {@link CustomLayerInterface} specification. Can also be a layer definition with an embedded source definition.
|
|
46949
47322
|
* The MapLibre Style Specification's layer definition is appropriate for most layers.
|
|
46950
47323
|
*
|
|
46951
47324
|
* @param beforeId - The ID of an existing layer to insert the new layer before,
|
|
@@ -47074,6 +47447,19 @@ uniform ${precision} ${type} u_${name};
|
|
|
47074
47447
|
getLayer(id) {
|
|
47075
47448
|
return this.style.getLayer(id);
|
|
47076
47449
|
}
|
|
47450
|
+
/**
|
|
47451
|
+
* Return the ids of all layers currently in the style, including custom layers, in order.
|
|
47452
|
+
*
|
|
47453
|
+
* @returns ids of layers, in order
|
|
47454
|
+
*
|
|
47455
|
+
* @example
|
|
47456
|
+
* ```ts
|
|
47457
|
+
* const orderedLayerIds = map.getLayersOrder();
|
|
47458
|
+
* ```
|
|
47459
|
+
*/
|
|
47460
|
+
getLayersOrder() {
|
|
47461
|
+
return this.style.getLayersOrder();
|
|
47462
|
+
}
|
|
47077
47463
|
/**
|
|
47078
47464
|
* Sets the zoom extent for the specified style layer. The zoom extent includes the
|
|
47079
47465
|
* [minimum zoom level](https://maplibre.org/maplibre-style-spec/layers/#minzoom)
|
|
@@ -47153,6 +47539,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
47153
47539
|
* @param name - The name of the paint property to set.
|
|
47154
47540
|
* @param value - The value of the paint property to set.
|
|
47155
47541
|
* Must be of a type appropriate for the property, as defined in the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/).
|
|
47542
|
+
* Pass `null` to unset the existing value.
|
|
47156
47543
|
* @param options - Options object.
|
|
47157
47544
|
* @returns `this`
|
|
47158
47545
|
* @example
|
|
@@ -47949,7 +48336,6 @@ uniform ${precision} ${type} u_${name};
|
|
|
47949
48336
|
* map.addControl(nav, 'top-left');
|
|
47950
48337
|
* ```
|
|
47951
48338
|
* @see [Display map navigation controls](https://maplibre.org/maplibre-gl-js/docs/examples/navigation/)
|
|
47952
|
-
* @see [Add a third party vector tile source](https://maplibre.org/maplibre-gl-js/docs/examples/third-party/)
|
|
47953
48339
|
*/
|
|
47954
48340
|
class NavigationControl {
|
|
47955
48341
|
/**
|
|
@@ -48311,6 +48697,10 @@ uniform ${precision} ${type} u_${name};
|
|
|
48311
48697
|
this._update = (e) => {
|
|
48312
48698
|
if (!this._map)
|
|
48313
48699
|
return;
|
|
48700
|
+
const isFullyLoaded = this._map.loaded() && !this._map.isMoving();
|
|
48701
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'terrain' || ((e === null || e === void 0 ? void 0 : e.type) === 'render' && !isFullyLoaded)) {
|
|
48702
|
+
this._map.once('render', this._update);
|
|
48703
|
+
}
|
|
48314
48704
|
if (this._map.transform.renderWorldCopies) {
|
|
48315
48705
|
this._lngLat = smartWrap(this._lngLat, this._pos, this._map.transform);
|
|
48316
48706
|
}
|
|
@@ -48534,6 +48924,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
48534
48924
|
map.getCanvasContainer().appendChild(this._element);
|
|
48535
48925
|
map.on('move', this._update);
|
|
48536
48926
|
map.on('moveend', this._update);
|
|
48927
|
+
map.on('terrain', this._update);
|
|
48537
48928
|
this.setDraggable(this._draggable);
|
|
48538
48929
|
this._update();
|
|
48539
48930
|
// If we attached the `click` listener to the marker element, the popup
|
|
@@ -48649,7 +49040,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
48649
49040
|
if (!('offset' in popup.options)) {
|
|
48650
49041
|
const markerHeight = 41 - (5.8 / 2);
|
|
48651
49042
|
const markerRadius = 13.5;
|
|
48652
|
-
const linearOffset = Math.
|
|
49043
|
+
const linearOffset = Math.abs(markerRadius) / Math.SQRT2;
|
|
48653
49044
|
popup.options.offset = this._defaultMarker ? {
|
|
48654
49045
|
'top': [0, 0],
|
|
48655
49046
|
'top-left': [0, 0],
|
|
@@ -50222,7 +50613,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
50222
50613
|
}
|
|
50223
50614
|
else if (typeof offset === 'number') {
|
|
50224
50615
|
// input specifies a radius from which to calculate offsets at all positions
|
|
50225
|
-
const cornerOffset = Math.round(Math.
|
|
50616
|
+
const cornerOffset = Math.round(Math.abs(offset) / Math.SQRT2);
|
|
50226
50617
|
return {
|
|
50227
50618
|
'center': new performance.Point(0, 0),
|
|
50228
50619
|
'top': new performance.Point(0, offset),
|
|
@@ -50531,7 +50922,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
50531
50922
|
sessionIdHeaderName: "Session-Id"
|
|
50532
50923
|
};
|
|
50533
50924
|
|
|
50534
|
-
var __values$
|
|
50925
|
+
var __values$k = (window && window.__values) || function(o) {
|
|
50535
50926
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
50536
50927
|
if (m) return m.call(o);
|
|
50537
50928
|
if (o && typeof o.length === "number") return {
|
|
@@ -50559,7 +50950,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
50559
50950
|
}
|
|
50560
50951
|
var defaults;
|
|
50561
50952
|
try {
|
|
50562
|
-
for (var valuesList_1 = __values$
|
|
50953
|
+
for (var valuesList_1 = __values$k(valuesList), valuesList_1_1 = valuesList_1.next(); !valuesList_1_1.done; valuesList_1_1 = valuesList_1.next()) {
|
|
50563
50954
|
var values = valuesList_1_1.value;
|
|
50564
50955
|
if (!values) {
|
|
50565
50956
|
continue;
|
|
@@ -50599,7 +50990,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
50599
50990
|
return Options;
|
|
50600
50991
|
}());
|
|
50601
50992
|
|
|
50602
|
-
var __extends$
|
|
50993
|
+
var __extends$1j = (window && window.__extends) || (function () {
|
|
50603
50994
|
var extendStatics = function (d, b) {
|
|
50604
50995
|
extendStatics = Object.setPrototypeOf ||
|
|
50605
50996
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -50614,7 +51005,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
50614
51005
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
50615
51006
|
};
|
|
50616
51007
|
})();
|
|
50617
|
-
var __read$
|
|
51008
|
+
var __read$h = (window && window.__read) || function (o, n) {
|
|
50618
51009
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
50619
51010
|
if (!m) return o;
|
|
50620
51011
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -50634,7 +51025,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
50634
51025
|
* @private
|
|
50635
51026
|
*/
|
|
50636
51027
|
var UrlOptions = /** @class */ (function (_super) {
|
|
50637
|
-
__extends$
|
|
51028
|
+
__extends$1j(UrlOptions, _super);
|
|
50638
51029
|
function UrlOptions() {
|
|
50639
51030
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
50640
51031
|
_this.domain = undefined;
|
|
@@ -50674,7 +51065,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
50674
51065
|
var self = this;
|
|
50675
51066
|
var queryParamsString = Object.entries(self.options.queryParams)
|
|
50676
51067
|
.map(function (_a) {
|
|
50677
|
-
var _b = __read$
|
|
51068
|
+
var _b = __read$h(_a, 2), key = _b[0], value = _b[1];
|
|
50678
51069
|
return "".concat(key, "=").concat(value);
|
|
50679
51070
|
})
|
|
50680
51071
|
.join("&");
|
|
@@ -50705,7 +51096,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
50705
51096
|
return Url;
|
|
50706
51097
|
}());
|
|
50707
51098
|
|
|
50708
|
-
var version$2 = "3.0
|
|
51099
|
+
var version$2 = "3.1.0";
|
|
50709
51100
|
|
|
50710
51101
|
/**
|
|
50711
51102
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -50815,7 +51206,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
50815
51206
|
eventTarget.addEventListener("keydown", dismissTooltip);
|
|
50816
51207
|
};
|
|
50817
51208
|
|
|
50818
|
-
var __extends$
|
|
51209
|
+
var __extends$1i = (window && window.__extends) || (function () {
|
|
50819
51210
|
var extendStatics = function (d, b) {
|
|
50820
51211
|
extendStatics = Object.setPrototypeOf ||
|
|
50821
51212
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -50865,7 +51256,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
50865
51256
|
* The options for adding a control to the map.
|
|
50866
51257
|
*/
|
|
50867
51258
|
var ControlOptions = /** @class */ (function (_super) {
|
|
50868
|
-
__extends$
|
|
51259
|
+
__extends$1i(ControlOptions, _super);
|
|
50869
51260
|
function ControlOptions() {
|
|
50870
51261
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
50871
51262
|
/**
|
|
@@ -51009,7 +51400,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
51009
51400
|
EventEmitter: EventEmitter
|
|
51010
51401
|
});
|
|
51011
51402
|
|
|
51012
|
-
var __extends$
|
|
51403
|
+
var __extends$1h = (window && window.__extends) || (function () {
|
|
51013
51404
|
var extendStatics = function (d, b) {
|
|
51014
51405
|
extendStatics = Object.setPrototypeOf ||
|
|
51015
51406
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -51029,7 +51420,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
51029
51420
|
* Implements control interface and provides support for automatic styling based on the map style.
|
|
51030
51421
|
*/
|
|
51031
51422
|
var ControlBase = /** @class */ (function (_super) {
|
|
51032
|
-
__extends$
|
|
51423
|
+
__extends$1h(ControlBase, _super);
|
|
51033
51424
|
function ControlBase() {
|
|
51034
51425
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
51035
51426
|
/**
|
|
@@ -51131,7 +51522,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
51131
51522
|
return ControlBase;
|
|
51132
51523
|
}(EventEmitter));
|
|
51133
51524
|
|
|
51134
|
-
var __extends$
|
|
51525
|
+
var __extends$1g = (window && window.__extends) || (function () {
|
|
51135
51526
|
var extendStatics = function (d, b) {
|
|
51136
51527
|
extendStatics = Object.setPrototypeOf ||
|
|
51137
51528
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -51150,7 +51541,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
51150
51541
|
* The options for a CompassControl object.
|
|
51151
51542
|
*/
|
|
51152
51543
|
var CompassControlOptions = /** @class */ (function (_super) {
|
|
51153
|
-
__extends$
|
|
51544
|
+
__extends$1g(CompassControlOptions, _super);
|
|
51154
51545
|
function CompassControlOptions() {
|
|
51155
51546
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
51156
51547
|
/**
|
|
@@ -51175,7 +51566,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
51175
51566
|
return CompassControlOptions;
|
|
51176
51567
|
}(Options));
|
|
51177
51568
|
|
|
51178
|
-
var __extends$
|
|
51569
|
+
var __extends$1f = (window && window.__extends) || (function () {
|
|
51179
51570
|
var extendStatics = function (d, b) {
|
|
51180
51571
|
extendStatics = Object.setPrototypeOf ||
|
|
51181
51572
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -51194,7 +51585,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
51194
51585
|
* A control for changing the rotation of the map.
|
|
51195
51586
|
*/
|
|
51196
51587
|
var CompassControl = /** @class */ (function (_super) {
|
|
51197
|
-
__extends$
|
|
51588
|
+
__extends$1f(CompassControl, _super);
|
|
51198
51589
|
/**
|
|
51199
51590
|
* Constructs a CompassControl.
|
|
51200
51591
|
* @param options The options for the control.
|
|
@@ -51257,6 +51648,16 @@ uniform ${precision} ${type} u_${name};
|
|
|
51257
51648
|
grid.classList.add("hidden-accessible-element");
|
|
51258
51649
|
}
|
|
51259
51650
|
});
|
|
51651
|
+
// Dismiss the grid when esc key is pressed on the reset button and the tooltip is not visible
|
|
51652
|
+
rotationButton.addEventListener("keydown", function (event) {
|
|
51653
|
+
if ((event.key === "Escape" || event.key === "Esc") &&
|
|
51654
|
+
(container === null || container === void 0 ? void 0 : container.classList.contains("in-use")) &&
|
|
51655
|
+
(tooltip === null || tooltip === void 0 ? void 0 : tooltip.style.display) === "none") {
|
|
51656
|
+
event.stopPropagation();
|
|
51657
|
+
container.classList.remove("in-use");
|
|
51658
|
+
grid.classList.add("hidden-accessible-element");
|
|
51659
|
+
}
|
|
51660
|
+
});
|
|
51260
51661
|
// If the control's position will require inverting the element order
|
|
51261
51662
|
// add them in the opposite order to preserve tabindex.
|
|
51262
51663
|
if (options && CompassControl.InvertOrderPositions.includes(options.position)) {
|
|
@@ -51362,7 +51763,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
51362
51763
|
return CompassControl;
|
|
51363
51764
|
}(ControlBase));
|
|
51364
51765
|
|
|
51365
|
-
var __extends$
|
|
51766
|
+
var __extends$1e = (window && window.__extends) || (function () {
|
|
51366
51767
|
var extendStatics = function (d, b) {
|
|
51367
51768
|
extendStatics = Object.setPrototypeOf ||
|
|
51368
51769
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -51381,7 +51782,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
51381
51782
|
* The options for a PitchControl object.
|
|
51382
51783
|
*/
|
|
51383
51784
|
var PitchControlOptions = /** @class */ (function (_super) {
|
|
51384
|
-
__extends$
|
|
51785
|
+
__extends$1e(PitchControlOptions, _super);
|
|
51385
51786
|
function PitchControlOptions() {
|
|
51386
51787
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
51387
51788
|
/**
|
|
@@ -51406,7 +51807,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
51406
51807
|
return PitchControlOptions;
|
|
51407
51808
|
}(Options));
|
|
51408
51809
|
|
|
51409
|
-
var __extends$
|
|
51810
|
+
var __extends$1d = (window && window.__extends) || (function () {
|
|
51410
51811
|
var extendStatics = function (d, b) {
|
|
51411
51812
|
extendStatics = Object.setPrototypeOf ||
|
|
51412
51813
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -51425,7 +51826,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
51425
51826
|
* A control for changing the pitch of the map.
|
|
51426
51827
|
*/
|
|
51427
51828
|
var PitchControl = /** @class */ (function (_super) {
|
|
51428
|
-
__extends$
|
|
51829
|
+
__extends$1d(PitchControl, _super);
|
|
51429
51830
|
/**
|
|
51430
51831
|
* Constructs a PitchControl.
|
|
51431
51832
|
* @param options The options for the control.
|
|
@@ -51518,6 +51919,16 @@ uniform ${precision} ${type} u_${name};
|
|
|
51518
51919
|
grid.classList.add("hidden-accessible-element");
|
|
51519
51920
|
}
|
|
51520
51921
|
});
|
|
51922
|
+
// Dismiss the grid when esc key is pressed on the reset button and the tooltip is not visible
|
|
51923
|
+
pitchButton.addEventListener("keydown", function (event) {
|
|
51924
|
+
if ((event.key === "Escape" || event.key === "Esc") &&
|
|
51925
|
+
(container === null || container === void 0 ? void 0 : container.classList.contains("in-use")) &&
|
|
51926
|
+
(tooltip === null || tooltip === void 0 ? void 0 : tooltip.style.display) === "none") {
|
|
51927
|
+
event.stopPropagation();
|
|
51928
|
+
container.classList.remove("in-use");
|
|
51929
|
+
grid.classList.add("hidden-accessible-element");
|
|
51930
|
+
}
|
|
51931
|
+
});
|
|
51521
51932
|
// If the control's position will require inverting the element order
|
|
51522
51933
|
// add them in the opposite order to preserve tabindex.
|
|
51523
51934
|
if (options && PitchControl.INVERT_ORDER_POSITIONS.includes(options.position)) {
|
|
@@ -51636,6 +52047,74 @@ uniform ${precision} ${type} u_${name};
|
|
|
51636
52047
|
return PitchControl;
|
|
51637
52048
|
}(ControlBase));
|
|
51638
52049
|
|
|
52050
|
+
var __extends$1c = (window && window.__extends) || (function () {
|
|
52051
|
+
var extendStatics = function (d, b) {
|
|
52052
|
+
extendStatics = Object.setPrototypeOf ||
|
|
52053
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
52054
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
52055
|
+
return extendStatics(d, b);
|
|
52056
|
+
};
|
|
52057
|
+
return function (d, b) {
|
|
52058
|
+
if (typeof b !== "function" && b !== null)
|
|
52059
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
52060
|
+
extendStatics(d, b);
|
|
52061
|
+
function __() { this.constructor = d; }
|
|
52062
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
52063
|
+
};
|
|
52064
|
+
})();
|
|
52065
|
+
/**
|
|
52066
|
+
* A control to display a scale bar on the map.
|
|
52067
|
+
*/
|
|
52068
|
+
var ScaleControl = /** @class */ (function (_super) {
|
|
52069
|
+
__extends$1c(ScaleControl, _super);
|
|
52070
|
+
/**
|
|
52071
|
+
* A control to displays a scale bar relative to the pixel resolution at the center of the map.
|
|
52072
|
+
* @param options Options for defining how the control is rendered and functions.
|
|
52073
|
+
*/
|
|
52074
|
+
function ScaleControl(options) {
|
|
52075
|
+
var _this = _super.call(this) || this;
|
|
52076
|
+
_this.map = null;
|
|
52077
|
+
_this.control = new maplibregl.ScaleControl({
|
|
52078
|
+
maxWidth: options === null || options === void 0 ? void 0 : options.maxWidth,
|
|
52079
|
+
unit: options === null || options === void 0 ? void 0 : options.unit
|
|
52080
|
+
});
|
|
52081
|
+
return _this;
|
|
52082
|
+
}
|
|
52083
|
+
/**
|
|
52084
|
+
* Initialization method for the control which is called when added to the map.
|
|
52085
|
+
* @param map The map that the control will be added to.
|
|
52086
|
+
* @param options The ControlOptions for this control.
|
|
52087
|
+
* @return An HTMLElement to be placed on the map for the control.
|
|
52088
|
+
*/
|
|
52089
|
+
ScaleControl.prototype.onAdd = function (map, options) {
|
|
52090
|
+
var _a, _b, _c;
|
|
52091
|
+
this.map = map;
|
|
52092
|
+
(_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a._getMap()) === null || _b === void 0 ? void 0 : _b.addControl(this.control);
|
|
52093
|
+
var container = this.buildContainer(map, exports.ControlStyle.auto, "Scale Bar");
|
|
52094
|
+
container.appendChild((_c = this.control) === null || _c === void 0 ? void 0 : _c._container);
|
|
52095
|
+
return container;
|
|
52096
|
+
};
|
|
52097
|
+
/**
|
|
52098
|
+
* Method that is called when the control is removed from the map. Should perform any necessary cleanup for the
|
|
52099
|
+
* control.
|
|
52100
|
+
*/
|
|
52101
|
+
ScaleControl.prototype.onRemove = function () {
|
|
52102
|
+
var _a, _b;
|
|
52103
|
+
_super.prototype.onRemove.call(this);
|
|
52104
|
+
(_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a._getMap()) === null || _b === void 0 ? void 0 : _b.removeControl(this.control);
|
|
52105
|
+
this.map = null;
|
|
52106
|
+
};
|
|
52107
|
+
/**
|
|
52108
|
+
* Set the scale's unit of the distance
|
|
52109
|
+
* @param unit - Unit of the distance (`"imperial"`, `"metric"` or `"nautical"`).
|
|
52110
|
+
*/
|
|
52111
|
+
ScaleControl.prototype.setUnit = function (unit) {
|
|
52112
|
+
var _a;
|
|
52113
|
+
(_a = this.control) === null || _a === void 0 ? void 0 : _a.setUnit(unit);
|
|
52114
|
+
};
|
|
52115
|
+
return ScaleControl;
|
|
52116
|
+
}(ControlBase));
|
|
52117
|
+
|
|
51639
52118
|
/**
|
|
51640
52119
|
* Removes all key-value entries from the list cache.
|
|
51641
52120
|
*
|
|
@@ -55220,7 +55699,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
55220
55699
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
55221
55700
|
}
|
|
55222
55701
|
};
|
|
55223
|
-
var __read$
|
|
55702
|
+
var __read$g = (window && window.__read) || function (o, n) {
|
|
55224
55703
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
55225
55704
|
if (!m) return o;
|
|
55226
55705
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -55401,7 +55880,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
55401
55880
|
image_1.src = newSrc;
|
|
55402
55881
|
}
|
|
55403
55882
|
Object.entries(this.styleButtons).forEach(function (_a) {
|
|
55404
|
-
var _b = __read$
|
|
55883
|
+
var _b = __read$g(_a, 2), buttonStyleName = _b[0], button = _b[1];
|
|
55405
55884
|
return button.setAttribute('aria-current', buttonStyleName === styleName ? 'true' : 'false');
|
|
55406
55885
|
});
|
|
55407
55886
|
this.map.styles.definitions().then(function (mapConfiguration) {
|
|
@@ -55490,7 +55969,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
55490
55969
|
_this.map.setStyle({ style: name });
|
|
55491
55970
|
}
|
|
55492
55971
|
Object.entries(_this.styleButtons).forEach(function (_a) {
|
|
55493
|
-
var _b = __read$
|
|
55972
|
+
var _b = __read$g(_a, 2), styleName = _b[0], button = _b[1];
|
|
55494
55973
|
return button.setAttribute('aria-current', styleName === name ? 'true' : 'false');
|
|
55495
55974
|
});
|
|
55496
55975
|
}
|
|
@@ -55582,7 +56061,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
55582
56061
|
});
|
|
55583
56062
|
var targetStyleName = this.map.getStyle().style;
|
|
55584
56063
|
Object.entries(this.styleButtons).forEach(function (_a) {
|
|
55585
|
-
var _b = __read$
|
|
56064
|
+
var _b = __read$g(_a, 2), styleName = _b[0], button = _b[1];
|
|
55586
56065
|
return button.setAttribute('aria-current', styleName === targetStyleName ? 'true' : 'false');
|
|
55587
56066
|
});
|
|
55588
56067
|
};
|
|
@@ -55843,7 +56322,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
55843
56322
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
55844
56323
|
};
|
|
55845
56324
|
})();
|
|
55846
|
-
var __values$
|
|
56325
|
+
var __values$j = (window && window.__values) || function(o) {
|
|
55847
56326
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
55848
56327
|
if (m) return m.call(o);
|
|
55849
56328
|
if (o && typeof o.length === "number") return {
|
|
@@ -55914,7 +56393,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
55914
56393
|
// legend table contents
|
|
55915
56394
|
var tr2 = document.createElement("tr");
|
|
55916
56395
|
try {
|
|
55917
|
-
for (var _c = __values$
|
|
56396
|
+
for (var _c = __values$j(this.table), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
55918
56397
|
var col = _d.value;
|
|
55919
56398
|
var data = document.createElement("td");
|
|
55920
56399
|
if (col === "Fast" || col === "Slow") {
|
|
@@ -55927,7 +56406,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
55927
56406
|
data.setAttribute("aria-label", "Traffic Legend");
|
|
55928
56407
|
data.setAttribute("role", "img");
|
|
55929
56408
|
try {
|
|
55930
|
-
for (var col_1 = (e_2 = void 0, __values$
|
|
56409
|
+
for (var col_1 = (e_2 = void 0, __values$j(col)), col_1_1 = col_1.next(); !col_1_1.done; col_1_1 = col_1.next()) {
|
|
55931
56410
|
var color = col_1_1.value;
|
|
55932
56411
|
var div = document.createElement("div");
|
|
55933
56412
|
div.classList.add(color);
|
|
@@ -56863,7 +57342,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
56863
57342
|
return Point;
|
|
56864
57343
|
}());
|
|
56865
57344
|
|
|
56866
|
-
var __read$
|
|
57345
|
+
var __read$f = (window && window.__read) || function (o, n) {
|
|
56867
57346
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
56868
57347
|
if (!m) return o;
|
|
56869
57348
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -56879,7 +57358,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
56879
57358
|
}
|
|
56880
57359
|
return ar;
|
|
56881
57360
|
};
|
|
56882
|
-
var __values$
|
|
57361
|
+
var __values$i = (window && window.__values) || function(o) {
|
|
56883
57362
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
56884
57363
|
if (m) return m.call(o);
|
|
56885
57364
|
if (o && typeof o.length === "number") return {
|
|
@@ -57854,8 +58333,8 @@ uniform ${precision} ${type} u_${name};
|
|
|
57854
58333
|
if (k + 1 >= coords.length) {
|
|
57855
58334
|
continue;
|
|
57856
58335
|
}
|
|
57857
|
-
var _a = __read$
|
|
57858
|
-
var _b = __read$
|
|
58336
|
+
var _a = __read$f(coords[k], 2), lon1 = _a[0], lat1 = _a[1];
|
|
58337
|
+
var _b = __read$f(coords[k + 1], 2), lon2 = _b[0], lat2 = _b[1];
|
|
57859
58338
|
// split the line by antimeridian
|
|
57860
58339
|
// and break geodesic into two line segments
|
|
57861
58340
|
if (Math.abs(lon2 - lon1) > 180.0) {
|
|
@@ -57926,8 +58405,8 @@ uniform ${precision} ${type} u_${name};
|
|
|
57926
58405
|
if (k + 1 >= geodesic.length) {
|
|
57927
58406
|
continue;
|
|
57928
58407
|
}
|
|
57929
|
-
var _a = __read$
|
|
57930
|
-
var _b = __read$
|
|
58408
|
+
var _a = __read$f(geodesic[k], 2), lon1 = _a[0], lat1 = _a[1];
|
|
58409
|
+
var _b = __read$f(geodesic[k + 1], 2), lon2 = _b[0], lat2 = _b[1];
|
|
57931
58410
|
// split the line by antimeridian
|
|
57932
58411
|
// and break geodesic into two line segments
|
|
57933
58412
|
if (Math.abs(lon2 - lon1) > 180.0) {
|
|
@@ -58138,7 +58617,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
58138
58617
|
function getPixelHeading(origin, destination) {
|
|
58139
58618
|
origin = getPosition(origin);
|
|
58140
58619
|
destination = getPosition(destination);
|
|
58141
|
-
var _a = __read$
|
|
58620
|
+
var _a = __read$f(mercatorPositionsToPixels([origin, destination], 21), 2), p1 = _a[0], p2 = _a[1];
|
|
58142
58621
|
var dx = (p2[0] - p1[0]);
|
|
58143
58622
|
var dy = (p1[1] - p2[1]);
|
|
58144
58623
|
var alpha = ((5 / 2 * Math.PI) - Math.atan2(dy, dx)) * INV_PI_BY_180 % 360;
|
|
@@ -58685,7 +59164,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
58685
59164
|
});
|
|
58686
59165
|
var lower = [];
|
|
58687
59166
|
try {
|
|
58688
|
-
for (var positions_1 = __values$
|
|
59167
|
+
for (var positions_1 = __values$i(positions), positions_1_1 = positions_1.next(); !positions_1_1.done; positions_1_1 = positions_1.next()) {
|
|
58689
59168
|
var position = positions_1_1.value;
|
|
58690
59169
|
while (lower.length >= 2 && _cross(lower[lower.length - 2], lower[lower.length - 1], position) <= 0) {
|
|
58691
59170
|
lower.pop();
|
|
@@ -59194,7 +59673,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
59194
59673
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
59195
59674
|
};
|
|
59196
59675
|
})();
|
|
59197
|
-
var __values$
|
|
59676
|
+
var __values$h = (window && window.__values) || function(o) {
|
|
59198
59677
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
59199
59678
|
if (m) return m.call(o);
|
|
59200
59679
|
if (o && typeof o.length === "number") return {
|
|
@@ -59281,7 +59760,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
59281
59760
|
else if (geoType === "MultiLineString") {
|
|
59282
59761
|
var pos = positions;
|
|
59283
59762
|
try {
|
|
59284
|
-
for (var pos_1 = __values$
|
|
59763
|
+
for (var pos_1 = __values$h(pos), pos_1_1 = pos_1.next(); !pos_1_1.done; pos_1_1 = pos_1.next()) {
|
|
59285
59764
|
var p = pos_1_1.value;
|
|
59286
59765
|
bbox = BoundingBox.merge(bbox, BoundingBox.fromPositions(p));
|
|
59287
59766
|
}
|
|
@@ -59297,7 +59776,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
59297
59776
|
else if (geoType === "MultiPolygon") {
|
|
59298
59777
|
var pos = positions;
|
|
59299
59778
|
try {
|
|
59300
|
-
for (var pos_2 = __values$
|
|
59779
|
+
for (var pos_2 = __values$h(pos), pos_2_1 = pos_2.next(); !pos_2_1.done; pos_2_1 = pos_2.next()) {
|
|
59301
59780
|
var p1 = pos_2_1.value;
|
|
59302
59781
|
// only need to check the exterior ring of Polygon
|
|
59303
59782
|
bbox = BoundingBox.merge(bbox, BoundingBox.fromPositions(p1[0]));
|
|
@@ -59520,7 +59999,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
59520
59999
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
59521
60000
|
};
|
|
59522
60001
|
})();
|
|
59523
|
-
var __values$
|
|
60002
|
+
var __values$g = (window && window.__values) || function(o) {
|
|
59524
60003
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
59525
60004
|
if (m) return m.call(o);
|
|
59526
60005
|
if (o && typeof o.length === "number") return {
|
|
@@ -59944,7 +60423,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
59944
60423
|
var bounds = null;
|
|
59945
60424
|
if (Array.isArray(data) && data.length > 0) {
|
|
59946
60425
|
try {
|
|
59947
|
-
for (var data_1 = __values$
|
|
60426
|
+
for (var data_1 = __values$g(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) {
|
|
59948
60427
|
var datum = data_1_1.value;
|
|
59949
60428
|
tempBounds = BoundingBox.fromData(datum);
|
|
59950
60429
|
if (tempBounds != null) {
|
|
@@ -60517,7 +60996,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
60517
60996
|
return SimplifyAP_1(points, tolerance, true);
|
|
60518
60997
|
}
|
|
60519
60998
|
|
|
60520
|
-
var __values$
|
|
60999
|
+
var __values$f = (window && window.__values) || function(o) {
|
|
60521
61000
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
60522
61001
|
if (m) return m.call(o);
|
|
60523
61002
|
if (o && typeof o.length === "number") return {
|
|
@@ -60577,7 +61056,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
60577
61056
|
if (points && Array.isArray(points) && Array.isArray(points[0])) {
|
|
60578
61057
|
var pos = [];
|
|
60579
61058
|
try {
|
|
60580
|
-
for (var points_1 = __values$
|
|
61059
|
+
for (var points_1 = __values$f(points), points_1_1 = points_1.next(); !points_1_1.done; points_1_1 = points_1.next()) {
|
|
60581
61060
|
var subPoints = points_1_1.value;
|
|
60582
61061
|
pos.push(this.transform(subPoints, transformMatrix, decimals));
|
|
60583
61062
|
}
|
|
@@ -60952,6 +61431,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
60952
61431
|
CompassControl: CompassControl,
|
|
60953
61432
|
ControlBase: ControlBase,
|
|
60954
61433
|
PitchControl: PitchControl,
|
|
61434
|
+
ScaleControl: ScaleControl,
|
|
60955
61435
|
StyleControl: StyleControl,
|
|
60956
61436
|
TrafficControl: TrafficControl,
|
|
60957
61437
|
TrafficLegendControl: TrafficLegendControl,
|
|
@@ -61235,7 +61715,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
61235
61715
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
61236
61716
|
};
|
|
61237
61717
|
})();
|
|
61238
|
-
var __values$
|
|
61718
|
+
var __values$e = (window && window.__values) || function(o) {
|
|
61239
61719
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
61240
61720
|
if (m) return m.call(o);
|
|
61241
61721
|
if (o && typeof o.length === "number") return {
|
|
@@ -61434,7 +61914,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
61434
61914
|
var e_1, _a;
|
|
61435
61915
|
var shapes = Array.isArray(shape) ? shape : [shape];
|
|
61436
61916
|
try {
|
|
61437
|
-
for (var shapes_1 = __values$
|
|
61917
|
+
for (var shapes_1 = __values$e(shapes), shapes_1_1 = shapes_1.next(); !shapes_1_1.done; shapes_1_1 = shapes_1.next()) {
|
|
61438
61918
|
var s = shapes_1_1.value;
|
|
61439
61919
|
if (typeof s === "number") {
|
|
61440
61920
|
this._removeByIndex(s);
|
|
@@ -61461,7 +61941,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
61461
61941
|
var e_2, _a;
|
|
61462
61942
|
var ids = Array.isArray(id) ? id : [id];
|
|
61463
61943
|
try {
|
|
61464
|
-
for (var ids_1 = __values$
|
|
61944
|
+
for (var ids_1 = __values$e(ids), ids_1_1 = ids_1.next(); !ids_1_1.done; ids_1_1 = ids_1.next()) {
|
|
61465
61945
|
var i = ids_1_1.value;
|
|
61466
61946
|
this._removeById(i);
|
|
61467
61947
|
}
|
|
@@ -61625,7 +62105,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
61625
62105
|
data = Array.isArray(data) ? data : [data];
|
|
61626
62106
|
if (typeof index !== "number") {
|
|
61627
62107
|
try {
|
|
61628
|
-
for (var data_1 = __values$
|
|
62108
|
+
for (var data_1 = __values$e(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) {
|
|
61629
62109
|
var d = data_1_1.value;
|
|
61630
62110
|
this.shapes.push(d);
|
|
61631
62111
|
this.shapesMap.set(d.getId(), this.shapes.length - 1);
|
|
@@ -61646,7 +62126,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
61646
62126
|
}
|
|
61647
62127
|
}
|
|
61648
62128
|
try {
|
|
61649
|
-
for (var data_2 = __values$
|
|
62129
|
+
for (var data_2 = __values$e(data), data_2_1 = data_2.next(); !data_2_1.done; data_2_1 = data_2.next()) {
|
|
61650
62130
|
var d = data_2_1.value;
|
|
61651
62131
|
d._setDataSource(this);
|
|
61652
62132
|
}
|
|
@@ -62589,7 +63069,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
62589
63069
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
62590
63070
|
}
|
|
62591
63071
|
};
|
|
62592
|
-
var __read$
|
|
63072
|
+
var __read$e = (window && window.__read) || function (o, n) {
|
|
62593
63073
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
62594
63074
|
if (!m) return o;
|
|
62595
63075
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -62605,7 +63085,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
62605
63085
|
}
|
|
62606
63086
|
return ar;
|
|
62607
63087
|
};
|
|
62608
|
-
var __spreadArray$
|
|
63088
|
+
var __spreadArray$b = (window && window.__spreadArray) || function (to, from, pack) {
|
|
62609
63089
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
62610
63090
|
if (ar || !(i in from)) {
|
|
62611
63091
|
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
@@ -62642,7 +63122,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
62642
63122
|
var bubbleFeature = curRenderedShape instanceof Shape ? curRenderedShape.toJson() : curRenderedShape;
|
|
62643
63123
|
var indicator = new AccessibleIndicator({ positionInSet: idx + 1, setSize: renderedShapes.length });
|
|
62644
63124
|
var element = indicator.getElement();
|
|
62645
|
-
var _a = __read$
|
|
63125
|
+
var _a = __read$e(_this.map.positionsToPixels([_this.getFirstCoordinate(bubbleFeature.geometry.coordinates)]), 1), pixel = _a[0];
|
|
62646
63126
|
element.addEventListener('focusin', function (event) {
|
|
62647
63127
|
_this.accessibleIndicator.filter(function (i) { return i !== indicator; }).forEach(function (indicator) { return indicator.remove(); });
|
|
62648
63128
|
// insert previous and next popups
|
|
@@ -62814,7 +63294,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
62814
63294
|
return undefined;
|
|
62815
63295
|
}
|
|
62816
63296
|
var mapConfiguration = this.map.getServiceOptions().mapConfiguration;
|
|
62817
|
-
return __spreadArray$
|
|
63297
|
+
return __spreadArray$b(__spreadArray$b([], __read$e(this.map.getCamera().bounds), false), [
|
|
62818
63298
|
this.map.getCamera().zoom,
|
|
62819
63299
|
this.map.getCamera().pitch,
|
|
62820
63300
|
this.map.getStyle().style,
|
|
@@ -63954,42 +64434,6 @@ uniform ${precision} ${type} u_${name};
|
|
|
63954
64434
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
63955
64435
|
};
|
|
63956
64436
|
})();
|
|
63957
|
-
var __values$e = (window && window.__values) || function(o) {
|
|
63958
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
63959
|
-
if (m) return m.call(o);
|
|
63960
|
-
if (o && typeof o.length === "number") return {
|
|
63961
|
-
next: function () {
|
|
63962
|
-
if (o && i >= o.length) o = void 0;
|
|
63963
|
-
return { value: o && o[i++], done: !o };
|
|
63964
|
-
}
|
|
63965
|
-
};
|
|
63966
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
63967
|
-
};
|
|
63968
|
-
var __read$e = (window && window.__read) || function (o, n) {
|
|
63969
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
63970
|
-
if (!m) return o;
|
|
63971
|
-
var i = m.call(o), r, ar = [], e;
|
|
63972
|
-
try {
|
|
63973
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
63974
|
-
}
|
|
63975
|
-
catch (error) { e = { error: error }; }
|
|
63976
|
-
finally {
|
|
63977
|
-
try {
|
|
63978
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
63979
|
-
}
|
|
63980
|
-
finally { if (e) throw e.error; }
|
|
63981
|
-
}
|
|
63982
|
-
return ar;
|
|
63983
|
-
};
|
|
63984
|
-
var __spreadArray$b = (window && window.__spreadArray) || function (to, from, pack) {
|
|
63985
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
63986
|
-
if (ar || !(i in from)) {
|
|
63987
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
63988
|
-
ar[i] = from[i];
|
|
63989
|
-
}
|
|
63990
|
-
}
|
|
63991
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
63992
|
-
};
|
|
63993
64437
|
/**
|
|
63994
64438
|
* Options used when rendering Polygon and MultiPolygon objects in a PolygonLayer.
|
|
63995
64439
|
*/
|
|
@@ -64025,50 +64469,6 @@ uniform ${precision} ${type} u_${name};
|
|
|
64025
64469
|
_this.fillPattern = undefined;
|
|
64026
64470
|
return _this;
|
|
64027
64471
|
}
|
|
64028
|
-
/**
|
|
64029
|
-
* Override the standard merge behavior to set fillPattern and fillColor to be mutually exclusive
|
|
64030
|
-
* @internal
|
|
64031
|
-
*/
|
|
64032
|
-
PolygonLayerOptions.prototype.merge = function () {
|
|
64033
|
-
var e_1, _a;
|
|
64034
|
-
var valueList = [];
|
|
64035
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
64036
|
-
valueList[_i] = arguments[_i];
|
|
64037
|
-
}
|
|
64038
|
-
var isNewColorSet = false;
|
|
64039
|
-
var isNewPatternSet = false;
|
|
64040
|
-
try {
|
|
64041
|
-
for (var valueList_1 = __values$e(valueList), valueList_1_1 = valueList_1.next(); !valueList_1_1.done; valueList_1_1 = valueList_1.next()) {
|
|
64042
|
-
var value = valueList_1_1.value;
|
|
64043
|
-
if (value) {
|
|
64044
|
-
if (value.hasOwnProperty("fillColor")) {
|
|
64045
|
-
isNewColorSet = true;
|
|
64046
|
-
isNewPatternSet = false;
|
|
64047
|
-
}
|
|
64048
|
-
else if (value.hasOwnProperty("fillPattern")) {
|
|
64049
|
-
isNewPatternSet = true;
|
|
64050
|
-
isNewColorSet = false;
|
|
64051
|
-
}
|
|
64052
|
-
}
|
|
64053
|
-
}
|
|
64054
|
-
}
|
|
64055
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
64056
|
-
finally {
|
|
64057
|
-
try {
|
|
64058
|
-
if (valueList_1_1 && !valueList_1_1.done && (_a = valueList_1.return)) _a.call(valueList_1);
|
|
64059
|
-
}
|
|
64060
|
-
finally { if (e_1) throw e_1.error; }
|
|
64061
|
-
}
|
|
64062
|
-
// Then execute the standard merge behavior.
|
|
64063
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$b([], __read$e(valueList), false));
|
|
64064
|
-
if (isNewColorSet) {
|
|
64065
|
-
merged.fillPattern = undefined;
|
|
64066
|
-
}
|
|
64067
|
-
else if (isNewPatternSet) {
|
|
64068
|
-
merged.fillColor = undefined;
|
|
64069
|
-
}
|
|
64070
|
-
return merged;
|
|
64071
|
-
};
|
|
64072
64472
|
return PolygonLayerOptions;
|
|
64073
64473
|
}(LayerOptions$1));
|
|
64074
64474
|
|
|
@@ -64120,6 +64520,8 @@ uniform ${precision} ${type} u_${name};
|
|
|
64120
64520
|
};
|
|
64121
64521
|
/**
|
|
64122
64522
|
* Sets the options of the polygon layer.
|
|
64523
|
+
* When `fillPattern` is set, `fillColor` will be ignored.
|
|
64524
|
+
* To set `fillColor`, make sure `fillPattern` is set to `undefined`.
|
|
64123
64525
|
* @param newOptions The new options of the polygon layer.
|
|
64124
64526
|
*/
|
|
64125
64527
|
PolygonLayer.prototype.setOptions = function (options) {
|
|
@@ -68020,8 +68422,11 @@ uniform ${precision} ${type} u_${name};
|
|
|
68020
68422
|
var domain = this.map.getServiceOptions().domain;
|
|
68021
68423
|
var urlOptions = {
|
|
68022
68424
|
domain: domain,
|
|
68023
|
-
path: "
|
|
68024
|
-
queryParams: __assign$6({ "api-version": "
|
|
68425
|
+
path: "reverseGeocode",
|
|
68426
|
+
queryParams: __assign$6({ "api-version": "2023-06-01", "coordinates": "".concat(normalizeLongitude(options.position[0]), ",").concat(normalizeLatitude(options.position[1])) }, (options.style.view && { view: options.style.view })),
|
|
68427
|
+
headers: {
|
|
68428
|
+
"Accept-Language": options.style.language
|
|
68429
|
+
}
|
|
68025
68430
|
};
|
|
68026
68431
|
return new Url(((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(urlOptions)) || urlOptions).get();
|
|
68027
68432
|
};
|
|
@@ -69227,12 +69632,13 @@ uniform ${precision} ${type} u_${name};
|
|
|
69227
69632
|
position: cam.center,
|
|
69228
69633
|
style: style
|
|
69229
69634
|
}).then(function (r) {
|
|
69635
|
+
var _a, _b, _c;
|
|
69230
69636
|
var info = {};
|
|
69231
|
-
if (r && r.
|
|
69232
|
-
if (r.
|
|
69233
|
-
var a = r.
|
|
69234
|
-
if (a.
|
|
69235
|
-
info.country = a.
|
|
69637
|
+
if (r && r.features && r.features.length > 0) {
|
|
69638
|
+
if ((_b = (_a = r.features[0]) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.address) {
|
|
69639
|
+
var a = r.features[0].properties.address;
|
|
69640
|
+
if (a.countryRegion) {
|
|
69641
|
+
info.country = a.countryRegion.name;
|
|
69236
69642
|
MapViewDescriptor._labelCache.cache(info.country, {
|
|
69237
69643
|
source: [],
|
|
69238
69644
|
labelType: "country",
|
|
@@ -69240,8 +69646,8 @@ uniform ${precision} ${type} u_${name};
|
|
|
69240
69646
|
minZoom: 0
|
|
69241
69647
|
}, cam.center, style.language);
|
|
69242
69648
|
}
|
|
69243
|
-
if (a.
|
|
69244
|
-
info.state = a.
|
|
69649
|
+
if (a.adminDistricts) {
|
|
69650
|
+
info.state = (_c = a.adminDistricts[0]) === null || _c === void 0 ? void 0 : _c.shortName;
|
|
69245
69651
|
MapViewDescriptor._labelCache.cache(info.state, {
|
|
69246
69652
|
source: [],
|
|
69247
69653
|
labelType: "state",
|
|
@@ -69249,20 +69655,17 @@ uniform ${precision} ${type} u_${name};
|
|
|
69249
69655
|
minZoom: 4
|
|
69250
69656
|
}, cam.center, style.language);
|
|
69251
69657
|
}
|
|
69252
|
-
if (a.
|
|
69253
|
-
info.city = a.
|
|
69254
|
-
MapViewDescriptor._labelCache.cache(info.
|
|
69658
|
+
if (a.locality) {
|
|
69659
|
+
info.city = a.locality;
|
|
69660
|
+
MapViewDescriptor._labelCache.cache(info.city, {
|
|
69255
69661
|
source: [],
|
|
69256
69662
|
labelType: "city",
|
|
69257
69663
|
radius: 1000,
|
|
69258
69664
|
minZoom: 10
|
|
69259
69665
|
}, cam.center, style.language);
|
|
69260
69666
|
}
|
|
69261
|
-
if (a.
|
|
69262
|
-
info.road = a.
|
|
69263
|
-
}
|
|
69264
|
-
else if (a.street) {
|
|
69265
|
-
info.road = a.street;
|
|
69667
|
+
if (a.addressLine) {
|
|
69668
|
+
info.road = a.addressLine;
|
|
69266
69669
|
}
|
|
69267
69670
|
}
|
|
69268
69671
|
}
|
|
@@ -73725,7 +74128,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
73725
74128
|
return CopyrightDelegate;
|
|
73726
74129
|
}());
|
|
73727
74130
|
|
|
73728
|
-
/*! @azure/msal-browser v2.38.
|
|
74131
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
73729
74132
|
/*! *****************************************************************************
|
|
73730
74133
|
Copyright (c) Microsoft Corporation.
|
|
73731
74134
|
|
|
@@ -73839,7 +74242,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
73839
74242
|
return ar;
|
|
73840
74243
|
}
|
|
73841
74244
|
|
|
73842
|
-
/*! @azure/msal-common v13.
|
|
74245
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
73843
74246
|
/*! *****************************************************************************
|
|
73844
74247
|
Copyright (c) Microsoft Corporation.
|
|
73845
74248
|
|
|
@@ -73926,7 +74329,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
73926
74329
|
return r;
|
|
73927
74330
|
}
|
|
73928
74331
|
|
|
73929
|
-
/*! @azure/msal-common v13.
|
|
74332
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
73930
74333
|
|
|
73931
74334
|
/*
|
|
73932
74335
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -74299,7 +74702,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
74299
74702
|
JsonTypes["Pop"] = "pop";
|
|
74300
74703
|
})(JsonTypes || (JsonTypes = {}));
|
|
74301
74704
|
|
|
74302
|
-
/*! @azure/msal-common v13.
|
|
74705
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
74303
74706
|
|
|
74304
74707
|
/*
|
|
74305
74708
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -74355,7 +74758,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
74355
74758
|
return AuthError;
|
|
74356
74759
|
}(Error));
|
|
74357
74760
|
|
|
74358
|
-
/*! @azure/msal-common v13.
|
|
74761
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
74359
74762
|
|
|
74360
74763
|
/*
|
|
74361
74764
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -74430,7 +74833,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
74430
74833
|
}
|
|
74431
74834
|
};
|
|
74432
74835
|
|
|
74433
|
-
/*! @azure/msal-common v13.
|
|
74836
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
74434
74837
|
|
|
74435
74838
|
/*
|
|
74436
74839
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -74945,7 +75348,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
74945
75348
|
return ClientAuthError;
|
|
74946
75349
|
}(AuthError));
|
|
74947
75350
|
|
|
74948
|
-
/*! @azure/msal-common v13.
|
|
75351
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
74949
75352
|
|
|
74950
75353
|
/*
|
|
74951
75354
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -75070,7 +75473,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
75070
75473
|
return StringUtils;
|
|
75071
75474
|
}());
|
|
75072
75475
|
|
|
75073
|
-
/*! @azure/msal-common v13.
|
|
75476
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
75074
75477
|
|
|
75075
75478
|
/*
|
|
75076
75479
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -75260,12 +75663,12 @@ uniform ${precision} ${type} u_${name};
|
|
|
75260
75663
|
return Logger;
|
|
75261
75664
|
}());
|
|
75262
75665
|
|
|
75263
|
-
/*! @azure/msal-common v13.
|
|
75666
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
75264
75667
|
/* eslint-disable header/header */
|
|
75265
75668
|
var name$1 = "@azure/msal-common";
|
|
75266
|
-
var version$1 = "13.
|
|
75669
|
+
var version$1 = "13.3.1";
|
|
75267
75670
|
|
|
75268
|
-
/*! @azure/msal-common v13.
|
|
75671
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
75269
75672
|
/*
|
|
75270
75673
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
75271
75674
|
* Licensed under the MIT License.
|
|
@@ -75286,7 +75689,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
75286
75689
|
AzureCloudInstance["AzureUsGovernment"] = "https://login.microsoftonline.us";
|
|
75287
75690
|
})(AzureCloudInstance || (AzureCloudInstance = {}));
|
|
75288
75691
|
|
|
75289
|
-
/*! @azure/msal-common v13.
|
|
75692
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
75290
75693
|
|
|
75291
75694
|
/*
|
|
75292
75695
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -75551,7 +75954,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
75551
75954
|
return ClientConfigurationError;
|
|
75552
75955
|
}(ClientAuthError));
|
|
75553
75956
|
|
|
75554
|
-
/*! @azure/msal-common v13.
|
|
75957
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
75555
75958
|
|
|
75556
75959
|
/*
|
|
75557
75960
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -75750,7 +76153,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
75750
76153
|
return ScopeSet;
|
|
75751
76154
|
}());
|
|
75752
76155
|
|
|
75753
|
-
/*! @azure/msal-common v13.
|
|
76156
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
75754
76157
|
|
|
75755
76158
|
/*
|
|
75756
76159
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -75788,7 +76191,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
75788
76191
|
};
|
|
75789
76192
|
}
|
|
75790
76193
|
|
|
75791
|
-
/*! @azure/msal-common v13.
|
|
76194
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
75792
76195
|
/*
|
|
75793
76196
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
75794
76197
|
* Licensed under the MIT License.
|
|
@@ -75804,7 +76207,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
75804
76207
|
AuthorityType[AuthorityType["Ciam"] = 3] = "Ciam";
|
|
75805
76208
|
})(AuthorityType || (AuthorityType = {}));
|
|
75806
76209
|
|
|
75807
|
-
/*! @azure/msal-common v13.
|
|
76210
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
75808
76211
|
|
|
75809
76212
|
/*
|
|
75810
76213
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -76043,7 +76446,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
76043
76446
|
return AccountEntity;
|
|
76044
76447
|
}());
|
|
76045
76448
|
|
|
76046
|
-
/*! @azure/msal-common v13.
|
|
76449
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
76047
76450
|
|
|
76048
76451
|
/*
|
|
76049
76452
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -76095,7 +76498,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
76095
76498
|
return AuthToken;
|
|
76096
76499
|
}());
|
|
76097
76500
|
|
|
76098
|
-
/*! @azure/msal-common v13.
|
|
76501
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
76099
76502
|
|
|
76100
76503
|
/*
|
|
76101
76504
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -76623,6 +77026,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
76623
77026
|
* @param inputRealm
|
|
76624
77027
|
*/
|
|
76625
77028
|
CacheManager.prototype.getIdToken = function (account, tokenKeys) {
|
|
77029
|
+
var _this = this;
|
|
76626
77030
|
this.commonLogger.trace("CacheManager - getIdToken called");
|
|
76627
77031
|
var idTokenFilter = {
|
|
76628
77032
|
homeAccountId: account.homeAccountId,
|
|
@@ -76638,7 +77042,11 @@ uniform ${precision} ${type} u_${name};
|
|
|
76638
77042
|
return null;
|
|
76639
77043
|
}
|
|
76640
77044
|
else if (numIdTokens > 1) {
|
|
76641
|
-
|
|
77045
|
+
this.commonLogger.info("CacheManager:getIdToken - Multiple id tokens found, clearing them");
|
|
77046
|
+
idTokens.forEach(function (idToken) {
|
|
77047
|
+
_this.removeIdToken(idToken.generateCredentialKey());
|
|
77048
|
+
});
|
|
77049
|
+
return null;
|
|
76642
77050
|
}
|
|
76643
77051
|
this.commonLogger.info("CacheManager:getIdToken - Returning id token");
|
|
76644
77052
|
return idTokens[0];
|
|
@@ -76739,7 +77147,11 @@ uniform ${precision} ${type} u_${name};
|
|
|
76739
77147
|
return null;
|
|
76740
77148
|
}
|
|
76741
77149
|
else if (numAccessTokens > 1) {
|
|
76742
|
-
|
|
77150
|
+
this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them");
|
|
77151
|
+
accessTokens.forEach(function (accessToken) {
|
|
77152
|
+
_this.removeAccessToken(accessToken.generateCredentialKey());
|
|
77153
|
+
});
|
|
77154
|
+
return null;
|
|
76743
77155
|
}
|
|
76744
77156
|
this.commonLogger.info("CacheManager:getAccessToken - Returning access token");
|
|
76745
77157
|
return accessTokens[0];
|
|
@@ -77143,7 +77555,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
77143
77555
|
return DefaultStorageClass;
|
|
77144
77556
|
}(CacheManager));
|
|
77145
77557
|
|
|
77146
|
-
/*! @azure/msal-common v13.
|
|
77558
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
77147
77559
|
|
|
77148
77560
|
/*
|
|
77149
77561
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -77240,7 +77652,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
77240
77652
|
return __assign$4({ clientCapabilities: [], azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, skipAuthorityMetadataCache: false }, authOptions);
|
|
77241
77653
|
}
|
|
77242
77654
|
|
|
77243
|
-
/*! @azure/msal-common v13.
|
|
77655
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
77244
77656
|
|
|
77245
77657
|
/*
|
|
77246
77658
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -77260,7 +77672,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
77260
77672
|
return ServerError;
|
|
77261
77673
|
}(AuthError));
|
|
77262
77674
|
|
|
77263
|
-
/*! @azure/msal-common v13.
|
|
77675
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
77264
77676
|
|
|
77265
77677
|
/*
|
|
77266
77678
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -77356,7 +77768,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
77356
77768
|
return ThrottlingUtils;
|
|
77357
77769
|
}());
|
|
77358
77770
|
|
|
77359
|
-
/*! @azure/msal-common v13.
|
|
77771
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
77360
77772
|
|
|
77361
77773
|
/*
|
|
77362
77774
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -77405,7 +77817,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
77405
77817
|
return NetworkManager;
|
|
77406
77818
|
}());
|
|
77407
77819
|
|
|
77408
|
-
/*! @azure/msal-common v13.
|
|
77820
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
77409
77821
|
/*
|
|
77410
77822
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
77411
77823
|
* Licensed under the MIT License.
|
|
@@ -77416,7 +77828,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
77416
77828
|
CcsCredentialType["UPN"] = "UPN";
|
|
77417
77829
|
})(CcsCredentialType || (CcsCredentialType = {}));
|
|
77418
77830
|
|
|
77419
|
-
/*! @azure/msal-common v13.
|
|
77831
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
77420
77832
|
|
|
77421
77833
|
/*
|
|
77422
77834
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -77507,7 +77919,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
77507
77919
|
return RequestValidator;
|
|
77508
77920
|
}());
|
|
77509
77921
|
|
|
77510
|
-
/*! @azure/msal-common v13.
|
|
77922
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
77511
77923
|
|
|
77512
77924
|
/*
|
|
77513
77925
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -77885,7 +78297,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
77885
78297
|
return RequestParameterBuilder;
|
|
77886
78298
|
}());
|
|
77887
78299
|
|
|
77888
|
-
/*! @azure/msal-common v13.
|
|
78300
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
77889
78301
|
|
|
77890
78302
|
/*
|
|
77891
78303
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -77987,7 +78399,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
77987
78399
|
return BaseClient;
|
|
77988
78400
|
}());
|
|
77989
78401
|
|
|
77990
|
-
/*! @azure/msal-common v13.
|
|
78402
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
77991
78403
|
|
|
77992
78404
|
/*
|
|
77993
78405
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78125,7 +78537,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
78125
78537
|
return CredentialEntity;
|
|
78126
78538
|
}());
|
|
78127
78539
|
|
|
78128
|
-
/*! @azure/msal-common v13.
|
|
78540
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
78129
78541
|
|
|
78130
78542
|
/*
|
|
78131
78543
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78189,7 +78601,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
78189
78601
|
return IdTokenEntity;
|
|
78190
78602
|
}(CredentialEntity));
|
|
78191
78603
|
|
|
78192
|
-
/*! @azure/msal-common v13.
|
|
78604
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
78193
78605
|
/*
|
|
78194
78606
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
78195
78607
|
* Licensed under the MIT License.
|
|
@@ -78239,7 +78651,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
78239
78651
|
return TimeUtils;
|
|
78240
78652
|
}());
|
|
78241
78653
|
|
|
78242
|
-
/*! @azure/msal-common v13.
|
|
78654
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
78243
78655
|
|
|
78244
78656
|
/*
|
|
78245
78657
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78353,7 +78765,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
78353
78765
|
return AccessTokenEntity;
|
|
78354
78766
|
}(CredentialEntity));
|
|
78355
78767
|
|
|
78356
|
-
/*! @azure/msal-common v13.
|
|
78768
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
78357
78769
|
|
|
78358
78770
|
/*
|
|
78359
78771
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78420,7 +78832,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
78420
78832
|
return RefreshTokenEntity;
|
|
78421
78833
|
}(CredentialEntity));
|
|
78422
78834
|
|
|
78423
|
-
/*! @azure/msal-common v13.
|
|
78835
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
78424
78836
|
|
|
78425
78837
|
/*
|
|
78426
78838
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78499,7 +78911,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
78499
78911
|
return InteractionRequiredAuthError;
|
|
78500
78912
|
}(AuthError));
|
|
78501
78913
|
|
|
78502
|
-
/*! @azure/msal-common v13.
|
|
78914
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
78503
78915
|
/*
|
|
78504
78916
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
78505
78917
|
* Licensed under the MIT License.
|
|
@@ -78515,7 +78927,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
78515
78927
|
return CacheRecord;
|
|
78516
78928
|
}());
|
|
78517
78929
|
|
|
78518
|
-
/*! @azure/msal-common v13.
|
|
78930
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
78519
78931
|
|
|
78520
78932
|
/*
|
|
78521
78933
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78586,7 +78998,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
78586
78998
|
return ProtocolUtils;
|
|
78587
78999
|
}());
|
|
78588
79000
|
|
|
78589
|
-
/*! @azure/msal-common v13.
|
|
79001
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
78590
79002
|
|
|
78591
79003
|
/*
|
|
78592
79004
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -78820,7 +79232,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
78820
79232
|
return UrlString;
|
|
78821
79233
|
}());
|
|
78822
79234
|
|
|
78823
|
-
/*! @azure/msal-common v13.
|
|
79235
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
78824
79236
|
/*
|
|
78825
79237
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
78826
79238
|
* Licensed under the MIT License.
|
|
@@ -79024,6 +79436,10 @@ uniform ${precision} ${type} u_${name};
|
|
|
79024
79436
|
PerformanceEvents["UpdateCloudDiscoveryMetadataMeasurement"] = "updateCloudDiscoveryMetadataMeasurement";
|
|
79025
79437
|
PerformanceEvents["UsernamePasswordClientAcquireToken"] = "usernamePasswordClientAcquireToken";
|
|
79026
79438
|
PerformanceEvents["NativeMessageHandlerHandshake"] = "nativeMessageHandlerHandshake";
|
|
79439
|
+
/**
|
|
79440
|
+
* Cache operations
|
|
79441
|
+
*/
|
|
79442
|
+
PerformanceEvents["ClearTokensAndKeysWithClaims"] = "clearTokensAndKeysWithClaims";
|
|
79027
79443
|
})(PerformanceEvents || (PerformanceEvents = {}));
|
|
79028
79444
|
/**
|
|
79029
79445
|
* State of the performance event.
|
|
@@ -79049,7 +79465,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
79049
79465
|
"status",
|
|
79050
79466
|
]);
|
|
79051
79467
|
|
|
79052
|
-
/*! @azure/msal-common v13.
|
|
79468
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
79053
79469
|
|
|
79054
79470
|
/*
|
|
79055
79471
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -79158,7 +79574,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
79158
79574
|
return PopTokenGenerator;
|
|
79159
79575
|
}());
|
|
79160
79576
|
|
|
79161
|
-
/*! @azure/msal-common v13.
|
|
79577
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
79162
79578
|
|
|
79163
79579
|
/*
|
|
79164
79580
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -79228,7 +79644,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
79228
79644
|
return AppMetadataEntity;
|
|
79229
79645
|
}());
|
|
79230
79646
|
|
|
79231
|
-
/*! @azure/msal-common v13.
|
|
79647
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
79232
79648
|
/*
|
|
79233
79649
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
79234
79650
|
* Licensed under the MIT License.
|
|
@@ -79264,7 +79680,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
79264
79680
|
return TokenCacheContext;
|
|
79265
79681
|
}());
|
|
79266
79682
|
|
|
79267
|
-
/*! @azure/msal-common v13.
|
|
79683
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
79268
79684
|
|
|
79269
79685
|
/*
|
|
79270
79686
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -79551,7 +79967,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
79551
79967
|
return ResponseHandler;
|
|
79552
79968
|
}());
|
|
79553
79969
|
|
|
79554
|
-
/*! @azure/msal-common v13.
|
|
79970
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
79555
79971
|
|
|
79556
79972
|
/*
|
|
79557
79973
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -80029,7 +80445,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
80029
80445
|
return AuthorizationCodeClient;
|
|
80030
80446
|
}(BaseClient));
|
|
80031
80447
|
|
|
80032
|
-
/*! @azure/msal-common v13.
|
|
80448
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
80033
80449
|
|
|
80034
80450
|
/*
|
|
80035
80451
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -80303,7 +80719,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
80303
80719
|
return RefreshTokenClient;
|
|
80304
80720
|
}(BaseClient));
|
|
80305
80721
|
|
|
80306
|
-
/*! @azure/msal-common v13.
|
|
80722
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
80307
80723
|
|
|
80308
80724
|
/*
|
|
80309
80725
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -80433,7 +80849,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
80433
80849
|
return SilentFlowClient;
|
|
80434
80850
|
}(BaseClient));
|
|
80435
80851
|
|
|
80436
|
-
/*! @azure/msal-common v13.
|
|
80852
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
80437
80853
|
/*
|
|
80438
80854
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
80439
80855
|
* Licensed under the MIT License.
|
|
@@ -80445,7 +80861,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
80445
80861
|
response.hasOwnProperty("jwks_uri"));
|
|
80446
80862
|
}
|
|
80447
80863
|
|
|
80448
|
-
/*! @azure/msal-common v13.
|
|
80864
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
80449
80865
|
/*
|
|
80450
80866
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
80451
80867
|
* Licensed under the MIT License.
|
|
@@ -80454,7 +80870,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
80454
80870
|
var EndpointMetadata = rawMetdataJSON.endpointMetadata;
|
|
80455
80871
|
var InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata;
|
|
80456
80872
|
|
|
80457
|
-
/*! @azure/msal-common v13.
|
|
80873
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
80458
80874
|
/*
|
|
80459
80875
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
80460
80876
|
* Licensed under the MIT License.
|
|
@@ -80468,7 +80884,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
80468
80884
|
ProtocolMode["OIDC"] = "OIDC";
|
|
80469
80885
|
})(ProtocolMode || (ProtocolMode = {}));
|
|
80470
80886
|
|
|
80471
|
-
/*! @azure/msal-common v13.
|
|
80887
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
80472
80888
|
|
|
80473
80889
|
/*
|
|
80474
80890
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -80545,7 +80961,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
80545
80961
|
return AuthorityMetadataEntity;
|
|
80546
80962
|
}());
|
|
80547
80963
|
|
|
80548
|
-
/*! @azure/msal-common v13.
|
|
80964
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
80549
80965
|
/*
|
|
80550
80966
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
80551
80967
|
* Licensed under the MIT License.
|
|
@@ -80555,7 +80971,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
80555
80971
|
response.hasOwnProperty("metadata"));
|
|
80556
80972
|
}
|
|
80557
80973
|
|
|
80558
|
-
/*! @azure/msal-common v13.
|
|
80974
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
80559
80975
|
/*
|
|
80560
80976
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
80561
80977
|
* Licensed under the MIT License.
|
|
@@ -80565,7 +80981,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
80565
80981
|
response.hasOwnProperty("error_description"));
|
|
80566
80982
|
}
|
|
80567
80983
|
|
|
80568
|
-
/*! @azure/msal-common v13.
|
|
80984
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
80569
80985
|
|
|
80570
80986
|
/*
|
|
80571
80987
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -80697,7 +81113,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
80697
81113
|
return RegionDiscovery;
|
|
80698
81114
|
}());
|
|
80699
81115
|
|
|
80700
|
-
/*! @azure/msal-common v13.
|
|
81116
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
80701
81117
|
|
|
80702
81118
|
/*
|
|
80703
81119
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -81490,7 +81906,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
81490
81906
|
return Authority;
|
|
81491
81907
|
}());
|
|
81492
81908
|
|
|
81493
|
-
/*! @azure/msal-common v13.
|
|
81909
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
81494
81910
|
|
|
81495
81911
|
/*
|
|
81496
81912
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -81554,7 +81970,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
81554
81970
|
return AuthorityFactory;
|
|
81555
81971
|
}());
|
|
81556
81972
|
|
|
81557
|
-
/*! @azure/msal-common v13.
|
|
81973
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
81558
81974
|
|
|
81559
81975
|
/*
|
|
81560
81976
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -81585,7 +82001,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
81585
82001
|
return ServerTelemetryEntity;
|
|
81586
82002
|
}());
|
|
81587
82003
|
|
|
81588
|
-
/*! @azure/msal-common v13.
|
|
82004
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
81589
82005
|
|
|
81590
82006
|
/*
|
|
81591
82007
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -81613,7 +82029,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
81613
82029
|
return ThrottlingEntity;
|
|
81614
82030
|
}());
|
|
81615
82031
|
|
|
81616
|
-
/*! @azure/msal-common v13.
|
|
82032
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
81617
82033
|
|
|
81618
82034
|
/*
|
|
81619
82035
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -81630,7 +82046,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
81630
82046
|
}
|
|
81631
82047
|
};
|
|
81632
82048
|
|
|
81633
|
-
/*! @azure/msal-common v13.
|
|
82049
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
81634
82050
|
|
|
81635
82051
|
/*
|
|
81636
82052
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -81675,7 +82091,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
81675
82091
|
return JoseHeaderError;
|
|
81676
82092
|
}(AuthError));
|
|
81677
82093
|
|
|
81678
|
-
/*! @azure/msal-common v13.
|
|
82094
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
81679
82095
|
|
|
81680
82096
|
/*
|
|
81681
82097
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -81715,7 +82131,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
81715
82131
|
return JoseHeader;
|
|
81716
82132
|
}());
|
|
81717
82133
|
|
|
81718
|
-
/*! @azure/msal-common v13.
|
|
82134
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
81719
82135
|
|
|
81720
82136
|
/*
|
|
81721
82137
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -81877,7 +82293,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
81877
82293
|
return ServerTelemetryManager;
|
|
81878
82294
|
}());
|
|
81879
82295
|
|
|
81880
|
-
/*! @azure/msal-common v13.
|
|
82296
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
81881
82297
|
|
|
81882
82298
|
/*
|
|
81883
82299
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -82280,7 +82696,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
82280
82696
|
return PerformanceClient;
|
|
82281
82697
|
}());
|
|
82282
82698
|
|
|
82283
|
-
/*! @azure/msal-common v13.
|
|
82699
|
+
/*! @azure/msal-common v13.3.1 2023-10-27 */
|
|
82284
82700
|
|
|
82285
82701
|
/*
|
|
82286
82702
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -82327,7 +82743,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
82327
82743
|
return StubPerformanceClient;
|
|
82328
82744
|
}(PerformanceClient));
|
|
82329
82745
|
|
|
82330
|
-
/*! @azure/msal-browser v2.38.
|
|
82746
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
82331
82747
|
|
|
82332
82748
|
/*
|
|
82333
82749
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -82814,7 +83230,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
82814
83230
|
return BrowserAuthError;
|
|
82815
83231
|
}(AuthError));
|
|
82816
83232
|
|
|
82817
|
-
/*! @azure/msal-browser v2.38.
|
|
83233
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
82818
83234
|
|
|
82819
83235
|
/*
|
|
82820
83236
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -83031,7 +83447,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
83031
83447
|
CacheLookupPolicy[CacheLookupPolicy["Skip"] = 5] = "Skip";
|
|
83032
83448
|
})(CacheLookupPolicy || (CacheLookupPolicy = {}));
|
|
83033
83449
|
|
|
83034
|
-
/*! @azure/msal-browser v2.38.
|
|
83450
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
83035
83451
|
|
|
83036
83452
|
/*
|
|
83037
83453
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -83133,7 +83549,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
83133
83549
|
return BrowserConfigurationAuthError;
|
|
83134
83550
|
}(AuthError));
|
|
83135
83551
|
|
|
83136
|
-
/*! @azure/msal-browser v2.38.
|
|
83552
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
83137
83553
|
|
|
83138
83554
|
/*
|
|
83139
83555
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -83171,7 +83587,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
83171
83587
|
return BrowserStorage;
|
|
83172
83588
|
}());
|
|
83173
83589
|
|
|
83174
|
-
/*! @azure/msal-browser v2.38.
|
|
83590
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
83175
83591
|
/*
|
|
83176
83592
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
83177
83593
|
* Licensed under the MIT License.
|
|
@@ -83205,7 +83621,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
83205
83621
|
return MemoryStorage;
|
|
83206
83622
|
}());
|
|
83207
83623
|
|
|
83208
|
-
/*! @azure/msal-browser v2.38.
|
|
83624
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
83209
83625
|
|
|
83210
83626
|
/*
|
|
83211
83627
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -83245,7 +83661,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
83245
83661
|
return BrowserProtocolUtils;
|
|
83246
83662
|
}());
|
|
83247
83663
|
|
|
83248
|
-
/*! @azure/msal-browser v2.38.
|
|
83664
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
83249
83665
|
|
|
83250
83666
|
/*
|
|
83251
83667
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -84123,6 +84539,40 @@ uniform ${precision} ${type} u_${name};
|
|
|
84123
84539
|
});
|
|
84124
84540
|
});
|
|
84125
84541
|
};
|
|
84542
|
+
/**
|
|
84543
|
+
* Clears all access tokes that have claims prior to saving the current one
|
|
84544
|
+
* @param credential
|
|
84545
|
+
* @returns
|
|
84546
|
+
*/
|
|
84547
|
+
BrowserCacheManager.prototype.clearTokensAndKeysWithClaims = function () {
|
|
84548
|
+
return __awaiter$3(this, void 0, void 0, function () {
|
|
84549
|
+
var tokenKeys, removedAccessTokens;
|
|
84550
|
+
var _this = this;
|
|
84551
|
+
return __generator$3(this, function (_a) {
|
|
84552
|
+
switch (_a.label) {
|
|
84553
|
+
case 0:
|
|
84554
|
+
this.logger.trace("BrowserCacheManager.clearTokensAndKeysWithClaims called");
|
|
84555
|
+
tokenKeys = this.getTokenKeys();
|
|
84556
|
+
removedAccessTokens = [];
|
|
84557
|
+
tokenKeys.accessToken.forEach(function (key) {
|
|
84558
|
+
// if the access token has claims in its key, remove the token key and the token
|
|
84559
|
+
var credential = _this.getAccessTokenCredential(key);
|
|
84560
|
+
if ((credential === null || credential === void 0 ? void 0 : credential.requestedClaimsHash) && key.includes(credential.requestedClaimsHash.toLowerCase())) {
|
|
84561
|
+
removedAccessTokens.push(_this.removeAccessToken(key));
|
|
84562
|
+
}
|
|
84563
|
+
});
|
|
84564
|
+
return [4 /*yield*/, Promise.all(removedAccessTokens)];
|
|
84565
|
+
case 1:
|
|
84566
|
+
_a.sent();
|
|
84567
|
+
// warn if any access tokens are removed
|
|
84568
|
+
if (removedAccessTokens.length > 0) {
|
|
84569
|
+
this.logger.warning(removedAccessTokens.length + " access tokens with claims in the cache keys have been removed from the cache.");
|
|
84570
|
+
}
|
|
84571
|
+
return [2 /*return*/];
|
|
84572
|
+
}
|
|
84573
|
+
});
|
|
84574
|
+
});
|
|
84575
|
+
};
|
|
84126
84576
|
/**
|
|
84127
84577
|
* Add value to cookies
|
|
84128
84578
|
* @param cookieName
|
|
@@ -84516,12 +84966,12 @@ uniform ${precision} ${type} u_${name};
|
|
|
84516
84966
|
return new BrowserCacheManager(clientId, cacheOptions, DEFAULT_CRYPTO_IMPLEMENTATION, logger);
|
|
84517
84967
|
};
|
|
84518
84968
|
|
|
84519
|
-
/*! @azure/msal-browser v2.38.
|
|
84969
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
84520
84970
|
/* eslint-disable header/header */
|
|
84521
84971
|
var name = "@azure/msal-browser";
|
|
84522
|
-
var version = "2.38.
|
|
84972
|
+
var version = "2.38.3";
|
|
84523
84973
|
|
|
84524
|
-
/*! @azure/msal-browser v2.38.
|
|
84974
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
84525
84975
|
|
|
84526
84976
|
/*
|
|
84527
84977
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -84652,7 +85102,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
84652
85102
|
return FetchClient;
|
|
84653
85103
|
}());
|
|
84654
85104
|
|
|
84655
|
-
/*! @azure/msal-browser v2.38.
|
|
85105
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
84656
85106
|
|
|
84657
85107
|
/*
|
|
84658
85108
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -84784,7 +85234,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
84784
85234
|
return XhrClient;
|
|
84785
85235
|
}());
|
|
84786
85236
|
|
|
84787
|
-
/*! @azure/msal-browser v2.38.
|
|
85237
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
84788
85238
|
|
|
84789
85239
|
/*
|
|
84790
85240
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -84923,7 +85373,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
84923
85373
|
return BrowserUtils;
|
|
84924
85374
|
}());
|
|
84925
85375
|
|
|
84926
|
-
/*! @azure/msal-browser v2.38.
|
|
85376
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
84927
85377
|
|
|
84928
85378
|
/*
|
|
84929
85379
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -85120,7 +85570,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
85120
85570
|
return BaseInteractionClient;
|
|
85121
85571
|
}());
|
|
85122
85572
|
|
|
85123
|
-
/*! @azure/msal-browser v2.38.
|
|
85573
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
85124
85574
|
|
|
85125
85575
|
/*
|
|
85126
85576
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -85420,7 +85870,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
85420
85870
|
return StandardInteractionClient;
|
|
85421
85871
|
}(BaseInteractionClient));
|
|
85422
85872
|
|
|
85423
|
-
/*! @azure/msal-browser v2.38.
|
|
85873
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
85424
85874
|
|
|
85425
85875
|
/*
|
|
85426
85876
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -85575,7 +86025,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
85575
86025
|
return InteractionHandler;
|
|
85576
86026
|
}());
|
|
85577
86027
|
|
|
85578
|
-
/*! @azure/msal-browser v2.38.
|
|
86028
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
85579
86029
|
|
|
85580
86030
|
/*
|
|
85581
86031
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -85712,7 +86162,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
85712
86162
|
return RedirectHandler;
|
|
85713
86163
|
}(InteractionHandler));
|
|
85714
86164
|
|
|
85715
|
-
/*! @azure/msal-browser v2.38.
|
|
86165
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
85716
86166
|
/*
|
|
85717
86167
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
85718
86168
|
* Licensed under the MIT License.
|
|
@@ -85746,7 +86196,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
85746
86196
|
EventType["RESTORE_FROM_BFCACHE"] = "msal:restoreFromBFCache";
|
|
85747
86197
|
})(EventType || (EventType = {}));
|
|
85748
86198
|
|
|
85749
|
-
/*! @azure/msal-browser v2.38.
|
|
86199
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
85750
86200
|
|
|
85751
86201
|
/*
|
|
85752
86202
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -85837,7 +86287,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
85837
86287
|
return NativeAuthError;
|
|
85838
86288
|
}(AuthError));
|
|
85839
86289
|
|
|
85840
|
-
/*! @azure/msal-browser v2.38.
|
|
86290
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
85841
86291
|
|
|
85842
86292
|
/*
|
|
85843
86293
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -85937,7 +86387,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
85937
86387
|
return SilentCacheClient;
|
|
85938
86388
|
}(StandardInteractionClient));
|
|
85939
86389
|
|
|
85940
|
-
/*! @azure/msal-browser v2.38.
|
|
86390
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
85941
86391
|
|
|
85942
86392
|
/*
|
|
85943
86393
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -86519,7 +86969,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
86519
86969
|
return NativeInteractionClient;
|
|
86520
86970
|
}(BaseInteractionClient));
|
|
86521
86971
|
|
|
86522
|
-
/*! @azure/msal-browser v2.38.
|
|
86972
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
86523
86973
|
|
|
86524
86974
|
/*
|
|
86525
86975
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -86782,7 +87232,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
86782
87232
|
return NativeMessageHandler;
|
|
86783
87233
|
}());
|
|
86784
87234
|
|
|
86785
|
-
/*! @azure/msal-browser v2.38.
|
|
87235
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
86786
87236
|
|
|
86787
87237
|
/*
|
|
86788
87238
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -87123,7 +87573,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
87123
87573
|
return RedirectClient;
|
|
87124
87574
|
}(StandardInteractionClient));
|
|
87125
87575
|
|
|
87126
|
-
/*! @azure/msal-browser v2.38.
|
|
87576
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
87127
87577
|
|
|
87128
87578
|
/*
|
|
87129
87579
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -87623,7 +88073,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
87623
88073
|
return PopupClient;
|
|
87624
88074
|
}(StandardInteractionClient));
|
|
87625
88075
|
|
|
87626
|
-
/*! @azure/msal-browser v2.38.
|
|
88076
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
87627
88077
|
/*
|
|
87628
88078
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
87629
88079
|
* Licensed under the MIT License.
|
|
@@ -87668,7 +88118,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
87668
88118
|
return NavigationClient;
|
|
87669
88119
|
}());
|
|
87670
88120
|
|
|
87671
|
-
/*! @azure/msal-browser v2.38.
|
|
88121
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
87672
88122
|
|
|
87673
88123
|
/*
|
|
87674
88124
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -87750,7 +88200,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
87750
88200
|
return overlayedConfig;
|
|
87751
88201
|
}
|
|
87752
88202
|
|
|
87753
|
-
/*! @azure/msal-browser v2.38.
|
|
88203
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
87754
88204
|
|
|
87755
88205
|
/*
|
|
87756
88206
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -87903,7 +88353,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
87903
88353
|
return SilentHandler;
|
|
87904
88354
|
}(InteractionHandler));
|
|
87905
88355
|
|
|
87906
|
-
/*! @azure/msal-browser v2.38.
|
|
88356
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
87907
88357
|
|
|
87908
88358
|
/*
|
|
87909
88359
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -88050,7 +88500,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
88050
88500
|
return SilentIframeClient;
|
|
88051
88501
|
}(StandardInteractionClient));
|
|
88052
88502
|
|
|
88053
|
-
/*! @azure/msal-browser v2.38.
|
|
88503
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
88054
88504
|
|
|
88055
88505
|
/*
|
|
88056
88506
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -88142,7 +88592,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
88142
88592
|
return SilentRefreshClient;
|
|
88143
88593
|
}(StandardInteractionClient));
|
|
88144
88594
|
|
|
88145
|
-
/*! @azure/msal-browser v2.38.
|
|
88595
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
88146
88596
|
|
|
88147
88597
|
/*
|
|
88148
88598
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -88264,7 +88714,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
88264
88714
|
return EventHandler;
|
|
88265
88715
|
}());
|
|
88266
88716
|
|
|
88267
|
-
/*! @azure/msal-browser v2.38.
|
|
88717
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
88268
88718
|
/*
|
|
88269
88719
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
88270
88720
|
* Licensed under the MIT License.
|
|
@@ -88290,7 +88740,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
88290
88740
|
return MathUtils;
|
|
88291
88741
|
}());
|
|
88292
88742
|
|
|
88293
|
-
/*! @azure/msal-browser v2.38.
|
|
88743
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
88294
88744
|
|
|
88295
88745
|
/*
|
|
88296
88746
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -88378,7 +88828,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
88378
88828
|
return GuidGenerator;
|
|
88379
88829
|
}());
|
|
88380
88830
|
|
|
88381
|
-
/*! @azure/msal-browser v2.38.
|
|
88831
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
88382
88832
|
|
|
88383
88833
|
/*
|
|
88384
88834
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -88496,7 +88946,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
88496
88946
|
return BrowserStringUtils;
|
|
88497
88947
|
}());
|
|
88498
88948
|
|
|
88499
|
-
/*! @azure/msal-browser v2.38.
|
|
88949
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
88500
88950
|
|
|
88501
88951
|
/*
|
|
88502
88952
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -88579,7 +89029,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
88579
89029
|
return Base64Encode;
|
|
88580
89030
|
}());
|
|
88581
89031
|
|
|
88582
|
-
/*! @azure/msal-browser v2.38.
|
|
89032
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
88583
89033
|
|
|
88584
89034
|
/*
|
|
88585
89035
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -88656,7 +89106,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
88656
89106
|
return Base64Decode;
|
|
88657
89107
|
}());
|
|
88658
89108
|
|
|
88659
|
-
/*! @azure/msal-browser v2.38.
|
|
89109
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
88660
89110
|
|
|
88661
89111
|
/*
|
|
88662
89112
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -88737,7 +89187,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
88737
89187
|
return PkceGenerator;
|
|
88738
89188
|
}());
|
|
88739
89189
|
|
|
88740
|
-
/*! @azure/msal-browser v2.38.
|
|
89190
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
88741
89191
|
|
|
88742
89192
|
/*
|
|
88743
89193
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -88787,7 +89237,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
88787
89237
|
return ModernBrowserCrypto;
|
|
88788
89238
|
}());
|
|
88789
89239
|
|
|
88790
|
-
/*! @azure/msal-browser v2.38.
|
|
89240
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
88791
89241
|
|
|
88792
89242
|
/*
|
|
88793
89243
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -88841,7 +89291,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
88841
89291
|
return MsrBrowserCrypto;
|
|
88842
89292
|
}());
|
|
88843
89293
|
|
|
88844
|
-
/*! @azure/msal-browser v2.38.
|
|
89294
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
88845
89295
|
|
|
88846
89296
|
/*
|
|
88847
89297
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -88946,7 +89396,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
88946
89396
|
return MsBrowserCrypto;
|
|
88947
89397
|
}());
|
|
88948
89398
|
|
|
88949
|
-
/*! @azure/msal-browser v2.38.
|
|
89399
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
88950
89400
|
|
|
88951
89401
|
/*
|
|
88952
89402
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -89103,7 +89553,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
89103
89553
|
return BrowserCrypto;
|
|
89104
89554
|
}());
|
|
89105
89555
|
|
|
89106
|
-
/*! @azure/msal-browser v2.38.
|
|
89556
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
89107
89557
|
|
|
89108
89558
|
/*
|
|
89109
89559
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -89359,7 +89809,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
89359
89809
|
return DatabaseStorage;
|
|
89360
89810
|
}());
|
|
89361
89811
|
|
|
89362
|
-
/*! @azure/msal-browser v2.38.
|
|
89812
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
89363
89813
|
|
|
89364
89814
|
/*
|
|
89365
89815
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -89562,7 +90012,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
89562
90012
|
return AsyncMemoryStorage;
|
|
89563
90013
|
}());
|
|
89564
90014
|
|
|
89565
|
-
/*! @azure/msal-browser v2.38.
|
|
90015
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
89566
90016
|
|
|
89567
90017
|
/*
|
|
89568
90018
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -89615,7 +90065,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
89615
90065
|
return CryptoKeyStore;
|
|
89616
90066
|
}());
|
|
89617
90067
|
|
|
89618
|
-
/*! @azure/msal-browser v2.38.
|
|
90068
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
89619
90069
|
|
|
89620
90070
|
/*
|
|
89621
90071
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -89825,7 +90275,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
89825
90275
|
return CryptoOps;
|
|
89826
90276
|
}());
|
|
89827
90277
|
|
|
89828
|
-
/*! @azure/msal-browser v2.38.
|
|
90278
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
89829
90279
|
/*
|
|
89830
90280
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
89831
90281
|
* Licensed under the MIT License.
|
|
@@ -89920,7 +90370,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
89920
90370
|
return BrowserPerformanceMeasurement;
|
|
89921
90371
|
}());
|
|
89922
90372
|
|
|
89923
|
-
/*! @azure/msal-browser v2.38.
|
|
90373
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
89924
90374
|
|
|
89925
90375
|
/*
|
|
89926
90376
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -90041,7 +90491,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
90041
90491
|
return BrowserPerformanceClient;
|
|
90042
90492
|
}(PerformanceClient));
|
|
90043
90493
|
|
|
90044
|
-
/*! @azure/msal-browser v2.38.
|
|
90494
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
90045
90495
|
|
|
90046
90496
|
/*
|
|
90047
90497
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -90263,7 +90713,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
90263
90713
|
return TokenCache;
|
|
90264
90714
|
}());
|
|
90265
90715
|
|
|
90266
|
-
/*! @azure/msal-browser v2.38.
|
|
90716
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
90267
90717
|
|
|
90268
90718
|
/*
|
|
90269
90719
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -90279,7 +90729,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
90279
90729
|
return HybridSpaAuthorizationCodeClient;
|
|
90280
90730
|
}(AuthorizationCodeClient));
|
|
90281
90731
|
|
|
90282
|
-
/*! @azure/msal-browser v2.38.
|
|
90732
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
90283
90733
|
|
|
90284
90734
|
/*
|
|
90285
90735
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -90356,7 +90806,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
90356
90806
|
return SilentAuthCodeClient;
|
|
90357
90807
|
}(StandardInteractionClient));
|
|
90358
90808
|
|
|
90359
|
-
/*! @azure/msal-browser v2.38.
|
|
90809
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
90360
90810
|
|
|
90361
90811
|
/*
|
|
90362
90812
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -90435,7 +90885,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
90435
90885
|
*/
|
|
90436
90886
|
ClientApplication.prototype.initialize = function () {
|
|
90437
90887
|
return __awaiter$3(this, void 0, void 0, function () {
|
|
90438
|
-
var allowNativeBroker, initMeasurement, _a, e_1;
|
|
90888
|
+
var allowNativeBroker, initMeasurement, _a, e_1, claimsTokensRemovalMeasurement;
|
|
90439
90889
|
return __generator$3(this, function (_b) {
|
|
90440
90890
|
switch (_b.label) {
|
|
90441
90891
|
case 0:
|
|
@@ -90461,6 +90911,15 @@ uniform ${precision} ${type} u_${name};
|
|
|
90461
90911
|
this.logger.verbose(e_1);
|
|
90462
90912
|
return [3 /*break*/, 4];
|
|
90463
90913
|
case 4:
|
|
90914
|
+
if (!!this.config.cache.claimsBasedCachingEnabled) return [3 /*break*/, 6];
|
|
90915
|
+
this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims");
|
|
90916
|
+
claimsTokensRemovalMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.ClearTokensAndKeysWithClaims);
|
|
90917
|
+
return [4 /*yield*/, this.browserStorage.clearTokensAndKeysWithClaims()];
|
|
90918
|
+
case 5:
|
|
90919
|
+
_b.sent();
|
|
90920
|
+
claimsTokensRemovalMeasurement.endMeasurement({ success: true });
|
|
90921
|
+
_b.label = 6;
|
|
90922
|
+
case 6:
|
|
90464
90923
|
this.initialized = true;
|
|
90465
90924
|
this.eventHandler.emitEvent(EventType.INITIALIZE_END);
|
|
90466
90925
|
initMeasurement.endMeasurement({ allowNativeBroker: allowNativeBroker, success: true });
|
|
@@ -91384,7 +91843,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
91384
91843
|
return ClientApplication;
|
|
91385
91844
|
}());
|
|
91386
91845
|
|
|
91387
|
-
/*! @azure/msal-browser v2.38.
|
|
91846
|
+
/*! @azure/msal-browser v2.38.3 2023-10-27 */
|
|
91388
91847
|
|
|
91389
91848
|
/*
|
|
91390
91849
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -93996,59 +94455,59 @@ uniform ${precision} ${type} u_${name};
|
|
|
93996
94455
|
var features = this.map._getMap().querySourceFeatures(sourceID, { sourceLayer: sourceLayer, filter: filter });
|
|
93997
94456
|
return this.map.sources._mapFeaturesToShapes(features, true, this.sources.get(sourceID));
|
|
93998
94457
|
};
|
|
93999
|
-
|
|
94000
|
-
|
|
94001
|
-
|
|
94002
|
-
|
|
94003
|
-
|
|
94004
|
-
|
|
94005
|
-
|
|
94006
|
-
|
|
94007
|
-
|
|
94008
|
-
|
|
94009
|
-
|
|
94010
|
-
|
|
94011
|
-
|
|
94012
|
-
|
|
94013
|
-
|
|
94014
|
-
|
|
94015
|
-
|
|
94016
|
-
|
|
94017
|
-
|
|
94018
|
-
|
|
94019
|
-
|
|
94020
|
-
|
|
94021
|
-
|
|
94022
|
-
|
|
94023
|
-
|
|
94024
|
-
|
|
94025
|
-
|
|
94026
|
-
|
|
94027
|
-
|
|
94028
|
-
|
|
94029
|
-
|
|
94030
|
-
|
|
94031
|
-
|
|
94032
|
-
|
|
94033
|
-
|
|
94034
|
-
|
|
94035
|
-
|
|
94036
|
-
|
|
94037
|
-
|
|
94038
|
-
|
|
94039
|
-
|
|
94040
|
-
|
|
94041
|
-
|
|
94042
|
-
|
|
94043
|
-
|
|
94044
|
-
|
|
94045
|
-
|
|
94046
|
-
|
|
94047
|
-
|
|
94048
|
-
|
|
94049
|
-
|
|
94050
|
-
|
|
94051
|
-
|
|
94458
|
+
/**
|
|
94459
|
+
* Gets the state of a feature
|
|
94460
|
+
* @param feature the ID of the feature
|
|
94461
|
+
* @param source the ID of the source
|
|
94462
|
+
* @param sourceLayer the ID of the layer
|
|
94463
|
+
*/
|
|
94464
|
+
SourceManager.prototype.getFeatureState = function (feature, source, sourceLayer) {
|
|
94465
|
+
var featureId;
|
|
94466
|
+
if (typeof feature === "string") {
|
|
94467
|
+
featureId = feature;
|
|
94468
|
+
}
|
|
94469
|
+
else {
|
|
94470
|
+
featureId = feature instanceof Shape ? feature.getId() : feature.id;
|
|
94471
|
+
}
|
|
94472
|
+
var featureSource = typeof source === "string" ? source : source.getId();
|
|
94473
|
+
return this.map._getMap().getFeatureState({ id: featureId, source: featureSource, sourceLayer: sourceLayer });
|
|
94474
|
+
};
|
|
94475
|
+
/**
|
|
94476
|
+
* Removes the state or a single key value of the state of a feature.
|
|
94477
|
+
* @param feature the ID of the feature
|
|
94478
|
+
* @param source the ID of the source
|
|
94479
|
+
* @param sourceLayer the ID of the layer
|
|
94480
|
+
* @param key the key in the feature state to update
|
|
94481
|
+
*/
|
|
94482
|
+
SourceManager.prototype.removeFeatureState = function (feature, source, sourceLayer, key) {
|
|
94483
|
+
var featureId;
|
|
94484
|
+
if (typeof feature === "string") {
|
|
94485
|
+
featureId = feature;
|
|
94486
|
+
}
|
|
94487
|
+
else {
|
|
94488
|
+
featureId = feature instanceof Shape ? feature.getId() : feature.id;
|
|
94489
|
+
}
|
|
94490
|
+
var featureSource = typeof source === "string" ? source : source.getId();
|
|
94491
|
+
this.map._getMap().removeFeatureState({ id: featureId, source: featureSource, sourceLayer: sourceLayer }, key);
|
|
94492
|
+
};
|
|
94493
|
+
/**
|
|
94494
|
+
* Sets the state of the feature by passing in a key value pair object.
|
|
94495
|
+
* @param feature the ID of the feature
|
|
94496
|
+
* @param source the ID of the source
|
|
94497
|
+
* @param sourceLayer the ID of the layer
|
|
94498
|
+
* @param key the key in the feature state to update
|
|
94499
|
+
*/
|
|
94500
|
+
SourceManager.prototype.setFeatureState = function (feature, source, state, sourceLayer) {
|
|
94501
|
+
var featureId;
|
|
94502
|
+
if (typeof feature === "string") {
|
|
94503
|
+
featureId = feature;
|
|
94504
|
+
}
|
|
94505
|
+
else {
|
|
94506
|
+
featureId = feature instanceof Shape ? feature.getId() : feature.id;
|
|
94507
|
+
}
|
|
94508
|
+
var featureSource = typeof source === "string" ? source : source.getId();
|
|
94509
|
+
this.map._getMap().setFeatureState({ id: featureId, source: featureSource, sourceLayer: sourceLayer }, state);
|
|
94510
|
+
};
|
|
94052
94511
|
/**
|
|
94053
94512
|
* @internal
|
|
94054
94513
|
*/
|
|
@@ -95313,8 +95772,8 @@ uniform ${precision} ${type} u_${name};
|
|
|
95313
95772
|
*/
|
|
95314
95773
|
_this.styleSet = undefined;
|
|
95315
95774
|
/**
|
|
95316
|
-
* Enable accessibility
|
|
95317
|
-
*
|
|
95775
|
+
* Enable the accessibility feature to provide screen reader support for users who have difficulty visualizing the web application.
|
|
95776
|
+
* This property is set to true by default.
|
|
95318
95777
|
* @default true
|
|
95319
95778
|
*/
|
|
95320
95779
|
_this.enableAccessibility = true;
|
|
@@ -96152,14 +96611,13 @@ uniform ${precision} ${type} u_${name};
|
|
|
96152
96611
|
return !previousStyle
|
|
96153
96612
|
? nextStyle
|
|
96154
96613
|
: this.map.layers._getUserLayers().reduce(function (style, userLayer) {
|
|
96614
|
+
var _a, _b;
|
|
96155
96615
|
if (userLayer.layer instanceof WebGLLayer) {
|
|
96156
96616
|
// mapbox custom layers cannot be serialized and preserved,
|
|
96157
96617
|
// return to continue to the next user layer.
|
|
96158
96618
|
return style;
|
|
96159
96619
|
}
|
|
96160
|
-
var
|
|
96161
|
-
? layerGroupLayers[userLayer.before][0]
|
|
96162
|
-
: undefined;
|
|
96620
|
+
var beforeLayerId = ((_b = (_a = layerGroupLayers === null || layerGroupLayers === void 0 ? void 0 : layerGroupLayers[userLayer.before]) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id) || userLayer.before;
|
|
96163
96621
|
var layer = previousStyle.layers.find(function (layer) { return layer.id === userLayer.layer.getId(); });
|
|
96164
96622
|
// when setStyle diff attempt is unsuccesful, _load will be called on the style that may have already injected user layers -> clean it up
|
|
96165
96623
|
var existingLayerIdx = nextStyle.layers.findIndex(function (layer) { return layer.id === userLayer.layer.getId(); });
|
|
@@ -96170,7 +96628,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
96170
96628
|
var sourcesToCopy = new Set(Array.from(userLayer.layer._getSourceIds())
|
|
96171
96629
|
.map(function (sourceId) { return previousStyle.sources[sourceId] ? { source: previousStyle.sources[sourceId], id: sourceId } : undefined; })
|
|
96172
96630
|
.filter(function (source) { return source !== undefined; }));
|
|
96173
|
-
var insertIdx =
|
|
96631
|
+
var insertIdx = beforeLayerId ? style.layers.findIndex(function (layer) { return layer.id === beforeLayerId; }) : -1;
|
|
96174
96632
|
if (insertIdx > -1) {
|
|
96175
96633
|
style.layers.splice(insertIdx, 0, layer);
|
|
96176
96634
|
}
|