@maptiler/sdk 3.10.0-rc.1 → 3.10.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/maptiler-sdk.mjs
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
var
|
|
1
|
+
var mi = Object.defineProperty;
|
|
2
2
|
var Pn = (r) => {
|
|
3
3
|
throw TypeError(r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var g = (r, e, t) =>
|
|
5
|
+
var yi = (r, e, t) => e in r ? mi(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
6
|
+
var g = (r, e, t) => yi(r, typeof e != "symbol" ? e + "" : e, t), gr = (r, e, t) => e.has(r) || Pn("Cannot " + t);
|
|
7
7
|
var k = (r, e, t) => (gr(r, e, "read from private field"), t ? t.call(r) : e.get(r)), Y = (r, e, t) => e.has(r) ? Pn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), W = (r, e, t, n) => (gr(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), J = (r, e, t) => (gr(r, e, "access private method"), t);
|
|
8
8
|
import L from "maplibre-gl";
|
|
9
|
-
import { Base64 as
|
|
10
|
-
import
|
|
11
|
-
import { Language as
|
|
12
|
-
import { MapStyle as
|
|
13
|
-
import { v4 as
|
|
14
|
-
let
|
|
9
|
+
import { Base64 as gi } from "js-base64";
|
|
10
|
+
import vi from "events";
|
|
11
|
+
import { Language as bi, getLanguageInfoFromCode as Rn, config as vr, MapStyle as ft, mapStylePresetList as br, expandMapStyle as wi, MapStyleVariant as Si, ReferenceMapStyle as xi, toLanguageInfo as zn, getLanguageInfoFromFlag as ki, geolocation as On } from "@maptiler/client";
|
|
12
|
+
import { MapStyle as wf, MapStyleVariant as Sf, ReferenceMapStyle as xf, ServiceError as kf, areSameLanguages as Lf, bufferToPixelDataBrowser as Cf, canParsePixelData as Ef, circumferenceAtLatitude as Af, coordinates as Tf, data as _f, elevation as If, expandMapStyle as Mf, geocoding as Pf, geolocation as Rf, getAutoLanguage as zf, getBufferToPixelDataParser as Of, getLanguageInfoFromCode as Ff, getLanguageInfoFromFlag as $f, getLanguageInfoFromKey as Nf, getTileCache as jf, isLanguageInfo as Df, mapStylePresetList as Uf, math as Bf, misc as qf, staticMaps as Vf, styleToStyle as Gf, toLanguageInfo as Hf } from "@maptiler/client";
|
|
13
|
+
import { v4 as Li } from "uuid";
|
|
14
|
+
let Ci = class extends L.Marker {
|
|
15
15
|
addTo(e) {
|
|
16
16
|
return super.addTo(e);
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
class
|
|
19
|
+
class Wc extends L.Popup {
|
|
20
20
|
addTo(e) {
|
|
21
21
|
return super.addTo(e);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
class
|
|
24
|
+
class Jc extends L.Style {
|
|
25
25
|
constructor(e, t = {}) {
|
|
26
26
|
super(e, t);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
class
|
|
29
|
+
class Qc extends L.CanvasSource {
|
|
30
30
|
onAdd(e) {
|
|
31
31
|
super.onAdd(e);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
class
|
|
34
|
+
class ep extends L.GeoJSONSource {
|
|
35
35
|
onAdd(e) {
|
|
36
36
|
super.onAdd(e);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
class
|
|
39
|
+
class tp extends L.ImageSource {
|
|
40
40
|
onAdd(e) {
|
|
41
41
|
super.onAdd(e);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
class
|
|
44
|
+
class rp extends L.RasterTileSource {
|
|
45
45
|
onAdd(e) {
|
|
46
46
|
super.onAdd(e);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
class
|
|
49
|
+
class np extends L.RasterDEMTileSource {
|
|
50
50
|
onAdd(e) {
|
|
51
51
|
super.onAdd(e);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
class
|
|
54
|
+
class ap extends L.VectorTileSource {
|
|
55
55
|
onAdd(e) {
|
|
56
56
|
super.onAdd(e);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
class
|
|
59
|
+
class op extends L.VideoSource {
|
|
60
60
|
onAdd(e) {
|
|
61
61
|
super.onAdd(e);
|
|
62
62
|
}
|
|
@@ -66,72 +66,72 @@ class Na extends L.NavigationControl {
|
|
|
66
66
|
return super.onAdd(e);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
class
|
|
69
|
+
class Ei extends L.GeolocateControl {
|
|
70
70
|
onAdd(e) {
|
|
71
71
|
return super.onAdd(e);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
class
|
|
74
|
+
class ip extends L.AttributionControl {
|
|
75
75
|
onAdd(e) {
|
|
76
76
|
return super.onAdd(e);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
class
|
|
79
|
+
class Ai extends L.LogoControl {
|
|
80
80
|
onAdd(e) {
|
|
81
81
|
return super.onAdd(e);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
class
|
|
84
|
+
class Ti extends L.ScaleControl {
|
|
85
85
|
onAdd(e) {
|
|
86
86
|
return super.onAdd(e);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
class
|
|
89
|
+
class _i extends L.FullscreenControl {
|
|
90
90
|
onAdd(e) {
|
|
91
91
|
return super.onAdd(e);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
class
|
|
94
|
+
class sp extends L.TerrainControl {
|
|
95
95
|
onAdd(e) {
|
|
96
96
|
return super.onAdd(e);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
class
|
|
99
|
+
class lp extends L.BoxZoomHandler {
|
|
100
100
|
constructor(e, t) {
|
|
101
101
|
super(e, t);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
class
|
|
104
|
+
class up extends L.ScrollZoomHandler {
|
|
105
105
|
constructor(e, t) {
|
|
106
106
|
super(e, t);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
class
|
|
109
|
+
class cp extends L.CooperativeGesturesHandler {
|
|
110
110
|
constructor(e, t) {
|
|
111
111
|
super(e, t);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class
|
|
114
|
+
class pp extends L.KeyboardHandler {
|
|
115
115
|
constructor(e) {
|
|
116
116
|
super(e);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
class
|
|
119
|
+
class fp extends L.TwoFingersTouchPitchHandler {
|
|
120
120
|
constructor(e) {
|
|
121
121
|
super(e);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
class
|
|
124
|
+
class dp extends L.MapWheelEvent {
|
|
125
125
|
constructor(e, t, n) {
|
|
126
126
|
super(e, t, n);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
class
|
|
129
|
+
class hp extends L.MapTouchEvent {
|
|
130
130
|
constructor(e, t, n) {
|
|
131
131
|
super(e, t, n);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
class
|
|
134
|
+
class mp extends L.MapMouseEvent {
|
|
135
135
|
constructor(e, t, n, a = {}) {
|
|
136
136
|
super(e, t, n, a);
|
|
137
137
|
}
|
|
@@ -183,9 +183,9 @@ const z = {
|
|
|
183
183
|
isMode: !0,
|
|
184
184
|
geocoding: !1
|
|
185
185
|
},
|
|
186
|
-
...
|
|
186
|
+
...bi
|
|
187
187
|
};
|
|
188
|
-
function
|
|
188
|
+
function Fn() {
|
|
189
189
|
if (typeof navigator > "u") {
|
|
190
190
|
const e = Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0], t = Rn(e);
|
|
191
191
|
return t || z.ENGLISH;
|
|
@@ -204,8 +204,8 @@ const te = {
|
|
|
204
204
|
terrainSourceId: "maptiler-terrain"
|
|
205
205
|
};
|
|
206
206
|
Object.freeze(te);
|
|
207
|
-
const on =
|
|
208
|
-
class
|
|
207
|
+
const on = Li();
|
|
208
|
+
class Ii extends vi {
|
|
209
209
|
constructor() {
|
|
210
210
|
super(...arguments);
|
|
211
211
|
/**
|
|
@@ -295,8 +295,8 @@ class _i extends gi {
|
|
|
295
295
|
return vr.fetch;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
const j = new
|
|
299
|
-
class
|
|
298
|
+
const j = new Ii();
|
|
299
|
+
class $n extends Ai {
|
|
300
300
|
constructor(t = {}) {
|
|
301
301
|
super(t);
|
|
302
302
|
g(this, "logoURL", "");
|
|
@@ -309,11 +309,11 @@ class Fn extends Ei {
|
|
|
309
309
|
return n.style.backgroundRepeat = "no-repeat", n.style.cursor = "pointer", n.style.display = "block", n.style.height = "23px", n.style.margin = "0 0 -4px -4px", n.style.overflow = "hidden", n.style.width = "88px", n.style.backgroundImage = `url(${this.logoURL})`, n.style.backgroundSize = "100px 30px", n.style.width = "100px", n.style.height = "30px", n.target = "_blank", n.rel = "noopener", n.href = this.linkURL, n.setAttribute("aria-label", "MapTiler logo"), n.setAttribute("rel", "noopener"), this._container.appendChild(n), this._container.style.display = "block", this._map.on("resize", this._updateCompact), this._updateCompact(), this._container;
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
const
|
|
313
|
-
function
|
|
312
|
+
const $r = "localcache_source", Nr = "localcache", Mi = "maptiler_sdk", Pi = 1e3, Ri = 100, jr = typeof caches < "u", { addProtocol: Nn } = L;
|
|
313
|
+
function zi(r, e) {
|
|
314
314
|
if (jr && j.caching && j.session && r.host === te.maptilerApiHost) {
|
|
315
315
|
if (e === "Source" && r.href.includes("tiles.json"))
|
|
316
|
-
return r.href.replace("https://", `${
|
|
316
|
+
return r.href.replace("https://", `${$r}://`);
|
|
317
317
|
if (e === "Tile" || e === "Glyphs")
|
|
318
318
|
return r.href.replace("https://", `${Nr}://`);
|
|
319
319
|
}
|
|
@@ -321,20 +321,20 @@ function Ri(r, e) {
|
|
|
321
321
|
}
|
|
322
322
|
let wr;
|
|
323
323
|
async function ja() {
|
|
324
|
-
return wr || (wr = await caches.open(
|
|
324
|
+
return wr || (wr = await caches.open(Mi)), wr;
|
|
325
325
|
}
|
|
326
326
|
let jn = 0;
|
|
327
|
-
async function
|
|
328
|
-
const r = await ja(), e = await r.keys(), t = e.slice(0, Math.max(e.length -
|
|
327
|
+
async function Oi() {
|
|
328
|
+
const r = await ja(), e = await r.keys(), t = e.slice(0, Math.max(e.length - Pi, 0));
|
|
329
329
|
for (const n of t)
|
|
330
330
|
r.delete(n);
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function Fi() {
|
|
333
333
|
Nn(
|
|
334
|
-
|
|
334
|
+
$r,
|
|
335
335
|
async (r, e) => {
|
|
336
336
|
if (!r.url) throw new Error("");
|
|
337
|
-
r.url = r.url.replace(`${
|
|
337
|
+
r.url = r.url.replace(`${$r}://`, "https://");
|
|
338
338
|
const t = r;
|
|
339
339
|
t.signal = e.signal;
|
|
340
340
|
const n = await fetch(r.url, t), a = await n.json();
|
|
@@ -362,7 +362,7 @@ function Oi() {
|
|
|
362
362
|
c.signal = e.signal;
|
|
363
363
|
const p = await fetch(i, c);
|
|
364
364
|
return p.status >= 200 && p.status < 300 && (l.put(a, p.clone()).catch(() => {
|
|
365
|
-
}), ++jn >
|
|
365
|
+
}), ++jn > Ri && (Oi(), jn = 0)), s(p);
|
|
366
366
|
});
|
|
367
367
|
}
|
|
368
368
|
function $i(r, e) {
|
|
@@ -379,7 +379,7 @@ function Dn(r, e) {
|
|
|
379
379
|
};
|
|
380
380
|
}
|
|
381
381
|
return t.host === te.maptilerApiHost && (t.searchParams.has("key") || t.searchParams.append("key", j.apiKey), j.session && t.searchParams.append("mtsid", on)), {
|
|
382
|
-
url:
|
|
382
|
+
url: zi(t, e)
|
|
383
383
|
};
|
|
384
384
|
}
|
|
385
385
|
function Un(r) {
|
|
@@ -400,18 +400,18 @@ function Da() {
|
|
|
400
400
|
function Qt(r) {
|
|
401
401
|
return /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi.test(r);
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function Ni(r) {
|
|
404
404
|
try {
|
|
405
405
|
return JSON.parse(r);
|
|
406
406
|
} catch {
|
|
407
407
|
}
|
|
408
408
|
return null;
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function ji() {
|
|
411
411
|
return document.createElement("canvas").getContext("webgl2") ? null : typeof WebGL2RenderingContext < "u" ? "Graphic rendering with WebGL2 has been disabled or is not supported by your graphic card. The map cannot be displayed." : "Your browser does not support graphic rendering with WebGL2. The map cannot be displayed.";
|
|
412
412
|
}
|
|
413
|
-
function
|
|
414
|
-
const e =
|
|
413
|
+
function Di(r) {
|
|
414
|
+
const e = ji();
|
|
415
415
|
if (!e) return;
|
|
416
416
|
let t = null;
|
|
417
417
|
if (typeof r == "string" ? t = document.getElementById(r) : r instanceof HTMLElement && (t = r), !t)
|
|
@@ -419,14 +419,14 @@ function ji(r) {
|
|
|
419
419
|
const n = document.createElement("div");
|
|
420
420
|
throw n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n), new Error(e);
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function yp(r) {
|
|
423
423
|
const e = "The WebGL context was lost.", t = r.getContainer(), n = document.createElement("div");
|
|
424
424
|
n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n);
|
|
425
425
|
}
|
|
426
426
|
function Bn(r, e) {
|
|
427
427
|
return !(!Array.isArray(r) || r.length !== 2 || r[0] !== "get" || typeof r[1] != "string" || e && !r[1].startsWith("name:") || !e && r[1] !== "name");
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function Ui(r, e, t) {
|
|
430
430
|
const n = structuredClone(r), a = (o) => {
|
|
431
431
|
if (typeof o != "string")
|
|
432
432
|
for (let i = 0; i < o.length; i += 1)
|
|
@@ -434,18 +434,18 @@ function Di(r, e, t) {
|
|
|
434
434
|
};
|
|
435
435
|
return Bn(n, t) ? e : (a(n), n);
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function Bi(r, e) {
|
|
438
438
|
const t = e ? /\{name:\S+\}/ : /\{name\}/;
|
|
439
439
|
return {
|
|
440
440
|
contains: t.test(r),
|
|
441
441
|
exactMatch: new RegExp(`^${t.source}$`).test(r)
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function qi(r, e, t) {
|
|
445
445
|
const n = t ? /\{name:\S+\}/ : /\{name\}/, a = r.split(n);
|
|
446
446
|
return ["concat", ...a.flatMap((s, l) => l === a.length - 1 ? [s] : [s, e])];
|
|
447
447
|
}
|
|
448
|
-
function
|
|
448
|
+
function Vi(r) {
|
|
449
449
|
var n;
|
|
450
450
|
const e = /\{name(?::(?<language>\S+))?\}/g, t = [];
|
|
451
451
|
for (; ; ) {
|
|
@@ -456,7 +456,7 @@ function qi(r) {
|
|
|
456
456
|
}
|
|
457
457
|
return t;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function Gi(r) {
|
|
460
460
|
return !Array.isArray(r) || r.length !== 2 || r[0] !== "get" || typeof r[1] != "string" ? null : r[1].trim() === "name" ? {
|
|
461
461
|
isLanguage: !0,
|
|
462
462
|
localization: null
|
|
@@ -465,17 +465,17 @@ function Vi(r) {
|
|
|
465
465
|
localization: r[1].trim().split(":").pop()
|
|
466
466
|
} : null;
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function Hi(r) {
|
|
469
469
|
const e = [], t = structuredClone(r), n = (a) => {
|
|
470
470
|
if (typeof a != "string")
|
|
471
471
|
for (let o = 0; o < a.length; o += 1) {
|
|
472
|
-
const i =
|
|
472
|
+
const i = Gi(a[o]);
|
|
473
473
|
i ? e.push(i.localization) : n(a[o]);
|
|
474
474
|
}
|
|
475
475
|
};
|
|
476
476
|
return n([t]), e;
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function Zi(r, e) {
|
|
479
479
|
const t = [];
|
|
480
480
|
for (const o of r) {
|
|
481
481
|
if (o.type !== "symbol")
|
|
@@ -486,10 +486,10 @@ function Hi(r, e) {
|
|
|
486
486
|
const u = e.getLayoutProperty(s, "text-field");
|
|
487
487
|
if (u)
|
|
488
488
|
if (typeof u == "string") {
|
|
489
|
-
const c =
|
|
489
|
+
const c = Vi(u);
|
|
490
490
|
t.push(c);
|
|
491
491
|
} else {
|
|
492
|
-
const c =
|
|
492
|
+
const c = Hi(u);
|
|
493
493
|
t.push(c);
|
|
494
494
|
}
|
|
495
495
|
}
|
|
@@ -501,7 +501,7 @@ function Hi(r, e) {
|
|
|
501
501
|
o === null ? a.unlocalized += 1 : (o in a.localized || (a.localized[o] = 0), a.localized[o] += 1);
|
|
502
502
|
return a;
|
|
503
503
|
}
|
|
504
|
-
var
|
|
504
|
+
var Ki = 8, Xi = {
|
|
505
505
|
version: {
|
|
506
506
|
required: !0,
|
|
507
507
|
type: "enum",
|
|
@@ -579,18 +579,18 @@ var Zi = 8, Ki = {
|
|
|
579
579
|
type: "array",
|
|
580
580
|
value: "layer"
|
|
581
581
|
}
|
|
582
|
-
},
|
|
582
|
+
}, Yi = {
|
|
583
583
|
"*": {
|
|
584
584
|
type: "source"
|
|
585
585
|
}
|
|
586
|
-
},
|
|
586
|
+
}, Wi = [
|
|
587
587
|
"source_vector",
|
|
588
588
|
"source_raster",
|
|
589
589
|
"source_raster_dem",
|
|
590
590
|
"source_geojson",
|
|
591
591
|
"source_video",
|
|
592
592
|
"source_image"
|
|
593
|
-
],
|
|
593
|
+
], Ji = {
|
|
594
594
|
type: {
|
|
595
595
|
required: !0,
|
|
596
596
|
type: "enum",
|
|
@@ -653,7 +653,7 @@ var Zi = 8, Ki = {
|
|
|
653
653
|
"*": {
|
|
654
654
|
type: "*"
|
|
655
655
|
}
|
|
656
|
-
},
|
|
656
|
+
}, Qi = {
|
|
657
657
|
type: {
|
|
658
658
|
required: !0,
|
|
659
659
|
type: "enum",
|
|
@@ -710,7 +710,7 @@ var Zi = 8, Ki = {
|
|
|
710
710
|
"*": {
|
|
711
711
|
type: "*"
|
|
712
712
|
}
|
|
713
|
-
},
|
|
713
|
+
}, es = {
|
|
714
714
|
type: {
|
|
715
715
|
required: !0,
|
|
716
716
|
type: "enum",
|
|
@@ -784,7 +784,7 @@ var Zi = 8, Ki = {
|
|
|
784
784
|
"*": {
|
|
785
785
|
type: "*"
|
|
786
786
|
}
|
|
787
|
-
},
|
|
787
|
+
}, ts = {
|
|
788
788
|
type: {
|
|
789
789
|
required: !0,
|
|
790
790
|
type: "enum",
|
|
@@ -845,7 +845,7 @@ var Zi = 8, Ki = {
|
|
|
845
845
|
promoteId: {
|
|
846
846
|
type: "promoteId"
|
|
847
847
|
}
|
|
848
|
-
},
|
|
848
|
+
}, rs = {
|
|
849
849
|
type: {
|
|
850
850
|
required: !0,
|
|
851
851
|
type: "enum",
|
|
@@ -868,7 +868,7 @@ var Zi = 8, Ki = {
|
|
|
868
868
|
value: "number"
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
|
-
},
|
|
871
|
+
}, ns = {
|
|
872
872
|
type: {
|
|
873
873
|
required: !0,
|
|
874
874
|
type: "enum",
|
|
@@ -890,7 +890,7 @@ var Zi = 8, Ki = {
|
|
|
890
890
|
value: "number"
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
|
-
},
|
|
893
|
+
}, as = {
|
|
894
894
|
id: {
|
|
895
895
|
type: "string",
|
|
896
896
|
required: !0
|
|
@@ -939,7 +939,7 @@ var Zi = 8, Ki = {
|
|
|
939
939
|
paint: {
|
|
940
940
|
type: "paint"
|
|
941
941
|
}
|
|
942
|
-
},
|
|
942
|
+
}, os = [
|
|
943
943
|
"layout_fill",
|
|
944
944
|
"layout_line",
|
|
945
945
|
"layout_circle",
|
|
@@ -950,7 +950,7 @@ var Zi = 8, Ki = {
|
|
|
950
950
|
"layout_hillshade",
|
|
951
951
|
"layout_color-relief",
|
|
952
952
|
"layout_background"
|
|
953
|
-
],
|
|
953
|
+
], is = {
|
|
954
954
|
visibility: {
|
|
955
955
|
type: "enum",
|
|
956
956
|
values: {
|
|
@@ -960,7 +960,7 @@ var Zi = 8, Ki = {
|
|
|
960
960
|
default: "visible",
|
|
961
961
|
"property-type": "constant"
|
|
962
962
|
}
|
|
963
|
-
},
|
|
963
|
+
}, ss = {
|
|
964
964
|
"fill-sort-key": {
|
|
965
965
|
type: "number",
|
|
966
966
|
expression: {
|
|
@@ -981,7 +981,7 @@ var Zi = 8, Ki = {
|
|
|
981
981
|
default: "visible",
|
|
982
982
|
"property-type": "constant"
|
|
983
983
|
}
|
|
984
|
-
},
|
|
984
|
+
}, ls = {
|
|
985
985
|
"circle-sort-key": {
|
|
986
986
|
type: "number",
|
|
987
987
|
expression: {
|
|
@@ -1002,7 +1002,7 @@ var Zi = 8, Ki = {
|
|
|
1002
1002
|
default: "visible",
|
|
1003
1003
|
"property-type": "constant"
|
|
1004
1004
|
}
|
|
1005
|
-
},
|
|
1005
|
+
}, us = {
|
|
1006
1006
|
visibility: {
|
|
1007
1007
|
type: "enum",
|
|
1008
1008
|
values: {
|
|
@@ -1012,7 +1012,7 @@ var Zi = 8, Ki = {
|
|
|
1012
1012
|
default: "visible",
|
|
1013
1013
|
"property-type": "constant"
|
|
1014
1014
|
}
|
|
1015
|
-
},
|
|
1015
|
+
}, cs = {
|
|
1016
1016
|
"line-cap": {
|
|
1017
1017
|
type: "enum",
|
|
1018
1018
|
values: {
|
|
@@ -1098,7 +1098,7 @@ var Zi = 8, Ki = {
|
|
|
1098
1098
|
default: "visible",
|
|
1099
1099
|
"property-type": "constant"
|
|
1100
1100
|
}
|
|
1101
|
-
},
|
|
1101
|
+
}, ps = {
|
|
1102
1102
|
"symbol-placement": {
|
|
1103
1103
|
type: "enum",
|
|
1104
1104
|
values: {
|
|
@@ -1925,7 +1925,7 @@ var Zi = 8, Ki = {
|
|
|
1925
1925
|
default: "visible",
|
|
1926
1926
|
"property-type": "constant"
|
|
1927
1927
|
}
|
|
1928
|
-
},
|
|
1928
|
+
}, fs = {
|
|
1929
1929
|
visibility: {
|
|
1930
1930
|
type: "enum",
|
|
1931
1931
|
values: {
|
|
@@ -1935,7 +1935,7 @@ var Zi = 8, Ki = {
|
|
|
1935
1935
|
default: "visible",
|
|
1936
1936
|
"property-type": "constant"
|
|
1937
1937
|
}
|
|
1938
|
-
},
|
|
1938
|
+
}, ds = {
|
|
1939
1939
|
visibility: {
|
|
1940
1940
|
type: "enum",
|
|
1941
1941
|
values: {
|
|
@@ -1945,10 +1945,10 @@ var Zi = 8, Ki = {
|
|
|
1945
1945
|
default: "visible",
|
|
1946
1946
|
"property-type": "constant"
|
|
1947
1947
|
}
|
|
1948
|
-
},
|
|
1948
|
+
}, hs = {
|
|
1949
1949
|
type: "array",
|
|
1950
1950
|
value: "*"
|
|
1951
|
-
},
|
|
1951
|
+
}, ms = {
|
|
1952
1952
|
type: "enum",
|
|
1953
1953
|
values: {
|
|
1954
1954
|
"==": {},
|
|
@@ -1965,14 +1965,14 @@ var Zi = 8, Ki = {
|
|
|
1965
1965
|
has: {},
|
|
1966
1966
|
"!has": {}
|
|
1967
1967
|
}
|
|
1968
|
-
},
|
|
1968
|
+
}, ys = {
|
|
1969
1969
|
type: "enum",
|
|
1970
1970
|
values: {
|
|
1971
1971
|
Point: {},
|
|
1972
1972
|
LineString: {},
|
|
1973
1973
|
Polygon: {}
|
|
1974
1974
|
}
|
|
1975
|
-
},
|
|
1975
|
+
}, gs = {
|
|
1976
1976
|
type: "array",
|
|
1977
1977
|
minimum: 0,
|
|
1978
1978
|
maximum: 24,
|
|
@@ -1981,11 +1981,11 @@ var Zi = 8, Ki = {
|
|
|
1981
1981
|
"color"
|
|
1982
1982
|
],
|
|
1983
1983
|
length: 2
|
|
1984
|
-
},
|
|
1984
|
+
}, vs = {
|
|
1985
1985
|
type: "array",
|
|
1986
1986
|
value: "*",
|
|
1987
1987
|
minimum: 1
|
|
1988
|
-
},
|
|
1988
|
+
}, bs = {
|
|
1989
1989
|
anchor: {
|
|
1990
1990
|
type: "enum",
|
|
1991
1991
|
default: "viewport",
|
|
@@ -2046,7 +2046,7 @@ var Zi = 8, Ki = {
|
|
|
2046
2046
|
},
|
|
2047
2047
|
transition: !0
|
|
2048
2048
|
}
|
|
2049
|
-
},
|
|
2049
|
+
}, ws = {
|
|
2050
2050
|
"sky-color": {
|
|
2051
2051
|
type: "color",
|
|
2052
2052
|
"property-type": "data-constant",
|
|
@@ -2139,7 +2139,7 @@ var Zi = 8, Ki = {
|
|
|
2139
2139
|
},
|
|
2140
2140
|
transition: !0
|
|
2141
2141
|
}
|
|
2142
|
-
},
|
|
2142
|
+
}, Ss = {
|
|
2143
2143
|
source: {
|
|
2144
2144
|
type: "string",
|
|
2145
2145
|
required: !0
|
|
@@ -2149,7 +2149,7 @@ var Zi = 8, Ki = {
|
|
|
2149
2149
|
minimum: 0,
|
|
2150
2150
|
default: 1
|
|
2151
2151
|
}
|
|
2152
|
-
},
|
|
2152
|
+
}, xs = {
|
|
2153
2153
|
type: {
|
|
2154
2154
|
type: "projectionDefinition",
|
|
2155
2155
|
default: "mercator",
|
|
@@ -2162,7 +2162,7 @@ var Zi = 8, Ki = {
|
|
|
2162
2162
|
]
|
|
2163
2163
|
}
|
|
2164
2164
|
}
|
|
2165
|
-
},
|
|
2165
|
+
}, ks = [
|
|
2166
2166
|
"paint_fill",
|
|
2167
2167
|
"paint_line",
|
|
2168
2168
|
"paint_circle",
|
|
@@ -2173,7 +2173,7 @@ var Zi = 8, Ki = {
|
|
|
2173
2173
|
"paint_hillshade",
|
|
2174
2174
|
"paint_color-relief",
|
|
2175
2175
|
"paint_background"
|
|
2176
|
-
],
|
|
2176
|
+
], Ls = {
|
|
2177
2177
|
"fill-antialias": {
|
|
2178
2178
|
type: "boolean",
|
|
2179
2179
|
default: !0,
|
|
@@ -2289,7 +2289,7 @@ var Zi = 8, Ki = {
|
|
|
2289
2289
|
},
|
|
2290
2290
|
"property-type": "cross-faded-data-driven"
|
|
2291
2291
|
}
|
|
2292
|
-
},
|
|
2292
|
+
}, Cs = {
|
|
2293
2293
|
"line-opacity": {
|
|
2294
2294
|
type: "number",
|
|
2295
2295
|
default: 1,
|
|
@@ -2481,7 +2481,7 @@ var Zi = 8, Ki = {
|
|
|
2481
2481
|
},
|
|
2482
2482
|
"property-type": "color-ramp"
|
|
2483
2483
|
}
|
|
2484
|
-
},
|
|
2484
|
+
}, Es = {
|
|
2485
2485
|
"circle-radius": {
|
|
2486
2486
|
type: "number",
|
|
2487
2487
|
default: 5,
|
|
@@ -2654,7 +2654,7 @@ var Zi = 8, Ki = {
|
|
|
2654
2654
|
},
|
|
2655
2655
|
"property-type": "data-driven"
|
|
2656
2656
|
}
|
|
2657
|
-
},
|
|
2657
|
+
}, As = {
|
|
2658
2658
|
"heatmap-radius": {
|
|
2659
2659
|
type: "number",
|
|
2660
2660
|
default: 30,
|
|
@@ -2745,7 +2745,7 @@ var Zi = 8, Ki = {
|
|
|
2745
2745
|
},
|
|
2746
2746
|
"property-type": "data-constant"
|
|
2747
2747
|
}
|
|
2748
|
-
},
|
|
2748
|
+
}, Ts = {
|
|
2749
2749
|
"icon-opacity": {
|
|
2750
2750
|
type: "number",
|
|
2751
2751
|
default: 1,
|
|
@@ -3009,7 +3009,7 @@ var Zi = 8, Ki = {
|
|
|
3009
3009
|
},
|
|
3010
3010
|
"property-type": "data-constant"
|
|
3011
3011
|
}
|
|
3012
|
-
},
|
|
3012
|
+
}, _s = {
|
|
3013
3013
|
"raster-opacity": {
|
|
3014
3014
|
type: "number",
|
|
3015
3015
|
default: 1,
|
|
@@ -3123,7 +3123,7 @@ var Zi = 8, Ki = {
|
|
|
3123
3123
|
},
|
|
3124
3124
|
"property-type": "data-constant"
|
|
3125
3125
|
}
|
|
3126
|
-
},
|
|
3126
|
+
}, Is = {
|
|
3127
3127
|
"hillshade-illumination-direction": {
|
|
3128
3128
|
type: "numberArray",
|
|
3129
3129
|
default: 335,
|
|
@@ -3235,7 +3235,7 @@ var Zi = 8, Ki = {
|
|
|
3235
3235
|
},
|
|
3236
3236
|
"property-type": "data-constant"
|
|
3237
3237
|
}
|
|
3238
|
-
},
|
|
3238
|
+
}, Ms = {
|
|
3239
3239
|
"background-color": {
|
|
3240
3240
|
type: "color",
|
|
3241
3241
|
default: "#000000",
|
|
@@ -3278,7 +3278,7 @@ var Zi = 8, Ki = {
|
|
|
3278
3278
|
},
|
|
3279
3279
|
"property-type": "data-constant"
|
|
3280
3280
|
}
|
|
3281
|
-
},
|
|
3281
|
+
}, Ps = {
|
|
3282
3282
|
duration: {
|
|
3283
3283
|
type: "number",
|
|
3284
3284
|
default: 300,
|
|
@@ -3291,27 +3291,27 @@ var Zi = 8, Ki = {
|
|
|
3291
3291
|
minimum: 0,
|
|
3292
3292
|
units: "milliseconds"
|
|
3293
3293
|
}
|
|
3294
|
-
},
|
|
3294
|
+
}, Rs = {
|
|
3295
3295
|
"*": {
|
|
3296
3296
|
type: "string"
|
|
3297
3297
|
}
|
|
3298
|
-
},
|
|
3299
|
-
$version:
|
|
3300
|
-
$root:
|
|
3301
|
-
sources:
|
|
3302
|
-
source:
|
|
3303
|
-
source_vector:
|
|
3304
|
-
source_raster:
|
|
3305
|
-
source_raster_dem:
|
|
3306
|
-
source_geojson:
|
|
3307
|
-
source_video:
|
|
3308
|
-
source_image:
|
|
3309
|
-
layer:
|
|
3310
|
-
layout:
|
|
3311
|
-
layout_background:
|
|
3312
|
-
layout_fill:
|
|
3313
|
-
layout_circle:
|
|
3314
|
-
layout_heatmap:
|
|
3298
|
+
}, zs = {
|
|
3299
|
+
$version: Ki,
|
|
3300
|
+
$root: Xi,
|
|
3301
|
+
sources: Yi,
|
|
3302
|
+
source: Wi,
|
|
3303
|
+
source_vector: Ji,
|
|
3304
|
+
source_raster: Qi,
|
|
3305
|
+
source_raster_dem: es,
|
|
3306
|
+
source_geojson: ts,
|
|
3307
|
+
source_video: rs,
|
|
3308
|
+
source_image: ns,
|
|
3309
|
+
layer: as,
|
|
3310
|
+
layout: os,
|
|
3311
|
+
layout_background: is,
|
|
3312
|
+
layout_fill: ss,
|
|
3313
|
+
layout_circle: ls,
|
|
3314
|
+
layout_heatmap: us,
|
|
3315
3315
|
"layout_fill-extrusion": {
|
|
3316
3316
|
visibility: {
|
|
3317
3317
|
type: "enum",
|
|
@@ -3323,10 +3323,10 @@ var Zi = 8, Ki = {
|
|
|
3323
3323
|
"property-type": "constant"
|
|
3324
3324
|
}
|
|
3325
3325
|
},
|
|
3326
|
-
layout_line:
|
|
3327
|
-
layout_symbol:
|
|
3328
|
-
layout_raster:
|
|
3329
|
-
layout_hillshade:
|
|
3326
|
+
layout_line: cs,
|
|
3327
|
+
layout_symbol: ps,
|
|
3328
|
+
layout_raster: fs,
|
|
3329
|
+
layout_hillshade: ds,
|
|
3330
3330
|
"layout_color-relief": {
|
|
3331
3331
|
visibility: {
|
|
3332
3332
|
type: "enum",
|
|
@@ -3338,9 +3338,9 @@ var Zi = 8, Ki = {
|
|
|
3338
3338
|
"property-type": "constant"
|
|
3339
3339
|
}
|
|
3340
3340
|
},
|
|
3341
|
-
filter:
|
|
3342
|
-
filter_operator:
|
|
3343
|
-
geometry_type:
|
|
3341
|
+
filter: hs,
|
|
3342
|
+
filter_operator: ms,
|
|
3343
|
+
geometry_type: ys,
|
|
3344
3344
|
function: {
|
|
3345
3345
|
expression: {
|
|
3346
3346
|
type: "expression"
|
|
@@ -3382,14 +3382,14 @@ var Zi = 8, Ki = {
|
|
|
3382
3382
|
required: !1
|
|
3383
3383
|
}
|
|
3384
3384
|
},
|
|
3385
|
-
function_stop:
|
|
3386
|
-
expression:
|
|
3387
|
-
light:
|
|
3388
|
-
sky:
|
|
3389
|
-
terrain:
|
|
3390
|
-
projection:
|
|
3391
|
-
paint:
|
|
3392
|
-
paint_fill:
|
|
3385
|
+
function_stop: gs,
|
|
3386
|
+
expression: vs,
|
|
3387
|
+
light: bs,
|
|
3388
|
+
sky: ws,
|
|
3389
|
+
terrain: Ss,
|
|
3390
|
+
projection: xs,
|
|
3391
|
+
paint: ks,
|
|
3392
|
+
paint_fill: Ls,
|
|
3393
3393
|
"paint_fill-extrusion": {
|
|
3394
3394
|
"fill-extrusion-opacity": {
|
|
3395
3395
|
type: "number",
|
|
@@ -3520,12 +3520,12 @@ var Zi = 8, Ki = {
|
|
|
3520
3520
|
"property-type": "data-constant"
|
|
3521
3521
|
}
|
|
3522
3522
|
},
|
|
3523
|
-
paint_line:
|
|
3524
|
-
paint_circle:
|
|
3525
|
-
paint_heatmap:
|
|
3526
|
-
paint_symbol:
|
|
3527
|
-
paint_raster:
|
|
3528
|
-
paint_hillshade:
|
|
3523
|
+
paint_line: Cs,
|
|
3524
|
+
paint_circle: Es,
|
|
3525
|
+
paint_heatmap: As,
|
|
3526
|
+
paint_symbol: Ts,
|
|
3527
|
+
paint_raster: _s,
|
|
3528
|
+
paint_hillshade: Is,
|
|
3529
3529
|
"paint_color-relief": {
|
|
3530
3530
|
"color-relief-opacity": {
|
|
3531
3531
|
type: "number",
|
|
@@ -3553,8 +3553,8 @@ var Zi = 8, Ki = {
|
|
|
3553
3553
|
"property-type": "color-ramp"
|
|
3554
3554
|
}
|
|
3555
3555
|
},
|
|
3556
|
-
paint_background:
|
|
3557
|
-
transition:
|
|
3556
|
+
paint_background: Ms,
|
|
3557
|
+
transition: Ps,
|
|
3558
3558
|
"property-type": {
|
|
3559
3559
|
"data-driven": {
|
|
3560
3560
|
type: "property-type"
|
|
@@ -3575,7 +3575,7 @@ var Zi = 8, Ki = {
|
|
|
3575
3575
|
type: "property-type"
|
|
3576
3576
|
}
|
|
3577
3577
|
},
|
|
3578
|
-
promoteId:
|
|
3578
|
+
promoteId: Rs
|
|
3579
3579
|
};
|
|
3580
3580
|
class w {
|
|
3581
3581
|
constructor(e, t, n, a) {
|
|
@@ -3613,7 +3613,7 @@ class sn {
|
|
|
3613
3613
|
return this.bindings[e] ? !0 : this.parent ? this.parent.has(e) : !1;
|
|
3614
3614
|
}
|
|
3615
3615
|
}
|
|
3616
|
-
const er = { kind: "null" }, S = { kind: "number" }, P = { kind: "string" }, M = { kind: "boolean" }, be = { kind: "color" }, tr = { kind: "projectionDefinition" }, De = { kind: "object" }, I = { kind: "value" },
|
|
3616
|
+
const er = { kind: "null" }, S = { kind: "number" }, P = { kind: "string" }, M = { kind: "boolean" }, be = { kind: "color" }, tr = { kind: "projectionDefinition" }, De = { kind: "object" }, I = { kind: "value" }, Os = { kind: "error" }, rr = { kind: "collator" }, nr = { kind: "formatted" }, ar = { kind: "padding" }, yt = { kind: "colorArray" }, or = { kind: "numberArray" }, Tt = { kind: "resolvedImage" }, ir = { kind: "variableAnchorOffsetCollection" };
|
|
3617
3617
|
function ae(r, e) {
|
|
3618
3618
|
return {
|
|
3619
3619
|
kind: "array",
|
|
@@ -3628,7 +3628,7 @@ function D(r) {
|
|
|
3628
3628
|
} else
|
|
3629
3629
|
return r.kind;
|
|
3630
3630
|
}
|
|
3631
|
-
const
|
|
3631
|
+
const Fs = [
|
|
3632
3632
|
er,
|
|
3633
3633
|
S,
|
|
3634
3634
|
P,
|
|
@@ -3640,22 +3640,22 @@ const Os = [
|
|
|
3640
3640
|
ae(I),
|
|
3641
3641
|
ar,
|
|
3642
3642
|
or,
|
|
3643
|
-
|
|
3644
|
-
|
|
3643
|
+
yt,
|
|
3644
|
+
Tt,
|
|
3645
3645
|
ir
|
|
3646
3646
|
];
|
|
3647
|
-
function
|
|
3647
|
+
function gt(r, e) {
|
|
3648
3648
|
if (e.kind === "error")
|
|
3649
3649
|
return null;
|
|
3650
3650
|
if (r.kind === "array") {
|
|
3651
|
-
if (e.kind === "array" && (e.N === 0 && e.itemType.kind === "value" || !
|
|
3651
|
+
if (e.kind === "array" && (e.N === 0 && e.itemType.kind === "value" || !gt(r.itemType, e.itemType)) && (typeof r.N != "number" || r.N === e.N))
|
|
3652
3652
|
return null;
|
|
3653
3653
|
} else {
|
|
3654
3654
|
if (r.kind === e.kind)
|
|
3655
3655
|
return null;
|
|
3656
3656
|
if (r.kind === "value") {
|
|
3657
|
-
for (const t of
|
|
3658
|
-
if (!
|
|
3657
|
+
for (const t of Fs)
|
|
3658
|
+
if (!gt(t, e))
|
|
3659
3659
|
return null;
|
|
3660
3660
|
}
|
|
3661
3661
|
}
|
|
@@ -3670,7 +3670,7 @@ function Ue(r, e) {
|
|
|
3670
3670
|
function Ae(r, e) {
|
|
3671
3671
|
return r.kind === "array" && e.kind === "array" ? r.itemType.kind === e.itemType.kind && typeof r.N == "number" : r.kind === e.kind;
|
|
3672
3672
|
}
|
|
3673
|
-
const Ua = 0.96422, Ba = 1, qa = 0.82521, Va = 4 / 29,
|
|
3673
|
+
const Ua = 0.96422, Ba = 1, qa = 0.82521, Va = 4 / 29, rt = 6 / 29, Ga = 3 * rt * rt, $s = rt * rt * rt, Ns = Math.PI / 180, js = 180 / Math.PI;
|
|
3674
3674
|
function Ha(r) {
|
|
3675
3675
|
return r = r % 360, r < 0 && (r += 360), r;
|
|
3676
3676
|
}
|
|
@@ -3702,16 +3702,16 @@ function kr(r) {
|
|
|
3702
3702
|
return r = r <= 304e-5 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - 0.055, r < 0 ? 0 : r > 1 ? 1 : r;
|
|
3703
3703
|
}
|
|
3704
3704
|
function Lr(r) {
|
|
3705
|
-
return r >
|
|
3705
|
+
return r > rt ? r * r * r : Ga * (r - Va);
|
|
3706
3706
|
}
|
|
3707
|
-
function
|
|
3707
|
+
function Ds(r) {
|
|
3708
3708
|
const [e, t, n, a] = Za(r), o = Math.sqrt(t * t + n * n);
|
|
3709
|
-
return [Math.round(o * 1e4) ? Ha(Math.atan2(n, t) *
|
|
3710
|
-
}
|
|
3711
|
-
function Ds([r, e, t, n]) {
|
|
3712
|
-
return r = isNaN(r) ? 0 : r * Fs, Ka([t, Math.cos(r) * e, Math.sin(r) * e, n]);
|
|
3709
|
+
return [Math.round(o * 1e4) ? Ha(Math.atan2(n, t) * js) : NaN, o, e, a];
|
|
3713
3710
|
}
|
|
3714
3711
|
function Us([r, e, t, n]) {
|
|
3712
|
+
return r = isNaN(r) ? 0 : r * Ns, Ka([t, Math.cos(r) * e, Math.sin(r) * e, n]);
|
|
3713
|
+
}
|
|
3714
|
+
function Bs([r, e, t, n]) {
|
|
3715
3715
|
r = Ha(r), e /= 100, t /= 100;
|
|
3716
3716
|
function a(o) {
|
|
3717
3717
|
const i = (o + r / 30) % 12, s = e * Math.min(t, 1 - t);
|
|
@@ -3719,16 +3719,16 @@ function Us([r, e, t, n]) {
|
|
|
3719
3719
|
}
|
|
3720
3720
|
return [a(0), a(8), a(4), n];
|
|
3721
3721
|
}
|
|
3722
|
-
const
|
|
3722
|
+
const qs = Object.hasOwn || function(e, t) {
|
|
3723
3723
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
3724
3724
|
};
|
|
3725
|
-
function
|
|
3726
|
-
return
|
|
3725
|
+
function dt(r, e) {
|
|
3726
|
+
return qs(r, e) ? r[e] : void 0;
|
|
3727
3727
|
}
|
|
3728
|
-
function
|
|
3728
|
+
function Vs(r) {
|
|
3729
3729
|
if (r = r.toLowerCase().trim(), r === "transparent")
|
|
3730
3730
|
return [0, 0, 0, 0];
|
|
3731
|
-
const e =
|
|
3731
|
+
const e = dt(Gs, r);
|
|
3732
3732
|
if (e) {
|
|
3733
3733
|
const [a, o, i] = e;
|
|
3734
3734
|
return [a / 255, o / 255, i / 255, 1];
|
|
@@ -3737,10 +3737,10 @@ function qs(r) {
|
|
|
3737
3737
|
const o = r.length < 6 ? 1 : 2;
|
|
3738
3738
|
let i = 1;
|
|
3739
3739
|
return [
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3740
|
+
Rt(r.slice(i, i += o)),
|
|
3741
|
+
Rt(r.slice(i, i += o)),
|
|
3742
|
+
Rt(r.slice(i, i += o)),
|
|
3743
|
+
Rt(r.slice(i, i + o) || "ff")
|
|
3744
3744
|
];
|
|
3745
3745
|
}
|
|
3746
3746
|
if (r.startsWith("rgb")) {
|
|
@@ -3818,11 +3818,11 @@ function qs(r) {
|
|
|
3818
3818
|
p ? qn(+p, d) : 1
|
|
3819
3819
|
];
|
|
3820
3820
|
if (Vn(h))
|
|
3821
|
-
return
|
|
3821
|
+
return Bs(h);
|
|
3822
3822
|
}
|
|
3823
3823
|
}
|
|
3824
3824
|
}
|
|
3825
|
-
function
|
|
3825
|
+
function Rt(r) {
|
|
3826
3826
|
return parseInt(r.padEnd(2, r), 16) / 255;
|
|
3827
3827
|
}
|
|
3828
3828
|
function qn(r, e) {
|
|
@@ -3834,7 +3834,7 @@ function Qe(r, e, t) {
|
|
|
3834
3834
|
function Vn(r) {
|
|
3835
3835
|
return !r.some(Number.isNaN);
|
|
3836
3836
|
}
|
|
3837
|
-
const
|
|
3837
|
+
const Gs = {
|
|
3838
3838
|
aliceblue: [240, 248, 255],
|
|
3839
3839
|
antiquewhite: [250, 235, 215],
|
|
3840
3840
|
aqua: [0, 255, 255],
|
|
@@ -3987,10 +3987,10 @@ const Vs = {
|
|
|
3987
3987
|
function Be(r, e, t) {
|
|
3988
3988
|
return r + t * (e - r);
|
|
3989
3989
|
}
|
|
3990
|
-
function
|
|
3990
|
+
function vt(r, e, t) {
|
|
3991
3991
|
return r.map((n, a) => Be(n, e[a], t));
|
|
3992
3992
|
}
|
|
3993
|
-
class
|
|
3993
|
+
class $ {
|
|
3994
3994
|
/**
|
|
3995
3995
|
* @param r Red component premultiplied by `alpha` 0..1
|
|
3996
3996
|
* @param g Green component premultiplied by `alpha` 0..1
|
|
@@ -4015,13 +4015,13 @@ class F {
|
|
|
4015
4015
|
* @returns A `Color` instance, or `undefined` if the input is not a valid color string.
|
|
4016
4016
|
*/
|
|
4017
4017
|
static parse(e) {
|
|
4018
|
-
if (e instanceof
|
|
4018
|
+
if (e instanceof $)
|
|
4019
4019
|
return e;
|
|
4020
4020
|
if (typeof e != "string")
|
|
4021
4021
|
return;
|
|
4022
|
-
const t =
|
|
4022
|
+
const t = Vs(e);
|
|
4023
4023
|
if (t)
|
|
4024
|
-
return new
|
|
4024
|
+
return new $(...t, !1);
|
|
4025
4025
|
}
|
|
4026
4026
|
/**
|
|
4027
4027
|
* Used in color interpolation and by 'to-rgba' expression.
|
|
@@ -4038,7 +4038,7 @@ class F {
|
|
|
4038
4038
|
* @returns Gien color, with reversed alpha blending, in HCL color space.
|
|
4039
4039
|
*/
|
|
4040
4040
|
get hcl() {
|
|
4041
|
-
return this.overwriteGetter("hcl",
|
|
4041
|
+
return this.overwriteGetter("hcl", Ds(this.rgb));
|
|
4042
4042
|
}
|
|
4043
4043
|
/**
|
|
4044
4044
|
* Used in color interpolation.
|
|
@@ -4089,8 +4089,8 @@ class F {
|
|
|
4089
4089
|
static interpolate(e, t, n, a = "rgb") {
|
|
4090
4090
|
switch (a) {
|
|
4091
4091
|
case "rgb": {
|
|
4092
|
-
const [o, i, s, l] =
|
|
4093
|
-
return new
|
|
4092
|
+
const [o, i, s, l] = vt(e.rgb, t.rgb, n);
|
|
4093
|
+
return new $(o, i, s, l, !1);
|
|
4094
4094
|
}
|
|
4095
4095
|
case "hcl": {
|
|
4096
4096
|
const [o, i, s, l] = e.hcl, [u, c, p, d] = t.hcl;
|
|
@@ -4099,25 +4099,25 @@ class F {
|
|
|
4099
4099
|
let x = u - o;
|
|
4100
4100
|
u > o && x > 180 ? x -= 360 : u < o && o - u > 180 && (x += 360), f = o + n * x;
|
|
4101
4101
|
} else isNaN(o) ? isNaN(u) ? f = NaN : (f = u, (s === 1 || s === 0) && (h = c)) : (f = o, (p === 1 || p === 0) && (h = i));
|
|
4102
|
-
const [m, y, b, v] =
|
|
4102
|
+
const [m, y, b, v] = Us([
|
|
4103
4103
|
f,
|
|
4104
4104
|
h ?? Be(i, c, n),
|
|
4105
4105
|
Be(s, p, n),
|
|
4106
4106
|
Be(l, d, n)
|
|
4107
4107
|
]);
|
|
4108
|
-
return new
|
|
4108
|
+
return new $(m, y, b, v, !1);
|
|
4109
4109
|
}
|
|
4110
4110
|
case "lab": {
|
|
4111
|
-
const [o, i, s, l] = Ka(
|
|
4112
|
-
return new
|
|
4111
|
+
const [o, i, s, l] = Ka(vt(e.lab, t.lab, n));
|
|
4112
|
+
return new $(o, i, s, l, !1);
|
|
4113
4113
|
}
|
|
4114
4114
|
}
|
|
4115
4115
|
}
|
|
4116
4116
|
}
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4117
|
+
$.black = new $(0, 0, 0, 1);
|
|
4118
|
+
$.white = new $(1, 1, 1, 1);
|
|
4119
|
+
$.transparent = new $(0, 0, 0, 0);
|
|
4120
|
+
$.red = new $(1, 0, 0, 1);
|
|
4121
4121
|
class un {
|
|
4122
4122
|
constructor(e, t, n) {
|
|
4123
4123
|
e ? this.sensitivity = t ? "variant" : "case" : this.sensitivity = t ? "accent" : "base", this.locale = n, this.collator = new Intl.Collator(this.locale ? this.locale : [], { sensitivity: this.sensitivity, usage: "search" });
|
|
@@ -4129,7 +4129,7 @@ class un {
|
|
|
4129
4129
|
return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;
|
|
4130
4130
|
}
|
|
4131
4131
|
}
|
|
4132
|
-
const
|
|
4132
|
+
const Hs = ["bottom", "center", "top"];
|
|
4133
4133
|
class Dr {
|
|
4134
4134
|
constructor(e, t, n, a, o, i) {
|
|
4135
4135
|
this.text = e, this.image = t, this.scale = n, this.fontStack = a, this.textColor = o, this.verticalAlign = i;
|
|
@@ -4188,7 +4188,7 @@ class fe {
|
|
|
4188
4188
|
return JSON.stringify(this.values);
|
|
4189
4189
|
}
|
|
4190
4190
|
static interpolate(e, t, n) {
|
|
4191
|
-
return new fe(
|
|
4191
|
+
return new fe(vt(e.values, t.values, n));
|
|
4192
4192
|
}
|
|
4193
4193
|
}
|
|
4194
4194
|
class de {
|
|
@@ -4216,7 +4216,7 @@ class de {
|
|
|
4216
4216
|
return JSON.stringify(this.values);
|
|
4217
4217
|
}
|
|
4218
4218
|
static interpolate(e, t, n) {
|
|
4219
|
-
return new de(
|
|
4219
|
+
return new de(vt(e.values, t.values, n));
|
|
4220
4220
|
}
|
|
4221
4221
|
}
|
|
4222
4222
|
class oe {
|
|
@@ -4232,7 +4232,7 @@ class oe {
|
|
|
4232
4232
|
if (e instanceof oe)
|
|
4233
4233
|
return e;
|
|
4234
4234
|
if (typeof e == "string") {
|
|
4235
|
-
const n =
|
|
4235
|
+
const n = $.parse(e);
|
|
4236
4236
|
return n ? new oe([n]) : void 0;
|
|
4237
4237
|
}
|
|
4238
4238
|
if (!Array.isArray(e))
|
|
@@ -4241,7 +4241,7 @@ class oe {
|
|
|
4241
4241
|
for (const n of e) {
|
|
4242
4242
|
if (typeof n != "string")
|
|
4243
4243
|
return;
|
|
4244
|
-
const a =
|
|
4244
|
+
const a = $.parse(n);
|
|
4245
4245
|
if (!a)
|
|
4246
4246
|
return;
|
|
4247
4247
|
t.push(a);
|
|
@@ -4256,7 +4256,7 @@ class oe {
|
|
|
4256
4256
|
if (e.values.length != t.values.length)
|
|
4257
4257
|
throw new Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${t.values.length}), cannot interpolate.`);
|
|
4258
4258
|
for (let i = 0; i < e.values.length; i++)
|
|
4259
|
-
o.push(
|
|
4259
|
+
o.push($.interpolate(e.values[i], t.values[i], n, a));
|
|
4260
4260
|
return new oe(o);
|
|
4261
4261
|
}
|
|
4262
4262
|
}
|
|
@@ -4268,7 +4268,7 @@ class V extends Error {
|
|
|
4268
4268
|
return this.message;
|
|
4269
4269
|
}
|
|
4270
4270
|
}
|
|
4271
|
-
const
|
|
4271
|
+
const Zs = /* @__PURE__ */ new Set(["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]);
|
|
4272
4272
|
class we {
|
|
4273
4273
|
constructor(e) {
|
|
4274
4274
|
this.values = e.slice();
|
|
@@ -4279,7 +4279,7 @@ class we {
|
|
|
4279
4279
|
if (!(!Array.isArray(e) || e.length < 1 || e.length % 2 !== 0)) {
|
|
4280
4280
|
for (let t = 0; t < e.length; t += 2) {
|
|
4281
4281
|
const n = e[t], a = e[t + 1];
|
|
4282
|
-
if (typeof n != "string" || !
|
|
4282
|
+
if (typeof n != "string" || !Zs.has(n) || !Array.isArray(a) || a.length !== 2 || typeof a[0] != "number" || typeof a[1] != "number")
|
|
4283
4283
|
return;
|
|
4284
4284
|
}
|
|
4285
4285
|
return new we(e);
|
|
@@ -4303,7 +4303,7 @@ class we {
|
|
|
4303
4303
|
return new we(i);
|
|
4304
4304
|
}
|
|
4305
4305
|
}
|
|
4306
|
-
class
|
|
4306
|
+
class Fe {
|
|
4307
4307
|
constructor(e) {
|
|
4308
4308
|
this.name = e.name, this.available = e.available;
|
|
4309
4309
|
}
|
|
@@ -4311,7 +4311,7 @@ class $e {
|
|
|
4311
4311
|
return this.name;
|
|
4312
4312
|
}
|
|
4313
4313
|
static fromString(e) {
|
|
4314
|
-
return e ? new
|
|
4314
|
+
return e ? new Fe({ name: e, available: !1 }) : null;
|
|
4315
4315
|
}
|
|
4316
4316
|
}
|
|
4317
4317
|
class ce {
|
|
@@ -4335,17 +4335,17 @@ class ce {
|
|
|
4335
4335
|
function Xa(r, e, t, n) {
|
|
4336
4336
|
return typeof r == "number" && r >= 0 && r <= 255 && typeof e == "number" && e >= 0 && e <= 255 && typeof t == "number" && t >= 0 && t <= 255 ? typeof n > "u" || typeof n == "number" && n >= 0 && n <= 1 ? null : `Invalid rgba value [${[r, e, t, n].join(", ")}]: 'a' must be between 0 and 1.` : `Invalid rgba value [${(typeof n == "number" ? [r, e, t, n] : [r, e, t]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`;
|
|
4337
4337
|
}
|
|
4338
|
-
function
|
|
4339
|
-
if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ce || r instanceof
|
|
4338
|
+
function bt(r) {
|
|
4339
|
+
if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ce || r instanceof $ || r instanceof un || r instanceof Le || r instanceof fe || r instanceof de || r instanceof oe || r instanceof we || r instanceof Fe)
|
|
4340
4340
|
return !0;
|
|
4341
4341
|
if (Array.isArray(r)) {
|
|
4342
4342
|
for (const e of r)
|
|
4343
|
-
if (!
|
|
4343
|
+
if (!bt(e))
|
|
4344
4344
|
return !1;
|
|
4345
4345
|
return !0;
|
|
4346
4346
|
} else if (typeof r == "object") {
|
|
4347
4347
|
for (const e in r)
|
|
4348
|
-
if (!
|
|
4348
|
+
if (!bt(r[e]))
|
|
4349
4349
|
return !1;
|
|
4350
4350
|
return !0;
|
|
4351
4351
|
} else
|
|
@@ -4360,7 +4360,7 @@ function H(r) {
|
|
|
4360
4360
|
return M;
|
|
4361
4361
|
if (typeof r == "number")
|
|
4362
4362
|
return S;
|
|
4363
|
-
if (r instanceof
|
|
4363
|
+
if (r instanceof $)
|
|
4364
4364
|
return be;
|
|
4365
4365
|
if (r instanceof ce)
|
|
4366
4366
|
return tr;
|
|
@@ -4373,11 +4373,11 @@ function H(r) {
|
|
|
4373
4373
|
if (r instanceof de)
|
|
4374
4374
|
return or;
|
|
4375
4375
|
if (r instanceof oe)
|
|
4376
|
-
return
|
|
4376
|
+
return yt;
|
|
4377
4377
|
if (r instanceof we)
|
|
4378
4378
|
return ir;
|
|
4379
|
-
if (r instanceof
|
|
4380
|
-
return
|
|
4379
|
+
if (r instanceof Fe)
|
|
4380
|
+
return Tt;
|
|
4381
4381
|
if (Array.isArray(r)) {
|
|
4382
4382
|
const e = r.length;
|
|
4383
4383
|
let t;
|
|
@@ -4396,23 +4396,23 @@ function H(r) {
|
|
|
4396
4396
|
} else
|
|
4397
4397
|
return De;
|
|
4398
4398
|
}
|
|
4399
|
-
function
|
|
4399
|
+
function ht(r) {
|
|
4400
4400
|
const e = typeof r;
|
|
4401
|
-
return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof
|
|
4401
|
+
return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof $ || r instanceof ce || r instanceof Le || r instanceof fe || r instanceof de || r instanceof oe || r instanceof we || r instanceof Fe ? r.toString() : JSON.stringify(r);
|
|
4402
4402
|
}
|
|
4403
|
-
class
|
|
4403
|
+
class ot {
|
|
4404
4404
|
constructor(e, t) {
|
|
4405
4405
|
this.type = e, this.value = t;
|
|
4406
4406
|
}
|
|
4407
4407
|
static parse(e, t) {
|
|
4408
4408
|
if (e.length !== 2)
|
|
4409
4409
|
return t.error(`'literal' expression requires exactly one argument, but found ${e.length - 1} instead.`);
|
|
4410
|
-
if (!
|
|
4410
|
+
if (!bt(e[1]))
|
|
4411
4411
|
return t.error("invalid value");
|
|
4412
4412
|
const n = e[1];
|
|
4413
4413
|
let a = H(n);
|
|
4414
4414
|
const o = t.expectedType;
|
|
4415
|
-
return a.kind === "array" && a.N === 0 && o && o.kind === "array" && (typeof o.N != "number" || o.N === 0) && (a = o), new
|
|
4415
|
+
return a.kind === "array" && a.N === 0 && o && o.kind === "array" && (typeof o.N != "number" || o.N === 0) && (a = o), new ot(a, n);
|
|
4416
4416
|
}
|
|
4417
4417
|
evaluate() {
|
|
4418
4418
|
return this.value;
|
|
@@ -4423,7 +4423,7 @@ class at {
|
|
|
4423
4423
|
return !0;
|
|
4424
4424
|
}
|
|
4425
4425
|
}
|
|
4426
|
-
const
|
|
4426
|
+
const zt = {
|
|
4427
4427
|
string: P,
|
|
4428
4428
|
number: S,
|
|
4429
4429
|
boolean: M,
|
|
@@ -4442,9 +4442,9 @@ class pe {
|
|
|
4442
4442
|
let s;
|
|
4443
4443
|
if (e.length > 2) {
|
|
4444
4444
|
const u = e[1];
|
|
4445
|
-
if (typeof u != "string" || !(u in
|
|
4445
|
+
if (typeof u != "string" || !(u in zt) || u === "object")
|
|
4446
4446
|
return t.error('The item type argument of "array" must be one of string, number, boolean', 1);
|
|
4447
|
-
s =
|
|
4447
|
+
s = zt[u], n++;
|
|
4448
4448
|
} else
|
|
4449
4449
|
s = I;
|
|
4450
4450
|
let l;
|
|
@@ -4455,9 +4455,9 @@ class pe {
|
|
|
4455
4455
|
}
|
|
4456
4456
|
a = ae(s, l);
|
|
4457
4457
|
} else {
|
|
4458
|
-
if (!
|
|
4458
|
+
if (!zt[o])
|
|
4459
4459
|
throw new Error(`Types doesn't contain name = ${o}`);
|
|
4460
|
-
a =
|
|
4460
|
+
a = zt[o];
|
|
4461
4461
|
}
|
|
4462
4462
|
const i = [];
|
|
4463
4463
|
for (; n < e.length; n++) {
|
|
@@ -4471,7 +4471,7 @@ class pe {
|
|
|
4471
4471
|
evaluate(e) {
|
|
4472
4472
|
for (let t = 0; t < this.args.length; t++) {
|
|
4473
4473
|
const n = this.args[t].evaluate(e);
|
|
4474
|
-
if (
|
|
4474
|
+
if (gt(this.type, H(n))) {
|
|
4475
4475
|
if (t === this.args.length - 1)
|
|
4476
4476
|
throw new V(`Expected value to be of type ${D(this.type)}, but found ${D(H(n))} instead.`);
|
|
4477
4477
|
} else return n;
|
|
@@ -4519,14 +4519,14 @@ class Re {
|
|
|
4519
4519
|
case "color": {
|
|
4520
4520
|
let t, n;
|
|
4521
4521
|
for (const a of this.args) {
|
|
4522
|
-
if (t = a.evaluate(e), n = null, t instanceof
|
|
4522
|
+
if (t = a.evaluate(e), n = null, t instanceof $)
|
|
4523
4523
|
return t;
|
|
4524
4524
|
if (typeof t == "string") {
|
|
4525
4525
|
const o = e.parseColor(t);
|
|
4526
4526
|
if (o)
|
|
4527
4527
|
return o;
|
|
4528
4528
|
} else if (Array.isArray(t) && (t.length < 3 || t.length > 4 ? n = `Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.` : n = Xa(t[0], t[1], t[2], t[3]), !n))
|
|
4529
|
-
return new
|
|
4529
|
+
return new $(t[0] / 255, t[1] / 255, t[2] / 255, t[3]);
|
|
4530
4530
|
}
|
|
4531
4531
|
throw new V(n || `Could not parse color from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
|
|
4532
4532
|
}
|
|
@@ -4582,13 +4582,13 @@ class Re {
|
|
|
4582
4582
|
throw new V(`Could not convert ${JSON.stringify(t)} to number.`);
|
|
4583
4583
|
}
|
|
4584
4584
|
case "formatted":
|
|
4585
|
-
return Le.fromString(
|
|
4585
|
+
return Le.fromString(ht(this.args[0].evaluate(e)));
|
|
4586
4586
|
case "resolvedImage":
|
|
4587
|
-
return
|
|
4587
|
+
return Fe.fromString(ht(this.args[0].evaluate(e)));
|
|
4588
4588
|
case "projectionDefinition":
|
|
4589
4589
|
return this.args[0].evaluate(e);
|
|
4590
4590
|
default:
|
|
4591
|
-
return
|
|
4591
|
+
return ht(this.args[0].evaluate(e));
|
|
4592
4592
|
}
|
|
4593
4593
|
}
|
|
4594
4594
|
eachChild(e) {
|
|
@@ -4598,7 +4598,7 @@ class Re {
|
|
|
4598
4598
|
return this.args.every((e) => e.outputDefined());
|
|
4599
4599
|
}
|
|
4600
4600
|
}
|
|
4601
|
-
const
|
|
4601
|
+
const Ks = ["Unknown", "Point", "LineString", "Polygon"];
|
|
4602
4602
|
class Ya {
|
|
4603
4603
|
constructor() {
|
|
4604
4604
|
this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = /* @__PURE__ */ new Map(), this.availableImages = null, this.canonical = null;
|
|
@@ -4607,7 +4607,7 @@ class Ya {
|
|
|
4607
4607
|
return this.feature && "id" in this.feature ? this.feature.id : null;
|
|
4608
4608
|
}
|
|
4609
4609
|
geometryType() {
|
|
4610
|
-
return this.feature ? typeof this.feature.type == "number" ?
|
|
4610
|
+
return this.feature ? typeof this.feature.type == "number" ? Ks[this.feature.type] : this.feature.type : null;
|
|
4611
4611
|
}
|
|
4612
4612
|
geometry() {
|
|
4613
4613
|
return this.feature && "geometry" in this.feature ? this.feature.geometry : null;
|
|
@@ -4620,7 +4620,7 @@ class Ya {
|
|
|
4620
4620
|
}
|
|
4621
4621
|
parseColor(e) {
|
|
4622
4622
|
let t = this._parseColorCache.get(e);
|
|
4623
|
-
return t || (t =
|
|
4623
|
+
return t || (t = $.parse(e), this._parseColorCache.set(e, t)), t;
|
|
4624
4624
|
}
|
|
4625
4625
|
}
|
|
4626
4626
|
class sr {
|
|
@@ -4662,10 +4662,10 @@ class sr {
|
|
|
4662
4662
|
else if (this.checkSubtype(s, l))
|
|
4663
4663
|
return null;
|
|
4664
4664
|
}
|
|
4665
|
-
if (!(i instanceof
|
|
4665
|
+
if (!(i instanceof ot) && i.type.kind !== "resolvedImage" && this._isConstant(i)) {
|
|
4666
4666
|
const s = new Ya();
|
|
4667
4667
|
try {
|
|
4668
|
-
i = new
|
|
4668
|
+
i = new ot(i.type, i.evaluate(s));
|
|
4669
4669
|
} catch (l) {
|
|
4670
4670
|
return this.error(l.message), null;
|
|
4671
4671
|
}
|
|
@@ -4706,7 +4706,7 @@ class sr {
|
|
|
4706
4706
|
* @returns null if `t` is a subtype of `expected`; otherwise returns an error message
|
|
4707
4707
|
*/
|
|
4708
4708
|
checkSubtype(e, t) {
|
|
4709
|
-
const n =
|
|
4709
|
+
const n = gt(e, t);
|
|
4710
4710
|
return n && this.error(n), n;
|
|
4711
4711
|
}
|
|
4712
4712
|
}
|
|
@@ -5058,11 +5058,11 @@ class cr {
|
|
|
5058
5058
|
return this.outputs.every((e) => e.outputDefined());
|
|
5059
5059
|
}
|
|
5060
5060
|
}
|
|
5061
|
-
function
|
|
5061
|
+
function Xs(r) {
|
|
5062
5062
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
5063
5063
|
}
|
|
5064
5064
|
var Cr, Hn;
|
|
5065
|
-
function
|
|
5065
|
+
function Ys() {
|
|
5066
5066
|
if (Hn) return Cr;
|
|
5067
5067
|
Hn = 1, Cr = r;
|
|
5068
5068
|
function r(e, t, n, a) {
|
|
@@ -5098,7 +5098,7 @@ function Xs() {
|
|
|
5098
5098
|
}
|
|
5099
5099
|
}, Cr;
|
|
5100
5100
|
}
|
|
5101
|
-
var
|
|
5101
|
+
var Ws = Ys(), Js = /* @__PURE__ */ Xs(Ws);
|
|
5102
5102
|
class Se {
|
|
5103
5103
|
constructor(e, t, n, a, o) {
|
|
5104
5104
|
this.type = e, this.operator = t, this.interpolation = n, this.input = a, this.labels = [], this.outputs = [];
|
|
@@ -5113,7 +5113,7 @@ class Se {
|
|
|
5113
5113
|
o = Er(t, 1, n, a);
|
|
5114
5114
|
else if (e.name === "cubic-bezier") {
|
|
5115
5115
|
const i = e.controlPoints;
|
|
5116
|
-
o = new
|
|
5116
|
+
o = new Js(i[0], i[1], i[2], i[3]).solve(Er(t, 1, n, a));
|
|
5117
5117
|
}
|
|
5118
5118
|
return o;
|
|
5119
5119
|
}
|
|
@@ -5149,7 +5149,7 @@ class Se {
|
|
|
5149
5149
|
return null;
|
|
5150
5150
|
const s = [];
|
|
5151
5151
|
let l = null;
|
|
5152
|
-
(n === "interpolate-hcl" || n === "interpolate-lab") && t.expectedType !=
|
|
5152
|
+
(n === "interpolate-hcl" || n === "interpolate-lab") && t.expectedType != yt ? l = be : t.expectedType && t.expectedType.kind !== "value" && (l = t.expectedType);
|
|
5153
5153
|
for (let u = 0; u < i.length; u += 2) {
|
|
5154
5154
|
const c = i[u], p = i[u + 1], d = u + 3, f = u + 4;
|
|
5155
5155
|
if (typeof c != "number")
|
|
@@ -5161,7 +5161,7 @@ class Se {
|
|
|
5161
5161
|
return null;
|
|
5162
5162
|
l = l || h.type, s.push([c, h]);
|
|
5163
5163
|
}
|
|
5164
|
-
return !Ae(l, S) && !Ae(l, tr) && !Ae(l, be) && !Ae(l, ar) && !Ae(l, or) && !Ae(l,
|
|
5164
|
+
return !Ae(l, S) && !Ae(l, tr) && !Ae(l, be) && !Ae(l, ar) && !Ae(l, or) && !Ae(l, yt) && !Ae(l, ir) && !Ae(l, ae(S)) ? t.error(`Type ${D(l)} is not interpolatable.`) : new Se(l, n, a, o, s);
|
|
5165
5165
|
}
|
|
5166
5166
|
evaluate(e) {
|
|
5167
5167
|
const t = this.labels, n = this.outputs;
|
|
@@ -5180,7 +5180,7 @@ class Se {
|
|
|
5180
5180
|
case "number":
|
|
5181
5181
|
return Be(c, p, u);
|
|
5182
5182
|
case "color":
|
|
5183
|
-
return
|
|
5183
|
+
return $.interpolate(c, p, u);
|
|
5184
5184
|
case "padding":
|
|
5185
5185
|
return fe.interpolate(c, p, u);
|
|
5186
5186
|
case "colorArray":
|
|
@@ -5190,21 +5190,21 @@ class Se {
|
|
|
5190
5190
|
case "variableAnchorOffsetCollection":
|
|
5191
5191
|
return we.interpolate(c, p, u);
|
|
5192
5192
|
case "array":
|
|
5193
|
-
return
|
|
5193
|
+
return vt(c, p, u);
|
|
5194
5194
|
case "projectionDefinition":
|
|
5195
5195
|
return ce.interpolate(c, p, u);
|
|
5196
5196
|
}
|
|
5197
5197
|
case "interpolate-hcl":
|
|
5198
5198
|
switch (this.type.kind) {
|
|
5199
5199
|
case "color":
|
|
5200
|
-
return
|
|
5200
|
+
return $.interpolate(c, p, u, "hcl");
|
|
5201
5201
|
case "colorArray":
|
|
5202
5202
|
return oe.interpolate(c, p, u, "hcl");
|
|
5203
5203
|
}
|
|
5204
5204
|
case "interpolate-lab":
|
|
5205
5205
|
switch (this.type.kind) {
|
|
5206
5206
|
case "color":
|
|
5207
|
-
return
|
|
5207
|
+
return $.interpolate(c, p, u, "lab");
|
|
5208
5208
|
case "colorArray":
|
|
5209
5209
|
return oe.interpolate(c, p, u, "lab");
|
|
5210
5210
|
}
|
|
@@ -5223,7 +5223,7 @@ function Er(r, e, t, n) {
|
|
|
5223
5223
|
const a = n - t, o = r - t;
|
|
5224
5224
|
return a === 0 ? 0 : e === 1 ? o / a : (Math.pow(e, o) - 1) / (Math.pow(e, a) - 1);
|
|
5225
5225
|
}
|
|
5226
|
-
class
|
|
5226
|
+
class wt {
|
|
5227
5227
|
constructor(e, t) {
|
|
5228
5228
|
this.type = e, this.args = t;
|
|
5229
5229
|
}
|
|
@@ -5242,12 +5242,12 @@ class bt {
|
|
|
5242
5242
|
}
|
|
5243
5243
|
if (!n)
|
|
5244
5244
|
throw new Error("No output type");
|
|
5245
|
-
return a && o.some((s) =>
|
|
5245
|
+
return a && o.some((s) => gt(a, s.type)) ? new wt(I, o) : new wt(n, o);
|
|
5246
5246
|
}
|
|
5247
5247
|
evaluate(e) {
|
|
5248
5248
|
let t = null, n = 0, a;
|
|
5249
5249
|
for (const o of this.args)
|
|
5250
|
-
if (n++, t = o.evaluate(e), t && t instanceof
|
|
5250
|
+
if (n++, t = o.evaluate(e), t && t instanceof Fe && !t.available && (a || (a = t.name), t = null, n === this.args.length && (t = a)), t !== null)
|
|
5251
5251
|
break;
|
|
5252
5252
|
return t;
|
|
5253
5253
|
}
|
|
@@ -5261,43 +5261,43 @@ class bt {
|
|
|
5261
5261
|
function Zn(r, e) {
|
|
5262
5262
|
return r === "==" || r === "!=" ? e.kind === "boolean" || e.kind === "string" || e.kind === "number" || e.kind === "null" || e.kind === "value" : e.kind === "string" || e.kind === "number" || e.kind === "value";
|
|
5263
5263
|
}
|
|
5264
|
-
function
|
|
5264
|
+
function Qs(r, e, t) {
|
|
5265
5265
|
return e === t;
|
|
5266
5266
|
}
|
|
5267
|
-
function
|
|
5267
|
+
function el(r, e, t) {
|
|
5268
5268
|
return e !== t;
|
|
5269
5269
|
}
|
|
5270
|
-
function
|
|
5270
|
+
function tl(r, e, t) {
|
|
5271
5271
|
return e < t;
|
|
5272
5272
|
}
|
|
5273
|
-
function
|
|
5273
|
+
function rl(r, e, t) {
|
|
5274
5274
|
return e > t;
|
|
5275
5275
|
}
|
|
5276
|
-
function
|
|
5276
|
+
function nl(r, e, t) {
|
|
5277
5277
|
return e <= t;
|
|
5278
5278
|
}
|
|
5279
|
-
function
|
|
5279
|
+
function al(r, e, t) {
|
|
5280
5280
|
return e >= t;
|
|
5281
5281
|
}
|
|
5282
5282
|
function Ja(r, e, t, n) {
|
|
5283
5283
|
return n.compare(e, t) === 0;
|
|
5284
5284
|
}
|
|
5285
|
-
function
|
|
5285
|
+
function ol(r, e, t, n) {
|
|
5286
5286
|
return !Ja(r, e, t, n);
|
|
5287
5287
|
}
|
|
5288
|
-
function
|
|
5288
|
+
function il(r, e, t, n) {
|
|
5289
5289
|
return n.compare(e, t) < 0;
|
|
5290
5290
|
}
|
|
5291
|
-
function
|
|
5291
|
+
function sl(r, e, t, n) {
|
|
5292
5292
|
return n.compare(e, t) > 0;
|
|
5293
5293
|
}
|
|
5294
|
-
function
|
|
5294
|
+
function ll(r, e, t, n) {
|
|
5295
5295
|
return n.compare(e, t) <= 0;
|
|
5296
5296
|
}
|
|
5297
|
-
function
|
|
5297
|
+
function ul(r, e, t, n) {
|
|
5298
5298
|
return n.compare(e, t) >= 0;
|
|
5299
5299
|
}
|
|
5300
|
-
function
|
|
5300
|
+
function lt(r, e, t) {
|
|
5301
5301
|
const n = r !== "==" && r !== "!=";
|
|
5302
5302
|
return class Qa {
|
|
5303
5303
|
constructor(o, i, s) {
|
|
@@ -5351,7 +5351,7 @@ function st(r, e, t) {
|
|
|
5351
5351
|
}
|
|
5352
5352
|
};
|
|
5353
5353
|
}
|
|
5354
|
-
const
|
|
5354
|
+
const cl = lt("==", Qs, Ja), pl = lt("!=", el, ol), fl = lt("<", tl, il), dl = lt(">", rl, sl), hl = lt("<=", nl, ll), ml = lt(">=", al, ul);
|
|
5355
5355
|
class pr {
|
|
5356
5356
|
constructor(e, t, n) {
|
|
5357
5357
|
this.type = rr, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
|
|
@@ -5448,7 +5448,7 @@ class mn {
|
|
|
5448
5448
|
return null;
|
|
5449
5449
|
let p = null;
|
|
5450
5450
|
if (s["vertical-align"]) {
|
|
5451
|
-
if (typeof s["vertical-align"] == "string" && !
|
|
5451
|
+
if (typeof s["vertical-align"] == "string" && !Hs.includes(s["vertical-align"]))
|
|
5452
5452
|
return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${s["vertical-align"]}' instead.`);
|
|
5453
5453
|
if (p = t.parse(s["vertical-align"], 1, P), !p)
|
|
5454
5454
|
return null;
|
|
@@ -5470,7 +5470,7 @@ class mn {
|
|
|
5470
5470
|
evaluate(e) {
|
|
5471
5471
|
const t = (n) => {
|
|
5472
5472
|
const a = n.content.evaluate(e);
|
|
5473
|
-
return H(a) ===
|
|
5473
|
+
return H(a) === Tt ? new Dr("", a, null, null, null, n.verticalAlign ? n.verticalAlign.evaluate(e) : null) : new Dr(ht(a), null, n.scale ? n.scale.evaluate(e) : null, n.font ? n.font.evaluate(e).join(",") : null, n.textColor ? n.textColor.evaluate(e) : null, n.verticalAlign ? n.verticalAlign.evaluate(e) : null);
|
|
5474
5474
|
};
|
|
5475
5475
|
return new Le(this.sections.map(t));
|
|
5476
5476
|
}
|
|
@@ -5484,7 +5484,7 @@ class mn {
|
|
|
5484
5484
|
}
|
|
5485
5485
|
class yn {
|
|
5486
5486
|
constructor(e) {
|
|
5487
|
-
this.type =
|
|
5487
|
+
this.type = Tt, this.input = e;
|
|
5488
5488
|
}
|
|
5489
5489
|
static parse(e, t) {
|
|
5490
5490
|
if (e.length !== 2)
|
|
@@ -5493,7 +5493,7 @@ class yn {
|
|
|
5493
5493
|
return n ? new yn(n) : t.error("No image name provided.");
|
|
5494
5494
|
}
|
|
5495
5495
|
evaluate(e) {
|
|
5496
|
-
const t = this.input.evaluate(e), n =
|
|
5496
|
+
const t = this.input.evaluate(e), n = Fe.fromString(t);
|
|
5497
5497
|
return n && e.availableImages && (n.available = e.availableImages.indexOf(t) > -1), n;
|
|
5498
5498
|
}
|
|
5499
5499
|
eachChild(e) {
|
|
@@ -5529,82 +5529,82 @@ class gn {
|
|
|
5529
5529
|
}
|
|
5530
5530
|
}
|
|
5531
5531
|
const xe = 8192;
|
|
5532
|
-
function
|
|
5533
|
-
const t =
|
|
5532
|
+
function yl(r, e) {
|
|
5533
|
+
const t = gl(r[0]), n = bl(r[1]), a = Math.pow(2, e.z);
|
|
5534
5534
|
return [Math.round(t * a * xe), Math.round(n * a * xe)];
|
|
5535
5535
|
}
|
|
5536
5536
|
function vn(r, e) {
|
|
5537
5537
|
const t = Math.pow(2, e.z), n = (r[0] / xe + e.x) / t, a = (r[1] / xe + e.y) / t;
|
|
5538
|
-
return [
|
|
5538
|
+
return [vl(n), wl(a)];
|
|
5539
5539
|
}
|
|
5540
|
-
function
|
|
5540
|
+
function gl(r) {
|
|
5541
5541
|
return (180 + r) / 360;
|
|
5542
5542
|
}
|
|
5543
|
-
function
|
|
5543
|
+
function vl(r) {
|
|
5544
5544
|
return r * 360 - 180;
|
|
5545
5545
|
}
|
|
5546
|
-
function
|
|
5546
|
+
function bl(r) {
|
|
5547
5547
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + r * Math.PI / 360))) / 360;
|
|
5548
5548
|
}
|
|
5549
|
-
function
|
|
5549
|
+
function wl(r) {
|
|
5550
5550
|
return 360 / Math.PI * Math.atan(Math.exp((180 - r * 360) * Math.PI / 180)) - 90;
|
|
5551
5551
|
}
|
|
5552
|
-
function
|
|
5552
|
+
function _t(r, e) {
|
|
5553
5553
|
r[0] = Math.min(r[0], e[0]), r[1] = Math.min(r[1], e[1]), r[2] = Math.max(r[2], e[0]), r[3] = Math.max(r[3], e[1]);
|
|
5554
5554
|
}
|
|
5555
|
-
function
|
|
5555
|
+
function St(r, e) {
|
|
5556
5556
|
return !(r[0] <= e[0] || r[2] >= e[2] || r[1] <= e[1] || r[3] >= e[3]);
|
|
5557
5557
|
}
|
|
5558
|
-
function
|
|
5558
|
+
function Sl(r, e, t) {
|
|
5559
5559
|
return e[1] > r[1] != t[1] > r[1] && r[0] < (t[0] - e[0]) * (r[1] - e[1]) / (t[1] - e[1]) + e[0];
|
|
5560
5560
|
}
|
|
5561
|
-
function
|
|
5561
|
+
function xl(r, e, t) {
|
|
5562
5562
|
const n = r[0] - e[0], a = r[1] - e[1], o = r[0] - t[0], i = r[1] - t[1];
|
|
5563
5563
|
return n * i - o * a === 0 && n * o <= 0 && a * i <= 0;
|
|
5564
5564
|
}
|
|
5565
5565
|
function fr(r, e, t, n) {
|
|
5566
5566
|
const a = [e[0] - r[0], e[1] - r[1]], o = [n[0] - t[0], n[1] - t[1]];
|
|
5567
|
-
return
|
|
5567
|
+
return El(o, a) === 0 ? !1 : !!(Kn(r, e, t, n) && Kn(t, n, r, e));
|
|
5568
5568
|
}
|
|
5569
|
-
function
|
|
5569
|
+
function kl(r, e, t) {
|
|
5570
5570
|
for (const n of t)
|
|
5571
5571
|
for (let a = 0; a < n.length - 1; ++a)
|
|
5572
5572
|
if (fr(r, e, n[a], n[a + 1]))
|
|
5573
5573
|
return !0;
|
|
5574
5574
|
return !1;
|
|
5575
5575
|
}
|
|
5576
|
-
function
|
|
5576
|
+
function ut(r, e, t = !1) {
|
|
5577
5577
|
let n = !1;
|
|
5578
5578
|
for (const a of e)
|
|
5579
5579
|
for (let o = 0; o < a.length - 1; o++) {
|
|
5580
|
-
if (
|
|
5580
|
+
if (xl(r, a[o], a[o + 1]))
|
|
5581
5581
|
return t;
|
|
5582
|
-
|
|
5582
|
+
Sl(r, a[o], a[o + 1]) && (n = !n);
|
|
5583
5583
|
}
|
|
5584
5584
|
return n;
|
|
5585
5585
|
}
|
|
5586
|
-
function
|
|
5586
|
+
function Ll(r, e) {
|
|
5587
5587
|
for (const t of e)
|
|
5588
|
-
if (
|
|
5588
|
+
if (ut(r, t))
|
|
5589
5589
|
return !0;
|
|
5590
5590
|
return !1;
|
|
5591
5591
|
}
|
|
5592
5592
|
function eo(r, e) {
|
|
5593
5593
|
for (const t of r)
|
|
5594
|
-
if (!
|
|
5594
|
+
if (!ut(t, e))
|
|
5595
5595
|
return !1;
|
|
5596
5596
|
for (let t = 0; t < r.length - 1; ++t)
|
|
5597
|
-
if (
|
|
5597
|
+
if (kl(r[t], r[t + 1], e))
|
|
5598
5598
|
return !1;
|
|
5599
5599
|
return !0;
|
|
5600
5600
|
}
|
|
5601
|
-
function
|
|
5601
|
+
function Cl(r, e) {
|
|
5602
5602
|
for (const t of e)
|
|
5603
5603
|
if (eo(r, t))
|
|
5604
5604
|
return !0;
|
|
5605
5605
|
return !1;
|
|
5606
5606
|
}
|
|
5607
|
-
function
|
|
5607
|
+
function El(r, e) {
|
|
5608
5608
|
return r[0] * e[1] - r[1] * e[0];
|
|
5609
5609
|
}
|
|
5610
5610
|
function Kn(r, e, t, n) {
|
|
@@ -5616,8 +5616,8 @@ function bn(r, e, t) {
|
|
|
5616
5616
|
for (let a = 0; a < r.length; a++) {
|
|
5617
5617
|
const o = [];
|
|
5618
5618
|
for (let i = 0; i < r[a].length; i++) {
|
|
5619
|
-
const s =
|
|
5620
|
-
|
|
5619
|
+
const s = yl(r[a][i], t);
|
|
5620
|
+
_t(e, s), o.push(s);
|
|
5621
5621
|
}
|
|
5622
5622
|
n.push(o);
|
|
5623
5623
|
}
|
|
@@ -5637,9 +5637,9 @@ function ro(r, e, t, n) {
|
|
|
5637
5637
|
let o = r[0] - t[0] > a ? -n : t[0] - r[0] > a ? n : 0;
|
|
5638
5638
|
o === 0 && (o = r[0] - t[2] > a ? -n : t[2] - r[0] > a ? n : 0), r[0] += o;
|
|
5639
5639
|
}
|
|
5640
|
-
|
|
5640
|
+
_t(e, r);
|
|
5641
5641
|
}
|
|
5642
|
-
function
|
|
5642
|
+
function Al(r) {
|
|
5643
5643
|
r[0] = r[1] = 1 / 0, r[2] = r[3] = -1 / 0;
|
|
5644
5644
|
}
|
|
5645
5645
|
function Xn(r, e, t, n) {
|
|
@@ -5657,43 +5657,43 @@ function Yn(r, e, t, n) {
|
|
|
5657
5657
|
const l = [];
|
|
5658
5658
|
for (const u of s) {
|
|
5659
5659
|
const c = [u.x + o[0], u.y + o[1]];
|
|
5660
|
-
|
|
5660
|
+
_t(e, c), l.push(c);
|
|
5661
5661
|
}
|
|
5662
5662
|
i.push(l);
|
|
5663
5663
|
}
|
|
5664
5664
|
if (e[2] - e[0] <= a / 2) {
|
|
5665
|
-
|
|
5665
|
+
Al(e);
|
|
5666
5666
|
for (const s of i)
|
|
5667
5667
|
for (const l of s)
|
|
5668
5668
|
ro(l, e, t, a);
|
|
5669
5669
|
}
|
|
5670
5670
|
return i;
|
|
5671
5671
|
}
|
|
5672
|
-
function
|
|
5672
|
+
function Tl(r, e) {
|
|
5673
5673
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
|
|
5674
5674
|
if (e.type === "Polygon") {
|
|
5675
5675
|
const o = bn(e.coordinates, n, a), i = Xn(r.geometry(), t, n, a);
|
|
5676
|
-
if (!
|
|
5676
|
+
if (!St(t, n))
|
|
5677
5677
|
return !1;
|
|
5678
5678
|
for (const s of i)
|
|
5679
|
-
if (!
|
|
5679
|
+
if (!ut(s, o))
|
|
5680
5680
|
return !1;
|
|
5681
5681
|
}
|
|
5682
5682
|
if (e.type === "MultiPolygon") {
|
|
5683
5683
|
const o = to(e.coordinates, n, a), i = Xn(r.geometry(), t, n, a);
|
|
5684
|
-
if (!
|
|
5684
|
+
if (!St(t, n))
|
|
5685
5685
|
return !1;
|
|
5686
5686
|
for (const s of i)
|
|
5687
|
-
if (!
|
|
5687
|
+
if (!Ll(s, o))
|
|
5688
5688
|
return !1;
|
|
5689
5689
|
}
|
|
5690
5690
|
return !0;
|
|
5691
5691
|
}
|
|
5692
|
-
function
|
|
5692
|
+
function _l(r, e) {
|
|
5693
5693
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
|
|
5694
5694
|
if (e.type === "Polygon") {
|
|
5695
5695
|
const o = bn(e.coordinates, n, a), i = Yn(r.geometry(), t, n, a);
|
|
5696
|
-
if (!
|
|
5696
|
+
if (!St(t, n))
|
|
5697
5697
|
return !1;
|
|
5698
5698
|
for (const s of i)
|
|
5699
5699
|
if (!eo(s, o))
|
|
@@ -5701,10 +5701,10 @@ function Tl(r, e) {
|
|
|
5701
5701
|
}
|
|
5702
5702
|
if (e.type === "MultiPolygon") {
|
|
5703
5703
|
const o = to(e.coordinates, n, a), i = Yn(r.geometry(), t, n, a);
|
|
5704
|
-
if (!
|
|
5704
|
+
if (!St(t, n))
|
|
5705
5705
|
return !1;
|
|
5706
5706
|
for (const s of i)
|
|
5707
|
-
if (!
|
|
5707
|
+
if (!Cl(s, o))
|
|
5708
5708
|
return !1;
|
|
5709
5709
|
}
|
|
5710
5710
|
return !0;
|
|
@@ -5716,7 +5716,7 @@ class qe {
|
|
|
5716
5716
|
static parse(e, t) {
|
|
5717
5717
|
if (e.length !== 2)
|
|
5718
5718
|
return t.error(`'within' expression requires exactly one argument, but found ${e.length - 1} instead.`);
|
|
5719
|
-
if (
|
|
5719
|
+
if (bt(e[1])) {
|
|
5720
5720
|
const n = e[1];
|
|
5721
5721
|
if (n.type === "FeatureCollection") {
|
|
5722
5722
|
const a = [];
|
|
@@ -5743,9 +5743,9 @@ class qe {
|
|
|
5743
5743
|
evaluate(e) {
|
|
5744
5744
|
if (e.geometry() != null && e.canonicalID() != null) {
|
|
5745
5745
|
if (e.geometryType() === "Point")
|
|
5746
|
-
return Al(e, this.geometries);
|
|
5747
|
-
if (e.geometryType() === "LineString")
|
|
5748
5746
|
return Tl(e, this.geometries);
|
|
5747
|
+
if (e.geometryType() === "LineString")
|
|
5748
|
+
return _l(e, this.geometries);
|
|
5749
5749
|
}
|
|
5750
5750
|
return !1;
|
|
5751
5751
|
}
|
|
@@ -5791,27 +5791,27 @@ class no {
|
|
|
5791
5791
|
t[e] = o;
|
|
5792
5792
|
}
|
|
5793
5793
|
}
|
|
5794
|
-
function
|
|
5794
|
+
function Il(r, e) {
|
|
5795
5795
|
if (r.length <= 1)
|
|
5796
5796
|
return [r];
|
|
5797
5797
|
const n = [];
|
|
5798
5798
|
let a, o;
|
|
5799
5799
|
for (const i of r) {
|
|
5800
|
-
const s =
|
|
5800
|
+
const s = Ml(i);
|
|
5801
5801
|
s !== 0 && (i.area = Math.abs(s), o === void 0 && (o = s < 0), o === s < 0 ? (a && n.push(a), a = [i]) : a.push(i));
|
|
5802
5802
|
}
|
|
5803
5803
|
return a && n.push(a), n;
|
|
5804
5804
|
}
|
|
5805
|
-
function
|
|
5805
|
+
function Ml(r) {
|
|
5806
5806
|
let e = 0;
|
|
5807
5807
|
for (let t = 0, n = r.length, a = n - 1, o, i; t < n; a = t++)
|
|
5808
5808
|
o = r[t], i = r[a], e += (i.x - o.x) * (o.y + i.y);
|
|
5809
5809
|
return e;
|
|
5810
5810
|
}
|
|
5811
|
-
const
|
|
5811
|
+
const Pl = 6378.137, Wn = 1 / 298.257223563, Jn = Wn * (2 - Wn), Qn = Math.PI / 180;
|
|
5812
5812
|
class wn {
|
|
5813
5813
|
constructor(e) {
|
|
5814
|
-
const t = Qn *
|
|
5814
|
+
const t = Qn * Pl * 1e3, n = Math.cos(e * Qn), a = 1 / (1 - Jn * (1 - n * n)), o = Math.sqrt(a);
|
|
5815
5815
|
this.kx = t * o * n, this.ky = t * o * a * (1 - Jn);
|
|
5816
5816
|
}
|
|
5817
5817
|
/**
|
|
@@ -5898,14 +5898,14 @@ function Vr(r, e) {
|
|
|
5898
5898
|
return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
5899
5899
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
5900
5900
|
for (let n = e[0]; n <= e[1]; ++n)
|
|
5901
|
-
|
|
5901
|
+
_t(t, r[n]);
|
|
5902
5902
|
return t;
|
|
5903
5903
|
}
|
|
5904
5904
|
function Gr(r) {
|
|
5905
5905
|
const e = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
5906
5906
|
for (const t of r)
|
|
5907
5907
|
for (const n of t)
|
|
5908
|
-
|
|
5908
|
+
_t(e, n);
|
|
5909
5909
|
return e;
|
|
5910
5910
|
}
|
|
5911
5911
|
function ea(r) {
|
|
@@ -5925,7 +5925,7 @@ function xn(r, e, t, n, a) {
|
|
|
5925
5925
|
const o = Math.min(je(r, [t, n], a), je(e, [t, n], a)), i = Math.min(je(t, [r, e], a), je(n, [r, e], a));
|
|
5926
5926
|
return Math.min(o, i);
|
|
5927
5927
|
}
|
|
5928
|
-
function
|
|
5928
|
+
function Rl(r, e, t, n, a) {
|
|
5929
5929
|
if (!(Ee(e, r.length) && Ee(n, t.length)))
|
|
5930
5930
|
return 1 / 0;
|
|
5931
5931
|
let i = 1 / 0;
|
|
@@ -5940,7 +5940,7 @@ function Pl(r, e, t, n, a) {
|
|
|
5940
5940
|
}
|
|
5941
5941
|
return i;
|
|
5942
5942
|
}
|
|
5943
|
-
function
|
|
5943
|
+
function zl(r, e, t, n, a) {
|
|
5944
5944
|
if (!(Ee(e, r.length) && Ee(n, t.length)))
|
|
5945
5945
|
return NaN;
|
|
5946
5946
|
let i = 1 / 0;
|
|
@@ -5950,8 +5950,8 @@ function Rl(r, e, t, n, a) {
|
|
|
5950
5950
|
return i;
|
|
5951
5951
|
return i;
|
|
5952
5952
|
}
|
|
5953
|
-
function
|
|
5954
|
-
if (
|
|
5953
|
+
function Ol(r, e, t) {
|
|
5954
|
+
if (ut(r, e, !0))
|
|
5955
5955
|
return 0;
|
|
5956
5956
|
let n = 1 / 0;
|
|
5957
5957
|
for (const a of e) {
|
|
@@ -5964,11 +5964,11 @@ function zl(r, e, t) {
|
|
|
5964
5964
|
}
|
|
5965
5965
|
return n;
|
|
5966
5966
|
}
|
|
5967
|
-
function
|
|
5967
|
+
function Fl(r, e, t, n) {
|
|
5968
5968
|
if (!Ee(e, r.length))
|
|
5969
5969
|
return NaN;
|
|
5970
5970
|
for (let o = e[0]; o <= e[1]; ++o)
|
|
5971
|
-
if (
|
|
5971
|
+
if (ut(r[o], t, !0))
|
|
5972
5972
|
return 0;
|
|
5973
5973
|
let a = 1 / 0;
|
|
5974
5974
|
for (let o = e[0]; o < e[1]; ++o) {
|
|
@@ -5986,7 +5986,7 @@ function Ol(r, e, t, n) {
|
|
|
5986
5986
|
function ta(r, e) {
|
|
5987
5987
|
for (const t of r)
|
|
5988
5988
|
for (const n of t)
|
|
5989
|
-
if (
|
|
5989
|
+
if (ut(n, e, !0))
|
|
5990
5990
|
return !0;
|
|
5991
5991
|
return !1;
|
|
5992
5992
|
}
|
|
@@ -5994,7 +5994,7 @@ function $l(r, e, t, n = 1 / 0) {
|
|
|
5994
5994
|
const a = Gr(r), o = Gr(e);
|
|
5995
5995
|
if (n !== 1 / 0 && Sn(a, o, t) >= n)
|
|
5996
5996
|
return n;
|
|
5997
|
-
if (
|
|
5997
|
+
if (St(a, o)) {
|
|
5998
5998
|
if (ta(r, e))
|
|
5999
5999
|
return 0;
|
|
6000
6000
|
} else if (ta(e, r))
|
|
@@ -6019,7 +6019,7 @@ function ra(r, e, t, n, a, o) {
|
|
|
6019
6019
|
const i = Sn(Vr(n, o), a, t);
|
|
6020
6020
|
i < e && r.push([i, o, [0, 0]]);
|
|
6021
6021
|
}
|
|
6022
|
-
function
|
|
6022
|
+
function Ot(r, e, t, n, a, o, i) {
|
|
6023
6023
|
if (!o || !i)
|
|
6024
6024
|
return;
|
|
6025
6025
|
const s = Sn(Vr(n, o), Vr(a, i), t);
|
|
@@ -6039,13 +6039,13 @@ function Zt(r, e, t, n, a = 1 / 0) {
|
|
|
6039
6039
|
if (!Ee(u, r.length))
|
|
6040
6040
|
return NaN;
|
|
6041
6041
|
if (e) {
|
|
6042
|
-
const p =
|
|
6042
|
+
const p = Fl(r, u, t, n);
|
|
6043
6043
|
if (isNaN(p) || p === 0)
|
|
6044
6044
|
return p;
|
|
6045
6045
|
o = Math.min(o, p);
|
|
6046
6046
|
} else
|
|
6047
6047
|
for (let p = u[0]; p <= u[1]; ++p) {
|
|
6048
|
-
const d =
|
|
6048
|
+
const d = Ol(r[p], t, n);
|
|
6049
6049
|
if (o = Math.min(o, d), o === 0)
|
|
6050
6050
|
return 0;
|
|
6051
6051
|
}
|
|
@@ -6071,7 +6071,7 @@ function Kt(r, e, t, n, a, o = 1 / 0) {
|
|
|
6071
6071
|
return NaN;
|
|
6072
6072
|
let f;
|
|
6073
6073
|
if (e && n)
|
|
6074
|
-
f =
|
|
6074
|
+
f = Rl(r, u, t, c, a), i = Math.min(i, f);
|
|
6075
6075
|
else if (e && !n) {
|
|
6076
6076
|
const h = r.slice(u[0], u[1] + 1);
|
|
6077
6077
|
for (let m = c[0]; m <= c[1]; ++m)
|
|
@@ -6083,15 +6083,15 @@ function Kt(r, e, t, n, a, o = 1 / 0) {
|
|
|
6083
6083
|
if (f = je(r[m], h, a), i = Math.min(i, f), i === 0)
|
|
6084
6084
|
return i;
|
|
6085
6085
|
} else
|
|
6086
|
-
f =
|
|
6086
|
+
f = zl(r, u, t, c, a), i = Math.min(i, f);
|
|
6087
6087
|
} else {
|
|
6088
6088
|
const f = qr(u, e), h = qr(c, n);
|
|
6089
|
-
|
|
6089
|
+
Ot(s, i, a, r, t, f[0], h[0]), Ot(s, i, a, r, t, f[0], h[1]), Ot(s, i, a, r, t, f[1], h[0]), Ot(s, i, a, r, t, f[1], h[1]);
|
|
6090
6090
|
}
|
|
6091
6091
|
}
|
|
6092
6092
|
return i;
|
|
6093
6093
|
}
|
|
6094
|
-
function
|
|
6094
|
+
function Nl(r, e) {
|
|
6095
6095
|
const t = r.geometry(), n = t.flat().map((i) => vn([i.x, i.y], r.canonical));
|
|
6096
6096
|
if (t.length === 0)
|
|
6097
6097
|
return NaN;
|
|
@@ -6114,7 +6114,7 @@ function Fl(r, e) {
|
|
|
6114
6114
|
}
|
|
6115
6115
|
return o;
|
|
6116
6116
|
}
|
|
6117
|
-
function
|
|
6117
|
+
function jl(r, e) {
|
|
6118
6118
|
const t = r.geometry(), n = t.flat().map((i) => vn([i.x, i.y], r.canonical));
|
|
6119
6119
|
if (t.length === 0)
|
|
6120
6120
|
return NaN;
|
|
@@ -6137,11 +6137,11 @@ function Nl(r, e) {
|
|
|
6137
6137
|
}
|
|
6138
6138
|
return o;
|
|
6139
6139
|
}
|
|
6140
|
-
function
|
|
6140
|
+
function Dl(r, e) {
|
|
6141
6141
|
const t = r.geometry();
|
|
6142
6142
|
if (t.length === 0 || t[0].length === 0)
|
|
6143
6143
|
return NaN;
|
|
6144
|
-
const n =
|
|
6144
|
+
const n = Il(t).map((i) => i.map((s) => s.map((l) => vn([l.x, l.y], r.canonical)))), a = new wn(n[0][0][0][1]);
|
|
6145
6145
|
let o = 1 / 0;
|
|
6146
6146
|
for (const i of e)
|
|
6147
6147
|
for (const s of n) {
|
|
@@ -6180,7 +6180,7 @@ class Ve {
|
|
|
6180
6180
|
static parse(e, t) {
|
|
6181
6181
|
if (e.length !== 2)
|
|
6182
6182
|
return t.error(`'distance' expression requires exactly one argument, but found ${e.length - 1} instead.`);
|
|
6183
|
-
if (
|
|
6183
|
+
if (bt(e[1])) {
|
|
6184
6184
|
const n = e[1];
|
|
6185
6185
|
if (n.type === "FeatureCollection")
|
|
6186
6186
|
return new Ve(n, n.features.map((a) => Ar(a.geometry)).flat());
|
|
@@ -6194,11 +6194,11 @@ class Ve {
|
|
|
6194
6194
|
evaluate(e) {
|
|
6195
6195
|
if (e.geometry() != null && e.canonicalID() != null) {
|
|
6196
6196
|
if (e.geometryType() === "Point")
|
|
6197
|
-
return Fl(e, this.geometries);
|
|
6198
|
-
if (e.geometryType() === "LineString")
|
|
6199
6197
|
return Nl(e, this.geometries);
|
|
6200
|
-
if (e.geometryType() === "
|
|
6198
|
+
if (e.geometryType() === "LineString")
|
|
6201
6199
|
return jl(e, this.geometries);
|
|
6200
|
+
if (e.geometryType() === "Polygon")
|
|
6201
|
+
return Dl(e, this.geometries);
|
|
6202
6202
|
}
|
|
6203
6203
|
return NaN;
|
|
6204
6204
|
}
|
|
@@ -6208,7 +6208,7 @@ class Ve {
|
|
|
6208
6208
|
return !0;
|
|
6209
6209
|
}
|
|
6210
6210
|
}
|
|
6211
|
-
class
|
|
6211
|
+
class It {
|
|
6212
6212
|
constructor(e) {
|
|
6213
6213
|
this.type = I, this.key = e;
|
|
6214
6214
|
}
|
|
@@ -6216,12 +6216,12 @@ class _t {
|
|
|
6216
6216
|
if (e.length !== 2)
|
|
6217
6217
|
return t.error(`Expected 1 argument, but found ${e.length - 1} instead.`);
|
|
6218
6218
|
const n = e[1];
|
|
6219
|
-
return n == null ? t.error("Global state property must be defined.") : typeof n != "string" ? t.error(`Global state property must be string, but found ${typeof e[1]} instead.`) : new
|
|
6219
|
+
return n == null ? t.error("Global state property must be defined.") : typeof n != "string" ? t.error(`Global state property must be string, but found ${typeof e[1]} instead.`) : new It(n);
|
|
6220
6220
|
}
|
|
6221
6221
|
evaluate(e) {
|
|
6222
6222
|
var t;
|
|
6223
6223
|
const n = (t = e.globals) === null || t === void 0 ? void 0 : t.globalState;
|
|
6224
|
-
return !n || Object.keys(n).length === 0 ? null :
|
|
6224
|
+
return !n || Object.keys(n).length === 0 ? null : dt(n, this.key);
|
|
6225
6225
|
}
|
|
6226
6226
|
eachChild() {
|
|
6227
6227
|
}
|
|
@@ -6231,17 +6231,17 @@ class _t {
|
|
|
6231
6231
|
}
|
|
6232
6232
|
const kn = {
|
|
6233
6233
|
// special forms
|
|
6234
|
-
"==":
|
|
6235
|
-
"!=":
|
|
6236
|
-
">":
|
|
6237
|
-
"<":
|
|
6238
|
-
">=":
|
|
6239
|
-
"<=":
|
|
6234
|
+
"==": cl,
|
|
6235
|
+
"!=": pl,
|
|
6236
|
+
">": dl,
|
|
6237
|
+
"<": fl,
|
|
6238
|
+
">=": ml,
|
|
6239
|
+
"<=": hl,
|
|
6240
6240
|
array: pe,
|
|
6241
6241
|
at: cn,
|
|
6242
6242
|
boolean: pe,
|
|
6243
6243
|
case: dn,
|
|
6244
|
-
coalesce:
|
|
6244
|
+
coalesce: wt,
|
|
6245
6245
|
collator: pr,
|
|
6246
6246
|
format: mn,
|
|
6247
6247
|
image: yn,
|
|
@@ -6252,7 +6252,7 @@ const kn = {
|
|
|
6252
6252
|
"interpolate-lab": Se,
|
|
6253
6253
|
length: gn,
|
|
6254
6254
|
let: lr,
|
|
6255
|
-
literal:
|
|
6255
|
+
literal: ot,
|
|
6256
6256
|
match: fn,
|
|
6257
6257
|
number: pe,
|
|
6258
6258
|
"number-format": hn,
|
|
@@ -6267,7 +6267,7 @@ const kn = {
|
|
|
6267
6267
|
var: ur,
|
|
6268
6268
|
within: qe,
|
|
6269
6269
|
distance: Ve,
|
|
6270
|
-
"global-state":
|
|
6270
|
+
"global-state": It
|
|
6271
6271
|
};
|
|
6272
6272
|
class he {
|
|
6273
6273
|
constructor(e, t, n, a) {
|
|
@@ -6317,7 +6317,7 @@ class he {
|
|
|
6317
6317
|
if (s.length === 1)
|
|
6318
6318
|
t.errors.push(...l.errors);
|
|
6319
6319
|
else {
|
|
6320
|
-
const c = (s.length ? s : i).map(([d]) =>
|
|
6320
|
+
const c = (s.length ? s : i).map(([d]) => Bl(d)).join(" | "), p = [];
|
|
6321
6321
|
for (let d = 1; d < e.length; d++) {
|
|
6322
6322
|
const f = t.parse(e[d], 1 + p.length);
|
|
6323
6323
|
if (!f)
|
|
@@ -6339,7 +6339,7 @@ function na(r, [e, t, n, a]) {
|
|
|
6339
6339
|
const o = a ? a.evaluate(r) : 1, i = Xa(e, t, n, o);
|
|
6340
6340
|
if (i)
|
|
6341
6341
|
throw new V(i);
|
|
6342
|
-
return new
|
|
6342
|
+
return new $(e / 255, t / 255, n / 255, o, !1);
|
|
6343
6343
|
}
|
|
6344
6344
|
function aa(r, e) {
|
|
6345
6345
|
return r in e;
|
|
@@ -6348,7 +6348,7 @@ function Tr(r, e) {
|
|
|
6348
6348
|
const t = e[r];
|
|
6349
6349
|
return typeof t > "u" ? null : t;
|
|
6350
6350
|
}
|
|
6351
|
-
function
|
|
6351
|
+
function Ul(r, e, t, n) {
|
|
6352
6352
|
for (; t <= n; ) {
|
|
6353
6353
|
const a = t + n >> 1;
|
|
6354
6354
|
if (e[a] === r)
|
|
@@ -6357,12 +6357,12 @@ function Dl(r, e, t, n) {
|
|
|
6357
6357
|
}
|
|
6358
6358
|
return !1;
|
|
6359
6359
|
}
|
|
6360
|
-
function
|
|
6360
|
+
function $e(r) {
|
|
6361
6361
|
return { type: r };
|
|
6362
6362
|
}
|
|
6363
6363
|
he.register(kn, {
|
|
6364
6364
|
error: [
|
|
6365
|
-
|
|
6365
|
+
Os,
|
|
6366
6366
|
[P],
|
|
6367
6367
|
(r, [e]) => {
|
|
6368
6368
|
throw new V(e.evaluate(r));
|
|
@@ -6464,7 +6464,7 @@ he.register(kn, {
|
|
|
6464
6464
|
],
|
|
6465
6465
|
"+": [
|
|
6466
6466
|
S,
|
|
6467
|
-
|
|
6467
|
+
$e(S),
|
|
6468
6468
|
(r, e) => {
|
|
6469
6469
|
let t = 0;
|
|
6470
6470
|
for (const n of e)
|
|
@@ -6474,7 +6474,7 @@ he.register(kn, {
|
|
|
6474
6474
|
],
|
|
6475
6475
|
"*": [
|
|
6476
6476
|
S,
|
|
6477
|
-
|
|
6477
|
+
$e(S),
|
|
6478
6478
|
(r, e) => {
|
|
6479
6479
|
let t = 1;
|
|
6480
6480
|
for (const n of e)
|
|
@@ -6577,12 +6577,12 @@ he.register(kn, {
|
|
|
6577
6577
|
],
|
|
6578
6578
|
min: [
|
|
6579
6579
|
S,
|
|
6580
|
-
|
|
6580
|
+
$e(S),
|
|
6581
6581
|
(r, e) => Math.min(...e.map((t) => t.evaluate(r)))
|
|
6582
6582
|
],
|
|
6583
6583
|
max: [
|
|
6584
6584
|
S,
|
|
6585
|
-
|
|
6585
|
+
$e(S),
|
|
6586
6586
|
(r, e) => Math.max(...e.map((t) => t.evaluate(r)))
|
|
6587
6587
|
],
|
|
6588
6588
|
abs: [
|
|
@@ -6717,7 +6717,7 @@ he.register(kn, {
|
|
|
6717
6717
|
M,
|
|
6718
6718
|
[P, ae(I)],
|
|
6719
6719
|
// assumes v is a array literal with values sorted in ascending order and of a single type
|
|
6720
|
-
(r, [e, t]) =>
|
|
6720
|
+
(r, [e, t]) => Ul(r.properties()[e.value], t.value, 0, t.value.length - 1)
|
|
6721
6721
|
],
|
|
6722
6722
|
all: {
|
|
6723
6723
|
type: M,
|
|
@@ -6727,7 +6727,7 @@ he.register(kn, {
|
|
|
6727
6727
|
(r, [e, t]) => e.evaluate(r) && t.evaluate(r)
|
|
6728
6728
|
],
|
|
6729
6729
|
[
|
|
6730
|
-
|
|
6730
|
+
$e(M),
|
|
6731
6731
|
(r, e) => {
|
|
6732
6732
|
for (const t of e)
|
|
6733
6733
|
if (!t.evaluate(r))
|
|
@@ -6745,7 +6745,7 @@ he.register(kn, {
|
|
|
6745
6745
|
(r, [e, t]) => e.evaluate(r) || t.evaluate(r)
|
|
6746
6746
|
],
|
|
6747
6747
|
[
|
|
6748
|
-
|
|
6748
|
+
$e(M),
|
|
6749
6749
|
(r, e) => {
|
|
6750
6750
|
for (const t of e)
|
|
6751
6751
|
if (t.evaluate(r))
|
|
@@ -6781,8 +6781,8 @@ he.register(kn, {
|
|
|
6781
6781
|
],
|
|
6782
6782
|
concat: [
|
|
6783
6783
|
P,
|
|
6784
|
-
|
|
6785
|
-
(r, e) => e.map((t) =>
|
|
6784
|
+
$e(I),
|
|
6785
|
+
(r, e) => e.map((t) => ht(t.evaluate(r))).join("")
|
|
6786
6786
|
],
|
|
6787
6787
|
"resolved-locale": [
|
|
6788
6788
|
P,
|
|
@@ -6790,7 +6790,7 @@ he.register(kn, {
|
|
|
6790
6790
|
(r, [e]) => e.evaluate(r).resolvedLocale()
|
|
6791
6791
|
]
|
|
6792
6792
|
});
|
|
6793
|
-
function
|
|
6793
|
+
function Bl(r) {
|
|
6794
6794
|
return Array.isArray(r) ? `(${r.map(D).join(", ")})` : `(${D(r.type)}...)`;
|
|
6795
6795
|
}
|
|
6796
6796
|
function Xt(r) {
|
|
@@ -6804,12 +6804,12 @@ function Xt(r) {
|
|
|
6804
6804
|
return !1;
|
|
6805
6805
|
if (r instanceof Ve)
|
|
6806
6806
|
return !1;
|
|
6807
|
-
if (r instanceof
|
|
6807
|
+
if (r instanceof It)
|
|
6808
6808
|
return !1;
|
|
6809
6809
|
const e = r instanceof Re || r instanceof pe;
|
|
6810
6810
|
let t = !0;
|
|
6811
6811
|
return r.eachChild((n) => {
|
|
6812
|
-
e ? t = t && Xt(n) : t = t && n instanceof
|
|
6812
|
+
e ? t = t && Xt(n) : t = t && n instanceof ot;
|
|
6813
6813
|
}), t ? dr(r) && hr(r, ["zoom", "heatmap-density", "elevation", "line-progress", "accumulated", "is-supported-script"]) : !1;
|
|
6814
6814
|
}
|
|
6815
6815
|
function dr(r) {
|
|
@@ -6832,12 +6832,12 @@ function dr(r) {
|
|
|
6832
6832
|
e && !dr(t) && (e = !1);
|
|
6833
6833
|
}), e;
|
|
6834
6834
|
}
|
|
6835
|
-
function
|
|
6835
|
+
function xt(r) {
|
|
6836
6836
|
if (r instanceof he && r.name === "feature-state")
|
|
6837
6837
|
return !1;
|
|
6838
6838
|
let e = !0;
|
|
6839
6839
|
return r.eachChild((t) => {
|
|
6840
|
-
e && !
|
|
6840
|
+
e && !xt(t) && (e = !1);
|
|
6841
6841
|
}), e;
|
|
6842
6842
|
}
|
|
6843
6843
|
function hr(r, e) {
|
|
@@ -6869,15 +6869,15 @@ function R(r) {
|
|
|
6869
6869
|
function Ln(r) {
|
|
6870
6870
|
return typeof r == "object" && r !== null && !Array.isArray(r) && H(r) === De;
|
|
6871
6871
|
}
|
|
6872
|
-
class
|
|
6872
|
+
class ql {
|
|
6873
6873
|
constructor(e, t, n) {
|
|
6874
|
-
this.expression = e, this._warningHistory = {}, this._evaluator = new Ya(), this._defaultValue = t ?
|
|
6874
|
+
this.expression = e, this._warningHistory = {}, this._evaluator = new Ya(), this._defaultValue = t ? Hl(t) : null, this._enumValues = t && t.type === "enum" ? t.values : null, this._globalState = n;
|
|
6875
6875
|
}
|
|
6876
6876
|
evaluateWithoutErrorHandling(e, t, n, a, o, i) {
|
|
6877
|
-
return this._globalState && (e =
|
|
6877
|
+
return this._globalState && (e = it(e, this._globalState)), this._evaluator.globals = e, this._evaluator.feature = t, this._evaluator.featureState = n, this._evaluator.canonical = a, this._evaluator.availableImages = o || null, this._evaluator.formattedSection = i, this.expression.evaluate(this._evaluator);
|
|
6878
6878
|
}
|
|
6879
6879
|
evaluate(e, t, n, a, o, i) {
|
|
6880
|
-
this._globalState && (e =
|
|
6880
|
+
this._globalState && (e = it(e, this._globalState)), this._evaluator.globals = e, this._evaluator.feature = t || null, this._evaluator.featureState = n || null, this._evaluator.canonical = a, this._evaluator.availableImages = o || null, this._evaluator.formattedSection = i || null;
|
|
6881
6881
|
try {
|
|
6882
6882
|
const s = this.expression.evaluate(this._evaluator);
|
|
6883
6883
|
if (s == null || typeof s == "number" && s !== s)
|
|
@@ -6894,35 +6894,35 @@ function so(r) {
|
|
|
6894
6894
|
return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in kn;
|
|
6895
6895
|
}
|
|
6896
6896
|
function lo(r, e, t) {
|
|
6897
|
-
const n = new sr(kn, Xt, [], e ?
|
|
6898
|
-
return a ? Hr(new
|
|
6897
|
+
const n = new sr(kn, Xt, [], e ? Gl(e) : void 0), a = n.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
|
|
6898
|
+
return a ? Hr(new ql(a, e, t)) : et(n.errors);
|
|
6899
6899
|
}
|
|
6900
6900
|
class oa {
|
|
6901
6901
|
constructor(e, t, n) {
|
|
6902
|
-
this.kind = e, this._styleExpression = t, this.isStateDependent = e !== "constant" && !
|
|
6902
|
+
this.kind = e, this._styleExpression = t, this.isStateDependent = e !== "constant" && !xt(t.expression), this.globalStateRefs = Cn(t.expression), this._globalState = n;
|
|
6903
6903
|
}
|
|
6904
6904
|
evaluateWithoutErrorHandling(e, t, n, a, o, i) {
|
|
6905
|
-
return this._globalState && (e =
|
|
6905
|
+
return this._globalState && (e = it(e, this._globalState)), this._styleExpression.evaluateWithoutErrorHandling(e, t, n, a, o, i);
|
|
6906
6906
|
}
|
|
6907
6907
|
evaluate(e, t, n, a, o, i) {
|
|
6908
|
-
return this._globalState && (e =
|
|
6908
|
+
return this._globalState && (e = it(e, this._globalState)), this._styleExpression.evaluate(e, t, n, a, o, i);
|
|
6909
6909
|
}
|
|
6910
6910
|
}
|
|
6911
6911
|
class ia {
|
|
6912
6912
|
constructor(e, t, n, a, o) {
|
|
6913
|
-
this.kind = e, this.zoomStops = n, this._styleExpression = t, this.isStateDependent = e !== "camera" && !
|
|
6913
|
+
this.kind = e, this.zoomStops = n, this._styleExpression = t, this.isStateDependent = e !== "camera" && !xt(t.expression), this.globalStateRefs = Cn(t.expression), this.interpolationType = a, this._globalState = o;
|
|
6914
6914
|
}
|
|
6915
6915
|
evaluateWithoutErrorHandling(e, t, n, a, o, i) {
|
|
6916
|
-
return this._globalState && (e =
|
|
6916
|
+
return this._globalState && (e = it(e, this._globalState)), this._styleExpression.evaluateWithoutErrorHandling(e, t, n, a, o, i);
|
|
6917
6917
|
}
|
|
6918
6918
|
evaluate(e, t, n, a, o, i) {
|
|
6919
|
-
return this._globalState && (e =
|
|
6919
|
+
return this._globalState && (e = it(e, this._globalState)), this._styleExpression.evaluate(e, t, n, a, o, i);
|
|
6920
6920
|
}
|
|
6921
6921
|
interpolationFactor(e, t, n) {
|
|
6922
6922
|
return this.interpolationType ? Se.interpolationFactor(this.interpolationType, e, t, n) : 0;
|
|
6923
6923
|
}
|
|
6924
6924
|
}
|
|
6925
|
-
function
|
|
6925
|
+
function Vl(r, e, t) {
|
|
6926
6926
|
const n = lo(r, e, t);
|
|
6927
6927
|
if (n.result === "error")
|
|
6928
6928
|
return n;
|
|
@@ -6948,7 +6948,7 @@ function jt(r) {
|
|
|
6948
6948
|
let e = null;
|
|
6949
6949
|
if (r instanceof lr)
|
|
6950
6950
|
e = jt(r.result);
|
|
6951
|
-
else if (r instanceof
|
|
6951
|
+
else if (r instanceof wt) {
|
|
6952
6952
|
for (const t of r.args)
|
|
6953
6953
|
if (e = jt(t), e)
|
|
6954
6954
|
break;
|
|
@@ -6959,11 +6959,11 @@ function jt(r) {
|
|
|
6959
6959
|
}), e;
|
|
6960
6960
|
}
|
|
6961
6961
|
function Cn(r, e = /* @__PURE__ */ new Set()) {
|
|
6962
|
-
return r instanceof
|
|
6962
|
+
return r instanceof It && e.add(r.key), r.eachChild((t) => {
|
|
6963
6963
|
Cn(t, e);
|
|
6964
6964
|
}), e;
|
|
6965
6965
|
}
|
|
6966
|
-
function
|
|
6966
|
+
function Gl(r) {
|
|
6967
6967
|
const e = {
|
|
6968
6968
|
color: be,
|
|
6969
6969
|
string: P,
|
|
@@ -6973,19 +6973,19 @@ function Vl(r) {
|
|
|
6973
6973
|
formatted: nr,
|
|
6974
6974
|
padding: ar,
|
|
6975
6975
|
numberArray: or,
|
|
6976
|
-
colorArray:
|
|
6976
|
+
colorArray: yt,
|
|
6977
6977
|
projectionDefinition: tr,
|
|
6978
|
-
resolvedImage:
|
|
6978
|
+
resolvedImage: Tt,
|
|
6979
6979
|
variableAnchorOffsetCollection: ir
|
|
6980
6980
|
};
|
|
6981
6981
|
return r.type === "array" ? ae(e[r.value] || I, r.length) : e[r.type];
|
|
6982
6982
|
}
|
|
6983
|
-
function
|
|
6983
|
+
function Hl(r) {
|
|
6984
6984
|
if (r.type === "color" && Ln(r.default))
|
|
6985
|
-
return new
|
|
6985
|
+
return new $(0, 0, 0, 0);
|
|
6986
6986
|
switch (r.type) {
|
|
6987
6987
|
case "color":
|
|
6988
|
-
return
|
|
6988
|
+
return $.parse(r.default) || null;
|
|
6989
6989
|
case "padding":
|
|
6990
6990
|
return fe.parse(r.default) || null;
|
|
6991
6991
|
case "numberArray":
|
|
@@ -7000,7 +7000,7 @@ function Gl(r) {
|
|
|
7000
7000
|
return r.default === void 0 ? null : r.default;
|
|
7001
7001
|
}
|
|
7002
7002
|
}
|
|
7003
|
-
function
|
|
7003
|
+
function it(r, e) {
|
|
7004
7004
|
const { zoom: t, heatmapDensity: n, elevation: a, lineProgress: o, isSupportedScript: i, accumulated: s } = r ?? {};
|
|
7005
7005
|
return {
|
|
7006
7006
|
zoom: t,
|
|
@@ -7068,11 +7068,11 @@ function le(r) {
|
|
|
7068
7068
|
if (u !== "object")
|
|
7069
7069
|
return [new w(e, t, `object expected, ${u} found`)];
|
|
7070
7070
|
for (const c in t) {
|
|
7071
|
-
const p = c.split(".")[0], d =
|
|
7071
|
+
const p = c.split(".")[0], d = dt(n, p) || n["*"];
|
|
7072
7072
|
let f;
|
|
7073
|
-
if (
|
|
7073
|
+
if (dt(a, p))
|
|
7074
7074
|
f = a[p];
|
|
7075
|
-
else if (
|
|
7075
|
+
else if (dt(n, p))
|
|
7076
7076
|
f = s;
|
|
7077
7077
|
else if (a["*"])
|
|
7078
7078
|
f = a["*"];
|
|
@@ -7227,16 +7227,16 @@ function po(r) {
|
|
|
7227
7227
|
});
|
|
7228
7228
|
}
|
|
7229
7229
|
}
|
|
7230
|
-
function
|
|
7231
|
-
const e = (r.expressionContext === "property" ?
|
|
7230
|
+
function st(r) {
|
|
7231
|
+
const e = (r.expressionContext === "property" ? Vl : lo)(Ze(r.value), r.valueSpec);
|
|
7232
7232
|
if (e.result === "error")
|
|
7233
7233
|
return e.value.map((n) => new w(`${r.key}${n.key}`, r.value, n.message));
|
|
7234
7234
|
const t = e.value.expression || e.value._styleExpression.expression;
|
|
7235
7235
|
if (r.expressionContext === "property" && r.propertyKey === "text-font" && !t.outputDefined())
|
|
7236
7236
|
return [new w(r.key, r.value, `Invalid data expression for "${r.propertyKey}". Output values must be contained as literals within the expression.`)];
|
|
7237
|
-
if (r.expressionContext === "property" && r.propertyType === "layout" && !
|
|
7237
|
+
if (r.expressionContext === "property" && r.propertyType === "layout" && !xt(t))
|
|
7238
7238
|
return [new w(r.key, r.value, '"feature-state" data expressions are not supported with layout properties.')];
|
|
7239
|
-
if (r.expressionContext === "filter" && !
|
|
7239
|
+
if (r.expressionContext === "filter" && !xt(t))
|
|
7240
7240
|
return [new w(r.key, r.value, '"feature-state" data expressions are not supported with filters.')];
|
|
7241
7241
|
if (r.expressionContext && r.expressionContext.indexOf("cluster") === 0) {
|
|
7242
7242
|
if (!hr(t, ["zoom", "feature-state"]))
|
|
@@ -7246,20 +7246,20 @@ function it(r) {
|
|
|
7246
7246
|
}
|
|
7247
7247
|
return [];
|
|
7248
7248
|
}
|
|
7249
|
-
function
|
|
7249
|
+
function Zl(r) {
|
|
7250
7250
|
const e = r.value, t = r.key, n = R(e);
|
|
7251
7251
|
return n !== "boolean" ? [new w(t, e, `boolean expected, ${n} found`)] : [];
|
|
7252
7252
|
}
|
|
7253
7253
|
function Zr(r) {
|
|
7254
7254
|
const e = r.key, t = r.value, n = R(t);
|
|
7255
|
-
return n !== "string" ? [new w(e, t, `color expected, ${n} found`)] :
|
|
7255
|
+
return n !== "string" ? [new w(e, t, `color expected, ${n} found`)] : $.parse(String(t)) ? [] : [new w(e, t, `color expected, "${t}" found`)];
|
|
7256
7256
|
}
|
|
7257
|
-
function
|
|
7257
|
+
function kt(r) {
|
|
7258
7258
|
const e = r.key, t = r.value, n = r.valueSpec, a = [];
|
|
7259
7259
|
return Array.isArray(n.values) ? n.values.indexOf(G(t)) === -1 && a.push(new w(e, t, `expected one of [${n.values.join(", ")}], ${JSON.stringify(t)} found`)) : Object.keys(n.values).indexOf(G(t)) === -1 && a.push(new w(e, t, `expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(t)} found`)), a;
|
|
7260
7260
|
}
|
|
7261
7261
|
function An(r) {
|
|
7262
|
-
return uo(Ze(r.value)) ?
|
|
7262
|
+
return uo(Ze(r.value)) ? st(qt({}, r, {
|
|
7263
7263
|
expressionContext: "filter",
|
|
7264
7264
|
valueSpec: { value: "boolean" }
|
|
7265
7265
|
})) : fo(r);
|
|
@@ -7272,7 +7272,7 @@ function fo(r) {
|
|
|
7272
7272
|
let a, o = [];
|
|
7273
7273
|
if (e.length < 1)
|
|
7274
7274
|
return [new w(t, e, "filter array must have at least 1 element")];
|
|
7275
|
-
switch (o = o.concat(
|
|
7275
|
+
switch (o = o.concat(kt({
|
|
7276
7276
|
key: `${t}[0]`,
|
|
7277
7277
|
value: e[0],
|
|
7278
7278
|
valueSpec: n.filter_operator,
|
|
@@ -7293,7 +7293,7 @@ function fo(r) {
|
|
|
7293
7293
|
case "!in":
|
|
7294
7294
|
e.length >= 2 && (a = R(e[1]), a !== "string" && o.push(new w(`${t}[1]`, e[1], `string expected, ${a} found`)));
|
|
7295
7295
|
for (let i = 2; i < e.length; i++)
|
|
7296
|
-
a = R(e[i]), G(e[1]) === "$type" ? o = o.concat(
|
|
7296
|
+
a = R(e[i]), G(e[1]) === "$type" ? o = o.concat(kt({
|
|
7297
7297
|
key: `${t}[${i}]`,
|
|
7298
7298
|
value: e[i],
|
|
7299
7299
|
valueSpec: n.geometry_type,
|
|
@@ -7450,7 +7450,7 @@ function Ke(r) {
|
|
|
7450
7450
|
const e = r.value, t = r.key, n = R(e);
|
|
7451
7451
|
return n !== "string" ? [new w(t, e, `string expected, ${n} found`)] : [];
|
|
7452
7452
|
}
|
|
7453
|
-
function
|
|
7453
|
+
function Kl(r) {
|
|
7454
7454
|
var e;
|
|
7455
7455
|
const t = (e = r.sourceName) !== null && e !== void 0 ? e : "", n = r.value, a = r.styleSpec, o = a.source_raster_dem, i = r.style;
|
|
7456
7456
|
let s = [];
|
|
@@ -7472,7 +7472,7 @@ function Zl(r) {
|
|
|
7472
7472
|
return s;
|
|
7473
7473
|
}
|
|
7474
7474
|
const sa = {
|
|
7475
|
-
promoteId:
|
|
7475
|
+
promoteId: Xl
|
|
7476
7476
|
};
|
|
7477
7477
|
function vo(r) {
|
|
7478
7478
|
const e = r.value, t = r.key, n = r.styleSpec, a = r.style, o = r.validateSpec;
|
|
@@ -7493,7 +7493,7 @@ function vo(r) {
|
|
|
7493
7493
|
validateSpec: o
|
|
7494
7494
|
}), s;
|
|
7495
7495
|
case "raster-dem":
|
|
7496
|
-
return s =
|
|
7496
|
+
return s = Kl({
|
|
7497
7497
|
sourceName: t,
|
|
7498
7498
|
value: e,
|
|
7499
7499
|
style: r.style,
|
|
@@ -7512,11 +7512,11 @@ function vo(r) {
|
|
|
7512
7512
|
}), e.cluster)
|
|
7513
7513
|
for (const l in e.clusterProperties) {
|
|
7514
7514
|
const [u, c] = e.clusterProperties[l], p = typeof u == "string" ? [u, ["accumulated"], ["get", l]] : u;
|
|
7515
|
-
s.push(...
|
|
7515
|
+
s.push(...st({
|
|
7516
7516
|
key: `${t}.${l}.map`,
|
|
7517
7517
|
value: c,
|
|
7518
7518
|
expressionContext: "cluster-map"
|
|
7519
|
-
})), s.push(...
|
|
7519
|
+
})), s.push(...st({
|
|
7520
7520
|
key: `${t}.${l}.reduce`,
|
|
7521
7521
|
value: p,
|
|
7522
7522
|
expressionContext: "cluster-reduce"
|
|
@@ -7544,14 +7544,14 @@ function vo(r) {
|
|
|
7544
7544
|
case "canvas":
|
|
7545
7545
|
return [new w(t, null, "Please use runtime APIs to add canvas sources, rather than including them in stylesheets.", "source.canvas")];
|
|
7546
7546
|
default:
|
|
7547
|
-
return
|
|
7547
|
+
return kt({
|
|
7548
7548
|
key: `${t}.type`,
|
|
7549
7549
|
value: e.type,
|
|
7550
7550
|
valueSpec: { values: ["vector", "raster", "raster-dem", "geojson", "video", "image"] }
|
|
7551
7551
|
});
|
|
7552
7552
|
}
|
|
7553
7553
|
}
|
|
7554
|
-
function
|
|
7554
|
+
function Xl({ key: r, value: e }) {
|
|
7555
7555
|
if (R(e) === "string")
|
|
7556
7556
|
return Ke({ key: r, value: e });
|
|
7557
7557
|
{
|
|
@@ -7625,13 +7625,13 @@ function So(r) {
|
|
|
7625
7625
|
})) : o = o.concat([new w(s, e[s], `unknown property "${s}"`)]);
|
|
7626
7626
|
return o;
|
|
7627
7627
|
}
|
|
7628
|
-
function Xl(r) {
|
|
7629
|
-
return Ke(r).length === 0 ? [] : it(r);
|
|
7630
|
-
}
|
|
7631
7628
|
function Yl(r) {
|
|
7632
|
-
return Ke(r).length === 0 ? [] :
|
|
7629
|
+
return Ke(r).length === 0 ? [] : st(r);
|
|
7633
7630
|
}
|
|
7634
7631
|
function Wl(r) {
|
|
7632
|
+
return Ke(r).length === 0 ? [] : st(r);
|
|
7633
|
+
}
|
|
7634
|
+
function Jl(r) {
|
|
7635
7635
|
const e = r.key, t = r.value;
|
|
7636
7636
|
if (R(t) === "array") {
|
|
7637
7637
|
if (t.length < 1 || t.length > 4)
|
|
@@ -7655,7 +7655,7 @@ function Wl(r) {
|
|
|
7655
7655
|
valueSpec: {}
|
|
7656
7656
|
});
|
|
7657
7657
|
}
|
|
7658
|
-
function
|
|
7658
|
+
function Ql(r) {
|
|
7659
7659
|
const e = r.key, t = r.value;
|
|
7660
7660
|
if (R(t) === "array") {
|
|
7661
7661
|
const a = {
|
|
@@ -7679,7 +7679,7 @@ function Jl(r) {
|
|
|
7679
7679
|
valueSpec: {}
|
|
7680
7680
|
});
|
|
7681
7681
|
}
|
|
7682
|
-
function
|
|
7682
|
+
function eu(r) {
|
|
7683
7683
|
const e = r.key, t = r.value;
|
|
7684
7684
|
if (R(t) === "array") {
|
|
7685
7685
|
if (t.length < 1)
|
|
@@ -7697,13 +7697,13 @@ function Ql(r) {
|
|
|
7697
7697
|
value: t
|
|
7698
7698
|
});
|
|
7699
7699
|
}
|
|
7700
|
-
function
|
|
7700
|
+
function tu(r) {
|
|
7701
7701
|
const e = r.key, t = r.value, n = R(t), a = r.styleSpec;
|
|
7702
7702
|
if (n !== "array" || t.length < 1 || t.length % 2 !== 0)
|
|
7703
7703
|
return [new w(e, t, "variableAnchorOffsetCollection requires a non-empty array of even length")];
|
|
7704
7704
|
let o = [];
|
|
7705
7705
|
for (let i = 0; i < t.length; i += 2)
|
|
7706
|
-
o = o.concat(
|
|
7706
|
+
o = o.concat(kt({
|
|
7707
7707
|
key: `${e}[${i}]`,
|
|
7708
7708
|
value: t[i],
|
|
7709
7709
|
valueSpec: a.layout_symbol["text-anchor"]
|
|
@@ -7751,7 +7751,7 @@ function xo(r) {
|
|
|
7751
7751
|
value: t
|
|
7752
7752
|
});
|
|
7753
7753
|
}
|
|
7754
|
-
function
|
|
7754
|
+
function ru(r) {
|
|
7755
7755
|
const e = r.value, t = r.styleSpec, n = t.projection, a = r.style, o = R(e);
|
|
7756
7756
|
if (e === void 0)
|
|
7757
7757
|
return [];
|
|
@@ -7768,24 +7768,24 @@ function tu(r) {
|
|
|
7768
7768
|
})) : i = i.concat([new w(s, e[s], `unknown property "${s}"`)]);
|
|
7769
7769
|
return i;
|
|
7770
7770
|
}
|
|
7771
|
-
function
|
|
7771
|
+
function nu(r) {
|
|
7772
7772
|
const e = r.key;
|
|
7773
7773
|
let t = r.value;
|
|
7774
7774
|
t = t instanceof String ? t.valueOf() : t;
|
|
7775
7775
|
const n = R(t);
|
|
7776
|
-
return n === "array" && !
|
|
7776
|
+
return n === "array" && !ou(t) && !au(t) ? [new w(e, t, `projection expected, invalid array ${JSON.stringify(t)} found`)] : ["array", "string"].includes(n) ? [] : [new w(e, t, `projection expected, invalid type "${n}" found`)];
|
|
7777
7777
|
}
|
|
7778
|
-
function
|
|
7778
|
+
function au(r) {
|
|
7779
7779
|
return !!["interpolate", "step", "literal"].includes(r[0]);
|
|
7780
7780
|
}
|
|
7781
|
-
function
|
|
7781
|
+
function ou(r) {
|
|
7782
7782
|
return Array.isArray(r) && r.length === 3 && typeof r[0] == "string" && typeof r[1] == "string" && typeof r[2] == "number";
|
|
7783
7783
|
}
|
|
7784
|
-
function
|
|
7784
|
+
function iu(r) {
|
|
7785
7785
|
return !!r && r.constructor === Object;
|
|
7786
7786
|
}
|
|
7787
7787
|
function ko(r) {
|
|
7788
|
-
return
|
|
7788
|
+
return iu(r.value) ? [] : [
|
|
7789
7789
|
new w(r.key, r.value, `object expected, ${R(r.value)} found`)
|
|
7790
7790
|
];
|
|
7791
7791
|
}
|
|
@@ -7794,11 +7794,11 @@ const la = {
|
|
|
7794
7794
|
return [];
|
|
7795
7795
|
},
|
|
7796
7796
|
array: En,
|
|
7797
|
-
boolean:
|
|
7797
|
+
boolean: Zl,
|
|
7798
7798
|
number: mr,
|
|
7799
7799
|
color: Zr,
|
|
7800
7800
|
constants: co,
|
|
7801
|
-
enum:
|
|
7801
|
+
enum: kt,
|
|
7802
7802
|
filter: An,
|
|
7803
7803
|
function: po,
|
|
7804
7804
|
layer: go,
|
|
@@ -7807,21 +7807,21 @@ const la = {
|
|
|
7807
7807
|
light: bo,
|
|
7808
7808
|
sky: wo,
|
|
7809
7809
|
terrain: So,
|
|
7810
|
-
projection:
|
|
7811
|
-
projectionDefinition:
|
|
7810
|
+
projection: ru,
|
|
7811
|
+
projectionDefinition: nu,
|
|
7812
7812
|
string: Ke,
|
|
7813
|
-
formatted:
|
|
7814
|
-
resolvedImage:
|
|
7815
|
-
padding:
|
|
7816
|
-
numberArray:
|
|
7817
|
-
colorArray:
|
|
7818
|
-
variableAnchorOffsetCollection:
|
|
7813
|
+
formatted: Yl,
|
|
7814
|
+
resolvedImage: Wl,
|
|
7815
|
+
padding: Jl,
|
|
7816
|
+
numberArray: Ql,
|
|
7817
|
+
colorArray: eu,
|
|
7818
|
+
variableAnchorOffsetCollection: tu,
|
|
7819
7819
|
sprite: xo,
|
|
7820
7820
|
state: ko
|
|
7821
7821
|
};
|
|
7822
7822
|
function Wt(r) {
|
|
7823
7823
|
const e = r.value, t = r.valueSpec, n = r.styleSpec;
|
|
7824
|
-
return r.validateSpec = Wt, t.expression && Ln(G(e)) ? po(r) : t.expression && so(Ze(e)) ?
|
|
7824
|
+
return r.validateSpec = Wt, t.expression && Ln(G(e)) ? po(r) : t.expression && so(Ze(e)) ? st(r) : t.type && la[t.type] ? la[t.type](r) : le(qt({}, r, {
|
|
7825
7825
|
valueSpec: t.type ? n[t.type] : t
|
|
7826
7826
|
}));
|
|
7827
7827
|
}
|
|
@@ -7829,7 +7829,7 @@ function Lo(r) {
|
|
|
7829
7829
|
const e = r.value, t = r.key, n = Ke(r);
|
|
7830
7830
|
return n.length || (e.indexOf("{fontstack}") === -1 && n.push(new w(t, e, '"glyphs" url must include a "{fontstack}" token')), e.indexOf("{range}") === -1 && n.push(new w(t, e, '"glyphs" url must include a "{range}" token'))), n;
|
|
7831
7831
|
}
|
|
7832
|
-
function ie(r, e =
|
|
7832
|
+
function ie(r, e = zs) {
|
|
7833
7833
|
let t = [];
|
|
7834
7834
|
return t = t.concat(Wt({
|
|
7835
7835
|
key: "",
|
|
@@ -7876,37 +7876,37 @@ function ye(r) {
|
|
|
7876
7876
|
function ua(r) {
|
|
7877
7877
|
if (!r)
|
|
7878
7878
|
return {
|
|
7879
|
-
style:
|
|
7879
|
+
style: ft[br[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
|
|
7880
7880
|
requiresUrlMonitoring: !1,
|
|
7881
7881
|
// default styles don't require URL monitoring
|
|
7882
7882
|
isFallback: !0
|
|
7883
7883
|
};
|
|
7884
7884
|
if (typeof r == "string") {
|
|
7885
|
-
const t =
|
|
7885
|
+
const t = lu(r);
|
|
7886
7886
|
return t.isValidStyle ? {
|
|
7887
7887
|
style: t.styleObject,
|
|
7888
7888
|
requiresUrlMonitoring: !1,
|
|
7889
7889
|
isFallback: !1
|
|
7890
7890
|
} : t.isValidJSON ? {
|
|
7891
|
-
style:
|
|
7891
|
+
style: ft[br[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
|
|
7892
7892
|
requiresUrlMonitoring: !1,
|
|
7893
7893
|
// default styles don't require URL monitoring
|
|
7894
7894
|
isFallback: !0
|
|
7895
7895
|
} : r.startsWith("http") ? { style: r, requiresUrlMonitoring: !0, isFallback: !1 } : r.toLowerCase().includes(".json") ? {
|
|
7896
|
-
style:
|
|
7896
|
+
style: su(r),
|
|
7897
7897
|
requiresUrlMonitoring: !0,
|
|
7898
7898
|
isFallback: !1
|
|
7899
7899
|
} : {
|
|
7900
|
-
style:
|
|
7900
|
+
style: wi(r),
|
|
7901
7901
|
requiresUrlMonitoring: !0,
|
|
7902
7902
|
isFallback: !1
|
|
7903
7903
|
};
|
|
7904
7904
|
}
|
|
7905
|
-
return r instanceof
|
|
7905
|
+
return r instanceof Si ? {
|
|
7906
7906
|
style: r.getExpandedStyleURL(),
|
|
7907
7907
|
requiresUrlMonitoring: !1,
|
|
7908
7908
|
isFallback: !1
|
|
7909
|
-
} : r instanceof
|
|
7909
|
+
} : r instanceof xi ? {
|
|
7910
7910
|
style: r.getDefaultVariant().getExpandedStyleURL(),
|
|
7911
7911
|
requiresUrlMonitoring: !1,
|
|
7912
7912
|
isFallback: !1
|
|
@@ -7916,20 +7916,20 @@ function ua(r) {
|
|
|
7916
7916
|
isFallback: !1,
|
|
7917
7917
|
isJSON: !0
|
|
7918
7918
|
} : {
|
|
7919
|
-
style:
|
|
7919
|
+
style: ft[br[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
|
|
7920
7920
|
requiresUrlMonitoring: !1,
|
|
7921
7921
|
// default styles don't require URL monitoring
|
|
7922
7922
|
isFallback: !0
|
|
7923
7923
|
};
|
|
7924
7924
|
}
|
|
7925
|
-
function
|
|
7925
|
+
function su(r) {
|
|
7926
7926
|
try {
|
|
7927
7927
|
return new URL(r).href;
|
|
7928
7928
|
} catch {
|
|
7929
7929
|
}
|
|
7930
7930
|
return new URL(r, location.origin).href;
|
|
7931
7931
|
}
|
|
7932
|
-
function
|
|
7932
|
+
function lu(r) {
|
|
7933
7933
|
try {
|
|
7934
7934
|
const e = JSON.parse(r), t = ie(e);
|
|
7935
7935
|
return {
|
|
@@ -7949,10 +7949,10 @@ function Ce(r, e, t) {
|
|
|
7949
7949
|
const n = window.document.createElement(r);
|
|
7950
7950
|
return e !== void 0 && (n.className = e), t && t.appendChild(n), n;
|
|
7951
7951
|
}
|
|
7952
|
-
function
|
|
7952
|
+
function Lt(r) {
|
|
7953
7953
|
r.parentNode && r.parentNode.removeChild(r);
|
|
7954
7954
|
}
|
|
7955
|
-
class
|
|
7955
|
+
class uu {
|
|
7956
7956
|
constructor() {
|
|
7957
7957
|
g(this, "_map");
|
|
7958
7958
|
g(this, "_container");
|
|
@@ -7963,7 +7963,7 @@ class lu {
|
|
|
7963
7963
|
return this._map = e, this._container = Ce("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = Ce("button", "maplibregl-ctrl-terrain", this._container), Ce("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;
|
|
7964
7964
|
}
|
|
7965
7965
|
onRemove() {
|
|
7966
|
-
|
|
7966
|
+
Lt(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
|
|
7967
7967
|
}
|
|
7968
7968
|
_toggleTerrain() {
|
|
7969
7969
|
Eo(this._map), this._updateTerrainIcon();
|
|
@@ -7975,7 +7975,7 @@ class lu {
|
|
|
7975
7975
|
function Eo(r) {
|
|
7976
7976
|
r.hasTerrain() ? r.disableTerrain() : r.enableTerrain();
|
|
7977
7977
|
}
|
|
7978
|
-
class
|
|
7978
|
+
class cu extends Na {
|
|
7979
7979
|
constructor(t = {}) {
|
|
7980
7980
|
super({
|
|
7981
7981
|
showCompass: t.showCompass ?? !0,
|
|
@@ -8001,8 +8001,8 @@ class uu extends Na {
|
|
|
8001
8001
|
return a.clickFunction = n, a;
|
|
8002
8002
|
}
|
|
8003
8003
|
}
|
|
8004
|
-
const ca = L.Marker, pa = L.LngLat,
|
|
8005
|
-
class
|
|
8004
|
+
const ca = L.Marker, pa = L.LngLat, pu = L.LngLatBounds;
|
|
8005
|
+
class fu extends Ei {
|
|
8006
8006
|
constructor() {
|
|
8007
8007
|
super(...arguments);
|
|
8008
8008
|
g(this, "lastUpdatedCenter", new pa(0, 0));
|
|
@@ -8019,7 +8019,7 @@ class pu extends Ci {
|
|
|
8019
8019
|
...this.options.fitBoundsOptions,
|
|
8020
8020
|
linear: !0
|
|
8021
8021
|
}, s = this._map.getZoom();
|
|
8022
|
-
s > (((c = this.options.fitBoundsOptions) == null ? void 0 : c.maxZoom) ?? 30) && (i.zoom = s), this._map.fitBounds(
|
|
8022
|
+
s > (((c = this.options.fitBoundsOptions) == null ? void 0 : c.maxZoom) ?? 30) && (i.zoom = s), this._map.fitBounds(pu.fromLngLat(n, a), i, {
|
|
8023
8023
|
geolocateSource: !0
|
|
8024
8024
|
// tag this camera change so it won't cause the control to change to background state
|
|
8025
8025
|
});
|
|
@@ -8082,8 +8082,8 @@ class pu extends Ci {
|
|
|
8082
8082
|
}
|
|
8083
8083
|
}
|
|
8084
8084
|
}
|
|
8085
|
-
var Te, Q, _e, Ie,
|
|
8086
|
-
class
|
|
8085
|
+
var Te, Q, _e, Ie, nt;
|
|
8086
|
+
class du {
|
|
8087
8087
|
/**
|
|
8088
8088
|
* @param selectorOrElement Element to be used as control, specified as either reference to element itself or a CSS selector to find the element in DOM
|
|
8089
8089
|
* @param onClick Function called when the element is clicked
|
|
@@ -8094,7 +8094,7 @@ class fu {
|
|
|
8094
8094
|
Y(this, Q);
|
|
8095
8095
|
Y(this, _e);
|
|
8096
8096
|
Y(this, Ie);
|
|
8097
|
-
Y(this,
|
|
8097
|
+
Y(this, nt);
|
|
8098
8098
|
if (typeof e == "string") {
|
|
8099
8099
|
const a = document.querySelector(e);
|
|
8100
8100
|
if (!a) throw new Error(`No element has been found with selector "${e}" when creating an external control.`);
|
|
@@ -8105,17 +8105,17 @@ class fu {
|
|
|
8105
8105
|
t(k(this, Te), k(this, Q), a);
|
|
8106
8106
|
}), n && W(this, Ie, (a) => {
|
|
8107
8107
|
n(k(this, Te), k(this, Q), a);
|
|
8108
|
-
}), W(this,
|
|
8108
|
+
}), W(this, nt, k(this, Q).parentElement);
|
|
8109
8109
|
}
|
|
8110
8110
|
onAdd(e) {
|
|
8111
|
-
return W(this, Te, e), k(this, _e) && k(this, Q).addEventListener("click", k(this, _e)), k(this, Ie) && k(this, Te).on("render", k(this, Ie)),
|
|
8111
|
+
return W(this, Te, e), k(this, _e) && k(this, Q).addEventListener("click", k(this, _e)), k(this, Ie) && k(this, Te).on("render", k(this, Ie)), Lt(k(this, Q)), k(this, Q);
|
|
8112
8112
|
}
|
|
8113
8113
|
onRemove() {
|
|
8114
|
-
k(this, _e) && k(this, Q).removeEventListener("click", k(this, _e)), k(this, Ie) && k(this, Te).off("render", k(this, Ie)), k(this,
|
|
8114
|
+
k(this, _e) && k(this, Q).removeEventListener("click", k(this, _e)), k(this, Ie) && k(this, Te).off("render", k(this, Ie)), k(this, nt) ? k(this, nt).appendChild(k(this, Q)) : Lt(k(this, Q));
|
|
8115
8115
|
}
|
|
8116
8116
|
}
|
|
8117
|
-
Te = new WeakMap(), Q = new WeakMap(), _e = new WeakMap(), Ie = new WeakMap(),
|
|
8118
|
-
class
|
|
8117
|
+
Te = new WeakMap(), Q = new WeakMap(), _e = new WeakMap(), Ie = new WeakMap(), nt = new WeakMap();
|
|
8118
|
+
class hu {
|
|
8119
8119
|
constructor() {
|
|
8120
8120
|
g(this, "map");
|
|
8121
8121
|
g(this, "container");
|
|
@@ -8125,7 +8125,7 @@ class du {
|
|
|
8125
8125
|
return this.map = e, this.container = Ce("div", "maplibregl-ctrl maplibregl-ctrl-group"), this.projectionButton = Ce("button", "maplibregl-ctrl-projection", this.container), Ce("span", "maplibregl-ctrl-icon", this.projectionButton).setAttribute("aria-hidden", "true"), this.projectionButton.type = "button", this.projectionButton.addEventListener("click", this.toggleProjection.bind(this)), e.on("projectiontransition", this.updateProjectionIcon.bind(this)), this.updateProjectionIcon(), this.container;
|
|
8126
8126
|
}
|
|
8127
8127
|
onRemove() {
|
|
8128
|
-
|
|
8128
|
+
Lt(this.container), this.map.off("projectiontransition", this.updateProjectionIcon), this.map = void 0;
|
|
8129
8129
|
}
|
|
8130
8130
|
toggleProjection() {
|
|
8131
8131
|
Ao(this.map), this.updateProjectionIcon();
|
|
@@ -8137,7 +8137,7 @@ class du {
|
|
|
8137
8137
|
function Ao(r) {
|
|
8138
8138
|
r.getProjection() === void 0 && r.setProjection({ type: "mercator" }), r.isGlobeProjection() ? r.enableMercatorProjection() : r.enableGlobeProjection();
|
|
8139
8139
|
}
|
|
8140
|
-
const
|
|
8140
|
+
const ct = {
|
|
8141
8141
|
"zoom-in": (r) => r.zoomIn(),
|
|
8142
8142
|
"zoom-out": (r) => r.zoomOut(),
|
|
8143
8143
|
"toggle-projection": Ao,
|
|
@@ -8155,28 +8155,28 @@ const ut = {
|
|
|
8155
8155
|
r.setRoll(0);
|
|
8156
8156
|
}
|
|
8157
8157
|
};
|
|
8158
|
-
var
|
|
8159
|
-
class Kr extends
|
|
8158
|
+
var Et, at;
|
|
8159
|
+
class Kr extends du {
|
|
8160
8160
|
/**
|
|
8161
8161
|
* Constructs an instance of External Control to have a predefined functionality
|
|
8162
8162
|
* @param controlElement Element to be used as control, specified as reference to element itself
|
|
8163
8163
|
* @param controlType One of the predefined types of functionality
|
|
8164
8164
|
*/
|
|
8165
8165
|
constructor(t, n) {
|
|
8166
|
-
if (n && !(n in
|
|
8167
|
-
super(t, n &&
|
|
8168
|
-
Y(this,
|
|
8169
|
-
Y(this,
|
|
8166
|
+
if (n && !(n in ct)) throw new Error(`data-maptiler-control value "${n}" is invalid.`);
|
|
8167
|
+
super(t, n && ct[n]);
|
|
8168
|
+
Y(this, Et);
|
|
8169
|
+
Y(this, at, /* @__PURE__ */ new Map());
|
|
8170
8170
|
}
|
|
8171
8171
|
onAdd(t) {
|
|
8172
|
-
return W(this,
|
|
8172
|
+
return W(this, Et, t), super.onAdd(t);
|
|
8173
8173
|
}
|
|
8174
8174
|
onRemove() {
|
|
8175
|
-
for (const [t, n] of k(this,
|
|
8175
|
+
for (const [t, n] of k(this, at)) {
|
|
8176
8176
|
const a = t.deref();
|
|
8177
8177
|
a && a.removeEventListener("click", n);
|
|
8178
8178
|
}
|
|
8179
|
-
k(this,
|
|
8179
|
+
k(this, at).clear(), super.onRemove();
|
|
8180
8180
|
}
|
|
8181
8181
|
/**
|
|
8182
8182
|
* Configure a child element to be part of this control and to have a predefined functionality added
|
|
@@ -8185,15 +8185,15 @@ class Kr extends fu {
|
|
|
8185
8185
|
*/
|
|
8186
8186
|
configureGroupItem(t, n) {
|
|
8187
8187
|
if (!n) return;
|
|
8188
|
-
if (!(n in
|
|
8188
|
+
if (!(n in ct)) throw new Error(`data-maptiler-control value "${n}" is invalid.`);
|
|
8189
8189
|
const a = (o) => {
|
|
8190
|
-
|
|
8190
|
+
ct[n](k(this, Et), t, o);
|
|
8191
8191
|
};
|
|
8192
|
-
t.addEventListener("click", a), k(this,
|
|
8192
|
+
t.addEventListener("click", a), k(this, at).set(new WeakRef(t), a);
|
|
8193
8193
|
}
|
|
8194
8194
|
}
|
|
8195
|
-
|
|
8196
|
-
var ee, ue, Me, Pe, re,
|
|
8195
|
+
Et = new WeakMap(), at = new WeakMap(), g(Kr, "controlCallbacks", ct);
|
|
8196
|
+
var ee, ue, Me, Pe, re, At, Z, To, se, _o;
|
|
8197
8197
|
class _r {
|
|
8198
8198
|
constructor(e, t) {
|
|
8199
8199
|
Y(this, Z);
|
|
@@ -8203,7 +8203,7 @@ class _r {
|
|
|
8203
8203
|
Y(this, Me);
|
|
8204
8204
|
Y(this, Pe);
|
|
8205
8205
|
Y(this, re, !1);
|
|
8206
|
-
Y(this,
|
|
8206
|
+
Y(this, At);
|
|
8207
8207
|
e.style !== void 0 && W(this, re, !0), W(this, ee, {
|
|
8208
8208
|
// set defaults
|
|
8209
8209
|
zoomAdjust: -4,
|
|
@@ -8263,15 +8263,15 @@ class _r {
|
|
|
8263
8263
|
return k(this, ee).container = k(this, Me), k(this, ee).zoom = e.getZoom() + k(this, ee).zoomAdjust, this.map = new Po(k(this, ee)), this.map.once("style.load", () => {
|
|
8264
8264
|
this.map.resize();
|
|
8265
8265
|
}), this.map.once("load", () => {
|
|
8266
|
-
J(this, Z, To).call(this, k(this, ee).parentRect), W(this,
|
|
8266
|
+
J(this, Z, To).call(this, k(this, ee).parentRect), W(this, At, J(this, Z, _o).call(this));
|
|
8267
8267
|
}), k(this, Me);
|
|
8268
8268
|
}
|
|
8269
8269
|
onRemove() {
|
|
8270
8270
|
var e;
|
|
8271
|
-
(e = k(this,
|
|
8271
|
+
(e = k(this, At)) == null || e.call(this), Lt(k(this, Me));
|
|
8272
8272
|
}
|
|
8273
8273
|
}
|
|
8274
|
-
ee = new WeakMap(), ue = new WeakMap(), Me = new WeakMap(), Pe = new WeakMap(), re = new WeakMap(),
|
|
8274
|
+
ee = new WeakMap(), ue = new WeakMap(), Me = new WeakMap(), Pe = new WeakMap(), re = new WeakMap(), At = new WeakMap(), Z = new WeakSet(), To = function(e) {
|
|
8275
8275
|
e === void 0 || e.linePaint === void 0 && e.fillPaint === void 0 || (W(this, Pe, {
|
|
8276
8276
|
type: "Feature",
|
|
8277
8277
|
properties: {
|
|
@@ -8337,7 +8337,7 @@ ee = new WeakMap(), ue = new WeakMap(), Me = new WeakMap(), Pe = new WeakMap(),
|
|
|
8337
8337
|
o();
|
|
8338
8338
|
};
|
|
8339
8339
|
};
|
|
8340
|
-
class
|
|
8340
|
+
class mu {
|
|
8341
8341
|
/**
|
|
8342
8342
|
*
|
|
8343
8343
|
* @param map : a Map instance
|
|
@@ -8374,22 +8374,22 @@ class hu {
|
|
|
8374
8374
|
}
|
|
8375
8375
|
preparePayload() {
|
|
8376
8376
|
const e = new URL(te.telemetryURL);
|
|
8377
|
-
return e.searchParams.append("sdk",
|
|
8377
|
+
return e.searchParams.append("sdk", oi()), e.searchParams.append("key", j.apiKey), e.searchParams.append("mtsid", on), e.searchParams.append("session", j.session ? "1" : "0"), e.searchParams.append("caching", j.caching ? "1" : "0"), e.searchParams.append("lang-updated", this.map.isLanguageUpdated() ? "1" : "0"), e.searchParams.append("terrain", this.map.getTerrain() ? "1" : "0"), e.searchParams.append("globe", this.map.isGlobeProjection() ? "1" : "0"), e.searchParams.append("viewerType", this.viewerType), this.registeredModules.size > 0 && e.searchParams.append("modules", Array.from(this.registeredModules).join("|")), e.href;
|
|
8378
8378
|
}
|
|
8379
8379
|
}
|
|
8380
|
-
var
|
|
8381
|
-
function
|
|
8382
|
-
var r = new
|
|
8383
|
-
return
|
|
8380
|
+
var Ct = typeof Float32Array < "u" ? Float32Array : Array;
|
|
8381
|
+
function mt() {
|
|
8382
|
+
var r = new Ct(16);
|
|
8383
|
+
return Ct != 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;
|
|
8384
8384
|
}
|
|
8385
|
-
function
|
|
8385
|
+
function yu(r, e, t, n, a, o, i, s, l, u, c, p, d, f, h, m, y) {
|
|
8386
8386
|
return r[0] = e, r[1] = t, r[2] = n, r[3] = a, r[4] = o, r[5] = i, r[6] = s, r[7] = l, r[8] = u, r[9] = c, r[10] = p, r[11] = d, r[12] = f, r[13] = h, r[14] = m, r[15] = y, r;
|
|
8387
8387
|
}
|
|
8388
|
-
function
|
|
8388
|
+
function gu(r, e, t) {
|
|
8389
8389
|
var n = e[0], a = e[1], o = e[2], i = e[3], s = e[4], l = e[5], u = e[6], c = e[7], p = e[8], d = e[9], f = e[10], h = e[11], m = e[12], y = e[13], b = e[14], v = e[15], x = t[0], E = t[1], C = t[2], T = t[3];
|
|
8390
8390
|
return r[0] = x * n + E * s + C * p + T * m, r[1] = x * a + E * l + C * d + T * y, r[2] = x * o + E * u + C * f + T * b, r[3] = x * i + E * c + C * h + T * v, x = t[4], E = t[5], C = t[6], T = t[7], r[4] = x * n + E * s + C * p + T * m, r[5] = x * a + E * l + C * d + T * y, r[6] = x * o + E * u + C * f + T * b, r[7] = x * i + E * c + C * h + T * v, x = t[8], E = t[9], C = t[10], T = t[11], r[8] = x * n + E * s + C * p + T * m, r[9] = x * a + E * l + C * d + T * y, r[10] = x * o + E * u + C * f + T * b, r[11] = x * i + E * c + C * h + T * v, x = t[12], E = t[13], C = t[14], T = t[15], r[12] = x * n + E * s + C * p + T * m, r[13] = x * a + E * l + C * d + T * y, r[14] = x * o + E * u + C * f + T * b, r[15] = x * i + E * c + C * h + T * v, r;
|
|
8391
8391
|
}
|
|
8392
|
-
function
|
|
8392
|
+
function vu(r, e, t) {
|
|
8393
8393
|
var n = t[0], a = t[1], o = t[2];
|
|
8394
8394
|
return r[0] = e[0] * n, r[1] = e[1] * n, r[2] = e[2] * n, r[3] = e[3] * n, r[4] = e[4] * a, r[5] = e[5] * a, r[6] = e[6] * a, r[7] = e[7] * a, r[8] = e[8] * o, r[9] = e[9] * o, r[10] = e[10] * o, r[11] = e[11] * o, r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15], r;
|
|
8395
8395
|
}
|
|
@@ -8397,7 +8397,7 @@ function fa(r, e, t) {
|
|
|
8397
8397
|
var n = Math.sin(t), a = Math.cos(t), o = e[4], i = e[5], s = e[6], l = e[7], u = e[8], c = e[9], p = e[10], d = e[11];
|
|
8398
8398
|
return e !== r && (r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15]), r[4] = o * a + u * n, r[5] = i * a + c * n, r[6] = s * a + p * n, r[7] = l * a + d * n, r[8] = u * a - o * n, r[9] = c * a - i * n, r[10] = p * a - s * n, r[11] = d * a - l * n, r;
|
|
8399
8399
|
}
|
|
8400
|
-
function
|
|
8400
|
+
function bu(r, e, t) {
|
|
8401
8401
|
var n = Math.sin(t), a = Math.cos(t), o = e[0], i = e[1], s = e[2], l = e[3], u = e[8], c = e[9], p = e[10], d = e[11];
|
|
8402
8402
|
return e !== r && (r[4] = e[4], r[5] = e[5], r[6] = e[6], r[7] = e[7], r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15]), r[0] = o * a - u * n, r[1] = i * a - c * n, r[2] = s * a - p * n, r[3] = l * a - d * n, r[8] = o * n + u * a, r[9] = i * n + c * a, r[10] = s * n + p * a, r[11] = l * n + d * a, r;
|
|
8403
8403
|
}
|
|
@@ -8405,7 +8405,7 @@ function da(r, e, t) {
|
|
|
8405
8405
|
var n = Math.sin(t), a = Math.cos(t), o = e[0], i = e[1], s = e[2], l = e[3], u = e[4], c = e[5], p = e[6], d = e[7];
|
|
8406
8406
|
return e !== r && (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[0] = o * a + u * n, r[1] = i * a + c * n, r[2] = s * a + p * n, r[3] = l * a + d * n, r[4] = u * a - o * n, r[5] = c * a - i * n, r[6] = p * a - s * n, r[7] = d * a - l * n, r;
|
|
8407
8407
|
}
|
|
8408
|
-
function
|
|
8408
|
+
function wu(r, e, t, n, a) {
|
|
8409
8409
|
var o = 1 / Math.tan(e / 2);
|
|
8410
8410
|
if (r[0] = o / t, r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 0, r[5] = o, r[6] = 0, r[7] = 0, r[8] = 0, r[9] = 0, r[11] = -1, r[12] = 0, r[13] = 0, r[15] = 0, a != null && a !== 1 / 0) {
|
|
8411
8411
|
var i = 1 / (n - a);
|
|
@@ -8414,13 +8414,13 @@ function bu(r, e, t, n, a) {
|
|
|
8414
8414
|
r[10] = -1, r[14] = -2 * n;
|
|
8415
8415
|
return r;
|
|
8416
8416
|
}
|
|
8417
|
-
var
|
|
8417
|
+
var Su = wu;
|
|
8418
8418
|
function Dt() {
|
|
8419
|
-
var r = new
|
|
8420
|
-
return
|
|
8419
|
+
var r = new Ct(3);
|
|
8420
|
+
return Ct != Float32Array && (r[0] = 0, r[1] = 0, r[2] = 0), r;
|
|
8421
8421
|
}
|
|
8422
|
-
function
|
|
8423
|
-
var n = new
|
|
8422
|
+
function xu(r, e, t) {
|
|
8423
|
+
var n = new Ct(3);
|
|
8424
8424
|
return n[0] = r, n[1] = e, n[2] = t, n;
|
|
8425
8425
|
}
|
|
8426
8426
|
function Ir(r, e) {
|
|
@@ -8440,11 +8440,11 @@ function ha(r, e, t) {
|
|
|
8440
8440
|
return e;
|
|
8441
8441
|
};
|
|
8442
8442
|
})();
|
|
8443
|
-
function
|
|
8443
|
+
function ku(r) {
|
|
8444
8444
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
8445
8445
|
}
|
|
8446
8446
|
var Mr, ma;
|
|
8447
|
-
function
|
|
8447
|
+
function Lu() {
|
|
8448
8448
|
return ma || (ma = 1, Mr = {
|
|
8449
8449
|
aliceblue: [240, 248, 255],
|
|
8450
8450
|
antiquewhite: [250, 235, 215],
|
|
@@ -8600,7 +8600,7 @@ var Pr, ya;
|
|
|
8600
8600
|
function Io() {
|
|
8601
8601
|
if (ya) return Pr;
|
|
8602
8602
|
ya = 1;
|
|
8603
|
-
const r =
|
|
8603
|
+
const r = Lu(), e = {};
|
|
8604
8604
|
for (const a of Object.keys(r))
|
|
8605
8605
|
e[r[a]] = a;
|
|
8606
8606
|
const t = {
|
|
@@ -8900,7 +8900,7 @@ function Io() {
|
|
|
8900
8900
|
}, Pr;
|
|
8901
8901
|
}
|
|
8902
8902
|
var Rr, ga;
|
|
8903
|
-
function
|
|
8903
|
+
function Cu() {
|
|
8904
8904
|
if (ga) return Rr;
|
|
8905
8905
|
ga = 1;
|
|
8906
8906
|
const r = Io();
|
|
@@ -8948,10 +8948,10 @@ function Lu() {
|
|
|
8948
8948
|
}, Rr;
|
|
8949
8949
|
}
|
|
8950
8950
|
var zr, va;
|
|
8951
|
-
function
|
|
8951
|
+
function Eu() {
|
|
8952
8952
|
if (va) return zr;
|
|
8953
8953
|
va = 1;
|
|
8954
|
-
const r = Io(), e =
|
|
8954
|
+
const r = Io(), e = Cu(), t = {}, n = Object.keys(r);
|
|
8955
8955
|
function a(i) {
|
|
8956
8956
|
const s = function(...l) {
|
|
8957
8957
|
const u = l[0];
|
|
@@ -8982,8 +8982,8 @@ function Cu() {
|
|
|
8982
8982
|
});
|
|
8983
8983
|
}), zr = t, zr;
|
|
8984
8984
|
}
|
|
8985
|
-
var
|
|
8986
|
-
const
|
|
8985
|
+
var Au = Eu();
|
|
8986
|
+
const Tu = /* @__PURE__ */ ku(Au);
|
|
8987
8987
|
function ba({ gl: r, type: e, source: t }) {
|
|
8988
8988
|
const n = r.createShader(e);
|
|
8989
8989
|
if (n === null)
|
|
@@ -8992,7 +8992,7 @@ function ba({ gl: r, type: e, source: t }) {
|
|
|
8992
8992
|
throw console.error("Shader compilation error:", r.getShaderInfoLog(n)), r.deleteShader(n), new Error("Cannot compile shader");
|
|
8993
8993
|
return n;
|
|
8994
8994
|
}
|
|
8995
|
-
function
|
|
8995
|
+
function _u({ gl: r, vertexShaderSource: e, fragmentShaderSource: t }) {
|
|
8996
8996
|
const n = ba({
|
|
8997
8997
|
gl: r,
|
|
8998
8998
|
type: r.VERTEX_SHADER,
|
|
@@ -9002,7 +9002,7 @@ function Tu({ gl: r, vertexShaderSource: e, fragmentShaderSource: t }) {
|
|
|
9002
9002
|
throw console.error("Error: ", r.getProgramInfoLog(o)), new Error("Cannot link shader program");
|
|
9003
9003
|
return o;
|
|
9004
9004
|
}
|
|
9005
|
-
function
|
|
9005
|
+
function Iu(r, e, t) {
|
|
9006
9006
|
const n = r.getUniformLocation(e, t);
|
|
9007
9007
|
if (n === null)
|
|
9008
9008
|
throw new Error(`Cannot get uniform location for ${t}`);
|
|
@@ -9017,7 +9017,7 @@ function Mo({
|
|
|
9017
9017
|
vertices: o,
|
|
9018
9018
|
indices: i
|
|
9019
9019
|
}) {
|
|
9020
|
-
const s =
|
|
9020
|
+
const s = _u({ gl: r, vertexShaderSource: e, fragmentShaderSource: t }), l = n.reduce((f, h) => (f[h] = r.getAttribLocation(s, `a_${h}`), f), {}), u = a.reduce((f, h) => (f[h] = Iu(r, s, `u_${h}`), f), {}), c = r.createBuffer();
|
|
9021
9021
|
r.bindBuffer(r.ARRAY_BUFFER, c), r.bufferData(r.ARRAY_BUFFER, new Float32Array(o), r.STATIC_DRAW);
|
|
9022
9022
|
let p, d;
|
|
9023
9023
|
return i !== void 0 && (p = r.createBuffer(), d = i.length, r.bindBuffer(r.ELEMENT_ARRAY_BUFFER, p), r.bufferData(r.ELEMENT_ARRAY_BUFFER, new Uint16Array(i), r.STATIC_DRAW)), {
|
|
@@ -9037,10 +9037,10 @@ function Ut(r) {
|
|
|
9037
9037
|
if (r === "transparent")
|
|
9038
9038
|
return [1, 1, 1, 0];
|
|
9039
9039
|
try {
|
|
9040
|
-
const e =
|
|
9040
|
+
const e = Mu(r), t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e);
|
|
9041
9041
|
if (t != null && t.length) {
|
|
9042
9042
|
const a = !!t[4];
|
|
9043
|
-
return [...
|
|
9043
|
+
return [...Tu.hex.rgb(e).map((o) => o / 255), a ? parseInt(t[4], 16) / 255 : 1];
|
|
9044
9044
|
}
|
|
9045
9045
|
const n = e.match(/(\d\.\d(\d+)?|\d{3}|\d{2}|\d{1})/gi) ?? ["0", "0", "0"];
|
|
9046
9046
|
if (e.includes("rgb")) {
|
|
@@ -9054,11 +9054,11 @@ function Ut(r) {
|
|
|
9054
9054
|
}
|
|
9055
9055
|
return console.warn([`[parseColorStringToVec4]: Color ${r} is either not a valid color or its type is not supported, defaulting to black`]), [0, 0, 0, 1];
|
|
9056
9056
|
}
|
|
9057
|
-
let
|
|
9058
|
-
function
|
|
9059
|
-
return
|
|
9057
|
+
let pt;
|
|
9058
|
+
function Mu(r) {
|
|
9059
|
+
return pt = pt ?? document.createElement("canvas").getContext("2d"), pt ? (pt.fillStyle = r, pt.fillStyle) : "#000000";
|
|
9060
9060
|
}
|
|
9061
|
-
const Tn = 1, U = Tn / 2, B = Tn / 2, q = Tn / 2,
|
|
9061
|
+
const Tn = 1, U = Tn / 2, B = Tn / 2, q = Tn / 2, Pu = [-U, -B, q, U, -B, q, U, B, q, -U, B, q], Ru = [-U, -B, -q, -U, B, -q, U, B, -q, U, -B, -q], zu = [-U, B, -q, -U, B, q, U, B, q, U, B, -q], Ou = [-U, -B, -q, U, -B, -q, U, -B, q, -U, -B, q], Fu = [U, -B, -q, U, B, -q, U, B, q, U, -B, q], $u = [-U, -B, -q, -U, -B, q, -U, B, q, -U, B, -q], Nu = [...Pu, ...Ru, ...zu, ...Ou, ...Fu, ...$u], ju = [
|
|
9062
9062
|
// Front
|
|
9063
9063
|
0,
|
|
9064
9064
|
1,
|
|
@@ -9101,7 +9101,7 @@ const Tn = 1, U = Tn / 2, B = Tn / 2, q = Tn / 2, Mu = [-U, -B, q, U, -B, q, U,
|
|
|
9101
9101
|
20,
|
|
9102
9102
|
22,
|
|
9103
9103
|
23
|
|
9104
|
-
],
|
|
9104
|
+
], Du = `attribute vec3 a_vertexPosition;
|
|
9105
9105
|
varying vec3 vTextureCoord;
|
|
9106
9106
|
|
|
9107
9107
|
uniform mat4 u_projectionMatrix;
|
|
@@ -9141,7 +9141,7 @@ void main(void) {
|
|
|
9141
9141
|
#endif
|
|
9142
9142
|
}
|
|
9143
9143
|
`;
|
|
9144
|
-
var
|
|
9144
|
+
var Uu = /* @__PURE__ */ ((r) => (r.UNIVERSE_DARK = "universe-dark", r))(Uu || {});
|
|
9145
9145
|
const Ge = {
|
|
9146
9146
|
stars: {
|
|
9147
9147
|
color: "hsl(233,100%,92%)",
|
|
@@ -9169,16 +9169,21 @@ const Ge = {
|
|
|
9169
9169
|
}
|
|
9170
9170
|
};
|
|
9171
9171
|
var Ne = /* @__PURE__ */ ((r) => (r.POSITIVE_X = "pX", r.NEGATIVE_X = "nX", r.POSITIVE_Y = "pY", r.NEGATIVE_Y = "nY", r.POSITIVE_Z = "pZ", r.NEGATIVE_Z = "nZ", r))(Ne || {});
|
|
9172
|
-
const
|
|
9172
|
+
const tt = /* @__PURE__ */ new Map();
|
|
9173
|
+
function Bu(r) {
|
|
9174
|
+
const e = tt.get(r);
|
|
9175
|
+
e && (tt.delete(r), r.deleteTexture(e));
|
|
9176
|
+
}
|
|
9177
|
+
const Sa = /* @__PURE__ */ new Map();
|
|
9173
9178
|
let xa;
|
|
9174
|
-
function
|
|
9175
|
-
if (
|
|
9176
|
-
t(
|
|
9179
|
+
function qu({ gl: r, faces: e, onReady: t, forceRefresh: n }) {
|
|
9180
|
+
if (tt.get(r) && !n && xa === JSON.stringify(e)) {
|
|
9181
|
+
t(tt.get(r), Sa.get(r));
|
|
9177
9182
|
return;
|
|
9178
9183
|
}
|
|
9179
9184
|
xa = JSON.stringify(e);
|
|
9180
|
-
const a =
|
|
9181
|
-
if (!e) {
|
|
9185
|
+
const a = tt.get(r) ?? r.createTexture();
|
|
9186
|
+
if (r.bindTexture(r.TEXTURE_CUBE_MAP, a), !e) {
|
|
9182
9187
|
console.warn("[CubemapLayer][loadCubemapTexture]: Faces are null");
|
|
9183
9188
|
return;
|
|
9184
9189
|
}
|
|
@@ -9209,17 +9214,17 @@ function Uu({ gl: r, faces: e, onReady: t, forceRefresh: n }) {
|
|
|
9209
9214
|
console.warn("[CubemapLayer][loadCubemapTexture]: Image or key is null");
|
|
9210
9215
|
continue;
|
|
9211
9216
|
}
|
|
9212
|
-
const y =
|
|
9217
|
+
const y = Vu(r, m);
|
|
9213
9218
|
r.bindTexture(r.TEXTURE_CUBE_MAP, a), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MAG_FILTER, r.LINEAR), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MIN_FILTER, r.LINEAR), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_WRAP_S, r.CLAMP_TO_EDGE), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_WRAP_T, r.CLAMP_TO_EDGE), r.texImage2D(y, 0, p, d, f, h);
|
|
9214
9219
|
}
|
|
9215
9220
|
r.bindTexture(r.TEXTURE_CUBE_MAP, a), r.generateMipmap(r.TEXTURE_CUBE_MAP), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MIN_FILTER, r.LINEAR_MIPMAP_LINEAR), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MAG_FILTER, r.LINEAR);
|
|
9216
9221
|
const l = s.map((u) => u.image);
|
|
9217
|
-
t(a, l), Sa.set(r, l),
|
|
9222
|
+
t(a, l), Sa.set(r, l), tt.set(r, a);
|
|
9218
9223
|
}).catch((s) => {
|
|
9219
9224
|
console.error("[CubemapLayer][loadCubemapTexture]: Error loading cubemap texture", s);
|
|
9220
9225
|
});
|
|
9221
9226
|
}
|
|
9222
|
-
function
|
|
9227
|
+
function Vu(r, e) {
|
|
9223
9228
|
if (e === Ne.POSITIVE_X)
|
|
9224
9229
|
return r.TEXTURE_CUBE_MAP_POSITIVE_X;
|
|
9225
9230
|
if (e === Ne.NEGATIVE_X)
|
|
@@ -9234,7 +9239,7 @@ function Bu(r, e) {
|
|
|
9234
9239
|
return r.TEXTURE_CUBE_MAP_NEGATIVE_Z;
|
|
9235
9240
|
throw new Error(`[CubemapLayer][loadCubemapTexture]: Invalid key ${e}`);
|
|
9236
9241
|
}
|
|
9237
|
-
function
|
|
9242
|
+
function Gu(r, e, t) {
|
|
9238
9243
|
return [
|
|
9239
9244
|
ze(r[0], e[0], t),
|
|
9240
9245
|
ze(r[1], e[1], t),
|
|
@@ -9251,8 +9256,8 @@ function Jt(r) {
|
|
|
9251
9256
|
const e = Object.keys(r).sort().map((t) => [t, r[t]]);
|
|
9252
9257
|
return Object.fromEntries(e);
|
|
9253
9258
|
}
|
|
9254
|
-
const Je = "https://api.maptiler.com/resources/space",
|
|
9255
|
-
function
|
|
9259
|
+
const Je = "https://api.maptiler.com/resources/space", Hu = ["vertexPosition"], Zu = ["projectionMatrix", "modelViewMatrix", "cubeSampler", "bgColor", "fadeOpacity"], ka = "%USE_TEXTURE_MACRO_MARKER%", Ku = "#define USE_TEXTURE", La = Ge.stars;
|
|
9260
|
+
function Xu(r, e) {
|
|
9256
9261
|
if (!Xr(r))
|
|
9257
9262
|
return {
|
|
9258
9263
|
color: "transparent"
|
|
@@ -9395,7 +9400,7 @@ class Or {
|
|
|
9395
9400
|
* @private
|
|
9396
9401
|
*/
|
|
9397
9402
|
g(this, "imageFadeInDelta", 0);
|
|
9398
|
-
const t =
|
|
9403
|
+
const t = Xu(e, La);
|
|
9399
9404
|
this.options = t, this.currentFacesDefinitionKey = JSON.stringify(t.faces ?? t.preset ?? t.path), this.bgColor = [0, 0, 0, 0], this.targetBgColor = Ut(t.color), this.faces = Ca(t), this.useCubemapTexture = this.faces !== null;
|
|
9400
9405
|
}
|
|
9401
9406
|
/**
|
|
@@ -9408,16 +9413,16 @@ class Or {
|
|
|
9408
9413
|
*/
|
|
9409
9414
|
updateCubemap({ facesNeedUpdate: e } = { facesNeedUpdate: !0 }) {
|
|
9410
9415
|
this.useCubemapTexture = this.faces !== null;
|
|
9411
|
-
const t =
|
|
9416
|
+
const t = Zu.filter((n) => n === "cubeSampler" || n === "fadeOpacity" ? this.useCubemapTexture : !0);
|
|
9412
9417
|
this.cubemap = Mo({
|
|
9413
9418
|
gl: this.gl,
|
|
9414
|
-
vertexShaderSource:
|
|
9419
|
+
vertexShaderSource: Du,
|
|
9415
9420
|
// Because we only want to use the read the texture in gl if we're supposed to
|
|
9416
|
-
fragmentShaderSource: this.useCubemapTexture ? wa.replace(ka,
|
|
9417
|
-
attributesKeys:
|
|
9421
|
+
fragmentShaderSource: this.useCubemapTexture ? wa.replace(ka, Ku) : wa.replace(ka, ""),
|
|
9422
|
+
attributesKeys: Hu,
|
|
9418
9423
|
uniformsKeys: t,
|
|
9419
|
-
vertices:
|
|
9420
|
-
indices:
|
|
9424
|
+
vertices: Nu,
|
|
9425
|
+
indices: ju
|
|
9421
9426
|
}), this.cubeMapNeedsUpdate = e, this.useCubemapTexture && this.updateTexture(this.gl, this.faces), this.animateColorChange();
|
|
9422
9427
|
}
|
|
9423
9428
|
/**
|
|
@@ -9438,7 +9443,7 @@ class Or {
|
|
|
9438
9443
|
* @param {WebGLRenderingContext | WebGL2RenderingContext} gl - The WebGL context used for rendering.
|
|
9439
9444
|
*/
|
|
9440
9445
|
onRemove(e, t) {
|
|
9441
|
-
this.cubemap && (this.texture && t
|
|
9446
|
+
this.cubemap && (this.texture && (Bu(t), this.texture = void 0), t.deleteProgram(this.cubemap.shaderProgram), t.deleteBuffer(this.cubemap.positionBuffer));
|
|
9442
9447
|
}
|
|
9443
9448
|
/**
|
|
9444
9449
|
* Updates the cubemap texture with the provided faces.
|
|
@@ -9451,7 +9456,7 @@ class Or {
|
|
|
9451
9456
|
if (this.cubeMapNeedsUpdate === !0 && !this.imageIsAnimating) {
|
|
9452
9457
|
if (this.cubeMapNeedsUpdate = !1, !this.useCubemapTexture)
|
|
9453
9458
|
return;
|
|
9454
|
-
|
|
9459
|
+
qu({
|
|
9455
9460
|
gl: e,
|
|
9456
9461
|
faces: t,
|
|
9457
9462
|
onReady: (n) => {
|
|
@@ -9478,7 +9483,7 @@ class Or {
|
|
|
9478
9483
|
*/
|
|
9479
9484
|
animateColorChange() {
|
|
9480
9485
|
const e = () => {
|
|
9481
|
-
this.transitionDelta < 1 && (requestAnimationFrame(e), this.bgColor =
|
|
9486
|
+
this.transitionDelta < 1 && (requestAnimationFrame(e), this.bgColor = Gu(this.previousBgColor, this.targetBgColor, this.transitionDelta), this.transitionDelta += 0.075, this.map.triggerRepaint());
|
|
9482
9487
|
};
|
|
9483
9488
|
requestAnimationFrame(e);
|
|
9484
9489
|
}
|
|
@@ -9544,11 +9549,11 @@ class Or {
|
|
|
9544
9549
|
if (this.cubemap === void 0)
|
|
9545
9550
|
throw new Error("[CubemapLayer]: Cubemap is undefined");
|
|
9546
9551
|
this.texture, e.disable(e.DEPTH_TEST), e.enable(e.BLEND), e.blendFunc(e.SRC_ALPHA, e.DST_ALPHA), e.useProgram(this.cubemap.shaderProgram), e.bindBuffer(e.ARRAY_BUFFER, this.cubemap.positionBuffer), e.vertexAttribPointer(this.cubemap.programInfo.attributesLocations.vertexPosition, 3, e.FLOAT, !1, 0, 0), e.enableVertexAttribArray(this.cubemap.programInfo.attributesLocations.vertexPosition);
|
|
9547
|
-
const n = 0.1, a = 1e4, o = e.canvas, i = o.clientWidth / o.clientHeight, s = this.map.transform, l = s.fov * (Math.PI / 180), u =
|
|
9548
|
-
|
|
9552
|
+
const n = 0.1, a = 1e4, o = e.canvas, i = o.clientWidth / o.clientHeight, s = this.map.transform, l = s.fov * (Math.PI / 180), u = mt();
|
|
9553
|
+
Su(u, l, i, n, a), da(u, u, s.rollInRadians), fa(u, u, -s.pitchInRadians), da(u, u, s.bearingInRadians);
|
|
9549
9554
|
const c = s.center.lat * Math.PI / 180, p = s.center.lng * Math.PI / 180;
|
|
9550
|
-
fa(u, u, c),
|
|
9551
|
-
const d =
|
|
9555
|
+
fa(u, u, c), bu(u, u, -p), e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.projectionMatrix, !1, u);
|
|
9556
|
+
const d = mt();
|
|
9552
9557
|
if (e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.modelViewMatrix, !1, d), e.uniform4fv(this.cubemap.programInfo.uniformsLocations.bgColor, new Float32Array(this.bgColor)), e.uniform1f(this.cubemap.programInfo.uniformsLocations.fadeOpacity, this.currentFadeOpacity), this.useCubemapTexture && this.texture && (e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_CUBE_MAP, this.texture), e.uniform1i(this.cubemap.programInfo.uniformsLocations.cubeSampler, 0)), this.cubemap.indexBuffer === void 0)
|
|
9553
9558
|
throw new Error("Index buffer is undefined");
|
|
9554
9559
|
if (this.cubemap.indexBufferLength === void 0)
|
|
@@ -9654,7 +9659,7 @@ function Ca(r) {
|
|
|
9654
9659
|
}
|
|
9655
9660
|
return null;
|
|
9656
9661
|
}
|
|
9657
|
-
const
|
|
9662
|
+
const Yu = `attribute vec3 a_position;
|
|
9658
9663
|
|
|
9659
9664
|
uniform mat4 u_matrix;
|
|
9660
9665
|
uniform mat4 u_rotationMatrix;
|
|
@@ -9669,7 +9674,7 @@ void main() {
|
|
|
9669
9674
|
v_pos = a_position.xy * u_scale;
|
|
9670
9675
|
gl_Position = u_matrix * u_rotationMatrix * vec4(a_position, 1.0);
|
|
9671
9676
|
}
|
|
9672
|
-
`,
|
|
9677
|
+
`, Wu = `precision mediump float;
|
|
9673
9678
|
varying vec2 v_pos;
|
|
9674
9679
|
|
|
9675
9680
|
uniform int u_stopsNumber;
|
|
@@ -9728,7 +9733,7 @@ void main() {
|
|
|
9728
9733
|
// gl_FragColor = color;
|
|
9729
9734
|
gl_FragColor = vec4(color.rgb * color.a, color.a);
|
|
9730
9735
|
}
|
|
9731
|
-
`, ke = 2,
|
|
9736
|
+
`, ke = 2, Ju = ["position"], Qu = ["matrix", "rotationMatrix", "stopsNumber", "stops", "colors", "maxDistance", "scale"], ec = [
|
|
9732
9737
|
-ke,
|
|
9733
9738
|
-ke,
|
|
9734
9739
|
0,
|
|
@@ -9741,12 +9746,12 @@ void main() {
|
|
|
9741
9746
|
ke,
|
|
9742
9747
|
ke,
|
|
9743
9748
|
0
|
|
9744
|
-
],
|
|
9749
|
+
], Ft = [
|
|
9745
9750
|
[0, "rgba(176, 208, 240, 1)"],
|
|
9746
9751
|
[0.1, "rgba(98, 168, 229, 0.3)"],
|
|
9747
9752
|
[0.2, "rgba(98, 168, 229, 0.0)"]
|
|
9748
|
-
],
|
|
9749
|
-
class
|
|
9753
|
+
], $t = 0.9, Ea = 0.06;
|
|
9754
|
+
class Fr {
|
|
9750
9755
|
/**
|
|
9751
9756
|
* Creates a new RadialGradientLayer instance.
|
|
9752
9757
|
*
|
|
@@ -9802,8 +9807,8 @@ class $r {
|
|
|
9802
9807
|
g(this, "animationActive", !0);
|
|
9803
9808
|
if (typeof e == "boolean") {
|
|
9804
9809
|
this.gradient = {
|
|
9805
|
-
scale:
|
|
9806
|
-
stops:
|
|
9810
|
+
scale: $t,
|
|
9811
|
+
stops: Ft
|
|
9807
9812
|
};
|
|
9808
9813
|
return;
|
|
9809
9814
|
}
|
|
@@ -9814,8 +9819,8 @@ class $r {
|
|
|
9814
9819
|
- `)}
|
|
9815
9820
|
`);
|
|
9816
9821
|
this.gradient = {
|
|
9817
|
-
scale: e.scale ??
|
|
9818
|
-
stops: e.stops ??
|
|
9822
|
+
scale: e.scale ?? $t,
|
|
9823
|
+
stops: e.stops ?? Ft
|
|
9819
9824
|
};
|
|
9820
9825
|
}
|
|
9821
9826
|
/**
|
|
@@ -9829,11 +9834,11 @@ class $r {
|
|
|
9829
9834
|
onAdd(e, t) {
|
|
9830
9835
|
this.map = e, this.plane = Mo({
|
|
9831
9836
|
gl: t,
|
|
9832
|
-
vertexShaderSource:
|
|
9833
|
-
fragmentShaderSource:
|
|
9834
|
-
attributesKeys:
|
|
9835
|
-
uniformsKeys:
|
|
9836
|
-
vertices:
|
|
9837
|
+
vertexShaderSource: Yu,
|
|
9838
|
+
fragmentShaderSource: Wu,
|
|
9839
|
+
attributesKeys: Ju,
|
|
9840
|
+
uniformsKeys: Qu,
|
|
9841
|
+
vertices: ec
|
|
9837
9842
|
}), this.animateIn();
|
|
9838
9843
|
}
|
|
9839
9844
|
/**
|
|
@@ -9926,16 +9931,16 @@ class $r {
|
|
|
9926
9931
|
e.disable(e.DEPTH_TEST), e.enable(e.BLEND), e.useProgram(this.plane.shaderProgram), e.bindBuffer(e.ARRAY_BUFFER, this.plane.positionBuffer);
|
|
9927
9932
|
const n = this.plane.programInfo.attributesLocations.position;
|
|
9928
9933
|
e.enableVertexAttribArray(n), e.vertexAttribPointer(n, 3, e.FLOAT, !1, 0, 0);
|
|
9929
|
-
const a =
|
|
9930
|
-
|
|
9931
|
-
const i =
|
|
9932
|
-
|
|
9934
|
+
const a = mt(), o = this.scale;
|
|
9935
|
+
vu(a, a, [o, o, o]);
|
|
9936
|
+
const i = mt();
|
|
9937
|
+
gu(i, t.defaultProjectionData.mainMatrix, a);
|
|
9933
9938
|
const s = this.plane.programInfo.uniformsLocations.matrix;
|
|
9934
9939
|
e.uniformMatrix4fv(s, !1, i);
|
|
9935
|
-
const l =
|
|
9940
|
+
const l = mt(), u = this.map.transform.cameraPosition, c = Ir(Dt(), u), p = xu(0, 1, 0), d = Dt();
|
|
9936
9941
|
ha(d, p, c), Ir(d, d);
|
|
9937
9942
|
const f = Dt();
|
|
9938
|
-
ha(f, c, d), Ir(f, f),
|
|
9943
|
+
ha(f, c, d), Ir(f, f), yu(l, d[0], d[1], d[2], 0, f[0], f[1], f[2], 0, c[0], c[1], c[2], 0, 0, 0, 0, 1);
|
|
9939
9944
|
const h = this.plane.programInfo.uniformsLocations.rotationMatrix;
|
|
9940
9945
|
e.uniformMatrix4fv(h, !1, l);
|
|
9941
9946
|
const m = this.gradient.stops.length, y = [], b = [];
|
|
@@ -9968,7 +9973,7 @@ class $r {
|
|
|
9968
9973
|
- ${t.join(`
|
|
9969
9974
|
- `)}
|
|
9970
9975
|
`);
|
|
9971
|
-
e === !0 ? (this.gradient.scale =
|
|
9976
|
+
e === !0 ? (this.gradient.scale = $t, this.gradient.stops = Ft) : (this.gradient.scale = e.scale ?? $t, this.gradient.stops = e.stops ?? Ft), await this.animateIn();
|
|
9972
9977
|
}
|
|
9973
9978
|
setAnimationActive(e) {
|
|
9974
9979
|
this.animationActive = e;
|
|
@@ -9980,27 +9985,31 @@ class $r {
|
|
|
9980
9985
|
this.map.setLayoutProperty(this.id, "visibility", "none");
|
|
9981
9986
|
}
|
|
9982
9987
|
}
|
|
9983
|
-
const
|
|
9988
|
+
const tc = ["scale", "stops"];
|
|
9984
9989
|
function Aa(r) {
|
|
9985
9990
|
var t;
|
|
9986
9991
|
const e = [];
|
|
9987
9992
|
if (typeof r == "boolean")
|
|
9988
9993
|
return [];
|
|
9989
9994
|
try {
|
|
9990
|
-
const n = Object.keys(r).filter((a) => !
|
|
9995
|
+
const n = Object.keys(r).filter((a) => !tc.includes(a));
|
|
9991
9996
|
n.length > 0 && e.push(`Properties ${n.map((a) => `\`${a}\``).join(", ")} are not supported.`);
|
|
9992
9997
|
} catch {
|
|
9993
9998
|
e.push("Halo specification is not an object.");
|
|
9994
9999
|
}
|
|
9995
10000
|
return typeof r.scale != "number" && e.push("Halo `scale` property is not a number."), (!r.stops || r.stops.length === 0) && e.push("Halo `stops` property is not an array."), (t = r.stops) != null && t.some((n) => typeof n[0] != "number" || typeof n[1] != "string") && e.push("Halo `stops` property is not an array of [number, string]"), e;
|
|
9996
10001
|
}
|
|
9997
|
-
|
|
10002
|
+
function rc() {
|
|
10003
|
+
const r = "color: #3A1888; background: white; padding: 5px 0; font-weight: bold;", e = "color: #FBC935; background: white; padding: 5px 0 5px 5px; font-weight: bold;", t = "color: #F1175D; background: white; padding: 5px 0; font-weight: bold;";
|
|
10004
|
+
console.info(`%c❖%c❖%c❖ %cMapTiler SDK JS v${oi()} %c❖%c❖%c❖`, e, r, t, "color: #333; background: white; padding: 5px 0; font-weight: bold;", t, r, e);
|
|
10005
|
+
}
|
|
10006
|
+
const nc = {
|
|
9998
10007
|
POINT: "POINT",
|
|
9999
10008
|
COUNTRY: "COUNTRY"
|
|
10000
10009
|
};
|
|
10001
10010
|
let Po = class Ro extends L.Map {
|
|
10002
10011
|
constructor(t) {
|
|
10003
|
-
|
|
10012
|
+
t.logSDKVersion !== !1 && rc(), Di(t.container), t.apiKey && (j.apiKey = t.apiKey);
|
|
10004
10013
|
const { style: n, requiresUrlMonitoring: a, isFallback: o } = ua(t.style);
|
|
10005
10014
|
o && console.warn(
|
|
10006
10015
|
"Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Fallback to default MapTiler style."
|
|
@@ -10049,7 +10058,7 @@ let Po = class Ro extends L.Map {
|
|
|
10049
10058
|
this.options = t, this.setStyle(n), a && this.monitorStyleUrl(n);
|
|
10050
10059
|
const u = () => {
|
|
10051
10060
|
let h = "The distant style could not be loaded.";
|
|
10052
|
-
this.getStyle() ? h += " Leaving the style as is." : (this.setStyle(
|
|
10061
|
+
this.getStyle() ? h += " Leaving the style as is." : (this.setStyle(ft.STREETS), h += `Loading default MapTiler Cloud style "${ft.STREETS.getDefaultVariant().getId()}" as a fallback.`), console.warn(h);
|
|
10053
10062
|
};
|
|
10054
10063
|
if (this.on("style.load", () => {
|
|
10055
10064
|
this.styleInProcess = !1;
|
|
@@ -10065,7 +10074,7 @@ let Po = class Ro extends L.Map {
|
|
|
10065
10074
|
u();
|
|
10066
10075
|
return;
|
|
10067
10076
|
}
|
|
10068
|
-
}), j.caching && !jr && console.warn("The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"), j.caching && jr &&
|
|
10077
|
+
}), j.caching && !jr && console.warn("The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"), j.caching && jr && Fi(), typeof t.language > "u")
|
|
10069
10078
|
this.primaryLanguage = j.primaryLanguage;
|
|
10070
10079
|
else {
|
|
10071
10080
|
const h = zn(t.language, z);
|
|
@@ -10077,7 +10086,7 @@ let Po = class Ro extends L.Map {
|
|
|
10077
10086
|
if (!t.geolocate || t.center || t.hash && i)
|
|
10078
10087
|
return;
|
|
10079
10088
|
try {
|
|
10080
|
-
if (t.geolocate ===
|
|
10089
|
+
if (t.geolocate === nc.COUNTRY) {
|
|
10081
10090
|
await this.fitToIpBounds();
|
|
10082
10091
|
return;
|
|
10083
10092
|
}
|
|
@@ -10158,23 +10167,23 @@ let Po = class Ro extends L.Map {
|
|
|
10158
10167
|
if (t.forceNoAttributionControl !== !0)
|
|
10159
10168
|
if ("logo" in h && h.logo) {
|
|
10160
10169
|
const m = h.logo;
|
|
10161
|
-
this.addControl(new
|
|
10162
|
-
} else t.maptilerLogo && this.addControl(new
|
|
10170
|
+
this.addControl(new $n({ logoURL: m }), t.logoPosition);
|
|
10171
|
+
} else t.maptilerLogo && this.addControl(new $n(), t.logoPosition);
|
|
10163
10172
|
if (t.scaleControl) {
|
|
10164
|
-
const m = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, y = new
|
|
10173
|
+
const m = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, y = new Ti({ unit: j.unit });
|
|
10165
10174
|
this.addControl(y, m), j.on("unit", (b) => {
|
|
10166
10175
|
y.setUnit(b);
|
|
10167
10176
|
});
|
|
10168
10177
|
}
|
|
10169
10178
|
if (t.navigationControl !== !1) {
|
|
10170
10179
|
const m = t.navigationControl === !0 || t.navigationControl === void 0 ? "top-right" : t.navigationControl;
|
|
10171
|
-
this.addControl(new
|
|
10180
|
+
this.addControl(new cu(), m);
|
|
10172
10181
|
}
|
|
10173
10182
|
if (t.geolocateControl !== !1) {
|
|
10174
10183
|
const m = t.geolocateControl === !0 || t.geolocateControl === void 0 ? "top-right" : t.geolocateControl;
|
|
10175
10184
|
this.addControl(
|
|
10176
10185
|
// new maplibregl.GeolocateControl({
|
|
10177
|
-
new
|
|
10186
|
+
new fu({
|
|
10178
10187
|
positionOptions: {
|
|
10179
10188
|
enableHighAccuracy: !0,
|
|
10180
10189
|
maximumAge: 0,
|
|
@@ -10192,15 +10201,15 @@ let Po = class Ro extends L.Map {
|
|
|
10192
10201
|
}
|
|
10193
10202
|
if (t.terrainControl) {
|
|
10194
10203
|
const m = t.terrainControl === !0 || t.terrainControl === void 0 ? "top-right" : t.terrainControl;
|
|
10195
|
-
this.addControl(new
|
|
10204
|
+
this.addControl(new uu(), m);
|
|
10196
10205
|
}
|
|
10197
10206
|
if (t.projectionControl) {
|
|
10198
10207
|
const m = t.projectionControl === !0 || t.projectionControl === void 0 ? "top-right" : t.projectionControl;
|
|
10199
|
-
this.addControl(new
|
|
10208
|
+
this.addControl(new hu(), m);
|
|
10200
10209
|
}
|
|
10201
10210
|
if (t.fullscreenControl) {
|
|
10202
10211
|
const m = t.fullscreenControl === !0 || t.fullscreenControl === void 0 ? "top-right" : t.fullscreenControl;
|
|
10203
|
-
this.addControl(new
|
|
10212
|
+
this.addControl(new _i({}), m);
|
|
10204
10213
|
}
|
|
10205
10214
|
this.isReady = !0, this.fire("ready", { target: this });
|
|
10206
10215
|
});
|
|
@@ -10225,13 +10234,13 @@ let Po = class Ro extends L.Map {
|
|
|
10225
10234
|
maxZoom: Ye,
|
|
10226
10235
|
boxZoom: X,
|
|
10227
10236
|
locale: We,
|
|
10228
|
-
fadeDuration:
|
|
10229
|
-
crossSourceCollisions:
|
|
10230
|
-
clickTolerance:
|
|
10231
|
-
bounds:
|
|
10232
|
-
fitBoundsOptions:
|
|
10233
|
-
pixelRatio:
|
|
10234
|
-
validateStyle:
|
|
10237
|
+
fadeDuration: li,
|
|
10238
|
+
crossSourceCollisions: ui,
|
|
10239
|
+
clickTolerance: ci,
|
|
10240
|
+
bounds: pi,
|
|
10241
|
+
fitBoundsOptions: fi,
|
|
10242
|
+
pixelRatio: di,
|
|
10243
|
+
validateStyle: hi
|
|
10235
10244
|
} = t;
|
|
10236
10245
|
this.minimap = new _r(h, {
|
|
10237
10246
|
zoom: m,
|
|
@@ -10249,13 +10258,13 @@ let Po = class Ro extends L.Map {
|
|
|
10249
10258
|
maxZoom: Ye,
|
|
10250
10259
|
boxZoom: X,
|
|
10251
10260
|
locale: We,
|
|
10252
|
-
fadeDuration:
|
|
10253
|
-
crossSourceCollisions:
|
|
10254
|
-
clickTolerance:
|
|
10255
|
-
bounds:
|
|
10256
|
-
fitBoundsOptions:
|
|
10257
|
-
pixelRatio:
|
|
10258
|
-
validateStyle:
|
|
10261
|
+
fadeDuration: li,
|
|
10262
|
+
crossSourceCollisions: ui,
|
|
10263
|
+
clickTolerance: ci,
|
|
10264
|
+
bounds: pi,
|
|
10265
|
+
fitBoundsOptions: fi,
|
|
10266
|
+
pixelRatio: di,
|
|
10267
|
+
validateStyle: hi
|
|
10259
10268
|
}), this.addControl(this.minimap, h.position ?? "bottom-left");
|
|
10260
10269
|
} else h === !0 ? (this.minimap = new _r({}, t), this.addControl(this.minimap, "bottom-left")) : h !== void 0 && h !== !1 && (this.minimap = new _r({}, t), this.addControl(this.minimap, h));
|
|
10261
10270
|
});
|
|
@@ -10276,7 +10285,7 @@ let Po = class Ro extends L.Map {
|
|
|
10276
10285
|
});
|
|
10277
10286
|
const h = this.getLayersOrder()[0];
|
|
10278
10287
|
t.space && this.initSpace({ options: t, before: h }), t.halo && this.initHalo({ options: t, before: h });
|
|
10279
|
-
}), this.telemetry = new
|
|
10288
|
+
}), this.telemetry = new mu(this);
|
|
10280
10289
|
}
|
|
10281
10290
|
getSpace() {
|
|
10282
10291
|
return this.space;
|
|
@@ -10433,10 +10442,10 @@ let Po = class Ro extends L.Map {
|
|
|
10433
10442
|
if (this.halo && this.getLayer(this.halo.id) || t.halo === !1) return;
|
|
10434
10443
|
const o = a;
|
|
10435
10444
|
if (t.halo) {
|
|
10436
|
-
this.halo = new
|
|
10445
|
+
this.halo = new Fr(t.halo), this.addLayer(this.halo, n);
|
|
10437
10446
|
return;
|
|
10438
10447
|
}
|
|
10439
|
-
o && (this.halo = new
|
|
10448
|
+
o && (this.halo = new Fr(o), this.addLayer(this.halo, n));
|
|
10440
10449
|
}
|
|
10441
10450
|
getHalo() {
|
|
10442
10451
|
return this.halo;
|
|
@@ -10447,7 +10456,7 @@ let Po = class Ro extends L.Map {
|
|
|
10447
10456
|
this.halo.setGradient(t);
|
|
10448
10457
|
return;
|
|
10449
10458
|
}
|
|
10450
|
-
this.halo = new
|
|
10459
|
+
this.halo = new Fr(t), this.once("load", () => {
|
|
10451
10460
|
var s;
|
|
10452
10461
|
const n = this.getLayersOrder(), a = n[0], o = n.indexOf(((s = this.space) == null ? void 0 : s.id) ?? "") + 2, i = n[o];
|
|
10453
10462
|
this.halo && this.addLayer(this.halo, this.space ? i : a);
|
|
@@ -10560,7 +10569,7 @@ let Po = class Ro extends L.Map {
|
|
|
10560
10569
|
this.spaceboxLoadingState.styleLoadedCallbackFired = !1, this.spaceboxLoadingState.styleLoadCallbackSet = !1;
|
|
10561
10570
|
const o = this.getStyle(), i = a.style;
|
|
10562
10571
|
try {
|
|
10563
|
-
super.setStyle(a.style, n), this.styleInProcess = !0;
|
|
10572
|
+
super.setStyle(a.style, { ...n, diff: typeof a.style != "string" }), this.styleInProcess = !0;
|
|
10564
10573
|
} catch (m) {
|
|
10565
10574
|
this.styleInProcess = !1, console.error("[Map.setStyle]: Error while setting style:", m);
|
|
10566
10575
|
}
|
|
@@ -10729,7 +10738,7 @@ let Po = class Ro extends L.Map {
|
|
|
10729
10738
|
return (a = this.minimap) == null || a.setGlyphs(t, n), super.setGlyphs(t, n);
|
|
10730
10739
|
}
|
|
10731
10740
|
getStyleLanguage() {
|
|
10732
|
-
return !this.style || !this.style.stylesheet || !this.style.stylesheet.metadata || typeof this.style.stylesheet.metadata != "object" ? null : "maptiler:language" in this.style.stylesheet.metadata && typeof this.style.stylesheet.metadata["maptiler:language"] == "string" ?
|
|
10741
|
+
return !this.style || !this.style.stylesheet || !this.style.stylesheet.metadata || typeof this.style.stylesheet.metadata != "object" ? null : "maptiler:language" in this.style.stylesheet.metadata && typeof this.style.stylesheet.metadata["maptiler:language"] == "string" ? ki(this.style.stylesheet.metadata["maptiler:language"]) : null;
|
|
10733
10742
|
}
|
|
10734
10743
|
/**
|
|
10735
10744
|
* Define the primary language of the map. Note that not all the languages shorthands provided are available.
|
|
@@ -10765,7 +10774,7 @@ let Po = class Ro extends L.Map {
|
|
|
10765
10774
|
o = n;
|
|
10766
10775
|
}
|
|
10767
10776
|
let i = z.LOCAL.flag, s = ["get", i];
|
|
10768
|
-
o.flag === z.VISITOR.flag ? (i =
|
|
10777
|
+
o.flag === z.VISITOR.flag ? (i = Fn().flag, s = [
|
|
10769
10778
|
"case",
|
|
10770
10779
|
["all", ["has", i], ["has", z.LOCAL.flag]],
|
|
10771
10780
|
[
|
|
@@ -10787,10 +10796,10 @@ let Po = class Ro extends L.Map {
|
|
|
10787
10796
|
`, ["get", z.LOCAL.flag], { "font-scale": 1.1 }]
|
|
10788
10797
|
],
|
|
10789
10798
|
["get", z.LOCAL.flag]
|
|
10790
|
-
]) : o.flag === z.AUTO.flag ? (i =
|
|
10799
|
+
]) : o.flag === z.AUTO.flag ? (i = Fn().flag, s = ["coalesce", ["get", i], ["get", z.LOCAL.flag]]) : o === z.LOCAL ? (i = z.LOCAL.flag, s = ["get", i]) : (i = o.flag, s = ["coalesce", ["get", i], ["get", z.LOCAL.flag]]);
|
|
10791
10800
|
const { layers: l } = this.getStyle(), u = this.originalLabelStyle.size === 0;
|
|
10792
10801
|
if (u) {
|
|
10793
|
-
const c =
|
|
10802
|
+
const c = Zi(l, this);
|
|
10794
10803
|
this.isStyleLocalized = Object.keys(c.localized).length > 0;
|
|
10795
10804
|
}
|
|
10796
10805
|
for (const c of l) {
|
|
@@ -10804,16 +10813,16 @@ let Po = class Ro extends L.Map {
|
|
|
10804
10813
|
continue;
|
|
10805
10814
|
let y;
|
|
10806
10815
|
if (u ? (y = this.getLayoutProperty(h, "text-field"), this.originalLabelStyle.set(h, y)) : y = this.originalLabelStyle.get(h), typeof y == "string") {
|
|
10807
|
-
const { contains: b, exactMatch: v } =
|
|
10816
|
+
const { contains: b, exactMatch: v } = Bi(y, this.isStyleLocalized);
|
|
10808
10817
|
if (!b) continue;
|
|
10809
10818
|
if (v)
|
|
10810
10819
|
this.setLayoutProperty(h, "text-field", s);
|
|
10811
10820
|
else {
|
|
10812
|
-
const x =
|
|
10821
|
+
const x = qi(y, s, this.isStyleLocalized);
|
|
10813
10822
|
this.setLayoutProperty(h, "text-field", x);
|
|
10814
10823
|
}
|
|
10815
10824
|
} else {
|
|
10816
|
-
const b =
|
|
10825
|
+
const b = Ui(y, s, this.isStyleLocalized);
|
|
10817
10826
|
this.setLayoutProperty(h, "text-field", b);
|
|
10818
10827
|
}
|
|
10819
10828
|
}
|
|
@@ -10947,7 +10956,7 @@ let Po = class Ro extends L.Map {
|
|
|
10947
10956
|
}
|
|
10948
10957
|
getCameraHash() {
|
|
10949
10958
|
const t = new Float32Array(5), n = this.getCenter();
|
|
10950
|
-
return t[0] = n.lng, t[1] = n.lat, t[2] = this.getZoom(), t[3] = this.getPitch(), t[4] = this.getBearing(),
|
|
10959
|
+
return t[0] = n.lng, t[1] = n.lat, t[2] = this.getZoom(), t[3] = this.getPitch(), t[4] = this.getBearing(), gi.fromUint8Array(new Uint8Array(t.buffer));
|
|
10951
10960
|
}
|
|
10952
10961
|
/**
|
|
10953
10962
|
* Get the SDK config object.
|
|
@@ -11048,7 +11057,7 @@ const zo = [
|
|
|
11048
11057
|
], Oo = [
|
|
11049
11058
|
"error"
|
|
11050
11059
|
// ErrorEvent
|
|
11051
|
-
],
|
|
11060
|
+
], Fo = ["resize"], $o = ["webglcontextlost", "webglcontextrestored"], No = [
|
|
11052
11061
|
"moveend",
|
|
11053
11062
|
"movestart",
|
|
11054
11063
|
"move",
|
|
@@ -11074,18 +11083,18 @@ const zo = [
|
|
|
11074
11083
|
// this is fired on layers, not the map
|
|
11075
11084
|
// keeping it for reference
|
|
11076
11085
|
// "metadata",
|
|
11077
|
-
],
|
|
11086
|
+
], ac = [
|
|
11078
11087
|
...zo,
|
|
11079
11088
|
...Oo,
|
|
11080
|
-
...$o,
|
|
11081
11089
|
...Fo,
|
|
11090
|
+
...$o,
|
|
11082
11091
|
...No,
|
|
11083
11092
|
...jo,
|
|
11084
11093
|
...Uo,
|
|
11085
11094
|
...Do
|
|
11086
|
-
],
|
|
11087
|
-
function
|
|
11088
|
-
|
|
11095
|
+
], oc = ["lngLat", "_defaultPrevented"];
|
|
11096
|
+
function ic({ map: r, viewer: e, lngLatToPx: t }) {
|
|
11097
|
+
ac.forEach((n) => {
|
|
11089
11098
|
try {
|
|
11090
11099
|
r.on(n, (a) => {
|
|
11091
11100
|
const o = n;
|
|
@@ -11094,7 +11103,7 @@ function nc({ map: r, viewer: e, lngLatToPx: t }) {
|
|
|
11094
11103
|
isOutOfBounds: m ? h[0] < 0 || h[0] > m.width || h[1] < 0 || h[1] > m.height : !0,
|
|
11095
11104
|
imageX: h[0],
|
|
11096
11105
|
imageY: h[1],
|
|
11097
|
-
...Object.fromEntries(Object.entries(a).filter(([v]) => !
|
|
11106
|
+
...Object.fromEntries(Object.entries(a).filter(([v]) => !oc.includes(v)))
|
|
11098
11107
|
};
|
|
11099
11108
|
e.fire(new ne(n, e, f.originalEvent, b));
|
|
11100
11109
|
return;
|
|
@@ -11112,13 +11121,13 @@ function nc({ map: r, viewer: e, lngLatToPx: t }) {
|
|
|
11112
11121
|
return;
|
|
11113
11122
|
}
|
|
11114
11123
|
const l = n;
|
|
11115
|
-
if (
|
|
11124
|
+
if (Fo.includes(l)) {
|
|
11116
11125
|
const f = a;
|
|
11117
11126
|
e.fire(new ne(n, e, null, f));
|
|
11118
11127
|
return;
|
|
11119
11128
|
}
|
|
11120
11129
|
const u = n;
|
|
11121
|
-
if (
|
|
11130
|
+
if ($o.includes(u)) {
|
|
11122
11131
|
const f = a;
|
|
11123
11132
|
e.fire(new ne(n, e, f.originalEvent, f));
|
|
11124
11133
|
return;
|
|
@@ -11146,7 +11155,7 @@ function nc({ map: r, viewer: e, lngLatToPx: t }) {
|
|
|
11146
11155
|
}
|
|
11147
11156
|
});
|
|
11148
11157
|
}
|
|
11149
|
-
class
|
|
11158
|
+
class sc extends Error {
|
|
11150
11159
|
constructor(t, n, a) {
|
|
11151
11160
|
const o = `[${a}]: Failed to fetch ${n} at ${t.url}: ${t.status.toString()}: ${t.statusText}`;
|
|
11152
11161
|
super(o);
|
|
@@ -11156,13 +11165,13 @@ class ac extends Error {
|
|
|
11156
11165
|
}
|
|
11157
11166
|
}
|
|
11158
11167
|
const Ta = 85.051129;
|
|
11159
|
-
function
|
|
11168
|
+
function lc(r, e) {
|
|
11160
11169
|
return new an(e.x / r, e.y / r).toLngLat();
|
|
11161
11170
|
}
|
|
11162
|
-
function
|
|
11171
|
+
function uc(r) {
|
|
11163
11172
|
return Math.pow(2, r);
|
|
11164
11173
|
}
|
|
11165
|
-
function
|
|
11174
|
+
function cc(r) {
|
|
11166
11175
|
return Math.log(r) / Math.LN2;
|
|
11167
11176
|
}
|
|
11168
11177
|
function Bo(r, e, t) {
|
|
@@ -11178,14 +11187,14 @@ function _a(r, e, t) {
|
|
|
11178
11187
|
const n = t - e, a = ((r - e) % n + n) % n + e;
|
|
11179
11188
|
return a === e ? t : a;
|
|
11180
11189
|
}
|
|
11181
|
-
function
|
|
11190
|
+
function pc(r, e) {
|
|
11182
11191
|
const t = Bo(e.lat, -Ta, Ta);
|
|
11183
|
-
return new
|
|
11192
|
+
return new si(Wr(e.lng) * r, Yr(t) * r);
|
|
11184
11193
|
}
|
|
11185
|
-
const
|
|
11194
|
+
const fc = function(r, e) {
|
|
11186
11195
|
e = Bo(e, this.minZoom, this.maxZoom);
|
|
11187
11196
|
const t = {
|
|
11188
|
-
center: new
|
|
11197
|
+
center: new ii(r.lng, r.lat),
|
|
11189
11198
|
zoom: e
|
|
11190
11199
|
};
|
|
11191
11200
|
let n = this.lngRange;
|
|
@@ -11194,15 +11203,15 @@ const uc = function(r, e) {
|
|
|
11194
11203
|
const X = 179.9999999999;
|
|
11195
11204
|
n = [-X, X];
|
|
11196
11205
|
}
|
|
11197
|
-
const o = this.tileSize *
|
|
11206
|
+
const o = this.tileSize * uc(t.zoom);
|
|
11198
11207
|
let i = 0, s = o, l = 0, u = o, c = 0, p = 0;
|
|
11199
11208
|
const { x: d, y: f } = this.size, h = 0.5;
|
|
11200
11209
|
a && (i = Yr(a[1]) * o, s = Yr(a[0]) * o, s - i < h * f && (c = h * f / (s - i))), n && (l = _a(Wr(n[0]) * o, 0, o), u = _a(Wr(n[1]) * o, 0, o), u < l && (u += o), u - l < h * d && (p = h * d / (u - l)));
|
|
11201
|
-
const { x: m, y } =
|
|
11210
|
+
const { x: m, y } = pc(o, r);
|
|
11202
11211
|
let b, v;
|
|
11203
11212
|
const x = Math.min(p || 0, c || 0);
|
|
11204
11213
|
if (x)
|
|
11205
|
-
return t.zoom +=
|
|
11214
|
+
return t.zoom += cc(x), t;
|
|
11206
11215
|
let E = 0, C = 0;
|
|
11207
11216
|
const T = 1, N = 1 - (s - i) / f, ge = 1 - (u - l) / d;
|
|
11208
11217
|
E = Math.max(ge, T), C = Math.max(N, T);
|
|
@@ -11216,11 +11225,11 @@ const uc = function(r, e) {
|
|
|
11216
11225
|
X - We < l && (b = l + We), X + We > u && (b = u - We);
|
|
11217
11226
|
}
|
|
11218
11227
|
if (b !== void 0 || v !== void 0) {
|
|
11219
|
-
const X = new
|
|
11220
|
-
t.center =
|
|
11228
|
+
const X = new si(b ?? m, v ?? y);
|
|
11229
|
+
t.center = lc(o, X).wrap();
|
|
11221
11230
|
}
|
|
11222
11231
|
return t;
|
|
11223
|
-
},
|
|
11232
|
+
}, dc = {
|
|
11224
11233
|
center: "translate(-50%,-50%)",
|
|
11225
11234
|
top: "translate(-50%,0)",
|
|
11226
11235
|
"top-left": "translate(0,0)",
|
|
@@ -11231,7 +11240,7 @@ const uc = function(r, e) {
|
|
|
11231
11240
|
left: "translate(0,-50%)",
|
|
11232
11241
|
right: "translate(-100%,-50%)"
|
|
11233
11242
|
};
|
|
11234
|
-
function
|
|
11243
|
+
function hc(r) {
|
|
11235
11244
|
function e(t) {
|
|
11236
11245
|
if (!this._map) return;
|
|
11237
11246
|
const n = this._map.loaded() && !this._map.isMoving();
|
|
@@ -11240,12 +11249,12 @@ function pc(r) {
|
|
|
11240
11249
|
this._rotationAlignment === "viewport" || this._rotationAlignment === "auto" ? a = `rotateZ(${this._rotation}deg)` : this._rotationAlignment === "map" && (a = `rotateZ(${this._rotation - this._map.getBearing()}deg)`);
|
|
11241
11250
|
let o = "";
|
|
11242
11251
|
this._pitchAlignment === "viewport" || this._pitchAlignment === "auto" ? o = "rotateX(0deg)" : this._pitchAlignment === "map" && (o = `rotateX(${this._map.getPitch()}deg)`), !this._subpixelPositioning && (!t || t.type === "moveend") && (this._pos = this._pos.round());
|
|
11243
|
-
const i = `${
|
|
11252
|
+
const i = `${dc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${o} ${a}`;
|
|
11244
11253
|
this._element.style.transform = i;
|
|
11245
11254
|
}
|
|
11246
11255
|
r._update = e.bind(r);
|
|
11247
11256
|
}
|
|
11248
|
-
class
|
|
11257
|
+
class mc {
|
|
11249
11258
|
constructor({ imageViewer: e }) {
|
|
11250
11259
|
g(this, "viewer");
|
|
11251
11260
|
g(this, "container");
|
|
@@ -11266,7 +11275,7 @@ class fc {
|
|
|
11266
11275
|
this.container.remove();
|
|
11267
11276
|
}
|
|
11268
11277
|
}
|
|
11269
|
-
const qo = Symbol("MapTiler:ImageViewer:Internal:lngLatToPxInternal"), Vo = Symbol("MapTiler:ImageViewer:Internal:pxToLngLatInternal"), { Evented:
|
|
11278
|
+
const qo = Symbol("MapTiler:ImageViewer:Internal:lngLatToPxInternal"), Vo = Symbol("MapTiler:ImageViewer:Internal:pxToLngLatInternal"), { Evented: yc } = L, gc = {
|
|
11270
11279
|
style: {
|
|
11271
11280
|
version: 8,
|
|
11272
11281
|
sources: {},
|
|
@@ -11285,14 +11294,14 @@ const qo = Symbol("MapTiler:ImageViewer:Internal:lngLatToPxInternal"), Vo = Symb
|
|
|
11285
11294
|
terrain: !1,
|
|
11286
11295
|
space: !1,
|
|
11287
11296
|
halo: !1,
|
|
11288
|
-
transformConstrain:
|
|
11289
|
-
},
|
|
11297
|
+
transformConstrain: fc
|
|
11298
|
+
}, vc = {
|
|
11290
11299
|
debug: !1,
|
|
11291
11300
|
fitToBoundsControl: !0,
|
|
11292
11301
|
navigationControl: !0
|
|
11293
11302
|
};
|
|
11294
|
-
var Oa, $a
|
|
11295
|
-
class
|
|
11303
|
+
var Oa, Fa, $a;
|
|
11304
|
+
class bc extends ($a = yc, Fa = qo, Oa = Vo, $a) {
|
|
11296
11305
|
//#region constructor
|
|
11297
11306
|
/**
|
|
11298
11307
|
* The constructor for the ImageViewer.
|
|
@@ -11369,19 +11378,19 @@ class yc extends (Fa = dc, $a = qo, Oa = Vo, Fa) {
|
|
|
11369
11378
|
g(this, "shouldFitImageToViewport", !0);
|
|
11370
11379
|
// aliases for methods that are not exposed by the SDK
|
|
11371
11380
|
// but used internally (ImageMarkers)
|
|
11372
|
-
g(this,
|
|
11381
|
+
g(this, Fa, this.lngLatToPx.bind(this));
|
|
11373
11382
|
g(this, Oa, this.pxToLngLat.bind(this));
|
|
11374
11383
|
if (!t.imageUUID)
|
|
11375
11384
|
throw new Error("[ImageViewer]: `imageUUID` is required");
|
|
11376
11385
|
if (typeof t.container != "string" && !(t.container instanceof HTMLElement))
|
|
11377
11386
|
throw new Error("[ImageViewer]: `container` is required and must be a string or HTMLElement");
|
|
11378
11387
|
this.options = {
|
|
11379
|
-
...
|
|
11388
|
+
...vc,
|
|
11380
11389
|
...t
|
|
11381
11390
|
};
|
|
11382
11391
|
const n = {
|
|
11383
11392
|
...this.options,
|
|
11384
|
-
...
|
|
11393
|
+
...gc
|
|
11385
11394
|
};
|
|
11386
11395
|
delete n.center, this.sdk = new Po(n), this.sdk.telemetry.registerViewerType("ImageViewer");
|
|
11387
11396
|
const { imageUUID: a, debug: o } = t;
|
|
@@ -11440,7 +11449,7 @@ class yc extends (Fa = dc, $a = qo, Oa = Vo, Fa) {
|
|
|
11440
11449
|
visualizePitch: !1,
|
|
11441
11450
|
visualizeRoll: !1
|
|
11442
11451
|
})
|
|
11443
|
-
), this.fitToBoundsControlInstance = new
|
|
11452
|
+
), this.fitToBoundsControlInstance = new mc({ imageViewer: this }), this.options.fitToBoundsControl && this.sdk.addControl(this.fitToBoundsControlInstance), ic({
|
|
11444
11453
|
map: this.sdk,
|
|
11445
11454
|
viewer: this,
|
|
11446
11455
|
lngLatToPx: (u) => this.lngLatToPx(u)
|
|
@@ -11482,9 +11491,9 @@ class yc extends (Fa = dc, $a = qo, Oa = Vo, Fa) {
|
|
|
11482
11491
|
* @returns {Promise<void>}
|
|
11483
11492
|
*/
|
|
11484
11493
|
async fetchImageMetadata() {
|
|
11485
|
-
const t =
|
|
11494
|
+
const t = wc(this.imageUUID), n = await fetch(t);
|
|
11486
11495
|
if (!n.ok)
|
|
11487
|
-
throw new
|
|
11496
|
+
throw new sc(n, "image metadata", "ImageViewer");
|
|
11488
11497
|
const a = await n.json();
|
|
11489
11498
|
this.imageMetadata = a, Object.freeze(this.imageMetadata);
|
|
11490
11499
|
}
|
|
@@ -11498,7 +11507,7 @@ class yc extends (Fa = dc, $a = qo, Oa = Vo, Fa) {
|
|
|
11498
11507
|
addImageSource() {
|
|
11499
11508
|
if (!this.imageMetadata)
|
|
11500
11509
|
throw this.fire("error", new ne("error", this, null, { error: new Error("[ImageViewer]: Image metadata not found") })), new Error("[ImageViewer]: Image metadata not found");
|
|
11501
|
-
const t =
|
|
11510
|
+
const t = Sc(this.imageUUID), n = (s) => Math.pow(2, Math.ceil(Math.log(s) / Math.LN2));
|
|
11502
11511
|
this.imageSize = [this.imageMetadata.width, this.imageMetadata.height], this.paddedSizeMax = Math.max(n(this.imageSize[0]), n(this.imageSize[1]));
|
|
11503
11512
|
const a = this.pxToLngLat([0, 0]), o = this.pxToLngLat(this.imageSize), i = [a.lng, o.lat, o.lng, a.lat];
|
|
11504
11513
|
this.sdk.addSource("image", {
|
|
@@ -11822,7 +11831,7 @@ class yc extends (Fa = dc, $a = qo, Oa = Vo, Fa) {
|
|
|
11822
11831
|
* @returns {[[number, number], [number, number]]} The visible bounds of the image.
|
|
11823
11832
|
*/
|
|
11824
11833
|
getImageBounds() {
|
|
11825
|
-
const n = this.sdk.getBounds().toArray().map((i) => this.lngLatToPx(
|
|
11834
|
+
const n = this.sdk.getBounds().toArray().map((i) => this.lngLatToPx(ii.convert(i))), a = [n[0][0], n[1][1]], o = [n[1][0], n[0][1]];
|
|
11826
11835
|
return [a, o];
|
|
11827
11836
|
}
|
|
11828
11837
|
//#region fitImageBounds
|
|
@@ -11833,7 +11842,7 @@ class yc extends (Fa = dc, $a = qo, Oa = Vo, Fa) {
|
|
|
11833
11842
|
* @returns {ImageViewer} The ImageViewer instance.
|
|
11834
11843
|
*/
|
|
11835
11844
|
fitImageBounds([t, n]) {
|
|
11836
|
-
const a = this.pxToLngLat(t), o = this.pxToLngLat(n), i =
|
|
11845
|
+
const a = this.pxToLngLat(t), o = this.pxToLngLat(n), i = qc.convert([a, o]);
|
|
11837
11846
|
return this.sdk.fitBounds(i), this;
|
|
11838
11847
|
}
|
|
11839
11848
|
//#region remove
|
|
@@ -11864,23 +11873,23 @@ class yc extends (Fa = dc, $a = qo, Oa = Vo, Fa) {
|
|
|
11864
11873
|
return t[0] >= a[0][0] && t[0] <= a[1][0] && t[1] >= a[0][1] && t[1] <= a[1][1];
|
|
11865
11874
|
}
|
|
11866
11875
|
}
|
|
11867
|
-
function
|
|
11876
|
+
function wc(r) {
|
|
11868
11877
|
return `${Go()}/${r}/image.json?key=${j.apiKey}`;
|
|
11869
11878
|
}
|
|
11870
|
-
function
|
|
11879
|
+
function Sc(r) {
|
|
11871
11880
|
return `${Go()}/${r}/{z}/{x}/{y}?key=${j.apiKey}`;
|
|
11872
11881
|
}
|
|
11873
11882
|
function Go() {
|
|
11874
11883
|
return "https://api.maptiler.com/images";
|
|
11875
11884
|
}
|
|
11876
|
-
const { Evented:
|
|
11877
|
-
class
|
|
11885
|
+
const { Evented: xc } = L;
|
|
11886
|
+
class gp extends xc {
|
|
11878
11887
|
constructor({ ...t }) {
|
|
11879
11888
|
super();
|
|
11880
11889
|
g(this, "viewer");
|
|
11881
11890
|
g(this, "marker");
|
|
11882
11891
|
g(this, "position", [0, 0]);
|
|
11883
|
-
this.marker = new
|
|
11892
|
+
this.marker = new Ci(t);
|
|
11884
11893
|
}
|
|
11885
11894
|
/**
|
|
11886
11895
|
* Adds the ImageViewerMarker to an instance of ImageViewer.
|
|
@@ -11889,11 +11898,11 @@ class mp extends bc {
|
|
|
11889
11898
|
* @returns {ImageViewerMarker} The ImageViewerMarker instance.
|
|
11890
11899
|
*/
|
|
11891
11900
|
addTo(t) {
|
|
11892
|
-
if (!(t instanceof
|
|
11901
|
+
if (!(t instanceof bc))
|
|
11893
11902
|
throw new Error("[ImageViewerMarker]: an ImageViewerMarker must be added to an instance of ImageViewer");
|
|
11894
|
-
this.viewer = t,
|
|
11903
|
+
this.viewer = t, Ec(this.marker, this, this.viewer[qo]);
|
|
11895
11904
|
const n = this.viewer.getSDKInternal();
|
|
11896
|
-
return this.setPosition(this.position),
|
|
11905
|
+
return this.setPosition(this.position), hc(this.marker), this.marker.addTo(n), this;
|
|
11897
11906
|
}
|
|
11898
11907
|
/**
|
|
11899
11908
|
* Adds a class name to the ImageViewerMarker.
|
|
@@ -12143,16 +12152,16 @@ class mp extends bc {
|
|
|
12143
12152
|
return this.marker.togglePopup(), this;
|
|
12144
12153
|
}
|
|
12145
12154
|
}
|
|
12146
|
-
const
|
|
12147
|
-
class
|
|
12155
|
+
const kc = ["dragstart", "drag", "dragend"], Lc = ["lngLat", "_defaultPrevented", "target"];
|
|
12156
|
+
class Cc {
|
|
12148
12157
|
constructor(e, t, n) {
|
|
12149
12158
|
g(this, "type");
|
|
12150
12159
|
g(this, "target");
|
|
12151
12160
|
this.type = e, this.target = t, Object.assign(this, n);
|
|
12152
12161
|
}
|
|
12153
12162
|
}
|
|
12154
|
-
function
|
|
12155
|
-
|
|
12163
|
+
function Ec(r, e, t) {
|
|
12164
|
+
kc.forEach((n) => {
|
|
12156
12165
|
r.on(n, (a) => {
|
|
12157
12166
|
var i, s;
|
|
12158
12167
|
if ((i = a.target) == null ? void 0 : i.getLngLat()) {
|
|
@@ -12161,8 +12170,8 @@ function kc(r, e, t) {
|
|
|
12161
12170
|
}
|
|
12162
12171
|
e.fire(
|
|
12163
12172
|
n,
|
|
12164
|
-
new
|
|
12165
|
-
...Object.fromEntries(Object.entries(a).filter(([l]) => !
|
|
12173
|
+
new Cc(n, e, {
|
|
12174
|
+
...Object.fromEntries(Object.entries(a).filter(([l]) => !Lc.includes(l)))
|
|
12166
12175
|
})
|
|
12167
12176
|
);
|
|
12168
12177
|
});
|
|
@@ -12201,15 +12210,15 @@ function Zo(r) {
|
|
|
12201
12210
|
features: []
|
|
12202
12211
|
};
|
|
12203
12212
|
for (const i of Array.from(t)) {
|
|
12204
|
-
const s =
|
|
12213
|
+
const s = Ic(i);
|
|
12205
12214
|
s && o.features.push(s);
|
|
12206
12215
|
}
|
|
12207
12216
|
for (const i of Array.from(n)) {
|
|
12208
|
-
const s =
|
|
12217
|
+
const s = Mc(i);
|
|
12209
12218
|
s && o.features.push(s);
|
|
12210
12219
|
}
|
|
12211
12220
|
for (const i of Array.from(a))
|
|
12212
|
-
o.features.push(
|
|
12221
|
+
o.features.push(Pc(i));
|
|
12213
12222
|
return o;
|
|
12214
12223
|
}
|
|
12215
12224
|
function Ko(r, e) {
|
|
@@ -12228,11 +12237,11 @@ function Ko(r, e) {
|
|
|
12228
12237
|
a[`#${He(c, "id")}`] = Pa(e !== void 0 ? e(c) : Ia(c)).toString(16);
|
|
12229
12238
|
const p = K(c, "Pair"), d = {};
|
|
12230
12239
|
for (const f of Array.from(p))
|
|
12231
|
-
d[
|
|
12240
|
+
d[F(_(f, "key")) ?? ""] = F(_(f, "styleUrl"));
|
|
12232
12241
|
i[`#${He(c, "id")}`] = d;
|
|
12233
12242
|
}
|
|
12234
12243
|
for (const c of Array.from(s))
|
|
12235
|
-
n.features = n.features.concat(
|
|
12244
|
+
n.features = n.features.concat(_c(c, a, o, i));
|
|
12236
12245
|
return n;
|
|
12237
12246
|
}
|
|
12238
12247
|
function Ma(r) {
|
|
@@ -12240,17 +12249,17 @@ function Ma(r) {
|
|
|
12240
12249
|
let e = "", t = 1, n = r;
|
|
12241
12250
|
return n.startsWith("#") && (n = n.substring(1)), (n.length === 6 || n.length === 3) && (e = n), n.length === 8 && (t = Number.parseInt(n.substring(0, 2), 16) / 255, e = `#${n.substring(6, 8)}${n.substring(4, 6)}${n.substring(2, 4)}`), [e ?? "#000000", t ?? 1];
|
|
12242
12251
|
}
|
|
12243
|
-
function
|
|
12252
|
+
function Ac(r) {
|
|
12244
12253
|
return Wo(r.split(" "));
|
|
12245
12254
|
}
|
|
12246
|
-
function
|
|
12255
|
+
function Tc(r) {
|
|
12247
12256
|
let e = K(r, "coord");
|
|
12248
12257
|
const t = [], n = [];
|
|
12249
12258
|
e.length === 0 && (e = K(r, "gx:coord"));
|
|
12250
12259
|
for (const o of Array.from(e))
|
|
12251
|
-
t.push(
|
|
12260
|
+
t.push(Ac(F(o) ?? ""));
|
|
12252
12261
|
const a = K(r, "when");
|
|
12253
|
-
for (const o of Array.from(a)) n.push(
|
|
12262
|
+
for (const o of Array.from(a)) n.push(F(o));
|
|
12254
12263
|
return {
|
|
12255
12264
|
coords: t,
|
|
12256
12265
|
times: n
|
|
@@ -12272,23 +12281,23 @@ function Bt(r) {
|
|
|
12272
12281
|
if (t = n[o], e[a] === "Point")
|
|
12273
12282
|
s.push({
|
|
12274
12283
|
type: "Point",
|
|
12275
|
-
coordinates: Jo(
|
|
12284
|
+
coordinates: Jo(F(_(t, "coordinates")) ?? "")
|
|
12276
12285
|
});
|
|
12277
12286
|
else if (e[a] === "LineString")
|
|
12278
12287
|
s.push({
|
|
12279
12288
|
type: "LineString",
|
|
12280
|
-
coordinates: za(
|
|
12289
|
+
coordinates: za(F(_(t, "coordinates")) ?? "")
|
|
12281
12290
|
});
|
|
12282
12291
|
else if (e[a] === "Polygon") {
|
|
12283
12292
|
const u = K(t, "LinearRing"), c = [];
|
|
12284
12293
|
for (i = 0; i < u.length; i++)
|
|
12285
|
-
c.push(za(
|
|
12294
|
+
c.push(za(F(_(u[i], "coordinates")) ?? ""));
|
|
12286
12295
|
s.push({
|
|
12287
12296
|
type: "Polygon",
|
|
12288
12297
|
coordinates: c
|
|
12289
12298
|
});
|
|
12290
12299
|
} else if (e[a] === "Track" || e[a] === "gx:Track") {
|
|
12291
|
-
const u =
|
|
12300
|
+
const u = Tc(t);
|
|
12292
12301
|
s.push({
|
|
12293
12302
|
type: "LineString",
|
|
12294
12303
|
coordinates: u.coords
|
|
@@ -12297,9 +12306,9 @@ function Bt(r) {
|
|
|
12297
12306
|
}
|
|
12298
12307
|
return { geoms: s, coordTimes: l };
|
|
12299
12308
|
}
|
|
12300
|
-
function
|
|
12301
|
-
const a = Bt(r), o = {}, i =
|
|
12302
|
-
let f, h =
|
|
12309
|
+
function _c(r, e, t, n) {
|
|
12310
|
+
const a = Bt(r), o = {}, i = F(_(r, "name")), s = F(_(r, "address")), l = F(_(r, "description")), u = _(r, "TimeSpan"), c = _(r, "TimeStamp"), p = _(r, "ExtendedData"), d = _(r, "visibility");
|
|
12311
|
+
let f, h = F(_(r, "styleUrl")), m = _(r, "LineStyle"), y = _(r, "PolyStyle");
|
|
12303
12312
|
if (!a.geoms.length) return [];
|
|
12304
12313
|
if (i && (o.name = i), s && (o.address = s), h) {
|
|
12305
12314
|
h.startsWith("#") || (h = `#${h}`), o.styleUrl = h, e[h] && (o.styleHash = e[h]), n[h] && (o.styleMapHash = n[h], o.styleHash = e[n[h].normal ?? ""]);
|
|
@@ -12310,32 +12319,32 @@ function Ec(r, e, t, n) {
|
|
|
12310
12319
|
if (x) {
|
|
12311
12320
|
const E = _(x, "Icon");
|
|
12312
12321
|
if (E) {
|
|
12313
|
-
const C =
|
|
12322
|
+
const C = F(_(E, "href"));
|
|
12314
12323
|
C && (o.icon = C);
|
|
12315
12324
|
}
|
|
12316
12325
|
}
|
|
12317
12326
|
}
|
|
12318
12327
|
}
|
|
12319
12328
|
if (l && (o.description = l), u) {
|
|
12320
|
-
const v =
|
|
12329
|
+
const v = F(_(u, "begin")), x = F(_(u, "end"));
|
|
12321
12330
|
v && x && (o.timespan = { begin: v, end: x });
|
|
12322
12331
|
}
|
|
12323
|
-
if (c !== null && (o.timestamp =
|
|
12324
|
-
const v = Ma(
|
|
12332
|
+
if (c !== null && (o.timestamp = F(_(c, "when")) ?? (/* @__PURE__ */ new Date()).toISOString()), m !== null) {
|
|
12333
|
+
const v = Ma(F(_(m, "color"))), x = v[0], E = v[1], C = Number.parseFloat(F(_(m, "width")) ?? "");
|
|
12325
12334
|
x && (o.stroke = x), Number.isNaN(E) || (o["stroke-opacity"] = E), Number.isNaN(C) || (o["stroke-width"] = C);
|
|
12326
12335
|
}
|
|
12327
12336
|
if (y) {
|
|
12328
|
-
const v = Ma(
|
|
12337
|
+
const v = Ma(F(_(y, "color"))), x = v[0], E = v[1], C = F(_(y, "fill")), T = F(_(y, "outline"));
|
|
12329
12338
|
x && (o.fill = x), Number.isNaN(E) || (o["fill-opacity"] = E), C && (o["fill-opacity"] = C === "1" ? o["fill-opacity"] || 1 : 0), T && (o["stroke-opacity"] = T === "1" ? o["stroke-opacity"] || 1 : 0);
|
|
12330
12339
|
}
|
|
12331
12340
|
if (p) {
|
|
12332
12341
|
const v = K(p, "Data"), x = K(p, "SimpleData");
|
|
12333
12342
|
for (f = 0; f < v.length; f++)
|
|
12334
|
-
o[v[f].getAttribute("name") ?? ""] =
|
|
12343
|
+
o[v[f].getAttribute("name") ?? ""] = F(_(v[f], "value")) ?? "";
|
|
12335
12344
|
for (f = 0; f < x.length; f++)
|
|
12336
|
-
o[x[f].getAttribute("name") ?? ""] =
|
|
12345
|
+
o[x[f].getAttribute("name") ?? ""] = F(x[f]) ?? "";
|
|
12337
12346
|
}
|
|
12338
|
-
d !== null && (o.visibility =
|
|
12347
|
+
d !== null && (o.visibility = F(d) ?? ""), a.coordTimes.length !== 0 && (o.coordTimes = a.coordTimes.length === 1 ? a.coordTimes[0] : a.coordTimes);
|
|
12339
12348
|
const b = {
|
|
12340
12349
|
type: "Feature",
|
|
12341
12350
|
geometry: a.geoms.length === 1 ? a.geoms[0] : {
|
|
@@ -12362,7 +12371,7 @@ function Xo(r, e) {
|
|
|
12362
12371
|
};
|
|
12363
12372
|
}
|
|
12364
12373
|
}
|
|
12365
|
-
function
|
|
12374
|
+
function Ic(r) {
|
|
12366
12375
|
const e = K(r, "trkseg"), t = [], n = [], a = [];
|
|
12367
12376
|
let o;
|
|
12368
12377
|
for (let s = 0; s < e.length; s++)
|
|
@@ -12393,7 +12402,7 @@ function Ac(r) {
|
|
|
12393
12402
|
}
|
|
12394
12403
|
};
|
|
12395
12404
|
}
|
|
12396
|
-
function
|
|
12405
|
+
function Mc(r) {
|
|
12397
12406
|
const e = Xo(r, "rtept");
|
|
12398
12407
|
return e === void 0 ? void 0 : {
|
|
12399
12408
|
type: "Feature",
|
|
@@ -12407,7 +12416,7 @@ function Tc(r) {
|
|
|
12407
12416
|
}
|
|
12408
12417
|
};
|
|
12409
12418
|
}
|
|
12410
|
-
function
|
|
12419
|
+
function Pc(r) {
|
|
12411
12420
|
return {
|
|
12412
12421
|
type: "Feature",
|
|
12413
12422
|
properties: { ...In(r), ...Jr(r, ["sym"]) },
|
|
@@ -12422,7 +12431,7 @@ function Yo(r) {
|
|
|
12422
12431
|
if (r) {
|
|
12423
12432
|
const t = _(r, "line");
|
|
12424
12433
|
if (t) {
|
|
12425
|
-
const n =
|
|
12434
|
+
const n = F(_(t, "color")), a = Number.parseFloat(F(_(t, "opacity")) ?? "0"), o = Number.parseFloat(F(_(t, "width")) ?? "0");
|
|
12426
12435
|
n && (e.stroke = n), Number.isNaN(a) || (e["stroke-opacity"] = a), Number.isNaN(o) || (e["stroke-width"] = o * 96 / 25.4);
|
|
12427
12436
|
}
|
|
12428
12437
|
}
|
|
@@ -12462,20 +12471,20 @@ function _(r, e) {
|
|
|
12462
12471
|
const t = K(r, e);
|
|
12463
12472
|
return t.length ? t[0] : null;
|
|
12464
12473
|
}
|
|
12465
|
-
function
|
|
12474
|
+
function Rc(r) {
|
|
12466
12475
|
return r.normalize && r.normalize(), r;
|
|
12467
12476
|
}
|
|
12468
12477
|
function Wo(r) {
|
|
12469
12478
|
return r.map(Number.parseFloat).map((e) => Number.isNaN(e) ? null : e);
|
|
12470
12479
|
}
|
|
12471
|
-
function
|
|
12472
|
-
return r &&
|
|
12480
|
+
function F(r) {
|
|
12481
|
+
return r && Rc(r), r && r.textContent;
|
|
12473
12482
|
}
|
|
12474
12483
|
function Jr(r, e) {
|
|
12475
12484
|
const t = {};
|
|
12476
12485
|
let n, a;
|
|
12477
12486
|
for (a = 0; a < e.length; a++)
|
|
12478
|
-
n = _(r, e[a]), n && (t[e[a]] =
|
|
12487
|
+
n = _(r, e[a]), n && (t[e[a]] = F(n) ?? "");
|
|
12479
12488
|
return t;
|
|
12480
12489
|
}
|
|
12481
12490
|
function Jo(r) {
|
|
@@ -12489,13 +12498,13 @@ function za(r) {
|
|
|
12489
12498
|
function Qo(r) {
|
|
12490
12499
|
const e = [Ra(r, "lon"), Ra(r, "lat")], t = _(r, "ele"), n = _(r, "gpxtpx:hr") || _(r, "hr"), a = _(r, "time");
|
|
12491
12500
|
let o;
|
|
12492
|
-
return t && (o = Number.parseFloat(
|
|
12501
|
+
return t && (o = Number.parseFloat(F(t) ?? "0"), Number.isNaN(o) || e.push(o)), {
|
|
12493
12502
|
coordinates: e,
|
|
12494
|
-
time: a ?
|
|
12495
|
-
heartRate: n !== null ? Number.parseFloat(
|
|
12503
|
+
time: a ? F(a) : null,
|
|
12504
|
+
heartRate: n !== null ? Number.parseFloat(F(n) ?? "0") : null
|
|
12496
12505
|
};
|
|
12497
12506
|
}
|
|
12498
|
-
function
|
|
12507
|
+
function zc(r) {
|
|
12499
12508
|
let e = r;
|
|
12500
12509
|
try {
|
|
12501
12510
|
typeof e == "string" && (e = _n(e));
|
|
@@ -12512,8 +12521,8 @@ function Mc(r) {
|
|
|
12512
12521
|
}
|
|
12513
12522
|
return null;
|
|
12514
12523
|
}
|
|
12515
|
-
async function
|
|
12516
|
-
const t = e.download ?? !1, n = await
|
|
12524
|
+
async function Oc(r, e = {}) {
|
|
12525
|
+
const t = e.download ?? !1, n = await Fc(r);
|
|
12517
12526
|
if (t) {
|
|
12518
12527
|
const a = e.filename ?? "maptiler_screenshot.png", o = document.createElement("a");
|
|
12519
12528
|
o.style.display = "none", document.body.appendChild(o), o.href = URL.createObjectURL(n), o.download = a, o.click(), setTimeout(() => {
|
|
@@ -12522,7 +12531,7 @@ async function Pc(r, e = {}) {
|
|
|
12522
12531
|
}
|
|
12523
12532
|
return n;
|
|
12524
12533
|
}
|
|
12525
|
-
function
|
|
12534
|
+
function Fc(r) {
|
|
12526
12535
|
return new Promise((e, t) => {
|
|
12527
12536
|
r.redraw(), r.once("idle", () => {
|
|
12528
12537
|
r.getCanvas().toBlob((n) => {
|
|
@@ -12558,10 +12567,10 @@ const Qr = [
|
|
|
12558
12567
|
function yr() {
|
|
12559
12568
|
return Qr[~~(Math.random() * Qr.length)][~~(Math.random() * 4)];
|
|
12560
12569
|
}
|
|
12561
|
-
function
|
|
12570
|
+
function Mt() {
|
|
12562
12571
|
return `maptiler_source_${Da()}`;
|
|
12563
12572
|
}
|
|
12564
|
-
function
|
|
12573
|
+
function Pt() {
|
|
12565
12574
|
return `maptiler_layer_${Da()}`;
|
|
12566
12575
|
}
|
|
12567
12576
|
function en(r, e) {
|
|
@@ -12674,7 +12683,7 @@ function Nt(r) {
|
|
|
12674
12683
|
const e = r.toString(16);
|
|
12675
12684
|
return e.length === 1 ? `0${e}` : e;
|
|
12676
12685
|
}
|
|
12677
|
-
function
|
|
12686
|
+
function $c(r) {
|
|
12678
12687
|
return `#${Nt(r[0])}${Nt(r[1])}${Nt(r[2])}${r.length === 4 ? Nt(r[3]) : ""}`;
|
|
12679
12688
|
}
|
|
12680
12689
|
class A extends Array {
|
|
@@ -12768,7 +12777,7 @@ class A extends Array {
|
|
|
12768
12777
|
smooth: !0,
|
|
12769
12778
|
withAlpha: !1
|
|
12770
12779
|
}) {
|
|
12771
|
-
return
|
|
12780
|
+
return $c(this.getColor(t, n));
|
|
12772
12781
|
}
|
|
12773
12782
|
/**
|
|
12774
12783
|
* Get the color of the color ramp at a relative position in [0, 1]
|
|
@@ -13611,7 +13620,7 @@ const ai = {
|
|
|
13611
13620
|
]
|
|
13612
13621
|
})
|
|
13613
13622
|
};
|
|
13614
|
-
async function
|
|
13623
|
+
async function Nc(r, e, t = {}) {
|
|
13615
13624
|
var a, o;
|
|
13616
13625
|
if (!e.sourceId && !e.data)
|
|
13617
13626
|
throw new Error("Creating a polyline layer requires an existing .sourceId or a valid .data property");
|
|
@@ -13626,21 +13635,21 @@ async function Oc(r, e, t = {}) {
|
|
|
13626
13635
|
const s = await (await fetch(n, t)).text();
|
|
13627
13636
|
n = Ko(s);
|
|
13628
13637
|
} else {
|
|
13629
|
-
const i =
|
|
13638
|
+
const i = Ni(n) ?? zc(n);
|
|
13630
13639
|
i && (n = i);
|
|
13631
13640
|
}
|
|
13632
13641
|
if (!n)
|
|
13633
13642
|
throw new Error("Polyline data was provided as string but is incompatible with valid formats.");
|
|
13634
13643
|
}
|
|
13635
|
-
return
|
|
13644
|
+
return jc(r, {
|
|
13636
13645
|
...e,
|
|
13637
13646
|
data: n
|
|
13638
13647
|
});
|
|
13639
13648
|
}
|
|
13640
|
-
function
|
|
13649
|
+
function jc(r, e) {
|
|
13641
13650
|
if (e.layerId && r.getLayer(e.layerId))
|
|
13642
13651
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
13643
|
-
const t = e.sourceId ??
|
|
13652
|
+
const t = e.sourceId ?? Mt(), n = e.layerId ?? Pt(), a = {
|
|
13644
13653
|
polylineLayerId: n,
|
|
13645
13654
|
polylineOutlineLayerId: "",
|
|
13646
13655
|
polylineSourceId: t
|
|
@@ -13703,10 +13712,10 @@ function $c(r, e) {
|
|
|
13703
13712
|
e.beforeId
|
|
13704
13713
|
), a;
|
|
13705
13714
|
}
|
|
13706
|
-
function
|
|
13715
|
+
function Dc(r, e) {
|
|
13707
13716
|
if (e.layerId && r.getLayer(e.layerId))
|
|
13708
13717
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
13709
|
-
const t = e.sourceId ??
|
|
13718
|
+
const t = e.sourceId ?? Mt(), n = e.layerId ?? Pt(), a = {
|
|
13710
13719
|
polygonLayerId: n,
|
|
13711
13720
|
polygonOutlineLayerId: e.outline ? `${n}_outline` : "",
|
|
13712
13721
|
polygonSourceId: t
|
|
@@ -13786,10 +13795,10 @@ function Fc(r, e) {
|
|
|
13786
13795
|
console.error("Could not load the pattern image.", m.message), h();
|
|
13787
13796
|
}) : h(), a;
|
|
13788
13797
|
}
|
|
13789
|
-
function
|
|
13798
|
+
function Uc(r, e) {
|
|
13790
13799
|
if (e.layerId && r.getLayer(e.layerId))
|
|
13791
13800
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
13792
|
-
const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : ai.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ??
|
|
13801
|
+
const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : ai.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ?? Mt(), u = e.layerId ?? Pt(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, d = e.outline ?? !1, f = e.outlineOpacity ?? 1, h = e.outlineWidth ?? 1, m = e.outlineColor ?? "#FFFFFF";
|
|
13793
13802
|
let y;
|
|
13794
13803
|
const b = e.zoomCompensation ?? !0, v = e.minzoom ?? 0, x = e.maxzoom ?? 23;
|
|
13795
13804
|
typeof e.pointOpacity == "number" ? y = e.pointOpacity : Array.isArray(e.pointOpacity) ? y = O(e.pointOpacity) : e.cluster ? y = nn(i, "point_count") : e.property ? y = nn(i, e.property) : y = O([
|
|
@@ -13953,10 +13962,10 @@ function Nc(r, e) {
|
|
|
13953
13962
|
}
|
|
13954
13963
|
return E;
|
|
13955
13964
|
}
|
|
13956
|
-
function
|
|
13965
|
+
function Bc(r, e) {
|
|
13957
13966
|
if (e.layerId && r.getLayer(e.layerId))
|
|
13958
13967
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
13959
|
-
const t = e.sourceId ??
|
|
13968
|
+
const t = e.sourceId ?? Mt(), n = e.layerId ?? Pt(), a = e.minzoom ?? 0, o = e.maxzoom ?? 23, i = e.zoomCompensation ?? !0, s = e.opacity ?? [
|
|
13960
13969
|
{ zoom: a, value: 0 },
|
|
13961
13970
|
{ zoom: a + 0.25, value: 1 },
|
|
13962
13971
|
{ zoom: o - 0.25, value: 1 },
|
|
@@ -14010,18 +14019,18 @@ function jc(r, e) {
|
|
|
14010
14019
|
e.beforeId
|
|
14011
14020
|
), b;
|
|
14012
14021
|
}
|
|
14013
|
-
const
|
|
14022
|
+
const vp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14014
14023
|
__proto__: null,
|
|
14015
|
-
addHeatmap:
|
|
14016
|
-
addPoint:
|
|
14017
|
-
addPolygon:
|
|
14018
|
-
addPolyline:
|
|
14024
|
+
addHeatmap: Bc,
|
|
14025
|
+
addPoint: Uc,
|
|
14026
|
+
addPolygon: Dc,
|
|
14027
|
+
addPolyline: Nc,
|
|
14019
14028
|
colorDrivenByProperty: tn,
|
|
14020
14029
|
colorPalettes: Qr,
|
|
14021
14030
|
computeRampedOutlineWidth: ei,
|
|
14022
14031
|
dashArrayMaker: Mn,
|
|
14023
|
-
generateRandomLayerName:
|
|
14024
|
-
generateRandomSourceName:
|
|
14032
|
+
generateRandomLayerName: Pt,
|
|
14033
|
+
generateRandomSourceName: Mt,
|
|
14025
14034
|
getRandomColor: yr,
|
|
14026
14035
|
heatmapIntensityFromColorRamp: ni,
|
|
14027
14036
|
lerpZoomNumberValues: en,
|
|
@@ -14031,185 +14040,185 @@ const yp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14031
14040
|
radiusDrivenByPropertyHeatmap: ri,
|
|
14032
14041
|
rampedOptionsToLayerPaintSpec: O,
|
|
14033
14042
|
rampedPropertyValueWeight: ti,
|
|
14034
|
-
takeScreenshot:
|
|
14043
|
+
takeScreenshot: Oc
|
|
14035
14044
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
14036
|
-
function
|
|
14037
|
-
return "3.10.0-rc.
|
|
14038
|
-
}
|
|
14039
|
-
const
|
|
14040
|
-
setRTLTextPlugin:
|
|
14041
|
-
getRTLTextPluginStatus:
|
|
14042
|
-
LngLat:
|
|
14043
|
-
LngLatBounds:
|
|
14045
|
+
function oi() {
|
|
14046
|
+
return "3.10.0-rc.2";
|
|
14047
|
+
}
|
|
14048
|
+
const bp = L.Map, wp = L.Marker, Sp = L.Popup, xp = L.Style, kp = L.CanvasSource, Lp = L.GeoJSONSource, Cp = L.ImageSource, Ep = L.RasterTileSource, Ap = L.RasterDEMTileSource, Tp = L.VectorTileSource, _p = L.VideoSource, Ip = L.NavigationControl, Mp = L.GeolocateControl, Pp = L.AttributionControl, Rp = L.LogoControl, zp = L.ScaleControl, Op = L.FullscreenControl, Fp = L.TerrainControl, $p = L.BoxZoomHandler, Np = L.ScrollZoomHandler, jp = L.CooperativeGesturesHandler, Dp = L.KeyboardHandler, Up = L.TwoFingersTouchPitchHandler, Bp = L.MapWheelEvent, qp = L.MapTouchEvent, Vp = L.MapMouseEvent, Gp = L.config, Hp = L.getVersion, {
|
|
14049
|
+
setRTLTextPlugin: Zp,
|
|
14050
|
+
getRTLTextPluginStatus: Kp,
|
|
14051
|
+
LngLat: ii,
|
|
14052
|
+
LngLatBounds: qc,
|
|
14044
14053
|
MercatorCoordinate: an,
|
|
14045
|
-
Evented:
|
|
14046
|
-
AJAXError:
|
|
14047
|
-
prewarm:
|
|
14048
|
-
clearPrewarmedResources:
|
|
14049
|
-
Hash:
|
|
14050
|
-
Point:
|
|
14051
|
-
EdgeInsets:
|
|
14052
|
-
DragRotateHandler:
|
|
14053
|
-
DragPanHandler:
|
|
14054
|
-
TwoFingersTouchZoomRotateHandler:
|
|
14055
|
-
DoubleClickZoomHandler:
|
|
14056
|
-
TwoFingersTouchZoomHandler:
|
|
14057
|
-
TwoFingersTouchRotateHandler:
|
|
14058
|
-
getWorkerCount:
|
|
14059
|
-
setWorkerCount:
|
|
14060
|
-
getMaxParallelImageRequests:
|
|
14061
|
-
setMaxParallelImageRequests:
|
|
14062
|
-
getWorkerUrl:
|
|
14063
|
-
setWorkerUrl:
|
|
14064
|
-
addSourceType:
|
|
14065
|
-
importScriptInWorkers:
|
|
14066
|
-
addProtocol:
|
|
14067
|
-
removeProtocol:
|
|
14054
|
+
Evented: Xp,
|
|
14055
|
+
AJAXError: Yp,
|
|
14056
|
+
prewarm: Wp,
|
|
14057
|
+
clearPrewarmedResources: Jp,
|
|
14058
|
+
Hash: Qp,
|
|
14059
|
+
Point: si,
|
|
14060
|
+
EdgeInsets: ef,
|
|
14061
|
+
DragRotateHandler: tf,
|
|
14062
|
+
DragPanHandler: rf,
|
|
14063
|
+
TwoFingersTouchZoomRotateHandler: nf,
|
|
14064
|
+
DoubleClickZoomHandler: af,
|
|
14065
|
+
TwoFingersTouchZoomHandler: of,
|
|
14066
|
+
TwoFingersTouchRotateHandler: sf,
|
|
14067
|
+
getWorkerCount: lf,
|
|
14068
|
+
setWorkerCount: uf,
|
|
14069
|
+
getMaxParallelImageRequests: cf,
|
|
14070
|
+
setMaxParallelImageRequests: pf,
|
|
14071
|
+
getWorkerUrl: ff,
|
|
14072
|
+
setWorkerUrl: df,
|
|
14073
|
+
addSourceType: hf,
|
|
14074
|
+
importScriptInWorkers: mf,
|
|
14075
|
+
addProtocol: yf,
|
|
14076
|
+
removeProtocol: gf
|
|
14068
14077
|
} = L;
|
|
14069
14078
|
export {
|
|
14070
|
-
|
|
14071
|
-
|
|
14072
|
-
|
|
14073
|
-
|
|
14074
|
-
|
|
14075
|
-
|
|
14076
|
-
|
|
14079
|
+
Yp as AJAXError,
|
|
14080
|
+
ip as AttributionControl,
|
|
14081
|
+
Pp as AttributionControlMLGL,
|
|
14082
|
+
lp as BoxZoomHandler,
|
|
14083
|
+
$p as BoxZoomHandlerMLGL,
|
|
14084
|
+
Qc as CanvasSource,
|
|
14085
|
+
kp as CanvasSourceMLGL,
|
|
14077
14086
|
A as ColorRamp,
|
|
14078
14087
|
ai as ColorRampCollection,
|
|
14079
|
-
|
|
14080
|
-
|
|
14088
|
+
cp as CooperativeGesturesHandler,
|
|
14089
|
+
jp as CooperativeGesturesHandlerMLGL,
|
|
14081
14090
|
Ne as CubemapFaceNames,
|
|
14082
|
-
|
|
14091
|
+
Uu as CubemapImagesPresets,
|
|
14083
14092
|
Or as CubemapLayer,
|
|
14084
14093
|
Ce as DOMcreate,
|
|
14085
|
-
|
|
14086
|
-
|
|
14087
|
-
|
|
14088
|
-
|
|
14089
|
-
|
|
14090
|
-
|
|
14091
|
-
|
|
14092
|
-
|
|
14093
|
-
|
|
14094
|
-
|
|
14095
|
-
|
|
14096
|
-
|
|
14097
|
-
|
|
14098
|
-
|
|
14099
|
-
|
|
14100
|
-
|
|
14101
|
-
|
|
14094
|
+
Lt as DOMremove,
|
|
14095
|
+
af as DoubleClickZoomHandler,
|
|
14096
|
+
rf as DragPanHandler,
|
|
14097
|
+
tf as DragRotateHandler,
|
|
14098
|
+
ef as EdgeInsets,
|
|
14099
|
+
Xp as Evented,
|
|
14100
|
+
_i as FullscreenControl,
|
|
14101
|
+
Op as FullscreenControlMLGL,
|
|
14102
|
+
ep as GeoJSONSource,
|
|
14103
|
+
Lp as GeoJSONSourceMLGL,
|
|
14104
|
+
Ei as GeolocateControl,
|
|
14105
|
+
Mp as GeolocateControlMLGL,
|
|
14106
|
+
nc as GeolocationType,
|
|
14107
|
+
Qp as Hash,
|
|
14108
|
+
tp as ImageSource,
|
|
14109
|
+
Cp as ImageSourceMLGL,
|
|
14110
|
+
bc as ImageViewer,
|
|
14102
14111
|
ne as ImageViewerEvent,
|
|
14103
|
-
|
|
14104
|
-
|
|
14105
|
-
|
|
14106
|
-
|
|
14112
|
+
gp as ImageViewerMarker,
|
|
14113
|
+
Cc as ImageViewerMarkerEvent,
|
|
14114
|
+
pp as KeyboardHandler,
|
|
14115
|
+
Dp as KeyboardHandlerMLGL,
|
|
14107
14116
|
z as Language,
|
|
14108
|
-
|
|
14109
|
-
|
|
14110
|
-
|
|
14111
|
-
|
|
14117
|
+
ii as LngLat,
|
|
14118
|
+
qc as LngLatBounds,
|
|
14119
|
+
Ai as LogoControl,
|
|
14120
|
+
Rp as LogoControlMLGL,
|
|
14112
14121
|
Po as Map,
|
|
14113
|
-
|
|
14114
|
-
|
|
14115
|
-
|
|
14116
|
-
|
|
14117
|
-
|
|
14118
|
-
|
|
14119
|
-
|
|
14120
|
-
|
|
14121
|
-
|
|
14122
|
-
|
|
14122
|
+
bp as MapMLGL,
|
|
14123
|
+
mp as MapMouseEvent,
|
|
14124
|
+
Vp as MapMouseEventMLGL,
|
|
14125
|
+
wf as MapStyle,
|
|
14126
|
+
Sf as MapStyleVariant,
|
|
14127
|
+
hp as MapTouchEvent,
|
|
14128
|
+
qp as MapTouchEventMLGL,
|
|
14129
|
+
dp as MapWheelEvent,
|
|
14130
|
+
Bp as MapWheelEventMLGL,
|
|
14131
|
+
du as MaptilerCustomControl,
|
|
14123
14132
|
Kr as MaptilerExternalControl,
|
|
14124
|
-
|
|
14125
|
-
|
|
14126
|
-
|
|
14127
|
-
|
|
14128
|
-
|
|
14129
|
-
|
|
14130
|
-
|
|
14133
|
+
fu as MaptilerGeolocateControl,
|
|
14134
|
+
$n as MaptilerLogoControl,
|
|
14135
|
+
cu as MaptilerNavigationControl,
|
|
14136
|
+
hu as MaptilerProjectionControl,
|
|
14137
|
+
uu as MaptilerTerrainControl,
|
|
14138
|
+
Ci as Marker,
|
|
14139
|
+
wp as MarkerMLGL,
|
|
14131
14140
|
an as MercatorCoordinate,
|
|
14132
|
-
|
|
14141
|
+
Ip as NavigationControMLGL,
|
|
14133
14142
|
Na as NavigationControl,
|
|
14134
|
-
|
|
14135
|
-
|
|
14136
|
-
|
|
14137
|
-
|
|
14138
|
-
|
|
14139
|
-
|
|
14140
|
-
|
|
14141
|
-
|
|
14142
|
-
|
|
14143
|
-
|
|
14144
|
-
|
|
14145
|
-
|
|
14146
|
-
|
|
14147
|
-
|
|
14148
|
-
|
|
14149
|
-
|
|
14150
|
-
|
|
14151
|
-
|
|
14152
|
-
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
|
|
14160
|
-
|
|
14161
|
-
|
|
14162
|
-
|
|
14163
|
-
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
|
|
14168
|
-
|
|
14143
|
+
si as Point,
|
|
14144
|
+
Wc as Popup,
|
|
14145
|
+
Sp as PopupMLGL,
|
|
14146
|
+
Fr as RadialGradientLayer,
|
|
14147
|
+
np as RasterDEMTileSource,
|
|
14148
|
+
Ap as RasterDEMTileSourceMLGL,
|
|
14149
|
+
rp as RasterTileSource,
|
|
14150
|
+
Ep as RasterTileSourceMLGL,
|
|
14151
|
+
xf as ReferenceMapStyle,
|
|
14152
|
+
Ti as ScaleControl,
|
|
14153
|
+
zp as ScaleControlMLGL,
|
|
14154
|
+
up as ScrollZoomHandler,
|
|
14155
|
+
Np as ScrollZoomHandlerMLGL,
|
|
14156
|
+
Ii as SdkConfig,
|
|
14157
|
+
kf as ServiceError,
|
|
14158
|
+
Jc as Style,
|
|
14159
|
+
xp as StyleMLGL,
|
|
14160
|
+
Fp as TerrainControMLGL,
|
|
14161
|
+
sp as TerrainControl,
|
|
14162
|
+
fp as TwoFingersTouchPitchHandler,
|
|
14163
|
+
Up as TwoFingersTouchPitchHandlerMLGL,
|
|
14164
|
+
sf as TwoFingersTouchRotateHandler,
|
|
14165
|
+
of as TwoFingersTouchZoomHandler,
|
|
14166
|
+
nf as TwoFingersTouchZoomRotateHandler,
|
|
14167
|
+
ap as VectorTileSource,
|
|
14168
|
+
Tp as VectorTileSourceMLGL,
|
|
14169
|
+
op as VideoSource,
|
|
14170
|
+
_p as VideoSourceMLGL,
|
|
14171
|
+
yf as addProtocol,
|
|
14172
|
+
hf as addSourceType,
|
|
14173
|
+
Lf as areSameLanguages,
|
|
14174
|
+
Cf as bufferToPixelDataBrowser,
|
|
14175
|
+
Ef as canParsePixelData,
|
|
14176
|
+
Af as circumferenceAtLatitude,
|
|
14177
|
+
Jp as clearPrewarmedResources,
|
|
14169
14178
|
j as config,
|
|
14170
|
-
|
|
14171
|
-
|
|
14179
|
+
Gp as configMLGL,
|
|
14180
|
+
Tf as coordinates,
|
|
14172
14181
|
Ge as cubemapPresets,
|
|
14173
|
-
|
|
14174
|
-
|
|
14175
|
-
|
|
14176
|
-
|
|
14177
|
-
|
|
14178
|
-
|
|
14179
|
-
|
|
14180
|
-
|
|
14181
|
-
|
|
14182
|
-
|
|
14183
|
-
|
|
14184
|
-
|
|
14185
|
-
|
|
14186
|
-
|
|
14187
|
-
|
|
14188
|
-
|
|
14189
|
-
|
|
14190
|
-
|
|
14191
|
-
|
|
14192
|
-
|
|
14182
|
+
_f as data,
|
|
14183
|
+
yp as displayWebGLContextLostWarning,
|
|
14184
|
+
If as elevation,
|
|
14185
|
+
Mf as expandMapStyle,
|
|
14186
|
+
Pf as geocoding,
|
|
14187
|
+
Rf as geolocation,
|
|
14188
|
+
zf as getAutoLanguage,
|
|
14189
|
+
Fn as getBrowserLanguage,
|
|
14190
|
+
Of as getBufferToPixelDataParser,
|
|
14191
|
+
Ff as getLanguageInfoFromCode,
|
|
14192
|
+
$f as getLanguageInfoFromFlag,
|
|
14193
|
+
Nf as getLanguageInfoFromKey,
|
|
14194
|
+
Hp as getMapLibreVersion,
|
|
14195
|
+
cf as getMaxParallelImageRequests,
|
|
14196
|
+
Kp as getRTLTextPluginStatus,
|
|
14197
|
+
jf as getTileCache,
|
|
14198
|
+
oi as getVersion,
|
|
14199
|
+
ji as getWebGLSupportError,
|
|
14200
|
+
lf as getWorkerCount,
|
|
14201
|
+
ff as getWorkerUrl,
|
|
14193
14202
|
Zo as gpx,
|
|
14194
|
-
|
|
14203
|
+
zc as gpxOrKml,
|
|
14195
14204
|
Ho as hasChildNodeWithName,
|
|
14196
|
-
|
|
14197
|
-
|
|
14198
|
-
|
|
14205
|
+
vp as helpers,
|
|
14206
|
+
mf as importScriptInWorkers,
|
|
14207
|
+
Df as isLanguageInfo,
|
|
14199
14208
|
Ko as kml,
|
|
14200
|
-
|
|
14201
|
-
|
|
14202
|
-
|
|
14203
|
-
|
|
14204
|
-
|
|
14205
|
-
|
|
14206
|
-
|
|
14207
|
-
|
|
14208
|
-
|
|
14209
|
-
|
|
14209
|
+
Uf as mapStylePresetList,
|
|
14210
|
+
Bf as math,
|
|
14211
|
+
qf as misc,
|
|
14212
|
+
Wp as prewarm,
|
|
14213
|
+
gf as removeProtocol,
|
|
14214
|
+
pf as setMaxParallelImageRequests,
|
|
14215
|
+
Zp as setRTLTextPlugin,
|
|
14216
|
+
uf as setWorkerCount,
|
|
14217
|
+
df as setWorkerUrl,
|
|
14218
|
+
Vf as staticMaps,
|
|
14210
14219
|
_n as str2xml,
|
|
14211
|
-
|
|
14212
|
-
|
|
14220
|
+
Gf as styleToStyle,
|
|
14221
|
+
Hf as toLanguageInfo,
|
|
14213
14222
|
Ao as toggleProjection,
|
|
14214
14223
|
Eo as toggleTerrain,
|
|
14215
14224
|
Ia as xml2str
|