@maptiler/sdk 3.1.0-rc3 → 3.1.0-rc5
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 +566 -551
- package/dist/maptiler-sdk.mjs.map +1 -1
- package/dist/src/Map.d.ts +4 -2
- package/package.json +1 -1
package/dist/maptiler-sdk.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var io = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var Zr = (r) => {
|
|
3
3
|
throw TypeError(r);
|
|
4
4
|
};
|
|
5
5
|
var so = (r, e, t) => e in r ? io(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
6
|
-
var x = (r, e, t) => so(r, typeof e != "symbol" ? e + "" : e, t),
|
|
7
|
-
var I = (r, e, t) => (
|
|
8
|
-
import k, { addProtocol as
|
|
9
|
-
import { Language as lo, getLanguageInfoFromCode as
|
|
6
|
+
var x = (r, e, t) => so(r, typeof e != "symbol" ? e + "" : e, t), qt = (r, e, t) => e.has(r) || Zr("Cannot " + t);
|
|
7
|
+
var I = (r, e, t) => (qt(r, e, "read from private field"), t ? t.call(r) : e.get(r)), ge = (r, e, t) => e.has(r) ? Zr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), Ce = (r, e, t, n) => (qt(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), H = (r, e, t) => (qt(r, e, "access private method"), t);
|
|
8
|
+
import k, { addProtocol as Wr } from "maplibre-gl";
|
|
9
|
+
import { Language as lo, getLanguageInfoFromCode as Yr, config as Gt, MapStyle as Ke, mapStylePresetList as Vt, expandMapStyle as uo, MapStyleVariant as co, ReferenceMapStyle as po, toLanguageInfo as Jr, getLanguageInfoFromFlag as fo, geolocation as Qr } from "@maptiler/client";
|
|
10
10
|
import { MapStyle as sp, MapStyleVariant as lp, ReferenceMapStyle as up, ServiceError as cp, areSameLanguages as pp, bufferToPixelDataBrowser as fp, circumferenceAtLatitude as dp, coordinates as hp, data as yp, elevation as mp, expandMapStyle as gp, geocoding as vp, geolocation as bp, getAutoLanguage as wp, getBufferToPixelDataParser as xp, getLanguageInfoFromCode as Sp, getLanguageInfoFromFlag as kp, getLanguageInfoFromKey as Cp, getTileCache as Lp, isLanguageInfo as Ep, mapStylePresetList as Tp, math as Ap, misc as _p, staticMaps as Mp, styleToStyle as Ip, toLanguageInfo as Pp } from "@maptiler/client";
|
|
11
11
|
import ho from "events";
|
|
12
12
|
import { v4 as yo } from "uuid";
|
|
@@ -60,12 +60,12 @@ const P = {
|
|
|
60
60
|
},
|
|
61
61
|
...lo
|
|
62
62
|
};
|
|
63
|
-
function
|
|
63
|
+
function en() {
|
|
64
64
|
if (typeof navigator > "u") {
|
|
65
|
-
const e = Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0], t =
|
|
65
|
+
const e = Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0], t = Yr(e);
|
|
66
66
|
return t || P.ENGLISH;
|
|
67
67
|
}
|
|
68
|
-
return Array.from(new Set(navigator.languages.map((e) => e.split("-")[0]))).map((e) =>
|
|
68
|
+
return Array.from(new Set(navigator.languages.map((e) => e.split("-")[0]))).map((e) => Yr(e)).filter((e) => e)[0] ?? P.LOCAL;
|
|
69
69
|
}
|
|
70
70
|
const V = {
|
|
71
71
|
maptilerLogoURL: "https://api.maptiler.com/resources/logo.svg",
|
|
@@ -79,7 +79,7 @@ const V = {
|
|
|
79
79
|
terrainSourceId: "maptiler-terrain"
|
|
80
80
|
};
|
|
81
81
|
Object.freeze(V);
|
|
82
|
-
const
|
|
82
|
+
const xr = yo();
|
|
83
83
|
class go extends ho {
|
|
84
84
|
constructor() {
|
|
85
85
|
super(...arguments);
|
|
@@ -149,7 +149,7 @@ class go extends ho {
|
|
|
149
149
|
* Set the MapTiler Cloud API key
|
|
150
150
|
*/
|
|
151
151
|
set apiKey(t) {
|
|
152
|
-
this._apiKey = t,
|
|
152
|
+
this._apiKey = t, Gt.apiKey = t, this.emit("apiKey", t);
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
155
155
|
* Get the MapTiler Cloud API key
|
|
@@ -161,41 +161,41 @@ class go extends ho {
|
|
|
161
161
|
* Set a the custom fetch function to replace the default one
|
|
162
162
|
*/
|
|
163
163
|
set fetch(t) {
|
|
164
|
-
|
|
164
|
+
Gt.fetch = t;
|
|
165
165
|
}
|
|
166
166
|
/**
|
|
167
167
|
* Get the fetch fucntion
|
|
168
168
|
*/
|
|
169
169
|
get fetch() {
|
|
170
|
-
return
|
|
170
|
+
return Gt.fetch;
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
const N = new go(),
|
|
173
|
+
const N = new go(), ur = "localcache_source", cr = "localcache", vo = "maptiler_sdk", bo = 1e3, wo = 100, pr = typeof caches < "u";
|
|
174
174
|
function xo(r, e) {
|
|
175
|
-
if (
|
|
175
|
+
if (pr && N.caching && N.session && r.host === V.maptilerApiHost) {
|
|
176
176
|
if (e === "Source" && r.href.includes("tiles.json"))
|
|
177
|
-
return r.href.replace("https://", `${lr}://`);
|
|
178
|
-
if (e === "Tile" || e === "Glyphs")
|
|
179
177
|
return r.href.replace("https://", `${ur}://`);
|
|
178
|
+
if (e === "Tile" || e === "Glyphs")
|
|
179
|
+
return r.href.replace("https://", `${cr}://`);
|
|
180
180
|
}
|
|
181
181
|
return r.href;
|
|
182
182
|
}
|
|
183
|
-
let
|
|
184
|
-
async function
|
|
185
|
-
return
|
|
183
|
+
let Ht;
|
|
184
|
+
async function Jn() {
|
|
185
|
+
return Ht || (Ht = await caches.open(vo)), Ht;
|
|
186
186
|
}
|
|
187
|
-
let
|
|
187
|
+
let tn = 0;
|
|
188
188
|
async function So() {
|
|
189
|
-
const r = await
|
|
189
|
+
const r = await Jn(), e = await r.keys(), t = e.slice(0, Math.max(e.length - bo, 0));
|
|
190
190
|
for (const n of t)
|
|
191
191
|
r.delete(n);
|
|
192
192
|
}
|
|
193
193
|
function ko() {
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
Wr(
|
|
195
|
+
ur,
|
|
196
196
|
async (r, e) => {
|
|
197
197
|
if (!r.url) throw new Error("");
|
|
198
|
-
r.url = r.url.replace(`${
|
|
198
|
+
r.url = r.url.replace(`${ur}://`, "https://");
|
|
199
199
|
const t = r;
|
|
200
200
|
t.signal = e.signal;
|
|
201
201
|
const n = await fetch(r.url, t), a = await n.json();
|
|
@@ -205,9 +205,9 @@ function ko() {
|
|
|
205
205
|
expires: n.headers.get("Expires")
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
|
-
),
|
|
208
|
+
), Wr(cr, async (r, e) => {
|
|
209
209
|
if (!r.url) throw new Error("");
|
|
210
|
-
r.url = r.url.replace(`${
|
|
210
|
+
r.url = r.url.replace(`${cr}://`, "https://");
|
|
211
211
|
const t = new URL(r.url), n = new URL(t);
|
|
212
212
|
n.searchParams.delete("mtsid"), n.searchParams.delete("key");
|
|
213
213
|
const a = n.toString(), o = new URL(t);
|
|
@@ -216,14 +216,14 @@ function ko() {
|
|
|
216
216
|
data: await f.arrayBuffer(),
|
|
217
217
|
cacheControl: f.headers.get("Cache-Control"),
|
|
218
218
|
expires: f.headers.get("Expires")
|
|
219
|
-
}), l = await
|
|
219
|
+
}), l = await Jn(), u = await l.match(a);
|
|
220
220
|
if (u)
|
|
221
221
|
return s(u);
|
|
222
222
|
const c = r;
|
|
223
223
|
c.signal = e.signal;
|
|
224
224
|
const p = await fetch(i, c);
|
|
225
225
|
return p.status >= 200 && p.status < 300 && (l.put(a, p.clone()).catch(() => {
|
|
226
|
-
}), ++
|
|
226
|
+
}), ++tn > wo && (So(), tn = 0)), s(p);
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
229
|
function Co() {
|
|
@@ -239,7 +239,7 @@ function Lo(r, e) {
|
|
|
239
239
|
for (const t of r)
|
|
240
240
|
typeof e[t] == "function" && (e[t] = e[t].bind(e));
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function rn(r, e) {
|
|
243
243
|
let t = null;
|
|
244
244
|
try {
|
|
245
245
|
t = new URL(r);
|
|
@@ -248,26 +248,26 @@ function en(r, e) {
|
|
|
248
248
|
url: r
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
|
-
return t.host === V.maptilerApiHost && (t.searchParams.has("key") || t.searchParams.append("key", N.apiKey), N.session && t.searchParams.append("mtsid",
|
|
251
|
+
return t.host === V.maptilerApiHost && (t.searchParams.has("key") || t.searchParams.append("key", N.apiKey), N.session && t.searchParams.append("mtsid", xr)), {
|
|
252
252
|
url: xo(t, e)
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function nn(r) {
|
|
256
256
|
return (e, t) => {
|
|
257
257
|
if (r != null) {
|
|
258
|
-
const n = r(e, t), a =
|
|
258
|
+
const n = r(e, t), a = rn((n == null ? void 0 : n.url) ?? "", t);
|
|
259
259
|
return {
|
|
260
260
|
...n,
|
|
261
261
|
...a
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
|
-
return
|
|
264
|
+
return rn(e, t);
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function Qn() {
|
|
268
268
|
return Math.random().toString(36).substring(2);
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Et(r) {
|
|
271
271
|
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);
|
|
272
272
|
}
|
|
273
273
|
function Eo(r) {
|
|
@@ -293,16 +293,16 @@ function Ru(r) {
|
|
|
293
293
|
const e = "The WebGL context was lost.", t = r.getContainer(), n = document.createElement("div");
|
|
294
294
|
n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function an(r, e) {
|
|
297
297
|
return !(!Array.isArray(r) || r.length !== 2 || r[0] !== "get" || typeof r[1] != "string" || e && !r[1].startsWith("name:") || !e && r[1] !== "name");
|
|
298
298
|
}
|
|
299
299
|
function _o(r, e, t) {
|
|
300
300
|
const n = structuredClone(r), a = (o) => {
|
|
301
301
|
if (typeof o != "string")
|
|
302
302
|
for (let i = 0; i < o.length; i += 1)
|
|
303
|
-
|
|
303
|
+
an(o[i], t) ? o[i] = structuredClone(e) : a(o[i]);
|
|
304
304
|
};
|
|
305
|
-
return
|
|
305
|
+
return an(n, t) ? e : (a(n), n);
|
|
306
306
|
}
|
|
307
307
|
function Mo(r, e) {
|
|
308
308
|
const t = e ? /\{name:\S+\}/ : /\{name\}/;
|
|
@@ -496,7 +496,7 @@ class ec extends k.MapMouseEvent {
|
|
|
496
496
|
super(e, t, n, a);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
|
-
class
|
|
499
|
+
class on extends jo {
|
|
500
500
|
constructor(t = {}) {
|
|
501
501
|
super(t);
|
|
502
502
|
x(this, "logoURL", "");
|
|
@@ -3500,7 +3500,7 @@ class g {
|
|
|
3500
3500
|
this.message = (e ? `${e}: ` : "") + n, a && (this.identifier = a), t != null && t.__line__ && (this.line = t.__line__);
|
|
3501
3501
|
}
|
|
3502
3502
|
}
|
|
3503
|
-
function
|
|
3503
|
+
function vt(r, ...e) {
|
|
3504
3504
|
for (const t of e)
|
|
3505
3505
|
for (const n in t)
|
|
3506
3506
|
r[n] = t[n];
|
|
@@ -3511,14 +3511,14 @@ class le extends Error {
|
|
|
3511
3511
|
super(t), this.message = t, this.key = e;
|
|
3512
3512
|
}
|
|
3513
3513
|
}
|
|
3514
|
-
class
|
|
3514
|
+
class Sr {
|
|
3515
3515
|
constructor(e, t = []) {
|
|
3516
3516
|
this.parent = e, this.bindings = {};
|
|
3517
3517
|
for (const [n, a] of t)
|
|
3518
3518
|
this.bindings[n] = a;
|
|
3519
3519
|
}
|
|
3520
3520
|
concat(e) {
|
|
3521
|
-
return new
|
|
3521
|
+
return new Sr(this, e);
|
|
3522
3522
|
}
|
|
3523
3523
|
get(e) {
|
|
3524
3524
|
if (this.bindings[e])
|
|
@@ -3531,7 +3531,7 @@ class wr {
|
|
|
3531
3531
|
return this.bindings[e] ? !0 : this.parent ? this.parent.has(e) : !1;
|
|
3532
3532
|
}
|
|
3533
3533
|
}
|
|
3534
|
-
const
|
|
3534
|
+
const Tt = { kind: "null" }, b = { kind: "number" }, M = { kind: "string" }, A = { kind: "boolean" }, ue = { kind: "color" }, At = { kind: "projectionDefinition" }, Ne = { kind: "object" }, _ = { kind: "value" }, Ai = { kind: "error" }, _t = { kind: "collator" }, Mt = { kind: "formatted" }, It = { kind: "padding" }, it = { kind: "resolvedImage" }, Pt = { kind: "variableAnchorOffsetCollection" };
|
|
3535
3535
|
function Z(r, e) {
|
|
3536
3536
|
return {
|
|
3537
3537
|
kind: "array",
|
|
@@ -3547,18 +3547,18 @@ function j(r) {
|
|
|
3547
3547
|
return r.kind;
|
|
3548
3548
|
}
|
|
3549
3549
|
const _i = [
|
|
3550
|
-
|
|
3550
|
+
Tt,
|
|
3551
3551
|
b,
|
|
3552
3552
|
M,
|
|
3553
3553
|
A,
|
|
3554
3554
|
ue,
|
|
3555
|
-
|
|
3556
|
-
|
|
3555
|
+
At,
|
|
3556
|
+
Mt,
|
|
3557
3557
|
Ne,
|
|
3558
3558
|
Z(_),
|
|
3559
|
-
|
|
3559
|
+
It,
|
|
3560
3560
|
it,
|
|
3561
|
-
|
|
3561
|
+
Pt
|
|
3562
3562
|
];
|
|
3563
3563
|
function Ye(r, e) {
|
|
3564
3564
|
if (e.kind === "error")
|
|
@@ -3577,7 +3577,7 @@ function Ye(r, e) {
|
|
|
3577
3577
|
}
|
|
3578
3578
|
return `Expected ${j(r)} but found ${j(e)} instead.`;
|
|
3579
3579
|
}
|
|
3580
|
-
function
|
|
3580
|
+
function kr(r, e) {
|
|
3581
3581
|
return e.some((t) => t.kind === r.kind);
|
|
3582
3582
|
}
|
|
3583
3583
|
function Ae(r, e) {
|
|
@@ -3586,49 +3586,49 @@ function Ae(r, e) {
|
|
|
3586
3586
|
function $e(r, e) {
|
|
3587
3587
|
return r.kind === "array" && e.kind === "array" ? r.itemType.kind === e.itemType.kind && typeof r.N == "number" : r.kind === e.kind;
|
|
3588
3588
|
}
|
|
3589
|
-
const
|
|
3590
|
-
function
|
|
3589
|
+
const ea = 0.96422, ta = 1, ra = 0.82521, na = 4 / 29, Ue = 6 / 29, aa = 3 * Ue * Ue, Mi = Ue * Ue * Ue, Ii = Math.PI / 180, Pi = 180 / Math.PI;
|
|
3590
|
+
function oa(r) {
|
|
3591
3591
|
return r = r % 360, r < 0 && (r += 360), r;
|
|
3592
3592
|
}
|
|
3593
|
-
function
|
|
3594
|
-
r =
|
|
3593
|
+
function ia([r, e, t, n]) {
|
|
3594
|
+
r = Kt(r), e = Kt(e), t = Kt(t);
|
|
3595
3595
|
let a, o;
|
|
3596
|
-
const i =
|
|
3597
|
-
r === e && e === t ? a = o = i : (a =
|
|
3596
|
+
const i = Xt((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) / ta);
|
|
3597
|
+
r === e && e === t ? a = o = i : (a = Xt((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) / ea), o = Xt((0.0139322 * r + 0.0971045 * e + 0.7141733 * t) / ra));
|
|
3598
3598
|
const s = 116 * i - 16;
|
|
3599
3599
|
return [s < 0 ? 0 : s, 500 * (a - i), 200 * (i - o), n];
|
|
3600
3600
|
}
|
|
3601
|
-
function
|
|
3601
|
+
function Kt(r) {
|
|
3602
3602
|
return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
|
|
3603
3603
|
}
|
|
3604
|
-
function
|
|
3605
|
-
return r > Mi ? Math.pow(r, 1 / 3) : r /
|
|
3604
|
+
function Xt(r) {
|
|
3605
|
+
return r > Mi ? Math.pow(r, 1 / 3) : r / aa + na;
|
|
3606
3606
|
}
|
|
3607
|
-
function
|
|
3607
|
+
function sa([r, e, t, n]) {
|
|
3608
3608
|
let a = (r + 16) / 116, o = isNaN(e) ? a : a + e / 500, i = isNaN(t) ? a : a - t / 200;
|
|
3609
|
-
return a =
|
|
3610
|
-
|
|
3609
|
+
return a = ta * Wt(a), o = ea * Wt(o), i = ra * Wt(i), [
|
|
3610
|
+
Zt(3.1338561 * o - 1.6168667 * a - 0.4906146 * i),
|
|
3611
3611
|
// D50 -> sRGB
|
|
3612
|
-
|
|
3613
|
-
|
|
3612
|
+
Zt(-0.9787684 * o + 1.9161415 * a + 0.033454 * i),
|
|
3613
|
+
Zt(0.0719453 * o - 0.2289914 * a + 1.4052427 * i),
|
|
3614
3614
|
n
|
|
3615
3615
|
];
|
|
3616
3616
|
}
|
|
3617
|
-
function
|
|
3617
|
+
function Zt(r) {
|
|
3618
3618
|
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;
|
|
3619
3619
|
}
|
|
3620
|
-
function
|
|
3621
|
-
return r > Ue ? r * r * r :
|
|
3620
|
+
function Wt(r) {
|
|
3621
|
+
return r > Ue ? r * r * r : aa * (r - na);
|
|
3622
3622
|
}
|
|
3623
3623
|
function Ri(r) {
|
|
3624
|
-
const [e, t, n, a] =
|
|
3625
|
-
return [Math.round(o * 1e4) ?
|
|
3624
|
+
const [e, t, n, a] = ia(r), o = Math.sqrt(t * t + n * n);
|
|
3625
|
+
return [Math.round(o * 1e4) ? oa(Math.atan2(n, t) * Pi) : NaN, o, e, a];
|
|
3626
3626
|
}
|
|
3627
3627
|
function zi([r, e, t, n]) {
|
|
3628
|
-
return r = isNaN(r) ? 0 : r * Ii,
|
|
3628
|
+
return r = isNaN(r) ? 0 : r * Ii, sa([t, Math.cos(r) * e, Math.sin(r) * e, n]);
|
|
3629
3629
|
}
|
|
3630
3630
|
function $i([r, e, t, n]) {
|
|
3631
|
-
r =
|
|
3631
|
+
r = oa(r), e /= 100, t /= 100;
|
|
3632
3632
|
function a(o) {
|
|
3633
3633
|
const i = (o + r / 30) % 12, s = e * Math.min(t, 1 - t);
|
|
3634
3634
|
return t - s * Math.max(-1, Math.min(i - 3, 9 - i, 1));
|
|
@@ -3689,9 +3689,9 @@ function Fi(r) {
|
|
|
3689
3689
|
Oe(+s / E, 0, 1),
|
|
3690
3690
|
Oe(+c / E, 0, 1),
|
|
3691
3691
|
Oe(+d / E, 0, 1),
|
|
3692
|
-
m ?
|
|
3692
|
+
m ? sn(+m, w) : 1
|
|
3693
3693
|
];
|
|
3694
|
-
if (
|
|
3694
|
+
if (ln(L))
|
|
3695
3695
|
return L;
|
|
3696
3696
|
}
|
|
3697
3697
|
}
|
|
@@ -3725,9 +3725,9 @@ function Fi(r) {
|
|
|
3725
3725
|
+o,
|
|
3726
3726
|
Oe(+s, 0, 100),
|
|
3727
3727
|
Oe(+u, 0, 100),
|
|
3728
|
-
p ?
|
|
3728
|
+
p ? sn(+p, f) : 1
|
|
3729
3729
|
];
|
|
3730
|
-
if (
|
|
3730
|
+
if (ln(h))
|
|
3731
3731
|
return $i(h);
|
|
3732
3732
|
}
|
|
3733
3733
|
}
|
|
@@ -3735,13 +3735,13 @@ function Fi(r) {
|
|
|
3735
3735
|
function ct(r) {
|
|
3736
3736
|
return parseInt(r.padEnd(2, r), 16) / 255;
|
|
3737
3737
|
}
|
|
3738
|
-
function
|
|
3738
|
+
function sn(r, e) {
|
|
3739
3739
|
return Oe(e ? r / 100 : r, 0, 1);
|
|
3740
3740
|
}
|
|
3741
3741
|
function Oe(r, e, t) {
|
|
3742
3742
|
return Math.min(Math.max(e, r), t);
|
|
3743
3743
|
}
|
|
3744
|
-
function
|
|
3744
|
+
function ln(r) {
|
|
3745
3745
|
return !r.some(Number.isNaN);
|
|
3746
3746
|
}
|
|
3747
3747
|
const Oi = {
|
|
@@ -3956,7 +3956,7 @@ class O {
|
|
|
3956
3956
|
* @returns Gien color, with reversed alpha blending, in LAB color space.
|
|
3957
3957
|
*/
|
|
3958
3958
|
get lab() {
|
|
3959
|
-
return this.overwriteGetter("lab",
|
|
3959
|
+
return this.overwriteGetter("lab", ia(this.rgb));
|
|
3960
3960
|
}
|
|
3961
3961
|
/**
|
|
3962
3962
|
* Lazy getter pattern. When getter is called for the first time lazy value
|
|
@@ -4018,7 +4018,7 @@ class O {
|
|
|
4018
4018
|
return new O(y, m, w, v, !1);
|
|
4019
4019
|
}
|
|
4020
4020
|
case "lab": {
|
|
4021
|
-
const [o, i, s, l] =
|
|
4021
|
+
const [o, i, s, l] = sa(Je(e.lab, t.lab, n));
|
|
4022
4022
|
return new O(o, i, s, l, !1);
|
|
4023
4023
|
}
|
|
4024
4024
|
}
|
|
@@ -4028,7 +4028,7 @@ O.black = new O(0, 0, 0, 1);
|
|
|
4028
4028
|
O.white = new O(1, 1, 1, 1);
|
|
4029
4029
|
O.transparent = new O(0, 0, 0, 0);
|
|
4030
4030
|
O.red = new O(1, 0, 0, 1);
|
|
4031
|
-
class
|
|
4031
|
+
class Cr {
|
|
4032
4032
|
constructor(e, t, n) {
|
|
4033
4033
|
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" });
|
|
4034
4034
|
}
|
|
@@ -4039,7 +4039,7 @@ class Sr {
|
|
|
4039
4039
|
return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;
|
|
4040
4040
|
}
|
|
4041
4041
|
}
|
|
4042
|
-
class
|
|
4042
|
+
class fr {
|
|
4043
4043
|
constructor(e, t, n, a, o) {
|
|
4044
4044
|
this.text = e, this.image = t, this.scale = n, this.fontStack = a, this.textColor = o;
|
|
4045
4045
|
}
|
|
@@ -4049,7 +4049,7 @@ class he {
|
|
|
4049
4049
|
this.sections = e;
|
|
4050
4050
|
}
|
|
4051
4051
|
static fromString(e) {
|
|
4052
|
-
return new he([new
|
|
4052
|
+
return new he([new fr(e, null, null, null, null)]);
|
|
4053
4053
|
}
|
|
4054
4054
|
isEmpty() {
|
|
4055
4055
|
return this.sections.length === 0 ? !0 : !this.sections.some((e) => e.text.length !== 0 || e.image && e.image.name.length !== 0);
|
|
@@ -4172,11 +4172,11 @@ class ae {
|
|
|
4172
4172
|
return new ae(e, e, 1);
|
|
4173
4173
|
}
|
|
4174
4174
|
}
|
|
4175
|
-
function
|
|
4175
|
+
function la(r, e, t, n) {
|
|
4176
4176
|
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.`;
|
|
4177
4177
|
}
|
|
4178
4178
|
function Qe(r) {
|
|
4179
|
-
if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ae || r instanceof O || r instanceof
|
|
4179
|
+
if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ae || r instanceof O || r instanceof Cr || r instanceof he || r instanceof Y || r instanceof se || r instanceof Se)
|
|
4180
4180
|
return !0;
|
|
4181
4181
|
if (Array.isArray(r)) {
|
|
4182
4182
|
for (const e of r)
|
|
@@ -4193,7 +4193,7 @@ function Qe(r) {
|
|
|
4193
4193
|
}
|
|
4194
4194
|
function B(r) {
|
|
4195
4195
|
if (r === null)
|
|
4196
|
-
return
|
|
4196
|
+
return Tt;
|
|
4197
4197
|
if (typeof r == "string")
|
|
4198
4198
|
return M;
|
|
4199
4199
|
if (typeof r == "boolean")
|
|
@@ -4203,15 +4203,15 @@ function B(r) {
|
|
|
4203
4203
|
if (r instanceof O)
|
|
4204
4204
|
return ue;
|
|
4205
4205
|
if (r instanceof ae)
|
|
4206
|
-
return Tt;
|
|
4207
|
-
if (r instanceof Sr)
|
|
4208
4206
|
return At;
|
|
4209
|
-
if (r instanceof
|
|
4207
|
+
if (r instanceof Cr)
|
|
4210
4208
|
return _t;
|
|
4211
|
-
if (r instanceof
|
|
4209
|
+
if (r instanceof he)
|
|
4212
4210
|
return Mt;
|
|
4213
|
-
if (r instanceof
|
|
4211
|
+
if (r instanceof Y)
|
|
4214
4212
|
return It;
|
|
4213
|
+
if (r instanceof se)
|
|
4214
|
+
return Pt;
|
|
4215
4215
|
if (r instanceof Se)
|
|
4216
4216
|
return it;
|
|
4217
4217
|
if (Array.isArray(r)) {
|
|
@@ -4321,7 +4321,7 @@ class oe {
|
|
|
4321
4321
|
return this.args.every((e) => e.outputDefined());
|
|
4322
4322
|
}
|
|
4323
4323
|
}
|
|
4324
|
-
const
|
|
4324
|
+
const un = {
|
|
4325
4325
|
"to-boolean": A,
|
|
4326
4326
|
"to-color": ue,
|
|
4327
4327
|
"to-number": b,
|
|
@@ -4335,11 +4335,11 @@ class we {
|
|
|
4335
4335
|
if (e.length < 2)
|
|
4336
4336
|
return t.error("Expected at least one argument.");
|
|
4337
4337
|
const n = e[0];
|
|
4338
|
-
if (!
|
|
4338
|
+
if (!un[n])
|
|
4339
4339
|
throw new Error(`Can't parse ${n} as it is not part of the known types`);
|
|
4340
4340
|
if ((n === "to-boolean" || n === "to-string") && e.length !== 2)
|
|
4341
4341
|
return t.error("Expected one argument.");
|
|
4342
|
-
const a =
|
|
4342
|
+
const a = un[n], o = [];
|
|
4343
4343
|
for (let i = 1; i < e.length; i++) {
|
|
4344
4344
|
const s = t.parse(e[i], i, _);
|
|
4345
4345
|
if (!s)
|
|
@@ -4361,7 +4361,7 @@ class we {
|
|
|
4361
4361
|
const o = e.parseColor(t);
|
|
4362
4362
|
if (o)
|
|
4363
4363
|
return o;
|
|
4364
|
-
} 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 =
|
|
4364
|
+
} 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 = la(t[0], t[1], t[2], t[3]), !n))
|
|
4365
4365
|
return new O(t[0] / 255, t[1] / 255, t[2] / 255, t[3]);
|
|
4366
4366
|
}
|
|
4367
4367
|
throw new D(n || `Could not parse color from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
|
|
@@ -4415,7 +4415,7 @@ class we {
|
|
|
4415
4415
|
}
|
|
4416
4416
|
}
|
|
4417
4417
|
const Ni = ["Unknown", "Point", "LineString", "Polygon"];
|
|
4418
|
-
class
|
|
4418
|
+
class ua {
|
|
4419
4419
|
constructor() {
|
|
4420
4420
|
this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = {}, this.availableImages = null, this.canonical = null;
|
|
4421
4421
|
}
|
|
@@ -4439,8 +4439,8 @@ class la {
|
|
|
4439
4439
|
return t || (t = this._parseColorCache[e] = O.parse(e)), t;
|
|
4440
4440
|
}
|
|
4441
4441
|
}
|
|
4442
|
-
class
|
|
4443
|
-
constructor(e, t, n = [], a, o = new
|
|
4442
|
+
class Rt {
|
|
4443
|
+
constructor(e, t, n = [], a, o = new Sr(), i = []) {
|
|
4444
4444
|
this.registry = e, this.path = n, this.key = n.map((s) => `[${s}]`).join(""), this.scope = o, this.errors = i, this.expectedType = a, this._isConstant = t;
|
|
4445
4445
|
}
|
|
4446
4446
|
/**
|
|
@@ -4485,7 +4485,7 @@ class Pt {
|
|
|
4485
4485
|
return null;
|
|
4486
4486
|
}
|
|
4487
4487
|
if (!(i instanceof De) && i.type.kind !== "resolvedImage" && this._isConstant(i)) {
|
|
4488
|
-
const s = new
|
|
4488
|
+
const s = new ua();
|
|
4489
4489
|
try {
|
|
4490
4490
|
i = new De(i.type, i.evaluate(s));
|
|
4491
4491
|
} catch (l) {
|
|
@@ -4507,7 +4507,7 @@ class Pt {
|
|
|
4507
4507
|
*/
|
|
4508
4508
|
concat(e, t, n) {
|
|
4509
4509
|
const a = typeof e == "number" ? this.path.concat(e) : this.path, o = n ? this.scope.concat(n) : this.scope;
|
|
4510
|
-
return new
|
|
4510
|
+
return new Rt(this.registry, this._isConstant, a, t || null, o, this.errors);
|
|
4511
4511
|
}
|
|
4512
4512
|
/**
|
|
4513
4513
|
* Push a parsing (or type checking) error into the `this.errors`
|
|
@@ -4532,7 +4532,7 @@ class Pt {
|
|
|
4532
4532
|
return n && this.error(n), n;
|
|
4533
4533
|
}
|
|
4534
4534
|
}
|
|
4535
|
-
class
|
|
4535
|
+
class zt {
|
|
4536
4536
|
constructor(e, t) {
|
|
4537
4537
|
this.type = t.type, this.bindings = [].concat(e), this.result = t;
|
|
4538
4538
|
}
|
|
@@ -4560,13 +4560,13 @@ class Rt {
|
|
|
4560
4560
|
n.push([i, s]);
|
|
4561
4561
|
}
|
|
4562
4562
|
const a = t.parse(e[e.length - 1], e.length - 1, t.expectedType, n);
|
|
4563
|
-
return a ? new
|
|
4563
|
+
return a ? new zt(n, a) : null;
|
|
4564
4564
|
}
|
|
4565
4565
|
outputDefined() {
|
|
4566
4566
|
return this.result.outputDefined();
|
|
4567
4567
|
}
|
|
4568
4568
|
}
|
|
4569
|
-
class
|
|
4569
|
+
class $t {
|
|
4570
4570
|
constructor(e, t) {
|
|
4571
4571
|
this.type = t.type, this.name = e, this.boundExpression = t;
|
|
4572
4572
|
}
|
|
@@ -4574,7 +4574,7 @@ class zt {
|
|
|
4574
4574
|
if (e.length !== 2 || typeof e[1] != "string")
|
|
4575
4575
|
return t.error("'var' expression requires exactly one string literal argument.");
|
|
4576
4576
|
const n = e[1];
|
|
4577
|
-
return t.scope.has(n) ? new
|
|
4577
|
+
return t.scope.has(n) ? new $t(n, t.scope.get(n)) : t.error(`Unknown variable "${n}". Make sure "${n}" has been bound in an enclosing "let" expression before using it.`, 1);
|
|
4578
4578
|
}
|
|
4579
4579
|
evaluate(e) {
|
|
4580
4580
|
return this.boundExpression.evaluate(e);
|
|
@@ -4585,7 +4585,7 @@ class zt {
|
|
|
4585
4585
|
return !1;
|
|
4586
4586
|
}
|
|
4587
4587
|
}
|
|
4588
|
-
class
|
|
4588
|
+
class Lr {
|
|
4589
4589
|
constructor(e, t, n) {
|
|
4590
4590
|
this.type = e, this.index = t, this.input = n;
|
|
4591
4591
|
}
|
|
@@ -4596,7 +4596,7 @@ class kr {
|
|
|
4596
4596
|
if (!n || !a)
|
|
4597
4597
|
return null;
|
|
4598
4598
|
const o = a.type;
|
|
4599
|
-
return new
|
|
4599
|
+
return new Lr(o.itemType, n, a);
|
|
4600
4600
|
}
|
|
4601
4601
|
evaluate(e) {
|
|
4602
4602
|
const t = this.index.evaluate(e), n = this.input.evaluate(e);
|
|
@@ -4615,7 +4615,7 @@ class kr {
|
|
|
4615
4615
|
return !1;
|
|
4616
4616
|
}
|
|
4617
4617
|
}
|
|
4618
|
-
class
|
|
4618
|
+
class Er {
|
|
4619
4619
|
constructor(e, t) {
|
|
4620
4620
|
this.type = A, this.needle = e, this.haystack = t;
|
|
4621
4621
|
}
|
|
@@ -4623,7 +4623,7 @@ class Cr {
|
|
|
4623
4623
|
if (e.length !== 3)
|
|
4624
4624
|
return t.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
|
|
4625
4625
|
const n = t.parse(e[1], 1, _), a = t.parse(e[2], 2, _);
|
|
4626
|
-
return !n || !a ? null :
|
|
4626
|
+
return !n || !a ? null : kr(n.type, [A, M, b, Tt, _]) ? new Er(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${j(n.type)} instead`);
|
|
4627
4627
|
}
|
|
4628
4628
|
evaluate(e) {
|
|
4629
4629
|
const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
|
|
@@ -4642,7 +4642,7 @@ class Cr {
|
|
|
4642
4642
|
return !0;
|
|
4643
4643
|
}
|
|
4644
4644
|
}
|
|
4645
|
-
class
|
|
4645
|
+
class bt {
|
|
4646
4646
|
constructor(e, t, n) {
|
|
4647
4647
|
this.type = b, this.needle = e, this.haystack = t, this.fromIndex = n;
|
|
4648
4648
|
}
|
|
@@ -4652,13 +4652,13 @@ class vt {
|
|
|
4652
4652
|
const n = t.parse(e[1], 1, _), a = t.parse(e[2], 2, _);
|
|
4653
4653
|
if (!n || !a)
|
|
4654
4654
|
return null;
|
|
4655
|
-
if (!
|
|
4655
|
+
if (!kr(n.type, [A, M, b, Tt, _]))
|
|
4656
4656
|
return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${j(n.type)} instead`);
|
|
4657
4657
|
if (e.length === 4) {
|
|
4658
4658
|
const o = t.parse(e[3], 3, b);
|
|
4659
|
-
return o ? new
|
|
4659
|
+
return o ? new bt(n, a, o) : null;
|
|
4660
4660
|
} else
|
|
4661
|
-
return new
|
|
4661
|
+
return new bt(n, a);
|
|
4662
4662
|
}
|
|
4663
4663
|
evaluate(e) {
|
|
4664
4664
|
const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
|
|
@@ -4681,7 +4681,7 @@ class vt {
|
|
|
4681
4681
|
return !1;
|
|
4682
4682
|
}
|
|
4683
4683
|
}
|
|
4684
|
-
class
|
|
4684
|
+
class Tr {
|
|
4685
4685
|
constructor(e, t, n, a, o, i) {
|
|
4686
4686
|
this.inputType = e, this.type = t, this.input = n, this.cases = a, this.outputs = o, this.otherwise = i;
|
|
4687
4687
|
}
|
|
@@ -4724,7 +4724,7 @@ class Lr {
|
|
|
4724
4724
|
if (!s)
|
|
4725
4725
|
return null;
|
|
4726
4726
|
const l = t.parse(e[e.length - 1], e.length - 1, a);
|
|
4727
|
-
return !l || s.type.kind !== "value" && t.concat(1).checkSubtype(n, s.type) ? null : new
|
|
4727
|
+
return !l || s.type.kind !== "value" && t.concat(1).checkSubtype(n, s.type) ? null : new Tr(n, a, s, o, i, l);
|
|
4728
4728
|
}
|
|
4729
4729
|
evaluate(e) {
|
|
4730
4730
|
const t = this.input.evaluate(e);
|
|
@@ -4737,7 +4737,7 @@ class Lr {
|
|
|
4737
4737
|
return this.outputs.every((e) => e.outputDefined()) && this.otherwise.outputDefined();
|
|
4738
4738
|
}
|
|
4739
4739
|
}
|
|
4740
|
-
class
|
|
4740
|
+
class Ar {
|
|
4741
4741
|
constructor(e, t, n) {
|
|
4742
4742
|
this.type = e, this.branches = t, this.otherwise = n;
|
|
4743
4743
|
}
|
|
@@ -4763,7 +4763,7 @@ class Er {
|
|
|
4763
4763
|
return null;
|
|
4764
4764
|
if (!n)
|
|
4765
4765
|
throw new Error("Can't infer output type");
|
|
4766
|
-
return new
|
|
4766
|
+
return new Ar(n, a, o);
|
|
4767
4767
|
}
|
|
4768
4768
|
evaluate(e) {
|
|
4769
4769
|
for (const [t, n] of this.branches)
|
|
@@ -4780,7 +4780,7 @@ class Er {
|
|
|
4780
4780
|
return this.branches.every(([e, t]) => t.outputDefined()) && this.otherwise.outputDefined();
|
|
4781
4781
|
}
|
|
4782
4782
|
}
|
|
4783
|
-
class
|
|
4783
|
+
class wt {
|
|
4784
4784
|
constructor(e, t, n, a) {
|
|
4785
4785
|
this.type = e, this.input = t, this.beginIndex = n, this.endIndex = a;
|
|
4786
4786
|
}
|
|
@@ -4790,13 +4790,13 @@ class bt {
|
|
|
4790
4790
|
const n = t.parse(e[1], 1, _), a = t.parse(e[2], 2, b);
|
|
4791
4791
|
if (!n || !a)
|
|
4792
4792
|
return null;
|
|
4793
|
-
if (!
|
|
4793
|
+
if (!kr(n.type, [Z(_), M, _]))
|
|
4794
4794
|
return t.error(`Expected first argument to be of type array or string, but found ${j(n.type)} instead`);
|
|
4795
4795
|
if (e.length === 4) {
|
|
4796
4796
|
const o = t.parse(e[3], 3, b);
|
|
4797
|
-
return o ? new
|
|
4797
|
+
return o ? new wt(n.type, n, a, o) : null;
|
|
4798
4798
|
} else
|
|
4799
|
-
return new
|
|
4799
|
+
return new wt(n.type, n, a);
|
|
4800
4800
|
}
|
|
4801
4801
|
evaluate(e) {
|
|
4802
4802
|
const t = this.input.evaluate(e), n = this.beginIndex.evaluate(e);
|
|
@@ -4814,7 +4814,7 @@ class bt {
|
|
|
4814
4814
|
return !1;
|
|
4815
4815
|
}
|
|
4816
4816
|
}
|
|
4817
|
-
function
|
|
4817
|
+
function ca(r, e) {
|
|
4818
4818
|
const t = r.length - 1;
|
|
4819
4819
|
let n = 0, a = t, o = 0, i, s;
|
|
4820
4820
|
for (; n <= a; )
|
|
@@ -4828,7 +4828,7 @@ function ua(r, e) {
|
|
|
4828
4828
|
throw new D("Input is not a number.");
|
|
4829
4829
|
return 0;
|
|
4830
4830
|
}
|
|
4831
|
-
class
|
|
4831
|
+
class Ft {
|
|
4832
4832
|
constructor(e, t, n) {
|
|
4833
4833
|
this.type = e, this.input = t, this.labels = [], this.outputs = [];
|
|
4834
4834
|
for (const [a, o] of n)
|
|
@@ -4856,7 +4856,7 @@ class $t {
|
|
|
4856
4856
|
return null;
|
|
4857
4857
|
o = o || p.type, a.push([s, p]);
|
|
4858
4858
|
}
|
|
4859
|
-
return new
|
|
4859
|
+
return new Ft(o, n, a);
|
|
4860
4860
|
}
|
|
4861
4861
|
evaluate(e) {
|
|
4862
4862
|
const t = this.labels, n = this.outputs;
|
|
@@ -4868,7 +4868,7 @@ class $t {
|
|
|
4868
4868
|
const o = t.length;
|
|
4869
4869
|
if (a >= t[o - 1])
|
|
4870
4870
|
return n[o - 1].evaluate(e);
|
|
4871
|
-
const i =
|
|
4871
|
+
const i = ca(t, a);
|
|
4872
4872
|
return n[i].evaluate(e);
|
|
4873
4873
|
}
|
|
4874
4874
|
eachChild(e) {
|
|
@@ -4883,10 +4883,10 @@ class $t {
|
|
|
4883
4883
|
function Ui(r) {
|
|
4884
4884
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
4885
4885
|
}
|
|
4886
|
-
var
|
|
4886
|
+
var Yt, cn;
|
|
4887
4887
|
function Di() {
|
|
4888
|
-
if (
|
|
4889
|
-
|
|
4888
|
+
if (cn) return Yt;
|
|
4889
|
+
cn = 1, Yt = r;
|
|
4890
4890
|
function r(e, t, n, a) {
|
|
4891
4891
|
this.cx = 3 * e, this.bx = 3 * (n - e) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * t, this.by = 3 * (a - t) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = e, this.p1y = t, this.p2x = n, this.p2y = a;
|
|
4892
4892
|
}
|
|
@@ -4918,7 +4918,7 @@ function Di() {
|
|
|
4918
4918
|
solve: function(e, t) {
|
|
4919
4919
|
return this.sampleCurveY(this.solveCurveX(e, t));
|
|
4920
4920
|
}
|
|
4921
|
-
},
|
|
4921
|
+
}, Yt;
|
|
4922
4922
|
}
|
|
4923
4923
|
var Bi = Di(), qi = /* @__PURE__ */ Ui(Bi);
|
|
4924
4924
|
class ce {
|
|
@@ -4930,12 +4930,12 @@ class ce {
|
|
|
4930
4930
|
static interpolationFactor(e, t, n, a) {
|
|
4931
4931
|
let o = 0;
|
|
4932
4932
|
if (e.name === "exponential")
|
|
4933
|
-
o =
|
|
4933
|
+
o = Jt(t, e.base, n, a);
|
|
4934
4934
|
else if (e.name === "linear")
|
|
4935
|
-
o =
|
|
4935
|
+
o = Jt(t, 1, n, a);
|
|
4936
4936
|
else if (e.name === "cubic-bezier") {
|
|
4937
4937
|
const i = e.controlPoints;
|
|
4938
|
-
o = new qi(i[0], i[1], i[2], i[3]).solve(
|
|
4938
|
+
o = new qi(i[0], i[1], i[2], i[3]).solve(Jt(t, 1, n, a));
|
|
4939
4939
|
}
|
|
4940
4940
|
return o;
|
|
4941
4941
|
}
|
|
@@ -4983,7 +4983,7 @@ class ce {
|
|
|
4983
4983
|
return null;
|
|
4984
4984
|
l = l || h.type, s.push([c, h]);
|
|
4985
4985
|
}
|
|
4986
|
-
return !$e(l, b) && !$e(l,
|
|
4986
|
+
return !$e(l, b) && !$e(l, At) && !$e(l, ue) && !$e(l, It) && !$e(l, Pt) && !$e(l, Z(b)) ? t.error(`Type ${j(l)} is not interpolatable.`) : new ce(l, n, a, o, s);
|
|
4987
4987
|
}
|
|
4988
4988
|
evaluate(e) {
|
|
4989
4989
|
const t = this.labels, n = this.outputs;
|
|
@@ -4995,7 +4995,7 @@ class ce {
|
|
|
4995
4995
|
const o = t.length;
|
|
4996
4996
|
if (a >= t[o - 1])
|
|
4997
4997
|
return n[o - 1].evaluate(e);
|
|
4998
|
-
const i =
|
|
4998
|
+
const i = ca(t, a), s = t[i], l = t[i + 1], u = ce.interpolationFactor(this.interpolation, a, s, l), c = n[i].evaluate(e), p = n[i + 1].evaluate(e);
|
|
4999
4999
|
switch (this.operator) {
|
|
5000
5000
|
case "interpolate":
|
|
5001
5001
|
switch (this.type.kind) {
|
|
@@ -5027,7 +5027,7 @@ class ce {
|
|
|
5027
5027
|
return this.outputs.every((e) => e.outputDefined());
|
|
5028
5028
|
}
|
|
5029
5029
|
}
|
|
5030
|
-
function
|
|
5030
|
+
function Jt(r, e, t, n) {
|
|
5031
5031
|
const a = n - t, o = r - t;
|
|
5032
5032
|
return a === 0 ? 0 : e === 1 ? o / a : (Math.pow(e, o) - 1) / (Math.pow(e, a) - 1);
|
|
5033
5033
|
}
|
|
@@ -5067,7 +5067,7 @@ class et {
|
|
|
5067
5067
|
return this.args.every((e) => e.outputDefined());
|
|
5068
5068
|
}
|
|
5069
5069
|
}
|
|
5070
|
-
function
|
|
5070
|
+
function pn(r, e) {
|
|
5071
5071
|
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";
|
|
5072
5072
|
}
|
|
5073
5073
|
function Gi(r, e, t) {
|
|
@@ -5088,11 +5088,11 @@ function Xi(r, e, t) {
|
|
|
5088
5088
|
function Zi(r, e, t) {
|
|
5089
5089
|
return e >= t;
|
|
5090
5090
|
}
|
|
5091
|
-
function
|
|
5091
|
+
function pa(r, e, t, n) {
|
|
5092
5092
|
return n.compare(e, t) === 0;
|
|
5093
5093
|
}
|
|
5094
5094
|
function Wi(r, e, t, n) {
|
|
5095
|
-
return !
|
|
5095
|
+
return !pa(r, e, t, n);
|
|
5096
5096
|
}
|
|
5097
5097
|
function Yi(r, e, t, n) {
|
|
5098
5098
|
return n.compare(e, t) < 0;
|
|
@@ -5108,7 +5108,7 @@ function es(r, e, t, n) {
|
|
|
5108
5108
|
}
|
|
5109
5109
|
function qe(r, e, t) {
|
|
5110
5110
|
const n = r !== "==" && r !== "!=";
|
|
5111
|
-
return class
|
|
5111
|
+
return class fa {
|
|
5112
5112
|
constructor(o, i, s) {
|
|
5113
5113
|
this.type = A, this.lhs = o, this.rhs = i, this.collator = s, this.hasUntypedArgument = o.type.kind === "value" || i.type.kind === "value";
|
|
5114
5114
|
}
|
|
@@ -5119,12 +5119,12 @@ function qe(r, e, t) {
|
|
|
5119
5119
|
let l = i.parse(o[1], 1, _);
|
|
5120
5120
|
if (!l)
|
|
5121
5121
|
return null;
|
|
5122
|
-
if (!
|
|
5122
|
+
if (!pn(s, l.type))
|
|
5123
5123
|
return i.concat(1).error(`"${s}" comparisons are not supported for type '${j(l.type)}'.`);
|
|
5124
5124
|
let u = i.parse(o[2], 2, _);
|
|
5125
5125
|
if (!u)
|
|
5126
5126
|
return null;
|
|
5127
|
-
if (!
|
|
5127
|
+
if (!pn(s, u.type))
|
|
5128
5128
|
return i.concat(2).error(`"${s}" comparisons are not supported for type '${j(u.type)}'.`);
|
|
5129
5129
|
if (l.type.kind !== u.type.kind && l.type.kind !== "value" && u.type.kind !== "value")
|
|
5130
5130
|
return i.error(`Cannot compare types '${j(l.type)}' and '${j(u.type)}'.`);
|
|
@@ -5133,10 +5133,10 @@ function qe(r, e, t) {
|
|
|
5133
5133
|
if (o.length === 4) {
|
|
5134
5134
|
if (l.type.kind !== "string" && u.type.kind !== "string" && l.type.kind !== "value" && u.type.kind !== "value")
|
|
5135
5135
|
return i.error("Cannot use collator to compare non-string types.");
|
|
5136
|
-
if (c = i.parse(o[3], 3,
|
|
5136
|
+
if (c = i.parse(o[3], 3, _t), !c)
|
|
5137
5137
|
return null;
|
|
5138
5138
|
}
|
|
5139
|
-
return new
|
|
5139
|
+
return new fa(l, u, c);
|
|
5140
5140
|
}
|
|
5141
5141
|
evaluate(o) {
|
|
5142
5142
|
const i = this.lhs.evaluate(o), s = this.rhs.evaluate(o);
|
|
@@ -5160,10 +5160,10 @@ function qe(r, e, t) {
|
|
|
5160
5160
|
}
|
|
5161
5161
|
};
|
|
5162
5162
|
}
|
|
5163
|
-
const ts = qe("==", Gi,
|
|
5164
|
-
class
|
|
5163
|
+
const ts = qe("==", Gi, pa), rs = qe("!=", Vi, Wi), ns = qe("<", Hi, Yi), as = qe(">", Ki, Ji), os = qe("<=", Xi, Qi), is = qe(">=", Zi, es);
|
|
5164
|
+
class Ot {
|
|
5165
5165
|
constructor(e, t, n) {
|
|
5166
|
-
this.type =
|
|
5166
|
+
this.type = _t, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
|
|
5167
5167
|
}
|
|
5168
5168
|
static parse(e, t) {
|
|
5169
5169
|
if (e.length !== 2)
|
|
@@ -5178,10 +5178,10 @@ class Ft {
|
|
|
5178
5178
|
if (!o)
|
|
5179
5179
|
return null;
|
|
5180
5180
|
let i = null;
|
|
5181
|
-
return n.locale && (i = t.parse(n.locale, 1, M), !i) ? null : new
|
|
5181
|
+
return n.locale && (i = t.parse(n.locale, 1, M), !i) ? null : new Ot(a, o, i);
|
|
5182
5182
|
}
|
|
5183
5183
|
evaluate(e) {
|
|
5184
|
-
return new
|
|
5184
|
+
return new Cr(this.caseSensitive.evaluate(e), this.diacriticSensitive.evaluate(e), this.locale ? this.locale.evaluate(e) : null);
|
|
5185
5185
|
}
|
|
5186
5186
|
eachChild(e) {
|
|
5187
5187
|
e(this.caseSensitive), e(this.diacriticSensitive), this.locale && e(this.locale);
|
|
@@ -5190,7 +5190,7 @@ class Ft {
|
|
|
5190
5190
|
return !1;
|
|
5191
5191
|
}
|
|
5192
5192
|
}
|
|
5193
|
-
class
|
|
5193
|
+
class _r {
|
|
5194
5194
|
constructor(e, t, n, a, o) {
|
|
5195
5195
|
this.type = M, this.number = e, this.locale = t, this.currency = n, this.minFractionDigits = a, this.maxFractionDigits = o;
|
|
5196
5196
|
}
|
|
@@ -5213,7 +5213,7 @@ class Tr {
|
|
|
5213
5213
|
if (a["min-fraction-digits"] && (s = t.parse(a["min-fraction-digits"], 1, b), !s))
|
|
5214
5214
|
return null;
|
|
5215
5215
|
let l = null;
|
|
5216
|
-
return a["max-fraction-digits"] && (l = t.parse(a["max-fraction-digits"], 1, b), !l) ? null : new
|
|
5216
|
+
return a["max-fraction-digits"] && (l = t.parse(a["max-fraction-digits"], 1, b), !l) ? null : new _r(n, o, i, s, l);
|
|
5217
5217
|
}
|
|
5218
5218
|
evaluate(e) {
|
|
5219
5219
|
return new Intl.NumberFormat(this.locale ? this.locale.evaluate(e) : [], {
|
|
@@ -5230,9 +5230,9 @@ class Tr {
|
|
|
5230
5230
|
return !1;
|
|
5231
5231
|
}
|
|
5232
5232
|
}
|
|
5233
|
-
class
|
|
5233
|
+
class Mr {
|
|
5234
5234
|
constructor(e) {
|
|
5235
|
-
this.type =
|
|
5235
|
+
this.type = Mt, this.sections = e;
|
|
5236
5236
|
}
|
|
5237
5237
|
static parse(e, t) {
|
|
5238
5238
|
if (e.length < 2)
|
|
@@ -5267,12 +5267,12 @@ class Ar {
|
|
|
5267
5267
|
o = !0, a.push({ content: l, scale: null, font: null, textColor: null });
|
|
5268
5268
|
}
|
|
5269
5269
|
}
|
|
5270
|
-
return new
|
|
5270
|
+
return new Mr(a);
|
|
5271
5271
|
}
|
|
5272
5272
|
evaluate(e) {
|
|
5273
5273
|
const t = (n) => {
|
|
5274
5274
|
const a = n.content.evaluate(e);
|
|
5275
|
-
return B(a) === it ? new
|
|
5275
|
+
return B(a) === it ? new fr("", a, null, null, null) : new fr(Xe(a), null, n.scale ? n.scale.evaluate(e) : null, n.font ? n.font.evaluate(e).join(",") : null, n.textColor ? n.textColor.evaluate(e) : null);
|
|
5276
5276
|
};
|
|
5277
5277
|
return new he(this.sections.map(t));
|
|
5278
5278
|
}
|
|
@@ -5284,7 +5284,7 @@ class Ar {
|
|
|
5284
5284
|
return !1;
|
|
5285
5285
|
}
|
|
5286
5286
|
}
|
|
5287
|
-
class
|
|
5287
|
+
class Ir {
|
|
5288
5288
|
constructor(e) {
|
|
5289
5289
|
this.type = it, this.input = e;
|
|
5290
5290
|
}
|
|
@@ -5292,7 +5292,7 @@ class _r {
|
|
|
5292
5292
|
if (e.length !== 2)
|
|
5293
5293
|
return t.error("Expected two arguments.");
|
|
5294
5294
|
const n = t.parse(e[1], 1, M);
|
|
5295
|
-
return n ? new
|
|
5295
|
+
return n ? new Ir(n) : t.error("No image name provided.");
|
|
5296
5296
|
}
|
|
5297
5297
|
evaluate(e) {
|
|
5298
5298
|
const t = this.input.evaluate(e), n = Se.fromString(t);
|
|
@@ -5305,7 +5305,7 @@ class _r {
|
|
|
5305
5305
|
return !1;
|
|
5306
5306
|
}
|
|
5307
5307
|
}
|
|
5308
|
-
class
|
|
5308
|
+
class Pr {
|
|
5309
5309
|
constructor(e) {
|
|
5310
5310
|
this.type = b, this.input = e;
|
|
5311
5311
|
}
|
|
@@ -5313,7 +5313,7 @@ class Mr {
|
|
|
5313
5313
|
if (e.length !== 2)
|
|
5314
5314
|
return t.error(`Expected 1 argument, but found ${e.length - 1} instead.`);
|
|
5315
5315
|
const n = t.parse(e[1], 1);
|
|
5316
|
-
return n ? n.type.kind !== "array" && n.type.kind !== "string" && n.type.kind !== "value" ? t.error(`Expected argument of type string or array, but found ${j(n.type)} instead.`) : new
|
|
5316
|
+
return n ? n.type.kind !== "array" && n.type.kind !== "string" && n.type.kind !== "value" ? t.error(`Expected argument of type string or array, but found ${j(n.type)} instead.`) : new Pr(n) : null;
|
|
5317
5317
|
}
|
|
5318
5318
|
evaluate(e) {
|
|
5319
5319
|
const t = this.input.evaluate(e);
|
|
@@ -5335,7 +5335,7 @@ function ss(r, e) {
|
|
|
5335
5335
|
const t = ls(r[0]), n = cs(r[1]), a = Math.pow(2, e.z);
|
|
5336
5336
|
return [Math.round(t * a * pe), Math.round(n * a * pe)];
|
|
5337
5337
|
}
|
|
5338
|
-
function
|
|
5338
|
+
function Rr(r, e) {
|
|
5339
5339
|
const t = Math.pow(2, e.z), n = (r[0] / pe + e.x) / t, a = (r[1] / pe + e.y) / t;
|
|
5340
5340
|
return [us(n), ps(a)];
|
|
5341
5341
|
}
|
|
@@ -5364,14 +5364,14 @@ function ds(r, e, t) {
|
|
|
5364
5364
|
const n = r[0] - e[0], a = r[1] - e[1], o = r[0] - t[0], i = r[1] - t[1];
|
|
5365
5365
|
return n * i - o * a === 0 && n * o <= 0 && a * i <= 0;
|
|
5366
5366
|
}
|
|
5367
|
-
function
|
|
5367
|
+
function jt(r, e, t, n) {
|
|
5368
5368
|
const a = [e[0] - r[0], e[1] - r[1]], o = [n[0] - t[0], n[1] - t[1]];
|
|
5369
|
-
return gs(o, a) === 0 ? !1 : !!(
|
|
5369
|
+
return gs(o, a) === 0 ? !1 : !!(fn(r, e, t, n) && fn(t, n, r, e));
|
|
5370
5370
|
}
|
|
5371
5371
|
function hs(r, e, t) {
|
|
5372
5372
|
for (const n of t)
|
|
5373
5373
|
for (let a = 0; a < n.length - 1; ++a)
|
|
5374
|
-
if (
|
|
5374
|
+
if (jt(r, e, n[a], n[a + 1]))
|
|
5375
5375
|
return !0;
|
|
5376
5376
|
return !1;
|
|
5377
5377
|
}
|
|
@@ -5391,7 +5391,7 @@ function ys(r, e) {
|
|
|
5391
5391
|
return !0;
|
|
5392
5392
|
return !1;
|
|
5393
5393
|
}
|
|
5394
|
-
function
|
|
5394
|
+
function da(r, e) {
|
|
5395
5395
|
for (const t of r)
|
|
5396
5396
|
if (!Ge(t, e))
|
|
5397
5397
|
return !1;
|
|
@@ -5402,18 +5402,18 @@ function fa(r, e) {
|
|
|
5402
5402
|
}
|
|
5403
5403
|
function ms(r, e) {
|
|
5404
5404
|
for (const t of e)
|
|
5405
|
-
if (
|
|
5405
|
+
if (da(r, t))
|
|
5406
5406
|
return !0;
|
|
5407
5407
|
return !1;
|
|
5408
5408
|
}
|
|
5409
5409
|
function gs(r, e) {
|
|
5410
5410
|
return r[0] * e[1] - r[1] * e[0];
|
|
5411
5411
|
}
|
|
5412
|
-
function
|
|
5412
|
+
function fn(r, e, t, n) {
|
|
5413
5413
|
const a = r[0] - t[0], o = r[1] - t[1], i = e[0] - t[0], s = e[1] - t[1], l = n[0] - t[0], u = n[1] - t[1], c = a * u - l * o, p = i * u - l * s;
|
|
5414
5414
|
return c > 0 && p < 0 || c < 0 && p > 0;
|
|
5415
5415
|
}
|
|
5416
|
-
function
|
|
5416
|
+
function zr(r, e, t) {
|
|
5417
5417
|
const n = [];
|
|
5418
5418
|
for (let a = 0; a < r.length; a++) {
|
|
5419
5419
|
const o = [];
|
|
@@ -5425,15 +5425,15 @@ function Pr(r, e, t) {
|
|
|
5425
5425
|
}
|
|
5426
5426
|
return n;
|
|
5427
5427
|
}
|
|
5428
|
-
function
|
|
5428
|
+
function ha(r, e, t) {
|
|
5429
5429
|
const n = [];
|
|
5430
5430
|
for (let a = 0; a < r.length; a++) {
|
|
5431
|
-
const o =
|
|
5431
|
+
const o = zr(r[a], e, t);
|
|
5432
5432
|
n.push(o);
|
|
5433
5433
|
}
|
|
5434
5434
|
return n;
|
|
5435
5435
|
}
|
|
5436
|
-
function
|
|
5436
|
+
function ya(r, e, t, n) {
|
|
5437
5437
|
if (r[0] < t[0] || r[0] > t[2]) {
|
|
5438
5438
|
const a = n * 0.5;
|
|
5439
5439
|
let o = r[0] - t[0] > a ? -n : t[0] - r[0] > a ? n : 0;
|
|
@@ -5444,16 +5444,16 @@ function ha(r, e, t, n) {
|
|
|
5444
5444
|
function vs(r) {
|
|
5445
5445
|
r[0] = r[1] = 1 / 0, r[2] = r[3] = -1 / 0;
|
|
5446
5446
|
}
|
|
5447
|
-
function
|
|
5447
|
+
function dn(r, e, t, n) {
|
|
5448
5448
|
const a = Math.pow(2, n.z) * pe, o = [n.x * pe, n.y * pe], i = [];
|
|
5449
5449
|
for (const s of r)
|
|
5450
5450
|
for (const l of s) {
|
|
5451
5451
|
const u = [l.x + o[0], l.y + o[1]];
|
|
5452
|
-
|
|
5452
|
+
ya(u, e, t, a), i.push(u);
|
|
5453
5453
|
}
|
|
5454
5454
|
return i;
|
|
5455
5455
|
}
|
|
5456
|
-
function
|
|
5456
|
+
function hn(r, e, t, n) {
|
|
5457
5457
|
const a = Math.pow(2, n.z) * pe, o = [n.x * pe, n.y * pe], i = [];
|
|
5458
5458
|
for (const s of r) {
|
|
5459
5459
|
const l = [];
|
|
@@ -5467,14 +5467,14 @@ function fn(r, e, t, n) {
|
|
|
5467
5467
|
vs(e);
|
|
5468
5468
|
for (const s of i)
|
|
5469
5469
|
for (const l of s)
|
|
5470
|
-
|
|
5470
|
+
ya(l, e, t, a);
|
|
5471
5471
|
}
|
|
5472
5472
|
return i;
|
|
5473
5473
|
}
|
|
5474
5474
|
function bs(r, e) {
|
|
5475
5475
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
|
|
5476
5476
|
if (e.type === "Polygon") {
|
|
5477
|
-
const o =
|
|
5477
|
+
const o = zr(e.coordinates, n, a), i = dn(r.geometry(), t, n, a);
|
|
5478
5478
|
if (!tt(t, n))
|
|
5479
5479
|
return !1;
|
|
5480
5480
|
for (const s of i)
|
|
@@ -5482,7 +5482,7 @@ function bs(r, e) {
|
|
|
5482
5482
|
return !1;
|
|
5483
5483
|
}
|
|
5484
5484
|
if (e.type === "MultiPolygon") {
|
|
5485
|
-
const o =
|
|
5485
|
+
const o = ha(e.coordinates, n, a), i = dn(r.geometry(), t, n, a);
|
|
5486
5486
|
if (!tt(t, n))
|
|
5487
5487
|
return !1;
|
|
5488
5488
|
for (const s of i)
|
|
@@ -5494,15 +5494,15 @@ function bs(r, e) {
|
|
|
5494
5494
|
function ws(r, e) {
|
|
5495
5495
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
|
|
5496
5496
|
if (e.type === "Polygon") {
|
|
5497
|
-
const o =
|
|
5497
|
+
const o = zr(e.coordinates, n, a), i = hn(r.geometry(), t, n, a);
|
|
5498
5498
|
if (!tt(t, n))
|
|
5499
5499
|
return !1;
|
|
5500
5500
|
for (const s of i)
|
|
5501
|
-
if (!
|
|
5501
|
+
if (!da(s, o))
|
|
5502
5502
|
return !1;
|
|
5503
5503
|
}
|
|
5504
5504
|
if (e.type === "MultiPolygon") {
|
|
5505
|
-
const o =
|
|
5505
|
+
const o = ha(e.coordinates, n, a), i = hn(r.geometry(), t, n, a);
|
|
5506
5506
|
if (!tt(t, n))
|
|
5507
5507
|
return !1;
|
|
5508
5508
|
for (const s of i)
|
|
@@ -5557,7 +5557,7 @@ class _e {
|
|
|
5557
5557
|
return !0;
|
|
5558
5558
|
}
|
|
5559
5559
|
}
|
|
5560
|
-
class
|
|
5560
|
+
class ma {
|
|
5561
5561
|
constructor(e = [], t = (n, a) => n < a ? -1 : n > a ? 1 : 0) {
|
|
5562
5562
|
if (this.data = e, this.length = this.data.length, this.compare = t, this.length > 0)
|
|
5563
5563
|
for (let n = (this.length >> 1) - 1; n >= 0; n--) this._down(n);
|
|
@@ -5610,11 +5610,11 @@ function Ss(r) {
|
|
|
5610
5610
|
o = r[t], i = r[a], e += (i.x - o.x) * (o.y + i.y);
|
|
5611
5611
|
return e;
|
|
5612
5612
|
}
|
|
5613
|
-
const ks = 6378.137,
|
|
5614
|
-
class
|
|
5613
|
+
const ks = 6378.137, yn = 1 / 298.257223563, mn = yn * (2 - yn), gn = Math.PI / 180;
|
|
5614
|
+
class $r {
|
|
5615
5615
|
constructor(e) {
|
|
5616
|
-
const t =
|
|
5617
|
-
this.kx = t * o * n, this.ky = t * o * a * (1 -
|
|
5616
|
+
const t = gn * ks * 1e3, n = Math.cos(e * gn), a = 1 / (1 - mn * (1 - n * n)), o = Math.sqrt(a);
|
|
5617
|
+
this.kx = t * o * n, this.ky = t * o * a * (1 - mn);
|
|
5618
5618
|
}
|
|
5619
5619
|
/**
|
|
5620
5620
|
* Given two points of the form [longitude, latitude], returns the distance.
|
|
@@ -5664,20 +5664,20 @@ class Rr {
|
|
|
5664
5664
|
return e;
|
|
5665
5665
|
}
|
|
5666
5666
|
}
|
|
5667
|
-
const
|
|
5668
|
-
function
|
|
5667
|
+
const dr = 100, hr = 50;
|
|
5668
|
+
function ga(r, e) {
|
|
5669
5669
|
return e[0] - r[0];
|
|
5670
5670
|
}
|
|
5671
|
-
function
|
|
5671
|
+
function xt(r) {
|
|
5672
5672
|
return r[1] - r[0] + 1;
|
|
5673
5673
|
}
|
|
5674
5674
|
function me(r, e) {
|
|
5675
5675
|
return r[1] >= r[0] && r[1] < e;
|
|
5676
5676
|
}
|
|
5677
|
-
function
|
|
5677
|
+
function yr(r, e) {
|
|
5678
5678
|
if (r[0] > r[1])
|
|
5679
5679
|
return [null, null];
|
|
5680
|
-
const t =
|
|
5680
|
+
const t = xt(r);
|
|
5681
5681
|
if (e) {
|
|
5682
5682
|
if (t === 2)
|
|
5683
5683
|
return [r, null];
|
|
@@ -5695,7 +5695,7 @@ function hr(r, e) {
|
|
|
5695
5695
|
[r[0] + n + 1, r[1]]
|
|
5696
5696
|
];
|
|
5697
5697
|
}
|
|
5698
|
-
function
|
|
5698
|
+
function mr(r, e) {
|
|
5699
5699
|
if (!me(e, r.length))
|
|
5700
5700
|
return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
5701
5701
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
@@ -5703,18 +5703,18 @@ function yr(r, e) {
|
|
|
5703
5703
|
st(t, r[n]);
|
|
5704
5704
|
return t;
|
|
5705
5705
|
}
|
|
5706
|
-
function
|
|
5706
|
+
function gr(r) {
|
|
5707
5707
|
const e = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
5708
5708
|
for (const t of r)
|
|
5709
5709
|
for (const n of t)
|
|
5710
5710
|
st(e, n);
|
|
5711
5711
|
return e;
|
|
5712
5712
|
}
|
|
5713
|
-
function
|
|
5713
|
+
function vn(r) {
|
|
5714
5714
|
return r[0] !== -1 / 0 && r[1] !== -1 / 0 && r[2] !== 1 / 0 && r[3] !== 1 / 0;
|
|
5715
5715
|
}
|
|
5716
|
-
function
|
|
5717
|
-
if (!
|
|
5716
|
+
function Fr(r, e, t) {
|
|
5717
|
+
if (!vn(r) || !vn(e))
|
|
5718
5718
|
return NaN;
|
|
5719
5719
|
let n = 0, a = 0;
|
|
5720
5720
|
return r[2] < e[0] && (n = e[0] - r[2]), r[0] > e[2] && (n = r[0] - e[2]), r[1] > e[3] && (a = r[1] - e[3]), r[3] < e[1] && (a = e[1] - r[3]), t.distance([0, 0], [n, a]);
|
|
@@ -5723,7 +5723,7 @@ function Te(r, e, t) {
|
|
|
5723
5723
|
const n = t.pointOnLine(e, r);
|
|
5724
5724
|
return t.distance(r, n.point);
|
|
5725
5725
|
}
|
|
5726
|
-
function
|
|
5726
|
+
function Or(r, e, t, n, a) {
|
|
5727
5727
|
const o = Math.min(Te(r, [t, n], a), Te(e, [t, n], a)), i = Math.min(Te(t, [r, e], a), Te(n, [r, e], a));
|
|
5728
5728
|
return Math.min(o, i);
|
|
5729
5729
|
}
|
|
@@ -5735,9 +5735,9 @@ function Cs(r, e, t, n, a) {
|
|
|
5735
5735
|
const l = r[s], u = r[s + 1];
|
|
5736
5736
|
for (let c = n[0]; c < n[1]; ++c) {
|
|
5737
5737
|
const p = t[c], f = t[c + 1];
|
|
5738
|
-
if (
|
|
5738
|
+
if (jt(l, u, p, f))
|
|
5739
5739
|
return 0;
|
|
5740
|
-
i = Math.min(i,
|
|
5740
|
+
i = Math.min(i, Or(l, u, p, f, a));
|
|
5741
5741
|
}
|
|
5742
5742
|
}
|
|
5743
5743
|
return i;
|
|
@@ -5778,14 +5778,14 @@ function Ts(r, e, t, n) {
|
|
|
5778
5778
|
for (const l of t)
|
|
5779
5779
|
for (let u = 0, c = l.length, p = c - 1; u < c; p = u++) {
|
|
5780
5780
|
const f = l[p], d = l[u];
|
|
5781
|
-
if (
|
|
5781
|
+
if (jt(i, s, f, d))
|
|
5782
5782
|
return 0;
|
|
5783
|
-
a = Math.min(a,
|
|
5783
|
+
a = Math.min(a, Or(i, s, f, d, n));
|
|
5784
5784
|
}
|
|
5785
5785
|
}
|
|
5786
5786
|
return a;
|
|
5787
5787
|
}
|
|
5788
|
-
function
|
|
5788
|
+
function bn(r, e) {
|
|
5789
5789
|
for (const t of r)
|
|
5790
5790
|
for (const n of t)
|
|
5791
5791
|
if (Ge(n, e, !0))
|
|
@@ -5793,13 +5793,13 @@ function gn(r, e) {
|
|
|
5793
5793
|
return !1;
|
|
5794
5794
|
}
|
|
5795
5795
|
function As(r, e, t, n = 1 / 0) {
|
|
5796
|
-
const a =
|
|
5797
|
-
if (n !== 1 / 0 &&
|
|
5796
|
+
const a = gr(r), o = gr(e);
|
|
5797
|
+
if (n !== 1 / 0 && Fr(a, o, t) >= n)
|
|
5798
5798
|
return n;
|
|
5799
5799
|
if (tt(a, o)) {
|
|
5800
|
-
if (
|
|
5800
|
+
if (bn(r, e))
|
|
5801
5801
|
return 0;
|
|
5802
|
-
} else if (
|
|
5802
|
+
} else if (bn(e, r))
|
|
5803
5803
|
return 0;
|
|
5804
5804
|
let i = 1 / 0;
|
|
5805
5805
|
for (const s of r)
|
|
@@ -5808,36 +5808,36 @@ function As(r, e, t, n = 1 / 0) {
|
|
|
5808
5808
|
for (const d of e)
|
|
5809
5809
|
for (let h = 0, y = d.length, m = y - 1; h < y; m = h++) {
|
|
5810
5810
|
const w = d[m], v = d[h];
|
|
5811
|
-
if (
|
|
5811
|
+
if (jt(p, f, w, v))
|
|
5812
5812
|
return 0;
|
|
5813
|
-
i = Math.min(i,
|
|
5813
|
+
i = Math.min(i, Or(p, f, w, v, t));
|
|
5814
5814
|
}
|
|
5815
5815
|
}
|
|
5816
5816
|
return i;
|
|
5817
5817
|
}
|
|
5818
|
-
function
|
|
5818
|
+
function wn(r, e, t, n, a, o) {
|
|
5819
5819
|
if (!o)
|
|
5820
5820
|
return;
|
|
5821
|
-
const i =
|
|
5821
|
+
const i = Fr(mr(n, o), a, t);
|
|
5822
5822
|
i < e && r.push([i, o, [0, 0]]);
|
|
5823
5823
|
}
|
|
5824
5824
|
function ft(r, e, t, n, a, o, i) {
|
|
5825
5825
|
if (!o || !i)
|
|
5826
5826
|
return;
|
|
5827
|
-
const s =
|
|
5827
|
+
const s = Fr(mr(n, o), mr(a, i), t);
|
|
5828
5828
|
s < e && r.push([s, o, i]);
|
|
5829
5829
|
}
|
|
5830
|
-
function
|
|
5830
|
+
function St(r, e, t, n, a = 1 / 0) {
|
|
5831
5831
|
let o = Math.min(n.distance(r[0], t[0][0]), a);
|
|
5832
5832
|
if (o === 0)
|
|
5833
5833
|
return o;
|
|
5834
|
-
const i = new
|
|
5834
|
+
const i = new ma([[0, [0, r.length - 1], [0, 0]]], ga), s = gr(t);
|
|
5835
5835
|
for (; i.length > 0; ) {
|
|
5836
5836
|
const l = i.pop();
|
|
5837
5837
|
if (l[0] >= o)
|
|
5838
5838
|
continue;
|
|
5839
|
-
const u = l[1], c = e ?
|
|
5840
|
-
if (
|
|
5839
|
+
const u = l[1], c = e ? hr : dr;
|
|
5840
|
+
if (xt(u) <= c) {
|
|
5841
5841
|
if (!me(u, r.length))
|
|
5842
5842
|
return NaN;
|
|
5843
5843
|
if (e) {
|
|
@@ -5852,23 +5852,23 @@ function xt(r, e, t, n, a = 1 / 0) {
|
|
|
5852
5852
|
return 0;
|
|
5853
5853
|
}
|
|
5854
5854
|
} else {
|
|
5855
|
-
const p =
|
|
5856
|
-
|
|
5855
|
+
const p = yr(u, e);
|
|
5856
|
+
wn(i, o, n, r, s, p[0]), wn(i, o, n, r, s, p[1]);
|
|
5857
5857
|
}
|
|
5858
5858
|
}
|
|
5859
5859
|
return o;
|
|
5860
5860
|
}
|
|
5861
|
-
function
|
|
5861
|
+
function kt(r, e, t, n, a, o = 1 / 0) {
|
|
5862
5862
|
let i = Math.min(o, a.distance(r[0], t[0]));
|
|
5863
5863
|
if (i === 0)
|
|
5864
5864
|
return i;
|
|
5865
|
-
const s = new
|
|
5865
|
+
const s = new ma([[0, [0, r.length - 1], [0, t.length - 1]]], ga);
|
|
5866
5866
|
for (; s.length > 0; ) {
|
|
5867
5867
|
const l = s.pop();
|
|
5868
5868
|
if (l[0] >= i)
|
|
5869
5869
|
continue;
|
|
5870
|
-
const u = l[1], c = l[2], p = e ?
|
|
5871
|
-
if (
|
|
5870
|
+
const u = l[1], c = l[2], p = e ? hr : dr, f = n ? hr : dr;
|
|
5871
|
+
if (xt(u) <= p && xt(c) <= f) {
|
|
5872
5872
|
if (!me(u, r.length) && me(c, t.length))
|
|
5873
5873
|
return NaN;
|
|
5874
5874
|
let d;
|
|
@@ -5887,28 +5887,28 @@ function St(r, e, t, n, a, o = 1 / 0) {
|
|
|
5887
5887
|
} else
|
|
5888
5888
|
d = Ls(r, u, t, c, a), i = Math.min(i, d);
|
|
5889
5889
|
} else {
|
|
5890
|
-
const d =
|
|
5890
|
+
const d = yr(u, e), h = yr(c, n);
|
|
5891
5891
|
ft(s, i, a, r, t, d[0], h[0]), ft(s, i, a, r, t, d[0], h[1]), ft(s, i, a, r, t, d[1], h[0]), ft(s, i, a, r, t, d[1], h[1]);
|
|
5892
5892
|
}
|
|
5893
5893
|
}
|
|
5894
5894
|
return i;
|
|
5895
5895
|
}
|
|
5896
5896
|
function _s(r, e) {
|
|
5897
|
-
const t = r.geometry(), n = t.flat().map((i) =>
|
|
5897
|
+
const t = r.geometry(), n = t.flat().map((i) => Rr([i.x, i.y], r.canonical));
|
|
5898
5898
|
if (t.length === 0)
|
|
5899
5899
|
return NaN;
|
|
5900
|
-
const a = new
|
|
5900
|
+
const a = new $r(n[0][1]);
|
|
5901
5901
|
let o = 1 / 0;
|
|
5902
5902
|
for (const i of e) {
|
|
5903
5903
|
switch (i.type) {
|
|
5904
5904
|
case "Point":
|
|
5905
|
-
o = Math.min(o,
|
|
5905
|
+
o = Math.min(o, kt(n, !1, [i.coordinates], !1, a, o));
|
|
5906
5906
|
break;
|
|
5907
5907
|
case "LineString":
|
|
5908
|
-
o = Math.min(o,
|
|
5908
|
+
o = Math.min(o, kt(n, !1, i.coordinates, !0, a, o));
|
|
5909
5909
|
break;
|
|
5910
5910
|
case "Polygon":
|
|
5911
|
-
o = Math.min(o,
|
|
5911
|
+
o = Math.min(o, St(n, !1, i.coordinates, a, o));
|
|
5912
5912
|
break;
|
|
5913
5913
|
}
|
|
5914
5914
|
if (o === 0)
|
|
@@ -5917,21 +5917,21 @@ function _s(r, e) {
|
|
|
5917
5917
|
return o;
|
|
5918
5918
|
}
|
|
5919
5919
|
function Ms(r, e) {
|
|
5920
|
-
const t = r.geometry(), n = t.flat().map((i) =>
|
|
5920
|
+
const t = r.geometry(), n = t.flat().map((i) => Rr([i.x, i.y], r.canonical));
|
|
5921
5921
|
if (t.length === 0)
|
|
5922
5922
|
return NaN;
|
|
5923
|
-
const a = new
|
|
5923
|
+
const a = new $r(n[0][1]);
|
|
5924
5924
|
let o = 1 / 0;
|
|
5925
5925
|
for (const i of e) {
|
|
5926
5926
|
switch (i.type) {
|
|
5927
5927
|
case "Point":
|
|
5928
|
-
o = Math.min(o,
|
|
5928
|
+
o = Math.min(o, kt(n, !0, [i.coordinates], !1, a, o));
|
|
5929
5929
|
break;
|
|
5930
5930
|
case "LineString":
|
|
5931
|
-
o = Math.min(o,
|
|
5931
|
+
o = Math.min(o, kt(n, !0, i.coordinates, !0, a, o));
|
|
5932
5932
|
break;
|
|
5933
5933
|
case "Polygon":
|
|
5934
|
-
o = Math.min(o,
|
|
5934
|
+
o = Math.min(o, St(n, !0, i.coordinates, a, o));
|
|
5935
5935
|
break;
|
|
5936
5936
|
}
|
|
5937
5937
|
if (o === 0)
|
|
@@ -5943,16 +5943,16 @@ function Is(r, e) {
|
|
|
5943
5943
|
const t = r.geometry();
|
|
5944
5944
|
if (t.length === 0 || t[0].length === 0)
|
|
5945
5945
|
return NaN;
|
|
5946
|
-
const n = xs(t).map((i) => i.map((s) => s.map((l) =>
|
|
5946
|
+
const n = xs(t).map((i) => i.map((s) => s.map((l) => Rr([l.x, l.y], r.canonical)))), a = new $r(n[0][0][0][1]);
|
|
5947
5947
|
let o = 1 / 0;
|
|
5948
5948
|
for (const i of e)
|
|
5949
5949
|
for (const s of n) {
|
|
5950
5950
|
switch (i.type) {
|
|
5951
5951
|
case "Point":
|
|
5952
|
-
o = Math.min(o,
|
|
5952
|
+
o = Math.min(o, St([i.coordinates], !1, s, a, o));
|
|
5953
5953
|
break;
|
|
5954
5954
|
case "LineString":
|
|
5955
|
-
o = Math.min(o,
|
|
5955
|
+
o = Math.min(o, St(i.coordinates, !0, s, a, o));
|
|
5956
5956
|
break;
|
|
5957
5957
|
case "Polygon":
|
|
5958
5958
|
o = Math.min(o, As(s, i.coordinates, a, o));
|
|
@@ -5963,7 +5963,7 @@ function Is(r, e) {
|
|
|
5963
5963
|
}
|
|
5964
5964
|
return o;
|
|
5965
5965
|
}
|
|
5966
|
-
function
|
|
5966
|
+
function Qt(r) {
|
|
5967
5967
|
return r.type === "MultiPolygon" ? r.coordinates.map((e) => ({
|
|
5968
5968
|
type: "Polygon",
|
|
5969
5969
|
coordinates: e
|
|
@@ -5985,11 +5985,11 @@ class Me {
|
|
|
5985
5985
|
if (Qe(e[1])) {
|
|
5986
5986
|
const n = e[1];
|
|
5987
5987
|
if (n.type === "FeatureCollection")
|
|
5988
|
-
return new Me(n, n.features.map((a) =>
|
|
5988
|
+
return new Me(n, n.features.map((a) => Qt(a.geometry)).flat());
|
|
5989
5989
|
if (n.type === "Feature")
|
|
5990
|
-
return new Me(n,
|
|
5990
|
+
return new Me(n, Qt(n.geometry));
|
|
5991
5991
|
if ("type" in n && "coordinates" in n)
|
|
5992
|
-
return new Me(n,
|
|
5992
|
+
return new Me(n, Qt(n));
|
|
5993
5993
|
}
|
|
5994
5994
|
return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.");
|
|
5995
5995
|
}
|
|
@@ -6010,7 +6010,7 @@ class Me {
|
|
|
6010
6010
|
return !0;
|
|
6011
6011
|
}
|
|
6012
6012
|
}
|
|
6013
|
-
const
|
|
6013
|
+
const jr = {
|
|
6014
6014
|
// special forms
|
|
6015
6015
|
"==": ts,
|
|
6016
6016
|
"!=": rs,
|
|
@@ -6019,33 +6019,33 @@ const Fr = {
|
|
|
6019
6019
|
">=": is,
|
|
6020
6020
|
"<=": os,
|
|
6021
6021
|
array: oe,
|
|
6022
|
-
at:
|
|
6022
|
+
at: Lr,
|
|
6023
6023
|
boolean: oe,
|
|
6024
|
-
case:
|
|
6024
|
+
case: Ar,
|
|
6025
6025
|
coalesce: et,
|
|
6026
|
-
collator:
|
|
6027
|
-
format:
|
|
6028
|
-
image:
|
|
6029
|
-
in:
|
|
6030
|
-
"index-of":
|
|
6026
|
+
collator: Ot,
|
|
6027
|
+
format: Mr,
|
|
6028
|
+
image: Ir,
|
|
6029
|
+
in: Er,
|
|
6030
|
+
"index-of": bt,
|
|
6031
6031
|
interpolate: ce,
|
|
6032
6032
|
"interpolate-hcl": ce,
|
|
6033
6033
|
"interpolate-lab": ce,
|
|
6034
|
-
length:
|
|
6035
|
-
let:
|
|
6034
|
+
length: Pr,
|
|
6035
|
+
let: zt,
|
|
6036
6036
|
literal: De,
|
|
6037
|
-
match:
|
|
6037
|
+
match: Tr,
|
|
6038
6038
|
number: oe,
|
|
6039
|
-
"number-format":
|
|
6039
|
+
"number-format": _r,
|
|
6040
6040
|
object: oe,
|
|
6041
|
-
slice:
|
|
6042
|
-
step:
|
|
6041
|
+
slice: wt,
|
|
6042
|
+
step: Ft,
|
|
6043
6043
|
string: oe,
|
|
6044
6044
|
"to-boolean": we,
|
|
6045
6045
|
"to-color": we,
|
|
6046
6046
|
"to-number": we,
|
|
6047
6047
|
"to-string": we,
|
|
6048
|
-
var:
|
|
6048
|
+
var: $t,
|
|
6049
6049
|
within: _e,
|
|
6050
6050
|
distance: Me
|
|
6051
6051
|
};
|
|
@@ -6070,7 +6070,7 @@ class ie {
|
|
|
6070
6070
|
u.length === e.length - 1);
|
|
6071
6071
|
let l = null;
|
|
6072
6072
|
for (const [u, c] of s) {
|
|
6073
|
-
l = new
|
|
6073
|
+
l = new Rt(t.registry, Ct, t.path, null, t.scope);
|
|
6074
6074
|
const p = [];
|
|
6075
6075
|
let f = !1;
|
|
6076
6076
|
for (let d = 1; d < e.length; d++) {
|
|
@@ -6114,17 +6114,17 @@ class ie {
|
|
|
6114
6114
|
e[n] = ie;
|
|
6115
6115
|
}
|
|
6116
6116
|
}
|
|
6117
|
-
function
|
|
6117
|
+
function xn(r, [e, t, n, a]) {
|
|
6118
6118
|
e = e.evaluate(r), t = t.evaluate(r), n = n.evaluate(r);
|
|
6119
|
-
const o = a ? a.evaluate(r) : 1, i =
|
|
6119
|
+
const o = a ? a.evaluate(r) : 1, i = la(e, t, n, o);
|
|
6120
6120
|
if (i)
|
|
6121
6121
|
throw new D(i);
|
|
6122
6122
|
return new O(e / 255, t / 255, n / 255, o, !1);
|
|
6123
6123
|
}
|
|
6124
|
-
function
|
|
6124
|
+
function Sn(r, e) {
|
|
6125
6125
|
return r in e;
|
|
6126
6126
|
}
|
|
6127
|
-
function
|
|
6127
|
+
function er(r, e) {
|
|
6128
6128
|
const t = e[r];
|
|
6129
6129
|
return typeof t > "u" ? null : t;
|
|
6130
6130
|
}
|
|
@@ -6140,7 +6140,7 @@ function Ps(r, e, t, n) {
|
|
|
6140
6140
|
function Le(r) {
|
|
6141
6141
|
return { type: r };
|
|
6142
6142
|
}
|
|
6143
|
-
ie.register(
|
|
6143
|
+
ie.register(jr, {
|
|
6144
6144
|
error: [
|
|
6145
6145
|
Ai,
|
|
6146
6146
|
[M],
|
|
@@ -6164,23 +6164,23 @@ ie.register(Fr, {
|
|
|
6164
6164
|
rgb: [
|
|
6165
6165
|
ue,
|
|
6166
6166
|
[b, b, b],
|
|
6167
|
-
|
|
6167
|
+
xn
|
|
6168
6168
|
],
|
|
6169
6169
|
rgba: [
|
|
6170
6170
|
ue,
|
|
6171
6171
|
[b, b, b, b],
|
|
6172
|
-
|
|
6172
|
+
xn
|
|
6173
6173
|
],
|
|
6174
6174
|
has: {
|
|
6175
6175
|
type: A,
|
|
6176
6176
|
overloads: [
|
|
6177
6177
|
[
|
|
6178
6178
|
[M],
|
|
6179
|
-
(r, [e]) =>
|
|
6179
|
+
(r, [e]) => Sn(e.evaluate(r), r.properties())
|
|
6180
6180
|
],
|
|
6181
6181
|
[
|
|
6182
6182
|
[M, Ne],
|
|
6183
|
-
(r, [e, t]) =>
|
|
6183
|
+
(r, [e, t]) => Sn(e.evaluate(r), t.evaluate(r))
|
|
6184
6184
|
]
|
|
6185
6185
|
]
|
|
6186
6186
|
},
|
|
@@ -6189,18 +6189,18 @@ ie.register(Fr, {
|
|
|
6189
6189
|
overloads: [
|
|
6190
6190
|
[
|
|
6191
6191
|
[M],
|
|
6192
|
-
(r, [e]) =>
|
|
6192
|
+
(r, [e]) => er(e.evaluate(r), r.properties())
|
|
6193
6193
|
],
|
|
6194
6194
|
[
|
|
6195
6195
|
[M, Ne],
|
|
6196
|
-
(r, [e, t]) =>
|
|
6196
|
+
(r, [e, t]) => er(e.evaluate(r), t.evaluate(r))
|
|
6197
6197
|
]
|
|
6198
6198
|
]
|
|
6199
6199
|
},
|
|
6200
6200
|
"feature-state": [
|
|
6201
6201
|
_,
|
|
6202
6202
|
[M],
|
|
6203
|
-
(r, [e]) =>
|
|
6203
|
+
(r, [e]) => er(e.evaluate(r), r.featureState || {})
|
|
6204
6204
|
],
|
|
6205
6205
|
properties: [
|
|
6206
6206
|
Ne,
|
|
@@ -6561,19 +6561,19 @@ ie.register(Fr, {
|
|
|
6561
6561
|
],
|
|
6562
6562
|
"resolved-locale": [
|
|
6563
6563
|
M,
|
|
6564
|
-
[
|
|
6564
|
+
[_t],
|
|
6565
6565
|
(r, [e]) => e.evaluate(r).resolvedLocale()
|
|
6566
6566
|
]
|
|
6567
6567
|
});
|
|
6568
6568
|
function Rs(r) {
|
|
6569
6569
|
return Array.isArray(r) ? `(${r.map(j).join(", ")})` : `(${j(r.type)}...)`;
|
|
6570
6570
|
}
|
|
6571
|
-
function
|
|
6572
|
-
if (r instanceof
|
|
6573
|
-
return
|
|
6571
|
+
function Ct(r) {
|
|
6572
|
+
if (r instanceof $t)
|
|
6573
|
+
return Ct(r.boundExpression);
|
|
6574
6574
|
if (r instanceof ie && r.name === "error")
|
|
6575
6575
|
return !1;
|
|
6576
|
-
if (r instanceof
|
|
6576
|
+
if (r instanceof Ot)
|
|
6577
6577
|
return !1;
|
|
6578
6578
|
if (r instanceof _e)
|
|
6579
6579
|
return !1;
|
|
@@ -6582,10 +6582,10 @@ function kt(r) {
|
|
|
6582
6582
|
const e = r instanceof we || r instanceof oe;
|
|
6583
6583
|
let t = !0;
|
|
6584
6584
|
return r.eachChild((n) => {
|
|
6585
|
-
e ? t = t &&
|
|
6586
|
-
}), t ?
|
|
6585
|
+
e ? t = t && Ct(n) : t = t && n instanceof De;
|
|
6586
|
+
}), t ? Nt(r) && Ut(r, ["zoom", "heatmap-density", "line-progress", "accumulated", "is-supported-script"]) : !1;
|
|
6587
6587
|
}
|
|
6588
|
-
function
|
|
6588
|
+
function Nt(r) {
|
|
6589
6589
|
if (r instanceof ie) {
|
|
6590
6590
|
if (r.name === "get" && r.args.length === 1)
|
|
6591
6591
|
return !1;
|
|
@@ -6602,7 +6602,7 @@ function jt(r) {
|
|
|
6602
6602
|
return !1;
|
|
6603
6603
|
let e = !0;
|
|
6604
6604
|
return r.eachChild((t) => {
|
|
6605
|
-
e && !
|
|
6605
|
+
e && !Nt(t) && (e = !1);
|
|
6606
6606
|
}), e;
|
|
6607
6607
|
}
|
|
6608
6608
|
function rt(r) {
|
|
@@ -6613,38 +6613,38 @@ function rt(r) {
|
|
|
6613
6613
|
e && !rt(t) && (e = !1);
|
|
6614
6614
|
}), e;
|
|
6615
6615
|
}
|
|
6616
|
-
function
|
|
6616
|
+
function Ut(r, e) {
|
|
6617
6617
|
if (r instanceof ie && e.indexOf(r.name) >= 0)
|
|
6618
6618
|
return !1;
|
|
6619
6619
|
let t = !0;
|
|
6620
6620
|
return r.eachChild((n) => {
|
|
6621
|
-
t && !
|
|
6621
|
+
t && !Ut(n, e) && (t = !1);
|
|
6622
6622
|
}), t;
|
|
6623
6623
|
}
|
|
6624
|
-
function
|
|
6624
|
+
function vr(r) {
|
|
6625
6625
|
return { result: "success", value: r };
|
|
6626
6626
|
}
|
|
6627
6627
|
function je(r) {
|
|
6628
6628
|
return { result: "error", value: r };
|
|
6629
6629
|
}
|
|
6630
|
-
function
|
|
6630
|
+
function Lt(r) {
|
|
6631
6631
|
return r["property-type"] === "data-driven" || r["property-type"] === "cross-faded-data-driven";
|
|
6632
6632
|
}
|
|
6633
|
-
function
|
|
6633
|
+
function va(r) {
|
|
6634
6634
|
return !!r.expression && r.expression.parameters.indexOf("zoom") > -1;
|
|
6635
6635
|
}
|
|
6636
|
-
function
|
|
6636
|
+
function ba(r) {
|
|
6637
6637
|
return !!r.expression && r.expression.interpolated;
|
|
6638
6638
|
}
|
|
6639
6639
|
function R(r) {
|
|
6640
6640
|
return r instanceof Number ? "number" : r instanceof String ? "string" : r instanceof Boolean ? "boolean" : Array.isArray(r) ? "array" : r === null ? "null" : typeof r;
|
|
6641
6641
|
}
|
|
6642
|
-
function
|
|
6642
|
+
function Nr(r) {
|
|
6643
6643
|
return typeof r == "object" && r !== null && !Array.isArray(r);
|
|
6644
6644
|
}
|
|
6645
6645
|
class zs {
|
|
6646
6646
|
constructor(e, t) {
|
|
6647
|
-
this.expression = e, this._warningHistory = {}, this._evaluator = new
|
|
6647
|
+
this.expression = e, this._warningHistory = {}, this._evaluator = new ua(), this._defaultValue = t ? Os(t) : null, this._enumValues = t && t.type === "enum" ? t.values : null;
|
|
6648
6648
|
}
|
|
6649
6649
|
evaluateWithoutErrorHandling(e, t, n, a, o, i) {
|
|
6650
6650
|
return 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);
|
|
@@ -6663,14 +6663,14 @@ class zs {
|
|
|
6663
6663
|
}
|
|
6664
6664
|
}
|
|
6665
6665
|
}
|
|
6666
|
-
function
|
|
6667
|
-
return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in
|
|
6666
|
+
function wa(r) {
|
|
6667
|
+
return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in jr;
|
|
6668
6668
|
}
|
|
6669
|
-
function
|
|
6670
|
-
const t = new
|
|
6671
|
-
return n ?
|
|
6669
|
+
function xa(r, e) {
|
|
6670
|
+
const t = new Rt(jr, Ct, [], e ? Fs(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
|
|
6671
|
+
return n ? vr(new zs(n, e)) : je(t.errors);
|
|
6672
6672
|
}
|
|
6673
|
-
class
|
|
6673
|
+
class kn {
|
|
6674
6674
|
constructor(e, t) {
|
|
6675
6675
|
this.kind = e, this._styleExpression = t, this.isStateDependent = e !== "constant" && !rt(t.expression);
|
|
6676
6676
|
}
|
|
@@ -6681,7 +6681,7 @@ class xn {
|
|
|
6681
6681
|
return this._styleExpression.evaluate(e, t, n, a, o, i);
|
|
6682
6682
|
}
|
|
6683
6683
|
}
|
|
6684
|
-
class
|
|
6684
|
+
class Cn {
|
|
6685
6685
|
constructor(e, t, n, a) {
|
|
6686
6686
|
this.kind = e, this.zoomStops = n, this._styleExpression = t, this.isStateDependent = e !== "camera" && !rt(t.expression), this.interpolationType = a;
|
|
6687
6687
|
}
|
|
@@ -6696,38 +6696,38 @@ class Sn {
|
|
|
6696
6696
|
}
|
|
6697
6697
|
}
|
|
6698
6698
|
function $s(r, e) {
|
|
6699
|
-
const t =
|
|
6699
|
+
const t = xa(r, e);
|
|
6700
6700
|
if (t.result === "error")
|
|
6701
6701
|
return t;
|
|
6702
|
-
const n = t.value.expression, a =
|
|
6703
|
-
if (!a && !
|
|
6702
|
+
const n = t.value.expression, a = Nt(n);
|
|
6703
|
+
if (!a && !Lt(e))
|
|
6704
6704
|
return je([new le("", "data expressions not supported")]);
|
|
6705
|
-
const o =
|
|
6706
|
-
if (!o && !
|
|
6705
|
+
const o = Ut(n, ["zoom"]);
|
|
6706
|
+
if (!o && !va(e))
|
|
6707
6707
|
return je([new le("", "zoom expressions not supported")]);
|
|
6708
|
-
const i =
|
|
6708
|
+
const i = yt(n);
|
|
6709
6709
|
if (!i && !o)
|
|
6710
6710
|
return je([new le("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);
|
|
6711
6711
|
if (i instanceof le)
|
|
6712
6712
|
return je([i]);
|
|
6713
|
-
if (i instanceof ce && !
|
|
6713
|
+
if (i instanceof ce && !ba(e))
|
|
6714
6714
|
return je([new le("", '"interpolate" expressions cannot be used with this property')]);
|
|
6715
6715
|
if (!i)
|
|
6716
|
-
return
|
|
6716
|
+
return vr(a ? new kn("constant", t.value) : new kn("source", t.value));
|
|
6717
6717
|
const s = i instanceof ce ? i.interpolation : void 0;
|
|
6718
|
-
return
|
|
6718
|
+
return vr(a ? new Cn("camera", t.value, i.labels, s) : new Cn("composite", t.value, i.labels, s));
|
|
6719
6719
|
}
|
|
6720
|
-
function
|
|
6720
|
+
function yt(r) {
|
|
6721
6721
|
let e = null;
|
|
6722
|
-
if (r instanceof
|
|
6723
|
-
e =
|
|
6722
|
+
if (r instanceof zt)
|
|
6723
|
+
e = yt(r.result);
|
|
6724
6724
|
else if (r instanceof et) {
|
|
6725
6725
|
for (const t of r.args)
|
|
6726
|
-
if (e =
|
|
6726
|
+
if (e = yt(t), e)
|
|
6727
6727
|
break;
|
|
6728
|
-
} else (r instanceof
|
|
6728
|
+
} else (r instanceof Ft || r instanceof ce) && r.input instanceof ie && r.input.name === "zoom" && (e = r);
|
|
6729
6729
|
return e instanceof le || r.eachChild((t) => {
|
|
6730
|
-
const n =
|
|
6730
|
+
const n = yt(t);
|
|
6731
6731
|
n instanceof le ? e = n : !e && n ? e = new le("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') : e && n && e !== n && (e = new le("", 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'));
|
|
6732
6732
|
}), e;
|
|
6733
6733
|
}
|
|
@@ -6738,18 +6738,18 @@ function Fs(r) {
|
|
|
6738
6738
|
number: b,
|
|
6739
6739
|
enum: M,
|
|
6740
6740
|
boolean: A,
|
|
6741
|
-
formatted:
|
|
6742
|
-
padding:
|
|
6743
|
-
projectionDefinition:
|
|
6741
|
+
formatted: Mt,
|
|
6742
|
+
padding: It,
|
|
6743
|
+
projectionDefinition: At,
|
|
6744
6744
|
resolvedImage: it,
|
|
6745
|
-
variableAnchorOffsetCollection:
|
|
6745
|
+
variableAnchorOffsetCollection: Pt
|
|
6746
6746
|
};
|
|
6747
6747
|
return r.type === "array" ? Z(e[r.value] || _, r.length) : e[r.type];
|
|
6748
6748
|
}
|
|
6749
6749
|
function Os(r) {
|
|
6750
|
-
return r.type === "color" &&
|
|
6750
|
+
return r.type === "color" && Nr(r.default) ? new O(0, 0, 0, 0) : r.type === "color" ? O.parse(r.default) || null : r.type === "padding" ? Y.parse(r.default) || null : r.type === "variableAnchorOffsetCollection" ? se.parse(r.default) || null : r.type === "projectionDefinition" ? ae.parse(r.default) || null : r.default === void 0 ? null : r.default;
|
|
6751
6751
|
}
|
|
6752
|
-
function
|
|
6752
|
+
function Sa(r) {
|
|
6753
6753
|
if (r === !0 || r === !1)
|
|
6754
6754
|
return !0;
|
|
6755
6755
|
if (!Array.isArray(r) || r.length === 0)
|
|
@@ -6773,14 +6773,14 @@ function xa(r) {
|
|
|
6773
6773
|
case "any":
|
|
6774
6774
|
case "all":
|
|
6775
6775
|
for (const e of r.slice(1))
|
|
6776
|
-
if (!
|
|
6776
|
+
if (!Sa(e) && typeof e != "boolean")
|
|
6777
6777
|
return !1;
|
|
6778
6778
|
return !0;
|
|
6779
6779
|
default:
|
|
6780
6780
|
return !0;
|
|
6781
6781
|
}
|
|
6782
6782
|
}
|
|
6783
|
-
function
|
|
6783
|
+
function ka(r) {
|
|
6784
6784
|
const e = r.key, t = r.value;
|
|
6785
6785
|
return t ? [new g(e, t, "constants have been deprecated as of v8")] : [];
|
|
6786
6786
|
}
|
|
@@ -6834,7 +6834,7 @@ function J(r) {
|
|
|
6834
6834
|
a[c] || n[c].required && n[c].default === void 0 && t[c] === void 0 && l.push(new g(e, t, `missing required property "${c}"`));
|
|
6835
6835
|
return l;
|
|
6836
6836
|
}
|
|
6837
|
-
function
|
|
6837
|
+
function Ur(r) {
|
|
6838
6838
|
const e = r.value, t = r.valueSpec, n = r.validateSpec, a = r.style, o = r.styleSpec, i = r.key, s = r.arrayElementValidator || n;
|
|
6839
6839
|
if (R(e) !== "array")
|
|
6840
6840
|
return [new g(i, e, `array expected, ${R(e)} found`)];
|
|
@@ -6861,12 +6861,12 @@ function jr(r) {
|
|
|
6861
6861
|
}));
|
|
6862
6862
|
return u;
|
|
6863
6863
|
}
|
|
6864
|
-
function
|
|
6864
|
+
function Dr(r) {
|
|
6865
6865
|
const e = r.key, t = r.value, n = r.valueSpec;
|
|
6866
6866
|
let a = R(t);
|
|
6867
6867
|
return a === "number" && t !== t && (a = "NaN"), a !== "number" ? [new g(e, t, `number expected, ${a} found`)] : "minimum" in n && t < n.minimum ? [new g(e, t, `${t} is less than the minimum value ${n.minimum}`)] : "maximum" in n && t > n.maximum ? [new g(e, t, `${t} is greater than the maximum value ${n.maximum}`)] : [];
|
|
6868
6868
|
}
|
|
6869
|
-
function
|
|
6869
|
+
function Ca(r) {
|
|
6870
6870
|
const e = r.valueSpec, t = U(r.value.type);
|
|
6871
6871
|
let n, a = {}, o, i;
|
|
6872
6872
|
const s = t !== "categorical" && r.value.property === void 0, l = !s, u = R(r.value.stops) === "array" && R(r.value.stops[0]) === "array" && R(r.value.stops[0][0]) === "object", c = J({
|
|
@@ -6881,13 +6881,13 @@ function ka(r) {
|
|
|
6881
6881
|
default: h
|
|
6882
6882
|
}
|
|
6883
6883
|
});
|
|
6884
|
-
return t === "identity" && s && c.push(new g(r.key, r.value, 'missing required property "property"')), t !== "identity" && !r.value.stops && c.push(new g(r.key, r.value, 'missing required property "stops"')), t === "exponential" && r.valueSpec.expression && !
|
|
6884
|
+
return t === "identity" && s && c.push(new g(r.key, r.value, 'missing required property "property"')), t !== "identity" && !r.value.stops && c.push(new g(r.key, r.value, 'missing required property "stops"')), t === "exponential" && r.valueSpec.expression && !ba(r.valueSpec) && c.push(new g(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (l && !Lt(r.valueSpec) ? c.push(new g(r.key, r.value, "property functions not supported")) : s && !va(r.valueSpec) && c.push(new g(r.key, r.value, "zoom functions not supported"))), (t === "categorical" || u) && r.value.property === void 0 && c.push(new g(r.key, r.value, '"property" property is required')), c;
|
|
6885
6885
|
function p(y) {
|
|
6886
6886
|
if (t === "identity")
|
|
6887
6887
|
return [new g(y.key, y.value, 'identity function may not have a "stops" property')];
|
|
6888
6888
|
let m = [];
|
|
6889
6889
|
const w = y.value;
|
|
6890
|
-
return m = m.concat(
|
|
6890
|
+
return m = m.concat(Ur({
|
|
6891
6891
|
key: y.key,
|
|
6892
6892
|
value: w,
|
|
6893
6893
|
valueSpec: y.valueSpec,
|
|
@@ -6920,7 +6920,7 @@ function ka(r) {
|
|
|
6920
6920
|
validateSpec: y.validateSpec,
|
|
6921
6921
|
style: y.style,
|
|
6922
6922
|
styleSpec: y.styleSpec,
|
|
6923
|
-
objectElementValidators: { zoom:
|
|
6923
|
+
objectElementValidators: { zoom: Dr, value: d }
|
|
6924
6924
|
}));
|
|
6925
6925
|
} else
|
|
6926
6926
|
m = m.concat(d({
|
|
@@ -6931,7 +6931,7 @@ function ka(r) {
|
|
|
6931
6931
|
style: y.style,
|
|
6932
6932
|
styleSpec: y.styleSpec
|
|
6933
6933
|
}, w));
|
|
6934
|
-
return
|
|
6934
|
+
return wa(Re(w[1])) ? m.concat([new g(`${v}[1]`, w[1], "expressions are not allowed in function stops.")]) : m.concat(y.validateSpec({
|
|
6935
6935
|
key: `${v}[1]`,
|
|
6936
6936
|
value: w[1],
|
|
6937
6937
|
valueSpec: e,
|
|
@@ -6950,7 +6950,7 @@ function ka(r) {
|
|
|
6950
6950
|
return [new g(y.key, S, "stop domain value must be a number, string, or boolean")];
|
|
6951
6951
|
if (w !== "number" && t !== "categorical") {
|
|
6952
6952
|
let E = `number expected, ${w} found`;
|
|
6953
|
-
return
|
|
6953
|
+
return Lt(e) && t === void 0 && (E += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new g(y.key, S, E)];
|
|
6954
6954
|
}
|
|
6955
6955
|
return t === "categorical" && w === "number" && (!isFinite(v) || Math.floor(v) !== v) ? [new g(y.key, S, `integer expected, found ${v}`)] : t !== "categorical" && w === "number" && o !== void 0 && v < o ? [new g(y.key, S, "stop domain values must appear in ascending order")] : (o = v, t === "categorical" && v in a ? [new g(y.key, S, "stop domain values must be unique")] : (a[v] = !0, []));
|
|
6956
6956
|
}
|
|
@@ -6966,7 +6966,7 @@ function ka(r) {
|
|
|
6966
6966
|
}
|
|
6967
6967
|
}
|
|
6968
6968
|
function Be(r) {
|
|
6969
|
-
const e = (r.expressionContext === "property" ? $s :
|
|
6969
|
+
const e = (r.expressionContext === "property" ? $s : xa)(Re(r.value), r.valueSpec);
|
|
6970
6970
|
if (e.result === "error")
|
|
6971
6971
|
return e.value.map((n) => new g(`${r.key}${n.key}`, r.value, n.message));
|
|
6972
6972
|
const t = e.value.expression || e.value._styleExpression.expression;
|
|
@@ -6977,9 +6977,9 @@ function Be(r) {
|
|
|
6977
6977
|
if (r.expressionContext === "filter" && !rt(t))
|
|
6978
6978
|
return [new g(r.key, r.value, '"feature-state" data expressions are not supported with filters.')];
|
|
6979
6979
|
if (r.expressionContext && r.expressionContext.indexOf("cluster") === 0) {
|
|
6980
|
-
if (!
|
|
6980
|
+
if (!Ut(t, ["zoom", "feature-state"]))
|
|
6981
6981
|
return [new g(r.key, r.value, '"zoom" and "feature-state" expressions are not supported with cluster properties.')];
|
|
6982
|
-
if (r.expressionContext === "cluster-initial" && !
|
|
6982
|
+
if (r.expressionContext === "cluster-initial" && !Nt(t))
|
|
6983
6983
|
return [new g(r.key, r.value, "Feature data expressions are not supported with initial expression part of cluster properties.")];
|
|
6984
6984
|
}
|
|
6985
6985
|
return [];
|
|
@@ -6996,13 +6996,13 @@ function nt(r) {
|
|
|
6996
6996
|
const e = r.key, t = r.value, n = r.valueSpec, a = [];
|
|
6997
6997
|
return Array.isArray(n.values) ? n.values.indexOf(U(t)) === -1 && a.push(new g(e, t, `expected one of [${n.values.join(", ")}], ${JSON.stringify(t)} found`)) : Object.keys(n.values).indexOf(U(t)) === -1 && a.push(new g(e, t, `expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(t)} found`)), a;
|
|
6998
6998
|
}
|
|
6999
|
-
function
|
|
7000
|
-
return
|
|
6999
|
+
function Br(r) {
|
|
7000
|
+
return Sa(Re(r.value)) ? Be(vt({}, r, {
|
|
7001
7001
|
expressionContext: "filter",
|
|
7002
7002
|
valueSpec: { value: "boolean" }
|
|
7003
|
-
})) :
|
|
7003
|
+
})) : La(r);
|
|
7004
7004
|
}
|
|
7005
|
-
function
|
|
7005
|
+
function La(r) {
|
|
7006
7006
|
const e = r.value, t = r.key;
|
|
7007
7007
|
if (R(e) !== "array")
|
|
7008
7008
|
return [new g(t, e, `array expected, ${R(e)} found`)];
|
|
@@ -7043,7 +7043,7 @@ function Ca(r) {
|
|
|
7043
7043
|
case "all":
|
|
7044
7044
|
case "none":
|
|
7045
7045
|
for (let i = 1; i < e.length; i++)
|
|
7046
|
-
o = o.concat(
|
|
7046
|
+
o = o.concat(La({
|
|
7047
7047
|
key: `${t}[${i}]`,
|
|
7048
7048
|
value: e[i],
|
|
7049
7049
|
style: r.style,
|
|
@@ -7057,7 +7057,7 @@ function Ca(r) {
|
|
|
7057
7057
|
}
|
|
7058
7058
|
return o;
|
|
7059
7059
|
}
|
|
7060
|
-
function
|
|
7060
|
+
function Ea(r, e) {
|
|
7061
7061
|
const t = r.key, n = r.validateSpec, a = r.style, o = r.styleSpec, i = r.value, s = r.objectKey, l = o[`${e}_${r.layerType}`];
|
|
7062
7062
|
if (!l)
|
|
7063
7063
|
return [];
|
|
@@ -7074,11 +7074,11 @@ function La(r, e) {
|
|
|
7074
7074
|
if (!c)
|
|
7075
7075
|
return [new g(t, i, `unknown property "${s}"`)];
|
|
7076
7076
|
let p;
|
|
7077
|
-
if (R(i) === "string" &&
|
|
7077
|
+
if (R(i) === "string" && Lt(c) && !c.tokens && (p = /^{([^}]+)}$/.exec(i)))
|
|
7078
7078
|
return [new g(t, i, `"${s}" does not support interpolation syntax
|
|
7079
7079
|
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(p[1])} }\`.`)];
|
|
7080
7080
|
const f = [];
|
|
7081
|
-
return r.layerType === "symbol" && (s === "text-field" && a && !a.glyphs && f.push(new g(t, i, 'use of "text-field" requires a style "glyphs" property')), s === "text-font" &&
|
|
7081
|
+
return r.layerType === "symbol" && (s === "text-field" && a && !a.glyphs && f.push(new g(t, i, 'use of "text-field" requires a style "glyphs" property')), s === "text-font" && Nr(Re(i)) && U(i.type) === "identity" && f.push(new g(t, i, '"text-font" does not support identity functions'))), f.concat(n({
|
|
7082
7082
|
key: r.key,
|
|
7083
7083
|
value: i,
|
|
7084
7084
|
valueSpec: c,
|
|
@@ -7089,13 +7089,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7089
7089
|
propertyKey: s
|
|
7090
7090
|
}));
|
|
7091
7091
|
}
|
|
7092
|
-
function Ea(r) {
|
|
7093
|
-
return La(r, "paint");
|
|
7094
|
-
}
|
|
7095
7092
|
function Ta(r) {
|
|
7096
|
-
return
|
|
7093
|
+
return Ea(r, "paint");
|
|
7097
7094
|
}
|
|
7098
7095
|
function Aa(r) {
|
|
7096
|
+
return Ea(r, "layout");
|
|
7097
|
+
}
|
|
7098
|
+
function _a(r) {
|
|
7099
7099
|
let e = [];
|
|
7100
7100
|
const t = r.value, n = r.key, a = r.style, o = r.styleSpec;
|
|
7101
7101
|
!t.type && !t.ref && e.push(new g(n, t, 'either "type" or "ref" is required'));
|
|
@@ -7148,7 +7148,7 @@ function Aa(r) {
|
|
|
7148
7148
|
objectKey: "type"
|
|
7149
7149
|
});
|
|
7150
7150
|
},
|
|
7151
|
-
filter:
|
|
7151
|
+
filter: Br,
|
|
7152
7152
|
layout(l) {
|
|
7153
7153
|
return J({
|
|
7154
7154
|
layer: t,
|
|
@@ -7159,7 +7159,7 @@ function Aa(r) {
|
|
|
7159
7159
|
validateSpec: l.validateSpec,
|
|
7160
7160
|
objectElementValidators: {
|
|
7161
7161
|
"*"(u) {
|
|
7162
|
-
return
|
|
7162
|
+
return Aa(vt({ layerType: i }, u));
|
|
7163
7163
|
}
|
|
7164
7164
|
}
|
|
7165
7165
|
});
|
|
@@ -7174,7 +7174,7 @@ function Aa(r) {
|
|
|
7174
7174
|
validateSpec: l.validateSpec,
|
|
7175
7175
|
objectElementValidators: {
|
|
7176
7176
|
"*"(u) {
|
|
7177
|
-
return
|
|
7177
|
+
return Ta(vt({ layerType: i }, u));
|
|
7178
7178
|
}
|
|
7179
7179
|
}
|
|
7180
7180
|
});
|
|
@@ -7207,10 +7207,10 @@ function Us(r) {
|
|
|
7207
7207
|
})) : s.push(new g(d, n[d], `unknown property "${d}"`));
|
|
7208
7208
|
return s;
|
|
7209
7209
|
}
|
|
7210
|
-
const
|
|
7210
|
+
const Ln = {
|
|
7211
7211
|
promoteId: Ds
|
|
7212
7212
|
};
|
|
7213
|
-
function
|
|
7213
|
+
function Ma(r) {
|
|
7214
7214
|
const e = r.value, t = r.key, n = r.styleSpec, a = r.style, o = r.validateSpec;
|
|
7215
7215
|
if (!e.type)
|
|
7216
7216
|
return [new g(t, e, '"type" is required')];
|
|
@@ -7225,7 +7225,7 @@ function _a(r) {
|
|
|
7225
7225
|
valueSpec: n[`source_${i.replace("-", "_")}`],
|
|
7226
7226
|
style: r.style,
|
|
7227
7227
|
styleSpec: n,
|
|
7228
|
-
objectElementValidators:
|
|
7228
|
+
objectElementValidators: Ln,
|
|
7229
7229
|
validateSpec: o
|
|
7230
7230
|
}), s;
|
|
7231
7231
|
case "raster-dem":
|
|
@@ -7244,7 +7244,7 @@ function _a(r) {
|
|
|
7244
7244
|
style: a,
|
|
7245
7245
|
styleSpec: n,
|
|
7246
7246
|
validateSpec: o,
|
|
7247
|
-
objectElementValidators:
|
|
7247
|
+
objectElementValidators: Ln
|
|
7248
7248
|
}), e.cluster)
|
|
7249
7249
|
for (const l in e.clusterProperties) {
|
|
7250
7250
|
const [u, c] = e.clusterProperties[l], p = typeof u == "string" ? [u, ["accumulated"], ["get", l]] : u;
|
|
@@ -7302,7 +7302,7 @@ function Ds({ key: r, value: e }) {
|
|
|
7302
7302
|
return t;
|
|
7303
7303
|
}
|
|
7304
7304
|
}
|
|
7305
|
-
function
|
|
7305
|
+
function Ia(r) {
|
|
7306
7306
|
const e = r.value, t = r.styleSpec, n = t.light, a = r.style;
|
|
7307
7307
|
let o = [];
|
|
7308
7308
|
const i = R(e);
|
|
@@ -7330,7 +7330,7 @@ function Ma(r) {
|
|
|
7330
7330
|
}
|
|
7331
7331
|
return o;
|
|
7332
7332
|
}
|
|
7333
|
-
function
|
|
7333
|
+
function Pa(r) {
|
|
7334
7334
|
const e = r.value, t = r.styleSpec, n = t.sky, a = r.style, o = R(e);
|
|
7335
7335
|
if (e === void 0)
|
|
7336
7336
|
return [];
|
|
@@ -7347,7 +7347,7 @@ function Ia(r) {
|
|
|
7347
7347
|
})) : i = i.concat([new g(s, e[s], `unknown property "${s}"`)]);
|
|
7348
7348
|
return i;
|
|
7349
7349
|
}
|
|
7350
|
-
function
|
|
7350
|
+
function Ra(r) {
|
|
7351
7351
|
const e = r.value, t = r.styleSpec, n = t.terrain, a = r.style;
|
|
7352
7352
|
let o = [];
|
|
7353
7353
|
const i = R(e);
|
|
@@ -7390,7 +7390,7 @@ function Gs(r) {
|
|
|
7390
7390
|
}));
|
|
7391
7391
|
return o;
|
|
7392
7392
|
} else
|
|
7393
|
-
return
|
|
7393
|
+
return Dr({
|
|
7394
7394
|
key: e,
|
|
7395
7395
|
value: t,
|
|
7396
7396
|
valueSpec: {}
|
|
@@ -7406,7 +7406,7 @@ function Vs(r) {
|
|
|
7406
7406
|
key: `${e}[${i}]`,
|
|
7407
7407
|
value: t[i],
|
|
7408
7408
|
valueSpec: a.layout_symbol["text-anchor"]
|
|
7409
|
-
})), o = o.concat(
|
|
7409
|
+
})), o = o.concat(Ur({
|
|
7410
7410
|
key: `${e}[${i + 1}]`,
|
|
7411
7411
|
value: t[i + 1],
|
|
7412
7412
|
valueSpec: {
|
|
@@ -7419,7 +7419,7 @@ function Vs(r) {
|
|
|
7419
7419
|
}));
|
|
7420
7420
|
return o;
|
|
7421
7421
|
}
|
|
7422
|
-
function
|
|
7422
|
+
function za(r) {
|
|
7423
7423
|
let e = [];
|
|
7424
7424
|
const t = r.value, n = r.key;
|
|
7425
7425
|
if (Array.isArray(t)) {
|
|
@@ -7480,24 +7480,24 @@ function Xs(r) {
|
|
|
7480
7480
|
function Zs(r) {
|
|
7481
7481
|
return Array.isArray(r) && r.length === 3 && typeof r[0] == "string" && typeof r[1] == "string" && typeof r[2] == "number";
|
|
7482
7482
|
}
|
|
7483
|
-
const
|
|
7483
|
+
const En = {
|
|
7484
7484
|
"*"() {
|
|
7485
7485
|
return [];
|
|
7486
7486
|
},
|
|
7487
|
-
array:
|
|
7487
|
+
array: Ur,
|
|
7488
7488
|
boolean: js,
|
|
7489
|
-
number:
|
|
7489
|
+
number: Dr,
|
|
7490
7490
|
color: Ns,
|
|
7491
|
-
constants:
|
|
7491
|
+
constants: ka,
|
|
7492
7492
|
enum: nt,
|
|
7493
|
-
filter:
|
|
7494
|
-
function:
|
|
7495
|
-
layer:
|
|
7493
|
+
filter: Br,
|
|
7494
|
+
function: Ca,
|
|
7495
|
+
layer: _a,
|
|
7496
7496
|
object: J,
|
|
7497
|
-
source:
|
|
7498
|
-
light:
|
|
7499
|
-
sky:
|
|
7500
|
-
terrain:
|
|
7497
|
+
source: Ma,
|
|
7498
|
+
light: Ia,
|
|
7499
|
+
sky: Pa,
|
|
7500
|
+
terrain: Ra,
|
|
7501
7501
|
projection: Hs,
|
|
7502
7502
|
projectionDefinition: Ks,
|
|
7503
7503
|
string: ze,
|
|
@@ -7505,15 +7505,15 @@ const Cn = {
|
|
|
7505
7505
|
resolvedImage: qs,
|
|
7506
7506
|
padding: Gs,
|
|
7507
7507
|
variableAnchorOffsetCollection: Vs,
|
|
7508
|
-
sprite:
|
|
7508
|
+
sprite: za
|
|
7509
7509
|
};
|
|
7510
7510
|
function Ze(r) {
|
|
7511
7511
|
const e = r.value, t = r.valueSpec, n = r.styleSpec;
|
|
7512
|
-
return r.validateSpec = Ze, t.expression &&
|
|
7512
|
+
return r.validateSpec = Ze, t.expression && Nr(U(e)) ? Ca(r) : t.expression && wa(Re(e)) ? Be(r) : t.type && En[t.type] ? En[t.type](r) : J(vt({}, r, {
|
|
7513
7513
|
valueSpec: t.type ? n[t.type] : t
|
|
7514
7514
|
}));
|
|
7515
7515
|
}
|
|
7516
|
-
function
|
|
7516
|
+
function $a(r) {
|
|
7517
7517
|
const e = r.value, t = r.key, n = ze(r);
|
|
7518
7518
|
return n.length || (e.indexOf("{fontstack}") === -1 && n.push(new g(t, e, '"glyphs" url must include a "{fontstack}" token')), e.indexOf("{range}") === -1 && n.push(new g(t, e, '"glyphs" url must include a "{range}" token'))), n;
|
|
7519
7519
|
}
|
|
@@ -7527,29 +7527,29 @@ function re(r, e = Ti) {
|
|
|
7527
7527
|
style: r,
|
|
7528
7528
|
validateSpec: Ze,
|
|
7529
7529
|
objectElementValidators: {
|
|
7530
|
-
glyphs:
|
|
7530
|
+
glyphs: $a,
|
|
7531
7531
|
"*"() {
|
|
7532
7532
|
return [];
|
|
7533
7533
|
}
|
|
7534
7534
|
}
|
|
7535
|
-
})), r.constants && (t = t.concat(
|
|
7535
|
+
})), r.constants && (t = t.concat(ka({
|
|
7536
7536
|
key: "constants",
|
|
7537
7537
|
value: r.constants,
|
|
7538
7538
|
style: r,
|
|
7539
7539
|
styleSpec: e,
|
|
7540
7540
|
validateSpec: Ze
|
|
7541
|
-
}))),
|
|
7542
|
-
}
|
|
7543
|
-
re.source = de(fe(
|
|
7544
|
-
re.sprite = de(fe(
|
|
7545
|
-
re.glyphs = de(fe(
|
|
7546
|
-
re.light = de(fe(
|
|
7547
|
-
re.sky = de(fe(
|
|
7548
|
-
re.terrain = de(fe(
|
|
7549
|
-
re.layer = de(fe(
|
|
7550
|
-
re.filter = de(fe(
|
|
7551
|
-
re.paintProperty = de(fe(
|
|
7552
|
-
re.layoutProperty = de(fe(
|
|
7541
|
+
}))), Fa(t);
|
|
7542
|
+
}
|
|
7543
|
+
re.source = de(fe(Ma));
|
|
7544
|
+
re.sprite = de(fe(za));
|
|
7545
|
+
re.glyphs = de(fe($a));
|
|
7546
|
+
re.light = de(fe(Ia));
|
|
7547
|
+
re.sky = de(fe(Pa));
|
|
7548
|
+
re.terrain = de(fe(Ra));
|
|
7549
|
+
re.layer = de(fe(_a));
|
|
7550
|
+
re.filter = de(fe(Br));
|
|
7551
|
+
re.paintProperty = de(fe(Ta));
|
|
7552
|
+
re.layoutProperty = de(fe(Aa));
|
|
7553
7553
|
function fe(r) {
|
|
7554
7554
|
return function(e) {
|
|
7555
7555
|
return r({
|
|
@@ -7558,18 +7558,18 @@ function fe(r) {
|
|
|
7558
7558
|
});
|
|
7559
7559
|
};
|
|
7560
7560
|
}
|
|
7561
|
-
function
|
|
7561
|
+
function Fa(r) {
|
|
7562
7562
|
return [].concat(r).sort((e, t) => e.line - t.line);
|
|
7563
7563
|
}
|
|
7564
7564
|
function de(r) {
|
|
7565
7565
|
return function(...e) {
|
|
7566
|
-
return
|
|
7566
|
+
return Fa(r.apply(this, e));
|
|
7567
7567
|
};
|
|
7568
7568
|
}
|
|
7569
|
-
function
|
|
7569
|
+
function Tn(r) {
|
|
7570
7570
|
if (!r)
|
|
7571
7571
|
return {
|
|
7572
|
-
style: Ke[
|
|
7572
|
+
style: Ke[Vt[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
|
|
7573
7573
|
requiresUrlMonitoring: !1,
|
|
7574
7574
|
// default styles don't require URL monitoring
|
|
7575
7575
|
isFallback: !0
|
|
@@ -7581,7 +7581,7 @@ function Ln(r) {
|
|
|
7581
7581
|
requiresUrlMonitoring: !1,
|
|
7582
7582
|
isFallback: !1
|
|
7583
7583
|
} : t.isValidJSON ? {
|
|
7584
|
-
style: Ke[
|
|
7584
|
+
style: Ke[Vt[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
|
|
7585
7585
|
requiresUrlMonitoring: !1,
|
|
7586
7586
|
// default styles don't require URL monitoring
|
|
7587
7587
|
isFallback: !0
|
|
@@ -7608,7 +7608,7 @@ function Ln(r) {
|
|
|
7608
7608
|
requiresUrlMonitoring: !1,
|
|
7609
7609
|
isFallback: !1
|
|
7610
7610
|
} : {
|
|
7611
|
-
style: Ke[
|
|
7611
|
+
style: Ke[Vt[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
|
|
7612
7612
|
requiresUrlMonitoring: !1,
|
|
7613
7613
|
// default styles don't require URL monitoring
|
|
7614
7614
|
isFallback: !0
|
|
@@ -7641,7 +7641,7 @@ function ye(r, e, t) {
|
|
|
7641
7641
|
const n = window.document.createElement(r);
|
|
7642
7642
|
return e !== void 0 && (n.className = e), t && t.appendChild(n), n;
|
|
7643
7643
|
}
|
|
7644
|
-
function
|
|
7644
|
+
function qr(r) {
|
|
7645
7645
|
r.parentNode && r.parentNode.removeChild(r);
|
|
7646
7646
|
}
|
|
7647
7647
|
class Js {
|
|
@@ -7655,7 +7655,7 @@ class Js {
|
|
|
7655
7655
|
return this._map = e, this._container = ye("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = ye("button", "maplibregl-ctrl-terrain", this._container), ye("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;
|
|
7656
7656
|
}
|
|
7657
7657
|
onRemove() {
|
|
7658
|
-
|
|
7658
|
+
qr(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
|
|
7659
7659
|
}
|
|
7660
7660
|
_toggleTerrain() {
|
|
7661
7661
|
this._map.hasTerrain() ? this._map.disableTerrain() : this._map.enableTerrain(), this._updateTerrainIcon();
|
|
@@ -7690,11 +7690,11 @@ class Qs extends Fo {
|
|
|
7690
7690
|
return a.clickFunction = n, a;
|
|
7691
7691
|
}
|
|
7692
7692
|
}
|
|
7693
|
-
const
|
|
7693
|
+
const An = k.Marker, _n = k.LngLat, el = k.LngLatBounds;
|
|
7694
7694
|
class tl extends Oo {
|
|
7695
7695
|
constructor() {
|
|
7696
7696
|
super(...arguments);
|
|
7697
|
-
x(this, "lastUpdatedCenter", new
|
|
7697
|
+
x(this, "lastUpdatedCenter", new _n(0, 0));
|
|
7698
7698
|
/**
|
|
7699
7699
|
* Update the camera location to center on the current position
|
|
7700
7700
|
*
|
|
@@ -7703,7 +7703,7 @@ class tl extends Oo {
|
|
|
7703
7703
|
*/
|
|
7704
7704
|
x(this, "_updateCamera", (t) => {
|
|
7705
7705
|
var c;
|
|
7706
|
-
const n = new
|
|
7706
|
+
const n = new _n(t.coords.longitude, t.coords.latitude), a = t.coords.accuracy, i = {
|
|
7707
7707
|
bearing: this._map.getBearing(),
|
|
7708
7708
|
...this.options.fitBoundsOptions,
|
|
7709
7709
|
linear: !0
|
|
@@ -7729,7 +7729,7 @@ class tl extends Oo {
|
|
|
7729
7729
|
const n = this._map._getUIString("GeolocateControl.FindMyLocation");
|
|
7730
7730
|
this._geolocateButton.disabled = !1, this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n);
|
|
7731
7731
|
}
|
|
7732
|
-
this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = ye("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new
|
|
7732
|
+
this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = ye("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new An({ element: this._dotElement }), this._circleElement = ye("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new An({
|
|
7733
7733
|
element: this._circleElement,
|
|
7734
7734
|
pitchAlignment: "map"
|
|
7735
7735
|
}), this.options.trackUserLocation && (this._watchState = "OFF"), this._map.on("move", this._onZoom)), this._geolocateButton.addEventListener("click", this.trigger.bind(this)), this._setup = !0, this.options.trackUserLocation && this._map.on("moveend", (n) => {
|
|
@@ -7771,8 +7771,8 @@ class tl extends Oo {
|
|
|
7771
7771
|
}
|
|
7772
7772
|
}
|
|
7773
7773
|
}
|
|
7774
|
-
var K, ne, ve, be, X, ot, q,
|
|
7775
|
-
class
|
|
7774
|
+
var K, ne, ve, be, X, ot, q, Oa, W, ja;
|
|
7775
|
+
class tr {
|
|
7776
7776
|
constructor(e, t) {
|
|
7777
7777
|
ge(this, q);
|
|
7778
7778
|
ge(this, K);
|
|
@@ -7838,18 +7838,18 @@ class er {
|
|
|
7838
7838
|
Ce(this, ne, e), Ce(this, ve, ye("div", "maplibregl-ctrl maplibregl-ctrl-group"));
|
|
7839
7839
|
for (const [t, n] of Object.entries(I(this, K).containerStyle))
|
|
7840
7840
|
I(this, ve).style.setProperty(t, n);
|
|
7841
|
-
return I(this, K).container = I(this, ve), I(this, K).zoom = e.getZoom() + I(this, K).zoomAdjust, this.map = new
|
|
7841
|
+
return I(this, K).container = I(this, ve), I(this, K).zoom = e.getZoom() + I(this, K).zoomAdjust, this.map = new Vr(I(this, K)), this.map.once("style.load", () => {
|
|
7842
7842
|
this.map.resize();
|
|
7843
7843
|
}), this.map.once("load", () => {
|
|
7844
|
-
H(this, q,
|
|
7844
|
+
H(this, q, Oa).call(this, I(this, K).parentRect), Ce(this, ot, H(this, q, ja).call(this));
|
|
7845
7845
|
}), I(this, ve);
|
|
7846
7846
|
}
|
|
7847
7847
|
onRemove() {
|
|
7848
7848
|
var e;
|
|
7849
|
-
(e = I(this, ot)) == null || e.call(this),
|
|
7849
|
+
(e = I(this, ot)) == null || e.call(this), qr(I(this, ve));
|
|
7850
7850
|
}
|
|
7851
7851
|
}
|
|
7852
|
-
K = new WeakMap(), ne = new WeakMap(), ve = new WeakMap(), be = new WeakMap(), X = new WeakMap(), ot = new WeakMap(), q = new WeakSet(),
|
|
7852
|
+
K = new WeakMap(), ne = new WeakMap(), ve = new WeakMap(), be = new WeakMap(), X = new WeakMap(), ot = new WeakMap(), q = new WeakSet(), Oa = function(e) {
|
|
7853
7853
|
e === void 0 || e.linePaint === void 0 && e.fillPaint === void 0 || (Ce(this, be, {
|
|
7854
7854
|
type: "Feature",
|
|
7855
7855
|
properties: {
|
|
@@ -7892,7 +7892,7 @@ K = new WeakMap(), ne = new WeakMap(), ve = new WeakMap(), be = new WeakMap(), X
|
|
|
7892
7892
|
I(this, be).geometry.coordinates = [[l.toArray(), u.toArray(), s.toArray(), i.toArray(), l.toArray()]];
|
|
7893
7893
|
const c = this.map.getSource("parentRect");
|
|
7894
7894
|
c !== void 0 && c.setData(I(this, be));
|
|
7895
|
-
},
|
|
7895
|
+
}, ja = function() {
|
|
7896
7896
|
const { pitchAdjust: e } = I(this, K), t = () => {
|
|
7897
7897
|
i("parent");
|
|
7898
7898
|
}, n = () => {
|
|
@@ -7925,7 +7925,7 @@ class rl {
|
|
|
7925
7925
|
return this.map = e, this.container = ye("div", "maplibregl-ctrl maplibregl-ctrl-group"), this.projectionButton = ye("button", "maplibregl-ctrl-projection", this.container), ye("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;
|
|
7926
7926
|
}
|
|
7927
7927
|
onRemove() {
|
|
7928
|
-
|
|
7928
|
+
qr(this.container), this.map.off("projectiontransition", this.updateProjectionIcon), this.map = void 0;
|
|
7929
7929
|
}
|
|
7930
7930
|
toggleProjection() {
|
|
7931
7931
|
this.map.getProjection() === void 0 && this.map.setProjection({ type: "mercator" }), this.map.isGlobeProjection() ? this.map.enableMercatorProjection() : this.map.enableGlobeProjection(), this.updateProjectionIcon();
|
|
@@ -7934,7 +7934,7 @@ class rl {
|
|
|
7934
7934
|
this.projectionButton.classList.remove("maplibregl-ctrl-projection-globe"), this.projectionButton.classList.remove("maplibregl-ctrl-projection-mercator"), this.map.isGlobeProjection() ? (this.projectionButton.classList.add("maplibregl-ctrl-projection-mercator"), this.projectionButton.title = "Enable Mercator projection") : (this.projectionButton.classList.add("maplibregl-ctrl-projection-globe"), this.projectionButton.title = "Enable Globe projection");
|
|
7935
7935
|
}
|
|
7936
7936
|
}
|
|
7937
|
-
const nl = "@maptiler/sdk", al = "3.1.
|
|
7937
|
+
const nl = "@maptiler/sdk", al = "3.1.0-rc5", ol = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", il = "MapTiler", sl = "dist/maptiler-sdk.mjs", ll = "dist/maptiler-sdk.d.ts", ul = "dist/maptiler-sdk.css", cl = "module", pl = { ".": { import: "./dist/maptiler-sdk.mjs", types: "./dist/maptiler-sdk.d.ts" }, "./dist/maptiler-sdk.css": { import: "./dist/maptiler-sdk.css" }, "./style.css": { import: "./dist/maptiler-sdk.css" } }, fl = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], dl = "https://docs.maptiler.com/sdk-js/", hl = "BSD-3-Clause", yl = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, ml = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "eslint src", "lint:fix": "eslint src --fix", "test:watch": "vitest watch -c vite.config-test.ts --dom", test: "vitest run -c vite.config-test.ts --dom", "install:clean": "rm -rf build/ dist/ node_modules/ && npm ci", dev: 'concurrently "vite -c vite.config-dev.ts" "npm run dev-umd"', "dev-umd": "npm run build-css && tsc && NODE_ENV=development vite build -w -c vite.config-umd.ts", "build-css": "mkdir -p dist build && node scripts/replace-path-with-content.js src/style/style_template.css dist/tmp_maptiler-sdk.css && cat node_modules/maplibre-gl/dist/maplibre-gl.css dist/tmp_maptiler-sdk.css > dist/maptiler-sdk.css && rm dist/tmp_maptiler-sdk.css && cp dist/maptiler-sdk.css build/maptiler-sdk.css", "build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts", "build-es": "tsc && NODE_ENV=production vite build -c vite.config-es.ts", build: "npm run build-es; npm run build-umd; npm run build-css", make: "npm run install:clean && npm run build" }, gl = { "@canvas/image-data": "^1.0.0", "@eslint/js": "^9.21.0", "@types/color-convert": "^2.0.4", "@types/color-name": "^2.0.0", "@types/uuid": "^10.0.0", "@types/xmldom": "^0.1.31", "@vitest/web-worker": "^3.0.9", "@xmldom/xmldom": "^0.8.10", concurrently: "^9.1.2", eslint: "^9.21.0", "eslint-config-prettier": "^10.0.2", "eslint-plugin-prettier": "^5.2.3", "happy-dom": "^17.4.4", husky: "^8.0.0", "lint-staged": "^15.4.3", prettier: "3.5.2", typedoc: "^0.27.6", typescript: "^5.7.3", "typescript-eslint": "^8.25.0", vite: "^6.0.7", "vite-plugin-dts": "^4.5.0", vitest: "^3.0.9" }, vl = { "@maplibre/maplibre-gl-style-spec": "^23.0.0", "@maptiler/client": "^2.2.0", events: "^3.3.0", "gl-matrix": "^3.4.3", "js-base64": "^3.7.7", "maplibre-gl": "^5.0.1", uuid: "^11.0.5" }, bl = {
|
|
7938
7938
|
name: nl,
|
|
7939
7939
|
version: al,
|
|
7940
7940
|
description: ol,
|
|
@@ -7986,7 +7986,7 @@ class wl {
|
|
|
7986
7986
|
}
|
|
7987
7987
|
preparePayload() {
|
|
7988
7988
|
const e = new URL(V.telemetryURL);
|
|
7989
|
-
return e.searchParams.append("sdk", bl.version), e.searchParams.append("key", N.apiKey), e.searchParams.append("mtsid",
|
|
7989
|
+
return e.searchParams.append("sdk", bl.version), e.searchParams.append("key", N.apiKey), e.searchParams.append("mtsid", xr), e.searchParams.append("session", N.session ? "1" : "0"), e.searchParams.append("caching", N.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"), this.registeredModules.size > 0 && e.searchParams.append("modules", Array.from(this.registeredModules).join("|")), e.href;
|
|
7990
7990
|
}
|
|
7991
7991
|
}
|
|
7992
7992
|
var at = typeof Float32Array < "u" ? Float32Array : Array;
|
|
@@ -8010,7 +8010,7 @@ function kl(r, e, t) {
|
|
|
8010
8010
|
var n = t[0], a = t[1], o = t[2];
|
|
8011
8011
|
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;
|
|
8012
8012
|
}
|
|
8013
|
-
function
|
|
8013
|
+
function Mn(r, e, t) {
|
|
8014
8014
|
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], f = e[11];
|
|
8015
8015
|
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 + f * n, r[8] = u * a - o * n, r[9] = c * a - i * n, r[10] = p * a - s * n, r[11] = f * a - l * n, r;
|
|
8016
8016
|
}
|
|
@@ -8018,7 +8018,7 @@ function Cl(r, e, t) {
|
|
|
8018
8018
|
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], f = e[11];
|
|
8019
8019
|
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 - f * n, r[8] = o * n + u * a, r[9] = i * n + c * a, r[10] = s * n + p * a, r[11] = l * n + f * a, r;
|
|
8020
8020
|
}
|
|
8021
|
-
function
|
|
8021
|
+
function In(r, e, t) {
|
|
8022
8022
|
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], f = e[7];
|
|
8023
8023
|
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 + f * n, r[4] = u * a - o * n, r[5] = c * a - i * n, r[6] = p * a - s * n, r[7] = f * a - l * n, r;
|
|
8024
8024
|
}
|
|
@@ -8027,7 +8027,7 @@ function Ll(r, e, t, n, a) {
|
|
|
8027
8027
|
return 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 ? (i = 1 / (n - a), r[10] = (a + n) * i, r[14] = 2 * a * n * i) : (r[10] = -1, r[14] = -2 * n), r;
|
|
8028
8028
|
}
|
|
8029
8029
|
var El = Ll;
|
|
8030
|
-
function
|
|
8030
|
+
function mt() {
|
|
8031
8031
|
var r = new at(3);
|
|
8032
8032
|
return at != Float32Array && (r[0] = 0, r[1] = 0, r[2] = 0), r;
|
|
8033
8033
|
}
|
|
@@ -8035,16 +8035,16 @@ function Tl(r, e, t) {
|
|
|
8035
8035
|
var n = new at(3);
|
|
8036
8036
|
return n[0] = r, n[1] = e, n[2] = t, n;
|
|
8037
8037
|
}
|
|
8038
|
-
function
|
|
8038
|
+
function rr(r, e) {
|
|
8039
8039
|
var t = e[0], n = e[1], a = e[2], o = t * t + n * n + a * a;
|
|
8040
8040
|
return o > 0 && (o = 1 / Math.sqrt(o)), r[0] = e[0] * o, r[1] = e[1] * o, r[2] = e[2] * o, r;
|
|
8041
8041
|
}
|
|
8042
|
-
function
|
|
8042
|
+
function Pn(r, e, t) {
|
|
8043
8043
|
var n = e[0], a = e[1], o = e[2], i = t[0], s = t[1], l = t[2];
|
|
8044
8044
|
return r[0] = a * l - o * s, r[1] = o * i - n * l, r[2] = n * s - a * i, r;
|
|
8045
8045
|
}
|
|
8046
8046
|
(function() {
|
|
8047
|
-
var r =
|
|
8047
|
+
var r = mt();
|
|
8048
8048
|
return function(e, t, n, a, o, i) {
|
|
8049
8049
|
var s, l;
|
|
8050
8050
|
for (t || (t = 3), n || (n = 0), a ? l = Math.min(a * t + n, e.length) : l = e.length, s = n; s < l; s += t)
|
|
@@ -8055,9 +8055,9 @@ function Mn(r, e, t) {
|
|
|
8055
8055
|
function Al(r) {
|
|
8056
8056
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
8057
8057
|
}
|
|
8058
|
-
var
|
|
8058
|
+
var nr, Rn;
|
|
8059
8059
|
function _l() {
|
|
8060
|
-
return
|
|
8060
|
+
return Rn || (Rn = 1, nr = {
|
|
8061
8061
|
aliceblue: [240, 248, 255],
|
|
8062
8062
|
antiquewhite: [250, 235, 215],
|
|
8063
8063
|
aqua: [0, 255, 255],
|
|
@@ -8206,12 +8206,12 @@ function _l() {
|
|
|
8206
8206
|
whitesmoke: [245, 245, 245],
|
|
8207
8207
|
yellow: [255, 255, 0],
|
|
8208
8208
|
yellowgreen: [154, 205, 50]
|
|
8209
|
-
}),
|
|
8209
|
+
}), nr;
|
|
8210
8210
|
}
|
|
8211
|
-
var
|
|
8212
|
-
function
|
|
8213
|
-
if (
|
|
8214
|
-
|
|
8211
|
+
var ar, zn;
|
|
8212
|
+
function Na() {
|
|
8213
|
+
if (zn) return ar;
|
|
8214
|
+
zn = 1;
|
|
8215
8215
|
const r = _l(), e = {};
|
|
8216
8216
|
for (const a of Object.keys(r))
|
|
8217
8217
|
e[r[a]] = a;
|
|
@@ -8232,7 +8232,7 @@ function ja() {
|
|
|
8232
8232
|
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
|
8233
8233
|
gray: { channels: 1, labels: ["gray"] }
|
|
8234
8234
|
};
|
|
8235
|
-
|
|
8235
|
+
ar = t;
|
|
8236
8236
|
for (const a of Object.keys(t)) {
|
|
8237
8237
|
if (!("channels" in t[a]))
|
|
8238
8238
|
throw new Error("missing channels property: " + a);
|
|
@@ -8509,13 +8509,13 @@ function ja() {
|
|
|
8509
8509
|
return "000000".substring(s.length) + s;
|
|
8510
8510
|
}, t.rgb.gray = function(a) {
|
|
8511
8511
|
return [(a[0] + a[1] + a[2]) / 3 / 255 * 100];
|
|
8512
|
-
},
|
|
8512
|
+
}, ar;
|
|
8513
8513
|
}
|
|
8514
|
-
var
|
|
8514
|
+
var or, $n;
|
|
8515
8515
|
function Ml() {
|
|
8516
|
-
if (
|
|
8517
|
-
|
|
8518
|
-
const r =
|
|
8516
|
+
if ($n) return or;
|
|
8517
|
+
$n = 1;
|
|
8518
|
+
const r = Na();
|
|
8519
8519
|
function e() {
|
|
8520
8520
|
const o = {}, i = Object.keys(r);
|
|
8521
8521
|
for (let s = i.length, l = 0; l < s; l++)
|
|
@@ -8550,20 +8550,20 @@ function Ml() {
|
|
|
8550
8550
|
s.unshift(i[u].parent), l = n(r[i[u].parent][u], l), u = i[u].parent;
|
|
8551
8551
|
return l.conversion = s, l;
|
|
8552
8552
|
}
|
|
8553
|
-
return
|
|
8553
|
+
return or = function(o) {
|
|
8554
8554
|
const i = t(o), s = {}, l = Object.keys(i);
|
|
8555
8555
|
for (let u = l.length, c = 0; c < u; c++) {
|
|
8556
8556
|
const p = l[c];
|
|
8557
8557
|
i[p].parent !== null && (s[p] = a(p, i));
|
|
8558
8558
|
}
|
|
8559
8559
|
return s;
|
|
8560
|
-
},
|
|
8560
|
+
}, or;
|
|
8561
8561
|
}
|
|
8562
|
-
var
|
|
8562
|
+
var ir, Fn;
|
|
8563
8563
|
function Il() {
|
|
8564
|
-
if (
|
|
8565
|
-
|
|
8566
|
-
const r =
|
|
8564
|
+
if (Fn) return ir;
|
|
8565
|
+
Fn = 1;
|
|
8566
|
+
const r = Na(), e = Ml(), t = {}, n = Object.keys(r);
|
|
8567
8567
|
function a(i) {
|
|
8568
8568
|
const s = function(...l) {
|
|
8569
8569
|
const u = l[0];
|
|
@@ -8592,11 +8592,11 @@ function Il() {
|
|
|
8592
8592
|
const c = s[u];
|
|
8593
8593
|
t[i][u] = o(c), t[i][u].raw = a(c);
|
|
8594
8594
|
});
|
|
8595
|
-
}),
|
|
8595
|
+
}), ir = t, ir;
|
|
8596
8596
|
}
|
|
8597
8597
|
var Pl = Il();
|
|
8598
8598
|
const Rl = /* @__PURE__ */ Al(Pl);
|
|
8599
|
-
function
|
|
8599
|
+
function On({ gl: r, type: e, source: t }) {
|
|
8600
8600
|
const n = r.createShader(e);
|
|
8601
8601
|
if (n === null)
|
|
8602
8602
|
throw new Error("Cannot create shader");
|
|
@@ -8605,11 +8605,11 @@ function $n({ gl: r, type: e, source: t }) {
|
|
|
8605
8605
|
return n;
|
|
8606
8606
|
}
|
|
8607
8607
|
function zl({ gl: r, vertexShaderSource: e, fragmentShaderSource: t }) {
|
|
8608
|
-
const n =
|
|
8608
|
+
const n = On({
|
|
8609
8609
|
gl: r,
|
|
8610
8610
|
type: r.VERTEX_SHADER,
|
|
8611
8611
|
source: e
|
|
8612
|
-
}), a =
|
|
8612
|
+
}), a = On({ gl: r, type: r.FRAGMENT_SHADER, source: t }), o = r.createProgram();
|
|
8613
8613
|
if (r.attachShader(o, n), r.attachShader(o, a), r.linkProgram(o), !r.getProgramParameter(o, r.LINK_STATUS))
|
|
8614
8614
|
throw console.error("Error: ", r.getProgramInfoLog(o)), new Error("Cannot link shader program");
|
|
8615
8615
|
return o;
|
|
@@ -8620,7 +8620,7 @@ function $l(r, e, t) {
|
|
|
8620
8620
|
throw new Error(`Cannot get uniform location for ${t}`);
|
|
8621
8621
|
return n;
|
|
8622
8622
|
}
|
|
8623
|
-
function
|
|
8623
|
+
function Ua({
|
|
8624
8624
|
gl: r,
|
|
8625
8625
|
vertexShaderSource: e,
|
|
8626
8626
|
fragmentShaderSource: t,
|
|
@@ -8643,7 +8643,7 @@ function Na({
|
|
|
8643
8643
|
indexBufferLength: f
|
|
8644
8644
|
};
|
|
8645
8645
|
}
|
|
8646
|
-
function
|
|
8646
|
+
function br(r) {
|
|
8647
8647
|
if (!r)
|
|
8648
8648
|
return [1, 1, 1, 0];
|
|
8649
8649
|
if (r === "transparent")
|
|
@@ -8671,7 +8671,7 @@ function Ol(r) {
|
|
|
8671
8671
|
const e = Fl;
|
|
8672
8672
|
return e ? (e.fillStyle = r, e.fillStyle) : "#000000";
|
|
8673
8673
|
}
|
|
8674
|
-
const
|
|
8674
|
+
const Gr = 1, Q = Gr / 2, ee = Gr / 2, te = Gr / 2, jl = [-0.5, -0.5, te, Q, -0.5, te, Q, ee, te, -0.5, ee, te], Nl = [-0.5, -0.5, -0.5, -0.5, ee, -0.5, Q, ee, -0.5, Q, -0.5, -0.5], Ul = [-0.5, ee, -0.5, -0.5, ee, te, Q, ee, te, Q, ee, -0.5], Dl = [-0.5, -0.5, -0.5, Q, -0.5, -0.5, Q, -0.5, te, -0.5, -0.5, te], Bl = [Q, -0.5, -0.5, Q, ee, -0.5, Q, ee, te, Q, -0.5, te], ql = [-0.5, -0.5, -0.5, -0.5, -0.5, te, -0.5, ee, te, -0.5, ee, -0.5], Gl = [...jl, ...Nl, ...Ul, ...Dl, ...Bl, ...ql], Vl = [
|
|
8675
8675
|
// Front
|
|
8676
8676
|
0,
|
|
8677
8677
|
1,
|
|
@@ -8724,7 +8724,7 @@ void main(void) {
|
|
|
8724
8724
|
vTextureCoord = vec3(-a_vertexPosition.x, a_vertexPosition.y, a_vertexPosition.z);
|
|
8725
8725
|
gl_Position = u_projectionMatrix * u_modelViewMatrix * vec4(a_vertexPosition, 1.0);
|
|
8726
8726
|
}
|
|
8727
|
-
`,
|
|
8727
|
+
`, jn = `precision mediump float;
|
|
8728
8728
|
|
|
8729
8729
|
varying vec3 vTextureCoord;
|
|
8730
8730
|
|
|
@@ -8789,7 +8789,7 @@ function Xl(r, e) {
|
|
|
8789
8789
|
return r.TEXTURE_CUBE_MAP_NEGATIVE_Z;
|
|
8790
8790
|
throw new Error(`[CubemapLayer][loadCubemapTexture]: Invalid key ${e}`);
|
|
8791
8791
|
}
|
|
8792
|
-
const Fe = "api.maptiler.com/resources/space", Zl = ["vertexPosition"], Wl = ["projectionMatrix", "modelViewMatrix", "cubeSampler", "bgColor", "fadeOpacity"],
|
|
8792
|
+
const Fe = "api.maptiler.com/resources/space", Zl = ["vertexPosition"], Wl = ["projectionMatrix", "modelViewMatrix", "cubeSampler", "bgColor", "fadeOpacity"], Nn = "%USE_TEXTURE_MACRO_MARKER%", Yl = "#define USE_TEXTURE", Jl = {
|
|
8793
8793
|
color: "black",
|
|
8794
8794
|
preset: "universe-dark"
|
|
8795
8795
|
};
|
|
@@ -8802,7 +8802,7 @@ function Ql(r, e) {
|
|
|
8802
8802
|
};
|
|
8803
8803
|
return (r.faces || r.path) && delete t.preset, t;
|
|
8804
8804
|
}
|
|
8805
|
-
class
|
|
8805
|
+
class sr {
|
|
8806
8806
|
constructor(e) {
|
|
8807
8807
|
x(this, "id", "Cubemap Layer");
|
|
8808
8808
|
x(this, "type", "custom");
|
|
@@ -8817,16 +8817,16 @@ class ir {
|
|
|
8817
8817
|
x(this, "cubemap");
|
|
8818
8818
|
x(this, "texture");
|
|
8819
8819
|
const t = Ql(e, Jl);
|
|
8820
|
-
this.bgColor =
|
|
8820
|
+
this.bgColor = br(t.color), this.faces = Un(t), this.useCubemapTexture = this.faces !== null;
|
|
8821
8821
|
}
|
|
8822
8822
|
updateCubemap() {
|
|
8823
8823
|
this.useCubemapTexture = this.faces !== null;
|
|
8824
8824
|
const e = Wl.filter((t) => t === "cubeSampler" ? this.useCubemapTexture : !0);
|
|
8825
|
-
this.cubemap =
|
|
8825
|
+
this.cubemap = Ua({
|
|
8826
8826
|
gl: this.gl,
|
|
8827
8827
|
vertexShaderSource: Hl,
|
|
8828
8828
|
// Because we only want to use the read the texture in gl if we're supposed to
|
|
8829
|
-
fragmentShaderSource: this.useCubemapTexture ?
|
|
8829
|
+
fragmentShaderSource: this.useCubemapTexture ? jn.replace(Nn, Yl) : jn.replace(Nn, ""),
|
|
8830
8830
|
attributesKeys: Zl,
|
|
8831
8831
|
uniformsKeys: e,
|
|
8832
8832
|
vertices: Gl,
|
|
@@ -8867,9 +8867,9 @@ class ir {
|
|
|
8867
8867
|
throw new Error("Texture is undefined");
|
|
8868
8868
|
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);
|
|
8869
8869
|
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 = We();
|
|
8870
|
-
El(u, l, i, n, a),
|
|
8870
|
+
El(u, l, i, n, a), In(u, u, s.rollInRadians), Mn(u, u, -s.pitchInRadians), In(u, u, s.bearingInRadians);
|
|
8871
8871
|
const c = s.center.lat * Math.PI / 180, p = s.center.lng * Math.PI / 180;
|
|
8872
|
-
|
|
8872
|
+
Mn(u, u, c), Cl(u, u, -p), e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.projectionMatrix, !1, u);
|
|
8873
8873
|
const f = We();
|
|
8874
8874
|
if (e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.modelViewMatrix, !1, f), e.uniform4fv(this.cubemap.programInfo.uniformsLocations.bgColor, new Float32Array(this.bgColor)), this.useCubemapTexture && (e.uniform1f(this.cubemap.programInfo.uniformsLocations.fadeOpacity, this.currentFadeOpacity), 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)
|
|
8875
8875
|
throw new Error("Index buffer is undefined");
|
|
@@ -8878,7 +8878,7 @@ class ir {
|
|
|
8878
8878
|
e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, this.cubemap.indexBuffer), e.drawElements(e.TRIANGLES, this.cubemap.indexBufferLength, e.UNSIGNED_SHORT, 0);
|
|
8879
8879
|
}
|
|
8880
8880
|
setCubemap(e) {
|
|
8881
|
-
|
|
8881
|
+
this.bgColor = br(e.color), this.faces = Un(e), this.updateCubemap(), this.cubeMapNeedsUpdate = !0;
|
|
8882
8882
|
}
|
|
8883
8883
|
show() {
|
|
8884
8884
|
this.map.setLayoutProperty(this.id, "visibility", "visible");
|
|
@@ -8887,7 +8887,7 @@ class ir {
|
|
|
8887
8887
|
this.map.setLayoutProperty(this.id, "visibility", "none");
|
|
8888
8888
|
}
|
|
8889
8889
|
}
|
|
8890
|
-
function
|
|
8890
|
+
function Un(r) {
|
|
8891
8891
|
if (r.faces)
|
|
8892
8892
|
return r.faces;
|
|
8893
8893
|
if (r.preset)
|
|
@@ -8992,7 +8992,7 @@ void main() {
|
|
|
8992
8992
|
He,
|
|
8993
8993
|
He,
|
|
8994
8994
|
0
|
|
8995
|
-
],
|
|
8995
|
+
], Dn = {
|
|
8996
8996
|
scale: 0.9,
|
|
8997
8997
|
stops: [
|
|
8998
8998
|
[0, "rgba(176, 208, 240, 1)"],
|
|
@@ -9000,7 +9000,7 @@ void main() {
|
|
|
9000
9000
|
[0.2, "rgba(98, 168, 229, 0.0)"]
|
|
9001
9001
|
]
|
|
9002
9002
|
};
|
|
9003
|
-
class
|
|
9003
|
+
class lr {
|
|
9004
9004
|
constructor(e) {
|
|
9005
9005
|
x(this, "id", "Halo Layer");
|
|
9006
9006
|
x(this, "type", "custom");
|
|
@@ -9010,16 +9010,16 @@ class sr {
|
|
|
9010
9010
|
x(this, "map");
|
|
9011
9011
|
x(this, "plane");
|
|
9012
9012
|
if (typeof e == "boolean") {
|
|
9013
|
-
this.gradient =
|
|
9013
|
+
this.gradient = Dn;
|
|
9014
9014
|
return;
|
|
9015
9015
|
}
|
|
9016
9016
|
this.gradient = {
|
|
9017
|
-
...
|
|
9017
|
+
...Dn,
|
|
9018
9018
|
...e
|
|
9019
9019
|
};
|
|
9020
9020
|
}
|
|
9021
9021
|
onAdd(e, t) {
|
|
9022
|
-
this.map = e, this.plane =
|
|
9022
|
+
this.map = e, this.plane = Ua({
|
|
9023
9023
|
gl: t,
|
|
9024
9024
|
vertexShaderSource: eu,
|
|
9025
9025
|
fragmentShaderSource: tu,
|
|
@@ -9051,17 +9051,17 @@ class sr {
|
|
|
9051
9051
|
Sl(i, t.defaultProjectionData.mainMatrix, a);
|
|
9052
9052
|
const s = this.plane.programInfo.uniformsLocations.matrix;
|
|
9053
9053
|
e.uniformMatrix4fv(s, !1, i);
|
|
9054
|
-
const l = We(), u = this.map.transform.cameraPosition, c =
|
|
9055
|
-
|
|
9056
|
-
const d =
|
|
9057
|
-
|
|
9054
|
+
const l = We(), u = this.map.transform.cameraPosition, c = rr(mt(), u), p = Tl(0, 1, 0), f = mt();
|
|
9055
|
+
Pn(f, p, c), rr(f, f);
|
|
9056
|
+
const d = mt();
|
|
9057
|
+
Pn(d, c, f), rr(d, d), xl(l, f[0], f[1], f[2], 0, d[0], d[1], d[2], 0, c[0], c[1], c[2], 0, 0, 0, 0, 1);
|
|
9058
9058
|
const h = this.plane.programInfo.uniformsLocations.rotationMatrix;
|
|
9059
9059
|
e.uniformMatrix4fv(h, !1, l);
|
|
9060
9060
|
const y = this.gradient.stops.length, m = [], w = [];
|
|
9061
9061
|
for (let v = 0; v <= y; v++)
|
|
9062
9062
|
if (v < y) {
|
|
9063
9063
|
m[v] = this.gradient.stops[v][0];
|
|
9064
|
-
const S =
|
|
9064
|
+
const S = br(this.gradient.stops[v][1]);
|
|
9065
9065
|
w.push(...S);
|
|
9066
9066
|
}
|
|
9067
9067
|
e.uniform1i(this.plane.programInfo.uniformsLocations.stopsNumber, y), e.uniform1fv(this.plane.programInfo.uniformsLocations.stops, new Float32Array(m)), e.uniform4fv(this.plane.programInfo.uniformsLocations.colors, new Float32Array(w)), e.uniform1f(this.plane.programInfo.uniformsLocations.maxDistance, He), e.uniform1f(this.plane.programInfo.uniformsLocations.scale, o), e.drawArrays(e.TRIANGLE_STRIP, 0, 4);
|
|
@@ -9080,7 +9080,7 @@ class sr {
|
|
|
9080
9080
|
}
|
|
9081
9081
|
/* *** */
|
|
9082
9082
|
}
|
|
9083
|
-
function
|
|
9083
|
+
function dt(r) {
|
|
9084
9084
|
var a;
|
|
9085
9085
|
const { map: e, property: t } = r, n = e.getStyle();
|
|
9086
9086
|
return (a = n.metadata) != null && a.maptiler ? n.metadata.maptiler[t] ? n.metadata.maptiler[t] : null : (console.warn(`No custom layer metadata found in the style for property ${t}. The property will use default values.`), null);
|
|
@@ -9089,10 +9089,10 @@ const ou = {
|
|
|
9089
9089
|
POINT: "POINT",
|
|
9090
9090
|
COUNTRY: "COUNTRY"
|
|
9091
9091
|
};
|
|
9092
|
-
class
|
|
9092
|
+
class Vr extends k.Map {
|
|
9093
9093
|
constructor(t) {
|
|
9094
9094
|
Ao(t.container), t.apiKey && (N.apiKey = t.apiKey);
|
|
9095
|
-
const { style: n, requiresUrlMonitoring: a, isFallback: o } =
|
|
9095
|
+
const { style: n, requiresUrlMonitoring: a, isFallback: o } = Tn(t.style);
|
|
9096
9096
|
o && console.warn(
|
|
9097
9097
|
"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."
|
|
9098
9098
|
), N.apiKey || console.warn("MapTiler Cloud API key is not set. Visit https://maptiler.com and try Cloud for free!");
|
|
@@ -9108,7 +9108,7 @@ class qr extends k.Map {
|
|
|
9108
9108
|
...t,
|
|
9109
9109
|
style: n,
|
|
9110
9110
|
maplibreLogo: !1,
|
|
9111
|
-
transformRequest:
|
|
9111
|
+
transformRequest: nn(t.transformRequest),
|
|
9112
9112
|
attributionControl: t.forceNoAttributionControl === !0 ? !1 : s
|
|
9113
9113
|
};
|
|
9114
9114
|
delete l.style;
|
|
@@ -9152,10 +9152,10 @@ class qr extends k.Map {
|
|
|
9152
9152
|
u();
|
|
9153
9153
|
return;
|
|
9154
9154
|
}
|
|
9155
|
-
}), N.caching && !
|
|
9155
|
+
}), N.caching && !pr && console.warn("The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"), N.caching && pr && ko(), typeof t.language > "u")
|
|
9156
9156
|
this.primaryLanguage = N.primaryLanguage;
|
|
9157
9157
|
else {
|
|
9158
|
-
const h =
|
|
9158
|
+
const h = Jr(t.language, P);
|
|
9159
9159
|
this.primaryLanguage = h ?? N.primaryLanguage;
|
|
9160
9160
|
}
|
|
9161
9161
|
this.forceLanguageUpdate = !(this.primaryLanguage === P.STYLE || this.primaryLanguage === P.STYLE_LOCK), this.languageAlwaysBeenStyle = this.primaryLanguage === P.STYLE, this.terrainExaggeration = t.terrainExaggeration ?? this.terrainExaggeration, this.curentProjection = t.projection, this.on("styledata", () => {
|
|
@@ -9219,8 +9219,8 @@ class qr extends k.Map {
|
|
|
9219
9219
|
if (t.forceNoAttributionControl !== !0)
|
|
9220
9220
|
if ("logo" in h && h.logo) {
|
|
9221
9221
|
const y = h.logo;
|
|
9222
|
-
this.addControl(new
|
|
9223
|
-
} else t.maptilerLogo && this.addControl(new
|
|
9222
|
+
this.addControl(new on({ logoURL: y }), t.logoPosition);
|
|
9223
|
+
} else t.maptilerLogo && this.addControl(new on(), t.logoPosition);
|
|
9224
9224
|
if (t.scaleControl) {
|
|
9225
9225
|
const y = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, m = new No({ unit: N.unit });
|
|
9226
9226
|
this.addControl(m, y), N.on("unit", (w) => {
|
|
@@ -9294,7 +9294,7 @@ class qr extends k.Map {
|
|
|
9294
9294
|
pixelRatio: ao,
|
|
9295
9295
|
validateStyle: oo
|
|
9296
9296
|
} = t;
|
|
9297
|
-
this.minimap = new
|
|
9297
|
+
this.minimap = new tr(h, {
|
|
9298
9298
|
zoom: y,
|
|
9299
9299
|
center: m,
|
|
9300
9300
|
style: w,
|
|
@@ -9318,7 +9318,7 @@ class qr extends k.Map {
|
|
|
9318
9318
|
pixelRatio: ao,
|
|
9319
9319
|
validateStyle: oo
|
|
9320
9320
|
}), this.addControl(this.minimap, h.position ?? "bottom-left");
|
|
9321
|
-
} else h === !0 ? (this.minimap = new
|
|
9321
|
+
} else h === !0 ? (this.minimap = new tr({}, t), this.addControl(this.minimap, "bottom-left")) : h !== void 0 && h !== !1 && (this.minimap = new tr({}, t), this.addControl(this.minimap, h));
|
|
9322
9322
|
});
|
|
9323
9323
|
const d = (h) => {
|
|
9324
9324
|
h.terrain && (p = !0, f = {
|
|
@@ -9347,42 +9347,56 @@ class qr extends k.Map {
|
|
|
9347
9347
|
this.space.setCubemap(t);
|
|
9348
9348
|
return;
|
|
9349
9349
|
}
|
|
9350
|
-
this.space = new
|
|
9350
|
+
this.space = new sr(t), this.once("load", () => {
|
|
9351
9351
|
const n = this.getLayersOrder()[0];
|
|
9352
9352
|
this.space && this.addLayer(this.space, n);
|
|
9353
9353
|
});
|
|
9354
9354
|
}
|
|
9355
|
-
|
|
9356
|
-
|
|
9355
|
+
setSpaceFromCurrentStyle() {
|
|
9356
|
+
const t = dt({ map: this, property: "space" });
|
|
9357
|
+
if (t && this.space) {
|
|
9358
|
+
this.space.setCubemap(t);
|
|
9359
|
+
return;
|
|
9360
|
+
}
|
|
9357
9361
|
}
|
|
9358
|
-
|
|
9359
|
-
|
|
9362
|
+
setHaloFromCurrentStyle() {
|
|
9363
|
+
const t = dt({ map: this, property: "halo" });
|
|
9364
|
+
if (t && this.halo) {
|
|
9360
9365
|
this.halo.setGradient(t);
|
|
9361
9366
|
return;
|
|
9362
9367
|
}
|
|
9363
|
-
this.halo = new sr(t), this.once("load", () => {
|
|
9364
|
-
var s;
|
|
9365
|
-
const n = this.getLayersOrder(), a = n[0], o = n.indexOf(((s = this.space) == null ? void 0 : s.id) ?? "") + 2, i = n[o];
|
|
9366
|
-
this.halo && this.addLayer(this.halo, this.space ? i : a);
|
|
9367
|
-
});
|
|
9368
9368
|
}
|
|
9369
9369
|
initSpace({ options: t = this.options, before: n }) {
|
|
9370
9370
|
if (this.space && this.removeLayer(this.space.id), t.space === !1) return;
|
|
9371
|
-
const a =
|
|
9371
|
+
const a = dt({ map: this, property: "space" });
|
|
9372
9372
|
if (t.space) {
|
|
9373
|
-
this.space = new
|
|
9373
|
+
this.space = new sr(t.space), this.addLayer(this.space, n);
|
|
9374
9374
|
return;
|
|
9375
9375
|
}
|
|
9376
|
-
a && (this.space = new
|
|
9376
|
+
a && (this.space = new sr(a), this.addLayer(this.space, n));
|
|
9377
9377
|
}
|
|
9378
9378
|
initHalo({ options: t = this.options, before: n }) {
|
|
9379
9379
|
if (this.halo && this.removeLayer(this.halo.id), t.halo === !1) return;
|
|
9380
|
-
const a =
|
|
9380
|
+
const a = dt({ map: this, property: "halo" });
|
|
9381
9381
|
if (t.halo) {
|
|
9382
|
-
this.halo = new
|
|
9382
|
+
this.halo = new lr(t.halo), this.addLayer(this.halo, n);
|
|
9383
|
+
return;
|
|
9384
|
+
}
|
|
9385
|
+
a && (this.halo = new lr(a), this.addLayer(this.halo, n));
|
|
9386
|
+
}
|
|
9387
|
+
getHalo() {
|
|
9388
|
+
return this.halo;
|
|
9389
|
+
}
|
|
9390
|
+
setHalo(t) {
|
|
9391
|
+
if (this.halo) {
|
|
9392
|
+
this.halo.setGradient(t);
|
|
9383
9393
|
return;
|
|
9384
9394
|
}
|
|
9385
|
-
|
|
9395
|
+
this.halo = new lr(t), this.once("load", () => {
|
|
9396
|
+
var s;
|
|
9397
|
+
const n = this.getLayersOrder(), a = n[0], o = n.indexOf(((s = this.space) == null ? void 0 : s.id) ?? "") + 2, i = n[o];
|
|
9398
|
+
this.halo && this.addLayer(this.halo, this.space ? i : a);
|
|
9399
|
+
});
|
|
9386
9400
|
}
|
|
9387
9401
|
/**
|
|
9388
9402
|
* Recreates the map instance with the same options.
|
|
@@ -9395,7 +9409,7 @@ class qr extends k.Map {
|
|
|
9395
9409
|
bearing: this.getBearing(),
|
|
9396
9410
|
pitch: this.getPitch()
|
|
9397
9411
|
};
|
|
9398
|
-
this.remove(), Object.assign(this, new
|
|
9412
|
+
this.remove(), Object.assign(this, new Vr({ ...this.options })), this.once("load", () => {
|
|
9399
9413
|
this.jumpTo(t);
|
|
9400
9414
|
});
|
|
9401
9415
|
}
|
|
@@ -9473,11 +9487,11 @@ class qr extends k.Map {
|
|
|
9473
9487
|
* - a longer form with the prefix `"maptiler://"` (eg. `"maptiler://streets-v2"`)
|
|
9474
9488
|
*/
|
|
9475
9489
|
setStyle(t, n) {
|
|
9476
|
-
var
|
|
9477
|
-
this.originalLabelStyle.clear(), (
|
|
9490
|
+
var i;
|
|
9491
|
+
this.originalLabelStyle.clear(), (i = this.minimap) == null || i.setStyle(t), this.forceLanguageUpdate = !0, this.once("idle", () => {
|
|
9478
9492
|
this.forceLanguageUpdate = !1;
|
|
9479
9493
|
});
|
|
9480
|
-
const a =
|
|
9494
|
+
const a = Tn(t);
|
|
9481
9495
|
if (a.requiresUrlMonitoring && this.monitorStyleUrl(a.style), a.isFallback) {
|
|
9482
9496
|
if (this.getStyle())
|
|
9483
9497
|
return console.warn(
|
|
@@ -9487,10 +9501,11 @@ class qr extends k.Map {
|
|
|
9487
9501
|
"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."
|
|
9488
9502
|
);
|
|
9489
9503
|
}
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
|
|
9504
|
+
this.styleInProcess = !0, super.setStyle(a.style, n);
|
|
9505
|
+
const o = this.getLayersOrder()[0];
|
|
9506
|
+
return typeof a.style != "string" && !a.requiresUrlMonitoring ? (this.space ? this.setSpaceFromCurrentStyle() : this.initSpace({ before: o }), this.halo ? this.setHaloFromCurrentStyle() : this.initHalo({ before: o }), this) : (this.once("style.load", () => {
|
|
9507
|
+
this.space ? this.setSpaceFromCurrentStyle() : this.initSpace({ before: o }), this.halo ? this.setHaloFromCurrentStyle() : this.initHalo({ before: o });
|
|
9508
|
+
}), this);
|
|
9494
9509
|
}
|
|
9495
9510
|
/**
|
|
9496
9511
|
* Adds a [MapLibre style layer](https://maplibre.org/maplibre-style-spec/layers)
|
|
@@ -9646,7 +9661,7 @@ class qr extends k.Map {
|
|
|
9646
9661
|
* Define the primary language of the map. Note that not all the languages shorthands provided are available.
|
|
9647
9662
|
*/
|
|
9648
9663
|
setPrimaryLanguage(t) {
|
|
9649
|
-
const n = this.getStyleLanguage(), a =
|
|
9664
|
+
const n = this.getStyleLanguage(), a = Jr(t, P);
|
|
9650
9665
|
if (!a) {
|
|
9651
9666
|
console.warn(`The language "${a}" is not supported.`);
|
|
9652
9667
|
return;
|
|
@@ -9667,7 +9682,7 @@ class qr extends k.Map {
|
|
|
9667
9682
|
o = n;
|
|
9668
9683
|
}
|
|
9669
9684
|
let i = P.LOCAL.flag, s = ["get", i];
|
|
9670
|
-
o.flag === P.VISITOR.flag ? (i =
|
|
9685
|
+
o.flag === P.VISITOR.flag ? (i = en().flag, s = [
|
|
9671
9686
|
"case",
|
|
9672
9687
|
["all", ["has", i], ["has", P.LOCAL.flag]],
|
|
9673
9688
|
[
|
|
@@ -9689,7 +9704,7 @@ class qr extends k.Map {
|
|
|
9689
9704
|
`, ["get", P.LOCAL.flag], { "font-scale": 1.1 }]
|
|
9690
9705
|
],
|
|
9691
9706
|
["get", P.LOCAL.flag]
|
|
9692
|
-
]) : o.flag === P.AUTO.flag ? (i =
|
|
9707
|
+
]) : o.flag === P.AUTO.flag ? (i = en().flag, s = ["coalesce", ["get", i], ["get", P.LOCAL.flag]]) : o === P.LOCAL ? (i = P.LOCAL.flag, s = ["get", i]) : (i = o.flag, s = ["coalesce", ["get", i], ["get", P.LOCAL.flag]]);
|
|
9693
9708
|
const { layers: l } = this.getStyle(), u = this.originalLabelStyle.size === 0;
|
|
9694
9709
|
if (u) {
|
|
9695
9710
|
const c = $o(l, this);
|
|
@@ -9825,14 +9840,14 @@ class qr extends k.Map {
|
|
|
9825
9840
|
});
|
|
9826
9841
|
}
|
|
9827
9842
|
async fitToIpBounds() {
|
|
9828
|
-
const t = await
|
|
9843
|
+
const t = await Qr.info();
|
|
9829
9844
|
this.fitBounds(t.country_bounds, {
|
|
9830
9845
|
duration: 0,
|
|
9831
9846
|
padding: 100
|
|
9832
9847
|
});
|
|
9833
9848
|
}
|
|
9834
9849
|
async centerOnIpPoint(t) {
|
|
9835
|
-
const n = await
|
|
9850
|
+
const n = await Qr.info();
|
|
9836
9851
|
this.jumpTo({
|
|
9837
9852
|
center: [n.longitude ?? 0, n.latitude ?? 0],
|
|
9838
9853
|
zoom: t || 11
|
|
@@ -9856,7 +9871,7 @@ class qr extends k.Map {
|
|
|
9856
9871
|
* @returns
|
|
9857
9872
|
*/
|
|
9858
9873
|
getMaptilerSessionId() {
|
|
9859
|
-
return
|
|
9874
|
+
return xr;
|
|
9860
9875
|
}
|
|
9861
9876
|
/**
|
|
9862
9877
|
* Updates the requestManager's transform request with a new function.
|
|
@@ -9870,7 +9885,7 @@ class qr extends k.Map {
|
|
|
9870
9885
|
* map.setTransformRequest((url: string, resourceType: string) => {});
|
|
9871
9886
|
*/
|
|
9872
9887
|
setTransformRequest(t) {
|
|
9873
|
-
return super.setTransformRequest(
|
|
9888
|
+
return super.setTransformRequest(nn(t)), this;
|
|
9874
9889
|
}
|
|
9875
9890
|
/**
|
|
9876
9891
|
* Returns whether a globe projection is currently being used
|
|
@@ -9900,7 +9915,7 @@ class qr extends k.Map {
|
|
|
9900
9915
|
return this.languageIsUpdated;
|
|
9901
9916
|
}
|
|
9902
9917
|
}
|
|
9903
|
-
function
|
|
9918
|
+
function Hr(r) {
|
|
9904
9919
|
if (typeof DOMParser < "u") {
|
|
9905
9920
|
const e = new DOMParser().parseFromString(r, "application/xml");
|
|
9906
9921
|
if (e.querySelector("parsererror"))
|
|
@@ -9919,13 +9934,13 @@ function Da(r, e) {
|
|
|
9919
9934
|
}
|
|
9920
9935
|
return !1;
|
|
9921
9936
|
}
|
|
9922
|
-
function
|
|
9937
|
+
function Bn(r) {
|
|
9923
9938
|
if (typeof XMLSerializer < "u")
|
|
9924
9939
|
return new XMLSerializer().serializeToString(r);
|
|
9925
9940
|
throw new Error("No XML serializer found");
|
|
9926
9941
|
}
|
|
9927
9942
|
function Ba(r) {
|
|
9928
|
-
const e = typeof r == "string" ?
|
|
9943
|
+
const e = typeof r == "string" ? Hr(r) : r;
|
|
9929
9944
|
if (!Da(e, "gpx"))
|
|
9930
9945
|
throw new Error("The XML document is not valid GPX");
|
|
9931
9946
|
const t = G(e, "trk"), n = G(e, "rte"), a = G(e, "wpt"), o = {
|
|
@@ -9946,18 +9961,18 @@ function Ba(r) {
|
|
|
9946
9961
|
}
|
|
9947
9962
|
function qa(r, e) {
|
|
9948
9963
|
let t = r;
|
|
9949
|
-
if (typeof t == "string" && (t =
|
|
9964
|
+
if (typeof t == "string" && (t = Hr(t)), !Da(t, "kml"))
|
|
9950
9965
|
throw new Error("The XML document is not valid KML");
|
|
9951
9966
|
const n = {
|
|
9952
9967
|
type: "FeatureCollection",
|
|
9953
9968
|
features: []
|
|
9954
9969
|
}, a = {}, o = {}, i = {}, s = G(t, "Placemark"), l = G(t, "Style"), u = G(t, "StyleMap");
|
|
9955
9970
|
for (const c of Array.from(l)) {
|
|
9956
|
-
const p =
|
|
9971
|
+
const p = Gn(e !== void 0 ? e(c) : Bn(c)).toString(16);
|
|
9957
9972
|
a[`#${Ie(c, "id")}`] = p, o[p] = c;
|
|
9958
9973
|
}
|
|
9959
9974
|
for (const c of Array.from(u)) {
|
|
9960
|
-
a[`#${Ie(c, "id")}`] =
|
|
9975
|
+
a[`#${Ie(c, "id")}`] = Gn(e !== void 0 ? e(c) : Bn(c)).toString(16);
|
|
9961
9976
|
const p = G(c, "Pair"), f = {};
|
|
9962
9977
|
for (const d of Array.from(p))
|
|
9963
9978
|
f[$(T(d, "key")) ?? ""] = $(T(d, "styleUrl"));
|
|
@@ -9967,7 +9982,7 @@ function qa(r, e) {
|
|
|
9967
9982
|
n.features = n.features.concat(lu(c, a, o, i));
|
|
9968
9983
|
return n;
|
|
9969
9984
|
}
|
|
9970
|
-
function
|
|
9985
|
+
function qn(r) {
|
|
9971
9986
|
if (r === null) return ["#000000", 1];
|
|
9972
9987
|
let e = "", t = 1, n = r;
|
|
9973
9988
|
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];
|
|
@@ -9988,16 +10003,16 @@ function su(r) {
|
|
|
9988
10003
|
times: n
|
|
9989
10004
|
};
|
|
9990
10005
|
}
|
|
9991
|
-
function
|
|
10006
|
+
function gt(r) {
|
|
9992
10007
|
const e = ["Polygon", "LineString", "Point", "Track", "gx:Track"];
|
|
9993
10008
|
let t, n, a, o, i;
|
|
9994
10009
|
const s = [], l = [];
|
|
9995
10010
|
if (T(r, "MultiGeometry") !== null)
|
|
9996
|
-
return
|
|
10011
|
+
return gt(T(r, "MultiGeometry"));
|
|
9997
10012
|
if (T(r, "MultiTrack") !== null)
|
|
9998
|
-
return
|
|
10013
|
+
return gt(T(r, "MultiTrack"));
|
|
9999
10014
|
if (T(r, "gx:MultiTrack") !== null)
|
|
10000
|
-
return
|
|
10015
|
+
return gt(T(r, "gx:MultiTrack"));
|
|
10001
10016
|
for (a = 0; a < e.length; a++)
|
|
10002
10017
|
if (n = G(r, e[a]), n) {
|
|
10003
10018
|
for (o = 0; o < n.length; o++)
|
|
@@ -10009,12 +10024,12 @@ function mt(r) {
|
|
|
10009
10024
|
else if (e[a] === "LineString")
|
|
10010
10025
|
s.push({
|
|
10011
10026
|
type: "LineString",
|
|
10012
|
-
coordinates:
|
|
10027
|
+
coordinates: Hn($(T(t, "coordinates")) ?? "")
|
|
10013
10028
|
});
|
|
10014
10029
|
else if (e[a] === "Polygon") {
|
|
10015
10030
|
const u = G(t, "LinearRing"), c = [];
|
|
10016
10031
|
for (i = 0; i < u.length; i++)
|
|
10017
|
-
c.push(
|
|
10032
|
+
c.push(Hn($(T(u[i], "coordinates")) ?? ""));
|
|
10018
10033
|
s.push({
|
|
10019
10034
|
type: "Polygon",
|
|
10020
10035
|
coordinates: c
|
|
@@ -10030,7 +10045,7 @@ function mt(r) {
|
|
|
10030
10045
|
return { geoms: s, coordTimes: l };
|
|
10031
10046
|
}
|
|
10032
10047
|
function lu(r, e, t, n) {
|
|
10033
|
-
const a =
|
|
10048
|
+
const a = gt(r), o = {}, i = $(T(r, "name")), s = $(T(r, "address")), l = $(T(r, "description")), u = T(r, "TimeSpan"), c = T(r, "TimeStamp"), p = T(r, "ExtendedData"), f = T(r, "visibility");
|
|
10034
10049
|
let d, h = $(T(r, "styleUrl")), y = T(r, "LineStyle"), m = T(r, "PolyStyle");
|
|
10035
10050
|
if (!a.geoms.length) return [];
|
|
10036
10051
|
if (i && (o.name = i), s && (o.address = s), h) {
|
|
@@ -10053,11 +10068,11 @@ function lu(r, e, t, n) {
|
|
|
10053
10068
|
v && S && (o.timespan = { begin: v, end: S });
|
|
10054
10069
|
}
|
|
10055
10070
|
if (c !== null && (o.timestamp = $(T(c, "when")) ?? (/* @__PURE__ */ new Date()).toISOString()), y !== null) {
|
|
10056
|
-
const v =
|
|
10071
|
+
const v = qn($(T(y, "color"))), S = v[0], E = v[1], L = Number.parseFloat($(T(y, "width")) ?? "");
|
|
10057
10072
|
S && (o.stroke = S), Number.isNaN(E) || (o["stroke-opacity"] = E), Number.isNaN(L) || (o["stroke-width"] = L);
|
|
10058
10073
|
}
|
|
10059
10074
|
if (m) {
|
|
10060
|
-
const v =
|
|
10075
|
+
const v = qn($(T(m, "color"))), S = v[0], E = v[1], L = $(T(m, "fill")), z = $(T(m, "outline"));
|
|
10061
10076
|
S && (o.fill = S), Number.isNaN(E) || (o["fill-opacity"] = E), L && (o["fill-opacity"] = L === "1" ? o["fill-opacity"] || 1 : 0), z && (o["stroke-opacity"] = z === "1" ? o["stroke-opacity"] || 1 : 0);
|
|
10062
10077
|
}
|
|
10063
10078
|
if (p) {
|
|
@@ -10106,7 +10121,7 @@ function uu(r) {
|
|
|
10106
10121
|
}
|
|
10107
10122
|
if (t.length === 0) return;
|
|
10108
10123
|
const i = {
|
|
10109
|
-
...
|
|
10124
|
+
...Kr(r),
|
|
10110
10125
|
...Va(T(r, "extensions"))
|
|
10111
10126
|
};
|
|
10112
10127
|
return n.length !== 0 && (i.coordTimes = t.length === 1 ? n[0] : n), a.length !== 0 && (i.heartRates = t.length === 1 ? a[0] : a), t.length === 1 ? {
|
|
@@ -10130,7 +10145,7 @@ function cu(r) {
|
|
|
10130
10145
|
return e === void 0 ? void 0 : {
|
|
10131
10146
|
type: "Feature",
|
|
10132
10147
|
properties: {
|
|
10133
|
-
...
|
|
10148
|
+
...Kr(r),
|
|
10134
10149
|
...Va(T(r, "extensions"))
|
|
10135
10150
|
},
|
|
10136
10151
|
geometry: {
|
|
@@ -10142,7 +10157,7 @@ function cu(r) {
|
|
|
10142
10157
|
function pu(r) {
|
|
10143
10158
|
return {
|
|
10144
10159
|
type: "Feature",
|
|
10145
|
-
properties: { ...
|
|
10160
|
+
properties: { ...Kr(r), ...wr(r, ["sym"]) },
|
|
10146
10161
|
geometry: {
|
|
10147
10162
|
type: "Point",
|
|
10148
10163
|
coordinates: Xa(r).coordinates
|
|
@@ -10160,21 +10175,21 @@ function Va(r) {
|
|
|
10160
10175
|
}
|
|
10161
10176
|
return e;
|
|
10162
10177
|
}
|
|
10163
|
-
function
|
|
10164
|
-
const e =
|
|
10178
|
+
function Kr(r) {
|
|
10179
|
+
const e = wr(r, ["name", "cmt", "desc", "type", "time", "keywords"]), t = G(r, "link");
|
|
10165
10180
|
if (t.length !== 0) {
|
|
10166
10181
|
e.links = [];
|
|
10167
10182
|
for (const n of Array.from(t)) {
|
|
10168
10183
|
const a = {
|
|
10169
10184
|
href: Ie(n, "href"),
|
|
10170
|
-
...
|
|
10185
|
+
...wr(n, ["text", "type"])
|
|
10171
10186
|
};
|
|
10172
10187
|
e.links.push(a);
|
|
10173
10188
|
}
|
|
10174
10189
|
}
|
|
10175
10190
|
return e;
|
|
10176
10191
|
}
|
|
10177
|
-
function
|
|
10192
|
+
function Gn(r) {
|
|
10178
10193
|
let e = 0;
|
|
10179
10194
|
if (!r || !r.length) return e;
|
|
10180
10195
|
for (let t = 0; t < r.length; t++)
|
|
@@ -10187,7 +10202,7 @@ function G(r, e) {
|
|
|
10187
10202
|
function Ie(r, e) {
|
|
10188
10203
|
return r.getAttribute(e);
|
|
10189
10204
|
}
|
|
10190
|
-
function
|
|
10205
|
+
function Vn(r, e) {
|
|
10191
10206
|
return Number.parseFloat(Ie(r, e) ?? "0");
|
|
10192
10207
|
}
|
|
10193
10208
|
function T(r, e) {
|
|
@@ -10203,7 +10218,7 @@ function Ha(r) {
|
|
|
10203
10218
|
function $(r) {
|
|
10204
10219
|
return r && fu(r), r && r.textContent;
|
|
10205
10220
|
}
|
|
10206
|
-
function
|
|
10221
|
+
function wr(r, e) {
|
|
10207
10222
|
const t = {};
|
|
10208
10223
|
let n, a;
|
|
10209
10224
|
for (a = 0; a < e.length; a++)
|
|
@@ -10213,13 +10228,13 @@ function vr(r, e) {
|
|
|
10213
10228
|
function Ka(r) {
|
|
10214
10229
|
return Ha(r.replace(/\s*/g, "").split(","));
|
|
10215
10230
|
}
|
|
10216
|
-
function
|
|
10231
|
+
function Hn(r) {
|
|
10217
10232
|
const e = r.replace(/^\s*|\s*$/g, "").split(/\s+/), t = [];
|
|
10218
10233
|
for (const n of e) t.push(Ka(n));
|
|
10219
10234
|
return t;
|
|
10220
10235
|
}
|
|
10221
10236
|
function Xa(r) {
|
|
10222
|
-
const e = [
|
|
10237
|
+
const e = [Vn(r, "lon"), Vn(r, "lat")], t = T(r, "ele"), n = T(r, "gpxtpx:hr") || T(r, "hr"), a = T(r, "time");
|
|
10223
10238
|
let o;
|
|
10224
10239
|
return t && (o = Number.parseFloat($(t) ?? "0"), Number.isNaN(o) || e.push(o)), {
|
|
10225
10240
|
coordinates: e,
|
|
@@ -10230,7 +10245,7 @@ function Xa(r) {
|
|
|
10230
10245
|
function du(r) {
|
|
10231
10246
|
let e = r;
|
|
10232
10247
|
try {
|
|
10233
|
-
typeof e == "string" && (e =
|
|
10248
|
+
typeof e == "string" && (e = Hr(e));
|
|
10234
10249
|
} catch {
|
|
10235
10250
|
return null;
|
|
10236
10251
|
}
|
|
@@ -10267,7 +10282,7 @@ function yu(r) {
|
|
|
10267
10282
|
});
|
|
10268
10283
|
});
|
|
10269
10284
|
}
|
|
10270
|
-
const
|
|
10285
|
+
const Kn = [
|
|
10271
10286
|
// https://colorhunt.co/palette/1d5b79468b97ef6262f3aa60
|
|
10272
10287
|
["#1D5B79", "#468B97", "#EF6262", "#F3AA60"],
|
|
10273
10288
|
// https://colorhunt.co/palette/614bc333bbc585e6c5c8ffe0
|
|
@@ -10287,16 +10302,16 @@ const Hn = [
|
|
|
10287
10302
|
// https://colorhunt.co/palette/10a19d540375ff7000ffbf00
|
|
10288
10303
|
["#10A19D", "#540375", "#FF7000", "#FFBF00"]
|
|
10289
10304
|
];
|
|
10290
|
-
function
|
|
10291
|
-
return
|
|
10292
|
-
}
|
|
10293
|
-
function Ut() {
|
|
10294
|
-
return `maptiler_source_${Jn()}`;
|
|
10305
|
+
function Xr() {
|
|
10306
|
+
return Kn[~~(Math.random() * Kn.length)][~~(Math.random() * 4)];
|
|
10295
10307
|
}
|
|
10296
10308
|
function Dt() {
|
|
10297
|
-
return `
|
|
10309
|
+
return `maptiler_source_${Qn()}`;
|
|
10310
|
+
}
|
|
10311
|
+
function Bt() {
|
|
10312
|
+
return `maptiler_layer_${Qn()}`;
|
|
10298
10313
|
}
|
|
10299
|
-
function
|
|
10314
|
+
function Xn(r, e) {
|
|
10300
10315
|
if (e <= r[0].zoom)
|
|
10301
10316
|
return r[0].value;
|
|
10302
10317
|
if (e >= r[r.length - 1].zoom)
|
|
@@ -10323,7 +10338,7 @@ function mu(r, e) {
|
|
|
10323
10338
|
return ["interpolate", ["linear"], ["zoom"], ...e.flatMap((t) => [t.zoom, 2 * t.value + r])];
|
|
10324
10339
|
if (Array.isArray(r) && Array.isArray(e)) {
|
|
10325
10340
|
const t = Array.from(/* @__PURE__ */ new Set([...r.map((n) => n.zoom), ...e.map((n) => n.zoom)])).sort((n, a) => n < a ? -1 : 1);
|
|
10326
|
-
return ["interpolate", ["linear"], ["zoom"], ...t.flatMap((n) => [n, 2 *
|
|
10341
|
+
return ["interpolate", ["linear"], ["zoom"], ...t.flatMap((n) => [n, 2 * Xn(e, n) + Xn(r, n)])];
|
|
10327
10342
|
}
|
|
10328
10343
|
return 0;
|
|
10329
10344
|
}
|
|
@@ -10343,10 +10358,10 @@ function Za(r) {
|
|
|
10343
10358
|
}
|
|
10344
10359
|
return i;
|
|
10345
10360
|
}
|
|
10346
|
-
function
|
|
10361
|
+
function Zn(r, e) {
|
|
10347
10362
|
return ["interpolate", ["linear"], ["get", e], ...r.flatMap((t) => [t.value, t.color])];
|
|
10348
10363
|
}
|
|
10349
|
-
function
|
|
10364
|
+
function Wn(r, e, t = !0) {
|
|
10350
10365
|
return t ? [
|
|
10351
10366
|
"interpolate",
|
|
10352
10367
|
["linear"],
|
|
@@ -10380,7 +10395,7 @@ function vu(r, e, t = !0) {
|
|
|
10380
10395
|
["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value])]
|
|
10381
10396
|
] : ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value])];
|
|
10382
10397
|
}
|
|
10383
|
-
function
|
|
10398
|
+
function Yn(r, e) {
|
|
10384
10399
|
return r.every((t) => t.color[3] === r[0].color[3]) ? r[0].color[3] ? r[0].color[3] / 255 : 1 : [
|
|
10385
10400
|
"interpolate",
|
|
10386
10401
|
["linear"],
|
|
@@ -10402,12 +10417,12 @@ function bu(r, e = 10) {
|
|
|
10402
10417
|
}).flat()
|
|
10403
10418
|
];
|
|
10404
10419
|
}
|
|
10405
|
-
function
|
|
10420
|
+
function ht(r) {
|
|
10406
10421
|
const e = r.toString(16);
|
|
10407
10422
|
return e.length === 1 ? `0${e}` : e;
|
|
10408
10423
|
}
|
|
10409
10424
|
function wu(r) {
|
|
10410
|
-
return `#${
|
|
10425
|
+
return `#${ht(r[0])}${ht(r[1])}${ht(r[2])}${r.length === 4 ? ht(r[3]) : ""}`;
|
|
10411
10426
|
}
|
|
10412
10427
|
class C extends Array {
|
|
10413
10428
|
constructor(t = {}) {
|
|
@@ -11349,7 +11364,7 @@ async function xu(r, e, t = {}) {
|
|
|
11349
11364
|
throw new Error("Creating a polyline layer requires an existing .sourceId or a valid .data property");
|
|
11350
11365
|
let n = e.data;
|
|
11351
11366
|
if (typeof n == "string") {
|
|
11352
|
-
if (
|
|
11367
|
+
if (Et(n))
|
|
11353
11368
|
n = `https://api.maptiler.com/data/${e.data}/features.json?key=${N.apiKey}`;
|
|
11354
11369
|
else if (((a = n.split(".").pop()) == null ? void 0 : a.toLowerCase().trim()) === "gpx") {
|
|
11355
11370
|
const s = await (await fetch(n, t)).text();
|
|
@@ -11372,7 +11387,7 @@ async function xu(r, e, t = {}) {
|
|
|
11372
11387
|
function Su(r, e) {
|
|
11373
11388
|
if (e.layerId && r.getLayer(e.layerId))
|
|
11374
11389
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
11375
|
-
const t = e.sourceId ??
|
|
11390
|
+
const t = e.sourceId ?? Dt(), n = e.layerId ?? Bt(), a = {
|
|
11376
11391
|
polylineLayerId: n,
|
|
11377
11392
|
polylineOutlineLayerId: "",
|
|
11378
11393
|
polylineSourceId: t
|
|
@@ -11381,7 +11396,7 @@ function Su(r, e) {
|
|
|
11381
11396
|
type: "geojson",
|
|
11382
11397
|
data: e.data
|
|
11383
11398
|
});
|
|
11384
|
-
const o = e.lineWidth ?? 3, i = e.lineColor ??
|
|
11399
|
+
const o = e.lineWidth ?? 3, i = e.lineColor ?? Xr(), s = e.lineOpacity ?? 1, l = e.lineBlur ?? 0, u = e.lineGapWidth ?? 0;
|
|
11385
11400
|
let c = e.lineDashArray ?? null;
|
|
11386
11401
|
const p = e.outlineWidth ?? 1, f = e.outlineColor ?? "#FFFFFF", d = e.outlineOpacity ?? 1, h = e.outlineBlur ?? 0;
|
|
11387
11402
|
if (typeof c == "string" && (c = Za(c)), e.outline === !0) {
|
|
@@ -11438,20 +11453,20 @@ function Su(r, e) {
|
|
|
11438
11453
|
function ku(r, e) {
|
|
11439
11454
|
if (e.layerId && r.getLayer(e.layerId))
|
|
11440
11455
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
11441
|
-
const t = e.sourceId ??
|
|
11456
|
+
const t = e.sourceId ?? Dt(), n = e.layerId ?? Bt(), a = {
|
|
11442
11457
|
polygonLayerId: n,
|
|
11443
11458
|
polygonOutlineLayerId: e.outline ? `${n}_outline` : "",
|
|
11444
11459
|
polygonSourceId: t
|
|
11445
11460
|
};
|
|
11446
11461
|
if (e.data && !r.getSource(t)) {
|
|
11447
11462
|
let y = e.data;
|
|
11448
|
-
typeof y == "string" &&
|
|
11463
|
+
typeof y == "string" && Et(y) && (y = `https://api.maptiler.com/data/${y}/features.json?key=${N.apiKey}`), r.addSource(t, {
|
|
11449
11464
|
type: "geojson",
|
|
11450
11465
|
data: y
|
|
11451
11466
|
});
|
|
11452
11467
|
}
|
|
11453
11468
|
let o = e.outlineDashArray ?? null;
|
|
11454
|
-
const i = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ??
|
|
11469
|
+
const i = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? Xr(), p = e.fillOpacity ?? 1, f = e.outlinePosition ?? "center", d = e.pattern ?? null;
|
|
11455
11470
|
typeof o == "string" && (o = Za(o));
|
|
11456
11471
|
const h = (y = null) => {
|
|
11457
11472
|
if (r.addLayer(
|
|
@@ -11521,10 +11536,10 @@ function ku(r, e) {
|
|
|
11521
11536
|
function Cu(r, e) {
|
|
11522
11537
|
if (e.layerId && r.getLayer(e.layerId))
|
|
11523
11538
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
11524
|
-
const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : Wa.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ??
|
|
11539
|
+
const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : Wa.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ?? Dt(), u = e.layerId ?? Bt(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, f = e.outline ?? !1, d = e.outlineOpacity ?? 1, h = e.outlineWidth ?? 1, y = e.outlineColor ?? "#FFFFFF";
|
|
11525
11540
|
let m;
|
|
11526
11541
|
const w = e.zoomCompensation ?? !0, v = e.minzoom ?? 0, S = e.maxzoom ?? 23;
|
|
11527
|
-
typeof e.pointOpacity == "number" ? m = e.pointOpacity : Array.isArray(e.pointOpacity) ? m = F(e.pointOpacity) : e.cluster ? m =
|
|
11542
|
+
typeof e.pointOpacity == "number" ? m = e.pointOpacity : Array.isArray(e.pointOpacity) ? m = F(e.pointOpacity) : e.cluster ? m = Yn(i, "point_count") : e.property ? m = Yn(i, e.property) : m = F([
|
|
11528
11543
|
{ zoom: v, value: 0 },
|
|
11529
11544
|
{ zoom: v + 0.25, value: 1 },
|
|
11530
11545
|
{ zoom: S - 0.25, value: 1 },
|
|
@@ -11538,7 +11553,7 @@ function Cu(r, e) {
|
|
|
11538
11553
|
};
|
|
11539
11554
|
if (e.data && !r.getSource(l)) {
|
|
11540
11555
|
let L = e.data;
|
|
11541
|
-
typeof L == "string" &&
|
|
11556
|
+
typeof L == "string" && Et(L) && (L = `https://api.maptiler.com/data/${L}/features.json?key=${N.apiKey}`), r.addSource(l, {
|
|
11542
11557
|
type: "geojson",
|
|
11543
11558
|
data: L,
|
|
11544
11559
|
cluster: a
|
|
@@ -11562,8 +11577,8 @@ function Cu(r, e) {
|
|
|
11562
11577
|
filter: ["has", "point_count"],
|
|
11563
11578
|
paint: {
|
|
11564
11579
|
// 'circle-color': options.pointColor ?? colorDrivenByProperty(clusterStyle, "point_count"),
|
|
11565
|
-
"circle-color": typeof e.pointColor == "string" ? e.pointColor :
|
|
11566
|
-
"circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? F(e.pointRadius) :
|
|
11580
|
+
"circle-color": typeof e.pointColor == "string" ? e.pointColor : Zn(L, "point_count"),
|
|
11581
|
+
"circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? F(e.pointRadius) : Wn(L, "point_count", !1),
|
|
11567
11582
|
"circle-pitch-alignment": p ? "viewport" : "map",
|
|
11568
11583
|
"circle-pitch-scale": "map",
|
|
11569
11584
|
// scale with camera distance regardless of viewport/biewport alignement
|
|
@@ -11604,7 +11619,7 @@ function Cu(r, e) {
|
|
|
11604
11619
|
e.beforeId
|
|
11605
11620
|
);
|
|
11606
11621
|
} else {
|
|
11607
|
-
let L = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) :
|
|
11622
|
+
let L = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : Xr(), z = typeof e.pointRadius == "number" ? w ? F([
|
|
11608
11623
|
{ zoom: 0, value: e.pointRadius * 0.025 },
|
|
11609
11624
|
{ zoom: 2, value: e.pointRadius * 0.05 },
|
|
11610
11625
|
{ zoom: 4, value: e.pointRadius * 0.1 },
|
|
@@ -11626,7 +11641,7 @@ function Cu(r, e) {
|
|
|
11626
11641
|
color: typeof e.pointColor == "string" ? e.pointColor : i.getColorHex(ut)
|
|
11627
11642
|
};
|
|
11628
11643
|
});
|
|
11629
|
-
L =
|
|
11644
|
+
L = Zn(ke, e.property), z = Wn(ke, e.property, w);
|
|
11630
11645
|
}
|
|
11631
11646
|
r.addLayer(
|
|
11632
11647
|
{
|
|
@@ -11688,7 +11703,7 @@ function Cu(r, e) {
|
|
|
11688
11703
|
function Lu(r, e) {
|
|
11689
11704
|
if (e.layerId && r.getLayer(e.layerId))
|
|
11690
11705
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
11691
|
-
const t = e.sourceId ??
|
|
11706
|
+
const t = e.sourceId ?? Dt(), n = e.layerId ?? Bt(), a = e.minzoom ?? 0, o = e.maxzoom ?? 23, i = e.zoomCompensation ?? !0, s = e.opacity ?? [
|
|
11692
11707
|
{ zoom: a, value: 0 },
|
|
11693
11708
|
{ zoom: a + 0.25, value: 1 },
|
|
11694
11709
|
{ zoom: o - 0.25, value: 1 },
|
|
@@ -11719,7 +11734,7 @@ function Lu(r, e) {
|
|
|
11719
11734
|
};
|
|
11720
11735
|
if (e.data && !r.getSource(t)) {
|
|
11721
11736
|
let v = e.data;
|
|
11722
|
-
typeof v == "string" &&
|
|
11737
|
+
typeof v == "string" && Et(v) && (v = `https://api.maptiler.com/data/${v}/features.json?key=${N.apiKey}`), r.addSource(t, {
|
|
11723
11738
|
type: "geojson",
|
|
11724
11739
|
data: v
|
|
11725
11740
|
});
|
|
@@ -11754,7 +11769,7 @@ const Eu = {
|
|
|
11754
11769
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
11755
11770
|
Co();
|
|
11756
11771
|
function rc() {
|
|
11757
|
-
return "3.1.
|
|
11772
|
+
return "3.1.0-rc5";
|
|
11758
11773
|
}
|
|
11759
11774
|
const nc = k.Map, ac = k.Marker, oc = k.Popup, ic = k.Style, sc = k.CanvasSource, lc = k.GeoJSONSource, uc = k.ImageSource, cc = k.RasterTileSource, pc = k.RasterDEMTileSource, fc = k.VectorTileSource, dc = k.VideoSource, hc = k.NavigationControl, yc = k.GeolocateControl, mc = k.AttributionControl, gc = k.LogoControl, vc = k.ScaleControl, bc = k.FullscreenControl, wc = k.TerrainControl, xc = k.BoxZoomHandler, Sc = k.ScrollZoomHandler, kc = k.CooperativeGesturesHandler, Cc = k.KeyboardHandler, Lc = k.TwoFingersTouchPitchHandler, Ec = k.MapWheelEvent, Tc = k.MapTouchEvent, Ac = k.MapMouseEvent, _c = k.config, Mc = k.getVersion, {
|
|
11760
11775
|
setRTLTextPlugin: Ic,
|
|
@@ -11799,7 +11814,7 @@ export {
|
|
|
11799
11814
|
Zu as CooperativeGesturesHandler,
|
|
11800
11815
|
kc as CooperativeGesturesHandlerMLGL,
|
|
11801
11816
|
ye as DOMcreate,
|
|
11802
|
-
|
|
11817
|
+
qr as DOMremove,
|
|
11803
11818
|
Hc as DoubleClickZoomHandler,
|
|
11804
11819
|
Gc as DragPanHandler,
|
|
11805
11820
|
qc as DragRotateHandler,
|
|
@@ -11822,7 +11837,7 @@ export {
|
|
|
11822
11837
|
zc as LngLatBounds,
|
|
11823
11838
|
jo as LogoControl,
|
|
11824
11839
|
gc as LogoControlMLGL,
|
|
11825
|
-
|
|
11840
|
+
Vr as Map,
|
|
11826
11841
|
nc as MapMLGL,
|
|
11827
11842
|
ec as MapMouseEvent,
|
|
11828
11843
|
Ac as MapMouseEventMLGL,
|
|
@@ -11833,7 +11848,7 @@ export {
|
|
|
11833
11848
|
Ju as MapWheelEvent,
|
|
11834
11849
|
Ec as MapWheelEventMLGL,
|
|
11835
11850
|
tl as MaptilerGeolocateControl,
|
|
11836
|
-
|
|
11851
|
+
on as MaptilerLogoControl,
|
|
11837
11852
|
Qs as MaptilerNavigationControl,
|
|
11838
11853
|
rl as MaptilerProjectionControl,
|
|
11839
11854
|
Js as MaptilerTerrainControl,
|
|
@@ -11885,7 +11900,7 @@ export {
|
|
|
11885
11900
|
vp as geocoding,
|
|
11886
11901
|
bp as geolocation,
|
|
11887
11902
|
wp as getAutoLanguage,
|
|
11888
|
-
|
|
11903
|
+
en as getBrowserLanguage,
|
|
11889
11904
|
xp as getBufferToPixelDataParser,
|
|
11890
11905
|
Sp as getLanguageInfoFromCode,
|
|
11891
11906
|
kp as getLanguageInfoFromFlag,
|
|
@@ -11915,9 +11930,9 @@ export {
|
|
|
11915
11930
|
Wc as setWorkerCount,
|
|
11916
11931
|
ep as setWorkerUrl,
|
|
11917
11932
|
Mp as staticMaps,
|
|
11918
|
-
|
|
11933
|
+
Hr as str2xml,
|
|
11919
11934
|
Ip as styleToStyle,
|
|
11920
11935
|
Pp as toLanguageInfo,
|
|
11921
|
-
|
|
11936
|
+
Bn as xml2str
|
|
11922
11937
|
};
|
|
11923
11938
|
//# sourceMappingURL=maptiler-sdk.mjs.map
|