@nika-js/onlymap 0.11.10 → 0.11.11
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/CHANGELOG.md +5 -0
- package/README.md +1 -1
- package/dist/{basemap-Cc8v5hPA.js → basemap-QT4ua-dL.js} +333 -320
- package/dist/basemap-request.d.ts +24 -0
- package/dist/{geoparquet-B9p5-Yxf.js → geoparquet-hOsdfZJa.js} +1 -1
- package/dist/{globe-view-BF6-01N_.js → globe-view-BSGTUqWc.js} +1 -1
- package/dist/{hillshade-Dd7MQHfp.js → hillshade-D2Ps3Nim.js} +1 -1
- package/dist/{index-BaR4MzNc.js → index-BO7MtTkn.js} +3 -3
- package/dist/{index-CwoqJ6IK.js → index-Bxue4Psc.js} +3 -3
- package/dist/{index-T5LATpR7.js → index-Bzypgr1v.js} +1 -1
- package/dist/{index-Bwdaim-c.js → index-CevWTqBO.js} +18 -18
- package/dist/{index-CawlYDgE.js → index-D1ZjhP2H.js} +1 -1
- package/dist/{index-C_0KCx9L.js → index-DBt_2x-w.js} +1 -1
- package/dist/{index-C9gVsJaG.js → index-DjYxw-8H.js} +2 -2
- package/dist/{index-CCY7Rk1s.js → index-DudIuhJa.js} +1 -1
- package/dist/{index-Dk12Fazj.js → index-Dwc4s3mc.js} +1 -1
- package/dist/{lerc-CElHRqrE.js → lerc-DQuf93SN.js} +1 -1
- package/dist/onlymap.standalone.js +241 -228
- package/dist/onlymapjs.js +1 -1
- package/dist/{post-process-effect-VAE0lQ4c.js → post-process-effect-B3j_nBzy.js} +1 -1
- package/dist/{raster-Cn8jugd2.js → raster-CvAJ-h_g.js} +3 -3
- package/dist/{raster-pipeline-D26Sl0X2.js → raster-pipeline-CusoihQ3.js} +1 -1
- package/dist/{text-on-path-C6SLSkus.js → text-on-path-D9u5SYCo.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-Do5FzYXm.js → zarr-DWb_nikR.js} +2 -2
- package/docs/basemaps.md +1 -1
- package/docs/cartograph.md +2 -2
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/syntax.md +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { aJ as Y_, N as Bu, H as Pd, k as K_, aK as J_, aL as Q_, D as Xf, Z as ey } from "./index-
|
|
2
|
-
import { a as ty } from "./globe-view-
|
|
1
|
+
import { aJ as Y_, N as Bu, H as Pd, k as K_, aK as J_, aL as Q_, D as Xf, Z as ey } from "./index-CevWTqBO.js";
|
|
2
|
+
import { a as ty } from "./globe-view-BSGTUqWc.js";
|
|
3
3
|
const iy = {
|
|
4
4
|
copy: "©",
|
|
5
5
|
reg: "®",
|
|
@@ -10,8 +10,8 @@ const iy = {
|
|
|
10
10
|
apos: "'",
|
|
11
11
|
nbsp: " "
|
|
12
12
|
};
|
|
13
|
-
function ry(
|
|
14
|
-
return
|
|
13
|
+
function ry(Se) {
|
|
14
|
+
return Se.replace(/<[^>]*>/g, " ").replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi, (Q, ge) => {
|
|
15
15
|
if (ge.startsWith("#")) {
|
|
16
16
|
const Ee = ge[1].toLowerCase() === "x" ? parseInt(ge.slice(2), 16) : parseInt(ge.slice(1), 10);
|
|
17
17
|
return Number.isInteger(Ee) && Ee > 0 && Ee <= 1114111 ? String.fromCodePoint(Ee) : Q;
|
|
@@ -19,26 +19,37 @@ function ry(Ie) {
|
|
|
19
19
|
return iy[ge.toLowerCase()] ?? Q;
|
|
20
20
|
}).replace(/\s+/g, " ").trim();
|
|
21
21
|
}
|
|
22
|
-
function ny(
|
|
23
|
-
const Q = [...new Set(
|
|
22
|
+
function ny(Se) {
|
|
23
|
+
const Q = [...new Set(Se.filter((ge) => typeof ge == "string").map(ry))].filter(
|
|
24
24
|
(ge) => ge.length > 0
|
|
25
25
|
);
|
|
26
26
|
return Q.filter((ge) => !Q.some((Ee) => Ee !== ge && Ee.includes(ge)));
|
|
27
27
|
}
|
|
28
|
+
const sy = /* @__PURE__ */ new Set(["tile.openstreetmap.org", "a.tile.openstreetmap.org", "b.tile.openstreetmap.org", "c.tile.openstreetmap.org"]);
|
|
29
|
+
function oy(Se) {
|
|
30
|
+
let Q;
|
|
31
|
+
try {
|
|
32
|
+
Q = new URL(Se).hostname.toLowerCase();
|
|
33
|
+
} catch {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (sy.has(Q))
|
|
37
|
+
return { url: Se, headers: { "X-Requested-With": "XMLHttpRequest" } };
|
|
38
|
+
}
|
|
28
39
|
var Ou = { exports: {} };
|
|
29
40
|
/**
|
|
30
41
|
* MapLibre GL JS
|
|
31
42
|
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.24.0/LICENSE.txt
|
|
32
43
|
*/
|
|
33
|
-
var
|
|
34
|
-
function
|
|
35
|
-
return Yf || (Yf = 1, (function(
|
|
44
|
+
var ay = Ou.exports, Yf;
|
|
45
|
+
function ly() {
|
|
46
|
+
return Yf || (Yf = 1, (function(Se, Q) {
|
|
36
47
|
(function(ge, Ee) {
|
|
37
|
-
|
|
38
|
-
})(
|
|
48
|
+
Se.exports = Ee();
|
|
49
|
+
})(ay, (function() {
|
|
39
50
|
var ge = {}, Ee = {};
|
|
40
|
-
function ze(R, h,
|
|
41
|
-
if (Ee[R] =
|
|
51
|
+
function ze(R, h, pe) {
|
|
52
|
+
if (Ee[R] = pe, R === "index") {
|
|
42
53
|
var mt = "var sharedModule = {}; (" + Ee.shared + ")(sharedModule); (" + Ee.worker + ")(sharedModule);", Kt = {};
|
|
43
54
|
return Ee.shared(Kt), Ee.index(ge, Kt), typeof window < "u" && ge.setWorkerUrl(window.URL.createObjectURL(new Blob([mt], { type: "text/javascript" }))), ge;
|
|
44
55
|
}
|
|
@@ -69,15 +80,15 @@ function oy() {
|
|
|
69
80
|
g((s = s.apply(r, e || [])).next());
|
|
70
81
|
}));
|
|
71
82
|
}
|
|
72
|
-
function
|
|
83
|
+
function pe(r, e) {
|
|
73
84
|
this.x = r, this.y = e;
|
|
74
85
|
}
|
|
75
86
|
function mt(r) {
|
|
76
87
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
77
88
|
}
|
|
78
89
|
var Kt, Ui;
|
|
79
|
-
typeof SuppressedError == "function" && SuppressedError,
|
|
80
|
-
return new
|
|
90
|
+
typeof SuppressedError == "function" && SuppressedError, pe.prototype = { clone() {
|
|
91
|
+
return new pe(this.x, this.y);
|
|
81
92
|
}, add(r) {
|
|
82
93
|
return this.clone()._add(r);
|
|
83
94
|
}, sub(r) {
|
|
@@ -147,10 +158,10 @@ function oy() {
|
|
|
147
158
|
return this.x = e.x + i * (this.x - e.x) - s * (this.y - e.y), this.y = o, this;
|
|
148
159
|
}, _round() {
|
|
149
160
|
return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
|
|
150
|
-
}, constructor:
|
|
151
|
-
if (r instanceof
|
|
152
|
-
if (Array.isArray(r)) return new
|
|
153
|
-
if (r.x !== void 0 && r.y !== void 0) return new
|
|
161
|
+
}, constructor: pe }, pe.convert = function(r) {
|
|
162
|
+
if (r instanceof pe) return r;
|
|
163
|
+
if (Array.isArray(r)) return new pe(+r[0], +r[1]);
|
|
164
|
+
if (r.x !== void 0 && r.y !== void 0) return new pe(+r.x, +r.y);
|
|
154
165
|
throw new Error("Expected [x, y] or {x, y} point format");
|
|
155
166
|
};
|
|
156
167
|
var gr = (function() {
|
|
@@ -202,7 +213,7 @@ function oy() {
|
|
|
202
213
|
}
|
|
203
214
|
return Xe || !1;
|
|
204
215
|
}
|
|
205
|
-
var
|
|
216
|
+
var fe = 1e-6, jt = typeof Float32Array < "u" ? Float32Array : Array;
|
|
206
217
|
function Jr() {
|
|
207
218
|
var r = new jt(9);
|
|
208
219
|
return jt != Float32Array && (r[1] = 0, r[2] = 0, r[3] = 0, r[5] = 0, r[6] = 0, r[7] = 0), r[0] = 1, r[4] = 1, r[8] = 1, r;
|
|
@@ -606,7 +617,7 @@ function oy() {
|
|
|
606
617
|
return !!this.bindings[e] || !!this.parent && this.parent.has(e);
|
|
607
618
|
}
|
|
608
619
|
}
|
|
609
|
-
const Br = { kind: "null" },
|
|
620
|
+
const Br = { kind: "null" }, Pe = { kind: "number" }, Ne = { kind: "string" }, qe = { kind: "boolean" }, ki = { kind: "color" }, yo = { kind: "projectionDefinition" }, yr = { kind: "object" }, Ge = { kind: "value" }, Ts = { kind: "collator" }, Ss = { kind: "formatted" }, vo = { kind: "padding" }, Vn = { kind: "colorArray" }, Ps = { kind: "numberArray" }, jn = { kind: "resolvedImage" }, Is = { kind: "variableAnchorOffsetCollection" };
|
|
610
621
|
function ti(r, e) {
|
|
611
622
|
return { kind: "array", itemType: r, N: e };
|
|
612
623
|
}
|
|
@@ -617,7 +628,7 @@ function oy() {
|
|
|
617
628
|
}
|
|
618
629
|
return r.kind;
|
|
619
630
|
}
|
|
620
|
-
const xo = [Br,
|
|
631
|
+
const xo = [Br, Pe, Ne, qe, ki, yo, Ss, yr, ti(Ge), vo, Ps, Vn, jn, Is];
|
|
621
632
|
function Nn(r, e) {
|
|
622
633
|
if (e.kind === "error") return null;
|
|
623
634
|
if (r.kind === "array") {
|
|
@@ -980,7 +991,7 @@ function oy() {
|
|
|
980
991
|
if (r === null) return Br;
|
|
981
992
|
if (typeof r == "string") return Ne;
|
|
982
993
|
if (typeof r == "boolean") return qe;
|
|
983
|
-
if (typeof r == "number") return
|
|
994
|
+
if (typeof r == "number") return Pe;
|
|
984
995
|
if (r instanceof Ze) return ki;
|
|
985
996
|
if (r instanceof gi) return yo;
|
|
986
997
|
if (r instanceof Ha) return Ts;
|
|
@@ -1031,7 +1042,7 @@ function oy() {
|
|
|
1031
1042
|
return !0;
|
|
1032
1043
|
}
|
|
1033
1044
|
}
|
|
1034
|
-
const So = { string: Ne, number:
|
|
1045
|
+
const So = { string: Ne, number: Pe, boolean: qe, object: yr };
|
|
1035
1046
|
class Mi {
|
|
1036
1047
|
constructor(e, i) {
|
|
1037
1048
|
this.type = e, this.args = i;
|
|
@@ -1079,7 +1090,7 @@ function oy() {
|
|
|
1079
1090
|
return this.args.every(((e) => e.outputDefined()));
|
|
1080
1091
|
}
|
|
1081
1092
|
}
|
|
1082
|
-
const hn = { "to-boolean": qe, "to-color": ki, "to-number":
|
|
1093
|
+
const hn = { "to-boolean": qe, "to-color": ki, "to-number": Pe, "to-string": Ne };
|
|
1083
1094
|
class vr {
|
|
1084
1095
|
constructor(e, i) {
|
|
1085
1096
|
this.type = e, this.args = i;
|
|
@@ -1305,7 +1316,7 @@ function oy() {
|
|
|
1305
1316
|
}
|
|
1306
1317
|
static parse(e, i) {
|
|
1307
1318
|
if (e.length !== 3) return i.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
|
|
1308
|
-
const s = i.parse(e[1], 1,
|
|
1319
|
+
const s = i.parse(e[1], 1, Pe), o = i.parse(e[2], 2, ti(i.expectedType || Ge));
|
|
1309
1320
|
return s && o ? new Je(o.type.itemType, s, o) : null;
|
|
1310
1321
|
}
|
|
1311
1322
|
evaluate(e) {
|
|
@@ -1329,7 +1340,7 @@ function oy() {
|
|
|
1329
1340
|
static parse(e, i) {
|
|
1330
1341
|
if (e.length !== 3) return i.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
|
|
1331
1342
|
const s = i.parse(e[1], 1, Ge), o = i.parse(e[2], 2, Ge);
|
|
1332
|
-
return s && o ? Ms(s.type, [qe, Ne,
|
|
1343
|
+
return s && o ? Ms(s.type, [qe, Ne, Pe, Br, Ge]) ? new $e(s, o) : i.error(`Expected first argument to be of type boolean, string, number or null, but found ${at(s.type)} instead`) : null;
|
|
1333
1344
|
}
|
|
1334
1345
|
evaluate(e) {
|
|
1335
1346
|
const i = this.needle.evaluate(e), s = this.haystack.evaluate(e);
|
|
@@ -1347,15 +1358,15 @@ function oy() {
|
|
|
1347
1358
|
}
|
|
1348
1359
|
class qn {
|
|
1349
1360
|
constructor(e, i, s) {
|
|
1350
|
-
this.type =
|
|
1361
|
+
this.type = Pe, this.needle = e, this.haystack = i, this.fromIndex = s;
|
|
1351
1362
|
}
|
|
1352
1363
|
static parse(e, i) {
|
|
1353
1364
|
if (e.length <= 2 || e.length >= 5) return i.error(`Expected 2 or 3 arguments, but found ${e.length - 1} instead.`);
|
|
1354
1365
|
const s = i.parse(e[1], 1, Ge), o = i.parse(e[2], 2, Ge);
|
|
1355
1366
|
if (!s || !o) return null;
|
|
1356
|
-
if (!Ms(s.type, [qe, Ne,
|
|
1367
|
+
if (!Ms(s.type, [qe, Ne, Pe, Br, Ge])) return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${at(s.type)} instead`);
|
|
1357
1368
|
if (e.length === 4) {
|
|
1358
|
-
const l = i.parse(e[3], 3,
|
|
1369
|
+
const l = i.parse(e[3], 3, Pe);
|
|
1359
1370
|
return l ? new qn(s, o, l) : null;
|
|
1360
1371
|
}
|
|
1361
1372
|
return new qn(s, o);
|
|
@@ -1464,11 +1475,11 @@ function oy() {
|
|
|
1464
1475
|
}
|
|
1465
1476
|
static parse(e, i) {
|
|
1466
1477
|
if (e.length <= 2 || e.length >= 5) return i.error(`Expected 2 or 3 arguments, but found ${e.length - 1} instead.`);
|
|
1467
|
-
const s = i.parse(e[1], 1, Ge), o = i.parse(e[2], 2,
|
|
1478
|
+
const s = i.parse(e[1], 1, Ge), o = i.parse(e[2], 2, Pe);
|
|
1468
1479
|
if (!s || !o) return null;
|
|
1469
1480
|
if (!Ms(s.type, [ti(Ge), Ne, Ge])) return i.error(`Expected first argument to be of type array or string, but found ${at(s.type)} instead`);
|
|
1470
1481
|
if (e.length === 4) {
|
|
1471
|
-
const l = i.parse(e[3], 3,
|
|
1482
|
+
const l = i.parse(e[3], 3, Pe);
|
|
1472
1483
|
return l ? new Wn(s.type, s, o, l) : null;
|
|
1473
1484
|
}
|
|
1474
1485
|
return new Wn(s.type, s, o);
|
|
@@ -1507,7 +1518,7 @@ function oy() {
|
|
|
1507
1518
|
static parse(e, i) {
|
|
1508
1519
|
if (e.length - 1 < 4) return i.error(`Expected at least 4 arguments, but found only ${e.length - 1}.`);
|
|
1509
1520
|
if ((e.length - 1) % 2 != 0) return i.error("Expected an even number of arguments.");
|
|
1510
|
-
const s = i.parse(e[1], 1,
|
|
1521
|
+
const s = i.parse(e[1], 1, Pe);
|
|
1511
1522
|
if (!s) return null;
|
|
1512
1523
|
const o = [];
|
|
1513
1524
|
let l = null;
|
|
@@ -1602,7 +1613,7 @@ function oy() {
|
|
|
1602
1613
|
}
|
|
1603
1614
|
if (e.length - 1 < 4) return i.error(`Expected at least 4 arguments, but found only ${e.length - 1}.`);
|
|
1604
1615
|
if ((e.length - 1) % 2 != 0) return i.error("Expected an even number of arguments.");
|
|
1605
|
-
if (l = i.parse(l, 2,
|
|
1616
|
+
if (l = i.parse(l, 2, Pe), !l) return null;
|
|
1606
1617
|
const p = [];
|
|
1607
1618
|
let g = null;
|
|
1608
1619
|
s !== "interpolate-hcl" && s !== "interpolate-lab" || i.expectedType == Vn ? i.expectedType && i.expectedType.kind !== "value" && (g = i.expectedType) : g = ki;
|
|
@@ -1614,7 +1625,7 @@ function oy() {
|
|
|
1614
1625
|
if (!I) return null;
|
|
1615
1626
|
g = g || I.type, p.push([v, I]);
|
|
1616
1627
|
}
|
|
1617
|
-
return tr(g,
|
|
1628
|
+
return tr(g, Pe) || tr(g, yo) || tr(g, ki) || tr(g, vo) || tr(g, Ps) || tr(g, Vn) || tr(g, Is) || tr(g, ti(Pe)) ? new kt(g, s, o, l, p) : i.error(`Type ${at(g)} is not interpolatable.`);
|
|
1618
1629
|
}
|
|
1619
1630
|
evaluate(e) {
|
|
1620
1631
|
const i = this.labels, s = this.outputs;
|
|
@@ -1808,7 +1819,7 @@ function oy() {
|
|
|
1808
1819
|
}
|
|
1809
1820
|
static parse(e, i) {
|
|
1810
1821
|
if (e.length !== 3) return i.error("Expected two arguments.");
|
|
1811
|
-
const s = i.parse(e[1], 1,
|
|
1822
|
+
const s = i.parse(e[1], 1, Pe);
|
|
1812
1823
|
if (!s) return null;
|
|
1813
1824
|
const o = e[2];
|
|
1814
1825
|
if (typeof o != "object" || Array.isArray(o)) return i.error("NumberFormat options argument must be an object.");
|
|
@@ -1820,9 +1831,9 @@ function oy() {
|
|
|
1820
1831
|
if (o.unit && (p = i.parse(o.unit, 1, Ne), !p)) return null;
|
|
1821
1832
|
if (u && p) return i.error("NumberFormat options `currency` and `unit` are mutually exclusive");
|
|
1822
1833
|
let g = null;
|
|
1823
|
-
if (o["min-fraction-digits"] && (g = i.parse(o["min-fraction-digits"], 1,
|
|
1834
|
+
if (o["min-fraction-digits"] && (g = i.parse(o["min-fraction-digits"], 1, Pe), !g)) return null;
|
|
1824
1835
|
let m = null;
|
|
1825
|
-
return o["max-fraction-digits"] && (m = i.parse(o["max-fraction-digits"], 1,
|
|
1836
|
+
return o["max-fraction-digits"] && (m = i.parse(o["max-fraction-digits"], 1, Pe), !m) ? null : new Eo(s, l, u, p, g, m);
|
|
1826
1837
|
}
|
|
1827
1838
|
evaluate(e) {
|
|
1828
1839
|
return new Intl.NumberFormat(this.locale ? this.locale.evaluate(e) : [], { style: this.currency ? "currency" : this.unit ? "unit" : "decimal", currency: this.currency ? this.currency.evaluate(e) : void 0, unit: this.unit ? this.unit.evaluate(e) : void 0, minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(e) : void 0, maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(e) : void 0 }).format(this.number.evaluate(e));
|
|
@@ -1849,7 +1860,7 @@ function oy() {
|
|
|
1849
1860
|
if (l && typeof p == "object" && !Array.isArray(p)) {
|
|
1850
1861
|
l = !1;
|
|
1851
1862
|
let g = null;
|
|
1852
|
-
if (p["font-scale"] && (g = i.parse(p["font-scale"], 1,
|
|
1863
|
+
if (p["font-scale"] && (g = i.parse(p["font-scale"], 1, Pe), !g)) return null;
|
|
1853
1864
|
let m = null;
|
|
1854
1865
|
if (p["text-font"] && (m = i.parse(p["text-font"], 1, ti(Ne)), !m)) return null;
|
|
1855
1866
|
let v = null;
|
|
@@ -1906,7 +1917,7 @@ function oy() {
|
|
|
1906
1917
|
}
|
|
1907
1918
|
class Fi {
|
|
1908
1919
|
constructor(e) {
|
|
1909
|
-
this.type =
|
|
1920
|
+
this.type = Pe, this.input = e;
|
|
1910
1921
|
}
|
|
1911
1922
|
static parse(e, i) {
|
|
1912
1923
|
if (e.length !== 2) return i.error(`Expected 1 argument, but found ${e.length - 1} instead.`);
|
|
@@ -2375,7 +2386,7 @@ function oy() {
|
|
|
2375
2386
|
}
|
|
2376
2387
|
class vn {
|
|
2377
2388
|
constructor(e, i) {
|
|
2378
|
-
this.type =
|
|
2389
|
+
this.type = Pe, this.geojson = e, this.geometries = i;
|
|
2379
2390
|
}
|
|
2380
2391
|
static parse(e, i) {
|
|
2381
2392
|
if (e.length !== 2) return i.error(`'distance' expression requires exactly one argument, but found ${e.length - 1} instead.`);
|
|
@@ -2721,21 +2732,21 @@ function oy() {
|
|
|
2721
2732
|
}
|
|
2722
2733
|
qi.register(Qn, { error: [{ kind: "error" }, [Ne], (r, [e]) => {
|
|
2723
2734
|
throw new ht(e.evaluate(r));
|
|
2724
|
-
}], typeof: [Ne, [Ge], (r, [e]) => at(At(e.evaluate(r)))], "to-rgba": [ti(
|
|
2735
|
+
}], typeof: [Ne, [Ge], (r, [e]) => at(At(e.evaluate(r)))], "to-rgba": [ti(Pe, 4), [ki], (r, [e]) => {
|
|
2725
2736
|
const [i, s, o, l] = e.evaluate(r).rgb;
|
|
2726
2737
|
return [255 * i, 255 * s, 255 * o, l];
|
|
2727
|
-
}], rgb: [ki, [
|
|
2738
|
+
}], rgb: [ki, [Pe, Pe, Pe], Lc], rgba: [ki, [Pe, Pe, Pe, Pe], Lc], has: { type: qe, overloads: [[[Ne], (r, [e]) => Fc(e.evaluate(r), r.properties())], [[Ne, yr], (r, [e, i]) => Fc(e.evaluate(r), i.evaluate(r))]] }, get: { type: Ge, overloads: [[[Ne], (r, [e]) => hl(e.evaluate(r), r.properties())], [[Ne, yr], (r, [e, i]) => hl(e.evaluate(r), i.evaluate(r))]] }, "feature-state": [Ge, [Ne], (r, [e]) => hl(e.evaluate(r), r.featureState || {})], properties: [yr, [], (r) => r.properties()], "geometry-type": [Ne, [], (r) => r.geometryType()], id: [Ge, [], (r) => r.id()], zoom: [Pe, [], (r) => r.globals.zoom], "heatmap-density": [Pe, [], (r) => r.globals.heatmapDensity || 0], elevation: [Pe, [], (r) => r.globals.elevation || 0], "line-progress": [Pe, [], (r) => r.globals.lineProgress || 0], accumulated: [Ge, [], (r) => r.globals.accumulated === void 0 ? null : r.globals.accumulated], "+": [Pe, xn(Pe), (r, e) => {
|
|
2728
2739
|
let i = 0;
|
|
2729
2740
|
for (const s of e) i += s.evaluate(r);
|
|
2730
2741
|
return i;
|
|
2731
|
-
}], "*": [
|
|
2742
|
+
}], "*": [Pe, xn(Pe), (r, e) => {
|
|
2732
2743
|
let i = 1;
|
|
2733
2744
|
for (const s of e) i *= s.evaluate(r);
|
|
2734
2745
|
return i;
|
|
2735
|
-
}], "-": { type:
|
|
2746
|
+
}], "-": { type: Pe, overloads: [[[Pe, Pe], (r, [e, i]) => e.evaluate(r) - i.evaluate(r)], [[Pe], (r, [e]) => -e.evaluate(r)]] }, "/": [Pe, [Pe, Pe], (r, [e, i]) => e.evaluate(r) / i.evaluate(r)], "%": [Pe, [Pe, Pe], (r, [e, i]) => e.evaluate(r) % i.evaluate(r)], ln2: [Pe, [], () => Math.LN2], pi: [Pe, [], () => Math.PI], e: [Pe, [], () => Math.E], "^": [Pe, [Pe, Pe], (r, [e, i]) => Math.pow(e.evaluate(r), i.evaluate(r))], sqrt: [Pe, [Pe], (r, [e]) => Math.sqrt(e.evaluate(r))], log10: [Pe, [Pe], (r, [e]) => Math.log(e.evaluate(r)) / Math.LN10], ln: [Pe, [Pe], (r, [e]) => Math.log(e.evaluate(r))], log2: [Pe, [Pe], (r, [e]) => Math.log(e.evaluate(r)) / Math.LN2], sin: [Pe, [Pe], (r, [e]) => Math.sin(e.evaluate(r))], cos: [Pe, [Pe], (r, [e]) => Math.cos(e.evaluate(r))], tan: [Pe, [Pe], (r, [e]) => Math.tan(e.evaluate(r))], asin: [Pe, [Pe], (r, [e]) => Math.asin(e.evaluate(r))], acos: [Pe, [Pe], (r, [e]) => Math.acos(e.evaluate(r))], atan: [Pe, [Pe], (r, [e]) => Math.atan(e.evaluate(r))], min: [Pe, xn(Pe), (r, e) => Math.min(...e.map(((i) => i.evaluate(r))))], max: [Pe, xn(Pe), (r, e) => Math.max(...e.map(((i) => i.evaluate(r))))], abs: [Pe, [Pe], (r, [e]) => Math.abs(e.evaluate(r))], round: [Pe, [Pe], (r, [e]) => {
|
|
2736
2747
|
const i = e.evaluate(r);
|
|
2737
2748
|
return i < 0 ? -Math.round(-i) : Math.round(i);
|
|
2738
|
-
}], floor: [
|
|
2749
|
+
}], floor: [Pe, [Pe], (r, [e]) => Math.floor(e.evaluate(r))], ceil: [Pe, [Pe], (r, [e]) => Math.ceil(e.evaluate(r))], "filter-==": [qe, [Ne, Ge], (r, [e, i]) => r.properties()[e.value] === i.value], "filter-id-==": [qe, [Ge], (r, [e]) => r.id() === e.value], "filter-type-==": [qe, [Ne], (r, [e]) => r.geometryType() === e.value], "filter-<": [qe, [Ne, Ge], (r, [e, i]) => {
|
|
2739
2750
|
const s = r.properties()[e.value], o = i.value;
|
|
2740
2751
|
return typeof s == typeof o && s < o;
|
|
2741
2752
|
}], "filter-id-<": [qe, [Ge], (r, [e]) => {
|
|
@@ -2818,7 +2829,7 @@ function oy() {
|
|
|
2818
2829
|
}
|
|
2819
2830
|
function Vs(r, e, i) {
|
|
2820
2831
|
const s = new dn(Qn, Bo, [], e ? (function(l) {
|
|
2821
|
-
const u = { color: ki, string: Ne, number:
|
|
2832
|
+
const u = { color: ki, string: Ne, number: Pe, enum: Ne, boolean: qe, formatted: Ss, padding: vo, numberArray: Ps, colorArray: Vn, projectionDefinition: yo, resolvedImage: jn, variableAnchorOffsetCollection: Is };
|
|
2822
2833
|
return l.type === "array" ? ti(u[l.value] || Ge, l.length) : u[l.type];
|
|
2823
2834
|
})(e) : void 0), o = s.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
|
|
2824
2835
|
return o ? Bc(new Os(o, e, i)) : es(s.errors);
|
|
@@ -4474,7 +4485,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4474
4485
|
return this._structArray.uint16[this._pos2 + 9];
|
|
4475
4486
|
}
|
|
4476
4487
|
get anchorPoint() {
|
|
4477
|
-
return new
|
|
4488
|
+
return new pe(this.anchorPointX, this.anchorPointY);
|
|
4478
4489
|
}
|
|
4479
4490
|
}
|
|
4480
4491
|
a.prototype.size = 20;
|
|
@@ -4734,13 +4745,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4734
4745
|
class Ce extends d {
|
|
4735
4746
|
}
|
|
4736
4747
|
const we = ft([{ name: "a_pos", components: 2, type: "Int16" }], 4), { members: he } = we;
|
|
4737
|
-
class
|
|
4748
|
+
class Ie {
|
|
4738
4749
|
constructor(e = []) {
|
|
4739
4750
|
this._forceNewSegmentOnNextPrepare = !1, this.segments = e;
|
|
4740
4751
|
}
|
|
4741
4752
|
prepareSegment(e, i, s, o) {
|
|
4742
4753
|
const l = this.segments[this.segments.length - 1];
|
|
4743
|
-
return e >
|
|
4754
|
+
return e > Ie.MAX_VERTEX_ARRAY_LENGTH && Jt(`Max vertices per segment is ${Ie.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Ie.MAX_VERTEX_ARRAY_LENGTH} vertices.`), this._forceNewSegmentOnNextPrepare || !l || l.vertexLength + e > Ie.MAX_VERTEX_ARRAY_LENGTH || l.sortKey !== o ? this.createNewSegment(i, s, o) : l;
|
|
4744
4755
|
}
|
|
4745
4756
|
createNewSegment(e, i, s) {
|
|
4746
4757
|
const o = { vertexOffset: e.length, primitiveOffset: i.length, vertexLength: 0, primitiveLength: 0, vaos: {} };
|
|
@@ -4759,13 +4770,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4759
4770
|
for (const e of this.segments) for (const i in e.vaos) e.vaos[i].destroy();
|
|
4760
4771
|
}
|
|
4761
4772
|
static simpleSegment(e, i, s, o) {
|
|
4762
|
-
return new
|
|
4773
|
+
return new Ie([{ vertexOffset: e, primitiveOffset: i, vertexLength: s, primitiveLength: o, vaos: {}, sortKey: 0 }]);
|
|
4763
4774
|
}
|
|
4764
4775
|
}
|
|
4765
4776
|
function ke(r, e) {
|
|
4766
4777
|
return 256 * (r = fi(Math.floor(r), 0, 255)) + fi(Math.floor(e), 0, 255);
|
|
4767
4778
|
}
|
|
4768
|
-
|
|
4779
|
+
Ie.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1, Me("SegmentVector", Ie);
|
|
4769
4780
|
const st = ft([{ name: "a_pattern_from", components: 4, type: "Uint16" }, { name: "a_pattern_to", components: 4, type: "Uint16" }, { name: "a_pixel_ratio_from", components: 1, type: "Uint16" }, { name: "a_pixel_ratio_to", components: 1, type: "Uint16" }]), zt = ft([{ name: "a_dasharray_from", components: 4, type: "Uint16" }, { name: "a_dasharray_to", components: 4, type: "Uint16" }]);
|
|
4770
4781
|
var ct, Rt, Ft, oi = { exports: {} }, Mt = { exports: {} }, yi = { exports: {} }, ii = (function() {
|
|
4771
4782
|
if (Ft) return oi.exports;
|
|
@@ -5219,7 +5230,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5219
5230
|
}
|
|
5220
5231
|
class aa {
|
|
5221
5232
|
constructor(e) {
|
|
5222
|
-
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new G(), this.indexArray = new de(), this.segments = new
|
|
5233
|
+
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new G(), this.indexArray = new de(), this.segments = new Ie(), this.programConfigurations = new Ir(e.layers, e.zoom), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
|
|
5223
5234
|
}
|
|
5224
5235
|
populate(e, i, s) {
|
|
5225
5236
|
const o = this.layers[0], l = [];
|
|
@@ -5366,7 +5377,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5366
5377
|
}
|
|
5367
5378
|
function fu(r, e, i, s, o) {
|
|
5368
5379
|
if (!e[0] && !e[1]) return r;
|
|
5369
|
-
const l =
|
|
5380
|
+
const l = pe.convert(e)._mult(o);
|
|
5370
5381
|
i === "viewport" && l._rotate(-s);
|
|
5371
5382
|
const u = [];
|
|
5372
5383
|
for (const p of r) u.push(p.sub(l));
|
|
@@ -5400,7 +5411,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5400
5411
|
}
|
|
5401
5412
|
function gh(r, e, i, s) {
|
|
5402
5413
|
const o = e.projectTileCoordinates(r.x, r.y, i, s).point;
|
|
5403
|
-
return new
|
|
5414
|
+
return new pe((0.5 * o.x + 0.5) * e.width, (0.5 * -o.y + 0.5) * e.height);
|
|
5404
5415
|
}
|
|
5405
5416
|
let Ad, Dd;
|
|
5406
5417
|
Me("CircleBucket", aa, { omit: ["layers"] });
|
|
@@ -6147,7 +6158,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6147
6158
|
const s = r[0], o = r[r.length - 1], l = i && (s.x !== o.x || s.y !== o.y);
|
|
6148
6159
|
if (e < 2) return l ? [...r, r[0]] : [...r];
|
|
6149
6160
|
const u = Math.floor(Fe / e), p = [];
|
|
6150
|
-
p.push(new
|
|
6161
|
+
p.push(new pe(r[0].x, r[0].y));
|
|
6151
6162
|
const g = r.length, m = l ? g : g - 1;
|
|
6152
6163
|
for (let v = 0; v < m; v++) {
|
|
6153
6164
|
const _ = r[v], T = v < g - 1 ? r[v + 1] : r[0], b = _.x, I = _.y, M = T.x, A = T.y, D = b !== M, L = I !== A;
|
|
@@ -6159,15 +6170,15 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6159
6170
|
if ((re <= ce || !D) && (_e <= se || !L)) break;
|
|
6160
6171
|
if (Te < be && D || !L) {
|
|
6161
6172
|
Y = ie, J += F * Te;
|
|
6162
|
-
const ye = new
|
|
6173
|
+
const ye = new pe(Y, Math.round(J));
|
|
6163
6174
|
p[p.length - 1].x === ye.x && p[p.length - 1].y === ye.y || p.push(ye);
|
|
6164
6175
|
} else {
|
|
6165
6176
|
Y += k * be, J = le;
|
|
6166
|
-
const ye = new
|
|
6177
|
+
const ye = new pe(Math.round(Y), J);
|
|
6167
6178
|
p[p.length - 1].x === ye.x && p[p.length - 1].y === ye.y || p.push(ye);
|
|
6168
6179
|
}
|
|
6169
6180
|
}
|
|
6170
|
-
const ne = new
|
|
6181
|
+
const ne = new pe(M, A);
|
|
6171
6182
|
p[p.length - 1].x === ne.x && p[p.length - 1].y === ne.y || p.push(ne);
|
|
6172
6183
|
}
|
|
6173
6184
|
return p;
|
|
@@ -6202,7 +6213,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6202
6213
|
}
|
|
6203
6214
|
function Hd(r, e, i, s, o, l, u, p, g) {
|
|
6204
6215
|
const m = o.length / 2, v = u && p && g;
|
|
6205
|
-
if (m <
|
|
6216
|
+
if (m < Ie.MAX_VERTEX_ARRAY_LENGTH) {
|
|
6206
6217
|
const _ = e.prepareSegment(m, i, s), T = _.vertexLength;
|
|
6207
6218
|
for (let M = 0; M < l.length; M += 3) s.emplaceBack(T + l[M], T + l[M + 1], T + l[M + 2]);
|
|
6208
6219
|
let b, I;
|
|
@@ -6220,7 +6231,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6220
6231
|
for (let j = 2; j < M.length; j += 3) {
|
|
6221
6232
|
const Y = M[j - 2], J = M[j - 1], ne = M[j];
|
|
6222
6233
|
let ie = D[Y] < k, le = D[J] < k, ce = D[ne] < k;
|
|
6223
|
-
F.vertexLength + ((ie ? 1 : 0) + (le ? 1 : 0) + (ce ? 1 : 0)) >
|
|
6234
|
+
F.vertexLength + ((ie ? 1 : 0) + (le ? 1 : 0) + (ce ? 1 : 0)) > Ie.MAX_VERTEX_ARRAY_LENGTH && (F = _.createNewSegment(T, b), k = L.count, ie = !0, le = !0, ce = !0, O = 0);
|
|
6224
6235
|
const se = Wl(D, I, A, L, Y, ie, F), re = Wl(D, I, A, L, J, le, F), _e = Wl(D, I, A, L, ne, ce, F);
|
|
6225
6236
|
b.emplaceBack(O + se - k, O + re - k, O + _e - k), F.primitiveLength++;
|
|
6226
6237
|
}
|
|
@@ -6232,7 +6243,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6232
6243
|
for (const j of M) for (let Y = 1; Y < j.length; Y += 2) {
|
|
6233
6244
|
const J = j[Y - 1], ne = j[Y];
|
|
6234
6245
|
let ie = D[J] < k, le = D[ne] < k;
|
|
6235
|
-
F.vertexLength + ((ie ? 1 : 0) + (le ? 1 : 0)) >
|
|
6246
|
+
F.vertexLength + ((ie ? 1 : 0) + (le ? 1 : 0)) > Ie.MAX_VERTEX_ARRAY_LENGTH && (F = _.createNewSegment(T, b), k = L.count, ie = !0, le = !0, O = 0);
|
|
6236
6247
|
const ce = Wl(D, I, A, L, J, ie, F), se = Wl(D, I, A, L, ne, le, F);
|
|
6237
6248
|
b.emplaceBack(O + ce - k, O + se - k), F.primitiveLength++;
|
|
6238
6249
|
}
|
|
@@ -6247,7 +6258,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6247
6258
|
}
|
|
6248
6259
|
class Sh {
|
|
6249
6260
|
constructor(e) {
|
|
6250
|
-
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.patternFeatures = [], this.layoutVertexArray = new N(), this.indexArray = new de(), this.indexArray2 = new Ce(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new
|
|
6261
|
+
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.patternFeatures = [], this.layoutVertexArray = new N(), this.indexArray = new de(), this.indexArray2 = new Ce(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new Ie(), this.segments2 = new Ie(), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
|
|
6251
6262
|
}
|
|
6252
6263
|
populate(e, i, s) {
|
|
6253
6264
|
this.hasDependencies = mu("fill", this.layers, i);
|
|
@@ -6340,7 +6351,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6340
6351
|
const m = e.readVarint();
|
|
6341
6352
|
l = 7 & m, u = m >> 3;
|
|
6342
6353
|
}
|
|
6343
|
-
if (u--, l === 1 || l === 2) p += e.readSVarint(), g += e.readSVarint(), l === 1 && (o && s.push(o), o = []), o && o.push(new
|
|
6354
|
+
if (u--, l === 1 || l === 2) p += e.readSVarint(), g += e.readSVarint(), l === 1 && (o && s.push(o), o = []), o && o.push(new pe(p, g));
|
|
6344
6355
|
else {
|
|
6345
6356
|
if (l !== 7) throw new Error(`unknown command ${l}`);
|
|
6346
6357
|
o && o.push(o[0].clone());
|
|
@@ -6458,7 +6469,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6458
6469
|
}
|
|
6459
6470
|
class Ih {
|
|
6460
6471
|
constructor(e) {
|
|
6461
|
-
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new $(), this.centroidVertexArray = new V(), this.indexArray = new de(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new
|
|
6472
|
+
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new $(), this.centroidVertexArray = new V(), this.indexArray = new de(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new Ie(), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
|
|
6462
6473
|
}
|
|
6463
6474
|
populate(e, i, s) {
|
|
6464
6475
|
this.features = [], this.hasDependencies = mu("fill-extrusion", this.layers, i);
|
|
@@ -6519,7 +6530,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6519
6530
|
for (let o = 1; o < e.length; o++) {
|
|
6520
6531
|
const l = e[o], u = e[o - 1];
|
|
6521
6532
|
if (Um(l, u)) continue;
|
|
6522
|
-
i.segment.vertexLength + 4 >
|
|
6533
|
+
i.segment.vertexLength + 4 > Ie.MAX_VERTEX_ARRAY_LENGTH && (i.segment = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray));
|
|
6523
6534
|
const p = l.sub(u)._perp()._unit(), g = u.dist(l);
|
|
6524
6535
|
s + g > 32768 && (s = 0), Xl(this.layoutVertexArray, l.x, l.y, p.x, p.y, 0, 0, s), Xl(this.layoutVertexArray, l.x, l.y, p.x, p.y, 0, 1, s), s += g, Xl(this.layoutVertexArray, u.x, u.y, p.x, p.y, 0, 0, s), Xl(this.layoutVertexArray, u.x, u.y, p.x, p.y, 0, 1, s);
|
|
6525
6536
|
const m = i.segment.vertexLength;
|
|
@@ -6562,7 +6573,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6562
6573
|
const M = [];
|
|
6563
6574
|
for (const A of b) {
|
|
6564
6575
|
const D = [A.x, A.y, 0, 1];
|
|
6565
|
-
Ke(D, D, I), M.push(new
|
|
6576
|
+
Ke(D, D, I), M.push(new pe(D[0] / D[3], D[1] / D[3]));
|
|
6566
6577
|
}
|
|
6567
6578
|
return M;
|
|
6568
6579
|
})(g, p), T = (function(b, I, M, A) {
|
|
@@ -6570,9 +6581,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6570
6581
|
for (const le of b) {
|
|
6571
6582
|
const ce = [], se = [];
|
|
6572
6583
|
for (const re of le) {
|
|
6573
|
-
const _e = re.x, Te = re.y, be = A[0] * _e + A[4] * Te + A[12], ye = A[1] * _e + A[5] * Te + A[13], Le = A[2] * _e + A[6] * Te + A[14], tt = A[3] * _e + A[7] * Te + A[15], rt = Le + O, lt = tt + j, hi = be + Y, Et = ye + J, Ut = Le + ne, Ht = tt + ie, yt = new
|
|
6584
|
+
const _e = re.x, Te = re.y, be = A[0] * _e + A[4] * Te + A[12], ye = A[1] * _e + A[5] * Te + A[13], Le = A[2] * _e + A[6] * Te + A[14], tt = A[3] * _e + A[7] * Te + A[15], rt = Le + O, lt = tt + j, hi = be + Y, Et = ye + J, Ut = Le + ne, Ht = tt + ie, yt = new pe((be + k) / lt, (ye + F) / lt);
|
|
6574
6585
|
yt.z = rt / lt, ce.push(yt);
|
|
6575
|
-
const ni = new
|
|
6586
|
+
const ni = new pe(hi / Ht, Et / Ht);
|
|
6576
6587
|
ni.z = Ut / Ht, se.push(ni);
|
|
6577
6588
|
}
|
|
6578
6589
|
D.push(ce), L.push(se);
|
|
@@ -7412,7 +7423,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7412
7423
|
constructor(e) {
|
|
7413
7424
|
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.patternFeatures = [], this.lineClipsArray = [], this.gradients = {};
|
|
7414
7425
|
for (const i of this.layers) this.gradients[i.id] = {};
|
|
7415
|
-
this.layoutVertexArray = new X(), this.layoutVertexArray2 = new Z(), this.indexArray = new de(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new
|
|
7426
|
+
this.layoutVertexArray = new X(), this.layoutVertexArray2 = new Z(), this.indexArray = new de(), this.programConfigurations = new Ir(e.layers, e.zoom), this.segments = new Ie(), this.maxLineLength = 0, this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
|
|
7416
7427
|
}
|
|
7417
7428
|
populate(e, i, s) {
|
|
7418
7429
|
this.hasDependencies = mu("line", this.layers, i) || this.hasLineDasharray(this.layers);
|
|
@@ -7604,7 +7615,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7604
7615
|
for (const b of v) {
|
|
7605
7616
|
const I = sm(b), M = [];
|
|
7606
7617
|
for (let A = 0; A < I.length; A++) {
|
|
7607
|
-
const D = I[A], L = I[A - 1], k = I[A + 1], F = A === 0 ? new
|
|
7618
|
+
const D = I[A], L = I[A - 1], k = I[A + 1], F = A === 0 ? new pe(0, 0) : D.sub(L)._unit()._perp(), O = A === I.length - 1 ? new pe(0, 0) : k.sub(D)._unit()._perp(), j = F._add(O)._unit(), Y = j.x * O.x + j.y * O.y;
|
|
7608
7619
|
Y !== 0 && j._mult(1 / Y), M.push(j._mult(_)._add(D));
|
|
7609
7620
|
}
|
|
7610
7621
|
T.push(M);
|
|
@@ -8401,7 +8412,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8401
8412
|
}
|
|
8402
8413
|
class Hh {
|
|
8403
8414
|
constructor(e) {
|
|
8404
|
-
this.layoutVertexArray = new q(), this.indexArray = new de(), this.programConfigurations = e, this.segments = new
|
|
8415
|
+
this.layoutVertexArray = new q(), this.indexArray = new de(), this.programConfigurations = e, this.segments = new Ie(), this.dynamicLayoutVertexArray = new ee(), this.opacityVertexArray = new oe(), this.hasVisibleVertices = !1, this.placedSymbolArray = new y();
|
|
8405
8416
|
}
|
|
8406
8417
|
isEmpty() {
|
|
8407
8418
|
return this.layoutVertexArray.length === 0 && this.indexArray.length === 0 && this.dynamicLayoutVertexArray.length === 0 && this.opacityVertexArray.length === 0;
|
|
@@ -8416,7 +8427,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8416
8427
|
Me("SymbolBuffers", Hh);
|
|
8417
8428
|
class Xh {
|
|
8418
8429
|
constructor(e, i, s) {
|
|
8419
|
-
this.layoutVertexArray = new e(), this.layoutAttributes = i, this.indexArray = new s(), this.segments = new
|
|
8430
|
+
this.layoutVertexArray = new e(), this.layoutAttributes = i, this.indexArray = new s(), this.segments = new Ie(), this.collisionVertexArray = new me();
|
|
8420
8431
|
}
|
|
8421
8432
|
upload(e) {
|
|
8422
8433
|
this.layoutVertexBuffer = e.createVertexBuffer(this.layoutVertexArray, this.layoutAttributes), this.indexBuffer = e.createIndexBuffer(this.indexArray), this.collisionVertexBuffer = e.createVertexBuffer(this.collisionVertexArray, vg.members, !0);
|
|
@@ -8550,7 +8561,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8550
8561
|
}
|
|
8551
8562
|
addCollisionDebugVertices(e, i, s, o, l, u, p) {
|
|
8552
8563
|
const g = l.segments.prepareSegment(4, l.layoutVertexArray, l.indexArray), m = g.vertexLength, v = l.layoutVertexArray, _ = l.collisionVertexArray, T = p.anchorX, b = p.anchorY;
|
|
8553
|
-
this._addCollisionDebugVertex(v, _, u, T, b, new
|
|
8564
|
+
this._addCollisionDebugVertex(v, _, u, T, b, new pe(e, i)), this._addCollisionDebugVertex(v, _, u, T, b, new pe(s, i)), this._addCollisionDebugVertex(v, _, u, T, b, new pe(s, o)), this._addCollisionDebugVertex(v, _, u, T, b, new pe(e, o)), g.vertexLength += 4;
|
|
8554
8565
|
const I = l.indexArray;
|
|
8555
8566
|
I.emplaceBack(m, m + 1), I.emplaceBack(m + 1, m + 2), I.emplaceBack(m + 2, m + 3), I.emplaceBack(m + 3, m), g.primitiveLength += 4;
|
|
8556
8567
|
}
|
|
@@ -8885,7 +8896,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8885
8896
|
}
|
|
8886
8897
|
getTilePoint(e) {
|
|
8887
8898
|
const i = Math.pow(2, this.z);
|
|
8888
|
-
return new
|
|
8899
|
+
return new pe((e.x * i - this.x) * Fe, (e.y * i - this.y) * Fe);
|
|
8889
8900
|
}
|
|
8890
8901
|
toString() {
|
|
8891
8902
|
return `${this.z}/${this.x}/${this.y}`;
|
|
@@ -8981,7 +8992,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
8981
8992
|
}
|
|
8982
8993
|
map(e) {
|
|
8983
8994
|
const i = new ao();
|
|
8984
|
-
return i.extend(e(new
|
|
8995
|
+
return i.extend(e(new pe(this.minX, this.minY))), i.extend(e(new pe(this.maxX, this.minY))), i.extend(e(new pe(this.minX, this.maxY))), i.extend(e(new pe(this.maxX, this.maxY))), i;
|
|
8985
8996
|
}
|
|
8986
8997
|
static fromPoints(e) {
|
|
8987
8998
|
const i = new ao();
|
|
@@ -9999,21 +10010,21 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9999
10010
|
const b = new Array(_ ? v + 1 : v);
|
|
10000
10011
|
for (let I = 0; I < v; I++) {
|
|
10001
10012
|
const M = dd(p[g[m + I]], T.numBits, T.coordinateShift);
|
|
10002
|
-
b[I] = new
|
|
10013
|
+
b[I] = new pe(M.x, M.y);
|
|
10003
10014
|
}
|
|
10004
10015
|
return _ && (b[b.length - 1] = b[0]), b;
|
|
10005
10016
|
})(e, i, s, o, l, u) : (function(p, g, m, v, _) {
|
|
10006
10017
|
const T = new Array(_ ? v + 1 : v);
|
|
10007
10018
|
for (let b = 0; b < 2 * v; b += 2) {
|
|
10008
10019
|
const I = 2 * g[m + b / 2];
|
|
10009
|
-
T[b / 2] = new
|
|
10020
|
+
T[b / 2] = new pe(p[I], p[I + 1]);
|
|
10010
10021
|
}
|
|
10011
10022
|
return _ && (T[T.length - 1] = T[0]), T;
|
|
10012
10023
|
})(e, i, s, o, l);
|
|
10013
10024
|
}
|
|
10014
10025
|
function Ma(r, e, i, s) {
|
|
10015
10026
|
const o = new Array(s ? i + 1 : i);
|
|
10016
|
-
for (let l = 0; l < 2 * i; l += 2) o[l / 2] = new
|
|
10027
|
+
for (let l = 0; l < 2 * i; l += 2) o[l / 2] = new pe(r[e + l], r[e + l + 1]);
|
|
10017
10028
|
return s && (o[o.length - 1] = o[0]), o;
|
|
10018
10029
|
}
|
|
10019
10030
|
(function(r) {
|
|
@@ -10068,7 +10079,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10068
10079
|
const O = 2 * I[g++];
|
|
10069
10080
|
k = D[O], F = D[O + 1];
|
|
10070
10081
|
}
|
|
10071
|
-
i[u++] = [[new
|
|
10082
|
+
i[u++] = [[new pe(k, F)]], _ && l++, T && s++, b && o++;
|
|
10072
10083
|
}
|
|
10073
10084
|
break;
|
|
10074
10085
|
case Wt.MULTIPOINT:
|
|
@@ -10078,11 +10089,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10078
10089
|
const F = new Array(k);
|
|
10079
10090
|
if (M) for (let O = 0; O < k; O++) {
|
|
10080
10091
|
const j = D[p++], Y = D[p++];
|
|
10081
|
-
F[O] = new
|
|
10092
|
+
F[O] = new pe(j, Y);
|
|
10082
10093
|
}
|
|
10083
10094
|
else for (let O = 0; O < k; O++) {
|
|
10084
10095
|
const j = 2 * I[g++];
|
|
10085
|
-
F[O] = new
|
|
10096
|
+
F[O] = new pe(D[j], D[j + 1]);
|
|
10086
10097
|
}
|
|
10087
10098
|
i[u++] = F.map(((O) => [O])), s += k, o += k;
|
|
10088
10099
|
}
|
|
@@ -10222,7 +10233,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10222
10233
|
const M = [];
|
|
10223
10234
|
for (let A = 0; A < I; A++) {
|
|
10224
10235
|
const D = this._vertexBuffer[u++], L = this._vertexBuffer[u++];
|
|
10225
|
-
M.push(new
|
|
10236
|
+
M.push(new pe(D, L));
|
|
10226
10237
|
}
|
|
10227
10238
|
M.length > 0 && M.push(M[0]), T.push(M);
|
|
10228
10239
|
}
|
|
@@ -10242,7 +10253,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10242
10253
|
const D = [];
|
|
10243
10254
|
for (let L = 0; L < A; L++) {
|
|
10244
10255
|
const k = this._vertexBuffer[u++], F = this._vertexBuffer[u++];
|
|
10245
|
-
D.push(new
|
|
10256
|
+
D.push(new pe(k, F));
|
|
10246
10257
|
}
|
|
10247
10258
|
D.length > 0 && D.push(D[0]), T.push(D);
|
|
10248
10259
|
}
|
|
@@ -10968,7 +10979,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10968
10979
|
const e = [];
|
|
10969
10980
|
for (const i of this._featureData.geometry.coordinates) {
|
|
10970
10981
|
const s = [];
|
|
10971
|
-
for (const o of i) s.push(new
|
|
10982
|
+
for (const o of i) s.push(new pe(o.x, o.y));
|
|
10972
10983
|
e.push(s);
|
|
10973
10984
|
}
|
|
10974
10985
|
return e;
|
|
@@ -11040,7 +11051,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11040
11051
|
const e = [], i = this.feature.type === 1 ? [this.feature.geometry] : this.feature.geometry;
|
|
11041
11052
|
for (const s of i) {
|
|
11042
11053
|
const o = [];
|
|
11043
|
-
for (const l of s) o.push(new
|
|
11054
|
+
for (const l of s) o.push(new pe(l[0], l[1]));
|
|
11044
11055
|
e.push(o);
|
|
11045
11056
|
}
|
|
11046
11057
|
return e;
|
|
@@ -11117,7 +11128,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11117
11128
|
this.loadVTLayers();
|
|
11118
11129
|
const l = e.params, u = Fe / e.tileSize / e.scale, p = js(l.filter, l.globalState), g = e.queryGeometry, m = e.queryPadding * u, v = ao.fromPoints(g), _ = this.grid.query(v.minX - m, v.minY - m, v.maxX + m, v.maxY + m), T = ao.fromPoints(e.cameraQueryGeometry).expandBy(m), b = this.grid3D.query(T.minX, T.minY, T.maxX, T.maxY, ((A, D, L, k) => (function(F, O, j, Y, J) {
|
|
11119
11130
|
for (const ie of F) if (O <= ie.x && j <= ie.y && Y >= ie.x && J >= ie.y) return !0;
|
|
11120
|
-
const ne = [new
|
|
11131
|
+
const ne = [new pe(O, j), new pe(O, J), new pe(Y, J), new pe(Y, j)];
|
|
11121
11132
|
if (F.length > 2) {
|
|
11122
11133
|
for (const ie of ne) if (ca(F, ie)) return !0;
|
|
11123
11134
|
}
|
|
@@ -11194,7 +11205,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11194
11205
|
let p;
|
|
11195
11206
|
for (let g = 0; g < u.length - 1; g++) {
|
|
11196
11207
|
let m = u[g], v = u[g + 1];
|
|
11197
|
-
m.x < e && v.x < e || (m.x < e ? m = new
|
|
11208
|
+
m.x < e && v.x < e || (m.x < e ? m = new pe(e, m.y + (e - m.x) / (v.x - m.x) * (v.y - m.y))._round() : v.x < e && (v = new pe(e, m.y + (e - m.x) / (v.x - m.x) * (v.y - m.y))._round()), m.y < i && v.y < i || (m.y < i ? m = new pe(m.x + (i - m.y) / (v.y - m.y) * (v.x - m.x), i)._round() : v.y < i && (v = new pe(m.x + (i - m.y) / (v.y - m.y) * (v.x - m.x), i)._round()), m.x >= s && v.x >= s || (m.x >= s ? m = new pe(s, m.y + (s - m.x) / (v.x - m.x) * (v.y - m.y))._round() : v.x >= s && (v = new pe(s, m.y + (s - m.x) / (v.x - m.x) * (v.y - m.y))._round()), m.y >= o && v.y >= o || (m.y >= o ? m = new pe(m.x + (o - m.y) / (v.y - m.y) * (v.x - m.x), o)._round() : v.y >= o && (v = new pe(m.x + (o - m.y) / (v.y - m.y) * (v.x - m.x), o)._round()), p && m.equals(p[p.length - 1]) || (p = [m], l.push(p)), p.push(v)))));
|
|
11198
11209
|
}
|
|
11199
11210
|
}
|
|
11200
11211
|
return l;
|
|
@@ -11227,7 +11238,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11227
11238
|
b < e ? I > e && u.push(l(_, T, e)) : b > i ? I < i && u.push(l(_, T, i)) : u.push(_), I < e && b >= e && (u.push(l(_, T, e)), M = !0), I > i && b <= i && (u.push(l(_, T, i)), M = !0), !o && M && (p.push(u), u = []);
|
|
11228
11239
|
}
|
|
11229
11240
|
const g = r.length - 1, m = s === 0 ? r[g].x : r[g].y;
|
|
11230
|
-
return m >= e && m <= i && u.push(r[g]), o && u.length > 0 && !u[0].equals(u[u.length - 1]) && u.push(new
|
|
11241
|
+
return m >= e && m <= i && u.push(r[g]), o && u.length > 0 && !u[0].equals(u[u.length - 1]) && u.push(new pe(u[0].x, u[0].y)), u.length > 0 && p.push(u), p;
|
|
11231
11242
|
}
|
|
11232
11243
|
function Af(r, e, i, s, o) {
|
|
11233
11244
|
const l = [];
|
|
@@ -11238,13 +11249,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11238
11249
|
return l;
|
|
11239
11250
|
}
|
|
11240
11251
|
function A_(r, e, i) {
|
|
11241
|
-
return new
|
|
11252
|
+
return new pe(i, r.y + (i - r.x) / (e.x - r.x) * (e.y - r.y));
|
|
11242
11253
|
}
|
|
11243
11254
|
function D_(r, e, i) {
|
|
11244
|
-
return new
|
|
11255
|
+
return new pe(r.x + (i - r.y) / (e.y - r.y) * (e.x - r.x), i);
|
|
11245
11256
|
}
|
|
11246
11257
|
Me("FeatureIndex", If, { omit: ["rawTileData", "sourceLayerCoder"] });
|
|
11247
|
-
class ms extends
|
|
11258
|
+
class ms extends pe {
|
|
11248
11259
|
constructor(e, i, s, o) {
|
|
11249
11260
|
super(e, i), this.angle = s, o !== void 0 && (this.segment = o);
|
|
11250
11261
|
}
|
|
@@ -11327,7 +11338,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11327
11338
|
(l.textFitWidth || l.textFitHeight) && (m = Dp(r)), D = zu(v, 0, re[0]), k = zu(_, 0, re[1]), L = zu(v, re[0], re[2]), F = zu(_, re[1], re[3]), O = re[0] - D, Y = re[1] - k, j = _e - L, J = Te - F;
|
|
11328
11339
|
}
|
|
11329
11340
|
const ne = m.x1, ie = m.y1, le = m.x2 - ne, ce = m.y2 - ie, se = (re, _e, Te, be) => {
|
|
11330
|
-
const ye = ku(re.stretch - D, L, le, ne), Le = Ru(re.fixed - O, j, re.stretch, b), tt = ku(_e.stretch - k, F, ce, ie), rt = Ru(_e.fixed - Y, J, _e.stretch, I), lt = ku(Te.stretch - D, L, le, ne), hi = Ru(Te.fixed - O, j, Te.stretch, b), Et = ku(be.stretch - k, F, ce, ie), Ut = Ru(be.fixed - Y, J, be.stretch, I), Ht = new
|
|
11341
|
+
const ye = ku(re.stretch - D, L, le, ne), Le = Ru(re.fixed - O, j, re.stretch, b), tt = ku(_e.stretch - k, F, ce, ie), rt = Ru(_e.fixed - Y, J, _e.stretch, I), lt = ku(Te.stretch - D, L, le, ne), hi = Ru(Te.fixed - O, j, Te.stretch, b), Et = ku(be.stretch - k, F, ce, ie), Ut = Ru(be.fixed - Y, J, be.stretch, I), Ht = new pe(ye, tt), yt = new pe(lt, tt), ni = new pe(lt, Et), bi = new pe(ye, Et), wi = new pe(Le / u, rt / u), ji = new pe(hi / u, Ut / u), di = e * Math.PI / 180;
|
|
11331
11342
|
if (di) {
|
|
11332
11343
|
const Xt = Math.sin(di), Tt = Math.cos(di), Ot = [Tt, -Xt, Xt, Tt];
|
|
11333
11344
|
Ht._matMult(Ot), yt._matMult(Ot), bi._matMult(Ot), ni._matMult(Ot);
|
|
@@ -11378,7 +11389,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11378
11389
|
T.y1 = T.y1 * p - g[0], T.y2 = T.y2 * p + g[2], T.x1 = T.x1 * p - g[3], T.x2 = T.x2 * p + g[1];
|
|
11379
11390
|
const b = u.collisionPadding;
|
|
11380
11391
|
if (b && (T.x1 -= b[0] * p, T.y1 -= b[1] * p, T.x2 += b[2] * p, T.y2 += b[3] * p), v) {
|
|
11381
|
-
const I = new
|
|
11392
|
+
const I = new pe(T.x1, T.y1), M = new pe(T.x2, T.y1), A = new pe(T.x1, T.y2), D = new pe(T.x2, T.y2), L = v * Math.PI / 180;
|
|
11382
11393
|
I._rotate(L), M._rotate(L), A._rotate(L), D._rotate(L), T.x1 = Math.min(I.x, M.x, A.x, D.x), T.x2 = Math.max(I.x, M.x, A.x, D.x), T.y1 = Math.min(I.y, M.y, A.y, D.y), T.y2 = Math.max(I.y, M.y, A.y, D.y);
|
|
11383
11394
|
}
|
|
11384
11395
|
e.emplaceBack(i.x, i.y, T.x1, T.y1, T.x2, T.y2, s, o, l);
|
|
@@ -11425,7 +11436,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11425
11436
|
const i = ao.fromPoints(r[0]), s = Math.min(i.width(), i.height());
|
|
11426
11437
|
let o = s / 2;
|
|
11427
11438
|
const l = new R_([], F_), { minX: u, minY: p, maxX: g, maxY: m } = i;
|
|
11428
|
-
if (s === 0) return new
|
|
11439
|
+
if (s === 0) return new pe(u, p);
|
|
11429
11440
|
for (let T = u; T < g; T += s) for (let b = p; b < m; b += s) l.push(new Ca(T + o, b + o, o, r));
|
|
11430
11441
|
const v = (function(T) {
|
|
11431
11442
|
let b = 0, I = 0, M = 0;
|
|
@@ -11448,7 +11459,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11448
11459
|
}
|
|
11449
11460
|
class Ca {
|
|
11450
11461
|
constructor(e, i, s, o) {
|
|
11451
|
-
this.p = new
|
|
11462
|
+
this.p = new pe(e, i), this.h = s, this.d = (function(l, u) {
|
|
11452
11463
|
let p = !1, g = 1 / 0;
|
|
11453
11464
|
for (const m of u) for (let v = 0, _ = m.length, T = _ - 1; v < _; T = v++) {
|
|
11454
11465
|
const b = m[v], I = m[T];
|
|
@@ -11647,16 +11658,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11647
11658
|
const rt = j ? [se.x + tt, se.y] : [0, 0];
|
|
11648
11659
|
let lt = j ? [0, 0] : [se.x + tt + F[0], se.y + F[1] - ye], hi = [0, 0];
|
|
11649
11660
|
Le && (hi = lt, lt = [0, 0]);
|
|
11650
|
-
const Et = se.metrics.isDoubleResolution ? 2 : 1, Ut = (se.metrics.left - _e) * se.scale - tt + lt[0], Ht = (-se.metrics.top - _e) * se.scale + lt[1], yt = Ut + re.w / Et * se.scale / be, ni = Ht + re.h / Et * se.scale / be, bi = new
|
|
11661
|
+
const Et = se.metrics.isDoubleResolution ? 2 : 1, Ut = (se.metrics.left - _e) * se.scale - tt + lt[0], Ht = (-se.metrics.top - _e) * se.scale + lt[1], yt = Ut + re.w / Et * se.scale / be, ni = Ht + re.h / Et * se.scale / be, bi = new pe(Ut, Ht), wi = new pe(yt, Ht), ji = new pe(Ut, ni), di = new pe(yt, ni);
|
|
11651
11662
|
if (Le) {
|
|
11652
|
-
const Xt = new
|
|
11663
|
+
const Xt = new pe(-tt, tt - -17), Tt = -Math.PI / 2, Ot = 12 - tt, Ct = new pe(22 - Ot, -(se.imageName ? Ot : 0)), Yt = new pe(...hi);
|
|
11653
11664
|
bi._rotateAround(Tt, Xt)._add(Ct)._add(Yt), wi._rotateAround(Tt, Xt)._add(Ct)._add(Yt), ji._rotateAround(Tt, Xt)._add(Ct)._add(Yt), di._rotateAround(Tt, Xt)._add(Ct)._add(Yt);
|
|
11654
11665
|
}
|
|
11655
11666
|
if (ie) {
|
|
11656
11667
|
const Xt = Math.sin(ie), Tt = Math.cos(ie), Ot = [Tt, -Xt, Xt, Tt];
|
|
11657
11668
|
bi._matMult(Ot), wi._matMult(Ot), ji._matMult(Ot), di._matMult(Ot);
|
|
11658
11669
|
}
|
|
11659
|
-
const Ni = new
|
|
11670
|
+
const Ni = new pe(0, 0), mr = new pe(0, 0);
|
|
11660
11671
|
le.push({ tl: bi, tr: wi, bl: ji, br: di, tex: re, writingMode: k.writingMode, glyphOffset: rt, sectionIndex: se.sectionIndex, isSDF: Te, pixelOffsetTL: Ni, pixelOffsetBR: mr, minFontScaleX: 0, minFontScaleY: 0 });
|
|
11661
11672
|
}
|
|
11662
11673
|
return le;
|
|
@@ -11758,7 +11769,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11758
11769
|
}, R.O = function() {
|
|
11759
11770
|
var r = new jt(16);
|
|
11760
11771
|
return jt != Float32Array && (r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 0, r[6] = 0, r[7] = 0, r[8] = 0, r[9] = 0, r[11] = 0, r[12] = 0, r[13] = 0, r[14] = 0), r[0] = 1, r[5] = 1, r[10] = 1, r[15] = 1, r;
|
|
11761
|
-
}, R.P =
|
|
11772
|
+
}, R.P = pe, R.Q = function(r, e, i) {
|
|
11762
11773
|
var s, o, l, u, p, g, m, v, _, T, b, I, M = i[0], A = i[1], D = i[2];
|
|
11763
11774
|
return e === r ? (r[12] = e[0] * M + e[4] * A + e[8] * D + e[12], r[13] = e[1] * M + e[5] * A + e[9] * D + e[13], r[14] = e[2] * M + e[6] * A + e[10] * D + e[14], r[15] = e[3] * M + e[7] * A + e[11] * D + e[15]) : (o = e[1], l = e[2], u = e[3], p = e[4], g = e[5], m = e[6], v = e[7], _ = e[8], T = e[9], b = e[10], I = e[11], r[0] = s = e[0], r[1] = o, r[2] = l, r[3] = u, r[4] = p, r[5] = g, r[6] = m, r[7] = v, r[8] = _, r[9] = T, r[10] = b, r[11] = I, r[12] = s * M + p * A + _ * D + e[12], r[13] = o * M + g * A + T * D + e[13], r[14] = l * M + m * A + b * D + e[14], r[15] = u * M + v * A + I * D + e[15]), r;
|
|
11764
11775
|
}, R.R = Vi, R.S = function(r, e, i) {
|
|
@@ -11785,7 +11796,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11785
11796
|
const o = e.y - r.y, l = e.x - r.x, u = s.y - i.y, p = s.x - i.x, g = u * l - p * o;
|
|
11786
11797
|
if (g === 0) return null;
|
|
11787
11798
|
const m = (p * (r.y - i.y) - u * (r.x - i.x)) / g;
|
|
11788
|
-
return new
|
|
11799
|
+
return new pe(r.x + m * l, r.y + m * o);
|
|
11789
11800
|
}, R.aG = Ef, R.aH = la, R.aI = function(r) {
|
|
11790
11801
|
let e = 1 / 0, i = 1 / 0, s = -1 / 0, o = -1 / 0;
|
|
11791
11802
|
for (const l of r) e = Math.min(e, l.x), i = Math.min(i, l.y), s = Math.max(s, l.x), o = Math.max(o, l.y);
|
|
@@ -11798,7 +11809,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11798
11809
|
i = [i[0] * p - i[1] * u, i[0] * u + i[1] * p];
|
|
11799
11810
|
}
|
|
11800
11811
|
return [o ? i[0] : St(e, i[0], r.zoom), o ? i[1] : St(e, i[1], r.zoom)];
|
|
11801
|
-
}, R.aN = qh, R.aO = vd, R.aP = Zh, R.aQ = (r) => r.type === "symbol", R.aR = vu, R.aS = ft, R.aT = yu, R.aU = V, R.aV =
|
|
11812
|
+
}, R.aN = qh, R.aO = vd, R.aP = Zh, R.aQ = (r) => r.type === "symbol", R.aR = vu, R.aS = ft, R.aT = yu, R.aU = V, R.aV = Ie, R.aW = de, R.aX = rn, R.aY = $p, R.aZ = K, R.a_ = W, R.aa = Jh, R.ab = (r) => {
|
|
11802
11813
|
const e = window.document.createElement("video");
|
|
11803
11814
|
return e.muted = !0, new Promise(((i) => {
|
|
11804
11815
|
e.onloadstart = () => {
|
|
@@ -12083,7 +12094,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12083
12094
|
return Ye(s, r, e - 90, i), s;
|
|
12084
12095
|
}, R.bl = function(r, e, i, s) {
|
|
12085
12096
|
var o, l, u, p, g, m = e[0], v = e[1], _ = e[2], T = e[3], b = i[0], I = i[1], M = i[2], A = i[3];
|
|
12086
|
-
return (l = m * b + v * I + _ * M + T * A) < 0 && (l = -l, b = -b, I = -I, M = -M, A = -A), 1 - l >
|
|
12097
|
+
return (l = m * b + v * I + _ * M + T * A) < 0 && (l = -l, b = -b, I = -I, M = -M, A = -A), 1 - l > fe ? (o = Math.acos(l), u = Math.sin(o), p = Math.sin((1 - s) * o) / u, g = Math.sin(s * o) / u) : (p = 1 - s, g = s), r[0] = p * m + g * b, r[1] = p * v + g * I, r[2] = p * _ + g * M, r[3] = p * T + g * A, r;
|
|
12087
12098
|
}, R.bm = function(r) {
|
|
12088
12099
|
const e = new Float64Array(9);
|
|
12089
12100
|
var i, s, o, l, u, p, g, m, v, _, T, b, I, M, A, D, L, k;
|
|
@@ -12296,7 +12307,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12296
12307
|
return r[0] === e[0] && r[1] === e[1] && r[2] === e[2] && r[3] === e[3] && r[4] === e[4] && r[5] === e[5] && r[6] === e[6] && r[7] === e[7] && r[8] === e[8] && r[9] === e[9] && r[10] === e[10] && r[11] === e[11] && r[12] === e[12] && r[13] === e[13] && r[14] === e[14] && r[15] === e[15];
|
|
12297
12308
|
}, R.ck = function(r, e) {
|
|
12298
12309
|
var i = r[0], s = r[1], o = r[2], l = r[3], u = r[4], p = r[5], g = r[6], m = r[7], v = r[8], _ = r[9], T = r[10], b = r[11], I = r[12], M = r[13], A = r[14], D = r[15], L = e[0], k = e[1], F = e[2], O = e[3], j = e[4], Y = e[5], J = e[6], ne = e[7], ie = e[8], le = e[9], ce = e[10], se = e[11], re = e[12], _e = e[13], Te = e[14], be = e[15];
|
|
12299
|
-
return Math.abs(i - L) <=
|
|
12310
|
+
return Math.abs(i - L) <= fe * Math.max(1, Math.abs(i), Math.abs(L)) && Math.abs(s - k) <= fe * Math.max(1, Math.abs(s), Math.abs(k)) && Math.abs(o - F) <= fe * Math.max(1, Math.abs(o), Math.abs(F)) && Math.abs(l - O) <= fe * Math.max(1, Math.abs(l), Math.abs(O)) && Math.abs(u - j) <= fe * Math.max(1, Math.abs(u), Math.abs(j)) && Math.abs(p - Y) <= fe * Math.max(1, Math.abs(p), Math.abs(Y)) && Math.abs(g - J) <= fe * Math.max(1, Math.abs(g), Math.abs(J)) && Math.abs(m - ne) <= fe * Math.max(1, Math.abs(m), Math.abs(ne)) && Math.abs(v - ie) <= fe * Math.max(1, Math.abs(v), Math.abs(ie)) && Math.abs(_ - le) <= fe * Math.max(1, Math.abs(_), Math.abs(le)) && Math.abs(T - ce) <= fe * Math.max(1, Math.abs(T), Math.abs(ce)) && Math.abs(b - se) <= fe * Math.max(1, Math.abs(b), Math.abs(se)) && Math.abs(I - re) <= fe * Math.max(1, Math.abs(I), Math.abs(re)) && Math.abs(M - _e) <= fe * Math.max(1, Math.abs(M), Math.abs(_e)) && Math.abs(A - Te) <= fe * Math.max(1, Math.abs(A), Math.abs(Te)) && Math.abs(D - be) <= fe * Math.max(1, Math.abs(D), Math.abs(be));
|
|
12300
12311
|
}, R.cl = function(r, e) {
|
|
12301
12312
|
return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[4] = e[4], r[5] = e[5], r[6] = e[6], r[7] = e[7], r[8] = e[8], r[9] = e[9], r[10] = e[10], r[11] = e[11], r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15], r;
|
|
12302
12313
|
}, R.cm = (r) => r.type === "circle", R.cn = (r) => r.type === "heatmap", R.co = (r) => r.type === "line", R.cp = (r) => r.type === "fill", R.cq = (r) => r.type === "fill-extrusion", R.cr = (r) => r.type === "hillshade", R.cs = (r) => r.type === "color-relief", R.ct = (r) => r.type === "background", R.cu = (r) => r.type === "custom", R.cv = Qr, R.cw = function(r, e, i) {
|
|
@@ -12433,7 +12444,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12433
12444
|
}
|
|
12434
12445
|
}
|
|
12435
12446
|
}
|
|
12436
|
-
class
|
|
12447
|
+
class pe {
|
|
12437
12448
|
constructor(W) {
|
|
12438
12449
|
const K = {}, te = [];
|
|
12439
12450
|
for (const Be in W) {
|
|
@@ -12458,7 +12469,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12458
12469
|
this.image = Ke, this.positions = K;
|
|
12459
12470
|
}
|
|
12460
12471
|
}
|
|
12461
|
-
R.cK("GlyphAtlas",
|
|
12472
|
+
R.cK("GlyphAtlas", pe);
|
|
12462
12473
|
class mt {
|
|
12463
12474
|
constructor(W) {
|
|
12464
12475
|
this.tileID = new R.a3(W.tileID.overscaledZ, W.tileID.wrap, W.tileID.canonical.z, W.tileID.canonical.x, W.tileID.canonical.y), this.uid = W.uid, this.zoom = W.zoom, this.pixelRatio = W.pixelRatio, this.tileSize = W.tileSize, this.source = W.source, this.overscaling = this.tileID.overscaleFactor(), this.showCollisionBoxes = W.showCollisionBoxes, this.collectResourceTiming = !!W.collectResourceTiming, this.returnDependencies = !!W.returnDependencies, this.promoteId = W.promoteId, this.inFlightDependencies = [];
|
|
@@ -12509,7 +12520,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12509
12520
|
const Oe = new AbortController();
|
|
12510
12521
|
this.inFlightDependencies.push(Oe), vs = ve.sendAsync({ type: "GDA", data: { dashes: Qr } }, Oe);
|
|
12511
12522
|
}
|
|
12512
|
-
const [fi, Rn, $i, xs] = yield Promise.all([St, Qi, zr, vs]), kr = new
|
|
12523
|
+
const [fi, Rn, $i, xs] = yield Promise.all([St, Qi, zr, vs]), kr = new pe(fi), en = new R.cN(Rn, $i);
|
|
12513
12524
|
for (const Oe in Ye) {
|
|
12514
12525
|
const Gt = Ye[Oe];
|
|
12515
12526
|
Gt instanceof R.af ? (Kt(Gt.layers, this.zoom, te), R.cO({ bucket: Gt, glyphMap: fi, glyphPositions: kr.positions, imageMap: Rn, imagePositions: en.iconPositions, showCollisionBoxes: this.showCollisionBoxes, canonical: this.tileID.canonical, subdivisionGranularity: Ue.subdivisionGranularity })) : Gt.hasDependencies && (Gt instanceof R.cP || Gt instanceof R.cQ || Gt instanceof R.cR) && (Kt(Gt.layers, this.zoom, te), Gt.addFeatures(Ue, this.tileID.canonical, en.patternPositions, xs));
|
|
@@ -12609,7 +12620,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12609
12620
|
}
|
|
12610
12621
|
return new Di(Be, Qe.name, te);
|
|
12611
12622
|
}
|
|
12612
|
-
class
|
|
12623
|
+
class fe {
|
|
12613
12624
|
constructor(W, K, te) {
|
|
12614
12625
|
this.actor = W, this.layerIndex = K, this.availableImages = te, this.tileState = new Ui(), this.overzoomedTileResultCache = new R.cU(1e3);
|
|
12615
12626
|
}
|
|
@@ -12939,7 +12950,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12939
12950
|
const Ke = { sendAsync: (Be, Ye) => (Be.targetMapId = W, this.actor.sendAsync(Be, Ye)) };
|
|
12940
12951
|
switch (K) {
|
|
12941
12952
|
case "vector":
|
|
12942
|
-
this.workerSources[W][K][te] = new
|
|
12953
|
+
this.workerSources[W][K][te] = new fe(Ke, this._getLayerIndex(W), this._getAvailableImages(W));
|
|
12943
12954
|
break;
|
|
12944
12955
|
case "geojson":
|
|
12945
12956
|
this.workerSources[W][K][te] = new Jr(Ke, this._getLayerIndex(W), this._getAvailableImages(W));
|
|
@@ -12957,7 +12968,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12957
12968
|
}
|
|
12958
12969
|
return R.i(self) && (self.worker = new ys(self)), ys;
|
|
12959
12970
|
})), ze("index", ["exports", "./shared"], (function(R, h) {
|
|
12960
|
-
var
|
|
12971
|
+
var pe = "5.24.0";
|
|
12961
12972
|
function mt() {
|
|
12962
12973
|
var d = new h.A(4);
|
|
12963
12974
|
return h.A != Float32Array && (d[1] = 0, d[2] = 0), d[0] = 1, d[3] = 1, d;
|
|
@@ -13004,7 +13015,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13004
13015
|
return Di.getCurrentTime();
|
|
13005
13016
|
}
|
|
13006
13017
|
var lr, pi;
|
|
13007
|
-
class
|
|
13018
|
+
class fe {
|
|
13008
13019
|
static create(t, n, a) {
|
|
13009
13020
|
const c = window.document.createElement(t);
|
|
13010
13021
|
return n !== void 0 && (c.className = n), a && a.appendChild(c), c;
|
|
@@ -13013,17 +13024,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13013
13024
|
return window.document.createElementNS(t, n);
|
|
13014
13025
|
}
|
|
13015
13026
|
static disableDrag() {
|
|
13016
|
-
|
|
13027
|
+
fe.docStyle && fe.selectProp && (fe.userSelect = fe.docStyle[fe.selectProp], fe.docStyle[fe.selectProp] = "none");
|
|
13017
13028
|
}
|
|
13018
13029
|
static enableDrag() {
|
|
13019
|
-
|
|
13030
|
+
fe.docStyle && fe.selectProp && (fe.docStyle[fe.selectProp] = fe.userSelect);
|
|
13020
13031
|
}
|
|
13021
13032
|
static suppressClickInternal(t) {
|
|
13022
|
-
t.preventDefault(), t.stopPropagation(), window.removeEventListener("click",
|
|
13033
|
+
t.preventDefault(), t.stopPropagation(), window.removeEventListener("click", fe.suppressClickInternal, !0);
|
|
13023
13034
|
}
|
|
13024
13035
|
static suppressClick() {
|
|
13025
|
-
window.addEventListener("click",
|
|
13026
|
-
window.removeEventListener("click",
|
|
13036
|
+
window.addEventListener("click", fe.suppressClickInternal, !0), window.setTimeout((() => {
|
|
13037
|
+
window.removeEventListener("click", fe.suppressClickInternal, !0);
|
|
13027
13038
|
}), 0);
|
|
13028
13039
|
}
|
|
13029
13040
|
static getScale(t) {
|
|
@@ -13035,18 +13046,18 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13035
13046
|
return new h.P((a.clientX - c.left) / n.x - t.clientLeft, (a.clientY - c.top) / n.y - t.clientTop);
|
|
13036
13047
|
}
|
|
13037
13048
|
static mousePos(t, n) {
|
|
13038
|
-
const a =
|
|
13039
|
-
return
|
|
13049
|
+
const a = fe.getScale(t);
|
|
13050
|
+
return fe.getPoint(t, a, n);
|
|
13040
13051
|
}
|
|
13041
13052
|
static touchPos(t, n) {
|
|
13042
|
-
const a = [], c =
|
|
13043
|
-
for (const f of n) a.push(
|
|
13053
|
+
const a = [], c = fe.getScale(t);
|
|
13054
|
+
for (const f of n) a.push(fe.getPoint(t, c, f));
|
|
13044
13055
|
return a;
|
|
13045
13056
|
}
|
|
13046
13057
|
static sanitize(t) {
|
|
13047
13058
|
const n = new DOMParser().parseFromString(t, "text/html").body || document.createElement("body"), a = n.querySelectorAll("script");
|
|
13048
13059
|
for (const c of a) c.remove();
|
|
13049
|
-
return
|
|
13060
|
+
return fe.clean(n), n.innerHTML;
|
|
13050
13061
|
}
|
|
13051
13062
|
static isPossiblyDangerous(t, n) {
|
|
13052
13063
|
const a = n.replace(/\s+/g, "").toLowerCase();
|
|
@@ -13054,13 +13065,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13054
13065
|
}
|
|
13055
13066
|
static clean(t) {
|
|
13056
13067
|
const n = t.children;
|
|
13057
|
-
for (const a of n)
|
|
13068
|
+
for (const a of n) fe.removeAttributes(a), fe.clean(a);
|
|
13058
13069
|
}
|
|
13059
13070
|
static removeAttributes(t) {
|
|
13060
|
-
for (const { name: n, value: a } of t.attributes)
|
|
13071
|
+
for (const { name: n, value: a } of t.attributes) fe.isPossiblyDangerous(n, a) && t.removeAttribute(n);
|
|
13061
13072
|
}
|
|
13062
13073
|
}
|
|
13063
|
-
|
|
13074
|
+
fe.docStyle = typeof window < "u" && ((lr = window.document) === null || lr === void 0 ? void 0 : lr.documentElement.style), fe.selectProp = !fe.docStyle || "userSelect" in fe.docStyle ? "userSelect" : "webkitUserSelect", (function(d) {
|
|
13064
13075
|
let t, n, a, c;
|
|
13065
13076
|
d.resetRequestQueue = () => {
|
|
13066
13077
|
t = [], n = 0, a = 0, c = {};
|
|
@@ -14776,8 +14787,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
14776
14787
|
const Ce = Math.min(de, P);
|
|
14777
14788
|
if (U.wrap = y.getWrap(f, oe, U.wrap), U.zoom >= Ce) {
|
|
14778
14789
|
if (U.zoom < S) continue;
|
|
14779
|
-
const we = E - U.zoom, he = z[0] - 0.5 - (H << we),
|
|
14780
|
-
Z.push({ tileID: new h.a3(U.zoom === P ? ke : U.zoom, U.wrap, U.zoom, H, q), distanceSq: h.as([B[0] - 0.5 - H, B[1] - 0.5 - q]), tileDistanceToCamera: Math.sqrt(he * he +
|
|
14790
|
+
const we = E - U.zoom, he = z[0] - 0.5 - (H << we), Ie = z[1] - 0.5 - (q << we), ke = t.reparseOverscaled ? Math.max(U.zoom, de) : U.zoom;
|
|
14791
|
+
Z.push({ tileID: new h.a3(U.zoom === P ? ke : U.zoom, U.wrap, U.zoom, H, q), distanceSq: h.as([B[0] - 0.5 - H, B[1] - 0.5 - q]), tileDistanceToCamera: Math.sqrt(he * he + Ie * Ie) });
|
|
14781
14792
|
} else for (let we = 0; we < 4; we++) X.push({ zoom: U.zoom + 1, x: (H << 1) + we % 2, y: (q << 1) + (we >> 1), wrap: U.wrap, fullyVisible: ee });
|
|
14782
14793
|
}
|
|
14783
14794
|
return Z.sort(((U, H) => U.distanceSq - H.distanceSq)).map(((U) => U.tileID));
|
|
@@ -15216,7 +15227,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15216
15227
|
let n = !0;
|
|
15217
15228
|
return d === "always" || d !== "never" && t !== "never" || (n = !1), n;
|
|
15218
15229
|
}
|
|
15219
|
-
class
|
|
15230
|
+
class Pe {
|
|
15220
15231
|
constructor(t, n, a) {
|
|
15221
15232
|
const c = this.boxCells = [], f = this.circleCells = [];
|
|
15222
15233
|
this.xCellCount = Math.ceil(t / a), this.yCellCount = Math.ceil(n / a);
|
|
@@ -15515,7 +15526,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15515
15526
|
}
|
|
15516
15527
|
const It = 100;
|
|
15517
15528
|
class dc {
|
|
15518
|
-
constructor(t, n = new
|
|
15529
|
+
constructor(t, n = new Pe(t.width + 200, t.height + 200, 25), a = new Pe(t.width + 200, t.height + 200, 25)) {
|
|
15519
15530
|
this.transform = t, this.grid = n, this.ignoredGrid = a, this.pitchFactor = Math.cos(t.pitch * Math.PI / 180) * t.cameraToCenterDistance, this.screenRightBoundary = t.width + It, this.screenBottomBoundary = t.height + It, this.gridRightBoundary = t.width + 200, this.gridBottomBoundary = t.height + 200, this.perspectiveRatioCutoff = 0.6;
|
|
15520
15531
|
}
|
|
15521
15532
|
placeCollisionBox(t, n, a, c, f, y, x, w, S, P, E, C) {
|
|
@@ -15543,13 +15554,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15543
15554
|
const ke = this.projectPathToScreenSpace(we, X);
|
|
15544
15555
|
we = ke.some(((st) => st.signedDistanceFromCamera <= 0)) ? [] : ke.map(((st) => st.point));
|
|
15545
15556
|
}
|
|
15546
|
-
let
|
|
15557
|
+
let Ie = [];
|
|
15547
15558
|
if (we.length > 0) {
|
|
15548
15559
|
const ke = we[0].clone(), st = we[0].clone();
|
|
15549
15560
|
for (let zt = 1; zt < we.length; zt++) ke.x = Math.min(ke.x, we[zt].x), ke.y = Math.min(ke.y, we[zt].y), st.x = Math.max(st.x, we[zt].x), st.y = Math.max(st.y, we[zt].y);
|
|
15550
|
-
|
|
15561
|
+
Ie = ke.x >= oe.x && st.x <= ae.x && ke.y >= oe.y && st.y <= ae.y ? [we] : st.x < oe.x || ke.x > ae.x || st.y < oe.y || ke.y > ae.y ? [] : h.aG([we], oe.x, oe.y, ae.x, ae.y);
|
|
15551
15562
|
}
|
|
15552
|
-
for (const ke of
|
|
15563
|
+
for (const ke of Ie) {
|
|
15553
15564
|
me.reset(ke, 0.25 * ee);
|
|
15554
15565
|
let st = 0;
|
|
15555
15566
|
st = me.length <= 0.5 * ee ? 1 : Math.ceil(me.paddedLength / he) + 1;
|
|
@@ -15633,7 +15644,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15633
15644
|
let C = 1, z = 0, B = 0, V = 1;
|
|
15634
15645
|
const G = t.anchorPointX + x[0], N = t.anchorPointY + x[1];
|
|
15635
15646
|
if (y && !f) {
|
|
15636
|
-
const we = this.projectAndGetPerspectiveRatio(G + 1, N, c, S, E), he = we.x - w.x,
|
|
15647
|
+
const we = this.projectAndGetPerspectiveRatio(G + 1, N, c, S, E), he = we.x - w.x, Ie = Math.atan((we.y - w.y) / he) + (he < 0 ? Math.PI : 0), ke = Math.sin(Ie), st = Math.cos(Ie);
|
|
15637
15648
|
C = st, z = ke, B = -ke, V = st;
|
|
15638
15649
|
} else if (!y && f) {
|
|
15639
15650
|
const we = yr(this.transform);
|
|
@@ -15727,13 +15738,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15727
15738
|
placeLayerBucketPart(t, n, a) {
|
|
15728
15739
|
const { bucket: c, layout: f, translationText: y, translationIcon: x, unwrappedTileID: w, pitchedLabelPlaneMatrix: S, textPixelRatio: P, holdingForFade: E, collisionBoxArray: C, partiallyEvaluatedTextSize: z, collisionGroup: B } = t.parameters, V = f.get("text-optional"), G = f.get("icon-optional"), N = h.aN(f, "text-overlap", "text-allow-overlap"), $ = N === "always", X = h.aN(f, "icon-overlap", "icon-allow-overlap"), Z = X === "always", U = f.get("text-rotation-alignment") === "map", H = f.get("text-pitch-alignment") === "map", q = f.get("icon-text-fit") !== "none", ee = f.get("symbol-z-order") === "viewport-y", oe = $ && (Z || !c.hasIconData() || G), ae = Z && ($ || !c.hasTextData() || V);
|
|
15729
15740
|
!c.collisionArrays && C && c.deserializeCollisionBoxes(C);
|
|
15730
|
-
const me = this.retainedQueryData[c.bucketInstanceId].tileID, de = this._getTerrainElevationFunc(me), Ce = this.transform.getFastPathSimpleProjectionMatrix(me), we = (he,
|
|
15741
|
+
const me = this.retainedQueryData[c.bucketInstanceId].tileID, de = this._getTerrainElevationFunc(me), Ce = this.transform.getFastPathSimpleProjectionMatrix(me), we = (he, Ie, ke) => {
|
|
15731
15742
|
var st, zt;
|
|
15732
15743
|
if (n[he.crossTileID]) return;
|
|
15733
15744
|
if (E) return void (this.placements[he.crossTileID] = new fc(!1, !1, !1));
|
|
15734
15745
|
let ct = !1, Rt = !1, Ft = !0, oi = null, Mt = { box: null, placeable: !1, offscreen: null, occluded: !1 }, yi = { placeable: !1 }, ii = null, Zt = null, ai = null, $r = 0, Zr = 0, qr = 0;
|
|
15735
|
-
|
|
15736
|
-
const li =
|
|
15746
|
+
Ie.textFeatureIndex ? $r = Ie.textFeatureIndex : he.useRuntimeCollisionCircles && ($r = he.featureIndex), Ie.verticalTextFeatureIndex && (Zr = Ie.verticalTextFeatureIndex);
|
|
15747
|
+
const li = Ie.textBox;
|
|
15737
15748
|
if (li) {
|
|
15738
15749
|
const pr = (bt) => {
|
|
15739
15750
|
let gt = h.ax.horizontal;
|
|
@@ -15743,7 +15754,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15743
15754
|
}
|
|
15744
15755
|
return gt;
|
|
15745
15756
|
}, fr = (bt, gt) => {
|
|
15746
|
-
if (c.allowVerticalPlacement && he.numVerticalGlyphVertices > 0 &&
|
|
15757
|
+
if (c.allowVerticalPlacement && he.numVerticalGlyphVertices > 0 && Ie.verticalTextBox) {
|
|
15747
15758
|
for (const Bt of c.writingModes) if (Bt === h.ax.vertical ? (Mt = gt(), yi = Mt) : Mt = bt(), Mt?.placeable) break;
|
|
15748
15759
|
} else Mt = bt();
|
|
15749
15760
|
}, Oi = he.textAnchorOffsetStartIndex, Xi = he.textAnchorOffsetEndIndex;
|
|
@@ -15753,7 +15764,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15753
15764
|
return wt?.placeable && (this.markUsedOrientation(c, Bt, he), this.placedOrientations[he.crossTileID] = Bt), wt;
|
|
15754
15765
|
};
|
|
15755
15766
|
fr((() => bt(li, h.ax.horizontal)), (() => {
|
|
15756
|
-
const gt =
|
|
15767
|
+
const gt = Ie.verticalTextBox;
|
|
15757
15768
|
return c.allowVerticalPlacement && he.numVerticalGlyphVertices > 0 && gt ? bt(gt, h.ax.vertical) : { box: null, offscreen: null };
|
|
15758
15769
|
})), pr(Mt?.placeable);
|
|
15759
15770
|
} else {
|
|
@@ -15773,9 +15784,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15773
15784
|
}
|
|
15774
15785
|
return a && !Hr && (Hr = { box: this.collisionIndex.placeCollisionBox(li, "always", P, me, w, H, U, y, B.predicate, de, void 0, Ce).box, offscreen: !1, placeable: !1, occluded: !1 }), Hr;
|
|
15775
15786
|
};
|
|
15776
|
-
fr((() => gt(li,
|
|
15777
|
-
const wt =
|
|
15778
|
-
return c.allowVerticalPlacement && !Mt?.placeable && he.numVerticalGlyphVertices > 0 && wt ? gt(wt,
|
|
15787
|
+
fr((() => gt(li, Ie.iconBox, h.ax.horizontal)), (() => {
|
|
15788
|
+
const wt = Ie.verticalTextBox;
|
|
15789
|
+
return c.allowVerticalPlacement && !Mt?.placeable && he.numVerticalGlyphVertices > 0 && wt ? gt(wt, Ie.verticalIconBox, h.ax.vertical) : { box: null, occluded: !0, offscreen: null };
|
|
15779
15790
|
})), Mt && (ct = Mt.placeable, Ft = Mt.offscreen);
|
|
15780
15791
|
const Bt = pr(Mt?.placeable);
|
|
15781
15792
|
if (!ct && this.prevPlacement) {
|
|
@@ -15788,22 +15799,22 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15788
15799
|
const pr = c.text.placedSymbolArray.get(he.centerJustifiedTextSymbolIndex), fr = h.ay(c.textSizeData, z, pr), Oi = f.get("text-padding");
|
|
15789
15800
|
Zt = this.collisionIndex.placeCollisionCircles(N, pr, c.lineVertexArray, c.glyphOffsetArray, fr, w, S, a, H, B.predicate, he.collisionCircleDiameter, Oi, y, de), Zt.circles.length && Zt.collisionDetected && !a && h.w("Collisions detected, but collision boxes are not shown"), ct = $ || Zt.circles.length > 0 && !Zt.collisionDetected, Ft && (Ft = Zt.offscreen);
|
|
15790
15801
|
}
|
|
15791
|
-
if (
|
|
15802
|
+
if (Ie.iconFeatureIndex && (qr = Ie.iconFeatureIndex), Ie.iconBox) {
|
|
15792
15803
|
const pr = (fr) => this.collisionIndex.placeCollisionBox(fr, X, P, me, w, H, U, x, B.predicate, de, q && oi ? oi : void 0, Ce);
|
|
15793
|
-
yi && yi.placeable &&
|
|
15804
|
+
yi && yi.placeable && Ie.verticalIconBox ? (ai = pr(Ie.verticalIconBox), Rt = ai.placeable) : (ai = pr(Ie.iconBox), Rt = ai.placeable), Ft && (Ft = ai.offscreen);
|
|
15794
15805
|
}
|
|
15795
15806
|
const Pr = V || he.numHorizontalGlyphVertices === 0 && he.numVerticalGlyphVertices === 0, Wr = G || he.numIconVertices === 0;
|
|
15796
15807
|
Pr || Wr ? Wr ? Pr || Rt && (Rt = ct) : ct = Rt && ct : Rt = ct = Rt && ct;
|
|
15797
15808
|
const sa = Rt && ai.placeable;
|
|
15798
|
-
if (ct && ii.placeable && this.collisionIndex.insertCollisionBox(ii.box, N, f.get("text-ignore-placement"), c.bucketInstanceId, yi && yi.placeable && Zr ? Zr : $r, B.ID), sa && this.collisionIndex.insertCollisionBox(ai.box, X, f.get("icon-ignore-placement"), c.bucketInstanceId, qr, B.ID), Zt && ct && this.collisionIndex.insertCollisionCircles(Zt.circles, N, f.get("text-ignore-placement"), c.bucketInstanceId, $r, B.ID), a && this.storeCollisionData(c.bucketInstanceId, ke,
|
|
15809
|
+
if (ct && ii.placeable && this.collisionIndex.insertCollisionBox(ii.box, N, f.get("text-ignore-placement"), c.bucketInstanceId, yi && yi.placeable && Zr ? Zr : $r, B.ID), sa && this.collisionIndex.insertCollisionBox(ai.box, X, f.get("icon-ignore-placement"), c.bucketInstanceId, qr, B.ID), Zt && ct && this.collisionIndex.insertCollisionCircles(Zt.circles, N, f.get("text-ignore-placement"), c.bucketInstanceId, $r, B.ID), a && this.storeCollisionData(c.bucketInstanceId, ke, Ie, ii, ai, Zt), he.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
|
|
15799
15810
|
if (c.bucketInstanceId === 0) throw new Error("bucket.bucketInstanceId can't be 0");
|
|
15800
15811
|
this.placements[he.crossTileID] = new fc((ct || oe) && !ii?.occluded, (Rt || ae) && !ai?.occluded, Ft || c.justReloaded), n[he.crossTileID] = !0;
|
|
15801
15812
|
};
|
|
15802
15813
|
if (ee) {
|
|
15803
15814
|
if (t.symbolInstanceStart !== 0) throw new Error("bucket.bucketInstanceId should be 0");
|
|
15804
15815
|
const he = c.getSortedSymbolIndexes(-this.transform.bearingInRadians);
|
|
15805
|
-
for (let
|
|
15806
|
-
const ke = he[
|
|
15816
|
+
for (let Ie = he.length - 1; Ie >= 0; --Ie) {
|
|
15817
|
+
const ke = he[Ie];
|
|
15807
15818
|
we(c.symbolInstances.get(ke), c.collisionArrays[ke], ke);
|
|
15808
15819
|
}
|
|
15809
15820
|
} else for (let he = t.symbolInstanceStart; he < t.symbolInstanceEnd; he++) we(c.symbolInstances.get(he), c.collisionArrays[he], he);
|
|
@@ -15881,8 +15892,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15881
15892
|
$.verticalPlacedTextSymbolIndex >= 0 && (t.text.placedSymbolArray.get($.verticalPlacedTextSymbolIndex).hidden = Ce || ae ? 1 : 0);
|
|
15882
15893
|
const he = this.variableOffsets[$.crossTileID];
|
|
15883
15894
|
he && this.markUsedJustification(t, he.anchor, $, ee);
|
|
15884
|
-
const
|
|
15885
|
-
|
|
15895
|
+
const Ie = this.placedOrientations[$.crossTileID];
|
|
15896
|
+
Ie && (this.markUsedJustification(t, "left", $, Ie), this.markUsedOrientation(t, Ie, $));
|
|
15886
15897
|
}
|
|
15887
15898
|
if (q) {
|
|
15888
15899
|
const de = Wa(H.icon), Ce = !(z && $.verticalPlacedIconSymbolIndex && oe);
|
|
@@ -20657,9 +20668,9 @@ uniform ${P} ${E} u_${C};
|
|
|
20657
20668
|
const X = new h.P(N.anchorX, N.anchorY), Z = { getElevation: E, width: c.width, height: c.height, pitchedLabelPlaneMatrix: f, pitchWithMap: n, transform: c, tileAnchorPoint: X, translation: S, unwrappedTileID: P }, U = n ? Nn(X.x, X.y, Z) : at(X.x, X.y, Z), H = Ts(c.cameraToCenterDistance, U.signedDistanceFromCamera);
|
|
20658
20669
|
let q = h.ay(d.textSizeData, x, N) * H / h.aJ;
|
|
20659
20670
|
n && (q *= d.tilePixelRatio / y);
|
|
20660
|
-
const { width: ee, height: oe, anchor: ae, textOffset: me, textBoxScale: de } = $, Ce = pl(ae, ee, oe, me, de, q), we = c.getPitchedTextCorrection(X.x + S[0], X.y + S[1], P), he = rh(U.point, Z, t, Ce, -c.bearingInRadians, we),
|
|
20661
|
-
for (let ke = 0; ke < N.numGlyphs; ke++) h.aD(z, he,
|
|
20662
|
-
w && N.associatedIconIndex >= 0 && (V[N.associatedIconIndex] = { shiftedAnchor: he, angle:
|
|
20671
|
+
const { width: ee, height: oe, anchor: ae, textOffset: me, textBoxScale: de } = $, Ce = pl(ae, ee, oe, me, de, q), we = c.getPitchedTextCorrection(X.x + S[0], X.y + S[1], P), he = rh(U.point, Z, t, Ce, -c.bearingInRadians, we), Ie = d.allowVerticalPlacement && N.placedOrientation === h.ax.vertical ? Math.PI / 2 : 0;
|
|
20672
|
+
for (let ke = 0; ke < N.numGlyphs; ke++) h.aD(z, he, Ie);
|
|
20673
|
+
w && N.associatedIconIndex >= 0 && (V[N.associatedIconIndex] = { shiftedAnchor: he, angle: Ie });
|
|
20663
20674
|
} else cn(N.numGlyphs, z);
|
|
20664
20675
|
}
|
|
20665
20676
|
if (w) {
|
|
@@ -20687,29 +20698,29 @@ uniform ${P} ${E} u_${C};
|
|
|
20687
20698
|
let q = !1;
|
|
20688
20699
|
const ee = d.getDepthModeForSublayer(0, $e.ReadOnly), oe = n._unevaluatedLayout.hasValue("text-variable-anchor") || n._unevaluatedLayout.hasValue("text-variable-anchor-offset"), ae = [], me = N.getCircleRadiusCorrection();
|
|
20689
20700
|
for (const we of a) {
|
|
20690
|
-
const he = t.getTile(we),
|
|
20691
|
-
if (!
|
|
20692
|
-
const ke = c ?
|
|
20701
|
+
const he = t.getTile(we), Ie = he.getBucket(n);
|
|
20702
|
+
if (!Ie) continue;
|
|
20703
|
+
const ke = c ? Ie.text : Ie.icon;
|
|
20693
20704
|
if (!ke?.segments.get().length || !ke.hasVisibleVertices) continue;
|
|
20694
|
-
const st = ke.programConfigurations.get(n.id), zt = c ||
|
|
20705
|
+
const st = ke.programConfigurations.get(n.id), zt = c || Ie.sdfIcons, ct = c ? Ie.textSizeData : Ie.iconSizeData, Rt = X || N.pitch !== 0, Ft = d.useProgram(nh(zt, c, Ie), st), oi = h.aw(ct, N.zoom), Mt = (z = d.style.map.terrain) === null || z === void 0 ? void 0 : z.getTerrainData(we);
|
|
20695
20706
|
let yi, ii, Zt, ai, $r = [0, 0], Zr = null;
|
|
20696
|
-
if (c) ii = he.glyphAtlasTexture, Zt = G.LINEAR, yi = he.glyphAtlasTexture.size,
|
|
20707
|
+
if (c) ii = he.glyphAtlasTexture, Zt = G.LINEAR, yi = he.glyphAtlasTexture.size, Ie.iconsInText && ($r = he.imageAtlasTexture.size, Zr = he.imageAtlasTexture, ai = Rt || d.options.rotating || d.options.zooming || ct.kind === "composite" || ct.kind === "camera" ? G.LINEAR : G.NEAREST);
|
|
20697
20708
|
else {
|
|
20698
|
-
const wt = n.layout.get("icon-size").constantOr(0) !== 1 ||
|
|
20709
|
+
const wt = n.layout.get("icon-size").constantOr(0) !== 1 || Ie.iconsNeedLinear;
|
|
20699
20710
|
ii = he.imageAtlasTexture, Zt = zt || d.options.rotating || d.options.zooming || wt || Rt ? G.LINEAR : G.NEAREST, yi = he.imageAtlasTexture.size;
|
|
20700
20711
|
}
|
|
20701
|
-
const qr = h.aK(he, 1, d.transform.zoom), li = ki($, d.transform, qr), Pr = yo(X, $, d.transform, qr), Wr = h.aL(N, he, f, y), sa = N.getProjectionData({ overscaledTileID: we, applyGlobeMatrix: !C, applyTerrainMatrix: !0 }), pr = oe &&
|
|
20712
|
+
const qr = h.aK(he, 1, d.transform.zoom), li = ki($, d.transform, qr), Pr = yo(X, $, d.transform, qr), Wr = h.aL(N, he, f, y), sa = N.getProjectionData({ overscaledTileID: we, applyGlobeMatrix: !C, applyTerrainMatrix: !0 }), pr = oe && Ie.hasTextData(), fr = n.layout.get("icon-text-fit") !== "none" && pr && Ie.hasIconData();
|
|
20702
20713
|
if (Z) {
|
|
20703
20714
|
const wt = h.O();
|
|
20704
20715
|
Ne(wt, li);
|
|
20705
20716
|
const Mn = d.style.map.terrain ? (Ir, Bl) => d.style.map.terrain.getElevation(we, Ir, Bl) : null, oa = n.layout.get("text-rotation-alignment") === "map";
|
|
20706
|
-
vo(
|
|
20717
|
+
vo(Ie, d, c, li, wt, X, S, oa, we.toUnwrapped(), N.width, N.height, Wr, Mn);
|
|
20707
20718
|
}
|
|
20708
20719
|
const Oi = c && oe || fr, Xi = Z || Oi ? rs : X ? li : d.transform.clipSpaceToPixelsMatrix, bt = zt && n.paint.get(c ? "text-halo-width" : "icon-halo-width").constantOr(1) !== 0;
|
|
20709
20720
|
let gt;
|
|
20710
|
-
gt = zt ?
|
|
20721
|
+
gt = zt ? Ie.iconsInText ? ll(ct.kind, oi, U, X, Z, Oi, d, Xi, Pr, Wr, yi, $r, me) : al(ct.kind, oi, U, X, Z, Oi, d, Xi, Pr, Wr, c, yi, bt, me) : ko(ct.kind, oi, U, X, Z, Oi, d, Xi, Pr, Wr, c, yi, me);
|
|
20711
20722
|
const Bt = { program: Ft, buffers: ke, uniformValues: gt, projectionData: sa, atlasTexture: ii, atlasTextureIcon: Zr, atlasInterpolation: Zt, atlasInterpolationIcon: ai, isSDF: zt, hasHalo: bt };
|
|
20712
|
-
if (H &&
|
|
20723
|
+
if (H && Ie.canOverlap) {
|
|
20713
20724
|
q = !0;
|
|
20714
20725
|
const wt = ke.segments.get();
|
|
20715
20726
|
for (const Mn of wt) ae.push({ segments: new h.aV([Mn]), sortKey: Mn.sortKey, state: Bt, terrainData: Mt });
|
|
@@ -20720,12 +20731,12 @@ uniform ${P} ${E} u_${C};
|
|
|
20720
20731
|
for (const we of ae) {
|
|
20721
20732
|
const he = we.state;
|
|
20722
20733
|
V.activeTexture.set(G.TEXTURE0), he.atlasTexture.bind(he.atlasInterpolation, G.CLAMP_TO_EDGE), he.atlasTextureIcon && (V.activeTexture.set(G.TEXTURE1), he.atlasTextureIcon && he.atlasTextureIcon.bind(he.atlasInterpolationIcon, G.CLAMP_TO_EDGE));
|
|
20723
|
-
const
|
|
20724
|
-
if (
|
|
20734
|
+
const Ie = he.isSDF && he.hasHalo;
|
|
20735
|
+
if (Ie) {
|
|
20725
20736
|
const ke = he.uniformValues;
|
|
20726
20737
|
ke.u_is_halo = 1, Ce && (ke.u_is_plain = 0, Ns(he.buffers, we.segments, n, d, he.program, ee, P, E, ke, he.projectionData, we.terrainData), ke.u_is_halo = 0, ke.u_is_plain = 1);
|
|
20727
20738
|
}
|
|
20728
|
-
Ns(he.buffers, we.segments, n, d, he.program, ee, P, E, he.uniformValues, he.projectionData, we.terrainData),
|
|
20739
|
+
Ns(he.buffers, we.segments, n, d, he.program, ee, P, E, he.uniformValues, he.projectionData, we.terrainData), Ie && !Ce && (he.uniformValues.u_is_halo = 0);
|
|
20729
20740
|
}
|
|
20730
20741
|
}
|
|
20731
20742
|
function Ns(d, t, n, a, c, f, y, x, w, S, P) {
|
|
@@ -20813,8 +20824,8 @@ uniform ${P} ${E} u_${C};
|
|
|
20813
20824
|
const Ce = X.getProjectionData({ overscaledTileID: q, applyGlobeMatrix: !x, applyTerrainMatrix: !0 }), we = h.aL(X, ee, Z, U);
|
|
20814
20825
|
if (y) {
|
|
20815
20826
|
N = oe.indexBuffer2, $ = oe.segments2;
|
|
20816
|
-
const
|
|
20817
|
-
G = V === "fillOutlinePattern" && C ? Ic(d, z, ee,
|
|
20827
|
+
const Ie = [S.drawingBufferWidth, S.drawingBufferHeight];
|
|
20828
|
+
G = V === "fillOutlinePattern" && C ? Ic(d, z, ee, Ie, we) : Pc(Ie, we);
|
|
20818
20829
|
} else N = oe.indexBuffer, $ = oe.segments, G = C ? Do(d, z, ee, we) : { u_fill_translate: we };
|
|
20819
20830
|
const he = d.stencilModeForClipping(q);
|
|
20820
20831
|
me.draw(d.context, B, c, he, f, Je.backCCW, G, de, Ce, n.id, oe.layoutVertexBuffer, N, $, n.paint, d.transform.zoom, ae);
|
|
@@ -20877,8 +20888,8 @@ uniform ${P} ${E} u_${C};
|
|
|
20877
20888
|
C.activeTexture.set(z.TEXTURE0), oe.texture.bind(Z, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), C.activeTexture.set(z.TEXTURE1);
|
|
20878
20889
|
const { parentTile: ae, parentScaleBy: me, parentTopLeft: de, fadeValues: Ce } = $c(oe, t, U, H);
|
|
20879
20890
|
oe.fadeOpacity = Ce.tileOpacity, ae ? (ae.fadeOpacity = Ce.parentTileOpacity, ae.texture.bind(Z, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST)) : oe.texture.bind(Z, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), oe.texture.useMipmap && C.extTextureFilterAnisotropic && d.transform.pitch > d.options.anisotropicFilterPitch && z.texParameterf(z.TEXTURE_2D, C.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, C.extTextureFilterAnisotropicMax);
|
|
20880
|
-
const we = (P = d.style.map.terrain) === null || P === void 0 ? void 0 : P.getTerrainData(q), he = V.getProjectionData({ overscaledTileID: q, aligned: $, applyGlobeMatrix: !S, applyTerrainMatrix: !0 }),
|
|
20881
|
-
B.draw(C, z.TRIANGLES, ee, c ? c[q.overscaledZ] : et.disabled, N, w ? Je.frontCCW : Je.backCCW,
|
|
20891
|
+
const we = (P = d.style.map.terrain) === null || P === void 0 ? void 0 : P.getTerrainData(q), he = V.getProjectionData({ overscaledTileID: q, aligned: $, applyGlobeMatrix: !S, applyTerrainMatrix: !0 }), Ie = sl(de, me, Ce.fadeMix, n, x), ke = G.getMeshFromTileID(C, q.canonical, f, y, "raster");
|
|
20892
|
+
B.draw(C, z.TRIANGLES, ee, c ? c[q.overscaledZ] : et.disabled, N, w ? Je.frontCCW : Je.backCCW, Ie, we, he, n.id, ke.vertexBuffer, ke.indexBuffer, ke.segments);
|
|
20882
20893
|
}
|
|
20883
20894
|
}
|
|
20884
20895
|
function $c(d, t, n, a) {
|
|
@@ -20957,7 +20968,7 @@ uniform ${P} ${E} u_${C};
|
|
|
20957
20968
|
if (!(!(($ = oe?.text) === null || $ === void 0) && $.segments.get().length)) continue;
|
|
20958
20969
|
const ae = h.aw(oe.textSizeData, X.zoom), me = h.aK(ee, 1, P.transform.zoom), de = ki(U, P.transform, me), Ce = E.layout.get("icon-text-fit") !== "none" && oe.hasIconData();
|
|
20959
20970
|
if (ae) {
|
|
20960
|
-
const we = Math.pow(2, X.zoom - ee.tileID.overscaledZ), he = Z ? (
|
|
20971
|
+
const we = Math.pow(2, X.zoom - ee.tileID.overscaledZ), he = Z ? (Ie, ke) => Z.getElevation(q, Ie, ke) : null;
|
|
20961
20972
|
js(oe, U, H, N, X, de, we, ae, Ce, h.aL(X, ee, V, G), q.toUnwrapped(), he);
|
|
20962
20973
|
}
|
|
20963
20974
|
}
|
|
@@ -20974,7 +20985,7 @@ uniform ${P} ${E} u_${C};
|
|
|
20974
20985
|
const H = n.paint.get("circle-translate"), q = n.paint.get("circle-translate-anchor"), ee = h.aL(z, Z, H, q), oe = U.programConfigurations.get(n.id), ae = d.useProgram("circle", oe), me = U.layoutVertexBuffer, de = U.indexBuffer, Ce = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(X), we = { programConfiguration: oe, program: ae, layoutVertexBuffer: me, indexBuffer: de, uniformValues: Mc(d, Z, n, ee, $), terrainData: Ce, projectionData: z.getProjectionData({ overscaledTileID: X, applyGlobeMatrix: !y, applyTerrainMatrix: !0 }) };
|
|
20975
20986
|
if (P) {
|
|
20976
20987
|
const he = U.segments.get();
|
|
20977
|
-
for (const
|
|
20988
|
+
for (const Ie of he) N.push({ segments: new h.aV([Ie]), sortKey: Ie.sortKey, state: we });
|
|
20978
20989
|
} else N.push({ segments: U.segments, sortKey: 0, state: we });
|
|
20979
20990
|
}
|
|
20980
20991
|
P && N.sort(((X, Z) => X.sortKey - Z.sortKey));
|
|
@@ -21036,11 +21047,11 @@ uniform ${P} ${E} u_${C};
|
|
|
21036
21047
|
const ct = n.layout.get("line-cap").constantOr(null) === "round", Rt = d.lineAtlas.getDash(he.to, ct), Ft = d.lineAtlas.getDash(he.from, ct);
|
|
21037
21048
|
oe.setConstantDashPositions(Rt, Ft);
|
|
21038
21049
|
}
|
|
21039
|
-
const
|
|
21050
|
+
const Ie = Z.getProjectionData({ overscaledTileID: H, applyGlobeMatrix: !y, applyTerrainMatrix: !0 }), ke = Z.getPixelScale();
|
|
21040
21051
|
let st;
|
|
21041
21052
|
B ? (st = Ac(d, q, n, ke, G), sh($, X, q, oe, G)) : C && V ? (st = Dc(d, q, n, ke, G, ee.lineClipsArray.length), wn(d, t, $, X, n, ee, H, oe, G)) : C ? (st = nl(d, q, n, ke, G), Gc(d, $, X, oe, de, G)) : V ? (st = Cc(d, q, n, ke, ee.lineClipsArray.length), Dt(d, t, $, X, n, ee, H)) : st = Rs(d, q, n, ke);
|
|
21042
21053
|
const zt = d.stencilModeForClipping(H);
|
|
21043
|
-
me.draw($, X.TRIANGLES, S, zt, P, Je.disabled, st, Ce,
|
|
21054
|
+
me.draw($, X.TRIANGLES, S, zt, P, Je.disabled, st, Ce, Ie, n.id, ee.layoutVertexBuffer, ee.indexBuffer, ee.segments, n.paint, d.transform.zoom, oe, ee.layoutVertexBuffer2), U = !1;
|
|
21044
21055
|
}
|
|
21045
21056
|
}, fill: function(d, t, n, a, c) {
|
|
21046
21057
|
const f = n.paint.get("fill-color"), y = n.paint.get("fill-opacity");
|
|
@@ -21538,7 +21549,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
21538
21549
|
}
|
|
21539
21550
|
constructor(t, n, a, c = {}) {
|
|
21540
21551
|
a = a instanceof MouseEvent ? a : new MouseEvent(t, a);
|
|
21541
|
-
const f =
|
|
21552
|
+
const f = fe.mousePos(n.getCanvas(), a), y = n.unproject(f);
|
|
21542
21553
|
super(t, h.e({ point: f, lngLat: y, originalEvent: a }, c)), this._defaultPrevented = !1, this.target = n;
|
|
21543
21554
|
}
|
|
21544
21555
|
}
|
|
@@ -21550,7 +21561,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
21550
21561
|
return this._defaultPrevented;
|
|
21551
21562
|
}
|
|
21552
21563
|
constructor(t, n, a) {
|
|
21553
|
-
const c = t === "touchend" ? a.changedTouches : a.touches, f =
|
|
21564
|
+
const c = t === "touchend" ? a.changedTouches : a.touches, f = fe.touchPos(n.getCanvasContainer(), c), y = f.map(((w) => n.unproject(w))), x = f.reduce(((w, S, P, E) => w.add(S.div(E.length))), new h.P(0, 0));
|
|
21554
21565
|
super(t, { points: f, point: x, lngLats: y, lngLat: n.unproject(x), originalEvent: a }), this._defaultPrevented = !1;
|
|
21555
21566
|
}
|
|
21556
21567
|
}
|
|
@@ -21689,28 +21700,28 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
21689
21700
|
this.isEnabled() && (this._enabled = !1);
|
|
21690
21701
|
}
|
|
21691
21702
|
mousedown(t, n) {
|
|
21692
|
-
this.isEnabled() && t.shiftKey && t.button === 0 && (
|
|
21703
|
+
this.isEnabled() && t.shiftKey && t.button === 0 && (fe.disableDrag(), this._startPos = this._lastPos = n, this._active = !0);
|
|
21693
21704
|
}
|
|
21694
21705
|
mousemoveWindow(t, n) {
|
|
21695
21706
|
if (!this._active) return;
|
|
21696
21707
|
const a = n;
|
|
21697
21708
|
if (this._lastPos.equals(a) || !this._box && a.dist(this._startPos) < this._clickTolerance) return;
|
|
21698
21709
|
const c = this._startPos;
|
|
21699
|
-
this._lastPos = a, this._box || (this._box =
|
|
21710
|
+
this._lastPos = a, this._box || (this._box = fe.create("div", "maplibregl-boxzoom", this._container), this._container.classList.add("maplibregl-crosshair"), this._fireEvent("boxzoomstart", t));
|
|
21700
21711
|
const f = Math.min(c.x, a.x), y = Math.max(c.x, a.x), x = Math.min(c.y, a.y), w = Math.max(c.y, a.y);
|
|
21701
21712
|
this._box.style.transform = `translate(${f}px,${x}px)`, this._box.style.width = y - f + "px", this._box.style.height = w - x + "px";
|
|
21702
21713
|
}
|
|
21703
21714
|
mouseupWindow(t, n) {
|
|
21704
21715
|
if (!this._active || t.button !== 0) return;
|
|
21705
21716
|
const a = this._startPos, c = n;
|
|
21706
|
-
if (this.reset(),
|
|
21717
|
+
if (this.reset(), fe.suppressClick(), a.x !== c.x || a.y !== c.y) return this._map.fire(new h.n("boxzoomend", { originalEvent: t })), this._boxZoomEnd ? void this._boxZoomEnd(this._map, a, c, t) : { cameraAnimation: (f) => f.fitScreenCoordinates(a, c, this._tr.bearing, { linear: !0 }) };
|
|
21707
21718
|
this._fireEvent("boxzoomcancel", t);
|
|
21708
21719
|
}
|
|
21709
21720
|
keydown(t) {
|
|
21710
21721
|
this._active && t.keyCode === 27 && (this.reset(), this._fireEvent("boxzoomcancel", t));
|
|
21711
21722
|
}
|
|
21712
21723
|
reset() {
|
|
21713
|
-
this._active = !1, this._container.classList.remove("maplibregl-crosshair"), this._box && (this._box.remove(), this._box = null),
|
|
21724
|
+
this._active = !1, this._container.classList.remove("maplibregl-crosshair"), this._box && (this._box.remove(), this._box = null), fe.enableDrag(), delete this._startPos, delete this._lastPos;
|
|
21714
21725
|
}
|
|
21715
21726
|
_fireEvent(t, n) {
|
|
21716
21727
|
return this._map.fire(new h.n(t, { originalEvent: n }));
|
|
@@ -21828,7 +21839,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
21828
21839
|
return !this._moved && c.dist(a) < this._clickTolerance ? void 0 : (this._moved = !0, this._lastPoint = c, this._move(a, c));
|
|
21829
21840
|
}
|
|
21830
21841
|
dragEnd(t) {
|
|
21831
|
-
this.isEnabled() && this._lastPoint && this._moveStateManager.isValidEndEvent(t) && (this._moved &&
|
|
21842
|
+
this.isEnabled() && this._lastPoint && this._moveStateManager.isValidEndEvent(t) && (this._moved && fe.suppressClick(), this.reset(t));
|
|
21832
21843
|
}
|
|
21833
21844
|
enable() {
|
|
21834
21845
|
this._enabled = !0;
|
|
@@ -22003,7 +22014,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22003
22014
|
touchend(t, n, a) {
|
|
22004
22015
|
if (!this._firstTwoTouches) return;
|
|
22005
22016
|
const [c, f] = this._firstTwoTouches, y = Xo(a, n, c), x = Xo(a, n, f);
|
|
22006
|
-
y && x || (this._active &&
|
|
22017
|
+
y && x || (this._active && fe.suppressClick(), this.reset());
|
|
22007
22018
|
}
|
|
22008
22019
|
touchcancel() {
|
|
22009
22020
|
this.reset();
|
|
@@ -22206,7 +22217,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22206
22217
|
_start(t) {
|
|
22207
22218
|
if (!this._delta) return;
|
|
22208
22219
|
this._needsRerender = !1, this._active = !0, this.isZooming() || (this._zooming = !0), this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout);
|
|
22209
|
-
const n =
|
|
22220
|
+
const n = fe.mousePos(this._map.getCanvas(), t), a = this._tr;
|
|
22210
22221
|
this._aroundPoint = this._aroundCenter ? a.transform.locationToScreenPoint(h.W.convert(a.center)) : n, this._needsRerender || (this._needsRerender = !0, this._triggerRenderFrame());
|
|
22211
22222
|
}
|
|
22212
22223
|
renderFrame() {
|
|
@@ -22414,7 +22425,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22414
22425
|
_setupUI() {
|
|
22415
22426
|
if (this._container) return;
|
|
22416
22427
|
const t = this._map.getCanvasContainer();
|
|
22417
|
-
t.classList.add("maplibregl-cooperative-gestures"), this._container =
|
|
22428
|
+
t.classList.add("maplibregl-cooperative-gestures"), this._container = fe.create("div", "maplibregl-cooperative-gesture-screen", t);
|
|
22418
22429
|
let n = this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");
|
|
22419
22430
|
this._bypassKey === "metaKey" && (n = this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));
|
|
22420
22431
|
const a = this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"), c = document.createElement("div");
|
|
@@ -22472,10 +22483,10 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22472
22483
|
if (this._blockedByActive(S, B, C)) z.reset();
|
|
22473
22484
|
else if (z[f || c.type]) {
|
|
22474
22485
|
if (h.cz(c, f || c.type)) {
|
|
22475
|
-
const G =
|
|
22486
|
+
const G = fe.mousePos(this._map.getCanvas(), c);
|
|
22476
22487
|
V = z[f || c.type](c, G);
|
|
22477
22488
|
} else if (h.cA(c, f || c.type)) {
|
|
22478
|
-
const G = this._getMapTouches(c.touches), N =
|
|
22489
|
+
const G = this._getMapTouches(c.touches), N = fe.touchPos(this._map.getCanvas(), G);
|
|
22479
22490
|
V = z[f || c.type](c, N, G);
|
|
22480
22491
|
} else h.cB(f || c.type) || (V = z[f || c.type](c));
|
|
22481
22492
|
this.mergeHandlerResult(x, w, V, C, y), V?.needsRenderFrame && this._triggerRenderFrame();
|
|
@@ -22932,7 +22943,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22932
22943
|
return "bottom-right";
|
|
22933
22944
|
}
|
|
22934
22945
|
onAdd(t) {
|
|
22935
|
-
return this._map = t, this._compact = this.options.compact, this._container =
|
|
22946
|
+
return this._map = t, this._compact = this.options.compact, this._container = fe.create("details", "maplibregl-ctrl maplibregl-ctrl-attrib"), this._compactButton = fe.create("summary", "maplibregl-ctrl-attrib-button", this._container), this._compactButton.addEventListener("click", this._toggleAttribution), this._setElementTitle(this._compactButton, "ToggleAttribution"), this._innerContainer = fe.create("div", "maplibregl-ctrl-attrib-inner", this._container), this._updateAttributions(), this._updateCompact(), this._map.on("styledata", this._updateData), this._map.on("sourcedata", this._updateData), this._map.on("terrain", this._updateData), this._map.on("resize", this._updateCompact), this._map.on("drag", this._updateCompactMinimize), this._container;
|
|
22936
22947
|
}
|
|
22937
22948
|
onRemove() {
|
|
22938
22949
|
this._container.remove(), this._map.off("styledata", this._updateData), this._map.off("sourcedata", this._updateData), this._map.off("terrain", this._updateData), this._map.off("resize", this._updateCompact), this._map.off("drag", this._updateCompactMinimize), this._map = void 0, this._compact = void 0, this._attribHTML = void 0;
|
|
@@ -22961,7 +22972,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22961
22972
|
return !0;
|
|
22962
22973
|
}));
|
|
22963
22974
|
const a = t.join(" | ");
|
|
22964
|
-
a !== this._attribHTML && (this._attribHTML = a, t.length ? (this._innerContainer.innerHTML =
|
|
22975
|
+
a !== this._attribHTML && (this._attribHTML = a, t.length ? (this._innerContainer.innerHTML = fe.sanitize(a), this._container.classList.remove("maplibregl-attrib-empty")) : this._container.classList.add("maplibregl-attrib-empty"), this._updateCompact(), this._editLink = null);
|
|
22965
22976
|
}
|
|
22966
22977
|
}
|
|
22967
22978
|
class Dl {
|
|
@@ -22979,8 +22990,8 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
22979
22990
|
}
|
|
22980
22991
|
onAdd(t) {
|
|
22981
22992
|
var n;
|
|
22982
|
-
this._map = t, this._compact = (n = this.options) === null || n === void 0 ? void 0 : n.compact, this._container =
|
|
22983
|
-
const a =
|
|
22993
|
+
this._map = t, this._compact = (n = this.options) === null || n === void 0 ? void 0 : n.compact, this._container = fe.create("div", "maplibregl-ctrl");
|
|
22994
|
+
const a = fe.create("a", "maplibregl-ctrl-logo");
|
|
22984
22995
|
return a.target = "_blank", a.rel = "noopener nofollow", a.href = "https://maplibre.org/", a.setAttribute("aria-label", this._map._getUIString("LogoControl.Title")), a.setAttribute("rel", "noopener nofollow"), this._container.appendChild(a), this._container.style.display = "block", this._map.on("resize", this._updateCompact), this._updateCompact(), this._container;
|
|
22985
22996
|
}
|
|
22986
22997
|
onRemove() {
|
|
@@ -23315,7 +23326,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
23315
23326
|
return !1;
|
|
23316
23327
|
}
|
|
23317
23328
|
}
|
|
23318
|
-
const eo = { "AttributionControl.ToggleAttribution": "Toggle attribution", "AttributionControl.MapFeedback": "Map feedback", "FullscreenControl.Enter": "Enter fullscreen", "FullscreenControl.Exit": "Exit fullscreen", "GeolocateControl.FindMyLocation": "Find my location", "GeolocateControl.LocationNotAvailable": "Location not available", "LogoControl.Title": "MapLibre logo", "Map.Title": "Map", "Marker.Title": "Map marker", "NavigationControl.ResetBearing": "Drag to rotate map, click to reset north", "NavigationControl.ZoomIn": "Zoom in", "NavigationControl.ZoomOut": "Zoom out", "Popup.Close": "Close popup", "ScaleControl.Feet": "ft", "ScaleControl.Meters": "m", "ScaleControl.Kilometers": "km", "ScaleControl.Miles": "mi", "ScaleControl.NauticalMiles": "nm", "GlobeControl.Enable": "Enable globe", "GlobeControl.Disable": "Disable globe", "TerrainControl.Enable": "Enable terrain", "TerrainControl.Disable": "Disable terrain", "CooperativeGesturesHandler.WindowsHelpText": "Use Ctrl + scroll to zoom the map", "CooperativeGesturesHandler.MacHelpText": "Use ⌘ + scroll to zoom the map", "CooperativeGesturesHandler.MobileHelpText": "Use two fingers to move the map" }, Jo =
|
|
23329
|
+
const eo = { "AttributionControl.ToggleAttribution": "Toggle attribution", "AttributionControl.MapFeedback": "Map feedback", "FullscreenControl.Enter": "Enter fullscreen", "FullscreenControl.Exit": "Exit fullscreen", "GeolocateControl.FindMyLocation": "Find my location", "GeolocateControl.LocationNotAvailable": "Location not available", "LogoControl.Title": "MapLibre logo", "Map.Title": "Map", "Marker.Title": "Map marker", "NavigationControl.ResetBearing": "Drag to rotate map, click to reset north", "NavigationControl.ZoomIn": "Zoom in", "NavigationControl.ZoomOut": "Zoom out", "Popup.Close": "Close popup", "ScaleControl.Feet": "ft", "ScaleControl.Meters": "m", "ScaleControl.Kilometers": "km", "ScaleControl.Miles": "mi", "ScaleControl.NauticalMiles": "nm", "GlobeControl.Enable": "Enable globe", "GlobeControl.Disable": "Disable globe", "TerrainControl.Enable": "Enable terrain", "TerrainControl.Disable": "Disable terrain", "CooperativeGesturesHandler.WindowsHelpText": "Use Ctrl + scroll to zoom the map", "CooperativeGesturesHandler.MacHelpText": "Use ⌘ + scroll to zoom the map", "CooperativeGesturesHandler.MobileHelpText": "Use two fingers to move the map" }, Jo = pe, Qo = { hash: !1, interactive: !0, bearingSnap: 7, zoomSnap: 0, attributionControl: Ko, maplibreLogo: !1, refreshExpiredTiles: !0, canvasContextAttributes: { antialias: !1, preserveDrawingBuffer: !1, powerPreference: "high-performance", failIfMajorPerformanceCaveat: !1, desynchronized: !1, contextType: void 0 }, scrollZoom: !0, minZoom: -2, maxZoom: 22, minPitch: 0, maxPitch: 60, boxZoom: !0, dragRotate: !0, dragPan: !0, keyboard: !0, doubleClickZoom: !0, touchZoomRotate: !0, touchPitch: !0, cooperativeGestures: !1, trackResize: !0, center: [0, 0], elevation: 0, zoom: 0, bearing: 0, pitch: 0, roll: 0, renderWorldCopies: !0, maxTileCacheSize: null, maxTileCacheZoomLevels: h.c.MAX_TILE_CACHE_ZOOM_LEVELS, transformRequest: null, transformCameraUpdate: null, transformConstrain: null, fadeDuration: 300, crossSourceCollisions: !0, clickTolerance: 3, localIdeographFontFamily: "sans-serif", pitchWithRotate: !0, rollEnabled: !1, reduceMotion: void 0, validateStyle: !0, maxCanvasSize: [4096, 4096], cancelPendingTileRequestsWhileZooming: !0, centerClampedToGround: !0, experimentalZoomLevelsToOverscale: void 0, anisotropicFilterPitch: 20 };
|
|
23319
23330
|
let ea = class extends cu {
|
|
23320
23331
|
get _ownerWindow() {
|
|
23321
23332
|
var d, t;
|
|
@@ -23850,12 +23861,12 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
23850
23861
|
_setupContainer() {
|
|
23851
23862
|
const d = this._container;
|
|
23852
23863
|
d.classList.add("maplibregl-map");
|
|
23853
|
-
const t = this._canvasContainer =
|
|
23854
|
-
this._interactive && t.classList.add("maplibregl-interactive"), this._canvas =
|
|
23864
|
+
const t = this._canvasContainer = fe.create("div", "maplibregl-canvas-container", d);
|
|
23865
|
+
this._interactive && t.classList.add("maplibregl-interactive"), this._canvas = fe.create("canvas", "maplibregl-canvas", t), this._canvas.addEventListener("webglcontextlost", this._contextLost, !1), this._canvas.addEventListener("webglcontextrestored", this._contextRestored, !1), this._canvas.setAttribute("tabindex", this._interactive ? "0" : "-1"), this._canvas.setAttribute("aria-label", this._getUIString("Map.Title")), this._canvas.setAttribute("role", "region");
|
|
23855
23866
|
const n = this._containerDimensions(), a = this._getClampedPixelRatio(n[0], n[1]);
|
|
23856
23867
|
this._resizeCanvas(n[0], n[1], a);
|
|
23857
|
-
const c = this._controlContainer =
|
|
23858
|
-
for (const y of ["top-left", "top-right", "bottom-left", "bottom-right"]) f[y] =
|
|
23868
|
+
const c = this._controlContainer = fe.create("div", "maplibregl-control-container", d), f = this._controlPositions = {};
|
|
23869
|
+
for (const y of ["top-left", "top-right", "bottom-left", "bottom-right"]) f[y] = fe.create("div", `maplibregl-ctrl-${y} `, c);
|
|
23859
23870
|
this._container.addEventListener("scroll", this._onMapScroll, !1);
|
|
23860
23871
|
}
|
|
23861
23872
|
_resizeCanvas(d, t, n) {
|
|
@@ -23984,15 +23995,15 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
23984
23995
|
class to {
|
|
23985
23996
|
constructor(t, n, a = !1) {
|
|
23986
23997
|
this.mousedown = (f) => {
|
|
23987
|
-
this.startMove(f,
|
|
23998
|
+
this.startMove(f, fe.mousePos(this.element, f)), window.addEventListener("mousemove", this.mousemove), window.addEventListener("mouseup", this.mouseup);
|
|
23988
23999
|
}, this.mousemove = (f) => {
|
|
23989
|
-
this.move(f,
|
|
24000
|
+
this.move(f, fe.mousePos(this.element, f));
|
|
23990
24001
|
}, this.mouseup = (f) => {
|
|
23991
24002
|
this._rotatePitchHandler.dragEnd(f), this.offTemp();
|
|
23992
24003
|
}, this.touchstart = (f) => {
|
|
23993
|
-
f.targetTouches.length !== 1 ? this.reset() : (this._startPos = this._lastPos =
|
|
24004
|
+
f.targetTouches.length !== 1 ? this.reset() : (this._startPos = this._lastPos = fe.touchPos(this.element, f.targetTouches)[0], this.startMove(f, this._startPos), window.addEventListener("touchmove", this.touchmove, { passive: !1 }), window.addEventListener("touchend", this.touchend));
|
|
23994
24005
|
}, this.touchmove = (f) => {
|
|
23995
|
-
f.targetTouches.length !== 1 ? this.reset() : (this._lastPos =
|
|
24006
|
+
f.targetTouches.length !== 1 ? this.reset() : (this._lastPos = fe.touchPos(this.element, f.targetTouches)[0], this.move(f, this._lastPos));
|
|
23996
24007
|
}, this.touchend = (f) => {
|
|
23997
24008
|
f.targetTouches.length === 0 && this._startPos && this._lastPos && this._startPos.dist(this._lastPos) < this._clickTolerance && this.element.click(), delete this._startPos, delete this._lastPos, this.offTemp();
|
|
23998
24009
|
}, this.reset = () => {
|
|
@@ -24006,7 +24017,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24006
24017
|
} }), this.map = t, n.addEventListener("mousedown", this.mousedown), n.addEventListener("touchstart", this.touchstart, { passive: !1 }), n.addEventListener("touchcancel", this.reset);
|
|
24007
24018
|
}
|
|
24008
24019
|
startMove(t, n) {
|
|
24009
|
-
this._rotatePitchHandler.dragStart(t, n),
|
|
24020
|
+
this._rotatePitchHandler.dragStart(t, n), fe.disableDrag();
|
|
24010
24021
|
}
|
|
24011
24022
|
move(t, n) {
|
|
24012
24023
|
const a = this.map, { bearingDelta: c, pitchDelta: f } = this._rotatePitchHandler.dragMove(t, n) || {};
|
|
@@ -24017,7 +24028,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24017
24028
|
t.removeEventListener("mousedown", this.mousedown), t.removeEventListener("touchstart", this.touchstart), window.removeEventListener("touchmove", this.touchmove), window.removeEventListener("touchend", this.touchend), t.removeEventListener("touchcancel", this.reset), this.offTemp();
|
|
24018
24029
|
}
|
|
24019
24030
|
offTemp() {
|
|
24020
|
-
|
|
24031
|
+
fe.enableDrag(), window.removeEventListener("mousemove", this.mousemove), window.removeEventListener("mouseup", this.mouseup), window.removeEventListener("touchmove", this.touchmove), window.removeEventListener("touchend", this.touchend);
|
|
24021
24032
|
}
|
|
24022
24033
|
}
|
|
24023
24034
|
let Sr;
|
|
@@ -24073,35 +24084,35 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24073
24084
|
this._element.contains(n.originalEvent.target) && (n.preventDefault(), this._positionDelta = n.point.sub(this._pos).add(this._offset), this._pointerdownPos = n.point, this._state = "pending", this._map.on("mousemove", this._onMove), this._map.on("touchmove", this._onMove), this._map.once("mouseup", this._onUp), this._map.once("touchend", this._onUp));
|
|
24074
24085
|
}, this._anchor = t?.anchor || "center", this._color = t?.color || "#3FB1CE", this._scale = t?.scale || 1, this._draggable = t?.draggable || !1, this._clickTolerance = t?.clickTolerance || 0, this._subpixelPositioning = t?.subpixelPositioning || !1, this._isDragging = !1, this._state = "inactive", this._rotation = t?.rotation || 0, this._rotationAlignment = t?.rotationAlignment || "auto", this._pitchAlignment = t?.pitchAlignment && t.pitchAlignment !== "auto" ? t.pitchAlignment : this._rotationAlignment, this.setOpacity(t?.opacity, t?.opacityWhenCovered), t?.element) this._element = t.element, this._offset = h.P.convert(t?.offset || [0, 0]);
|
|
24075
24086
|
else {
|
|
24076
|
-
this._defaultMarker = !0, this._element =
|
|
24077
|
-
const n =
|
|
24087
|
+
this._defaultMarker = !0, this._element = fe.create("div");
|
|
24088
|
+
const n = fe.createNS("http://www.w3.org/2000/svg", "svg"), a = 41, c = 27;
|
|
24078
24089
|
n.setAttributeNS(null, "display", "block"), n.setAttributeNS(null, "height", `${a}px`), n.setAttributeNS(null, "width", `${c}px`), n.setAttributeNS(null, "viewBox", `0 0 ${c} ${a}`);
|
|
24079
|
-
const f =
|
|
24090
|
+
const f = fe.createNS("http://www.w3.org/2000/svg", "g");
|
|
24080
24091
|
f.setAttributeNS(null, "stroke", "none"), f.setAttributeNS(null, "stroke-width", "1"), f.setAttributeNS(null, "fill", "none"), f.setAttributeNS(null, "fill-rule", "evenodd");
|
|
24081
|
-
const y =
|
|
24092
|
+
const y = fe.createNS("http://www.w3.org/2000/svg", "g");
|
|
24082
24093
|
y.setAttributeNS(null, "fill-rule", "nonzero");
|
|
24083
|
-
const x =
|
|
24094
|
+
const x = fe.createNS("http://www.w3.org/2000/svg", "g");
|
|
24084
24095
|
x.setAttributeNS(null, "transform", "translate(3.0, 29.0)"), x.setAttributeNS(null, "fill", "#000000");
|
|
24085
24096
|
const w = [{ rx: "10.5", ry: "5.25002273" }, { rx: "10.5", ry: "5.25002273" }, { rx: "9.5", ry: "4.77275007" }, { rx: "8.5", ry: "4.29549936" }, { rx: "7.5", ry: "3.81822308" }, { rx: "6.5", ry: "3.34094679" }, { rx: "5.5", ry: "2.86367051" }, { rx: "4.5", ry: "2.38636864" }];
|
|
24086
24097
|
for (const N of w) {
|
|
24087
|
-
const $ =
|
|
24098
|
+
const $ = fe.createNS("http://www.w3.org/2000/svg", "ellipse");
|
|
24088
24099
|
$.setAttributeNS(null, "opacity", "0.04"), $.setAttributeNS(null, "cx", "10.5"), $.setAttributeNS(null, "cy", "5.80029008"), $.setAttributeNS(null, "rx", N.rx), $.setAttributeNS(null, "ry", N.ry), x.appendChild($);
|
|
24089
24100
|
}
|
|
24090
|
-
const S =
|
|
24101
|
+
const S = fe.createNS("http://www.w3.org/2000/svg", "g");
|
|
24091
24102
|
S.setAttributeNS(null, "fill", this._color);
|
|
24092
|
-
const P =
|
|
24103
|
+
const P = fe.createNS("http://www.w3.org/2000/svg", "path");
|
|
24093
24104
|
P.setAttributeNS(null, "d", "M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"), S.appendChild(P);
|
|
24094
|
-
const E =
|
|
24105
|
+
const E = fe.createNS("http://www.w3.org/2000/svg", "g");
|
|
24095
24106
|
E.setAttributeNS(null, "opacity", "0.25"), E.setAttributeNS(null, "fill", "#000000");
|
|
24096
|
-
const C =
|
|
24107
|
+
const C = fe.createNS("http://www.w3.org/2000/svg", "path");
|
|
24097
24108
|
C.setAttributeNS(null, "d", "M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"), E.appendChild(C);
|
|
24098
|
-
const z =
|
|
24109
|
+
const z = fe.createNS("http://www.w3.org/2000/svg", "g");
|
|
24099
24110
|
z.setAttributeNS(null, "transform", "translate(6.0, 7.0)"), z.setAttributeNS(null, "fill", "#FFFFFF");
|
|
24100
|
-
const B =
|
|
24111
|
+
const B = fe.createNS("http://www.w3.org/2000/svg", "g");
|
|
24101
24112
|
B.setAttributeNS(null, "transform", "translate(8.0, 8.0)");
|
|
24102
|
-
const V =
|
|
24113
|
+
const V = fe.createNS("http://www.w3.org/2000/svg", "circle");
|
|
24103
24114
|
V.setAttributeNS(null, "fill", "#000000"), V.setAttributeNS(null, "opacity", "0.25"), V.setAttributeNS(null, "cx", "5.5"), V.setAttributeNS(null, "cy", "5.5"), V.setAttributeNS(null, "r", "5.4999962");
|
|
24104
|
-
const G =
|
|
24115
|
+
const G = fe.createNS("http://www.w3.org/2000/svg", "circle");
|
|
24105
24116
|
G.setAttributeNS(null, "fill", "#FFFFFF"), G.setAttributeNS(null, "cx", "5.5"), G.setAttributeNS(null, "cy", "5.5"), G.setAttributeNS(null, "r", "5.4999962"), B.appendChild(V), B.appendChild(G), y.appendChild(x), y.appendChild(S), y.appendChild(E), y.appendChild(z), y.appendChild(B), n.appendChild(y), n.setAttributeNS(null, "height", a * this._scale + "px"), n.setAttributeNS(null, "width", c * this._scale + "px"), this._element.appendChild(n), this._offset = h.P.convert(t?.offset || [0, -14]);
|
|
24106
24117
|
}
|
|
24107
24118
|
if (this._element.classList.add("maplibregl-marker"), this._element.addEventListener("dragstart", ((n) => {
|
|
@@ -24244,7 +24255,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24244
24255
|
}
|
|
24245
24256
|
return na(new h.P(0, 0));
|
|
24246
24257
|
}
|
|
24247
|
-
const Fl =
|
|
24258
|
+
const Fl = pe;
|
|
24248
24259
|
R.AJAXError = h.cG, R.EXTENT = h.a6, R.Event = h.n, R.Evented = h.E, R.LngLat = h.W, R.MercatorCoordinate = h.a7, R.Point = h.P, R.addProtocol = h.cH, R.config = h.c, R.removeProtocol = h.cI, R.AttributionControl = Hi, R.BoxZoomHandler = dr, R.CanvasSource = Fa, R.CooperativeGesturesHandler = Re, R.DoubleClickZoomHandler = Al, R.DragPanHandler = or, R.DragRotateHandler = Js, R.EdgeInsets = $n, R.FullscreenControl = class extends h.E {
|
|
24249
24260
|
constructor(d = {}) {
|
|
24250
24261
|
var t;
|
|
@@ -24258,14 +24269,14 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24258
24269
|
}, this._fullscreen = !1, this._pseudo = (t = d.pseudo) !== null && t !== void 0 && t, d?.container && (d.container instanceof HTMLElement ? this._container = d.container : h.w("Full screen control 'container' must be a DOM element.")), "onfullscreenchange" in document ? this._fullscreenchange = "fullscreenchange" : "onmozfullscreenchange" in document ? this._fullscreenchange = "mozfullscreenchange" : "onwebkitfullscreenchange" in document ? this._fullscreenchange = "webkitfullscreenchange" : "onmsfullscreenchange" in document && (this._fullscreenchange = "MSFullscreenChange");
|
|
24259
24270
|
}
|
|
24260
24271
|
onAdd(d) {
|
|
24261
|
-
return this._map = d, this._container || (this._container = this._map.getContainer()), this._controlContainer =
|
|
24272
|
+
return this._map = d, this._container || (this._container = this._map.getContainer()), this._controlContainer = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), this._controlContainer;
|
|
24262
24273
|
}
|
|
24263
24274
|
onRemove() {
|
|
24264
24275
|
this._controlContainer.remove(), this._map = null, window.document.removeEventListener(this._fullscreenchange, this._onFullscreenChange);
|
|
24265
24276
|
}
|
|
24266
24277
|
_setupUI() {
|
|
24267
|
-
const d = this._fullscreenButton =
|
|
24268
|
-
|
|
24278
|
+
const d = this._fullscreenButton = fe.create("button", "maplibregl-ctrl-fullscreen", this._controlContainer);
|
|
24279
|
+
fe.create("span", "maplibregl-ctrl-icon", d).setAttribute("aria-hidden", "true"), d.type = "button", this._updateTitle(), this._fullscreenButton.addEventListener("click", this._onClickFullscreen), window.document.addEventListener(this._fullscreenchange, this._onFullscreenChange);
|
|
24269
24280
|
}
|
|
24270
24281
|
_updateTitle() {
|
|
24271
24282
|
const d = this._getTitle();
|
|
@@ -24340,7 +24351,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24340
24351
|
}, this._setupUI = () => {
|
|
24341
24352
|
this._map && (this._container.addEventListener("contextmenu", ((t) => {
|
|
24342
24353
|
t.preventDefault();
|
|
24343
|
-
})), this._geolocateButton =
|
|
24354
|
+
})), this._geolocateButton = fe.create("button", "maplibregl-ctrl-geolocate", this._container), fe.create("span", "maplibregl-ctrl-icon", this._geolocateButton).setAttribute("aria-hidden", "true"), this._geolocateButton.type = "button", this._geolocateButton.disabled = !0);
|
|
24344
24355
|
}, this._finishSetupUI = (t) => {
|
|
24345
24356
|
if (this._map) {
|
|
24346
24357
|
if (t === !1) {
|
|
@@ -24351,12 +24362,12 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24351
24362
|
const n = this._map._getUIString("GeolocateControl.FindMyLocation");
|
|
24352
24363
|
this._geolocateButton.disabled = !1, this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n);
|
|
24353
24364
|
}
|
|
24354
|
-
this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement =
|
|
24365
|
+
this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = fe.create("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new ro({ element: this._dotElement }), this._circleElement = fe.create("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new ro({ element: this._circleElement, pitchAlignment: "map" }), this.options.trackUserLocation && (this._watchState = "OFF"), this._map.on("zoom", this._onUpdate), this._map.on("move", this._onUpdate), this._map.on("rotate", this._onUpdate), this._map.on("pitch", this._onUpdate)), this._geolocateButton.addEventListener("click", (() => this.trigger())), this._setup = !0, this.options.trackUserLocation && this._map.on("movestart", this._onMoveStart);
|
|
24355
24366
|
}
|
|
24356
24367
|
}, this.options = h.e({}, kl, d);
|
|
24357
24368
|
}
|
|
24358
24369
|
onAdd(d) {
|
|
24359
|
-
return this._map = d, this._container =
|
|
24370
|
+
return this._map = d, this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), (function() {
|
|
24360
24371
|
return h._(this, arguments, void 0, (function* (t = !1) {
|
|
24361
24372
|
if (Sr !== void 0 && !t) return Sr;
|
|
24362
24373
|
if (window.navigator.permissions === void 0) return Sr = !!window.navigator.geolocation, Sr;
|
|
@@ -24456,7 +24467,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24456
24467
|
};
|
|
24457
24468
|
}
|
|
24458
24469
|
onAdd(d) {
|
|
24459
|
-
return this._map = d, this._container =
|
|
24470
|
+
return this._map = d, this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._globeButton = fe.create("button", "maplibregl-ctrl-globe", this._container), fe.create("span", "maplibregl-ctrl-icon", this._globeButton).setAttribute("aria-hidden", "true"), this._globeButton.type = "button", this._globeButton.addEventListener("click", this._toggleProjection), this._updateGlobeIcon(), this._map.on("styledata", this._updateGlobeIcon), this._map.on("projectiontransition", this._updateGlobeIcon), this._container;
|
|
24460
24471
|
}
|
|
24461
24472
|
onRemove() {
|
|
24462
24473
|
this._container.remove(), this._map.off("styledata", this._updateGlobeIcon), this._map.off("projectiontransition", this._updateGlobeIcon), this._globeButton.removeEventListener("click", this._toggleProjection), this._map = void 0;
|
|
@@ -24471,9 +24482,9 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24471
24482
|
}, this._setButtonTitle = (t, n) => {
|
|
24472
24483
|
const a = this._map._getUIString(`NavigationControl.${n}`);
|
|
24473
24484
|
t.title = a, t.setAttribute("aria-label", a);
|
|
24474
|
-
}, this.options = h.e({}, zl, d), this._container =
|
|
24485
|
+
}, this.options = h.e({}, zl, d), this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._container.addEventListener("contextmenu", ((t) => t.preventDefault())), this.options.showZoom && (this._zoomInButton = this._createButton("maplibregl-ctrl-zoom-in", ((t) => this._map.zoomIn({}, { originalEvent: t }))), fe.create("span", "maplibregl-ctrl-icon", this._zoomInButton).setAttribute("aria-hidden", "true"), this._zoomOutButton = this._createButton("maplibregl-ctrl-zoom-out", ((t) => this._map.zoomOut({}, { originalEvent: t }))), fe.create("span", "maplibregl-ctrl-icon", this._zoomOutButton).setAttribute("aria-hidden", "true")), this.options.showCompass && (this._compass = this._createButton("maplibregl-ctrl-compass", ((t) => {
|
|
24475
24486
|
this.options.visualizePitch ? this._map.resetNorthPitch({}, { originalEvent: t }) : this._map.resetNorth({}, { originalEvent: t });
|
|
24476
|
-
})), this._compassIcon =
|
|
24487
|
+
})), this._compassIcon = fe.create("span", "maplibregl-ctrl-icon", this._compass), this._compassIcon.setAttribute("aria-hidden", "true"));
|
|
24477
24488
|
}
|
|
24478
24489
|
onAdd(d) {
|
|
24479
24490
|
return this._map = d, this.options.showZoom && (this._setButtonTitle(this._zoomInButton, "ZoomIn"), this._setButtonTitle(this._zoomOutButton, "ZoomOut"), this._map.on("zoom", this._updateZoomButtons), this._updateZoomButtons()), this.options.showCompass && (this._setButtonTitle(this._compass, "ResetBearing"), this.options.visualizePitch && this._map.on("pitch", this._rotateCompassArrow), this.options.visualizeRoll && this._map.on("roll", this._rotateCompassArrow), this._map.on("rotate", this._rotateCompassArrow), this._rotateCompassArrow(), this._handler = new to(this._map, this._compass, this.options.visualizePitch)), this._container;
|
|
@@ -24482,7 +24493,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24482
24493
|
this._container.remove(), this.options.showZoom && this._map.off("zoom", this._updateZoomButtons), this.options.showCompass && (this.options.visualizePitch && this._map.off("pitch", this._rotateCompassArrow), this.options.visualizeRoll && this._map.off("roll", this._rotateCompassArrow), this._map.off("rotate", this._rotateCompassArrow), this._handler.off(), delete this._handler), delete this._map;
|
|
24483
24494
|
}
|
|
24484
24495
|
_createButton(d, t) {
|
|
24485
|
-
const n =
|
|
24496
|
+
const n = fe.create("button", d, this._container);
|
|
24486
24497
|
return n.type = "button", n.addEventListener("click", t), n;
|
|
24487
24498
|
}
|
|
24488
24499
|
}, R.Popup = class extends h.E {
|
|
@@ -24492,7 +24503,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24492
24503
|
}, this.remove = () => (this._content && this._content.remove(), this._container && (this._container.remove(), delete this._container), this._map && (this._map.off("move", this._update), this._map.off("move", this._onClose), this._map.off("click", this._onClose), this._map.off("remove", this.remove), this._map.off("terrain", this._update), this._map.off("projectiontransition", this._update), this._map.off("mousemove", this._update), this._map.off("mouseup", this._update), this._map.off("drag", this._update), this._map._canvasContainer.classList.remove("maplibregl-track-pointer"), delete this._map, this.fire(new h.n("close"))), this), this._update = (t) => {
|
|
24493
24504
|
if (!this._map || !this._lngLat && !this._trackPointer || !this._content) return;
|
|
24494
24505
|
if (!this._container) {
|
|
24495
|
-
if (this._container =
|
|
24506
|
+
if (this._container = fe.create("div", "maplibregl-popup", this._map.getContainer()), this._tip = fe.create("div", "maplibregl-popup-tip", this._container), this._container.appendChild(this._content), this.options.className) for (const x of this.options.className.split(" ")) this._container.classList.add(x);
|
|
24496
24507
|
this._closeButton && this._closeButton.setAttribute("aria-label", this._map._getUIString("Popup.Close")), this._trackPointer && this._container.classList.add("maplibregl-popup-track-pointer");
|
|
24497
24508
|
}
|
|
24498
24509
|
let n;
|
|
@@ -24551,7 +24562,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24551
24562
|
}
|
|
24552
24563
|
setDOMContent(d) {
|
|
24553
24564
|
if (this._content) for (; this._content.hasChildNodes(); ) this._content.firstChild && this._content.removeChild(this._content.firstChild);
|
|
24554
|
-
else this._content =
|
|
24565
|
+
else this._content = fe.create("div", "maplibregl-popup-content", this._container);
|
|
24555
24566
|
return this._content.appendChild(d), this._createCloseButton(), this._update(), this._focusFirstElement(), this;
|
|
24556
24567
|
}
|
|
24557
24568
|
addClassName(d) {
|
|
@@ -24573,7 +24584,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24573
24584
|
this.options.padding = d, this._update();
|
|
24574
24585
|
}
|
|
24575
24586
|
_createCloseButton() {
|
|
24576
|
-
this.options.closeButton && (this._closeButton =
|
|
24587
|
+
this.options.closeButton && (this._closeButton = fe.create("button", "maplibregl-popup-close-button", this._content), this._closeButton.type = "button", this._closeButton.innerHTML = "×", this._closeButton.addEventListener("click", this._onClose));
|
|
24577
24588
|
}
|
|
24578
24589
|
_focusFirstElement() {
|
|
24579
24590
|
if (!this.options.focusAfterOpen || !this._container) return;
|
|
@@ -24592,7 +24603,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24592
24603
|
return "bottom-left";
|
|
24593
24604
|
}
|
|
24594
24605
|
onAdd(d) {
|
|
24595
|
-
return this._map = d, this._container =
|
|
24606
|
+
return this._map = d, this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-scale", d.getContainer()), this._map.on("move", this._onMove), this._onMove(), this._container;
|
|
24596
24607
|
}
|
|
24597
24608
|
onRemove() {
|
|
24598
24609
|
this._container.remove(), this._map.off("move", this._onMove), this._map = void 0;
|
|
@@ -24606,7 +24617,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24606
24617
|
}, this.options = d;
|
|
24607
24618
|
}
|
|
24608
24619
|
onAdd(d) {
|
|
24609
|
-
return this._map = d, this._container =
|
|
24620
|
+
return this._map = d, this._container = fe.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = fe.create("button", "maplibregl-ctrl-terrain", this._container), fe.create("span", "maplibregl-ctrl-icon", this._terrainButton).setAttribute("aria-hidden", "true"), this._terrainButton.type = "button", this._terrainButton.addEventListener("click", this._toggleTerrain), this._updateTerrainIcon(), this._map.on("terrain", this._updateTerrainIcon), this._container;
|
|
24610
24621
|
}
|
|
24611
24622
|
onRemove() {
|
|
24612
24623
|
this._container.remove(), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
|
|
@@ -24654,9 +24665,9 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
|
|
|
24654
24665
|
}));
|
|
24655
24666
|
})(Ou)), Ou.exports;
|
|
24656
24667
|
}
|
|
24657
|
-
var
|
|
24658
|
-
const Kf = /* @__PURE__ */ Y_(
|
|
24659
|
-
class
|
|
24668
|
+
var cy = ly();
|
|
24669
|
+
const Kf = /* @__PURE__ */ Y_(cy);
|
|
24670
|
+
class uy {
|
|
24660
24671
|
/* eslint-disable no-this-before-super */
|
|
24661
24672
|
constructor(Q) {
|
|
24662
24673
|
Bu(Q.id, "id is required"), this.id = Q.id, this.type = "custom", this.renderingMode = Q.renderingMode || "3d", this.slot = Q.slot, this.beforeId = Q.beforeId, this.map = null;
|
|
@@ -24666,77 +24677,77 @@ class ly {
|
|
|
24666
24677
|
this.map = Q;
|
|
24667
24678
|
}
|
|
24668
24679
|
render(Q, ge) {
|
|
24669
|
-
this.map &&
|
|
24680
|
+
this.map && my(this.map.__deck, this.map, this, ge);
|
|
24670
24681
|
}
|
|
24671
24682
|
}
|
|
24672
24683
|
const wd = "__UNDEFINED__";
|
|
24673
|
-
function sc(
|
|
24674
|
-
return
|
|
24684
|
+
function sc(Se) {
|
|
24685
|
+
return Se.props.beforeId ? `deck-layer-group-before:${Se.props.beforeId}` : Se.props.slot ? `deck-layer-group-slot:${Se.props.slot}` : "deck-layer-group-last";
|
|
24675
24686
|
}
|
|
24676
|
-
function
|
|
24677
|
-
if (!
|
|
24687
|
+
function hy(Se, Q, ge) {
|
|
24688
|
+
if (!Se || !Se.style || !Se.style._loaded)
|
|
24678
24689
|
return;
|
|
24679
24690
|
const Ee = Pd(ge, Boolean);
|
|
24680
24691
|
if (Q !== ge) {
|
|
24681
|
-
const R = Pd(Q, Boolean), h = new Set(R.map((mt) => sc(mt))),
|
|
24692
|
+
const R = Pd(Q, Boolean), h = new Set(R.map((mt) => sc(mt))), pe = new Set(Ee.map((mt) => sc(mt)));
|
|
24682
24693
|
for (const mt of h)
|
|
24683
|
-
|
|
24694
|
+
pe.has(mt) || Se.getLayer(mt) && Se.removeLayer(mt);
|
|
24684
24695
|
}
|
|
24685
24696
|
const ze = {};
|
|
24686
24697
|
for (const R of Ee) {
|
|
24687
|
-
const h = sc(R),
|
|
24688
|
-
if (
|
|
24689
|
-
const mt =
|
|
24698
|
+
const h = sc(R), pe = Se.getLayer(h);
|
|
24699
|
+
if (pe) {
|
|
24700
|
+
const mt = pe.implementation || pe;
|
|
24690
24701
|
ze[h] = mt;
|
|
24691
24702
|
} else {
|
|
24692
|
-
const mt = new
|
|
24703
|
+
const mt = new uy({
|
|
24693
24704
|
id: h,
|
|
24694
24705
|
slot: R.props.slot,
|
|
24695
24706
|
beforeId: R.props.beforeId
|
|
24696
24707
|
});
|
|
24697
|
-
ze[h] = mt,
|
|
24708
|
+
ze[h] = mt, Se.addLayer(mt, R.props.beforeId);
|
|
24698
24709
|
}
|
|
24699
24710
|
}
|
|
24700
|
-
const je =
|
|
24711
|
+
const je = Se.style._order;
|
|
24701
24712
|
for (const [R, h] of Object.entries(ze)) {
|
|
24702
|
-
const
|
|
24713
|
+
const pe = h.beforeId || wd, mt = pe === wd ? je.length : je.indexOf(pe);
|
|
24703
24714
|
if (je.indexOf(R) !== mt - 1) {
|
|
24704
|
-
const Ui =
|
|
24705
|
-
|
|
24715
|
+
const Ui = pe === wd ? void 0 : pe;
|
|
24716
|
+
Se.moveLayer(R, Ui);
|
|
24706
24717
|
}
|
|
24707
24718
|
}
|
|
24708
24719
|
}
|
|
24709
|
-
const ka = "mapbox", Td = 512,
|
|
24710
|
-
function
|
|
24711
|
-
if (
|
|
24712
|
-
return
|
|
24720
|
+
const ka = "mapbox", Td = 512, dy = Math.PI / 180;
|
|
24721
|
+
function py({ map: Se, deck: Q }) {
|
|
24722
|
+
if (Se.__deck)
|
|
24723
|
+
return Se.__deck;
|
|
24713
24724
|
const ge = Q.props._customRender, Ee = Q.props.onLoad, ze = {
|
|
24714
24725
|
...Q.props,
|
|
24715
24726
|
_customRender: () => {
|
|
24716
|
-
|
|
24727
|
+
Se.triggerRepaint(), ge?.("");
|
|
24717
24728
|
}
|
|
24718
24729
|
};
|
|
24719
|
-
return ze.views || (ze.views = Vu(
|
|
24730
|
+
return ze.views || (ze.views = Vu(Se)), Object.assign(ze, {
|
|
24720
24731
|
width: null,
|
|
24721
24732
|
height: null,
|
|
24722
24733
|
touchAction: "unset",
|
|
24723
|
-
viewState: oc(
|
|
24724
|
-
}), Q.isInitialized ? Jf(Q,
|
|
24725
|
-
Ee?.(), Jf(Q,
|
|
24726
|
-
}, Q.setProps(ze),
|
|
24727
|
-
Q.isInitialized &&
|
|
24734
|
+
viewState: oc(Se)
|
|
24735
|
+
}), Q.isInitialized ? Jf(Q, Se) : ze.onLoad = () => {
|
|
24736
|
+
Ee?.(), Jf(Q, Se);
|
|
24737
|
+
}, Q.setProps(ze), Se.__deck = Q, Se.on("render", () => {
|
|
24738
|
+
Q.isInitialized && _y(Q, Se);
|
|
24728
24739
|
}), Q;
|
|
24729
24740
|
}
|
|
24730
|
-
function Jf(
|
|
24741
|
+
function Jf(Se, Q) {
|
|
24731
24742
|
const ge = () => {
|
|
24732
|
-
|
|
24743
|
+
Se.isInitialized ? yy(Se, Q) : Q.off("move", ge);
|
|
24733
24744
|
};
|
|
24734
24745
|
Q.on("move", ge);
|
|
24735
24746
|
}
|
|
24736
|
-
function
|
|
24737
|
-
|
|
24747
|
+
function fy(Se) {
|
|
24748
|
+
Se.__deck?.finalize(), Se.__deck = null;
|
|
24738
24749
|
}
|
|
24739
|
-
function Sd(
|
|
24750
|
+
function Sd(Se, Q) {
|
|
24740
24751
|
return Q ? {
|
|
24741
24752
|
depthWriteEnabled: !0,
|
|
24742
24753
|
depthCompare: "less-equal",
|
|
@@ -24750,14 +24761,14 @@ function Sd(Ie, Q) {
|
|
|
24750
24761
|
blendAlphaOperation: "add"
|
|
24751
24762
|
} : {};
|
|
24752
24763
|
}
|
|
24753
|
-
function
|
|
24754
|
-
if (!
|
|
24764
|
+
function my(Se, Q, ge, Ee) {
|
|
24765
|
+
if (!Se.isInitialized)
|
|
24755
24766
|
return;
|
|
24756
|
-
let { currentViewport: ze } =
|
|
24757
|
-
ze || (ze = tm(
|
|
24767
|
+
let { currentViewport: ze } = Se.userData, je = !1;
|
|
24768
|
+
ze || (ze = tm(Se, Q, Ee), Se.userData.currentViewport = ze, je = !0), ze && Se._drawLayers("mapbox-repaint", {
|
|
24758
24769
|
viewports: [ze],
|
|
24759
24770
|
layerFilter: (R) => {
|
|
24760
|
-
if (
|
|
24771
|
+
if (Se.props.layerFilter && !Se.props.layerFilter(R))
|
|
24761
24772
|
return !1;
|
|
24762
24773
|
const h = R.layer;
|
|
24763
24774
|
return h.props.beforeId === ge.beforeId && h.props.slot === ge.slot;
|
|
@@ -24766,8 +24777,8 @@ function py(Ie, Q, ge, Ee) {
|
|
|
24766
24777
|
clearCanvas: !1
|
|
24767
24778
|
});
|
|
24768
24779
|
}
|
|
24769
|
-
function em(
|
|
24770
|
-
const Q =
|
|
24780
|
+
function em(Se) {
|
|
24781
|
+
const Q = Se.getProjection?.(), ge = (
|
|
24771
24782
|
// maplibre projection spec
|
|
24772
24783
|
Q?.type || // mapbox projection spec
|
|
24773
24784
|
Q?.name
|
|
@@ -24778,74 +24789,74 @@ function em(Ie) {
|
|
|
24778
24789
|
throw new Error("Unsupported projection");
|
|
24779
24790
|
return "mercator";
|
|
24780
24791
|
}
|
|
24781
|
-
function Vu(
|
|
24782
|
-
return em(
|
|
24792
|
+
function Vu(Se) {
|
|
24793
|
+
return em(Se) === "globe" ? new ty({ id: ka }) : new K_({ id: ka });
|
|
24783
24794
|
}
|
|
24784
|
-
function oc(
|
|
24785
|
-
const { lng: Q, lat: ge } =
|
|
24795
|
+
function oc(Se) {
|
|
24796
|
+
const { lng: Q, lat: ge } = Se.getCenter(), Ee = {
|
|
24786
24797
|
// Longitude returned by getCenter can be outside of [-180, 180] when zooming near the anti meridian
|
|
24787
24798
|
// https://github.com/visgl/deck.gl/issues/6894
|
|
24788
24799
|
longitude: (Q + 540) % 360 - 180,
|
|
24789
24800
|
latitude: ge,
|
|
24790
|
-
zoom:
|
|
24791
|
-
bearing:
|
|
24792
|
-
pitch:
|
|
24793
|
-
padding:
|
|
24794
|
-
repeat:
|
|
24801
|
+
zoom: Se.getZoom(),
|
|
24802
|
+
bearing: Se.getBearing(),
|
|
24803
|
+
pitch: Se.getPitch(),
|
|
24804
|
+
padding: Se.getPadding(),
|
|
24805
|
+
repeat: Se.getRenderWorldCopies()
|
|
24795
24806
|
};
|
|
24796
|
-
return
|
|
24807
|
+
return Se.getTerrain?.() && gy(Se, Ee), Ee;
|
|
24797
24808
|
}
|
|
24798
|
-
function
|
|
24799
|
-
if (
|
|
24800
|
-
const { position: ge } =
|
|
24809
|
+
function gy(Se, Q) {
|
|
24810
|
+
if (Se.getFreeCameraOptions) {
|
|
24811
|
+
const { position: ge } = Se.getFreeCameraOptions();
|
|
24801
24812
|
if (!ge || ge.z === void 0)
|
|
24802
24813
|
return;
|
|
24803
|
-
const Ee =
|
|
24814
|
+
const Ee = Se.transform.height, { longitude: ze, latitude: je, pitch: R } = Q, h = ge.x * Td, pe = (1 - ge.y) * Td, mt = ge.z * Td, Kt = J_([ze, je]), Ui = h - Kt[0], gr = pe - Kt[1], Vt = Math.sqrt(Ui * Ui + gr * gr), Di = R * dy, Xe = 1.5 * Ee, lr = Di < 1e-3 ? (
|
|
24804
24815
|
// Pitch angle too small to deduce the look at point, assume elevation is 0
|
|
24805
24816
|
Xe * Math.cos(Di) / mt
|
|
24806
24817
|
) : Xe * Math.sin(Di) / Vt;
|
|
24807
24818
|
Q.zoom = Math.log2(lr);
|
|
24808
|
-
const pi = Xe * Math.cos(Di) / lr,
|
|
24809
|
-
Q.position = [0, 0,
|
|
24810
|
-
} else typeof
|
|
24819
|
+
const pi = Xe * Math.cos(Di) / lr, fe = mt - pi;
|
|
24820
|
+
Q.position = [0, 0, fe / Q_(je)];
|
|
24821
|
+
} else typeof Se.transform.elevation == "number" && (Q.position = [0, 0, Se.transform.elevation]);
|
|
24811
24822
|
}
|
|
24812
|
-
function tm(
|
|
24813
|
-
const Ee = oc(Q), ze =
|
|
24823
|
+
function tm(Se, Q, ge) {
|
|
24824
|
+
const Ee = oc(Q), ze = Se.getView(ka) || Vu(Q);
|
|
24814
24825
|
ge && (ze.props.nearZMultiplier = 0.2);
|
|
24815
24826
|
const je = ge?.nearZ ?? Q.transform._nearZ, R = ge?.farZ ?? Q.transform._farZ;
|
|
24816
24827
|
return Number.isFinite(je) && (Ee.nearZ = je / Q.transform.height, Ee.farZ = R / Q.transform.height), ze.makeViewport({
|
|
24817
|
-
width:
|
|
24818
|
-
height:
|
|
24828
|
+
width: Se.width,
|
|
24829
|
+
height: Se.height,
|
|
24819
24830
|
viewState: Ee
|
|
24820
24831
|
});
|
|
24821
24832
|
}
|
|
24822
|
-
function
|
|
24823
|
-
const Ee = Pd(
|
|
24824
|
-
let ze =
|
|
24833
|
+
function _y(Se, Q) {
|
|
24834
|
+
const Ee = Pd(Se.props.layers, Boolean).some((h) => h && !Q.getLayer(sc(h)));
|
|
24835
|
+
let ze = Se.getViewports();
|
|
24825
24836
|
const je = ze.findIndex((h) => h.id === ka), R = ze.length > 1 || je < 0;
|
|
24826
24837
|
if (Ee || R) {
|
|
24827
24838
|
if (je >= 0) {
|
|
24828
24839
|
ze = ze.slice();
|
|
24829
|
-
const h = tm(
|
|
24840
|
+
const h = tm(Se, Q);
|
|
24830
24841
|
h ? ze[je] = h : ze.splice(je, 1);
|
|
24831
24842
|
}
|
|
24832
|
-
|
|
24843
|
+
Se._drawLayers("mapbox-repaint", {
|
|
24833
24844
|
viewports: ze,
|
|
24834
|
-
layerFilter: (h) => (!
|
|
24845
|
+
layerFilter: (h) => (!Se.props.layerFilter || Se.props.layerFilter(h)) && (h.viewport.id !== ka || !Q.getLayer(sc(h.layer))),
|
|
24835
24846
|
clearCanvas: !1
|
|
24836
24847
|
});
|
|
24837
24848
|
} else {
|
|
24838
|
-
const h =
|
|
24839
|
-
|
|
24849
|
+
const h = Se.device, pe = h?.gl;
|
|
24850
|
+
Se.props.onBeforeRender?.({ device: h, gl: pe }), Se.props.onAfterRender?.({ device: h, gl: pe });
|
|
24840
24851
|
}
|
|
24841
|
-
|
|
24852
|
+
Se.userData.currentViewport = null;
|
|
24842
24853
|
}
|
|
24843
|
-
function
|
|
24844
|
-
|
|
24854
|
+
function yy(Se, Q) {
|
|
24855
|
+
Se.setProps({
|
|
24845
24856
|
viewState: oc(Q)
|
|
24846
|
-
}),
|
|
24857
|
+
}), Se.needsRedraw({ clearRedrawFlags: !0 });
|
|
24847
24858
|
}
|
|
24848
|
-
class
|
|
24859
|
+
class vy {
|
|
24849
24860
|
constructor(Q) {
|
|
24850
24861
|
this._handleStyleChange = () => {
|
|
24851
24862
|
if (this._resolveLayers(this._map, this._deck, this._props.layers, this._props.layers), !this._map)
|
|
@@ -24953,7 +24964,7 @@ class _y {
|
|
|
24953
24964
|
}
|
|
24954
24965
|
_onAddInterleaved(Q) {
|
|
24955
24966
|
const ge = Q.painter.context.gl;
|
|
24956
|
-
return ge instanceof WebGLRenderingContext && ey.warn("Incompatible basemap library. See: https://deck.gl/docs/api-reference/mapbox/overview#compatibility")(), this._deck =
|
|
24967
|
+
return ge instanceof WebGLRenderingContext && ey.warn("Incompatible basemap library. See: https://deck.gl/docs/api-reference/mapbox/overview#compatibility")(), this._deck = py({
|
|
24957
24968
|
map: Q,
|
|
24958
24969
|
deck: new Xf({
|
|
24959
24970
|
...this._props,
|
|
@@ -24964,7 +24975,7 @@ class _y {
|
|
|
24964
24975
|
}), Q.on("styledata", this._handleStyleChange), this._resolveLayers(Q, this._deck, [], this._props.layers), document.createElement("div");
|
|
24965
24976
|
}
|
|
24966
24977
|
_resolveLayers(Q, ge, Ee, ze) {
|
|
24967
|
-
|
|
24978
|
+
hy(Q, Ee, ze);
|
|
24968
24979
|
}
|
|
24969
24980
|
/** Called when the control is removed from a map */
|
|
24970
24981
|
onRemove() {
|
|
@@ -24975,7 +24986,7 @@ class _y {
|
|
|
24975
24986
|
Q.off("resize", this._updateContainerSize), Q.off("render", this._updateViewState), Q.off("mousedown", this._handleMouseEvent), Q.off("dragstart", this._handleMouseEvent), Q.off("drag", this._handleMouseEvent), Q.off("dragend", this._handleMouseEvent), Q.off("mousemove", this._handleMouseEvent), Q.off("mouseout", this._handleMouseEvent), Q.off("click", this._handleMouseEvent), Q.off("dblclick", this._handleMouseEvent), this._deck?.finalize();
|
|
24976
24987
|
}
|
|
24977
24988
|
_onRemoveInterleaved(Q) {
|
|
24978
|
-
Q.off("styledata", this._handleStyleChange), this._resolveLayers(Q, this._deck, this._props.layers, []),
|
|
24989
|
+
Q.off("styledata", this._handleStyleChange), this._resolveLayers(Q, this._deck, this._props.layers, []), fy(Q);
|
|
24979
24990
|
}
|
|
24980
24991
|
getDefaultPosition() {
|
|
24981
24992
|
return "top-left";
|
|
@@ -25007,7 +25018,7 @@ class _y {
|
|
|
25007
25018
|
return ge.some((ze) => ze.id === ka) ? this._props.views : [Vu(Q), ...ge];
|
|
25008
25019
|
}
|
|
25009
25020
|
}
|
|
25010
|
-
class
|
|
25021
|
+
class wy {
|
|
25011
25022
|
map;
|
|
25012
25023
|
overlay;
|
|
25013
25024
|
/** Our own compact attribution control (spec: "attribution becomes correct, not optional") — undefined when the author opted out. */
|
|
@@ -25055,14 +25066,16 @@ class xy {
|
|
|
25055
25066
|
bearing: Ee.bearing ?? 0,
|
|
25056
25067
|
// MapLibre's default control is replaced by our own below so preset-
|
|
25057
25068
|
// level attribution overrides survive style swaps deterministically.
|
|
25058
|
-
attributionControl: !1
|
|
25059
|
-
|
|
25060
|
-
|
|
25061
|
-
}), this.
|
|
25069
|
+
attributionControl: !1,
|
|
25070
|
+
// OSM's tile server needs a request it can identify — see basemap-request.ts.
|
|
25071
|
+
transformRequest: (pe) => oy(pe)
|
|
25072
|
+
}), this.mountAttribution(ge.attribution), this.map.once("load", () => this.markInitialized()), this.map.on("error", (pe) => {
|
|
25073
|
+
this.initialized || (console.error("[onlymapjs] basemap error before load — settling readiness:", pe?.error ?? pe), this.markInitialized());
|
|
25074
|
+
}), this.overlay = new vy({
|
|
25062
25075
|
interleaved: !1,
|
|
25063
25076
|
...ze,
|
|
25064
|
-
onAfterRender: (
|
|
25065
|
-
this.drainDeckCaptures(), ze.onAfterRender?.(
|
|
25077
|
+
onAfterRender: (pe) => {
|
|
25078
|
+
this.drainDeckCaptures(), ze.onAfterRender?.(pe);
|
|
25066
25079
|
}
|
|
25067
25080
|
}), this.map.addControl(this.overlay), this.wireIdleLatch();
|
|
25068
25081
|
}
|
|
@@ -25145,14 +25158,14 @@ class xy {
|
|
|
25145
25158
|
this.pendingCaptureRejects.add(ge);
|
|
25146
25159
|
let Ee, ze;
|
|
25147
25160
|
const je = (h) => {
|
|
25148
|
-
const
|
|
25149
|
-
return
|
|
25161
|
+
const pe = document.createElement("canvas");
|
|
25162
|
+
return pe.width = h.width, pe.height = h.height, pe.getContext("2d").drawImage(h, 0, 0), pe;
|
|
25150
25163
|
}, R = () => {
|
|
25151
25164
|
if (!Ee || ze === void 0) return;
|
|
25152
25165
|
const h = document.createElement("canvas");
|
|
25153
25166
|
h.width = Ee.width, h.height = Ee.height;
|
|
25154
|
-
const
|
|
25155
|
-
|
|
25167
|
+
const pe = h.getContext("2d");
|
|
25168
|
+
pe.drawImage(Ee, 0, 0), ze && pe.drawImage(ze, 0, 0, h.width, h.height), this.pendingCaptureRejects.delete(ge), Q(h);
|
|
25156
25169
|
};
|
|
25157
25170
|
this.map.once("render", () => {
|
|
25158
25171
|
Ee = je(this.map.getCanvas()), R();
|
|
@@ -25345,5 +25358,5 @@ class xy {
|
|
|
25345
25358
|
}
|
|
25346
25359
|
}
|
|
25347
25360
|
export {
|
|
25348
|
-
|
|
25361
|
+
wy as MapLibreBasemapAdapter
|
|
25349
25362
|
};
|