@maptiler/sdk 5.0.0-rc.1 → 5.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/maptiler-sdk.mjs +282 -282
- package/package.json +1 -1
package/dist/maptiler-sdk.mjs
CHANGED
|
@@ -4,13 +4,13 @@ var qn = (r) => {
|
|
|
4
4
|
};
|
|
5
5
|
var ls = (r, e, t) => e in r ? ss(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
6
6
|
var g = (r, e, t) => ls(r, typeof e != "symbol" ? e + "" : e, t), Cr = (r, e, t) => e.has(r) || qn("Cannot " + t);
|
|
7
|
-
var
|
|
7
|
+
var E = (r, e, t) => (Cr(r, e, "read from private field"), t ? t.call(r) : e.get(r)), J = (r, e, t) => e.has(r) ? qn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), Q = (r, e, t, n) => (Cr(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), ee = (r, e, t) => (Cr(r, e, "access private method"), t);
|
|
8
8
|
import { LogoControl as us, addProtocol as Vn, NavigationControl as Ja, GeolocateControl as cs, LngLat as se, LngLatBounds as bn, Marker as qr, GeolocateEvent as ps, prewarm as fs, getWorkerUrl as hs, setWorkerUrl as ds, Map as ms, setWorkerCount as ys, AJAXError as gs, ScaleControl as vs, FullscreenControl as bs, Point as Qa, MercatorCoordinate as Vr, Evented as ei, Event as ws } from "maplibre-gl";
|
|
9
|
-
import { AJAXError as bf, AttributionControl as wf, AttributionControl as Sf, BoxZoomHandler as xf, BoxZoomHandler as
|
|
9
|
+
import { AJAXError as bf, AttributionControl as wf, AttributionControl as Sf, BoxZoomHandler as xf, BoxZoomHandler as Ef, CanvasSource as kf, CanvasSource as Cf, CooperativeGesturesHandler as Lf, CooperativeGesturesHandler as Af, DoubleClickZoomHandler as Tf, DragPanHandler as If, DragRotateHandler as Pf, EdgeInsets as Mf, Evented as _f, FullscreenControl as Rf, FullscreenControl as Of, GeoJSONSource as Ff, GeoJSONSource as zf, GeolocateControl as $f, GeolocateControl as Nf, Hash as Df, ImageSource as jf, ImageSource as Uf, KeyboardHandler as Bf, KeyboardHandler as qf, LngLat as Vf, LngLatBounds as Gf, LogoControl as Hf, LogoControl as Kf, Map as Zf, MapMouseEvent as Wf, MapMouseEvent as Xf, MapTouchEvent as Yf, MapTouchEvent as Jf, MapWheelEvent as Qf, MapWheelEvent as eh, Marker as th, Marker as rh, MercatorCoordinate as nh, NavigationControl as ah, NavigationControl as ih, Point as oh, Popup as sh, Popup as lh, RasterDEMTileSource as uh, RasterDEMTileSource as ch, RasterTileSource as ph, RasterTileSource as fh, ScaleControl as hh, ScaleControl as dh, ScrollZoomHandler as mh, ScrollZoomHandler as yh, Style as gh, Style as vh, TerrainControl as bh, TerrainControl as wh, TwoFingersTouchPitchHandler as Sh, TwoFingersTouchPitchHandler as xh, TwoFingersTouchRotateHandler as Eh, TwoFingersTouchZoomHandler as kh, TwoFingersTouchZoomRotateHandler as Ch, VectorTileSource as Lh, VectorTileSource as Ah, VideoSource as Th, VideoSource as Ih, addProtocol as Ph, addSourceType as Mh, clearPrewarmedResources as _h, config as Rh, getVersion as Oh, getMaxParallelImageRequests as Fh, getRTLTextPluginStatus as zh, getWorkerCount as $h, getWorkerUrl as Nh, importScriptInWorkers as Dh, removeProtocol as jh, setMaxParallelImageRequests as Uh, setRTLTextPlugin as Bh, setWorkerCount as qh, setWorkerUrl as Vh } from "maplibre-gl";
|
|
10
10
|
import { Base64 as Ss } from "js-base64";
|
|
11
11
|
import xs from "events";
|
|
12
12
|
import * as $t from "@maptiler/client";
|
|
13
|
-
import { Language as
|
|
13
|
+
import { Language as Es, getLanguageInfoFromCode as Gn, config as Me, MapStyle as gt, mapStylePresetList as Lr, expandMapStyle as ks, MapStyleVariant as Cs, ReferenceMapStyle as Ls, toLanguageInfo as Hn, getLanguageInfoFromFlag as As, geolocation as Kn } from "@maptiler/client";
|
|
14
14
|
import { MapStyle as Hh, MapStyleVariant as Kh, ReferenceMapStyle as Zh, ServiceError as Wh, areSameLanguages as Xh, bufferToPixelDataBrowser as Yh, canParsePixelData as Jh, circumferenceAtLatitude as Qh, coordinates as ed, data as td, elevation as rd, expandMapStyle as nd, geolocation as ad, getAutoLanguage as id, getBufferToPixelDataParser as od, getLanguageInfoFromCode as sd, getLanguageInfoFromFlag as ld, getLanguageInfoFromKey as ud, getTileCache as cd, isLanguageInfo as pd, mapStylePresetList as fd, math as hd, misc as dd, staticMaps as md, styleToStyle as yd, toLanguageInfo as gd } from "@maptiler/client";
|
|
15
15
|
import { v4 as cr } from "uuid";
|
|
16
16
|
(function() {
|
|
@@ -75,7 +75,7 @@ const O = {
|
|
|
75
75
|
isMode: !0,
|
|
76
76
|
geocoding: !1
|
|
77
77
|
},
|
|
78
|
-
...
|
|
78
|
+
...Es
|
|
79
79
|
};
|
|
80
80
|
function Zn() {
|
|
81
81
|
if (typeof navigator > "u") {
|
|
@@ -92,7 +92,7 @@ const Se = {
|
|
|
92
92
|
};
|
|
93
93
|
Object.freeze(Se);
|
|
94
94
|
const pr = cr();
|
|
95
|
-
class
|
|
95
|
+
class Ts extends xs {
|
|
96
96
|
constructor() {
|
|
97
97
|
super(...arguments);
|
|
98
98
|
/**
|
|
@@ -225,7 +225,7 @@ class As extends xs {
|
|
|
225
225
|
this._experimentalDefaultWorkerCount = t, this.emit("experimentalDefaultWorkerCount", t);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
const R = new
|
|
228
|
+
const R = new Ts();
|
|
229
229
|
class Wn extends us {
|
|
230
230
|
constructor(t = {}) {
|
|
231
231
|
super(t);
|
|
@@ -253,9 +253,9 @@ function ti(r) {
|
|
|
253
253
|
const e = new URL(r instanceof URL ? r.href : r);
|
|
254
254
|
return e.searchParams.delete("key"), e.searchParams.delete("mtsid"), e.toString();
|
|
255
255
|
}
|
|
256
|
-
let
|
|
256
|
+
let Ar;
|
|
257
257
|
async function wn() {
|
|
258
|
-
return
|
|
258
|
+
return Ar || (Ar = await caches.open(Is)), Ar;
|
|
259
259
|
}
|
|
260
260
|
let Xn = 0;
|
|
261
261
|
async function Rs() {
|
|
@@ -3128,7 +3128,7 @@ var w = class {
|
|
|
3128
3128
|
this.message = (r ? `${r}: ` : "") + t, n && (this.identifier = n), this.severity = a, e != null && e.__line__ && (this.line = e.__line__);
|
|
3129
3129
|
}
|
|
3130
3130
|
};
|
|
3131
|
-
const hr = { kind: "null" }, S = { kind: "number" },
|
|
3131
|
+
const hr = { kind: "null" }, S = { kind: "number" }, T = { kind: "string" }, M = { kind: "boolean" }, de = { kind: "color" }, dr = { kind: "projectionDefinition" }, Fe = { kind: "object" }, P = { kind: "value" }, Zs = { kind: "error" }, mr = { kind: "collator" }, yr = { kind: "formatted" }, gr = { kind: "padding" }, St = { kind: "colorArray" }, vr = { kind: "numberArray" }, _t = { kind: "resolvedImage" }, br = { kind: "variableAnchorOffsetCollection" };
|
|
3132
3132
|
function X(r, e) {
|
|
3133
3133
|
return {
|
|
3134
3134
|
kind: "array",
|
|
@@ -3145,7 +3145,7 @@ function D(r) {
|
|
|
3145
3145
|
const Ws = [
|
|
3146
3146
|
hr,
|
|
3147
3147
|
S,
|
|
3148
|
-
|
|
3148
|
+
T,
|
|
3149
3149
|
M,
|
|
3150
3150
|
de,
|
|
3151
3151
|
dr,
|
|
@@ -3184,7 +3184,7 @@ function ui(r) {
|
|
|
3184
3184
|
return r = r % 360, r < 0 && (r += 360), r;
|
|
3185
3185
|
}
|
|
3186
3186
|
function ci([r, e, t, n]) {
|
|
3187
|
-
r =
|
|
3187
|
+
r = Tr(r), e = Tr(e), t = Tr(t);
|
|
3188
3188
|
let a, i;
|
|
3189
3189
|
const o = Ir((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) / ii);
|
|
3190
3190
|
r === e && e === t ? a = i = o : (a = Ir((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) / ai), i = Ir((0.0139322 * r + 0.0971045 * e + 0.7141733 * t) / oi));
|
|
@@ -3196,7 +3196,7 @@ function ci([r, e, t, n]) {
|
|
|
3196
3196
|
n
|
|
3197
3197
|
];
|
|
3198
3198
|
}
|
|
3199
|
-
function
|
|
3199
|
+
function Tr(r) {
|
|
3200
3200
|
return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
|
|
3201
3201
|
}
|
|
3202
3202
|
function Ir(r) {
|
|
@@ -4082,7 +4082,7 @@ const al = {
|
|
|
4082
4082
|
function $e(r, e, t) {
|
|
4083
4083
|
return r + t * (e - r);
|
|
4084
4084
|
}
|
|
4085
|
-
function
|
|
4085
|
+
function Et(r, e, t) {
|
|
4086
4086
|
return r.map((n, a) => $e(n, e[a], t));
|
|
4087
4087
|
}
|
|
4088
4088
|
var G, Y = (G = class {
|
|
@@ -4195,7 +4195,7 @@ var G, Y = (G = class {
|
|
|
4195
4195
|
static interpolate(e, t, n, a = "rgb") {
|
|
4196
4196
|
switch (a) {
|
|
4197
4197
|
case "rgb": {
|
|
4198
|
-
const [i, o, s, l] =
|
|
4198
|
+
const [i, o, s, l] = Et(e.rgb, t.rgb, n);
|
|
4199
4199
|
return new G(i, o, s, l, !1);
|
|
4200
4200
|
}
|
|
4201
4201
|
case "hcl": {
|
|
@@ -4214,7 +4214,7 @@ var G, Y = (G = class {
|
|
|
4214
4214
|
return new G(m, y, v, b, !1);
|
|
4215
4215
|
}
|
|
4216
4216
|
case "lab": {
|
|
4217
|
-
const [i, o, s, l] = pi(
|
|
4217
|
+
const [i, o, s, l] = pi(Et(e.lab, t.lab, n));
|
|
4218
4218
|
return new G(i, o, s, l, !1);
|
|
4219
4219
|
}
|
|
4220
4220
|
}
|
|
@@ -4296,7 +4296,7 @@ var Kr = class {
|
|
|
4296
4296
|
return JSON.stringify(this.values);
|
|
4297
4297
|
}
|
|
4298
4298
|
static interpolate(e, t, n) {
|
|
4299
|
-
return new ft(
|
|
4299
|
+
return new ft(Et(e.values, t.values, n));
|
|
4300
4300
|
}
|
|
4301
4301
|
}, nt = class ht {
|
|
4302
4302
|
constructor(e) {
|
|
@@ -4319,9 +4319,9 @@ var Kr = class {
|
|
|
4319
4319
|
return JSON.stringify(this.values);
|
|
4320
4320
|
}
|
|
4321
4321
|
static interpolate(e, t, n) {
|
|
4322
|
-
return new ht(
|
|
4322
|
+
return new ht(Et(e.values, t.values, n));
|
|
4323
4323
|
}
|
|
4324
|
-
},
|
|
4324
|
+
}, Ae = class dt {
|
|
4325
4325
|
constructor(e) {
|
|
4326
4326
|
this.values = e.slice();
|
|
4327
4327
|
}
|
|
@@ -4468,7 +4468,7 @@ function hi(r, e, t, n) {
|
|
|
4468
4468
|
]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`;
|
|
4469
4469
|
}
|
|
4470
4470
|
function Qe(r) {
|
|
4471
|
-
if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ot || r instanceof Y || r instanceof xn || r instanceof Rt || r instanceof rt || r instanceof nt || r instanceof
|
|
4471
|
+
if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ot || r instanceof Y || r instanceof xn || r instanceof Rt || r instanceof rt || r instanceof nt || r instanceof Ae || r instanceof at || r instanceof it) return !0;
|
|
4472
4472
|
if (Array.isArray(r)) {
|
|
4473
4473
|
for (const e of r) if (!Qe(e)) return !1;
|
|
4474
4474
|
return !0;
|
|
@@ -4479,7 +4479,7 @@ function Qe(r) {
|
|
|
4479
4479
|
}
|
|
4480
4480
|
function V(r) {
|
|
4481
4481
|
if (r === null) return hr;
|
|
4482
|
-
if (typeof r == "string") return
|
|
4482
|
+
if (typeof r == "string") return T;
|
|
4483
4483
|
if (typeof r == "boolean") return M;
|
|
4484
4484
|
if (typeof r == "number") return S;
|
|
4485
4485
|
if (r instanceof Y) return de;
|
|
@@ -4488,7 +4488,7 @@ function V(r) {
|
|
|
4488
4488
|
if (r instanceof Rt) return yr;
|
|
4489
4489
|
if (r instanceof rt) return gr;
|
|
4490
4490
|
if (r instanceof nt) return vr;
|
|
4491
|
-
if (r instanceof
|
|
4491
|
+
if (r instanceof Ae) return St;
|
|
4492
4492
|
if (r instanceof at) return br;
|
|
4493
4493
|
if (r instanceof it) return _t;
|
|
4494
4494
|
if (Array.isArray(r)) {
|
|
@@ -4508,9 +4508,9 @@ function V(r) {
|
|
|
4508
4508
|
}
|
|
4509
4509
|
function bt(r) {
|
|
4510
4510
|
const e = typeof r;
|
|
4511
|
-
return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof Y || r instanceof ot || r instanceof Rt || r instanceof rt || r instanceof nt || r instanceof
|
|
4511
|
+
return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof Y || r instanceof ot || r instanceof Rt || r instanceof rt || r instanceof nt || r instanceof Ae || r instanceof at || r instanceof it ? r.toString() : JSON.stringify(r);
|
|
4512
4512
|
}
|
|
4513
|
-
var
|
|
4513
|
+
var kt = class di {
|
|
4514
4514
|
constructor(e, t) {
|
|
4515
4515
|
this.type = e, this.value = t;
|
|
4516
4516
|
}
|
|
@@ -4704,13 +4704,13 @@ var Ne = class Zr {
|
|
|
4704
4704
|
case "padding":
|
|
4705
4705
|
return rt.interpolate(c, p, u);
|
|
4706
4706
|
case "colorArray":
|
|
4707
|
-
return
|
|
4707
|
+
return Ae.interpolate(c, p, u);
|
|
4708
4708
|
case "numberArray":
|
|
4709
4709
|
return nt.interpolate(c, p, u);
|
|
4710
4710
|
case "variableAnchorOffsetCollection":
|
|
4711
4711
|
return at.interpolate(c, p, u, this.key);
|
|
4712
4712
|
case "array":
|
|
4713
|
-
return
|
|
4713
|
+
return Et(c, p, u);
|
|
4714
4714
|
case "projectionDefinition":
|
|
4715
4715
|
return ot.interpolate(c, p, u);
|
|
4716
4716
|
}
|
|
@@ -4719,14 +4719,14 @@ var Ne = class Zr {
|
|
|
4719
4719
|
case "color":
|
|
4720
4720
|
return Y.interpolate(c, p, u, "hcl");
|
|
4721
4721
|
case "colorArray":
|
|
4722
|
-
return
|
|
4722
|
+
return Ae.interpolate(c, p, u, "hcl");
|
|
4723
4723
|
}
|
|
4724
4724
|
case "interpolate-lab":
|
|
4725
4725
|
switch (this.type.kind) {
|
|
4726
4726
|
case "color":
|
|
4727
4727
|
return Y.interpolate(c, p, u, "lab");
|
|
4728
4728
|
case "colorArray":
|
|
4729
|
-
return
|
|
4729
|
+
return Ae.interpolate(c, p, u, "lab");
|
|
4730
4730
|
}
|
|
4731
4731
|
}
|
|
4732
4732
|
}
|
|
@@ -4760,7 +4760,7 @@ var ul = class bi {
|
|
|
4760
4760
|
if (s["font-scale"] && (l = t.parse(s["font-scale"], 1, S), !l))
|
|
4761
4761
|
return null;
|
|
4762
4762
|
let u = null;
|
|
4763
|
-
if (s["text-font"] && (u = t.parse(s["text-font"], 1, X(
|
|
4763
|
+
if (s["text-font"] && (u = t.parse(s["text-font"], 1, X(T)), !u))
|
|
4764
4764
|
return null;
|
|
4765
4765
|
let c = null;
|
|
4766
4766
|
if (s["text-color"] && (c = t.parse(s["text-color"], 1, de), !c))
|
|
@@ -4768,7 +4768,7 @@ var ul = class bi {
|
|
|
4768
4768
|
let p = null;
|
|
4769
4769
|
if (s["vertical-align"]) {
|
|
4770
4770
|
if (typeof s["vertical-align"] == "string" && !il.includes(s["vertical-align"])) return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${s["vertical-align"]}' instead.`);
|
|
4771
|
-
if (p = t.parse(s["vertical-align"], 1,
|
|
4771
|
+
if (p = t.parse(s["vertical-align"], 1, T), !p) return null;
|
|
4772
4772
|
}
|
|
4773
4773
|
const f = a[a.length - 1];
|
|
4774
4774
|
f.scale = l, f.font = u, f.textColor = c, f.verticalAlign = p;
|
|
@@ -4820,7 +4820,7 @@ function pl(r) {
|
|
|
4820
4820
|
return e;
|
|
4821
4821
|
}
|
|
4822
4822
|
const Dt = {
|
|
4823
|
-
string:
|
|
4823
|
+
string: T,
|
|
4824
4824
|
number: S,
|
|
4825
4825
|
boolean: M,
|
|
4826
4826
|
object: Fe
|
|
@@ -4878,7 +4878,7 @@ const ta = {
|
|
|
4878
4878
|
"to-boolean": M,
|
|
4879
4879
|
"to-color": de,
|
|
4880
4880
|
"to-number": S,
|
|
4881
|
-
"to-string":
|
|
4881
|
+
"to-string": T
|
|
4882
4882
|
};
|
|
4883
4883
|
var Ze = class Si {
|
|
4884
4884
|
constructor(e, t, n) {
|
|
@@ -4935,7 +4935,7 @@ var Ze = class Si {
|
|
|
4935
4935
|
let t;
|
|
4936
4936
|
for (const n of this.args) {
|
|
4937
4937
|
t = n.evaluate(e);
|
|
4938
|
-
const a =
|
|
4938
|
+
const a = Ae.parse(t);
|
|
4939
4939
|
if (a) return a;
|
|
4940
4940
|
}
|
|
4941
4941
|
throw new N(`Could not parse colorArray from value '${typeof t == "string" ? t : JSON.stringify(t)}'`, this.key);
|
|
@@ -4978,7 +4978,7 @@ var Ze = class Si {
|
|
|
4978
4978
|
outputDefined() {
|
|
4979
4979
|
return this.args.every((e) => e.outputDefined());
|
|
4980
4980
|
}
|
|
4981
|
-
}, xi = class
|
|
4981
|
+
}, xi = class Ei {
|
|
4982
4982
|
constructor(e, t) {
|
|
4983
4983
|
this.type = t.type, this.bindings = [].concat(e), this.result = t;
|
|
4984
4984
|
}
|
|
@@ -5001,12 +5001,12 @@ var Ze = class Si {
|
|
|
5001
5001
|
n.push([o, s]);
|
|
5002
5002
|
}
|
|
5003
5003
|
const a = t.parse(e[e.length - 1], e.length - 1, t.expectedType, n);
|
|
5004
|
-
return a ? new
|
|
5004
|
+
return a ? new Ei(n, a) : null;
|
|
5005
5005
|
}
|
|
5006
5006
|
outputDefined() {
|
|
5007
5007
|
return this.result.outputDefined();
|
|
5008
5008
|
}
|
|
5009
|
-
},
|
|
5009
|
+
}, ki = class Ci {
|
|
5010
5010
|
constructor(e, t) {
|
|
5011
5011
|
this.type = t.type, this.name = e, this.boundExpression = t;
|
|
5012
5012
|
}
|
|
@@ -5047,7 +5047,7 @@ var Ze = class Si {
|
|
|
5047
5047
|
outputDefined() {
|
|
5048
5048
|
return !1;
|
|
5049
5049
|
}
|
|
5050
|
-
}, hl = class
|
|
5050
|
+
}, hl = class Ai {
|
|
5051
5051
|
constructor(e, t, n) {
|
|
5052
5052
|
this.needle = e, this.haystack = t, this.key = n, this.type = M;
|
|
5053
5053
|
}
|
|
@@ -5056,11 +5056,11 @@ var Ze = class Si {
|
|
|
5056
5056
|
const n = t.parse(e[1], 1, P), a = t.parse(e[2], 2, P);
|
|
5057
5057
|
return !n || !a ? null : Sn(n.type, [
|
|
5058
5058
|
M,
|
|
5059
|
-
|
|
5059
|
+
T,
|
|
5060
5060
|
S,
|
|
5061
5061
|
hr,
|
|
5062
5062
|
P
|
|
5063
|
-
]) ? new
|
|
5063
|
+
]) ? new Ai(n, a, t.key) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${D(n.type)} instead`);
|
|
5064
5064
|
}
|
|
5065
5065
|
evaluate(e) {
|
|
5066
5066
|
const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
|
|
@@ -5090,7 +5090,7 @@ var Ze = class Si {
|
|
|
5090
5090
|
if (!n || !a) return null;
|
|
5091
5091
|
if (!Sn(n.type, [
|
|
5092
5092
|
M,
|
|
5093
|
-
|
|
5093
|
+
T,
|
|
5094
5094
|
S,
|
|
5095
5095
|
hr,
|
|
5096
5096
|
P
|
|
@@ -5123,7 +5123,7 @@ var Ze = class Si {
|
|
|
5123
5123
|
outputDefined() {
|
|
5124
5124
|
return !1;
|
|
5125
5125
|
}
|
|
5126
|
-
}, ml = class
|
|
5126
|
+
}, ml = class Ti {
|
|
5127
5127
|
constructor(e, t, n, a, i, o) {
|
|
5128
5128
|
this.inputType = e, this.type = t, this.input = n, this.cases = a, this.outputs = i, this.otherwise = o;
|
|
5129
5129
|
}
|
|
@@ -5155,7 +5155,7 @@ var Ze = class Si {
|
|
|
5155
5155
|
const s = t.parse(e[1], 1, P);
|
|
5156
5156
|
if (!s) return null;
|
|
5157
5157
|
const l = t.parse(e[e.length - 1], e.length - 1, a);
|
|
5158
|
-
return !l || s.type.kind !== "value" && t.concat(1).checkSubtype(n, s.type) ? null : new
|
|
5158
|
+
return !l || s.type.kind !== "value" && t.concat(1).checkSubtype(n, s.type) ? null : new Ti(n, a, s, i, o, l);
|
|
5159
5159
|
}
|
|
5160
5160
|
evaluate(e) {
|
|
5161
5161
|
const t = this.input.evaluate(e);
|
|
@@ -5211,7 +5211,7 @@ var Ze = class Si {
|
|
|
5211
5211
|
if (!n || !a) return null;
|
|
5212
5212
|
if (!Sn(n.type, [
|
|
5213
5213
|
X(P),
|
|
5214
|
-
|
|
5214
|
+
T,
|
|
5215
5215
|
P
|
|
5216
5216
|
])) return t.error(`Expected first argument to be of type array or string, but found ${D(n.type)} instead`);
|
|
5217
5217
|
if (e.length === 4) {
|
|
@@ -5281,13 +5281,13 @@ function Sl(r, e, t) {
|
|
|
5281
5281
|
function xl(r, e, t) {
|
|
5282
5282
|
return e <= t;
|
|
5283
5283
|
}
|
|
5284
|
-
function
|
|
5284
|
+
function El(r, e, t) {
|
|
5285
5285
|
return e >= t;
|
|
5286
5286
|
}
|
|
5287
5287
|
function Mi(r, e, t, n) {
|
|
5288
5288
|
return n.compare(e, t) === 0;
|
|
5289
5289
|
}
|
|
5290
|
-
function
|
|
5290
|
+
function kl(r, e, t, n) {
|
|
5291
5291
|
return !Mi(r, e, t, n);
|
|
5292
5292
|
}
|
|
5293
5293
|
function Cl(r, e, t, n) {
|
|
@@ -5296,10 +5296,10 @@ function Cl(r, e, t, n) {
|
|
|
5296
5296
|
function Ll(r, e, t, n) {
|
|
5297
5297
|
return n.compare(e, t) > 0;
|
|
5298
5298
|
}
|
|
5299
|
-
function
|
|
5299
|
+
function Al(r, e, t, n) {
|
|
5300
5300
|
return n.compare(e, t) <= 0;
|
|
5301
5301
|
}
|
|
5302
|
-
function
|
|
5302
|
+
function Tl(r, e, t, n) {
|
|
5303
5303
|
return n.compare(e, t) >= 0;
|
|
5304
5304
|
}
|
|
5305
5305
|
function st(r, e, t) {
|
|
@@ -5346,7 +5346,7 @@ function st(r, e, t) {
|
|
|
5346
5346
|
}
|
|
5347
5347
|
};
|
|
5348
5348
|
}
|
|
5349
|
-
const Il = st("==", vl, Mi), Pl = st("!=", bl,
|
|
5349
|
+
const Il = st("==", vl, Mi), Pl = st("!=", bl, kl), Ml = st("<", wl, Cl), _l = st(">", Sl, Ll), Rl = st("<=", xl, Al), Ol = st(">=", El, Tl);
|
|
5350
5350
|
var Ri = class Oi {
|
|
5351
5351
|
constructor(e, t, n) {
|
|
5352
5352
|
this.type = mr, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
|
|
@@ -5360,7 +5360,7 @@ var Ri = class Oi {
|
|
|
5360
5360
|
const i = t.parse(n["diacritic-sensitive"] === void 0 ? !1 : n["diacritic-sensitive"], 1, M);
|
|
5361
5361
|
if (!i) return null;
|
|
5362
5362
|
let o = null;
|
|
5363
|
-
return n.locale && (o = t.parse(n.locale, 1,
|
|
5363
|
+
return n.locale && (o = t.parse(n.locale, 1, T), !o) ? null : new Oi(a, i, o);
|
|
5364
5364
|
}
|
|
5365
5365
|
evaluate(e) {
|
|
5366
5366
|
return new xn(this.caseSensitive.evaluate(e), this.diacriticSensitive.evaluate(e), this.locale ? this.locale.evaluate(e) : null);
|
|
@@ -5373,7 +5373,7 @@ var Ri = class Oi {
|
|
|
5373
5373
|
}
|
|
5374
5374
|
}, Fl = class Fi {
|
|
5375
5375
|
constructor(e, t, n, a, i, o) {
|
|
5376
|
-
this.type =
|
|
5376
|
+
this.type = T, this.number = e, this.locale = t, this.currency = n, this.unit = a, this.minFractionDigits = i, this.maxFractionDigits = o;
|
|
5377
5377
|
}
|
|
5378
5378
|
static parse(e, t) {
|
|
5379
5379
|
if (e.length !== 3) return t.error("Expected two arguments.");
|
|
@@ -5382,13 +5382,13 @@ var Ri = class Oi {
|
|
|
5382
5382
|
const a = e[2];
|
|
5383
5383
|
if (typeof a != "object" || Array.isArray(a)) return t.error("NumberFormat options argument must be an object.");
|
|
5384
5384
|
let i = null;
|
|
5385
|
-
if (a.locale && (i = t.parse(a.locale, 1,
|
|
5385
|
+
if (a.locale && (i = t.parse(a.locale, 1, T), !i))
|
|
5386
5386
|
return null;
|
|
5387
5387
|
let o = null;
|
|
5388
|
-
if (a.currency && (o = t.parse(a.currency, 1,
|
|
5388
|
+
if (a.currency && (o = t.parse(a.currency, 1, T), !o))
|
|
5389
5389
|
return null;
|
|
5390
5390
|
let s = null;
|
|
5391
|
-
if (a.unit && (s = t.parse(a.unit, 1,
|
|
5391
|
+
if (a.unit && (s = t.parse(a.unit, 1, T), !s))
|
|
5392
5392
|
return null;
|
|
5393
5393
|
if (o && s) return t.error("NumberFormat options `currency` and `unit` are mutually exclusive");
|
|
5394
5394
|
let l = null;
|
|
@@ -5418,7 +5418,7 @@ var Ri = class Oi {
|
|
|
5418
5418
|
}
|
|
5419
5419
|
static parse(e, t) {
|
|
5420
5420
|
if (e.length !== 2) return t.error("Expected two arguments.");
|
|
5421
|
-
const n = t.parse(e[1], 1,
|
|
5421
|
+
const n = t.parse(e[1], 1, T);
|
|
5422
5422
|
return n ? new zi(n) : t.error("No image name provided.");
|
|
5423
5423
|
}
|
|
5424
5424
|
evaluate(e) {
|
|
@@ -5458,7 +5458,7 @@ function Nl(r, e) {
|
|
|
5458
5458
|
const t = Dl(r[0]), n = Ul(r[1]), a = Math.pow(2, e.z);
|
|
5459
5459
|
return [Math.round(t * a * me), Math.round(n * a * me)];
|
|
5460
5460
|
}
|
|
5461
|
-
function
|
|
5461
|
+
function En(r, e) {
|
|
5462
5462
|
const t = Math.pow(2, e.z), n = (r[0] / me + e.x) / t, a = (r[1] / me + e.y) / t;
|
|
5463
5463
|
return [jl(n), Bl(a)];
|
|
5464
5464
|
}
|
|
@@ -5523,7 +5523,7 @@ function na(r, e, t, n) {
|
|
|
5523
5523
|
const a = r[0] - t[0], i = r[1] - t[1], o = e[0] - t[0], s = e[1] - t[1], l = n[0] - t[0], u = n[1] - t[1], c = a * u - l * i, p = o * u - l * s;
|
|
5524
5524
|
return c > 0 && p < 0 || c < 0 && p > 0;
|
|
5525
5525
|
}
|
|
5526
|
-
function
|
|
5526
|
+
function kn(r, e, t) {
|
|
5527
5527
|
const n = [];
|
|
5528
5528
|
for (let a = 0; a < r.length; a++) {
|
|
5529
5529
|
const i = [];
|
|
@@ -5538,7 +5538,7 @@ function En(r, e, t) {
|
|
|
5538
5538
|
function Di(r, e, t) {
|
|
5539
5539
|
const n = [];
|
|
5540
5540
|
for (let a = 0; a < r.length; a++) {
|
|
5541
|
-
const i =
|
|
5541
|
+
const i = kn(r[a], e, t);
|
|
5542
5542
|
n.push(i);
|
|
5543
5543
|
}
|
|
5544
5544
|
return n;
|
|
@@ -5591,7 +5591,7 @@ function Xl(r, e) {
|
|
|
5591
5591
|
-1 / 0
|
|
5592
5592
|
], a = r.canonicalID();
|
|
5593
5593
|
if (e.type === "Polygon") {
|
|
5594
|
-
const i =
|
|
5594
|
+
const i = kn(e.coordinates, n, a), o = aa(r.geometry(), t, n, a);
|
|
5595
5595
|
if (!Ct(t, n)) return !1;
|
|
5596
5596
|
for (const s of o) if (!lt(s, i)) return !1;
|
|
5597
5597
|
}
|
|
@@ -5615,7 +5615,7 @@ function Yl(r, e) {
|
|
|
5615
5615
|
-1 / 0
|
|
5616
5616
|
], a = r.canonicalID();
|
|
5617
5617
|
if (e.type === "Polygon") {
|
|
5618
|
-
const i =
|
|
5618
|
+
const i = kn(e.coordinates, n, a), o = ia(r.geometry(), t, n, a);
|
|
5619
5619
|
if (!Ct(t, n)) return !1;
|
|
5620
5620
|
for (const s of o) if (!Ni(s, i)) return !1;
|
|
5621
5621
|
}
|
|
@@ -5801,7 +5801,7 @@ function rn(r) {
|
|
|
5801
5801
|
function sa(r) {
|
|
5802
5802
|
return r[0] !== -1 / 0 && r[1] !== -1 / 0 && r[2] !== 1 / 0 && r[3] !== 1 / 0;
|
|
5803
5803
|
}
|
|
5804
|
-
function
|
|
5804
|
+
function An(r, e, t) {
|
|
5805
5805
|
if (!sa(r) || !sa(e)) return NaN;
|
|
5806
5806
|
let n = 0, a = 0;
|
|
5807
5807
|
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]);
|
|
@@ -5810,7 +5810,7 @@ function Oe(r, e, t) {
|
|
|
5810
5810
|
const n = t.pointOnLine(e, r);
|
|
5811
5811
|
return t.distance(r, n.point);
|
|
5812
5812
|
}
|
|
5813
|
-
function
|
|
5813
|
+
function Tn(r, e, t, n, a) {
|
|
5814
5814
|
const i = Math.min(Oe(r, [t, n], a), Oe(e, [t, n], a)), o = Math.min(Oe(t, [r, e], a), Oe(n, [r, e], a));
|
|
5815
5815
|
return Math.min(i, o);
|
|
5816
5816
|
}
|
|
@@ -5822,7 +5822,7 @@ function eu(r, e, t, n, a) {
|
|
|
5822
5822
|
for (let u = n[0]; u < n[1]; ++u) {
|
|
5823
5823
|
const c = t[u], p = t[u + 1];
|
|
5824
5824
|
if (wr(s, l, c, p)) return 0;
|
|
5825
|
-
i = Math.min(i,
|
|
5825
|
+
i = Math.min(i, Tn(s, l, c, p, a));
|
|
5826
5826
|
}
|
|
5827
5827
|
}
|
|
5828
5828
|
return i;
|
|
@@ -5855,7 +5855,7 @@ function nu(r, e, t, n) {
|
|
|
5855
5855
|
for (const l of t) for (let u = 0, c = l.length, p = c - 1; u < c; p = u++) {
|
|
5856
5856
|
const f = l[p], h = l[u];
|
|
5857
5857
|
if (wr(o, s, f, h)) return 0;
|
|
5858
|
-
a = Math.min(a,
|
|
5858
|
+
a = Math.min(a, Tn(o, s, f, h, n));
|
|
5859
5859
|
}
|
|
5860
5860
|
}
|
|
5861
5861
|
return a;
|
|
@@ -5866,7 +5866,7 @@ function la(r, e) {
|
|
|
5866
5866
|
}
|
|
5867
5867
|
function au(r, e, t, n = 1 / 0) {
|
|
5868
5868
|
const a = rn(r), i = rn(e);
|
|
5869
|
-
if (n !== 1 / 0 &&
|
|
5869
|
+
if (n !== 1 / 0 && An(a, i, t) >= n) return n;
|
|
5870
5870
|
if (Ct(a, i)) {
|
|
5871
5871
|
if (la(r, e)) return 0;
|
|
5872
5872
|
} else if (la(e, r)) return 0;
|
|
@@ -5876,14 +5876,14 @@ function au(r, e, t, n = 1 / 0) {
|
|
|
5876
5876
|
for (const h of e) for (let d = 0, m = h.length, y = m - 1; d < m; y = d++) {
|
|
5877
5877
|
const v = h[y], b = h[d];
|
|
5878
5878
|
if (wr(p, f, v, b)) return 0;
|
|
5879
|
-
o = Math.min(o,
|
|
5879
|
+
o = Math.min(o, Tn(p, f, v, b, t));
|
|
5880
5880
|
}
|
|
5881
5881
|
}
|
|
5882
5882
|
return o;
|
|
5883
5883
|
}
|
|
5884
5884
|
function ua(r, e, t, n, a, i) {
|
|
5885
5885
|
if (!i) return;
|
|
5886
|
-
const o =
|
|
5886
|
+
const o = An(tn(n, i), a, t);
|
|
5887
5887
|
o < e && r.push([
|
|
5888
5888
|
o,
|
|
5889
5889
|
i,
|
|
@@ -5892,7 +5892,7 @@ function ua(r, e, t, n, a, i) {
|
|
|
5892
5892
|
}
|
|
5893
5893
|
function jt(r, e, t, n, a, i, o) {
|
|
5894
5894
|
if (!i || !o) return;
|
|
5895
|
-
const s =
|
|
5895
|
+
const s = An(tn(n, i), tn(a, o), t);
|
|
5896
5896
|
s < e && r.push([
|
|
5897
5897
|
s,
|
|
5898
5898
|
i,
|
|
@@ -5963,7 +5963,7 @@ function ar(r, e, t, n, a, i = 1 / 0) {
|
|
|
5963
5963
|
return o;
|
|
5964
5964
|
}
|
|
5965
5965
|
function iu(r, e) {
|
|
5966
|
-
const t = r.geometry(), n = t.flat().map((o) =>
|
|
5966
|
+
const t = r.geometry(), n = t.flat().map((o) => En([o.x, o.y], r.canonical));
|
|
5967
5967
|
if (t.length === 0) return NaN;
|
|
5968
5968
|
const a = new Ln(n[0][1]);
|
|
5969
5969
|
let i = 1 / 0;
|
|
@@ -5983,7 +5983,7 @@ function iu(r, e) {
|
|
|
5983
5983
|
return i;
|
|
5984
5984
|
}
|
|
5985
5985
|
function ou(r, e) {
|
|
5986
|
-
const t = r.geometry(), n = t.flat().map((o) =>
|
|
5986
|
+
const t = r.geometry(), n = t.flat().map((o) => En([o.x, o.y], r.canonical));
|
|
5987
5987
|
if (t.length === 0) return NaN;
|
|
5988
5988
|
const a = new Ln(n[0][1]);
|
|
5989
5989
|
let i = 1 / 0;
|
|
@@ -6005,7 +6005,7 @@ function ou(r, e) {
|
|
|
6005
6005
|
function su(r, e) {
|
|
6006
6006
|
const t = r.geometry();
|
|
6007
6007
|
if (t.length === 0 || t[0].length === 0) return NaN;
|
|
6008
|
-
const n = cl(t).map((o) => o.map((s) => s.map((l) =>
|
|
6008
|
+
const n = cl(t).map((o) => o.map((s) => s.map((l) => En([l.x, l.y], r.canonical)))), a = new Ln(n[0][0][0][1]);
|
|
6009
6009
|
let i = 1 / 0;
|
|
6010
6010
|
for (const o of e) for (const s of n) {
|
|
6011
6011
|
switch (o.type) {
|
|
@@ -6084,7 +6084,7 @@ var In = class Xt {
|
|
|
6084
6084
|
s.push(u);
|
|
6085
6085
|
}
|
|
6086
6086
|
return new qi(s);
|
|
6087
|
-
} else return new
|
|
6087
|
+
} else return new kt(a, n);
|
|
6088
6088
|
}
|
|
6089
6089
|
evaluate(e) {
|
|
6090
6090
|
return this.arr.map((t) => t.evaluate(e));
|
|
@@ -6137,7 +6137,7 @@ const Mn = {
|
|
|
6137
6137
|
"interpolate-lab": Ne,
|
|
6138
6138
|
length: $l,
|
|
6139
6139
|
let: xi,
|
|
6140
|
-
literal:
|
|
6140
|
+
literal: kt,
|
|
6141
6141
|
match: ml,
|
|
6142
6142
|
number: ge,
|
|
6143
6143
|
"number-format": Fl,
|
|
@@ -6150,7 +6150,7 @@ const Mn = {
|
|
|
6150
6150
|
"to-color": Ze,
|
|
6151
6151
|
"to-number": Ze,
|
|
6152
6152
|
"to-string": Ze,
|
|
6153
|
-
var:
|
|
6153
|
+
var: ki,
|
|
6154
6154
|
within: Cn,
|
|
6155
6155
|
distance: In,
|
|
6156
6156
|
"global-state": Pn
|
|
@@ -6226,10 +6226,10 @@ var he = class extends Error {
|
|
|
6226
6226
|
].includes(u.kind) || l.kind === "variableAnchorOffsetCollection" && ["value", "array"].includes(u.kind)) s = a(s, l, t.typeAnnotation || "coerce");
|
|
6227
6227
|
else if (this.checkSubtype(l, u)) return null;
|
|
6228
6228
|
}
|
|
6229
|
-
if (!(s instanceof
|
|
6229
|
+
if (!(s instanceof kt) && s.type.kind !== "resolvedImage" && this._isConstant(s)) {
|
|
6230
6230
|
const l = new mi();
|
|
6231
6231
|
try {
|
|
6232
|
-
s = new
|
|
6232
|
+
s = new kt(s.type, s.evaluate(l));
|
|
6233
6233
|
} catch (u) {
|
|
6234
6234
|
return this.error(u.message), null;
|
|
6235
6235
|
}
|
|
@@ -6359,13 +6359,13 @@ function _e(r) {
|
|
|
6359
6359
|
ut.register(Mn, {
|
|
6360
6360
|
error: [
|
|
6361
6361
|
Zs,
|
|
6362
|
-
[
|
|
6362
|
+
[T],
|
|
6363
6363
|
(r, [e], t) => {
|
|
6364
6364
|
throw new N(e.evaluate(r), t);
|
|
6365
6365
|
}
|
|
6366
6366
|
],
|
|
6367
6367
|
typeof: [
|
|
6368
|
-
|
|
6368
|
+
T,
|
|
6369
6369
|
[P],
|
|
6370
6370
|
(r, [e]) => D(V(e.evaluate(r)))
|
|
6371
6371
|
],
|
|
@@ -6403,15 +6403,15 @@ ut.register(Mn, {
|
|
|
6403
6403
|
],
|
|
6404
6404
|
has: {
|
|
6405
6405
|
type: M,
|
|
6406
|
-
overloads: [[[
|
|
6406
|
+
overloads: [[[T], (r, [e]) => pa(e.evaluate(r), r.properties())], [[T, Fe], (r, [e, t]) => pa(e.evaluate(r), t.evaluate(r))]]
|
|
6407
6407
|
},
|
|
6408
6408
|
get: {
|
|
6409
6409
|
type: P,
|
|
6410
|
-
overloads: [[[
|
|
6410
|
+
overloads: [[[T], (r, [e]) => Or(e.evaluate(r), r.properties())], [[T, Fe], (r, [e, t]) => Or(e.evaluate(r), t.evaluate(r))]]
|
|
6411
6411
|
},
|
|
6412
6412
|
"feature-state": [
|
|
6413
6413
|
P,
|
|
6414
|
-
[
|
|
6414
|
+
[T],
|
|
6415
6415
|
(r, [e]) => Or(e.evaluate(r), r.featureState || {})
|
|
6416
6416
|
],
|
|
6417
6417
|
properties: [
|
|
@@ -6420,7 +6420,7 @@ ut.register(Mn, {
|
|
|
6420
6420
|
(r) => r.properties()
|
|
6421
6421
|
],
|
|
6422
6422
|
"geometry-type": [
|
|
6423
|
-
|
|
6423
|
+
T,
|
|
6424
6424
|
[],
|
|
6425
6425
|
(r) => r.geometryType()
|
|
6426
6426
|
],
|
|
@@ -6591,7 +6591,7 @@ ut.register(Mn, {
|
|
|
6591
6591
|
],
|
|
6592
6592
|
"filter-==": [
|
|
6593
6593
|
M,
|
|
6594
|
-
[
|
|
6594
|
+
[T, P],
|
|
6595
6595
|
(r, [e, t]) => r.properties()[e.value] === t.value
|
|
6596
6596
|
],
|
|
6597
6597
|
"filter-id-==": [
|
|
@@ -6601,12 +6601,12 @@ ut.register(Mn, {
|
|
|
6601
6601
|
],
|
|
6602
6602
|
"filter-type-==": [
|
|
6603
6603
|
M,
|
|
6604
|
-
[
|
|
6604
|
+
[T],
|
|
6605
6605
|
(r, [e]) => r.geometryType() === e.value
|
|
6606
6606
|
],
|
|
6607
6607
|
"filter-<": [
|
|
6608
6608
|
M,
|
|
6609
|
-
[
|
|
6609
|
+
[T, P],
|
|
6610
6610
|
(r, [e, t]) => {
|
|
6611
6611
|
const n = r.properties()[e.value], a = t.value;
|
|
6612
6612
|
return typeof n == typeof a && n < a;
|
|
@@ -6622,7 +6622,7 @@ ut.register(Mn, {
|
|
|
6622
6622
|
],
|
|
6623
6623
|
"filter->": [
|
|
6624
6624
|
M,
|
|
6625
|
-
[
|
|
6625
|
+
[T, P],
|
|
6626
6626
|
(r, [e, t]) => {
|
|
6627
6627
|
const n = r.properties()[e.value], a = t.value;
|
|
6628
6628
|
return typeof n == typeof a && n > a;
|
|
@@ -6638,7 +6638,7 @@ ut.register(Mn, {
|
|
|
6638
6638
|
],
|
|
6639
6639
|
"filter-<=": [
|
|
6640
6640
|
M,
|
|
6641
|
-
[
|
|
6641
|
+
[T, P],
|
|
6642
6642
|
(r, [e, t]) => {
|
|
6643
6643
|
const n = r.properties()[e.value], a = t.value;
|
|
6644
6644
|
return typeof n == typeof a && n <= a;
|
|
@@ -6654,7 +6654,7 @@ ut.register(Mn, {
|
|
|
6654
6654
|
],
|
|
6655
6655
|
"filter->=": [
|
|
6656
6656
|
M,
|
|
6657
|
-
[
|
|
6657
|
+
[T, P],
|
|
6658
6658
|
(r, [e, t]) => {
|
|
6659
6659
|
const n = r.properties()[e.value], a = t.value;
|
|
6660
6660
|
return typeof n == typeof a && n >= a;
|
|
@@ -6683,7 +6683,7 @@ ut.register(Mn, {
|
|
|
6683
6683
|
],
|
|
6684
6684
|
"filter-type-in": [
|
|
6685
6685
|
M,
|
|
6686
|
-
[X(
|
|
6686
|
+
[X(T)],
|
|
6687
6687
|
(r, [e]) => e.value.indexOf(r.geometryType()) >= 0
|
|
6688
6688
|
],
|
|
6689
6689
|
"filter-id-in": [
|
|
@@ -6693,12 +6693,12 @@ ut.register(Mn, {
|
|
|
6693
6693
|
],
|
|
6694
6694
|
"filter-in-small": [
|
|
6695
6695
|
M,
|
|
6696
|
-
[
|
|
6696
|
+
[T, X(P)],
|
|
6697
6697
|
(r, [e, t]) => t.value.indexOf(r.properties()[e.value]) >= 0
|
|
6698
6698
|
],
|
|
6699
6699
|
"filter-in-large": [
|
|
6700
6700
|
M,
|
|
6701
|
-
[
|
|
6701
|
+
[T, X(P)],
|
|
6702
6702
|
(r, [e, t]) => cu(r.properties()[e.value], t.value, 0, t.value.length - 1)
|
|
6703
6703
|
],
|
|
6704
6704
|
all: {
|
|
@@ -6722,39 +6722,39 @@ ut.register(Mn, {
|
|
|
6722
6722
|
],
|
|
6723
6723
|
"is-supported-script": [
|
|
6724
6724
|
M,
|
|
6725
|
-
[
|
|
6725
|
+
[T],
|
|
6726
6726
|
(r, [e]) => {
|
|
6727
6727
|
const t = r.globals && r.globals.isSupportedScript;
|
|
6728
6728
|
return t ? t(e.evaluate(r)) : !0;
|
|
6729
6729
|
}
|
|
6730
6730
|
],
|
|
6731
6731
|
upcase: [
|
|
6732
|
-
|
|
6733
|
-
[
|
|
6732
|
+
T,
|
|
6733
|
+
[T],
|
|
6734
6734
|
(r, [e]) => e.evaluate(r).toUpperCase()
|
|
6735
6735
|
],
|
|
6736
6736
|
downcase: [
|
|
6737
|
-
|
|
6738
|
-
[
|
|
6737
|
+
T,
|
|
6738
|
+
[T],
|
|
6739
6739
|
(r, [e]) => e.evaluate(r).toLowerCase()
|
|
6740
6740
|
],
|
|
6741
6741
|
concat: [
|
|
6742
|
-
|
|
6742
|
+
T,
|
|
6743
6743
|
_e(P),
|
|
6744
6744
|
(r, e) => e.map((t) => bt(t.evaluate(r))).join("")
|
|
6745
6745
|
],
|
|
6746
6746
|
split: [
|
|
6747
|
-
X(
|
|
6748
|
-
[
|
|
6747
|
+
X(T),
|
|
6748
|
+
[T, T],
|
|
6749
6749
|
(r, [e, t]) => e.evaluate(r).split(t.evaluate(r))
|
|
6750
6750
|
],
|
|
6751
6751
|
join: [
|
|
6752
|
-
|
|
6753
|
-
[X(
|
|
6752
|
+
T,
|
|
6753
|
+
[X(T), T],
|
|
6754
6754
|
(r, [e, t]) => e.evaluate(r).join(t.evaluate(r))
|
|
6755
6755
|
],
|
|
6756
6756
|
"resolved-locale": [
|
|
6757
|
-
|
|
6757
|
+
T,
|
|
6758
6758
|
[mr],
|
|
6759
6759
|
(r, [e]) => e.evaluate(r).resolvedLocale()
|
|
6760
6760
|
]
|
|
@@ -6763,7 +6763,7 @@ function pu(r) {
|
|
|
6763
6763
|
return Array.isArray(r) ? `(${r.map(D).join(", ")})` : `(${D(r.type)}...)`;
|
|
6764
6764
|
}
|
|
6765
6765
|
function ir(r) {
|
|
6766
|
-
if (r instanceof
|
|
6766
|
+
if (r instanceof ki) return ir(r.boundExpression);
|
|
6767
6767
|
if (r instanceof ut && r.name === "error") return !1;
|
|
6768
6768
|
if (r instanceof Ri) return !1;
|
|
6769
6769
|
if (r instanceof Cn) return !1;
|
|
@@ -6772,7 +6772,7 @@ function ir(r) {
|
|
|
6772
6772
|
const e = r instanceof Ze || r instanceof ge;
|
|
6773
6773
|
let t = !0;
|
|
6774
6774
|
return r.eachChild((n) => {
|
|
6775
|
-
e ? t = t && ir(n) : t = t && n instanceof
|
|
6775
|
+
e ? t = t && ir(n) : t = t && n instanceof kt;
|
|
6776
6776
|
}), t ? Sr(r) && xr(r, [
|
|
6777
6777
|
"zoom",
|
|
6778
6778
|
"heatmap-density",
|
|
@@ -6936,9 +6936,9 @@ function On(r, e = /* @__PURE__ */ new Set()) {
|
|
|
6936
6936
|
function yu(r) {
|
|
6937
6937
|
const e = {
|
|
6938
6938
|
color: de,
|
|
6939
|
-
string:
|
|
6939
|
+
string: T,
|
|
6940
6940
|
number: S,
|
|
6941
|
-
enum:
|
|
6941
|
+
enum: T,
|
|
6942
6942
|
boolean: M,
|
|
6943
6943
|
formatted: yr,
|
|
6944
6944
|
padding: gr,
|
|
@@ -6960,7 +6960,7 @@ function gu(r) {
|
|
|
6960
6960
|
case "numberArray":
|
|
6961
6961
|
return nt.parse(r.default) || null;
|
|
6962
6962
|
case "colorArray":
|
|
6963
|
-
return
|
|
6963
|
+
return Ae.parse(r.default) || null;
|
|
6964
6964
|
case "variableAnchorOffsetCollection":
|
|
6965
6965
|
return at.parse(r.default) || null;
|
|
6966
6966
|
case "projectionDefinition":
|
|
@@ -7163,7 +7163,7 @@ function Fn(r) {
|
|
|
7163
7163
|
}));
|
|
7164
7164
|
return u;
|
|
7165
7165
|
}
|
|
7166
|
-
function
|
|
7166
|
+
function Er(r) {
|
|
7167
7167
|
const e = r.key, t = r.value, n = r.valueSpec;
|
|
7168
7168
|
let a = _(t);
|
|
7169
7169
|
return a === "number" && t !== t && (a = "NaN"), a !== "number" ? [new w(e, t, `number expected, ${a} found`)] : "minimum" in n && t < n.minimum ? [new w(e, t, `${t} is less than the minimum value ${n.minimum}`)] : "maximum" in n && t > n.maximum ? [new w(e, t, `${t} is greater than the maximum value ${n.maximum}`)] : [];
|
|
@@ -7216,7 +7216,7 @@ function ro(r) {
|
|
|
7216
7216
|
style: m.style,
|
|
7217
7217
|
styleSpec: m.styleSpec,
|
|
7218
7218
|
objectElementValidators: {
|
|
7219
|
-
zoom:
|
|
7219
|
+
zoom: Er,
|
|
7220
7220
|
value: h
|
|
7221
7221
|
}
|
|
7222
7222
|
}));
|
|
@@ -7242,8 +7242,8 @@ function ro(r) {
|
|
|
7242
7242
|
else if (v !== n) return [new w(m.key, x, `${v} stop domain type must match previous stop domain type ${n}`)];
|
|
7243
7243
|
if (v !== "number" && v !== "string" && v !== "boolean") return [new w(m.key, x, "stop domain value must be a number, string, or boolean")];
|
|
7244
7244
|
if (v !== "number" && t !== "categorical") {
|
|
7245
|
-
let
|
|
7246
|
-
return or(e) && t === void 0 && (
|
|
7245
|
+
let A = `number expected, ${v} found`;
|
|
7246
|
+
return or(e) && t === void 0 && (A += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new w(m.key, x, A)];
|
|
7247
7247
|
}
|
|
7248
7248
|
return t === "categorical" && v === "number" && (!isFinite(b) || Math.floor(b) !== b) ? [new w(m.key, x, `integer expected, found ${b}`)] : t !== "categorical" && v === "number" && i !== void 0 && b < i ? [new w(m.key, x, "stop domain values must appear in ascending order")] : (i = b, t === "categorical" && b in a ? [new w(m.key, x, "stop domain values must be unique")] : (a[b] = !0, []));
|
|
7249
7249
|
}
|
|
@@ -7279,7 +7279,7 @@ function an(r) {
|
|
|
7279
7279
|
const e = r.key, t = r.value, n = _(t);
|
|
7280
7280
|
return n !== "string" ? [new w(e, t, `color expected, ${n} found`)] : Y.parse(String(t)) ? [] : [new w(e, t, `color expected, "${t}" found`)];
|
|
7281
7281
|
}
|
|
7282
|
-
function
|
|
7282
|
+
function At(r) {
|
|
7283
7283
|
const e = r.key, t = r.value, n = r.valueSpec, a = [];
|
|
7284
7284
|
return Array.isArray(n.values) ? n.values.indexOf(q(t)) === -1 && a.push(new w(e, t, `expected one of [${n.values.join(", ")}], ${JSON.stringify(t)} found`)) : Object.keys(n.values).indexOf(q(t)) === -1 && a.push(new w(e, t, `expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(t)} found`)), a;
|
|
7285
7285
|
}
|
|
@@ -7288,7 +7288,7 @@ function xu(r, e) {
|
|
|
7288
7288
|
for (const n of e) t = t[n];
|
|
7289
7289
|
return t;
|
|
7290
7290
|
}
|
|
7291
|
-
function
|
|
7291
|
+
function Eu(r, e) {
|
|
7292
7292
|
const t = eo(e);
|
|
7293
7293
|
if (!t) return [];
|
|
7294
7294
|
const n = `${r.key}${t.path.map((a) => `[${a}]`).join("")}`;
|
|
@@ -7296,7 +7296,7 @@ function ku(r, e) {
|
|
|
7296
7296
|
}
|
|
7297
7297
|
function zn(r) {
|
|
7298
7298
|
const e = je(r.value);
|
|
7299
|
-
return Qi(e) ? [...
|
|
7299
|
+
return Qi(e) ? [...Eu(r, e), ...tt(sr({}, r, {
|
|
7300
7300
|
expressionContext: "filter",
|
|
7301
7301
|
valueSpec: { value: "boolean" }
|
|
7302
7302
|
}))] : no(r);
|
|
@@ -7307,7 +7307,7 @@ function no(r) {
|
|
|
7307
7307
|
const n = r.styleSpec;
|
|
7308
7308
|
let a, i = [];
|
|
7309
7309
|
if (e.length < 1) return [new w(t, e, "filter array must have at least 1 element")];
|
|
7310
|
-
switch (i = i.concat(
|
|
7310
|
+
switch (i = i.concat(At({
|
|
7311
7311
|
key: `${t}[0]`,
|
|
7312
7312
|
value: e[0],
|
|
7313
7313
|
valueSpec: n.filter_operator,
|
|
@@ -7326,7 +7326,7 @@ function no(r) {
|
|
|
7326
7326
|
case "!in":
|
|
7327
7327
|
e.length >= 2 && (a = _(e[1]), a !== "string" && i.push(new w(`${t}[1]`, e[1], `string expected, ${a} found`)));
|
|
7328
7328
|
for (let o = 2; o < e.length; o++)
|
|
7329
|
-
a = _(e[o]), q(e[1]) === "$type" ? i = i.concat(
|
|
7329
|
+
a = _(e[o]), q(e[1]) === "$type" ? i = i.concat(At({
|
|
7330
7330
|
key: `${t}[${o}]`,
|
|
7331
7331
|
value: e[o],
|
|
7332
7332
|
valueSpec: n.geometry_type,
|
|
@@ -7476,7 +7476,7 @@ function Pe(r) {
|
|
|
7476
7476
|
const e = r.value, t = r.key, n = _(e);
|
|
7477
7477
|
return n !== "string" ? [new w(t, e, `string expected, ${n} found`)] : [];
|
|
7478
7478
|
}
|
|
7479
|
-
function
|
|
7479
|
+
function ku(r) {
|
|
7480
7480
|
const e = r.sourceName ?? "", t = r.value, n = r.styleSpec, a = n.source_raster_dem, i = r.style;
|
|
7481
7481
|
let o = [];
|
|
7482
7482
|
const s = _(t);
|
|
@@ -7518,7 +7518,7 @@ function lo(r) {
|
|
|
7518
7518
|
validateSpec: i
|
|
7519
7519
|
}), s;
|
|
7520
7520
|
case "raster-dem":
|
|
7521
|
-
return s =
|
|
7521
|
+
return s = ku({
|
|
7522
7522
|
sourceName: t,
|
|
7523
7523
|
value: e,
|
|
7524
7524
|
style: r.style,
|
|
@@ -7572,7 +7572,7 @@ function lo(r) {
|
|
|
7572
7572
|
case "canvas":
|
|
7573
7573
|
return [new w(t, null, "Please use runtime APIs to add canvas sources, rather than including them in stylesheets.", "source.canvas")];
|
|
7574
7574
|
default:
|
|
7575
|
-
return
|
|
7575
|
+
return At({
|
|
7576
7576
|
key: `${t}.type`,
|
|
7577
7577
|
value: e.type,
|
|
7578
7578
|
valueSpec: { values: [
|
|
@@ -7670,10 +7670,10 @@ function po(r) {
|
|
|
7670
7670
|
function Lu(r) {
|
|
7671
7671
|
return Pe(r).length === 0 ? [] : tt(r);
|
|
7672
7672
|
}
|
|
7673
|
-
function
|
|
7673
|
+
function Au(r) {
|
|
7674
7674
|
return Pe(r).length === 0 ? [] : tt(r);
|
|
7675
7675
|
}
|
|
7676
|
-
function
|
|
7676
|
+
function Tu(r) {
|
|
7677
7677
|
const e = r.key, t = r.value;
|
|
7678
7678
|
if (_(t) === "array") {
|
|
7679
7679
|
if (t.length < 1 || t.length > 4) return [new w(e, t, `padding requires 1 to 4 values; ${t.length} values found`)];
|
|
@@ -7686,7 +7686,7 @@ function Au(r) {
|
|
|
7686
7686
|
valueSpec: n
|
|
7687
7687
|
}));
|
|
7688
7688
|
return a;
|
|
7689
|
-
} else return
|
|
7689
|
+
} else return Er({
|
|
7690
7690
|
key: e,
|
|
7691
7691
|
value: t,
|
|
7692
7692
|
valueSpec: {}
|
|
@@ -7705,7 +7705,7 @@ function Iu(r) {
|
|
|
7705
7705
|
valueSpec: n
|
|
7706
7706
|
}));
|
|
7707
7707
|
return a;
|
|
7708
|
-
} else return
|
|
7708
|
+
} else return Er({
|
|
7709
7709
|
key: e,
|
|
7710
7710
|
value: t,
|
|
7711
7711
|
valueSpec: {}
|
|
@@ -7731,7 +7731,7 @@ function Mu(r) {
|
|
|
7731
7731
|
if (n !== "array" || t.length < 1 || t.length % 2 !== 0) return [new w(e, t, "variableAnchorOffsetCollection requires a non-empty array of even length")];
|
|
7732
7732
|
let i = [];
|
|
7733
7733
|
for (let o = 0; o < t.length; o += 2)
|
|
7734
|
-
i = i.concat(
|
|
7734
|
+
i = i.concat(At({
|
|
7735
7735
|
key: `${e}[${o}]`,
|
|
7736
7736
|
value: t[o],
|
|
7737
7737
|
valueSpec: a.layout_symbol["text-anchor"]
|
|
@@ -7868,10 +7868,10 @@ const ga = {
|
|
|
7868
7868
|
},
|
|
7869
7869
|
array: Fn,
|
|
7870
7870
|
boolean: Su,
|
|
7871
|
-
number:
|
|
7871
|
+
number: Er,
|
|
7872
7872
|
color: an,
|
|
7873
7873
|
constants: to,
|
|
7874
|
-
enum:
|
|
7874
|
+
enum: At,
|
|
7875
7875
|
filter: zn,
|
|
7876
7876
|
function: ro,
|
|
7877
7877
|
layer: so,
|
|
@@ -7884,8 +7884,8 @@ const ga = {
|
|
|
7884
7884
|
projectionDefinition: Ru,
|
|
7885
7885
|
string: Pe,
|
|
7886
7886
|
formatted: Lu,
|
|
7887
|
-
resolvedImage:
|
|
7888
|
-
padding:
|
|
7887
|
+
resolvedImage: Au,
|
|
7888
|
+
padding: Tu,
|
|
7889
7889
|
numberArray: Iu,
|
|
7890
7890
|
colorArray: Pu,
|
|
7891
7891
|
variableAnchorOffsetCollection: Mu,
|
|
@@ -7970,7 +7970,7 @@ function va(r) {
|
|
|
7970
7970
|
requiresUrlMonitoring: !0,
|
|
7971
7971
|
isFallback: !1
|
|
7972
7972
|
} : {
|
|
7973
|
-
style:
|
|
7973
|
+
style: ks(r),
|
|
7974
7974
|
requiresUrlMonitoring: !0,
|
|
7975
7975
|
isFallback: !1
|
|
7976
7976
|
};
|
|
@@ -8022,7 +8022,7 @@ function ve(r, e, t) {
|
|
|
8022
8022
|
const n = window.document.createElement(r);
|
|
8023
8023
|
return e !== void 0 && (n.className = e), t && t.appendChild(n), n;
|
|
8024
8024
|
}
|
|
8025
|
-
function
|
|
8025
|
+
function Tt(r) {
|
|
8026
8026
|
r.parentNode && r.parentNode.removeChild(r);
|
|
8027
8027
|
}
|
|
8028
8028
|
class ju {
|
|
@@ -8036,7 +8036,7 @@ class ju {
|
|
|
8036
8036
|
return this._map = e, this._container = ve("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = ve("button", "maplibregl-ctrl-terrain", this._container), ve("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;
|
|
8037
8037
|
}
|
|
8038
8038
|
onRemove() {
|
|
8039
|
-
|
|
8039
|
+
Tt(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
|
|
8040
8040
|
}
|
|
8041
8041
|
_toggleTerrain() {
|
|
8042
8042
|
vo(this._map), this._updateTerrainIcon();
|
|
@@ -8154,7 +8154,7 @@ class Bu extends cs {
|
|
|
8154
8154
|
}
|
|
8155
8155
|
}
|
|
8156
8156
|
}
|
|
8157
|
-
var xe, te,
|
|
8157
|
+
var xe, te, Ee, ke, Ye;
|
|
8158
8158
|
class qu {
|
|
8159
8159
|
/**
|
|
8160
8160
|
* @param selectorOrElement Element to be used as control, specified as either reference to element itself or a CSS selector to find the element in DOM
|
|
@@ -8164,8 +8164,8 @@ class qu {
|
|
|
8164
8164
|
constructor(e, t, n) {
|
|
8165
8165
|
J(this, xe);
|
|
8166
8166
|
J(this, te);
|
|
8167
|
-
J(this, ke);
|
|
8168
8167
|
J(this, Ee);
|
|
8168
|
+
J(this, ke);
|
|
8169
8169
|
J(this, Ye);
|
|
8170
8170
|
if (typeof e == "string") {
|
|
8171
8171
|
const a = document.querySelector(e);
|
|
@@ -8173,20 +8173,20 @@ class qu {
|
|
|
8173
8173
|
Q(this, te, a);
|
|
8174
8174
|
} else
|
|
8175
8175
|
Q(this, te, e);
|
|
8176
|
-
t && Q(this,
|
|
8177
|
-
t(
|
|
8178
|
-
}), n && Q(this,
|
|
8179
|
-
n(
|
|
8180
|
-
}), Q(this, Ye,
|
|
8176
|
+
t && Q(this, Ee, (a) => {
|
|
8177
|
+
t(E(this, xe), E(this, te), a);
|
|
8178
|
+
}), n && Q(this, ke, (a) => {
|
|
8179
|
+
n(E(this, xe), E(this, te), a);
|
|
8180
|
+
}), Q(this, Ye, E(this, te).parentElement);
|
|
8181
8181
|
}
|
|
8182
8182
|
onAdd(e) {
|
|
8183
|
-
return Q(this, xe, e),
|
|
8183
|
+
return Q(this, xe, e), E(this, Ee) && E(this, te).addEventListener("click", E(this, Ee)), E(this, ke) && E(this, xe).on("render", E(this, ke)), Tt(E(this, te)), E(this, te);
|
|
8184
8184
|
}
|
|
8185
8185
|
onRemove() {
|
|
8186
|
-
|
|
8186
|
+
E(this, Ee) && E(this, te).removeEventListener("click", E(this, Ee)), E(this, ke) && E(this, xe).off("render", E(this, ke)), E(this, Ye) ? E(this, Ye).appendChild(E(this, te)) : Tt(E(this, te));
|
|
8187
8187
|
}
|
|
8188
8188
|
}
|
|
8189
|
-
xe = new WeakMap(), te = new WeakMap(),
|
|
8189
|
+
xe = new WeakMap(), te = new WeakMap(), Ee = new WeakMap(), ke = new WeakMap(), Ye = new WeakMap();
|
|
8190
8190
|
class Vu {
|
|
8191
8191
|
constructor() {
|
|
8192
8192
|
g(this, "map");
|
|
@@ -8197,7 +8197,7 @@ class Vu {
|
|
|
8197
8197
|
return this.map = e, this.container = ve("div", "maplibregl-ctrl maplibregl-ctrl-group"), this.projectionButton = ve("button", "maplibregl-ctrl-projection", this.container), ve("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;
|
|
8198
8198
|
}
|
|
8199
8199
|
onRemove() {
|
|
8200
|
-
|
|
8200
|
+
Tt(this.container), this.map.off("projectiontransition", this.updateProjectionIcon), this.map = void 0;
|
|
8201
8201
|
}
|
|
8202
8202
|
toggleProjection() {
|
|
8203
8203
|
bo(this.map), this.updateProjectionIcon();
|
|
@@ -8244,11 +8244,11 @@ class sn extends qu {
|
|
|
8244
8244
|
return Q(this, Pt, t), super.onAdd(t);
|
|
8245
8245
|
}
|
|
8246
8246
|
onRemove() {
|
|
8247
|
-
for (const [t, n] of
|
|
8247
|
+
for (const [t, n] of E(this, Je)) {
|
|
8248
8248
|
const a = t.deref();
|
|
8249
8249
|
a && a.removeEventListener("click", n);
|
|
8250
8250
|
}
|
|
8251
|
-
|
|
8251
|
+
E(this, Je).clear(), super.onRemove();
|
|
8252
8252
|
}
|
|
8253
8253
|
/**
|
|
8254
8254
|
* Configure a child element to be part of this control and to have a predefined functionality added
|
|
@@ -8259,9 +8259,9 @@ class sn extends qu {
|
|
|
8259
8259
|
if (!n) return;
|
|
8260
8260
|
if (!(n in ct)) throw new Error(`data-maptiler-control value "${n}" is invalid.`);
|
|
8261
8261
|
const a = (i) => {
|
|
8262
|
-
ct[n](
|
|
8262
|
+
ct[n](E(this, Pt), t, i);
|
|
8263
8263
|
};
|
|
8264
|
-
t.addEventListener("click", a),
|
|
8264
|
+
t.addEventListener("click", a), E(this, Je).set(new WeakRef(t), a);
|
|
8265
8265
|
}
|
|
8266
8266
|
}
|
|
8267
8267
|
Pt = new WeakMap(), Je = new WeakMap(), g(sn, "controlCallbacks", ct);
|
|
@@ -8298,48 +8298,48 @@ class zr {
|
|
|
8298
8298
|
height: "300px",
|
|
8299
8299
|
...e.containerStyle ?? {}
|
|
8300
8300
|
}
|
|
8301
|
-
}), e.lockZoom !== void 0 && (
|
|
8301
|
+
}), e.lockZoom !== void 0 && (E(this, re).minZoom = e.lockZoom, E(this, re).maxZoom = e.lockZoom);
|
|
8302
8302
|
}
|
|
8303
8303
|
setStyle(e, t) {
|
|
8304
|
-
|
|
8304
|
+
E(this, ae) || this.map.setStyle(e, t), ee(this, H, ue).call(this);
|
|
8305
8305
|
}
|
|
8306
8306
|
addLayer(e, t) {
|
|
8307
|
-
return
|
|
8307
|
+
return E(this, ae) || this.map.addLayer(e, t), ee(this, H, ue).call(this), this.map;
|
|
8308
8308
|
}
|
|
8309
8309
|
moveLayer(e, t) {
|
|
8310
|
-
return
|
|
8310
|
+
return E(this, ae) || this.map.moveLayer(e, t), ee(this, H, ue).call(this), this.map;
|
|
8311
8311
|
}
|
|
8312
8312
|
removeLayer(e) {
|
|
8313
|
-
return
|
|
8313
|
+
return E(this, ae) || this.map.removeLayer(e), ee(this, H, ue).call(this), this;
|
|
8314
8314
|
}
|
|
8315
8315
|
setLayerZoomRange(e, t, n) {
|
|
8316
|
-
return
|
|
8316
|
+
return E(this, ae) || this.map.setLayerZoomRange(e, t, n), ee(this, H, ue).call(this), this;
|
|
8317
8317
|
}
|
|
8318
8318
|
setFilter(e, t, n) {
|
|
8319
|
-
return
|
|
8319
|
+
return E(this, ae) || this.map.setFilter(e, t, n), ee(this, H, ue).call(this), this;
|
|
8320
8320
|
}
|
|
8321
8321
|
setPaintProperty(e, t, n, a) {
|
|
8322
|
-
return
|
|
8322
|
+
return E(this, ae) || this.map.setPaintProperty(e, t, n, a), ee(this, H, ue).call(this), this;
|
|
8323
8323
|
}
|
|
8324
8324
|
setLayoutProperty(e, t, n, a) {
|
|
8325
|
-
return
|
|
8325
|
+
return E(this, ae) || this.map.setLayoutProperty(e, t, n, a), ee(this, H, ue).call(this), this;
|
|
8326
8326
|
}
|
|
8327
8327
|
setGlyphs(e, t) {
|
|
8328
|
-
return
|
|
8328
|
+
return E(this, ae) || this.map.setGlyphs(e, t), ee(this, H, ue).call(this), this;
|
|
8329
8329
|
}
|
|
8330
8330
|
onAdd(e) {
|
|
8331
8331
|
Q(this, fe, e), Q(this, Ce, ve("div", "maplibregl-ctrl maplibregl-ctrl-group"));
|
|
8332
|
-
for (const [t, n] of Object.entries(
|
|
8333
|
-
|
|
8334
|
-
return
|
|
8332
|
+
for (const [t, n] of Object.entries(E(this, re).containerStyle))
|
|
8333
|
+
E(this, Ce).style.setProperty(t, n);
|
|
8334
|
+
return E(this, re).container = E(this, Ce), E(this, re).zoom = e.getZoom() + E(this, re).zoomAdjust, this.map = new Lo(E(this, re)), this.map.once("style.load", () => {
|
|
8335
8335
|
this.map.resize();
|
|
8336
8336
|
}), this.map.once("load", () => {
|
|
8337
|
-
ee(this, H, wo).call(this,
|
|
8338
|
-
}),
|
|
8337
|
+
ee(this, H, wo).call(this, E(this, re).parentRect), Q(this, Mt, ee(this, H, So).call(this));
|
|
8338
|
+
}), E(this, Ce);
|
|
8339
8339
|
}
|
|
8340
8340
|
onRemove() {
|
|
8341
8341
|
var e;
|
|
8342
|
-
(e =
|
|
8342
|
+
(e = E(this, Mt)) == null || e.call(this), Tt(E(this, Ce));
|
|
8343
8343
|
}
|
|
8344
8344
|
}
|
|
8345
8345
|
re = new WeakMap(), fe = new WeakMap(), Ce = new WeakMap(), Le = new WeakMap(), ae = new WeakMap(), Mt = new WeakMap(), H = new WeakSet(), wo = function(e) {
|
|
@@ -8354,7 +8354,7 @@ re = new WeakMap(), fe = new WeakMap(), Ce = new WeakMap(), Le = new WeakMap(),
|
|
|
8354
8354
|
}
|
|
8355
8355
|
}), this.map.addSource("parentRect", {
|
|
8356
8356
|
type: "geojson",
|
|
8357
|
-
data:
|
|
8357
|
+
data: E(this, Le)
|
|
8358
8358
|
}), (e.lineLayout !== void 0 || e.linePaint !== void 0) && this.map.addLayer({
|
|
8359
8359
|
id: "parentRectOutline",
|
|
8360
8360
|
type: "line",
|
|
@@ -8380,23 +8380,23 @@ re = new WeakMap(), fe = new WeakMap(), Ce = new WeakMap(), Le = new WeakMap(),
|
|
|
8380
8380
|
}
|
|
8381
8381
|
}), ee(this, H, ue).call(this));
|
|
8382
8382
|
}, ue = function() {
|
|
8383
|
-
if (
|
|
8384
|
-
const { devicePixelRatio: e } = window, t =
|
|
8385
|
-
|
|
8383
|
+
if (E(this, Le) === void 0) return;
|
|
8384
|
+
const { devicePixelRatio: e } = window, t = E(this, fe).getCanvas(), n = t.width / e, a = t.height / e, i = E(this, fe).unproject.bind(E(this, fe)), o = i([0, 0]), s = i([n, 0]), l = i([0, a]), u = i([n, a]);
|
|
8385
|
+
E(this, Le).geometry.coordinates = [[l.toArray(), u.toArray(), s.toArray(), o.toArray(), l.toArray()]];
|
|
8386
8386
|
const c = this.map.getSource("parentRect");
|
|
8387
|
-
c !== void 0 && c.setData(
|
|
8387
|
+
c !== void 0 && c.setData(E(this, Le));
|
|
8388
8388
|
}, So = function() {
|
|
8389
|
-
const { pitchAdjust: e } =
|
|
8389
|
+
const { pitchAdjust: e } = E(this, re), t = () => {
|
|
8390
8390
|
o("parent");
|
|
8391
8391
|
}, n = () => {
|
|
8392
8392
|
o("minimap");
|
|
8393
8393
|
}, a = () => {
|
|
8394
|
-
|
|
8394
|
+
E(this, fe).on("move", t), this.map.on("move", n);
|
|
8395
8395
|
}, i = () => {
|
|
8396
|
-
|
|
8396
|
+
E(this, fe).off("move", t), this.map.off("move", n);
|
|
8397
8397
|
}, o = (s) => {
|
|
8398
8398
|
i();
|
|
8399
|
-
const l = s === "parent" ?
|
|
8399
|
+
const l = s === "parent" ? E(this, fe) : this.map, u = s === "parent" ? this.map : E(this, fe), c = l.getCenter(), p = l.getZoom() + E(this, re).zoomAdjust * (s === "parent" ? 1 : -1), f = l.getBearing(), h = l.getPitch();
|
|
8400
8400
|
u.jumpTo({
|
|
8401
8401
|
center: c,
|
|
8402
8402
|
zoom: p,
|
|
@@ -8679,8 +8679,8 @@ function rc(r, e, t, n, a, i, o, s, l, u, c, p, f, h, d, m, y) {
|
|
|
8679
8679
|
return r[0] = e, r[1] = t, r[2] = n, r[3] = a, r[4] = i, r[5] = o, r[6] = s, r[7] = l, r[8] = u, r[9] = c, r[10] = p, r[11] = f, r[12] = h, r[13] = d, r[14] = m, r[15] = y, r;
|
|
8680
8680
|
}
|
|
8681
8681
|
function nc(r, e, t) {
|
|
8682
|
-
var n = e[0], a = e[1], i = e[2], o = e[3], s = e[4], l = e[5], u = e[6], c = e[7], p = e[8], f = e[9], h = e[10], d = e[11], m = e[12], y = e[13], v = e[14], b = e[15], x = t[0],
|
|
8683
|
-
return r[0] = x * n +
|
|
8682
|
+
var n = e[0], a = e[1], i = e[2], o = e[3], s = e[4], l = e[5], u = e[6], c = e[7], p = e[8], f = e[9], h = e[10], d = e[11], m = e[12], y = e[13], v = e[14], b = e[15], x = t[0], A = t[1], k = t[2], C = t[3];
|
|
8683
|
+
return r[0] = x * n + A * s + k * p + C * m, r[1] = x * a + A * l + k * f + C * y, r[2] = x * i + A * u + k * h + C * v, r[3] = x * o + A * c + k * d + C * b, x = t[4], A = t[5], k = t[6], C = t[7], r[4] = x * n + A * s + k * p + C * m, r[5] = x * a + A * l + k * f + C * y, r[6] = x * i + A * u + k * h + C * v, r[7] = x * o + A * c + k * d + C * b, x = t[8], A = t[9], k = t[10], C = t[11], r[8] = x * n + A * s + k * p + C * m, r[9] = x * a + A * l + k * f + C * y, r[10] = x * i + A * u + k * h + C * v, r[11] = x * o + A * c + k * d + C * b, x = t[12], A = t[13], k = t[14], C = t[15], r[12] = x * n + A * s + k * p + C * m, r[13] = x * a + A * l + k * f + C * y, r[14] = x * i + A * u + k * h + C * v, r[15] = x * o + A * c + k * d + C * b, r;
|
|
8684
8684
|
}
|
|
8685
8685
|
function ac(r, e, t) {
|
|
8686
8686
|
var n = t[0], a = t[1], i = t[2];
|
|
@@ -8720,7 +8720,7 @@ function $r(r, e) {
|
|
|
8720
8720
|
var t = e[0], n = e[1], a = e[2], i = t * t + n * n + a * a;
|
|
8721
8721
|
return i > 0 && (i = 1 / Math.sqrt(i)), r[0] = e[0] * i, r[1] = e[1] * i, r[2] = e[2] * i, r;
|
|
8722
8722
|
}
|
|
8723
|
-
function
|
|
8723
|
+
function Ea(r, e, t) {
|
|
8724
8724
|
var n = e[0], a = e[1], i = e[2], o = t[0], s = t[1], l = t[2];
|
|
8725
8725
|
return r[0] = a * l - i * s, r[1] = i * o - n * l, r[2] = n * s - a * o, r;
|
|
8726
8726
|
}
|
|
@@ -8736,9 +8736,9 @@ function ka(r, e, t) {
|
|
|
8736
8736
|
function uc(r) {
|
|
8737
8737
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
8738
8738
|
}
|
|
8739
|
-
var Nr,
|
|
8739
|
+
var Nr, ka;
|
|
8740
8740
|
function cc() {
|
|
8741
|
-
return
|
|
8741
|
+
return ka || (ka = 1, Nr = {
|
|
8742
8742
|
aliceblue: [240, 248, 255],
|
|
8743
8743
|
antiquewhite: [250, 235, 215],
|
|
8744
8744
|
aqua: [0, 255, 255],
|
|
@@ -8890,7 +8890,7 @@ function cc() {
|
|
|
8890
8890
|
}), Nr;
|
|
8891
8891
|
}
|
|
8892
8892
|
var Dr, Ca;
|
|
8893
|
-
function
|
|
8893
|
+
function Eo() {
|
|
8894
8894
|
if (Ca) return Dr;
|
|
8895
8895
|
Ca = 1;
|
|
8896
8896
|
const r = cc(), e = {};
|
|
@@ -9196,7 +9196,7 @@ var jr, La;
|
|
|
9196
9196
|
function pc() {
|
|
9197
9197
|
if (La) return jr;
|
|
9198
9198
|
La = 1;
|
|
9199
|
-
const r =
|
|
9199
|
+
const r = Eo();
|
|
9200
9200
|
function e() {
|
|
9201
9201
|
const i = {}, o = Object.keys(r);
|
|
9202
9202
|
for (let s = o.length, l = 0; l < s; l++)
|
|
@@ -9240,11 +9240,11 @@ function pc() {
|
|
|
9240
9240
|
return s;
|
|
9241
9241
|
}, jr;
|
|
9242
9242
|
}
|
|
9243
|
-
var Ur,
|
|
9243
|
+
var Ur, Aa;
|
|
9244
9244
|
function fc() {
|
|
9245
|
-
if (
|
|
9246
|
-
|
|
9247
|
-
const r =
|
|
9245
|
+
if (Aa) return Ur;
|
|
9246
|
+
Aa = 1;
|
|
9247
|
+
const r = Eo(), e = pc(), t = {}, n = Object.keys(r);
|
|
9248
9248
|
function a(o) {
|
|
9249
9249
|
const s = function(...l) {
|
|
9250
9250
|
const u = l[0];
|
|
@@ -9277,7 +9277,7 @@ function fc() {
|
|
|
9277
9277
|
}
|
|
9278
9278
|
var hc = fc();
|
|
9279
9279
|
const dc = /* @__PURE__ */ uc(hc);
|
|
9280
|
-
function
|
|
9280
|
+
function Ta({ gl: r, type: e, source: t }) {
|
|
9281
9281
|
const n = r.createShader(e);
|
|
9282
9282
|
if (n === null)
|
|
9283
9283
|
throw new Error("Cannot create shader");
|
|
@@ -9286,11 +9286,11 @@ function Aa({ gl: r, type: e, source: t }) {
|
|
|
9286
9286
|
return n;
|
|
9287
9287
|
}
|
|
9288
9288
|
function mc({ gl: r, vertexShaderSource: e, fragmentShaderSource: t }) {
|
|
9289
|
-
const n =
|
|
9289
|
+
const n = Ta({
|
|
9290
9290
|
gl: r,
|
|
9291
9291
|
type: r.VERTEX_SHADER,
|
|
9292
9292
|
source: e
|
|
9293
|
-
}), a =
|
|
9293
|
+
}), a = Ta({ gl: r, type: r.FRAGMENT_SHADER, source: t }), i = r.createProgram();
|
|
9294
9294
|
if (r.attachShader(i, n), r.attachShader(i, a), r.linkProgram(i), !r.getProgramParameter(i, r.LINK_STATUS))
|
|
9295
9295
|
throw console.error("Error: ", r.getProgramInfoLog(i)), new Error("Cannot link shader program");
|
|
9296
9296
|
return i;
|
|
@@ -9301,7 +9301,7 @@ function yc(r, e, t) {
|
|
|
9301
9301
|
throw new Error(`Cannot get uniform location for ${t}`);
|
|
9302
9302
|
return n;
|
|
9303
9303
|
}
|
|
9304
|
-
function
|
|
9304
|
+
function ko({
|
|
9305
9305
|
gl: r,
|
|
9306
9306
|
vertexShaderSource: e,
|
|
9307
9307
|
fragmentShaderSource: t,
|
|
@@ -9351,7 +9351,7 @@ let pt;
|
|
|
9351
9351
|
function gc(r) {
|
|
9352
9352
|
return pt = pt ?? document.createElement("canvas").getContext("2d"), pt ? (pt.fillStyle = r, pt.fillStyle) : "#000000";
|
|
9353
9353
|
}
|
|
9354
|
-
const $n = 1, j = $n / 2, U = $n / 2, B = $n / 2, vc = [-j, -U, B, j, -U, B, j, U, B, -j, U, B], bc = [-j, -U, -B, -j, U, -B, j, U, -B, j, -U, -B], wc = [-j, U, -B, -j, U, B, j, U, B, j, U, -B], Sc = [-j, -U, -B, j, -U, -B, j, -U, B, -j, -U, B], xc = [j, -U, -B, j, U, -B, j, U, B, j, -U, B],
|
|
9354
|
+
const $n = 1, j = $n / 2, U = $n / 2, B = $n / 2, vc = [-j, -U, B, j, -U, B, j, U, B, -j, U, B], bc = [-j, -U, -B, -j, U, -B, j, U, -B, j, -U, -B], wc = [-j, U, -B, -j, U, B, j, U, B, j, U, -B], Sc = [-j, -U, -B, j, -U, -B, j, -U, B, -j, -U, B], xc = [j, -U, -B, j, U, -B, j, U, B, j, -U, B], Ec = [-j, -U, -B, -j, -U, B, -j, U, B, -j, U, -B], kc = [...vc, ...bc, ...wc, ...Sc, ...xc, ...Ec], Cc = [
|
|
9355
9355
|
// Front
|
|
9356
9356
|
0,
|
|
9357
9357
|
1,
|
|
@@ -9434,8 +9434,8 @@ void main(void) {
|
|
|
9434
9434
|
#endif
|
|
9435
9435
|
}
|
|
9436
9436
|
`;
|
|
9437
|
-
var
|
|
9438
|
-
const
|
|
9437
|
+
var Ac = /* @__PURE__ */ ((r) => (r.UNIVERSE_DARK = "universe-dark", r))(Ac || {});
|
|
9438
|
+
const Te = {
|
|
9439
9439
|
stars: {
|
|
9440
9440
|
color: "hsl(233,100%,92%)",
|
|
9441
9441
|
preset: "stars"
|
|
@@ -9463,7 +9463,7 @@ const Ae = {
|
|
|
9463
9463
|
};
|
|
9464
9464
|
var Re = /* @__PURE__ */ ((r) => (r.POSITIVE_X = "pX", r.NEGATIVE_X = "nX", r.POSITIVE_Y = "pY", r.NEGATIVE_Y = "nY", r.POSITIVE_Z = "pZ", r.NEGATIVE_Z = "nZ", r))(Re || {});
|
|
9465
9465
|
const We = /* @__PURE__ */ new Map();
|
|
9466
|
-
function
|
|
9466
|
+
function Tc(r) {
|
|
9467
9467
|
const e = We.get(r);
|
|
9468
9468
|
e && (We.delete(r), r.deleteTexture(e));
|
|
9469
9469
|
}
|
|
@@ -9541,7 +9541,7 @@ function ur(r) {
|
|
|
9541
9541
|
function Ve() {
|
|
9542
9542
|
return `${R.apiURL}resources/space`;
|
|
9543
9543
|
}
|
|
9544
|
-
const Mc = ["vertexPosition"], _c = ["projectionMatrix", "modelViewMatrix", "cubeSampler", "bgColor", "fadeOpacity"], _a = "%USE_TEXTURE_MACRO_MARKER%", Rc = "#define USE_TEXTURE", Ra =
|
|
9544
|
+
const Mc = ["vertexPosition"], _c = ["projectionMatrix", "modelViewMatrix", "cubeSampler", "bgColor", "fadeOpacity"], _a = "%USE_TEXTURE_MACRO_MARKER%", Rc = "#define USE_TEXTURE", Ra = Te.stars;
|
|
9545
9545
|
function Oc(r, e) {
|
|
9546
9546
|
if (!un(r))
|
|
9547
9547
|
return {
|
|
@@ -9555,12 +9555,12 @@ function Oc(r, e) {
|
|
|
9555
9555
|
if (r.faces || r.path)
|
|
9556
9556
|
return delete t.preset, t;
|
|
9557
9557
|
const n = r.preset;
|
|
9558
|
-
if (!(n === void 0) && !(n in
|
|
9559
|
-
throw new Error(`[CubemapLayer]: Invalid preset "${n}". Available presets: ${Object.keys(
|
|
9558
|
+
if (!(n === void 0) && !(n in Te))
|
|
9559
|
+
throw new Error(`[CubemapLayer]: Invalid preset "${n}". Available presets: ${Object.keys(Te).join(", ")}`);
|
|
9560
9560
|
return {
|
|
9561
9561
|
...t,
|
|
9562
9562
|
// this _could_ be nullish_
|
|
9563
|
-
color: t.color ??
|
|
9563
|
+
color: t.color ?? Te[n].color ?? "hsl(233,100%,92%)"
|
|
9564
9564
|
};
|
|
9565
9565
|
}
|
|
9566
9566
|
class Ut {
|
|
@@ -9704,14 +9704,14 @@ class Ut {
|
|
|
9704
9704
|
updateCubemap({ facesNeedUpdate: e } = { facesNeedUpdate: !0 }) {
|
|
9705
9705
|
this.useCubemapTexture = this.faces !== null;
|
|
9706
9706
|
const t = _c.filter((n) => n === "cubeSampler" || n === "fadeOpacity" ? this.useCubemapTexture : !0);
|
|
9707
|
-
this.cubemap =
|
|
9707
|
+
this.cubemap = ko({
|
|
9708
9708
|
gl: this.gl,
|
|
9709
9709
|
vertexShaderSource: Lc,
|
|
9710
9710
|
// Because we only want to use the read the texture in gl if we're supposed to
|
|
9711
9711
|
fragmentShaderSource: this.useCubemapTexture ? Ia.replace(_a, Rc) : Ia.replace(_a, ""),
|
|
9712
9712
|
attributesKeys: Mc,
|
|
9713
9713
|
uniformsKeys: t,
|
|
9714
|
-
vertices:
|
|
9714
|
+
vertices: kc,
|
|
9715
9715
|
indices: Cc
|
|
9716
9716
|
}), this.cubeMapNeedsUpdate = e, this.useCubemapTexture && this.updateTexture(this.gl, this.faces), this.animateColorChange();
|
|
9717
9717
|
}
|
|
@@ -9733,7 +9733,7 @@ class Ut {
|
|
|
9733
9733
|
* @param {WebGLRenderingContext | WebGL2RenderingContext} gl - The WebGL context used for rendering.
|
|
9734
9734
|
*/
|
|
9735
9735
|
onRemove(e, t) {
|
|
9736
|
-
this.cubemap && (this.texture && (
|
|
9736
|
+
this.cubemap && (this.texture && (Tc(t), this.texture = void 0), t.deleteProgram(this.cubemap.shaderProgram), t.deleteBuffer(this.cubemap.positionBuffer), this.fireEvent("cubemaplayer:onremove", this));
|
|
9737
9737
|
}
|
|
9738
9738
|
/**
|
|
9739
9739
|
* Updates the cubemap texture with the provided faces.
|
|
@@ -9908,8 +9908,8 @@ class Ut {
|
|
|
9908
9908
|
const o = Qt(n.color);
|
|
9909
9909
|
if (n.color && this.targetBgColor.toString() !== o.toString())
|
|
9910
9910
|
this.setBgColor(o);
|
|
9911
|
-
else if (!n.color && n.preset && n.preset in
|
|
9912
|
-
const s =
|
|
9911
|
+
else if (!n.color && n.preset && n.preset in Te) {
|
|
9912
|
+
const s = Te[n.preset];
|
|
9913
9913
|
this.setBgColor(Qt(s.color));
|
|
9914
9914
|
}
|
|
9915
9915
|
this.updateCubemap({ facesNeedUpdate: i });
|
|
@@ -9944,7 +9944,7 @@ function un(r) {
|
|
|
9944
9944
|
), e;
|
|
9945
9945
|
if (!r.path && !r.preset && !r.faces && !r.color)
|
|
9946
9946
|
return e.push("Space specification contains neither a path, preset, faces, nor color."), e;
|
|
9947
|
-
r.preset && !(r.preset in
|
|
9947
|
+
r.preset && !(r.preset in Te) && e.push(`Space preset "${r.preset}" is not a valid preset. Available presets: ${Object.keys(Te).join(", ")}`);
|
|
9948
9948
|
const a = Object.keys(r).filter((i) => i !== "color").filter((i) => i === "preset" || i === "path" || i === "faces");
|
|
9949
9949
|
return a.length > 1 && e.push(
|
|
9950
9950
|
`Space specification contains multiple properties for cubemap definition: ${a.join(", ")}. Only one of \`path\`, \`preset\`, or \`faces\` should be defined.`
|
|
@@ -10148,7 +10148,7 @@ class Vt {
|
|
|
10148
10148
|
* @returns void
|
|
10149
10149
|
*/
|
|
10150
10150
|
onAdd(e, t) {
|
|
10151
|
-
this.map = e, this.plane =
|
|
10151
|
+
this.map = e, this.plane = ko({
|
|
10152
10152
|
gl: t,
|
|
10153
10153
|
vertexShaderSource: Fc,
|
|
10154
10154
|
fragmentShaderSource: zc,
|
|
@@ -10257,9 +10257,9 @@ class Vt {
|
|
|
10257
10257
|
const s = this.plane.programInfo.uniformsLocations.matrix;
|
|
10258
10258
|
e.uniformMatrix4fv(s, !1, o);
|
|
10259
10259
|
const l = wt(), u = this.map._camera.transform.cameraPosition, c = $r(Jt(), u), p = lc(0, 1, 0), f = Jt();
|
|
10260
|
-
|
|
10260
|
+
Ea(f, p, c), $r(f, f);
|
|
10261
10261
|
const h = Jt();
|
|
10262
|
-
|
|
10262
|
+
Ea(h, c, f), $r(h, h), rc(l, f[0], f[1], f[2], 0, h[0], h[1], h[2], 0, c[0], c[1], c[2], 0, 0, 0, 0, 1);
|
|
10263
10263
|
const d = this.plane.programInfo.uniformsLocations.rotationMatrix;
|
|
10264
10264
|
e.uniformMatrix4fv(d, !1, l);
|
|
10265
10265
|
const m = this.gradient.stops.length, y = [], v = [];
|
|
@@ -10332,7 +10332,7 @@ function Uc() {
|
|
|
10332
10332
|
);
|
|
10333
10333
|
}
|
|
10334
10334
|
function Bc() {
|
|
10335
|
-
return "https://cdn.maptiler.com/maptiler-sdk-js/
|
|
10335
|
+
return "https://cdn.maptiler.com/maptiler-sdk-js/v0.0.0-PLACEHOLDER/maplibre-gl-worker.mjs";
|
|
10336
10336
|
}
|
|
10337
10337
|
function Co() {
|
|
10338
10338
|
hs() || ds(qc(Bc()));
|
|
@@ -10348,7 +10348,7 @@ const Vc = "0.1.0", Gc = {
|
|
|
10348
10348
|
POINT: "POINT",
|
|
10349
10349
|
COUNTRY: "COUNTRY"
|
|
10350
10350
|
};
|
|
10351
|
-
let Lo = class
|
|
10351
|
+
let Lo = class Ao extends ms {
|
|
10352
10352
|
constructor(t) {
|
|
10353
10353
|
t.logSDKVersion !== !1 && Uc(), Co(), Ds(t.container), t.apiKey && (R.apiKey = t.apiKey);
|
|
10354
10354
|
const { style: n, requiresUrlMonitoring: a, isFallback: i } = va(t.style);
|
|
@@ -10491,12 +10491,12 @@ let Lo = class To extends ms {
|
|
|
10491
10491
|
let $ = C.dataset.maptilerControl;
|
|
10492
10492
|
return ($ === "true" || $ === "") && ($ = void 0), $;
|
|
10493
10493
|
}, b = (C) => C.dataset.maptilerPosition;
|
|
10494
|
-
let x = [...this._container.ownerDocument.querySelectorAll(m)],
|
|
10494
|
+
let x = [...this._container.ownerDocument.querySelectorAll(m)], A = [...this._container.ownerDocument.querySelectorAll(y)].filter(
|
|
10495
10495
|
(C) => C.closest(m) === null
|
|
10496
10496
|
);
|
|
10497
10497
|
if (typeof t.customControls == "string") {
|
|
10498
10498
|
const C = t.customControls;
|
|
10499
|
-
x = x.filter(($) => $.matches(C) || $.closest(C) !== null),
|
|
10499
|
+
x = x.filter(($) => $.matches(C) || $.closest(C) !== null), A = A.filter(($) => $.matches(C) || $.closest(C) !== null);
|
|
10500
10500
|
}
|
|
10501
10501
|
for (const C of x) {
|
|
10502
10502
|
const $ = new sn(C);
|
|
@@ -10504,13 +10504,13 @@ let Lo = class To extends ms {
|
|
|
10504
10504
|
for (const le of C.querySelectorAll(y))
|
|
10505
10505
|
$.configureGroupItem(le, v(le));
|
|
10506
10506
|
}
|
|
10507
|
-
for (const C of
|
|
10507
|
+
for (const C of A)
|
|
10508
10508
|
this.addControl(new sn(C, v(C)), b(C));
|
|
10509
|
-
const
|
|
10509
|
+
const k = () => {
|
|
10510
10510
|
const { lng: C, lat: $ } = this.getCenter();
|
|
10511
10511
|
this._container.style.setProperty("--maptiler-center-lng", String(C)), this._container.style.setProperty("--maptiler-center-lat", String($)), this._container.style.setProperty("--maptiler-zoom", String(this.getZoom())), this._container.style.setProperty("--maptiler-bearing", String(this.getBearing())), this._container.style.setProperty("--maptiler-pitch", String(this.getPitch())), this._container.style.setProperty("--maptiler-roll", String(this.getRoll())), this._container.style.setProperty("--maptiler-is-globe-projection", String(this.isGlobeProjection())), this._container.style.setProperty("--maptiler-has-terrain", String(this.hasTerrain()));
|
|
10512
10512
|
};
|
|
10513
|
-
|
|
10513
|
+
k(), this.on("render", k);
|
|
10514
10514
|
}
|
|
10515
10515
|
if (t.forceNoAttributionControl !== !0)
|
|
10516
10516
|
if ("logo" in d && d.logo) {
|
|
@@ -10573,8 +10573,8 @@ let Lo = class To extends ms {
|
|
|
10573
10573
|
style: v,
|
|
10574
10574
|
language: b,
|
|
10575
10575
|
apiKey: x,
|
|
10576
|
-
maptilerLogo:
|
|
10577
|
-
canvasContextAttributes:
|
|
10576
|
+
maptilerLogo: A,
|
|
10577
|
+
canvasContextAttributes: k,
|
|
10578
10578
|
refreshExpiredTiles: C,
|
|
10579
10579
|
maxBounds: $,
|
|
10580
10580
|
scrollZoom: le,
|
|
@@ -10597,8 +10597,8 @@ let Lo = class To extends ms {
|
|
|
10597
10597
|
language: b,
|
|
10598
10598
|
apiKey: x,
|
|
10599
10599
|
container: "null",
|
|
10600
|
-
maptilerLogo:
|
|
10601
|
-
canvasContextAttributes:
|
|
10600
|
+
maptilerLogo: A,
|
|
10601
|
+
canvasContextAttributes: k,
|
|
10602
10602
|
refreshExpiredTiles: C,
|
|
10603
10603
|
maxBounds: $,
|
|
10604
10604
|
scrollZoom: le,
|
|
@@ -10839,7 +10839,7 @@ let Lo = class To extends ms {
|
|
|
10839
10839
|
bearing: this.getBearing(),
|
|
10840
10840
|
pitch: this.getPitch()
|
|
10841
10841
|
};
|
|
10842
|
-
this.remove(), Object.assign(this, new
|
|
10842
|
+
this.remove(), Object.assign(this, new Ao({ ...this.options })), this.once("load", () => {
|
|
10843
10843
|
this.jumpTo(t);
|
|
10844
10844
|
});
|
|
10845
10845
|
}
|
|
@@ -10946,14 +10946,14 @@ let Lo = class To extends ms {
|
|
|
10946
10946
|
}
|
|
10947
10947
|
this.setSpaceFromStyle({ style: a.style }), this.setHaloFromStyle({ style: a.style });
|
|
10948
10948
|
}, l = (m) => {
|
|
10949
|
-
var v, b, x,
|
|
10949
|
+
var v, b, x, A;
|
|
10950
10950
|
const y = (m == null ? void 0 : m.target.getStyle()) ?? a.style;
|
|
10951
10951
|
if (!this.spaceboxLoadingState.styleLoadedCallbackFired && (this.spaceboxLoadingState.styleLoadedCallbackFired = !0, this.spaceboxLoadingState.styleLoadCallbackSet = !1, typeof y != "string"))
|
|
10952
10952
|
try {
|
|
10953
|
-
const
|
|
10954
|
-
this.space ? this.setSpaceFromStyle({ style: y }) : this.initSpace({ before:
|
|
10955
|
-
} catch (
|
|
10956
|
-
console.error(
|
|
10953
|
+
const k = this.getLayersOrder()[0];
|
|
10954
|
+
this.space ? this.setSpaceFromStyle({ style: y }) : this.initSpace({ before: k, spec: (b = (v = y.metadata) == null ? void 0 : v.maptiler) == null ? void 0 : b.space }), this.halo ? this.setHaloFromStyle({ style: y }) : this.initHalo({ before: k, spec: (A = (x = y.metadata) == null ? void 0 : x.maptiler) == null ? void 0 : A.halo });
|
|
10955
|
+
} catch (k) {
|
|
10956
|
+
console.error(k);
|
|
10957
10957
|
}
|
|
10958
10958
|
};
|
|
10959
10959
|
return typeof a.style == "string" || a.requiresUrlMonitoring ? (this.once("style.load", l), this) : (requestIdleCallback(() => {
|
|
@@ -11103,7 +11103,7 @@ let Lo = class To extends ms {
|
|
|
11103
11103
|
return (a = this.minimap) == null || a.setGlyphs(t, n), super.setGlyphs(t, n);
|
|
11104
11104
|
}
|
|
11105
11105
|
getStyleLanguage() {
|
|
11106
|
-
return !this.style || !this.style.stylesheet || !this.style.stylesheet.metadata || typeof this.style.stylesheet.metadata != "object" ? null : "maptiler:language" in this.style.stylesheet.metadata && typeof this.style.stylesheet.metadata["maptiler:language"] == "string" ?
|
|
11106
|
+
return !this.style || !this.style.stylesheet || !this.style.stylesheet.metadata || typeof this.style.stylesheet.metadata != "object" ? null : "maptiler:language" in this.style.stylesheet.metadata && typeof this.style.stylesheet.metadata["maptiler:language"] == "string" ? As(this.style.stylesheet.metadata["maptiler:language"]) : null;
|
|
11107
11107
|
}
|
|
11108
11108
|
/**
|
|
11109
11109
|
* Define the primary language of the map. Note that not all the languages shorthands provided are available.
|
|
@@ -11644,7 +11644,7 @@ class ie {
|
|
|
11644
11644
|
this.type = e, this.target = t, this.originalEvent = n ?? null, Object.assign(this, a);
|
|
11645
11645
|
}
|
|
11646
11646
|
}
|
|
11647
|
-
const
|
|
11647
|
+
const To = [
|
|
11648
11648
|
// pass nothing other than target (map / viewer) and type
|
|
11649
11649
|
"idle",
|
|
11650
11650
|
"render",
|
|
@@ -11685,7 +11685,7 @@ const Ao = [
|
|
|
11685
11685
|
// keeping it for reference
|
|
11686
11686
|
// "metadata",
|
|
11687
11687
|
], Hc = [
|
|
11688
|
-
...
|
|
11688
|
+
...To,
|
|
11689
11689
|
...Io,
|
|
11690
11690
|
...Po,
|
|
11691
11691
|
...Mo,
|
|
@@ -11746,7 +11746,7 @@ function Zc({ map: r, viewer: e, lngLatToPx: t }) {
|
|
|
11746
11746
|
return;
|
|
11747
11747
|
}
|
|
11748
11748
|
const f = n;
|
|
11749
|
-
if (
|
|
11749
|
+
if (To.includes(f)) {
|
|
11750
11750
|
e.fire(new ie(n, e));
|
|
11751
11751
|
return;
|
|
11752
11752
|
}
|
|
@@ -11813,10 +11813,10 @@ const ep = function(r, e) {
|
|
|
11813
11813
|
const x = Math.min(p || 0, c || 0);
|
|
11814
11814
|
if (x)
|
|
11815
11815
|
return t.zoom += Jc(x), t;
|
|
11816
|
-
let
|
|
11816
|
+
let A = 0, k = 0;
|
|
11817
11817
|
const C = 1, $ = 1 - (s - o) / h, le = 1 - (u - l) / f;
|
|
11818
|
-
|
|
11819
|
-
const Ue = 1 -
|
|
11818
|
+
A = Math.max(le, C), k = Math.max($, C);
|
|
11819
|
+
const Ue = 1 - A, Be = 1 - k;
|
|
11820
11820
|
if (a) {
|
|
11821
11821
|
const W = Be * h / 2;
|
|
11822
11822
|
y - W < o && (b = o + W), y + W > s && (b = s - W);
|
|
@@ -12907,10 +12907,10 @@ function gp(r, e, t, n) {
|
|
|
12907
12907
|
m || (m = I(b, "LineStyle")), y || (y = I(b, "PolyStyle"));
|
|
12908
12908
|
const x = I(b, "IconStyle");
|
|
12909
12909
|
if (x) {
|
|
12910
|
-
const
|
|
12911
|
-
if (
|
|
12912
|
-
const
|
|
12913
|
-
|
|
12910
|
+
const A = I(x, "Icon");
|
|
12911
|
+
if (A) {
|
|
12912
|
+
const k = z(I(A, "href"));
|
|
12913
|
+
k && (i.icon = k);
|
|
12914
12914
|
}
|
|
12915
12915
|
}
|
|
12916
12916
|
}
|
|
@@ -12920,12 +12920,12 @@ function gp(r, e, t, n) {
|
|
|
12920
12920
|
b && x && (i.timespan = { begin: b, end: x });
|
|
12921
12921
|
}
|
|
12922
12922
|
if (c !== null && (i.timestamp = z(I(c, "when")) ?? (/* @__PURE__ */ new Date()).toISOString()), m !== null) {
|
|
12923
|
-
const b = ja(z(I(m, "color"))), x = b[0],
|
|
12924
|
-
x && (i.stroke = x), Number.isNaN(
|
|
12923
|
+
const b = ja(z(I(m, "color"))), x = b[0], A = b[1], k = Number.parseFloat(z(I(m, "width")) ?? "");
|
|
12924
|
+
x && (i.stroke = x), Number.isNaN(A) || (i["stroke-opacity"] = A), Number.isNaN(k) || (i["stroke-width"] = k);
|
|
12925
12925
|
}
|
|
12926
12926
|
if (y) {
|
|
12927
|
-
const b = ja(z(I(y, "color"))), x = b[0],
|
|
12928
|
-
x && (i.fill = x), Number.isNaN(
|
|
12927
|
+
const b = ja(z(I(y, "color"))), x = b[0], A = b[1], k = z(I(y, "fill")), C = z(I(y, "outline"));
|
|
12928
|
+
x && (i.fill = x), Number.isNaN(A) || (i["fill-opacity"] = A), k && (i["fill-opacity"] = k === "1" ? i["fill-opacity"] || 1 : 0), C && (i["stroke-opacity"] = C === "1" ? i["stroke-opacity"] || 1 : 0);
|
|
12929
12929
|
}
|
|
12930
12930
|
if (p) {
|
|
12931
12931
|
const b = K(p, "Data"), x = K(p, "SimpleData");
|
|
@@ -13111,8 +13111,8 @@ function xp(r) {
|
|
|
13111
13111
|
}
|
|
13112
13112
|
return null;
|
|
13113
13113
|
}
|
|
13114
|
-
async function
|
|
13115
|
-
const t = e.download ?? !1, n = await
|
|
13114
|
+
async function Ep(r, e = {}) {
|
|
13115
|
+
const t = e.download ?? !1, n = await kp(r);
|
|
13116
13116
|
if (t) {
|
|
13117
13117
|
const a = e.filename ?? "maptiler_screenshot.png", i = document.createElement("a");
|
|
13118
13118
|
i.style.display = "none", document.body.appendChild(i), i.href = URL.createObjectURL(n), i.download = a, i.click(), setTimeout(() => {
|
|
@@ -13121,7 +13121,7 @@ async function kp(r, e = {}) {
|
|
|
13121
13121
|
}
|
|
13122
13122
|
return n;
|
|
13123
13123
|
}
|
|
13124
|
-
function
|
|
13124
|
+
function kp(r) {
|
|
13125
13125
|
return new Promise((e, t) => {
|
|
13126
13126
|
r.redraw(), r.once("idle", () => {
|
|
13127
13127
|
r.getCanvas().toBlob((n) => {
|
|
@@ -13154,7 +13154,7 @@ const hn = [
|
|
|
13154
13154
|
// https://colorhunt.co/palette/10a19d540375ff7000ffbf00
|
|
13155
13155
|
["#10A19D", "#540375", "#FF7000", "#FFBF00"]
|
|
13156
13156
|
];
|
|
13157
|
-
function
|
|
13157
|
+
function kr() {
|
|
13158
13158
|
return hn[~~(Math.random() * hn.length)][~~(Math.random() * 4)];
|
|
13159
13159
|
}
|
|
13160
13160
|
function Ft() {
|
|
@@ -14228,12 +14228,12 @@ async function Lp(r, e, t = {}) {
|
|
|
14228
14228
|
if (!n)
|
|
14229
14229
|
throw new Error("Failed to parse polyline data: expected GeoJSON, GPX, or KML.");
|
|
14230
14230
|
}
|
|
14231
|
-
return
|
|
14231
|
+
return Ap(r, {
|
|
14232
14232
|
...e,
|
|
14233
14233
|
data: n
|
|
14234
14234
|
});
|
|
14235
14235
|
}
|
|
14236
|
-
function
|
|
14236
|
+
function Ap(r, e) {
|
|
14237
14237
|
if (e.layerId && r.getLayer(e.layerId))
|
|
14238
14238
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
14239
14239
|
const t = e.sourceId ?? Ft(), n = e.layerId ?? zt(), a = {
|
|
@@ -14245,7 +14245,7 @@ function Tp(r, e) {
|
|
|
14245
14245
|
type: "geojson",
|
|
14246
14246
|
data: e.data
|
|
14247
14247
|
});
|
|
14248
|
-
const i = e.lineWidth ?? 3, o = e.lineColor ??
|
|
14248
|
+
const i = e.lineWidth ?? 3, o = e.lineColor ?? kr(), s = e.lineOpacity ?? 1, l = e.lineBlur ?? 0, u = e.lineGapWidth ?? 0;
|
|
14249
14249
|
let c = e.lineDashArray ?? null;
|
|
14250
14250
|
const p = e.outlineWidth ?? 1, f = e.outlineColor ?? "#FFFFFF", h = e.outlineOpacity ?? 1, d = e.outlineBlur ?? 0;
|
|
14251
14251
|
if (typeof c == "string" && (c = jn(c)), e.outline === !0) {
|
|
@@ -14299,7 +14299,7 @@ function Tp(r, e) {
|
|
|
14299
14299
|
e.beforeId
|
|
14300
14300
|
), a;
|
|
14301
14301
|
}
|
|
14302
|
-
function
|
|
14302
|
+
function Tp(r, e) {
|
|
14303
14303
|
if (e.layerId && r.getLayer(e.layerId))
|
|
14304
14304
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
14305
14305
|
const t = e.sourceId ?? Ft(), n = e.layerId ?? zt(), a = {
|
|
@@ -14315,7 +14315,7 @@ function Ap(r, e) {
|
|
|
14315
14315
|
});
|
|
14316
14316
|
}
|
|
14317
14317
|
let i = e.outlineDashArray ?? null;
|
|
14318
|
-
const o = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ??
|
|
14318
|
+
const o = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? kr(), p = e.fillOpacity ?? 1, f = e.outlinePosition ?? "center", h = e.pattern ?? null;
|
|
14319
14319
|
typeof i == "string" && (i = jn(i));
|
|
14320
14320
|
const d = (m = null) => {
|
|
14321
14321
|
if (r.addLayer(
|
|
@@ -14394,23 +14394,23 @@ function Ip(r, e) {
|
|
|
14394
14394
|
{ zoom: x - 0.25, value: 1 },
|
|
14395
14395
|
{ zoom: x, value: 0 }
|
|
14396
14396
|
]);
|
|
14397
|
-
const
|
|
14397
|
+
const A = {
|
|
14398
14398
|
pointLayerId: u,
|
|
14399
14399
|
clusterLayerId: "",
|
|
14400
14400
|
labelLayerId: "",
|
|
14401
14401
|
pointSourceId: l
|
|
14402
14402
|
};
|
|
14403
14403
|
if (e.data && !r.getSource(l)) {
|
|
14404
|
-
let
|
|
14405
|
-
typeof
|
|
14404
|
+
let k = e.data;
|
|
14405
|
+
typeof k == "string" && fr(k) && (k = `${R.apiURL}data/${k}/features.json?key=${R.apiKey}`), r.addSource(l, {
|
|
14406
14406
|
type: "geojson",
|
|
14407
|
-
data:
|
|
14407
|
+
data: k,
|
|
14408
14408
|
cluster: a
|
|
14409
14409
|
});
|
|
14410
14410
|
}
|
|
14411
14411
|
if (a) {
|
|
14412
|
-
|
|
14413
|
-
const
|
|
14412
|
+
A.clusterLayerId = `${u}_cluster`;
|
|
14413
|
+
const k = Array.from({ length: i }, (C, $) => {
|
|
14414
14414
|
const le = s.min + $ * (s.max - s.min) / (i - 1);
|
|
14415
14415
|
return {
|
|
14416
14416
|
value: le,
|
|
@@ -14420,14 +14420,14 @@ function Ip(r, e) {
|
|
|
14420
14420
|
});
|
|
14421
14421
|
r.addLayer(
|
|
14422
14422
|
{
|
|
14423
|
-
id:
|
|
14423
|
+
id: A.clusterLayerId,
|
|
14424
14424
|
type: "circle",
|
|
14425
14425
|
source: l,
|
|
14426
14426
|
filter: ["has", "point_count"],
|
|
14427
14427
|
paint: {
|
|
14428
14428
|
// 'circle-color': options.pointColor ?? colorDrivenByProperty(clusterStyle, "point_count"),
|
|
14429
|
-
"circle-color": typeof e.pointColor == "string" ? e.pointColor : mn(
|
|
14430
|
-
"circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? F(e.pointRadius) : yn(
|
|
14429
|
+
"circle-color": typeof e.pointColor == "string" ? e.pointColor : mn(k, "point_count"),
|
|
14430
|
+
"circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? F(e.pointRadius) : yn(k, "point_count", !1),
|
|
14431
14431
|
"circle-pitch-alignment": p ? "viewport" : "map",
|
|
14432
14432
|
"circle-pitch-scale": "map",
|
|
14433
14433
|
// scale with camera distance regardless of viewport/biewport alignement
|
|
@@ -14444,7 +14444,7 @@ function Ip(r, e) {
|
|
|
14444
14444
|
e.beforeId
|
|
14445
14445
|
), r.addLayer(
|
|
14446
14446
|
{
|
|
14447
|
-
id:
|
|
14447
|
+
id: A.pointLayerId,
|
|
14448
14448
|
type: "circle",
|
|
14449
14449
|
source: l,
|
|
14450
14450
|
filter: ["!", ["has", "point_count"]],
|
|
@@ -14454,7 +14454,7 @@ function Ip(r, e) {
|
|
|
14454
14454
|
// scale with camera distance regardless of viewport/biewport alignement
|
|
14455
14455
|
// 'circle-color': options.pointColor ?? clusterStyle[0].color,
|
|
14456
14456
|
"circle-color": typeof e.pointColor == "string" ? e.pointColor : o.getColorHex(o.getBounds().min),
|
|
14457
|
-
"circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? F(e.pointRadius) :
|
|
14457
|
+
"circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? F(e.pointRadius) : k[0].pointRadius * 0.75,
|
|
14458
14458
|
"circle-opacity": y,
|
|
14459
14459
|
...f && {
|
|
14460
14460
|
"circle-stroke-opacity": typeof h == "number" ? h : F(h),
|
|
@@ -14468,7 +14468,7 @@ function Ip(r, e) {
|
|
|
14468
14468
|
e.beforeId
|
|
14469
14469
|
);
|
|
14470
14470
|
} else {
|
|
14471
|
-
let
|
|
14471
|
+
let k = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : kr(), C = typeof e.pointRadius == "number" ? v ? F([
|
|
14472
14472
|
{ zoom: 0, value: e.pointRadius * 0.025 },
|
|
14473
14473
|
{ zoom: 2, value: e.pointRadius * 0.05 },
|
|
14474
14474
|
{ zoom: 4, value: e.pointRadius * 0.1 },
|
|
@@ -14490,11 +14490,11 @@ function Ip(r, e) {
|
|
|
14490
14490
|
color: typeof e.pointColor == "string" ? e.pointColor : o.getColorHex(Be)
|
|
14491
14491
|
};
|
|
14492
14492
|
});
|
|
14493
|
-
|
|
14493
|
+
k = mn($, e.property), C = yn($, e.property, v);
|
|
14494
14494
|
}
|
|
14495
14495
|
r.addLayer(
|
|
14496
14496
|
{
|
|
14497
|
-
id:
|
|
14497
|
+
id: A.pointLayerId,
|
|
14498
14498
|
type: "circle",
|
|
14499
14499
|
source: l,
|
|
14500
14500
|
layout: {
|
|
@@ -14505,7 +14505,7 @@ function Ip(r, e) {
|
|
|
14505
14505
|
"circle-pitch-alignment": p ? "viewport" : "map",
|
|
14506
14506
|
"circle-pitch-scale": "map",
|
|
14507
14507
|
// scale with camera distance regardless of viewport/biewport alignement
|
|
14508
|
-
"circle-color":
|
|
14508
|
+
"circle-color": k,
|
|
14509
14509
|
"circle-opacity": y,
|
|
14510
14510
|
"circle-radius": C,
|
|
14511
14511
|
...f && {
|
|
@@ -14521,11 +14521,11 @@ function Ip(r, e) {
|
|
|
14521
14521
|
);
|
|
14522
14522
|
}
|
|
14523
14523
|
if (c !== !1 && (e.cluster || e.property)) {
|
|
14524
|
-
|
|
14525
|
-
const
|
|
14524
|
+
A.labelLayerId = `${u}_label`;
|
|
14525
|
+
const k = e.labelColor ?? "#fff", C = e.labelSize ?? 12;
|
|
14526
14526
|
r.addLayer(
|
|
14527
14527
|
{
|
|
14528
|
-
id:
|
|
14528
|
+
id: A.labelLayerId,
|
|
14529
14529
|
type: "symbol",
|
|
14530
14530
|
source: l,
|
|
14531
14531
|
filter: ["has", e.cluster ? "point_count" : e.property],
|
|
@@ -14538,7 +14538,7 @@ function Ip(r, e) {
|
|
|
14538
14538
|
// so that the largest value goes on top
|
|
14539
14539
|
},
|
|
14540
14540
|
paint: {
|
|
14541
|
-
"text-color":
|
|
14541
|
+
"text-color": k,
|
|
14542
14542
|
"text-opacity": y
|
|
14543
14543
|
},
|
|
14544
14544
|
minzoom: b,
|
|
@@ -14547,7 +14547,7 @@ function Ip(r, e) {
|
|
|
14547
14547
|
e.beforeId
|
|
14548
14548
|
);
|
|
14549
14549
|
}
|
|
14550
|
-
return
|
|
14550
|
+
return A;
|
|
14551
14551
|
}
|
|
14552
14552
|
function Pp(r, e) {
|
|
14553
14553
|
if (e.layerId && r.getLayer(e.layerId))
|
|
@@ -14610,7 +14610,7 @@ const mf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14610
14610
|
__proto__: null,
|
|
14611
14611
|
addHeatmap: Pp,
|
|
14612
14612
|
addPoint: Ip,
|
|
14613
|
-
addPolygon:
|
|
14613
|
+
addPolygon: Tp,
|
|
14614
14614
|
addPolyline: Lp,
|
|
14615
14615
|
colorDrivenByProperty: mn,
|
|
14616
14616
|
colorPalettes: hn,
|
|
@@ -14618,7 +14618,7 @@ const mf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14618
14618
|
dashArrayMaker: jn,
|
|
14619
14619
|
generateRandomLayerName: zt,
|
|
14620
14620
|
generateRandomSourceName: Ft,
|
|
14621
|
-
getRandomColor:
|
|
14621
|
+
getRandomColor: kr,
|
|
14622
14622
|
heatmapIntensityFromColorRamp: Wo,
|
|
14623
14623
|
lerpZoomNumberValues: dn,
|
|
14624
14624
|
opacityDrivenByProperty: gn,
|
|
@@ -14627,7 +14627,7 @@ const mf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14627
14627
|
radiusDrivenByPropertyHeatmap: Zo,
|
|
14628
14628
|
rampedOptionsToLayerPaintSpec: F,
|
|
14629
14629
|
rampedPropertyValueWeight: Ko,
|
|
14630
|
-
takeScreenshot:
|
|
14630
|
+
takeScreenshot: Ep
|
|
14631
14631
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
14632
14632
|
function Mp(...r) {
|
|
14633
14633
|
const e = r[0].length;
|
|
@@ -14688,13 +14688,13 @@ function Fp(r, e = {}) {
|
|
|
14688
14688
|
[v]: b
|
|
14689
14689
|
}, {}), d = l ?? c.map((y, v) => v / c.length), m = s ?? d.map(() => t ?? "Linear");
|
|
14690
14690
|
if (c.some((y) => y.length > 2) && console.warn("[parseGeoJSONFeatureToKeyframes]: Smoothing is not supported for 3D paths, only 2D smoothing will be applied, ignoring altitude"), n) {
|
|
14691
|
-
const y = zp(c, n.resolution, n.epsilon), v = Yo(Ga([0, 1], y.length)), b = v.map(() => t ?? "Linear"), x = Object.entries(h).reduce((
|
|
14691
|
+
const y = zp(c, n.resolution, n.epsilon), v = Yo(Ga([0, 1], y.length)), b = v.map(() => t ?? "Linear"), x = Object.entries(h).reduce((A, [k, C]) => {
|
|
14692
14692
|
if (!Array.isArray(C))
|
|
14693
|
-
return
|
|
14693
|
+
return A;
|
|
14694
14694
|
const $ = y.length, le = Ga(C, $);
|
|
14695
14695
|
return {
|
|
14696
|
-
...
|
|
14697
|
-
[
|
|
14696
|
+
...A,
|
|
14697
|
+
[k]: le
|
|
14698
14698
|
};
|
|
14699
14699
|
}, {});
|
|
14700
14700
|
return Ha(y, v, b, x);
|
|
@@ -15484,7 +15484,7 @@ class yf {
|
|
|
15484
15484
|
}
|
|
15485
15485
|
}
|
|
15486
15486
|
function Qo() {
|
|
15487
|
-
return "
|
|
15487
|
+
return "0.0.0-PLACEHOLDER";
|
|
15488
15488
|
}
|
|
15489
15489
|
export {
|
|
15490
15490
|
bf as AJAXError,
|
|
@@ -15493,19 +15493,19 @@ export {
|
|
|
15493
15493
|
wf as AttributionControl,
|
|
15494
15494
|
Sf as AttributionControlMLGL,
|
|
15495
15495
|
xf as BoxZoomHandler,
|
|
15496
|
-
|
|
15497
|
-
|
|
15496
|
+
Ef as BoxZoomHandlerMLGL,
|
|
15497
|
+
kf as CanvasSource,
|
|
15498
15498
|
Cf as CanvasSourceMLGL,
|
|
15499
15499
|
L as ColorRamp,
|
|
15500
15500
|
Xo as ColorRampCollection,
|
|
15501
15501
|
Lf as CooperativeGesturesHandler,
|
|
15502
|
-
|
|
15502
|
+
Af as CooperativeGesturesHandlerMLGL,
|
|
15503
15503
|
Re as CubemapFaceNames,
|
|
15504
|
-
|
|
15504
|
+
Ac as CubemapImagesPresets,
|
|
15505
15505
|
Ut as CubemapLayer,
|
|
15506
15506
|
ve as DOMcreate,
|
|
15507
|
-
|
|
15508
|
-
|
|
15507
|
+
Tt as DOMremove,
|
|
15508
|
+
Tf as DoubleClickZoomHandler,
|
|
15509
15509
|
If as DragPanHandler,
|
|
15510
15510
|
Pf as DragRotateHandler,
|
|
15511
15511
|
Mf as EdgeInsets,
|
|
@@ -15567,7 +15567,7 @@ export {
|
|
|
15567
15567
|
dh as ScaleControlMLGL,
|
|
15568
15568
|
mh as ScrollZoomHandler,
|
|
15569
15569
|
yh as ScrollZoomHandlerMLGL,
|
|
15570
|
-
|
|
15570
|
+
Ts as SdkConfig,
|
|
15571
15571
|
Wh as ServiceError,
|
|
15572
15572
|
gh as Style,
|
|
15573
15573
|
vh as StyleMLGL,
|
|
@@ -15575,12 +15575,12 @@ export {
|
|
|
15575
15575
|
wh as TerrainControl,
|
|
15576
15576
|
Sh as TwoFingersTouchPitchHandler,
|
|
15577
15577
|
xh as TwoFingersTouchPitchHandlerMLGL,
|
|
15578
|
-
|
|
15579
|
-
|
|
15578
|
+
Eh as TwoFingersTouchRotateHandler,
|
|
15579
|
+
kh as TwoFingersTouchZoomHandler,
|
|
15580
15580
|
Ch as TwoFingersTouchZoomRotateHandler,
|
|
15581
15581
|
Lh as VectorTileSource,
|
|
15582
|
-
|
|
15583
|
-
|
|
15582
|
+
Ah as VectorTileSourceMLGL,
|
|
15583
|
+
Th as VideoSource,
|
|
15584
15584
|
Ih as VideoSourceMLGL,
|
|
15585
15585
|
Ph as addProtocol,
|
|
15586
15586
|
Mh as addSourceType,
|
|
@@ -15593,7 +15593,7 @@ export {
|
|
|
15593
15593
|
Rh as configMLGL,
|
|
15594
15594
|
ed as coordinates,
|
|
15595
15595
|
zp as createBezierPathFromCoordinates,
|
|
15596
|
-
|
|
15596
|
+
Te as cubemapPresets,
|
|
15597
15597
|
td as data,
|
|
15598
15598
|
pf as displayWebGLContextLostWarning,
|
|
15599
15599
|
rd as elevation,
|