@datagouv/components-next 1.0.2-dev.84 → 1.0.2-dev.86

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.
Files changed (26) hide show
  1. package/dist/{Control-DuZJdKV_.js → Control-ZFh5ta_U.js} +1 -1
  2. package/dist/{Datafair.client-BzW-ctDf.js → Datafair.client-CGDQWFP2.js} +1 -1
  3. package/dist/{Event--kp8kMdJ.js → Event-DSQcW7OF.js} +24 -24
  4. package/dist/{Image-34hvypZI.js → Image-BijNEG0p.js} +6 -6
  5. package/dist/{JsonPreview.client-BfMSzR07.js → JsonPreview.client-CRAjVwYR.js} +2 -2
  6. package/dist/{Map-BjUnLyj8.js → Map-BUtPf5GN.js} +756 -756
  7. package/dist/{MapContainer.client-CLs-im9i.js → MapContainer.client-gmUC2Cl5.js} +37 -38
  8. package/dist/{OSM-s40W6sQ2.js → OSM-D4MTdBtk.js} +2 -2
  9. package/dist/{PdfPreview.client-C13PQCU_.js → PdfPreview.client-CRIHPiVa.js} +2 -2
  10. package/dist/{Pmtiles.client-CL7PXXDl.js → Pmtiles.client-DHyaqRB7.js} +1 -1
  11. package/dist/{PreviewWrapper.vue_vue_type_script_setup_true_lang-C6XnsZ-7.js → PreviewWrapper.vue_vue_type_script_setup_true_lang-BFIK58nF.js} +1 -1
  12. package/dist/{ScaleLine-KW-nXqp3.js → ScaleLine-hJQIqcZm.js} +2 -2
  13. package/dist/{Tile-DbNFNPfU.js → Tile-Dcl7oIVu.js} +35 -35
  14. package/dist/{TileImage-BsXBxMtq.js → TileImage-BJeHipMX.js} +4 -4
  15. package/dist/{View-BR92hTWP.js → View-xp_P_OHw.js} +412 -401
  16. package/dist/{XmlPreview.client-KaENrbbG.js → XmlPreview.client-D2pj4Pi-.js} +3 -3
  17. package/dist/{common-PJfpC179.js → common-BjQlan3k.js} +36 -36
  18. package/dist/components-next.css +4 -4
  19. package/dist/components-next.js +1 -1
  20. package/dist/{index-C7WVVGgD.js → index-BihEb_eg.js} +32886 -27183
  21. package/dist/{main-K-42Oe8-.js → main-BNyfhPgX.js} +7 -7
  22. package/dist/{proj-DsetBcW7.js → proj-CsNo9yH1.js} +532 -512
  23. package/dist/{tilecoord-Db24Px13.js → tilecoord-A0fLnBZr.js} +28 -28
  24. package/dist/{vue3-xml-viewer.common-sHPSE-jD.js → vue3-xml-viewer.common-MxH3AoAS.js} +1 -1
  25. package/package.json +2 -2
  26. package/src/components/ResourceAccordion/MapContainer.client.vue +1 -3
@@ -1,5 +1,5 @@
1
- import { a7 as p, B as it, n as jt, G as Ft, al as x, v as Tt, aL as Et, D as vt, F, ak as W, m as St, x as S, z as j, o as Zt, aM as zt, s as st, C as Pt, A as Xt, a2 as Yt, K as ot, y as bt, N as rt, L as G, am as Gt, aN as L, M as Lt, af as Y, ac as y, j as E, W as q, aE as Ot, aO as Vt, ah as K, k as kt, Q as Ut, V as Dt, aP as Ht } from "./proj-DsetBcW7.js";
2
- import { d as Wt, e as qt, u as at, v as Kt, w as $t, a as N, j as Bt, x as Jt } from "./common-PJfpC179.js";
1
+ import { a7 as p, B as it, n as Ft, G as Tt, al as x, v as Et, aM as vt, D as St, F, ak as W, m as Zt, x as Z, z as j, o as zt, aN as Pt, s as st, C as Xt, A as Yt, a2 as bt, K as ot, y as rt, aO as Gt, N as at, L as G, am as Lt, aP as L, M as Ot, af as Y, ac as y, j as v, W as q, aF as Vt, aQ as kt, ah as K, k as Ut, Q as Dt, V as Ht, aR as Wt } from "./proj-CsNo9yH1.js";
2
+ import { d as qt, e as Kt, u as lt, v as $t, w as Bt, a as N, j as Qt, x as Jt } from "./common-BjQlan3k.js";
3
3
  const I = {
4
4
  ANIMATING: 0,
5
5
  INTERACTING: 1
@@ -18,16 +18,16 @@ function $(s, t, e) {
18
18
  * @param {Array<number>} [centerShift] Shift between map center and viewport center.
19
19
  * @return {import("./coordinate.js").Coordinate|undefined} Center.
20
20
  */
21
- (function(n, i, r, o, l) {
21
+ (function(n, i, o, r, l) {
22
22
  if (!n)
23
23
  return;
24
24
  if (!i && !t)
25
25
  return n;
26
- const a = t ? 0 : r[0] * i, c = t ? 0 : r[1] * i, h = l ? l[0] : 0, u = l ? l[1] : 0;
26
+ const a = t ? 0 : o[0] * i, c = t ? 0 : o[1] * i, h = l ? l[0] : 0, u = l ? l[1] : 0;
27
27
  let g = s[0] + a / 2 + h, d = s[2] - a / 2 + h, f = s[1] + c / 2 + u, R = s[3] - c / 2 + u;
28
28
  g > d && (g = (d + g) / 2, d = g), f > R && (f = (R + f) / 2, R = f);
29
29
  let _ = p(n[0], g, d), C = p(n[1], f, R);
30
- if (o && e && i) {
30
+ if (r && e && i) {
31
31
  const m = 30 * i;
32
32
  _ += -m * Math.log(1 + Math.max(0, g - n[0]) / m) + m * Math.log(1 + Math.max(0, n[0] - d) / m), C += -m * Math.log(1 + Math.max(0, f - n[1]) / m) + m * Math.log(1 + Math.max(0, n[1] - R) / m);
33
33
  }
@@ -35,58 +35,58 @@ function $(s, t, e) {
35
35
  })
36
36
  );
37
37
  }
38
- function Qt(s) {
38
+ function te(s) {
39
39
  return s;
40
40
  }
41
- function lt(s, t, e, n, i, r, o) {
42
- r = r || [], o = o || 2;
41
+ function ht(s, t, e, n, i, o, r) {
42
+ o = o || [], r = r || 2;
43
43
  let l = 0;
44
44
  for (let a = t; a < e; a += n) {
45
45
  const c = s[a], h = s[a + 1];
46
- r[l++] = i[0] * c + i[2] * h + i[4], r[l++] = i[1] * c + i[3] * h + i[5];
47
- for (let u = 2; u < o; u++)
48
- r[l++] = s[a + u];
46
+ o[l++] = i[0] * c + i[2] * h + i[4], o[l++] = i[1] * c + i[3] * h + i[5];
47
+ for (let u = 2; u < r; u++)
48
+ o[l++] = s[a + u];
49
49
  }
50
- return r && r.length != l && (r.length = l), r;
50
+ return o && o.length != l && (o.length = l), o;
51
51
  }
52
- function te(s, t, e, n, i, r, o) {
53
- o = o || [];
54
- const l = Math.cos(i), a = Math.sin(i), c = r[0], h = r[1];
52
+ function ee(s, t, e, n, i, o, r) {
53
+ r = r || [];
54
+ const l = Math.cos(i), a = Math.sin(i), c = o[0], h = o[1];
55
55
  let u = 0;
56
56
  for (let g = t; g < e; g += n) {
57
57
  const d = s[g] - c, f = s[g + 1] - h;
58
- o[u++] = c + d * l - f * a, o[u++] = h + d * a + f * l;
58
+ r[u++] = c + d * l - f * a, r[u++] = h + d * a + f * l;
59
59
  for (let R = g + 2; R < g + n; ++R)
60
- o[u++] = s[R];
60
+ r[u++] = s[R];
61
61
  }
62
- return o && o.length != u && (o.length = u), o;
62
+ return r && r.length != u && (r.length = u), r;
63
63
  }
64
- function ee(s, t, e, n, i, r, o, l) {
64
+ function ne(s, t, e, n, i, o, r, l) {
65
65
  l = l || [];
66
- const a = o[0], c = o[1];
66
+ const a = r[0], c = r[1];
67
67
  let h = 0;
68
68
  for (let u = t; u < e; u += n) {
69
69
  const g = s[u] - a, d = s[u + 1] - c;
70
- l[h++] = a + i * g, l[h++] = c + r * d;
70
+ l[h++] = a + i * g, l[h++] = c + o * d;
71
71
  for (let f = u + 2; f < u + n; ++f)
72
72
  l[h++] = s[f];
73
73
  }
74
74
  return l && l.length != h && (l.length = h), l;
75
75
  }
76
- function ne(s, t, e, n, i, r, o) {
77
- o = o || [];
76
+ function ie(s, t, e, n, i, o, r) {
77
+ r = r || [];
78
78
  let l = 0;
79
79
  for (let a = t; a < e; a += n) {
80
- o[l++] = s[a] + i, o[l++] = s[a + 1] + r;
80
+ r[l++] = s[a] + i, r[l++] = s[a + 1] + o;
81
81
  for (let c = a + 2; c < a + n; ++c)
82
- o[l++] = s[c];
82
+ r[l++] = s[c];
83
83
  }
84
- return o && o.length != l && (o.length = l), o;
84
+ return r && r.length != l && (r.length = l), r;
85
85
  }
86
- const B = qt(), ie = [NaN, NaN];
87
- class se extends it {
86
+ const B = Kt(), se = [NaN, NaN];
87
+ class oe extends it {
88
88
  constructor() {
89
- super(), this.extent_ = jt(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = Ft(
89
+ super(), this.extent_ = Ft(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = Tt(
90
90
  (t, e, n) => {
91
91
  if (!n)
92
92
  return this.getSimplifiedGeometry(e);
@@ -134,7 +134,7 @@ class se extends it {
134
134
  * @return {boolean} Contains (x, y).
135
135
  */
136
136
  containsXY(t, e) {
137
- return this.closestPointXY(t, e, ie, Number.MIN_VALUE) === 0;
137
+ return this.closestPointXY(t, e, se, Number.MIN_VALUE) === 0;
138
138
  }
139
139
  /**
140
140
  * Return the closest point of the geometry to the passed point as
@@ -175,9 +175,9 @@ class se extends it {
175
175
  getExtent(t) {
176
176
  if (this.extentRevision_ != this.getRevision()) {
177
177
  const e = this.computeExtent(this.extent_);
178
- (isNaN(e[0]) || isNaN(e[1])) && Tt(e), this.extentRevision_ = this.getRevision();
178
+ (isNaN(e[0]) || isNaN(e[1])) && Et(e), this.extentRevision_ = this.getRevision();
179
179
  }
180
- return Et(this.extent_, t);
180
+ return vt(this.extent_, t);
181
181
  }
182
182
  /**
183
183
  * Rotate the geometry around a given coordinate. This modifies the geometry
@@ -282,9 +282,9 @@ class se extends it {
282
282
  * @api
283
283
  */
284
284
  transform(t, e) {
285
- const n = vt(t), i = n.getUnits() == "tile-pixels" ? function(r, o, l) {
285
+ const n = St(t), i = n.getUnits() == "tile-pixels" ? function(o, r, l) {
286
286
  const a = n.getExtent(), c = n.getWorldExtent(), h = F(c) / F(a);
287
- Wt(
287
+ qt(
288
288
  B,
289
289
  c[0],
290
290
  c[3],
@@ -294,20 +294,20 @@ class se extends it {
294
294
  0,
295
295
  0
296
296
  );
297
- const u = lt(
298
- r,
297
+ const u = ht(
298
+ o,
299
299
  0,
300
- r.length,
300
+ o.length,
301
301
  l,
302
302
  B,
303
- o
303
+ r
304
304
  ), g = W(n, e);
305
305
  return g ? g(u, u, l) : u;
306
306
  } : W(n, e);
307
307
  return this.applyTransform(i), this;
308
308
  }
309
309
  }
310
- class O extends se {
310
+ class O extends oe {
311
311
  constructor() {
312
312
  super(), this.layout = "XY", this.stride = 2, this.flatCoordinates;
313
313
  }
@@ -318,7 +318,7 @@ class O extends se {
318
318
  * @override
319
319
  */
320
320
  computeExtent(t) {
321
- return St(
321
+ return Zt(
322
322
  this.flatCoordinates,
323
323
  0,
324
324
  this.flatCoordinates.length,
@@ -396,7 +396,7 @@ class O extends se {
396
396
  * @param {Array<number>} flatCoordinates Flat coordinates.
397
397
  */
398
398
  setFlatCoordinates(t, e) {
399
- this.stride = J(t), this.layout = t, this.flatCoordinates = e;
399
+ this.stride = Q(t), this.layout = t, this.flatCoordinates = e;
400
400
  }
401
401
  /**
402
402
  * @abstract
@@ -415,9 +415,9 @@ class O extends se {
415
415
  setLayout(t, e, n) {
416
416
  let i;
417
417
  if (t)
418
- i = J(t);
418
+ i = Q(t);
419
419
  else {
420
- for (let r = 0; r < n; ++r) {
420
+ for (let o = 0; o < n; ++o) {
421
421
  if (e.length === 0) {
422
422
  this.layout = "XY", this.stride = 2;
423
423
  return;
@@ -425,7 +425,7 @@ class O extends se {
425
425
  e = /** @type {Array<unknown>} */
426
426
  e[0];
427
427
  }
428
- i = e.length, t = oe(i);
428
+ i = e.length, t = re(i);
429
429
  }
430
430
  this.layout = t, this.stride = i;
431
431
  }
@@ -459,7 +459,7 @@ class O extends se {
459
459
  const n = this.getFlatCoordinates();
460
460
  if (n) {
461
461
  const i = this.getStride();
462
- te(
462
+ ee(
463
463
  n,
464
464
  0,
465
465
  n.length,
@@ -481,15 +481,15 @@ class O extends se {
481
481
  * @override
482
482
  */
483
483
  scale(t, e, n) {
484
- e === void 0 && (e = t), n || (n = S(this.getExtent()));
484
+ e === void 0 && (e = t), n || (n = Z(this.getExtent()));
485
485
  const i = this.getFlatCoordinates();
486
486
  if (i) {
487
- const r = this.getStride();
488
- ee(
487
+ const o = this.getStride();
488
+ ne(
489
489
  i,
490
490
  0,
491
491
  i.length,
492
- r,
492
+ o,
493
493
  t,
494
494
  e,
495
495
  n,
@@ -509,7 +509,7 @@ class O extends se {
509
509
  const n = this.getFlatCoordinates();
510
510
  if (n) {
511
511
  const i = this.getStride();
512
- ne(
512
+ ie(
513
513
  n,
514
514
  0,
515
515
  n.length,
@@ -521,22 +521,22 @@ class O extends se {
521
521
  }
522
522
  }
523
523
  }
524
- function oe(s) {
524
+ function re(s) {
525
525
  let t;
526
526
  return s == 2 ? t = "XY" : s == 3 ? t = "XYZ" : s == 4 && (t = "XYZM"), /** @type {import("./Geometry.js").GeometryLayout} */
527
527
  t;
528
528
  }
529
- function J(s) {
529
+ function Q(s) {
530
530
  let t;
531
531
  return s == "XY" ? t = 2 : s == "XYZ" || s == "XYM" ? t = 3 : s == "XYZM" && (t = 4), /** @type {number} */
532
532
  t;
533
533
  }
534
- function me(s, t, e) {
534
+ function Ce(s, t, e) {
535
535
  const n = s.getFlatCoordinates();
536
536
  if (!n)
537
537
  return null;
538
538
  const i = s.getStride();
539
- return lt(
539
+ return ht(
540
540
  n,
541
541
  0,
542
542
  n.length,
@@ -545,86 +545,86 @@ function me(s, t, e) {
545
545
  e
546
546
  );
547
547
  }
548
- function ht(s, t, e, n) {
548
+ function ut(s, t, e, n) {
549
549
  let i = 0;
550
- const r = s[e - n], o = s[e - n + 1];
550
+ const o = s[e - n], r = s[e - n + 1];
551
551
  let l = 0, a = 0;
552
552
  for (; t < e; t += n) {
553
- const c = s[t] - r, h = s[t + 1] - o;
553
+ const c = s[t] - o, h = s[t + 1] - r;
554
554
  i += a * c - l * h, l = c, a = h;
555
555
  }
556
556
  return i / 2;
557
557
  }
558
- function ut(s, t, e, n) {
558
+ function ct(s, t, e, n) {
559
559
  let i = 0;
560
- for (let r = 0, o = e.length; r < o; ++r) {
561
- const l = e[r];
562
- i += ht(s, t, l, n), t = l;
560
+ for (let o = 0, r = e.length; o < r; ++o) {
561
+ const l = e[o];
562
+ i += ut(s, t, l, n), t = l;
563
563
  }
564
564
  return i;
565
565
  }
566
- function Ce(s, t, e, n) {
566
+ function xe(s, t, e, n) {
567
567
  let i = 0;
568
- for (let r = 0, o = e.length; r < o; ++r) {
569
- const l = e[r];
570
- i += ut(s, t, l, n), t = l[l.length - 1];
568
+ for (let o = 0, r = e.length; o < r; ++o) {
569
+ const l = e[o];
570
+ i += ct(s, t, l, n), t = l[l.length - 1];
571
571
  }
572
572
  return i;
573
573
  }
574
- function Q(s, t, e, n, i, r, o) {
574
+ function J(s, t, e, n, i, o, r) {
575
575
  const l = s[t], a = s[t + 1], c = s[e] - l, h = s[e + 1] - a;
576
576
  let u;
577
577
  if (c === 0 && h === 0)
578
578
  u = t;
579
579
  else {
580
- const g = ((i - l) * c + (r - a) * h) / (c * c + h * h);
580
+ const g = ((i - l) * c + (o - a) * h) / (c * c + h * h);
581
581
  if (g > 1)
582
582
  u = e;
583
583
  else if (g > 0) {
584
584
  for (let d = 0; d < n; ++d)
585
- o[d] = Zt(
585
+ r[d] = zt(
586
586
  s[t + d],
587
587
  s[e + d],
588
588
  g
589
589
  );
590
- o.length = n;
590
+ r.length = n;
591
591
  return;
592
592
  } else
593
593
  u = t;
594
594
  }
595
595
  for (let g = 0; g < n; ++g)
596
- o[g] = s[u + g];
597
- o.length = n;
596
+ r[g] = s[u + g];
597
+ r.length = n;
598
598
  }
599
- function ct(s, t, e, n, i) {
600
- let r = s[t], o = s[t + 1];
599
+ function gt(s, t, e, n, i) {
600
+ let o = s[t], r = s[t + 1];
601
601
  for (t += n; t < e; t += n) {
602
- const l = s[t], a = s[t + 1], c = j(r, o, l, a);
603
- c > i && (i = c), r = l, o = a;
602
+ const l = s[t], a = s[t + 1], c = j(o, r, l, a);
603
+ c > i && (i = c), o = l, r = a;
604
604
  }
605
605
  return i;
606
606
  }
607
- function gt(s, t, e, n, i) {
608
- for (let r = 0, o = e.length; r < o; ++r) {
609
- const l = e[r];
610
- i = ct(s, t, l, n, i), t = l;
607
+ function dt(s, t, e, n, i) {
608
+ for (let o = 0, r = e.length; o < r; ++o) {
609
+ const l = e[o];
610
+ i = gt(s, t, l, n, i), t = l;
611
611
  }
612
612
  return i;
613
613
  }
614
- function xe(s, t, e, n, i) {
615
- for (let r = 0, o = e.length; r < o; ++r) {
616
- const l = e[r];
617
- i = gt(s, t, l, n, i), t = l[l.length - 1];
614
+ function Me(s, t, e, n, i) {
615
+ for (let o = 0, r = e.length; o < r; ++o) {
616
+ const l = e[o];
617
+ i = dt(s, t, l, n, i), t = l[l.length - 1];
618
618
  }
619
619
  return i;
620
620
  }
621
- function dt(s, t, e, n, i, r, o, l, a, c, h) {
621
+ function ft(s, t, e, n, i, o, r, l, a, c, h) {
622
622
  if (t == e)
623
623
  return c;
624
624
  let u, g;
625
625
  if (i === 0) {
626
626
  if (g = j(
627
- o,
627
+ r,
628
628
  l,
629
629
  s[t],
630
630
  s[t + 1]
@@ -638,15 +638,15 @@ function dt(s, t, e, n, i, r, o, l, a, c, h) {
638
638
  h = h || [NaN, NaN];
639
639
  let d = t + n;
640
640
  for (; d < e; )
641
- if (Q(
641
+ if (J(
642
642
  s,
643
643
  d - n,
644
644
  d,
645
645
  n,
646
- o,
646
+ r,
647
647
  l,
648
648
  h
649
- ), g = j(o, l, h[0], h[1]), g < c) {
649
+ ), g = j(r, l, h[0], h[1]), g < c) {
650
650
  for (c = g, u = 0; u < n; ++u)
651
651
  a[u] = h[u];
652
652
  a.length = n, d += n;
@@ -655,33 +655,33 @@ function dt(s, t, e, n, i, r, o, l, a, c, h) {
655
655
  (Math.sqrt(g) - Math.sqrt(c)) / i | 0,
656
656
  1
657
657
  );
658
- if (r && (Q(
658
+ if (o && (J(
659
659
  s,
660
660
  e - n,
661
661
  t,
662
662
  n,
663
- o,
663
+ r,
664
664
  l,
665
665
  h
666
- ), g = j(o, l, h[0], h[1]), g < c)) {
666
+ ), g = j(r, l, h[0], h[1]), g < c)) {
667
667
  for (c = g, u = 0; u < n; ++u)
668
668
  a[u] = h[u];
669
669
  a.length = n;
670
670
  }
671
671
  return c;
672
672
  }
673
- function ft(s, t, e, n, i, r, o, l, a, c, h) {
673
+ function Rt(s, t, e, n, i, o, r, l, a, c, h) {
674
674
  h = h || [NaN, NaN];
675
675
  for (let u = 0, g = e.length; u < g; ++u) {
676
676
  const d = e[u];
677
- c = dt(
677
+ c = ft(
678
678
  s,
679
679
  t,
680
680
  d,
681
681
  n,
682
682
  i,
683
- r,
684
683
  o,
684
+ r,
685
685
  l,
686
686
  a,
687
687
  c,
@@ -690,18 +690,18 @@ function ft(s, t, e, n, i, r, o, l, a, c, h) {
690
690
  }
691
691
  return c;
692
692
  }
693
- function Me(s, t, e, n, i, r, o, l, a, c, h) {
693
+ function pe(s, t, e, n, i, o, r, l, a, c, h) {
694
694
  h = h || [NaN, NaN];
695
695
  for (let u = 0, g = e.length; u < g; ++u) {
696
696
  const d = e[u];
697
- c = ft(
697
+ c = Rt(
698
698
  s,
699
699
  t,
700
700
  d,
701
701
  n,
702
702
  i,
703
- r,
704
703
  o,
704
+ r,
705
705
  l,
706
706
  a,
707
707
  c,
@@ -710,91 +710,91 @@ function Me(s, t, e, n, i, r, o, l, a, c, h) {
710
710
  }
711
711
  return c;
712
712
  }
713
- function re(s, t, e, n) {
714
- for (let i = 0, r = e.length; i < r; ++i)
713
+ function ae(s, t, e, n) {
714
+ for (let i = 0, o = e.length; i < o; ++i)
715
715
  s[t++] = e[i];
716
716
  return t;
717
717
  }
718
- function Rt(s, t, e, n) {
719
- for (let i = 0, r = e.length; i < r; ++i) {
720
- const o = e[i];
718
+ function _t(s, t, e, n) {
719
+ for (let i = 0, o = e.length; i < o; ++i) {
720
+ const r = e[i];
721
721
  for (let l = 0; l < n; ++l)
722
- s[t++] = o[l];
722
+ s[t++] = r[l];
723
723
  }
724
724
  return t;
725
725
  }
726
- function _t(s, t, e, n, i) {
726
+ function mt(s, t, e, n, i) {
727
727
  i = i || [];
728
- let r = 0;
729
- for (let o = 0, l = e.length; o < l; ++o) {
730
- const a = Rt(
728
+ let o = 0;
729
+ for (let r = 0, l = e.length; r < l; ++r) {
730
+ const a = _t(
731
731
  s,
732
732
  t,
733
- e[o],
733
+ e[r],
734
734
  n
735
735
  );
736
- i[r++] = a, t = a;
736
+ i[o++] = a, t = a;
737
737
  }
738
- return i.length = r, i;
738
+ return i.length = o, i;
739
739
  }
740
- function pe(s, t, e, n, i) {
740
+ function ye(s, t, e, n, i) {
741
741
  i = i || [];
742
- let r = 0;
743
- for (let o = 0, l = e.length; o < l; ++o) {
744
- const a = _t(
742
+ let o = 0;
743
+ for (let r = 0, l = e.length; r < l; ++r) {
744
+ const a = mt(
745
745
  s,
746
746
  t,
747
- e[o],
747
+ e[r],
748
748
  n,
749
- i[r]
749
+ i[o]
750
750
  );
751
- a.length === 0 && (a[0] = t), i[r++] = a, t = a[a.length - 1];
751
+ a.length === 0 && (a[0] = t), i[o++] = a, t = a[a.length - 1];
752
752
  }
753
- return i.length = r, i;
753
+ return i.length = o, i;
754
754
  }
755
- function mt(s, t, e, n, i) {
755
+ function Ct(s, t, e, n, i) {
756
756
  i = i !== void 0 ? i : [];
757
- let r = 0;
758
- for (let o = t; o < e; o += n)
759
- i[r++] = s.slice(o, o + n);
760
- return i.length = r, i;
757
+ let o = 0;
758
+ for (let r = t; r < e; r += n)
759
+ i[o++] = s.slice(r, r + n);
760
+ return i.length = o, i;
761
761
  }
762
- function Ct(s, t, e, n, i) {
762
+ function xt(s, t, e, n, i) {
763
763
  i = i !== void 0 ? i : [];
764
- let r = 0;
765
- for (let o = 0, l = e.length; o < l; ++o) {
766
- const a = e[o];
767
- i[r++] = mt(
764
+ let o = 0;
765
+ for (let r = 0, l = e.length; r < l; ++r) {
766
+ const a = e[r];
767
+ i[o++] = Ct(
768
768
  s,
769
769
  t,
770
770
  a,
771
771
  n,
772
- i[r]
772
+ i[o]
773
773
  ), t = a;
774
774
  }
775
- return i.length = r, i;
775
+ return i.length = o, i;
776
776
  }
777
- function ye(s, t, e, n, i) {
777
+ function Ie(s, t, e, n, i) {
778
778
  i = i !== void 0 ? i : [];
779
- let r = 0;
780
- for (let o = 0, l = e.length; o < l; ++o) {
781
- const a = e[o];
782
- i[r++] = a.length === 1 && a[0] === t ? [] : Ct(
779
+ let o = 0;
780
+ for (let r = 0, l = e.length; r < l; ++r) {
781
+ const a = e[r];
782
+ i[o++] = a.length === 1 && a[0] === t ? [] : xt(
783
783
  s,
784
784
  t,
785
785
  a,
786
786
  n,
787
- i[r]
787
+ i[o]
788
788
  ), t = a[a.length - 1];
789
789
  }
790
- return i.length = r, i;
790
+ return i.length = o, i;
791
791
  }
792
- function xt(s, t, e, n, i, r, o) {
792
+ function Mt(s, t, e, n, i, o, r) {
793
793
  const l = (e - t) / n;
794
794
  if (l < 3) {
795
795
  for (; t < e; t += n)
796
- r[o++] = s[t], r[o++] = s[t + 1];
797
- return o;
796
+ o[r++] = s[t], o[r++] = s[t + 1];
797
+ return r;
798
798
  }
799
799
  const a = new Array(l);
800
800
  a[0] = 1, a[l - 1] = 1;
@@ -805,42 +805,42 @@ function xt(s, t, e, n, i, r, o) {
805
805
  let d = 0;
806
806
  const f = s[g], R = s[g + 1], _ = s[u], C = s[u + 1];
807
807
  for (let m = g + n; m < u; m += n) {
808
- const z = s[m], w = s[m + 1], H = zt(z, w, f, R, _, C);
808
+ const z = s[m], w = s[m + 1], H = Pt(z, w, f, R, _, C);
809
809
  H > d && (h = m, d = H);
810
810
  }
811
811
  d > i && (a[(h - t) / n] = 1, g + n < h && c.push(g, h), h + n < u && c.push(h, u));
812
812
  }
813
813
  for (let u = 0; u < l; ++u)
814
- a[u] && (r[o++] = s[t + u * n], r[o++] = s[t + u * n + 1]);
815
- return o;
814
+ a[u] && (o[r++] = s[t + u * n], o[r++] = s[t + u * n + 1]);
815
+ return r;
816
816
  }
817
- function Ie(s, t, e, n, i, r, o, l) {
817
+ function Ae(s, t, e, n, i, o, r, l) {
818
818
  for (let a = 0, c = e.length; a < c; ++a) {
819
819
  const h = e[a];
820
- o = xt(
820
+ r = Mt(
821
821
  s,
822
822
  t,
823
823
  h,
824
824
  n,
825
825
  i,
826
- r,
827
- o
828
- ), l.push(o), t = h;
826
+ o,
827
+ r
828
+ ), l.push(r), t = h;
829
829
  }
830
- return o;
830
+ return r;
831
831
  }
832
832
  function A(s, t) {
833
833
  return t * Math.round(s / t);
834
834
  }
835
- function ae(s, t, e, n, i, r, o) {
835
+ function le(s, t, e, n, i, o, r) {
836
836
  if (t == e)
837
- return o;
837
+ return r;
838
838
  let l = A(s[t], i), a = A(s[t + 1], i);
839
- t += n, r[o++] = l, r[o++] = a;
839
+ t += n, o[r++] = l, o[r++] = a;
840
840
  let c, h;
841
841
  do
842
842
  if (c = A(s[t], i), h = A(s[t + 1], i), t += n, t == e)
843
- return r[o++] = c, r[o++] = h, o;
843
+ return o[r++] = c, o[r++] = h, r;
844
844
  while (c == l && h == a);
845
845
  for (; t < e; ) {
846
846
  const u = A(s[t], i), g = A(s[t + 1], i);
@@ -851,40 +851,40 @@ function ae(s, t, e, n, i, r, o) {
851
851
  c = u, h = g;
852
852
  continue;
853
853
  }
854
- r[o++] = c, r[o++] = h, l = c, a = h, c = u, h = g;
854
+ o[r++] = c, o[r++] = h, l = c, a = h, c = u, h = g;
855
855
  }
856
- return r[o++] = c, r[o++] = h, o;
856
+ return o[r++] = c, o[r++] = h, r;
857
857
  }
858
- function Mt(s, t, e, n, i, r, o, l) {
858
+ function pt(s, t, e, n, i, o, r, l) {
859
859
  for (let a = 0, c = e.length; a < c; ++a) {
860
860
  const h = e[a];
861
- o = ae(
861
+ r = le(
862
862
  s,
863
863
  t,
864
864
  h,
865
865
  n,
866
866
  i,
867
- r,
868
- o
869
- ), l.push(o), t = h;
867
+ o,
868
+ r
869
+ ), l.push(r), t = h;
870
870
  }
871
- return o;
871
+ return r;
872
872
  }
873
- function Ae(s, t, e, n, i, r, o, l) {
873
+ function we(s, t, e, n, i, o, r, l) {
874
874
  for (let a = 0, c = e.length; a < c; ++a) {
875
875
  const h = e[a], u = [];
876
- o = Mt(
876
+ r = pt(
877
877
  s,
878
878
  t,
879
879
  h,
880
880
  n,
881
881
  i,
882
- r,
883
882
  o,
883
+ r,
884
884
  u
885
885
  ), l.push(u), t = h[h.length - 1];
886
886
  }
887
- return o;
887
+ return r;
888
888
  }
889
889
  class T extends O {
890
890
  /**
@@ -922,14 +922,14 @@ class T extends O {
922
922
  */
923
923
  closestPointXY(t, e, n, i) {
924
924
  return i < st(this.getExtent(), t, e) ? i : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
925
- ct(
925
+ gt(
926
926
  this.flatCoordinates,
927
927
  0,
928
928
  this.flatCoordinates.length,
929
929
  this.stride,
930
930
  0
931
931
  )
932
- ), this.maxDeltaRevision_ = this.getRevision()), dt(
932
+ ), this.maxDeltaRevision_ = this.getRevision()), ft(
933
933
  this.flatCoordinates,
934
934
  0,
935
935
  this.flatCoordinates.length,
@@ -948,7 +948,7 @@ class T extends O {
948
948
  * @api
949
949
  */
950
950
  getArea() {
951
- return ht(
951
+ return ut(
952
952
  this.flatCoordinates,
953
953
  0,
954
954
  this.flatCoordinates.length,
@@ -962,7 +962,7 @@ class T extends O {
962
962
  * @override
963
963
  */
964
964
  getCoordinates() {
965
- return mt(
965
+ return Ct(
966
966
  this.flatCoordinates,
967
967
  0,
968
968
  this.flatCoordinates.length,
@@ -977,7 +977,7 @@ class T extends O {
977
977
  */
978
978
  getSimplifiedGeometryInternal(t) {
979
979
  const e = [];
980
- return e.length = xt(
980
+ return e.length = Mt(
981
981
  this.flatCoordinates,
982
982
  0,
983
983
  this.flatCoordinates.length,
@@ -1014,7 +1014,7 @@ class T extends O {
1014
1014
  * @override
1015
1015
  */
1016
1016
  setCoordinates(t, e) {
1017
- this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Rt(
1017
+ this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = _t(
1018
1018
  this.flatCoordinates,
1019
1019
  0,
1020
1020
  t,
@@ -1049,17 +1049,17 @@ class V extends O {
1049
1049
  * @override
1050
1050
  */
1051
1051
  closestPointXY(t, e, n, i) {
1052
- const r = this.flatCoordinates, o = j(
1052
+ const o = this.flatCoordinates, r = j(
1053
1053
  t,
1054
1054
  e,
1055
- r[0],
1056
- r[1]
1055
+ o[0],
1056
+ o[1]
1057
1057
  );
1058
- if (o < i) {
1058
+ if (r < i) {
1059
1059
  const l = this.stride;
1060
1060
  for (let a = 0; a < l; ++a)
1061
- n[a] = r[a];
1062
- return n.length = l, o;
1061
+ n[a] = o[a];
1062
+ return n.length = l, r;
1063
1063
  }
1064
1064
  return i;
1065
1065
  }
@@ -1079,7 +1079,7 @@ class V extends O {
1079
1079
  * @override
1080
1080
  */
1081
1081
  computeExtent(t) {
1082
- return Pt(this.flatCoordinates, t);
1082
+ return Xt(this.flatCoordinates, t);
1083
1083
  }
1084
1084
  /**
1085
1085
  * Get the type of this geometry.
@@ -1098,7 +1098,7 @@ class V extends O {
1098
1098
  * @override
1099
1099
  */
1100
1100
  intersectsExtent(t) {
1101
- return Xt(t, this.flatCoordinates[0], this.flatCoordinates[1]);
1101
+ return Yt(t, this.flatCoordinates[0], this.flatCoordinates[1]);
1102
1102
  }
1103
1103
  /**
1104
1104
  * @param {!Array<*>} coordinates Coordinates.
@@ -1107,7 +1107,7 @@ class V extends O {
1107
1107
  * @override
1108
1108
  */
1109
1109
  setCoordinates(t, e) {
1110
- this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = re(
1110
+ this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = ae(
1111
1111
  this.flatCoordinates,
1112
1112
  0,
1113
1113
  t,
@@ -1115,65 +1115,65 @@ class V extends O {
1115
1115
  ), this.changed();
1116
1116
  }
1117
1117
  }
1118
- function pt(s, t, e, n, i, r, o) {
1118
+ function yt(s, t, e, n, i, o, r) {
1119
1119
  let l, a, c, h, u, g, d;
1120
- const f = i[r + 1], R = [];
1120
+ const f = i[o + 1], R = [];
1121
1121
  for (let m = 0, z = e.length; m < z; ++m) {
1122
1122
  const w = e[m];
1123
1123
  for (h = s[w - n], g = s[w - n + 1], l = t; l < w; l += n)
1124
1124
  u = s[l], d = s[l + 1], (f <= g && d <= f || g <= f && f <= d) && (c = (f - g) / (d - g) * (u - h) + h, R.push(c)), h = u, g = d;
1125
1125
  }
1126
1126
  let _ = NaN, C = -1 / 0;
1127
- for (R.sort(Yt), h = R[0], l = 1, a = R.length; l < a; ++l) {
1127
+ for (R.sort(bt), h = R[0], l = 1, a = R.length; l < a; ++l) {
1128
1128
  u = R[l];
1129
1129
  const m = Math.abs(u - h);
1130
- m > C && (c = (h + u) / 2, at(s, t, e, n, c, f) && (_ = c, C = m)), h = u;
1130
+ m > C && (c = (h + u) / 2, lt(s, t, e, n, c, f) && (_ = c, C = m)), h = u;
1131
1131
  }
1132
- return isNaN(_) && (_ = i[r]), o ? (o.push(_, f, C), o) : [_, f, C];
1132
+ return isNaN(_) && (_ = i[o]), r ? (r.push(_, f, C), r) : [_, f, C];
1133
1133
  }
1134
- function we(s, t, e, n, i) {
1135
- let r = [];
1136
- for (let o = 0, l = e.length; o < l; ++o) {
1137
- const a = e[o];
1138
- r = pt(
1134
+ function Ne(s, t, e, n, i) {
1135
+ let o = [];
1136
+ for (let r = 0, l = e.length; r < l; ++r) {
1137
+ const a = e[r];
1138
+ o = yt(
1139
1139
  s,
1140
1140
  t,
1141
1141
  a,
1142
1142
  n,
1143
1143
  i,
1144
- 2 * o,
1145
- r
1144
+ 2 * r,
1145
+ o
1146
1146
  ), t = a[a.length - 1];
1147
1147
  }
1148
- return r;
1148
+ return o;
1149
1149
  }
1150
- function le(s, t, e, n) {
1150
+ function he(s, t, e, n) {
1151
1151
  for (; t < e - n; ) {
1152
1152
  for (let i = 0; i < n; ++i) {
1153
- const r = s[t + i];
1154
- s[t + i] = s[e - n + i], s[e - n + i] = r;
1153
+ const o = s[t + i];
1154
+ s[t + i] = s[e - n + i], s[e - n + i] = o;
1155
1155
  }
1156
1156
  t += n, e -= n;
1157
1157
  }
1158
1158
  }
1159
1159
  function k(s, t, e, n) {
1160
- let i = 0, r = s[e - n], o = s[e - n + 1];
1160
+ let i = 0, o = s[e - n], r = s[e - n + 1];
1161
1161
  for (; t < e; t += n) {
1162
1162
  const l = s[t], a = s[t + 1];
1163
- i += (l - r) * (a + o), r = l, o = a;
1163
+ i += (l - o) * (a + r), o = l, r = a;
1164
1164
  }
1165
1165
  return i === 0 ? void 0 : i > 0;
1166
1166
  }
1167
- function yt(s, t, e, n, i) {
1167
+ function It(s, t, e, n, i) {
1168
1168
  i = i !== void 0 ? i : !1;
1169
- for (let r = 0, o = e.length; r < o; ++r) {
1170
- const l = e[r], a = k(
1169
+ for (let o = 0, r = e.length; o < r; ++o) {
1170
+ const l = e[o], a = k(
1171
1171
  s,
1172
1172
  t,
1173
1173
  l,
1174
1174
  n
1175
1175
  );
1176
- if (r === 0) {
1176
+ if (o === 0) {
1177
1177
  if (i && a || !i && !a)
1178
1178
  return !1;
1179
1179
  } else if (i && !a || !i && a)
@@ -1182,10 +1182,10 @@ function yt(s, t, e, n, i) {
1182
1182
  }
1183
1183
  return !0;
1184
1184
  }
1185
- function Ne(s, t, e, n, i) {
1186
- for (let r = 0, o = e.length; r < o; ++r) {
1187
- const l = e[r];
1188
- if (!yt(s, t, l, n, i))
1185
+ function je(s, t, e, n, i) {
1186
+ for (let o = 0, r = e.length; o < r; ++o) {
1187
+ const l = e[o];
1188
+ if (!It(s, t, l, n, i))
1189
1189
  return !1;
1190
1190
  l.length && (t = l[l.length - 1]);
1191
1191
  }
@@ -1193,45 +1193,45 @@ function Ne(s, t, e, n, i) {
1193
1193
  }
1194
1194
  function b(s, t, e, n, i) {
1195
1195
  i = i !== void 0 ? i : !1;
1196
- for (let r = 0, o = e.length; r < o; ++r) {
1197
- const l = e[r], a = k(
1196
+ for (let o = 0, r = e.length; o < r; ++o) {
1197
+ const l = e[o], a = k(
1198
1198
  s,
1199
1199
  t,
1200
1200
  l,
1201
1201
  n
1202
1202
  );
1203
- (r === 0 ? i && a || !i && !a : i && !a || !i && a) && le(s, t, l, n), t = l;
1203
+ (o === 0 ? i && a || !i && !a : i && !a || !i && a) && he(s, t, l, n), t = l;
1204
1204
  }
1205
1205
  return t;
1206
1206
  }
1207
- function je(s, t, e, n, i) {
1208
- for (let r = 0, o = e.length; r < o; ++r)
1207
+ function Fe(s, t, e, n, i) {
1208
+ for (let o = 0, r = e.length; o < r; ++o)
1209
1209
  t = b(
1210
1210
  s,
1211
1211
  t,
1212
- e[r],
1212
+ e[o],
1213
1213
  n,
1214
1214
  i
1215
1215
  );
1216
1216
  return t;
1217
1217
  }
1218
- function Fe(s, t) {
1218
+ function Te(s, t) {
1219
1219
  const e = [];
1220
- let n = 0, i = 0, r;
1221
- for (let o = 0, l = t.length; o < l; ++o) {
1222
- const a = t[o], c = k(s, n, a, 2);
1223
- if (r === void 0 && (r = c), c === r)
1224
- e.push(t.slice(i, o + 1));
1220
+ let n = 0, i = 0, o;
1221
+ for (let r = 0, l = t.length; r < l; ++r) {
1222
+ const a = t[r], c = k(s, n, a, 2);
1223
+ if (o === void 0 && (o = c), c === o)
1224
+ e.push(t.slice(i, r + 1));
1225
1225
  else {
1226
1226
  if (e.length === 0)
1227
1227
  continue;
1228
1228
  e[e.length - 1].push(t[i]);
1229
1229
  }
1230
- i = o + 1, n = a;
1230
+ i = r + 1, n = a;
1231
1231
  }
1232
1232
  return e;
1233
1233
  }
1234
- class Z extends O {
1234
+ class E extends O {
1235
1235
  /**
1236
1236
  * @param {!Array<Array<import("../coordinate.js").Coordinate>>|!Array<number>} coordinates
1237
1237
  * Array of linear rings that define the polygon. The first linear ring of the
@@ -1260,7 +1260,7 @@ class Z extends O {
1260
1260
  * @api
1261
1261
  */
1262
1262
  appendLinearRing(t) {
1263
- this.flatCoordinates ? bt(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed();
1263
+ this.flatCoordinates ? rt(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed();
1264
1264
  }
1265
1265
  /**
1266
1266
  * Make a complete copy of the geometry.
@@ -1269,7 +1269,7 @@ class Z extends O {
1269
1269
  * @override
1270
1270
  */
1271
1271
  clone() {
1272
- const t = new Z(
1272
+ const t = new E(
1273
1273
  this.flatCoordinates.slice(),
1274
1274
  this.layout,
1275
1275
  this.ends_.slice()
@@ -1286,14 +1286,14 @@ class Z extends O {
1286
1286
  */
1287
1287
  closestPointXY(t, e, n, i) {
1288
1288
  return i < st(this.getExtent(), t, e) ? i : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
1289
- gt(
1289
+ dt(
1290
1290
  this.flatCoordinates,
1291
1291
  0,
1292
1292
  this.ends_,
1293
1293
  this.stride,
1294
1294
  0
1295
1295
  )
1296
- ), this.maxDeltaRevision_ = this.getRevision()), ft(
1296
+ ), this.maxDeltaRevision_ = this.getRevision()), Rt(
1297
1297
  this.flatCoordinates,
1298
1298
  0,
1299
1299
  this.ends_,
@@ -1313,7 +1313,7 @@ class Z extends O {
1313
1313
  * @override
1314
1314
  */
1315
1315
  containsXY(t, e) {
1316
- return at(
1316
+ return lt(
1317
1317
  this.getOrientedFlatCoordinates(),
1318
1318
  0,
1319
1319
  this.ends_,
@@ -1328,7 +1328,7 @@ class Z extends O {
1328
1328
  * @api
1329
1329
  */
1330
1330
  getArea() {
1331
- return ut(
1331
+ return ct(
1332
1332
  this.getOrientedFlatCoordinates(),
1333
1333
  0,
1334
1334
  this.ends_,
@@ -1351,7 +1351,7 @@ class Z extends O {
1351
1351
  */
1352
1352
  getCoordinates(t) {
1353
1353
  let e;
1354
- return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), b(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates, Ct(e, 0, this.ends_, this.stride);
1354
+ return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), b(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates, xt(e, 0, this.ends_, this.stride);
1355
1355
  }
1356
1356
  /**
1357
1357
  * @return {Array<number>} Ends.
@@ -1364,8 +1364,8 @@ class Z extends O {
1364
1364
  */
1365
1365
  getFlatInteriorPoint() {
1366
1366
  if (this.flatInteriorPointRevision_ != this.getRevision()) {
1367
- const t = S(this.getExtent());
1368
- this.flatInteriorPoint_ = pt(
1367
+ const t = Z(this.getExtent());
1368
+ this.flatInteriorPoint_ = yt(
1369
1369
  this.getOrientedFlatCoordinates(),
1370
1370
  0,
1371
1371
  this.ends_,
@@ -1424,13 +1424,13 @@ class Z extends O {
1424
1424
  */
1425
1425
  getLinearRings() {
1426
1426
  const t = this.layout, e = this.flatCoordinates, n = this.ends_, i = [];
1427
- let r = 0;
1428
- for (let o = 0, l = n.length; o < l; ++o) {
1429
- const a = n[o], c = new T(
1430
- e.slice(r, a),
1427
+ let o = 0;
1428
+ for (let r = 0, l = n.length; r < l; ++r) {
1429
+ const a = n[r], c = new T(
1430
+ e.slice(o, a),
1431
1431
  t
1432
1432
  );
1433
- i.push(c), r = a;
1433
+ i.push(c), o = a;
1434
1434
  }
1435
1435
  return i;
1436
1436
  }
@@ -1440,7 +1440,7 @@ class Z extends O {
1440
1440
  getOrientedFlatCoordinates() {
1441
1441
  if (this.orientedRevision_ != this.getRevision()) {
1442
1442
  const t = this.flatCoordinates;
1443
- yt(t, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = b(
1443
+ It(t, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = b(
1444
1444
  this.orientedFlatCoordinates_,
1445
1445
  0,
1446
1446
  this.ends_,
@@ -1460,7 +1460,7 @@ class Z extends O {
1460
1460
  */
1461
1461
  getSimplifiedGeometryInternal(t) {
1462
1462
  const e = [], n = [];
1463
- return e.length = Mt(
1463
+ return e.length = pt(
1464
1464
  this.flatCoordinates,
1465
1465
  0,
1466
1466
  this.ends_,
@@ -1469,7 +1469,7 @@ class Z extends O {
1469
1469
  e,
1470
1470
  0,
1471
1471
  n
1472
- ), new Z(e, "XY", n);
1472
+ ), new E(e, "XY", n);
1473
1473
  }
1474
1474
  /**
1475
1475
  * Get the type of this geometry.
@@ -1488,7 +1488,7 @@ class Z extends O {
1488
1488
  * @override
1489
1489
  */
1490
1490
  intersectsExtent(t) {
1491
- return Kt(
1491
+ return $t(
1492
1492
  this.getOrientedFlatCoordinates(),
1493
1493
  0,
1494
1494
  this.ends_,
@@ -1505,7 +1505,7 @@ class Z extends O {
1505
1505
  */
1506
1506
  setCoordinates(t, e) {
1507
1507
  this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []);
1508
- const n = _t(
1508
+ const n = mt(
1509
1509
  this.flatCoordinates,
1510
1510
  0,
1511
1511
  t,
@@ -1515,10 +1515,20 @@ class Z extends O {
1515
1515
  this.flatCoordinates.length = n.length === 0 ? 0 : n[n.length - 1], this.changed();
1516
1516
  }
1517
1517
  }
1518
+ function Ee(s, t, e, n) {
1519
+ e = e || 32;
1520
+ const i = [];
1521
+ for (let o = 0; o < e; ++o)
1522
+ rt(
1523
+ i,
1524
+ Gt(s, t, 2 * Math.PI * o / e, n)
1525
+ );
1526
+ return i.push(i[0], i[1]), new E(i, "XY", [i.length]);
1527
+ }
1518
1528
  function tt(s) {
1519
1529
  if (ot(s))
1520
1530
  throw new Error("Cannot create polygon from empty extent");
1521
- const t = s[0], e = s[1], n = s[2], i = s[3], r = [
1531
+ const t = s[0], e = s[1], n = s[2], i = s[3], o = [
1522
1532
  t,
1523
1533
  e,
1524
1534
  t,
@@ -1530,18 +1540,18 @@ function tt(s) {
1530
1540
  t,
1531
1541
  e
1532
1542
  ];
1533
- return new Z(r, "XY", [r.length]);
1543
+ return new E(o, "XY", [o.length]);
1534
1544
  }
1535
1545
  function U(s, t, e, n) {
1536
- const i = G(t) / e[0], r = F(t) / e[1];
1537
- return n ? Math.min(s, Math.max(i, r)) : Math.min(s, Math.min(i, r));
1546
+ const i = G(t) / e[0], o = F(t) / e[1];
1547
+ return n ? Math.min(s, Math.max(i, o)) : Math.min(s, Math.min(i, o));
1538
1548
  }
1539
1549
  function D(s, t, e) {
1540
1550
  let n = Math.min(s, t);
1541
1551
  const i = 50;
1542
1552
  return n *= Math.log(1 + i * Math.max(0, s / t - 1)) / i + 1, e && (n = Math.max(n, e), n /= Math.log(1 + i * Math.max(0, e / s - 1)) / i + 1), p(n, e / 2, t * 2);
1543
1553
  }
1544
- function he(s, t, e, n) {
1554
+ function ue(s, t, e, n) {
1545
1555
  return t = t !== void 0 ? t : !0, /**
1546
1556
  * @param {number|undefined} resolution Resolution.
1547
1557
  * @param {number} direction Direction.
@@ -1549,12 +1559,12 @@ function he(s, t, e, n) {
1549
1559
  * @param {boolean} [isMoving] True if an interaction or animation is in progress.
1550
1560
  * @return {number|undefined} Resolution.
1551
1561
  */
1552
- (function(i, r, o, l) {
1562
+ (function(i, o, r, l) {
1553
1563
  if (i !== void 0) {
1554
1564
  const a = s[0], c = s[s.length - 1], h = e ? U(
1555
1565
  a,
1556
1566
  e,
1557
- o,
1567
+ r,
1558
1568
  n
1559
1569
  ) : a;
1560
1570
  if (l)
@@ -1563,12 +1573,12 @@ function he(s, t, e, n) {
1563
1573
  h,
1564
1574
  c
1565
1575
  ) : p(i, c, h);
1566
- const u = Math.min(h, i), g = Math.floor(rt(s, u, r));
1576
+ const u = Math.min(h, i), g = Math.floor(at(s, u, o));
1567
1577
  return s[g] > h && g < s.length - 1 ? s[g + 1] : s[g];
1568
1578
  }
1569
1579
  });
1570
1580
  }
1571
- function ue(s, t, e, n, i, r) {
1581
+ function ce(s, t, e, n, i, o) {
1572
1582
  return n = n !== void 0 ? n : !0, e = e !== void 0 ? e : 0, /**
1573
1583
  * @param {number|undefined} resolution Resolution.
1574
1584
  * @param {number} direction Direction.
@@ -1576,23 +1586,23 @@ function ue(s, t, e, n, i, r) {
1576
1586
  * @param {boolean} [isMoving] True if an interaction or animation is in progress.
1577
1587
  * @return {number|undefined} Resolution.
1578
1588
  */
1579
- (function(o, l, a, c) {
1580
- if (o !== void 0) {
1589
+ (function(r, l, a, c) {
1590
+ if (r !== void 0) {
1581
1591
  const h = i ? U(
1582
1592
  t,
1583
1593
  i,
1584
1594
  a,
1585
- r
1595
+ o
1586
1596
  ) : t;
1587
1597
  if (c)
1588
1598
  return n ? D(
1589
- o,
1599
+ r,
1590
1600
  h,
1591
1601
  e
1592
- ) : p(o, e, h);
1602
+ ) : p(r, e, h);
1593
1603
  const u = 1e-9, g = Math.ceil(
1594
1604
  Math.log(t / h) / Math.log(s) - u
1595
- ), d = -l * (0.5 - u) + 0.5, f = Math.min(h, o), R = Math.floor(
1605
+ ), d = -l * (0.5 - u) + 0.5, f = Math.min(h, r), R = Math.floor(
1596
1606
  Math.log(t / f) / Math.log(s) + d
1597
1607
  ), _ = Math.max(g, R), C = t / Math.pow(s, _);
1598
1608
  return p(C, e, h);
@@ -1607,23 +1617,23 @@ function et(s, t, e, n, i) {
1607
1617
  * @param {boolean} [isMoving] True if an interaction or animation is in progress.
1608
1618
  * @return {number|undefined} Resolution.
1609
1619
  */
1610
- (function(r, o, l, a) {
1611
- if (r !== void 0) {
1620
+ (function(o, r, l, a) {
1621
+ if (o !== void 0) {
1612
1622
  const c = n ? U(
1613
1623
  s,
1614
1624
  n,
1615
1625
  l,
1616
1626
  i
1617
1627
  ) : s;
1618
- return !e || !a ? p(r, t, c) : D(
1619
- r,
1628
+ return !e || !a ? p(o, t, c) : D(
1629
+ o,
1620
1630
  c,
1621
1631
  t
1622
1632
  );
1623
1633
  }
1624
1634
  });
1625
1635
  }
1626
- function ce(s) {
1636
+ function ge(s) {
1627
1637
  if (s !== void 0)
1628
1638
  return 0;
1629
1639
  }
@@ -1631,7 +1641,7 @@ function nt(s) {
1631
1641
  if (s !== void 0)
1632
1642
  return s;
1633
1643
  }
1634
- function ge(s) {
1644
+ function de(s) {
1635
1645
  const t = 2 * Math.PI / s;
1636
1646
  return (
1637
1647
  /**
@@ -1647,8 +1657,8 @@ function ge(s) {
1647
1657
  })
1648
1658
  );
1649
1659
  }
1650
- function de(s) {
1651
- const t = Gt(5);
1660
+ function fe(s) {
1661
+ const t = Lt(5);
1652
1662
  return (
1653
1663
  /**
1654
1664
  * @param {number|undefined} rotation Rotation.
@@ -1661,12 +1671,12 @@ function de(s) {
1661
1671
  );
1662
1672
  }
1663
1673
  const P = 0;
1664
- class fe extends it {
1674
+ class Re extends it {
1665
1675
  /**
1666
1676
  * @param {ViewOptions} [options] View options.
1667
1677
  */
1668
1678
  constructor(t) {
1669
- super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = L(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection && Ht(), t.center && (t.center = y(t.center, this.projection_)), t.extent && (t.extent = E(t.extent, this.projection_)), this.applyOptions_(t);
1679
+ super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = L(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection && Wt(), t.center && (t.center = y(t.center, this.projection_)), t.extent && (t.extent = v(t.extent, this.projection_)), this.applyOptions_(t);
1670
1680
  }
1671
1681
  /**
1672
1682
  * Set up the view with the given options.
@@ -1677,13 +1687,13 @@ class fe extends it {
1677
1687
  for (const l in M)
1678
1688
  delete e[l];
1679
1689
  this.setProperties(e, !0);
1680
- const n = At(t);
1690
+ const n = wt(t);
1681
1691
  this.maxResolution_ = n.maxResolution, this.minResolution_ = n.minResolution, this.zoomFactor_ = n.zoomFactor, this.resolutions_ = t.resolutions, this.padding_ = t.padding, this.minZoom_ = n.minZoom;
1682
- const i = It(t), r = n.constraint, o = wt(t);
1692
+ const i = At(t), o = n.constraint, r = Nt(t);
1683
1693
  this.constraints_ = {
1684
1694
  center: i,
1685
- resolution: r,
1686
- rotation: o
1695
+ resolution: o,
1696
+ rotation: r
1687
1697
  }, this.setRotation(t.rotation !== void 0 ? t.rotation : 0), this.setCenterInternal(
1688
1698
  t.center !== void 0 ? t.center : null
1689
1699
  ), t.resolution !== void 0 ? this.setResolution(t.resolution) : t.zoom !== void 0 && this.setZoom(t.zoom);
@@ -1707,8 +1717,8 @@ class fe extends it {
1707
1717
  if (n) {
1708
1718
  const i = t || [0, 0, 0, 0];
1709
1719
  e = e || [0, 0, 0, 0];
1710
- const r = this.getResolution(), o = r / 2 * (i[3] - e[3] + e[1] - i[1]), l = r / 2 * (i[0] - e[0] + e[2] - i[2]);
1711
- this.setCenterInternal([n[0] + o, n[1] - l]);
1720
+ const o = this.getResolution(), r = o / 2 * (i[3] - e[3] + e[1] - i[1]), l = o / 2 * (i[0] - e[0] + e[2] - i[2]);
1721
+ this.setCenterInternal([n[0] + r, n[1] - l]);
1712
1722
  }
1713
1723
  }
1714
1724
  /**
@@ -1783,29 +1793,29 @@ class fe extends it {
1783
1793
  h.center && this.setCenterInternal(h.center), h.zoom !== void 0 ? this.setZoom(h.zoom) : h.resolution && this.setResolution(h.resolution), h.rotation !== void 0 && this.setRotation(h.rotation);
1784
1794
  }
1785
1795
  if (i === e) {
1786
- n && v(n, !0);
1796
+ n && S(n, !0);
1787
1797
  return;
1788
1798
  }
1789
- let r = Date.now(), o = this.targetCenter_.slice(), l = this.targetResolution_, a = this.targetRotation_;
1799
+ let o = Date.now(), r = this.targetCenter_.slice(), l = this.targetResolution_, a = this.targetRotation_;
1790
1800
  const c = [];
1791
1801
  for (; i < e; ++i) {
1792
1802
  const h = (
1793
1803
  /** @type {AnimationOptions} */
1794
1804
  arguments[i]
1795
1805
  ), u = {
1796
- start: r,
1806
+ start: o,
1797
1807
  complete: !1,
1798
1808
  anchor: h.anchor,
1799
1809
  duration: h.duration !== void 0 ? h.duration : 1e3,
1800
- easing: h.easing || $t,
1810
+ easing: h.easing || Bt,
1801
1811
  callback: n
1802
1812
  };
1803
- if (h.center && (u.sourceCenter = o, u.targetCenter = h.center.slice(), o = u.targetCenter), h.zoom !== void 0 ? (u.sourceResolution = l, u.targetResolution = this.getResolutionForZoom(h.zoom), l = u.targetResolution) : h.resolution && (u.sourceResolution = l, u.targetResolution = h.resolution, l = u.targetResolution), h.rotation !== void 0) {
1813
+ if (h.center && (u.sourceCenter = r, u.targetCenter = h.center.slice(), r = u.targetCenter), h.zoom !== void 0 ? (u.sourceResolution = l, u.targetResolution = this.getResolutionForZoom(h.zoom), l = u.targetResolution) : h.resolution && (u.sourceResolution = l, u.targetResolution = h.resolution, l = u.targetResolution), h.rotation !== void 0) {
1804
1814
  u.sourceRotation = a;
1805
1815
  const g = q(h.rotation - a + Math.PI, 2 * Math.PI) - Math.PI;
1806
1816
  u.targetRotation = a + g, a = u.targetRotation;
1807
1817
  }
1808
- Nt(u) ? u.complete = !0 : r += u.duration, c.push(u);
1818
+ jt(u) ? u.complete = !0 : o += u.duration, c.push(u);
1809
1819
  }
1810
1820
  this.animations_.push(c), this.setHint(I.ANIMATING, 1), this.updateAnimations_();
1811
1821
  }
@@ -1834,9 +1844,9 @@ class fe extends it {
1834
1844
  let t;
1835
1845
  for (let e = 0, n = this.animations_.length; e < n; ++e) {
1836
1846
  const i = this.animations_[e];
1837
- if (i[0].callback && v(i[0].callback, !1), !t)
1838
- for (let r = 0, o = i.length; r < o; ++r) {
1839
- const l = i[r];
1847
+ if (i[0].callback && S(i[0].callback, !1), !t)
1848
+ for (let o = 0, r = i.length; o < r; ++o) {
1849
+ const l = i[o];
1840
1850
  if (!l.complete) {
1841
1851
  t = l.anchor;
1842
1852
  break;
@@ -1855,14 +1865,14 @@ class fe extends it {
1855
1865
  let e = !1;
1856
1866
  for (let n = this.animations_.length - 1; n >= 0; --n) {
1857
1867
  const i = this.animations_[n];
1858
- let r = !0;
1859
- for (let o = 0, l = i.length; o < l; ++o) {
1860
- const a = i[o];
1868
+ let o = !0;
1869
+ for (let r = 0, l = i.length; r < l; ++r) {
1870
+ const a = i[r];
1861
1871
  if (a.complete)
1862
1872
  continue;
1863
1873
  const c = t - a.start;
1864
1874
  let h = a.duration > 0 ? c / a.duration : 1;
1865
- h >= 1 ? (a.complete = !0, h = 1) : r = !1;
1875
+ h >= 1 ? (a.complete = !0, h = 1) : o = !1;
1866
1876
  const u = a.easing(h);
1867
1877
  if (a.sourceCenter) {
1868
1878
  const g = a.sourceCenter[0], d = a.sourceCenter[1], f = a.targetCenter[0], R = a.targetCenter[1];
@@ -1903,10 +1913,10 @@ class fe extends it {
1903
1913
  if (this.applyTargetState_(!0), e = !0, !a.complete)
1904
1914
  break;
1905
1915
  }
1906
- if (r) {
1916
+ if (o) {
1907
1917
  this.animations_[n] = null, this.setHint(I.ANIMATING, -1), this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN;
1908
- const o = i[0].callback;
1909
- o && v(o, !0);
1918
+ const r = i[0].callback;
1919
+ r && S(r, !0);
1910
1920
  }
1911
1921
  }
1912
1922
  this.animations_ = this.animations_.filter(Boolean), e && this.updateAnimationKey_ === void 0 && (this.updateAnimationKey_ = requestAnimationFrame(
@@ -1921,7 +1931,7 @@ class fe extends it {
1921
1931
  calculateCenterRotate(t, e) {
1922
1932
  let n;
1923
1933
  const i = this.getCenterInternal();
1924
- return i !== void 0 && (n = [i[0] - e[0], i[1] - e[1]], Ot(n, t - this.getRotation()), Vt(n, e)), n;
1934
+ return i !== void 0 && (n = [i[0] - e[0], i[1] - e[1]], Vt(n, t - this.getRotation()), kt(n, e)), n;
1925
1935
  }
1926
1936
  /**
1927
1937
  * @param {number} resolution Target resolution.
@@ -1930,10 +1940,10 @@ class fe extends it {
1930
1940
  */
1931
1941
  calculateCenterZoom(t, e) {
1932
1942
  let n;
1933
- const i = this.getCenterInternal(), r = this.getResolution();
1934
- if (i !== void 0 && r !== void 0) {
1935
- const o = e[0] - t * (e[0] - i[0]) / r, l = e[1] - t * (e[1] - i[1]) / r;
1936
- n = [o, l];
1943
+ const i = this.getCenterInternal(), o = this.getResolution();
1944
+ if (i !== void 0 && o !== void 0) {
1945
+ const r = e[0] - t * (e[0] - i[0]) / o, l = e[1] - t * (e[1] - i[1]) / o;
1946
+ n = [r, l];
1937
1947
  }
1938
1948
  return n;
1939
1949
  }
@@ -2015,7 +2025,7 @@ class fe extends it {
2015
2025
  */
2016
2026
  calculateExtent(t) {
2017
2027
  const e = this.calculateExtentInternal(t);
2018
- return kt(e, this.getProjection());
2028
+ return Ut(e, this.getProjection());
2019
2029
  }
2020
2030
  /**
2021
2031
  * @param {import("./size.js").Size} [size] Box pixel size. If not provided,
@@ -2038,7 +2048,7 @@ class fe extends it {
2038
2048
  /** @type {!number} */
2039
2049
  this.getRotation()
2040
2050
  );
2041
- return N(i !== void 0, "The view rotation is not defined"), Ut(e, n, i, t);
2051
+ return N(i !== void 0, "The view rotation is not defined"), Dt(e, n, i, t);
2042
2052
  }
2043
2053
  /**
2044
2054
  * Get the maximum resolution of the view.
@@ -2141,7 +2151,7 @@ class fe extends it {
2141
2151
  */
2142
2152
  getResolutionForExtent(t, e) {
2143
2153
  return this.getResolutionForExtentInternal(
2144
- E(t, this.getProjection()),
2154
+ v(t, this.getProjection()),
2145
2155
  e
2146
2156
  );
2147
2157
  }
@@ -2171,8 +2181,8 @@ class fe extends it {
2171
2181
  * @param {number} value Value.
2172
2182
  * @return {number} Resolution.
2173
2183
  */
2174
- (function(r) {
2175
- return e / Math.pow(t, r * i);
2184
+ (function(o) {
2185
+ return e / Math.pow(t, o * i);
2176
2186
  })
2177
2187
  );
2178
2188
  }
@@ -2195,14 +2205,14 @@ class fe extends it {
2195
2205
  * @return {function(number): number} Value for resolution function.
2196
2206
  */
2197
2207
  getValueForResolutionFunction(t) {
2198
- const e = Math.log(t || 2), n = this.getConstrainedResolution(this.maxResolution_), i = this.minResolution_, r = Math.log(n / i) / e;
2208
+ const e = Math.log(t || 2), n = this.getConstrainedResolution(this.maxResolution_), i = this.minResolution_, o = Math.log(n / i) / e;
2199
2209
  return (
2200
2210
  /**
2201
2211
  * @param {number} resolution Resolution.
2202
2212
  * @return {number} Value.
2203
2213
  */
2204
- (function(o) {
2205
- return Math.log(n / o) / e / r;
2214
+ (function(r) {
2215
+ return Math.log(n / r) / e / o;
2206
2216
  })
2207
2217
  );
2208
2218
  }
@@ -2229,13 +2239,13 @@ class fe extends it {
2229
2239
  /** @type {import("./coordinate.js").Coordinate} */
2230
2240
  this.getCenterInternal()
2231
2241
  );
2232
- const r = this.padding_;
2233
- if (r) {
2234
- const o = this.getViewportSizeMinusPadding_();
2242
+ const o = this.padding_;
2243
+ if (o) {
2244
+ const r = this.getViewportSizeMinusPadding_();
2235
2245
  i = X(
2236
2246
  i,
2237
2247
  this.getViewportSize_(),
2238
- [o[0] / 2 + r[3], o[1] / 2 + r[0]],
2248
+ [r[0] / 2 + o[3], r[1] / 2 + o[0]],
2239
2249
  e,
2240
2250
  n
2241
2251
  );
@@ -2281,8 +2291,8 @@ class fe extends it {
2281
2291
  getZoomForResolution(t) {
2282
2292
  let e = this.minZoom_ || 0, n, i;
2283
2293
  if (this.resolutions_) {
2284
- const r = rt(this.resolutions_, t, 1);
2285
- e = r, n = this.resolutions_[r], r == this.resolutions_.length - 1 ? i = 2 : i = n / this.resolutions_[r + 1];
2294
+ const o = at(this.resolutions_, t, 1);
2295
+ e = o, n = this.resolutions_[o], o == this.resolutions_.length - 1 ? i = 2 : i = n / this.resolutions_[o + 1];
2286
2296
  } else
2287
2297
  n = this.maxResolution_, i = this.zoomFactor_;
2288
2298
  return e + Math.log(n / t) / Math.log(i);
@@ -2327,14 +2337,14 @@ class fe extends it {
2327
2337
  !ot(t),
2328
2338
  "Cannot fit empty extent provided as `geometry`"
2329
2339
  );
2330
- const i = E(t, this.getProjection());
2340
+ const i = v(t, this.getProjection());
2331
2341
  n = tt(i);
2332
2342
  } else if (t.getType() === "Circle") {
2333
- const i = E(
2343
+ const i = v(
2334
2344
  t.getExtent(),
2335
2345
  this.getProjection()
2336
2346
  );
2337
- n = tt(i), n.rotate(this.getRotation(), S(i));
2347
+ n = tt(i), n.rotate(this.getRotation(), Z(i));
2338
2348
  } else
2339
2349
  n = t;
2340
2350
  this.fitInternal(n, e);
@@ -2345,10 +2355,10 @@ class fe extends it {
2345
2355
  * @return {import("./extent").Extent} The rotated extent for the geometry.
2346
2356
  */
2347
2357
  rotatedExtentForGeometry(t) {
2348
- const e = this.getRotation(), n = Math.cos(e), i = Math.sin(-e), r = t.getFlatCoordinates(), o = t.getStride();
2358
+ const e = this.getRotation(), n = Math.cos(e), i = Math.sin(-e), o = t.getFlatCoordinates(), r = t.getStride();
2349
2359
  let l = 1 / 0, a = 1 / 0, c = -1 / 0, h = -1 / 0;
2350
- for (let u = 0, g = r.length; u < g; u += o) {
2351
- const d = r[u] * n - r[u + 1] * i, f = r[u] * i + r[u + 1] * n;
2360
+ for (let u = 0, g = o.length; u < g; u += r) {
2361
+ const d = o[u] * n - o[u + 1] * i, f = o[u] * i + o[u + 1] * n;
2352
2362
  l = Math.min(l, d), a = Math.min(a, f), c = Math.max(c, d), h = Math.max(h, f);
2353
2363
  }
2354
2364
  return [l, a, c, h];
@@ -2361,18 +2371,18 @@ class fe extends it {
2361
2371
  e = e || {};
2362
2372
  let n = e.size;
2363
2373
  n || (n = this.getViewportSizeMinusPadding_());
2364
- const i = e.padding !== void 0 ? e.padding : [0, 0, 0, 0], r = e.nearest !== void 0 ? e.nearest : !1;
2365
- let o;
2366
- e.minResolution !== void 0 ? o = e.minResolution : e.maxZoom !== void 0 ? o = this.getResolutionForZoom(e.maxZoom) : o = 0;
2374
+ const i = e.padding !== void 0 ? e.padding : [0, 0, 0, 0], o = e.nearest !== void 0 ? e.nearest : !1;
2375
+ let r;
2376
+ e.minResolution !== void 0 ? r = e.minResolution : e.maxZoom !== void 0 ? r = this.getResolutionForZoom(e.maxZoom) : r = 0;
2367
2377
  const l = this.rotatedExtentForGeometry(t);
2368
2378
  let a = this.getResolutionForExtentInternal(l, [
2369
2379
  n[0] - i[1] - i[3],
2370
2380
  n[1] - i[0] - i[2]
2371
2381
  ]);
2372
- a = isNaN(a) ? o : Math.max(a, o), a = this.getConstrainedResolution(a, r ? 0 : 1);
2373
- const c = this.getRotation(), h = Math.sin(c), u = Math.cos(c), g = S(l);
2382
+ a = isNaN(a) ? r : Math.max(a, r), a = this.getConstrainedResolution(a, o ? 0 : 1);
2383
+ const c = this.getRotation(), h = Math.sin(c), u = Math.cos(c), g = Z(l);
2374
2384
  g[0] += (i[1] - i[3]) / 2 * a, g[1] += (i[0] - i[2]) / 2 * a;
2375
- const d = g[0] * u - g[1] * h, f = g[1] * u + g[0] * h, R = this.getConstrainedCenter([d, f], a), _ = e.callback ? e.callback : Dt;
2385
+ const d = g[0] * u - g[1] * h, f = g[1] * u + g[0] * h, R = this.getConstrainedCenter([d, f], a), _ = e.callback ? e.callback : Ht;
2376
2386
  e.duration !== void 0 ? this.animateInternal(
2377
2387
  {
2378
2388
  resolution: a,
@@ -2381,7 +2391,7 @@ class fe extends it {
2381
2391
  easing: e.easing
2382
2392
  },
2383
2393
  _
2384
- ) : (this.targetResolution_ = a, this.targetCenter_ = R, this.applyTargetState_(!1, !0), v(_, !0));
2394
+ ) : (this.targetResolution_ = a, this.targetCenter_ = R, this.applyTargetState_(!1, !0), S(_, !0));
2385
2395
  }
2386
2396
  /**
2387
2397
  * Center on coordinate and view position.
@@ -2422,22 +2432,22 @@ class fe extends it {
2422
2432
  * @return {Array<number>|undefined} Center shift.
2423
2433
  */
2424
2434
  calculateCenterShift(t, e, n, i) {
2425
- let r;
2426
- const o = this.padding_;
2427
- if (o && t) {
2435
+ let o;
2436
+ const r = this.padding_;
2437
+ if (r && t) {
2428
2438
  const l = this.getViewportSizeMinusPadding_(-n), a = X(
2429
2439
  t,
2430
2440
  i,
2431
- [l[0] / 2 + o[3], l[1] / 2 + o[0]],
2441
+ [l[0] / 2 + r[3], l[1] / 2 + r[0]],
2432
2442
  e,
2433
2443
  n
2434
2444
  );
2435
- r = [
2445
+ o = [
2436
2446
  t[0] - a[0],
2437
2447
  t[1] - a[1]
2438
2448
  ];
2439
2449
  }
2440
- return r;
2450
+ return o;
2441
2451
  }
2442
2452
  /**
2443
2453
  * @return {boolean} Is defined.
@@ -2485,13 +2495,13 @@ class fe extends it {
2485
2495
  * @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
2486
2496
  */
2487
2497
  adjustResolutionInternal(t, e) {
2488
- const n = this.getAnimating() || this.getInteracting(), i = this.getViewportSize_(this.getRotation()), r = this.constraints_.resolution(
2498
+ const n = this.getAnimating() || this.getInteracting(), i = this.getViewportSize_(this.getRotation()), o = this.constraints_.resolution(
2489
2499
  this.targetResolution_ * t,
2490
2500
  0,
2491
2501
  i,
2492
2502
  n
2493
2503
  );
2494
- e && (this.targetCenter_ = this.calculateCenterZoom(r, e)), this.targetResolution_ *= t, this.applyTargetState_();
2504
+ e && (this.targetCenter_ = this.calculateCenterZoom(o, e)), this.targetResolution_ *= t, this.applyTargetState_();
2495
2505
  }
2496
2506
  /**
2497
2507
  * Adds a value to the view zoom level, optionally using an anchor. Any resolution
@@ -2588,24 +2598,24 @@ class fe extends it {
2588
2598
  const n = this.getAnimating() || this.getInteracting() || e, i = this.constraints_.rotation(
2589
2599
  this.targetRotation_,
2590
2600
  n
2591
- ), r = this.getViewportSize_(i), o = this.constraints_.resolution(
2601
+ ), o = this.getViewportSize_(i), r = this.constraints_.resolution(
2592
2602
  this.targetResolution_,
2593
2603
  0,
2594
- r,
2604
+ o,
2595
2605
  n
2596
2606
  ), l = this.constraints_.center(
2597
2607
  this.targetCenter_,
2598
- o,
2599
2608
  r,
2609
+ o,
2600
2610
  n,
2601
2611
  this.calculateCenterShift(
2602
2612
  this.targetCenter_,
2603
- o,
2613
+ r,
2604
2614
  i,
2605
- r
2615
+ o
2606
2616
  )
2607
2617
  );
2608
- this.get(M.ROTATION) !== i && this.set(M.ROTATION, i), this.get(M.RESOLUTION) !== o && (this.set(M.RESOLUTION, o), this.set("zoom", this.getZoom(), !0)), (!l || !this.get(M.CENTER) || !Y(this.get(M.CENTER), l)) && this.set(M.CENTER, l), this.getAnimating() && !t && this.cancelAnimations(), this.cancelAnchor_ = void 0;
2618
+ this.get(M.ROTATION) !== i && this.set(M.ROTATION, i), this.get(M.RESOLUTION) !== r && (this.set(M.RESOLUTION, r), this.set("zoom", this.getZoom(), !0)), (!l || !this.get(M.CENTER) || !Y(this.get(M.CENTER), l)) && this.set(M.CENTER, l), this.getAnimating() && !t && this.cancelAnimations(), this.cancelAnchor_ = void 0;
2609
2619
  }
2610
2620
  /**
2611
2621
  * If any constraints need to be applied, an animation will be triggered.
@@ -2618,32 +2628,32 @@ class fe extends it {
2618
2628
  */
2619
2629
  resolveConstraints(t, e, n) {
2620
2630
  t = t !== void 0 ? t : 200;
2621
- const i = e || 0, r = this.constraints_.rotation(this.targetRotation_), o = this.getViewportSize_(r), l = this.constraints_.resolution(
2631
+ const i = e || 0, o = this.constraints_.rotation(this.targetRotation_), r = this.getViewportSize_(o), l = this.constraints_.resolution(
2622
2632
  this.targetResolution_,
2623
2633
  i,
2624
- o
2634
+ r
2625
2635
  ), a = this.constraints_.center(
2626
2636
  this.targetCenter_,
2627
2637
  l,
2628
- o,
2638
+ r,
2629
2639
  !1,
2630
2640
  this.calculateCenterShift(
2631
2641
  this.targetCenter_,
2632
2642
  l,
2633
- r,
2634
- o
2643
+ o,
2644
+ r
2635
2645
  )
2636
2646
  );
2637
2647
  if (t === 0 && !this.cancelAnchor_) {
2638
- this.targetResolution_ = l, this.targetRotation_ = r, this.targetCenter_ = a, this.applyTargetState_();
2648
+ this.targetResolution_ = l, this.targetRotation_ = o, this.targetCenter_ = a, this.applyTargetState_();
2639
2649
  return;
2640
2650
  }
2641
- n = n || (t === 0 ? this.cancelAnchor_ : void 0), this.cancelAnchor_ = void 0, (this.getResolution() !== l || this.getRotation() !== r || !this.getCenterInternal() || !Y(this.getCenterInternal(), a)) && (this.getAnimating() && this.cancelAnimations(), this.animateInternal({
2642
- rotation: r,
2651
+ n = n || (t === 0 ? this.cancelAnchor_ : void 0), this.cancelAnchor_ = void 0, (this.getResolution() !== l || this.getRotation() !== o || !this.getCenterInternal() || !Y(this.getCenterInternal(), a)) && (this.getAnimating() && this.cancelAnimations(), this.animateInternal({
2652
+ rotation: o,
2643
2653
  center: a,
2644
2654
  resolution: l,
2645
2655
  duration: t,
2646
- easing: Bt,
2656
+ easing: Qt,
2647
2657
  anchor: n
2648
2658
  }));
2649
2659
  }
@@ -2722,12 +2732,12 @@ class fe extends it {
2722
2732
  return this.constraints_.resolution(t, e, n);
2723
2733
  }
2724
2734
  }
2725
- function v(s, t) {
2735
+ function S(s, t) {
2726
2736
  setTimeout(function() {
2727
2737
  s(t);
2728
2738
  }, 0);
2729
2739
  }
2730
- function It(s) {
2740
+ function At(s) {
2731
2741
  if (s.extent !== void 0) {
2732
2742
  const e = s.smoothExtentConstraint !== void 0 ? s.smoothExtentConstraint : !0;
2733
2743
  return $(s.extent, s.constrainOnlyCenter, e);
@@ -2737,15 +2747,15 @@ function It(s) {
2737
2747
  const e = t.getExtent().slice();
2738
2748
  return e[0] = -1 / 0, e[2] = 1 / 0, $(e, !1, !1);
2739
2749
  }
2740
- return Qt;
2750
+ return te;
2741
2751
  }
2742
- function At(s) {
2743
- let t, e, n, o = s.minZoom !== void 0 ? s.minZoom : P, l = s.maxZoom !== void 0 ? s.maxZoom : 28;
2752
+ function wt(s) {
2753
+ let t, e, n, r = s.minZoom !== void 0 ? s.minZoom : P, l = s.maxZoom !== void 0 ? s.maxZoom : 28;
2744
2754
  const a = s.zoomFactor !== void 0 ? s.zoomFactor : 2, c = s.multiWorld !== void 0 ? s.multiWorld : !1, h = s.smoothResolutionConstraint !== void 0 ? s.smoothResolutionConstraint : !0, u = s.showFullExtent !== void 0 ? s.showFullExtent : !1, g = L(s.projection, "EPSG:3857"), d = g.getExtent();
2745
2755
  let f = s.constrainOnlyCenter, R = s.extent;
2746
2756
  if (!c && !R && g.isGlobal() && (f = !1, R = d), s.resolutions !== void 0) {
2747
2757
  const _ = s.resolutions;
2748
- e = _[o], n = _[l] !== void 0 ? _[l] : _[_.length - 1], s.constrainResolution ? t = he(
2758
+ e = _[r], n = _[l] !== void 0 ? _[l] : _[_.length - 1], s.constrainResolution ? t = ue(
2749
2759
  _,
2750
2760
  h,
2751
2761
  !f && R,
@@ -2760,11 +2770,11 @@ function At(s) {
2760
2770
  } else {
2761
2771
  const C = (d ? Math.max(G(d), F(d)) : (
2762
2772
  // use an extent that can fit the whole world if need be
2763
- 360 * Lt.degrees / g.getMetersPerUnit()
2773
+ 360 * Ot.degrees / g.getMetersPerUnit()
2764
2774
  )) / Jt / Math.pow(2, P), m = C / Math.pow(2, 28 - P);
2765
- e = s.maxResolution, e !== void 0 ? o = 0 : e = C / Math.pow(a, o), n = s.minResolution, n === void 0 && (s.maxZoom !== void 0 ? s.maxResolution !== void 0 ? n = e / Math.pow(a, l) : n = C / Math.pow(a, l) : n = m), l = o + Math.floor(
2775
+ e = s.maxResolution, e !== void 0 ? r = 0 : e = C / Math.pow(a, r), n = s.minResolution, n === void 0 && (s.maxZoom !== void 0 ? s.maxResolution !== void 0 ? n = e / Math.pow(a, l) : n = C / Math.pow(a, l) : n = m), l = r + Math.floor(
2766
2776
  Math.log(e / n) / Math.log(a)
2767
- ), n = e / Math.pow(a, l - o), s.constrainResolution ? t = ue(
2777
+ ), n = e / Math.pow(a, l - r), s.constrainResolution ? t = ce(
2768
2778
  a,
2769
2779
  e,
2770
2780
  n,
@@ -2783,76 +2793,77 @@ function At(s) {
2783
2793
  constraint: t,
2784
2794
  maxResolution: e,
2785
2795
  minResolution: n,
2786
- minZoom: o,
2796
+ minZoom: r,
2787
2797
  zoomFactor: a
2788
2798
  };
2789
2799
  }
2790
- function wt(s) {
2800
+ function Nt(s) {
2791
2801
  if (s.enableRotation !== void 0 ? s.enableRotation : !0) {
2792
2802
  const e = s.constrainRotation;
2793
- return e === void 0 || e === !0 ? de() : e === !1 ? nt : typeof e == "number" ? ge(e) : nt;
2803
+ return e === void 0 || e === !0 ? fe() : e === !1 ? nt : typeof e == "number" ? de(e) : nt;
2794
2804
  }
2795
- return ce;
2805
+ return ge;
2796
2806
  }
2797
- function Nt(s) {
2807
+ function jt(s) {
2798
2808
  return !(s.sourceCenter && s.targetCenter && !Y(s.sourceCenter, s.targetCenter) || s.sourceResolution !== s.targetResolution || s.sourceRotation !== s.targetRotation);
2799
2809
  }
2800
2810
  function X(s, t, e, n, i) {
2801
- const r = Math.cos(-i);
2802
- let o = Math.sin(-i), l = s[0] * r - s[1] * o, a = s[1] * r + s[0] * o;
2803
- l += (t[0] / 2 - e[0]) * n, a += (e[1] - t[1] / 2) * n, o = -o;
2804
- const c = l * r - a * o, h = a * r + l * o;
2811
+ const o = Math.cos(-i);
2812
+ let r = Math.sin(-i), l = s[0] * o - s[1] * r, a = s[1] * o + s[0] * r;
2813
+ l += (t[0] / 2 - e[0]) * n, a += (e[1] - t[1] / 2) * n, r = -r;
2814
+ const c = l * o - a * r, h = a * o + l * r;
2805
2815
  return [c, h];
2806
2816
  }
2807
- const Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2817
+ const ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2808
2818
  __proto__: null,
2809
- createCenterConstraint: It,
2810
- createResolutionConstraint: At,
2811
- createRotationConstraint: wt,
2812
- default: fe,
2813
- isNoopAnimation: Nt
2819
+ createCenterConstraint: At,
2820
+ createResolutionConstraint: wt,
2821
+ createRotationConstraint: Nt,
2822
+ default: Re,
2823
+ isNoopAnimation: jt
2814
2824
  }, Symbol.toStringTag, { value: "Module" }));
2815
2825
  export {
2816
2826
  A,
2817
- me as B,
2818
- J as C,
2819
- yt as D,
2827
+ Ce as B,
2828
+ Q as C,
2829
+ It as D,
2820
2830
  b as E,
2821
- oe as F,
2822
- se as G,
2823
- fe as H,
2824
- M as I,
2825
- tt as J,
2826
- ce as K,
2831
+ re as F,
2832
+ oe as G,
2833
+ Ee as H,
2834
+ Re as I,
2835
+ M as J,
2836
+ tt as K,
2827
2837
  T as L,
2828
- Te as M,
2838
+ ge as M,
2839
+ ve as N,
2829
2840
  V as P,
2830
2841
  O as S,
2831
2842
  I as V,
2832
- dt as a,
2833
- xt as b,
2834
- Rt as c,
2835
- re as d,
2836
- gt as e,
2837
- ft as f,
2838
- Ct as g,
2839
- Ie as h,
2840
- mt as i,
2841
- _t as j,
2842
- xe as k,
2843
- Me as l,
2844
- ct as m,
2845
- Ce as n,
2846
- je as o,
2847
- ye as p,
2848
- we as q,
2849
- te as r,
2850
- Ne as s,
2851
- Ae as t,
2852
- Z as u,
2853
- pe as v,
2854
- pt as w,
2855
- Fe as x,
2856
- lt as y,
2857
- Mt as z
2843
+ ft as a,
2844
+ Mt as b,
2845
+ _t as c,
2846
+ ae as d,
2847
+ dt as e,
2848
+ Rt as f,
2849
+ xt as g,
2850
+ Ae as h,
2851
+ Ct as i,
2852
+ mt as j,
2853
+ Me as k,
2854
+ pe as l,
2855
+ gt as m,
2856
+ xe as n,
2857
+ Fe as o,
2858
+ Ie as p,
2859
+ Ne as q,
2860
+ ee as r,
2861
+ je as s,
2862
+ we as t,
2863
+ E as u,
2864
+ ye as v,
2865
+ yt as w,
2866
+ Te as x,
2867
+ ht as y,
2868
+ pt as z
2858
2869
  };