@datagouv/components-next 1.4.1-dev.1374.g4dfe0257 → 1.4.1-dev.1375.ge1f9e509
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.
- package/dist/{Control-CeBb5PEu.js → Control-DPuXeUqi.js} +3 -12
- package/dist/{Datafair.client-LChXlMI3.js → Datafair.client-LlEgG7WU.js} +2 -3
- package/dist/{Image-CBQwYbQB.js → Image-DVWRoLLI.js} +7 -22
- package/dist/{ImagePreview.client-DWNGZghK.js → ImagePreview.client-Db5dmxMP.js} +2 -3
- package/dist/{JsonPreview.client-DCklbUyJ.js → JsonPreview.client-DKy2AexC.js} +4 -6
- package/dist/{Layer-BPuffNS-.js → Layer-D_5tYbVm.js} +7 -9
- package/dist/{Map-QeL96qbQ.js → Map-CTBJEae_.js} +937 -967
- package/dist/{MapContainer.client-B-aQhH35.js → MapContainer.client-Clk9_bbS.js} +8 -10
- package/dist/{OSM-DT4I7v8A.js → OSM-B5Zc3qAf.js} +2 -3
- package/dist/{PdfPreview.client-1WFiBcXh.js → PdfPreview.client-D3wHTDb9.js} +130 -378
- package/dist/{PdfSkeleton-BvU7ERD1.js → PdfSkeleton-nas5Pmia.js} +2 -3
- package/dist/{Pmtiles.client-BlbOlwyy.js → Pmtiles.client-NGYdeSJY.js} +151 -350
- package/dist/{PreviewError-BfBCBDEx.js → PreviewError-EeaGx3SL.js} +6854 -6849
- package/dist/{PreviewWrapper-DvycGC7l.js → PreviewWrapper-BhldDdXK.js} +2 -3
- package/dist/{ScaleLine-Cwwk9wJo.js → ScaleLine-C_tuJ6VG.js} +3 -4
- package/dist/Tile-8nHSuqcv.js +571 -0
- package/dist/{Tile-4WpHaLOZ.js → Tile-Bu5lF4M5.js} +8 -13
- package/dist/{TileImage-CZZ4lgsm.js → TileImage-CgO5alXc.js} +105 -113
- package/dist/{View-DWqx4Jqr.js → View-Dad8DfSD.js} +25 -51
- package/dist/{XmlPreview.client-ClFD8R3a.js → XmlPreview.client-CmGbc3c3.js} +5 -7
- package/dist/assets/maplibre-gl-worker-CEzvAyZY.js +10 -0
- package/dist/components-next.js +9634 -10210
- package/dist/{en-C_qOt4Jn.js → en-OIaJCts4.js} +1 -2
- package/dist/{france-JfC0dOuE.js → france-BtSQqcqV.js} +5 -9
- package/dist/{hvd-ZlsiTVFh.js → hvd-CTia2VCz.js} +1 -2
- package/dist/{inspire-DZQ-yA5f.js → inspire-Cc-Kc4K-.js} +1 -2
- package/dist/{leaflet-src-lLkzhpcP.js → leaflet-src-BY_Zq0V0.js} +77 -126
- package/dist/{proj-DM6GW1n3.js → proj-COhZ08DR.js} +19 -37
- package/dist/{purify.es-D6pPunDo.js → purify.es-CGAWnSTR.js} +4 -27
- package/dist/{rolldown-runtime-CEFd7nDs.js → rolldown-runtime-DsPmjQRF.js} +2 -3
- package/dist/{sl-BxQ_ZY_w.js → sl-CKkMwQhf.js} +1 -2
- package/dist/{spd-Cs37HjuR.js → spd-Djcs02gw.js} +1 -2
- package/dist/{sr-JDtennFO.js → sr-DabGmchD.js} +1 -2
- package/dist/{src-D_UE0st7.js → src-D_o-aUzl.js} +1612 -2428
- package/dist/{text-clamp.esm-DRvX2Gzm.js → text-clamp.esm-DE3022VR.js} +3 -5
- package/dist/{transform-Ct1GejD-.js → transform-CNeEnSK9.js} +7 -13
- package/dist/{vue3-json-viewer-BJgUfh-l.js → vue3-json-viewer-CUx5EFVA.js} +1 -2
- package/dist/{vue3-xml-viewer.common-DbJwzvCC.js → vue3-xml-viewer.common-C0bbtsGT.js} +2 -3
- package/package.json +2 -2
- package/dist/Tile-BV44yf69.js +0 -574
- package/dist/assets/maplibre-gl-worker-C24SsKwV.js +0 -10
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { H as e, L as t, M as n, ft as r, t as i } from "./PreviewError-
|
|
2
|
-
import {
|
|
3
|
-
import { t as l } from "./
|
|
1
|
+
import { H as e, L as t, M as n, ft as r, t as i } from "./PreviewError-EeaGx3SL.js";
|
|
2
|
+
import { t as a } from "./purify.es-CGAWnSTR.js";
|
|
3
|
+
import { c as o, n as s, r as c, t as l } from "./france-BtSQqcqV.js";
|
|
4
4
|
import { computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, onMounted as v, openBlock as y, ref as b, toDisplayString as x, unref as S, useTemplateRef as C, withCtx as w } from "vue";
|
|
5
|
-
|
|
5
|
+
// ../node_modules/fflate/esm/browser.js
|
|
6
6
|
var T = Uint8Array, E = Uint16Array, D = Int32Array, O = new T([
|
|
7
7
|
0,
|
|
8
8
|
0,
|
|
@@ -270,8 +270,7 @@ var Oe = typeof TextDecoder < "u" && /*#__PURE__*/ new TextDecoder();
|
|
|
270
270
|
try {
|
|
271
271
|
Oe.decode(be, { stream: !0 });
|
|
272
272
|
} catch {}
|
|
273
|
-
|
|
274
|
-
//#region ../node_modules/pmtiles/dist/esm/index.js
|
|
273
|
+
// ../node_modules/pmtiles/dist/esm/index.js
|
|
275
274
|
var ke = Object.defineProperty, Ae = Math.pow, je = (e, t) => ke(e, "name", {
|
|
276
275
|
value: t,
|
|
277
276
|
configurable: !0
|
|
@@ -2032,11 +2031,7 @@ var Ei = (e) => {
|
|
|
2032
2031
|
let e = a() ? pi.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME : pi.MAX_PARALLEL_IMAGE_REQUESTS;
|
|
2033
2032
|
for (let r = n; r < e && t.length > 0; r++) {
|
|
2034
2033
|
let e = t.shift();
|
|
2035
|
-
|
|
2036
|
-
r--;
|
|
2037
|
-
continue;
|
|
2038
|
-
}
|
|
2039
|
-
c(e);
|
|
2034
|
+
e.abortController.signal.aborted ? r-- : c(e);
|
|
2040
2035
|
}
|
|
2041
2036
|
}, u = (e, t) => new Promise((n, r) => {
|
|
2042
2037
|
let i = new Image(), a = e.url, o = e.credentials;
|
|
@@ -4955,7 +4950,7 @@ function oa(e, t, n) {
|
|
|
4955
4950
|
for (p in ra(u.layout, d.layout, n, l, "setLayoutProperty"), ra(u.paint, d.paint, n, l, "setPaintProperty"), Yi(u.filter, d.filter) || Xi(n, {
|
|
4956
4951
|
command: "setFilter",
|
|
4957
4952
|
args: [l, d.filter]
|
|
4958
|
-
}),
|
|
4953
|
+
}), Yi(u.minzoom, d.minzoom) && Yi(u.maxzoom, d.maxzoom) || Xi(n, {
|
|
4959
4954
|
command: "setLayerZoomRange",
|
|
4960
4955
|
args: [
|
|
4961
4956
|
l,
|
|
@@ -8708,7 +8703,7 @@ function Qc(e, t, n) {
|
|
|
8708
8703
|
case "numberArray":
|
|
8709
8704
|
n = oo.parse(n);
|
|
8710
8705
|
break;
|
|
8711
|
-
default: Hc(n)
|
|
8706
|
+
default: Hc(n) === t.type || t.type === "enum" && t.values[n] || (n = void 0);
|
|
8712
8707
|
}
|
|
8713
8708
|
return Jc(n, e.default, t.default);
|
|
8714
8709
|
}
|
|
@@ -9877,7 +9872,7 @@ function ku(e) {
|
|
|
9877
9872
|
}
|
|
9878
9873
|
function Au(e) {
|
|
9879
9874
|
let t = e.value, n = e.key, r = ru(e);
|
|
9880
|
-
return r.length
|
|
9875
|
+
return r.length || (t.indexOf("{fontstack}") === -1 && r.push(new H(n, t, "\"glyphs\" url must include a \"{fontstack}\" token")), t.indexOf("{range}") === -1 && r.push(new H(n, t, "\"glyphs\" url must include a \"{range}\" token"))), r;
|
|
9881
9876
|
}
|
|
9882
9877
|
function ju(e, t = V) {
|
|
9883
9878
|
let n = [];
|
|
@@ -9962,13 +9957,7 @@ function Vu(e, t) {
|
|
|
9962
9957
|
}
|
|
9963
9958
|
function Hu(e, t) {
|
|
9964
9959
|
let n = !1;
|
|
9965
|
-
for (let r of t)
|
|
9966
|
-
if (r.severity === "warning") {
|
|
9967
|
-
wr(r.message);
|
|
9968
|
-
continue;
|
|
9969
|
-
}
|
|
9970
|
-
e.fire(new z(Error(r.message))), n = !0;
|
|
9971
|
-
}
|
|
9960
|
+
for (let r of t) r.severity === "warning" ? wr(r.message) : (e.fire(new z(Error(r.message))), n = !0);
|
|
9972
9961
|
return n;
|
|
9973
9962
|
}
|
|
9974
9963
|
function Uu(e, t, n, r) {
|
|
@@ -10518,15 +10507,7 @@ var md = " is a PAINT property not a LAYOUT property. Use get/setPaintProperty i
|
|
|
10518
10507
|
return this._visibilityExpression.getGlobalStateRefs();
|
|
10519
10508
|
}
|
|
10520
10509
|
setLayoutProperty(e, t, n = {}) {
|
|
10521
|
-
|
|
10522
|
-
this.visibility = t, this._visibilityExpression.setValue(t), this.recalculateVisibility();
|
|
10523
|
-
return;
|
|
10524
|
-
}
|
|
10525
|
-
if (this._transitionablePaint?.hasProperty(e)) {
|
|
10526
|
-
this.fire(new z(/* @__PURE__ */ Error(e + md)));
|
|
10527
|
-
return;
|
|
10528
|
-
}
|
|
10529
|
-
t != null && this._validate(Ru.layoutProperty, `layers.${this.id}.layout.${e}`, e, t, n) || this._unevaluatedLayout.setValue(e, t);
|
|
10510
|
+
e === "visibility" ? (this.visibility = t, this._visibilityExpression.setValue(t), this.recalculateVisibility()) : this._transitionablePaint?.hasProperty(e) ? this.fire(new z(/* @__PURE__ */ Error(e + md))) : t != null && this._validate(Ru.layoutProperty, `layers.${this.id}.layout.${e}`, e, t, n) || this._unevaluatedLayout.setValue(e, t);
|
|
10530
10511
|
}
|
|
10531
10512
|
getPaintProperty(e) {
|
|
10532
10513
|
if (e.endsWith("-transition")) {
|
|
@@ -11379,13 +11360,13 @@ var Ff = Td([
|
|
|
11379
11360
|
type: "Uint16"
|
|
11380
11361
|
}]), Lf = /* @__PURE__ */ pt(((e, t) => {
|
|
11381
11362
|
function n(e, t) {
|
|
11382
|
-
for (var n = e.length & 3, r = e.length - n, i = t, a, o = 3432918353, s = 461845907, c, l = 0; l < r;) c = e.charCodeAt(l) & 255 | (e.charCodeAt(++l) & 255) << 8 | (e.charCodeAt(++l) & 255) << 16 | (e.charCodeAt(++l) & 255) << 24, ++l, c = (c & 65535) * o + (((c >>> 16) * o & 65535) << 16)
|
|
11363
|
+
for (var n = e.length & 3, r = e.length - n, i = t, a, o = 3432918353, s = 461845907, c, l = 0; l < r;) c = e.charCodeAt(l) & 255 | (e.charCodeAt(++l) & 255) << 8 | (e.charCodeAt(++l) & 255) << 16 | (e.charCodeAt(++l) & 255) << 24, ++l, c = (c & 65535) * o + (((c >>> 16) * o & 65535) << 16) | 0, c = c << 15 | c >>> 17, c = (c & 65535) * s + (((c >>> 16) * s & 65535) << 16) | 0, i ^= c, i = i << 13 | i >>> 19, a = (i & 65535) * 5 + (((i >>> 16) * 5 & 65535) << 16) | 0, i = (a & 65535) + 27492 + (((a >>> 16) + 58964 & 65535) << 16);
|
|
11383
11364
|
switch (c = 0, n) {
|
|
11384
11365
|
case 3: c ^= (e.charCodeAt(l + 2) & 255) << 16;
|
|
11385
11366
|
case 2: c ^= (e.charCodeAt(l + 1) & 255) << 8;
|
|
11386
|
-
case 1: c ^= e.charCodeAt(l) & 255, c = (c & 65535) * o + (((c >>> 16) * o & 65535) << 16)
|
|
11367
|
+
case 1: c ^= e.charCodeAt(l) & 255, c = (c & 65535) * o + (((c >>> 16) * o & 65535) << 16) | 0, c = c << 15 | c >>> 17, c = (c & 65535) * s + (((c >>> 16) * s & 65535) << 16) | 0, i ^= c;
|
|
11387
11368
|
}
|
|
11388
|
-
return i ^= e.length, i ^= i >>> 16, i = (i & 65535) * 2246822507 + (((i >>> 16) * 2246822507 & 65535) << 16)
|
|
11369
|
+
return i ^= e.length, i ^= i >>> 16, i = (i & 65535) * 2246822507 + (((i >>> 16) * 2246822507 & 65535) << 16) | 0, i ^= i >>> 13, i = (i & 65535) * 3266489909 + (((i >>> 16) * 3266489909 & 65535) << 16) | 0, i ^= i >>> 16, i >>> 0;
|
|
11389
11370
|
}
|
|
11390
11371
|
t !== void 0 && (t.exports = n);
|
|
11391
11372
|
})), Rf = /* @__PURE__ */ pt(((e, t) => {
|
|
@@ -11547,11 +11528,8 @@ var Wf = class {
|
|
|
11547
11528
|
super(e, t), this.current = Zf;
|
|
11548
11529
|
}
|
|
11549
11530
|
set(e) {
|
|
11550
|
-
if (e[12] !== this.current[12] || e[0] !== this.current[0])
|
|
11551
|
-
|
|
11552
|
-
return;
|
|
11553
|
-
}
|
|
11554
|
-
for (let t = 1; t < 16; t++) if (e[t] !== this.current[t]) {
|
|
11531
|
+
if (e[12] !== this.current[12] || e[0] !== this.current[0]) this.current = e, this.gl.uniformMatrix4fv(this.location, !1, e);
|
|
11532
|
+
else for (let t = 1; t < 16; t++) if (e[t] !== this.current[t]) {
|
|
11555
11533
|
this.current = e, this.gl.uniformMatrix4fv(this.location, !1, e);
|
|
11556
11534
|
break;
|
|
11557
11535
|
}
|
|
@@ -12515,7 +12493,7 @@ var bm = class {
|
|
|
12515
12493
|
}
|
|
12516
12494
|
bind(e, t, n) {
|
|
12517
12495
|
let { context: r } = this, { gl: i } = r;
|
|
12518
|
-
this.texture !== this._ownedHandle && (this.texture = this._ownedHandle), i.bindTexture(i.TEXTURE_2D, this.texture),
|
|
12496
|
+
this.texture !== this._ownedHandle && (this.texture = this._ownedHandle), i.bindTexture(i.TEXTURE_2D, this.texture), n !== i.LINEAR_MIPMAP_NEAREST && n !== i.LINEAR_MIPMAP_LINEAR || this.useMipmap || (n = i.LINEAR);
|
|
12519
12497
|
let a = n || e;
|
|
12520
12498
|
e !== this.magFilter && (i.texParameteri(i.TEXTURE_2D, i.TEXTURE_MAG_FILTER, e), this.magFilter = e), a !== this.minFilter && (i.texParameteri(i.TEXTURE_2D, i.TEXTURE_MIN_FILTER, a), this.minFilter = a), t !== this.wrap && (i.texParameteri(i.TEXTURE_2D, i.TEXTURE_WRAP_S, t), i.texParameteri(i.TEXTURE_2D, i.TEXTURE_WRAP_T, t), this.wrap = t);
|
|
12521
12499
|
}
|
|
@@ -12757,11 +12735,8 @@ function Pm(e, t, n, r, i) {
|
|
|
12757
12735
|
let a = e, o = !1;
|
|
12758
12736
|
for (; e.prev !== e.next;) {
|
|
12759
12737
|
let s = e.prev, c = e.next;
|
|
12760
|
-
if (fh(s, e, c) < 0 && (i ? Im(e, n, r, i) : Fm(e)))
|
|
12761
|
-
|
|
12762
|
-
continue;
|
|
12763
|
-
}
|
|
12764
|
-
if (e = c, e === a) {
|
|
12738
|
+
if (fh(s, e, c) < 0 && (i ? Im(e, n, r, i) : Fm(e))) t.push(s.i, e.i, c.i), xh(e), e = c, a = c;
|
|
12739
|
+
else if (e = c, e === a) {
|
|
12765
12740
|
if (Am = !1, e = Nm(e), Am) {
|
|
12766
12741
|
a = e;
|
|
12767
12742
|
continue;
|
|
@@ -12925,17 +12900,16 @@ function ah(e, t, n, r) {
|
|
|
12925
12900
|
o.nextZ = null, eh.fill(null, 0, a), th.fill(null, 0, a);
|
|
12926
12901
|
}
|
|
12927
12902
|
function oh(e) {
|
|
12928
|
-
if (e <= 32) {
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
|
|
12903
|
+
if (e <= 32) for (let t = 1; t < e; t++) {
|
|
12904
|
+
let e = eh[t], n = e.z, r = t - 1;
|
|
12905
|
+
for (; r >= 0 && eh[r].z > n;) eh[r + 1] = eh[r], r--;
|
|
12906
|
+
eh[r + 1] = e;
|
|
12907
|
+
}
|
|
12908
|
+
else {
|
|
12909
|
+
nh.length < e && (nh = new Uint32Array(e), rh = new Uint32Array(e), th = Array(e));
|
|
12910
|
+
for (let t = 0; t < e; t++) nh[t] = eh[t].z;
|
|
12911
|
+
sh(e, eh, nh, th, rh, 0), sh(e, th, rh, eh, nh, 8), sh(e, eh, nh, th, rh, 16), sh(e, th, rh, eh, nh, 24);
|
|
12935
12912
|
}
|
|
12936
|
-
nh.length < e && (nh = new Uint32Array(e), rh = new Uint32Array(e), th = Array(e));
|
|
12937
|
-
for (let t = 0; t < e; t++) nh[t] = eh[t].z;
|
|
12938
|
-
sh(e, eh, nh, th, rh, 0), sh(e, th, rh, eh, nh, 8), sh(e, eh, nh, th, rh, 16), sh(e, th, rh, eh, nh, 24);
|
|
12939
12913
|
}
|
|
12940
12914
|
function sh(e, t, n, r, i, a) {
|
|
12941
12915
|
ih.fill(0);
|
|
@@ -12984,12 +12958,11 @@ function gh(e, t) {
|
|
|
12984
12958
|
let n = Math.min(e.x, t.x), r = Math.max(e.x, t.x), i = Math.min(e.y, t.y), a = Math.max(e.y, t.y), o = e;
|
|
12985
12959
|
do {
|
|
12986
12960
|
let s = o.next;
|
|
12987
|
-
if (o.x > r && s.x > r || o.x < n && s.x < n || o.y > a && s.y > a || o.y < i && s.y < i)
|
|
12961
|
+
if (o.x > r && s.x > r || o.x < n && s.x < n || o.y > a && s.y > a || o.y < i && s.y < i) o = s;
|
|
12962
|
+
else {
|
|
12963
|
+
if (o.i !== e.i && s.i !== e.i && o.i !== t.i && s.i !== t.i && mh(o, s, e, t)) return !0;
|
|
12988
12964
|
o = s;
|
|
12989
|
-
continue;
|
|
12990
12965
|
}
|
|
12991
|
-
if (o.i !== e.i && s.i !== e.i && o.i !== t.i && s.i !== t.i && mh(o, s, e, t)) return !0;
|
|
12992
|
-
o = s;
|
|
12993
12966
|
} while (o !== e);
|
|
12994
12967
|
return !1;
|
|
12995
12968
|
}
|
|
@@ -13061,7 +13034,7 @@ var Eh = -32768, Dh = 32767, Oh = class {
|
|
|
13061
13034
|
this._vertexBuffer = [], this._vertexDictionary = /* @__PURE__ */ new Map(), this._used = !1, this._granularity = e, this._granularityCellSize = F / e, this._canonical = t;
|
|
13062
13035
|
}
|
|
13063
13036
|
_getKey(e, t) {
|
|
13064
|
-
return e += 32768, t += 32768, e << 16 | t
|
|
13037
|
+
return e += 32768, t += 32768, e << 16 | t;
|
|
13065
13038
|
}
|
|
13066
13039
|
_vertexToIndex(e, t) {
|
|
13067
13040
|
if (e < -32768 || t < -32768 || e > 32767 || t > 32767) throw Error("Vertex coordinates are out of signed 16 bit integer range.");
|
|
@@ -13092,11 +13065,8 @@ var Eh = -32768, Dh = 32767, Oh = class {
|
|
|
13092
13065
|
}
|
|
13093
13066
|
if (o === c || s === l) continue;
|
|
13094
13067
|
let u = Math.floor(o / this._granularityCellSize), d = Math.ceil(c / this._granularityCellSize), f = Math.floor(s / this._granularityCellSize), p = Math.ceil(l / this._granularityCellSize);
|
|
13095
|
-
if (u === d && f === p)
|
|
13096
|
-
|
|
13097
|
-
continue;
|
|
13098
|
-
}
|
|
13099
|
-
for (let e = f; e < p; e++) {
|
|
13068
|
+
if (u === d && f === p) n.push(...r);
|
|
13069
|
+
else for (let e = f; e < p; e++) {
|
|
13100
13070
|
let t = this._scanlineGenerateVertexRingForCellRow(e, a, r);
|
|
13101
13071
|
Fh(this._vertexBuffer, t, n);
|
|
13102
13072
|
}
|
|
@@ -15726,15 +15696,11 @@ var Ev = class e {
|
|
|
15726
15696
|
return;
|
|
15727
15697
|
}
|
|
15728
15698
|
let n = this.getNextImageSectionCharCode();
|
|
15729
|
-
|
|
15730
|
-
wr("Reached maximum number of images 6401");
|
|
15731
|
-
return;
|
|
15732
|
-
}
|
|
15733
|
-
this.sections.push({
|
|
15699
|
+
n ? (this.sections.push({
|
|
15734
15700
|
scale: 1,
|
|
15735
15701
|
verticalAlign: e.verticalAlign || "bottom",
|
|
15736
15702
|
imageName: t
|
|
15737
|
-
}), this._appendSection(String.fromCharCode(n), this.sections.length - 1);
|
|
15703
|
+
}), this._appendSection(String.fromCharCode(n), this.sections.length - 1)) : wr("Reached maximum number of images 6401");
|
|
15738
15704
|
}
|
|
15739
15705
|
getNextImageSectionCharCode() {
|
|
15740
15706
|
return this.imageSectionID ? this.imageSectionID >= 63743 ? null : ++this.imageSectionID : (this.imageSectionID = 57344, this.imageSectionID);
|
|
@@ -17026,7 +16992,7 @@ function Yy(e, t, n, r, i, a, o, s, c) {
|
|
|
17026
16992
|
}
|
|
17027
16993
|
d += m;
|
|
17028
16994
|
}
|
|
17029
|
-
return
|
|
16995
|
+
return s || p.length || o || (p = Yy(e, d / 2, n, r, i, a, o, !0, c)), p;
|
|
17030
16996
|
}
|
|
17031
16997
|
function Xy(e, t, n, r, i) {
|
|
17032
16998
|
let a = [];
|
|
@@ -17034,7 +17000,7 @@ function Xy(e, t, n, r, i) {
|
|
|
17034
17000
|
let e;
|
|
17035
17001
|
for (let s = 0; s < o.length - 1; s++) {
|
|
17036
17002
|
let c = o[s], l = o[s + 1];
|
|
17037
|
-
c.x < t && l.x < t || (c.x < t ? c = new P(t, c.y + (l.y - c.y) * ((t - c.x) / (l.x - c.x)))._round() : l.x < t && (l = new P(t, c.y + (l.y - c.y) * ((t - c.x) / (l.x - c.x)))._round()), !(c.y < n && l.y < n) && (c.y < n ? c = new P(c.x + (l.x - c.x) * ((n - c.y) / (l.y - c.y)), n)._round() : l.y < n && (l = new P(c.x + (l.x - c.x) * ((n - c.y) / (l.y - c.y)), n)._round()), !(c.x >= r && l.x >= r) && (c.x >= r ? c = new P(r, c.y + (l.y - c.y) * ((r - c.x) / (l.x - c.x)))._round() : l.x >= r && (l = new P(r, c.y + (l.y - c.y) * ((r - c.x) / (l.x - c.x)))._round()), !(c.y >= i && l.y >= i) && (c.y >= i ? c = new P(c.x + (l.x - c.x) * ((i - c.y) / (l.y - c.y)), i)._round() : l.y >= i && (l = new P(c.x + (l.x - c.x) * ((i - c.y) / (l.y - c.y)), i)._round()),
|
|
17003
|
+
c.x < t && l.x < t || (c.x < t ? c = new P(t, c.y + (l.y - c.y) * ((t - c.x) / (l.x - c.x)))._round() : l.x < t && (l = new P(t, c.y + (l.y - c.y) * ((t - c.x) / (l.x - c.x)))._round()), !(c.y < n && l.y < n) && (c.y < n ? c = new P(c.x + (l.x - c.x) * ((n - c.y) / (l.y - c.y)), n)._round() : l.y < n && (l = new P(c.x + (l.x - c.x) * ((n - c.y) / (l.y - c.y)), n)._round()), !(c.x >= r && l.x >= r) && (c.x >= r ? c = new P(r, c.y + (l.y - c.y) * ((r - c.x) / (l.x - c.x)))._round() : l.x >= r && (l = new P(r, c.y + (l.y - c.y) * ((r - c.x) / (l.x - c.x)))._round()), !(c.y >= i && l.y >= i) && (c.y >= i ? c = new P(c.x + (l.x - c.x) * ((i - c.y) / (l.y - c.y)), i)._round() : l.y >= i && (l = new P(c.x + (l.x - c.x) * ((i - c.y) / (l.y - c.y)), i)._round()), e && c.equals(e[e.length - 1]) || (e = [c], a.push(e)), e.push(l)))));
|
|
17038
17004
|
}
|
|
17039
17005
|
}
|
|
17040
17006
|
return a;
|
|
@@ -17453,7 +17419,7 @@ function gb(e, t, n, r, i, a, o, s, c, l, u, d, f) {
|
|
|
17453
17419
|
let t = Ah(i, j), a = Jy(t, x, w, n.vertical || g, r, 24, y, e.overscaling, F);
|
|
17454
17420
|
for (let n of a) {
|
|
17455
17421
|
let r = g;
|
|
17456
|
-
|
|
17422
|
+
r && xb(e, r.text, O, n) || ee(t, n);
|
|
17457
17423
|
}
|
|
17458
17424
|
}
|
|
17459
17425
|
else if (D === "line-center") {
|
|
@@ -18465,11 +18431,7 @@ var cx = class {
|
|
|
18465
18431
|
let a = [];
|
|
18466
18432
|
for (let e of i) {
|
|
18467
18433
|
let t = ax(e);
|
|
18468
|
-
|
|
18469
|
-
wr(`Ignoring the unicode range "${e}" of the font face at ${n.url}: it is not a valid range.`);
|
|
18470
|
-
continue;
|
|
18471
|
-
}
|
|
18472
|
-
a.push(t);
|
|
18434
|
+
t ? a.push(t) : wr(`Ignoring the unicode range "${e}" of the font face at ${n.url}: it is not a valid range.`);
|
|
18473
18435
|
}
|
|
18474
18436
|
return a.length ? {
|
|
18475
18437
|
url: n.url,
|
|
@@ -19806,7 +19768,7 @@ var hS = class extends rS {
|
|
|
19806
19768
|
baseShift: this.baseShift
|
|
19807
19769
|
};
|
|
19808
19770
|
if (e.actor && e.state !== "expired" && e.state !== "reloading") return;
|
|
19809
|
-
await this.dispatcher.waitForInitComplete(),
|
|
19771
|
+
await this.dispatcher.waitForInitComplete(), e.actor && e.state !== "expired" || (e.actor = this.dispatcher.getReadyActor()), e.dem = await e.actor.sendAsync({
|
|
19810
19772
|
type: "LDT",
|
|
19811
19773
|
data: i
|
|
19812
19774
|
}), e.needsHillshadePrepare = !0, e.needsTerrainPrepare = !0, e.needsColorReliefPrepare = !0, e.state = "loaded";
|
|
@@ -19991,11 +19953,7 @@ var OS = class {
|
|
|
19991
19953
|
_next() {
|
|
19992
19954
|
if (this._sending) return;
|
|
19993
19955
|
let e = this._waiting.shift();
|
|
19994
|
-
|
|
19995
|
-
this._flushing?.resolve(), this._flushing = void 0;
|
|
19996
|
-
return;
|
|
19997
|
-
}
|
|
19998
|
-
this._sending = !0, this._replacedWhileSending = !1, this._send(e).finally(() => this._next());
|
|
19956
|
+
e === void 0 ? (this._flushing?.resolve(), this._flushing = void 0) : (this._sending = !0, this._replacedWhileSending = !1, this._send(e).finally(() => this._next()));
|
|
19999
19957
|
}
|
|
20000
19958
|
async _send(e) {
|
|
20001
19959
|
let t;
|
|
@@ -20056,11 +20014,7 @@ var OS = class {
|
|
|
20056
20014
|
return Number.isInteger(e) || e === void 0 || wr(`Integer expected for option 'clusterMaxZoom': provided value "${e}" rounded to "${t}"`), t;
|
|
20057
20015
|
}
|
|
20058
20016
|
async load() {
|
|
20059
|
-
|
|
20060
|
-
wr(`No pending worker updates for GeoJSONSource ${this.id}.`);
|
|
20061
|
-
return;
|
|
20062
|
-
}
|
|
20063
|
-
await this._workerUpdates.flush();
|
|
20017
|
+
this._workerUpdates.isIdle() ? wr(`No pending worker updates for GeoJSONSource ${this.id}.`) : await this._workerUpdates.flush();
|
|
20064
20018
|
}
|
|
20065
20019
|
onAdd(e) {
|
|
20066
20020
|
this.map = e, this.load();
|
|
@@ -20165,11 +20119,7 @@ var OS = class {
|
|
|
20165
20119
|
}));
|
|
20166
20120
|
}
|
|
20167
20121
|
_onWorkerUpdateError(e) {
|
|
20168
|
-
|
|
20169
|
-
this.fire(new Ii("dataabort"));
|
|
20170
|
-
return;
|
|
20171
|
-
}
|
|
20172
|
-
this.fire(new z(Un(e)));
|
|
20122
|
+
this._removed ? this.fire(new Ii("dataabort")) : this.fire(new z(Un(e)));
|
|
20173
20123
|
}
|
|
20174
20124
|
_applyResourceTiming(e, t) {
|
|
20175
20125
|
if (!this._collectResourceTiming) return;
|
|
@@ -20375,24 +20325,23 @@ var BS = class extends Mi {
|
|
|
20375
20325
|
super(), this.imageWarp = AS, this.flippedWindingOrder = !1, this._warp = "auto", this._imageDirty = !1, this._subdividedQuad = !1, this._subdividedMesh = null, this.id = e, this.dispatcher = n, this.coordinates = t.coordinates, this.type = "image", this.minzoom = 0, this.maxzoom = 22, this.tileSize = 512, this.tiles = {}, this._loaded = !1, this.setEventedParent(r), this.options = t;
|
|
20376
20326
|
}
|
|
20377
20327
|
async load(e) {
|
|
20378
|
-
if (this.options.url === void 0)
|
|
20379
|
-
|
|
20380
|
-
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
|
|
20384
|
-
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
|
|
20388
|
-
this._abortController = null, this._loaded = !0, this.fire(new z(Un(e)));
|
|
20328
|
+
if (this.options.url === void 0) this._loaded = !0, this._finishLoading();
|
|
20329
|
+
else {
|
|
20330
|
+
this._loaded = !1, this.fire(new Ii("dataloading")), this.url = this.options.url, this._abortController = new AbortController();
|
|
20331
|
+
try {
|
|
20332
|
+
let t = await Di.transformAndGetImage(this.map._requestManager, this.url, "Image", this._abortController);
|
|
20333
|
+
this._abortController = null, this._loaded = !0, t?.data ? (this._setImage(t.data), e && (this.coordinates = e), this._finishLoading()) : this.fire(new z(/* @__PURE__ */ Error(`Could not load image ${this.url}: the response is empty`)));
|
|
20334
|
+
} catch (e) {
|
|
20335
|
+
if (Qr(e)) return;
|
|
20336
|
+
this._abortController = null, this._loaded = !0, this.fire(new z(Un(e)));
|
|
20337
|
+
}
|
|
20389
20338
|
}
|
|
20390
20339
|
}
|
|
20391
20340
|
loaded() {
|
|
20392
20341
|
return this._loaded;
|
|
20393
20342
|
}
|
|
20394
20343
|
updateImage(e) {
|
|
20395
|
-
return this._abortController &&= (this._abortController.abort(), null), "image" in e ? (this._loaded = !0, this._setImage(e.image), e.coordinates && (this.coordinates = e.coordinates), this._finishLoading(), this) : e.url
|
|
20344
|
+
return this._abortController &&= (this._abortController.abort(), null), "image" in e ? (this._loaded = !0, this._setImage(e.image), e.coordinates && (this.coordinates = e.coordinates), this._finishLoading(), this) : (e.url && (this.options.url = e.url, this.load(e.coordinates)), this);
|
|
20396
20345
|
}
|
|
20397
20346
|
_setImage(e) {
|
|
20398
20347
|
this.image = e, this._imageDirty = !0;
|
|
@@ -20417,7 +20366,7 @@ var BS = class extends Mi {
|
|
|
20417
20366
|
this._abortController &&= (this._abortController.abort(), null), this._disposeTexture(), this._subdividedMesh?.destroy(), this._subdividedMesh = null, this.image = null, this.tiles = {};
|
|
20418
20367
|
}
|
|
20419
20368
|
setWarp(e) {
|
|
20420
|
-
return this._warp === e
|
|
20369
|
+
return this._warp === e || (this._warp = e, this.tileCoords && this.setCoordinates(this.coordinates)), this;
|
|
20421
20370
|
}
|
|
20422
20371
|
getWarp() {
|
|
20423
20372
|
return this._warp;
|
|
@@ -20574,15 +20523,11 @@ var KS = class extends BS {
|
|
|
20574
20523
|
super(e, t, n, r), t.coordinates ? (!Array.isArray(t.coordinates) || t.coordinates.length !== 4 || t.coordinates.some((e) => !Array.isArray(e) || e.length !== 2 || e.some((e) => typeof e != "number"))) && this.fire(new z(new H(`sources.${e}`, null, "\"coordinates\" property must be an array of 4 longitude/latitude array pairs"))) : this.fire(new z(new H(`sources.${e}`, null, "missing required property \"coordinates\""))), t.animate && typeof t.animate != "boolean" && this.fire(new z(new H(`sources.${e}`, null, "optional \"animate\" property must be a boolean value"))), t.canvas ? typeof t.canvas != "string" && !(t.canvas instanceof HTMLCanvasElement) && this.fire(new z(new H(`sources.${e}`, null, "\"canvas\" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance"))) : this.fire(new z(new H(`sources.${e}`, null, "missing required property \"canvas\""))), this.options = t, this.animate = t.animate === void 0 || t.animate;
|
|
20575
20524
|
}
|
|
20576
20525
|
async load() {
|
|
20577
|
-
|
|
20578
|
-
this.fire(new z(/* @__PURE__ */ Error("Canvas dimensions cannot be less than or equal to zero.")));
|
|
20579
|
-
return;
|
|
20580
|
-
}
|
|
20581
|
-
this.play = function() {
|
|
20526
|
+
this._loaded = !0, this.canvas ||= this.options.canvas instanceof HTMLCanvasElement ? this.options.canvas : document.getElementById(this.options.canvas), this.width = this.canvas.width, this.height = this.canvas.height, this._hasInvalidDimensions() ? this.fire(new z(/* @__PURE__ */ Error("Canvas dimensions cannot be less than or equal to zero."))) : (this.play = function() {
|
|
20582
20527
|
this._playing = !0, this.map.triggerRepaint();
|
|
20583
20528
|
}, this.pause = function() {
|
|
20584
20529
|
this._playing &&= (this.prepare(), !1);
|
|
20585
|
-
}, this._finishLoading();
|
|
20530
|
+
}, this._finishLoading());
|
|
20586
20531
|
}
|
|
20587
20532
|
getCanvas() {
|
|
20588
20533
|
return this.canvas;
|
|
@@ -21265,7 +21210,7 @@ function sw(e, t, n, r) {
|
|
|
21265
21210
|
let n = e.byteOffset + t;
|
|
21266
21211
|
if (n & 3) for (let n = 0; n < i; n++) {
|
|
21267
21212
|
let i = t + n * 4;
|
|
21268
|
-
r[n] = e[i] << 24 | e[i + 1] << 16 | e[i + 2] << 8 | e[i + 3]
|
|
21213
|
+
r[n] = e[i] << 24 | e[i + 1] << 16 | e[i + 2] << 8 | e[i + 3];
|
|
21269
21214
|
}
|
|
21270
21215
|
else {
|
|
21271
21216
|
let t = new Uint32Array(e.buffer, n, i);
|
|
@@ -21283,23 +21228,7 @@ function cw(e, t, n) {
|
|
|
21283
21228
|
let r = new Uint32Array(n), i = 0, a = t.get();
|
|
21284
21229
|
for (let t = 0; t < r.length; t++) {
|
|
21285
21230
|
let t = e[a++], n = t & 127;
|
|
21286
|
-
|
|
21287
|
-
r[i++] = n;
|
|
21288
|
-
continue;
|
|
21289
|
-
}
|
|
21290
|
-
if (t = e[a++], n |= (t & 127) << 7, t < 128) {
|
|
21291
|
-
r[i++] = n;
|
|
21292
|
-
continue;
|
|
21293
|
-
}
|
|
21294
|
-
if (t = e[a++], n |= (t & 127) << 14, t < 128) {
|
|
21295
|
-
r[i++] = n;
|
|
21296
|
-
continue;
|
|
21297
|
-
}
|
|
21298
|
-
if (t = e[a++], n |= (t & 127) << 21, t < 128) {
|
|
21299
|
-
r[i++] = n;
|
|
21300
|
-
continue;
|
|
21301
|
-
}
|
|
21302
|
-
t = e[a++], n |= (t & 15) << 28, r[i++] = n;
|
|
21231
|
+
t < 128 || (t = e[a++], n |= (t & 127) << 7, t < 128 || (t = e[a++], n |= (t & 127) << 14, t < 128 || (t = e[a++], n |= (t & 127) << 21, t < 128 || (t = e[a++], n |= (t & 15) << 28)))), r[i++] = n;
|
|
21303
21232
|
}
|
|
21304
21233
|
return t.set(a), r;
|
|
21305
21234
|
}
|
|
@@ -23386,35 +23315,31 @@ var LD = class {
|
|
|
23386
23315
|
}
|
|
23387
23316
|
}
|
|
23388
23317
|
loadVectorData(e, t, n) {
|
|
23389
|
-
if (e?.etagUnmodified === !0)
|
|
23390
|
-
|
|
23391
|
-
|
|
23392
|
-
|
|
23393
|
-
|
|
23394
|
-
|
|
23395
|
-
|
|
23396
|
-
|
|
23397
|
-
|
|
23398
|
-
|
|
23399
|
-
let t = this.buckets[e];
|
|
23400
|
-
if (t instanceof Ab) {
|
|
23401
|
-
if (this.hasSymbolBuckets = !0, n) t.justReloaded = !0;
|
|
23402
|
-
else break;
|
|
23318
|
+
if (e?.etagUnmodified === !0) this.state = "loaded";
|
|
23319
|
+
else if (this.hasData() && this.unloadVectorData(), this.state = "loaded", !e) this.collisionBoxArray = new $d();
|
|
23320
|
+
else {
|
|
23321
|
+
e.featureIndex && (this.latestFeatureIndex = e.featureIndex, e.rawTileData ? (this.latestRawTileData = e.rawTileData, this.latestEncoding = e.encoding, this.latestFeatureIndex.rawTileData = e.rawTileData, this.latestFeatureIndex.encoding = e.encoding) : this.latestRawTileData && (this.latestFeatureIndex.rawTileData = this.latestRawTileData, this.latestFeatureIndex.encoding = this.latestEncoding)), this.collisionBoxArray = e.collisionBoxArray, this.buckets = ZS(e.buckets, t), this.hasSymbolBuckets = !1;
|
|
23322
|
+
for (let e in this.buckets) {
|
|
23323
|
+
let t = this.buckets[e];
|
|
23324
|
+
if (t instanceof Ab) {
|
|
23325
|
+
if (this.hasSymbolBuckets = !0, n) t.justReloaded = !0;
|
|
23326
|
+
else break;
|
|
23327
|
+
}
|
|
23403
23328
|
}
|
|
23404
|
-
|
|
23405
|
-
|
|
23406
|
-
|
|
23407
|
-
|
|
23408
|
-
|
|
23409
|
-
|
|
23329
|
+
if (this.hasRTLText = !1, this.hasSymbolBuckets) for (let e in this.buckets) {
|
|
23330
|
+
let t = this.buckets[e];
|
|
23331
|
+
if (t instanceof Ab && t.hasRTLText) {
|
|
23332
|
+
this.hasRTLText = !0, ID().lazyLoad();
|
|
23333
|
+
break;
|
|
23334
|
+
}
|
|
23410
23335
|
}
|
|
23336
|
+
this.queryPadding = 0;
|
|
23337
|
+
for (let e in this.buckets) {
|
|
23338
|
+
let n = this.buckets[e];
|
|
23339
|
+
this.queryPadding = Math.max(this.queryPadding, t.getLayer(e).queryRadius(n));
|
|
23340
|
+
}
|
|
23341
|
+
e.imageAtlas && (this.imageAtlas = e.imageAtlas), e.glyphAtlasImage && (this.glyphAtlasImage = e.glyphAtlasImage), this.dashPositions = e.dashPositions;
|
|
23411
23342
|
}
|
|
23412
|
-
this.queryPadding = 0;
|
|
23413
|
-
for (let e in this.buckets) {
|
|
23414
|
-
let n = this.buckets[e];
|
|
23415
|
-
this.queryPadding = Math.max(this.queryPadding, t.getLayer(e).queryRadius(n));
|
|
23416
|
-
}
|
|
23417
|
-
e.imageAtlas && (this.imageAtlas = e.imageAtlas), e.glyphAtlasImage && (this.glyphAtlasImage = e.glyphAtlasImage), this.dashPositions = e.dashPositions;
|
|
23418
23343
|
}
|
|
23419
23344
|
unloadVectorData() {
|
|
23420
23345
|
for (let e in this.buckets) this.buckets[e].destroy();
|
|
@@ -23993,9 +23918,7 @@ function tO(e, t) {
|
|
|
23993
23918
|
distanceSq: Vn([g[0] - .5 - m, g[1] - .5 - _]),
|
|
23994
23919
|
tileDistanceToCamera: Math.sqrt(n * n + r * r)
|
|
23995
23920
|
});
|
|
23996
|
-
|
|
23997
|
-
}
|
|
23998
|
-
for (let e = 0; e < 4; e++) {
|
|
23921
|
+
} else for (let e = 0; e < 4; e++) {
|
|
23999
23922
|
let t = (m << 1) + e % 2, n = (_ << 1) + (e >> 1), r = a.zoom + 1;
|
|
24000
23923
|
x.push({
|
|
24001
23924
|
zoom: r,
|
|
@@ -24015,7 +23938,7 @@ function rO(e, t, n, r, i, a, o) {
|
|
|
24015
23938
|
let s = ai(), c = or(t);
|
|
24016
23939
|
for (let l of t) {
|
|
24017
23940
|
let t = e.getTileById(l.key);
|
|
24018
|
-
(t.fadingDirection === 0 || t.fadeOpacity === 0) && t.resetFadeLogic(),
|
|
23941
|
+
(t.fadingDirection === 0 || t.fadeOpacity === 0) && t.resetFadeLogic(), iO(e, t, n, s, r, i, o) || aO(e, t, n, s, a, o) || sO(t, c, s, o) || t.resetFadeLogic();
|
|
24019
23942
|
}
|
|
24020
23943
|
}
|
|
24021
23944
|
function iO(e, t, n, r, i, a, o) {
|
|
@@ -24052,7 +23975,7 @@ function oO(e, t, n, r, i, a, o) {
|
|
|
24052
23975
|
let n = e.getLoadedTile(a);
|
|
24053
23976
|
if (!n) continue;
|
|
24054
23977
|
let { fadingRole: c, fadingDirection: l, fadingParentID: u } = n;
|
|
24055
|
-
|
|
23978
|
+
c === 0 && l === 0 && u || (n.setCrossFadeLogic({
|
|
24056
23979
|
fadingRole: 0,
|
|
24057
23980
|
fadingDirection: 0,
|
|
24058
23981
|
fadingParentID: t.tileID,
|
|
@@ -24092,7 +24015,7 @@ function lO(e, t) {
|
|
|
24092
24015
|
function uO(e, t) {
|
|
24093
24016
|
e.needsHillshadePrepare = !0, e.needsTerrainPrepare = !0, e.needsColorReliefPrepare = !0;
|
|
24094
24017
|
let n = t.tileID.canonical.x - e.tileID.canonical.x, r = t.tileID.canonical.y - e.tileID.canonical.y, i = 2 ** e.tileID.canonical.z, a = t.tileID.key;
|
|
24095
|
-
|
|
24018
|
+
n === 0 && r === 0 || Math.abs(r) > 1 || (Math.abs(n) > 1 && (Math.abs(n + i) === 1 ? n += i : Math.abs(n - i) === 1 && (n -= i)), t.dem && e.dem && (e.dem.backfillBorder(t.dem, n, r), e.neighboringTiles?.[a] && (e.neighboringTiles[a].backfilled = !0)));
|
|
24096
24019
|
}
|
|
24097
24020
|
var dO = class {
|
|
24098
24021
|
constructor() {
|
|
@@ -24223,14 +24146,13 @@ var dO = class {
|
|
|
24223
24146
|
return !1;
|
|
24224
24147
|
}
|
|
24225
24148
|
reload(e, t = void 0) {
|
|
24226
|
-
if (this._paused)
|
|
24227
|
-
|
|
24228
|
-
|
|
24229
|
-
|
|
24230
|
-
|
|
24231
|
-
|
|
24232
|
-
|
|
24233
|
-
(!t || this._source.shouldReloadTile(r, t)) && (e ? this._reloadTile(n, r.state === "errored" ? "loading" : "expired") : r.state !== "errored" && this._reloadTile(n, "reloading"));
|
|
24149
|
+
if (this._paused) this._shouldReloadOnResume = !0;
|
|
24150
|
+
else {
|
|
24151
|
+
this._outOfViewCache.reset();
|
|
24152
|
+
for (let n of this._inViewTiles.getAllIds()) {
|
|
24153
|
+
let r = this._inViewTiles.getTileById(n);
|
|
24154
|
+
(!t || this._source.shouldReloadTile(r, t)) && (e ? this._reloadTile(n, r.state === "errored" ? "loading" : "expired") : r.state !== "errored" && this._reloadTile(n, "reloading"));
|
|
24155
|
+
}
|
|
24234
24156
|
}
|
|
24235
24157
|
}
|
|
24236
24158
|
async _reloadTile(e, t) {
|
|
@@ -24334,15 +24256,7 @@ var dO = class {
|
|
|
24334
24256
|
_cleanUpVectorTiles(e) {
|
|
24335
24257
|
for (let t of this._inViewTiles.getAllIds()) {
|
|
24336
24258
|
let n = this._inViewTiles.getTileById(t);
|
|
24337
|
-
|
|
24338
|
-
n.clearSymbolFadeHold();
|
|
24339
|
-
continue;
|
|
24340
|
-
}
|
|
24341
|
-
if (!n.hasSymbolBuckets) {
|
|
24342
|
-
this._removeTile(t);
|
|
24343
|
-
continue;
|
|
24344
|
-
}
|
|
24345
|
-
n.holdingForSymbolFade() ? n.symbolFadeFinished() && this._removeTile(t) : n.setSymbolHoldDuration(this.map._fadeDuration);
|
|
24259
|
+
e[t] ? n.clearSymbolFadeHold() : n.hasSymbolBuckets ? n.holdingForSymbolFade() ? n.symbolFadeFinished() && this._removeTile(t) : n.setSymbolHoldDuration(this.map._fadeDuration) : this._removeTile(t);
|
|
24346
24260
|
}
|
|
24347
24261
|
}
|
|
24348
24262
|
_addTerrainIdealTiles(e) {
|
|
@@ -25623,7 +25537,7 @@ var QO = x_.members.find((e) => e.name === "crossTileID").offset / 4, $O = class
|
|
|
25623
25537
|
}
|
|
25624
25538
|
};
|
|
25625
25539
|
function ek(e, t, n, r, i, a) {
|
|
25626
|
-
|
|
25540
|
+
r && r.length !== 0 || (r = [
|
|
25627
25541
|
0,
|
|
25628
25542
|
0,
|
|
25629
25543
|
0,
|
|
@@ -27563,7 +27477,7 @@ var NA = class {
|
|
|
27563
27477
|
static fromAabb(t, n) {
|
|
27564
27478
|
let r = [];
|
|
27565
27479
|
for (let e = 0; e < 8; e++) r.push([
|
|
27566
|
-
(e
|
|
27480
|
+
((e | 0) & 1) == 1 ? n[0] : t[0],
|
|
27567
27481
|
(e >> 1 & 1) == 1 ? n[1] : t[1],
|
|
27568
27482
|
(e >> 2 & 1) == 1 ? n[2] : t[2]
|
|
27569
27483
|
]);
|
|
@@ -27621,13 +27535,13 @@ var NA = class {
|
|
|
27621
27535
|
n[2]
|
|
27622
27536
|
], i), c = [...t], l = [...t];
|
|
27623
27537
|
for (let e = 0; e < 8; e++) for (let n = 0; n < 3; n++) {
|
|
27624
|
-
let r = t[n] + a[n] * ((e
|
|
27538
|
+
let r = t[n] + a[n] * (((e | 0) & 1) == 1 ? 1 : -1) + o[n] * ((e >> 1 & 1) == 1 ? 1 : -1) + s[n] * ((e >> 2 & 1) == 1 ? 1 : -1);
|
|
27625
27539
|
c[n] = Math.min(c[n], r), l[n] = Math.max(l[n], r);
|
|
27626
27540
|
}
|
|
27627
27541
|
let u = [];
|
|
27628
27542
|
for (let e = 0; e < 8; e++) {
|
|
27629
27543
|
let n = [...t];
|
|
27630
|
-
$t(n, n, tn([], a, (e
|
|
27544
|
+
$t(n, n, tn([], a, ((e | 0) & 1) == 1 ? 1 : -1)), $t(n, n, tn([], o, (e >> 1 & 1) == 1 ? 1 : -1)), $t(n, n, tn([], s, (e >> 2 & 1) == 1 ? 1 : -1)), u.push(n);
|
|
27631
27545
|
}
|
|
27632
27546
|
return new e(u, [
|
|
27633
27547
|
[...a, -sn(a, u[0])],
|
|
@@ -28202,11 +28116,7 @@ var zA = 1e-12, BA = class e {
|
|
|
28202
28116
|
return this._coveringTilesDetailsProvider;
|
|
28203
28117
|
}
|
|
28204
28118
|
recalculateZoomAndCenter(e) {
|
|
28205
|
-
|
|
28206
|
-
wr("terrain is not fully supported on vertical perspective projection.");
|
|
28207
|
-
return;
|
|
28208
|
-
}
|
|
28209
|
-
this._helper.recalculateZoomAndCenter(0);
|
|
28119
|
+
e ? wr("terrain is not fully supported on vertical perspective projection.") : this._helper.recalculateZoomAndCenter(0);
|
|
28210
28120
|
}
|
|
28211
28121
|
maxPitchScaleFactor() {
|
|
28212
28122
|
return 1;
|
|
@@ -28818,11 +28728,8 @@ var GA = class e {
|
|
|
28818
28728
|
fA(new Q(_, g))
|
|
28819
28729
|
], S = fA(s.center), C = 1 / 0;
|
|
28820
28730
|
for (let t of x) c < 0 && (C = e.getLesserNonNegativeNonNull(C, e.solveVectorScale(t, S, b, "x", c))), l > 0 && (C = e.getLesserNonNegativeNonNull(C, e.solveVectorScale(t, S, b, "x", l))), u > 0 && (C = e.getLesserNonNegativeNonNull(C, e.solveVectorScale(t, S, b, "y", u))), d < 0 && (C = e.getLesserNonNegativeNonNull(C, e.solveVectorScale(t, S, b, "y", d)));
|
|
28821
|
-
if (!Number.isFinite(C) || C === 0)
|
|
28822
|
-
|
|
28823
|
-
return;
|
|
28824
|
-
}
|
|
28825
|
-
return s.zoom = Math.min(y.zoom + _r(C), t.maxZoom), s;
|
|
28731
|
+
if (!Number.isFinite(C) || C === 0) Qk();
|
|
28732
|
+
else return s.zoom = Math.min(y.zoom + _r(C), t.maxZoom), s;
|
|
28826
28733
|
}
|
|
28827
28734
|
handleJumpToCenterZoom(e, t) {
|
|
28828
28735
|
let n = e.center.lat, r = t.center ? Q.convert(t.center) : e.center;
|
|
@@ -29333,11 +29240,7 @@ var YA = Ll(), XA = class extends Mi {
|
|
|
29333
29240
|
};
|
|
29334
29241
|
}
|
|
29335
29242
|
addImage(e, t) {
|
|
29336
|
-
|
|
29337
|
-
this.fire(new z(/* @__PURE__ */ Error(`An image named "${e}" already exists.`)));
|
|
29338
|
-
return;
|
|
29339
|
-
}
|
|
29340
|
-
this.imageManager.addImage(e, t), this._afterImageUpdated(e);
|
|
29243
|
+
this.getImage(e) ? this.fire(new z(/* @__PURE__ */ Error(`An image named "${e}" already exists.`))) : (this.imageManager.addImage(e, t), this._afterImageUpdated(e));
|
|
29341
29244
|
}
|
|
29342
29245
|
updateImage(e, t) {
|
|
29343
29246
|
this.imageManager.updateImage(e, t);
|
|
@@ -29349,11 +29252,7 @@ var YA = Ll(), XA = class extends Mi {
|
|
|
29349
29252
|
this.imageManager.setMissingImageResolver(e);
|
|
29350
29253
|
}
|
|
29351
29254
|
removeImage(e) {
|
|
29352
|
-
|
|
29353
|
-
this.fire(new z(/* @__PURE__ */ Error(`An image named "${e}" does not exist.`)));
|
|
29354
|
-
return;
|
|
29355
|
-
}
|
|
29356
|
-
this.imageManager.removeImage(e), this._afterImageUpdated(e);
|
|
29255
|
+
this.getImage(e) ? (this.imageManager.removeImage(e), this._afterImageUpdated(e)) : this.fire(new z(/* @__PURE__ */ Error(`An image named "${e}" does not exist.`)));
|
|
29357
29256
|
}
|
|
29358
29257
|
_markImagesChanged(e) {
|
|
29359
29258
|
for (let t of e) this._changedImages[t] = !0;
|
|
@@ -29410,15 +29309,14 @@ var YA = Ll(), XA = class extends Mi {
|
|
|
29410
29309
|
i = Yb(e, this._globalState), this._validateLayer(i), i.setEventedParent(this, { layer: { id: r } });
|
|
29411
29310
|
}
|
|
29412
29311
|
let a = t ? this._order.indexOf(t) : this._order.length;
|
|
29413
|
-
if (t && a === -1) {
|
|
29414
|
-
|
|
29415
|
-
|
|
29416
|
-
|
|
29417
|
-
|
|
29418
|
-
|
|
29419
|
-
|
|
29312
|
+
if (t && a === -1) this.fire(new z(/* @__PURE__ */ Error(`Cannot add layer "${r}" before non-existing layer "${t}".`)));
|
|
29313
|
+
else {
|
|
29314
|
+
if (this._order.splice(a, 0, r), this._layerOrderChanged = !0, this._layers[r] = i, this._removedLayers[r] && i.source && i.type !== "custom") {
|
|
29315
|
+
let e = this._removedLayers[r];
|
|
29316
|
+
delete this._removedLayers[r], e.type === i.type ? (this._updatedSources[i.source] = "reload", this.tileManagers[i.source].pause()) : this._updatedSources[i.source] = "clear";
|
|
29317
|
+
}
|
|
29318
|
+
this._updateLayer(i), i.onAdd && i.onAdd(this.map);
|
|
29420
29319
|
}
|
|
29421
|
-
this._updateLayer(i), i.onAdd && i.onAdd(this.map);
|
|
29422
29320
|
}
|
|
29423
29321
|
moveLayer(e, t) {
|
|
29424
29322
|
if (this._checkLoaded(), this._changed = !0, !this._layers[e]) {
|
|
@@ -29458,20 +29356,13 @@ var YA = Ll(), XA = class extends Mi {
|
|
|
29458
29356
|
setLayerZoomRange(e, t, n) {
|
|
29459
29357
|
this._checkLoaded();
|
|
29460
29358
|
let r = this.getLayer(e);
|
|
29461
|
-
|
|
29462
|
-
this.fire(new z(/* @__PURE__ */ Error(`Cannot set the zoom range of non-existing layer "${e}".`)));
|
|
29463
|
-
return;
|
|
29464
|
-
}
|
|
29465
|
-
(r.minzoom !== t || r.maxzoom !== n) && (t != null && (r.minzoom = t), n != null && (r.maxzoom = n), this._updateLayer(r));
|
|
29359
|
+
r ? (r.minzoom !== t || r.maxzoom !== n) && (t != null && (r.minzoom = t), n != null && (r.maxzoom = n), this._updateLayer(r)) : this.fire(new z(/* @__PURE__ */ Error(`Cannot set the zoom range of non-existing layer "${e}".`)));
|
|
29466
29360
|
}
|
|
29467
29361
|
setFilter(e, t, n = {}) {
|
|
29468
29362
|
this._checkLoaded();
|
|
29469
29363
|
let r = this.getLayer(e);
|
|
29470
|
-
if (!r) {
|
|
29471
|
-
|
|
29472
|
-
return;
|
|
29473
|
-
}
|
|
29474
|
-
if (!xr(r.filter, t)) {
|
|
29364
|
+
if (!r) this.fire(new z(/* @__PURE__ */ Error(`Cannot filter non-existing layer "${e}".`)));
|
|
29365
|
+
else if (!xr(r.filter, t)) {
|
|
29475
29366
|
if (t == null) {
|
|
29476
29367
|
r.setFilter(void 0), this._updateLayer(r);
|
|
29477
29368
|
return;
|
|
@@ -29485,28 +29376,17 @@ var YA = Ll(), XA = class extends Mi {
|
|
|
29485
29376
|
setLayoutProperty(e, t, n, r = {}) {
|
|
29486
29377
|
this._checkLoaded();
|
|
29487
29378
|
let i = this.getLayer(e);
|
|
29488
|
-
|
|
29489
|
-
this.fire(new z(/* @__PURE__ */ Error(`Cannot style non-existing layer "${e}".`)));
|
|
29490
|
-
return;
|
|
29491
|
-
}
|
|
29492
|
-
xr(i.getLayoutProperty(t), n) || (i.setLayoutProperty(t, n, r), this._updateLayer(i));
|
|
29379
|
+
i ? xr(i.getLayoutProperty(t), n) || (i.setLayoutProperty(t, n, r), this._updateLayer(i)) : this.fire(new z(/* @__PURE__ */ Error(`Cannot style non-existing layer "${e}".`)));
|
|
29493
29380
|
}
|
|
29494
29381
|
getLayoutProperty(e, t) {
|
|
29495
29382
|
let n = this.getLayer(e);
|
|
29496
|
-
if (!n) {
|
|
29497
|
-
|
|
29498
|
-
return;
|
|
29499
|
-
}
|
|
29500
|
-
return n.getLayoutProperty(t);
|
|
29383
|
+
if (!n) this.fire(new z(/* @__PURE__ */ Error(`Cannot get style of non-existing layer "${e}".`)));
|
|
29384
|
+
else return n.getLayoutProperty(t);
|
|
29501
29385
|
}
|
|
29502
29386
|
setPaintProperty(e, t, n, r = {}) {
|
|
29503
29387
|
this._checkLoaded();
|
|
29504
29388
|
let i = this.getLayer(e);
|
|
29505
|
-
|
|
29506
|
-
this.fire(new z(/* @__PURE__ */ Error(`Cannot style non-existing layer "${e}".`)));
|
|
29507
|
-
return;
|
|
29508
|
-
}
|
|
29509
|
-
xr(i.getPaintProperty(t), n) || this._updatePaintProperty(i, t, n, r);
|
|
29389
|
+
i ? xr(i.getPaintProperty(t), n) || this._updatePaintProperty(i, t, n, r) : this.fire(new z(/* @__PURE__ */ Error(`Cannot style non-existing layer "${e}".`)));
|
|
29510
29390
|
}
|
|
29511
29391
|
_updatePaintProperty(e, t, n, r = {}) {
|
|
29512
29392
|
e.setPaintProperty(t, n, r) && this._updateLayer(e), bd(e) && t === "raster-fade-duration" && this.tileManagers[e.source].setRasterFadeDuration(n), this._changed = !0, this._updatedPaintProps[e.id] = !0, e.type === "symbol" && this.triggerSymbolPlacement(), this._serializedLayers = null;
|
|
@@ -29539,11 +29419,7 @@ var YA = Ll(), XA = class extends Mi {
|
|
|
29539
29419
|
"constructor",
|
|
29540
29420
|
"prototype"
|
|
29541
29421
|
];
|
|
29542
|
-
|
|
29543
|
-
this.fire(new z(/* @__PURE__ */ Error(`The feature state should not include one of the following keys: ${o}`)));
|
|
29544
|
-
return;
|
|
29545
|
-
}
|
|
29546
|
-
i.setFeatureState(r, e.id, t);
|
|
29422
|
+
t && Object.keys(t).some((e) => o.includes(e)) ? this.fire(new z(/* @__PURE__ */ Error(`The feature state should not include one of the following keys: ${o}`))) : i.setFeatureState(r, e.id, t);
|
|
29547
29423
|
}
|
|
29548
29424
|
removeFeatureState(e, t) {
|
|
29549
29425
|
this._checkLoaded();
|
|
@@ -29553,28 +29429,14 @@ var YA = Ll(), XA = class extends Mi {
|
|
|
29553
29429
|
return;
|
|
29554
29430
|
}
|
|
29555
29431
|
let i = r.getSource().type, a = i === "vector" ? e.sourceLayer : void 0;
|
|
29556
|
-
|
|
29557
|
-
this.fire(new z(/* @__PURE__ */ Error("The sourceLayer parameter must be provided for vector source types.")));
|
|
29558
|
-
return;
|
|
29559
|
-
}
|
|
29560
|
-
if (t && typeof e.id != "string" && typeof e.id != "number") {
|
|
29561
|
-
this.fire(new z(/* @__PURE__ */ Error("A feature id is required to remove its specific state property.")));
|
|
29562
|
-
return;
|
|
29563
|
-
}
|
|
29564
|
-
r.removeFeatureState(a, e.id, t);
|
|
29432
|
+
i === "vector" && !a ? this.fire(new z(/* @__PURE__ */ Error("The sourceLayer parameter must be provided for vector source types."))) : t && typeof e.id != "string" && typeof e.id != "number" ? this.fire(new z(/* @__PURE__ */ Error("A feature id is required to remove its specific state property."))) : r.removeFeatureState(a, e.id, t);
|
|
29565
29433
|
}
|
|
29566
29434
|
getFeatureState(e) {
|
|
29567
29435
|
this._checkLoaded();
|
|
29568
29436
|
let t = e.source, n = e.sourceLayer, r = this.tileManagers[t];
|
|
29569
|
-
if (r === void 0) {
|
|
29570
|
-
|
|
29571
|
-
|
|
29572
|
-
}
|
|
29573
|
-
if (r.getSource().type === "vector" && !n) {
|
|
29574
|
-
this.fire(new z(/* @__PURE__ */ Error("The sourceLayer parameter must be provided for vector source types.")));
|
|
29575
|
-
return;
|
|
29576
|
-
}
|
|
29577
|
-
return e.id === void 0 && this.fire(new z(/* @__PURE__ */ Error("The feature id parameter must be provided."))), r.getFeatureState(n, e.id);
|
|
29437
|
+
if (r === void 0) this.fire(new z(/* @__PURE__ */ Error(`The source '${t}' does not exist in the map's style.`)));
|
|
29438
|
+
else if (r.getSource().type === "vector" && !n) this.fire(new z(/* @__PURE__ */ Error("The sourceLayer parameter must be provided for vector source types.")));
|
|
29439
|
+
else return e.id === void 0 && this.fire(new z(/* @__PURE__ */ Error("The feature id parameter must be provided."))), r.getFeatureState(n, e.id);
|
|
29578
29440
|
}
|
|
29579
29441
|
getTransition() {
|
|
29580
29442
|
return R({
|
|
@@ -30290,11 +30152,7 @@ var Hj = class {
|
|
|
30290
30152
|
break;
|
|
30291
30153
|
}
|
|
30292
30154
|
}
|
|
30293
|
-
|
|
30294
|
-
this.bind();
|
|
30295
|
-
return;
|
|
30296
|
-
}
|
|
30297
|
-
e.bindBufferBase(e.UNIFORM_BUFFER, this.binding, this.buffer), this.context.boundUniformBuffers[this.binding] = this.buffer, e.bufferData(e.UNIFORM_BUFFER, this.pending, e.DYNAMIC_DRAW), this.uploaded.set(this.pending), this.hasData = !0;
|
|
30155
|
+
t ? (e.bindBufferBase(e.UNIFORM_BUFFER, this.binding, this.buffer), this.context.boundUniformBuffers[this.binding] = this.buffer, e.bufferData(e.UNIFORM_BUFFER, this.pending, e.DYNAMIC_DRAW), this.uploaded.set(this.pending), this.hasData = !0) : this.bind();
|
|
30298
30156
|
}
|
|
30299
30157
|
bind() {
|
|
30300
30158
|
let e = this.context.boundUniformBuffers;
|
|
@@ -31648,13 +31506,7 @@ function cP(e, t, n, r, i) {
|
|
|
31648
31506
|
if (l && i.currentPass === "opaque") {
|
|
31649
31507
|
let a = i.colorModeForRenderPass();
|
|
31650
31508
|
dP(e, t, n, r, i.getDepthModeForSublayer(1, kN.ReadWrite), a, !1, i);
|
|
31651
|
-
|
|
31652
|
-
}
|
|
31653
|
-
if (l && i.currentPass === "translucent") {
|
|
31654
|
-
uP(e, t, n, r, i);
|
|
31655
|
-
return;
|
|
31656
|
-
}
|
|
31657
|
-
i.currentPass === "translucent" && lP(e, t, n, r, i);
|
|
31509
|
+
} else l && i.currentPass === "translucent" ? uP(e, t, n, r, i) : i.currentPass === "translucent" && lP(e, t, n, r, i);
|
|
31658
31510
|
}
|
|
31659
31511
|
function lP(e, t, n, r, i) {
|
|
31660
31512
|
let a = i.colorModeForRenderPass();
|
|
@@ -32698,11 +32550,7 @@ var pF = class {
|
|
|
32698
32550
|
this._longPressTimer &&= (clearTimeout(this._longPressTimer), void 0), this._longPressStart = void 0;
|
|
32699
32551
|
}
|
|
32700
32552
|
contextmenu(e) {
|
|
32701
|
-
|
|
32702
|
-
e.preventDefault();
|
|
32703
|
-
return;
|
|
32704
|
-
}
|
|
32705
|
-
this._delayContextMenu ? this._contextMenuEvent = e : this._ignoreContextMenu || this._map.fire(new Li(e.type, this._map, e)), this._map.listens("contextmenu") && e.preventDefault();
|
|
32553
|
+
this._touchActive ? e.preventDefault() : (this._delayContextMenu ? this._contextMenuEvent = e : this._ignoreContextMenu || this._map.fire(new Li(e.type, this._map, e)), this._map.listens("contextmenu") && e.preventDefault());
|
|
32706
32554
|
}
|
|
32707
32555
|
isEnabled() {
|
|
32708
32556
|
return !0;
|
|
@@ -32814,7 +32662,7 @@ var vF = class {
|
|
|
32814
32662
|
let r = this.singleTap.touchend(e, t, n);
|
|
32815
32663
|
if (r) {
|
|
32816
32664
|
let t = e.timeStamp - this.lastTime < 500, n = !this.lastTap || this.lastTap.dist(r) < 30;
|
|
32817
|
-
if (
|
|
32665
|
+
if (t && n || this.reset(), this.count++, this.lastTime = e.timeStamp, this.lastTap = r, this.count === this.numTaps) return this.reset(), r;
|
|
32818
32666
|
}
|
|
32819
32667
|
}
|
|
32820
32668
|
}, bF = class {
|
|
@@ -33893,23 +33741,7 @@ var iI = class {
|
|
|
33893
33741
|
}
|
|
33894
33742
|
_handleMapControls({ terrain: e, tr: t, deltasForHelper: n, preZoomAroundLoc: r, combinedEventsInProgress: i, panDelta: a }) {
|
|
33895
33743
|
let o = this._camera.cameraHelper;
|
|
33896
|
-
|
|
33897
|
-
a && t.setCenter(t.screenPointToLocation(t.centerPoint.sub(a)));
|
|
33898
|
-
return;
|
|
33899
|
-
}
|
|
33900
|
-
if (!e) {
|
|
33901
|
-
o.handleMapControlsPan(n, t, r);
|
|
33902
|
-
return;
|
|
33903
|
-
}
|
|
33904
|
-
if (!this._terrainGesture.inFlight) {
|
|
33905
|
-
this._terrainGesture.inFlight = !0, this._camera.holdElevation(t, "gesture"), o.handleMapControlsPan(n, t, r);
|
|
33906
|
-
return;
|
|
33907
|
-
}
|
|
33908
|
-
if (!o.useGlobeControls && n.aroundElevation === void 0 && i.drag && a) {
|
|
33909
|
-
t.setCenter(t.screenPointToLocation(t.centerPoint.sub(a)));
|
|
33910
|
-
return;
|
|
33911
|
-
}
|
|
33912
|
-
o.handleMapControlsPan(n, t, r);
|
|
33744
|
+
o.handleMapControlsRollPitchBearingZoom(n, t), !e && !o.useGlobeControls && !t.isPointOnMapSurface(n.around) ? a && t.setCenter(t.screenPointToLocation(t.centerPoint.sub(a))) : e ? this._terrainGesture.inFlight ? !o.useGlobeControls && n.aroundElevation === void 0 && i.drag && a ? t.setCenter(t.screenPointToLocation(t.centerPoint.sub(a))) : o.handleMapControlsPan(n, t, r) : (this._terrainGesture.inFlight = !0, this._camera.holdElevation(t, "gesture"), o.handleMapControlsPan(n, t, r)) : o.handleMapControlsPan(n, t, r);
|
|
33913
33745
|
}
|
|
33914
33746
|
_fireEvents(e, t, n) {
|
|
33915
33747
|
let r = tI(this._eventsInProgress), i = tI(e), a = {};
|
|
@@ -35009,12 +34841,11 @@ var yI = class {
|
|
|
35009
34841
|
style: null,
|
|
35010
34842
|
images: null
|
|
35011
34843
|
}, this._contextLost = (e) => {
|
|
35012
|
-
if (e.preventDefault(), this._frameRequest &&= (this._frameRequest.abort(), null), this.painter.destroy(), this._lostContextStyle = this._getStyleAndImages(), !this.style) {
|
|
35013
|
-
|
|
35014
|
-
|
|
34844
|
+
if (e.preventDefault(), this._frameRequest &&= (this._frameRequest.abort(), null), this.painter.destroy(), this._lostContextStyle = this._getStyleAndImages(), !this.style) this.fire(new Ui("webglcontextlost", { originalEvent: e }));
|
|
34845
|
+
else {
|
|
34846
|
+
for (let e of Object.values(this.style._layers)) if (e.type === "custom" && console.warn(`Custom layer with id '${e.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`), e._listeners) for (let [t] of Object.entries(e._listeners)) console.warn(`Custom layer with id '${e.id}' had event listeners for event '${t}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);
|
|
34847
|
+
this.style.destroy(), this.style = null, this.fire(new Ui("webglcontextlost", { originalEvent: e }));
|
|
35015
34848
|
}
|
|
35016
|
-
for (let e of Object.values(this.style._layers)) if (e.type === "custom" && console.warn(`Custom layer with id '${e.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`), e._listeners) for (let [t] of Object.entries(e._listeners)) console.warn(`Custom layer with id '${e.id}' had event listeners for event '${t}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);
|
|
35017
|
-
this.style.destroy(), this.style = null, this.fire(new Ui("webglcontextlost", { originalEvent: e }));
|
|
35018
34849
|
}, this._contextRestored = (e) => {
|
|
35019
34850
|
if (this._lostContextStyle.style && this.setStyle(this._lostContextStyle.style, { diff: !1 }), this._lostContextStyle.images && this.style) {
|
|
35020
34851
|
this.style.imageManager.images = this._lostContextStyle.images;
|
|
@@ -35532,22 +35363,16 @@ var yI = class {
|
|
|
35532
35363
|
};
|
|
35533
35364
|
}
|
|
35534
35365
|
isStyleLoaded() {
|
|
35535
|
-
if (!this.style)
|
|
35536
|
-
|
|
35537
|
-
return;
|
|
35538
|
-
}
|
|
35539
|
-
return this.style.loaded();
|
|
35366
|
+
if (!this.style) wr("There is no style added to the map.");
|
|
35367
|
+
else return this.style.loaded();
|
|
35540
35368
|
}
|
|
35541
35369
|
addSource(e, t) {
|
|
35542
35370
|
return this._lazyInitEmptyStyle(), this.style.addSource(e, t), this._update(!0);
|
|
35543
35371
|
}
|
|
35544
35372
|
isSourceLoaded(e) {
|
|
35545
35373
|
let t = this.style?.tileManagers[e];
|
|
35546
|
-
if (t === void 0) {
|
|
35547
|
-
|
|
35548
|
-
return;
|
|
35549
|
-
}
|
|
35550
|
-
return t.loaded();
|
|
35374
|
+
if (t === void 0) this.fire(new z(/* @__PURE__ */ Error(`There is no tile manager with ID '${e}'`)));
|
|
35375
|
+
else return t.loaded();
|
|
35551
35376
|
}
|
|
35552
35377
|
setTerrain(e, t = {}) {
|
|
35553
35378
|
if (this.style._checkLoaded(), e && Uu(this, Ru.terrain, { value: e }, t)) return this;
|
|
@@ -35608,7 +35433,7 @@ var yI = class {
|
|
|
35608
35433
|
addImage(e, t, n = {}) {
|
|
35609
35434
|
this._lazyInitEmptyStyle();
|
|
35610
35435
|
let r = this._createStyleImage(t, n);
|
|
35611
|
-
return r
|
|
35436
|
+
return r && (this.style.addImage(e, r), r.userImage?.onAdd && r.userImage.onAdd(this, e)), this;
|
|
35612
35437
|
}
|
|
35613
35438
|
setMissingStyleImageResolver(e) {
|
|
35614
35439
|
return this._missingStyleImageResolver = e, this.style?.setMissingImageResolver(e), this;
|
|
@@ -35849,7 +35674,7 @@ var yI = class {
|
|
|
35849
35674
|
return !this._styleDirty && !this._sourcesDirty && !!this.style && this.style.loaded();
|
|
35850
35675
|
}
|
|
35851
35676
|
_update(e) {
|
|
35852
|
-
return this.style?._loaded
|
|
35677
|
+
return this.style?._loaded && (this._styleDirty ||= e, this._sourcesDirty = !0, this.triggerRepaint()), this;
|
|
35853
35678
|
}
|
|
35854
35679
|
_requestRenderFrame(e) {
|
|
35855
35680
|
return this._update(), this._renderTaskQueue.add(e);
|
|
@@ -35982,19 +35807,7 @@ var yI = class {
|
|
|
35982
35807
|
this._zoomInButton.disabled = t, this._zoomOutButton.disabled = n, this._zoomInButton.setAttribute("aria-disabled", t.toString()), this._zoomOutButton.setAttribute("aria-disabled", n.toString());
|
|
35983
35808
|
}, this._rotateCompassArrow = () => {
|
|
35984
35809
|
let e = this._map.getPitch(), t = this._map.getRoll(), n = this._map.getBearing(), r = 1 / Math.cos(Rr(e)) ** .5;
|
|
35985
|
-
|
|
35986
|
-
this._compassIcon.style.transform = `scale(${r}) rotateZ(${-t}deg) rotateX(${e}deg) rotateZ(${-n}deg)`;
|
|
35987
|
-
return;
|
|
35988
|
-
}
|
|
35989
|
-
if (this.options.visualizePitch) {
|
|
35990
|
-
this._compassIcon.style.transform = `scale(${r}) rotateX(${e}deg) rotateZ(${-n}deg)`;
|
|
35991
|
-
return;
|
|
35992
|
-
}
|
|
35993
|
-
if (this.options.visualizeRoll) {
|
|
35994
|
-
this._compassIcon.style.transform = `rotate(${-n - t}deg)`;
|
|
35995
|
-
return;
|
|
35996
|
-
}
|
|
35997
|
-
this._compassIcon.style.transform = `rotate(${-n}deg)`;
|
|
35810
|
+
this.options.visualizePitch && this.options.visualizeRoll ? this._compassIcon.style.transform = `scale(${r}) rotateZ(${-t}deg) rotateX(${e}deg) rotateZ(${-n}deg)` : this.options.visualizePitch ? this._compassIcon.style.transform = `scale(${r}) rotateX(${e}deg) rotateZ(${-n}deg)` : this.options.visualizeRoll ? this._compassIcon.style.transform = `rotate(${-n - t}deg)` : this._compassIcon.style.transform = `rotate(${-n}deg)`;
|
|
35998
35811
|
}, this._setButtonTitle = (e, t) => {
|
|
35999
35812
|
let n = this._map._getUIString(`NavigationControl.${t}`);
|
|
36000
35813
|
e.title = n, e.setAttribute("aria-label", n);
|
|
@@ -36275,9 +36088,7 @@ var RI = class extends ji {}, zI = class extends ji {}, BI = class extends Mi {
|
|
|
36275
36088
|
if (!e || t) {
|
|
36276
36089
|
let e = t ? this._opacityWhenCovered : this._opacity;
|
|
36277
36090
|
this._element.style.opacity !== e && (this._element.style.opacity = e, this._element.classList.toggle("maplibregl-marker-covered", t));
|
|
36278
|
-
|
|
36279
|
-
}
|
|
36280
|
-
this._updateCovered();
|
|
36091
|
+
} else this._updateCovered();
|
|
36281
36092
|
}
|
|
36282
36093
|
_isInViewport() {
|
|
36283
36094
|
let { width: e, height: t } = this._map._camera.transform;
|
|
@@ -36368,7 +36179,7 @@ var RI = class extends ji {}, zI = class extends ji {}, BI = class extends Mi {
|
|
|
36368
36179
|
break;
|
|
36369
36180
|
default: throw Error(`Unexpected watchState ${this._watchState}`);
|
|
36370
36181
|
}
|
|
36371
|
-
this.options.showUserLocation && this._watchState !== "OFF" && this._updateMarker(e),
|
|
36182
|
+
this.options.showUserLocation && this._watchState !== "OFF" && this._updateMarker(e), this.options.trackUserLocation && this._watchState !== "ACTIVE_LOCK" || this._updateCamera(e), this.options.showUserLocation && this._dotElement.classList.remove("maplibregl-user-location-dot-stale"), this.fire(new GI("geolocate", e)), this._finish();
|
|
36372
36183
|
}
|
|
36373
36184
|
}, this._updateCamera = (e) => {
|
|
36374
36185
|
let t = new Q(e.coords.longitude, e.coords.latitude), n = this._map.getBearing(), r = { geolocateSource: !0 };
|
|
@@ -36405,7 +36216,7 @@ var RI = class extends ji {}, zI = class extends ji {}, BI = class extends Mi {
|
|
|
36405
36216
|
}, this._onMoveStart = (e) => {
|
|
36406
36217
|
if (!this._map) return;
|
|
36407
36218
|
let t = e?.[0] instanceof ResizeObserverEntry;
|
|
36408
|
-
|
|
36219
|
+
e.geolocateSource || this._watchState !== "ACTIVE_LOCK" || t || this._map.isZooming() || (this._watchState = "BACKGROUND", this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"), this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"), this.fire(new WI("trackuserlocationend")), this.fire(new WI("userlocationlostfocus")));
|
|
36409
36220
|
}, this._setupUI = () => {
|
|
36410
36221
|
this._map && (this._container.addEventListener("contextmenu", (e) => {
|
|
36411
36222
|
e.preventDefault();
|
|
@@ -36513,15 +36324,7 @@ var RI = class extends ji {}, zI = class extends ji {}, BI = class extends Mi {
|
|
|
36513
36324
|
subpixelPositioning: !1,
|
|
36514
36325
|
locationOccludedOpacity: void 0,
|
|
36515
36326
|
padding: void 0
|
|
36516
|
-
}, YI = [
|
|
36517
|
-
"a[href]",
|
|
36518
|
-
"[tabindex]:not([tabindex='-1'])",
|
|
36519
|
-
"[contenteditable]:not([contenteditable='false'])",
|
|
36520
|
-
"button:not([disabled])",
|
|
36521
|
-
"input:not([disabled])",
|
|
36522
|
-
"select:not([disabled])",
|
|
36523
|
-
"textarea:not([disabled])"
|
|
36524
|
-
].join(", "), XI = class extends ji {}, ZI = class extends Mi {
|
|
36327
|
+
}, YI = "a[href], [tabindex]:not([tabindex='-1']), [contenteditable]:not([contenteditable='false']), button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])", XI = class extends ji {}, ZI = class extends Mi {
|
|
36525
36328
|
constructor(e) {
|
|
36526
36329
|
super(), this._updateOpacity = () => {
|
|
36527
36330
|
this.options.locationOccludedOpacity !== void 0 && (this._map._camera.transform.isLocationOccluded(this.getLngLat()) ? this._container.style.opacity = `${this.options.locationOccludedOpacity}` : this._container.style.opacity = "");
|
|
@@ -36670,9 +36473,8 @@ function $I(e) {
|
|
|
36670
36473
|
function eL(e) {
|
|
36671
36474
|
pi.WORKER_URL = e;
|
|
36672
36475
|
}
|
|
36673
|
-
|
|
36674
|
-
|
|
36675
|
-
var tL = "/assets/maplibre-gl-worker-C24SsKwV.js", nL = {
|
|
36476
|
+
// node_modules/maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url
|
|
36477
|
+
var tL = "/assets/maplibre-gl-worker-CEzvAyZY.js", nL = {
|
|
36676
36478
|
version: 8,
|
|
36677
36479
|
name: "Bright",
|
|
36678
36480
|
metadata: {
|
|
@@ -41241,9 +41043,9 @@ var tL = "/assets/maplibre-gl-worker-C24SsKwV.js", nL = {
|
|
|
41241
41043
|
dataset: {}
|
|
41242
41044
|
},
|
|
41243
41045
|
setup(_) {
|
|
41244
|
-
let T = _, { t: E } = e(), { formatDate: D } =
|
|
41046
|
+
let T = _, { t: E } = e(), { formatDate: D } = o(), O = t(), k = b(!1), A = u(() => T.resource.extras["analysis:parsing:pmtiles_url"] ? T.resource.extras["analysis:parsing:pmtiles_url"] : T.resource.url), j = u(() => O.pmtilesViewerBaseUrl ? `${O.pmtilesViewerBaseUrl}${encodeURIComponent(A.value)}` : null), ee = u(() => T.resource.extras["analysis:parsing:pmtiles_url"] ? D(T.resource.extras["analysis:parsing:finished_at"]) : D(T.resource.last_modified)), te = C("containerRef");
|
|
41245
41047
|
eL(tL);
|
|
41246
|
-
let ne = u(() =>
|
|
41048
|
+
let ne = u(() => c(T.dataset));
|
|
41247
41049
|
async function re() {
|
|
41248
41050
|
await Promise.resolve({ });
|
|
41249
41051
|
let e = new Fe();
|
|
@@ -41270,10 +41072,10 @@ var tL = "/assets/maplibre-gl-worker-C24SsKwV.js", nL = {
|
|
|
41270
41072
|
closeButton: !0,
|
|
41271
41073
|
closeOnClick: !0
|
|
41272
41074
|
}).addClassName("rounded-full").setMaxWidth("300px");
|
|
41273
|
-
function
|
|
41075
|
+
function o(e) {
|
|
41274
41076
|
if (!e.features || !e.features[0]) i.remove();
|
|
41275
41077
|
else {
|
|
41276
|
-
let t = e.lngLat, n = Object.keys(e.features[0].properties).map((t) => `<p class="my-0"><b class="font-marianne text-sm" !important;">${
|
|
41078
|
+
let t = e.lngLat, n = Object.keys(e.features[0].properties).map((t) => `<p class="my-0"><b class="font-marianne text-sm" !important;">${a.sanitize(t, { USE_PROFILES: { html: !1 } })} :</b> <span class="font-mono text-xs">${a.sanitize(e.features[0].properties[t], { USE_PROFILES: { html: !1 } })}</span></p>`).join("");
|
|
41277
41079
|
i.setLngLat(t).setHTML(n).addTo(r);
|
|
41278
41080
|
}
|
|
41279
41081
|
}
|
|
@@ -41290,7 +41092,7 @@ var tL = "/assets/maplibre-gl-worker-C24SsKwV.js", nL = {
|
|
|
41290
41092
|
case "Polygon": return "fill";
|
|
41291
41093
|
case "Point": return "circle";
|
|
41292
41094
|
case "LineString": return "line";
|
|
41293
|
-
default: return
|
|
41095
|
+
default: return s(e.geometry, "Unsupported geometry"), "";
|
|
41294
41096
|
}
|
|
41295
41097
|
});
|
|
41296
41098
|
r.addLayer({
|
|
@@ -41310,7 +41112,7 @@ var tL = "/assets/maplibre-gl-worker-C24SsKwV.js", nL = {
|
|
|
41310
41112
|
.6
|
|
41311
41113
|
]
|
|
41312
41114
|
}
|
|
41313
|
-
}), r.on("click", e.layer,
|
|
41115
|
+
}), r.on("click", e.layer, o), r.on("mouseenter", e.layer, () => {
|
|
41314
41116
|
r.getCanvas().style.cursor = "pointer";
|
|
41315
41117
|
}), r.on("mouseleave", e.layer, () => {
|
|
41316
41118
|
r.getCanvas().style.cursor = "";
|
|
@@ -41329,7 +41131,7 @@ var tL = "/assets/maplibre-gl-worker-C24SsKwV.js", nL = {
|
|
|
41329
41131
|
}, null, 8, ["resource"])) : (y(), p("div", iL, [j.value ? (y(), p("div", aL, [m("div", oL, [
|
|
41330
41132
|
m("div", {
|
|
41331
41133
|
class: "fr-col-auto",
|
|
41332
|
-
innerHTML: S(
|
|
41134
|
+
innerHTML: S(l)
|
|
41333
41135
|
}, null, 8, sL),
|
|
41334
41136
|
m("div", cL, [m("p", lL, x(S(E)("Explorer les données en détail")), 1), m("p", uL, x(S(E)("Utiliser un visualisateur PMTiles pour obtenir un aperçu des données.")), 1)]),
|
|
41335
41137
|
m("p", dL, [g(n, {
|
|
@@ -41343,5 +41145,4 @@ var tL = "/assets/maplibre-gl-worker-C24SsKwV.js", nL = {
|
|
|
41343
41145
|
])])) : f("", !0), m("div", fL, [m("div", pL, null, 512), m("div", mL, x(S(E)("Aperçu de la carte mis à jour le {date}", { date: ee.value })), 1)])]))]));
|
|
41344
41146
|
}
|
|
41345
41147
|
});
|
|
41346
|
-
//#endregion
|
|
41347
41148
|
export { hL as default };
|