@maptiler/sdk 3.0.0-rc.3 → 3.0.0-rc.5

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.
@@ -1,17 +1,17 @@
1
- var Ma = Object.defineProperty;
2
- var Mr = (r) => {
1
+ var Ia = Object.defineProperty;
2
+ var Ir = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
- var Ia = (r, e, t) => e in r ? Ma(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var M = (r, e, t) => Ia(r, typeof e != "symbol" ? e + "" : e, t), _t = (r, e, t) => e.has(r) || Mr("Cannot " + t);
7
- var I = (r, e, t) => (_t(r, e, "read from private field"), t ? t.call(r) : e.get(r)), ye = (r, e, t) => e.has(r) ? Mr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), Se = (r, e, t, n) => (_t(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), V = (r, e, t) => (_t(r, e, "access private method"), t);
5
+ var Ea = (r, e, t) => e in r ? Ia(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
+ var L = (r, e, t) => Ea(r, typeof e != "symbol" ? e + "" : e, t), Pt = (r, e, t) => e.has(r) || Ir("Cannot " + t);
7
+ var I = (r, e, t) => (Pt(r, e, "read from private field"), t ? t.call(r) : e.get(r)), ye = (r, e, t) => e.has(r) ? Ir("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), Se = (r, e, t, n) => (Pt(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), G = (r, e, t) => (Pt(r, e, "access private method"), t);
8
8
  import S from "maplibre-gl";
9
- import { Language as Ea, getLanguageInfoFromCode as Ir, config as $t, MapStyle as qe, mapStylePresetList as Rt, expandMapStyle as za, MapStyleVariant as Pa, ReferenceMapStyle as _a, toLanguageInfo as Er, getLanguageInfoFromFlag as $a, geolocation as zr } from "@maptiler/client";
10
- import { MapStyle as Vu, MapStyleVariant as Gu, ReferenceMapStyle as Hu, ServiceError as Ku, areSameLanguages as Wu, bufferToPixelDataBrowser as Zu, circumferenceAtLatitude as Ju, coordinates as Yu, data as Xu, elevation as Qu, expandMapStyle as ec, geocoding as tc, geolocation as rc, getAutoLanguage as nc, getBufferToPixelDataParser as ac, getLanguageInfoFromCode as oc, getLanguageInfoFromFlag as ic, getLanguageInfoFromKey as sc, getTileCache as lc, isLanguageInfo as uc, mapStylePresetList as cc, math as pc, misc as fc, staticMaps as dc, styleToStyle as yc, toLanguageInfo as mc } from "@maptiler/client";
11
- import Ra from "events";
12
- import { v4 as ja } from "uuid";
13
- import { Base64 as Na } from "js-base64";
14
- const Fa = "@maptiler/sdk", Oa = "3.0.0-rc.3", Da = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", qa = "dist/maptiler-sdk.mjs", Ba = "dist/maptiler-sdk.d.ts", Ua = "dist/maptiler-sdk.css", Va = "module", Ga = {
9
+ import { Language as za, getLanguageInfoFromCode as Er, config as Rt, MapStyle as qe, mapStylePresetList as $t, expandMapStyle as _a, MapStyleVariant as Pa, ReferenceMapStyle as Ra, toLanguageInfo as zr, getLanguageInfoFromFlag as $a, geolocation as _r } from "@maptiler/client";
10
+ import { MapStyle as Gu, MapStyleVariant as Hu, ReferenceMapStyle as Ku, ServiceError as Wu, areSameLanguages as Zu, bufferToPixelDataBrowser as Ju, circumferenceAtLatitude as Yu, coordinates as Xu, data as Qu, elevation as ec, expandMapStyle as tc, geocoding as rc, geolocation as nc, getAutoLanguage as ac, getBufferToPixelDataParser as oc, getLanguageInfoFromCode as ic, getLanguageInfoFromFlag as sc, getLanguageInfoFromKey as lc, getTileCache as uc, isLanguageInfo as cc, mapStylePresetList as pc, math as fc, misc as dc, staticMaps as yc, styleToStyle as mc, toLanguageInfo as hc } from "@maptiler/client";
11
+ import ja from "events";
12
+ import { v4 as Na } from "uuid";
13
+ import { Base64 as Fa } from "js-base64";
14
+ const Oa = "@maptiler/sdk", Da = "3.0.0-rc.5", qa = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", Ua = "dist/maptiler-sdk.mjs", Ba = "dist/maptiler-sdk.d.ts", Va = "dist/maptiler-sdk.css", Ga = "module", Ha = {
15
15
  ".": {
16
16
  import: "./dist/maptiler-sdk.mjs",
17
17
  types: "./dist/maptiler-sdk.d.ts"
@@ -22,7 +22,7 @@ const Fa = "@maptiler/sdk", Oa = "3.0.0-rc.3", Da = "The Javascript & TypeScript
22
22
  "./style.css": {
23
23
  import: "./dist/maptiler-sdk.css"
24
24
  }
25
- }, Ha = [
25
+ }, Ka = [
26
26
  "maptiler",
27
27
  "map",
28
28
  "sdk",
@@ -30,10 +30,10 @@ const Fa = "@maptiler/sdk", Oa = "3.0.0-rc.3", Da = "The Javascript & TypeScript
30
30
  "cloud",
31
31
  "webGL",
32
32
  "maplibre"
33
- ], Ka = "https://docs.maptiler.com/sdk-js/", Wa = "BSD-3-Clause", Za = {
33
+ ], Wa = "https://docs.maptiler.com/sdk-js/", Za = "BSD-3-Clause", Ja = {
34
34
  type: "git",
35
35
  url: "https://github.com/maptiler/maptiler-sdk-js.git"
36
- }, Ja = {
36
+ }, Ya = {
37
37
  biome: "biome check --max-diagnostics=1000",
38
38
  "biome:fix": "npx @biomejs/biome check --max-diagnostics=1000 --write",
39
39
  doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/",
@@ -45,7 +45,7 @@ const Fa = "@maptiler/sdk", Oa = "3.0.0-rc.3", Da = "The Javascript & TypeScript
45
45
  make: "npm run biome:fix && npm run build",
46
46
  "dev-umd": "npm run build-css && tsc && NODE_ENV=dev vite build -w -c vite.config-umd.ts",
47
47
  help: "vite build --help"
48
- }, Ya = "MapTiler", Xa = {
48
+ }, Xa = "MapTiler", Qa = {
49
49
  "@biomejs/biome": "1.8.3",
50
50
  "@types/uuid": "^9.0.2",
51
51
  "@types/xmldom": "^0.1.31",
@@ -57,30 +57,30 @@ const Fa = "@maptiler/sdk", Oa = "3.0.0-rc.3", Da = "The Javascript & TypeScript
57
57
  vite: "^5.3.4",
58
58
  "vite-plugin-dts": "^4.0.0-beta.0",
59
59
  vitest: "^0.34.2"
60
- }, Qa = {
60
+ }, eo = {
61
61
  "@maplibre/maplibre-gl-style-spec": "^22.0.1",
62
62
  "@maptiler/client": "^2.2.0",
63
63
  events: "^3.3.0",
64
64
  "js-base64": "^3.7.4",
65
- "maplibre-gl": "^5.0.0-pre.9",
65
+ "maplibre-gl": "^5.0.0-pre.10",
66
66
  uuid: "^9.0.0"
67
- }, eo = {
68
- name: Fa,
69
- version: Oa,
70
- description: Da,
71
- module: qa,
67
+ }, Sn = {
68
+ name: Oa,
69
+ version: Da,
70
+ description: qa,
71
+ module: Ua,
72
72
  types: Ba,
73
- style: Ua,
74
- type: Va,
75
- exports: Ga,
76
- keywords: Ha,
77
- homepage: Ka,
78
- license: Wa,
79
- repository: Za,
80
- scripts: Ja,
81
- author: Ya,
82
- devDependencies: Xa,
83
- dependencies: Qa
73
+ style: Va,
74
+ type: Ga,
75
+ exports: Ha,
76
+ keywords: Ka,
77
+ homepage: Wa,
78
+ license: Za,
79
+ repository: Ja,
80
+ scripts: Ya,
81
+ author: Xa,
82
+ devDependencies: Qa,
83
+ dependencies: eo
84
84
  }, E = {
85
85
  /**
86
86
  * Language mode to display labels in both the local language and the language of the visitor's device, concatenated.
@@ -121,39 +121,40 @@ const Fa = "@maptiler/sdk", Oa = "3.0.0-rc.3", Da = "The Javascript & TypeScript
121
121
  isMode: !0,
122
122
  geocoding: !1
123
123
  },
124
- ...Ea
124
+ ...za
125
125
  };
126
126
  function Pr() {
127
127
  if (typeof navigator > "u") {
128
- const e = Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0], t = Ir(e);
128
+ const e = Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0], t = Er(e);
129
129
  return t || E.ENGLISH;
130
130
  }
131
- return Array.from(new Set(navigator.languages.map((e) => e.split("-")[0]))).map((e) => Ir(e)).filter((e) => e)[0] ?? E.LOCAL;
131
+ return Array.from(new Set(navigator.languages.map((e) => e.split("-")[0]))).map((e) => Er(e)).filter((e) => e)[0] ?? E.LOCAL;
132
132
  }
133
- const H = {
133
+ const V = {
134
134
  maptilerLogoURL: "https://api.maptiler.com/resources/logo.svg",
135
135
  maptilerURL: "https://www.maptiler.com/",
136
136
  maptilerApiHost: "api.maptiler.com",
137
+ telemetryURL: "https://api.maptiler.com/metrics",
137
138
  rtlPluginURL: "https://cdn.maptiler.com/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.min.js",
138
139
  primaryLanguage: E.STYLE,
139
140
  secondaryLanguage: E.LOCAL,
140
141
  terrainSourceURL: "https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json",
141
142
  terrainSourceId: "maptiler-terrain"
142
143
  };
143
- Object.freeze(H);
144
- const wn = ja();
145
- class to extends Ra {
144
+ Object.freeze(V);
145
+ const nr = Na();
146
+ class to extends ja {
146
147
  constructor() {
147
148
  super(...arguments);
148
149
  /**
149
150
  * The primary language. By default, the language of the web browser is used.
150
151
  */
151
- M(this, "primaryLanguage", H.primaryLanguage);
152
+ L(this, "primaryLanguage", V.primaryLanguage);
152
153
  /**
153
154
  * The secondary language, to overwrite the default language defined in the map style.
154
155
  * This settings is highly dependant on the style compatibility and may not work in most cases.
155
156
  */
156
- M(this, "secondaryLanguage");
157
+ L(this, "secondaryLanguage");
157
158
  /**
158
159
  * Setting on whether of not the SDK runs with a session logic.
159
160
  * A "session" is started at the initialization of the SDK and finished when the browser
@@ -161,21 +162,39 @@ class to extends Ra {
161
162
  * When `session` is enabled (default: true), the extra URL param `mtsid` is added to queries
162
163
  * on the MapTiler Cloud API. This allows MapTiler to enable "session based billing".
163
164
  */
164
- M(this, "session", !0);
165
+ L(this, "session", !0);
165
166
  /**
166
167
  * Enables client-side caching of requests for tiles and fonts.
167
168
  * The cached requests persist multiple browser sessions and will be reused when possible.
168
169
  * Works only for requests to the MapTiler Cloud API when sessions are enabled.
169
170
  */
170
- M(this, "caching", !0);
171
+ L(this, "caching", !0);
172
+ /**
173
+ * Telemetry is enabled by default but can be opted-out by setting this value to `false`.
174
+ * The telemetry is very valuable to the team at MapTiler because it shares information
175
+ * about where to add the extra effort. It also helps spotting some incompatibility issues
176
+ * that may arise between the SDK and a specific version of a module.
177
+ *
178
+ * It consists in sending metrics about usage of the following features:
179
+ * - SDK version [string]
180
+ * - API key [string]
181
+ * - MapTiler sesion ID (if opted-in) [string]
182
+ * - if tile caching is enabled [boolean]
183
+ * - if language specified at initialization [boolean]
184
+ * - if terrain is activated at initialization [boolean]
185
+ * - if globe projection is activated at initialization [boolean]
186
+ *
187
+ * In addition, each official module will be add added to a list, alongside its version number.
188
+ */
189
+ L(this, "telemetry", !0);
171
190
  /**
172
191
  * Unit to be used
173
192
  */
174
- M(this, "_unit", "metric");
193
+ L(this, "_unit", "metric");
175
194
  /**
176
195
  * MapTiler Cloud API key
177
196
  */
178
- M(this, "_apiKey", "");
197
+ L(this, "_apiKey", "");
179
198
  }
180
199
  /**
181
200
  * Set the unit system
@@ -193,7 +212,7 @@ class to extends Ra {
193
212
  * Set the MapTiler Cloud API key
194
213
  */
195
214
  set apiKey(t) {
196
- this._apiKey = t, $t.apiKey = t, this.emit("apiKey", t);
215
+ this._apiKey = t, Rt.apiKey = t, this.emit("apiKey", t);
197
216
  }
198
217
  /**
199
218
  * Get the MapTiler Cloud API key
@@ -205,18 +224,18 @@ class to extends Ra {
205
224
  * Set a the custom fetch function to replace the default one
206
225
  */
207
226
  set fetch(t) {
208
- $t.fetch = t;
227
+ Rt.fetch = t;
209
228
  }
210
229
  /**
211
230
  * Get the fetch fucntion
212
231
  */
213
232
  get fetch() {
214
- return $t.fetch;
233
+ return Rt.fetch;
215
234
  }
216
235
  }
217
- const B = new to(), { addProtocol: _r } = S, Ht = "localcache_source", Kt = "localcache", ro = "maptiler_sdk", no = 1e3, ao = 100, Wt = typeof caches < "u";
236
+ const F = new to(), { addProtocol: Rr } = S, Ht = "localcache_source", Kt = "localcache", ro = "maptiler_sdk", no = 1e3, ao = 100, Wt = typeof caches < "u";
218
237
  function oo(r, e) {
219
- if (Wt && B.caching && B.session && r.host === H.maptilerApiHost) {
238
+ if (Wt && F.caching && F.session && r.host === V.maptilerApiHost) {
220
239
  if (e === "Source" && r.href.includes("tiles.json"))
221
240
  return r.href.replace("https://", `${Ht}://`);
222
241
  if (e === "Tile" || e === "Glyphs")
@@ -225,17 +244,17 @@ function oo(r, e) {
225
244
  return r.href;
226
245
  }
227
246
  let jt;
228
- async function Sn() {
247
+ async function xn() {
229
248
  return jt || (jt = await caches.open(ro)), jt;
230
249
  }
231
250
  let $r = 0;
232
251
  async function io() {
233
- const r = await Sn(), e = await r.keys(), t = e.slice(0, Math.max(e.length - no, 0));
252
+ const r = await xn(), e = await r.keys(), t = e.slice(0, Math.max(e.length - no, 0));
234
253
  for (const n of t)
235
254
  r.delete(n);
236
255
  }
237
256
  function so() {
238
- _r(
257
+ Rr(
239
258
  Ht,
240
259
  async (r, e) => {
241
260
  if (!r.url) throw new Error("");
@@ -249,7 +268,7 @@ function so() {
249
268
  expires: n.headers.get("Expires")
250
269
  };
251
270
  }
252
- ), _r(
271
+ ), Rr(
253
272
  Kt,
254
273
  async (r, e) => {
255
274
  if (!r.url) throw new Error("");
@@ -262,7 +281,7 @@ function so() {
262
281
  data: await m.arrayBuffer(),
263
282
  cacheControl: m.headers.get("Cache-Control"),
264
283
  expires: m.headers.get("Expires")
265
- }), l = await Sn(), u = await l.match(a);
284
+ }), l = await xn(), u = await l.match(a);
266
285
  if (u)
267
286
  return s(u);
268
287
  const c = r;
@@ -278,7 +297,7 @@ function lo() {
278
297
  const r = S.getRTLTextPluginStatus();
279
298
  if (r === "unavailable" || r === "requested")
280
299
  try {
281
- S.setRTLTextPlugin(H.rtlPluginURL, !0);
300
+ S.setRTLTextPlugin(V.rtlPluginURL, !0);
282
301
  } catch {
283
302
  }
284
303
  }
@@ -290,10 +309,10 @@ function pe(r, e, t) {
290
309
  const n = window.document.createElement(r);
291
310
  return e !== void 0 && (n.className = e), t && t.appendChild(n), n;
292
311
  }
293
- function nr(r) {
312
+ function ar(r) {
294
313
  r.parentNode && r.parentNode.removeChild(r);
295
314
  }
296
- function Rr(r, e) {
315
+ function jr(r, e) {
297
316
  let t = null;
298
317
  try {
299
318
  t = new URL(r);
@@ -302,23 +321,23 @@ function Rr(r, e) {
302
321
  url: r
303
322
  };
304
323
  }
305
- return t.host === H.maptilerApiHost && (t.searchParams.has("key") || t.searchParams.append("key", B.apiKey), B.session && t.searchParams.append("mtsid", wn)), {
324
+ return t.host === V.maptilerApiHost && (t.searchParams.has("key") || t.searchParams.append("key", F.apiKey), F.session && t.searchParams.append("mtsid", nr)), {
306
325
  url: oo(t, e)
307
326
  };
308
327
  }
309
- function jr(r) {
328
+ function Nr(r) {
310
329
  return (e, t) => {
311
330
  if (r != null) {
312
- const n = r(e, t), a = Rr((n == null ? void 0 : n.url) ?? "", t);
331
+ const n = r(e, t), a = jr((n == null ? void 0 : n.url) ?? "", t);
313
332
  return {
314
333
  ...n,
315
334
  ...a
316
335
  };
317
336
  }
318
- return Rr(e, t);
337
+ return jr(e, t);
319
338
  };
320
339
  }
321
- function xn() {
340
+ function kn() {
322
341
  return Math.random().toString(36).substring(2);
323
342
  }
324
343
  function ht(r) {
@@ -351,16 +370,16 @@ function yo(r) {
351
370
  const n = document.createElement("div");
352
371
  n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n);
353
372
  }
354
- function Nr(r, e) {
373
+ function Fr(r, e) {
355
374
  return !(!Array.isArray(r) || r.length !== 2 || r[0] !== "get" || typeof r[1] != "string" || e && !r[1].startsWith("name:") || !e && r[1] !== "name");
356
375
  }
357
376
  function mo(r, e, t) {
358
377
  const n = structuredClone(r), a = (o) => {
359
378
  if (typeof o != "string")
360
379
  for (let i = 0; i < o.length; i += 1)
361
- Nr(o[i], t) ? o[i] = structuredClone(e) : a(o[i]);
380
+ Fr(o[i], t) ? o[i] = structuredClone(e) : a(o[i]);
362
381
  };
363
- return Nr(n, t) ? e : (a(n), n);
382
+ return Fr(n, t) ? e : (a(n), n);
364
383
  }
365
384
  function ho(r, e) {
366
385
  const t = e ? /\{name:\S+\}/ : /\{name\}/;
@@ -431,52 +450,52 @@ function So(r, e) {
431
450
  o === null ? a.unlocalized += 1 : (o in a.localized || (a.localized[o] = 0), a.localized[o] += 1);
432
451
  return a;
433
452
  }
434
- let gl = class extends S.Marker {
453
+ let vl = class extends S.Marker {
435
454
  addTo(e) {
436
455
  return super.addTo(e);
437
456
  }
438
457
  };
439
- class bl extends S.Popup {
458
+ class wl extends S.Popup {
440
459
  addTo(e) {
441
460
  return super.addTo(e);
442
461
  }
443
462
  }
444
- class wl extends S.Style {
463
+ class Sl extends S.Style {
445
464
  constructor(e, t = {}) {
446
465
  super(e, t);
447
466
  }
448
467
  }
449
- class Sl extends S.CanvasSource {
468
+ class xl extends S.CanvasSource {
450
469
  onAdd(e) {
451
470
  super.onAdd(e);
452
471
  }
453
472
  }
454
- class xl extends S.GeoJSONSource {
473
+ class kl extends S.GeoJSONSource {
455
474
  onAdd(e) {
456
475
  super.onAdd(e);
457
476
  }
458
477
  }
459
- class kl extends S.ImageSource {
478
+ class Ll extends S.ImageSource {
460
479
  onAdd(e) {
461
480
  super.onAdd(e);
462
481
  }
463
482
  }
464
- class Ll extends S.RasterTileSource {
483
+ class Cl extends S.RasterTileSource {
465
484
  onAdd(e) {
466
485
  super.onAdd(e);
467
486
  }
468
487
  }
469
- class Cl extends S.RasterDEMTileSource {
488
+ class Al extends S.RasterDEMTileSource {
470
489
  onAdd(e) {
471
490
  super.onAdd(e);
472
491
  }
473
492
  }
474
- class Al extends S.VectorTileSource {
493
+ class Tl extends S.VectorTileSource {
475
494
  onAdd(e) {
476
495
  super.onAdd(e);
477
496
  }
478
497
  }
479
- class Tl extends S.VideoSource {
498
+ class Ml extends S.VideoSource {
480
499
  onAdd(e) {
481
500
  super.onAdd(e);
482
501
  }
@@ -491,7 +510,7 @@ class ko extends S.GeolocateControl {
491
510
  return super.onAdd(e);
492
511
  }
493
512
  }
494
- class Ml extends S.AttributionControl {
513
+ class Il extends S.AttributionControl {
495
514
  onAdd(e) {
496
515
  return super.onAdd(e);
497
516
  }
@@ -511,17 +530,17 @@ class Ao extends S.FullscreenControl {
511
530
  return super.onAdd(e);
512
531
  }
513
532
  }
514
- class Il extends S.TerrainControl {
533
+ class El extends S.TerrainControl {
515
534
  onAdd(e) {
516
535
  return super.onAdd(e);
517
536
  }
518
537
  }
519
- class El extends S.BoxZoomHandler {
538
+ class zl extends S.BoxZoomHandler {
520
539
  constructor(e, t) {
521
540
  super(e, t);
522
541
  }
523
542
  }
524
- class zl extends S.ScrollZoomHandler {
543
+ class _l extends S.ScrollZoomHandler {
525
544
  constructor(e, t) {
526
545
  super(e, t);
527
546
  }
@@ -531,7 +550,7 @@ class Pl extends S.CooperativeGesturesHandler {
531
550
  super(e, t);
532
551
  }
533
552
  }
534
- class _l extends S.KeyboardHandler {
553
+ class Rl extends S.KeyboardHandler {
535
554
  constructor(e) {
536
555
  super(e);
537
556
  }
@@ -541,27 +560,27 @@ class $l extends S.TwoFingersTouchPitchHandler {
541
560
  super(e);
542
561
  }
543
562
  }
544
- class Rl extends S.MapWheelEvent {
563
+ class jl extends S.MapWheelEvent {
545
564
  constructor(e, t, n) {
546
565
  super(e, t, n);
547
566
  }
548
567
  }
549
- class jl extends S.MapTouchEvent {
568
+ class Nl extends S.MapTouchEvent {
550
569
  constructor(e, t, n) {
551
570
  super(e, t, n);
552
571
  }
553
572
  }
554
- class Nl extends S.MapMouseEvent {
573
+ class Fl extends S.MapMouseEvent {
555
574
  constructor(e, t, n, a = {}) {
556
575
  super(e, t, n, a);
557
576
  }
558
577
  }
559
- class Fr extends Lo {
578
+ class Or extends Lo {
560
579
  constructor(t = {}) {
561
580
  super(t);
562
- M(this, "logoURL", "");
563
- M(this, "linkURL", "");
564
- this.logoURL = t.logoURL ?? H.maptilerLogoURL, this.linkURL = t.linkURL ?? H.maptilerURL;
581
+ L(this, "logoURL", "");
582
+ L(this, "linkURL", "");
583
+ this.logoURL = t.logoURL ?? V.maptilerLogoURL, this.linkURL = t.linkURL ?? V.maptilerURL;
565
584
  }
566
585
  onAdd(t) {
567
586
  this._map = t, this._compact = this.options.compact ?? !1, this._container = window.document.createElement("div"), this._container.className = "maplibregl-ctrl";
@@ -705,7 +724,7 @@ var To = 8, Mo = {
705
724
  "*": {
706
725
  type: "*"
707
726
  }
708
- }, Po = {
727
+ }, _o = {
709
728
  type: {
710
729
  required: !0,
711
730
  type: "enum",
@@ -762,7 +781,7 @@ var To = 8, Mo = {
762
781
  "*": {
763
782
  type: "*"
764
783
  }
765
- }, _o = {
784
+ }, Po = {
766
785
  type: {
767
786
  required: !0,
768
787
  type: "enum",
@@ -836,7 +855,7 @@ var To = 8, Mo = {
836
855
  "*": {
837
856
  type: "*"
838
857
  }
839
- }, $o = {
858
+ }, Ro = {
840
859
  type: {
841
860
  required: !0,
842
861
  type: "enum",
@@ -897,7 +916,7 @@ var To = 8, Mo = {
897
916
  promoteId: {
898
917
  type: "promoteId"
899
918
  }
900
- }, Ro = {
919
+ }, $o = {
901
920
  type: {
902
921
  required: !0,
903
922
  type: "enum",
@@ -1052,7 +1071,7 @@ var To = 8, Mo = {
1052
1071
  default: "visible",
1053
1072
  "property-type": "constant"
1054
1073
  }
1055
- }, Bo = {
1074
+ }, Uo = {
1056
1075
  visibility: {
1057
1076
  type: "enum",
1058
1077
  values: {
@@ -1062,7 +1081,7 @@ var To = 8, Mo = {
1062
1081
  default: "visible",
1063
1082
  "property-type": "constant"
1064
1083
  }
1065
- }, Uo = {
1084
+ }, Bo = {
1066
1085
  "line-cap": {
1067
1086
  type: "enum",
1068
1087
  values: {
@@ -3317,17 +3336,17 @@ var To = 8, Mo = {
3317
3336
  sources: Io,
3318
3337
  source: Eo,
3319
3338
  source_vector: zo,
3320
- source_raster: Po,
3321
- source_raster_dem: _o,
3322
- source_geojson: $o,
3323
- source_video: Ro,
3339
+ source_raster: _o,
3340
+ source_raster_dem: Po,
3341
+ source_geojson: Ro,
3342
+ source_video: $o,
3324
3343
  source_image: jo,
3325
3344
  layer: No,
3326
3345
  layout: Fo,
3327
3346
  layout_background: Oo,
3328
3347
  layout_fill: Do,
3329
3348
  layout_circle: qo,
3330
- layout_heatmap: Bo,
3349
+ layout_heatmap: Uo,
3331
3350
  "layout_fill-extrusion": {
3332
3351
  visibility: {
3333
3352
  type: "enum",
@@ -3339,7 +3358,7 @@ var To = 8, Mo = {
3339
3358
  "property-type": "constant"
3340
3359
  }
3341
3360
  },
3342
- layout_line: Uo,
3361
+ layout_line: Bo,
3343
3362
  layout_symbol: Vo,
3344
3363
  layout_raster: Go,
3345
3364
  layout_hillshade: Ho,
@@ -3571,14 +3590,14 @@ class oe extends Error {
3571
3590
  super(t), this.message = t, this.key = e;
3572
3591
  }
3573
3592
  }
3574
- class ar {
3593
+ class or {
3575
3594
  constructor(e, t = []) {
3576
3595
  this.parent = e, this.bindings = {};
3577
3596
  for (const [n, a] of t)
3578
3597
  this.bindings[n] = a;
3579
3598
  }
3580
3599
  concat(e) {
3581
- return new ar(this, e);
3600
+ return new or(this, e);
3582
3601
  }
3583
3602
  get(e) {
3584
3603
  if (this.bindings[e])
@@ -3591,7 +3610,7 @@ class ar {
3591
3610
  return this.bindings[e] ? !0 : this.parent ? this.parent.has(e) : !1;
3592
3611
  }
3593
3612
  }
3594
- const gt = { kind: "null" }, g = { kind: "number" }, T = { kind: "string" }, L = { kind: "boolean" }, ie = { kind: "color" }, vt = { kind: "projectionDefinition" }, $e = { kind: "object" }, C = { kind: "value" }, yi = { kind: "error" }, bt = { kind: "collator" }, wt = { kind: "formatted" }, St = { kind: "padding" }, Xe = { kind: "resolvedImage" }, xt = { kind: "variableAnchorOffsetCollection" };
3613
+ const gt = { kind: "null" }, g = { kind: "number" }, M = { kind: "string" }, C = { kind: "boolean" }, ie = { kind: "color" }, vt = { kind: "projectionDefinition" }, Re = { kind: "object" }, A = { kind: "value" }, yi = { kind: "error" }, bt = { kind: "collator" }, wt = { kind: "formatted" }, St = { kind: "padding" }, Xe = { kind: "resolvedImage" }, xt = { kind: "variableAnchorOffsetCollection" };
3595
3614
  function W(r, e) {
3596
3615
  return {
3597
3616
  kind: "array",
@@ -3609,13 +3628,13 @@ function N(r) {
3609
3628
  const mi = [
3610
3629
  gt,
3611
3630
  g,
3612
- T,
3613
- L,
3631
+ M,
3632
+ C,
3614
3633
  ie,
3615
3634
  vt,
3616
3635
  wt,
3617
- $e,
3618
- W(C),
3636
+ Re,
3637
+ W(A),
3619
3638
  St,
3620
3639
  Xe,
3621
3640
  xt
@@ -3637,7 +3656,7 @@ function Ve(r, e) {
3637
3656
  }
3638
3657
  return `Expected ${N(r)} but found ${N(e)} instead.`;
3639
3658
  }
3640
- function or(r, e) {
3659
+ function ir(r, e) {
3641
3660
  return e.some((t) => t.kind === r.kind);
3642
3661
  }
3643
3662
  function Le(r, e) {
@@ -3646,15 +3665,15 @@ function Le(r, e) {
3646
3665
  function ze(r, e) {
3647
3666
  return r.kind === "array" && e.kind === "array" ? r.itemType.kind === e.itemType.kind && typeof r.N == "number" : r.kind === e.kind;
3648
3667
  }
3649
- const kn = 0.96422, Ln = 1, Cn = 0.82521, An = 4 / 29, Re = 6 / 29, Tn = 3 * Re * Re, hi = Re * Re * Re, gi = Math.PI / 180, vi = 180 / Math.PI;
3650
- function Mn(r) {
3668
+ const Ln = 0.96422, Cn = 1, An = 0.82521, Tn = 4 / 29, $e = 6 / 29, Mn = 3 * $e * $e, hi = $e * $e * $e, gi = Math.PI / 180, vi = 180 / Math.PI;
3669
+ function In(r) {
3651
3670
  return r = r % 360, r < 0 && (r += 360), r;
3652
3671
  }
3653
- function In([r, e, t, n]) {
3672
+ function En([r, e, t, n]) {
3654
3673
  r = Nt(r), e = Nt(e), t = Nt(t);
3655
3674
  let a, o;
3656
- const i = Ft((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) / Ln);
3657
- r === e && e === t ? a = o = i : (a = Ft((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) / kn), o = Ft((0.0139322 * r + 0.0971045 * e + 0.7141733 * t) / Cn));
3675
+ const i = Ft((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) / Cn);
3676
+ r === e && e === t ? a = o = i : (a = Ft((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) / Ln), o = Ft((0.0139322 * r + 0.0971045 * e + 0.7141733 * t) / An));
3658
3677
  const s = 116 * i - 16;
3659
3678
  return [s < 0 ? 0 : s, 500 * (a - i), 200 * (i - o), n];
3660
3679
  }
@@ -3662,11 +3681,11 @@ function Nt(r) {
3662
3681
  return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
3663
3682
  }
3664
3683
  function Ft(r) {
3665
- return r > hi ? Math.pow(r, 1 / 3) : r / Tn + An;
3684
+ return r > hi ? Math.pow(r, 1 / 3) : r / Mn + Tn;
3666
3685
  }
3667
- function En([r, e, t, n]) {
3686
+ function zn([r, e, t, n]) {
3668
3687
  let a = (r + 16) / 116, o = isNaN(e) ? a : a + e / 500, i = isNaN(t) ? a : a - t / 200;
3669
- return a = Ln * Dt(a), o = kn * Dt(o), i = Cn * Dt(i), [
3688
+ return a = Cn * Dt(a), o = Ln * Dt(o), i = An * Dt(i), [
3670
3689
  Ot(3.1338561 * o - 1.6168667 * a - 0.4906146 * i),
3671
3690
  // D50 -> sRGB
3672
3691
  Ot(-0.9787684 * o + 1.9161415 * a + 0.033454 * i),
@@ -3678,17 +3697,17 @@ function Ot(r) {
3678
3697
  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;
3679
3698
  }
3680
3699
  function Dt(r) {
3681
- return r > Re ? r * r * r : Tn * (r - An);
3700
+ return r > $e ? r * r * r : Mn * (r - Tn);
3682
3701
  }
3683
3702
  function bi(r) {
3684
- const [e, t, n, a] = In(r), o = Math.sqrt(t * t + n * n);
3685
- return [Math.round(o * 1e4) ? Mn(Math.atan2(n, t) * vi) : NaN, o, e, a];
3703
+ const [e, t, n, a] = En(r), o = Math.sqrt(t * t + n * n);
3704
+ return [Math.round(o * 1e4) ? In(Math.atan2(n, t) * vi) : NaN, o, e, a];
3686
3705
  }
3687
3706
  function wi([r, e, t, n]) {
3688
- return r = isNaN(r) ? 0 : r * gi, En([t, Math.cos(r) * e, Math.sin(r) * e, n]);
3707
+ return r = isNaN(r) ? 0 : r * gi, zn([t, Math.cos(r) * e, Math.sin(r) * e, n]);
3689
3708
  }
3690
3709
  function Si([r, e, t, n]) {
3691
- r = Mn(r), e /= 100, t /= 100;
3710
+ r = In(r), e /= 100, t /= 100;
3692
3711
  function a(o) {
3693
3712
  const i = (o + r / 30) % 12, s = e * Math.min(t, 1 - t);
3694
3713
  return t - s * Math.max(-1, Math.min(i - 3, 9 - i, 1));
@@ -3743,16 +3762,16 @@ function xi(r) {
3743
3762
  // % (optional)
3744
3763
  ] = o, b = [u || " ", m || " ", y].join("");
3745
3764
  if (b === " " || b === " /" || b === ",," || b === ",,,") {
3746
- const A = [l, p, d].join(""), j = A === "%%%" ? 100 : A === "" ? 255 : 0;
3765
+ const T = [l, p, d].join(""), j = T === "%%%" ? 100 : T === "" ? 255 : 0;
3747
3766
  if (j) {
3748
- const $ = [
3749
- Pe(+s / j, 0, 1),
3750
- Pe(+c / j, 0, 1),
3751
- Pe(+f / j, 0, 1),
3752
- v ? Or(+v, w) : 1
3767
+ const R = [
3768
+ _e(+s / j, 0, 1),
3769
+ _e(+c / j, 0, 1),
3770
+ _e(+f / j, 0, 1),
3771
+ v ? Dr(+v, w) : 1
3753
3772
  ];
3754
- if (Dr($))
3755
- return $;
3773
+ if (qr(R))
3774
+ return R;
3756
3775
  }
3757
3776
  }
3758
3777
  return;
@@ -3783,11 +3802,11 @@ function xi(r) {
3783
3802
  if (f === " " || f === " /" || f === ",," || f === ",,,") {
3784
3803
  const d = [
3785
3804
  +o,
3786
- Pe(+s, 0, 100),
3787
- Pe(+u, 0, 100),
3788
- p ? Or(+p, m) : 1
3805
+ _e(+s, 0, 100),
3806
+ _e(+u, 0, 100),
3807
+ p ? Dr(+p, m) : 1
3789
3808
  ];
3790
- if (Dr(d))
3809
+ if (qr(d))
3791
3810
  return Si(d);
3792
3811
  }
3793
3812
  }
@@ -3795,13 +3814,13 @@ function xi(r) {
3795
3814
  function rt(r) {
3796
3815
  return parseInt(r.padEnd(2, r), 16) / 255;
3797
3816
  }
3798
- function Or(r, e) {
3799
- return Pe(e ? r / 100 : r, 0, 1);
3817
+ function Dr(r, e) {
3818
+ return _e(e ? r / 100 : r, 0, 1);
3800
3819
  }
3801
- function Pe(r, e, t) {
3820
+ function _e(r, e, t) {
3802
3821
  return Math.min(Math.max(e, r), t);
3803
3822
  }
3804
- function Dr(r) {
3823
+ function qr(r) {
3805
3824
  return !r.some(Number.isNaN);
3806
3825
  }
3807
3826
  const ki = {
@@ -3960,7 +3979,7 @@ function ve(r, e, t) {
3960
3979
  function Ge(r, e, t) {
3961
3980
  return r.map((n, a) => ve(n, e[a], t));
3962
3981
  }
3963
- class R {
3982
+ class $ {
3964
3983
  /**
3965
3984
  * @param r Red component premultiplied by `alpha` 0..1
3966
3985
  * @param g Green component premultiplied by `alpha` 0..1
@@ -3985,13 +4004,13 @@ class R {
3985
4004
  * @returns A `Color` instance, or `undefined` if the input is not a valid color string.
3986
4005
  */
3987
4006
  static parse(e) {
3988
- if (e instanceof R)
4007
+ if (e instanceof $)
3989
4008
  return e;
3990
4009
  if (typeof e != "string")
3991
4010
  return;
3992
4011
  const t = xi(e);
3993
4012
  if (t)
3994
- return new R(...t, !1);
4013
+ return new $(...t, !1);
3995
4014
  }
3996
4015
  /**
3997
4016
  * Used in color interpolation and by 'to-rgba' expression.
@@ -4016,7 +4035,7 @@ class R {
4016
4035
  * @returns Gien color, with reversed alpha blending, in LAB color space.
4017
4036
  */
4018
4037
  get lab() {
4019
- return this.overwriteGetter("lab", In(this.rgb));
4038
+ return this.overwriteGetter("lab", En(this.rgb));
4020
4039
  }
4021
4040
  /**
4022
4041
  * Lazy getter pattern. When getter is called for the first time lazy value
@@ -4060,14 +4079,14 @@ class R {
4060
4079
  switch (a) {
4061
4080
  case "rgb": {
4062
4081
  const [o, i, s, l] = Ge(e.rgb, t.rgb, n);
4063
- return new R(o, i, s, l, !1);
4082
+ return new $(o, i, s, l, !1);
4064
4083
  }
4065
4084
  case "hcl": {
4066
4085
  const [o, i, s, l] = e.hcl, [u, c, p, m] = t.hcl;
4067
4086
  let f, d;
4068
4087
  if (!isNaN(o) && !isNaN(u)) {
4069
- let A = u - o;
4070
- u > o && A > 180 ? A -= 360 : u < o && o - u > 180 && (A += 360), f = o + n * A;
4088
+ let T = u - o;
4089
+ u > o && T > 180 ? T -= 360 : u < o && o - u > 180 && (T += 360), f = o + n * T;
4071
4090
  } else isNaN(o) ? isNaN(u) ? f = NaN : (f = u, (s === 1 || s === 0) && (d = c)) : (f = o, (p === 1 || p === 0) && (d = i));
4072
4091
  const [y, v, w, b] = wi([
4073
4092
  f,
@@ -4075,20 +4094,20 @@ class R {
4075
4094
  ve(s, p, n),
4076
4095
  ve(l, m, n)
4077
4096
  ]);
4078
- return new R(y, v, w, b, !1);
4097
+ return new $(y, v, w, b, !1);
4079
4098
  }
4080
4099
  case "lab": {
4081
- const [o, i, s, l] = En(Ge(e.lab, t.lab, n));
4082
- return new R(o, i, s, l, !1);
4100
+ const [o, i, s, l] = zn(Ge(e.lab, t.lab, n));
4101
+ return new $(o, i, s, l, !1);
4083
4102
  }
4084
4103
  }
4085
4104
  }
4086
4105
  }
4087
- R.black = new R(0, 0, 0, 1);
4088
- R.white = new R(1, 1, 1, 1);
4089
- R.transparent = new R(0, 0, 0, 0);
4090
- R.red = new R(1, 0, 0, 1);
4091
- class ir {
4106
+ $.black = new $(0, 0, 0, 1);
4107
+ $.white = new $(1, 1, 1, 1);
4108
+ $.transparent = new $(0, 0, 0, 0);
4109
+ $.red = new $(1, 0, 0, 1);
4110
+ class sr {
4092
4111
  constructor(e, t, n) {
4093
4112
  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" });
4094
4113
  }
@@ -4160,7 +4179,7 @@ class J {
4160
4179
  return new J(Ge(e.values, t.values, n));
4161
4180
  }
4162
4181
  }
4163
- class O {
4182
+ class D {
4164
4183
  constructor(e) {
4165
4184
  this.name = "ExpressionEvaluationError", this.message = e;
4166
4185
  }
@@ -4191,11 +4210,11 @@ class ne {
4191
4210
  static interpolate(e, t, n) {
4192
4211
  const a = e.values, o = t.values;
4193
4212
  if (a.length !== o.length)
4194
- throw new O(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${t.toString()}`);
4213
+ throw new D(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${t.toString()}`);
4195
4214
  const i = [];
4196
4215
  for (let s = 0; s < a.length; s += 2) {
4197
4216
  if (a[s] !== o[s])
4198
- throw new O(`Cannot interpolate values containing mismatched anchors. from[${s}]: ${a[s]}, to[${s}]: ${o[s]}`);
4217
+ throw new D(`Cannot interpolate values containing mismatched anchors. from[${s}]: ${a[s]}, to[${s}]: ${o[s]}`);
4199
4218
  i.push(a[s]);
4200
4219
  const [l, u] = a[s + 1], [c, p] = o[s + 1];
4201
4220
  i.push([ve(l, c, n), ve(u, p, n)]);
@@ -4232,11 +4251,11 @@ class ee {
4232
4251
  return new ee(e, e, 1);
4233
4252
  }
4234
4253
  }
4235
- function zn(r, e, t, n) {
4254
+ function _n(r, e, t, n) {
4236
4255
  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.`;
4237
4256
  }
4238
4257
  function He(r) {
4239
- if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ee || r instanceof R || r instanceof ir || r instanceof fe || r instanceof J || r instanceof ne || r instanceof be)
4258
+ if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ee || r instanceof $ || r instanceof sr || r instanceof fe || r instanceof J || r instanceof ne || r instanceof be)
4240
4259
  return !0;
4241
4260
  if (Array.isArray(r)) {
4242
4261
  for (const e of r)
@@ -4251,20 +4270,20 @@ function He(r) {
4251
4270
  } else
4252
4271
  return !1;
4253
4272
  }
4254
- function D(r) {
4273
+ function q(r) {
4255
4274
  if (r === null)
4256
4275
  return gt;
4257
4276
  if (typeof r == "string")
4258
- return T;
4277
+ return M;
4259
4278
  if (typeof r == "boolean")
4260
- return L;
4279
+ return C;
4261
4280
  if (typeof r == "number")
4262
4281
  return g;
4263
- if (r instanceof R)
4282
+ if (r instanceof $)
4264
4283
  return ie;
4265
4284
  if (r instanceof ee)
4266
4285
  return vt;
4267
- if (r instanceof ir)
4286
+ if (r instanceof sr)
4268
4287
  return bt;
4269
4288
  if (r instanceof fe)
4270
4289
  return wt;
@@ -4278,23 +4297,23 @@ function D(r) {
4278
4297
  const e = r.length;
4279
4298
  let t;
4280
4299
  for (const n of r) {
4281
- const a = D(n);
4300
+ const a = q(n);
4282
4301
  if (!t)
4283
4302
  t = a;
4284
4303
  else {
4285
4304
  if (t === a)
4286
4305
  continue;
4287
- t = C;
4306
+ t = A;
4288
4307
  break;
4289
4308
  }
4290
4309
  }
4291
- return W(t || C, e);
4310
+ return W(t || A, e);
4292
4311
  } else
4293
- return $e;
4312
+ return Re;
4294
4313
  }
4295
- function Be(r) {
4314
+ function Ue(r) {
4296
4315
  const e = typeof r;
4297
- return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof R || r instanceof ee || r instanceof fe || r instanceof J || r instanceof ne || r instanceof be ? r.toString() : JSON.stringify(r);
4316
+ return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof $ || r instanceof ee || r instanceof fe || r instanceof J || r instanceof ne || r instanceof be ? r.toString() : JSON.stringify(r);
4298
4317
  }
4299
4318
  class je {
4300
4319
  constructor(e, t) {
@@ -4306,7 +4325,7 @@ class je {
4306
4325
  if (!He(e[1]))
4307
4326
  return t.error("invalid value");
4308
4327
  const n = e[1];
4309
- let a = D(n);
4328
+ let a = q(n);
4310
4329
  const o = t.expectedType;
4311
4330
  return a.kind === "array" && a.N === 0 && o && o.kind === "array" && (typeof o.N != "number" || o.N === 0) && (a = o), new je(a, n);
4312
4331
  }
@@ -4320,10 +4339,10 @@ class je {
4320
4339
  }
4321
4340
  }
4322
4341
  const nt = {
4323
- string: T,
4342
+ string: M,
4324
4343
  number: g,
4325
- boolean: L,
4326
- object: $e
4344
+ boolean: C,
4345
+ object: Re
4327
4346
  };
4328
4347
  class te {
4329
4348
  constructor(e, t) {
@@ -4342,7 +4361,7 @@ class te {
4342
4361
  return t.error('The item type argument of "array" must be one of string, number, boolean', 1);
4343
4362
  s = nt[u], n++;
4344
4363
  } else
4345
- s = C;
4364
+ s = A;
4346
4365
  let l;
4347
4366
  if (e.length > 3) {
4348
4367
  if (e[2] !== null && (typeof e[2] != "number" || e[2] < 0 || e[2] !== Math.floor(e[2])))
@@ -4357,7 +4376,7 @@ class te {
4357
4376
  }
4358
4377
  const i = [];
4359
4378
  for (; n < e.length; n++) {
4360
- const s = t.parse(e[n], n, C);
4379
+ const s = t.parse(e[n], n, A);
4361
4380
  if (!s)
4362
4381
  return null;
4363
4382
  i.push(s);
@@ -4367,9 +4386,9 @@ class te {
4367
4386
  evaluate(e) {
4368
4387
  for (let t = 0; t < this.args.length; t++) {
4369
4388
  const n = this.args[t].evaluate(e);
4370
- if (Ve(this.type, D(n))) {
4389
+ if (Ve(this.type, q(n))) {
4371
4390
  if (t === this.args.length - 1)
4372
- throw new O(`Expected value to be of type ${N(this.type)}, but found ${N(D(n))} instead.`);
4391
+ throw new D(`Expected value to be of type ${N(this.type)}, but found ${N(q(n))} instead.`);
4373
4392
  } else return n;
4374
4393
  }
4375
4394
  throw new Error();
@@ -4381,11 +4400,11 @@ class te {
4381
4400
  return this.args.every((e) => e.outputDefined());
4382
4401
  }
4383
4402
  }
4384
- const qr = {
4385
- "to-boolean": L,
4403
+ const Ur = {
4404
+ "to-boolean": C,
4386
4405
  "to-color": ie,
4387
4406
  "to-number": g,
4388
- "to-string": T
4407
+ "to-string": M
4389
4408
  };
4390
4409
  class ge {
4391
4410
  constructor(e, t) {
@@ -4395,13 +4414,13 @@ class ge {
4395
4414
  if (e.length < 2)
4396
4415
  return t.error("Expected at least one argument.");
4397
4416
  const n = e[0];
4398
- if (!qr[n])
4417
+ if (!Ur[n])
4399
4418
  throw new Error(`Can't parse ${n} as it is not part of the known types`);
4400
4419
  if ((n === "to-boolean" || n === "to-string") && e.length !== 2)
4401
4420
  return t.error("Expected one argument.");
4402
- const a = qr[n], o = [];
4421
+ const a = Ur[n], o = [];
4403
4422
  for (let i = 1; i < e.length; i++) {
4404
- const s = t.parse(e[i], i, C);
4423
+ const s = t.parse(e[i], i, A);
4405
4424
  if (!s)
4406
4425
  return null;
4407
4426
  o.push(s);
@@ -4415,16 +4434,16 @@ class ge {
4415
4434
  case "color": {
4416
4435
  let t, n;
4417
4436
  for (const a of this.args) {
4418
- if (t = a.evaluate(e), n = null, t instanceof R)
4437
+ if (t = a.evaluate(e), n = null, t instanceof $)
4419
4438
  return t;
4420
4439
  if (typeof t == "string") {
4421
4440
  const o = e.parseColor(t);
4422
4441
  if (o)
4423
4442
  return o;
4424
- } 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 = zn(t[0], t[1], t[2], t[3]), !n))
4425
- return new R(t[0] / 255, t[1] / 255, t[2] / 255, t[3]);
4443
+ } 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 = _n(t[0], t[1], t[2], t[3]), !n))
4444
+ return new $(t[0] / 255, t[1] / 255, t[2] / 255, t[3]);
4426
4445
  }
4427
- throw new O(n || `Could not parse color from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
4446
+ throw new D(n || `Could not parse color from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
4428
4447
  }
4429
4448
  case "padding": {
4430
4449
  let t;
@@ -4434,7 +4453,7 @@ class ge {
4434
4453
  if (a)
4435
4454
  return a;
4436
4455
  }
4437
- throw new O(`Could not parse padding from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
4456
+ throw new D(`Could not parse padding from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
4438
4457
  }
4439
4458
  case "variableAnchorOffsetCollection": {
4440
4459
  let t;
@@ -4444,7 +4463,7 @@ class ge {
4444
4463
  if (a)
4445
4464
  return a;
4446
4465
  }
4447
- throw new O(`Could not parse variableAnchorOffsetCollection from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
4466
+ throw new D(`Could not parse variableAnchorOffsetCollection from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
4448
4467
  }
4449
4468
  case "number": {
4450
4469
  let t = null;
@@ -4455,16 +4474,16 @@ class ge {
4455
4474
  if (!isNaN(a))
4456
4475
  return a;
4457
4476
  }
4458
- throw new O(`Could not convert ${JSON.stringify(t)} to number.`);
4477
+ throw new D(`Could not convert ${JSON.stringify(t)} to number.`);
4459
4478
  }
4460
4479
  case "formatted":
4461
- return fe.fromString(Be(this.args[0].evaluate(e)));
4480
+ return fe.fromString(Ue(this.args[0].evaluate(e)));
4462
4481
  case "resolvedImage":
4463
- return be.fromString(Be(this.args[0].evaluate(e)));
4482
+ return be.fromString(Ue(this.args[0].evaluate(e)));
4464
4483
  case "projectionDefinition":
4465
4484
  return this.args[0].evaluate(e);
4466
4485
  default:
4467
- return Be(this.args[0].evaluate(e));
4486
+ return Ue(this.args[0].evaluate(e));
4468
4487
  }
4469
4488
  }
4470
4489
  eachChild(e) {
@@ -4513,7 +4532,7 @@ const Br = ["Unknown", "Point", "LineString", "Polygon"], Ti = {
4513
4532
  Polygon: "Polygon",
4514
4533
  MultiPolygon: "Polygon"
4515
4534
  };
4516
- class _n {
4535
+ class Rn {
4517
4536
  constructor() {
4518
4537
  this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = {}, this.availableImages = null, this.canonical = null;
4519
4538
  }
@@ -4541,11 +4560,11 @@ class _n {
4541
4560
  }
4542
4561
  parseColor(e) {
4543
4562
  let t = this._parseColorCache[e];
4544
- return t || (t = this._parseColorCache[e] = R.parse(e)), t;
4563
+ return t || (t = this._parseColorCache[e] = $.parse(e)), t;
4545
4564
  }
4546
4565
  }
4547
4566
  class kt {
4548
- constructor(e, t, n = [], a, o = new ar(), i = []) {
4567
+ constructor(e, t, n = [], a, o = new or(), i = []) {
4549
4568
  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;
4550
4569
  }
4551
4570
  /**
@@ -4590,7 +4609,7 @@ class kt {
4590
4609
  return null;
4591
4610
  }
4592
4611
  if (!(i instanceof je) && i.type.kind !== "resolvedImage" && this._isConstant(i)) {
4593
- const s = new _n();
4612
+ const s = new Rn();
4594
4613
  try {
4595
4614
  i = new je(i.type, i.evaluate(s));
4596
4615
  } catch (l) {
@@ -4690,27 +4709,27 @@ class Ct {
4690
4709
  return !1;
4691
4710
  }
4692
4711
  }
4693
- class sr {
4712
+ class lr {
4694
4713
  constructor(e, t, n) {
4695
4714
  this.type = e, this.index = t, this.input = n;
4696
4715
  }
4697
4716
  static parse(e, t) {
4698
4717
  if (e.length !== 3)
4699
4718
  return t.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
4700
- const n = t.parse(e[1], 1, g), a = t.parse(e[2], 2, W(t.expectedType || C));
4719
+ const n = t.parse(e[1], 1, g), a = t.parse(e[2], 2, W(t.expectedType || A));
4701
4720
  if (!n || !a)
4702
4721
  return null;
4703
4722
  const o = a.type;
4704
- return new sr(o.itemType, n, a);
4723
+ return new lr(o.itemType, n, a);
4705
4724
  }
4706
4725
  evaluate(e) {
4707
4726
  const t = this.index.evaluate(e), n = this.input.evaluate(e);
4708
4727
  if (t < 0)
4709
- throw new O(`Array index out of bounds: ${t} < 0.`);
4728
+ throw new D(`Array index out of bounds: ${t} < 0.`);
4710
4729
  if (t >= n.length)
4711
- throw new O(`Array index out of bounds: ${t} > ${n.length - 1}.`);
4730
+ throw new D(`Array index out of bounds: ${t} > ${n.length - 1}.`);
4712
4731
  if (t !== Math.floor(t))
4713
- throw new O(`Array index must be an integer, but found ${t} instead.`);
4732
+ throw new D(`Array index must be an integer, but found ${t} instead.`);
4714
4733
  return n[t];
4715
4734
  }
4716
4735
  eachChild(e) {
@@ -4720,24 +4739,24 @@ class sr {
4720
4739
  return !1;
4721
4740
  }
4722
4741
  }
4723
- class lr {
4742
+ class ur {
4724
4743
  constructor(e, t) {
4725
- this.type = L, this.needle = e, this.haystack = t;
4744
+ this.type = C, this.needle = e, this.haystack = t;
4726
4745
  }
4727
4746
  static parse(e, t) {
4728
4747
  if (e.length !== 3)
4729
4748
  return t.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
4730
- const n = t.parse(e[1], 1, C), a = t.parse(e[2], 2, C);
4731
- return !n || !a ? null : or(n.type, [L, T, g, gt, C]) ? new lr(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${N(n.type)} instead`);
4749
+ const n = t.parse(e[1], 1, A), a = t.parse(e[2], 2, A);
4750
+ return !n || !a ? null : ir(n.type, [C, M, g, gt, A]) ? new ur(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${N(n.type)} instead`);
4732
4751
  }
4733
4752
  evaluate(e) {
4734
4753
  const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
4735
4754
  if (!n)
4736
4755
  return !1;
4737
4756
  if (!Le(t, ["boolean", "string", "number", "null"]))
4738
- throw new O(`Expected first argument to be of type boolean, string, number or null, but found ${N(D(t))} instead.`);
4757
+ throw new D(`Expected first argument to be of type boolean, string, number or null, but found ${N(q(t))} instead.`);
4739
4758
  if (!Le(n, ["string", "array"]))
4740
- throw new O(`Expected second argument to be of type array or string, but found ${N(D(n))} instead.`);
4759
+ throw new D(`Expected second argument to be of type array or string, but found ${N(q(n))} instead.`);
4741
4760
  return n.indexOf(t) >= 0;
4742
4761
  }
4743
4762
  eachChild(e) {
@@ -4754,10 +4773,10 @@ class ut {
4754
4773
  static parse(e, t) {
4755
4774
  if (e.length <= 2 || e.length >= 5)
4756
4775
  return t.error(`Expected 3 or 4 arguments, but found ${e.length - 1} instead.`);
4757
- const n = t.parse(e[1], 1, C), a = t.parse(e[2], 2, C);
4776
+ const n = t.parse(e[1], 1, A), a = t.parse(e[2], 2, A);
4758
4777
  if (!n || !a)
4759
4778
  return null;
4760
- if (!or(n.type, [L, T, g, gt, C]))
4779
+ if (!ir(n.type, [C, M, g, gt, A]))
4761
4780
  return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${N(n.type)} instead`);
4762
4781
  if (e.length === 4) {
4763
4782
  const o = t.parse(e[3], 3, g);
@@ -4768,7 +4787,7 @@ class ut {
4768
4787
  evaluate(e) {
4769
4788
  const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
4770
4789
  if (!Le(t, ["boolean", "string", "number", "null"]))
4771
- throw new O(`Expected first argument to be of type boolean, string, number or null, but found ${N(D(t))} instead.`);
4790
+ throw new D(`Expected first argument to be of type boolean, string, number or null, but found ${N(q(t))} instead.`);
4772
4791
  let a;
4773
4792
  if (this.fromIndex && (a = this.fromIndex.evaluate(e)), Le(n, ["string"])) {
4774
4793
  const o = n.indexOf(t, a);
@@ -4776,7 +4795,7 @@ class ut {
4776
4795
  } else {
4777
4796
  if (Le(n, ["array"]))
4778
4797
  return n.indexOf(t, a);
4779
- throw new O(`Expected second argument to be of type array or string, but found ${N(D(n))} instead.`);
4798
+ throw new D(`Expected second argument to be of type array or string, but found ${N(q(n))} instead.`);
4780
4799
  }
4781
4800
  }
4782
4801
  eachChild(e) {
@@ -4786,7 +4805,7 @@ class ut {
4786
4805
  return !1;
4787
4806
  }
4788
4807
  }
4789
- class ur {
4808
+ class cr {
4790
4809
  constructor(e, t, n, a, o, i) {
4791
4810
  this.inputType = e, this.type = t, this.input = n, this.cases = a, this.outputs = o, this.otherwise = i;
4792
4811
  }
@@ -4813,8 +4832,8 @@ class ur {
4813
4832
  if (typeof d == "number" && Math.floor(d) !== d)
4814
4833
  return m.error("Numeric branch labels must be integer values.");
4815
4834
  if (!n)
4816
- n = D(d);
4817
- else if (m.checkSubtype(n, D(d)))
4835
+ n = q(d);
4836
+ else if (m.checkSubtype(n, q(d)))
4818
4837
  return null;
4819
4838
  if (typeof o[String(d)] < "u")
4820
4839
  return m.error("Branch labels must be unique.");
@@ -4825,15 +4844,15 @@ class ur {
4825
4844
  return null;
4826
4845
  a = a || f.type, i.push(f);
4827
4846
  }
4828
- const s = t.parse(e[1], 1, C);
4847
+ const s = t.parse(e[1], 1, A);
4829
4848
  if (!s)
4830
4849
  return null;
4831
4850
  const l = t.parse(e[e.length - 1], e.length - 1, a);
4832
- return !l || s.type.kind !== "value" && t.concat(1).checkSubtype(n, s.type) ? null : new ur(n, a, s, o, i, l);
4851
+ return !l || s.type.kind !== "value" && t.concat(1).checkSubtype(n, s.type) ? null : new cr(n, a, s, o, i, l);
4833
4852
  }
4834
4853
  evaluate(e) {
4835
4854
  const t = this.input.evaluate(e);
4836
- return (D(t) === this.inputType && this.outputs[this.cases[t]] || this.otherwise).evaluate(e);
4855
+ return (q(t) === this.inputType && this.outputs[this.cases[t]] || this.otherwise).evaluate(e);
4837
4856
  }
4838
4857
  eachChild(e) {
4839
4858
  e(this.input), this.outputs.forEach(e), e(this.otherwise);
@@ -4842,7 +4861,7 @@ class ur {
4842
4861
  return this.outputs.every((e) => e.outputDefined()) && this.otherwise.outputDefined();
4843
4862
  }
4844
4863
  }
4845
- class cr {
4864
+ class pr {
4846
4865
  constructor(e, t, n) {
4847
4866
  this.type = e, this.branches = t, this.otherwise = n;
4848
4867
  }
@@ -4855,7 +4874,7 @@ class cr {
4855
4874
  t.expectedType && t.expectedType.kind !== "value" && (n = t.expectedType);
4856
4875
  const a = [];
4857
4876
  for (let i = 1; i < e.length - 1; i += 2) {
4858
- const s = t.parse(e[i], i, L);
4877
+ const s = t.parse(e[i], i, C);
4859
4878
  if (!s)
4860
4879
  return null;
4861
4880
  const l = t.parse(e[i + 1], i + 1, n);
@@ -4868,7 +4887,7 @@ class cr {
4868
4887
  return null;
4869
4888
  if (!n)
4870
4889
  throw new Error("Can't infer output type");
4871
- return new cr(n, a, o);
4890
+ return new pr(n, a, o);
4872
4891
  }
4873
4892
  evaluate(e) {
4874
4893
  for (const [t, n] of this.branches)
@@ -4892,10 +4911,10 @@ class ct {
4892
4911
  static parse(e, t) {
4893
4912
  if (e.length <= 2 || e.length >= 5)
4894
4913
  return t.error(`Expected 3 or 4 arguments, but found ${e.length - 1} instead.`);
4895
- const n = t.parse(e[1], 1, C), a = t.parse(e[2], 2, g);
4914
+ const n = t.parse(e[1], 1, A), a = t.parse(e[2], 2, g);
4896
4915
  if (!n || !a)
4897
4916
  return null;
4898
- if (!or(n.type, [W(C), T, C]))
4917
+ if (!ir(n.type, [W(A), M, A]))
4899
4918
  return t.error(`Expected first argument to be of type array or string, but found ${N(n.type)} instead`);
4900
4919
  if (e.length === 4) {
4901
4920
  const o = t.parse(e[3], 3, g);
@@ -4910,7 +4929,7 @@ class ct {
4910
4929
  return [...t].slice(n, a).join("");
4911
4930
  if (Le(t, ["array"]))
4912
4931
  return t.slice(n, a);
4913
- throw new O(`Expected first argument to be of type array or string, but found ${N(D(t))} instead.`);
4932
+ throw new D(`Expected first argument to be of type array or string, but found ${N(q(t))} instead.`);
4914
4933
  }
4915
4934
  eachChild(e) {
4916
4935
  e(this.input), e(this.beginIndex), this.endIndex && e(this.endIndex);
@@ -4930,7 +4949,7 @@ function $n(r, e) {
4930
4949
  } else if (i > e)
4931
4950
  a = o - 1;
4932
4951
  else
4933
- throw new O("Input is not a number.");
4952
+ throw new D("Input is not a number.");
4934
4953
  return 0;
4935
4954
  }
4936
4955
  class At {
@@ -4988,10 +5007,10 @@ class At {
4988
5007
  function Mi(r) {
4989
5008
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
4990
5009
  }
4991
- var qt, Ur;
5010
+ var qt, Vr;
4992
5011
  function Ii() {
4993
- if (Ur) return qt;
4994
- Ur = 1, qt = r;
5012
+ if (Vr) return qt;
5013
+ Vr = 1, qt = r;
4995
5014
  function r(e, t, n, a) {
4996
5015
  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;
4997
5016
  }
@@ -5035,12 +5054,12 @@ class se {
5035
5054
  static interpolationFactor(e, t, n, a) {
5036
5055
  let o = 0;
5037
5056
  if (e.name === "exponential")
5038
- o = Bt(t, e.base, n, a);
5057
+ o = Ut(t, e.base, n, a);
5039
5058
  else if (e.name === "linear")
5040
- o = Bt(t, 1, n, a);
5059
+ o = Ut(t, 1, n, a);
5041
5060
  else if (e.name === "cubic-bezier") {
5042
5061
  const i = e.controlPoints;
5043
- o = new zi(i[0], i[1], i[2], i[3]).solve(Bt(t, 1, n, a));
5062
+ o = new zi(i[0], i[1], i[2], i[3]).solve(Ut(t, 1, n, a));
5044
5063
  }
5045
5064
  return o;
5046
5065
  }
@@ -5107,7 +5126,7 @@ class se {
5107
5126
  case "number":
5108
5127
  return ve(c, p, u);
5109
5128
  case "color":
5110
- return R.interpolate(c, p, u);
5129
+ return $.interpolate(c, p, u);
5111
5130
  case "padding":
5112
5131
  return J.interpolate(c, p, u);
5113
5132
  case "variableAnchorOffsetCollection":
@@ -5118,9 +5137,9 @@ class se {
5118
5137
  return ee.interpolate(c, p, u);
5119
5138
  }
5120
5139
  case "interpolate-hcl":
5121
- return R.interpolate(c, p, u, "hcl");
5140
+ return $.interpolate(c, p, u, "hcl");
5122
5141
  case "interpolate-lab":
5123
- return R.interpolate(c, p, u, "lab");
5142
+ return $.interpolate(c, p, u, "lab");
5124
5143
  }
5125
5144
  }
5126
5145
  eachChild(e) {
@@ -5132,11 +5151,11 @@ class se {
5132
5151
  return this.outputs.every((e) => e.outputDefined());
5133
5152
  }
5134
5153
  }
5135
- function Bt(r, e, t, n) {
5154
+ function Ut(r, e, t, n) {
5136
5155
  const a = n - t, o = r - t;
5137
5156
  return a === 0 ? 0 : e === 1 ? o / a : (Math.pow(e, o) - 1) / (Math.pow(e, a) - 1);
5138
5157
  }
5139
- R.interpolate, J.interpolate, ne.interpolate;
5158
+ $.interpolate, J.interpolate, ne.interpolate;
5140
5159
  class Ke {
5141
5160
  constructor(e, t) {
5142
5161
  this.type = e, this.args = t;
@@ -5156,7 +5175,7 @@ class Ke {
5156
5175
  }
5157
5176
  if (!n)
5158
5177
  throw new Error("No output type");
5159
- return a && o.some((s) => Ve(a, s.type)) ? new Ke(C, o) : new Ke(n, o);
5178
+ return a && o.some((s) => Ve(a, s.type)) ? new Ke(A, o) : new Ke(n, o);
5160
5179
  }
5161
5180
  evaluate(e) {
5162
5181
  let t = null, n = 0, a;
@@ -5172,19 +5191,19 @@ class Ke {
5172
5191
  return this.args.every((e) => e.outputDefined());
5173
5192
  }
5174
5193
  }
5175
- function Vr(r, e) {
5194
+ function Gr(r, e) {
5176
5195
  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";
5177
5196
  }
5178
- function Pi(r, e, t) {
5197
+ function _i(r, e, t) {
5179
5198
  return e === t;
5180
5199
  }
5181
- function _i(r, e, t) {
5200
+ function Pi(r, e, t) {
5182
5201
  return e !== t;
5183
5202
  }
5184
- function $i(r, e, t) {
5203
+ function Ri(r, e, t) {
5185
5204
  return e < t;
5186
5205
  }
5187
- function Ri(r, e, t) {
5206
+ function $i(r, e, t) {
5188
5207
  return e > t;
5189
5208
  }
5190
5209
  function ji(r, e, t) {
@@ -5193,11 +5212,11 @@ function ji(r, e, t) {
5193
5212
  function Ni(r, e, t) {
5194
5213
  return e >= t;
5195
5214
  }
5196
- function Rn(r, e, t, n) {
5215
+ function jn(r, e, t, n) {
5197
5216
  return n.compare(e, t) === 0;
5198
5217
  }
5199
5218
  function Fi(r, e, t, n) {
5200
- return !Rn(r, e, t, n);
5219
+ return !jn(r, e, t, n);
5201
5220
  }
5202
5221
  function Oi(r, e, t, n) {
5203
5222
  return n.compare(e, t) < 0;
@@ -5208,28 +5227,28 @@ function Di(r, e, t, n) {
5208
5227
  function qi(r, e, t, n) {
5209
5228
  return n.compare(e, t) <= 0;
5210
5229
  }
5211
- function Bi(r, e, t, n) {
5230
+ function Ui(r, e, t, n) {
5212
5231
  return n.compare(e, t) >= 0;
5213
5232
  }
5214
5233
  function Fe(r, e, t) {
5215
5234
  const n = r !== "==" && r !== "!=";
5216
- return class jn {
5235
+ return class Nn {
5217
5236
  constructor(o, i, s) {
5218
- this.type = L, this.lhs = o, this.rhs = i, this.collator = s, this.hasUntypedArgument = o.type.kind === "value" || i.type.kind === "value";
5237
+ this.type = C, this.lhs = o, this.rhs = i, this.collator = s, this.hasUntypedArgument = o.type.kind === "value" || i.type.kind === "value";
5219
5238
  }
5220
5239
  static parse(o, i) {
5221
5240
  if (o.length !== 3 && o.length !== 4)
5222
5241
  return i.error("Expected two or three arguments.");
5223
5242
  const s = o[0];
5224
- let l = i.parse(o[1], 1, C);
5243
+ let l = i.parse(o[1], 1, A);
5225
5244
  if (!l)
5226
5245
  return null;
5227
- if (!Vr(s, l.type))
5246
+ if (!Gr(s, l.type))
5228
5247
  return i.concat(1).error(`"${s}" comparisons are not supported for type '${N(l.type)}'.`);
5229
- let u = i.parse(o[2], 2, C);
5248
+ let u = i.parse(o[2], 2, A);
5230
5249
  if (!u)
5231
5250
  return null;
5232
- if (!Vr(s, u.type))
5251
+ if (!Gr(s, u.type))
5233
5252
  return i.concat(2).error(`"${s}" comparisons are not supported for type '${N(u.type)}'.`);
5234
5253
  if (l.type.kind !== u.type.kind && l.type.kind !== "value" && u.type.kind !== "value")
5235
5254
  return i.error(`Cannot compare types '${N(l.type)}' and '${N(u.type)}'.`);
@@ -5241,17 +5260,17 @@ function Fe(r, e, t) {
5241
5260
  if (c = i.parse(o[3], 3, bt), !c)
5242
5261
  return null;
5243
5262
  }
5244
- return new jn(l, u, c);
5263
+ return new Nn(l, u, c);
5245
5264
  }
5246
5265
  evaluate(o) {
5247
5266
  const i = this.lhs.evaluate(o), s = this.rhs.evaluate(o);
5248
5267
  if (n && this.hasUntypedArgument) {
5249
- const l = D(i), u = D(s);
5268
+ const l = q(i), u = q(s);
5250
5269
  if (l.kind !== u.kind || !(l.kind === "string" || l.kind === "number"))
5251
- throw new O(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${l.kind}, ${u.kind}) instead.`);
5270
+ throw new D(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${l.kind}, ${u.kind}) instead.`);
5252
5271
  }
5253
5272
  if (this.collator && !n && this.hasUntypedArgument) {
5254
- const l = D(i), u = D(s);
5273
+ const l = q(i), u = q(s);
5255
5274
  if (l.kind !== "string" || u.kind !== "string")
5256
5275
  return e(o, i, s);
5257
5276
  }
@@ -5265,7 +5284,7 @@ function Fe(r, e, t) {
5265
5284
  }
5266
5285
  };
5267
5286
  }
5268
- const Ui = Fe("==", Pi, Rn), Vi = Fe("!=", _i, Fi), Gi = Fe("<", $i, Oi), Hi = Fe(">", Ri, Di), Ki = Fe("<=", ji, qi), Wi = Fe(">=", Ni, Bi);
5287
+ const Bi = Fe("==", _i, jn), Vi = Fe("!=", Pi, Fi), Gi = Fe("<", Ri, Oi), Hi = Fe(">", $i, Di), Ki = Fe("<=", ji, qi), Wi = Fe(">=", Ni, Ui);
5269
5288
  class Tt {
5270
5289
  constructor(e, t, n) {
5271
5290
  this.type = bt, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
@@ -5276,17 +5295,17 @@ class Tt {
5276
5295
  const n = e[1];
5277
5296
  if (typeof n != "object" || Array.isArray(n))
5278
5297
  return t.error("Collator options argument must be an object.");
5279
- const a = t.parse(n["case-sensitive"] === void 0 ? !1 : n["case-sensitive"], 1, L);
5298
+ const a = t.parse(n["case-sensitive"] === void 0 ? !1 : n["case-sensitive"], 1, C);
5280
5299
  if (!a)
5281
5300
  return null;
5282
- const o = t.parse(n["diacritic-sensitive"] === void 0 ? !1 : n["diacritic-sensitive"], 1, L);
5301
+ const o = t.parse(n["diacritic-sensitive"] === void 0 ? !1 : n["diacritic-sensitive"], 1, C);
5283
5302
  if (!o)
5284
5303
  return null;
5285
5304
  let i = null;
5286
- return n.locale && (i = t.parse(n.locale, 1, T), !i) ? null : new Tt(a, o, i);
5305
+ return n.locale && (i = t.parse(n.locale, 1, M), !i) ? null : new Tt(a, o, i);
5287
5306
  }
5288
5307
  evaluate(e) {
5289
- return new ir(this.caseSensitive.evaluate(e), this.diacriticSensitive.evaluate(e), this.locale ? this.locale.evaluate(e) : null);
5308
+ return new sr(this.caseSensitive.evaluate(e), this.diacriticSensitive.evaluate(e), this.locale ? this.locale.evaluate(e) : null);
5290
5309
  }
5291
5310
  eachChild(e) {
5292
5311
  e(this.caseSensitive), e(this.diacriticSensitive), this.locale && e(this.locale);
@@ -5295,9 +5314,9 @@ class Tt {
5295
5314
  return !1;
5296
5315
  }
5297
5316
  }
5298
- class pr {
5317
+ class fr {
5299
5318
  constructor(e, t, n, a, o) {
5300
- this.type = T, this.number = e, this.locale = t, this.currency = n, this.minFractionDigits = a, this.maxFractionDigits = o;
5319
+ this.type = M, this.number = e, this.locale = t, this.currency = n, this.minFractionDigits = a, this.maxFractionDigits = o;
5301
5320
  }
5302
5321
  static parse(e, t) {
5303
5322
  if (e.length !== 3)
@@ -5309,16 +5328,16 @@ class pr {
5309
5328
  if (typeof a != "object" || Array.isArray(a))
5310
5329
  return t.error("NumberFormat options argument must be an object.");
5311
5330
  let o = null;
5312
- if (a.locale && (o = t.parse(a.locale, 1, T), !o))
5331
+ if (a.locale && (o = t.parse(a.locale, 1, M), !o))
5313
5332
  return null;
5314
5333
  let i = null;
5315
- if (a.currency && (i = t.parse(a.currency, 1, T), !i))
5334
+ if (a.currency && (i = t.parse(a.currency, 1, M), !i))
5316
5335
  return null;
5317
5336
  let s = null;
5318
5337
  if (a["min-fraction-digits"] && (s = t.parse(a["min-fraction-digits"], 1, g), !s))
5319
5338
  return null;
5320
5339
  let l = null;
5321
- return a["max-fraction-digits"] && (l = t.parse(a["max-fraction-digits"], 1, g), !l) ? null : new pr(n, o, i, s, l);
5340
+ return a["max-fraction-digits"] && (l = t.parse(a["max-fraction-digits"], 1, g), !l) ? null : new fr(n, o, i, s, l);
5322
5341
  }
5323
5342
  evaluate(e) {
5324
5343
  return new Intl.NumberFormat(this.locale ? this.locale.evaluate(e) : [], {
@@ -5335,7 +5354,7 @@ class pr {
5335
5354
  return !1;
5336
5355
  }
5337
5356
  }
5338
- class fr {
5357
+ class dr {
5339
5358
  constructor(e) {
5340
5359
  this.type = wt, this.sections = e;
5341
5360
  }
@@ -5355,7 +5374,7 @@ class fr {
5355
5374
  if (s["font-scale"] && (l = t.parse(s["font-scale"], 1, g), !l))
5356
5375
  return null;
5357
5376
  let u = null;
5358
- if (s["text-font"] && (u = t.parse(s["text-font"], 1, W(T)), !u))
5377
+ if (s["text-font"] && (u = t.parse(s["text-font"], 1, W(M)), !u))
5359
5378
  return null;
5360
5379
  let c = null;
5361
5380
  if (s["text-color"] && (c = t.parse(s["text-color"], 1, ie), !c))
@@ -5363,7 +5382,7 @@ class fr {
5363
5382
  const p = a[a.length - 1];
5364
5383
  p.scale = l, p.font = u, p.textColor = c;
5365
5384
  } else {
5366
- const l = t.parse(e[i], 1, C);
5385
+ const l = t.parse(e[i], 1, A);
5367
5386
  if (!l)
5368
5387
  return null;
5369
5388
  const u = l.type.kind;
@@ -5372,12 +5391,12 @@ class fr {
5372
5391
  o = !0, a.push({ content: l, scale: null, font: null, textColor: null });
5373
5392
  }
5374
5393
  }
5375
- return new fr(a);
5394
+ return new dr(a);
5376
5395
  }
5377
5396
  evaluate(e) {
5378
5397
  const t = (n) => {
5379
5398
  const a = n.content.evaluate(e);
5380
- return D(a) === Xe ? new Zt("", a, null, null, null) : new Zt(Be(a), null, n.scale ? n.scale.evaluate(e) : null, n.font ? n.font.evaluate(e).join(",") : null, n.textColor ? n.textColor.evaluate(e) : null);
5399
+ return q(a) === Xe ? new Zt("", a, null, null, null) : new Zt(Ue(a), null, n.scale ? n.scale.evaluate(e) : null, n.font ? n.font.evaluate(e).join(",") : null, n.textColor ? n.textColor.evaluate(e) : null);
5381
5400
  };
5382
5401
  return new fe(this.sections.map(t));
5383
5402
  }
@@ -5389,15 +5408,15 @@ class fr {
5389
5408
  return !1;
5390
5409
  }
5391
5410
  }
5392
- class dr {
5411
+ class yr {
5393
5412
  constructor(e) {
5394
5413
  this.type = Xe, this.input = e;
5395
5414
  }
5396
5415
  static parse(e, t) {
5397
5416
  if (e.length !== 2)
5398
5417
  return t.error("Expected two arguments.");
5399
- const n = t.parse(e[1], 1, T);
5400
- return n ? new dr(n) : t.error("No image name provided.");
5418
+ const n = t.parse(e[1], 1, M);
5419
+ return n ? new yr(n) : t.error("No image name provided.");
5401
5420
  }
5402
5421
  evaluate(e) {
5403
5422
  const t = this.input.evaluate(e), n = be.fromString(t);
@@ -5410,7 +5429,7 @@ class dr {
5410
5429
  return !1;
5411
5430
  }
5412
5431
  }
5413
- class yr {
5432
+ class mr {
5414
5433
  constructor(e) {
5415
5434
  this.type = g, this.input = e;
5416
5435
  }
@@ -5418,7 +5437,7 @@ class yr {
5418
5437
  if (e.length !== 2)
5419
5438
  return t.error(`Expected 1 argument, but found ${e.length - 1} instead.`);
5420
5439
  const n = t.parse(e[1], 1);
5421
- 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 ${N(n.type)} instead.`) : new yr(n) : null;
5440
+ 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 ${N(n.type)} instead.`) : new mr(n) : null;
5422
5441
  }
5423
5442
  evaluate(e) {
5424
5443
  const t = this.input.evaluate(e);
@@ -5426,7 +5445,7 @@ class yr {
5426
5445
  return [...t].length;
5427
5446
  if (Array.isArray(t))
5428
5447
  return t.length;
5429
- throw new O(`Expected value to be of type string or array, but found ${N(D(t))} instead.`);
5448
+ throw new D(`Expected value to be of type string or array, but found ${N(q(t))} instead.`);
5430
5449
  }
5431
5450
  eachChild(e) {
5432
5451
  e(this.input);
@@ -5440,7 +5459,7 @@ function Zi(r, e) {
5440
5459
  const t = Ji(r[0]), n = Xi(r[1]), a = Math.pow(2, e.z);
5441
5460
  return [Math.round(t * a * le), Math.round(n * a * le)];
5442
5461
  }
5443
- function mr(r, e) {
5462
+ function hr(r, e) {
5444
5463
  const t = Math.pow(2, e.z), n = (r[0] / le + e.x) / t, a = (r[1] / le + e.y) / t;
5445
5464
  return [Yi(n), Qi(a)];
5446
5465
  }
@@ -5471,7 +5490,7 @@ function ts(r, e, t) {
5471
5490
  }
5472
5491
  function Mt(r, e, t, n) {
5473
5492
  const a = [e[0] - r[0], e[1] - r[1]], o = [n[0] - t[0], n[1] - t[1]];
5474
- return os(o, a) === 0 ? !1 : !!(Gr(r, e, t, n) && Gr(t, n, r, e));
5493
+ return os(o, a) === 0 ? !1 : !!(Hr(r, e, t, n) && Hr(t, n, r, e));
5475
5494
  }
5476
5495
  function rs(r, e, t) {
5477
5496
  for (const n of t)
@@ -5496,7 +5515,7 @@ function ns(r, e) {
5496
5515
  return !0;
5497
5516
  return !1;
5498
5517
  }
5499
- function Nn(r, e) {
5518
+ function Fn(r, e) {
5500
5519
  for (const t of r)
5501
5520
  if (!Oe(t, e))
5502
5521
  return !1;
@@ -5507,18 +5526,18 @@ function Nn(r, e) {
5507
5526
  }
5508
5527
  function as(r, e) {
5509
5528
  for (const t of e)
5510
- if (Nn(r, t))
5529
+ if (Fn(r, t))
5511
5530
  return !0;
5512
5531
  return !1;
5513
5532
  }
5514
5533
  function os(r, e) {
5515
5534
  return r[0] * e[1] - r[1] * e[0];
5516
5535
  }
5517
- function Gr(r, e, t, n) {
5536
+ function Hr(r, e, t, n) {
5518
5537
  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;
5519
5538
  return c > 0 && p < 0 || c < 0 && p > 0;
5520
5539
  }
5521
- function hr(r, e, t) {
5540
+ function gr(r, e, t) {
5522
5541
  const n = [];
5523
5542
  for (let a = 0; a < r.length; a++) {
5524
5543
  const o = [];
@@ -5530,15 +5549,15 @@ function hr(r, e, t) {
5530
5549
  }
5531
5550
  return n;
5532
5551
  }
5533
- function Fn(r, e, t) {
5552
+ function On(r, e, t) {
5534
5553
  const n = [];
5535
5554
  for (let a = 0; a < r.length; a++) {
5536
- const o = hr(r[a], e, t);
5555
+ const o = gr(r[a], e, t);
5537
5556
  n.push(o);
5538
5557
  }
5539
5558
  return n;
5540
5559
  }
5541
- function On(r, e, t, n) {
5560
+ function Dn(r, e, t, n) {
5542
5561
  if (r[0] < t[0] || r[0] > t[2]) {
5543
5562
  const a = n * 0.5;
5544
5563
  let o = r[0] - t[0] > a ? -n : t[0] - r[0] > a ? n : 0;
@@ -5549,16 +5568,16 @@ function On(r, e, t, n) {
5549
5568
  function is(r) {
5550
5569
  r[0] = r[1] = 1 / 0, r[2] = r[3] = -1 / 0;
5551
5570
  }
5552
- function Hr(r, e, t, n) {
5571
+ function Kr(r, e, t, n) {
5553
5572
  const a = Math.pow(2, n.z) * le, o = [n.x * le, n.y * le], i = [];
5554
5573
  for (const s of r)
5555
5574
  for (const l of s) {
5556
5575
  const u = [l.x + o[0], l.y + o[1]];
5557
- On(u, e, t, a), i.push(u);
5576
+ Dn(u, e, t, a), i.push(u);
5558
5577
  }
5559
5578
  return i;
5560
5579
  }
5561
- function Kr(r, e, t, n) {
5580
+ function Wr(r, e, t, n) {
5562
5581
  const a = Math.pow(2, n.z) * le, o = [n.x * le, n.y * le], i = [];
5563
5582
  for (const s of r) {
5564
5583
  const l = [];
@@ -5572,14 +5591,14 @@ function Kr(r, e, t, n) {
5572
5591
  is(e);
5573
5592
  for (const s of i)
5574
5593
  for (const l of s)
5575
- On(l, e, t, a);
5594
+ Dn(l, e, t, a);
5576
5595
  }
5577
5596
  return i;
5578
5597
  }
5579
5598
  function ss(r, e) {
5580
5599
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
5581
5600
  if (e.type === "Polygon") {
5582
- const o = hr(e.coordinates, n, a), i = Hr(r.geometry(), t, n, a);
5601
+ const o = gr(e.coordinates, n, a), i = Kr(r.geometry(), t, n, a);
5583
5602
  if (!We(t, n))
5584
5603
  return !1;
5585
5604
  for (const s of i)
@@ -5587,7 +5606,7 @@ function ss(r, e) {
5587
5606
  return !1;
5588
5607
  }
5589
5608
  if (e.type === "MultiPolygon") {
5590
- const o = Fn(e.coordinates, n, a), i = Hr(r.geometry(), t, n, a);
5609
+ const o = On(e.coordinates, n, a), i = Kr(r.geometry(), t, n, a);
5591
5610
  if (!We(t, n))
5592
5611
  return !1;
5593
5612
  for (const s of i)
@@ -5599,15 +5618,15 @@ function ss(r, e) {
5599
5618
  function ls(r, e) {
5600
5619
  const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
5601
5620
  if (e.type === "Polygon") {
5602
- const o = hr(e.coordinates, n, a), i = Kr(r.geometry(), t, n, a);
5621
+ const o = gr(e.coordinates, n, a), i = Wr(r.geometry(), t, n, a);
5603
5622
  if (!We(t, n))
5604
5623
  return !1;
5605
5624
  for (const s of i)
5606
- if (!Nn(s, o))
5625
+ if (!Fn(s, o))
5607
5626
  return !1;
5608
5627
  }
5609
5628
  if (e.type === "MultiPolygon") {
5610
- const o = Fn(e.coordinates, n, a), i = Kr(r.geometry(), t, n, a);
5629
+ const o = On(e.coordinates, n, a), i = Wr(r.geometry(), t, n, a);
5611
5630
  if (!We(t, n))
5612
5631
  return !1;
5613
5632
  for (const s of i)
@@ -5618,7 +5637,7 @@ function ls(r, e) {
5618
5637
  }
5619
5638
  class Ce {
5620
5639
  constructor(e, t) {
5621
- this.type = L, this.geojson = e, this.geometries = t;
5640
+ this.type = C, this.geojson = e, this.geometries = t;
5622
5641
  }
5623
5642
  static parse(e, t) {
5624
5643
  if (e.length !== 2)
@@ -5662,7 +5681,7 @@ class Ce {
5662
5681
  return !0;
5663
5682
  }
5664
5683
  }
5665
- class Dn {
5684
+ class qn {
5666
5685
  constructor(e = [], t = (n, a) => n < a ? -1 : n > a ? 1 : 0) {
5667
5686
  if (this.data = e, this.length = this.data.length, this.compare = t, this.length > 0)
5668
5687
  for (let n = (this.length >> 1) - 1; n >= 0; n--) this._down(n);
@@ -5698,11 +5717,11 @@ class Dn {
5698
5717
  t[e] = o;
5699
5718
  }
5700
5719
  }
5701
- const us = 6378.137, Wr = 1 / 298.257223563, Zr = Wr * (2 - Wr), Jr = Math.PI / 180;
5702
- class gr {
5720
+ const us = 6378.137, Zr = 1 / 298.257223563, Jr = Zr * (2 - Zr), Yr = Math.PI / 180;
5721
+ class vr {
5703
5722
  constructor(e) {
5704
- const t = Jr * us * 1e3, n = Math.cos(e * Jr), a = 1 / (1 - Zr * (1 - n * n)), o = Math.sqrt(a);
5705
- this.kx = t * o * n, this.ky = t * o * a * (1 - Zr);
5723
+ const t = Yr * us * 1e3, n = Math.cos(e * Yr), a = 1 / (1 - Jr * (1 - n * n)), o = Math.sqrt(a);
5724
+ this.kx = t * o * n, this.ky = t * o * a * (1 - Jr);
5706
5725
  }
5707
5726
  /**
5708
5727
  * Given two points of the form [longitude, latitude], returns the distance.
@@ -5753,7 +5772,7 @@ class gr {
5753
5772
  }
5754
5773
  }
5755
5774
  const Jt = 100, Yt = 50;
5756
- function qn(r, e) {
5775
+ function Un(r, e) {
5757
5776
  return e[0] - r[0];
5758
5777
  }
5759
5778
  function pt(r) {
@@ -5798,11 +5817,11 @@ function er(r) {
5798
5817
  Qe(e, n);
5799
5818
  return e;
5800
5819
  }
5801
- function Yr(r) {
5820
+ function Xr(r) {
5802
5821
  return r[0] !== -1 / 0 && r[1] !== -1 / 0 && r[2] !== 1 / 0 && r[3] !== 1 / 0;
5803
5822
  }
5804
- function vr(r, e, t) {
5805
- if (!Yr(r) || !Yr(e))
5823
+ function br(r, e, t) {
5824
+ if (!Xr(r) || !Xr(e))
5806
5825
  return NaN;
5807
5826
  let n = 0, a = 0;
5808
5827
  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]);
@@ -5811,7 +5830,7 @@ function ke(r, e, t) {
5811
5830
  const n = t.pointOnLine(e, r);
5812
5831
  return t.distance(r, n.point);
5813
5832
  }
5814
- function br(r, e, t, n, a) {
5833
+ function wr(r, e, t, n, a) {
5815
5834
  const o = Math.min(ke(r, [t, n], a), ke(e, [t, n], a)), i = Math.min(ke(t, [r, e], a), ke(n, [r, e], a));
5816
5835
  return Math.min(o, i);
5817
5836
  }
@@ -5825,7 +5844,7 @@ function cs(r, e, t, n, a) {
5825
5844
  const p = t[c], m = t[c + 1];
5826
5845
  if (Mt(l, u, p, m))
5827
5846
  return 0;
5828
- i = Math.min(i, br(l, u, p, m, a));
5847
+ i = Math.min(i, wr(l, u, p, m, a));
5829
5848
  }
5830
5849
  }
5831
5850
  return i;
@@ -5868,12 +5887,12 @@ function ds(r, e, t, n) {
5868
5887
  const m = l[p], f = l[u];
5869
5888
  if (Mt(i, s, m, f))
5870
5889
  return 0;
5871
- a = Math.min(a, br(i, s, m, f, n));
5890
+ a = Math.min(a, wr(i, s, m, f, n));
5872
5891
  }
5873
5892
  }
5874
5893
  return a;
5875
5894
  }
5876
- function Xr(r, e) {
5895
+ function Qr(r, e) {
5877
5896
  for (const t of r)
5878
5897
  for (const n of t)
5879
5898
  if (Oe(n, e, !0))
@@ -5882,12 +5901,12 @@ function Xr(r, e) {
5882
5901
  }
5883
5902
  function ys(r, e, t, n = 1 / 0) {
5884
5903
  const a = er(r), o = er(e);
5885
- if (n !== 1 / 0 && vr(a, o, t) >= n)
5904
+ if (n !== 1 / 0 && br(a, o, t) >= n)
5886
5905
  return n;
5887
5906
  if (We(a, o)) {
5888
- if (Xr(r, e))
5907
+ if (Qr(r, e))
5889
5908
  return 0;
5890
- } else if (Xr(e, r))
5909
+ } else if (Qr(e, r))
5891
5910
  return 0;
5892
5911
  let i = 1 / 0;
5893
5912
  for (const s of r)
@@ -5898,28 +5917,28 @@ function ys(r, e, t, n = 1 / 0) {
5898
5917
  const w = f[v], b = f[d];
5899
5918
  if (Mt(p, m, w, b))
5900
5919
  return 0;
5901
- i = Math.min(i, br(p, m, w, b, t));
5920
+ i = Math.min(i, wr(p, m, w, b, t));
5902
5921
  }
5903
5922
  }
5904
5923
  return i;
5905
5924
  }
5906
- function Qr(r, e, t, n, a, o) {
5925
+ function en(r, e, t, n, a, o) {
5907
5926
  if (!o)
5908
5927
  return;
5909
- const i = vr(Qt(n, o), a, t);
5928
+ const i = br(Qt(n, o), a, t);
5910
5929
  i < e && r.push([i, o, [0, 0]]);
5911
5930
  }
5912
5931
  function at(r, e, t, n, a, o, i) {
5913
5932
  if (!o || !i)
5914
5933
  return;
5915
- const s = vr(Qt(n, o), Qt(a, i), t);
5934
+ const s = br(Qt(n, o), Qt(a, i), t);
5916
5935
  s < e && r.push([s, o, i]);
5917
5936
  }
5918
5937
  function ft(r, e, t, n, a = 1 / 0) {
5919
5938
  let o = Math.min(n.distance(r[0], t[0][0]), a);
5920
5939
  if (o === 0)
5921
5940
  return o;
5922
- const i = new Dn([[0, [0, r.length - 1], [0, 0]]], qn), s = er(t);
5941
+ const i = new qn([[0, [0, r.length - 1], [0, 0]]], Un), s = er(t);
5923
5942
  for (; i.length > 0; ) {
5924
5943
  const l = i.pop();
5925
5944
  if (l[0] >= o)
@@ -5941,7 +5960,7 @@ function ft(r, e, t, n, a = 1 / 0) {
5941
5960
  }
5942
5961
  } else {
5943
5962
  const p = Xt(u, e);
5944
- Qr(i, o, n, r, s, p[0]), Qr(i, o, n, r, s, p[1]);
5963
+ en(i, o, n, r, s, p[0]), en(i, o, n, r, s, p[1]);
5945
5964
  }
5946
5965
  }
5947
5966
  return o;
@@ -5950,7 +5969,7 @@ function dt(r, e, t, n, a, o = 1 / 0) {
5950
5969
  let i = Math.min(o, a.distance(r[0], t[0]));
5951
5970
  if (i === 0)
5952
5971
  return i;
5953
- const s = new Dn([[0, [0, r.length - 1], [0, t.length - 1]]], qn);
5972
+ const s = new qn([[0, [0, r.length - 1], [0, t.length - 1]]], Un);
5954
5973
  for (; s.length > 0; ) {
5955
5974
  const l = s.pop();
5956
5975
  if (l[0] >= i)
@@ -5982,10 +6001,10 @@ function dt(r, e, t, n, a, o = 1 / 0) {
5982
6001
  return i;
5983
6002
  }
5984
6003
  function ms(r, e) {
5985
- const t = r.geometry(), n = t.flat().map((i) => mr([i.x, i.y], r.canonical));
6004
+ const t = r.geometry(), n = t.flat().map((i) => hr([i.x, i.y], r.canonical));
5986
6005
  if (t.length === 0)
5987
6006
  return NaN;
5988
- const a = new gr(n[0][1]);
6007
+ const a = new vr(n[0][1]);
5989
6008
  let o = 1 / 0;
5990
6009
  for (const i of e) {
5991
6010
  switch (i.type) {
@@ -6005,10 +6024,10 @@ function ms(r, e) {
6005
6024
  return o;
6006
6025
  }
6007
6026
  function hs(r, e) {
6008
- const t = r.geometry(), n = t.flat().map((i) => mr([i.x, i.y], r.canonical));
6027
+ const t = r.geometry(), n = t.flat().map((i) => hr([i.x, i.y], r.canonical));
6009
6028
  if (t.length === 0)
6010
6029
  return NaN;
6011
- const a = new gr(n[0][1]);
6030
+ const a = new vr(n[0][1]);
6012
6031
  let o = 1 / 0;
6013
6032
  for (const i of e) {
6014
6033
  switch (i.type) {
@@ -6031,7 +6050,7 @@ function gs(r, e) {
6031
6050
  const t = r.geometry();
6032
6051
  if (t.length === 0 || t[0].length === 0)
6033
6052
  return NaN;
6034
- const n = Ci(t).map((i) => i.map((s) => s.map((l) => mr([l.x, l.y], r.canonical)))), a = new gr(n[0][0][0][1]);
6053
+ const n = Ci(t).map((i) => i.map((s) => s.map((l) => hr([l.x, l.y], r.canonical)))), a = new vr(n[0][0][0][1]);
6035
6054
  let o = 1 / 0;
6036
6055
  for (const i of e)
6037
6056
  for (const s of n) {
@@ -6051,7 +6070,7 @@ function gs(r, e) {
6051
6070
  }
6052
6071
  return o;
6053
6072
  }
6054
- function Ut(r) {
6073
+ function Bt(r) {
6055
6074
  return r.type === "MultiPolygon" ? r.coordinates.map((e) => ({
6056
6075
  type: "Polygon",
6057
6076
  coordinates: e
@@ -6073,11 +6092,11 @@ class Ae {
6073
6092
  if (He(e[1])) {
6074
6093
  const n = e[1];
6075
6094
  if (n.type === "FeatureCollection")
6076
- return new Ae(n, n.features.map((a) => Ut(a.geometry)).flat());
6095
+ return new Ae(n, n.features.map((a) => Bt(a.geometry)).flat());
6077
6096
  if (n.type === "Feature")
6078
- return new Ae(n, Ut(n.geometry));
6097
+ return new Ae(n, Bt(n.geometry));
6079
6098
  if ("type" in n && "coordinates" in n)
6080
- return new Ae(n, Ut(n));
6099
+ return new Ae(n, Bt(n));
6081
6100
  }
6082
6101
  return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.");
6083
6102
  }
@@ -6098,33 +6117,33 @@ class Ae {
6098
6117
  return !0;
6099
6118
  }
6100
6119
  }
6101
- const wr = {
6120
+ const Sr = {
6102
6121
  // special forms
6103
- "==": Ui,
6122
+ "==": Bi,
6104
6123
  "!=": Vi,
6105
6124
  ">": Hi,
6106
6125
  "<": Gi,
6107
6126
  ">=": Wi,
6108
6127
  "<=": Ki,
6109
6128
  array: te,
6110
- at: sr,
6129
+ at: lr,
6111
6130
  boolean: te,
6112
- case: cr,
6131
+ case: pr,
6113
6132
  coalesce: Ke,
6114
6133
  collator: Tt,
6115
- format: fr,
6116
- image: dr,
6117
- in: lr,
6134
+ format: dr,
6135
+ image: yr,
6136
+ in: ur,
6118
6137
  "index-of": ut,
6119
6138
  interpolate: se,
6120
6139
  "interpolate-hcl": se,
6121
6140
  "interpolate-lab": se,
6122
- length: yr,
6141
+ length: mr,
6123
6142
  let: Lt,
6124
6143
  literal: je,
6125
- match: ur,
6144
+ match: cr,
6126
6145
  number: te,
6127
- "number-format": pr,
6146
+ "number-format": fr,
6128
6147
  object: te,
6129
6148
  slice: ct,
6130
6149
  step: At,
@@ -6202,14 +6221,14 @@ class re {
6202
6221
  e[n] = re;
6203
6222
  }
6204
6223
  }
6205
- function en(r, [e, t, n, a]) {
6224
+ function tn(r, [e, t, n, a]) {
6206
6225
  e = e.evaluate(r), t = t.evaluate(r), n = n.evaluate(r);
6207
- const o = a ? a.evaluate(r) : 1, i = zn(e, t, n, o);
6226
+ const o = a ? a.evaluate(r) : 1, i = _n(e, t, n, o);
6208
6227
  if (i)
6209
- throw new O(i);
6210
- return new R(e / 255, t / 255, n / 255, o, !1);
6228
+ throw new D(i);
6229
+ return new $(e / 255, t / 255, n / 255, o, !1);
6211
6230
  }
6212
- function tn(r, e) {
6231
+ function rn(r, e) {
6213
6232
  return r in e;
6214
6233
  }
6215
6234
  function Vt(r, e) {
@@ -6228,18 +6247,18 @@ function vs(r, e, t, n) {
6228
6247
  function xe(r) {
6229
6248
  return { type: r };
6230
6249
  }
6231
- re.register(wr, {
6250
+ re.register(Sr, {
6232
6251
  error: [
6233
6252
  yi,
6234
- [T],
6253
+ [M],
6235
6254
  (r, [e]) => {
6236
- throw new O(e.evaluate(r));
6255
+ throw new D(e.evaluate(r));
6237
6256
  }
6238
6257
  ],
6239
6258
  typeof: [
6240
- T,
6241
- [C],
6242
- (r, [e]) => N(D(e.evaluate(r)))
6259
+ M,
6260
+ [A],
6261
+ (r, [e]) => N(q(e.evaluate(r)))
6243
6262
  ],
6244
6263
  "to-rgba": [
6245
6264
  W(g, 4),
@@ -6252,56 +6271,56 @@ re.register(wr, {
6252
6271
  rgb: [
6253
6272
  ie,
6254
6273
  [g, g, g],
6255
- en
6274
+ tn
6256
6275
  ],
6257
6276
  rgba: [
6258
6277
  ie,
6259
6278
  [g, g, g, g],
6260
- en
6279
+ tn
6261
6280
  ],
6262
6281
  has: {
6263
- type: L,
6282
+ type: C,
6264
6283
  overloads: [
6265
6284
  [
6266
- [T],
6267
- (r, [e]) => tn(e.evaluate(r), r.properties())
6285
+ [M],
6286
+ (r, [e]) => rn(e.evaluate(r), r.properties())
6268
6287
  ],
6269
6288
  [
6270
- [T, $e],
6271
- (r, [e, t]) => tn(e.evaluate(r), t.evaluate(r))
6289
+ [M, Re],
6290
+ (r, [e, t]) => rn(e.evaluate(r), t.evaluate(r))
6272
6291
  ]
6273
6292
  ]
6274
6293
  },
6275
6294
  get: {
6276
- type: C,
6295
+ type: A,
6277
6296
  overloads: [
6278
6297
  [
6279
- [T],
6298
+ [M],
6280
6299
  (r, [e]) => Vt(e.evaluate(r), r.properties())
6281
6300
  ],
6282
6301
  [
6283
- [T, $e],
6302
+ [M, Re],
6284
6303
  (r, [e, t]) => Vt(e.evaluate(r), t.evaluate(r))
6285
6304
  ]
6286
6305
  ]
6287
6306
  },
6288
6307
  "feature-state": [
6289
- C,
6290
- [T],
6308
+ A,
6309
+ [M],
6291
6310
  (r, [e]) => Vt(e.evaluate(r), r.featureState || {})
6292
6311
  ],
6293
6312
  properties: [
6294
- $e,
6313
+ Re,
6295
6314
  [],
6296
6315
  (r) => r.properties()
6297
6316
  ],
6298
6317
  "geometry-type": [
6299
- T,
6318
+ M,
6300
6319
  [],
6301
6320
  (r) => r.geometryType()
6302
6321
  ],
6303
6322
  id: [
6304
- C,
6323
+ A,
6305
6324
  [],
6306
6325
  (r) => r.id()
6307
6326
  ],
@@ -6321,7 +6340,7 @@ re.register(wr, {
6321
6340
  (r) => r.globals.lineProgress || 0
6322
6341
  ],
6323
6342
  accumulated: [
6324
- C,
6343
+ A,
6325
6344
  [],
6326
6345
  (r) => r.globals.accumulated === void 0 ? null : r.globals.accumulated
6327
6346
  ],
@@ -6472,125 +6491,125 @@ re.register(wr, {
6472
6491
  (r, [e]) => Math.ceil(e.evaluate(r))
6473
6492
  ],
6474
6493
  "filter-==": [
6475
- L,
6476
- [T, C],
6494
+ C,
6495
+ [M, A],
6477
6496
  (r, [e, t]) => r.properties()[e.value] === t.value
6478
6497
  ],
6479
6498
  "filter-id-==": [
6480
- L,
6481
- [C],
6499
+ C,
6500
+ [A],
6482
6501
  (r, [e]) => r.id() === e.value
6483
6502
  ],
6484
6503
  "filter-type-==": [
6485
- L,
6486
- [T],
6504
+ C,
6505
+ [M],
6487
6506
  (r, [e]) => r.geometryDollarType() === e.value
6488
6507
  ],
6489
6508
  "filter-<": [
6490
- L,
6491
- [T, C],
6509
+ C,
6510
+ [M, A],
6492
6511
  (r, [e, t]) => {
6493
6512
  const n = r.properties()[e.value], a = t.value;
6494
6513
  return typeof n == typeof a && n < a;
6495
6514
  }
6496
6515
  ],
6497
6516
  "filter-id-<": [
6498
- L,
6499
- [C],
6517
+ C,
6518
+ [A],
6500
6519
  (r, [e]) => {
6501
6520
  const t = r.id(), n = e.value;
6502
6521
  return typeof t == typeof n && t < n;
6503
6522
  }
6504
6523
  ],
6505
6524
  "filter->": [
6506
- L,
6507
- [T, C],
6525
+ C,
6526
+ [M, A],
6508
6527
  (r, [e, t]) => {
6509
6528
  const n = r.properties()[e.value], a = t.value;
6510
6529
  return typeof n == typeof a && n > a;
6511
6530
  }
6512
6531
  ],
6513
6532
  "filter-id->": [
6514
- L,
6515
- [C],
6533
+ C,
6534
+ [A],
6516
6535
  (r, [e]) => {
6517
6536
  const t = r.id(), n = e.value;
6518
6537
  return typeof t == typeof n && t > n;
6519
6538
  }
6520
6539
  ],
6521
6540
  "filter-<=": [
6522
- L,
6523
- [T, C],
6541
+ C,
6542
+ [M, A],
6524
6543
  (r, [e, t]) => {
6525
6544
  const n = r.properties()[e.value], a = t.value;
6526
6545
  return typeof n == typeof a && n <= a;
6527
6546
  }
6528
6547
  ],
6529
6548
  "filter-id-<=": [
6530
- L,
6531
- [C],
6549
+ C,
6550
+ [A],
6532
6551
  (r, [e]) => {
6533
6552
  const t = r.id(), n = e.value;
6534
6553
  return typeof t == typeof n && t <= n;
6535
6554
  }
6536
6555
  ],
6537
6556
  "filter->=": [
6538
- L,
6539
- [T, C],
6557
+ C,
6558
+ [M, A],
6540
6559
  (r, [e, t]) => {
6541
6560
  const n = r.properties()[e.value], a = t.value;
6542
6561
  return typeof n == typeof a && n >= a;
6543
6562
  }
6544
6563
  ],
6545
6564
  "filter-id->=": [
6546
- L,
6547
- [C],
6565
+ C,
6566
+ [A],
6548
6567
  (r, [e]) => {
6549
6568
  const t = r.id(), n = e.value;
6550
6569
  return typeof t == typeof n && t >= n;
6551
6570
  }
6552
6571
  ],
6553
6572
  "filter-has": [
6554
- L,
6555
- [C],
6573
+ C,
6574
+ [A],
6556
6575
  (r, [e]) => e.value in r.properties()
6557
6576
  ],
6558
6577
  "filter-has-id": [
6559
- L,
6578
+ C,
6560
6579
  [],
6561
6580
  (r) => r.id() !== null && r.id() !== void 0
6562
6581
  ],
6563
6582
  "filter-type-in": [
6564
- L,
6565
- [W(T)],
6583
+ C,
6584
+ [W(M)],
6566
6585
  (r, [e]) => e.value.indexOf(r.geometryDollarType()) >= 0
6567
6586
  ],
6568
6587
  "filter-id-in": [
6569
- L,
6570
- [W(C)],
6588
+ C,
6589
+ [W(A)],
6571
6590
  (r, [e]) => e.value.indexOf(r.id()) >= 0
6572
6591
  ],
6573
6592
  "filter-in-small": [
6574
- L,
6575
- [T, W(C)],
6593
+ C,
6594
+ [M, W(A)],
6576
6595
  // assumes v is an array literal
6577
6596
  (r, [e, t]) => t.value.indexOf(r.properties()[e.value]) >= 0
6578
6597
  ],
6579
6598
  "filter-in-large": [
6580
- L,
6581
- [T, W(C)],
6599
+ C,
6600
+ [M, W(A)],
6582
6601
  // assumes v is a array literal with values sorted in ascending order and of a single type
6583
6602
  (r, [e, t]) => vs(r.properties()[e.value], t.value, 0, t.value.length - 1)
6584
6603
  ],
6585
6604
  all: {
6586
- type: L,
6605
+ type: C,
6587
6606
  overloads: [
6588
6607
  [
6589
- [L, L],
6608
+ [C, C],
6590
6609
  (r, [e, t]) => e.evaluate(r) && t.evaluate(r)
6591
6610
  ],
6592
6611
  [
6593
- xe(L),
6612
+ xe(C),
6594
6613
  (r, e) => {
6595
6614
  for (const t of e)
6596
6615
  if (!t.evaluate(r))
@@ -6601,14 +6620,14 @@ re.register(wr, {
6601
6620
  ]
6602
6621
  },
6603
6622
  any: {
6604
- type: L,
6623
+ type: C,
6605
6624
  overloads: [
6606
6625
  [
6607
- [L, L],
6626
+ [C, C],
6608
6627
  (r, [e, t]) => e.evaluate(r) || t.evaluate(r)
6609
6628
  ],
6610
6629
  [
6611
- xe(L),
6630
+ xe(C),
6612
6631
  (r, e) => {
6613
6632
  for (const t of e)
6614
6633
  if (t.evaluate(r))
@@ -6619,13 +6638,13 @@ re.register(wr, {
6619
6638
  ]
6620
6639
  },
6621
6640
  "!": [
6622
- L,
6623
- [L],
6641
+ C,
6642
+ [C],
6624
6643
  (r, [e]) => !e.evaluate(r)
6625
6644
  ],
6626
6645
  "is-supported-script": [
6627
- L,
6628
- [T],
6646
+ C,
6647
+ [M],
6629
6648
  // At parse time this will always return true, so we need to exclude this expression with isGlobalPropertyConstant
6630
6649
  (r, [e]) => {
6631
6650
  const t = r.globals && r.globals.isSupportedScript;
@@ -6633,22 +6652,22 @@ re.register(wr, {
6633
6652
  }
6634
6653
  ],
6635
6654
  upcase: [
6636
- T,
6637
- [T],
6655
+ M,
6656
+ [M],
6638
6657
  (r, [e]) => e.evaluate(r).toUpperCase()
6639
6658
  ],
6640
6659
  downcase: [
6641
- T,
6642
- [T],
6660
+ M,
6661
+ [M],
6643
6662
  (r, [e]) => e.evaluate(r).toLowerCase()
6644
6663
  ],
6645
6664
  concat: [
6646
- T,
6647
- xe(C),
6648
- (r, e) => e.map((t) => Be(t.evaluate(r))).join("")
6665
+ M,
6666
+ xe(A),
6667
+ (r, e) => e.map((t) => Ue(t.evaluate(r))).join("")
6649
6668
  ],
6650
6669
  "resolved-locale": [
6651
- T,
6670
+ M,
6652
6671
  [bt],
6653
6672
  (r, [e]) => e.evaluate(r).resolvedLocale()
6654
6673
  ]
@@ -6712,7 +6731,7 @@ function Et(r, e) {
6712
6731
  function tr(r) {
6713
6732
  return { result: "success", value: r };
6714
6733
  }
6715
- function _e(r) {
6734
+ function Pe(r) {
6716
6735
  return { result: "error", value: r };
6717
6736
  }
6718
6737
  function mt(r) {
@@ -6721,18 +6740,18 @@ function mt(r) {
6721
6740
  function Bn(r) {
6722
6741
  return !!r.expression && r.expression.parameters.indexOf("zoom") > -1;
6723
6742
  }
6724
- function Un(r) {
6743
+ function Vn(r) {
6725
6744
  return !!r.expression && r.expression.interpolated;
6726
6745
  }
6727
6746
  function z(r) {
6728
6747
  return r instanceof Number ? "number" : r instanceof String ? "string" : r instanceof Boolean ? "boolean" : Array.isArray(r) ? "array" : r === null ? "null" : typeof r;
6729
6748
  }
6730
- function Sr(r) {
6749
+ function xr(r) {
6731
6750
  return typeof r == "object" && r !== null && !Array.isArray(r);
6732
6751
  }
6733
6752
  class ws {
6734
6753
  constructor(e, t) {
6735
- this.expression = e, this._warningHistory = {}, this._evaluator = new _n(), this._defaultValue = t ? ks(t) : null, this._enumValues = t && t.type === "enum" ? t.values : null;
6754
+ this.expression = e, this._warningHistory = {}, this._evaluator = new Rn(), this._defaultValue = t ? ks(t) : null, this._enumValues = t && t.type === "enum" ? t.values : null;
6736
6755
  }
6737
6756
  evaluateWithoutErrorHandling(e, t, n, a, o, i) {
6738
6757
  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);
@@ -6744,21 +6763,21 @@ class ws {
6744
6763
  if (s == null || typeof s == "number" && s !== s)
6745
6764
  return this._defaultValue;
6746
6765
  if (this._enumValues && !(s in this._enumValues))
6747
- throw new O(`Expected value to be one of ${Object.keys(this._enumValues).map((l) => JSON.stringify(l)).join(", ")}, but found ${JSON.stringify(s)} instead.`);
6766
+ throw new D(`Expected value to be one of ${Object.keys(this._enumValues).map((l) => JSON.stringify(l)).join(", ")}, but found ${JSON.stringify(s)} instead.`);
6748
6767
  return s;
6749
6768
  } catch (s) {
6750
6769
  return this._warningHistory[s.message] || (this._warningHistory[s.message] = !0, typeof console < "u" && console.warn(s.message)), this._defaultValue;
6751
6770
  }
6752
6771
  }
6753
6772
  }
6754
- function Vn(r) {
6755
- return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in wr;
6773
+ function Gn(r) {
6774
+ return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in Sr;
6756
6775
  }
6757
- function Gn(r, e) {
6758
- const t = new kt(wr, yt, [], e ? xs(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
6759
- return n ? tr(new ws(n, e)) : _e(t.errors);
6776
+ function Hn(r, e) {
6777
+ const t = new kt(Sr, yt, [], e ? xs(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
6778
+ return n ? tr(new ws(n, e)) : Pe(t.errors);
6760
6779
  }
6761
- class rn {
6780
+ class nn {
6762
6781
  constructor(e, t) {
6763
6782
  this.kind = e, this._styleExpression = t, this.isStateDependent = e !== "constant" && !Ze(t.expression);
6764
6783
  }
@@ -6769,7 +6788,7 @@ class rn {
6769
6788
  return this._styleExpression.evaluate(e, t, n, a, o, i);
6770
6789
  }
6771
6790
  }
6772
- class nn {
6791
+ class an {
6773
6792
  constructor(e, t, n, a) {
6774
6793
  this.kind = e, this.zoomStops = n, this._styleExpression = t, this.isStateDependent = e !== "camera" && !Ze(t.expression), this.interpolationType = a;
6775
6794
  }
@@ -6784,26 +6803,26 @@ class nn {
6784
6803
  }
6785
6804
  }
6786
6805
  function Ss(r, e) {
6787
- const t = Gn(r, e);
6806
+ const t = Hn(r, e);
6788
6807
  if (t.result === "error")
6789
6808
  return t;
6790
6809
  const n = t.value.expression, a = It(n);
6791
6810
  if (!a && !mt(e))
6792
- return _e([new oe("", "data expressions not supported")]);
6811
+ return Pe([new oe("", "data expressions not supported")]);
6793
6812
  const o = Et(n, ["zoom"]);
6794
6813
  if (!o && !Bn(e))
6795
- return _e([new oe("", "zoom expressions not supported")]);
6814
+ return Pe([new oe("", "zoom expressions not supported")]);
6796
6815
  const i = it(n);
6797
6816
  if (!i && !o)
6798
- return _e([new oe("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);
6817
+ return Pe([new oe("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);
6799
6818
  if (i instanceof oe)
6800
- return _e([i]);
6801
- if (i instanceof se && !Un(e))
6802
- return _e([new oe("", '"interpolate" expressions cannot be used with this property')]);
6819
+ return Pe([i]);
6820
+ if (i instanceof se && !Vn(e))
6821
+ return Pe([new oe("", '"interpolate" expressions cannot be used with this property')]);
6803
6822
  if (!i)
6804
- return tr(a ? new rn("constant", t.value) : new rn("source", t.value));
6823
+ return tr(a ? new nn("constant", t.value) : new nn("source", t.value));
6805
6824
  const s = i instanceof se ? i.interpolation : void 0;
6806
- return tr(a ? new nn("camera", t.value, i.labels, s) : new nn("composite", t.value, i.labels, s));
6825
+ return tr(a ? new an("camera", t.value, i.labels, s) : new an("composite", t.value, i.labels, s));
6807
6826
  }
6808
6827
  function it(r) {
6809
6828
  let e = null;
@@ -6822,22 +6841,22 @@ function it(r) {
6822
6841
  function xs(r) {
6823
6842
  const e = {
6824
6843
  color: ie,
6825
- string: T,
6844
+ string: M,
6826
6845
  number: g,
6827
- enum: T,
6828
- boolean: L,
6846
+ enum: M,
6847
+ boolean: C,
6829
6848
  formatted: wt,
6830
6849
  padding: St,
6831
6850
  projectionDefinition: vt,
6832
6851
  resolvedImage: Xe,
6833
6852
  variableAnchorOffsetCollection: xt
6834
6853
  };
6835
- return r.type === "array" ? W(e[r.value] || C, r.length) : e[r.type];
6854
+ return r.type === "array" ? W(e[r.value] || A, r.length) : e[r.type];
6836
6855
  }
6837
6856
  function ks(r) {
6838
- return r.type === "color" && Sr(r.default) ? new R(0, 0, 0, 0) : r.type === "color" ? R.parse(r.default) || null : r.type === "padding" ? J.parse(r.default) || null : r.type === "variableAnchorOffsetCollection" ? ne.parse(r.default) || null : r.type === "projectionDefinition" ? ee.parse(r.default) || null : r.default === void 0 ? null : r.default;
6857
+ return r.type === "color" && xr(r.default) ? new $(0, 0, 0, 0) : r.type === "color" ? $.parse(r.default) || null : r.type === "padding" ? J.parse(r.default) || null : r.type === "variableAnchorOffsetCollection" ? ne.parse(r.default) || null : r.type === "projectionDefinition" ? ee.parse(r.default) || null : r.default === void 0 ? null : r.default;
6839
6858
  }
6840
- function Hn(r) {
6859
+ function Kn(r) {
6841
6860
  if (r === !0 || r === !1)
6842
6861
  return !0;
6843
6862
  if (!Array.isArray(r) || r.length === 0)
@@ -6861,18 +6880,18 @@ function Hn(r) {
6861
6880
  case "any":
6862
6881
  case "all":
6863
6882
  for (const e of r.slice(1))
6864
- if (!Hn(e) && typeof e != "boolean")
6883
+ if (!Kn(e) && typeof e != "boolean")
6865
6884
  return !1;
6866
6885
  return !0;
6867
6886
  default:
6868
6887
  return !0;
6869
6888
  }
6870
6889
  }
6871
- function Kn(r) {
6890
+ function Wn(r) {
6872
6891
  const e = r.key, t = r.value;
6873
6892
  return t ? [new h(e, t, "constants have been deprecated as of v8")] : [];
6874
6893
  }
6875
- function F(r) {
6894
+ function O(r) {
6876
6895
  return r instanceof Number || r instanceof String || r instanceof Boolean ? r.valueOf() : r;
6877
6896
  }
6878
6897
  function Ie(r) {
@@ -6884,7 +6903,7 @@ function Ie(r) {
6884
6903
  e[t] = Ie(r[t]);
6885
6904
  return e;
6886
6905
  }
6887
- return F(r);
6906
+ return O(r);
6888
6907
  }
6889
6908
  function Y(r) {
6890
6909
  const e = r.key, t = r.value, n = r.valueSpec || {}, a = r.objectElementValidators || {}, o = r.style, i = r.styleSpec, s = r.validateSpec;
@@ -6922,7 +6941,7 @@ function Y(r) {
6922
6941
  a[c] || n[c].required && n[c].default === void 0 && t[c] === void 0 && l.push(new h(e, t, `missing required property "${c}"`));
6923
6942
  return l;
6924
6943
  }
6925
- function xr(r) {
6944
+ function kr(r) {
6926
6945
  const e = r.value, t = r.valueSpec, n = r.validateSpec, a = r.style, o = r.styleSpec, i = r.key, s = r.arrayElementValidator || n;
6927
6946
  if (z(e) !== "array")
6928
6947
  return [new h(i, e, `array expected, ${z(e)} found`)];
@@ -6949,13 +6968,13 @@ function xr(r) {
6949
6968
  }));
6950
6969
  return u;
6951
6970
  }
6952
- function kr(r) {
6971
+ function Lr(r) {
6953
6972
  const e = r.key, t = r.value, n = r.valueSpec;
6954
6973
  let a = z(t);
6955
6974
  return a === "number" && t !== t && (a = "NaN"), a !== "number" ? [new h(e, t, `number expected, ${a} found`)] : "minimum" in n && t < n.minimum ? [new h(e, t, `${t} is less than the minimum value ${n.minimum}`)] : "maximum" in n && t > n.maximum ? [new h(e, t, `${t} is greater than the maximum value ${n.maximum}`)] : [];
6956
6975
  }
6957
- function Wn(r) {
6958
- const e = r.valueSpec, t = F(r.value.type);
6976
+ function Zn(r) {
6977
+ const e = r.valueSpec, t = O(r.value.type);
6959
6978
  let n, a = {}, o, i;
6960
6979
  const s = t !== "categorical" && r.value.property === void 0, l = !s, u = z(r.value.stops) === "array" && z(r.value.stops[0]) === "array" && z(r.value.stops[0][0]) === "object", c = Y({
6961
6980
  key: r.key,
@@ -6969,13 +6988,13 @@ function Wn(r) {
6969
6988
  default: d
6970
6989
  }
6971
6990
  });
6972
- return t === "identity" && s && c.push(new h(r.key, r.value, 'missing required property "property"')), t !== "identity" && !r.value.stops && c.push(new h(r.key, r.value, 'missing required property "stops"')), t === "exponential" && r.valueSpec.expression && !Un(r.valueSpec) && c.push(new h(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (l && !mt(r.valueSpec) ? c.push(new h(r.key, r.value, "property functions not supported")) : s && !Bn(r.valueSpec) && c.push(new h(r.key, r.value, "zoom functions not supported"))), (t === "categorical" || u) && r.value.property === void 0 && c.push(new h(r.key, r.value, '"property" property is required')), c;
6991
+ return t === "identity" && s && c.push(new h(r.key, r.value, 'missing required property "property"')), t !== "identity" && !r.value.stops && c.push(new h(r.key, r.value, 'missing required property "stops"')), t === "exponential" && r.valueSpec.expression && !Vn(r.valueSpec) && c.push(new h(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (l && !mt(r.valueSpec) ? c.push(new h(r.key, r.value, "property functions not supported")) : s && !Bn(r.valueSpec) && c.push(new h(r.key, r.value, "zoom functions not supported"))), (t === "categorical" || u) && r.value.property === void 0 && c.push(new h(r.key, r.value, '"property" property is required')), c;
6973
6992
  function p(y) {
6974
6993
  if (t === "identity")
6975
6994
  return [new h(y.key, y.value, 'identity function may not have a "stops" property')];
6976
6995
  let v = [];
6977
6996
  const w = y.value;
6978
- return v = v.concat(xr({
6997
+ return v = v.concat(kr({
6979
6998
  key: y.key,
6980
6999
  value: w,
6981
7000
  valueSpec: y.valueSpec,
@@ -6999,16 +7018,16 @@ function Wn(r) {
6999
7018
  return [new h(b, w, "object stop key must have zoom")];
7000
7019
  if (w[0].value === void 0)
7001
7020
  return [new h(b, w, "object stop key must have value")];
7002
- if (i && i > F(w[0].zoom))
7021
+ if (i && i > O(w[0].zoom))
7003
7022
  return [new h(b, w[0].zoom, "stop zoom values must appear in ascending order")];
7004
- F(w[0].zoom) !== i && (i = F(w[0].zoom), o = void 0, a = {}), v = v.concat(Y({
7023
+ O(w[0].zoom) !== i && (i = O(w[0].zoom), o = void 0, a = {}), v = v.concat(Y({
7005
7024
  key: `${b}[0]`,
7006
7025
  value: w[0],
7007
7026
  valueSpec: { zoom: {} },
7008
7027
  validateSpec: y.validateSpec,
7009
7028
  style: y.style,
7010
7029
  styleSpec: y.styleSpec,
7011
- objectElementValidators: { zoom: kr, value: f }
7030
+ objectElementValidators: { zoom: Lr, value: f }
7012
7031
  }));
7013
7032
  } else
7014
7033
  v = v.concat(f({
@@ -7019,7 +7038,7 @@ function Wn(r) {
7019
7038
  style: y.style,
7020
7039
  styleSpec: y.styleSpec
7021
7040
  }, w));
7022
- return Vn(Ie(w[1])) ? v.concat([new h(`${b}[1]`, w[1], "expressions are not allowed in function stops.")]) : v.concat(y.validateSpec({
7041
+ return Gn(Ie(w[1])) ? v.concat([new h(`${b}[1]`, w[1], "expressions are not allowed in function stops.")]) : v.concat(y.validateSpec({
7023
7042
  key: `${b}[1]`,
7024
7043
  value: w[1],
7025
7044
  valueSpec: e,
@@ -7029,18 +7048,18 @@ function Wn(r) {
7029
7048
  }));
7030
7049
  }
7031
7050
  function f(y, v) {
7032
- const w = z(y.value), b = F(y.value), A = y.value !== null ? y.value : v;
7051
+ const w = z(y.value), b = O(y.value), T = y.value !== null ? y.value : v;
7033
7052
  if (!n)
7034
7053
  n = w;
7035
7054
  else if (w !== n)
7036
- return [new h(y.key, A, `${w} stop domain type must match previous stop domain type ${n}`)];
7055
+ return [new h(y.key, T, `${w} stop domain type must match previous stop domain type ${n}`)];
7037
7056
  if (w !== "number" && w !== "string" && w !== "boolean")
7038
- return [new h(y.key, A, "stop domain value must be a number, string, or boolean")];
7057
+ return [new h(y.key, T, "stop domain value must be a number, string, or boolean")];
7039
7058
  if (w !== "number" && t !== "categorical") {
7040
7059
  let j = `number expected, ${w} found`;
7041
- return mt(e) && t === void 0 && (j += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new h(y.key, A, j)];
7060
+ return mt(e) && t === void 0 && (j += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new h(y.key, T, j)];
7042
7061
  }
7043
- return t === "categorical" && w === "number" && (!isFinite(b) || Math.floor(b) !== b) ? [new h(y.key, A, `integer expected, found ${b}`)] : t !== "categorical" && w === "number" && o !== void 0 && b < o ? [new h(y.key, A, "stop domain values must appear in ascending order")] : (o = b, t === "categorical" && b in a ? [new h(y.key, A, "stop domain values must be unique")] : (a[b] = !0, []));
7062
+ return t === "categorical" && w === "number" && (!isFinite(b) || Math.floor(b) !== b) ? [new h(y.key, T, `integer expected, found ${b}`)] : t !== "categorical" && w === "number" && o !== void 0 && b < o ? [new h(y.key, T, "stop domain values must appear in ascending order")] : (o = b, t === "categorical" && b in a ? [new h(y.key, T, "stop domain values must be unique")] : (a[b] = !0, []));
7044
7063
  }
7045
7064
  function d(y) {
7046
7065
  return y.validateSpec({
@@ -7054,7 +7073,7 @@ function Wn(r) {
7054
7073
  }
7055
7074
  }
7056
7075
  function Ne(r) {
7057
- const e = (r.expressionContext === "property" ? Ss : Gn)(Ie(r.value), r.valueSpec);
7076
+ const e = (r.expressionContext === "property" ? Ss : Hn)(Ie(r.value), r.valueSpec);
7058
7077
  if (e.result === "error")
7059
7078
  return e.value.map((n) => new h(`${r.key}${n.key}`, r.value, n.message));
7060
7079
  const t = e.value.expression || e.value._styleExpression.expression;
@@ -7078,19 +7097,19 @@ function Ls(r) {
7078
7097
  }
7079
7098
  function Cs(r) {
7080
7099
  const e = r.key, t = r.value, n = z(t);
7081
- return n !== "string" ? [new h(e, t, `color expected, ${n} found`)] : R.parse(String(t)) ? [] : [new h(e, t, `color expected, "${t}" found`)];
7100
+ return n !== "string" ? [new h(e, t, `color expected, ${n} found`)] : $.parse(String(t)) ? [] : [new h(e, t, `color expected, "${t}" found`)];
7082
7101
  }
7083
7102
  function Je(r) {
7084
7103
  const e = r.key, t = r.value, n = r.valueSpec, a = [];
7085
- return Array.isArray(n.values) ? n.values.indexOf(F(t)) === -1 && a.push(new h(e, t, `expected one of [${n.values.join(", ")}], ${JSON.stringify(t)} found`)) : Object.keys(n.values).indexOf(F(t)) === -1 && a.push(new h(e, t, `expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(t)} found`)), a;
7104
+ return Array.isArray(n.values) ? n.values.indexOf(O(t)) === -1 && a.push(new h(e, t, `expected one of [${n.values.join(", ")}], ${JSON.stringify(t)} found`)) : Object.keys(n.values).indexOf(O(t)) === -1 && a.push(new h(e, t, `expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(t)} found`)), a;
7086
7105
  }
7087
- function Lr(r) {
7088
- return Hn(Ie(r.value)) ? Ne(lt({}, r, {
7106
+ function Cr(r) {
7107
+ return Kn(Ie(r.value)) ? Ne(lt({}, r, {
7089
7108
  expressionContext: "filter",
7090
7109
  valueSpec: { value: "boolean" }
7091
- })) : Zn(r);
7110
+ })) : Jn(r);
7092
7111
  }
7093
- function Zn(r) {
7112
+ function Jn(r) {
7094
7113
  const e = r.value, t = r.key;
7095
7114
  if (z(e) !== "array")
7096
7115
  return [new h(t, e, `array expected, ${z(e)} found`)];
@@ -7104,12 +7123,12 @@ function Zn(r) {
7104
7123
  valueSpec: n.filter_operator,
7105
7124
  style: r.style,
7106
7125
  styleSpec: r.styleSpec
7107
- })), F(e[0])) {
7126
+ })), O(e[0])) {
7108
7127
  case "<":
7109
7128
  case "<=":
7110
7129
  case ">":
7111
7130
  case ">=":
7112
- e.length >= 2 && F(e[1]) === "$type" && o.push(new h(t, e, `"$type" cannot be use with operator "${e[0]}"`));
7131
+ e.length >= 2 && O(e[1]) === "$type" && o.push(new h(t, e, `"$type" cannot be use with operator "${e[0]}"`));
7113
7132
  case "==":
7114
7133
  case "!=":
7115
7134
  e.length !== 3 && o.push(new h(t, e, `filter array for operator "${e[0]}" must have 3 elements`));
@@ -7117,7 +7136,7 @@ function Zn(r) {
7117
7136
  case "!in":
7118
7137
  e.length >= 2 && (a = z(e[1]), a !== "string" && o.push(new h(`${t}[1]`, e[1], `string expected, ${a} found`)));
7119
7138
  for (let i = 2; i < e.length; i++)
7120
- a = z(e[i]), F(e[1]) === "$type" ? o = o.concat(Je({
7139
+ a = z(e[i]), O(e[1]) === "$type" ? o = o.concat(Je({
7121
7140
  key: `${t}[${i}]`,
7122
7141
  value: e[i],
7123
7142
  valueSpec: n.geometry_type,
@@ -7129,7 +7148,7 @@ function Zn(r) {
7129
7148
  case "all":
7130
7149
  case "none":
7131
7150
  for (let i = 1; i < e.length; i++)
7132
- o = o.concat(Zn({
7151
+ o = o.concat(Jn({
7133
7152
  key: `${t}[${i}]`,
7134
7153
  value: e[i],
7135
7154
  style: r.style,
@@ -7143,7 +7162,7 @@ function Zn(r) {
7143
7162
  }
7144
7163
  return o;
7145
7164
  }
7146
- function Jn(r, e) {
7165
+ function Yn(r, e) {
7147
7166
  const t = r.key, n = r.validateSpec, a = r.style, o = r.styleSpec, i = r.value, s = r.objectKey, l = o[`${e}_${r.layerType}`];
7148
7167
  if (!l)
7149
7168
  return [];
@@ -7164,7 +7183,7 @@ function Jn(r, e) {
7164
7183
  return [new h(t, i, `"${s}" does not support interpolation syntax
7165
7184
  Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(p[1])} }\`.`)];
7166
7185
  const m = [];
7167
- return r.layerType === "symbol" && (s === "text-field" && a && !a.glyphs && m.push(new h(t, i, 'use of "text-field" requires a style "glyphs" property')), s === "text-font" && Sr(Ie(i)) && F(i.type) === "identity" && m.push(new h(t, i, '"text-font" does not support identity functions'))), m.concat(n({
7186
+ return r.layerType === "symbol" && (s === "text-field" && a && !a.glyphs && m.push(new h(t, i, 'use of "text-field" requires a style "glyphs" property')), s === "text-font" && xr(Ie(i)) && O(i.type) === "identity" && m.push(new h(t, i, '"text-font" does not support identity functions'))), m.concat(n({
7168
7187
  key: r.key,
7169
7188
  value: i,
7170
7189
  valueSpec: c,
@@ -7175,23 +7194,23 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
7175
7194
  propertyKey: s
7176
7195
  }));
7177
7196
  }
7178
- function Yn(r) {
7179
- return Jn(r, "paint");
7180
- }
7181
7197
  function Xn(r) {
7182
- return Jn(r, "layout");
7198
+ return Yn(r, "paint");
7183
7199
  }
7184
7200
  function Qn(r) {
7201
+ return Yn(r, "layout");
7202
+ }
7203
+ function ea(r) {
7185
7204
  let e = [];
7186
7205
  const t = r.value, n = r.key, a = r.style, o = r.styleSpec;
7187
7206
  !t.type && !t.ref && e.push(new h(n, t, 'either "type" or "ref" is required'));
7188
- let i = F(t.type);
7189
- const s = F(t.ref);
7207
+ let i = O(t.type);
7208
+ const s = O(t.ref);
7190
7209
  if (t.id) {
7191
- const l = F(t.id);
7210
+ const l = O(t.id);
7192
7211
  for (let u = 0; u < r.arrayIndex; u++) {
7193
7212
  const c = a.layers[u];
7194
- F(c.id) === l && e.push(new h(n, t.id, `duplicate layer id "${t.id}", previously used at line ${c.id.__line__}`));
7213
+ O(c.id) === l && e.push(new h(n, t.id, `duplicate layer id "${t.id}", previously used at line ${c.id.__line__}`));
7195
7214
  }
7196
7215
  }
7197
7216
  if ("ref" in t) {
@@ -7200,13 +7219,13 @@ function Qn(r) {
7200
7219
  });
7201
7220
  let l;
7202
7221
  a.layers.forEach((u) => {
7203
- F(u.id) === s && (l = u);
7204
- }), l ? l.ref ? e.push(new h(n, t.ref, "ref cannot reference another ref layer")) : i = F(l.type) : e.push(new h(n, t.ref, `ref layer "${s}" not found`));
7222
+ O(u.id) === s && (l = u);
7223
+ }), l ? l.ref ? e.push(new h(n, t.ref, "ref cannot reference another ref layer")) : i = O(l.type) : e.push(new h(n, t.ref, `ref layer "${s}" not found`));
7205
7224
  } else if (i !== "background")
7206
7225
  if (!t.source)
7207
7226
  e.push(new h(n, t, 'missing required property "source"'));
7208
7227
  else {
7209
- const l = a.sources && a.sources[t.source], u = l && F(l.type);
7228
+ const l = a.sources && a.sources[t.source], u = l && O(l.type);
7210
7229
  l ? u === "vector" && i === "raster" ? e.push(new h(n, t.source, `layer "${t.id}" requires a raster source`)) : u !== "raster-dem" && i === "hillshade" ? e.push(new h(n, t.source, `layer "${t.id}" requires a raster-dem source`)) : u === "raster" && i !== "raster" ? e.push(new h(n, t.source, `layer "${t.id}" requires a vector source`)) : u === "vector" && !t["source-layer"] ? e.push(new h(n, t, `layer "${t.id}" must specify a "source-layer"`)) : u === "raster-dem" && i !== "hillshade" ? e.push(new h(n, t.source, "raster-dem source can only be used with layer type 'hillshade'.")) : i === "line" && t.paint && t.paint["line-gradient"] && (u !== "geojson" || !l.lineMetrics) && e.push(new h(n, t, `layer "${t.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)) : e.push(new h(n, t.source, `source "${t.source}" not found`));
7211
7230
  }
7212
7231
  return e = e.concat(Y({
@@ -7234,7 +7253,7 @@ function Qn(r) {
7234
7253
  objectKey: "type"
7235
7254
  });
7236
7255
  },
7237
- filter: Lr,
7256
+ filter: Cr,
7238
7257
  layout(l) {
7239
7258
  return Y({
7240
7259
  layer: t,
@@ -7245,7 +7264,7 @@ function Qn(r) {
7245
7264
  validateSpec: l.validateSpec,
7246
7265
  objectElementValidators: {
7247
7266
  "*"(u) {
7248
- return Xn(lt({ layerType: i }, u));
7267
+ return Qn(lt({ layerType: i }, u));
7249
7268
  }
7250
7269
  }
7251
7270
  });
@@ -7260,7 +7279,7 @@ function Qn(r) {
7260
7279
  validateSpec: l.validateSpec,
7261
7280
  objectElementValidators: {
7262
7281
  "*"(u) {
7263
- return Yn(lt({ layerType: i }, u));
7282
+ return Xn(lt({ layerType: i }, u));
7264
7283
  }
7265
7284
  }
7266
7285
  });
@@ -7281,7 +7300,7 @@ function As(r) {
7281
7300
  return s;
7282
7301
  if (l !== "object")
7283
7302
  return s.push(new h("source_raster_dem", n, `object expected, ${l} found`)), s;
7284
- const c = F(n.encoding) === "custom", p = ["redFactor", "greenFactor", "blueFactor", "baseShift"], m = r.value.encoding ? `"${r.value.encoding}"` : "Default";
7303
+ const c = O(n.encoding) === "custom", p = ["redFactor", "greenFactor", "blueFactor", "baseShift"], m = r.value.encoding ? `"${r.value.encoding}"` : "Default";
7285
7304
  for (const f in n)
7286
7305
  !c && p.includes(f) ? s.push(new h(f, n[f], `In "${t}": "${f}" is only valid when "encoding" is set to "custom". ${m} encoding found`)) : o[f] ? s = s.concat(r.validateSpec({
7287
7306
  key: f,
@@ -7293,14 +7312,14 @@ function As(r) {
7293
7312
  })) : s.push(new h(f, n[f], `unknown property "${f}"`));
7294
7313
  return s;
7295
7314
  }
7296
- const an = {
7315
+ const on = {
7297
7316
  promoteId: Ts
7298
7317
  };
7299
- function ea(r) {
7318
+ function ta(r) {
7300
7319
  const e = r.value, t = r.key, n = r.styleSpec, a = r.style, o = r.validateSpec;
7301
7320
  if (!e.type)
7302
7321
  return [new h(t, e, '"type" is required')];
7303
- const i = F(e.type);
7322
+ const i = O(e.type);
7304
7323
  let s;
7305
7324
  switch (i) {
7306
7325
  case "vector":
@@ -7311,7 +7330,7 @@ function ea(r) {
7311
7330
  valueSpec: n[`source_${i.replace("-", "_")}`],
7312
7331
  style: r.style,
7313
7332
  styleSpec: n,
7314
- objectElementValidators: an,
7333
+ objectElementValidators: on,
7315
7334
  validateSpec: o
7316
7335
  }), s;
7317
7336
  case "raster-dem":
@@ -7330,7 +7349,7 @@ function ea(r) {
7330
7349
  style: a,
7331
7350
  styleSpec: n,
7332
7351
  validateSpec: o,
7333
- objectElementValidators: an
7352
+ objectElementValidators: on
7334
7353
  }), e.cluster)
7335
7354
  for (const l in e.clusterProperties) {
7336
7355
  const [u, c] = e.clusterProperties[l], p = typeof u == "string" ? [u, ["accumulated"], ["get", l]] : u;
@@ -7388,7 +7407,7 @@ function Ts({ key: r, value: e }) {
7388
7407
  return t;
7389
7408
  }
7390
7409
  }
7391
- function ta(r) {
7410
+ function ra(r) {
7392
7411
  const e = r.value, t = r.styleSpec, n = t.light, a = r.style;
7393
7412
  let o = [];
7394
7413
  const i = z(e);
@@ -7416,7 +7435,7 @@ function ta(r) {
7416
7435
  }
7417
7436
  return o;
7418
7437
  }
7419
- function ra(r) {
7438
+ function na(r) {
7420
7439
  const e = r.value, t = r.styleSpec, n = t.sky, a = r.style, o = z(e);
7421
7440
  if (e === void 0)
7422
7441
  return [];
@@ -7433,7 +7452,7 @@ function ra(r) {
7433
7452
  })) : i = i.concat([new h(s, e[s], `unknown property "${s}"`)]);
7434
7453
  return i;
7435
7454
  }
7436
- function na(r) {
7455
+ function aa(r) {
7437
7456
  const e = r.value, t = r.styleSpec, n = t.terrain, a = r.style;
7438
7457
  let o = [];
7439
7458
  const i = z(e);
@@ -7476,7 +7495,7 @@ function Es(r) {
7476
7495
  }));
7477
7496
  return o;
7478
7497
  } else
7479
- return kr({
7498
+ return Lr({
7480
7499
  key: e,
7481
7500
  value: t,
7482
7501
  valueSpec: {}
@@ -7492,7 +7511,7 @@ function zs(r) {
7492
7511
  key: `${e}[${i}]`,
7493
7512
  value: t[i],
7494
7513
  valueSpec: a.layout_symbol["text-anchor"]
7495
- })), o = o.concat(xr({
7514
+ })), o = o.concat(kr({
7496
7515
  key: `${e}[${i + 1}]`,
7497
7516
  value: t[i + 1],
7498
7517
  valueSpec: {
@@ -7505,7 +7524,7 @@ function zs(r) {
7505
7524
  }));
7506
7525
  return o;
7507
7526
  }
7508
- function aa(r) {
7527
+ function oa(r) {
7509
7528
  let e = [];
7510
7529
  const t = r.value, n = r.key;
7511
7530
  if (Array.isArray(t)) {
@@ -7536,7 +7555,7 @@ function aa(r) {
7536
7555
  value: t
7537
7556
  });
7538
7557
  }
7539
- function Ps(r) {
7558
+ function _s(r) {
7540
7559
  const e = r.value, t = r.styleSpec, n = t.projection, a = r.style, o = z(e);
7541
7560
  if (e === void 0)
7542
7561
  return [];
@@ -7553,109 +7572,109 @@ function Ps(r) {
7553
7572
  })) : i = i.concat([new h(s, e[s], `unknown property "${s}"`)]);
7554
7573
  return i;
7555
7574
  }
7556
- function _s(r) {
7575
+ function Ps(r) {
7557
7576
  const e = r.key;
7558
7577
  let t = r.value;
7559
7578
  t = t instanceof String ? t.valueOf() : t;
7560
7579
  const n = z(t);
7561
- return n === "array" && !Rs(t) && !$s(t) ? [new h(e, t, `projection expected, invalid array ${JSON.stringify(t)} found`)] : ["array", "string"].includes(n) ? [] : [new h(e, t, `projection expected, invalid type "${n}" found`)];
7580
+ return n === "array" && !$s(t) && !Rs(t) ? [new h(e, t, `projection expected, invalid array ${JSON.stringify(t)} found`)] : ["array", "string"].includes(n) ? [] : [new h(e, t, `projection expected, invalid type "${n}" found`)];
7562
7581
  }
7563
- function $s(r) {
7582
+ function Rs(r) {
7564
7583
  return !!["interpolate", "step", "literal"].includes(r[0]);
7565
7584
  }
7566
- function Rs(r) {
7585
+ function $s(r) {
7567
7586
  return Array.isArray(r) && r.length === 3 && typeof r[0] == "string" && typeof r[1] == "string" && typeof r[2] == "number";
7568
7587
  }
7569
- const on = {
7588
+ const sn = {
7570
7589
  "*"() {
7571
7590
  return [];
7572
7591
  },
7573
- array: xr,
7592
+ array: kr,
7574
7593
  boolean: Ls,
7575
- number: kr,
7594
+ number: Lr,
7576
7595
  color: Cs,
7577
- constants: Kn,
7596
+ constants: Wn,
7578
7597
  enum: Je,
7579
- filter: Lr,
7580
- function: Wn,
7581
- layer: Qn,
7598
+ filter: Cr,
7599
+ function: Zn,
7600
+ layer: ea,
7582
7601
  object: Y,
7583
- source: ea,
7584
- light: ta,
7585
- sky: ra,
7586
- terrain: na,
7587
- projection: Ps,
7588
- projectionDefinition: _s,
7602
+ source: ta,
7603
+ light: ra,
7604
+ sky: na,
7605
+ terrain: aa,
7606
+ projection: _s,
7607
+ projectionDefinition: Ps,
7589
7608
  string: Ee,
7590
7609
  formatted: Ms,
7591
7610
  resolvedImage: Is,
7592
7611
  padding: Es,
7593
7612
  variableAnchorOffsetCollection: zs,
7594
- sprite: aa
7613
+ sprite: oa
7595
7614
  };
7596
- function Ue(r) {
7615
+ function Be(r) {
7597
7616
  const e = r.value, t = r.valueSpec, n = r.styleSpec;
7598
- return r.validateSpec = Ue, t.expression && Sr(F(e)) ? Wn(r) : t.expression && Vn(Ie(e)) ? Ne(r) : t.type && on[t.type] ? on[t.type](r) : Y(lt({}, r, {
7617
+ return r.validateSpec = Be, t.expression && xr(O(e)) ? Zn(r) : t.expression && Gn(Ie(e)) ? Ne(r) : t.type && sn[t.type] ? sn[t.type](r) : Y(lt({}, r, {
7599
7618
  valueSpec: t.type ? n[t.type] : t
7600
7619
  }));
7601
7620
  }
7602
- function oa(r) {
7621
+ function ia(r) {
7603
7622
  const e = r.value, t = r.key, n = Ee(r);
7604
7623
  return n.length || (e.indexOf("{fontstack}") === -1 && n.push(new h(t, e, '"glyphs" url must include a "{fontstack}" token')), e.indexOf("{range}") === -1 && n.push(new h(t, e, '"glyphs" url must include a "{range}" token'))), n;
7605
7624
  }
7606
7625
  function X(r, e = di) {
7607
7626
  let t = [];
7608
- return t = t.concat(Ue({
7627
+ return t = t.concat(Be({
7609
7628
  key: "",
7610
7629
  value: r,
7611
7630
  valueSpec: e.$root,
7612
7631
  styleSpec: e,
7613
7632
  style: r,
7614
- validateSpec: Ue,
7633
+ validateSpec: Be,
7615
7634
  objectElementValidators: {
7616
- glyphs: oa,
7635
+ glyphs: ia,
7617
7636
  "*"() {
7618
7637
  return [];
7619
7638
  }
7620
7639
  }
7621
- })), r.constants && (t = t.concat(Kn({
7640
+ })), r.constants && (t = t.concat(Wn({
7622
7641
  key: "constants",
7623
7642
  value: r.constants,
7624
7643
  style: r,
7625
7644
  styleSpec: e,
7626
- validateSpec: Ue
7627
- }))), ia(t);
7628
- }
7629
- X.source = ce(ue(ea));
7630
- X.sprite = ce(ue(aa));
7631
- X.glyphs = ce(ue(oa));
7632
- X.light = ce(ue(ta));
7633
- X.sky = ce(ue(ra));
7634
- X.terrain = ce(ue(na));
7635
- X.layer = ce(ue(Qn));
7636
- X.filter = ce(ue(Lr));
7637
- X.paintProperty = ce(ue(Yn));
7638
- X.layoutProperty = ce(ue(Xn));
7645
+ validateSpec: Be
7646
+ }))), sa(t);
7647
+ }
7648
+ X.source = ce(ue(ta));
7649
+ X.sprite = ce(ue(oa));
7650
+ X.glyphs = ce(ue(ia));
7651
+ X.light = ce(ue(ra));
7652
+ X.sky = ce(ue(na));
7653
+ X.terrain = ce(ue(aa));
7654
+ X.layer = ce(ue(ea));
7655
+ X.filter = ce(ue(Cr));
7656
+ X.paintProperty = ce(ue(Xn));
7657
+ X.layoutProperty = ce(ue(Qn));
7639
7658
  function ue(r) {
7640
7659
  return function(e) {
7641
7660
  return r({
7642
7661
  ...e,
7643
- validateSpec: Ue
7662
+ validateSpec: Be
7644
7663
  });
7645
7664
  };
7646
7665
  }
7647
- function ia(r) {
7666
+ function sa(r) {
7648
7667
  return [].concat(r).sort((e, t) => e.line - t.line);
7649
7668
  }
7650
7669
  function ce(r) {
7651
7670
  return function(...e) {
7652
- return ia(r.apply(this, e));
7671
+ return sa(r.apply(this, e));
7653
7672
  };
7654
7673
  }
7655
- function sn(r) {
7674
+ function ln(r) {
7656
7675
  if (!r)
7657
7676
  return {
7658
- style: qe[Rt[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7677
+ style: qe[$t[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7659
7678
  requiresUrlMonitoring: !1,
7660
7679
  // default styles don't require URL monitoring
7661
7680
  isFallback: !0
@@ -7667,13 +7686,13 @@ function sn(r) {
7667
7686
  requiresUrlMonitoring: !1,
7668
7687
  isFallback: !1
7669
7688
  } : t.isValidJSON ? {
7670
- style: qe[Rt[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7689
+ style: qe[$t[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7671
7690
  requiresUrlMonitoring: !1,
7672
7691
  // default styles don't require URL monitoring
7673
7692
  isFallback: !0
7674
- } : r.startsWith("http") ? { style: r, requiresUrlMonitoring: !0, isFallback: !1 } : r.toLowerCase().includes(".json") ? { style: js(r), requiresUrlMonitoring: !0, isFallback: !1 } : { style: za(r), requiresUrlMonitoring: !0, isFallback: !1 };
7693
+ } : r.startsWith("http") ? { style: r, requiresUrlMonitoring: !0, isFallback: !1 } : r.toLowerCase().includes(".json") ? { style: js(r), requiresUrlMonitoring: !0, isFallback: !1 } : { style: _a(r), requiresUrlMonitoring: !0, isFallback: !1 };
7675
7694
  }
7676
- return r instanceof Pa ? { style: r.getExpandedStyleURL(), requiresUrlMonitoring: !1, isFallback: !1 } : r instanceof _a ? {
7695
+ return r instanceof Pa ? { style: r.getExpandedStyleURL(), requiresUrlMonitoring: !1, isFallback: !1 } : r instanceof Ra ? {
7677
7696
  style: r.getDefaultVariant().getExpandedStyleURL(),
7678
7697
  requiresUrlMonitoring: !1,
7679
7698
  isFallback: !1
@@ -7682,7 +7701,7 @@ function sn(r) {
7682
7701
  requiresUrlMonitoring: !1,
7683
7702
  isFallback: !1
7684
7703
  } : {
7685
- style: qe[Rt[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7704
+ style: qe[$t[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7686
7705
  requiresUrlMonitoring: !1,
7687
7706
  // default styles don't require URL monitoring
7688
7707
  isFallback: !0
@@ -7713,16 +7732,16 @@ function Ns(r) {
7713
7732
  }
7714
7733
  class Fs {
7715
7734
  constructor() {
7716
- M(this, "_map");
7717
- M(this, "_container");
7718
- M(this, "_terrainButton");
7735
+ L(this, "_map");
7736
+ L(this, "_container");
7737
+ L(this, "_terrainButton");
7719
7738
  uo(["_toggleTerrain", "_updateTerrainIcon"], this);
7720
7739
  }
7721
7740
  onAdd(e) {
7722
7741
  return this._map = e, this._container = pe("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = pe("button", "maplibregl-ctrl-terrain", this._container), pe("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;
7723
7742
  }
7724
7743
  onRemove() {
7725
- nr(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
7744
+ ar(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
7726
7745
  }
7727
7746
  _toggleTerrain() {
7728
7747
  this._map.hasTerrain() ? this._map.disableTerrain() : this._map.enableTerrain(), this._updateTerrainIcon();
@@ -7741,7 +7760,7 @@ class Os extends xo {
7741
7760
  /**
7742
7761
  * Overloading: Limit how flat the compass icon can get
7743
7762
  */
7744
- M(this, "_rotateCompassArrow", () => {
7763
+ L(this, "_rotateCompassArrow", () => {
7745
7764
  const t = this._map.getBearing(), n = this._map.getPitch(), a = this.options.visualizePitch ? `scale(${Math.min(
7746
7765
  1.5,
7747
7766
  1 / Math.cos(n * (Math.PI / 180)) ** 0.5
@@ -7760,20 +7779,20 @@ class Os extends xo {
7760
7779
  return a.clickFunction = n, a;
7761
7780
  }
7762
7781
  }
7763
- const ln = S.Marker, un = S.LngLat, Ds = S.LngLatBounds;
7782
+ const un = S.Marker, cn = S.LngLat, Ds = S.LngLatBounds;
7764
7783
  class qs extends ko {
7765
7784
  constructor() {
7766
7785
  super(...arguments);
7767
- M(this, "lastUpdatedCenter", new un(0, 0));
7786
+ L(this, "lastUpdatedCenter", new cn(0, 0));
7768
7787
  /**
7769
7788
  * Update the camera location to center on the current position
7770
7789
  *
7771
7790
  * @param {Position} position the Geolocation API Position
7772
7791
  * @private
7773
7792
  */
7774
- M(this, "_updateCamera", (t) => {
7793
+ L(this, "_updateCamera", (t) => {
7775
7794
  var c, p;
7776
- const n = new un(t.coords.longitude, t.coords.latitude), a = t.coords.accuracy, i = {
7795
+ const n = new cn(t.coords.longitude, t.coords.latitude), a = t.coords.accuracy, i = {
7777
7796
  bearing: this._map.getBearing(),
7778
7797
  ...this.options.fitBoundsOptions,
7779
7798
  linear: !0
@@ -7790,7 +7809,7 @@ class qs extends ko {
7790
7809
  this._map.off("click", u), this._map.off("dblclick", u), this._map.off("dragstart", u), this._map.off("mousedown", u), this._map.off("touchstart", u), this._map.off("wheel", u), !l && (this.lastUpdatedCenter = this._map.getCenter());
7791
7810
  });
7792
7811
  });
7793
- M(this, "_finishSetupUI", (t) => {
7812
+ L(this, "_finishSetupUI", (t) => {
7794
7813
  if (this._map) {
7795
7814
  if (t === !1) {
7796
7815
  const n = this._map._getUIString("GeolocateControl.LocationNotAvailable");
@@ -7799,7 +7818,7 @@ class qs extends ko {
7799
7818
  const n = this._map._getUIString("GeolocateControl.FindMyLocation");
7800
7819
  this._geolocateButton.disabled = !1, this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n);
7801
7820
  }
7802
- this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = pe("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new ln({ element: this._dotElement }), this._circleElement = pe("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new ln({
7821
+ this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = pe("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new un({ element: this._dotElement }), this._circleElement = pe("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new un({
7803
7822
  element: this._circleElement,
7804
7823
  pitchAlignment: "map"
7805
7824
  }), 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) => {
@@ -7808,7 +7827,7 @@ class qs extends ko {
7808
7827
  });
7809
7828
  }
7810
7829
  });
7811
- M(this, "_onZoom", () => {
7830
+ L(this, "_onZoom", () => {
7812
7831
  this.options.showUserLocation && this.options.showAccuracyCircle && this._updateCircleRadius();
7813
7832
  });
7814
7833
  }
@@ -7821,19 +7840,41 @@ class qs extends ko {
7821
7840
  ], n = this._map.project(t), a = this._map.unproject([n.x, n.y]), o = this._map.unproject([n.x + 20, n.y]), i = a.distanceTo(o) / 20, s = Math.ceil(2 * this._accuracy / i);
7822
7841
  this._circleElement.style.width = `${s}px`, this._circleElement.style.height = `${s}px`;
7823
7842
  }
7843
+ // We are overwriting the method _setErrorState from Maplibre's GeolocateControl because the
7844
+ // case BACKGROUND_ERROR is not dealt with in the original function and yields an error.
7845
+ // Related issue: https://github.com/maplibre/maplibre-gl-js/issues/2294
7846
+ _setErrorState() {
7847
+ switch (this._watchState) {
7848
+ case "WAITING_ACTIVE":
7849
+ this._watchState = "ACTIVE_ERROR", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");
7850
+ break;
7851
+ case "ACTIVE_LOCK":
7852
+ this._watchState = "ACTIVE_ERROR", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");
7853
+ break;
7854
+ case "BACKGROUND":
7855
+ this._watchState = "BACKGROUND_ERROR", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");
7856
+ break;
7857
+ case "ACTIVE_ERROR":
7858
+ break;
7859
+ case "BACKGROUND_ERROR":
7860
+ break;
7861
+ default:
7862
+ throw new Error(`Unexpected watchState ${this._watchState}`);
7863
+ }
7864
+ }
7824
7865
  }
7825
- var G, Q, me, he, K, Ye, q, sa, Z, la;
7866
+ var H, Q, me, he, K, Ye, U, la, Z, ua;
7826
7867
  class Gt {
7827
7868
  constructor(e, t) {
7828
- ye(this, q);
7829
- ye(this, G);
7830
- M(this, "map");
7869
+ ye(this, U);
7870
+ ye(this, H);
7871
+ L(this, "map");
7831
7872
  ye(this, Q);
7832
7873
  ye(this, me);
7833
7874
  ye(this, he);
7834
7875
  ye(this, K, !1);
7835
7876
  ye(this, Ye);
7836
- e.style !== void 0 && Se(this, K, !0), Se(this, G, {
7877
+ e.style !== void 0 && Se(this, K, !0), Se(this, H, {
7837
7878
  // set defaults
7838
7879
  zoomAdjust: -4,
7839
7880
  position: "top-right",
@@ -7856,51 +7897,51 @@ class Gt {
7856
7897
  height: "300px",
7857
7898
  ...e.containerStyle ?? {}
7858
7899
  }
7859
- }), e.lockZoom !== void 0 && (I(this, G).minZoom = e.lockZoom, I(this, G).maxZoom = e.lockZoom);
7900
+ }), e.lockZoom !== void 0 && (I(this, H).minZoom = e.lockZoom, I(this, H).maxZoom = e.lockZoom);
7860
7901
  }
7861
7902
  setStyle(e, t) {
7862
- I(this, K) || this.map.setStyle(e, t), V(this, q, Z).call(this);
7903
+ I(this, K) || this.map.setStyle(e, t), G(this, U, Z).call(this);
7863
7904
  }
7864
7905
  addLayer(e, t) {
7865
- return I(this, K) || this.map.addLayer(e, t), V(this, q, Z).call(this), this.map;
7906
+ return I(this, K) || this.map.addLayer(e, t), G(this, U, Z).call(this), this.map;
7866
7907
  }
7867
7908
  moveLayer(e, t) {
7868
- return I(this, K) || this.map.moveLayer(e, t), V(this, q, Z).call(this), this.map;
7909
+ return I(this, K) || this.map.moveLayer(e, t), G(this, U, Z).call(this), this.map;
7869
7910
  }
7870
7911
  removeLayer(e) {
7871
- return I(this, K) || this.map.removeLayer(e), V(this, q, Z).call(this), this;
7912
+ return I(this, K) || this.map.removeLayer(e), G(this, U, Z).call(this), this;
7872
7913
  }
7873
7914
  setLayerZoomRange(e, t, n) {
7874
- return I(this, K) || this.map.setLayerZoomRange(e, t, n), V(this, q, Z).call(this), this;
7915
+ return I(this, K) || this.map.setLayerZoomRange(e, t, n), G(this, U, Z).call(this), this;
7875
7916
  }
7876
7917
  setFilter(e, t, n) {
7877
- return I(this, K) || this.map.setFilter(e, t, n), V(this, q, Z).call(this), this;
7918
+ return I(this, K) || this.map.setFilter(e, t, n), G(this, U, Z).call(this), this;
7878
7919
  }
7879
7920
  setPaintProperty(e, t, n, a) {
7880
- return I(this, K) || this.map.setPaintProperty(e, t, n, a), V(this, q, Z).call(this), this;
7921
+ return I(this, K) || this.map.setPaintProperty(e, t, n, a), G(this, U, Z).call(this), this;
7881
7922
  }
7882
7923
  setLayoutProperty(e, t, n, a) {
7883
- return I(this, K) || this.map.setLayoutProperty(e, t, n, a), V(this, q, Z).call(this), this;
7924
+ return I(this, K) || this.map.setLayoutProperty(e, t, n, a), G(this, U, Z).call(this), this;
7884
7925
  }
7885
7926
  setGlyphs(e, t) {
7886
- return I(this, K) || this.map.setGlyphs(e, t), V(this, q, Z).call(this), this;
7927
+ return I(this, K) || this.map.setGlyphs(e, t), G(this, U, Z).call(this), this;
7887
7928
  }
7888
7929
  onAdd(e) {
7889
7930
  Se(this, Q, e), Se(this, me, pe("div", "maplibregl-ctrl maplibregl-ctrl-group"));
7890
- for (const [t, n] of Object.entries(I(this, G).containerStyle))
7931
+ for (const [t, n] of Object.entries(I(this, H).containerStyle))
7891
7932
  I(this, me).style.setProperty(t, n);
7892
- return I(this, G).container = I(this, me), I(this, G).zoom = e.getZoom() + I(this, G).zoomAdjust, this.map = new Vs(I(this, G)), this.map.once("style.load", () => {
7933
+ return I(this, H).container = I(this, me), I(this, H).zoom = e.getZoom() + I(this, H).zoomAdjust, this.map = new Gs(I(this, H)), this.map.once("style.load", () => {
7893
7934
  this.map.resize();
7894
7935
  }), this.map.once("load", () => {
7895
- V(this, q, sa).call(this, I(this, G).parentRect), Se(this, Ye, V(this, q, la).call(this));
7936
+ G(this, U, la).call(this, I(this, H).parentRect), Se(this, Ye, G(this, U, ua).call(this));
7896
7937
  }), I(this, me);
7897
7938
  }
7898
7939
  onRemove() {
7899
7940
  var e;
7900
- (e = I(this, Ye)) == null || e.call(this), nr(I(this, me));
7941
+ (e = I(this, Ye)) == null || e.call(this), ar(I(this, me));
7901
7942
  }
7902
7943
  }
7903
- G = new WeakMap(), Q = new WeakMap(), me = new WeakMap(), he = new WeakMap(), K = new WeakMap(), Ye = new WeakMap(), q = new WeakSet(), sa = function(e) {
7944
+ H = new WeakMap(), Q = new WeakMap(), me = new WeakMap(), he = new WeakMap(), K = new WeakMap(), Ye = new WeakMap(), U = new WeakSet(), la = function(e) {
7904
7945
  e === void 0 || e.linePaint === void 0 && e.fillPaint === void 0 || (Se(this, he, {
7905
7946
  type: "Feature",
7906
7947
  properties: {
@@ -7936,15 +7977,15 @@ G = new WeakMap(), Q = new WeakMap(), me = new WeakMap(), he = new WeakMap(), K
7936
7977
  "fill-opacity": 0.135,
7937
7978
  ...e.fillPaint
7938
7979
  }
7939
- }), V(this, q, Z).call(this));
7980
+ }), G(this, U, Z).call(this));
7940
7981
  }, Z = function() {
7941
7982
  if (I(this, he) === void 0) return;
7942
7983
  const { devicePixelRatio: e } = window, t = I(this, Q).getCanvas(), n = t.width / e, a = t.height / e, o = I(this, Q).unproject.bind(I(this, Q)), i = o([0, 0]), s = o([n, 0]), l = o([0, a]), u = o([n, a]);
7943
7984
  I(this, he).geometry.coordinates = [
7944
7985
  [l.toArray(), u.toArray(), s.toArray(), i.toArray(), l.toArray()]
7945
7986
  ], this.map.getSource("parentRect").setData(I(this, he));
7946
- }, la = function() {
7947
- const { pitchAdjust: e } = I(this, G), t = () => {
7987
+ }, ua = function() {
7988
+ const { pitchAdjust: e } = I(this, H), t = () => {
7948
7989
  i("parent");
7949
7990
  }, n = () => {
7950
7991
  i("minimap");
@@ -7954,29 +7995,29 @@ G = new WeakMap(), Q = new WeakMap(), me = new WeakMap(), he = new WeakMap(), K
7954
7995
  I(this, Q).off("move", t), this.map.off("move", n);
7955
7996
  }, i = (s) => {
7956
7997
  o();
7957
- const l = s === "parent" ? I(this, Q) : this.map, u = s === "parent" ? this.map : I(this, Q), c = l.getCenter(), p = l.getZoom() + I(this, G).zoomAdjust * (s === "parent" ? 1 : -1), m = l.getBearing(), f = l.getPitch();
7998
+ const l = s === "parent" ? I(this, Q) : this.map, u = s === "parent" ? this.map : I(this, Q), c = l.getCenter(), p = l.getZoom() + I(this, H).zoomAdjust * (s === "parent" ? 1 : -1), m = l.getBearing(), f = l.getPitch();
7958
7999
  u.jumpTo({
7959
8000
  center: c,
7960
8001
  zoom: p,
7961
8002
  bearing: m,
7962
8003
  pitch: e ? f : 0
7963
- }), V(this, q, Z).call(this), a();
8004
+ }), G(this, U, Z).call(this), a();
7964
8005
  };
7965
8006
  return a(), () => {
7966
8007
  o();
7967
8008
  };
7968
8009
  };
7969
- class Bs {
8010
+ class Us {
7970
8011
  constructor() {
7971
- M(this, "map");
7972
- M(this, "container");
7973
- M(this, "projectionButton");
8012
+ L(this, "map");
8013
+ L(this, "container");
8014
+ L(this, "projectionButton");
7974
8015
  }
7975
8016
  onAdd(e) {
7976
8017
  return this.map = e, this.container = pe("div", "maplibregl-ctrl maplibregl-ctrl-group"), this.projectionButton = pe("button", "maplibregl-ctrl-projection", this.container), pe("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;
7977
8018
  }
7978
8019
  onRemove() {
7979
- nr(this.container), this.map.off("projectiontransition", this.updateProjectionIcon), this.map = void 0;
8020
+ ar(this.container), this.map.off("projectiontransition", this.updateProjectionIcon), this.map = void 0;
7980
8021
  }
7981
8022
  toggleProjection() {
7982
8023
  this.map.getProjection() === void 0 && this.map.setProjection({ type: "mercator" }), this.map.isGlobeProjection() ? this.map.enableMercatorProjection() : this.map.enableGlobeProjection(), this.updateProjectionIcon();
@@ -7985,17 +8026,53 @@ class Bs {
7985
8026
  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");
7986
8027
  }
7987
8028
  }
7988
- const Us = {
8029
+ class Bs {
8030
+ /**
8031
+ *
8032
+ * @param map : a Map instance
8033
+ * @param delay : a delay in milliseconds after which the payload is sent to MapTiler cloud (cannot be less than 1000ms)
8034
+ */
8035
+ constructor(e, t = 2e3) {
8036
+ L(this, "map");
8037
+ L(this, "registeredModules", /* @__PURE__ */ new Set());
8038
+ this.map = e, setTimeout(
8039
+ async () => {
8040
+ if (!F.telemetry)
8041
+ return;
8042
+ const n = this.preparePayload();
8043
+ try {
8044
+ (await fetch(n, { method: "POST" })).ok || console.warn("The metrics could not be sent to MapTiler Cloud");
8045
+ } catch (a) {
8046
+ console.warn("The metrics could not be sent to MapTiler Cloud", a);
8047
+ }
8048
+ },
8049
+ Math.max(1e3, t)
8050
+ );
8051
+ }
8052
+ /**
8053
+ * Register a module to the telemetry system of the SDK.
8054
+ * The arguments `name` and `version` likely come from the package.json
8055
+ * of each module.
8056
+ */
8057
+ registerModule(e, t) {
8058
+ this.registeredModules.add(`${e}:${t}`);
8059
+ }
8060
+ preparePayload() {
8061
+ const e = new URL(V.telemetryURL);
8062
+ return e.searchParams.append("sdk", Sn.version), e.searchParams.append("key", F.apiKey), e.searchParams.append("mtsid", nr), e.searchParams.append("session", F.session ? "1" : "0"), e.searchParams.append("caching", F.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;
8063
+ }
8064
+ }
8065
+ const Vs = {
7989
8066
  POINT: "POINT",
7990
8067
  COUNTRY: "COUNTRY"
7991
8068
  };
7992
- class Vs extends S.Map {
8069
+ class Gs extends S.Map {
7993
8070
  constructor(t) {
7994
- fo(t.container), t.apiKey && (B.apiKey = t.apiKey);
7995
- const { style: n, requiresUrlMonitoring: a, isFallback: o } = sn(t.style);
8071
+ fo(t.container), t.apiKey && (F.apiKey = t.apiKey);
8072
+ const { style: n, requiresUrlMonitoring: a, isFallback: o } = ln(t.style);
7996
8073
  o && console.warn(
7997
8074
  "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."
7998
- ), B.apiKey || console.warn("MapTiler Cloud API key is not set. Visit https://maptiler.com and try Cloud for free!");
8075
+ ), F.apiKey || console.warn("MapTiler Cloud API key is not set. Visit https://maptiler.com and try Cloud for free!");
7999
8076
  const i = location.hash;
8000
8077
  let s = {
8001
8078
  compact: !1
@@ -8008,26 +8085,28 @@ class Vs extends S.Map {
8008
8085
  ...t,
8009
8086
  style: n,
8010
8087
  maplibreLogo: !1,
8011
- transformRequest: jr(t.transformRequest),
8088
+ transformRequest: Nr(t.transformRequest),
8012
8089
  attributionControl: t.forceNoAttributionControl === !0 ? !1 : s
8013
8090
  };
8014
8091
  delete l.style;
8015
8092
  super(l);
8016
- M(this, "isTerrainEnabled", !1);
8017
- M(this, "terrainExaggeration", 1);
8018
- M(this, "primaryLanguage");
8019
- M(this, "terrainGrowing", !1);
8020
- M(this, "terrainFlattening", !1);
8021
- M(this, "minimap");
8022
- M(this, "forceLanguageUpdate");
8023
- M(this, "languageAlwaysBeenStyle");
8024
- M(this, "isReady", !1);
8025
- M(this, "terrainAnimationDuration", 1e3);
8026
- M(this, "monitoredStyleUrls");
8027
- M(this, "styleInProcess", !1);
8028
- M(this, "curentProjection");
8029
- M(this, "originalLabelStyle", new window.Map());
8030
- M(this, "isStyleLocalized", !1);
8093
+ L(this, "telemetry");
8094
+ L(this, "isTerrainEnabled", !1);
8095
+ L(this, "terrainExaggeration", 1);
8096
+ L(this, "primaryLanguage");
8097
+ L(this, "terrainGrowing", !1);
8098
+ L(this, "terrainFlattening", !1);
8099
+ L(this, "minimap");
8100
+ L(this, "forceLanguageUpdate");
8101
+ L(this, "languageAlwaysBeenStyle");
8102
+ L(this, "isReady", !1);
8103
+ L(this, "terrainAnimationDuration", 1e3);
8104
+ L(this, "monitoredStyleUrls");
8105
+ L(this, "styleInProcess", !1);
8106
+ L(this, "curentProjection");
8107
+ L(this, "originalLabelStyle", new window.Map());
8108
+ L(this, "isStyleLocalized", !1);
8109
+ L(this, "languageIsUpdated", !1);
8031
8110
  this.setStyle(n), a && this.monitorStyleUrl(n);
8032
8111
  const u = () => {
8033
8112
  let d = "The distant style could not be loaded.";
@@ -8040,26 +8119,26 @@ class Vs extends S.Map {
8040
8119
  const v = d.error.url, w = new URL(v);
8041
8120
  w.search = "";
8042
8121
  const b = w.href;
8043
- this.monitoredStyleUrls.has(b) && (this.monitoredStyleUrls.delete(b), u());
8122
+ this.monitoredStyleUrls && this.monitoredStyleUrls.has(b) && (this.monitoredStyleUrls.delete(b), u());
8044
8123
  return;
8045
8124
  }
8046
8125
  if (this.styleInProcess)
8047
8126
  return u();
8048
- }), B.caching && !Wt && console.warn(
8127
+ }), F.caching && !Wt && console.warn(
8049
8128
  "The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"
8050
- ), B.caching && Wt && so(), typeof t.language > "u")
8051
- this.primaryLanguage = B.primaryLanguage;
8129
+ ), F.caching && Wt && so(), typeof t.language > "u")
8130
+ this.primaryLanguage = F.primaryLanguage;
8052
8131
  else {
8053
- const d = Er(t.language, E);
8054
- this.primaryLanguage = d ?? B.primaryLanguage;
8132
+ const d = zr(t.language, E);
8133
+ this.primaryLanguage = d ?? F.primaryLanguage;
8055
8134
  }
8056
8135
  this.forceLanguageUpdate = !(this.primaryLanguage === E.STYLE || this.primaryLanguage === E.STYLE_LOCK), this.languageAlwaysBeenStyle = this.primaryLanguage === E.STYLE, this.terrainExaggeration = t.terrainExaggeration ?? this.terrainExaggeration, this.curentProjection = t.projection, this.on("styledata", () => {
8057
- this.curentProjection === "mercator" ? this.setProjection({ type: "mercator" }) : this.curentProjection === "globe" && (this.setProjection({ type: "globe" }), this.transform.setGlobeViewAllowed(!0, !0));
8136
+ this.curentProjection === "mercator" ? this.setProjection({ type: "mercator" }) : this.curentProjection === "globe" && this.setProjection({ type: "globe" });
8058
8137
  }), this.once("styledata", async () => {
8059
8138
  if (!t.geolocate || t.center || t.hash && i)
8060
8139
  return;
8061
8140
  try {
8062
- if (t.geolocate === Us.COUNTRY) {
8141
+ if (t.geolocate === Vs.COUNTRY) {
8063
8142
  await this.fitToIpBounds();
8064
8143
  return;
8065
8144
  }
@@ -8110,17 +8189,17 @@ class Vs extends S.Map {
8110
8189
  const y = Object.keys(this.style.sourceCaches).map((b) => this.getSource(b)).filter(
8111
8190
  (b) => b && "url" in b && typeof b.url == "string" && (b == null ? void 0 : b.url.includes("tiles.json"))
8112
8191
  ), v = new URL(y[0].url);
8113
- v.searchParams.has("key") || v.searchParams.append("key", B.apiKey), d = await (await fetch(v.href)).json();
8192
+ v.searchParams.has("key") || v.searchParams.append("key", F.apiKey), d = await (await fetch(v.href)).json();
8114
8193
  } catch {
8115
8194
  }
8116
8195
  if (t.forceNoAttributionControl !== !0)
8117
8196
  if ("logo" in d && d.logo) {
8118
8197
  const y = d.logo;
8119
- this.addControl(new Fr({ logoURL: y }), t.logoPosition);
8120
- } else t.maptilerLogo && this.addControl(new Fr(), t.logoPosition);
8198
+ this.addControl(new Or({ logoURL: y }), t.logoPosition);
8199
+ } else t.maptilerLogo && this.addControl(new Or(), t.logoPosition);
8121
8200
  if (t.scaleControl) {
8122
- const y = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, v = new Co({ unit: B.unit });
8123
- this.addControl(v, y), B.on("unit", (w) => {
8201
+ const y = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, v = new Co({ unit: F.unit });
8202
+ this.addControl(v, y), F.on("unit", (w) => {
8124
8203
  v.setUnit(w);
8125
8204
  });
8126
8205
  }
@@ -8154,7 +8233,7 @@ class Vs extends S.Map {
8154
8233
  }
8155
8234
  if (t.projectionControl) {
8156
8235
  const y = t.projectionControl === !0 || t.projectionControl === void 0 ? "top-right" : t.projectionControl;
8157
- this.addControl(new Bs(), y);
8236
+ this.addControl(new Us(), y);
8158
8237
  }
8159
8238
  if (t.fullscreenControl) {
8160
8239
  const y = t.fullscreenControl === !0 || t.fullscreenControl === void 0 ? "top-right" : t.fullscreenControl;
@@ -8173,47 +8252,47 @@ class Vs extends S.Map {
8173
8252
  center: v,
8174
8253
  style: w,
8175
8254
  language: b,
8176
- apiKey: A,
8255
+ apiKey: T,
8177
8256
  maptilerLogo: j,
8178
- antialias: $,
8257
+ canvasContextAttributes: R,
8179
8258
  refreshExpiredTiles: ae,
8180
8259
  maxBounds: we,
8181
8260
  scrollZoom: De,
8182
8261
  minZoom: et,
8183
8262
  maxZoom: tt,
8184
- boxZoom: ba,
8185
- locale: wa,
8186
- fadeDuration: Sa,
8187
- crossSourceCollisions: xa,
8188
- clickTolerance: ka,
8189
- bounds: La,
8190
- fitBoundsOptions: Ca,
8191
- pixelRatio: Aa,
8192
- validateStyle: Ta
8263
+ boxZoom: wa,
8264
+ locale: Sa,
8265
+ fadeDuration: xa,
8266
+ crossSourceCollisions: ka,
8267
+ clickTolerance: La,
8268
+ bounds: Ca,
8269
+ fitBoundsOptions: Aa,
8270
+ pixelRatio: Ta,
8271
+ validateStyle: Ma
8193
8272
  } = t;
8194
8273
  this.minimap = new Gt(d, {
8195
8274
  zoom: y,
8196
8275
  center: v,
8197
8276
  style: w,
8198
8277
  language: b,
8199
- apiKey: A,
8278
+ apiKey: T,
8200
8279
  container: "null",
8201
8280
  maptilerLogo: j,
8202
- antialias: $,
8281
+ canvasContextAttributes: R,
8203
8282
  refreshExpiredTiles: ae,
8204
8283
  maxBounds: we,
8205
8284
  scrollZoom: De,
8206
8285
  minZoom: et,
8207
8286
  maxZoom: tt,
8208
- boxZoom: ba,
8209
- locale: wa,
8210
- fadeDuration: Sa,
8211
- crossSourceCollisions: xa,
8212
- clickTolerance: ka,
8213
- bounds: La,
8214
- fitBoundsOptions: Ca,
8215
- pixelRatio: Aa,
8216
- validateStyle: Ta
8287
+ boxZoom: wa,
8288
+ locale: Sa,
8289
+ fadeDuration: xa,
8290
+ crossSourceCollisions: ka,
8291
+ clickTolerance: La,
8292
+ bounds: Ca,
8293
+ fitBoundsOptions: Aa,
8294
+ pixelRatio: Ta,
8295
+ validateStyle: Ma
8217
8296
  }), this.addControl(this.minimap, d.position ?? "bottom-left");
8218
8297
  } else d === !0 ? (this.minimap = new Gt({}, t), this.addControl(this.minimap, "bottom-left")) : d !== void 0 && d !== !1 && (this.minimap = new Gt({}, t), this.addControl(this.minimap, d));
8219
8298
  });
@@ -8228,7 +8307,7 @@ class Vs extends S.Map {
8228
8307
  this.getCanvas().addEventListener("webglcontextlost", (d) => {
8229
8308
  console.warn(d), yo(t.container), this.fire("webglContextLost", { error: d });
8230
8309
  });
8231
- });
8310
+ }), this.telemetry = new Bs(this);
8232
8311
  }
8233
8312
  /**
8234
8313
  * Set the duration (millisec) of the terrain animation for growing or flattening.
@@ -8302,7 +8381,7 @@ class Vs extends S.Map {
8302
8381
  this.originalLabelStyle.clear(), (o = this.minimap) == null || o.setStyle(t), this.forceLanguageUpdate = !0, this.once("idle", () => {
8303
8382
  this.forceLanguageUpdate = !1;
8304
8383
  });
8305
- const a = sn(t);
8384
+ const a = ln(t);
8306
8385
  if (a.requiresUrlMonitoring && this.monitorStyleUrl(a.style), a.isFallback) {
8307
8386
  if (this.getStyle())
8308
8387
  return console.warn(
@@ -8453,7 +8532,7 @@ class Vs extends S.Map {
8453
8532
  return (a = this.minimap) == null || a.setGlyphs(t, n), super.setGlyphs(t, n);
8454
8533
  }
8455
8534
  getStyleLanguage() {
8456
- return !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" ? $a(this.style.stylesheet.metadata["maptiler:language"]) : null;
8535
+ 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" ? $a(this.style.stylesheet.metadata["maptiler:language"]) : null;
8457
8536
  }
8458
8537
  /**
8459
8538
  * Define the primary language of the map. Note that not all the languages shorthands provided are available.
@@ -8468,7 +8547,7 @@ class Vs extends S.Map {
8468
8547
  * Define the primary language of the map. Note that not all the languages shorthands provided are available.
8469
8548
  */
8470
8549
  setPrimaryLanguage(t) {
8471
- const n = this.getStyleLanguage(), a = Er(t, E);
8550
+ const n = this.getStyleLanguage(), a = zr(t, E);
8472
8551
  if (!a) {
8473
8552
  console.warn(`The language "${a}" is not supported.`);
8474
8553
  return;
@@ -8537,7 +8616,7 @@ class Vs extends S.Map {
8537
8616
  if (c.type !== "symbol")
8538
8617
  continue;
8539
8618
  const p = c, m = this.getSource(p.source);
8540
- if (!m || !("url" in m && typeof m.url == "string") || new URL(m.url).host !== H.maptilerApiHost)
8619
+ if (!m || !("url" in m && typeof m.url == "string") || new URL(m.url).host !== V.maptilerApiHost)
8541
8620
  continue;
8542
8621
  const { id: d, layout: y } = p;
8543
8622
  if (!y || !("text-field" in y))
@@ -8549,14 +8628,15 @@ class Vs extends S.Map {
8549
8628
  if (b)
8550
8629
  this.setLayoutProperty(d, "text-field", s);
8551
8630
  else {
8552
- const A = go(v, s, this.isStyleLocalized);
8553
- this.setLayoutProperty(d, "text-field", A);
8631
+ const T = go(v, s, this.isStyleLocalized);
8632
+ this.setLayoutProperty(d, "text-field", T);
8554
8633
  }
8555
8634
  } else {
8556
8635
  const w = mo(v, s, this.isStyleLocalized);
8557
8636
  this.setLayoutProperty(d, "text-field", w);
8558
8637
  }
8559
8638
  }
8639
+ this.languageIsUpdated = !0;
8560
8640
  }
8561
8641
  /**
8562
8642
  * Get the primary language
@@ -8606,11 +8686,11 @@ class Vs extends S.Map {
8606
8686
  const n = async (o) => {
8607
8687
  !this.terrain || o.type !== "data" || o.dataType !== "source" || !("source" in o) || o.sourceId !== "maptiler-terrain" || o.source.type !== "raster-dem" || o.isSourceLoaded && (this.off("data", n), this.growTerrain(t));
8608
8688
  }, a = () => {
8609
- this.isTerrainEnabled = !0, this.terrainExaggeration = t, this.on("data", n), this.addSource(H.terrainSourceId, {
8689
+ this.isTerrainEnabled = !0, this.terrainExaggeration = t, this.on("data", n), this.addSource(V.terrainSourceId, {
8610
8690
  type: "raster-dem",
8611
- url: H.terrainSourceURL
8691
+ url: V.terrainSourceURL
8612
8692
  }), this.setTerrain({
8613
- source: H.terrainSourceId,
8693
+ source: V.terrainSourceId,
8614
8694
  exaggeration: 0
8615
8695
  });
8616
8696
  };
@@ -8619,7 +8699,7 @@ class Vs extends S.Map {
8619
8699
  return;
8620
8700
  }
8621
8701
  this.loaded() || this.isTerrainEnabled ? a() : this.once("load", () => {
8622
- this.getTerrain() && this.getSource(H.terrainSourceId) || a();
8702
+ this.getTerrain() && this.getSource(V.terrainSourceId) || a();
8623
8703
  });
8624
8704
  }
8625
8705
  /**
@@ -8637,7 +8717,7 @@ class Vs extends S.Map {
8637
8717
  const i = (1 - o) ** 4, s = n * i;
8638
8718
  this.terrain.exaggeration = s, requestAnimationFrame(a);
8639
8719
  } else
8640
- this.terrain.exaggeration = 0, this.terrainGrowing = !1, this.terrainFlattening = !1, this.setTerrain(), this.getSource(H.terrainSourceId) && this.removeSource(H.terrainSourceId), this.fire("terrainAnimationStop", { terrain: null });
8720
+ this.terrain.exaggeration = 0, this.terrainGrowing = !1, this.terrainFlattening = !1, this.setTerrain(), this.getSource(V.terrainSourceId) && this.removeSource(V.terrainSourceId), this.fire("terrainAnimationStop", { terrain: null });
8641
8721
  this.triggerRepaint();
8642
8722
  };
8643
8723
  !this.terrainGrowing && !this.terrainFlattening && this.fire("terrainAnimationStart", { terrain: this.terrain }), this.terrainGrowing = !1, this.terrainFlattening = !0, requestAnimationFrame(a);
@@ -8662,14 +8742,14 @@ class Vs extends S.Map {
8662
8742
  });
8663
8743
  }
8664
8744
  async fitToIpBounds() {
8665
- const t = await zr.info();
8745
+ const t = await _r.info();
8666
8746
  this.fitBounds(t.country_bounds, {
8667
8747
  duration: 0,
8668
8748
  padding: 100
8669
8749
  });
8670
8750
  }
8671
8751
  async centerOnIpPoint(t) {
8672
- const n = await zr.info();
8752
+ const n = await _r.info();
8673
8753
  this.jumpTo({
8674
8754
  center: [(n == null ? void 0 : n.longitude) ?? 0, (n == null ? void 0 : n.latitude) ?? 0],
8675
8755
  zoom: t || 11
@@ -8677,7 +8757,7 @@ class Vs extends S.Map {
8677
8757
  }
8678
8758
  getCameraHash() {
8679
8759
  const t = new Float32Array(5), n = this.getCenter();
8680
- return t[0] = n.lng, t[1] = n.lat, t[2] = this.getZoom(), t[3] = this.getPitch(), t[4] = this.getBearing(), Na.fromUint8Array(new Uint8Array(t.buffer));
8760
+ return t[0] = n.lng, t[1] = n.lat, t[2] = this.getZoom(), t[3] = this.getPitch(), t[4] = this.getBearing(), Fa.fromUint8Array(new Uint8Array(t.buffer));
8681
8761
  }
8682
8762
  /**
8683
8763
  * Get the SDK config object.
@@ -8685,7 +8765,7 @@ class Vs extends S.Map {
8685
8765
  * that do not directly have access to the SDK configuration but do have access to a Map instance.
8686
8766
  */
8687
8767
  getSdkConfig() {
8688
- return B;
8768
+ return F;
8689
8769
  }
8690
8770
  /**
8691
8771
  * Get the MapTiler session ID. Convenient to dispatch to externaly built component
@@ -8693,7 +8773,7 @@ class Vs extends S.Map {
8693
8773
  * @returns
8694
8774
  */
8695
8775
  getMaptilerSessionId() {
8696
- return wn;
8776
+ return nr;
8697
8777
  }
8698
8778
  /**
8699
8779
  * Updates the requestManager's transform request with a new function.
@@ -8707,33 +8787,38 @@ class Vs extends S.Map {
8707
8787
  * map.setTransformRequest((url: string, resourceType: string) => {});
8708
8788
  */
8709
8789
  setTransformRequest(t) {
8710
- return super.setTransformRequest(jr(t)), this;
8790
+ return super.setTransformRequest(Nr(t)), this;
8711
8791
  }
8712
8792
  /**
8713
8793
  * Returns whether a globe projection is currently being used
8714
8794
  */
8715
8795
  isGlobeProjection() {
8716
8796
  const t = this.getProjection();
8717
- return t ? t.type === "globe" && this.transform.getGlobeViewAllowed() : !1;
8797
+ return (t == null ? void 0 : t.type) === "globe";
8798
+ }
8799
+ /**
8800
+ * Activate the globe projection.
8801
+ */
8802
+ enableGlobeProjection() {
8803
+ this.isGlobeProjection() !== !0 && (this.setProjection({ type: "globe" }), this.curentProjection = "globe");
8718
8804
  }
8719
8805
  /**
8720
- * Uses the globe projection. Animated by default, it can be disabled
8806
+ * Activate the mercator projection.
8721
8807
  */
8722
- enableGlobeProjection(t = !0) {
8723
- this.isGlobeProjection() || (this.setProjection({ type: "globe" }), t ? (this.transform.setGlobeViewAllowed(!1, !0), this.once("projectiontransition", () => {
8724
- this.transform.setGlobeViewAllowed(!0, !0);
8725
- })) : this.transform.setGlobeViewAllowed(!0, !0), this.curentProjection = "globe");
8808
+ enableMercatorProjection() {
8809
+ this.isGlobeProjection() !== !1 && (this.setProjection({ type: "mercator" }), this.curentProjection = "mercator");
8726
8810
  }
8727
8811
  /**
8728
- * Uses the Mercator projection. Animated by default, it can be disabled
8812
+ * Returns `true` is the language was ever updated, meaning changed
8813
+ * from what is delivered in the style.
8814
+ * Returns `false` if language in use is the language from the style
8815
+ * and has never been changed.
8729
8816
  */
8730
- enableMercatorProjection(t = !0) {
8731
- this.isGlobeProjection() && (t ? (this.setProjection({ type: "globe" }), this.transform.setGlobeViewAllowed(!1, !0), this.once("projectiontransition", () => {
8732
- this.setProjection({ type: "mercator" });
8733
- })) : this.setProjection({ type: "mercator" }), this.curentProjection = "mercator");
8817
+ isLanguageUpdated() {
8818
+ return this.languageIsUpdated;
8734
8819
  }
8735
8820
  }
8736
- function Cr(r) {
8821
+ function Ar(r) {
8737
8822
  if (typeof DOMParser < "u") {
8738
8823
  const e = new DOMParser().parseFromString(r, "application/xml");
8739
8824
  if (e.querySelector("parsererror"))
@@ -8742,7 +8827,7 @@ function Cr(r) {
8742
8827
  }
8743
8828
  throw new Error("No XML parser found");
8744
8829
  }
8745
- function ua(r, e) {
8830
+ function ca(r, e) {
8746
8831
  if (!r.hasChildNodes())
8747
8832
  return !1;
8748
8833
  for (const t of Array.from(r.childNodes)) {
@@ -8752,72 +8837,72 @@ function ua(r, e) {
8752
8837
  }
8753
8838
  return !1;
8754
8839
  }
8755
- function cn(r) {
8840
+ function pn(r) {
8756
8841
  if (typeof XMLSerializer < "u")
8757
8842
  return new XMLSerializer().serializeToString(r);
8758
8843
  throw new Error("No XML serializer found");
8759
8844
  }
8760
- function ca(r) {
8761
- const e = typeof r == "string" ? Cr(r) : r;
8762
- if (!ua(e, "gpx"))
8845
+ function pa(r) {
8846
+ const e = typeof r == "string" ? Ar(r) : r;
8847
+ if (!ca(e, "gpx"))
8763
8848
  throw new Error("The XML document is not valid GPX");
8764
- const t = U(e, "trk"), n = U(e, "rte"), a = U(e, "wpt"), o = {
8849
+ const t = B(e, "trk"), n = B(e, "rte"), a = B(e, "wpt"), o = {
8765
8850
  type: "FeatureCollection",
8766
8851
  features: []
8767
8852
  };
8768
8853
  for (const i of Array.from(t)) {
8769
- const s = Ws(i);
8854
+ const s = Zs(i);
8770
8855
  s && o.features.push(s);
8771
8856
  }
8772
8857
  for (const i of Array.from(n)) {
8773
- const s = Zs(i);
8858
+ const s = Js(i);
8774
8859
  s && o.features.push(s);
8775
8860
  }
8776
8861
  for (const i of Array.from(a))
8777
- o.features.push(Js(i));
8862
+ o.features.push(Ys(i));
8778
8863
  return o;
8779
8864
  }
8780
- function pa(r, e) {
8865
+ function fa(r, e) {
8781
8866
  let t = r;
8782
- if (typeof t == "string" && (t = Cr(t)), !ua(t, "kml"))
8867
+ if (typeof t == "string" && (t = Ar(t)), !ca(t, "kml"))
8783
8868
  throw new Error("The XML document is not valid KML");
8784
8869
  const n = {
8785
8870
  type: "FeatureCollection",
8786
8871
  features: []
8787
- }, a = {}, o = {}, i = {}, s = U(t, "Placemark"), l = U(t, "Style"), u = U(t, "StyleMap");
8872
+ }, a = {}, o = {}, i = {}, s = B(t, "Placemark"), l = B(t, "Style"), u = B(t, "StyleMap");
8788
8873
  for (const c of Array.from(l)) {
8789
- const p = fn(e !== void 0 ? e(c) : cn(c)).toString(16);
8874
+ const p = dn(e !== void 0 ? e(c) : pn(c)).toString(16);
8790
8875
  a[`#${Te(c, "id")}`] = p, o[p] = c;
8791
8876
  }
8792
8877
  for (const c of Array.from(u)) {
8793
- a[`#${Te(c, "id")}`] = fn(
8794
- e !== void 0 ? e(c) : cn(c)
8878
+ a[`#${Te(c, "id")}`] = dn(
8879
+ e !== void 0 ? e(c) : pn(c)
8795
8880
  ).toString(16);
8796
- const p = U(c, "Pair"), m = {};
8881
+ const p = B(c, "Pair"), m = {};
8797
8882
  for (const f of Array.from(p))
8798
- m[P(k(f, "key")) ?? ""] = P(k(f, "styleUrl"));
8883
+ m[_(k(f, "key")) ?? ""] = _(k(f, "styleUrl"));
8799
8884
  i[`#${Te(c, "id")}`] = m;
8800
8885
  }
8801
8886
  for (const c of Array.from(s))
8802
- n.features = n.features.concat(Ks(c, a, o, i));
8887
+ n.features = n.features.concat(Ws(c, a, o, i));
8803
8888
  return n;
8804
8889
  }
8805
- function pn(r) {
8890
+ function fn(r) {
8806
8891
  if (r === null) return ["#000000", 1];
8807
8892
  let e = "", t = 1, n = r;
8808
8893
  return n.substring(0, 1) === "#" && (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];
8809
8894
  }
8810
- function Gs(r) {
8811
- return ya(r.split(" "));
8812
- }
8813
8895
  function Hs(r) {
8814
- let e = U(r, "coord");
8896
+ return ma(r.split(" "));
8897
+ }
8898
+ function Ks(r) {
8899
+ let e = B(r, "coord");
8815
8900
  const t = [], n = [];
8816
- e.length === 0 && (e = U(r, "gx:coord"));
8901
+ e.length === 0 && (e = B(r, "gx:coord"));
8817
8902
  for (const o of Array.from(e))
8818
- t.push(Gs(P(o) ?? ""));
8819
- const a = U(r, "when");
8820
- for (const o of Array.from(a)) n.push(P(o));
8903
+ t.push(Hs(_(o) ?? ""));
8904
+ const a = B(r, "when");
8905
+ for (const o of Array.from(a)) n.push(_(o));
8821
8906
  return {
8822
8907
  coords: t,
8823
8908
  times: n
@@ -8834,28 +8919,28 @@ function st(r) {
8834
8919
  if (k(r, "gx:MultiTrack") !== null)
8835
8920
  return st(k(r, "gx:MultiTrack"));
8836
8921
  for (a = 0; a < e.length; a++)
8837
- if (n = U(r, e[a]), n) {
8922
+ if (n = B(r, e[a]), n) {
8838
8923
  for (o = 0; o < n.length; o++)
8839
8924
  if (t = n[o], e[a] === "Point")
8840
8925
  s.push({
8841
8926
  type: "Point",
8842
- coordinates: ma(P(k(t, "coordinates")) ?? "")
8927
+ coordinates: ha(_(k(t, "coordinates")) ?? "")
8843
8928
  });
8844
8929
  else if (e[a] === "LineString")
8845
8930
  s.push({
8846
8931
  type: "LineString",
8847
- coordinates: yn(P(k(t, "coordinates")) ?? "")
8932
+ coordinates: mn(_(k(t, "coordinates")) ?? "")
8848
8933
  });
8849
8934
  else if (e[a] === "Polygon") {
8850
- const u = U(t, "LinearRing"), c = [];
8935
+ const u = B(t, "LinearRing"), c = [];
8851
8936
  for (i = 0; i < u.length; i++)
8852
- c.push(yn(P(k(u[i], "coordinates")) ?? ""));
8937
+ c.push(mn(_(k(u[i], "coordinates")) ?? ""));
8853
8938
  s.push({
8854
8939
  type: "Polygon",
8855
8940
  coordinates: c
8856
8941
  });
8857
8942
  } else if (e[a] === "Track" || e[a] === "gx:Track") {
8858
- const u = Hs(t);
8943
+ const u = Ks(t);
8859
8944
  s.push({
8860
8945
  type: "LineString",
8861
8946
  coordinates: u.coords
@@ -8864,45 +8949,45 @@ function st(r) {
8864
8949
  }
8865
8950
  return { geoms: s, coordTimes: l };
8866
8951
  }
8867
- function Ks(r, e, t, n) {
8868
- const a = st(r), o = {}, i = P(k(r, "name")), s = P(k(r, "address")), l = P(k(r, "description")), u = k(r, "TimeSpan"), c = k(r, "TimeStamp"), p = k(r, "ExtendedData"), m = k(r, "visibility");
8869
- let f, d = P(k(r, "styleUrl")), y = k(r, "LineStyle"), v = k(r, "PolyStyle");
8952
+ function Ws(r, e, t, n) {
8953
+ const a = st(r), o = {}, i = _(k(r, "name")), s = _(k(r, "address")), l = _(k(r, "description")), u = k(r, "TimeSpan"), c = k(r, "TimeStamp"), p = k(r, "ExtendedData"), m = k(r, "visibility");
8954
+ let f, d = _(k(r, "styleUrl")), y = k(r, "LineStyle"), v = k(r, "PolyStyle");
8870
8955
  if (!a.geoms.length) return [];
8871
8956
  if (i && (o.name = i), s && (o.address = s), d) {
8872
8957
  d[0] !== "#" && (d = `#${d}`), o.styleUrl = d, e[d] && (o.styleHash = e[d]), n[d] && (o.styleMapHash = n[d], o.styleHash = e[n[d].normal ?? ""]);
8873
8958
  const b = t[o.styleHash ?? ""];
8874
8959
  if (b) {
8875
8960
  y || (y = k(b, "LineStyle")), v || (v = k(b, "PolyStyle"));
8876
- const A = k(b, "IconStyle");
8877
- if (A) {
8878
- const j = k(A, "Icon");
8961
+ const T = k(b, "IconStyle");
8962
+ if (T) {
8963
+ const j = k(T, "Icon");
8879
8964
  if (j) {
8880
- const $ = P(k(j, "href"));
8881
- $ && (o.icon = $);
8965
+ const R = _(k(j, "href"));
8966
+ R && (o.icon = R);
8882
8967
  }
8883
8968
  }
8884
8969
  }
8885
8970
  }
8886
8971
  if (l && (o.description = l), u) {
8887
- const b = P(k(u, "begin")), A = P(k(u, "end"));
8888
- b && A && (o.timespan = { begin: b, end: A });
8972
+ const b = _(k(u, "begin")), T = _(k(u, "end"));
8973
+ b && T && (o.timespan = { begin: b, end: T });
8889
8974
  }
8890
- if (c !== null && (o.timestamp = P(k(c, "when")) ?? (/* @__PURE__ */ new Date()).toISOString()), y !== null) {
8891
- const b = pn(P(k(y, "color"))), A = b[0], j = b[1], $ = Number.parseFloat(P(k(y, "width")) ?? "");
8892
- A && (o.stroke = A), Number.isNaN(j) || (o["stroke-opacity"] = j), Number.isNaN($) || (o["stroke-width"] = $);
8975
+ if (c !== null && (o.timestamp = _(k(c, "when")) ?? (/* @__PURE__ */ new Date()).toISOString()), y !== null) {
8976
+ const b = fn(_(k(y, "color"))), T = b[0], j = b[1], R = Number.parseFloat(_(k(y, "width")) ?? "");
8977
+ T && (o.stroke = T), Number.isNaN(j) || (o["stroke-opacity"] = j), Number.isNaN(R) || (o["stroke-width"] = R);
8893
8978
  }
8894
8979
  if (v) {
8895
- const b = pn(P(k(v, "color"))), A = b[0], j = b[1], $ = P(k(v, "fill")), ae = P(k(v, "outline"));
8896
- A && (o.fill = A), Number.isNaN(j) || (o["fill-opacity"] = j), $ && (o["fill-opacity"] = $ === "1" ? o["fill-opacity"] || 1 : 0), ae && (o["stroke-opacity"] = ae === "1" ? o["stroke-opacity"] || 1 : 0);
8980
+ const b = fn(_(k(v, "color"))), T = b[0], j = b[1], R = _(k(v, "fill")), ae = _(k(v, "outline"));
8981
+ T && (o.fill = T), Number.isNaN(j) || (o["fill-opacity"] = j), R && (o["fill-opacity"] = R === "1" ? o["fill-opacity"] || 1 : 0), ae && (o["stroke-opacity"] = ae === "1" ? o["stroke-opacity"] || 1 : 0);
8897
8982
  }
8898
8983
  if (p) {
8899
- const b = U(p, "Data"), A = U(p, "SimpleData");
8984
+ const b = B(p, "Data"), T = B(p, "SimpleData");
8900
8985
  for (f = 0; f < b.length; f++)
8901
- o[b[f].getAttribute("name") ?? ""] = P(k(b[f], "value")) ?? "";
8902
- for (f = 0; f < A.length; f++)
8903
- o[A[f].getAttribute("name") ?? ""] = P(A[f]) ?? "";
8986
+ o[b[f].getAttribute("name") ?? ""] = _(k(b[f], "value")) ?? "";
8987
+ for (f = 0; f < T.length; f++)
8988
+ o[T[f].getAttribute("name") ?? ""] = _(T[f]) ?? "";
8904
8989
  }
8905
- m !== null && (o.visibility = P(m) ?? ""), a.coordTimes.length !== 0 && (o.coordTimes = a.coordTimes.length === 1 ? a.coordTimes[0] : a.coordTimes);
8990
+ m !== null && (o.visibility = _(m) ?? ""), a.coordTimes.length !== 0 && (o.coordTimes = a.coordTimes.length === 1 ? a.coordTimes[0] : a.coordTimes);
8906
8991
  const w = {
8907
8992
  type: "Feature",
8908
8993
  geometry: a.geoms.length === 1 ? a.geoms[0] : {
@@ -8913,13 +8998,13 @@ function Ks(r, e, t, n) {
8913
8998
  };
8914
8999
  return Te(r, "id") && (w.id = Te(r, "id") ?? void 0), [w];
8915
9000
  }
8916
- function fa(r, e) {
8917
- const t = U(r, e), n = [], a = [];
9001
+ function da(r, e) {
9002
+ const t = B(r, e), n = [], a = [];
8918
9003
  let o = [];
8919
9004
  const i = t.length;
8920
9005
  if (!(i < 2)) {
8921
9006
  for (let s = 0; s < i; s++) {
8922
- const l = ha(t[s]);
9007
+ const l = ga(t[s]);
8923
9008
  n.push(l.coordinates), l.time && a.push(l.time), (l.heartRate || o.length) && (o.length === 0 && (o = new Array(s).fill(null)), o.push(l.heartRate));
8924
9009
  }
8925
9010
  return {
@@ -8929,11 +9014,11 @@ function fa(r, e) {
8929
9014
  };
8930
9015
  }
8931
9016
  }
8932
- function Ws(r) {
8933
- const e = U(r, "trkseg"), t = [], n = [], a = [];
9017
+ function Zs(r) {
9018
+ const e = B(r, "trkseg"), t = [], n = [], a = [];
8934
9019
  let o;
8935
9020
  for (let s = 0; s < e.length; s++)
8936
- if (o = fa(e[s], "trkpt"), o !== void 0 && (o.line && t.push(o.line), o.times && o.times.length && n.push(o.times), a.length || o.heartRates && o.heartRates.length)) {
9021
+ if (o = da(e[s], "trkpt"), o !== void 0 && (o.line && t.push(o.line), o.times && o.times.length && n.push(o.times), a.length || o.heartRates && o.heartRates.length)) {
8937
9022
  if (!a.length)
8938
9023
  for (let l = 0; l < s; l++)
8939
9024
  a.push(new Array(t[l].length).fill(null));
@@ -8941,8 +9026,8 @@ function Ws(r) {
8941
9026
  }
8942
9027
  if (t.length === 0) return;
8943
9028
  const i = {
8944
- ...Ar(r),
8945
- ...da(k(r, "extensions"))
9029
+ ...Tr(r),
9030
+ ...ya(k(r, "extensions"))
8946
9031
  };
8947
9032
  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 ? {
8948
9033
  type: "Feature",
@@ -8960,13 +9045,13 @@ function Ws(r) {
8960
9045
  }
8961
9046
  };
8962
9047
  }
8963
- function Zs(r) {
8964
- const e = fa(r, "rtept");
9048
+ function Js(r) {
9049
+ const e = da(r, "rtept");
8965
9050
  return e === void 0 ? void 0 : {
8966
9051
  type: "Feature",
8967
9052
  properties: {
8968
- ...Ar(r),
8969
- ...da(k(r, "extensions"))
9053
+ ...Tr(r),
9054
+ ...ya(k(r, "extensions"))
8970
9055
  },
8971
9056
  geometry: {
8972
9057
  type: "LineString",
@@ -8974,28 +9059,28 @@ function Zs(r) {
8974
9059
  }
8975
9060
  };
8976
9061
  }
8977
- function Js(r) {
9062
+ function Ys(r) {
8978
9063
  return {
8979
9064
  type: "Feature",
8980
- properties: { ...Ar(r), ...rr(r, ["sym"]) },
9065
+ properties: { ...Tr(r), ...rr(r, ["sym"]) },
8981
9066
  geometry: {
8982
9067
  type: "Point",
8983
- coordinates: ha(r).coordinates
9068
+ coordinates: ga(r).coordinates
8984
9069
  }
8985
9070
  };
8986
9071
  }
8987
- function da(r) {
9072
+ function ya(r) {
8988
9073
  const e = {};
8989
9074
  if (r) {
8990
9075
  const t = k(r, "line");
8991
9076
  if (t) {
8992
- const n = P(k(t, "color")), a = Number.parseFloat(P(k(t, "opacity")) ?? "0"), o = Number.parseFloat(P(k(t, "width")) ?? "0");
9077
+ const n = _(k(t, "color")), a = Number.parseFloat(_(k(t, "opacity")) ?? "0"), o = Number.parseFloat(_(k(t, "width")) ?? "0");
8993
9078
  n && (e.stroke = n), Number.isNaN(a) || (e["stroke-opacity"] = a), Number.isNaN(o) || (e["stroke-width"] = o * 96 / 25.4);
8994
9079
  }
8995
9080
  }
8996
9081
  return e;
8997
9082
  }
8998
- function Ar(r) {
9083
+ function Tr(r) {
8999
9084
  const e = rr(r, [
9000
9085
  "name",
9001
9086
  "cmt",
@@ -9003,7 +9088,7 @@ function Ar(r) {
9003
9088
  "type",
9004
9089
  "time",
9005
9090
  "keywords"
9006
- ]), t = U(r, "link");
9091
+ ]), t = B(r, "link");
9007
9092
  if (t.length !== 0) {
9008
9093
  e.links = [];
9009
9094
  for (const n of Array.from(t)) {
@@ -9016,72 +9101,72 @@ function Ar(r) {
9016
9101
  }
9017
9102
  return e;
9018
9103
  }
9019
- function fn(r) {
9104
+ function dn(r) {
9020
9105
  let e = 0;
9021
9106
  if (!r || !r.length) return e;
9022
9107
  for (let t = 0; t < r.length; t++)
9023
9108
  e = (e << 5) - e + r.charCodeAt(t) | 0;
9024
9109
  return e;
9025
9110
  }
9026
- function U(r, e) {
9111
+ function B(r, e) {
9027
9112
  return r.getElementsByTagName(e);
9028
9113
  }
9029
9114
  function Te(r, e) {
9030
9115
  return r.getAttribute(e);
9031
9116
  }
9032
- function dn(r, e) {
9117
+ function yn(r, e) {
9033
9118
  return Number.parseFloat(Te(r, e) ?? "0");
9034
9119
  }
9035
9120
  function k(r, e) {
9036
- const t = U(r, e);
9121
+ const t = B(r, e);
9037
9122
  return t.length ? t[0] : null;
9038
9123
  }
9039
- function Ys(r) {
9124
+ function Xs(r) {
9040
9125
  return r.normalize && r.normalize(), r;
9041
9126
  }
9042
- function ya(r) {
9127
+ function ma(r) {
9043
9128
  return r.map(Number.parseFloat).map((e) => Number.isNaN(e) ? null : e);
9044
9129
  }
9045
- function P(r) {
9046
- return r && Ys(r), r && r.textContent;
9130
+ function _(r) {
9131
+ return r && Xs(r), r && r.textContent;
9047
9132
  }
9048
9133
  function rr(r, e) {
9049
9134
  const t = {};
9050
9135
  let n, a;
9051
9136
  for (a = 0; a < e.length; a++)
9052
- n = k(r, e[a]), n && (t[e[a]] = P(n) ?? "");
9137
+ n = k(r, e[a]), n && (t[e[a]] = _(n) ?? "");
9053
9138
  return t;
9054
9139
  }
9055
- function ma(r) {
9056
- return ya(r.replace(/\s*/g, "").split(","));
9140
+ function ha(r) {
9141
+ return ma(r.replace(/\s*/g, "").split(","));
9057
9142
  }
9058
- function yn(r) {
9143
+ function mn(r) {
9059
9144
  const e = r.replace(/^\s*|\s*$/g, "").split(/\s+/), t = [];
9060
- for (const n of e) t.push(ma(n));
9145
+ for (const n of e) t.push(ha(n));
9061
9146
  return t;
9062
9147
  }
9063
- function ha(r) {
9064
- const e = [dn(r, "lon"), dn(r, "lat")], t = k(r, "ele"), n = k(r, "gpxtpx:hr") || k(r, "hr"), a = k(r, "time");
9148
+ function ga(r) {
9149
+ const e = [yn(r, "lon"), yn(r, "lat")], t = k(r, "ele"), n = k(r, "gpxtpx:hr") || k(r, "hr"), a = k(r, "time");
9065
9150
  let o;
9066
- return t && (o = Number.parseFloat(P(t) ?? "0"), Number.isNaN(o) || e.push(o)), {
9151
+ return t && (o = Number.parseFloat(_(t) ?? "0"), Number.isNaN(o) || e.push(o)), {
9067
9152
  coordinates: e,
9068
- time: a ? P(a) : null,
9069
- heartRate: n !== null ? Number.parseFloat(P(n) ?? "0") : null
9153
+ time: a ? _(a) : null,
9154
+ heartRate: n !== null ? Number.parseFloat(_(n) ?? "0") : null
9070
9155
  };
9071
9156
  }
9072
- function Xs(r) {
9157
+ function Qs(r) {
9073
9158
  let e = r;
9074
9159
  try {
9075
- typeof e == "string" && (e = Cr(e));
9160
+ typeof e == "string" && (e = Ar(e));
9076
9161
  } catch {
9077
9162
  return null;
9078
9163
  }
9079
9164
  try {
9080
- return ca(e);
9165
+ return pa(e);
9081
9166
  } catch {
9082
9167
  }
9083
9168
  try {
9084
- return pa(e);
9169
+ return fa(e);
9085
9170
  } catch {
9086
9171
  }
9087
9172
  return null;
@@ -9090,14 +9175,14 @@ function ot(r) {
9090
9175
  const e = r.toString(16);
9091
9176
  return e.length === 1 ? `0${e}` : e;
9092
9177
  }
9093
- function Qs(r) {
9178
+ function el(r) {
9094
9179
  return `#${ot(r[0])}${ot(r[1])}${ot(r[2])}${r.length === 4 ? ot(r[3]) : ""}`;
9095
9180
  }
9096
9181
  class x extends Array {
9097
9182
  constructor(t = {}) {
9098
9183
  super();
9099
- M(this, "min", 0);
9100
- M(this, "max", 1);
9184
+ L(this, "min", 0);
9185
+ L(this, "max", 1);
9101
9186
  "min" in t && (this.min = t.min), "max" in t && (this.max = t.max), "stops" in t && this.setStops(t.stops, { clone: !1 });
9102
9187
  }
9103
9188
  /**
@@ -9186,7 +9271,7 @@ class x extends Array {
9186
9271
  smooth: !0,
9187
9272
  withAlpha: !1
9188
9273
  }) {
9189
- return Qs(this.getColor(t, n));
9274
+ return el(this.getColor(t, n));
9190
9275
  }
9191
9276
  /**
9192
9277
  * Get the color of the color ramp at a relative position in [0, 1]
@@ -9273,7 +9358,7 @@ class x extends Array {
9273
9358
  return this[0].color.length === 4 && this[0].color[3] === 0;
9274
9359
  }
9275
9360
  }
9276
- const ga = {
9361
+ const va = {
9277
9362
  /**
9278
9363
  * A fully transparent [0, 0, 0, 0] colorramp to hide data.
9279
9364
  * Defined in interval [0, 1], without unit.
@@ -10029,8 +10114,8 @@ const ga = {
10029
10114
  ]
10030
10115
  })
10031
10116
  };
10032
- async function el(r, e = {}) {
10033
- const t = e.download ?? !1, n = await tl(r);
10117
+ async function tl(r, e = {}) {
10118
+ const t = e.download ?? !1, n = await rl(r);
10034
10119
  if (t) {
10035
10120
  const a = e.filename ?? "maptiler_screenshot.png", o = document.createElement("a");
10036
10121
  o.style.display = "none", document.body.appendChild(o), o.href = URL.createObjectURL(n), o.download = a, o.click(), setTimeout(() => {
@@ -10039,7 +10124,7 @@ async function el(r, e = {}) {
10039
10124
  }
10040
10125
  return n;
10041
10126
  }
10042
- function tl(r) {
10127
+ function rl(r) {
10043
10128
  return new Promise((e, t) => {
10044
10129
  r.redraw(), r.once("idle", () => {
10045
10130
  r.getCanvas().toBlob((n) => {
@@ -10050,7 +10135,7 @@ function tl(r) {
10050
10135
  });
10051
10136
  });
10052
10137
  }
10053
- const mn = [
10138
+ const hn = [
10054
10139
  // https://colorhunt.co/palette/1d5b79468b97ef6262f3aa60
10055
10140
  ["#1D5B79", "#468B97", "#EF6262", "#F3AA60"],
10056
10141
  // https://colorhunt.co/palette/614bc333bbc585e6c5c8ffe0
@@ -10070,16 +10155,16 @@ const mn = [
10070
10155
  // https://colorhunt.co/palette/10a19d540375ff7000ffbf00
10071
10156
  ["#10A19D", "#540375", "#FF7000", "#FFBF00"]
10072
10157
  ];
10073
- function Tr() {
10074
- return mn[~~(Math.random() * mn.length)][~~(Math.random() * 4)];
10158
+ function Mr() {
10159
+ return hn[~~(Math.random() * hn.length)][~~(Math.random() * 4)];
10075
10160
  }
10076
10161
  function zt() {
10077
- return `maptiler_source_${xn()}`;
10162
+ return `maptiler_source_${kn()}`;
10078
10163
  }
10079
- function Pt() {
10080
- return `maptiler_layer_${xn()}`;
10164
+ function _t() {
10165
+ return `maptiler_layer_${kn()}`;
10081
10166
  }
10082
- function hn(r, e) {
10167
+ function gn(r, e) {
10083
10168
  if (e <= r[0].zoom)
10084
10169
  return r[0].value;
10085
10170
  if (e >= r[r.length - 1].zoom)
@@ -10094,10 +10179,10 @@ function hn(r, e) {
10094
10179
  function Me(r) {
10095
10180
  return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
10096
10181
  }
10097
- function _(r) {
10182
+ function P(r) {
10098
10183
  return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
10099
10184
  }
10100
- function rl(r, e) {
10185
+ function nl(r, e) {
10101
10186
  if (typeof e == "number" && typeof r == "number")
10102
10187
  return 2 * e + r;
10103
10188
  if (typeof e == "number" && Array.isArray(r))
@@ -10112,15 +10197,15 @@ function rl(r, e) {
10112
10197
  "interpolate",
10113
10198
  ["linear"],
10114
10199
  ["zoom"],
10115
- ...t.flatMap((n) => [n, 2 * hn(e, n) + hn(r, n)])
10200
+ ...t.flatMap((n) => [n, 2 * gn(e, n) + gn(r, n)])
10116
10201
  ];
10117
10202
  }
10118
10203
  return 0;
10119
10204
  }
10120
- function nl(r, e) {
10205
+ function al(r, e) {
10121
10206
  return ["interpolate", ["linear"], ["get", e], ...r.flatMap((t) => [t.propertyValue, t.value])];
10122
10207
  }
10123
- function va(r) {
10208
+ function ba(r) {
10124
10209
  const e = r.trimStart(), t = `${e}${" ".repeat(r.length - e.length)}`, n = Array.from(t);
10125
10210
  if (!n.every((s) => s === " " || s === "_"))
10126
10211
  throw new Error("A dash pattern must be composed only of whitespace and underscore characters.");
@@ -10133,10 +10218,10 @@ function va(r) {
10133
10218
  }
10134
10219
  return i;
10135
10220
  }
10136
- function gn(r, e) {
10221
+ function vn(r, e) {
10137
10222
  return ["interpolate", ["linear"], ["get", e], ...r.flatMap((t) => [t.value, t.color])];
10138
10223
  }
10139
- function vn(r, e, t = !0) {
10224
+ function bn(r, e, t = !0) {
10140
10225
  return t ? [
10141
10226
  "interpolate",
10142
10227
  ["linear"],
@@ -10153,7 +10238,7 @@ function vn(r, e, t = !0) {
10153
10238
  ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius])]
10154
10239
  ] : ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius])];
10155
10240
  }
10156
- function al(r, e, t = !0) {
10241
+ function ol(r, e, t = !0) {
10157
10242
  return t ? [
10158
10243
  "interpolate",
10159
10244
  ["linear"],
@@ -10170,7 +10255,7 @@ function al(r, e, t = !0) {
10170
10255
  ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value])]
10171
10256
  ] : ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value])];
10172
10257
  }
10173
- function bn(r, e) {
10258
+ function wn(r, e) {
10174
10259
  return r.every((t) => t.color[3] === r[0].color[3]) ? r[0].color[3] ? r[0].color[3] / 255 : 1 : [
10175
10260
  "interpolate",
10176
10261
  ["linear"],
@@ -10181,7 +10266,7 @@ function bn(r, e) {
10181
10266
  })
10182
10267
  ];
10183
10268
  }
10184
- function ol(r, e = 10) {
10269
+ function il(r, e = 10) {
10185
10270
  return [
10186
10271
  "interpolate",
10187
10272
  ["linear"],
@@ -10192,36 +10277,36 @@ function ol(r, e = 10) {
10192
10277
  }).flat()
10193
10278
  ];
10194
10279
  }
10195
- async function il(r, e, t = {}) {
10280
+ async function sl(r, e, t = {}) {
10196
10281
  var a, o;
10197
10282
  if (!e.sourceId && !e.data)
10198
10283
  throw new Error("Creating a polyline layer requires an existing .sourceId or a valid .data property");
10199
10284
  let n = e.data;
10200
10285
  if (typeof n == "string") {
10201
10286
  if (ht(n))
10202
- n = `https://api.maptiler.com/data/${e.data}/features.json?key=${B.apiKey}`;
10287
+ n = `https://api.maptiler.com/data/${e.data}/features.json?key=${F.apiKey}`;
10203
10288
  else if (((a = n.split(".").pop()) == null ? void 0 : a.toLowerCase().trim()) === "gpx") {
10204
10289
  const s = await (await fetch(n, t)).text();
10205
- n = ca(s);
10290
+ n = pa(s);
10206
10291
  } else if (((o = n.split(".").pop()) == null ? void 0 : o.toLowerCase().trim()) === "kml") {
10207
10292
  const s = await (await fetch(n, t)).text();
10208
- n = pa(s);
10293
+ n = fa(s);
10209
10294
  } else {
10210
- const i = co(n) ?? Xs(n);
10295
+ const i = co(n) ?? Qs(n);
10211
10296
  i && (n = i);
10212
10297
  }
10213
10298
  if (!n)
10214
10299
  throw new Error("Polyline data was provided as string but is incompatible with valid formats.");
10215
10300
  }
10216
- return sl(r, {
10301
+ return ll(r, {
10217
10302
  ...e,
10218
10303
  data: n
10219
10304
  });
10220
10305
  }
10221
- function sl(r, e) {
10306
+ function ll(r, e) {
10222
10307
  if (e.layerId && r.getLayer(e.layerId))
10223
10308
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
10224
- const t = e.sourceId ?? zt(), n = e.layerId ?? Pt(), a = {
10309
+ const t = e.sourceId ?? zt(), n = e.layerId ?? _t(), a = {
10225
10310
  polylineLayerId: n,
10226
10311
  polylineOutlineLayerId: "",
10227
10312
  polylineSourceId: t
@@ -10230,10 +10315,10 @@ function sl(r, e) {
10230
10315
  type: "geojson",
10231
10316
  data: e.data
10232
10317
  });
10233
- const o = e.lineWidth ?? 3, i = e.lineColor ?? Tr(), s = e.lineOpacity ?? 1, l = e.lineBlur ?? 0, u = e.lineGapWidth ?? 0;
10318
+ const o = e.lineWidth ?? 3, i = e.lineColor ?? Mr(), s = e.lineOpacity ?? 1, l = e.lineBlur ?? 0, u = e.lineGapWidth ?? 0;
10234
10319
  let c = e.lineDashArray ?? null;
10235
10320
  const p = e.outlineWidth ?? 1, m = e.outlineColor ?? "#FFFFFF", f = e.outlineOpacity ?? 1, d = e.outlineBlur ?? 0;
10236
- if (typeof c == "string" && (c = va(c)), e.outline === !0) {
10321
+ if (typeof c == "string" && (c = ba(c)), e.outline === !0) {
10237
10322
  const y = `${n}_outline`;
10238
10323
  a.polylineOutlineLayerId = y, r.addLayer(
10239
10324
  {
@@ -10247,10 +10332,10 @@ function sl(r, e) {
10247
10332
  minzoom: e.minzoom ?? 0,
10248
10333
  maxzoom: e.maxzoom ?? 23,
10249
10334
  paint: {
10250
- "line-opacity": typeof f == "number" ? f : _(f),
10335
+ "line-opacity": typeof f == "number" ? f : P(f),
10251
10336
  "line-color": typeof m == "string" ? m : Me(m),
10252
- "line-width": rl(o, p),
10253
- "line-blur": typeof d == "number" ? d : _(d)
10337
+ "line-width": nl(o, p),
10338
+ "line-blur": typeof d == "number" ? d : P(d)
10254
10339
  }
10255
10340
  },
10256
10341
  e.beforeId
@@ -10268,11 +10353,11 @@ function sl(r, e) {
10268
10353
  minzoom: e.minzoom ?? 0,
10269
10354
  maxzoom: e.maxzoom ?? 23,
10270
10355
  paint: {
10271
- "line-opacity": typeof s == "number" ? s : _(s),
10356
+ "line-opacity": typeof s == "number" ? s : P(s),
10272
10357
  "line-color": typeof i == "string" ? i : Me(i),
10273
- "line-width": typeof o == "number" ? o : _(o),
10274
- "line-blur": typeof l == "number" ? l : _(l),
10275
- "line-gap-width": typeof u == "number" ? u : _(u),
10358
+ "line-width": typeof o == "number" ? o : P(o),
10359
+ "line-blur": typeof l == "number" ? l : P(l),
10360
+ "line-gap-width": typeof u == "number" ? u : P(u),
10276
10361
  // For some reasons passing "line-dasharray" with the value "undefined"
10277
10362
  // results in no showing the line while it should have the same behavior
10278
10363
  // of not adding the property "line-dasharray" as all.
@@ -10284,24 +10369,24 @@ function sl(r, e) {
10284
10369
  e.beforeId
10285
10370
  ), a;
10286
10371
  }
10287
- function ll(r, e) {
10372
+ function ul(r, e) {
10288
10373
  if (e.layerId && r.getLayer(e.layerId))
10289
10374
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
10290
- const t = e.sourceId ?? zt(), n = e.layerId ?? Pt(), a = {
10375
+ const t = e.sourceId ?? zt(), n = e.layerId ?? _t(), a = {
10291
10376
  polygonLayerId: n,
10292
10377
  polygonOutlineLayerId: e.outline ? `${n}_outline` : "",
10293
10378
  polygonSourceId: t
10294
10379
  };
10295
10380
  if (e.data && !r.getSource(t)) {
10296
10381
  let y = e.data;
10297
- typeof y == "string" && ht(y) && (y = `https://api.maptiler.com/data/${y}/features.json?key=${B.apiKey}`), r.addSource(t, {
10382
+ typeof y == "string" && ht(y) && (y = `https://api.maptiler.com/data/${y}/features.json?key=${F.apiKey}`), r.addSource(t, {
10298
10383
  type: "geojson",
10299
10384
  data: y
10300
10385
  });
10301
10386
  }
10302
10387
  let o = e.outlineDashArray ?? null;
10303
- const i = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? Tr(), p = e.fillOpacity ?? 1, m = e.outlinePosition ?? "center", f = e.pattern ?? null;
10304
- typeof o == "string" && (o = va(o));
10388
+ const i = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? Mr(), p = e.fillOpacity ?? 1, m = e.outlinePosition ?? "center", f = e.pattern ?? null;
10389
+ typeof o == "string" && (o = ba(o));
10305
10390
  const d = (y = null) => {
10306
10391
  if (r.addLayer(
10307
10392
  {
@@ -10312,7 +10397,7 @@ function ll(r, e) {
10312
10397
  maxzoom: e.maxzoom ?? 23,
10313
10398
  paint: {
10314
10399
  "fill-color": typeof c == "string" ? c : Me(c),
10315
- "fill-opacity": typeof p == "number" ? p : _(p),
10400
+ "fill-opacity": typeof p == "number" ? p : P(p),
10316
10401
  // Adding a pattern if provided
10317
10402
  ...y && { "fill-pattern": y }
10318
10403
  }
@@ -10320,12 +10405,12 @@ function ll(r, e) {
10320
10405
  e.beforeId
10321
10406
  ), e.outline === !0) {
10322
10407
  let v;
10323
- m === "inside" ? typeof i == "number" ? v = 0.5 * i : v = _(
10408
+ m === "inside" ? typeof i == "number" ? v = 0.5 * i : v = P(
10324
10409
  i.map(({ zoom: w, value: b }) => ({
10325
10410
  zoom: w,
10326
10411
  value: 0.5 * b
10327
10412
  }))
10328
- ) : m === "outside" ? typeof i == "number" ? v = -0.5 * i : v = _(
10413
+ ) : m === "outside" ? typeof i == "number" ? v = -0.5 * i : v = P(
10329
10414
  i.map((w) => ({
10330
10415
  zoom: w.zoom,
10331
10416
  value: -0.5 * w.value
@@ -10342,10 +10427,10 @@ function ll(r, e) {
10342
10427
  minzoom: e.minzoom ?? 0,
10343
10428
  maxzoom: e.maxzoom ?? 23,
10344
10429
  paint: {
10345
- "line-opacity": typeof l == "number" ? l : _(l),
10430
+ "line-opacity": typeof l == "number" ? l : P(l),
10346
10431
  "line-color": typeof s == "string" ? s : Me(s),
10347
- "line-width": typeof i == "number" ? i : _(i),
10348
- "line-blur": typeof u == "number" ? u : _(u),
10432
+ "line-width": typeof i == "number" ? i : P(i),
10433
+ "line-blur": typeof u == "number" ? u : P(u),
10349
10434
  "line-offset": v,
10350
10435
  // For some reasons passing "line-dasharray" with the value "undefined"
10351
10436
  // results in no showing the line while it should have the same behavior
@@ -10365,17 +10450,17 @@ function ll(r, e) {
10365
10450
  r.addImage(f, y.data), d(f);
10366
10451
  }).catch((y) => (console.error("Could not load the pattern image.", y.message), d())) : d(), a;
10367
10452
  }
10368
- function ul(r, e) {
10453
+ function cl(r, e) {
10369
10454
  if (e.layerId && r.getLayer(e.layerId))
10370
10455
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
10371
- const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : ga.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ?? zt(), u = e.layerId ?? Pt(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, m = e.outline ?? !1, f = e.outlineOpacity ?? 1, d = e.outlineWidth ?? 1, y = e.outlineColor ?? "#FFFFFF";
10456
+ const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : va.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ?? zt(), u = e.layerId ?? _t(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, m = e.outline ?? !1, f = e.outlineOpacity ?? 1, d = e.outlineWidth ?? 1, y = e.outlineColor ?? "#FFFFFF";
10372
10457
  let v;
10373
- const w = e.zoomCompensation ?? !0, b = e.minzoom ?? 0, A = e.maxzoom ?? 23;
10374
- typeof e.pointOpacity == "number" ? v = e.pointOpacity : Array.isArray(e.pointOpacity) ? v = _(e.pointOpacity) : e.cluster ? v = bn(i, "point_count") : e.property ? v = bn(i, e.property) : v = _([
10458
+ const w = e.zoomCompensation ?? !0, b = e.minzoom ?? 0, T = e.maxzoom ?? 23;
10459
+ typeof e.pointOpacity == "number" ? v = e.pointOpacity : Array.isArray(e.pointOpacity) ? v = P(e.pointOpacity) : e.cluster ? v = wn(i, "point_count") : e.property ? v = wn(i, e.property) : v = P([
10375
10460
  { zoom: b, value: 0 },
10376
10461
  { zoom: b + 0.25, value: 1 },
10377
- { zoom: A - 0.25, value: 1 },
10378
- { zoom: A, value: 0 }
10462
+ { zoom: T - 0.25, value: 1 },
10463
+ { zoom: T, value: 0 }
10379
10464
  ]);
10380
10465
  const j = {
10381
10466
  pointLayerId: u,
@@ -10384,16 +10469,16 @@ function ul(r, e) {
10384
10469
  pointSourceId: l
10385
10470
  };
10386
10471
  if (e.data && !r.getSource(l)) {
10387
- let $ = e.data;
10388
- typeof $ == "string" && ht($) && ($ = `https://api.maptiler.com/data/${$}/features.json?key=${B.apiKey}`), r.addSource(l, {
10472
+ let R = e.data;
10473
+ typeof R == "string" && ht(R) && (R = `https://api.maptiler.com/data/${R}/features.json?key=${F.apiKey}`), r.addSource(l, {
10389
10474
  type: "geojson",
10390
- data: $,
10475
+ data: R,
10391
10476
  cluster: a
10392
10477
  });
10393
10478
  }
10394
10479
  if (a) {
10395
10480
  j.clusterLayerId = `${u}_cluster`;
10396
- const $ = Array.from({ length: o }, (ae, we) => {
10481
+ const R = Array.from({ length: o }, (ae, we) => {
10397
10482
  const De = s.min + we * (s.max - s.min) / (o - 1);
10398
10483
  return {
10399
10484
  value: De,
@@ -10409,20 +10494,20 @@ function ul(r, e) {
10409
10494
  filter: ["has", "point_count"],
10410
10495
  paint: {
10411
10496
  // 'circle-color': options.pointColor ?? colorDrivenByProperty(clusterStyle, "point_count"),
10412
- "circle-color": typeof e.pointColor == "string" ? e.pointColor : gn($, "point_count"),
10413
- "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? _(e.pointRadius) : vn($, "point_count", !1),
10497
+ "circle-color": typeof e.pointColor == "string" ? e.pointColor : vn(R, "point_count"),
10498
+ "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? P(e.pointRadius) : bn(R, "point_count", !1),
10414
10499
  "circle-pitch-alignment": p ? "viewport" : "map",
10415
10500
  "circle-pitch-scale": "map",
10416
10501
  // scale with camera distance regardless of viewport/biewport alignement
10417
10502
  "circle-opacity": v,
10418
10503
  ...m && {
10419
- "circle-stroke-opacity": typeof f == "number" ? f : _(f),
10420
- "circle-stroke-width": typeof d == "number" ? d : _(d),
10504
+ "circle-stroke-opacity": typeof f == "number" ? f : P(f),
10505
+ "circle-stroke-width": typeof d == "number" ? d : P(d),
10421
10506
  "circle-stroke-color": typeof y == "string" ? y : Me(y)
10422
10507
  }
10423
10508
  },
10424
10509
  minzoom: b,
10425
- maxzoom: A
10510
+ maxzoom: T
10426
10511
  },
10427
10512
  e.beforeId
10428
10513
  ), r.addLayer(
@@ -10437,27 +10522,27 @@ function ul(r, e) {
10437
10522
  // scale with camera distance regardless of viewport/biewport alignement
10438
10523
  // 'circle-color': options.pointColor ?? clusterStyle[0].color,
10439
10524
  "circle-color": typeof e.pointColor == "string" ? e.pointColor : i.getColorHex(i.getBounds().min),
10440
- "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? _(e.pointRadius) : $[0].pointRadius * 0.75,
10525
+ "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? P(e.pointRadius) : R[0].pointRadius * 0.75,
10441
10526
  "circle-opacity": v,
10442
10527
  ...m && {
10443
- "circle-stroke-opacity": typeof f == "number" ? f : _(f),
10444
- "circle-stroke-width": typeof d == "number" ? d : _(d),
10528
+ "circle-stroke-opacity": typeof f == "number" ? f : P(f),
10529
+ "circle-stroke-width": typeof d == "number" ? d : P(d),
10445
10530
  "circle-stroke-color": typeof y == "string" ? y : Me(y)
10446
10531
  }
10447
10532
  },
10448
10533
  minzoom: b,
10449
- maxzoom: A
10534
+ maxzoom: T
10450
10535
  },
10451
10536
  e.beforeId
10452
10537
  );
10453
10538
  } else {
10454
- let $ = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : Tr(), ae = typeof e.pointRadius == "number" ? w ? _([
10539
+ let R = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : Mr(), ae = typeof e.pointRadius == "number" ? w ? P([
10455
10540
  { zoom: 0, value: e.pointRadius * 0.025 },
10456
10541
  { zoom: 2, value: e.pointRadius * 0.05 },
10457
10542
  { zoom: 4, value: e.pointRadius * 0.1 },
10458
10543
  { zoom: 8, value: e.pointRadius * 0.25 },
10459
10544
  { zoom: 16, value: e.pointRadius * 1 }
10460
- ]) : e.pointRadius : Array.isArray(e.pointRadius) ? _(e.pointRadius) : w ? _([
10545
+ ]) : e.pointRadius : Array.isArray(e.pointRadius) ? P(e.pointRadius) : w ? P([
10461
10546
  { zoom: 0, value: t * 0.05 },
10462
10547
  { zoom: 2, value: t * 0.1 },
10463
10548
  { zoom: 4, value: t * 0.2 },
@@ -10473,7 +10558,7 @@ function ul(r, e) {
10473
10558
  color: typeof e.pointColor == "string" ? e.pointColor : i.getColorHex(tt)
10474
10559
  };
10475
10560
  });
10476
- $ = gn(we, e.property), ae = vn(we, e.property, w);
10561
+ R = vn(we, e.property), ae = bn(we, e.property, w);
10477
10562
  }
10478
10563
  r.addLayer(
10479
10564
  {
@@ -10488,24 +10573,24 @@ function ul(r, e) {
10488
10573
  "circle-pitch-alignment": p ? "viewport" : "map",
10489
10574
  "circle-pitch-scale": "map",
10490
10575
  // scale with camera distance regardless of viewport/biewport alignement
10491
- "circle-color": $,
10576
+ "circle-color": R,
10492
10577
  "circle-opacity": v,
10493
10578
  "circle-radius": ae,
10494
10579
  ...m && {
10495
- "circle-stroke-opacity": typeof f == "number" ? f : _(f),
10496
- "circle-stroke-width": typeof d == "number" ? d : _(d),
10580
+ "circle-stroke-opacity": typeof f == "number" ? f : P(f),
10581
+ "circle-stroke-width": typeof d == "number" ? d : P(d),
10497
10582
  "circle-stroke-color": typeof y == "string" ? y : Me(y)
10498
10583
  }
10499
10584
  },
10500
10585
  minzoom: b,
10501
- maxzoom: A
10586
+ maxzoom: T
10502
10587
  },
10503
10588
  e.beforeId
10504
10589
  );
10505
10590
  }
10506
10591
  if (c !== !1 && (e.cluster || e.property)) {
10507
10592
  j.labelLayerId = `${u}_label`;
10508
- const $ = e.labelColor ?? "#fff", ae = e.labelSize ?? 12;
10593
+ const R = e.labelColor ?? "#fff", ae = e.labelSize ?? 12;
10509
10594
  r.addLayer(
10510
10595
  {
10511
10596
  id: j.labelLayerId,
@@ -10521,27 +10606,27 @@ function ul(r, e) {
10521
10606
  // so that the largest value goes on top
10522
10607
  },
10523
10608
  paint: {
10524
- "text-color": $,
10609
+ "text-color": R,
10525
10610
  "text-opacity": v
10526
10611
  },
10527
10612
  minzoom: b,
10528
- maxzoom: A
10613
+ maxzoom: T
10529
10614
  },
10530
10615
  e.beforeId
10531
10616
  );
10532
10617
  }
10533
10618
  return j;
10534
10619
  }
10535
- function cl(r, e) {
10620
+ function pl(r, e) {
10536
10621
  if (e.layerId && r.getLayer(e.layerId))
10537
10622
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
10538
- const t = e.sourceId ?? zt(), n = e.layerId ?? Pt(), a = e.minzoom ?? 0, o = e.maxzoom ?? 23, i = e.zoomCompensation ?? !0, s = e.opacity ?? [
10623
+ const t = e.sourceId ?? zt(), n = e.layerId ?? _t(), a = e.minzoom ?? 0, o = e.maxzoom ?? 23, i = e.zoomCompensation ?? !0, s = e.opacity ?? [
10539
10624
  { zoom: a, value: 0 },
10540
10625
  { zoom: a + 0.25, value: 1 },
10541
10626
  { zoom: o - 0.25, value: 1 },
10542
10627
  { zoom: o, value: 0 }
10543
10628
  ];
10544
- let l = Array.isArray(e.colorRamp) ? e.colorRamp : ga.TURBO.transparentStart();
10629
+ let l = Array.isArray(e.colorRamp) ? e.colorRamp : va.TURBO.transparentStart();
10545
10630
  const u = l.getBounds();
10546
10631
  (u.min !== 0 || u.max !== 1) && (l = l.scale(0, 1)), l.hasTransparentStart() || (l = l.transparentStart());
10547
10632
  const c = e.intensity ?? [
@@ -10552,7 +10637,7 @@ function cl(r, e) {
10552
10637
  let f = 1;
10553
10638
  p ? typeof m == "number" ? (f = m, typeof e.weight == "number" && console.warn(
10554
10639
  "The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`"
10555
- )) : Array.isArray(m) ? f = nl(m, p) : console.warn(
10640
+ )) : Array.isArray(m) ? f = al(m, p) : console.warn(
10556
10641
  "The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`"
10557
10642
  ) : typeof m == "number" ? f = m : Array.isArray(m) && console.warn("The options `.propertyValueWeights` can only be used when `.property` is provided.");
10558
10643
  const d = [
@@ -10563,14 +10648,14 @@ function cl(r, e) {
10563
10648
  { zoom: 16, value: 50 }
10564
10649
  ], y = e.radius ?? (i ? d : 10);
10565
10650
  let v = 1;
10566
- typeof y == "number" ? v = y : Array.isArray(y) && "zoom" in y[0] ? v = _(y) : p && Array.isArray(y) && "propertyValue" in y[0] ? v = al(y, p, i) : !p && Array.isArray(y) && "propertyValue" in y[0] ? (v = _(d), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : v = _(d);
10651
+ typeof y == "number" ? v = y : Array.isArray(y) && "zoom" in y[0] ? v = P(y) : p && Array.isArray(y) && "propertyValue" in y[0] ? v = ol(y, p, i) : !p && Array.isArray(y) && "propertyValue" in y[0] ? (v = P(d), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : v = P(d);
10567
10652
  const w = {
10568
10653
  heatmapLayerId: n,
10569
10654
  heatmapSourceId: t
10570
10655
  };
10571
10656
  if (e.data && !r.getSource(t)) {
10572
10657
  let b = e.data;
10573
- typeof b == "string" && ht(b) && (b = `https://api.maptiler.com/data/${b}/features.json?key=${B.apiKey}`), r.addSource(t, {
10658
+ typeof b == "string" && ht(b) && (b = `https://api.maptiler.com/data/${b}/features.json?key=${F.apiKey}`), r.addSource(t, {
10574
10659
  type: "geojson",
10575
10660
  data: b
10576
10661
  });
@@ -10584,185 +10669,185 @@ function cl(r, e) {
10584
10669
  maxzoom: o,
10585
10670
  paint: {
10586
10671
  "heatmap-weight": f,
10587
- "heatmap-intensity": typeof c == "number" ? c : _(c),
10588
- "heatmap-color": ol(l),
10672
+ "heatmap-intensity": typeof c == "number" ? c : P(c),
10673
+ "heatmap-color": il(l),
10589
10674
  "heatmap-radius": v,
10590
- "heatmap-opacity": typeof s == "number" ? s : _(s)
10675
+ "heatmap-opacity": typeof s == "number" ? s : P(s)
10591
10676
  }
10592
10677
  },
10593
10678
  e.beforeId
10594
10679
  ), w;
10595
10680
  }
10596
- const Fl = {
10597
- addPolyline: il,
10598
- addPolygon: ll,
10599
- addPoint: ul,
10600
- addHeatmap: cl,
10601
- takeScreenshot: el
10681
+ const Ol = {
10682
+ addPolyline: sl,
10683
+ addPolygon: ul,
10684
+ addPoint: cl,
10685
+ addHeatmap: pl,
10686
+ takeScreenshot: tl
10602
10687
  };
10603
10688
  lo();
10604
- function Ol() {
10605
- return eo.version;
10606
- }
10607
- const Dl = S.Map, ql = S.Marker, Bl = S.Popup, Ul = S.Style, Vl = S.CanvasSource, Gl = S.GeoJSONSource, Hl = S.ImageSource, Kl = S.RasterTileSource, Wl = S.RasterDEMTileSource, Zl = S.VectorTileSource, Jl = S.VideoSource, Yl = S.NavigationControl, Xl = S.GeolocateControl, Ql = S.AttributionControl, eu = S.LogoControl, tu = S.ScaleControl, ru = S.FullscreenControl, nu = S.TerrainControl, au = S.BoxZoomHandler, ou = S.ScrollZoomHandler, iu = S.CooperativeGesturesHandler, su = S.KeyboardHandler, lu = S.TwoFingersTouchPitchHandler, uu = S.MapWheelEvent, cu = S.MapTouchEvent, pu = S.MapMouseEvent, fu = S.config, du = S.getVersion, {
10608
- setRTLTextPlugin: yu,
10609
- getRTLTextPluginStatus: mu,
10610
- LngLat: hu,
10611
- LngLatBounds: gu,
10612
- MercatorCoordinate: vu,
10613
- Evented: bu,
10614
- AJAXError: wu,
10615
- prewarm: Su,
10616
- clearPrewarmedResources: xu,
10617
- Hash: ku,
10618
- Point: Lu,
10619
- EdgeInsets: Cu,
10620
- DragRotateHandler: Au,
10621
- DragPanHandler: Tu,
10622
- TwoFingersTouchZoomRotateHandler: Mu,
10623
- DoubleClickZoomHandler: Iu,
10624
- TwoFingersTouchZoomHandler: Eu,
10625
- TwoFingersTouchRotateHandler: zu,
10689
+ function Dl() {
10690
+ return Sn.version;
10691
+ }
10692
+ const ql = S.Map, Ul = S.Marker, Bl = S.Popup, Vl = S.Style, Gl = S.CanvasSource, Hl = S.GeoJSONSource, Kl = S.ImageSource, Wl = S.RasterTileSource, Zl = S.RasterDEMTileSource, Jl = S.VectorTileSource, Yl = S.VideoSource, Xl = S.NavigationControl, Ql = S.GeolocateControl, eu = S.AttributionControl, tu = S.LogoControl, ru = S.ScaleControl, nu = S.FullscreenControl, au = S.TerrainControl, ou = S.BoxZoomHandler, iu = S.ScrollZoomHandler, su = S.CooperativeGesturesHandler, lu = S.KeyboardHandler, uu = S.TwoFingersTouchPitchHandler, cu = S.MapWheelEvent, pu = S.MapTouchEvent, fu = S.MapMouseEvent, du = S.config, yu = S.getVersion, {
10693
+ setRTLTextPlugin: mu,
10694
+ getRTLTextPluginStatus: hu,
10695
+ LngLat: gu,
10696
+ LngLatBounds: vu,
10697
+ MercatorCoordinate: bu,
10698
+ Evented: wu,
10699
+ AJAXError: Su,
10700
+ prewarm: xu,
10701
+ clearPrewarmedResources: ku,
10702
+ Hash: Lu,
10703
+ Point: Cu,
10704
+ EdgeInsets: Au,
10705
+ DragRotateHandler: Tu,
10706
+ DragPanHandler: Mu,
10707
+ TwoFingersTouchZoomRotateHandler: Iu,
10708
+ DoubleClickZoomHandler: Eu,
10709
+ TwoFingersTouchZoomHandler: zu,
10710
+ TwoFingersTouchRotateHandler: _u,
10626
10711
  getWorkerCount: Pu,
10627
- setWorkerCount: _u,
10712
+ setWorkerCount: Ru,
10628
10713
  getMaxParallelImageRequests: $u,
10629
- setMaxParallelImageRequests: Ru,
10630
- getWorkerUrl: ju,
10631
- setWorkerUrl: Nu,
10632
- addSourceType: Fu,
10633
- importScriptInWorkers: Ou,
10634
- addProtocol: Du,
10635
- removeProtocol: qu
10714
+ setMaxParallelImageRequests: ju,
10715
+ getWorkerUrl: Nu,
10716
+ setWorkerUrl: Fu,
10717
+ addSourceType: Ou,
10718
+ importScriptInWorkers: Du,
10719
+ addProtocol: qu,
10720
+ removeProtocol: Uu
10636
10721
  } = S;
10637
10722
  export {
10638
- wu as AJAXError,
10639
- Ml as AttributionControl,
10640
- Ql as AttributionControlMLGL,
10641
- El as BoxZoomHandler,
10642
- au as BoxZoomHandlerMLGL,
10643
- Sl as CanvasSource,
10644
- Vl as CanvasSourceMLGL,
10723
+ Su as AJAXError,
10724
+ Il as AttributionControl,
10725
+ eu as AttributionControlMLGL,
10726
+ zl as BoxZoomHandler,
10727
+ ou as BoxZoomHandlerMLGL,
10728
+ xl as CanvasSource,
10729
+ Gl as CanvasSourceMLGL,
10645
10730
  x as ColorRamp,
10646
- ga as ColorRampCollection,
10731
+ va as ColorRampCollection,
10647
10732
  Pl as CooperativeGesturesHandler,
10648
- iu as CooperativeGesturesHandlerMLGL,
10649
- Iu as DoubleClickZoomHandler,
10650
- Tu as DragPanHandler,
10651
- Au as DragRotateHandler,
10652
- Cu as EdgeInsets,
10653
- bu as Evented,
10733
+ su as CooperativeGesturesHandlerMLGL,
10734
+ Eu as DoubleClickZoomHandler,
10735
+ Mu as DragPanHandler,
10736
+ Tu as DragRotateHandler,
10737
+ Au as EdgeInsets,
10738
+ wu as Evented,
10654
10739
  Ao as FullscreenControl,
10655
- ru as FullscreenControlMLGL,
10656
- xl as GeoJSONSource,
10657
- Gl as GeoJSONSourceMLGL,
10740
+ nu as FullscreenControlMLGL,
10741
+ kl as GeoJSONSource,
10742
+ Hl as GeoJSONSourceMLGL,
10658
10743
  ko as GeolocateControl,
10659
- Xl as GeolocateControlMLGL,
10660
- Us as GeolocationType,
10661
- ku as Hash,
10662
- kl as ImageSource,
10663
- Hl as ImageSourceMLGL,
10664
- _l as KeyboardHandler,
10665
- su as KeyboardHandlerMLGL,
10744
+ Ql as GeolocateControlMLGL,
10745
+ Vs as GeolocationType,
10746
+ Lu as Hash,
10747
+ Ll as ImageSource,
10748
+ Kl as ImageSourceMLGL,
10749
+ Rl as KeyboardHandler,
10750
+ lu as KeyboardHandlerMLGL,
10666
10751
  E as Language,
10667
- hu as LngLat,
10668
- gu as LngLatBounds,
10752
+ gu as LngLat,
10753
+ vu as LngLatBounds,
10669
10754
  Lo as LogoControl,
10670
- eu as LogoControlMLGL,
10671
- Vs as Map,
10672
- Dl as MapMLGL,
10673
- Nl as MapMouseEvent,
10674
- pu as MapMouseEventMLGL,
10675
- Vu as MapStyle,
10676
- Gu as MapStyleVariant,
10677
- jl as MapTouchEvent,
10678
- cu as MapTouchEventMLGL,
10679
- Rl as MapWheelEvent,
10680
- uu as MapWheelEventMLGL,
10755
+ tu as LogoControlMLGL,
10756
+ Gs as Map,
10757
+ ql as MapMLGL,
10758
+ Fl as MapMouseEvent,
10759
+ fu as MapMouseEventMLGL,
10760
+ Gu as MapStyle,
10761
+ Hu as MapStyleVariant,
10762
+ Nl as MapTouchEvent,
10763
+ pu as MapTouchEventMLGL,
10764
+ jl as MapWheelEvent,
10765
+ cu as MapWheelEventMLGL,
10681
10766
  qs as MaptilerGeolocateControl,
10682
- Fr as MaptilerLogoControl,
10767
+ Or as MaptilerLogoControl,
10683
10768
  Os as MaptilerNavigationControl,
10684
- Bs as MaptilerProjectionControl,
10769
+ Us as MaptilerProjectionControl,
10685
10770
  Fs as MaptilerTerrainControl,
10686
- gl as Marker,
10687
- ql as MarkerMLGL,
10688
- vu as MercatorCoordinate,
10689
- Yl as NavigationControMLGL,
10771
+ vl as Marker,
10772
+ Ul as MarkerMLGL,
10773
+ bu as MercatorCoordinate,
10774
+ Xl as NavigationControMLGL,
10690
10775
  xo as NavigationControl,
10691
- Lu as Point,
10692
- bl as Popup,
10776
+ Cu as Point,
10777
+ wl as Popup,
10693
10778
  Bl as PopupMLGL,
10694
- Cl as RasterDEMTileSource,
10695
- Wl as RasterDEMTileSourceMLGL,
10696
- Ll as RasterTileSource,
10697
- Kl as RasterTileSourceMLGL,
10698
- Hu as ReferenceMapStyle,
10779
+ Al as RasterDEMTileSource,
10780
+ Zl as RasterDEMTileSourceMLGL,
10781
+ Cl as RasterTileSource,
10782
+ Wl as RasterTileSourceMLGL,
10783
+ Ku as ReferenceMapStyle,
10699
10784
  Co as ScaleControl,
10700
- tu as ScaleControlMLGL,
10701
- zl as ScrollZoomHandler,
10702
- ou as ScrollZoomHandlerMLGL,
10785
+ ru as ScaleControlMLGL,
10786
+ _l as ScrollZoomHandler,
10787
+ iu as ScrollZoomHandlerMLGL,
10703
10788
  to as SdkConfig,
10704
- Ku as ServiceError,
10705
- wl as Style,
10706
- Ul as StyleMLGL,
10707
- nu as TerrainControMLGL,
10708
- Il as TerrainControl,
10789
+ Wu as ServiceError,
10790
+ Sl as Style,
10791
+ Vl as StyleMLGL,
10792
+ au as TerrainControMLGL,
10793
+ El as TerrainControl,
10709
10794
  $l as TwoFingersTouchPitchHandler,
10710
- lu as TwoFingersTouchPitchHandlerMLGL,
10711
- zu as TwoFingersTouchRotateHandler,
10712
- Eu as TwoFingersTouchZoomHandler,
10713
- Mu as TwoFingersTouchZoomRotateHandler,
10714
- Al as VectorTileSource,
10715
- Zl as VectorTileSourceMLGL,
10716
- Tl as VideoSource,
10717
- Jl as VideoSourceMLGL,
10718
- Du as addProtocol,
10719
- Fu as addSourceType,
10720
- Wu as areSameLanguages,
10721
- Zu as bufferToPixelDataBrowser,
10722
- Ju as circumferenceAtLatitude,
10723
- xu as clearPrewarmedResources,
10724
- B as config,
10725
- fu as configMLGL,
10726
- Yu as coordinates,
10727
- Xu as data,
10728
- Qu as elevation,
10729
- ec as expandMapStyle,
10730
- tc as geocoding,
10731
- rc as geolocation,
10732
- nc as getAutoLanguage,
10795
+ uu as TwoFingersTouchPitchHandlerMLGL,
10796
+ _u as TwoFingersTouchRotateHandler,
10797
+ zu as TwoFingersTouchZoomHandler,
10798
+ Iu as TwoFingersTouchZoomRotateHandler,
10799
+ Tl as VectorTileSource,
10800
+ Jl as VectorTileSourceMLGL,
10801
+ Ml as VideoSource,
10802
+ Yl as VideoSourceMLGL,
10803
+ qu as addProtocol,
10804
+ Ou as addSourceType,
10805
+ Zu as areSameLanguages,
10806
+ Ju as bufferToPixelDataBrowser,
10807
+ Yu as circumferenceAtLatitude,
10808
+ ku as clearPrewarmedResources,
10809
+ F as config,
10810
+ du as configMLGL,
10811
+ Xu as coordinates,
10812
+ Qu as data,
10813
+ ec as elevation,
10814
+ tc as expandMapStyle,
10815
+ rc as geocoding,
10816
+ nc as geolocation,
10817
+ ac as getAutoLanguage,
10733
10818
  Pr as getBrowserLanguage,
10734
- ac as getBufferToPixelDataParser,
10735
- oc as getLanguageInfoFromCode,
10736
- ic as getLanguageInfoFromFlag,
10737
- sc as getLanguageInfoFromKey,
10738
- du as getMapLibreVersion,
10819
+ oc as getBufferToPixelDataParser,
10820
+ ic as getLanguageInfoFromCode,
10821
+ sc as getLanguageInfoFromFlag,
10822
+ lc as getLanguageInfoFromKey,
10823
+ yu as getMapLibreVersion,
10739
10824
  $u as getMaxParallelImageRequests,
10740
- mu as getRTLTextPluginStatus,
10741
- lc as getTileCache,
10742
- Ol as getVersion,
10825
+ hu as getRTLTextPluginStatus,
10826
+ uc as getTileCache,
10827
+ Dl as getVersion,
10743
10828
  po as getWebGLSupportError,
10744
10829
  Pu as getWorkerCount,
10745
- ju as getWorkerUrl,
10746
- ca as gpx,
10747
- Xs as gpxOrKml,
10748
- ua as hasChildNodeWithName,
10749
- Fl as helpers,
10750
- Ou as importScriptInWorkers,
10751
- uc as isLanguageInfo,
10752
- pa as kml,
10753
- cc as mapStylePresetList,
10754
- pc as math,
10755
- fc as misc,
10756
- Su as prewarm,
10757
- qu as removeProtocol,
10758
- Ru as setMaxParallelImageRequests,
10759
- yu as setRTLTextPlugin,
10760
- _u as setWorkerCount,
10761
- Nu as setWorkerUrl,
10762
- dc as staticMaps,
10763
- Cr as str2xml,
10764
- yc as styleToStyle,
10765
- mc as toLanguageInfo,
10766
- cn as xml2str
10830
+ Nu as getWorkerUrl,
10831
+ pa as gpx,
10832
+ Qs as gpxOrKml,
10833
+ ca as hasChildNodeWithName,
10834
+ Ol as helpers,
10835
+ Du as importScriptInWorkers,
10836
+ cc as isLanguageInfo,
10837
+ fa as kml,
10838
+ pc as mapStylePresetList,
10839
+ fc as math,
10840
+ dc as misc,
10841
+ xu as prewarm,
10842
+ Uu as removeProtocol,
10843
+ ju as setMaxParallelImageRequests,
10844
+ mu as setRTLTextPlugin,
10845
+ Ru as setWorkerCount,
10846
+ Fu as setWorkerUrl,
10847
+ yc as staticMaps,
10848
+ Ar as str2xml,
10849
+ mc as styleToStyle,
10850
+ hc as toLanguageInfo,
10851
+ pn as xml2str
10767
10852
  };
10768
10853
  //# sourceMappingURL=maptiler-sdk.mjs.map