@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
@@ -1501,120 +1501,120 @@ function Vt() {
1501
1501
  }
1502
1502
  Vt();
1503
1503
  export {
1504
- ys as $,
1505
- tn as A,
1506
- On as B,
1507
- _s as C,
1508
- jn as D,
1504
+ Xs as $,
1505
+ ts as A,
1506
+ es as B,
1507
+ ws as C,
1508
+ B as D,
1509
1509
  Vn as E,
1510
- ns as F,
1511
- ms as G,
1512
- qs as H,
1513
- Sn as I,
1514
- kt as J,
1515
- qt as K,
1516
- bs as L,
1510
+ Ls as F,
1511
+ On as G,
1512
+ bn as H,
1513
+ G as I,
1514
+ zt as J,
1515
+ us as K,
1516
+ Ss as L,
1517
1517
  J as M,
1518
- ws as N,
1518
+ ls as N,
1519
1519
  Hn as O,
1520
- rn as P,
1521
- kn as Q,
1522
- E as R,
1523
- gt as S,
1520
+ fs as P,
1521
+ Ht as Q,
1522
+ as as R,
1523
+ ys as S,
1524
1524
  xt as T,
1525
- Hs as U,
1525
+ Ms as U,
1526
1526
  gn as V,
1527
- Qt as W,
1528
- Ts as X,
1529
- rt as Y,
1530
- et as Z,
1531
- fs as _,
1532
- es as a,
1533
- Ys as a0,
1534
- ks as a1,
1535
- Js as a2,
1536
- Qs as a3,
1537
- w as a4,
1538
- V as a5,
1539
- Et as a6,
1540
- vs as a7,
1541
- Ln as a8,
1542
- An as a9,
1543
- as as aA,
1544
- Ws as aB,
1545
- Is as aC,
1546
- Jt as aD,
1547
- Us as aE,
1548
- ls as aF,
1549
- ps as aG,
1550
- Os as aH,
1551
- os as aI,
1552
- nt as aJ,
1553
- Nn as aK,
1554
- Ns as aL,
1555
- is as aM,
1556
- nn as aN,
1557
- ss as aO,
1558
- M as aP,
1559
- js as aQ,
1560
- zs as aR,
1561
- Ht as aS,
1562
- Ks as aT,
1563
- Jn as aU,
1564
- hn as aV,
1565
- Mt as aW,
1566
- Ls as aX,
1567
- Fs as aY,
1568
- ut as aZ,
1569
- ot as aa,
1570
- Rs as ab,
1571
- Mn as ac,
1572
- Ss as ad,
1573
- ct as ae,
1574
- Cs as af,
1575
- $s as ag,
1576
- at as ah,
1577
- Un as ai,
1578
- pn as aj,
1527
+ En as W,
1528
+ E as X,
1529
+ Jt as Y,
1530
+ kn as Z,
1531
+ ds as _,
1532
+ Zn as a,
1533
+ rt as a0,
1534
+ In as a1,
1535
+ kt as a2,
1536
+ nn as a3,
1537
+ cn as a4,
1538
+ Vs as a5,
1539
+ xn as a6,
1540
+ Fs as a7,
1541
+ ut as a8,
1542
+ tn as a9,
1543
+ An as aA,
1544
+ Os as aB,
1545
+ un as aC,
1546
+ zn as aD,
1547
+ Cn as aE,
1548
+ ps as aF,
1549
+ Us as aG,
1550
+ jn as aH,
1551
+ Mt as aI,
1552
+ q as aJ,
1553
+ pn as aK,
1554
+ Ln as aL,
1555
+ at as aM,
1556
+ Is as aN,
1557
+ is as aO,
1558
+ Ws as aP,
1559
+ qs as aQ,
1560
+ As as aR,
1561
+ qt as aS,
1562
+ Zt as aT,
1563
+ Rs as aU,
1564
+ os as aV,
1565
+ Sn as aW,
1566
+ vs as aX,
1567
+ et as aY,
1568
+ Gs as aZ,
1569
+ Ts as aa,
1570
+ bs as ab,
1571
+ ns as ac,
1572
+ ks as ad,
1573
+ Nn as ae,
1574
+ hs as af,
1575
+ gt as ag,
1576
+ ht as ah,
1577
+ js as ai,
1578
+ Ns as aj,
1579
1579
  qn as ak,
1580
- cn as al,
1581
- Zn as am,
1582
- Vs as an,
1583
- G as ao,
1584
- Ds as ap,
1585
- lt as aq,
1586
- Gs as ar,
1587
- Kn as as,
1588
- bn as at,
1589
- Zt as au,
1590
- cs as av,
1591
- zt as aw,
1592
- k as ax,
1593
- un as ay,
1594
- ts as az,
1595
- q as b,
1596
- zn as c,
1597
- rs as d,
1598
- As as e,
1599
- Bs as f,
1600
- Rn as g,
1601
- x as h,
1602
- Xs as i,
1603
- ft as j,
1604
- In as k,
1605
- jt as l,
1606
- hs as m,
1607
- gs as n,
1608
- us as o,
1609
- xn as p,
1610
- Cn as q,
1611
- ds as r,
1612
- ht as s,
1613
- Es as t,
1614
- Ms as u,
1615
- Ps as v,
1616
- st as w,
1617
- En as x,
1618
- Gn as y,
1619
- B as z
1580
+ rs as al,
1581
+ M as am,
1582
+ Un as an,
1583
+ ft as ao,
1584
+ rn as ap,
1585
+ Ds as aq,
1586
+ ss as ar,
1587
+ Ys as as,
1588
+ Jn as at,
1589
+ x as au,
1590
+ V as av,
1591
+ Rn as aw,
1592
+ Bs as ax,
1593
+ Et as ay,
1594
+ Mn as az,
1595
+ gs as b,
1596
+ Ps as c,
1597
+ Cs as d,
1598
+ Hs as e,
1599
+ Kn as f,
1600
+ $s as g,
1601
+ Qs as h,
1602
+ lt as i,
1603
+ Js as j,
1604
+ zs as k,
1605
+ k as l,
1606
+ cs as m,
1607
+ jt as n,
1608
+ Qt as o,
1609
+ Es as p,
1610
+ st as q,
1611
+ ms as r,
1612
+ nt as s,
1613
+ Ks as t,
1614
+ hn as u,
1615
+ Gn as v,
1616
+ _s as w,
1617
+ ot as x,
1618
+ w as y,
1619
+ ct as z
1620
1620
  };
@@ -1,6 +1,6 @@
1
- import { T as d, b as nt, l as xt, c as H, r as st } from "./Image-BHQYZWzH.js";
2
- import { f as Tt, b as pt } from "./common-C8efyyuc.js";
3
- import { c as It, E as ft, d as Xt, aS as _t, ag as rt, u as Mt, X as vt, ae as b, ao as y, ai as dt, aI as Wt, y as gt, aa as Yt, $ as yt, I as Pt, ak as Lt, aj as Ot, a9 as Ft, a8 as wt, a7 as et, m as ot, aq as Dt, aA as $, Y as z, af as V, ax as Ct, aV as at, p as ht, aX as At, am as Rt } from "./proj-CsjVeojN.js";
1
+ import { T as d, i as nt, n as xt, c as b, b as st } from "./Image-mNMBOofs.js";
2
+ import { z as Tt, g as pt } from "./common-BoeTUnDZ.js";
3
+ import { aD as It, E as ft, al as Xt, Q as _t, g as rt, U as vt, aa as Mt, z as H, I as y, an as dt, aV as Wt, v as gt, x as Yt, S as yt, aW as Lt, ak as Pt, aK as Ft, aA as Ot, aL as wt, aX as et, af as ot, i as Dt, R as z, a0 as $, d as V, l as Ct, u as at, a6 as ht, F as At, a as Rt } from "./proj-DxGbobp7.js";
4
4
  class mt extends It {
5
5
  /**
6
6
  * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
@@ -108,7 +108,7 @@ class mt extends It {
108
108
  this.release(), super.disposeInternal();
109
109
  }
110
110
  }
111
- class $t extends mt {
111
+ class zt extends mt {
112
112
  /**
113
113
  * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
114
114
  * @param {import("./TileState.js").default} state State.
@@ -234,7 +234,7 @@ class $t extends mt {
234
234
  }
235
235
  }
236
236
  function kt() {
237
- const n = H(1, 1);
237
+ const n = b(1, 1);
238
238
  return n.fillStyle = "rgba(0,0,0,0)", n.fillRect(0, 0, 1, 1), n.canvas;
239
239
  }
240
240
  class Bt {
@@ -308,7 +308,7 @@ class Bt {
308
308
  return this.minX <= t.maxX && this.maxX >= t.minX && this.minY <= t.maxY && this.maxY >= t.minY;
309
309
  }
310
310
  }
311
- function zt(n, t, s, e, r) {
311
+ function $t(n, t, s, e, r) {
312
312
  return r !== void 0 ? (r.minX = n, r.maxX = t, r.minY = s, r.maxY = e, r) : new Bt(n, t, s, e);
313
313
  }
314
314
  let J;
@@ -321,7 +321,7 @@ function tt(n, t) {
321
321
  }
322
322
  function Gt() {
323
323
  if (J === void 0) {
324
- const n = H(6, 6, B);
324
+ const n = b(6, 6, B);
325
325
  n.globalCompositeOperation = "lighter", n.fillStyle = "rgba(210, 0, 0, 0.75)", ct(n, 4, 5, 4, 0), ct(n, 4, 5, 0, 5);
326
326
  const t = n.getImageData(0, 0, 3, 3).data;
327
327
  J = tt(t, 0) || tt(t, 4) || tt(t, 8), st(n), B.push(n.canvas);
@@ -340,13 +340,13 @@ function ut(n, t, s, e) {
340
340
  const m = n.getMetersPerUnit();
341
341
  m !== void 0 && (i /= m);
342
342
  const g = n.getExtent();
343
- if (!g || Mt(g, r)) {
343
+ if (!g || vt(g, r)) {
344
344
  const T = rt(n, i, r) / i;
345
345
  isFinite(T) && T > 0 && (i /= T);
346
346
  }
347
347
  return i;
348
348
  }
349
- function Nt(n, t, s, e) {
349
+ function Kt(n, t, s, e) {
350
350
  const r = Yt(s);
351
351
  let i = ut(
352
352
  n,
@@ -363,8 +363,8 @@ function Nt(n, t, s, e) {
363
363
  ), isFinite(i) && i > 0;
364
364
  }), i;
365
365
  }
366
- function St(n, t, s, e, r, i, c, m, g, T, X, x, P, L) {
367
- const a = H(
366
+ function Nt(n, t, s, e, r, i, c, m, g, T, X, x, L, P) {
367
+ const a = b(
368
368
  Math.round(s * n),
369
369
  Math.round(s * t),
370
370
  B
@@ -377,28 +377,28 @@ function St(n, t, s, e, r, i, c, m, g, T, X, x, P, L) {
377
377
  }
378
378
  a.globalCompositeOperation = "lighter";
379
379
  const E = gt();
380
- g.forEach(function(o, O, w) {
381
- vt(E, o.extent);
380
+ g.forEach(function(o, F, w) {
381
+ Mt(E, o.extent);
382
382
  });
383
383
  let l;
384
384
  const f = s / e, _ = (x ? 1 : 1 + Math.pow(2, -24)) / f;
385
- (!P || g.length !== 1 || T !== 0) && (l = H(
385
+ (!L || g.length !== 1 || T !== 0) && (l = b(
386
386
  Math.round(y(E) * f),
387
- Math.round(b(E) * f),
387
+ Math.round(H(E) * f),
388
388
  B
389
- ), x || (l.imageSmoothingEnabled = !1), g.forEach(function(o, O, w) {
389
+ ), x || (l.imageSmoothingEnabled = !1), g.forEach(function(o, F, w) {
390
390
  if (o.image.width > 0 && o.image.height > 0) {
391
391
  if (o.clipExtent) {
392
392
  l.save();
393
- const M = (o.clipExtent[0] - E[0]) * f, W = -(o.clipExtent[3] - E[3]) * f, D = y(o.clipExtent) * f, A = b(o.clipExtent) * f;
393
+ const v = (o.clipExtent[0] - E[0]) * f, W = -(o.clipExtent[3] - E[3]) * f, D = y(o.clipExtent) * f, A = H(o.clipExtent) * f;
394
394
  l.rect(
395
- x ? M : Math.round(M),
395
+ x ? v : Math.round(v),
396
396
  x ? W : Math.round(W),
397
- x ? D : Math.round(M + D) - Math.round(M),
397
+ x ? D : Math.round(v + D) - Math.round(v),
398
398
  x ? A : Math.round(W + A) - Math.round(W)
399
399
  ), l.clip();
400
400
  }
401
- const p = (o.extent[0] - E[0]) * f, I = -(o.extent[3] - E[3]) * f, v = y(o.extent) * f, Y = b(o.extent) * f;
401
+ const p = (o.extent[0] - E[0]) * f, I = -(o.extent[3] - E[3]) * f, M = y(o.extent) * f, Y = H(o.extent) * f;
402
402
  l.drawImage(
403
403
  o.image,
404
404
  T,
@@ -407,74 +407,74 @@ function St(n, t, s, e, r, i, c, m, g, T, X, x, P, L) {
407
407
  o.image.height - 2 * T,
408
408
  x ? p : Math.round(p),
409
409
  x ? I : Math.round(I),
410
- x ? v : Math.round(p + v) - Math.round(p),
410
+ x ? M : Math.round(p + M) - Math.round(p),
411
411
  x ? Y : Math.round(I + Y) - Math.round(I)
412
412
  ), o.clipExtent && l.restore();
413
413
  }
414
414
  }));
415
415
  const u = dt(c);
416
- return m.getTriangles().forEach(function(o, O, w) {
416
+ return m.getTriangles().forEach(function(o, F, w) {
417
417
  const p = o.source, I = o.target;
418
- let v = p[0][0], Y = p[0][1], M = p[1][0], W = p[1][1], D = p[2][0], A = p[2][1];
419
- const G = h((I[0][0] - u[0]) / i), N = h(
418
+ let M = p[0][0], Y = p[0][1], v = p[1][0], W = p[1][1], D = p[2][0], A = p[2][1];
419
+ const G = h((I[0][0] - u[0]) / i), K = h(
420
420
  -(I[0][1] - u[1]) / i
421
421
  ), R = h((I[1][0] - u[0]) / i), k = h(
422
422
  -(I[1][1] - u[1]) / i
423
423
  ), Q = h((I[2][0] - u[0]) / i), U = h(
424
424
  -(I[2][1] - u[1]) / i
425
- ), j = v, q = Y;
426
- v = 0, Y = 0, M -= j, W -= q, D -= j, A -= q;
425
+ ), j = M, q = Y;
426
+ M = 0, Y = 0, v -= j, W -= q, D -= j, A -= q;
427
427
  const Et = [
428
- [M, W, 0, 0, R - G],
428
+ [v, W, 0, 0, R - G],
429
429
  [D, A, 0, 0, Q - G],
430
- [0, 0, M, W, k - N],
431
- [0, 0, D, A, U - N]
432
- ], S = Wt(Et);
433
- if (!S)
430
+ [0, 0, v, W, k - K],
431
+ [0, 0, D, A, U - K]
432
+ ], N = Wt(Et);
433
+ if (!N)
434
434
  return;
435
435
  if (a.save(), a.beginPath(), Gt() || !x) {
436
436
  a.moveTo(R, k);
437
- const F = 4, K = G - R, it = N - k;
438
- for (let C = 0; C < F; C++)
437
+ const O = 4, Z = G - R, it = K - k;
438
+ for (let C = 0; C < O; C++)
439
439
  a.lineTo(
440
- R + h((C + 1) * K / F),
441
- k + h(C * it / (F - 1))
442
- ), C != F - 1 && a.lineTo(
443
- R + h((C + 1) * K / F),
444
- k + h((C + 1) * it / (F - 1))
440
+ R + h((C + 1) * Z / O),
441
+ k + h(C * it / (O - 1))
442
+ ), C != O - 1 && a.lineTo(
443
+ R + h((C + 1) * Z / O),
444
+ k + h((C + 1) * it / (O - 1))
445
445
  );
446
446
  a.lineTo(Q, U);
447
447
  } else
448
- a.moveTo(R, k), a.lineTo(G, N), a.lineTo(Q, U);
448
+ a.moveTo(R, k), a.lineTo(G, K), a.lineTo(Q, U);
449
449
  a.clip(), a.transform(
450
- S[0],
451
- S[2],
452
- S[1],
453
- S[3],
450
+ N[0],
451
+ N[2],
452
+ N[1],
453
+ N[3],
454
454
  G,
455
- N
455
+ K
456
456
  ), a.translate(
457
457
  E[0] - j,
458
458
  E[3] - q
459
459
  );
460
- let Z;
460
+ let S;
461
461
  if (l)
462
- Z = l.canvas, a.scale(_, -_);
462
+ S = l.canvas, a.scale(_, -_);
463
463
  else {
464
- const F = g[0], K = F.extent;
465
- Z = F.image, a.scale(
466
- y(K) / Z.width,
467
- -b(K) / Z.height
464
+ const O = g[0], Z = O.extent;
465
+ S = O.image, a.scale(
466
+ y(Z) / S.width,
467
+ -H(Z) / S.height
468
468
  );
469
469
  }
470
- a.drawImage(Z, 0, 0), a.restore();
471
- }), l && (st(l), B.push(l.canvas)), X && (a.save(), a.globalCompositeOperation = "source-over", a.strokeStyle = "black", a.lineWidth = 1, m.getTriangles().forEach(function(o, O, w) {
472
- const p = o.target, I = (p[0][0] - u[0]) / i, v = -(p[0][1] - u[1]) / i, Y = (p[1][0] - u[0]) / i, M = -(p[1][1] - u[1]) / i, W = (p[2][0] - u[0]) / i, D = -(p[2][1] - u[1]) / i;
473
- a.beginPath(), a.moveTo(Y, M), a.lineTo(I, v), a.lineTo(W, D), a.closePath(), a.stroke();
470
+ a.drawImage(S, 0, 0), a.restore();
471
+ }), l && (st(l), B.push(l.canvas)), X && (a.save(), a.globalCompositeOperation = "source-over", a.strokeStyle = "black", a.lineWidth = 1, m.getTriangles().forEach(function(o, F, w) {
472
+ const p = o.target, I = (p[0][0] - u[0]) / i, M = -(p[0][1] - u[1]) / i, Y = (p[1][0] - u[0]) / i, v = -(p[1][1] - u[1]) / i, W = (p[2][0] - u[0]) / i, D = -(p[2][1] - u[1]) / i;
473
+ a.beginPath(), a.moveTo(Y, v), a.lineTo(I, M), a.lineTo(W, D), a.closePath(), a.stroke();
474
474
  }), a.restore()), a.canvas;
475
475
  }
476
- const Zt = 10, lt = 0.25;
477
- class Kt {
476
+ const St = 10, lt = 0.25;
477
+ class Zt {
478
478
  /**
479
479
  * @param {import("../proj/Projection.js").default} sourceProj Source projection.
480
480
  * @param {import("../proj/Projection.js").default} targetProj Target projection.
@@ -487,17 +487,17 @@ class Kt {
487
487
  constructor(t, s, e, r, i, c, m) {
488
488
  this.sourceProj_ = t, this.targetProj_ = s;
489
489
  let g = {};
490
- const T = m ? Pt(
490
+ const T = m ? Lt(
491
491
  (_) => pt(
492
492
  m,
493
493
  _t(_, this.targetProj_, this.sourceProj_)
494
494
  )
495
- ) : Lt(this.targetProj_, this.sourceProj_);
495
+ ) : Pt(this.targetProj_, this.sourceProj_);
496
496
  this.transformInv_ = function(_) {
497
497
  const u = _[0] + "/" + _[1];
498
498
  return g[u] || (g[u] = T(_)), g[u];
499
499
  }, this.maxSourceExtent_ = r, this.errorThresholdSquared_ = i * i, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!r && !!this.sourceProj_.getExtent() && y(r) >= y(this.sourceProj_.getExtent()), this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? y(this.sourceProj_.getExtent()) : null, this.targetWorldWidth_ = this.targetProj_.getExtent() ? y(this.targetProj_.getExtent()) : null;
500
- const X = dt(e), x = Ot(e), P = Ft(e), L = wt(e), a = this.transformInv_(X), h = this.transformInv_(x), E = this.transformInv_(P), l = this.transformInv_(L), f = Zt + (c ? Math.max(
500
+ const X = dt(e), x = Ft(e), L = Ot(e), P = wt(e), a = this.transformInv_(X), h = this.transformInv_(x), E = this.transformInv_(L), l = this.transformInv_(P), f = St + (c ? Math.max(
501
501
  0,
502
502
  Math.ceil(
503
503
  Math.log2(
@@ -508,8 +508,8 @@ class Kt {
508
508
  if (this.addQuad_(
509
509
  X,
510
510
  x,
511
- P,
512
511
  L,
512
+ P,
513
513
  a,
514
514
  h,
515
515
  E,
@@ -517,7 +517,7 @@ class Kt {
517
517
  f
518
518
  ), this.wrapsXInSource_) {
519
519
  let _ = 1 / 0;
520
- this.triangles_.forEach(function(u, o, O) {
520
+ this.triangles_.forEach(function(u, o, F) {
521
521
  _ = Math.min(
522
522
  _,
523
523
  u.source[0][0],
@@ -536,7 +536,7 @@ class Kt {
536
536
  [u.source[2][0], u.source[2][1]]
537
537
  ];
538
538
  o[0][0] - _ > this.sourceWorldWidth_ / 2 && (o[0][0] -= this.sourceWorldWidth_), o[1][0] - _ > this.sourceWorldWidth_ / 2 && (o[1][0] -= this.sourceWorldWidth_), o[2][0] - _ > this.sourceWorldWidth_ / 2 && (o[2][0] -= this.sourceWorldWidth_);
539
- const O = Math.min(
539
+ const F = Math.min(
540
540
  o[0][0],
541
541
  o[1][0],
542
542
  o[2][0]
@@ -545,7 +545,7 @@ class Kt {
545
545
  o[0][0],
546
546
  o[1][0],
547
547
  o[2][0]
548
- ) - O < this.sourceWorldWidth_ / 2 && (u.source = o);
548
+ ) - F < this.sourceWorldWidth_ / 2 && (u.source = o);
549
549
  }
550
550
  });
551
551
  }
@@ -584,17 +584,17 @@ class Kt {
584
584
  * @private
585
585
  */
586
586
  addQuad_(t, s, e, r, i, c, m, g, T) {
587
- const X = ot([i, c, m, g]), x = this.sourceWorldWidth_ ? y(X) / this.sourceWorldWidth_ : null, P = (
587
+ const X = ot([i, c, m, g]), x = this.sourceWorldWidth_ ? y(X) / this.sourceWorldWidth_ : null, L = (
588
588
  /** @type {number} */
589
589
  this.sourceWorldWidth_
590
- ), L = this.sourceProj_.canWrapX() && x > 0.5 && x < 1;
590
+ ), P = this.sourceProj_.canWrapX() && x > 0.5 && x < 1;
591
591
  let a = !1;
592
592
  if (T > 0) {
593
593
  if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {
594
594
  const E = ot([t, s, e, r]);
595
595
  a = y(E) / this.targetWorldWidth_ > lt || a;
596
596
  }
597
- !L && this.sourceProj_.isGlobal() && x && (a = x > lt || a);
597
+ !P && this.sourceProj_.isGlobal() && x && (a = x > lt || a);
598
598
  }
599
599
  if (!a && this.maxSourceExtent_ && isFinite(X[0]) && isFinite(X[1]) && isFinite(X[2]) && isFinite(X[3]) && !Dt(X, this.maxSourceExtent_))
600
600
  return;
@@ -609,7 +609,7 @@ class Kt {
609
609
  if (!a) {
610
610
  const E = [(t[0] + e[0]) / 2, (t[1] + e[1]) / 2], l = this.transformInv_(E);
611
611
  let f;
612
- L ? f = ($(i[0], P) + $(m[0], P)) / 2 - $(l[0], P) : f = (i[0] + m[0]) / 2 - l[0];
612
+ P ? f = (z(i[0], L) + z(m[0], L)) / 2 - z(l[0], L) : f = (i[0] + m[0]) / 2 - l[0];
613
613
  const _ = (i[1] + m[1]) / 2 - l[1];
614
614
  a = f * f + _ * _ > this.errorThresholdSquared_;
615
615
  }
@@ -664,7 +664,7 @@ class Kt {
664
664
  return;
665
665
  }
666
666
  }
667
- if (L) {
667
+ if (P) {
668
668
  if (!this.canWrapXInSource_)
669
669
  return;
670
670
  this.wrapsXInSource_ = !0;
@@ -680,7 +680,7 @@ class Kt {
680
680
  const t = gt();
681
681
  return this.triangles_.forEach(function(s, e, r) {
682
682
  const i = s.source;
683
- z(t, i[0]), z(t, i[1]), z(t, i[2]);
683
+ $(t, i[0]), $(t, i[1]), $(t, i[2]);
684
684
  }), t;
685
685
  }
686
686
  /**
@@ -690,7 +690,7 @@ class Kt {
690
690
  return this.triangles_;
691
691
  }
692
692
  }
693
- const bt = 0.5;
693
+ const Ht = 0.5;
694
694
  class Vt extends mt {
695
695
  /**
696
696
  * @param {import("../proj/Projection.js").default} sourceProj Source projection.
@@ -707,13 +707,13 @@ class Vt extends mt {
707
707
  * @param {boolean} [renderEdges] Render reprojection edges.
708
708
  * @param {import("../Tile.js").Options} [options] Tile options.
709
709
  */
710
- constructor(t, s, e, r, i, c, m, g, T, X, x, P) {
711
- super(i, d.IDLE, P), this.renderEdges_ = x !== void 0 ? x : !1, this.pixelRatio_ = m, this.gutter_ = g, this.canvas_ = null, this.sourceTileGrid_ = s, this.targetTileGrid_ = r, this.wrappedTileCoord_ = c || i, this.sourceTiles_ = [], this.sourcesListenerKeys_ = null, this.sourceZ_ = 0, this.clipExtent_ = t.canWrapX() ? t.getExtent() : void 0;
712
- const L = r.getTileCoordExtent(
710
+ constructor(t, s, e, r, i, c, m, g, T, X, x, L) {
711
+ super(i, d.IDLE, L), this.renderEdges_ = x !== void 0 ? x : !1, this.pixelRatio_ = m, this.gutter_ = g, this.canvas_ = null, this.sourceTileGrid_ = s, this.targetTileGrid_ = r, this.wrappedTileCoord_ = c || i, this.sourceTiles_ = [], this.sourcesListenerKeys_ = null, this.sourceZ_ = 0, this.clipExtent_ = t.canWrapX() ? t.getExtent() : void 0;
712
+ const P = r.getTileCoordExtent(
713
713
  this.wrappedTileCoord_
714
714
  ), a = this.targetTileGrid_.getExtent();
715
715
  let h = this.sourceTileGrid_.getExtent();
716
- const E = a ? V(L, a) : L;
716
+ const E = a ? V(P, a) : P;
717
717
  if (et(E) === 0) {
718
718
  this.state = d.EMPTY;
719
719
  return;
@@ -722,7 +722,7 @@ class Vt extends mt {
722
722
  l && (h ? h = V(h, l) : h = l);
723
723
  const f = r.getResolution(
724
724
  this.wrappedTileCoord_[0]
725
- ), _ = Nt(
725
+ ), _ = Kt(
726
726
  t,
727
727
  e,
728
728
  E,
@@ -732,8 +732,8 @@ class Vt extends mt {
732
732
  this.state = d.EMPTY;
733
733
  return;
734
734
  }
735
- const u = X !== void 0 ? X : bt;
736
- if (this.triangulation_ = new Kt(
735
+ const u = X !== void 0 ? X : Ht;
736
+ if (this.triangulation_ = new Zt(
737
737
  t,
738
738
  e,
739
739
  E,
@@ -757,23 +757,23 @@ class Vt extends mt {
757
757
  )) : o = V(o, h)), !et(o))
758
758
  this.state = d.EMPTY;
759
759
  else {
760
- let O = 0, w = 0;
761
- t.canWrapX() && (O = y(l), w = Math.floor(
762
- (o[0] - l[0]) / O
760
+ let F = 0, w = 0;
761
+ t.canWrapX() && (F = y(l), w = Math.floor(
762
+ (o[0] - l[0]) / F
763
763
  )), At(
764
764
  o.slice(),
765
765
  t,
766
766
  !0
767
767
  ).forEach((I) => {
768
- const v = s.getTileRangeForExtentAndZ(
768
+ const M = s.getTileRangeForExtentAndZ(
769
769
  I,
770
770
  this.sourceZ_
771
771
  );
772
- for (let Y = v.minX; Y <= v.maxX; Y++)
773
- for (let M = v.minY; M <= v.maxY; M++) {
774
- const W = w * O;
772
+ for (let Y = M.minX; Y <= M.maxX; Y++)
773
+ for (let v = M.minY; v <= M.maxY; v++) {
774
+ const W = w * F;
775
775
  this.sourceTiles_.push({
776
- getTile: () => T(this.sourceZ_, Y, M, m),
776
+ getTile: () => T(this.sourceZ_, Y, v, m),
777
777
  offset: W
778
778
  });
779
779
  }
@@ -813,7 +813,7 @@ class Vt extends mt {
813
813
  ), g = this.targetTileGrid_.getTileCoordExtent(
814
814
  this.wrappedTileCoord_
815
815
  );
816
- this.canvas_ = St(
816
+ this.canvas_ = Nt(
817
817
  r,
818
818
  i,
819
819
  this.pixelRatio_,
@@ -875,11 +875,11 @@ class Vt extends mt {
875
875
  function Jt(n, t, s, e) {
876
876
  return e !== void 0 ? (e[0] = n, e[1] = t, e[2] = s, e) : [n, t, s];
877
877
  }
878
- function Ht(n, t, s) {
878
+ function bt(n, t, s) {
879
879
  return n + "/" + t + "/" + s;
880
880
  }
881
881
  function te(n, t, s, e, r) {
882
- return `${Rt(n)},${t},${Ht(s, e, r)}`;
882
+ return `${Rt(n)},${t},${bt(s, e, r)}`;
883
883
  }
884
884
  function ee(n) {
885
885
  return Qt(n[0], n[1], n[2]);
@@ -895,17 +895,17 @@ function se(n, t) {
895
895
  return i ? i.containsXY(e, r) : !0;
896
896
  }
897
897
  export {
898
- bt as E,
899
- $t as I,
898
+ Ht as E,
899
+ zt as I,
900
900
  Vt as R,
901
901
  mt as T,
902
- Bt as a,
903
- Kt as b,
902
+ Zt as a,
903
+ Bt as b,
904
904
  ut as c,
905
905
  Jt as d,
906
- zt as e,
906
+ $t as e,
907
907
  te as g,
908
908
  ee as h,
909
- St as r,
909
+ Nt as r,
910
910
  se as w
911
911
  };