@datagouv/components-next 1.0.2-dev.113 → 1.0.2-dev.114

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 (31) hide show
  1. package/dist/{Control-ZFh5ta_U.js → Control-b-43UT2B.js} +10 -10
  2. package/dist/{Datafair.client-CKB2P_X1.js → Datafair.client-BH351yV9.js} +4 -4
  3. package/dist/{Event-DSQcW7OF.js → Event-py_AAwJY.js} +18 -18
  4. package/dist/{Image-BijNEG0p.js → Image-BHQYZWzH.js} +23 -23
  5. package/dist/{JsonPreview.client-Bx11-jfT.js → JsonPreview.client-CawLfTe_.js} +5 -5
  6. package/dist/{Map-BUtPf5GN.js → Map-CtP7leHl.js} +1313 -1173
  7. package/dist/{MapContainer.client-CdZSeT_L.js → MapContainer.client-DN8kHTOA.js} +17 -17
  8. package/dist/{OSM-D4MTdBtk.js → OSM-gdDSIsDA.js} +15 -23
  9. package/dist/{PdfPreview.client-Bh9lP-qU.js → PdfPreview.client-BGOycK0h.js} +6 -10
  10. package/dist/Pmtiles.client-CRaI4U8S.js +26123 -0
  11. package/dist/{PreviewWrapper.vue_vue_type_script_setup_true_lang-BnC7vWGP.js → PreviewWrapper.vue_vue_type_script_setup_true_lang-DAddoRna.js} +2 -2
  12. package/dist/{ScaleLine-hJQIqcZm.js → ScaleLine-hG-FhNqy.js} +2 -2
  13. package/dist/{Tile-Dcl7oIVu.js → Tile-D6rFonpT.js} +163 -166
  14. package/dist/{TileImage-BJeHipMX.js → TileImage-cfrEgz5y.js} +131 -119
  15. package/dist/{View-xp_P_OHw.js → View-vp7vDb9q.js} +169 -119
  16. package/dist/{XmlPreview.client-oFAOv828.js → XmlPreview.client-Dyv0J4kw.js} +5 -5
  17. package/dist/{common-BjQlan3k.js → common-C8efyyuc.js} +49 -49
  18. package/dist/components-next.css +1 -52
  19. package/dist/components-next.js +36 -36
  20. package/dist/components.css +2 -2
  21. package/dist/{index-CxCuKQ81.js → index-_qLRU0Z5.js} +6382 -6057
  22. package/dist/{leaflet-src-7m1mB8LI.js → leaflet-src-D_sX6kLJ.js} +162 -164
  23. package/dist/{main-CQ9ZQG7n.js → main-CR8bhz_w.js} +19161 -20321
  24. package/dist/{proj-CsNo9yH1.js → proj-CsjVeojN.js} +322 -306
  25. package/dist/{text-clamp.esm-B5kW_XMt.js → text-clamp.esm-DVseBqZZ.js} +4 -4
  26. package/dist/{tilecoord-A0fLnBZr.js → tilecoord-CPcQJnrF.js} +270 -261
  27. package/dist/{vue3-json-viewer-BXwup7nO.js → vue3-json-viewer-CJLQFzXZ.js} +10 -16
  28. package/dist/{vue3-xml-viewer.common-B9qp90K_.js → vue3-xml-viewer.common-DRgxPToX.js} +1 -1
  29. package/package.json +34 -34
  30. package/src/components/ResourceAccordion/Pmtiles.client.vue +3 -1
  31. package/dist/Pmtiles.client-Bi46wN14.js +0 -25185
@@ -1,18 +1,18 @@
1
- import { T as Oe, b as Pe, d as ye, g as ee, I as Ke, R as Me } from "./tilecoord-A0fLnBZr.js";
2
- import { T, h as Te, d as j, l as Ae, j as ze, W as be, c as me, t as je } from "./Image-BijNEG0p.js";
3
- import { aG as ke, aI as Fe, al as te, E as Ne, $ as Ze, an as we, aJ as Ue, aA as qe, aK as Ge, L as Be, F as Ve, n as We, e as He, X as Xe, a as k, aL as Ye, j as re, d as oe, a2 as Qe, i as $e, H as Je } from "./proj-CsNo9yH1.js";
4
- import { a as ne, e as ie, p as et, g as v, d as ae, n as tt, q as nt } from "./common-BjQlan3k.js";
5
- import { a as xe, c as it, R as X, L as st } from "./Event-DSQcW7OF.js";
6
- function le(u) {
1
+ import { T as De, a as Oe, d as _e, g as ee, I as Pe, R as Ke } from "./tilecoord-CPcQJnrF.js";
2
+ import { T as y, g as pe, I as k, i as Me, b as be, d as ze, c as Ce, t as Ae } from "./Image-BHQYZWzH.js";
3
+ import { D as ke, b as je, d as te, E as Fe, Q as Ne, ai as Ee, aj as Ze, a9 as Ue, a8 as qe, ao as Ge, ae as Be, y as Ve, U as We, u as He, am as j, ah as Xe, a2 as me, af as re, k as Ye, aq as Qe, N as $e } from "./proj-CsjVeojN.js";
4
+ import { c as ne, e as ie, h as Je, b as S, d as oe, t as et, y as tt } from "./common-C8efyyuc.js";
5
+ import { b as ye, R as nt, a as X, L as it } from "./Event-py_AAwJY.js";
6
+ function ae(u) {
7
7
  return u instanceof Image || u instanceof HTMLCanvasElement || u instanceof HTMLVideoElement || u instanceof ImageBitmap ? u : null;
8
8
  }
9
- const rt = new Error("disposed"), ot = [256, 256];
10
- class Re extends Oe {
9
+ const st = new Error("disposed"), rt = [256, 256];
10
+ class Te extends De {
11
11
  /**
12
12
  * @param {Options} options Tile options.
13
13
  */
14
14
  constructor(e) {
15
- const t = T.IDLE;
15
+ const t = y.IDLE;
16
16
  super(e.tileCoord, t, {
17
17
  transition: e.transition,
18
18
  interpolate: e.interpolate
@@ -25,8 +25,8 @@ class Re extends Oe {
25
25
  getSize() {
26
26
  if (this.size_)
27
27
  return this.size_;
28
- const e = le(this.data_);
29
- return e ? [e.width, e.height] : ot;
28
+ const e = ae(this.data_);
29
+ return e ? [e.width, e.height] : rt;
30
30
  }
31
31
  /**
32
32
  * Get the data for the tile.
@@ -50,14 +50,14 @@ class Re extends Oe {
50
50
  * @override
51
51
  */
52
52
  load() {
53
- if (this.state !== T.IDLE && this.state !== T.ERROR)
53
+ if (this.state !== y.IDLE && this.state !== y.ERROR)
54
54
  return;
55
- this.state = T.LOADING, this.changed();
55
+ this.state = y.LOADING, this.changed();
56
56
  const e = this;
57
57
  this.loader_().then(function(t) {
58
- e.data_ = t, e.state = T.LOADED, e.changed();
58
+ e.data_ = t, e.state = y.LOADED, e.changed();
59
59
  }).catch(function(t) {
60
- e.error_ = t, e.state = T.ERROR, e.changed();
60
+ e.error_ = t, e.state = y.ERROR, e.changed();
61
61
  });
62
62
  }
63
63
  /**
@@ -65,10 +65,10 @@ class Re extends Oe {
65
65
  * @override
66
66
  */
67
67
  disposeInternal() {
68
- this.controller_ && (this.controller_.abort(rt), this.controller_ = null), super.disposeInternal();
68
+ this.controller_ && (this.controller_.abort(st), this.controller_ = null), super.disposeInternal();
69
69
  }
70
70
  }
71
- class Ce {
71
+ class xe {
72
72
  /**
73
73
  * @param {number} [highWaterMark] High water mark.
74
74
  */
@@ -240,13 +240,13 @@ class Ce {
240
240
  this.highWaterMark = e;
241
241
  }
242
242
  }
243
- class at {
243
+ class ot {
244
244
  constructor() {
245
245
  this.instructions_ = [], this.zIndex = 0, this.offset_ = 0, this.context_ = /** @type {ZIndexContextProxy} */
246
- new Proxy(Te(), {
246
+ new Proxy(pe(), {
247
247
  get: (e, t) => {
248
248
  if (typeof /** @type {*} */
249
- Te()[t] == "function")
249
+ pe()[t] == "function")
250
250
  return this.push_(t), this.pushMethodArgs_;
251
251
  },
252
252
  set: (e, t, n) => (this.push_(t, n), !0)
@@ -319,13 +319,13 @@ class at {
319
319
  this.offset_ = this.instructions_.length, this.zIndex = 0;
320
320
  }
321
321
  }
322
- const lt = 5;
323
- class ct extends Fe {
322
+ const at = 5;
323
+ class lt extends je {
324
324
  /**
325
325
  * @param {LayerType} layer Layer.
326
326
  */
327
327
  constructor(e) {
328
- super(), this.ready = !0, this.boundHandleImageChange_ = this.handleImageChange_.bind(this), this.layer_ = e, this.staleKeys_ = new Array(), this.maxStaleKeys = lt;
328
+ super(), this.ready = !0, this.boundHandleImageChange_ = this.handleImageChange_.bind(this), this.layer_ = e, this.staleKeys_ = new Array(), this.maxStaleKeys = at;
329
329
  }
330
330
  /**
331
331
  * @return {Array<string>} Get the list of stale keys.
@@ -342,7 +342,7 @@ class ct extends Fe {
342
342
  /**
343
343
  * Asynchronous layer level hit detection.
344
344
  * @param {import("../pixel.js").Pixel} pixel Pixel.
345
- * @return {Promise<Array<import("../Feature").FeatureLike>>} Promise that resolves with
345
+ * @return {Promise<Array<import("../Feature.js").FeatureLike>>} Promise that resolves with
346
346
  * an array of features.
347
347
  */
348
348
  getFeatures(e) {
@@ -408,7 +408,7 @@ class ct extends Fe {
408
408
  /** @type {import("../Image.js").default} */
409
409
  e.target
410
410
  );
411
- (t.getState() === j.LOADED || t.getState() === j.ERROR) && this.renderIfReadyAndVisible();
411
+ (t.getState() === k.LOADED || t.getState() === k.ERROR) && this.renderIfReadyAndVisible();
412
412
  }
413
413
  /**
414
414
  * Load the image if not already loaded, and register the image change
@@ -419,7 +419,7 @@ class ct extends Fe {
419
419
  */
420
420
  loadImage(e) {
421
421
  let t = e.getState();
422
- return t != j.LOADED && t != j.ERROR && e.addEventListener(Ne.CHANGE, this.boundHandleImageChange_), t == j.IDLE && (e.load(), t = e.getState()), t == j.LOADED;
422
+ return t != k.LOADED && t != k.ERROR && e.addEventListener(Fe.CHANGE, this.boundHandleImageChange_), t == k.IDLE && (e.load(), t = e.getState()), t == k.LOADED;
423
423
  }
424
424
  /**
425
425
  * @protected
@@ -441,14 +441,14 @@ class ct extends Fe {
441
441
  delete this.layer_, super.disposeInternal();
442
442
  }
443
443
  }
444
- const Ct = [];
444
+ const Rt = [];
445
445
  let F = null;
446
- function ht() {
447
- F = me(1, 1, void 0, {
446
+ function ct() {
447
+ F = Ce(1, 1, void 0, {
448
448
  willReadFrequently: !0
449
449
  });
450
450
  }
451
- class dt extends ct {
451
+ class ht extends lt {
452
452
  /**
453
453
  * @param {LayerType} layer Layer.
454
454
  */
@@ -462,7 +462,7 @@ class dt extends ct {
462
462
  * @return {Uint8ClampedArray|null} The image data.
463
463
  */
464
464
  getImageData(e, t, n) {
465
- F || ht(), F.clearRect(0, 0, 1, 1);
465
+ F || ct(), F.clearRect(0, 0, 1, 1);
466
466
  let i;
467
467
  try {
468
468
  F.drawImage(e, t, n, 1, 1, 0, 0, 1, 1), i = F.getImageData(0, 0, 1, 1).data;
@@ -488,17 +488,17 @@ class dt extends ct {
488
488
  useContainer(e, t, n) {
489
489
  const i = this.getLayer().getClassName();
490
490
  let r, a;
491
- if (e && e.className === i && (!n || e && e.style.backgroundColor && Ze(
492
- xe(e.style.backgroundColor),
493
- xe(n)
491
+ if (e && e.className === i && (!n || e && e.style.backgroundColor && Ne(
492
+ ye(e.style.backgroundColor),
493
+ ye(n)
494
494
  ))) {
495
495
  const s = e.firstElementChild;
496
- Ae(s) && (a = s.getContext("2d"));
496
+ Me(s) && (a = s.getContext("2d"));
497
497
  }
498
- if (a && et(a.canvas.style.transform, t) ? (this.container = e, this.context = a, this.containerReused = !0) : this.containerReused ? (this.container = null, this.context = null, this.containerReused = !1) : this.container && (this.container.style.backgroundColor = null), !this.container) {
498
+ if (a && Je(a.canvas.style.transform, t) ? (this.container = e, this.context = a, this.containerReused = !0) : this.containerReused ? (this.container = null, this.context = null, this.containerReused = !1) : this.container && (this.container.style.backgroundColor = null), !this.container) {
499
499
  r = be ? ze() : document.createElement("div"), r.className = i;
500
500
  let s = r.style;
501
- s.position = "absolute", s.width = "100%", s.height = "100%", a = me();
501
+ s.position = "absolute", s.width = "100%", s.height = "100%", a = Ce();
502
502
  const l = (
503
503
  /** @type {HTMLCanvasElement} */
504
504
  a.canvas
@@ -514,10 +514,10 @@ class dt extends ct {
514
514
  * @protected
515
515
  */
516
516
  clipUnrotated(e, t, n) {
517
- const i = we(n), r = Ue(n), a = qe(n), s = Ge(n);
518
- v(t.coordinateToPixelTransform, i), v(t.coordinateToPixelTransform, r), v(t.coordinateToPixelTransform, a), v(t.coordinateToPixelTransform, s);
517
+ const i = Ee(n), r = Ze(n), a = Ue(n), s = qe(n);
518
+ S(t.coordinateToPixelTransform, i), S(t.coordinateToPixelTransform, r), S(t.coordinateToPixelTransform, a), S(t.coordinateToPixelTransform, s);
519
519
  const l = this.inversePixelTransform;
520
- v(l, i), v(l, r), v(l, a), v(l, s), e.save(), e.beginPath(), e.moveTo(Math.round(i[0]), Math.round(i[1])), e.lineTo(Math.round(r[0]), Math.round(r[1])), e.lineTo(Math.round(a[0]), Math.round(a[1])), e.lineTo(Math.round(s[0]), Math.round(s[1])), e.clip();
520
+ S(l, i), S(l, r), S(l, a), S(l, s), e.save(), e.beginPath(), e.moveTo(Math.round(i[0]), Math.round(i[1])), e.lineTo(Math.round(r[0]), Math.round(r[1])), e.lineTo(Math.round(a[0]), Math.round(a[1])), e.lineTo(Math.round(s[0]), Math.round(s[1])), e.clip();
521
521
  }
522
522
  /**
523
523
  * @param {import("../../Map.js").FrameState} frameState Frame state.
@@ -525,8 +525,8 @@ class dt extends ct {
525
525
  * @protected
526
526
  */
527
527
  prepareContainer(e, t) {
528
- const n = e.extent, i = e.viewState.resolution, r = e.viewState.rotation, a = e.pixelRatio, s = Math.round(Be(n) / i * a), l = Math.round(Ve(n) / i * a);
529
- ae(
528
+ const n = e.extent, i = e.viewState.resolution, r = e.viewState.rotation, a = e.pixelRatio, s = Math.round(Ge(n) / i * a), l = Math.round(Be(n) / i * a);
529
+ oe(
530
530
  this.pixelTransform,
531
531
  e.size[0] / 2,
532
532
  e.size[1] / 2,
@@ -535,8 +535,8 @@ class dt extends ct {
535
535
  r,
536
536
  -s / 2,
537
537
  -l / 2
538
- ), tt(this.inversePixelTransform, this.pixelTransform);
539
- const c = nt(this.pixelTransform);
538
+ ), et(this.inversePixelTransform, this.pixelTransform);
539
+ const c = tt(this.pixelTransform);
540
540
  if (this.useContainer(t, c, this.getBackground(e)), !this.containerReused) {
541
541
  const o = this.context.canvas;
542
542
  o.width != s || o.height != l ? (o.width = s, o.height = l) : this.context.clearRect(0, 0, s, l), c !== /** @type {HTMLCanvasElement} */
@@ -552,7 +552,7 @@ class dt extends ct {
552
552
  dispatchRenderEvent_(e, t, n) {
553
553
  const i = this.getLayer();
554
554
  if (i.hasListener(e)) {
555
- const r = new it(
555
+ const r = new nt(
556
556
  e,
557
557
  this.inversePixelTransform,
558
558
  n,
@@ -587,7 +587,7 @@ class dt extends ct {
587
587
  * @return {import('../../render/canvas/ZIndexContext.js').ZIndexContextProxy} Context.
588
588
  */
589
589
  getRenderContext(e) {
590
- return e.declutter && !this.deferredContext_ && (this.deferredContext_ = new at()), e.declutter ? this.deferredContext_.getContext() : this.context;
590
+ return e.declutter && !this.deferredContext_ && (this.deferredContext_ = new ot()), e.declutter ? this.deferredContext_.getContext() : this.context;
591
591
  }
592
592
  /**
593
593
  * @param {import("../../Map.js").FrameState} frameState Frame state.
@@ -618,7 +618,7 @@ class dt extends ct {
618
618
  */
619
619
  getRenderTransform(e, t, n, i, r, a, s) {
620
620
  const l = r / 2, c = a / 2, o = i / t, h = -o, d = -e[0] + s, g = -e[1];
621
- return ae(
621
+ return oe(
622
622
  this.tempTransform,
623
623
  l,
624
624
  c,
@@ -643,15 +643,15 @@ function se(u, e, t) {
643
643
  const n = u[t], i = n.has(e);
644
644
  return i || n.add(e), !i;
645
645
  }
646
- function ut(u, e, t) {
646
+ function dt(u, e, t) {
647
647
  const n = u[t];
648
648
  return n ? n.delete(e) : !1;
649
649
  }
650
- function Ee(u, e) {
650
+ function Re(u, e) {
651
651
  const t = u.layerStatesArray[u.layerIndex];
652
- t.extent && (e = oe(
652
+ t.extent && (e = re(
653
653
  e,
654
- re(t.extent, u.viewState.projection)
654
+ me(t.extent, u.viewState.projection)
655
655
  ));
656
656
  const n = (
657
657
  /** @type {import("../../source/Tile.js").default} */
@@ -659,19 +659,19 @@ function Ee(u, e) {
659
659
  );
660
660
  if (!n.getWrapX()) {
661
661
  const i = n.getTileGridForProjection(u.viewState.projection).getExtent();
662
- i && (e = oe(e, i));
662
+ i && (e = re(e, i));
663
663
  }
664
664
  return e;
665
665
  }
666
- class gt extends dt {
666
+ class ut extends ht {
667
667
  /**
668
668
  * @param {LayerType} tileLayer Tile layer.
669
669
  * @param {Options} [options] Options.
670
670
  */
671
671
  constructor(e, t) {
672
- super(e), t = t || {}, this.extentChanged = !0, this.renderComplete = !1, this.renderedExtent_ = null, this.renderedPixelRatio, this.renderedProjection = null, this.renderedTiles = [], this.renderedSourceKey_, this.renderedSourceRevision_, this.tempExtent = We(), this.tempTileRange_ = new Pe(0, 0, 0, 0), this.tempTileCoord_ = ye(0, 0, 0);
672
+ super(e), t = t || {}, this.extentChanged = !0, this.renderComplete = !1, this.renderedExtent_ = null, this.renderedPixelRatio, this.renderedProjection = null, this.renderedTiles = [], this.renderedSourceKey_, this.renderedSourceRevision_, this.tempExtent = Ve(), this.tempTileRange_ = new Oe(0, 0, 0, 0), this.tempTileCoord_ = _e(0, 0, 0);
673
673
  const n = t.cacheSize !== void 0 ? t.cacheSize : 512;
674
- this.tileCache_ = new Ce(n), this.sourceTileCache_ = null, this.maxStaleKeys = n * 0.5;
674
+ this.tileCache_ = new xe(n), this.sourceTileCache_ = null, this.layerExtent = null, this.maxStaleKeys = n * 0.5;
675
675
  }
676
676
  /**
677
677
  * @return {LRUCache} Tile cache.
@@ -683,7 +683,7 @@ class gt extends dt {
683
683
  * @return {LRUCache} Tile cache.
684
684
  */
685
685
  getSourceTileCache() {
686
- return this.sourceTileCache_ || (this.sourceTileCache_ = new Ce(512)), this.sourceTileCache_;
686
+ return this.sourceTileCache_ || (this.sourceTileCache_ = new xe(512)), this.sourceTileCache_;
687
687
  }
688
688
  /**
689
689
  * Get a tile from the cache or create one if needed.
@@ -708,7 +708,7 @@ class gt extends dt {
708
708
  n,
709
709
  i.pixelRatio,
710
710
  o,
711
- !h || He(h, o) ? void 0 : this.getSourceTileCache()
711
+ !h || We(h, o) ? void 0 : this.getSourceTileCache()
712
712
  ), !c)
713
713
  return null;
714
714
  r.set(l, c);
@@ -736,34 +736,34 @@ class gt extends dt {
736
736
  const t = this.frameState;
737
737
  if (!t)
738
738
  return null;
739
- const n = this.getLayer(), i = v(
739
+ const n = this.getLayer(), i = S(
740
740
  t.pixelToCoordinateTransform,
741
741
  e.slice()
742
742
  ), r = n.getExtent();
743
- if (r && !Xe(r, i))
743
+ if (r && !He(r, i))
744
744
  return null;
745
745
  const a = t.viewState, s = n.getRenderSource(), l = s.getTileGridForProjection(a.projection), c = s.getTilePixelRatio(t.pixelRatio);
746
746
  for (let o = l.getZForResolution(a.resolution); o >= l.getMinZoom(); --o) {
747
747
  const h = l.getTileCoordForCoordAndZ(i, o), d = this.getTile(o, h[1], h[2], t);
748
- if (!d || d.getState() !== T.LOADED)
748
+ if (!d || d.getState() !== y.LOADED)
749
749
  continue;
750
- const g = l.getOrigin(o), p = je(l.getTileSize(o)), S = l.getResolution(o);
750
+ const g = l.getOrigin(o), p = Ae(l.getTileSize(o)), I = l.getResolution(o);
751
751
  let f;
752
- if (d instanceof Ke || d instanceof Me)
752
+ if (d instanceof Pe || d instanceof Ke)
753
753
  f = d.getImage();
754
- else if (d instanceof Re) {
755
- if (f = le(d.getData()), !f)
754
+ else if (d instanceof Te) {
755
+ if (f = ae(d.getData()), !f)
756
756
  continue;
757
757
  } else
758
758
  continue;
759
- const m = Math.floor(
760
- c * ((i[0] - g[0]) / S - h[1] * p[0])
759
+ const w = Math.floor(
760
+ c * ((i[0] - g[0]) / I - h[1] * p[0])
761
761
  ), K = Math.floor(
762
- c * ((g[1] - i[1]) / S - h[2] * p[1])
762
+ c * ((g[1] - i[1]) / I - h[2] * p[1])
763
763
  ), E = Math.round(
764
764
  c * s.getGutterForProjection(a.projection)
765
765
  );
766
- return this.getImageData(f, m + E, K + E);
766
+ return this.getImageData(f, w + E, K + E);
767
767
  }
768
768
  return null;
769
769
  }
@@ -797,7 +797,7 @@ class gt extends dt {
797
797
  * @param {number} preload Number of additional levels to load.
798
798
  */
799
799
  enqueueTiles(e, t, n, i, r) {
800
- const a = e.viewState, s = this.getLayer(), l = s.getRenderSource(), c = l.getTileGridForProjection(a.projection), o = k(l);
800
+ const a = e.viewState, s = this.getLayer(), l = s.getRenderSource(), c = l.getTileGridForProjection(a.projection), o = j(l);
801
801
  o in e.wantedTiles || (e.wantedTiles[o] = {});
802
802
  const h = e.wantedTiles[o], d = s.getMapInternal(), g = Math.max(
803
803
  n - r,
@@ -809,32 +809,32 @@ class gt extends dt {
809
809
  ),
810
810
  l.zDirection
811
811
  )
812
- ), p = a.rotation, S = p ? Ye(
812
+ ), p = a.rotation, I = p ? Xe(
813
813
  a.center,
814
814
  a.resolution,
815
815
  p,
816
816
  e.size
817
817
  ) : void 0;
818
818
  for (let f = n; f >= g; --f) {
819
- const m = c.getTileRangeForExtentAndZ(
819
+ const w = c.getTileRangeForExtentAndZ(
820
820
  t,
821
821
  f,
822
822
  this.tempTileRange_
823
823
  ), K = c.getResolution(f);
824
- for (let E = m.minX; E <= m.maxX; ++E)
825
- for (let I = m.minY; I <= m.maxY; ++I) {
826
- if (p && !c.tileCoordIntersectsViewport([f, E, I], S))
824
+ for (let E = w.minX; E <= w.maxX; ++E)
825
+ for (let L = w.minY; L <= w.maxY; ++L) {
826
+ if (p && !c.tileCoordIntersectsViewport([f, E, L], I))
827
827
  continue;
828
- const L = this.getTile(f, E, I, e);
829
- if (!L || !se(i, L, f))
828
+ const m = this.getTile(f, E, L, e);
829
+ if (!m || !se(i, m, f))
830
830
  continue;
831
- const y = L.getKey();
832
- if (h[y] = !0, L.getState() === T.IDLE && !e.tileQueue.isKeyQueued(y)) {
833
- const N = ye(f, E, I, this.tempTileCoord_);
831
+ const b = m.getKey();
832
+ if (h[b] = !0, m.getState() === y.IDLE && !e.tileQueue.isKeyQueued(b)) {
833
+ const Z = _e(f, E, L, this.tempTileCoord_);
834
834
  e.tileQueue.enqueue([
835
- L,
835
+ m,
836
836
  o,
837
- c.getTileCoordCenter(N),
837
+ c.getTileCoordCenter(Z),
838
838
  K
839
839
  ]);
840
840
  }
@@ -861,8 +861,8 @@ class gt extends dt {
861
861
  );
862
862
  if (n.containsKey(c)) {
863
863
  const o = n.peek(c);
864
- if (o.getState() === T.LOADED)
865
- return o.endTransition(k(this)), se(t, o, i), !0;
864
+ if (o.getState() === y.LOADED)
865
+ return o.endTransition(j(this)), se(t, o, i), !0;
866
866
  }
867
867
  }
868
868
  return !1;
@@ -893,7 +893,7 @@ class gt extends dt {
893
893
  let g = !1;
894
894
  if (s.containsKey(d)) {
895
895
  const p = s.peek(d);
896
- p.getState() === T.LOADED && (se(i, p, n), g = !0);
896
+ p.getState() === y.LOADED && (se(i, p, n), g = !0);
897
897
  }
898
898
  g || (a = !1);
899
899
  }
@@ -917,120 +917,117 @@ class gt extends dt {
917
917
  this.renderComplete = !0;
918
918
  const n = e.layerStatesArray[e.layerIndex], i = e.viewState, r = i.projection, a = i.resolution, s = i.center, l = e.pixelRatio, c = this.getLayer(), o = c.getSource(), h = o.getTileGridForProjection(r), d = h.getZForResolution(a, o.zDirection), g = h.getResolution(d), p = o.getKey();
919
919
  this.renderedSourceKey_ ? this.renderedSourceKey_ !== p && (this.prependStaleKey(this.renderedSourceKey_), this.renderedSourceKey_ = p) : this.renderedSourceKey_ = p;
920
- let S = e.extent;
920
+ let I = e.extent;
921
921
  const f = o.getTilePixelRatio(l);
922
922
  this.prepareContainer(e, t);
923
- const m = this.context.canvas.width, K = this.context.canvas.height, E = n.extent && re(n.extent);
924
- E && (S = oe(
925
- S,
926
- re(n.extent)
927
- ));
928
- const I = g * m / 2 / f, L = g * K / 2 / f, A = [
929
- s[0] - I,
923
+ const w = this.context.canvas.width, K = this.context.canvas.height;
924
+ this.layerExtent = n.extent ? me(n.extent) : null, this.layerExtent && (I = re(I, this.layerExtent));
925
+ const E = g * w / 2 / f, L = g * K / 2 / f, m = [
926
+ s[0] - E,
930
927
  s[1] - L,
931
- s[0] + I,
928
+ s[0] + E,
932
929
  s[1] + L
933
- ], y = {};
930
+ ], R = {};
934
931
  this.renderedTiles.length = 0;
935
- const N = c.getPreload();
932
+ const b = c.getPreload();
936
933
  if (e.nextExtent && this.enqueueTilesForNextExtent()) {
937
- const x = h.getZForResolution(
934
+ const T = h.getZForResolution(
938
935
  i.nextResolution,
939
936
  o.zDirection
940
- ), R = Ee(e, e.nextExtent);
941
- this.enqueueTiles(e, R, x, y, N);
937
+ ), x = Re(e, e.nextExtent);
938
+ this.enqueueTiles(e, x, T, R, b);
942
939
  }
943
- const ce = Ee(e, S);
944
- if (this.enqueueTiles(e, ce, d, y, 0), N > 0 && setTimeout(() => {
940
+ const Z = Re(e, I);
941
+ if (this.enqueueTiles(e, Z, d, R, 0), b > 0 && setTimeout(() => {
945
942
  this.enqueueTiles(
946
943
  e,
947
- ce,
944
+ Z,
948
945
  d - 1,
949
- y,
950
- N - 1
946
+ R,
947
+ b - 1
951
948
  );
952
- }, 0), !(d in y))
949
+ }, 0), !(d in R))
953
950
  return this.container;
954
- const he = k(this), ve = e.time;
955
- for (const x of y[d]) {
956
- const R = x.getState();
957
- if (R === T.EMPTY)
951
+ const le = j(this), we = e.time;
952
+ for (const T of R[d]) {
953
+ const x = T.getState();
954
+ if (x === y.EMPTY)
958
955
  continue;
959
- const D = x.tileCoord;
960
- if (R === T.LOADED && x.getAlpha(he, ve) === 1) {
961
- x.endTransition(he);
956
+ const D = T.tileCoord;
957
+ if (x === y.LOADED && T.getAlpha(le, we) === 1) {
958
+ T.endTransition(le);
962
959
  continue;
963
960
  }
964
- if (R !== T.ERROR && (this.renderComplete = !1), this.findStaleTile_(D, y)) {
965
- ut(y, x, d), e.animate = !0;
961
+ if (x !== y.ERROR && (this.renderComplete = !1), this.findStaleTile_(D, R)) {
962
+ dt(R, T, d), e.animate = !0;
966
963
  continue;
967
964
  }
968
965
  if (this.findAltTiles_(
969
966
  h,
970
967
  D,
971
968
  d + 1,
972
- y
969
+ R
973
970
  ))
974
971
  continue;
975
- const b = h.getMinZoom();
976
- for (let M = d - 1; M >= b && !this.findAltTiles_(
972
+ const A = h.getMinZoom();
973
+ for (let M = d - 1; M >= A && !this.findAltTiles_(
977
974
  h,
978
975
  D,
979
976
  M,
980
- y
977
+ R
981
978
  ); --M)
982
979
  ;
983
980
  }
984
981
  const U = g / a * l / f, _ = this.getRenderContext(e);
985
- ae(
982
+ oe(
986
983
  this.tempTransform,
987
- m / 2,
984
+ w / 2,
988
985
  K / 2,
989
986
  U,
990
987
  U,
991
988
  0,
992
- -m / 2,
989
+ -w / 2,
993
990
  -K / 2
994
- ), n.extent && this.clipUnrotated(_, e, E), o.getInterpolate() || (_.imageSmoothingEnabled = !1), this.preRender(_, e);
995
- const q = Object.keys(y).map(Number);
996
- q.sort(Qe);
997
- let w;
998
- const Q = [], de = [];
999
- for (let x = q.length - 1; x >= 0; --x) {
1000
- const R = q[x], D = o.getTilePixelSize(
1001
- R,
991
+ ), this.layerExtent && this.clipUnrotated(_, e, this.layerExtent), o.getInterpolate() || (_.imageSmoothingEnabled = !1), this.preRender(_, e);
992
+ const q = Object.keys(R).map(Number);
993
+ q.sort(Ye);
994
+ let v;
995
+ const Q = [], ce = [];
996
+ for (let T = q.length - 1; T >= 0; --T) {
997
+ const x = q[T], D = o.getTilePixelSize(
998
+ x,
1002
999
  l,
1003
1000
  r
1004
- ), z = h.getResolution(R) / g, b = D[0] * z * U, M = D[1] * z * U, G = h.getTileCoordForCoordAndZ(
1005
- we(A),
1006
- R
1007
- ), ue = h.getTileCoordExtent(G), B = v(this.tempTransform, [
1008
- f * (ue[0] - A[0]) / g,
1009
- f * (A[3] - ue[3]) / g
1010
- ]), Se = f * o.getGutterForProjection(r);
1011
- for (const Z of y[R]) {
1012
- if (Z.getState() !== T.LOADED)
1001
+ ), z = h.getResolution(x) / g, A = D[0] * z * U, M = D[1] * z * U, G = h.getTileCoordForCoordAndZ(
1002
+ Ee(m),
1003
+ x
1004
+ ), he = h.getTileCoordExtent(G), B = S(this.tempTransform, [
1005
+ f * (he[0] - m[0]) / g,
1006
+ f * (m[3] - he[3]) / g
1007
+ ]), ve = f * o.getGutterForProjection(r);
1008
+ for (const N of R[x]) {
1009
+ if (N.getState() !== y.LOADED)
1013
1010
  continue;
1014
- const ge = Z.tileCoord, fe = G[1] - ge[1], Ie = Math.round(B[0] - (fe - 1) * b), _e = G[2] - ge[2], Le = Math.round(B[1] - (_e - 1) * M), O = Math.round(B[0] - fe * b), P = Math.round(B[1] - _e * M), V = Ie - O, W = Le - P, pe = q.length === 1;
1011
+ const de = N.tileCoord, ue = G[1] - de[1], Se = Math.round(B[0] - (ue - 1) * A), ge = G[2] - de[2], Ie = Math.round(B[1] - (ge - 1) * M), O = Math.round(B[0] - ue * A), P = Math.round(B[1] - ge * M), V = Se - O, W = Ie - P, fe = q.length === 1;
1015
1012
  let J = !1;
1016
- w = [O, P, O + V, P, O + V, P + W, O, P + W];
1017
- for (let H = 0, De = Q.length; H < De; ++H)
1018
- if (!pe && R < de[H]) {
1013
+ v = [O, P, O + V, P, O + V, P + W, O, P + W];
1014
+ for (let H = 0, Le = Q.length; H < Le; ++H)
1015
+ if (!fe && x < ce[H]) {
1019
1016
  const C = Q[H];
1020
- $e(
1017
+ Qe(
1021
1018
  [O, P, O + V, P + W],
1022
1019
  [C[0], C[3], C[4], C[7]]
1023
- ) && (J || (_.save(), J = !0), _.beginPath(), _.moveTo(w[0], w[1]), _.lineTo(w[2], w[3]), _.lineTo(w[4], w[5]), _.lineTo(w[6], w[7]), _.moveTo(C[6], C[7]), _.lineTo(C[4], C[5]), _.lineTo(C[2], C[3]), _.lineTo(C[0], C[1]), _.clip());
1020
+ ) && (J || (_.save(), J = !0), _.beginPath(), _.moveTo(v[0], v[1]), _.lineTo(v[2], v[3]), _.lineTo(v[4], v[5]), _.lineTo(v[6], v[7]), _.moveTo(C[6], C[7]), _.lineTo(C[4], C[5]), _.lineTo(C[2], C[3]), _.lineTo(C[0], C[1]), _.clip());
1024
1021
  }
1025
- Q.push(w), de.push(R), this.drawTile(Z, e, O, P, V, W, Se, pe), J && _.restore(), this.renderedTiles.unshift(Z), this.updateUsedTiles(e.usedTiles, o, Z);
1022
+ Q.push(v), ce.push(x), this.drawTile(N, e, O, P, V, W, ve, fe), J && _.restore(), this.renderedTiles.unshift(N), this.updateUsedTiles(e.usedTiles, o, N);
1026
1023
  }
1027
1024
  }
1028
- if (this.renderedResolution = g, this.extentChanged = !this.renderedExtent_ || !Je(this.renderedExtent_, A), this.renderedExtent_ = A, this.renderedPixelRatio = l, this.postRender(this.context, e), n.extent && _.restore(), _.imageSmoothingEnabled = !0, this.renderComplete) {
1029
- const x = (R, D) => {
1030
- const $ = k(o), z = D.wantedTiles[$], b = z ? Object.keys(z).length : 0;
1031
- this.updateCacheSize(b), this.tileCache_.expireCache(), this.sourceTileCache_?.expireCache();
1025
+ if (this.renderedResolution = g, this.extentChanged = !this.renderedExtent_ || !$e(this.renderedExtent_, m), this.renderedExtent_ = m, this.renderedPixelRatio = l, this.postRender(this.context, e), this.layerExtent && _.restore(), _.imageSmoothingEnabled = !0, this.renderComplete) {
1026
+ const T = (x, D) => {
1027
+ const $ = j(o), z = D.wantedTiles[$], A = z ? Object.keys(z).length : 0;
1028
+ this.updateCacheSize(A), this.tileCache_.expireCache(), this.sourceTileCache_?.expireCache();
1032
1029
  };
1033
- e.postRenderFunctions.push(x);
1030
+ e.postRenderFunctions.push(T);
1034
1031
  }
1035
1032
  return this.container;
1036
1033
  }
@@ -1057,8 +1054,8 @@ class gt extends dt {
1057
1054
  */
1058
1055
  drawTile(e, t, n, i, r, a, s, l) {
1059
1056
  let c;
1060
- if (e instanceof Re) {
1061
- if (c = le(e.getData()), !c)
1057
+ if (e instanceof Te) {
1058
+ if (c = ae(e.getData()), !c)
1062
1059
  throw new Error("Rendering array data is not yet supported");
1063
1060
  } else
1064
1061
  c = this.getTileImage(
@@ -1067,7 +1064,7 @@ class gt extends dt {
1067
1064
  );
1068
1065
  if (!c)
1069
1066
  return;
1070
- const o = this.getRenderContext(t), h = k(this), d = t.layerStatesArray[t.layerIndex], g = d.opacity * (l ? e.getAlpha(h, t.time) : 1), p = g !== o.globalAlpha;
1067
+ const o = this.getRenderContext(t), h = j(this), d = t.layerStatesArray[t.layerIndex], g = d.opacity * (l ? e.getAlpha(h, t.time) : 1), p = g !== o.globalAlpha;
1071
1068
  p && (o.save(), o.globalAlpha = g), o.drawImage(
1072
1069
  c,
1073
1070
  s,
@@ -1103,7 +1100,7 @@ class gt extends dt {
1103
1100
  * @protected
1104
1101
  */
1105
1102
  updateUsedTiles(e, t, n) {
1106
- const i = k(t);
1103
+ const i = j(t);
1107
1104
  i in e || (e[i] = {}), e[i][n.getKey()] = !0;
1108
1105
  }
1109
1106
  }
@@ -1111,7 +1108,7 @@ const Y = {
1111
1108
  PRELOAD: "preload",
1112
1109
  USE_INTERIM_TILES_ON_ERROR: "useInterimTilesOnError"
1113
1110
  };
1114
- class ft extends st {
1111
+ class gt extends it {
1115
1112
  /**
1116
1113
  * @param {Options<TileSourceType>} [options] Tile layer options.
1117
1114
  */
@@ -1183,7 +1180,7 @@ class ft extends st {
1183
1180
  * console.log(layer.getData(event.pixel));
1184
1181
  * });
1185
1182
  * ```
1186
- * @param {import("../pixel").Pixel} pixel Pixel.
1183
+ * @param {import("../pixel.js").Pixel} pixel Pixel.
1187
1184
  * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.
1188
1185
  * @api
1189
1186
  * @override
@@ -1192,7 +1189,7 @@ class ft extends st {
1192
1189
  return super.getData(e);
1193
1190
  }
1194
1191
  }
1195
- class _t extends ft {
1192
+ class ft extends gt {
1196
1193
  /**
1197
1194
  * @param {import("./BaseTile.js").Options<TileSourceType>} [options] Tile layer options.
1198
1195
  */
@@ -1203,21 +1200,21 @@ class _t extends ft {
1203
1200
  * @override
1204
1201
  */
1205
1202
  createRenderer() {
1206
- return new gt(this, {
1203
+ return new ut(this, {
1207
1204
  cacheSize: this.getCacheSize()
1208
1205
  });
1209
1206
  }
1210
1207
  }
1211
- const Et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1208
+ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1212
1209
  __proto__: null,
1213
- default: _t
1210
+ default: ft
1214
1211
  }, Symbol.toStringTag, { value: "Module" }));
1215
1212
  export {
1216
- dt as C,
1217
- _t as T,
1218
- at as Z,
1219
- gt as a,
1220
- Y as b,
1221
- Ct as c,
1222
- Et as d
1213
+ ht as C,
1214
+ Ct as T,
1215
+ ot as Z,
1216
+ ut as a,
1217
+ ft as b,
1218
+ Y as c,
1219
+ Rt as d
1223
1220
  };