@datagouv/components-next 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/{Control-b-43UT2B.js → Control-B9WQxlpJ.js} +10 -10
  2. package/dist/{Datafair.client-BrjISlaZ.js → Datafair.client-D_6yzJUG.js} +9 -9
  3. package/dist/{Event-py_AAwJY.js → Event-iXDrp-fy.js} +15 -15
  4. package/dist/{Image-BHQYZWzH.js → Image-mNMBOofs.js} +22 -22
  5. package/dist/ImagePreview.client-B0iPhFm3.js +36 -0
  6. package/dist/{JsonPreview.client-DivFAnbN.js → JsonPreview.client-DSl1kiwC.js} +2 -2
  7. package/dist/{Map-CtP7leHl.js → Map-BfqKMw0S.js} +165 -165
  8. package/dist/{MapContainer.client-Cq8tNLZZ.js → MapContainer.client-BSfpk_rT.js} +17 -17
  9. package/dist/{OSM-gdDSIsDA.js → OSM-CcrUhItr.js} +1 -1
  10. package/dist/{PdfPreview.client-BNBgLsK2.js → PdfPreview.client-BANFeM6K.js} +438 -427
  11. package/dist/{Pmtiles.client-CQi5Rw8W.js → Pmtiles.client-DH9ZrsZR.js} +6177 -5967
  12. package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-I8EZCgzp.js +60 -0
  13. package/dist/{ScaleLine-hG-FhNqy.js → ScaleLine-VGQ7nkMS.js} +2 -2
  14. package/dist/{Tile-D6rFonpT.js → Tile-CSpn0Ca8.js} +47 -47
  15. package/dist/{TileImage-cfrEgz5y.js → TileImage-CpbaEFwd.js} +44 -44
  16. package/dist/{View-vp7vDb9q.js → View-BYBpt-AU.js} +58 -58
  17. package/dist/{XmlPreview.client-XCsNvnsZ.js → XmlPreview.client-KCB5mwVf.js} +3 -3
  18. package/dist/{common-C8efyyuc.js → common-BoeTUnDZ.js} +58 -58
  19. package/dist/components-next.css +1 -1
  20. package/dist/components-next.js +199 -172
  21. package/dist/components.css +1 -1
  22. package/dist/{index-CXUamc8Z.js → index-DHWzX5vK.js} +4668 -4466
  23. package/dist/{leaflet-src-BRKv9Ksv.js → leaflet-src-pVQfonBI.js} +1 -1
  24. package/dist/{main-DKu5SOAl.js → main-BDcYkhOc.js} +41684 -33432
  25. package/dist/{proj-CsjVeojN.js → proj-DxGbobp7.js} +110 -110
  26. package/dist/{tilecoord-CPcQJnrF.js → tilecoord-DvX7WWiA.js} +94 -94
  27. package/dist/{vue3-xml-viewer.common-BIaEIFYG.js → vue3-xml-viewer.common-Bdcn54ST.js} +1 -1
  28. package/package.json +28 -27
  29. package/src/components/ActivityList/ActivityList.vue +21 -12
  30. package/src/components/AppLink.vue +3 -0
  31. package/src/components/BannerAction.vue +6 -2
  32. package/src/components/Chart/ChartViewer.vue +111 -17
  33. package/src/components/Chart/ChartViewerWrapper.vue +28 -16
  34. package/src/components/ChartCard.vue +112 -0
  35. package/src/components/CopyButton.vue +6 -2
  36. package/src/components/DataserviceCard.vue +23 -6
  37. package/src/components/DataserviceQuality.vue +82 -0
  38. package/src/components/DataserviceQualityInline.vue +31 -0
  39. package/src/components/DataserviceQualityTooltipContent.vue +79 -0
  40. package/src/components/DatasetCard.vue +17 -6
  41. package/src/components/DatasetInformation/DatasetTemporalitySection.vue +7 -4
  42. package/src/components/DatasetQuality.vue +11 -11
  43. package/src/components/DatasetQualityInline.vue +2 -2
  44. package/src/components/DatasetQualityTooltipContent.vue +1 -1
  45. package/src/components/DiscussionMessageCard.vue +14 -15
  46. package/src/components/Form/SchemaSelect.vue +2 -0
  47. package/src/components/FormattedDate.vue +69 -0
  48. package/src/components/LoadingBlock.vue +4 -1
  49. package/src/components/ObjectCard.vue +4 -1
  50. package/src/components/ObjectCardOwner.vue +13 -1
  51. package/src/components/Pagination.vue +18 -58
  52. package/src/components/Placeholder.vue +3 -2
  53. package/src/components/PostCard.vue +13 -15
  54. package/src/components/ResourceAccordion/Datafair.client.vue +1 -1
  55. package/src/components/ResourceAccordion/Downloads.vue +19 -7
  56. package/src/components/ResourceAccordion/ImagePreview.client.vue +48 -0
  57. package/src/components/ResourceAccordion/MapContainer.client.vue +1 -8
  58. package/src/components/ResourceAccordion/Metadata.vue +21 -5
  59. package/src/components/ResourceAccordion/PdfPreview.client.vue +36 -12
  60. package/src/components/ResourceAccordion/PdfSkeleton.vue +44 -0
  61. package/src/components/ResourceAccordion/Pmtiles.client.vue +27 -18
  62. package/src/components/ResourceAccordion/Preview.vue +8 -4
  63. package/src/components/ResourceAccordion/PreviewWrapper.vue +17 -10
  64. package/src/components/ResourceAccordion/ResourceAccordion.vue +29 -9
  65. package/src/components/ResourceExplorer/ResourceExplorer.vue +105 -209
  66. package/src/components/ResourceExplorer/ResourceExplorerHeader.vue +79 -0
  67. package/src/components/ResourceExplorer/ResourceExplorerSidebar.vue +104 -71
  68. package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +136 -183
  69. package/src/components/ResourceExplorer/ResourceMainAction.vue +240 -0
  70. package/src/components/ResourceExplorer/ResourceSelector.vue +24 -86
  71. package/src/components/ResourceExplorer/ResourceViewerHeader.vue +124 -0
  72. package/src/components/ResourceExplorer/ResourceViewerSkeleton.vue +96 -0
  73. package/src/components/ResourceListItem.vue +168 -0
  74. package/src/components/ReuseCard.vue +18 -6
  75. package/src/components/ReuseDetails.vue +2 -2
  76. package/src/components/ReuseHorizontalCard.vue +4 -3
  77. package/src/components/SchemaCard.vue +10 -1
  78. package/src/components/Search/Filter/AccessTypeFilter.vue +2 -2
  79. package/src/components/Search/GlobalSearch.vue +12 -8
  80. package/src/components/Search/SearchInput.vue +1 -1
  81. package/src/components/Search/Sidemenu.vue +4 -3
  82. package/src/components/SmallChart.vue +11 -10
  83. package/src/components/StatBox.vue +13 -5
  84. package/src/components/TabularExplorer/TabularActiveFilters.vue +79 -0
  85. package/src/components/TabularExplorer/TabularCell.vue +7 -8
  86. package/src/components/TabularExplorer/TabularCellPopover.vue +19 -3
  87. package/src/components/TabularExplorer/TabularColumnsMenu.vue +112 -0
  88. package/src/components/TabularExplorer/TabularDateField.vue +41 -0
  89. package/src/components/TabularExplorer/TabularDateFilter.vue +403 -0
  90. package/src/components/TabularExplorer/TabularExplorer.vue +122 -913
  91. package/src/components/TabularExplorer/TabularFilterContent.vue +33 -25
  92. package/src/components/TabularExplorer/TabularFilterPopover.vue +7 -7
  93. package/src/components/TabularExplorer/TabularMobileFilterButton.vue +21 -0
  94. package/src/components/TabularExplorer/TabularMobileFilters.vue +150 -0
  95. package/src/components/TabularExplorer/TabularRowsInfo.vue +31 -0
  96. package/src/components/TabularExplorer/TabularSkeleton.vue +92 -0
  97. package/src/components/TabularExplorer/TabularTable.vue +484 -0
  98. package/src/components/TabularExplorer/TabularToolbar.vue +25 -0
  99. package/src/components/TabularExplorer/types.ts +32 -20
  100. package/src/components/TabularExplorer/useColumnMetadata.ts +98 -0
  101. package/src/components/TabularExplorer/useTabularContext.ts +82 -0
  102. package/src/components/TopicCard.vue +15 -14
  103. package/src/composables/useActiveDescendant.ts +5 -0
  104. package/src/composables/useDatasetResources.ts +164 -0
  105. package/src/composables/useHasTabularData.ts +2 -1
  106. package/src/composables/useResizable.ts +46 -0
  107. package/src/composables/useResourceCapabilities.ts +47 -39
  108. package/src/composables/useTranslation.ts +24 -9
  109. package/src/config.ts +1 -0
  110. package/src/functions/charts.ts +32 -1
  111. package/src/functions/dates.ts +26 -7
  112. package/src/functions/helpers.ts +15 -0
  113. package/src/functions/metrics.ts +57 -56
  114. package/src/functions/owned.ts +21 -0
  115. package/src/functions/paginate.ts +46 -0
  116. package/src/functions/resourceCapabilities.ts +34 -0
  117. package/src/functions/resources.ts +83 -0
  118. package/src/functions/schemas.ts +27 -0
  119. package/src/functions/scroll.ts +20 -0
  120. package/src/functions/tabular.ts +119 -4
  121. package/src/functions/tabularApi.ts +1 -43
  122. package/src/main.ts +32 -6
  123. package/src/types/dataservices.ts +15 -0
  124. package/src/types/organizations.ts +10 -0
  125. package/src/types/reuses.ts +12 -1
  126. package/src/types/search.ts +2 -2
  127. package/src/types/visualizations.ts +5 -0
  128. package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-C3dDzrIr.js +0 -61
  129. /package/src/components/{DatasetQualityItem.vue → QualityItem.vue} +0 -0
  130. /package/src/components/{DatasetQualityItemWarning.vue → QualityItemWarning.vue} +0 -0
  131. /package/src/components/{DatasetQualityScore.vue → QualityScore.vue} +0 -0
@@ -0,0 +1,60 @@
1
+ import { defineComponent as C, ref as v, computed as y, onMounted as S, nextTick as w, openBlock as a, createElementBlock as b, normalizeClass as B, renderSlot as x, createElementVNode as _, toDisplayString as i, unref as t, createBlock as s, withCtx as n, createTextVNode as u, createCommentVNode as E } from "vue";
2
+ import { a as L, b as N, c as R, d as c } from "./main-BDcYkhOc.js";
3
+ const V = { class: "text-gray-medium" }, F = /* @__PURE__ */ C({
4
+ __name: "PreviewWrapper",
5
+ props: {
6
+ fileType: {},
7
+ resource: {},
8
+ maxSize: {},
9
+ load: { type: Function },
10
+ fill: { type: Boolean }
11
+ },
12
+ emits: ["loaded"],
13
+ setup(r, { emit: k }) {
14
+ const o = r, z = k, { t: l } = L(), p = v(null), f = v(!1), d = v(null), h = y(() => N(o.resource)), T = y(() => R(o.resource)), g = y(() => {
15
+ const e = h.value, m = o.maxSize;
16
+ return !e || !m ? !1 : e <= m;
17
+ });
18
+ return S(async () => {
19
+ if (!(!g.value || T.value === "blocked")) {
20
+ f.value = !0;
21
+ try {
22
+ p.value = await o.load(), await w(), z("loaded");
23
+ } catch (e) {
24
+ console.error("Error loading preview:", e), d.value = e instanceof TypeError ? "network" : "generic";
25
+ } finally {
26
+ f.value = !1;
27
+ }
28
+ }
29
+ }), (e, m) => (a(), b("div", {
30
+ class: B(["text-xs", r.fill ? "flex min-h-0 flex-1 flex-col" : ""])
31
+ }, [
32
+ p.value !== null ? x(e.$slots, "default", { data: p.value }, void 0, void 0, 0) : f.value ? x(e.$slots, "loading", {}, () => [
33
+ _("div", V, i(t(l)("Chargement de l'aperçu {fileType}...", { fileType: r.fileType })), 1)
34
+ ], void 0, 1) : g.value ? T.value === "blocked" ? (a(), s(c, { key: 3 }, {
35
+ default: n(() => [
36
+ u(i(t(l)("Ce fichier {fileType} ne peut pas être prévisualisé car il est hébergé sur un site distant qui restreint l'accès (CORS). Téléchargez-le pour le consulter.", { fileType: r.fileType })), 1)
37
+ ]),
38
+ _: 1
39
+ })) : d.value === "network" ? (a(), s(c, { key: 4 }, {
40
+ default: n(() => [
41
+ u(i(t(l)("Ce fichier est hébergé sur un site externe qui ne permet pas la prévisualisation. Téléchargez-le pour le consulter.")), 1)
42
+ ]),
43
+ _: 1
44
+ })) : d.value ? (a(), s(c, { key: 5 }, {
45
+ default: n(() => [
46
+ u(i(t(l)("L'aperçu de ce fichier n'a pas pu être chargé. Téléchargez-le pour le consulter.")), 1)
47
+ ]),
48
+ _: 1
49
+ })) : E("", !0) : (a(), s(c, { key: 2 }, {
50
+ default: n(() => [
51
+ u(i(h.value ? t(l)("Le fichier {fileType} est trop volumineux pour être prévisualisé. Téléchargez-le pour le consulter.", { fileType: r.fileType }) : t(l)("La taille du fichier est inconnue, l'aperçu n'est pas disponible. Téléchargez-le pour le consulter.")), 1)
52
+ ]),
53
+ _: 1
54
+ }))
55
+ ], 2));
56
+ }
57
+ });
58
+ export {
59
+ F as _
60
+ };
@@ -1,5 +1,5 @@
1
- import { f as M, d as b } from "./Control-b-43UT2B.js";
2
- import { ag as E, M as T } from "./proj-CsjVeojN.js";
1
+ import { C as M, a as b } from "./Control-B9WQxlpJ.js";
2
+ import { g as E, M as T } from "./proj-DxGbobp7.js";
3
3
  const S = "units", W = [1, 2, 5], f = 25.4 / 0.28;
4
4
  class y extends M {
5
5
  /**
@@ -1,8 +1,8 @@
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";
1
+ import { T as De, b as Oe, d as _e, g as ee, I as Pe, R as Ke } from "./tilecoord-DvX7WWiA.js";
2
+ import { T as y, g as pe, d as j, l as Me, i as ze, j as Ae, c as Ce, t as be } from "./Image-mNMBOofs.js";
3
+ import { aH as je, aJ as ke, al as te, E as Fe, Z as Ne, an as Ee, aK as Ze, aA as Ue, aL as qe, I as Ge, z as Be, v as Ve, e as We, U as He, a as k, aM as Xe, j as me, d as re, a1 as Ye, i as Qe, C as $e } from "./proj-DxGbobp7.js";
4
+ import { a as ne, e as ie, p as Je, g as S, d as oe, n as et, q as tt } from "./common-BoeTUnDZ.js";
5
+ import { a as ye, c as nt, R as X, L as it } from "./Event-iXDrp-fy.js";
6
6
  function ae(u) {
7
7
  return u instanceof Image || u instanceof HTMLCanvasElement || u instanceof HTMLVideoElement || u instanceof ImageBitmap ? u : null;
8
8
  }
@@ -77,7 +77,7 @@ class xe {
77
77
  }
78
78
  deleteOldest() {
79
79
  const e = this.pop();
80
- e instanceof ke && e.dispose();
80
+ e instanceof je && e.dispose();
81
81
  }
82
82
  /**
83
83
  * @return {boolean} Can expire cache.
@@ -320,7 +320,7 @@ class ot {
320
320
  }
321
321
  }
322
322
  const at = 5;
323
- class lt extends je {
323
+ class lt extends ke {
324
324
  /**
325
325
  * @param {LayerType} layer Layer.
326
326
  */
@@ -408,7 +408,7 @@ class lt extends je {
408
408
  /** @type {import("../Image.js").default} */
409
409
  e.target
410
410
  );
411
- (t.getState() === k.LOADED || t.getState() === k.ERROR) && this.renderIfReadyAndVisible();
411
+ (t.getState() === j.LOADED || t.getState() === j.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 lt extends je {
419
419
  */
420
420
  loadImage(e) {
421
421
  let t = e.getState();
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;
422
+ return t != j.LOADED && t != j.ERROR && e.addEventListener(Fe.CHANGE, this.boundHandleImageChange_), t == j.IDLE && (e.load(), t = e.getState()), t == j.LOADED;
423
423
  }
424
424
  /**
425
425
  * @protected
@@ -496,7 +496,7 @@ class ht extends lt {
496
496
  Me(s) && (a = s.getContext("2d"));
497
497
  }
498
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
- r = be ? ze() : document.createElement("div"), r.className = i;
499
+ r = ze ? Ae() : document.createElement("div"), r.className = i;
500
500
  let s = r.style;
501
501
  s.position = "absolute", s.width = "100%", s.height = "100%", a = Ce();
502
502
  const l = (
@@ -747,7 +747,7 @@ class ut extends ht {
747
747
  const h = l.getTileCoordForCoordAndZ(i, o), d = this.getTile(o, h[1], h[2], t);
748
748
  if (!d || d.getState() !== y.LOADED)
749
749
  continue;
750
- const g = l.getOrigin(o), p = Ae(l.getTileSize(o)), I = l.getResolution(o);
750
+ const g = l.getOrigin(o), p = be(l.getTileSize(o)), I = l.getResolution(o);
751
751
  let f;
752
752
  if (d instanceof Pe || d instanceof Ke)
753
753
  f = d.getImage();
@@ -756,14 +756,14 @@ class ut extends ht {
756
756
  continue;
757
757
  } else
758
758
  continue;
759
- const w = Math.floor(
759
+ const v = Math.floor(
760
760
  c * ((i[0] - g[0]) / I - h[1] * p[0])
761
761
  ), K = Math.floor(
762
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, w + E, K + E);
766
+ return this.getImageData(f, v + E, K + E);
767
767
  }
768
768
  return null;
769
769
  }
@@ -797,7 +797,7 @@ class ut extends ht {
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 = j(l);
800
+ const a = e.viewState, s = this.getLayer(), l = s.getRenderSource(), c = l.getTileGridForProjection(a.projection), o = k(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,
@@ -816,20 +816,20 @@ class ut extends ht {
816
816
  e.size
817
817
  ) : void 0;
818
818
  for (let f = n; f >= g; --f) {
819
- const w = c.getTileRangeForExtentAndZ(
819
+ const v = c.getTileRangeForExtentAndZ(
820
820
  t,
821
821
  f,
822
822
  this.tempTileRange_
823
823
  ), K = c.getResolution(f);
824
- for (let E = w.minX; E <= w.maxX; ++E)
825
- for (let L = w.minY; L <= w.maxY; ++L) {
824
+ for (let E = v.minX; E <= v.maxX; ++E)
825
+ for (let L = v.minY; L <= v.maxY; ++L) {
826
826
  if (p && !c.tileCoordIntersectsViewport([f, E, L], I))
827
827
  continue;
828
828
  const m = this.getTile(f, E, L, e);
829
829
  if (!m || !se(i, m, f))
830
830
  continue;
831
- const b = m.getKey();
832
- if (h[b] = !0, m.getState() === y.IDLE && !e.tileQueue.isKeyQueued(b)) {
831
+ const z = m.getKey();
832
+ if (h[z] = !0, m.getState() === y.IDLE && !e.tileQueue.isKeyQueued(z)) {
833
833
  const Z = _e(f, E, L, this.tempTileCoord_);
834
834
  e.tileQueue.enqueue([
835
835
  m,
@@ -862,7 +862,7 @@ class ut extends ht {
862
862
  if (n.containsKey(c)) {
863
863
  const o = n.peek(c);
864
864
  if (o.getState() === y.LOADED)
865
- return o.endTransition(j(this)), se(t, o, i), !0;
865
+ return o.endTransition(k(this)), se(t, o, i), !0;
866
866
  }
867
867
  }
868
868
  return !1;
@@ -920,41 +920,41 @@ class ut extends ht {
920
920
  let I = e.extent;
921
921
  const f = o.getTilePixelRatio(l);
922
922
  this.prepareContainer(e, t);
923
- const w = this.context.canvas.width, K = this.context.canvas.height;
923
+ const v = this.context.canvas.width, K = this.context.canvas.height;
924
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 = [
925
+ const E = g * v / 2 / f, L = g * K / 2 / f, m = [
926
926
  s[0] - E,
927
927
  s[1] - L,
928
928
  s[0] + E,
929
929
  s[1] + L
930
930
  ], R = {};
931
931
  this.renderedTiles.length = 0;
932
- const b = c.getPreload();
932
+ const z = c.getPreload();
933
933
  if (e.nextExtent && this.enqueueTilesForNextExtent()) {
934
934
  const T = h.getZForResolution(
935
935
  i.nextResolution,
936
936
  o.zDirection
937
937
  ), x = Re(e, e.nextExtent);
938
- this.enqueueTiles(e, x, T, R, b);
938
+ this.enqueueTiles(e, x, T, R, z);
939
939
  }
940
940
  const Z = Re(e, I);
941
- if (this.enqueueTiles(e, Z, d, R, 0), b > 0 && setTimeout(() => {
941
+ if (this.enqueueTiles(e, Z, d, R, 0), z > 0 && setTimeout(() => {
942
942
  this.enqueueTiles(
943
943
  e,
944
944
  Z,
945
945
  d - 1,
946
946
  R,
947
- b - 1
947
+ z - 1
948
948
  );
949
949
  }, 0), !(d in R))
950
950
  return this.container;
951
- const le = j(this), we = e.time;
951
+ const le = k(this), ve = e.time;
952
952
  for (const T of R[d]) {
953
953
  const x = T.getState();
954
954
  if (x === y.EMPTY)
955
955
  continue;
956
956
  const D = T.tileCoord;
957
- if (x === y.LOADED && T.getAlpha(le, we) === 1) {
957
+ if (x === y.LOADED && T.getAlpha(le, ve) === 1) {
958
958
  T.endTransition(le);
959
959
  continue;
960
960
  }
@@ -969,8 +969,8 @@ class ut extends ht {
969
969
  R
970
970
  ))
971
971
  continue;
972
- const A = h.getMinZoom();
973
- for (let M = d - 1; M >= A && !this.findAltTiles_(
972
+ const b = h.getMinZoom();
973
+ for (let M = d - 1; M >= b && !this.findAltTiles_(
974
974
  h,
975
975
  D,
976
976
  M,
@@ -981,51 +981,51 @@ class ut extends ht {
981
981
  const U = g / a * l / f, _ = this.getRenderContext(e);
982
982
  oe(
983
983
  this.tempTransform,
984
- w / 2,
984
+ v / 2,
985
985
  K / 2,
986
986
  U,
987
987
  U,
988
988
  0,
989
- -w / 2,
989
+ -v / 2,
990
990
  -K / 2
991
991
  ), this.layerExtent && this.clipUnrotated(_, e, this.layerExtent), o.getInterpolate() || (_.imageSmoothingEnabled = !1), this.preRender(_, e);
992
992
  const q = Object.keys(R).map(Number);
993
993
  q.sort(Ye);
994
- let v;
994
+ let w;
995
995
  const Q = [], ce = [];
996
996
  for (let T = q.length - 1; T >= 0; --T) {
997
997
  const x = q[T], D = o.getTilePixelSize(
998
998
  x,
999
999
  l,
1000
1000
  r
1001
- ), z = h.getResolution(x) / g, A = D[0] * z * U, M = D[1] * z * U, G = h.getTileCoordForCoordAndZ(
1001
+ ), A = h.getResolution(x) / g, b = D[0] * A * U, M = D[1] * A * U, G = h.getTileCoordForCoordAndZ(
1002
1002
  Ee(m),
1003
1003
  x
1004
1004
  ), he = h.getTileCoordExtent(G), B = S(this.tempTransform, [
1005
1005
  f * (he[0] - m[0]) / g,
1006
1006
  f * (m[3] - he[3]) / g
1007
- ]), ve = f * o.getGutterForProjection(r);
1007
+ ]), we = f * o.getGutterForProjection(r);
1008
1008
  for (const N of R[x]) {
1009
1009
  if (N.getState() !== y.LOADED)
1010
1010
  continue;
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;
1011
+ const de = N.tileCoord, ue = G[1] - de[1], Se = Math.round(B[0] - (ue - 1) * b), ge = G[2] - de[2], Ie = Math.round(B[1] - (ge - 1) * M), O = Math.round(B[0] - ue * b), P = Math.round(B[1] - ge * M), V = Se - O, W = Ie - P, fe = q.length === 1;
1012
1012
  let J = !1;
1013
- v = [O, P, O + V, P, O + V, P + W, O, P + W];
1013
+ w = [O, P, O + V, P, O + V, P + W, O, P + W];
1014
1014
  for (let H = 0, Le = Q.length; H < Le; ++H)
1015
1015
  if (!fe && x < ce[H]) {
1016
1016
  const C = Q[H];
1017
1017
  Qe(
1018
1018
  [O, P, O + V, P + W],
1019
1019
  [C[0], C[3], C[4], C[7]]
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());
1020
+ ) && (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());
1021
1021
  }
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);
1022
+ Q.push(w), ce.push(x), this.drawTile(N, e, O, P, V, W, we, fe), J && _.restore(), this.renderedTiles.unshift(N), this.updateUsedTiles(e.usedTiles, o, N);
1023
1023
  }
1024
1024
  }
1025
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
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();
1027
+ const $ = k(o), A = D.wantedTiles[$], b = A ? Object.keys(A).length : 0;
1028
+ this.updateCacheSize(b), this.tileCache_.expireCache(), this.sourceTileCache_?.expireCache();
1029
1029
  };
1030
1030
  e.postRenderFunctions.push(T);
1031
1031
  }
@@ -1064,7 +1064,7 @@ class ut extends ht {
1064
1064
  );
1065
1065
  if (!c)
1066
1066
  return;
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;
1067
+ 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;
1068
1068
  p && (o.save(), o.globalAlpha = g), o.drawImage(
1069
1069
  c,
1070
1070
  s,
@@ -1100,7 +1100,7 @@ class ut extends ht {
1100
1100
  * @protected
1101
1101
  */
1102
1102
  updateUsedTiles(e, t, n) {
1103
- const i = j(t);
1103
+ const i = k(t);
1104
1104
  i in e || (e[i] = {}), e[i][n.getKey()] = !0;
1105
1105
  }
1106
1106
  }
@@ -1211,10 +1211,10 @@ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1211
1211
  }, Symbol.toStringTag, { value: "Module" }));
1212
1212
  export {
1213
1213
  ht as C,
1214
- Ct as T,
1214
+ ft as T,
1215
1215
  ot as Z,
1216
1216
  ut as a,
1217
- ft as b,
1218
- Y as c,
1219
- Rt as d
1217
+ Y as b,
1218
+ Rt as c,
1219
+ Ct as d
1220
1220
  };
@@ -1,8 +1,8 @@
1
- import { a as Y, e as f, d as b, h as D, w as v, I as K, R as N, g as k } from "./tilecoord-CPcQJnrF.js";
2
- import { t as g, s as W, T as _, b as q } from "./Image-BHQYZWzH.js";
3
- import { au as H, ai as $, z as j, aw as V, p as B, o as F, _ as x, a4 as E, M as J, ae as Q, ao as w, u as tt, ab as et, aA as it, a as nt, am as R, d as rt, B as st, U as P, E as ot } from "./proj-CsjVeojN.js";
4
- import { c as m, a as A, n as lt, D as at } from "./common-C8efyyuc.js";
5
- const T = [0, 0, 0], d = 5;
1
+ import { b as Y, e as f, d as G, h as D, w as v, I as K, R as N, g as k } from "./tilecoord-DvX7WWiA.js";
2
+ import { t as d, s as W, T as _, i as q } from "./Image-mNMBOofs.js";
3
+ import { aT as H, an as $, D as j, J as V, a6 as B, K as F, P as x, y as E, M as J, z as Q, I as w, U as tt, aU as et, R as it, B as nt, a as R, al as rt, G as st, e as P, E as ot } from "./proj-DxGbobp7.js";
4
+ import { a as m, x as A, y as lt, D as at } from "./common-BoeTUnDZ.js";
5
+ const T = [0, 0, 0], g = 5;
6
6
  class U {
7
7
  /**
8
8
  * @param {Options} options Tile grid options.
@@ -226,7 +226,7 @@ class U {
226
226
  * @return {import("../coordinate.js").Coordinate} Tile center.
227
227
  */
228
228
  getTileCoordCenter(t) {
229
- const e = this.getOrigin(t[0]), i = this.getResolution(t[0]), n = g(this.getTileSize(t[0]), this.tmpSize_);
229
+ const e = this.getOrigin(t[0]), i = this.getResolution(t[0]), n = d(this.getTileSize(t[0]), this.tmpSize_);
230
230
  return [
231
231
  e[0] + (t[1] + 0.5) * n[0] * i,
232
232
  e[1] - (t[2] + 0.5) * n[1] * i
@@ -241,7 +241,7 @@ class U {
241
241
  * @api
242
242
  */
243
243
  getTileCoordExtent(t, e) {
244
- const i = this.getOrigin(t[0]), n = this.getResolution(t[0]), s = g(this.getTileSize(t[0]), this.tmpSize_), r = i[0] + t[1] * s[0] * n, l = i[1] - (t[2] + 1) * s[1] * n, a = r + s[0] * n, h = l + s[1] * n;
244
+ const i = this.getOrigin(t[0]), n = this.getResolution(t[0]), s = d(this.getTileSize(t[0]), this.tmpSize_), r = i[0] + t[1] * s[0] * n, l = i[1] - (t[2] + 1) * s[1] * n, a = r + s[0] * n, h = l + s[1] * n;
245
245
  return j(r, l, a, h, e);
246
246
  }
247
247
  /**
@@ -278,9 +278,9 @@ class U {
278
278
  * @private
279
279
  */
280
280
  getTileCoordForXYAndResolution_(t, e, i, n, s) {
281
- const r = this.getZForResolution(i), l = i / this.getResolution(r), a = this.getOrigin(r), h = g(this.getTileSize(r), this.tmpSize_);
281
+ const r = this.getZForResolution(i), l = i / this.getResolution(r), a = this.getOrigin(r), h = d(this.getTileSize(r), this.tmpSize_);
282
282
  let c = l * (t - a[0]) / i / h[0], u = l * (a[1] - e) / i / h[1];
283
- return n ? (c = F(c, d) - 1, u = F(u, d) - 1) : (c = x(c, d), u = x(u, d)), b(r, c, u, s);
283
+ return n ? (c = F(c, g) - 1, u = F(u, g) - 1) : (c = x(c, g), u = x(u, g)), G(r, c, u, s);
284
284
  }
285
285
  /**
286
286
  * Although there is repetition between this method and `getTileCoordForXYAndResolution_`,
@@ -298,9 +298,9 @@ class U {
298
298
  * @private
299
299
  */
300
300
  getTileCoordForXYAndZ_(t, e, i, n, s) {
301
- const r = this.getOrigin(i), l = this.getResolution(i), a = g(this.getTileSize(i), this.tmpSize_);
301
+ const r = this.getOrigin(i), l = this.getResolution(i), a = d(this.getTileSize(i), this.tmpSize_);
302
302
  let h = (t - r[0]) / l / a[0], c = (r[1] - e) / l / a[1];
303
- return n ? (h = F(h, d) - 1, c = F(c, d) - 1) : (h = x(h, d), c = x(c, d)), b(i, h, c, s);
303
+ return n ? (h = F(h, g) - 1, c = F(c, g) - 1) : (h = x(h, g), c = x(c, g)), G(i, h, c, s);
304
304
  }
305
305
  /**
306
306
  * Get a tile coordinate given a map coordinate and zoom level.
@@ -395,12 +395,12 @@ class U {
395
395
  this.fullTileRanges_ = i;
396
396
  }
397
397
  }
398
- function p(o) {
398
+ function O(o) {
399
399
  let t = o.getDefaultTileGrid();
400
400
  return t || (t = ut(o), o.setDefaultTileGrid(t)), t;
401
401
  }
402
402
  function ht(o, t, e) {
403
- const i = t[0], n = o.getTileCoordCenter(t), s = X(e);
403
+ const i = t[0], n = o.getTileCoordCenter(t), s = p(e);
404
404
  if (!tt(s, n)) {
405
405
  const r = w(s), l = Math.ceil(
406
406
  (s[0] - n[0]) / r
@@ -411,7 +411,7 @@ function ht(o, t, e) {
411
411
  }
412
412
  function ct(o, t, e, i) {
413
413
  i = i !== void 0 ? i : "top-left";
414
- const n = O(o, t, e);
414
+ const n = X(o, t, e);
415
415
  return new U({
416
416
  extent: o,
417
417
  origin: et(o, i),
@@ -424,7 +424,7 @@ function jt(o) {
424
424
  extent: e,
425
425
  minZoom: t.minZoom,
426
426
  tileSize: t.tileSize,
427
- resolutions: O(
427
+ resolutions: X(
428
428
  e,
429
429
  t.maxZoom,
430
430
  t.tileSize,
@@ -433,8 +433,8 @@ function jt(o) {
433
433
  };
434
434
  return new U(i);
435
435
  }
436
- function O(o, t, e, i) {
437
- t = t !== void 0 ? t : at, e = g(e !== void 0 ? e : A);
436
+ function X(o, t, e, i) {
437
+ t = t !== void 0 ? t : at, e = d(e !== void 0 ? e : A);
438
438
  const n = Q(o), s = w(o);
439
439
  i = i > 0 ? i : Math.max(s / e[0], n / e[1]);
440
440
  const r = t + 1, l = new Array(r);
@@ -443,10 +443,10 @@ function O(o, t, e, i) {
443
443
  return l;
444
444
  }
445
445
  function ut(o, t, e, i) {
446
- const n = X(o);
446
+ const n = p(o);
447
447
  return ct(n, t, e, i);
448
448
  }
449
- function X(o) {
449
+ function p(o) {
450
450
  o = E(o);
451
451
  let t = o.getExtent();
452
452
  if (!t) {
@@ -463,9 +463,9 @@ function wt(o, t) {
463
463
  const i = e.join("&");
464
464
  return o = o.replace(/[?&]$/, ""), o += o.includes("?") ? "&" : "?", o + i;
465
465
  }
466
- const dt = /\{z\}/g, gt = /\{x\}/g, ft = /\{y\}/g, Tt = /\{-y\}/g;
466
+ const gt = /\{z\}/g, dt = /\{x\}/g, ft = /\{y\}/g, Tt = /\{-y\}/g;
467
467
  function mt(o, t, e, i, n) {
468
- return o.replace(dt, t.toString()).replace(gt, e.toString()).replace(ft, i.toString()).replace(Tt, function() {
468
+ return o.replace(gt, t.toString()).replace(dt, e.toString()).replace(ft, i.toString()).replace(Tt, function() {
469
469
  if (n === void 0)
470
470
  throw new Error(
471
471
  "If the URL template has a {-y} placeholder, the grid extent must be known"
@@ -539,7 +539,7 @@ class Et extends nt {
539
539
  * @param {Options} options Source options.
540
540
  */
541
541
  constructor(t) {
542
- super(), this.projection = E(t.projection), this.attributions_ = G(t.attributions), this.attributionsCollapsible_ = t.attributionsCollapsible ?? !0, this.loading = !1, this.state_ = t.state !== void 0 ? t.state : "ready", this.wrapX_ = t.wrapX !== void 0 ? t.wrapX : !1, this.interpolate_ = !!t.interpolate, this.viewResolver = null, this.viewRejector = null;
542
+ super(), this.projection = E(t.projection), this.attributions_ = b(t.attributions), this.attributionsCollapsible_ = t.attributionsCollapsible ?? !0, this.loading = !1, this.state_ = t.state !== void 0 ? t.state : "ready", this.wrapX_ = t.wrapX !== void 0 ? t.wrapX : !1, this.interpolate_ = !!t.interpolate, this.viewResolver = null, this.viewRejector = null;
543
543
  const e = this;
544
544
  this.viewPromise_ = new Promise(function(i, n) {
545
545
  e.viewResolver = i, e.viewRejector = n;
@@ -616,7 +616,7 @@ class Et extends nt {
616
616
  * @api
617
617
  */
618
618
  setAttributions(t) {
619
- this.attributions_ = G(t), this.changed();
619
+ this.attributions_ = b(t), this.changed();
620
620
  }
621
621
  /**
622
622
  * Set the state of the source.
@@ -626,7 +626,7 @@ class Et extends nt {
626
626
  this.state_ = t, this.changed();
627
627
  }
628
628
  }
629
- function G(o) {
629
+ function b(o) {
630
630
  return o ? typeof o == "function" ? o : (Array.isArray(o) || (o = [o]), (t) => o) : null;
631
631
  }
632
632
  class St extends Et {
@@ -643,7 +643,7 @@ class St extends Et {
643
643
  interpolate: t.interpolate
644
644
  }), this.on, this.once, this.un, this.tilePixelRatio_ = t.tilePixelRatio !== void 0 ? t.tilePixelRatio : 1, this.tileGrid = t.tileGrid !== void 0 ? t.tileGrid : null;
645
645
  const e = [256, 256];
646
- this.tileGrid && g(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), e), this.tmpSize = [0, 0], this.key_ = t.key || R(this), this.tileOptions = {
646
+ this.tileGrid && d(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), e), this.tmpSize = [0, 0], this.key_ = t.key || R(this), this.tileOptions = {
647
647
  transition: t.transition,
648
648
  interpolate: t.interpolate
649
649
  }, this.zDirection = t.zDirection ? t.zDirection : 0;
@@ -705,7 +705,7 @@ class St extends Et {
705
705
  * @return {!import("../tilegrid/TileGrid.js").default} Tile grid.
706
706
  */
707
707
  getTileGridForProjection(t) {
708
- return this.tileGrid ? this.tileGrid : p(t);
708
+ return this.tileGrid ? this.tileGrid : O(t);
709
709
  }
710
710
  /**
711
711
  * Get the tile pixel ratio for this source. Subclasses may override this
@@ -724,7 +724,7 @@ class St extends Et {
724
724
  * @return {import("../size.js").Size} Tile size.
725
725
  */
726
726
  getTilePixelSize(t, e, i) {
727
- const n = this.getTileGridForProjection(i), s = this.getTilePixelRatio(e), r = g(n.getTileSize(t), this.tmpSize);
727
+ const n = this.getTileGridForProjection(i), s = this.getTilePixelRatio(e), r = d(n.getTileSize(t), this.tmpSize);
728
728
  return s == 1 ? r : W(r, s, this.tmpSize);
729
729
  }
730
730
  /**
@@ -762,7 +762,7 @@ class Pt extends st {
762
762
  super(t), this.tile = e;
763
763
  }
764
764
  }
765
- const z = {
765
+ const y = {
766
766
  /**
767
767
  * Triggered when a tile starts loading.
768
768
  * @event module:ol/source/Tile.TileSourceEvent#tileloadstart
@@ -785,7 +785,7 @@ const z = {
785
785
  */
786
786
  TILELOADERROR: "tileloaderror"
787
787
  };
788
- class y extends St {
788
+ class z extends St {
789
789
  /**
790
790
  * @param {Options} options Image tile options.
791
791
  */
@@ -803,7 +803,7 @@ class y extends St {
803
803
  key: t.key,
804
804
  attributionsCollapsible: t.attributionsCollapsible,
805
805
  zDirection: t.zDirection
806
- }), this.generateTileUrlFunction_ = this.tileUrlFunction === y.prototype.tileUrlFunction, this.tileLoadFunction = t.tileLoadFunction, t.tileUrlFunction && (this.tileUrlFunction = t.tileUrlFunction), this.urls = null, t.urls ? this.setUrls(t.urls) : t.url && this.setUrl(t.url), this.tileLoadingKeys_ = {};
806
+ }), this.generateTileUrlFunction_ = this.tileUrlFunction === z.prototype.tileUrlFunction, this.tileLoadFunction = t.tileLoadFunction, t.tileUrlFunction && (this.tileUrlFunction = t.tileUrlFunction), this.urls = null, t.urls ? this.setUrls(t.urls) : t.url && this.setUrl(t.url), this.tileLoadingKeys_ = {};
807
807
  }
808
808
  /**
809
809
  * Deprecated. Use an ImageTile source instead.
@@ -845,7 +845,7 @@ class y extends St {
845
845
  t.target
846
846
  ), i = R(e), n = e.getState();
847
847
  let s;
848
- n == _.LOADING ? (this.tileLoadingKeys_[i] = !0, s = z.TILELOADSTART) : i in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[i], s = n == _.ERROR ? z.TILELOADERROR : n == _.LOADED ? z.TILELOADEND : void 0), s != null && this.dispatchEvent(new Pt(s, e));
848
+ n == _.LOADING ? (this.tileLoadingKeys_[i] = !0, s = y.TILELOADSTART) : i in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[i], s = n == _.ERROR ? y.TILELOADERROR : n == _.LOADED ? y.TILELOADEND : void 0), s != null && this.dispatchEvent(new Pt(s, e));
849
849
  }
850
850
  /**
851
851
  * Deprecated. Use an ImageTile source instead.
@@ -896,7 +896,7 @@ class y extends St {
896
896
  tileUrlFunction(t, e, i) {
897
897
  }
898
898
  }
899
- class At extends y {
899
+ class At extends z {
900
900
  /**
901
901
  * @param {!Options} options Image tile options.
902
902
  */
@@ -907,7 +907,7 @@ class At extends y {
907
907
  projection: t.projection,
908
908
  state: t.state,
909
909
  tileGrid: t.tileGrid,
910
- tileLoadFunction: t.tileLoadFunction ? t.tileLoadFunction : zt,
910
+ tileLoadFunction: t.tileLoadFunction ? t.tileLoadFunction : yt,
911
911
  tilePixelRatio: t.tilePixelRatio,
912
912
  tileUrlFunction: t.tileUrlFunction,
913
913
  url: t.url,
@@ -953,7 +953,7 @@ class At extends y {
953
953
  if (this.tileGrid && (!e || P(e, t)))
954
954
  return this.tileGrid;
955
955
  const i = R(t);
956
- return i in this.tileGridForProjection || (this.tileGridForProjection[i] = p(t)), this.tileGridForProjection[i];
956
+ return i in this.tileGridForProjection || (this.tileGridForProjection[i] = O(t)), this.tileGridForProjection[i];
957
957
  }
958
958
  /**
959
959
  * @param {number} z Tile coordinate z.
@@ -1069,7 +1069,7 @@ class At extends y {
1069
1069
  }
1070
1070
  }
1071
1071
  }
1072
- function zt(o, t) {
1072
+ function yt(o, t) {
1073
1073
  if (q) {
1074
1074
  const e = o.getCrossOrigin();
1075
1075
  let i = "same-origin", n = "same-origin";
@@ -1096,14 +1096,14 @@ function zt(o, t) {
1096
1096
  }
1097
1097
  export {
1098
1098
  Et as S,
1099
- U as T,
1100
- y as U,
1101
- At as a,
1099
+ At as T,
1100
+ z as U,
1101
+ U as a,
1102
1102
  wt as b,
1103
- xt as c,
1104
- Rt as d,
1105
- jt as e,
1106
- _t as f,
1107
- X as g,
1108
- p as h
1103
+ jt as c,
1104
+ _t as d,
1105
+ p as e,
1106
+ Rt as f,
1107
+ O as g,
1108
+ xt as h
1109
1109
  };