azure-maps-control 2.2.2 → 2.2.4

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.
@@ -77,7 +77,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
77
77
  }
78
78
 
79
79
  var azuremapsMaplibreGlUnminified = createCommonjsModule(function (module, exports) {
80
- /* 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/v1.14.0-rc4/LICENSE.txt */
80
+ /* 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/v1.15.0/LICENSE.txt */
81
81
  (function (global, factory) {
82
82
  module.exports = factory() ;
83
83
  }(commonjsGlobal, (function () {
@@ -109,7 +109,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
109
109
  return module = { exports: {} }, fn(module, module.exports), module.exports;
110
110
  }
111
111
 
112
- var version = "1.14.0-rc4";
112
+ var version = "1.15.0";
113
113
 
114
114
  var unitbezier = UnitBezier;
115
115
  function UnitBezier(p1x, p1y, p2x, p2y) {
@@ -2455,8 +2455,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2455
2455
  "property-type": "data-driven"
2456
2456
  },
2457
2457
  "icon-padding": {
2458
- type: "number",
2459
- "default": 2,
2458
+ type: "padding",
2459
+ "default": [
2460
+ 2
2461
+ ],
2460
2462
  minimum: 0,
2461
2463
  units: "pixels",
2462
2464
  requires: [
@@ -2465,10 +2467,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2465
2467
  expression: {
2466
2468
  interpolated: true,
2467
2469
  parameters: [
2468
- "zoom"
2470
+ "zoom",
2471
+ "feature"
2469
2472
  ]
2470
2473
  },
2471
- "property-type": "data-constant"
2474
+ "property-type": "data-driven"
2472
2475
  },
2473
2476
  "icon-keep-upright": {
2474
2477
  type: "boolean",
@@ -4674,6 +4677,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
4674
4677
  var ErrorType = { kind: 'error' };
4675
4678
  var CollatorType = { kind: 'collator' };
4676
4679
  var FormattedType = { kind: 'formatted' };
4680
+ var PaddingType = { kind: 'padding' };
4677
4681
  var ResolvedImageType = { kind: 'resolvedImage' };
4678
4682
  function array(itemType, N) {
4679
4683
  return {
@@ -4699,6 +4703,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
4699
4703
  FormattedType,
4700
4704
  ObjectType,
4701
4705
  array(ValueType),
4706
+ PaddingType,
4702
4707
  ResolvedImageType
4703
4708
  ];
4704
4709
  function checkSubtype(expected, t) {
@@ -5897,6 +5902,65 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
5897
5902
  return serialized;
5898
5903
  };
5899
5904
 
5905
+ var Padding = function Padding(values) {
5906
+ this.values = values.slice();
5907
+ };
5908
+ Padding.parse = function parse(input) {
5909
+ if (input instanceof Padding) {
5910
+ return input;
5911
+ }
5912
+ if (typeof input === 'number') {
5913
+ return new Padding([
5914
+ input,
5915
+ input,
5916
+ input,
5917
+ input
5918
+ ]);
5919
+ }
5920
+ if (!Array.isArray(input)) {
5921
+ return undefined;
5922
+ }
5923
+ if (input.length < 1 || input.length > 4) {
5924
+ return undefined;
5925
+ }
5926
+ for (var i = 0, list = input; i < list.length; i += 1) {
5927
+ var val = list[i];
5928
+ if (typeof val !== 'number') {
5929
+ return undefined;
5930
+ }
5931
+ }
5932
+ switch (input.length) {
5933
+ case 1:
5934
+ input = [
5935
+ input[0],
5936
+ input[0],
5937
+ input[0],
5938
+ input[0]
5939
+ ];
5940
+ break;
5941
+ case 2:
5942
+ input = [
5943
+ input[0],
5944
+ input[1],
5945
+ input[0],
5946
+ input[1]
5947
+ ];
5948
+ break;
5949
+ case 3:
5950
+ input = [
5951
+ input[0],
5952
+ input[1],
5953
+ input[2],
5954
+ input[1]
5955
+ ];
5956
+ break;
5957
+ }
5958
+ return new Padding(input);
5959
+ };
5960
+ Padding.prototype.toString = function toString() {
5961
+ return JSON.stringify(this.values);
5962
+ };
5963
+
5900
5964
  var ResolvedImage = function ResolvedImage(options) {
5901
5965
  this.name = options.name;
5902
5966
  this.available = options.available;
@@ -5959,6 +6023,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
5959
6023
  return true;
5960
6024
  } else if (mixed instanceof Formatted) {
5961
6025
  return true;
6026
+ } else if (mixed instanceof Padding) {
6027
+ return true;
5962
6028
  } else if (mixed instanceof ResolvedImage) {
5963
6029
  return true;
5964
6030
  } else if (Array.isArray(mixed)) {
@@ -5995,6 +6061,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
5995
6061
  return CollatorType;
5996
6062
  } else if (value instanceof Formatted) {
5997
6063
  return FormattedType;
6064
+ } else if (value instanceof Padding) {
6065
+ return PaddingType;
5998
6066
  } else if (value instanceof ResolvedImage) {
5999
6067
  return ResolvedImageType;
6000
6068
  } else if (Array.isArray(value)) {
@@ -6023,7 +6091,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6023
6091
  return '';
6024
6092
  } else if (type === 'string' || type === 'number' || type === 'boolean') {
6025
6093
  return String(value);
6026
- } else if (value instanceof Color || value instanceof Formatted || value instanceof ResolvedImage) {
6094
+ } else if (value instanceof Color || value instanceof Formatted || value instanceof Padding || value instanceof ResolvedImage) {
6027
6095
  return value.toString();
6028
6096
  } else {
6029
6097
  return JSON.stringify(value);
@@ -6373,11 +6441,22 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6373
6441
  }
6374
6442
  }
6375
6443
  throw new RuntimeError(error || 'Could not parse color from value \'' + (typeof input === 'string' ? input : String(JSON.stringify(input))) + '\'');
6376
- } else if (this.type.kind === 'number') {
6377
- var value = null;
6444
+ } else if (this.type.kind === 'padding') {
6445
+ var input$1;
6378
6446
  for (var i$1 = 0, list$1 = this.args; i$1 < list$1.length; i$1 += 1) {
6379
6447
  var arg$1 = list$1[i$1];
6380
- value = arg$1.evaluate(ctx);
6448
+ input$1 = arg$1.evaluate(ctx);
6449
+ var pad = Padding.parse(input$1);
6450
+ if (pad) {
6451
+ return pad;
6452
+ }
6453
+ }
6454
+ throw new RuntimeError('Could not parse padding from value \'' + (typeof input$1 === 'string' ? input$1 : JSON.stringify(input$1)) + '\'');
6455
+ } else if (this.type.kind === 'number') {
6456
+ var value = null;
6457
+ for (var i$2 = 0, list$2 = this.args; i$2 < list$2.length; i$2 += 1) {
6458
+ var arg$2 = list$2[i$2];
6459
+ value = arg$2.evaluate(ctx);
6381
6460
  if (value === null) {
6382
6461
  return 0;
6383
6462
  }
@@ -7129,6 +7208,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
7129
7208
  parsed = annotate(parsed, expected, options.typeAnnotation || 'assert');
7130
7209
  } else if ((expected.kind === 'color' || expected.kind === 'formatted' || expected.kind === 'resolvedImage') && (actual.kind === 'value' || actual.kind === 'string')) {
7131
7210
  parsed = annotate(parsed, expected, options.typeAnnotation || 'coerce');
7211
+ } else if (expected.kind === 'padding' && (actual.kind === 'value' || actual.kind === 'number' || actual.kind === 'array')) {
7212
+ parsed = annotate(parsed, expected, options.typeAnnotation || 'coerce');
7132
7213
  } else if (this.checkSubtype(expected, actual)) {
7133
7214
  return null;
7134
7215
  }
@@ -7335,12 +7416,23 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
7335
7416
  return number(d, to[i], t);
7336
7417
  });
7337
7418
  }
7419
+ function padding(from, to, t) {
7420
+ var fromVal = from.values;
7421
+ var toVal = to.values;
7422
+ return new Padding([
7423
+ number(fromVal[0], toVal[0], t),
7424
+ number(fromVal[1], toVal[1], t),
7425
+ number(fromVal[2], toVal[2], t),
7426
+ number(fromVal[3], toVal[3], t)
7427
+ ]);
7428
+ }
7338
7429
 
7339
7430
  var interpolate = /*#__PURE__*/Object.freeze({
7340
7431
  __proto__: null,
7341
7432
  number: number,
7342
7433
  color: color,
7343
- array: array$1
7434
+ array: array$1,
7435
+ padding: padding
7344
7436
  });
7345
7437
 
7346
7438
  var Xn = 0.95047, Yn = 1, Zn = 1.08883, t0 = 4 / 29, t1 = 6 / 29, t2 = 3 * t1 * t1, t3 = t1 * t1 * t1, deg2rad = Math.PI / 180, rad2deg = 180 / Math.PI;
@@ -7531,7 +7623,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
7531
7623
  parsed
7532
7624
  ]);
7533
7625
  }
7534
- if (outputType.kind !== 'number' && outputType.kind !== 'color' && !(outputType.kind === 'array' && outputType.itemType.kind === 'number' && typeof outputType.N === 'number')) {
7626
+ if (outputType.kind !== 'number' && outputType.kind !== 'color' && outputType.kind !== 'padding' && !(outputType.kind === 'array' && outputType.itemType.kind === 'number' && typeof outputType.N === 'number')) {
7535
7627
  return context.error('Type ' + toString(outputType) + ' is not interpolatable.');
7536
7628
  }
7537
7629
  return new Interpolate(outputType, operator, interpolation, input, stops);
@@ -9281,20 +9373,21 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
9281
9373
  var featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;
9282
9374
  var zoomDependent = zoomAndFeatureDependent || !featureDependent;
9283
9375
  var type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');
9284
- if (isColor) {
9376
+ if (isColor || propertySpec.type === 'padding') {
9377
+ var parseFn = isColor ? Color.parse : Padding.parse;
9285
9378
  parameters = extend$1({}, parameters);
9286
9379
  if (parameters.stops) {
9287
9380
  parameters.stops = parameters.stops.map(function (stop) {
9288
9381
  return [
9289
9382
  stop[0],
9290
- Color.parse(stop[1])
9383
+ parseFn(stop[1])
9291
9384
  ];
9292
9385
  });
9293
9386
  }
9294
9387
  if (parameters.default) {
9295
- parameters.default = Color.parse(parameters.default);
9388
+ parameters.default = parseFn(parameters.default);
9296
9389
  } else {
9297
- parameters.default = Color.parse(propertySpec.default);
9390
+ parameters.default = parseFn(propertySpec.default);
9298
9391
  }
9299
9392
  }
9300
9393
  if (parameters.colorSpace && parameters.colorSpace !== 'rgb' && !colorSpaces[parameters.colorSpace]) {
@@ -9475,14 +9568,23 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
9475
9568
  return interp(outputLower, outputUpper, t);
9476
9569
  }
9477
9570
  function evaluateIdentityFunction(parameters, propertySpec, input) {
9478
- if (propertySpec.type === 'color') {
9571
+ switch (propertySpec.type) {
9572
+ case 'color':
9479
9573
  input = Color.parse(input);
9480
- } else if (propertySpec.type === 'formatted') {
9574
+ break;
9575
+ case 'formatted':
9481
9576
  input = Formatted.fromString(input.toString());
9482
- } else if (propertySpec.type === 'resolvedImage') {
9577
+ break;
9578
+ case 'resolvedImage':
9483
9579
  input = ResolvedImage.fromString(input.toString());
9484
- } else if (getType(input) !== propertySpec.type && (propertySpec.type !== 'enum' || !propertySpec.values[input])) {
9485
- input = undefined;
9580
+ break;
9581
+ case 'padding':
9582
+ input = Padding.parse(input);
9583
+ break;
9584
+ default:
9585
+ if (getType(input) !== propertySpec.type && (propertySpec.type !== 'enum' || !propertySpec.values[input])) {
9586
+ input = undefined;
9587
+ }
9486
9588
  }
9487
9589
  return coalesce(input, parameters.default, propertySpec.default);
9488
9590
  }
@@ -9639,8 +9741,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
9639
9741
  return expression.value;
9640
9742
  } else {
9641
9743
  var constant = value;
9642
- if (typeof value === 'string' && specification.type === 'color') {
9744
+ if (specification.type === 'color' && typeof value === 'string') {
9643
9745
  constant = Color.parse(value);
9746
+ } else if (specification.type === 'padding' && (typeof value === 'number' || Array.isArray(value))) {
9747
+ constant = Padding.parse(value);
9644
9748
  }
9645
9749
  return {
9646
9750
  kind: 'constant',
@@ -9688,6 +9792,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
9688
9792
  enum: StringType,
9689
9793
  boolean: BooleanType,
9690
9794
  formatted: FormattedType,
9795
+ padding: PaddingType,
9691
9796
  resolvedImage: ResolvedImageType
9692
9797
  };
9693
9798
  if (spec.type === 'array') {
@@ -9700,6 +9805,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
9700
9805
  return new Color(0, 0, 0, 0);
9701
9806
  } else if (spec.type === 'color') {
9702
9807
  return Color.parse(spec.default) || null;
9808
+ } else if (spec.type === 'padding') {
9809
+ return Padding.parse(spec.default) || null;
9703
9810
  } else if (spec.default === undefined) {
9704
9811
  return null;
9705
9812
  } else {
@@ -10698,6 +10805,33 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
10698
10805
  return validateExpression(options);
10699
10806
  }
10700
10807
 
10808
+ function validatePadding(options) {
10809
+ var key = options.key;
10810
+ var value = options.value;
10811
+ var type = getType(value);
10812
+ if (type === 'array') {
10813
+ if (value.length < 1 || value.length > 4) {
10814
+ return [new ValidationError(key, value, 'padding requires 1 to 4 values; ' + value.length + ' values found')];
10815
+ }
10816
+ var arrayElementSpec = { type: 'number' };
10817
+ var errors = [];
10818
+ for (var i = 0; i < value.length; i++) {
10819
+ errors = errors.concat(validate({
10820
+ key: key + '[' + i + ']',
10821
+ value: value[i],
10822
+ valueSpec: arrayElementSpec
10823
+ }));
10824
+ }
10825
+ return errors;
10826
+ } else {
10827
+ return validateNumber({
10828
+ key: key,
10829
+ value: value,
10830
+ valueSpec: {}
10831
+ });
10832
+ }
10833
+ }
10834
+
10701
10835
  var VALIDATORS = {
10702
10836
  '*': function _() {
10703
10837
  return [];
@@ -10716,7 +10850,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
10716
10850
  'light': validateLight,
10717
10851
  'string': validateString,
10718
10852
  'formatted': validateFormatted,
10719
- 'resolvedImage': validateImage
10853
+ 'resolvedImage': validateImage,
10854
+ 'padding': validatePadding
10720
10855
  };
10721
10856
  function validate(options) {
10722
10857
  var value = options.value;
@@ -15088,7 +15223,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15088
15223
  out[7] = a13 * c - a03 * s;
15089
15224
  return out;
15090
15225
  }
15091
- function perspective(out, fovy, aspect, near, far) {
15226
+ function perspectiveNO(out, fovy, aspect, near, far) {
15092
15227
  var f = 1 / Math.tan(fovy / 2), nf;
15093
15228
  out[0] = f / aspect;
15094
15229
  out[1] = 0;
@@ -15114,7 +15249,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15114
15249
  }
15115
15250
  return out;
15116
15251
  }
15117
- function ortho(out, left, right, bottom, top, near, far) {
15252
+ var perspective = perspectiveNO;
15253
+ function orthoNO(out, left, right, bottom, top, near, far) {
15118
15254
  var lr = 1 / (left - right);
15119
15255
  var bt = 1 / (bottom - top);
15120
15256
  var nf = 1 / (near - far);
@@ -15136,6 +15272,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15136
15272
  out[15] = 1;
15137
15273
  return out;
15138
15274
  }
15275
+ var ortho = orthoNO;
15139
15276
  var mul = multiply;
15140
15277
 
15141
15278
  function create$3() {
@@ -15659,9 +15796,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15659
15796
  }
15660
15797
  }
15661
15798
  invSize = Math.max(maxX - minX, maxY - minY);
15662
- invSize = invSize !== 0 ? 1 / invSize : 0;
15799
+ invSize = invSize !== 0 ? 32767 / invSize : 0;
15663
15800
  }
15664
- earcutLinked(outerNode, triangles, dim, minX, minY, invSize);
15801
+ earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);
15665
15802
  return triangles;
15666
15803
  }
15667
15804
  function linkedList(data, start, end, dim, clockwise) {
@@ -15716,9 +15853,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15716
15853
  prev = ear.prev;
15717
15854
  next = ear.next;
15718
15855
  if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {
15719
- triangles.push(prev.i / dim);
15720
- triangles.push(ear.i / dim);
15721
- triangles.push(next.i / dim);
15856
+ triangles.push(prev.i / dim | 0);
15857
+ triangles.push(ear.i / dim | 0);
15858
+ triangles.push(next.i / dim | 0);
15722
15859
  removeNode(ear);
15723
15860
  ear = next.next;
15724
15861
  stop = next.next;
@@ -15743,9 +15880,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15743
15880
  if (area(a, b, c) >= 0) {
15744
15881
  return false;
15745
15882
  }
15746
- var p = ear.next.next;
15747
- while (p !== ear.prev) {
15748
- if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) {
15883
+ var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
15884
+ var x0 = ax < bx ? ax < cx ? ax : cx : bx < cx ? bx : cx, y0 = ay < by ? ay < cy ? ay : cy : by < cy ? by : cy, x1 = ax > bx ? ax > cx ? ax : cx : bx > cx ? bx : cx, y1 = ay > by ? ay > cy ? ay : cy : by > cy ? by : cy;
15885
+ var p = c.next;
15886
+ while (p !== a) {
15887
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) {
15749
15888
  return false;
15750
15889
  }
15751
15890
  p = p.next;
@@ -15757,27 +15896,28 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15757
15896
  if (area(a, b, c) >= 0) {
15758
15897
  return false;
15759
15898
  }
15760
- var minTX = a.x < b.x ? a.x < c.x ? a.x : c.x : b.x < c.x ? b.x : c.x, minTY = a.y < b.y ? a.y < c.y ? a.y : c.y : b.y < c.y ? b.y : c.y, maxTX = a.x > b.x ? a.x > c.x ? a.x : c.x : b.x > c.x ? b.x : c.x, maxTY = a.y > b.y ? a.y > c.y ? a.y : c.y : b.y > c.y ? b.y : c.y;
15761
- var minZ = zOrder(minTX, minTY, minX, minY, invSize), maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);
15899
+ var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
15900
+ var x0 = ax < bx ? ax < cx ? ax : cx : bx < cx ? bx : cx, y0 = ay < by ? ay < cy ? ay : cy : by < cy ? by : cy, x1 = ax > bx ? ax > cx ? ax : cx : bx > cx ? bx : cx, y1 = ay > by ? ay > cy ? ay : cy : by > cy ? by : cy;
15901
+ var minZ = zOrder(x0, y0, minX, minY, invSize), maxZ = zOrder(x1, y1, minX, minY, invSize);
15762
15902
  var p = ear.prevZ, n = ear.nextZ;
15763
15903
  while (p && p.z >= minZ && n && n.z <= maxZ) {
15764
- if (p !== ear.prev && p !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) {
15904
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) {
15765
15905
  return false;
15766
15906
  }
15767
15907
  p = p.prevZ;
15768
- if (n !== ear.prev && n !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && area(n.prev, n, n.next) >= 0) {
15908
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) {
15769
15909
  return false;
15770
15910
  }
15771
15911
  n = n.nextZ;
15772
15912
  }
15773
15913
  while (p && p.z >= minZ) {
15774
- if (p !== ear.prev && p !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) {
15914
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) {
15775
15915
  return false;
15776
15916
  }
15777
15917
  p = p.prevZ;
15778
15918
  }
15779
15919
  while (n && n.z <= maxZ) {
15780
- if (n !== ear.prev && n !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && area(n.prev, n, n.next) >= 0) {
15920
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) {
15781
15921
  return false;
15782
15922
  }
15783
15923
  n = n.nextZ;
@@ -15789,9 +15929,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15789
15929
  do {
15790
15930
  var a = p.prev, b = p.next.next;
15791
15931
  if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {
15792
- triangles.push(a.i / dim);
15793
- triangles.push(p.i / dim);
15794
- triangles.push(b.i / dim);
15932
+ triangles.push(a.i / dim | 0);
15933
+ triangles.push(p.i / dim | 0);
15934
+ triangles.push(b.i / dim | 0);
15795
15935
  removeNode(p);
15796
15936
  removeNode(p.next);
15797
15937
  p = start = b;
@@ -15809,8 +15949,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15809
15949
  var c = splitPolygon(a, b);
15810
15950
  a = filterPoints(a, a.next);
15811
15951
  c = filterPoints(c, c.next);
15812
- earcutLinked(a, triangles, dim, minX, minY, invSize);
15813
- earcutLinked(c, triangles, dim, minX, minY, invSize);
15952
+ earcutLinked(a, triangles, dim, minX, minY, invSize, 0);
15953
+ earcutLinked(c, triangles, dim, minX, minY, invSize, 0);
15814
15954
  return;
15815
15955
  }
15816
15956
  b = b.next;
@@ -15832,7 +15972,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15832
15972
  queue.sort(compareX);
15833
15973
  for (i = 0; i < queue.length; i++) {
15834
15974
  outerNode = eliminateHole(queue[i], outerNode);
15835
- outerNode = filterPoints(outerNode, outerNode.next);
15836
15975
  }
15837
15976
  return outerNode;
15838
15977
  }
@@ -15845,9 +15984,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15845
15984
  return outerNode;
15846
15985
  }
15847
15986
  var bridgeReverse = splitPolygon(bridge, hole);
15848
- var filteredBridge = filterPoints(bridge, bridge.next);
15849
15987
  filterPoints(bridgeReverse, bridgeReverse.next);
15850
- return outerNode === bridge ? filteredBridge : outerNode;
15988
+ return filterPoints(bridge, bridge.next);
15851
15989
  }
15852
15990
  function findHoleBridge(hole, outerNode) {
15853
15991
  var p = outerNode, hx = hole.x, hy = hole.y, qx = -Infinity, m;
@@ -15856,15 +15994,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15856
15994
  var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
15857
15995
  if (x <= hx && x > qx) {
15858
15996
  qx = x;
15997
+ m = p.x < p.next.x ? p : p.next;
15859
15998
  if (x === hx) {
15860
- if (hy === p.y) {
15861
- return p;
15862
- }
15863
- if (hy === p.next.y) {
15864
- return p.next;
15865
- }
15999
+ return m;
15866
16000
  }
15867
- m = p.x < p.next.x ? p : p.next;
15868
16001
  }
15869
16002
  }
15870
16003
  p = p.next;
@@ -15872,9 +16005,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15872
16005
  if (!m) {
15873
16006
  return null;
15874
16007
  }
15875
- if (hx === qx) {
15876
- return m;
15877
- }
15878
16008
  var stop = m, mx = m.x, my = m.y, tanMin = Infinity, tan;
15879
16009
  p = m;
15880
16010
  do {
@@ -15895,7 +16025,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15895
16025
  function indexCurve(start, minX, minY, invSize) {
15896
16026
  var p = start;
15897
16027
  do {
15898
- if (p.z === null) {
16028
+ if (p.z === 0) {
15899
16029
  p.z = zOrder(p.x, p.y, minX, minY, invSize);
15900
16030
  }
15901
16031
  p.prevZ = p.prev;
@@ -15951,8 +16081,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15951
16081
  return list;
15952
16082
  }
15953
16083
  function zOrder(x, y, minX, minY, invSize) {
15954
- x = 32767 * (x - minX) * invSize;
15955
- y = 32767 * (y - minY) * invSize;
16084
+ x = (x - minX) * invSize | 0;
16085
+ y = (y - minY) * invSize | 0;
15956
16086
  x = (x | x << 8) & 16711935;
15957
16087
  x = (x | x << 4) & 252645135;
15958
16088
  x = (x | x << 2) & 858993459;
@@ -15974,7 +16104,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15974
16104
  return leftmost;
15975
16105
  }
15976
16106
  function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {
15977
- return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 && (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 && (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;
16107
+ return (cx - px) * (ay - py) >= (ax - px) * (cy - py) && (ax - px) * (by - py) >= (bx - px) * (ay - py) && (bx - px) * (cy - py) >= (cx - px) * (by - py);
15978
16108
  }
15979
16109
  function isValidDiagonal(a, b) {
15980
16110
  return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && (area(a.prev, a, b.prev) || area(a, b.prev, b)) || equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0);
@@ -16077,7 +16207,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16077
16207
  this.y = y;
16078
16208
  this.prev = null;
16079
16209
  this.next = null;
16080
- this.z = null;
16210
+ this.z = 0;
16081
16211
  this.prevZ = null;
16082
16212
  this.nextZ = null;
16083
16213
  this.steiner = false;
@@ -19078,12 +19208,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19078
19208
  var stretchX = ref.stretchX;
19079
19209
  var stretchY = ref.stretchY;
19080
19210
  var content = ref.content;
19211
+ var contentMatch = ref.contentMatch;
19081
19212
  this.paddedRect = paddedRect;
19082
19213
  this.pixelRatio = pixelRatio;
19083
19214
  this.stretchX = stretchX;
19084
19215
  this.stretchY = stretchY;
19085
19216
  this.content = content;
19086
19217
  this.version = version;
19218
+ this.contentMatch = contentMatch;
19087
19219
  };
19088
19220
  var prototypeAccessors = {
19089
19221
  tl: { configurable: true },
@@ -19759,6 +19891,36 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19759
19891
  right: x2
19760
19892
  };
19761
19893
  }
19894
+ function applyContentMatch(shapedIcon) {
19895
+ var iconLeft = shapedIcon.left;
19896
+ var iconTop = shapedIcon.top;
19897
+ var iconWidth = shapedIcon.right - iconLeft;
19898
+ var iconHeight = shapedIcon.bottom - iconTop;
19899
+ var contentWidth = shapedIcon.image.content[2] - shapedIcon.image.content[0];
19900
+ var contentHeight = shapedIcon.image.content[3] - shapedIcon.image.content[1];
19901
+ if (contentHeight !== 0 && iconWidth !== 0 && iconHeight !== 0) {
19902
+ var contentAspectRatio = contentWidth / contentHeight;
19903
+ if (shapedIcon.image.contentMatch === 'height') {
19904
+ if (iconWidth / iconHeight < contentAspectRatio) {
19905
+ var newIconWidth = iconHeight * contentAspectRatio;
19906
+ iconLeft *= newIconWidth / iconWidth;
19907
+ iconWidth = newIconWidth;
19908
+ }
19909
+ } else if (shapedIcon.image.contentMatch === 'width') {
19910
+ if (contentAspectRatio !== 0 && iconWidth / iconHeight > contentAspectRatio) {
19911
+ var newIconHeight = iconWidth / contentAspectRatio;
19912
+ iconTop *= newIconHeight / newIconHeight;
19913
+ iconHeight = newIconHeight;
19914
+ }
19915
+ }
19916
+ }
19917
+ return {
19918
+ x1: iconLeft,
19919
+ y1: iconTop,
19920
+ x2: iconLeft + iconWidth,
19921
+ y2: iconTop + iconHeight
19922
+ };
19923
+ }
19762
19924
  function fitIconToText(shapedIcon, shapedText, textFit, padding, iconOffset, fontScale) {
19763
19925
  var image = shapedIcon.image;
19764
19926
  var collisionPadding;
@@ -20079,8 +20241,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20079
20241
  var pixelRatio = image.pixelRatio;
20080
20242
  var imageWidth = image.paddedRect.w - 2 * border$1;
20081
20243
  var imageHeight = image.paddedRect.h - 2 * border$1;
20082
- var iconWidth = shapedIcon.right - shapedIcon.left;
20083
- var iconHeight = shapedIcon.bottom - shapedIcon.top;
20244
+ var icon = {
20245
+ x1: shapedIcon.left,
20246
+ y1: shapedIcon.top,
20247
+ x2: shapedIcon.right,
20248
+ y2: shapedIcon.bottom
20249
+ };
20084
20250
  var stretchX = image.stretchX || [[
20085
20251
  0,
20086
20252
  imageWidth
@@ -20106,23 +20272,32 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20106
20272
  var fixedContentHeight = fixedHeight;
20107
20273
  if (image.content && hasIconTextFit) {
20108
20274
  var content = image.content;
20275
+ var contentWidth = content[2] - content[0];
20276
+ var contentHeight = content[3] - content[1];
20277
+ if (image.contentMatch && image.content) {
20278
+ icon = applyContentMatch(shapedIcon);
20279
+ }
20109
20280
  stretchOffsetX = sumWithinRange(stretchX, 0, content[0]);
20110
20281
  stretchOffsetY = sumWithinRange(stretchY, 0, content[1]);
20111
20282
  stretchContentWidth = sumWithinRange(stretchX, content[0], content[2]);
20112
20283
  stretchContentHeight = sumWithinRange(stretchY, content[1], content[3]);
20113
20284
  fixedOffsetX = content[0] - stretchOffsetX;
20114
20285
  fixedOffsetY = content[1] - stretchOffsetY;
20115
- fixedContentWidth = content[2] - content[0] - stretchContentWidth;
20116
- fixedContentHeight = content[3] - content[1] - stretchContentHeight;
20286
+ fixedContentWidth = contentWidth - stretchContentWidth;
20287
+ fixedContentHeight = contentHeight - stretchContentHeight;
20117
20288
  }
20289
+ var iconLeft = icon.x1;
20290
+ var iconTop = icon.y1;
20291
+ var iconWidth = icon.x2 - iconLeft;
20292
+ var iconHeight = icon.y2 - iconTop;
20118
20293
  var makeBox = function (left, top, right, bottom) {
20119
- var leftEm = getEmOffset(left.stretch - stretchOffsetX, stretchContentWidth, iconWidth, shapedIcon.left);
20294
+ var leftEm = getEmOffset(left.stretch - stretchOffsetX, stretchContentWidth, iconWidth, iconLeft);
20120
20295
  var leftPx = getPxOffset(left.fixed - fixedOffsetX, fixedContentWidth, left.stretch, stretchWidth);
20121
- var topEm = getEmOffset(top.stretch - stretchOffsetY, stretchContentHeight, iconHeight, shapedIcon.top);
20296
+ var topEm = getEmOffset(top.stretch - stretchOffsetY, stretchContentHeight, iconHeight, iconTop);
20122
20297
  var topPx = getPxOffset(top.fixed - fixedOffsetY, fixedContentHeight, top.stretch, stretchHeight);
20123
- var rightEm = getEmOffset(right.stretch - stretchOffsetX, stretchContentWidth, iconWidth, shapedIcon.left);
20298
+ var rightEm = getEmOffset(right.stretch - stretchOffsetX, stretchContentWidth, iconWidth, iconLeft);
20124
20299
  var rightPx = getPxOffset(right.fixed - fixedOffsetX, fixedContentWidth, right.stretch, stretchWidth);
20125
- var bottomEm = getEmOffset(bottom.stretch - stretchOffsetY, stretchContentHeight, iconHeight, shapedIcon.top);
20300
+ var bottomEm = getEmOffset(bottom.stretch - stretchOffsetY, stretchContentHeight, iconHeight, iconTop);
20126
20301
  var bottomPx = getPxOffset(bottom.fixed - fixedOffsetY, fixedContentHeight, bottom.stretch, stretchHeight);
20127
20302
  var tl = new pointGeometry(leftEm, topEm);
20128
20303
  var tr = new pointGeometry(rightEm, topEm);
@@ -20368,33 +20543,39 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20368
20543
  this.circleDiameter = height;
20369
20544
  }
20370
20545
  } else {
20371
- var y1 = shaped.top * boxScale - padding;
20372
- var y2 = shaped.bottom * boxScale + padding;
20373
- var x1 = shaped.left * boxScale - padding;
20374
- var x2 = shaped.right * boxScale + padding;
20546
+ var icon = shaped.image && shaped.image.contentMatch && shaped.image.content ? applyContentMatch(shaped) : {
20547
+ x1: shaped.left,
20548
+ y1: shaped.top,
20549
+ x2: shaped.right,
20550
+ y2: shaped.bottom
20551
+ };
20552
+ icon.y1 = icon.y1 * boxScale - padding[0];
20553
+ icon.x2 = icon.x2 * boxScale + padding[1];
20554
+ icon.y2 = icon.y2 * boxScale + padding[2];
20555
+ icon.x1 = icon.x1 * boxScale - padding[3];
20375
20556
  var collisionPadding$1 = shaped.collisionPadding;
20376
20557
  if (collisionPadding$1) {
20377
- x1 -= collisionPadding$1[0] * boxScale;
20378
- y1 -= collisionPadding$1[1] * boxScale;
20379
- x2 += collisionPadding$1[2] * boxScale;
20380
- y2 += collisionPadding$1[3] * boxScale;
20558
+ icon.x1 -= collisionPadding$1[0] * boxScale;
20559
+ icon.y1 -= collisionPadding$1[1] * boxScale;
20560
+ icon.x2 += collisionPadding$1[2] * boxScale;
20561
+ icon.y2 += collisionPadding$1[3] * boxScale;
20381
20562
  }
20382
20563
  if (rotate) {
20383
- var tl = new pointGeometry(x1, y1);
20384
- var tr = new pointGeometry(x2, y1);
20385
- var bl = new pointGeometry(x1, y2);
20386
- var br = new pointGeometry(x2, y2);
20564
+ var tl = new pointGeometry(icon.x1, icon.y1);
20565
+ var tr = new pointGeometry(icon.x2, icon.y1);
20566
+ var bl = new pointGeometry(icon.x1, icon.y2);
20567
+ var br = new pointGeometry(icon.x2, icon.y2);
20387
20568
  var rotateRadians = rotate * Math.PI / 180;
20388
20569
  tl._rotate(rotateRadians);
20389
20570
  tr._rotate(rotateRadians);
20390
20571
  bl._rotate(rotateRadians);
20391
20572
  br._rotate(rotateRadians);
20392
- x1 = Math.min(tl.x, tr.x, bl.x, br.x);
20393
- x2 = Math.max(tl.x, tr.x, bl.x, br.x);
20394
- y1 = Math.min(tl.y, tr.y, bl.y, br.y);
20395
- y2 = Math.max(tl.y, tr.y, bl.y, br.y);
20573
+ icon.x1 = Math.min(tl.x, tr.x, bl.x, br.x);
20574
+ icon.x2 = Math.max(tl.x, tr.x, bl.x, br.x);
20575
+ icon.y1 = Math.min(tl.y, tr.y, bl.y, br.y);
20576
+ icon.y2 = Math.max(tl.y, tr.y, bl.y, br.y);
20396
20577
  }
20397
- collisionBoxArray.emplaceBack(anchor.x, anchor.y, x1, y1, x2, y2, featureIndex, sourceLayerIndex, bucketIndex);
20578
+ collisionBoxArray.emplaceBack(anchor.x, anchor.y, icon.x1, icon.y1, icon.x2, icon.y2, featureIndex, sourceLayerIndex, bucketIndex);
20398
20579
  }
20399
20580
  this.boxEndIndex = collisionBoxArray.length;
20400
20581
  };
@@ -20822,7 +21003,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20822
21003
  var layout = bucket.layers[0].layout;
20823
21004
  var iconOffset = layout.get('icon-offset').evaluate(feature, {}, canonical);
20824
21005
  var defaultHorizontalShaping = getDefaultHorizontalShaping(shapedTextOrientations.horizontal);
20825
- var glyphSize = 24, fontScale = layoutTextSize / glyphSize, textBoxScale = bucket.tilePixelRatio * fontScale, textMaxBoxScale = bucket.tilePixelRatio * textMaxSize / glyphSize, iconBoxScale = bucket.tilePixelRatio * layoutIconSize, symbolMinDistance = bucket.tilePixelRatio * layout.get('symbol-spacing'), textPadding = layout.get('text-padding') * bucket.tilePixelRatio, iconPadding = layout.get('icon-padding') * bucket.tilePixelRatio, textMaxAngle = layout.get('text-max-angle') / 180 * Math.PI, textAlongLine = layout.get('text-rotation-alignment') === 'map' && layout.get('symbol-placement') !== 'point', iconAlongLine = layout.get('icon-rotation-alignment') === 'map' && layout.get('symbol-placement') !== 'point', symbolPlacement = layout.get('symbol-placement'), textRepeatDistance = symbolMinDistance / 2;
21006
+ var glyphSize = 24, fontScale = layoutTextSize / glyphSize, textBoxScale = bucket.tilePixelRatio * fontScale, textMaxBoxScale = bucket.tilePixelRatio * textMaxSize / glyphSize, iconBoxScale = bucket.tilePixelRatio * layoutIconSize, symbolMinDistance = bucket.tilePixelRatio * layout.get('symbol-spacing'), textPadding = layout.get('text-padding') * bucket.tilePixelRatio, iconPadding = getIconPadding(layout, feature, canonical, bucket.tilePixelRatio), textMaxAngle = layout.get('text-max-angle') / 180 * Math.PI, textAlongLine = layout.get('text-rotation-alignment') === 'map' && layout.get('symbol-placement') !== 'point', iconAlongLine = layout.get('icon-rotation-alignment') === 'map' && layout.get('symbol-placement') !== 'point', symbolPlacement = layout.get('symbol-placement'), textRepeatDistance = symbolMinDistance / 2;
20826
21007
  var iconTextFit = layout.get('icon-text-fit');
20827
21008
  var verticallyShapedIcon;
20828
21009
  if (shapedIcon && iconTextFit !== 'none') {
@@ -20837,7 +21018,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20837
21018
  if (anchor.x < 0 || anchor.x >= EXTENT$1 || anchor.y < 0 || anchor.y >= EXTENT$1) {
20838
21019
  return;
20839
21020
  }
20840
- addSymbol(bucket, anchor, line, shapedTextOrientations, shapedIcon, imageMap, verticallyShapedIcon, bucket.layers[0], bucket.collisionBoxArray, feature.index, feature.sourceLayerIndex, bucket.index, textBoxScale, textPadding, textAlongLine, textOffset, iconBoxScale, iconPadding, iconAlongLine, iconOffset, feature, sizes, isSDFIcon, canonical, layoutTextSize);
21021
+ addSymbol(bucket, anchor, line, shapedTextOrientations, shapedIcon, imageMap, verticallyShapedIcon, bucket.layers[0], bucket.collisionBoxArray, feature.index, feature.sourceLayerIndex, bucket.index, textBoxScale, [
21022
+ textPadding,
21023
+ textPadding,
21024
+ textPadding,
21025
+ textPadding
21026
+ ], textAlongLine, textOffset, iconBoxScale, iconPadding, iconAlongLine, iconOffset, feature, sizes, isSDFIcon, canonical, layoutTextSize);
20841
21027
  };
20842
21028
  if (symbolPlacement === 'line') {
20843
21029
  for (var i$1 = 0, list$1 = clipLine(feature.geometry, 0, 0, EXTENT$1, EXTENT$1); i$1 < list$1.length; i$1 += 1) {
@@ -21638,7 +21824,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21638
21824
  'icon-text-fit-padding': new DataConstantProperty(spec['layout_symbol']['icon-text-fit-padding']),
21639
21825
  'icon-image': new DataDrivenProperty(spec['layout_symbol']['icon-image']),
21640
21826
  'icon-rotate': new DataDrivenProperty(spec['layout_symbol']['icon-rotate']),
21641
- 'icon-padding': new DataConstantProperty(spec['layout_symbol']['icon-padding']),
21827
+ 'icon-padding': new DataDrivenProperty(spec['layout_symbol']['icon-padding']),
21642
21828
  'icon-keep-upright': new DataConstantProperty(spec['layout_symbol']['icon-keep-upright']),
21643
21829
  'icon-offset': new DataDrivenProperty(spec['layout_symbol']['icon-offset']),
21644
21830
  'icon-anchor': new DataDrivenProperty(spec['layout_symbol']['icon-anchor']),
@@ -21851,6 +22037,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21851
22037
  };
21852
22038
  return SymbolStyleLayer;
21853
22039
  }(StyleLayer);
22040
+ function getIconPadding(layout, feature, canonical, pixelRatio) {
22041
+ if (pixelRatio === void 0)
22042
+ pixelRatio = 1;
22043
+ var result = layout.get('icon-padding').evaluate(feature, {}, canonical);
22044
+ var values = result && result.values;
22045
+ return [
22046
+ values[0] * pixelRatio,
22047
+ values[1] * pixelRatio,
22048
+ values[2] * pixelRatio,
22049
+ values[3] * pixelRatio
22050
+ ];
22051
+ }
21854
22052
 
21855
22053
  var paint$8 = new Properties({
21856
22054
  'background-color': new DataConstantProperty(spec['paint_background']['background-color']),
@@ -23970,6 +24168,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
23970
24168
  }
23971
24169
  workerTile.vectorTile = response.vectorTile;
23972
24170
  workerTile.parse(response.vectorTile, this$1.layerIndex, this$1.availableImages, this$1.actor, function (err, result) {
24171
+ var reloadCallback = workerTile.reloadCallback;
24172
+ if (workerTile.reloadCallback) {
24173
+ delete workerTile.reloadCallback;
24174
+ workerTile.parse(workerTile.vectorTile, this$1.layerIndex, this$1.availableImages, this$1.actor, reloadCallback);
24175
+ }
23973
24176
  if (err || !result) {
23974
24177
  return callback(err);
23975
24178
  }
@@ -24758,7 +24961,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
24758
24961
  }
24759
24962
  };
24760
24963
  Supercluster.prototype._limitZoom = function _limitZoom(z) {
24761
- return Math.max(this.options.minZoom, Math.min(+z, this.options.maxZoom + 1));
24964
+ return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1));
24762
24965
  };
24763
24966
  Supercluster.prototype._cluster = function _cluster(points, zoom) {
24764
24967
  var clusters = [];
@@ -24785,7 +24988,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
24785
24988
  numPoints += b.numPoints || 1;
24786
24989
  }
24787
24990
  }
24788
- if (numPoints >= minPoints) {
24991
+ if (numPoints > numPointsOrigin && numPoints >= minPoints) {
24789
24992
  var wx = p.x * numPointsOrigin;
24790
24993
  var wy = p.y * numPointsOrigin;
24791
24994
  var clusterProperties = reduce && numPointsOrigin > 1 ? this._map(p, true) : null;
@@ -26321,6 +26524,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
26321
26524
  var stretchX = ref.stretchX;
26322
26525
  var stretchY = ref.stretchY;
26323
26526
  var content = ref.content;
26527
+ var contentMatch = ref.contentMatch;
26324
26528
  var data = new performance.RGBAImage({
26325
26529
  width: width,
26326
26530
  height: height
@@ -26341,7 +26545,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
26341
26545
  sdf: sdf,
26342
26546
  stretchX: stretchX,
26343
26547
  stretchY: stretchY,
26344
- content: content
26548
+ content: content,
26549
+ contentMatch: contentMatch
26345
26550
  };
26346
26551
  }
26347
26552
  callback(null, result);
@@ -26529,6 +26734,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
26529
26734
  stretchX: image.stretchX,
26530
26735
  stretchY: image.stretchY,
26531
26736
  content: image.content,
26737
+ contentMatch: image.contentMatch,
26532
26738
  hasRenderCallback: Boolean(image.userImage && image.userImage.render)
26533
26739
  };
26534
26740
  } else {
@@ -41116,6 +41322,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
41116
41322
  var stretchX = ref.stretchX;
41117
41323
  var stretchY = ref.stretchY;
41118
41324
  var content = ref.content;
41325
+ var contentMatch = ref.contentMatch;
41119
41326
  this._lazyInitEmptyStyle();
41120
41327
  var version = 0;
41121
41328
  if (image instanceof HTMLImageElement || ImageBitmap && image instanceof ImageBitmap) {
@@ -41132,6 +41339,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
41132
41339
  stretchX: stretchX,
41133
41340
  stretchY: stretchY,
41134
41341
  content: content,
41342
+ contentMatch: contentMatch,
41135
41343
  sdf: sdf,
41136
41344
  version: version
41137
41345
  });
@@ -41151,6 +41359,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
41151
41359
  stretchX: stretchX,
41152
41360
  stretchY: stretchY,
41153
41361
  content: content,
41362
+ contentMatch: contentMatch,
41154
41363
  sdf: sdf,
41155
41364
  version: version,
41156
41365
  userImage: userImage
@@ -43410,7 +43619,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43410
43619
  return Url;
43411
43620
  }());
43412
43621
 
43413
- var version = "2.2.2";
43622
+ var version = "2.2.4";
43414
43623
 
43415
43624
  /**
43416
43625
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -43451,27 +43660,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43451
43660
  var tooltipContent = document.createElement("span");
43452
43661
  tooltipContent.innerText = name;
43453
43662
  tooltipContent.classList.add('tooltiptext');
43454
- // mimics default edge tooltip theming
43455
- if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
43456
- tooltipContent.classList.add('dark');
43457
- }
43458
- var themeQuery = window.matchMedia('(prefers-color-scheme: dark)');
43459
- var onThemeChange = function (e) {
43460
- var isDark = e.matches;
43461
- if (isDark && !tooltipContent.classList.contains('dark')) {
43462
- tooltipContent.classList.add('dark');
43463
- }
43464
- else if (!isDark && tooltipContent.classList.contains('dark')) {
43465
- tooltipContent.classList.remove('dark');
43466
- }
43467
- };
43468
- // compensate for browsers where MediaQueryList is not derived from EventTarget (pre iOS13 Safari)
43469
- if (typeof themeQuery.addEventListener === 'function') {
43470
- themeQuery.addEventListener('change', function (e) { return onThemeChange(e); });
43471
- }
43472
- else if (typeof themeQuery.addListener === 'function') {
43473
- themeQuery.addListener(function (e) { return onThemeChange(e); });
43474
- }
43475
43663
  if (navigator.userAgent.indexOf('Edg') != -1) {
43476
43664
  tooltipContent.classList.add('edge');
43477
43665
  }
@@ -47641,6 +47829,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47641
47829
  }
47642
47830
  });
47643
47831
  container.addEventListener("focusout", function (event) {
47832
+ if (event.target === currStyleButton) {
47833
+ // on focusout from reveal button -> reset the tabIndex on the styleOpsGrid elements that could have been set to -1 on esc key press
47834
+ Array.from(styleOpsGrid.children).forEach(function (e) { return e.removeAttribute('tabIndex'); });
47835
+ }
47644
47836
  if (!(event.relatedTarget instanceof Node && container.contains(event.relatedTarget))) {
47645
47837
  _this.hasFocus = false;
47646
47838
  if (!_this.hasMouse) {
@@ -47655,6 +47847,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47655
47847
  if (event.keyCode === 27) {
47656
47848
  event.stopPropagation();
47657
47849
  currStyleButton.focus();
47850
+ Array.from(styleOpsGrid.children).forEach(function (e) { return e.setAttribute('tabIndex', "-1"); });
47658
47851
  if (container.classList.contains(StyleControl.Css.inUse)) {
47659
47852
  container.classList.remove(StyleControl.Css.inUse);
47660
47853
  styleOpsGrid.classList.add("hidden-accessible-element");
@@ -57799,6 +57992,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
57799
57992
  defaultRegion: {
57800
57993
  code: "NGT",
57801
57994
  strings: "en/resource.json"
57995
+ },
57996
+ latn: {
57997
+ code: "NGT-Latn",
57998
+ strings: "en/resource.json"
57802
57999
  }
57803
58000
  },
57804
58001
  ar: {
@@ -57845,6 +58042,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
57845
58042
  us: {
57846
58043
  code: "en-US",
57847
58044
  strings: "en/resource.json"
58045
+ },
58046
+ au: {
58047
+ code: "en-AU",
58048
+ strings: "en/resource.json"
58049
+ },
58050
+ gb: {
58051
+ code: "en-GB",
58052
+ strings: "en/resource.json"
58053
+ },
58054
+ nz: {
58055
+ code: "en-NZ",
58056
+ strings: "en/resource.json"
57848
58057
  }
57849
58058
  },
57850
58059
  es: {
@@ -57970,14 +58179,31 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
57970
58179
  }
57971
58180
  },
57972
58181
  zh: {
58182
+ // per https://microsoft.sharepoint.com/sites/globalreadiness/SitePages/Language-fallback.aspx
58183
+ // Chinese - Neutral (zh) fallbacks to en-US
57973
58184
  defaultRegion: {
57974
- code: "zh-Hant",
57975
- strings: "zh-tw/resource.json"
58185
+ code: "zh",
58186
+ strings: "en/resource.json"
58187
+ }
58188
+ },
58189
+ "zh-hans": {
58190
+ defaultRegion: {
58191
+ code: "zh-Hans",
58192
+ strings: "zh-cn/resource.json"
58193
+ },
58194
+ cn: {
58195
+ code: "zh-Hans-CN",
58196
+ strings: "zh-cn/resource.json"
57976
58197
  }
57977
58198
  },
57978
58199
  "zh-hant": {
58200
+ // per discussion with global readiness team, we were explicitly asked to not fallback zh-hant to zh-tw
57979
58201
  defaultRegion: {
57980
58202
  code: "zh-Hant",
58203
+ strings: "en/resource.json"
58204
+ },
58205
+ tw: {
58206
+ code: "zh-Hant-TW",
57981
58207
  strings: "zh-tw/resource.json"
57982
58208
  }
57983
58209
  }
@@ -58606,7 +58832,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
58606
58832
  /**
58607
58833
  * Specifies which set of geopolitically disputed borders and labels are displayed on the map. The View parameter (also referred to as “user region parameter”) is a 2-letter ISO-3166 Country Code that will show the correct maps for that country/region. Country/Regions that are not on the View list or if unspecified will default to the “Unified” View.
58608
58834
  * Please see the supported [Views]{@link https://aka.ms/AzureMapsLocalizationViews }.
58609
- * It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country where maps, images and other data and third party content that You are authorized to access via Azure Maps is made available.
58835
+ * It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country/region where maps, images and other data and third party content that You are authorized to access via Azure Maps is made available.
58610
58836
  * @param view The new default view
58611
58837
  */
58612
58838
  function setView(view) {
@@ -59203,11 +59429,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59203
59429
  // Translations for oceans: https://en.wikipedia.org/wiki/List_of_alternative_names_for_oceans
59204
59430
  this._preloadedCache.add(lang);
59205
59431
  var oceanConfig = {
59206
- source: ["Ocean label", "Ocean name"],
59432
+ source: [],
59207
59433
  labelType: "water",
59208
59434
  minZoom: 0,
59209
59435
  radius: 3950000,
59210
- polygonSources: ["Ocean", "Ocean or sea"]
59436
+ polygonSources: [] // doesn't affect the cache key
59211
59437
  };
59212
59438
  var shortLang = lang;
59213
59439
  var index = shortLang.indexOf("-");
@@ -59303,6 +59529,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59303
59529
  }
59304
59530
  return ar;
59305
59531
  };
59532
+ var __spreadArray$2 = (window && window.__spreadArray) || function (to, from) {
59533
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
59534
+ to[j] = from[i];
59535
+ return to;
59536
+ };
59306
59537
  /**
59307
59538
  * This class analyizes the current view of a map and provides a description for use by accessibilty tools.
59308
59539
  * TODO: Use services when in GeoPol regions. (Kasmir) or when user region sensitive.
@@ -59339,8 +59570,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59339
59570
  this._minRoadDistance = 25;
59340
59571
  // Minium distance in pixels a second road must be in order to be considered an intersection.
59341
59572
  this._minIntersectionPixelDistance = 50;
59342
- // The vector tile source id for Azure Maps.
59343
- this._baseVectorTileSourceId = "microsoft.base";
59344
59573
  /*
59345
59574
  * Show details based on zoom level.
59346
59575
  *
@@ -59363,7 +59592,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59363
59592
  * Vector Tile source layers: https://developer.tomtom.com/maps-api/maps-api-documentation-vector/tile
59364
59593
  */
59365
59594
  // Configuration for label extraction.
59366
- this._lableConfig = [
59595
+ this._labelConfig = [
59367
59596
  // Water labels
59368
59597
  {
59369
59598
  source: ["Ocean label", "Ocean name"],
@@ -59497,10 +59726,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59497
59726
  polygonSources: ["Reservation"]
59498
59727
  }
59499
59728
  ];
59500
- // Name of all polygon layers in which we want to do an intersection test with.
59501
- this._polygonStyleLayer = ["National or state park", "National park", "Reservation", "Airport",
59502
- "Runway", "Stadium", "University", "Zoo", "Shopping", "Hospital", "Amusement park", "Ocean", "Sea",
59503
- "Ocean or sea"];
59504
59729
  // Name of all label types to cache.
59505
59730
  this._labelCache = new Set(["city", "state", "country", "water", "majorPoi"]);
59506
59731
  // Name of all road source layers.
@@ -59762,6 +59987,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59762
59987
  this._map.events.addOnce("idle", function () {
59763
59988
  if (!_this._disposed) {
59764
59989
  _this._updateCam(true);
59990
+ // Find the id of the vector tile source being used.
59991
+ _this._baseVectorTileSourceId = MapViewDescriptor._baseVectorTileSourceIds.find(function (id) { return _this._map.sources.getById(id); });
59992
+ // Set the label config based on the vector tile source.
59993
+ if (_this._baseVectorTileSourceId === "bing-mvt") {
59994
+ _this._labelConfig = MapViewDescriptor._labelConfigBing;
59995
+ _this._roadLayers = MapViewDescriptor._roadLayersBing;
59996
+ }
59997
+ // Derive polygon layers from the label config.
59998
+ _this._polygonStyleLayer = _this._labelConfig.reduce(function (acc, cur) {
59999
+ if (cur.polygonSources) {
60000
+ acc.push.apply(acc, __spreadArray$2([], __read$6(cur.polygonSources)));
60001
+ }
60002
+ return acc;
60003
+ }, []);
59765
60004
  // Add event listeners directly to mapbox because we will be using custom event data.
59766
60005
  // We don't automatically forward all properties of a mapbox event, so the custom data would be lost.
59767
60006
  var baseMap = _this._map._getMap();
@@ -59859,8 +60098,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59859
60098
  info_1 = {};
59860
60099
  cPx_1 = this._map.positionsToPixels([cam.center])[0];
59861
60100
  ErrorHandler.tryCatch(this._map, function () {
59862
- intersects_1 = _this._map._getMap().queryRenderedFeatures(cPx_1, {
59863
- layers: _this._polygonStyleLayer,
60101
+ var map = _this._map._getMap();
60102
+ intersects_1 = map.queryRenderedFeatures(cPx_1, {
60103
+ layers: _this._polygonStyleLayer.filter(function (layerId) { return map.getLayer(layerId); }),
59864
60104
  filter: ["==", ["geometry-type"], "Polygon"]
59865
60105
  });
59866
60106
  }, function () { });
@@ -59870,8 +60110,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59870
60110
  }
59871
60111
  intersectingType_1 = null;
59872
60112
  // Loop through each label config and try and retireve details about the map view.
59873
- for (i = 0, cnt = this._lableConfig.length; i < cnt; i++) {
59874
- layerInfo = this._lableConfig[i];
60113
+ for (i = 0, cnt = this._labelConfig.length; i < cnt; i++) {
60114
+ layerInfo = this._labelConfig[i];
59875
60115
  if (cam.zoom >= layerInfo.minZoom) {
59876
60116
  // If the layer info has polygons defined, do an intersection test for matching.
59877
60117
  if (layerInfo.polygonSources) {
@@ -59971,7 +60211,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59971
60211
  // Loop through the label sources.
59972
60212
  for (var i = 0, len = layerInfo.source.length; i < len; i++) {
59973
60213
  var params = {
59974
- sourceLayer: layerInfo.source[i]
60214
+ sourceLayer: layerInfo.source[i],
60215
+ filter: ["has", "name"]
59975
60216
  };
59976
60217
  var labels = this._map._getMap().querySourceFeatures(this._baseVectorTileSourceId, params);
59977
60218
  var closest = null;
@@ -60048,21 +60289,22 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60048
60289
  }
60049
60290
  if (closestRoad) {
60050
60291
  // Capture state and country codes from the closest road to ensure we have the most accurate values.
60051
- if (!info.country) {
60292
+ // Note: bing tiles do not have country_code and country_subdivision in road features.
60293
+ if (!info.country && closestRoad.properties.country_code) {
60052
60294
  info.country = closestRoad.properties.country_code;
60053
60295
  info.countryDis = 0;
60054
60296
  MapViewDescriptor._labelCache.cache(info.country, {
60055
- source: ["Country name"],
60297
+ source: [],
60056
60298
  labelType: "country",
60057
60299
  radius: 5000,
60058
60300
  minZoom: 0
60059
60301
  }, cPoint.geometry.coordinates, lang);
60060
60302
  }
60061
- if (!info.state) {
60303
+ if (!info.state && closestRoad.properties.country_subdivision) {
60062
60304
  info.state = closestRoad.properties.country_subdivision;
60063
60305
  info.stateDis = 0;
60064
60306
  MapViewDescriptor._labelCache.cache(info.state, {
60065
- source: ["State name"],
60307
+ source: [],
60066
60308
  labelType: "state",
60067
60309
  radius: 5000,
60068
60310
  minZoom: 4
@@ -60317,7 +60559,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60317
60559
  if (a.country) {
60318
60560
  info.country = a.country;
60319
60561
  MapViewDescriptor._labelCache.cache(info.country, {
60320
- source: ["Country name"],
60562
+ source: [],
60321
60563
  labelType: "country",
60322
60564
  radius: 5000,
60323
60565
  minZoom: 0
@@ -60326,7 +60568,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60326
60568
  if (a.countrySubdivision) {
60327
60569
  info.state = a.countrySubdivision;
60328
60570
  MapViewDescriptor._labelCache.cache(info.state, {
60329
- source: ["State name"],
60571
+ source: [],
60330
60572
  labelType: "state",
60331
60573
  radius: 5000,
60332
60574
  minZoom: 4
@@ -60335,7 +60577,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60335
60577
  if (a.municipality) {
60336
60578
  info.city = a.municipality;
60337
60579
  MapViewDescriptor._labelCache.cache(info.state, {
60338
- source: ["Small city"],
60580
+ source: [],
60339
60581
  labelType: "city",
60340
60582
  radius: 1000,
60341
60583
  minZoom: 10
@@ -60368,6 +60610,118 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60368
60610
  if (increment === void 0) { increment = 1; }
60369
60611
  return Math.round(val / increment) * increment;
60370
60612
  };
60613
+ // Ids of vector tile sources for different style APIs.
60614
+ MapViewDescriptor._baseVectorTileSourceIds = ["microsoft.base", "vectorTiles", "bing-mvt"];
60615
+ // Configuration for label extraction of Bing tiles.
60616
+ MapViewDescriptor._labelConfigBing = [
60617
+ // Water labels
60618
+ {
60619
+ source: ["water_feature"],
60620
+ labelType: "water",
60621
+ minZoom: 0,
60622
+ radius: 3950000,
60623
+ polygonSources: ["generic_water_fill"]
60624
+ },
60625
+ {
60626
+ source: ["water_feature"],
60627
+ labelType: "water",
60628
+ minZoom: 3,
60629
+ radius: 1000000,
60630
+ polygonSources: ["generic_water_fill"]
60631
+ },
60632
+ // Country labels
60633
+ {
60634
+ source: ["country_region"],
60635
+ labelType: "country",
60636
+ minZoom: 0,
60637
+ maxZoom: 5,
60638
+ radius: 300000
60639
+ },
60640
+ // State labels
60641
+ {
60642
+ source: ["admin_division1"],
60643
+ labelType: "state",
60644
+ minZoom: 4,
60645
+ maxZoom: 7,
60646
+ radius: 300000
60647
+ },
60648
+ // City labels
60649
+ {
60650
+ source: ["populated_place"],
60651
+ labelType: "city",
60652
+ minZoom: 8,
60653
+ radius: 40000
60654
+ },
60655
+ // Neighbourhood labels
60656
+ {
60657
+ source: ["neighborhood"],
60658
+ labelType: "neighbourhood",
60659
+ minZoom: 12,
60660
+ radius: 6000
60661
+ },
60662
+ // POI labels
60663
+ {
60664
+ source: ["amusement_park"],
60665
+ labelType: "poi",
60666
+ minZoom: 14,
60667
+ radius: 2000,
60668
+ polygonSources: ["amusement_park_fill"]
60669
+ },
60670
+ {
60671
+ source: ["hospital"],
60672
+ labelType: "poi",
60673
+ minZoom: 14,
60674
+ radius: 1000,
60675
+ polygonSources: ["hospital_fill"]
60676
+ },
60677
+ {
60678
+ source: ["shopping_center"],
60679
+ labelType: "poi",
60680
+ minZoom: 14,
60681
+ radius: 1000,
60682
+ polygonSources: ["shopping_center_fill"]
60683
+ },
60684
+ {
60685
+ source: ["stadium"],
60686
+ labelType: "poi",
60687
+ minZoom: 14,
60688
+ radius: 1000,
60689
+ polygonSources: ["stadium_fill"]
60690
+ },
60691
+ {
60692
+ source: ["higher_education_facility", "school"],
60693
+ labelType: "poi",
60694
+ minZoom: 14,
60695
+ radius: 1000,
60696
+ polygonSources: ["higher_education_facility_fill", "school_fill"]
60697
+ },
60698
+ {
60699
+ source: ["zoo"],
60700
+ labelType: "poi",
60701
+ minZoom: 14,
60702
+ radius: 1000,
60703
+ polygonSources: ["zoo_fill"]
60704
+ },
60705
+ // Major Poi labels
60706
+ {
60707
+ source: ["airport", "airport_terminal"],
60708
+ labelType: "majorPoi",
60709
+ minZoom: 11,
60710
+ radius: 3000,
60711
+ polygonSources: ["airport_terminal_fill", "airport_fill-merged7", "airport_runway_fill"]
60712
+ },
60713
+ {
60714
+ source: ["reserve"],
60715
+ labelType: "majorPoi",
60716
+ minZoom: 7,
60717
+ radius: 15000,
60718
+ polygonSources: ["generic_reserve_fill", "land_cover_forest_fill"]
60719
+ }
60720
+ ];
60721
+ // Name of all road source layers of Bing tiles.
60722
+ MapViewDescriptor._roadLayersBing = new Set([
60723
+ "road"
60724
+ ]);
60371
60725
  return MapViewDescriptor;
60372
60726
  }());
60373
60727
 
@@ -64125,7 +64479,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64125
64479
  }
64126
64480
  return ar;
64127
64481
  };
64128
- var __spreadArray$2 = (window && window.__spreadArray) || function (to, from) {
64482
+ var __spreadArray$3 = (window && window.__spreadArray) || function (to, from) {
64129
64483
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
64130
64484
  to[j] = from[i];
64131
64485
  return to;
@@ -64143,7 +64497,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64143
64497
  'data-azure-maps-attribution-order',
64144
64498
  'data-azure-maps-attribution-dynamic'
64145
64499
  ];
64146
- var allowedAttributionAttributes = __spreadArray$2([
64500
+ var allowedAttributionAttributes = __spreadArray$3([
64147
64501
  'href'
64148
64502
  ], __read$7(attributionRuleAttributes));
64149
64503
  var AttributionRuleProxy = /** @class */ (function () {
@@ -64368,7 +64722,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64368
64722
  };
64369
64723
  AttributionRuleProxy.prototype.applyAttributionResponse = function (attributions) {
64370
64724
  var _this = this;
64371
- var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$2(__spreadArray$2([], __read$7(flat)), __read$7(copyrights)); }, []);
64725
+ var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$3(__spreadArray$3([], __read$7(flat)), __read$7(copyrights)); }, []);
64372
64726
  if (copyrights.length == 0) {
64373
64727
  // no attribution for a provided tileset/bbox/z
64374
64728
  return;
@@ -64433,7 +64787,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64433
64787
  }
64434
64788
  return ar;
64435
64789
  };
64436
- var __spreadArray$3 = (window && window.__spreadArray) || function (to, from) {
64790
+ var __spreadArray$4 = (window && window.__spreadArray) || function (to, from) {
64437
64791
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
64438
64792
  to[j] = from[i];
64439
64793
  return to;
@@ -64554,10 +64908,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64554
64908
  }, function () { return document.createElement('span'); });
64555
64909
  });
64556
64910
  var registeredRuleSet = new Set(Object.values(registeredRules));
64557
- var redundantRules = new Set(__spreadArray$3([], __read$8(allRules)).filter(function (rule) { return !registeredRuleSet.has(rule); }));
64558
- var redundantElements = new Set(__spreadArray$3([], __read$8(redundantRules)).map(function (rule) { return rule.getElement(); }));
64911
+ var redundantRules = new Set(__spreadArray$4([], __read$8(allRules)).filter(function (rule) { return !registeredRuleSet.has(rule); }));
64912
+ var redundantElements = new Set(__spreadArray$4([], __read$8(redundantRules)).map(function (rule) { return rule.getElement(); }));
64559
64913
  // eject redundant rules associated elements altogether
64560
- __spreadArray$3([], __read$8(redundantElements)).filter(function (elem) { return elem.parentElement !== null; })
64914
+ __spreadArray$4([], __read$8(redundantElements)).filter(function (elem) { return elem.parentElement !== null; })
64561
64915
  .forEach(function (elem) { return elem.parentElement.removeChild(elem); });
64562
64916
  _this.rules = Object.values(registeredRules);
64563
64917
  var attributionsToApply = attributions
@@ -64593,7 +64947,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64593
64947
  var visibleTextNodes = function (elem) {
64594
64948
  return Array.from(elem.style.display != 'none' ? elem.children : [])
64595
64949
  .map(function (elem) { return visibleTextNodes(elem); })
64596
- .reduce(function (flattened, nodes) { return __spreadArray$3(__spreadArray$3([], __read$8(flattened)), __read$8(nodes)); }, Array.from(elem.style.display != 'none' ? elem.childNodes : []).filter(function (node) { return node.nodeType == node.TEXT_NODE; }));
64950
+ .reduce(function (flattened, nodes) { return __spreadArray$4(__spreadArray$4([], __read$8(flattened)), __read$8(nodes)); }, Array.from(elem.style.display != 'none' ? elem.childNodes : []).filter(function (node) { return node.nodeType == node.TEXT_NODE; }));
64597
64951
  };
64598
64952
  var newRenderContext = _this.virtualContext.cloneNode(true);
64599
64953
  var visibleNodes = visibleTextNodes(newRenderContext);
@@ -64608,7 +64962,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64608
64962
  // }
64609
64963
  // });
64610
64964
  // strip all predefined keywords
64611
- visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$3([], __read$8(attributionFilters)).reduce(function (target, filter) { return target.replace(filter, '').trim(); }, node.textContent); });
64965
+ visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$4([], __read$8(attributionFilters)).reduce(function (target, filter) { return target.replace(filter, '').trim(); }, node.textContent); });
64612
64966
  // strip year from each node
64613
64967
  // visibleNodes.forEach(node => node.textContent = node.textContent.replace(copyrightYearPattern, '').trim());
64614
64968
  // deduplicate attribution text
@@ -66834,6 +67188,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
66834
67188
  }
66835
67189
  return this.initPromise;
66836
67190
  };
67191
+ /**
67192
+ * Cleans up any resources used by the authentication manager.
67193
+ */
67194
+ AuthenticationManager.prototype.dispose = function () {
67195
+ if (this.tokenTimeOutHandle) {
67196
+ clearTimeout(this.tokenTimeOutHandle);
67197
+ this.tokenTimeOutHandle = null;
67198
+ }
67199
+ };
66837
67200
  /**
66838
67201
  * Gets the default auth context to be shared between maps without one specified to them.
66839
67202
  */
@@ -68318,7 +68681,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
68318
68681
  }
68319
68682
  return ar;
68320
68683
  };
68321
- var __spreadArray$4 = (window && window.__spreadArray) || function (to, from) {
68684
+ var __spreadArray$5 = (window && window.__spreadArray) || function (to, from) {
68322
68685
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
68323
68686
  to[j] = from[i];
68324
68687
  return to;
@@ -68754,7 +69117,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
68754
69117
  // If a specified layer hasn't been added to the map throw an error.
68755
69118
  var index = this_1.layerIndex.findIndex(function (l) { return l.getId() === layerId; });
68756
69119
  if (index > -1) {
68757
- layerIds.push.apply(layerIds, __spreadArray$4([], __read$a(this_1.layerIndex[index]._getLayerIds()
69120
+ layerIds.push.apply(layerIds, __spreadArray$5([], __read$a(this_1.layerIndex[index]._getLayerIds()
68758
69121
  .filter(function (id) { return !!_this.map._getMap().getLayer(id); }))));
68759
69122
  }
68760
69123
  else {
@@ -69513,7 +69876,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69513
69876
  }
69514
69877
  return ar;
69515
69878
  };
69516
- var __spreadArray$5 = (window && window.__spreadArray) || function (to, from) {
69879
+ var __spreadArray$6 = (window && window.__spreadArray) || function (to, from) {
69517
69880
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
69518
69881
  to[j] = from[i];
69519
69882
  return to;
@@ -69588,7 +69951,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69588
69951
  }
69589
69952
  finally { if (e_1) throw e_1.error; }
69590
69953
  }
69591
- return _super.prototype.merge.apply(this, __spreadArray$5([], __read$b(valuesList)));
69954
+ return _super.prototype.merge.apply(this, __spreadArray$6([], __read$b(valuesList)));
69592
69955
  };
69593
69956
  return CameraBoundsOptions;
69594
69957
  }(Options));
@@ -70077,7 +70440,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70077
70440
  }
70078
70441
  return ar;
70079
70442
  };
70080
- var __spreadArray$6 = (window && window.__spreadArray) || function (to, from) {
70443
+ var __spreadArray$7 = (window && window.__spreadArray) || function (to, from) {
70081
70444
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
70082
70445
  to[j] = from[i];
70083
70446
  return to;
@@ -70188,7 +70551,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70188
70551
  /**
70189
70552
  * Specifies which set of geopolitically disputed borders and labels are displayed on the map. The View parameter (also referred to as “user region parameter”) is a 2-letter ISO-3166 Country Code that will show the correct maps for that country/region. Country/Regions that are not on the View list or if unspecified will default to the “Unified” View.
70190
70553
  * Please see the supported [Views]{@link https://aka.ms/AzureMapsLocalizationViews}
70191
- * It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country where maps, images and other data and third party content that You are authorized to access via Azure Maps is made available.
70554
+ * It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country/region where maps, images and other data and third party content that You are authorized to access via Azure Maps is made available.
70192
70555
  * default: `undefined`
70193
70556
  * @default undefined
70194
70557
  */
@@ -70236,7 +70599,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70236
70599
  finally { if (e_1) throw e_1.error; }
70237
70600
  }
70238
70601
  // Then execute the standard merge behavior.
70239
- return _super.prototype.merge.apply(this, __spreadArray$6([], __read$c(valueList)));
70602
+ return _super.prototype.merge.apply(this, __spreadArray$7([], __read$c(valueList)));
70240
70603
  };
70241
70604
  return StyleOptions;
70242
70605
  }(Options));
@@ -70294,7 +70657,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70294
70657
  }
70295
70658
  return ar;
70296
70659
  };
70297
- var __spreadArray$7 = (window && window.__spreadArray) || function (to, from) {
70660
+ var __spreadArray$8 = (window && window.__spreadArray) || function (to, from) {
70298
70661
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
70299
70662
  to[j] = from[i];
70300
70663
  return to;
@@ -70529,10 +70892,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70529
70892
  // won't change default behavior in Options as usually that's what desired
70530
70893
  // instead capture it here and reassign.
70531
70894
  var currentTransforms = this._transformers;
70532
- var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$7(__spreadArray$7([], __read$d(flattened)), __read$d(value._transformers || [])); }, []) : [];
70895
+ var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$8(__spreadArray$8([], __read$d(flattened)), __read$d(value._transformers || [])); }, []) : [];
70533
70896
  // Then execute the standard merge behavior.
70534
70897
  // If subscription key auth method isn't being used then the subscription key property should be undefined.
70535
- var merged = _super.prototype.merge.apply(this, __spreadArray$7([], __read$d(valueList)));
70898
+ var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$d(valueList)));
70536
70899
  if (merged.authOptions.authType !== exports.AuthenticationType.subscriptionKey) {
70537
70900
  merged["subscription-key"] = merged.subscriptionKey = undefined;
70538
70901
  }
@@ -70544,7 +70907,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70544
70907
  if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
70545
70908
  merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
70546
70909
  }
70547
- this._transformers = __spreadArray$7(__spreadArray$7([], __read$d(currentTransforms || [])), __read$d(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
70910
+ this._transformers = __spreadArray$8(__spreadArray$8([], __read$d(currentTransforms || [])), __read$d(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
70548
70911
  if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
70549
70912
  this._transformers.push(this.transformRequest);
70550
70913
  }
@@ -70792,7 +71155,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70792
71155
  }
70793
71156
  return ar;
70794
71157
  };
70795
- var __spreadArray$8 = (window && window.__spreadArray) || function (to, from) {
71158
+ var __spreadArray$9 = (window && window.__spreadArray) || function (to, from) {
70796
71159
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
70797
71160
  to[j] = from[i];
70798
71161
  return to;
@@ -70819,6 +71182,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70819
71182
  * Preserve the map configuration that was used before the indoor map configuration was set
70820
71183
  */
70821
71184
  this.preservedPreindoorMapConfiguration = undefined;
71185
+ /**
71186
+ * The state of the progressive loading
71187
+ */
71188
+ this._progressiveLoadingState = {
71189
+ mapStyle: undefined,
71190
+ pendingVisibilityChange: undefined,
71191
+ };
70822
71192
  this._deferLayerGroupVisibilities = function (layerGroupLayers, initLayerGroups) {
70823
71193
  var validInitLayerGroups = initLayerGroups.filter(function (groupName) { return groupName in layerGroupLayers; });
70824
71194
  // If the initial layer groups are invalid, skip the progressive loading.
@@ -70826,11 +71196,19 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70826
71196
  return;
70827
71197
  var map = _this.map._getMap();
70828
71198
  var currentZoomLevel = map.getZoom();
70829
- // Select the layers to be deferred
71199
+ var currentMapStyle = _this.map.getStyle().style;
71200
+ // Cancel and release previous pending callback, if any.
71201
+ if (_this._progressiveLoadingState.pendingVisibilityChange) {
71202
+ _this.map.events.remove('load', _this._progressiveLoadingState.pendingVisibilityChange);
71203
+ _this._progressiveLoadingState.pendingVisibilityChange = null;
71204
+ }
71205
+ // Keep the current map style for future comparison.
71206
+ _this._progressiveLoadingState.mapStyle = currentMapStyle;
71207
+ // Select deferrable layers
70830
71208
  var deferredLayers = Object.entries(layerGroupLayers).reduce(function (deferred, _a) {
70831
71209
  var _b = __read$e(_a, 2), groupName = _b[0], layers = _b[1];
70832
71210
  var isInInitialLayerGroup = validInitLayerGroups.includes(groupName);
70833
- return __spreadArray$8(__spreadArray$8([], __read$e(deferred)), __read$e(layers.filter(function (layer) {
71211
+ return __spreadArray$9(__spreadArray$9([], __read$e(deferred)), __read$e(layers.filter(function (layer) {
70834
71212
  var _a;
70835
71213
  // Exclude custom layers
70836
71214
  if (layer.type === 'custom')
@@ -70853,22 +71231,34 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70853
71231
  return false;
70854
71232
  }
70855
71233
  }
70856
- // Defer visible layers only.
71234
+ // Select visible layers only.
70857
71235
  return ((_a = layer.layout) === null || _a === void 0 ? void 0 : _a.visibility) !== 'none';
70858
71236
  })));
70859
71237
  }, []);
70860
- // Hide the deferred layers at initial load, therefore we can save the render time.
71238
+ // Hide the deferrable layers at initial load, therefore we can save the render time.
70861
71239
  deferredLayers.forEach(function (layer) {
71240
+ // Since this happens before sending style object into the map rendering,
71241
+ // we only need to update the style object, but not necessary to update maplibre's layout properties.
70862
71242
  layer.layout = layer.layout || {};
70863
71243
  layer.layout.visibility = 'none';
70864
71244
  });
70865
- // Make the deferred layers visible once the map instance is fully loaded
70866
- _this.map.events.addOnce('load', function () {
71245
+ // Make the deferred layers visible once the map instance is fully loaded.
71246
+ _this._progressiveLoadingState.pendingVisibilityChange = function () {
71247
+ // Release the callback.
71248
+ _this._progressiveLoadingState.pendingVisibilityChange = null;
71249
+ // Bail out the callback once map style has changed.
71250
+ var nextMapStyle = _this.map.getStyle().style;
71251
+ if (currentMapStyle !== nextMapStyle)
71252
+ return;
71253
+ // Make deferred layers visible
70867
71254
  deferredLayers.forEach(function (layer) {
71255
+ // This happens after the map rendering; Therefore, we need to update
71256
+ // both the style object and the maplibre's layout properties.
70868
71257
  layer.layout.visibility = 'visible';
70869
71258
  map.setLayoutProperty(layer.id, 'visibility', 'visible');
70870
71259
  });
70871
- });
71260
+ };
71261
+ _this.map.events.addOnce('load', _this._progressiveLoadingState.pendingVisibilityChange);
70872
71262
  };
70873
71263
  this._onStyleData = function () {
70874
71264
  _this._lookUpAsync(_this.map.getStyle()).then(function (style) {
@@ -71010,7 +71400,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71010
71400
  domain: _this.serviceOptions.staticAssetsDomain,
71011
71401
  path: constants.stylePath + "/" + constants.styleResourcePath + "/" + style.name,
71012
71402
  queryParams: {
71013
- styleVersion: _this.serviceOptions.styleDefinitionsVersion,
71403
+ // Use the style version from the API response if it's available,
71404
+ // otherwise fallback to the version specified in the serviceOptions.
71405
+ // This is needed for flight testing the 2023-01-01 style version.
71406
+ styleVersion: definitions.version !== undefined && definitions.version !== null
71407
+ ? definitions.version
71408
+ : _this.serviceOptions.styleDefinitionsVersion
71014
71409
  // thus far we don't need to differentiate based on parameter here, as stylePatch will be called on cached styles as well
71015
71410
  //language: styleOptions.language
71016
71411
  },
@@ -71150,18 +71545,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71150
71545
  // should be modified before they are applied to the map.
71151
71546
  var styleOptions = this.map.getStyle();
71152
71547
  var trafficOptions = this.map.getTraffic();
71153
- // force a replacement of language placeholder in the tileset url to avoid resolution to a same cache with placeholders on language change
71154
- nextStyle.sources = Object.entries(nextStyle.sources).reduce(function (newSources, _a) {
71155
- var _b = __read$e(_a, 2), sourceKey = _b[0], source = _b[1];
71156
- var newSource = __assign$8({}, source);
71157
- if ('url' in newSource && typeof newSource.url === 'string') {
71158
- if (newSource.url.includes(constants.languagePlaceHolder)) {
71159
- newSource.url = newSource.url.replace(constants.languagePlaceHolder, styleOptions.language);
71160
- }
71161
- }
71162
- newSources[sourceKey] = newSource;
71163
- return newSources;
71164
- }, {});
71165
71548
  var shouldProgressiveLoading = (styleOptions.progressiveLoading &&
71166
71549
  // The feature only effective at the initial load.
71167
71550
  !this.map._isLoaded());
@@ -71313,27 +71696,30 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71313
71696
  * Fetches a json resource at the specified domain and path.
71314
71697
  */
71315
71698
  StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
71316
- var _a;
71699
+ var _a, _b;
71317
71700
  if (customQueryParams === void 0) { customQueryParams = {}; }
71318
71701
  return __awaiter$3(this, void 0, void 0, function () {
71319
71702
  var requestParams, fetchOptions;
71320
- var _b;
71321
- return __generator$3(this, function (_c) {
71322
- switch (_c.label) {
71703
+ var _c;
71704
+ return __generator$3(this, function (_d) {
71705
+ switch (_d.label) {
71323
71706
  case 0:
71324
71707
  requestParams = {
71325
71708
  url: new Url({
71326
71709
  protocol: "https",
71327
71710
  domain: domain,
71328
71711
  path: path,
71329
- queryParams: __assign$8((_b = {}, _b[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion, _b), customQueryParams)
71712
+ queryParams: __assign$8((_c = {}, _c[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion,
71713
+ // Generate a hash code to avoid cache conflict
71714
+ // TODO: Remove this once style version 2023-01-01 is publicly available
71715
+ _c.hash = StyleManager._hashCode((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.getToken()), _c), customQueryParams)
71330
71716
  }).toString()
71331
71717
  };
71332
71718
  if (typeof this.serviceOptions.transformRequest === "function" && resourceType) {
71333
71719
  // If a transformRequest(...) was specified use it.
71334
71720
  requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
71335
71721
  }
71336
- (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(requestParams);
71722
+ (_b = this.map.authentication) === null || _b === void 0 ? void 0 : _b.signRequest(requestParams);
71337
71723
  fetchOptions = {
71338
71724
  method: "GET",
71339
71725
  mode: "cors",
@@ -71350,11 +71736,26 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71350
71736
  throw new Error("HTTP " + response.status + ": " + response.statusText + " ");
71351
71737
  }
71352
71738
  })];
71353
- case 1: return [2 /*return*/, _c.sent()];
71739
+ case 1: return [2 /*return*/, _d.sent()];
71354
71740
  }
71355
71741
  });
71356
71742
  });
71357
71743
  };
71744
+ /**
71745
+ * A basic helper function to generate a hash from an input string.
71746
+ */
71747
+ StyleManager._hashCode = function (str) {
71748
+ if (str === void 0) { str = ""; }
71749
+ var chr, hash = 0;
71750
+ if (!str)
71751
+ return hash;
71752
+ for (var i = 0; i < str.length; i++) {
71753
+ chr = str.charCodeAt(i);
71754
+ hash = (hash << 5) - hash + chr;
71755
+ hash |= 0; // Convert to 32bit integer
71756
+ }
71757
+ return hash;
71758
+ };
71358
71759
  return StyleManager;
71359
71760
  }());
71360
71761
 
@@ -71441,7 +71842,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71441
71842
  }
71442
71843
  return ar;
71443
71844
  };
71444
- var __spreadArray$9 = (window && window.__spreadArray) || function (to, from) {
71845
+ var __spreadArray$a = (window && window.__spreadArray) || function (to, from) {
71445
71846
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
71446
71847
  to[j] = from[i];
71447
71848
  return to;
@@ -71628,7 +72029,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71628
72029
  _this.events.invoke("error", errorData);
71629
72030
  });
71630
72031
  // --> Set initial camera state of map
71631
- _this.setCamera(__assign$9(__assign$9({}, options), { type: "jump", duration: 0 }));
72032
+ _this.setCamera(__assign$9(__assign$9({
72033
+ // Default minZoom to ensure the map doesn't zoom out to unsupported zoom levels.
72034
+ minZoom: 1 }, options), { type: "jump", duration: 0 }));
71632
72035
  // Add delegates to map
71633
72036
  {
71634
72037
  _this.incidentDelegate = new IncidentServiceDelegate(_this);
@@ -71725,6 +72128,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71725
72128
  if (!mapboxCameraOptions) {
71726
72129
  throw new Error("The map cannot be fit to the current canvas with the given CameraBoundsOptions.");
71727
72130
  }
72131
+ if ('pitch' in options) {
72132
+ mapboxCameraOptions.pitch = options.pitch;
72133
+ }
72134
+ if ('bearing' in options) {
72135
+ mapboxCameraOptions.bearing = options.bearing;
72136
+ }
71728
72137
  this.map.setMaxZoom(cameraBoundsOptions.maxZoom);
71729
72138
  this._invokeEvent("maxzoomchanged", this.map.getMaxZoom());
71730
72139
  maxBounds = this._generateSafeBounds(cameraBoundsOptions.maxBounds);
@@ -71847,8 +72256,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71847
72256
  // If this function is restructured such that a styledata event won't always trigger
71848
72257
  // if the language is changed, then either those delegates need changed
71849
72258
  // or the styledata event manually invoked.
72259
+ var noDiffOnLanguageViewChange = diff && (this.styleOptions.language === newOptions.language && this.styleOptions.view === newOptions.view);
71850
72260
  this.styleOptions = newOptions;
71851
- this._setStyleComponents(newOptions, diff);
72261
+ this._setStyleComponents(newOptions, noDiffOnLanguageViewChange);
71852
72262
  };
71853
72263
  /**
71854
72264
  * Returns the map control's current style settings.
@@ -72239,7 +72649,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72239
72649
  urls = layer.getOptions().subdomains || [];
72240
72650
  }
72241
72651
  // Add the tile urls to the layer, but don't update the map yet.
72242
- urls.push.apply(urls, __spreadArray$9([], __read$f(tileSources)));
72652
+ urls.push.apply(urls, __spreadArray$a([], __read$f(tileSources)));
72243
72653
  layer._setOptionsNoUpdate({
72244
72654
  subdomains: urls
72245
72655
  });
@@ -72408,9 +72818,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72408
72818
  * Clean up the map's resources. Map will not function correctly after calling this method.
72409
72819
  */
72410
72820
  Map.prototype.dispose = function () {
72821
+ var _a;
72411
72822
  this.clear();
72412
72823
  this.map.remove();
72824
+ (_a = this.authentication) === null || _a === void 0 ? void 0 : _a.dispose();
72413
72825
  this.removed = true;
72826
+ // Remove event listeners
72827
+ window.removeEventListener("resize", this._windowResizeCallback);
72414
72828
  while (this.getMapContainer().firstChild) {
72415
72829
  var currChild = this.getMapContainer().firstChild;
72416
72830
  this.getMapContainer().removeChild(currChild);
@@ -72755,7 +73169,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72755
73169
  }
72756
73170
  return ar;
72757
73171
  };
72758
- var __spreadArray$a = (window && window.__spreadArray) || function (to, from) {
73172
+ var __spreadArray$b = (window && window.__spreadArray) || function (to, from) {
72759
73173
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
72760
73174
  to[j] = from[i];
72761
73175
  return to;
@@ -72901,7 +73315,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72901
73315
  lineLength = 50;
72902
73316
  }
72903
73317
  var lines = c.split(/<(tr|div|br|li|h[0-9]|p>)/);
72904
- longestStringLength = Math.max.apply(Math, __spreadArray$a([], __read$g((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
73318
+ longestStringLength = Math.max.apply(Math, __spreadArray$b([], __read$g((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
72905
73319
  var w = Math.ceil(longestStringLength * 3.5);
72906
73320
  if (w < width) {
72907
73321
  width = w;