@maptiler/sdk 3.5.1-rc6 → 3.6.1-rc1

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.
@@ -3,10 +3,10 @@ var fn = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
5
  var Eo = (r, e, t) => e in r ? Ao(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var S = (r, e, t) => Eo(r, typeof e != "symbol" ? e + "" : e, t), er = (r, e, t) => e.has(r) || fn("Cannot " + t);
7
- var P = (r, e, t) => (er(r, e, "read from private field"), t ? t.call(r) : e.get(r)), be = (r, e, t) => e.has(r) ? fn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), _e = (r, e, t, n) => (er(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), H = (r, e, t) => (er(r, e, "access private method"), t);
6
+ var S = (r, e, t) => Eo(r, typeof e != "symbol" ? e + "" : e, t), tr = (r, e, t) => e.has(r) || fn("Cannot " + t);
7
+ var P = (r, e, t) => (tr(r, e, "read from private field"), t ? t.call(r) : e.get(r)), be = (r, e, t) => e.has(r) ? fn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), _e = (r, e, t, n) => (tr(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), H = (r, e, t) => (tr(r, e, "access private method"), t);
8
8
  import k from "maplibre-gl";
9
- import { Language as To, getLanguageInfoFromCode as dn, config as tr, MapStyle as Qe, mapStylePresetList as rr, expandMapStyle as _o, MapStyleVariant as Io, ReferenceMapStyle as Mo, toLanguageInfo as hn, getLanguageInfoFromFlag as Po, geolocation as yn } from "@maptiler/client";
9
+ import { Language as To, getLanguageInfoFromCode as dn, config as rr, MapStyle as Qe, mapStylePresetList as nr, expandMapStyle as _o, MapStyleVariant as Io, ReferenceMapStyle as Mo, toLanguageInfo as hn, getLanguageInfoFromFlag as Po, geolocation as yn } from "@maptiler/client";
10
10
  import { MapStyle as Tp, MapStyleVariant as _p, ReferenceMapStyle as Ip, ServiceError as Mp, areSameLanguages as Pp, bufferToPixelDataBrowser as Rp, circumferenceAtLatitude as zp, coordinates as Fp, data as $p, elevation as Op, expandMapStyle as jp, geocoding as Np, geolocation as Dp, getAutoLanguage as Up, getBufferToPixelDataParser as Bp, getLanguageInfoFromCode as qp, getLanguageInfoFromFlag as Gp, getLanguageInfoFromKey as Vp, getTileCache as Hp, isLanguageInfo as Kp, mapStylePresetList as Xp, math as Zp, misc as Wp, staticMaps as Yp, styleToStyle as Jp, toLanguageInfo as Qp } from "@maptiler/client";
11
11
  import Ro from "events";
12
12
  import { v4 as zo } from "uuid";
@@ -149,7 +149,7 @@ class $o extends Ro {
149
149
  * Set the MapTiler Cloud API key
150
150
  */
151
151
  set apiKey(t) {
152
- this._apiKey = t, tr.apiKey = t, this.emit("apiKey", t);
152
+ this._apiKey = t, rr.apiKey = t, this.emit("apiKey", t);
153
153
  }
154
154
  /**
155
155
  * Get the MapTiler Cloud API key
@@ -161,13 +161,13 @@ class $o extends Ro {
161
161
  * Set a the custom fetch function to replace the default one
162
162
  */
163
163
  set fetch(t) {
164
- tr.fetch = t;
164
+ rr.fetch = t;
165
165
  }
166
166
  /**
167
167
  * Get the fetch fucntion
168
168
  */
169
169
  get fetch() {
170
- return tr.fetch;
170
+ return rr.fetch;
171
171
  }
172
172
  }
173
173
  const D = new $o(), Sr = "localcache_source", xr = "localcache", Oo = "maptiler_sdk", jo = 1e3, No = 100, kr = typeof caches < "u", { addProtocol: gn } = k;
@@ -180,9 +180,9 @@ function Do(r, e) {
180
180
  }
181
181
  return r.href;
182
182
  }
183
- let nr;
183
+ let ar;
184
184
  async function fa() {
185
- return nr || (nr = await caches.open(Oo)), nr;
185
+ return ar || (ar = await caches.open(Oo)), ar;
186
186
  }
187
187
  let vn = 0;
188
188
  async function Uo() {
@@ -267,7 +267,7 @@ function wn(r) {
267
267
  function da() {
268
268
  return Math.random().toString(36).substring(2);
269
269
  }
270
- function $t(r) {
270
+ function Ot(r) {
271
271
  return /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi.test(r);
272
272
  }
273
273
  function Vo(r) {
@@ -3577,7 +3577,7 @@ class g {
3577
3577
  this.message = (e ? `${e}: ` : "") + n, a && (this.identifier = a), t != null && t.__line__ && (this.line = t.__line__);
3578
3578
  }
3579
3579
  }
3580
- function Et(r, ...e) {
3580
+ function Tt(r, ...e) {
3581
3581
  for (const t of e)
3582
3582
  for (const n in t)
3583
3583
  r[n] = t[n];
@@ -3608,7 +3608,7 @@ class Nr {
3608
3608
  return this.bindings[e] ? !0 : this.parent ? this.parent.has(e) : !1;
3609
3609
  }
3610
3610
  }
3611
- const Ot = { kind: "null" }, b = { kind: "number" }, I = { kind: "string" }, _ = { kind: "boolean" }, de = { kind: "color" }, jt = { kind: "projectionDefinition" }, Re = { kind: "object" }, T = { kind: "value" }, Ki = { kind: "error" }, Nt = { kind: "collator" }, Dt = { kind: "formatted" }, Ut = { kind: "padding" }, nt = { kind: "colorArray" }, Bt = { kind: "numberArray" }, ft = { kind: "resolvedImage" }, qt = { kind: "variableAnchorOffsetCollection" };
3611
+ const jt = { kind: "null" }, b = { kind: "number" }, I = { kind: "string" }, _ = { kind: "boolean" }, de = { kind: "color" }, Nt = { kind: "projectionDefinition" }, Re = { kind: "object" }, T = { kind: "value" }, Ki = { kind: "error" }, Dt = { kind: "collator" }, Ut = { kind: "formatted" }, Bt = { kind: "padding" }, nt = { kind: "colorArray" }, qt = { kind: "numberArray" }, ft = { kind: "resolvedImage" }, Gt = { kind: "variableAnchorOffsetCollection" };
3612
3612
  function W(r, e) {
3613
3613
  return {
3614
3614
  kind: "array",
@@ -3624,20 +3624,20 @@ function j(r) {
3624
3624
  return r.kind;
3625
3625
  }
3626
3626
  const Xi = [
3627
- Ot,
3627
+ jt,
3628
3628
  b,
3629
3629
  I,
3630
3630
  _,
3631
3631
  de,
3632
- jt,
3633
- Dt,
3632
+ Nt,
3633
+ Ut,
3634
3634
  Re,
3635
3635
  W(T),
3636
- Ut,
3637
3636
  Bt,
3637
+ qt,
3638
3638
  nt,
3639
3639
  ft,
3640
- qt
3640
+ Gt
3641
3641
  ];
3642
3642
  function at(r, e) {
3643
3643
  if (e.kind === "error")
@@ -3670,33 +3670,33 @@ function ba(r) {
3670
3670
  return r = r % 360, r < 0 && (r += 360), r;
3671
3671
  }
3672
3672
  function wa([r, e, t, n]) {
3673
- r = ar(r), e = ar(e), t = ar(t);
3673
+ r = or(r), e = or(e), t = or(t);
3674
3674
  let a, o;
3675
- const i = or((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) / ya);
3676
- r === e && e === t ? a = o = i : (a = or((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) / ha), o = or((0.0139322 * r + 0.0971045 * e + 0.7141733 * t) / ma));
3675
+ const i = ir((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) / ya);
3676
+ r === e && e === t ? a = o = i : (a = ir((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) / ha), o = ir((0.0139322 * r + 0.0971045 * e + 0.7141733 * t) / ma));
3677
3677
  const s = 116 * i - 16;
3678
3678
  return [s < 0 ? 0 : s, 500 * (a - i), 200 * (i - o), n];
3679
3679
  }
3680
- function ar(r) {
3680
+ function or(r) {
3681
3681
  return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
3682
3682
  }
3683
- function or(r) {
3683
+ function ir(r) {
3684
3684
  return r > Zi ? Math.pow(r, 1 / 3) : r / va + ga;
3685
3685
  }
3686
3686
  function Sa([r, e, t, n]) {
3687
3687
  let a = (r + 16) / 116, o = isNaN(e) ? a : a + e / 500, i = isNaN(t) ? a : a - t / 200;
3688
- return a = ya * sr(a), o = ha * sr(o), i = ma * sr(i), [
3689
- ir(3.1338561 * o - 1.6168667 * a - 0.4906146 * i),
3688
+ return a = ya * lr(a), o = ha * lr(o), i = ma * lr(i), [
3689
+ sr(3.1338561 * o - 1.6168667 * a - 0.4906146 * i),
3690
3690
  // D50 -> sRGB
3691
- ir(-0.9787684 * o + 1.9161415 * a + 0.033454 * i),
3692
- ir(0.0719453 * o - 0.2289914 * a + 1.4052427 * i),
3691
+ sr(-0.9787684 * o + 1.9161415 * a + 0.033454 * i),
3692
+ sr(0.0719453 * o - 0.2289914 * a + 1.4052427 * i),
3693
3693
  n
3694
3694
  ];
3695
3695
  }
3696
- function ir(r) {
3696
+ function sr(r) {
3697
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;
3698
3698
  }
3699
- function sr(r) {
3699
+ function lr(r) {
3700
3700
  return r > qe ? r * r * r : va * (r - ga);
3701
3701
  }
3702
3702
  function Ji(r) {
@@ -3985,7 +3985,7 @@ function Le(r, e, t) {
3985
3985
  function Ve(r, e, t) {
3986
3986
  return r.map((n, a) => Le(n, e[a], t));
3987
3987
  }
3988
- class F {
3988
+ class $ {
3989
3989
  /**
3990
3990
  * @param r Red component premultiplied by `alpha` 0..1
3991
3991
  * @param g Green component premultiplied by `alpha` 0..1
@@ -4010,13 +4010,13 @@ class F {
4010
4010
  * @returns A `Color` instance, or `undefined` if the input is not a valid color string.
4011
4011
  */
4012
4012
  static parse(e) {
4013
- if (e instanceof F)
4013
+ if (e instanceof $)
4014
4014
  return e;
4015
4015
  if (typeof e != "string")
4016
4016
  return;
4017
4017
  const t = rs(e);
4018
4018
  if (t)
4019
- return new F(...t, !1);
4019
+ return new $(...t, !1);
4020
4020
  }
4021
4021
  /**
4022
4022
  * Used in color interpolation and by 'to-rgba' expression.
@@ -4085,7 +4085,7 @@ class F {
4085
4085
  switch (a) {
4086
4086
  case "rgb": {
4087
4087
  const [o, i, s, l] = Ve(e.rgb, t.rgb, n);
4088
- return new F(o, i, s, l, !1);
4088
+ return new $(o, i, s, l, !1);
4089
4089
  }
4090
4090
  case "hcl": {
4091
4091
  const [o, i, s, l] = e.hcl, [u, c, p, f] = t.hcl;
@@ -4100,19 +4100,19 @@ class F {
4100
4100
  Le(s, p, n),
4101
4101
  Le(l, f, n)
4102
4102
  ]);
4103
- return new F(y, m, w, v, !1);
4103
+ return new $(y, m, w, v, !1);
4104
4104
  }
4105
4105
  case "lab": {
4106
4106
  const [o, i, s, l] = Sa(Ve(e.lab, t.lab, n));
4107
- return new F(o, i, s, l, !1);
4107
+ return new $(o, i, s, l, !1);
4108
4108
  }
4109
4109
  }
4110
4110
  }
4111
4111
  }
4112
- F.black = new F(0, 0, 0, 1);
4113
- F.white = new F(1, 1, 1, 1);
4114
- F.transparent = new F(0, 0, 0, 0);
4115
- F.red = new F(1, 0, 0, 1);
4112
+ $.black = new $(0, 0, 0, 1);
4113
+ $.white = new $(1, 1, 1, 1);
4114
+ $.transparent = new $(0, 0, 0, 0);
4115
+ $.red = new $(1, 0, 0, 1);
4116
4116
  class Ur {
4117
4117
  constructor(e, t, n) {
4118
4118
  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" });
@@ -4227,7 +4227,7 @@ class X {
4227
4227
  if (e instanceof X)
4228
4228
  return e;
4229
4229
  if (typeof e == "string") {
4230
- const n = F.parse(e);
4230
+ const n = $.parse(e);
4231
4231
  return n ? new X([n]) : void 0;
4232
4232
  }
4233
4233
  if (!Array.isArray(e))
@@ -4236,7 +4236,7 @@ class X {
4236
4236
  for (const n of e) {
4237
4237
  if (typeof n != "string")
4238
4238
  return;
4239
- const a = F.parse(n);
4239
+ const a = $.parse(n);
4240
4240
  if (!a)
4241
4241
  return;
4242
4242
  t.push(a);
@@ -4251,7 +4251,7 @@ class X {
4251
4251
  if (e.values.length != t.values.length)
4252
4252
  throw new Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${t.values.length}), cannot interpolate.`);
4253
4253
  for (let i = 0; i < e.values.length; i++)
4254
- o.push(F.interpolate(e.values[i], t.values[i], n, a));
4254
+ o.push($.interpolate(e.values[i], t.values[i], n, a));
4255
4255
  return new X(o);
4256
4256
  }
4257
4257
  }
@@ -4331,7 +4331,7 @@ function xa(r, e, t, n) {
4331
4331
  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.`;
4332
4332
  }
4333
4333
  function ot(r) {
4334
- if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ie || r instanceof F || r instanceof Ur || r instanceof me || r instanceof Q || r instanceof ee || r instanceof X || r instanceof ue || r instanceof Ee)
4334
+ if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ie || r instanceof $ || r instanceof Ur || r instanceof me || r instanceof Q || r instanceof ee || r instanceof X || r instanceof ue || r instanceof Ee)
4335
4335
  return !0;
4336
4336
  if (Array.isArray(r)) {
4337
4337
  for (const e of r)
@@ -4348,29 +4348,29 @@ function ot(r) {
4348
4348
  }
4349
4349
  function B(r) {
4350
4350
  if (r === null)
4351
- return Ot;
4351
+ return jt;
4352
4352
  if (typeof r == "string")
4353
4353
  return I;
4354
4354
  if (typeof r == "boolean")
4355
4355
  return _;
4356
4356
  if (typeof r == "number")
4357
4357
  return b;
4358
- if (r instanceof F)
4358
+ if (r instanceof $)
4359
4359
  return de;
4360
4360
  if (r instanceof ie)
4361
- return jt;
4362
- if (r instanceof Ur)
4363
4361
  return Nt;
4364
- if (r instanceof me)
4362
+ if (r instanceof Ur)
4365
4363
  return Dt;
4366
- if (r instanceof Q)
4364
+ if (r instanceof me)
4367
4365
  return Ut;
4368
- if (r instanceof ee)
4366
+ if (r instanceof Q)
4369
4367
  return Bt;
4368
+ if (r instanceof ee)
4369
+ return qt;
4370
4370
  if (r instanceof X)
4371
4371
  return nt;
4372
4372
  if (r instanceof ue)
4373
- return qt;
4373
+ return Gt;
4374
4374
  if (r instanceof Ee)
4375
4375
  return ft;
4376
4376
  if (Array.isArray(r)) {
@@ -4393,7 +4393,7 @@ function B(r) {
4393
4393
  }
4394
4394
  function tt(r) {
4395
4395
  const e = typeof r;
4396
- return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof F || r instanceof ie || r instanceof me || r instanceof Q || r instanceof ee || r instanceof X || r instanceof ue || r instanceof Ee ? r.toString() : JSON.stringify(r);
4396
+ return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof $ || r instanceof ie || r instanceof me || r instanceof Q || r instanceof ee || r instanceof X || r instanceof ue || r instanceof Ee ? r.toString() : JSON.stringify(r);
4397
4397
  }
4398
4398
  class He {
4399
4399
  constructor(e, t) {
@@ -4514,14 +4514,14 @@ class ke {
4514
4514
  case "color": {
4515
4515
  let t, n;
4516
4516
  for (const a of this.args) {
4517
- if (t = a.evaluate(e), n = null, t instanceof F)
4517
+ if (t = a.evaluate(e), n = null, t instanceof $)
4518
4518
  return t;
4519
4519
  if (typeof t == "string") {
4520
4520
  const o = e.parseColor(t);
4521
4521
  if (o)
4522
4522
  return o;
4523
4523
  } else if (Array.isArray(t) && (t.length < 3 || t.length > 4 ? n = `Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.` : n = xa(t[0], t[1], t[2], t[3]), !n))
4524
- return new F(t[0] / 255, t[1] / 255, t[2] / 255, t[3]);
4524
+ return new $(t[0] / 255, t[1] / 255, t[2] / 255, t[3]);
4525
4525
  }
4526
4526
  throw new N(n || `Could not parse color from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
4527
4527
  }
@@ -4615,10 +4615,10 @@ class ka {
4615
4615
  }
4616
4616
  parseColor(e) {
4617
4617
  let t = this._parseColorCache.get(e);
4618
- return t || (t = F.parse(e), this._parseColorCache.set(e, t)), t;
4618
+ return t || (t = $.parse(e), this._parseColorCache.set(e, t)), t;
4619
4619
  }
4620
4620
  }
4621
- class Gt {
4621
+ class Vt {
4622
4622
  constructor(e, t, n = [], a, o = new Nr(), i = []) {
4623
4623
  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;
4624
4624
  }
@@ -4680,7 +4680,7 @@ class Gt {
4680
4680
  */
4681
4681
  concat(e, t, n) {
4682
4682
  const a = typeof e == "number" ? this.path.concat(e) : this.path, o = n ? this.scope.concat(n) : this.scope;
4683
- return new Gt(this.registry, this._isConstant, a, t || null, o, this.errors);
4683
+ return new Vt(this.registry, this._isConstant, a, t || null, o, this.errors);
4684
4684
  }
4685
4685
  /**
4686
4686
  * Push a parsing (or type checking) error into the `this.errors`
@@ -4705,7 +4705,7 @@ class Gt {
4705
4705
  return n && this.error(n), n;
4706
4706
  }
4707
4707
  }
4708
- class Vt {
4708
+ class Ht {
4709
4709
  constructor(e, t) {
4710
4710
  this.type = t.type, this.bindings = [].concat(e), this.result = t;
4711
4711
  }
@@ -4733,13 +4733,13 @@ class Vt {
4733
4733
  n.push([i, s]);
4734
4734
  }
4735
4735
  const a = t.parse(e[e.length - 1], e.length - 1, t.expectedType, n);
4736
- return a ? new Vt(n, a) : null;
4736
+ return a ? new Ht(n, a) : null;
4737
4737
  }
4738
4738
  outputDefined() {
4739
4739
  return this.result.outputDefined();
4740
4740
  }
4741
4741
  }
4742
- class Ht {
4742
+ class Kt {
4743
4743
  constructor(e, t) {
4744
4744
  this.type = t.type, this.name = e, this.boundExpression = t;
4745
4745
  }
@@ -4747,7 +4747,7 @@ class Ht {
4747
4747
  if (e.length !== 2 || typeof e[1] != "string")
4748
4748
  return t.error("'var' expression requires exactly one string literal argument.");
4749
4749
  const n = e[1];
4750
- return t.scope.has(n) ? new Ht(n, t.scope.get(n)) : t.error(`Unknown variable "${n}". Make sure "${n}" has been bound in an enclosing "let" expression before using it.`, 1);
4750
+ return t.scope.has(n) ? new Kt(n, t.scope.get(n)) : t.error(`Unknown variable "${n}". Make sure "${n}" has been bound in an enclosing "let" expression before using it.`, 1);
4751
4751
  }
4752
4752
  evaluate(e) {
4753
4753
  return this.boundExpression.evaluate(e);
@@ -4796,7 +4796,7 @@ class qr {
4796
4796
  if (e.length !== 3)
4797
4797
  return t.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
4798
4798
  const n = t.parse(e[1], 1, T), a = t.parse(e[2], 2, T);
4799
- return !n || !a ? null : Dr(n.type, [_, I, b, Ot, T]) ? new qr(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${j(n.type)} instead`);
4799
+ return !n || !a ? null : Dr(n.type, [_, I, b, jt, T]) ? new qr(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${j(n.type)} instead`);
4800
4800
  }
4801
4801
  evaluate(e) {
4802
4802
  const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
@@ -4815,7 +4815,7 @@ class qr {
4815
4815
  return !0;
4816
4816
  }
4817
4817
  }
4818
- class Tt {
4818
+ class _t {
4819
4819
  constructor(e, t, n) {
4820
4820
  this.type = b, this.needle = e, this.haystack = t, this.fromIndex = n;
4821
4821
  }
@@ -4825,13 +4825,13 @@ class Tt {
4825
4825
  const n = t.parse(e[1], 1, T), a = t.parse(e[2], 2, T);
4826
4826
  if (!n || !a)
4827
4827
  return null;
4828
- if (!Dr(n.type, [_, I, b, Ot, T]))
4828
+ if (!Dr(n.type, [_, I, b, jt, T]))
4829
4829
  return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${j(n.type)} instead`);
4830
4830
  if (e.length === 4) {
4831
4831
  const o = t.parse(e[3], 3, b);
4832
- return o ? new Tt(n, a, o) : null;
4832
+ return o ? new _t(n, a, o) : null;
4833
4833
  } else
4834
- return new Tt(n, a);
4834
+ return new _t(n, a);
4835
4835
  }
4836
4836
  evaluate(e) {
4837
4837
  const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
@@ -4953,7 +4953,7 @@ class Vr {
4953
4953
  return this.branches.every(([e, t]) => t.outputDefined()) && this.otherwise.outputDefined();
4954
4954
  }
4955
4955
  }
4956
- class _t {
4956
+ class It {
4957
4957
  constructor(e, t, n, a) {
4958
4958
  this.type = e, this.input = t, this.beginIndex = n, this.endIndex = a;
4959
4959
  }
@@ -4967,9 +4967,9 @@ class _t {
4967
4967
  return t.error(`Expected first argument to be of type array or string, but found ${j(n.type)} instead`);
4968
4968
  if (e.length === 4) {
4969
4969
  const o = t.parse(e[3], 3, b);
4970
- return o ? new _t(n.type, n, a, o) : null;
4970
+ return o ? new It(n.type, n, a, o) : null;
4971
4971
  } else
4972
- return new _t(n.type, n, a);
4972
+ return new It(n.type, n, a);
4973
4973
  }
4974
4974
  evaluate(e) {
4975
4975
  const t = this.input.evaluate(e), n = this.beginIndex.evaluate(e);
@@ -5001,7 +5001,7 @@ function Ca(r, e) {
5001
5001
  throw new N("Input is not a number.");
5002
5002
  return 0;
5003
5003
  }
5004
- class Kt {
5004
+ class Xt {
5005
5005
  constructor(e, t, n) {
5006
5006
  this.type = e, this.input = t, this.labels = [], this.outputs = [];
5007
5007
  for (const [a, o] of n)
@@ -5029,7 +5029,7 @@ class Kt {
5029
5029
  return null;
5030
5030
  o = o || p.type, a.push([s, p]);
5031
5031
  }
5032
- return new Kt(o, n, a);
5032
+ return new Xt(o, n, a);
5033
5033
  }
5034
5034
  evaluate(e) {
5035
5035
  const t = this.labels, n = this.outputs;
@@ -5056,10 +5056,10 @@ class Kt {
5056
5056
  function ss(r) {
5057
5057
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
5058
5058
  }
5059
- var lr, An;
5059
+ var ur, An;
5060
5060
  function ls() {
5061
- if (An) return lr;
5062
- An = 1, lr = r;
5061
+ if (An) return ur;
5062
+ An = 1, ur = r;
5063
5063
  function r(e, t, n, a) {
5064
5064
  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;
5065
5065
  }
@@ -5091,7 +5091,7 @@ function ls() {
5091
5091
  solve: function(e, t) {
5092
5092
  return this.sampleCurveY(this.solveCurveX(e, t));
5093
5093
  }
5094
- }, lr;
5094
+ }, ur;
5095
5095
  }
5096
5096
  var us = ls(), cs = /* @__PURE__ */ ss(us);
5097
5097
  class he {
@@ -5103,12 +5103,12 @@ class he {
5103
5103
  static interpolationFactor(e, t, n, a) {
5104
5104
  let o = 0;
5105
5105
  if (e.name === "exponential")
5106
- o = ur(t, e.base, n, a);
5106
+ o = cr(t, e.base, n, a);
5107
5107
  else if (e.name === "linear")
5108
- o = ur(t, 1, n, a);
5108
+ o = cr(t, 1, n, a);
5109
5109
  else if (e.name === "cubic-bezier") {
5110
5110
  const i = e.controlPoints;
5111
- o = new cs(i[0], i[1], i[2], i[3]).solve(ur(t, 1, n, a));
5111
+ o = new cs(i[0], i[1], i[2], i[3]).solve(cr(t, 1, n, a));
5112
5112
  }
5113
5113
  return o;
5114
5114
  }
@@ -5156,7 +5156,7 @@ class he {
5156
5156
  return null;
5157
5157
  l = l || h.type, s.push([c, h]);
5158
5158
  }
5159
- return !we(l, b) && !we(l, jt) && !we(l, de) && !we(l, Ut) && !we(l, Bt) && !we(l, nt) && !we(l, qt) && !we(l, W(b)) ? t.error(`Type ${j(l)} is not interpolatable.`) : new he(l, n, a, o, s);
5159
+ return !we(l, b) && !we(l, Nt) && !we(l, de) && !we(l, Bt) && !we(l, qt) && !we(l, nt) && !we(l, Gt) && !we(l, W(b)) ? t.error(`Type ${j(l)} is not interpolatable.`) : new he(l, n, a, o, s);
5160
5160
  }
5161
5161
  evaluate(e) {
5162
5162
  const t = this.labels, n = this.outputs;
@@ -5175,7 +5175,7 @@ class he {
5175
5175
  case "number":
5176
5176
  return Le(c, p, u);
5177
5177
  case "color":
5178
- return F.interpolate(c, p, u);
5178
+ return $.interpolate(c, p, u);
5179
5179
  case "padding":
5180
5180
  return Q.interpolate(c, p, u);
5181
5181
  case "colorArray":
@@ -5192,14 +5192,14 @@ class he {
5192
5192
  case "interpolate-hcl":
5193
5193
  switch (this.type.kind) {
5194
5194
  case "color":
5195
- return F.interpolate(c, p, u, "hcl");
5195
+ return $.interpolate(c, p, u, "hcl");
5196
5196
  case "colorArray":
5197
5197
  return X.interpolate(c, p, u, "hcl");
5198
5198
  }
5199
5199
  case "interpolate-lab":
5200
5200
  switch (this.type.kind) {
5201
5201
  case "color":
5202
- return F.interpolate(c, p, u, "lab");
5202
+ return $.interpolate(c, p, u, "lab");
5203
5203
  case "colorArray":
5204
5204
  return X.interpolate(c, p, u, "lab");
5205
5205
  }
@@ -5214,11 +5214,11 @@ class he {
5214
5214
  return this.outputs.every((e) => e.outputDefined());
5215
5215
  }
5216
5216
  }
5217
- function ur(r, e, t, n) {
5217
+ function cr(r, e, t, n) {
5218
5218
  const a = n - t, o = r - t;
5219
5219
  return a === 0 ? 0 : e === 1 ? o / a : (Math.pow(e, o) - 1) / (Math.pow(e, a) - 1);
5220
5220
  }
5221
- F.interpolate, Q.interpolate, ee.interpolate, X.interpolate, ue.interpolate;
5221
+ $.interpolate, Q.interpolate, ee.interpolate, X.interpolate, ue.interpolate;
5222
5222
  class it {
5223
5223
  constructor(e, t) {
5224
5224
  this.type = e, this.args = t;
@@ -5320,7 +5320,7 @@ function Xe(r, e, t) {
5320
5320
  if (o.length === 4) {
5321
5321
  if (l.type.kind !== "string" && u.type.kind !== "string" && l.type.kind !== "value" && u.type.kind !== "value")
5322
5322
  return i.error("Cannot use collator to compare non-string types.");
5323
- if (c = i.parse(o[3], 3, Nt), !c)
5323
+ if (c = i.parse(o[3], 3, Dt), !c)
5324
5324
  return null;
5325
5325
  }
5326
5326
  return new Aa(l, u, c);
@@ -5348,9 +5348,9 @@ function Xe(r, e, t) {
5348
5348
  };
5349
5349
  }
5350
5350
  const xs = Xe("==", ps, La), ks = Xe("!=", fs, gs), Cs = Xe("<", ds, vs), Ls = Xe(">", hs, bs), As = Xe("<=", ys, ws), Es = Xe(">=", ms, Ss);
5351
- class Xt {
5351
+ class Zt {
5352
5352
  constructor(e, t, n) {
5353
- this.type = Nt, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
5353
+ this.type = Dt, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
5354
5354
  }
5355
5355
  static parse(e, t) {
5356
5356
  if (e.length !== 2)
@@ -5365,7 +5365,7 @@ class Xt {
5365
5365
  if (!o)
5366
5366
  return null;
5367
5367
  let i = null;
5368
- return n.locale && (i = t.parse(n.locale, 1, I), !i) ? null : new Xt(a, o, i);
5368
+ return n.locale && (i = t.parse(n.locale, 1, I), !i) ? null : new Zt(a, o, i);
5369
5369
  }
5370
5370
  evaluate(e) {
5371
5371
  return new Ur(this.caseSensitive.evaluate(e), this.diacriticSensitive.evaluate(e), this.locale ? this.locale.evaluate(e) : null);
@@ -5419,7 +5419,7 @@ class Hr {
5419
5419
  }
5420
5420
  class Kr {
5421
5421
  constructor(e) {
5422
- this.type = Dt, this.sections = e;
5422
+ this.type = Ut, this.sections = e;
5423
5423
  }
5424
5424
  static parse(e, t) {
5425
5425
  if (e.length < 2)
@@ -5558,14 +5558,14 @@ function zs(r, e, t) {
5558
5558
  const n = r[0] - e[0], a = r[1] - e[1], o = r[0] - t[0], i = r[1] - t[1];
5559
5559
  return n * i - o * a === 0 && n * o <= 0 && a * i <= 0;
5560
5560
  }
5561
- function Zt(r, e, t, n) {
5561
+ function Wt(r, e, t, n) {
5562
5562
  const a = [e[0] - r[0], e[1] - r[1]], o = [n[0] - t[0], n[1] - t[1]];
5563
5563
  return js(o, a) === 0 ? !1 : !!(Tn(r, e, t, n) && Tn(t, n, r, e));
5564
5564
  }
5565
5565
  function Fs(r, e, t) {
5566
5566
  for (const n of t)
5567
5567
  for (let a = 0; a < n.length - 1; ++a)
5568
- if (Zt(r, e, n[a], n[a + 1]))
5568
+ if (Wt(r, e, n[a], n[a + 1]))
5569
5569
  return !0;
5570
5570
  return !1;
5571
5571
  }
@@ -5862,7 +5862,7 @@ const Lr = 100, Ar = 50;
5862
5862
  function Ma(r, e) {
5863
5863
  return e[0] - r[0];
5864
5864
  }
5865
- function It(r) {
5865
+ function Mt(r) {
5866
5866
  return r[1] - r[0] + 1;
5867
5867
  }
5868
5868
  function ve(r, e) {
@@ -5871,7 +5871,7 @@ function ve(r, e) {
5871
5871
  function Er(r, e) {
5872
5872
  if (r[0] > r[1])
5873
5873
  return [null, null];
5874
- const t = It(r);
5874
+ const t = Mt(r);
5875
5875
  if (e) {
5876
5876
  if (t === 2)
5877
5877
  return [r, null];
@@ -5929,7 +5929,7 @@ function Vs(r, e, t, n, a) {
5929
5929
  const l = r[s], u = r[s + 1];
5930
5930
  for (let c = n[0]; c < n[1]; ++c) {
5931
5931
  const p = t[c], f = t[c + 1];
5932
- if (Zt(l, u, p, f))
5932
+ if (Wt(l, u, p, f))
5933
5933
  return 0;
5934
5934
  i = Math.min(i, en(l, u, p, f, a));
5935
5935
  }
@@ -5972,7 +5972,7 @@ function Xs(r, e, t, n) {
5972
5972
  for (const l of t)
5973
5973
  for (let u = 0, c = l.length, p = c - 1; u < c; p = u++) {
5974
5974
  const f = l[p], d = l[u];
5975
- if (Zt(i, s, f, d))
5975
+ if (Wt(i, s, f, d))
5976
5976
  return 0;
5977
5977
  a = Math.min(a, en(i, s, f, d, n));
5978
5978
  }
@@ -6002,7 +6002,7 @@ function Zs(r, e, t, n = 1 / 0) {
6002
6002
  for (const d of e)
6003
6003
  for (let h = 0, y = d.length, m = y - 1; h < y; m = h++) {
6004
6004
  const w = d[m], v = d[h];
6005
- if (Zt(p, f, w, v))
6005
+ if (Wt(p, f, w, v))
6006
6006
  return 0;
6007
6007
  i = Math.min(i, en(p, f, w, v, t));
6008
6008
  }
@@ -6021,7 +6021,7 @@ function St(r, e, t, n, a, o, i) {
6021
6021
  const s = Qr(Tr(n, o), Tr(a, i), t);
6022
6022
  s < e && r.push([s, o, i]);
6023
6023
  }
6024
- function Mt(r, e, t, n, a = 1 / 0) {
6024
+ function Pt(r, e, t, n, a = 1 / 0) {
6025
6025
  let o = Math.min(n.distance(r[0], t[0][0]), a);
6026
6026
  if (o === 0)
6027
6027
  return o;
@@ -6031,7 +6031,7 @@ function Mt(r, e, t, n, a = 1 / 0) {
6031
6031
  if (l[0] >= o)
6032
6032
  continue;
6033
6033
  const u = l[1], c = e ? Ar : Lr;
6034
- if (It(u) <= c) {
6034
+ if (Mt(u) <= c) {
6035
6035
  if (!ve(u, r.length))
6036
6036
  return NaN;
6037
6037
  if (e) {
@@ -6052,7 +6052,7 @@ function Mt(r, e, t, n, a = 1 / 0) {
6052
6052
  }
6053
6053
  return o;
6054
6054
  }
6055
- function Pt(r, e, t, n, a, o = 1 / 0) {
6055
+ function Rt(r, e, t, n, a, o = 1 / 0) {
6056
6056
  let i = Math.min(o, a.distance(r[0], t[0]));
6057
6057
  if (i === 0)
6058
6058
  return i;
@@ -6062,7 +6062,7 @@ function Pt(r, e, t, n, a, o = 1 / 0) {
6062
6062
  if (l[0] >= i)
6063
6063
  continue;
6064
6064
  const u = l[1], c = l[2], p = e ? Ar : Lr, f = n ? Ar : Lr;
6065
- if (It(u) <= p && It(c) <= f) {
6065
+ if (Mt(u) <= p && Mt(c) <= f) {
6066
6066
  if (!ve(u, r.length) && ve(c, t.length))
6067
6067
  return NaN;
6068
6068
  let d;
@@ -6096,13 +6096,13 @@ function Ws(r, e) {
6096
6096
  for (const i of e) {
6097
6097
  switch (i.type) {
6098
6098
  case "Point":
6099
- o = Math.min(o, Pt(n, !1, [i.coordinates], !1, a, o));
6099
+ o = Math.min(o, Rt(n, !1, [i.coordinates], !1, a, o));
6100
6100
  break;
6101
6101
  case "LineString":
6102
- o = Math.min(o, Pt(n, !1, i.coordinates, !0, a, o));
6102
+ o = Math.min(o, Rt(n, !1, i.coordinates, !0, a, o));
6103
6103
  break;
6104
6104
  case "Polygon":
6105
- o = Math.min(o, Mt(n, !1, i.coordinates, a, o));
6105
+ o = Math.min(o, Pt(n, !1, i.coordinates, a, o));
6106
6106
  break;
6107
6107
  }
6108
6108
  if (o === 0)
@@ -6119,13 +6119,13 @@ function Ys(r, e) {
6119
6119
  for (const i of e) {
6120
6120
  switch (i.type) {
6121
6121
  case "Point":
6122
- o = Math.min(o, Pt(n, !0, [i.coordinates], !1, a, o));
6122
+ o = Math.min(o, Rt(n, !0, [i.coordinates], !1, a, o));
6123
6123
  break;
6124
6124
  case "LineString":
6125
- o = Math.min(o, Pt(n, !0, i.coordinates, !0, a, o));
6125
+ o = Math.min(o, Rt(n, !0, i.coordinates, !0, a, o));
6126
6126
  break;
6127
6127
  case "Polygon":
6128
- o = Math.min(o, Mt(n, !0, i.coordinates, a, o));
6128
+ o = Math.min(o, Pt(n, !0, i.coordinates, a, o));
6129
6129
  break;
6130
6130
  }
6131
6131
  if (o === 0)
@@ -6143,10 +6143,10 @@ function Js(r, e) {
6143
6143
  for (const s of n) {
6144
6144
  switch (i.type) {
6145
6145
  case "Point":
6146
- o = Math.min(o, Mt([i.coordinates], !1, s, a, o));
6146
+ o = Math.min(o, Pt([i.coordinates], !1, s, a, o));
6147
6147
  break;
6148
6148
  case "LineString":
6149
- o = Math.min(o, Mt(i.coordinates, !0, s, a, o));
6149
+ o = Math.min(o, Pt(i.coordinates, !0, s, a, o));
6150
6150
  break;
6151
6151
  case "Polygon":
6152
6152
  o = Math.min(o, Zs(s, i.coordinates, a, o));
@@ -6157,7 +6157,7 @@ function Js(r, e) {
6157
6157
  }
6158
6158
  return o;
6159
6159
  }
6160
- function cr(r) {
6160
+ function pr(r) {
6161
6161
  return r.type === "MultiPolygon" ? r.coordinates.map((e) => ({
6162
6162
  type: "Polygon",
6163
6163
  coordinates: e
@@ -6179,11 +6179,11 @@ class $e {
6179
6179
  if (ot(e[1])) {
6180
6180
  const n = e[1];
6181
6181
  if (n.type === "FeatureCollection")
6182
- return new $e(n, n.features.map((a) => cr(a.geometry)).flat());
6182
+ return new $e(n, n.features.map((a) => pr(a.geometry)).flat());
6183
6183
  if (n.type === "Feature")
6184
- return new $e(n, cr(n.geometry));
6184
+ return new $e(n, pr(n.geometry));
6185
6185
  if ("type" in n && "coordinates" in n)
6186
- return new $e(n, cr(n));
6186
+ return new $e(n, pr(n));
6187
6187
  }
6188
6188
  return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.");
6189
6189
  }
@@ -6238,29 +6238,29 @@ const tn = {
6238
6238
  boolean: se,
6239
6239
  case: Vr,
6240
6240
  coalesce: it,
6241
- collator: Xt,
6241
+ collator: Zt,
6242
6242
  format: Kr,
6243
6243
  image: Xr,
6244
6244
  in: qr,
6245
- "index-of": Tt,
6245
+ "index-of": _t,
6246
6246
  interpolate: he,
6247
6247
  "interpolate-hcl": he,
6248
6248
  "interpolate-lab": he,
6249
6249
  length: Zr,
6250
- let: Vt,
6250
+ let: Ht,
6251
6251
  literal: He,
6252
6252
  match: Gr,
6253
6253
  number: se,
6254
6254
  "number-format": Hr,
6255
6255
  object: se,
6256
- slice: _t,
6257
- step: Kt,
6256
+ slice: It,
6257
+ step: Xt,
6258
6258
  string: se,
6259
6259
  "to-boolean": ke,
6260
6260
  "to-color": ke,
6261
6261
  "to-number": ke,
6262
6262
  "to-string": ke,
6263
- var: Ht,
6263
+ var: Kt,
6264
6264
  within: Fe,
6265
6265
  distance: $e,
6266
6266
  "global-state": ht
@@ -6286,7 +6286,7 @@ class le {
6286
6286
  u.length === e.length - 1);
6287
6287
  let l = null;
6288
6288
  for (const [u, c] of s) {
6289
- l = new Gt(t.registry, Rt, t.path, null, t.scope);
6289
+ l = new Vt(t.registry, zt, t.path, null, t.scope);
6290
6290
  const p = [];
6291
6291
  let f = !1;
6292
6292
  for (let d = 1; d < e.length; d++) {
@@ -6335,12 +6335,12 @@ function On(r, [e, t, n, a]) {
6335
6335
  const o = a ? a.evaluate(r) : 1, i = xa(e, t, n, o);
6336
6336
  if (i)
6337
6337
  throw new N(i);
6338
- return new F(e / 255, t / 255, n / 255, o, !1);
6338
+ return new $(e / 255, t / 255, n / 255, o, !1);
6339
6339
  }
6340
6340
  function jn(r, e) {
6341
6341
  return r in e;
6342
6342
  }
6343
- function pr(r, e) {
6343
+ function fr(r, e) {
6344
6344
  const t = e[r];
6345
6345
  return typeof t > "u" ? null : t;
6346
6346
  }
@@ -6405,18 +6405,18 @@ le.register(tn, {
6405
6405
  overloads: [
6406
6406
  [
6407
6407
  [I],
6408
- (r, [e]) => pr(e.evaluate(r), r.properties())
6408
+ (r, [e]) => fr(e.evaluate(r), r.properties())
6409
6409
  ],
6410
6410
  [
6411
6411
  [I, Re],
6412
- (r, [e, t]) => pr(e.evaluate(r), t.evaluate(r))
6412
+ (r, [e, t]) => fr(e.evaluate(r), t.evaluate(r))
6413
6413
  ]
6414
6414
  ]
6415
6415
  },
6416
6416
  "feature-state": [
6417
6417
  T,
6418
6418
  [I],
6419
- (r, [e]) => pr(e.evaluate(r), r.featureState || {})
6419
+ (r, [e]) => fr(e.evaluate(r), r.featureState || {})
6420
6420
  ],
6421
6421
  properties: [
6422
6422
  Re,
@@ -6782,19 +6782,19 @@ le.register(tn, {
6782
6782
  ],
6783
6783
  "resolved-locale": [
6784
6784
  I,
6785
- [Nt],
6785
+ [Dt],
6786
6786
  (r, [e]) => e.evaluate(r).resolvedLocale()
6787
6787
  ]
6788
6788
  });
6789
6789
  function el(r) {
6790
6790
  return Array.isArray(r) ? `(${r.map(j).join(", ")})` : `(${j(r.type)}...)`;
6791
6791
  }
6792
- function Rt(r) {
6793
- if (r instanceof Ht)
6794
- return Rt(r.boundExpression);
6792
+ function zt(r) {
6793
+ if (r instanceof Kt)
6794
+ return zt(r.boundExpression);
6795
6795
  if (r instanceof le && r.name === "error")
6796
6796
  return !1;
6797
- if (r instanceof Xt)
6797
+ if (r instanceof Zt)
6798
6798
  return !1;
6799
6799
  if (r instanceof Fe)
6800
6800
  return !1;
@@ -6805,10 +6805,10 @@ function Rt(r) {
6805
6805
  const e = r instanceof ke || r instanceof se;
6806
6806
  let t = !0;
6807
6807
  return r.eachChild((n) => {
6808
- e ? t = t && Rt(n) : t = t && n instanceof He;
6809
- }), t ? Wt(r) && Yt(r, ["zoom", "heatmap-density", "elevation", "line-progress", "accumulated", "is-supported-script"]) : !1;
6808
+ e ? t = t && zt(n) : t = t && n instanceof He;
6809
+ }), t ? Yt(r) && Jt(r, ["zoom", "heatmap-density", "elevation", "line-progress", "accumulated", "is-supported-script"]) : !1;
6810
6810
  }
6811
- function Wt(r) {
6811
+ function Yt(r) {
6812
6812
  if (r instanceof le) {
6813
6813
  if (r.name === "get" && r.args.length === 1)
6814
6814
  return !1;
@@ -6825,7 +6825,7 @@ function Wt(r) {
6825
6825
  return !1;
6826
6826
  let e = !0;
6827
6827
  return r.eachChild((t) => {
6828
- e && !Wt(t) && (e = !1);
6828
+ e && !Yt(t) && (e = !1);
6829
6829
  }), e;
6830
6830
  }
6831
6831
  function lt(r) {
@@ -6836,12 +6836,12 @@ function lt(r) {
6836
6836
  e && !lt(t) && (e = !1);
6837
6837
  }), e;
6838
6838
  }
6839
- function Yt(r, e) {
6839
+ function Jt(r, e) {
6840
6840
  if (r instanceof le && e.indexOf(r.name) >= 0)
6841
6841
  return !1;
6842
6842
  let t = !0;
6843
6843
  return r.eachChild((n) => {
6844
- t && !Yt(n, e) && (t = !1);
6844
+ t && !Jt(n, e) && (t = !1);
6845
6845
  }), t;
6846
6846
  }
6847
6847
  function Ir(r) {
@@ -6850,7 +6850,7 @@ function Ir(r) {
6850
6850
  function Be(r) {
6851
6851
  return { result: "error", value: r };
6852
6852
  }
6853
- function zt(r) {
6853
+ function Ft(r) {
6854
6854
  return r["property-type"] === "data-driven" || r["property-type"] === "cross-faded-data-driven";
6855
6855
  }
6856
6856
  function Pa(r) {
@@ -6890,7 +6890,7 @@ function za(r) {
6890
6890
  return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in tn;
6891
6891
  }
6892
6892
  function Fa(r, e) {
6893
- const t = new Gt(tn, Rt, [], e ? nl(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
6893
+ const t = new Vt(tn, zt, [], e ? nl(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
6894
6894
  return n ? Ir(new tl(n, e)) : Be(t.errors);
6895
6895
  }
6896
6896
  class Nn {
@@ -6922,13 +6922,13 @@ function rl(r, e) {
6922
6922
  const t = Fa(r, e);
6923
6923
  if (t.result === "error")
6924
6924
  return t;
6925
- const n = t.value.expression, a = Wt(n);
6926
- if (!a && !zt(e))
6925
+ const n = t.value.expression, a = Yt(n);
6926
+ if (!a && !Ft(e))
6927
6927
  return Be([new fe("", "data expressions not supported")]);
6928
- const o = Yt(n, ["zoom"]);
6928
+ const o = Jt(n, ["zoom"]);
6929
6929
  if (!o && !Pa(e))
6930
6930
  return Be([new fe("", "zoom expressions not supported")]);
6931
- const i = kt(n);
6931
+ const i = Ct(n);
6932
6932
  if (!i && !o)
6933
6933
  return Be([new fe("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);
6934
6934
  if (i instanceof fe)
@@ -6940,17 +6940,17 @@ function rl(r, e) {
6940
6940
  const s = i instanceof he ? i.interpolation : void 0;
6941
6941
  return Ir(a ? new Dn("camera", t.value, i.labels, s) : new Dn("composite", t.value, i.labels, s));
6942
6942
  }
6943
- function kt(r) {
6943
+ function Ct(r) {
6944
6944
  let e = null;
6945
- if (r instanceof Vt)
6946
- e = kt(r.result);
6945
+ if (r instanceof Ht)
6946
+ e = Ct(r.result);
6947
6947
  else if (r instanceof it) {
6948
6948
  for (const t of r.args)
6949
- if (e = kt(t), e)
6949
+ if (e = Ct(t), e)
6950
6950
  break;
6951
- } else (r instanceof Kt || r instanceof he) && r.input instanceof le && r.input.name === "zoom" && (e = r);
6951
+ } else (r instanceof Xt || r instanceof he) && r.input instanceof le && r.input.name === "zoom" && (e = r);
6952
6952
  return e instanceof fe || r.eachChild((t) => {
6953
- const n = kt(t);
6953
+ const n = Ct(t);
6954
6954
  n instanceof fe ? e = n : !e && n ? e = new fe("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') : e && n && e !== n && (e = new fe("", 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'));
6955
6955
  }), e;
6956
6956
  }
@@ -6966,22 +6966,22 @@ function nl(r) {
6966
6966
  number: b,
6967
6967
  enum: I,
6968
6968
  boolean: _,
6969
- formatted: Dt,
6970
- padding: Ut,
6971
- numberArray: Bt,
6969
+ formatted: Ut,
6970
+ padding: Bt,
6971
+ numberArray: qt,
6972
6972
  colorArray: nt,
6973
- projectionDefinition: jt,
6973
+ projectionDefinition: Nt,
6974
6974
  resolvedImage: ft,
6975
- variableAnchorOffsetCollection: qt
6975
+ variableAnchorOffsetCollection: Gt
6976
6976
  };
6977
6977
  return r.type === "array" ? W(e[r.value] || T, r.length) : e[r.type];
6978
6978
  }
6979
6979
  function al(r) {
6980
6980
  if (r.type === "color" && rn(r.default))
6981
- return new F(0, 0, 0, 0);
6981
+ return new $(0, 0, 0, 0);
6982
6982
  switch (r.type) {
6983
6983
  case "color":
6984
- return F.parse(r.default) || null;
6984
+ return $.parse(r.default) || null;
6985
6985
  case "padding":
6986
6986
  return Q.parse(r.default) || null;
6987
6987
  case "numberArray":
@@ -7108,7 +7108,7 @@ function an(r) {
7108
7108
  }));
7109
7109
  return u;
7110
7110
  }
7111
- function Jt(r) {
7111
+ function Qt(r) {
7112
7112
  const e = r.key, t = r.value, n = r.valueSpec;
7113
7113
  let a = M(t);
7114
7114
  return a === "number" && t !== t && (a = "NaN"), a !== "number" ? [new g(e, t, `number expected, ${a} found`)] : "minimum" in n && t < n.minimum ? [new g(e, t, `${t} is less than the minimum value ${n.minimum}`)] : "maximum" in n && t > n.maximum ? [new g(e, t, `${t} is greater than the maximum value ${n.maximum}`)] : [];
@@ -7128,7 +7128,7 @@ function ja(r) {
7128
7128
  default: h
7129
7129
  }
7130
7130
  });
7131
- return t === "identity" && s && c.push(new g(r.key, r.value, 'missing required property "property"')), t !== "identity" && !r.value.stops && c.push(new g(r.key, r.value, 'missing required property "stops"')), t === "exponential" && r.valueSpec.expression && !Ra(r.valueSpec) && c.push(new g(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (l && !zt(r.valueSpec) ? c.push(new g(r.key, r.value, "property functions not supported")) : s && !Pa(r.valueSpec) && c.push(new g(r.key, r.value, "zoom functions not supported"))), (t === "categorical" || u) && r.value.property === void 0 && c.push(new g(r.key, r.value, '"property" property is required')), c;
7131
+ return t === "identity" && s && c.push(new g(r.key, r.value, 'missing required property "property"')), t !== "identity" && !r.value.stops && c.push(new g(r.key, r.value, 'missing required property "stops"')), t === "exponential" && r.valueSpec.expression && !Ra(r.valueSpec) && c.push(new g(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (l && !Ft(r.valueSpec) ? c.push(new g(r.key, r.value, "property functions not supported")) : s && !Pa(r.valueSpec) && c.push(new g(r.key, r.value, "zoom functions not supported"))), (t === "categorical" || u) && r.value.property === void 0 && c.push(new g(r.key, r.value, '"property" property is required')), c;
7132
7132
  function p(y) {
7133
7133
  if (t === "identity")
7134
7134
  return [new g(y.key, y.value, 'identity function may not have a "stops" property')];
@@ -7167,7 +7167,7 @@ function ja(r) {
7167
7167
  validateSpec: y.validateSpec,
7168
7168
  style: y.style,
7169
7169
  styleSpec: y.styleSpec,
7170
- objectElementValidators: { zoom: Jt, value: d }
7170
+ objectElementValidators: { zoom: Qt, value: d }
7171
7171
  }));
7172
7172
  } else
7173
7173
  m = m.concat(d({
@@ -7196,7 +7196,7 @@ function ja(r) {
7196
7196
  return [new g(y.key, x, "stop domain value must be a number, string, or boolean")];
7197
7197
  if (w !== "number" && t !== "categorical") {
7198
7198
  let A = `number expected, ${w} found`;
7199
- return zt(e) && t === void 0 && (A += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new g(y.key, x, A)];
7199
+ return Ft(e) && t === void 0 && (A += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new g(y.key, x, A)];
7200
7200
  }
7201
7201
  return t === "categorical" && w === "number" && (!isFinite(v) || Math.floor(v) !== v) ? [new g(y.key, x, `integer expected, found ${v}`)] : t !== "categorical" && w === "number" && o !== void 0 && v < o ? [new g(y.key, x, "stop domain values must appear in ascending order")] : (o = v, t === "categorical" && v in a ? [new g(y.key, x, "stop domain values must be unique")] : (a[v] = !0, []));
7202
7202
  }
@@ -7223,9 +7223,9 @@ function Ke(r) {
7223
7223
  if (r.expressionContext === "filter" && !lt(t))
7224
7224
  return [new g(r.key, r.value, '"feature-state" data expressions are not supported with filters.')];
7225
7225
  if (r.expressionContext && r.expressionContext.indexOf("cluster") === 0) {
7226
- if (!Yt(t, ["zoom", "feature-state"]))
7226
+ if (!Jt(t, ["zoom", "feature-state"]))
7227
7227
  return [new g(r.key, r.value, '"zoom" and "feature-state" expressions are not supported with cluster properties.')];
7228
- if (r.expressionContext === "cluster-initial" && !Wt(t))
7228
+ if (r.expressionContext === "cluster-initial" && !Yt(t))
7229
7229
  return [new g(r.key, r.value, "Feature data expressions are not supported with initial expression part of cluster properties.")];
7230
7230
  }
7231
7231
  return [];
@@ -7236,14 +7236,14 @@ function ol(r) {
7236
7236
  }
7237
7237
  function Mr(r) {
7238
7238
  const e = r.key, t = r.value, n = M(t);
7239
- return n !== "string" ? [new g(e, t, `color expected, ${n} found`)] : F.parse(String(t)) ? [] : [new g(e, t, `color expected, "${t}" found`)];
7239
+ return n !== "string" ? [new g(e, t, `color expected, ${n} found`)] : $.parse(String(t)) ? [] : [new g(e, t, `color expected, "${t}" found`)];
7240
7240
  }
7241
7241
  function ut(r) {
7242
7242
  const e = r.key, t = r.value, n = r.valueSpec, a = [];
7243
7243
  return Array.isArray(n.values) ? n.values.indexOf(U(t)) === -1 && a.push(new g(e, t, `expected one of [${n.values.join(", ")}], ${JSON.stringify(t)} found`)) : Object.keys(n.values).indexOf(U(t)) === -1 && a.push(new g(e, t, `expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(t)} found`)), a;
7244
7244
  }
7245
7245
  function on(r) {
7246
- return $a(je(r.value)) ? Ke(Et({}, r, {
7246
+ return $a(je(r.value)) ? Ke(Tt({}, r, {
7247
7247
  expressionContext: "filter",
7248
7248
  valueSpec: { value: "boolean" }
7249
7249
  })) : Na(r);
@@ -7320,7 +7320,7 @@ function Da(r, e) {
7320
7320
  if (!c)
7321
7321
  return [new g(t, i, `unknown property "${s}"`)];
7322
7322
  let p;
7323
- if (M(i) === "string" && zt(c) && !c.tokens && (p = /^{([^}]+)}$/.exec(i)))
7323
+ if (M(i) === "string" && Ft(c) && !c.tokens && (p = /^{([^}]+)}$/.exec(i)))
7324
7324
  return [new g(t, i, `"${s}" does not support interpolation syntax
7325
7325
  Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(p[1])} }\`.`)];
7326
7326
  const f = [];
@@ -7407,7 +7407,7 @@ function qa(r) {
7407
7407
  validateSpec: l.validateSpec,
7408
7408
  objectElementValidators: {
7409
7409
  "*"(u) {
7410
- return Ba(Et({ layerType: i }, u));
7410
+ return Ba(Tt({ layerType: i }, u));
7411
7411
  }
7412
7412
  }
7413
7413
  });
@@ -7422,7 +7422,7 @@ function qa(r) {
7422
7422
  validateSpec: l.validateSpec,
7423
7423
  objectElementValidators: {
7424
7424
  "*"(u) {
7425
- return Ua(Et({ layerType: i }, u));
7425
+ return Ua(Tt({ layerType: i }, u));
7426
7426
  }
7427
7427
  }
7428
7428
  });
@@ -7633,7 +7633,7 @@ function cl(r) {
7633
7633
  }));
7634
7634
  return o;
7635
7635
  } else
7636
- return Jt({
7636
+ return Qt({
7637
7637
  key: e,
7638
7638
  value: t,
7639
7639
  valueSpec: {}
@@ -7657,7 +7657,7 @@ function pl(r) {
7657
7657
  }));
7658
7658
  return o;
7659
7659
  } else
7660
- return Jt({
7660
+ return Qt({
7661
7661
  key: e,
7662
7662
  value: t,
7663
7663
  valueSpec: {}
@@ -7779,7 +7779,7 @@ const Bn = {
7779
7779
  },
7780
7780
  array: an,
7781
7781
  boolean: ol,
7782
- number: Jt,
7782
+ number: Qt,
7783
7783
  color: Mr,
7784
7784
  constants: Oa,
7785
7785
  enum: ut,
@@ -7803,9 +7803,9 @@ const Bn = {
7803
7803
  sprite: Xa,
7804
7804
  state: Za
7805
7805
  };
7806
- function Ft(r) {
7806
+ function $t(r) {
7807
7807
  const e = r.value, t = r.valueSpec, n = r.styleSpec;
7808
- return r.validateSpec = Ft, t.expression && rn(U(e)) ? ja(r) : t.expression && za(je(e)) ? Ke(r) : t.type && Bn[t.type] ? Bn[t.type](r) : te(Et({}, r, {
7808
+ return r.validateSpec = $t, t.expression && rn(U(e)) ? ja(r) : t.expression && za(je(e)) ? Ke(r) : t.type && Bn[t.type] ? Bn[t.type](r) : te(Tt({}, r, {
7809
7809
  valueSpec: t.type ? n[t.type] : t
7810
7810
  }));
7811
7811
  }
@@ -7815,13 +7815,13 @@ function Wa(r) {
7815
7815
  }
7816
7816
  function Y(r, e = Hi) {
7817
7817
  let t = [];
7818
- return t = t.concat(Ft({
7818
+ return t = t.concat($t({
7819
7819
  key: "",
7820
7820
  value: r,
7821
7821
  valueSpec: e.$root,
7822
7822
  styleSpec: e,
7823
7823
  style: r,
7824
- validateSpec: Ft,
7824
+ validateSpec: $t,
7825
7825
  objectElementValidators: {
7826
7826
  glyphs: Wa,
7827
7827
  "*"() {
@@ -7848,7 +7848,7 @@ function ce(r) {
7848
7848
  return function(e) {
7849
7849
  return r({
7850
7850
  ...e,
7851
- validateSpec: Ft
7851
+ validateSpec: $t
7852
7852
  });
7853
7853
  };
7854
7854
  }
@@ -7863,7 +7863,7 @@ function pe(r) {
7863
7863
  function qn(r) {
7864
7864
  if (!r)
7865
7865
  return {
7866
- style: Qe[rr[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7866
+ style: Qe[nr[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7867
7867
  requiresUrlMonitoring: !1,
7868
7868
  // default styles don't require URL monitoring
7869
7869
  isFallback: !0
@@ -7875,7 +7875,7 @@ function qn(r) {
7875
7875
  requiresUrlMonitoring: !1,
7876
7876
  isFallback: !1
7877
7877
  } : t.isValidJSON ? {
7878
- style: Qe[rr[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7878
+ style: Qe[nr[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7879
7879
  requiresUrlMonitoring: !1,
7880
7880
  // default styles don't require URL monitoring
7881
7881
  isFallback: !0
@@ -7902,7 +7902,7 @@ function qn(r) {
7902
7902
  requiresUrlMonitoring: !1,
7903
7903
  isFallback: !1
7904
7904
  } : {
7905
- style: Qe[rr[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7905
+ style: Qe[nr[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
7906
7906
  requiresUrlMonitoring: !1,
7907
7907
  // default styles don't require URL monitoring
7908
7908
  isFallback: !0
@@ -8066,7 +8066,7 @@ class Cl extends ri {
8066
8066
  }
8067
8067
  }
8068
8068
  var K, oe, Se, xe, Z, pt, q, Ja, J, Qa;
8069
- class fr {
8069
+ class dr {
8070
8070
  constructor(e, t) {
8071
8071
  be(this, q);
8072
8072
  be(this, K);
@@ -8228,7 +8228,7 @@ class Ll {
8228
8228
  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");
8229
8229
  }
8230
8230
  }
8231
- const Al = "@maptiler/sdk", El = "3.5.1-rc6", Tl = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", _l = "MapTiler", Il = "dist/maptiler-sdk.mjs", Ml = "dist/maptiler-sdk.d.ts", Pl = "dist/maptiler-sdk.css", Rl = "module", zl = "dist/maptiler-sdk.mjs", Fl = { ".": { import: "./dist/maptiler-sdk.mjs", types: "./dist/maptiler-sdk.d.ts" }, "./dist/maptiler-sdk.css": { import: "./dist/maptiler-sdk.css" }, "./style.css": { import: "./dist/maptiler-sdk.css" } }, $l = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], Ol = "https://docs.maptiler.com/sdk-js/", jl = "BSD-3-Clause", Nl = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, Dl = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "tsc --noEmit && eslint src", "lint:fix": "tsc --noEmit && eslint src --fix", "test:watch": "vitest watch -c vite.config-test.ts --dom", test: "vitest run -c vite.config-test.ts --dom", "install:clean": "rm -rf build/ dist/ node_modules/ && npm ci", dev: "npm run build-css && vite -c vite.config-dev.ts", "dev-umd": "npm run build-css && tsc && NODE_ENV=development vite build -w -c vite.config-umd.ts", "build-css": "mkdir -p dist build && node scripts/replace-path-with-content.js src/style/style_template.css dist/tmp_maptiler-sdk.css && cat node_modules/maplibre-gl/dist/maplibre-gl.css dist/tmp_maptiler-sdk.css > dist/maptiler-sdk.css && rm dist/tmp_maptiler-sdk.css && cp dist/maptiler-sdk.css build/maptiler-sdk.css", "build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts", "build-es": "tsc && NODE_ENV=production vite build -c vite.config-es.ts", build: "npm run build-es; npm run build-umd; npm run build-css", make: "npm run install:clean && npm run build" }, Ul = { "@canvas/image-data": "^1.0.0", "@eslint/js": "^9.21.0", "@types/color-convert": "^2.0.4", "@types/color-name": "^2.0.0", "@types/stats.js": "^0.17.4", "@types/uuid": "^10.0.0", "@types/xmldom": "^0.1.31", "@vitest/web-worker": "^3.0.9", "@xmldom/xmldom": "^0.8.10", concurrently: "^9.1.2", eslint: "^9.21.0", "eslint-config-prettier": "^10.0.2", "eslint-plugin-prettier": "^5.2.3", "happy-dom": "^17.4.4", husky: "^8.0.0", jiti: "^2.4.2", "lint-staged": "^15.4.3", prettier: "3.5.2", "stats.js": "^0.17.0", typedoc: "^0.27.6", typescript: "^5.7.3", "typescript-eslint": "^8.25.0", vite: "^6.0.7", "vite-plugin-dts": "^4.5.0", vitest: "^3.0.9" }, Bl = { "@maplibre/maplibre-gl-style-spec": "~23.3.0", "@maptiler/client": "~2.4.0", events: "^3.3.0", "gl-matrix": "^3.4.3", "js-base64": "^3.7.7", "maplibre-gl": "~5.6.0", uuid: "^11.0.5" }, ql = {
8231
+ const Al = "@maptiler/sdk", El = "3.6.1-rc1", Tl = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", _l = "MapTiler", Il = "dist/maptiler-sdk.mjs", Ml = "dist/maptiler-sdk.d.ts", Pl = "dist/maptiler-sdk.css", Rl = "module", zl = "dist/maptiler-sdk.mjs", Fl = { ".": { import: "./dist/maptiler-sdk.mjs", types: "./dist/maptiler-sdk.d.ts" }, "./dist/maptiler-sdk.css": { import: "./dist/maptiler-sdk.css" }, "./style.css": { import: "./dist/maptiler-sdk.css" } }, $l = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], Ol = "https://docs.maptiler.com/sdk-js/", jl = "BSD-3-Clause", Nl = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, Dl = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "tsc --noEmit && eslint src", "lint:fix": "tsc --noEmit && eslint src --fix", "test:watch": "vitest watch -c vite.config-test.ts --dom", test: "vitest run -c vite.config-test.ts --dom", "install:clean": "rm -rf build/ dist/ node_modules/ && npm ci", dev: "npm run build-css && vite -c vite.config-dev.ts", "dev-umd": "npm run build-css && tsc && NODE_ENV=development vite build -w -c vite.config-umd.ts", "build-css": "mkdir -p dist build && node scripts/replace-path-with-content.js src/style/style_template.css dist/tmp_maptiler-sdk.css && cat node_modules/maplibre-gl/dist/maplibre-gl.css dist/tmp_maptiler-sdk.css > dist/maptiler-sdk.css && rm dist/tmp_maptiler-sdk.css && cp dist/maptiler-sdk.css build/maptiler-sdk.css", "build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts", "build-es": "tsc && NODE_ENV=production vite build -c vite.config-es.ts", build: "npm run build-es; npm run build-umd; npm run build-css", make: "npm run install:clean && npm run build" }, Ul = { "@canvas/image-data": "^1.0.0", "@eslint/js": "^9.21.0", "@types/color-convert": "^2.0.4", "@types/color-name": "^2.0.0", "@types/stats.js": "^0.17.4", "@types/uuid": "^10.0.0", "@types/xmldom": "^0.1.31", "@vitest/web-worker": "^3.0.9", "@xmldom/xmldom": "^0.8.10", concurrently: "^9.1.2", eslint: "^9.21.0", "eslint-config-prettier": "^10.0.2", "eslint-plugin-prettier": "^5.2.3", "happy-dom": "^17.4.4", husky: "^8.0.0", jiti: "^2.4.2", "lint-staged": "^15.4.3", prettier: "3.5.2", "stats.js": "^0.17.0", typedoc: "^0.27.6", typescript: "^5.7.3", "typescript-eslint": "^8.25.0", vite: "^6.0.7", "vite-plugin-dts": "^4.5.0", vitest: "^3.0.9" }, Bl = { "@maplibre/maplibre-gl-style-spec": "~23.3.0", "@maptiler/client": "~2.4.0", events: "^3.3.0", "gl-matrix": "^3.4.3", "js-base64": "^3.7.7", "maplibre-gl": "~5.6.0", uuid: "^11.0.5" }, ql = {
8232
8232
  name: Al,
8233
8233
  version: El,
8234
8234
  description: Tl,
@@ -8299,8 +8299,8 @@ function Vl(r, e, t, n, a, o, i, s, l, u, c, p, f, d, h, y, m) {
8299
8299
  return r[0] = e, r[1] = t, r[2] = n, r[3] = a, r[4] = o, r[5] = i, r[6] = s, r[7] = l, r[8] = u, r[9] = c, r[10] = p, r[11] = f, r[12] = d, r[13] = h, r[14] = y, r[15] = m, r;
8300
8300
  }
8301
8301
  function Hl(r, e, t) {
8302
- var n = e[0], a = e[1], o = e[2], i = e[3], s = e[4], l = e[5], u = e[6], c = e[7], p = e[8], f = e[9], d = e[10], h = e[11], y = e[12], m = e[13], w = e[14], v = e[15], x = t[0], A = t[1], L = t[2], $ = t[3];
8303
- return r[0] = x * n + A * s + L * p + $ * y, r[1] = x * a + A * l + L * f + $ * m, r[2] = x * o + A * u + L * d + $ * w, r[3] = x * i + A * c + L * h + $ * v, x = t[4], A = t[5], L = t[6], $ = t[7], r[4] = x * n + A * s + L * p + $ * y, r[5] = x * a + A * l + L * f + $ * m, r[6] = x * o + A * u + L * d + $ * w, r[7] = x * i + A * c + L * h + $ * v, x = t[8], A = t[9], L = t[10], $ = t[11], r[8] = x * n + A * s + L * p + $ * y, r[9] = x * a + A * l + L * f + $ * m, r[10] = x * o + A * u + L * d + $ * w, r[11] = x * i + A * c + L * h + $ * v, x = t[12], A = t[13], L = t[14], $ = t[15], r[12] = x * n + A * s + L * p + $ * y, r[13] = x * a + A * l + L * f + $ * m, r[14] = x * o + A * u + L * d + $ * w, r[15] = x * i + A * c + L * h + $ * v, r;
8302
+ var n = e[0], a = e[1], o = e[2], i = e[3], s = e[4], l = e[5], u = e[6], c = e[7], p = e[8], f = e[9], d = e[10], h = e[11], y = e[12], m = e[13], w = e[14], v = e[15], x = t[0], A = t[1], L = t[2], z = t[3];
8303
+ return r[0] = x * n + A * s + L * p + z * y, r[1] = x * a + A * l + L * f + z * m, r[2] = x * o + A * u + L * d + z * w, r[3] = x * i + A * c + L * h + z * v, x = t[4], A = t[5], L = t[6], z = t[7], r[4] = x * n + A * s + L * p + z * y, r[5] = x * a + A * l + L * f + z * m, r[6] = x * o + A * u + L * d + z * w, r[7] = x * i + A * c + L * h + z * v, x = t[8], A = t[9], L = t[10], z = t[11], r[8] = x * n + A * s + L * p + z * y, r[9] = x * a + A * l + L * f + z * m, r[10] = x * o + A * u + L * d + z * w, r[11] = x * i + A * c + L * h + z * v, x = t[12], A = t[13], L = t[14], z = t[15], r[12] = x * n + A * s + L * p + z * y, r[13] = x * a + A * l + L * f + z * m, r[14] = x * o + A * u + L * d + z * w, r[15] = x * i + A * c + L * h + z * v, r;
8304
8304
  }
8305
8305
  function Kl(r, e, t) {
8306
8306
  var n = t[0], a = t[1], o = t[2];
@@ -8323,7 +8323,7 @@ function Zl(r, e, t, n, a) {
8323
8323
  return r[0] = o / t, r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 0, r[5] = o, r[6] = 0, r[7] = 0, r[8] = 0, r[9] = 0, r[11] = -1, r[12] = 0, r[13] = 0, r[15] = 0, a != null && a !== 1 / 0 ? (i = 1 / (n - a), r[10] = (a + n) * i, r[14] = 2 * a * n * i) : (r[10] = -1, r[14] = -2 * n), r;
8324
8324
  }
8325
8325
  var Wl = Zl;
8326
- function Ct() {
8326
+ function Lt() {
8327
8327
  var r = new ct(3);
8328
8328
  return ct != Float32Array && (r[0] = 0, r[1] = 0, r[2] = 0), r;
8329
8329
  }
@@ -8331,7 +8331,7 @@ function Yl(r, e, t) {
8331
8331
  var n = new ct(3);
8332
8332
  return n[0] = r, n[1] = e, n[2] = t, n;
8333
8333
  }
8334
- function dr(r, e) {
8334
+ function hr(r, e) {
8335
8335
  var t = e[0], n = e[1], a = e[2], o = t * t + n * n + a * a;
8336
8336
  return o > 0 && (o = 1 / Math.sqrt(o)), r[0] = e[0] * o, r[1] = e[1] * o, r[2] = e[2] * o, r;
8337
8337
  }
@@ -8340,7 +8340,7 @@ function Xn(r, e, t) {
8340
8340
  return r[0] = a * l - o * s, r[1] = o * i - n * l, r[2] = n * s - a * i, r;
8341
8341
  }
8342
8342
  (function() {
8343
- var r = Ct();
8343
+ var r = Lt();
8344
8344
  return function(e, t, n, a, o, i) {
8345
8345
  var s, l;
8346
8346
  for (t || (t = 3), n || (n = 0), a ? l = Math.min(a * t + n, e.length) : l = e.length, s = n; s < l; s += t)
@@ -8351,9 +8351,9 @@ function Xn(r, e, t) {
8351
8351
  function Jl(r) {
8352
8352
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
8353
8353
  }
8354
- var hr, Zn;
8354
+ var yr, Zn;
8355
8355
  function Ql() {
8356
- return Zn || (Zn = 1, hr = {
8356
+ return Zn || (Zn = 1, yr = {
8357
8357
  aliceblue: [240, 248, 255],
8358
8358
  antiquewhite: [250, 235, 215],
8359
8359
  aqua: [0, 255, 255],
@@ -8502,11 +8502,11 @@ function Ql() {
8502
8502
  whitesmoke: [245, 245, 245],
8503
8503
  yellow: [255, 255, 0],
8504
8504
  yellowgreen: [154, 205, 50]
8505
- }), hr;
8505
+ }), yr;
8506
8506
  }
8507
- var yr, Wn;
8507
+ var mr, Wn;
8508
8508
  function eo() {
8509
- if (Wn) return yr;
8509
+ if (Wn) return mr;
8510
8510
  Wn = 1;
8511
8511
  const r = Ql(), e = {};
8512
8512
  for (const a of Object.keys(r))
@@ -8528,7 +8528,7 @@ function eo() {
8528
8528
  apple: { channels: 3, labels: ["r16", "g16", "b16"] },
8529
8529
  gray: { channels: 1, labels: ["gray"] }
8530
8530
  };
8531
- yr = t;
8531
+ mr = t;
8532
8532
  for (const a of Object.keys(t)) {
8533
8533
  if (!("channels" in t[a]))
8534
8534
  throw new Error("missing channels property: " + a);
@@ -8805,11 +8805,11 @@ function eo() {
8805
8805
  return "000000".substring(s.length) + s;
8806
8806
  }, t.rgb.gray = function(a) {
8807
8807
  return [(a[0] + a[1] + a[2]) / 3 / 255 * 100];
8808
- }, yr;
8808
+ }, mr;
8809
8809
  }
8810
- var mr, Yn;
8810
+ var gr, Yn;
8811
8811
  function eu() {
8812
- if (Yn) return mr;
8812
+ if (Yn) return gr;
8813
8813
  Yn = 1;
8814
8814
  const r = eo();
8815
8815
  function e() {
@@ -8846,18 +8846,18 @@ function eu() {
8846
8846
  s.unshift(i[u].parent), l = n(r[i[u].parent][u], l), u = i[u].parent;
8847
8847
  return l.conversion = s, l;
8848
8848
  }
8849
- return mr = function(o) {
8849
+ return gr = function(o) {
8850
8850
  const i = t(o), s = {}, l = Object.keys(i);
8851
8851
  for (let u = l.length, c = 0; c < u; c++) {
8852
8852
  const p = l[c];
8853
8853
  i[p].parent !== null && (s[p] = a(p, i));
8854
8854
  }
8855
8855
  return s;
8856
- }, mr;
8856
+ }, gr;
8857
8857
  }
8858
- var gr, Jn;
8858
+ var vr, Jn;
8859
8859
  function tu() {
8860
- if (Jn) return gr;
8860
+ if (Jn) return vr;
8861
8861
  Jn = 1;
8862
8862
  const r = eo(), e = eu(), t = {}, n = Object.keys(r);
8863
8863
  function a(i) {
@@ -8888,7 +8888,7 @@ function tu() {
8888
8888
  const c = s[u];
8889
8889
  t[i][u] = o(c), t[i][u].raw = a(c);
8890
8890
  });
8891
- }), gr = t, gr;
8891
+ }), vr = t, vr;
8892
8892
  }
8893
8893
  var ru = tu();
8894
8894
  const nu = /* @__PURE__ */ Jl(ru);
@@ -8939,7 +8939,7 @@ function to({
8939
8939
  indexBufferLength: f
8940
8940
  };
8941
8941
  }
8942
- function Lt(r) {
8942
+ function At(r) {
8943
8943
  if (!r)
8944
8944
  return [1, 1, 1, 0];
8945
8945
  if (r === "transparent")
@@ -9077,11 +9077,11 @@ const Ge = {
9077
9077
  }
9078
9078
  };
9079
9079
  var Me = /* @__PURE__ */ ((r) => (r.POSITIVE_X = "pX", r.NEGATIVE_X = "nX", r.POSITIVE_Y = "pY", r.NEGATIVE_Y = "nY", r.POSITIVE_Z = "pZ", r.NEGATIVE_Z = "nZ", r))(Me || {});
9080
- let vr, ta, ra;
9080
+ let xt, ta, ra;
9081
9081
  function gu({ gl: r, faces: e, onReady: t, forceRefresh: n }) {
9082
- vr && !n && ra === JSON.stringify(e) && t(vr, ta), ra = JSON.stringify(e);
9083
- const a = r.createTexture();
9084
- if (!e) {
9082
+ xt && !n && ra === JSON.stringify(e) && t(xt, ta), ra = JSON.stringify(e);
9083
+ const a = xt ?? r.createTexture();
9084
+ if (r.bindTexture(r.TEXTURE_CUBE_MAP, a), !e) {
9085
9085
  console.warn("[CubemapLayer][loadCubemapTexture]: Faces are null");
9086
9086
  return;
9087
9087
  }
@@ -9117,7 +9117,7 @@ function gu({ gl: r, faces: e, onReady: t, forceRefresh: n }) {
9117
9117
  }
9118
9118
  r.bindTexture(r.TEXTURE_CUBE_MAP, a), r.generateMipmap(r.TEXTURE_CUBE_MAP), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MIN_FILTER, r.LINEAR_MIPMAP_LINEAR), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MAG_FILTER, r.LINEAR);
9119
9119
  const l = s.map((u) => u.image);
9120
- t(a, l), ta = l, vr = a;
9120
+ t(a, l), ta = l, xt = a;
9121
9121
  }).catch((s) => {
9122
9122
  console.error("[CubemapLayer][loadCubemapTexture]: Error loading cubemap texture", s);
9123
9123
  });
@@ -9288,7 +9288,7 @@ class br {
9288
9288
  */
9289
9289
  S(this, "imageFadeInDelta", 0);
9290
9290
  const t = Cu(e, ku);
9291
- this.options = t, this.currentFacesDefinitionKey = JSON.stringify(t.faces ?? t.preset ?? t.path), this.bgColor = [0, 0, 0, 0], this.targetBgColor = Lt(t.color), this.faces = aa(t), this.useCubemapTexture = this.faces !== null;
9291
+ this.options = t, this.currentFacesDefinitionKey = JSON.stringify(t.faces ?? t.preset ?? t.path), this.bgColor = [0, 0, 0, 0], this.targetBgColor = At(t.color), this.faces = aa(t), this.useCubemapTexture = this.faces !== null;
9292
9292
  }
9293
9293
  /**
9294
9294
  * Updates the cubemap object with the current faces and shader configuration.
@@ -9298,19 +9298,19 @@ class br {
9298
9298
  * It creates a new Object3D instance with the specified vertex and fragment shaders,
9299
9299
  * attributes, and uniforms. The cubemap will be rendered using this configuration.
9300
9300
  */
9301
- updateCubemap() {
9301
+ updateCubemap({ facesNeedUpdate: e } = { facesNeedUpdate: !0 }) {
9302
9302
  this.useCubemapTexture = this.faces !== null;
9303
- const e = Su.filter((t) => t === "cubeSampler" || t === "fadeOpacity" ? this.useCubemapTexture : !0);
9303
+ const t = Su.filter((n) => n === "cubeSampler" || n === "fadeOpacity" ? this.useCubemapTexture : !0);
9304
9304
  this.cubemap = to({
9305
9305
  gl: this.gl,
9306
9306
  vertexShaderSource: yu,
9307
9307
  // Because we only want to use the read the texture in gl if we're supposed to
9308
9308
  fragmentShaderSource: this.useCubemapTexture ? ea.replace(na, xu) : ea.replace(na, ""),
9309
9309
  attributesKeys: wu,
9310
- uniformsKeys: e,
9310
+ uniformsKeys: t,
9311
9311
  vertices: du,
9312
9312
  indices: hu
9313
- }), this.cubeMapNeedsUpdate = !0, this.useCubemapTexture && this.updateTexture(this.gl, this.faces), this.animateColorChange();
9313
+ }), this.cubeMapNeedsUpdate = e, this.useCubemapTexture && this.updateTexture(this.gl, this.faces), this.animateColorChange();
9314
9314
  }
9315
9315
  /**
9316
9316
  * Called when the layer is added to the map.
@@ -9419,6 +9419,8 @@ class br {
9419
9419
  * @throws Error if the map, cubemap, or texture is undefined.
9420
9420
  */
9421
9421
  render(e, t) {
9422
+ if (!this.map.isGlobeProjection())
9423
+ return;
9422
9424
  if (this.map === void 0)
9423
9425
  throw new Error("[CubemapLayer]: Map is undefined");
9424
9426
  if (this.cubemap === void 0)
@@ -9466,16 +9468,16 @@ class br {
9466
9468
  */
9467
9469
  async setCubemap(e) {
9468
9470
  this.options = e;
9469
- const t = JSON.stringify(e.faces ?? e.preset ?? e.path);
9470
- this.currentFacesDefinitionKey !== t && (await this.setCubemapFaces(e), this.cubeMapNeedsUpdate = !0);
9471
- const n = Lt(e.color);
9472
- if (e.color && this.targetBgColor.toString() !== n.toString())
9473
- this.setBgColor(n);
9471
+ const t = JSON.stringify(e.faces ?? e.preset ?? e.path), n = this.currentFacesDefinitionKey !== t;
9472
+ n && (await this.setCubemapFaces(e), this.cubeMapNeedsUpdate = !0);
9473
+ const a = At(e.color);
9474
+ if (e.color && this.targetBgColor.toString() !== a.toString())
9475
+ this.setBgColor(a);
9474
9476
  else if (!e.color && e.preset && e.preset in Ge) {
9475
- const a = Ge[e.preset];
9476
- this.setBgColor(Lt(a.color));
9477
+ const o = Ge[e.preset];
9478
+ this.setBgColor(At(o.color));
9477
9479
  }
9478
- this.updateCubemap();
9480
+ this.updateCubemap({ facesNeedUpdate: n });
9479
9481
  }
9480
9482
  /**
9481
9483
  * Shows the cubemap layer by setting its visibility to "visible".
@@ -9746,6 +9748,8 @@ class wr {
9746
9748
  render(e, t) {
9747
9749
  if (this.map === void 0)
9748
9750
  throw new Error("[RadialGradientLayer]: Map is undefined");
9751
+ if (!this.map.isGlobeProjection())
9752
+ return;
9749
9753
  if (this.plane === void 0)
9750
9754
  throw new Error("[RadialGradientLayer]: Plane is undefined");
9751
9755
  e.disable(e.DEPTH_TEST), e.enable(e.BLEND), e.useProgram(this.plane.shaderProgram), e.bindBuffer(e.ARRAY_BUFFER, this.plane.positionBuffer);
@@ -9757,17 +9761,17 @@ class wr {
9757
9761
  Hl(i, t.defaultProjectionData.mainMatrix, a);
9758
9762
  const s = this.plane.programInfo.uniformsLocations.matrix;
9759
9763
  e.uniformMatrix4fv(s, !1, i);
9760
- const l = rt(), u = this.map.transform.cameraPosition, c = dr(Ct(), u), p = Yl(0, 1, 0), f = Ct();
9761
- Xn(f, p, c), dr(f, f);
9762
- const d = Ct();
9763
- Xn(d, c, f), dr(d, d), Vl(l, f[0], f[1], f[2], 0, d[0], d[1], d[2], 0, c[0], c[1], c[2], 0, 0, 0, 0, 1);
9764
+ const l = rt(), u = this.map.transform.cameraPosition, c = hr(Lt(), u), p = Yl(0, 1, 0), f = Lt();
9765
+ Xn(f, p, c), hr(f, f);
9766
+ const d = Lt();
9767
+ Xn(d, c, f), hr(d, d), Vl(l, f[0], f[1], f[2], 0, d[0], d[1], d[2], 0, c[0], c[1], c[2], 0, 0, 0, 0, 1);
9764
9768
  const h = this.plane.programInfo.uniformsLocations.rotationMatrix;
9765
9769
  e.uniformMatrix4fv(h, !1, l);
9766
9770
  const y = this.gradient.stops.length, m = [], w = [];
9767
9771
  for (let v = 0; v <= y; v++)
9768
9772
  if (v < y) {
9769
9773
  m[v] = this.gradient.stops[v][0];
9770
- const x = Lt(this.gradient.stops[v][1]);
9774
+ const x = At(this.gradient.stops[v][1]);
9771
9775
  w.push(...x);
9772
9776
  }
9773
9777
  e.uniform1i(this.plane.programInfo.uniformsLocations.stopsNumber, y), e.uniform1fv(this.plane.programInfo.uniformsLocations.stops, new Float32Array(m)), e.uniform4fv(this.plane.programInfo.uniformsLocations.colors, new Float32Array(w)), e.uniform1f(this.plane.programInfo.uniformsLocations.maxDistance, Je), e.uniform1f(this.plane.programInfo.uniformsLocations.scale, o), e.drawArrays(e.TRIANGLE_STRIP, 0, 4);
@@ -9839,6 +9843,9 @@ let Mu = class ro extends k.Map {
9839
9843
  S(this, "originalLabelStyle", new window.Map());
9840
9844
  S(this, "isStyleLocalized", !1);
9841
9845
  S(this, "languageIsUpdated", !1);
9846
+ S(this, "spaceboxLoadingState", {
9847
+ styleLoadCallbackSet: !1
9848
+ });
9842
9849
  this.options = t, this.setStyle(n), a && this.monitorStyleUrl(n);
9843
9850
  const u = () => {
9844
9851
  let h = "The distant style could not be loaded.";
@@ -9985,7 +9992,7 @@ let Mu = class ro extends k.Map {
9985
9992
  apiKey: x,
9986
9993
  maptilerLogo: A,
9987
9994
  canvasContextAttributes: L,
9988
- refreshExpiredTiles: $,
9995
+ refreshExpiredTiles: z,
9989
9996
  maxBounds: Te,
9990
9997
  scrollZoom: We,
9991
9998
  minZoom: gt,
@@ -10000,7 +10007,7 @@ let Mu = class ro extends k.Map {
10000
10007
  pixelRatio: Co,
10001
10008
  validateStyle: Lo
10002
10009
  } = t;
10003
- this.minimap = new fr(h, {
10010
+ this.minimap = new dr(h, {
10004
10011
  zoom: y,
10005
10012
  center: m,
10006
10013
  style: w,
@@ -10009,7 +10016,7 @@ let Mu = class ro extends k.Map {
10009
10016
  container: "null",
10010
10017
  maptilerLogo: A,
10011
10018
  canvasContextAttributes: L,
10012
- refreshExpiredTiles: $,
10019
+ refreshExpiredTiles: z,
10013
10020
  maxBounds: Te,
10014
10021
  scrollZoom: We,
10015
10022
  minZoom: gt,
@@ -10024,7 +10031,7 @@ let Mu = class ro extends k.Map {
10024
10031
  pixelRatio: Co,
10025
10032
  validateStyle: Lo
10026
10033
  }), this.addControl(this.minimap, h.position ?? "bottom-left");
10027
- } else h === !0 ? (this.minimap = new fr({}, t), this.addControl(this.minimap, "bottom-left")) : h !== void 0 && h !== !1 && (this.minimap = new fr({}, t), this.addControl(this.minimap, h));
10034
+ } else h === !0 ? (this.minimap = new dr({}, t), this.addControl(this.minimap, "bottom-left")) : h !== void 0 && h !== !1 && (this.minimap = new dr({}, t), this.addControl(this.minimap, h));
10028
10035
  });
10029
10036
  const d = (h) => {
10030
10037
  h.terrain && (p = !0, f = {
@@ -10042,7 +10049,7 @@ let Mu = class ro extends k.Map {
10042
10049
  console.warn("[webglcontextlost]", "Unexpected loss of WebGL context!"), this.fire("webglContextLost", y);
10043
10050
  });
10044
10051
  const h = this.getLayersOrder()[0];
10045
- this.initSpace({ options: t, before: h }), this.initHalo({ options: t, before: h });
10052
+ t.space && this.initSpace({ options: t, before: h }), t.halo && this.initHalo({ options: t, before: h });
10046
10053
  }), this.telemetry = new Gl(this);
10047
10054
  }
10048
10055
  getSpace() {
@@ -10251,8 +10258,8 @@ let Mu = class ro extends k.Map {
10251
10258
  * - a longer form with the prefix `"maptiler://"` (eg. `"maptiler://streets-v2"`)
10252
10259
  */
10253
10260
  setStyle(t, n) {
10254
- var u, c, p, f, d;
10255
- this.originalLabelStyle.clear(), (u = this.minimap) == null || u.setStyle(t), this.forceLanguageUpdate = !0, this.once("idle", () => {
10261
+ var p, f, d, h, y, m;
10262
+ this.originalLabelStyle.clear(), (p = this.minimap) == null || p.setStyle(t), this.forceLanguageUpdate = !0, this.once("idle", () => {
10256
10263
  this.forceLanguageUpdate = !1;
10257
10264
  });
10258
10265
  const a = qn(t);
@@ -10266,27 +10273,22 @@ let Mu = class ro extends k.Map {
10266
10273
  );
10267
10274
  }
10268
10275
  this.styleInProcess = !0;
10269
- const o = this.getStyle(), i = a.style, s = ((c = o == null ? void 0 : o.terrain) == null ? void 0 : c.source) !== ((p = i == null ? void 0 : i.terrain) == null ? void 0 : p.source) || ((f = o == null ? void 0 : o.terrain) == null ? void 0 : f.exaggeration) !== ((d = i == null ? void 0 : i.terrain) == null ? void 0 : d.exaggeration);
10276
+ const o = this.getStyle(), i = a.style;
10270
10277
  try {
10271
10278
  super.setStyle(a.style, n);
10272
- } catch (h) {
10273
- this.styleInProcess = !1, console.error("[Map.setStyle]: Error while setting style:", h);
10279
+ } catch (w) {
10280
+ this.styleInProcess = !1, console.error("[Map.setStyle]: Error while setting style:", w);
10274
10281
  }
10275
10282
  if (typeof a.style == "string" || a.requiresUrlMonitoring)
10276
10283
  return this;
10277
- const l = () => {
10284
+ const s = () => {
10278
10285
  this.setSpaceFromStyle({ style: a.style }), this.setHaloFromStyle({ style: a.style });
10286
+ }, l = () => {
10287
+ var x, A, L, z;
10288
+ const w = this.getLayersOrder()[0], v = a.style;
10289
+ this.space ? this.setSpaceFromStyle({ style: v }) : this.initSpace({ before: w, spec: (A = (x = v.metadata) == null ? void 0 : x.maptiler) == null ? void 0 : A.space }), this.halo ? this.setHaloFromStyle({ style: v }) : this.initHalo({ before: w, spec: (z = (L = v.metadata) == null ? void 0 : L.maptiler) == null ? void 0 : z.halo });
10279
10290
  };
10280
- if (s)
10281
- this.once("terrain", l);
10282
- else
10283
- return l(), this;
10284
- return this.styleInProcess && this.once("style.load", () => {
10285
- var m, w, v, x;
10286
- console.log("style.load");
10287
- const h = this.getLayersOrder()[0], y = a.style;
10288
- this.space ? this.setSpaceFromStyle({ style: y }) : this.initSpace({ before: h, spec: (w = (m = y.metadata) == null ? void 0 : m.maptiler) == null ? void 0 : w.space }), this.halo ? this.setHaloFromStyle({ style: y }) : this.initHalo({ before: h, spec: (x = (v = y.metadata) == null ? void 0 : v.maptiler) == null ? void 0 : x.halo });
10289
- }), this;
10291
+ return this.styleInProcess && !this.spaceboxLoadingState.styleLoadCallbackSet ? (this.once("style.load", l), this.spaceboxLoadingState.styleLoadCallbackSet = !0, this) : ((f = o == null ? void 0 : o.terrain) == null ? void 0 : f.source) !== ((d = i == null ? void 0 : i.terrain) == null ? void 0 : d.source) || ((h = o == null ? void 0 : o.terrain) == null ? void 0 : h.exaggeration) !== ((y = i == null ? void 0 : i.terrain) == null ? void 0 : y.exaggeration) ? (this.once("terrain", s), this) : (m = i == null ? void 0 : i.projection) != null && m.type ? (l(), this) : (this.styleInProcess = !0, this);
10290
10292
  }
10291
10293
  /**
10292
10294
  * Adds a [MapLibre style layer](https://maplibre.org/maplibre-style-spec/layers)
@@ -10577,9 +10579,18 @@ let Mu = class ro extends k.Map {
10577
10579
  this.isTerrainEnabled = !0, this.growTerrain(t);
10578
10580
  return;
10579
10581
  }
10580
- this.loaded() || this.isTerrainEnabled ? a() : this.once("load", () => {
10581
- this.getTerrain() && this.getSource(V.terrainSourceId) || a();
10582
- });
10582
+ if (this.loaded() || this.isTerrainEnabled)
10583
+ a();
10584
+ else {
10585
+ const o = () => {
10586
+ this.getTerrain() && this.getSource(V.terrainSourceId) || a();
10587
+ };
10588
+ this.once("load", () => {
10589
+ o();
10590
+ }), this.once("moveend", () => {
10591
+ o();
10592
+ });
10593
+ }
10583
10594
  }
10584
10595
  /**
10585
10596
  * Disable the 3D terrain visualization
@@ -10785,16 +10796,16 @@ function Ru(r) {
10785
10796
  times: n
10786
10797
  };
10787
10798
  }
10788
- function At(r) {
10799
+ function Et(r) {
10789
10800
  const e = ["Polygon", "LineString", "Point", "Track", "gx:Track"];
10790
10801
  let t, n, a, o, i;
10791
10802
  const s = [], l = [];
10792
10803
  if (E(r, "MultiGeometry") !== null)
10793
- return At(E(r, "MultiGeometry"));
10804
+ return Et(E(r, "MultiGeometry"));
10794
10805
  if (E(r, "MultiTrack") !== null)
10795
- return At(E(r, "MultiTrack"));
10806
+ return Et(E(r, "MultiTrack"));
10796
10807
  if (E(r, "gx:MultiTrack") !== null)
10797
- return At(E(r, "gx:MultiTrack"));
10808
+ return Et(E(r, "gx:MultiTrack"));
10798
10809
  for (a = 0; a < e.length; a++)
10799
10810
  if (n = G(r, e[a]), n) {
10800
10811
  for (o = 0; o < n.length; o++)
@@ -10827,7 +10838,7 @@ function At(r) {
10827
10838
  return { geoms: s, coordTimes: l };
10828
10839
  }
10829
10840
  function zu(r, e, t, n) {
10830
- const a = At(r), o = {}, i = O(E(r, "name")), s = O(E(r, "address")), l = O(E(r, "description")), u = E(r, "TimeSpan"), c = E(r, "TimeStamp"), p = E(r, "ExtendedData"), f = E(r, "visibility");
10841
+ const a = Et(r), o = {}, i = O(E(r, "name")), s = O(E(r, "address")), l = O(E(r, "description")), u = E(r, "TimeSpan"), c = E(r, "TimeStamp"), p = E(r, "ExtendedData"), f = E(r, "visibility");
10831
10842
  let d, h = O(E(r, "styleUrl")), y = E(r, "LineStyle"), m = E(r, "PolyStyle");
10832
10843
  if (!a.geoms.length) return [];
10833
10844
  if (i && (o.name = i), s && (o.address = s), h) {
@@ -10854,8 +10865,8 @@ function zu(r, e, t, n) {
10854
10865
  x && (o.stroke = x), Number.isNaN(A) || (o["stroke-opacity"] = A), Number.isNaN(L) || (o["stroke-width"] = L);
10855
10866
  }
10856
10867
  if (m) {
10857
- const v = la(O(E(m, "color"))), x = v[0], A = v[1], L = O(E(m, "fill")), $ = O(E(m, "outline"));
10858
- x && (o.fill = x), Number.isNaN(A) || (o["fill-opacity"] = A), L && (o["fill-opacity"] = L === "1" ? o["fill-opacity"] || 1 : 0), $ && (o["stroke-opacity"] = $ === "1" ? o["stroke-opacity"] || 1 : 0);
10868
+ const v = la(O(E(m, "color"))), x = v[0], A = v[1], L = O(E(m, "fill")), z = O(E(m, "outline"));
10869
+ x && (o.fill = x), Number.isNaN(A) || (o["fill-opacity"] = A), L && (o["fill-opacity"] = L === "1" ? o["fill-opacity"] || 1 : 0), z && (o["stroke-opacity"] = z === "1" ? o["stroke-opacity"] || 1 : 0);
10859
10870
  }
10860
10871
  if (p) {
10861
10872
  const v = G(p, "Data"), x = G(p, "SimpleData");
@@ -11084,7 +11095,7 @@ const Rr = [
11084
11095
  // https://colorhunt.co/palette/10a19d540375ff7000ffbf00
11085
11096
  ["#10A19D", "#540375", "#FF7000", "#FFBF00"]
11086
11097
  ];
11087
- function Qt() {
11098
+ function er() {
11088
11099
  return Rr[~~(Math.random() * Rr.length)][~~(Math.random() * 4)];
11089
11100
  }
11090
11101
  function yt() {
@@ -11108,7 +11119,7 @@ function zr(r, e) {
11108
11119
  function Ae(r) {
11109
11120
  return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
11110
11121
  }
11111
- function z(r) {
11122
+ function F(r) {
11112
11123
  return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
11113
11124
  }
11114
11125
  function po(r, e) {
@@ -11199,12 +11210,12 @@ function yo(r, e = 10) {
11199
11210
  }).flat()
11200
11211
  ];
11201
11212
  }
11202
- function xt(r) {
11213
+ function kt(r) {
11203
11214
  const e = r.toString(16);
11204
11215
  return e.length === 1 ? `0${e}` : e;
11205
11216
  }
11206
11217
  function Bu(r) {
11207
- return `#${xt(r[0])}${xt(r[1])}${xt(r[2])}${r.length === 4 ? xt(r[3]) : ""}`;
11218
+ return `#${kt(r[0])}${kt(r[1])}${kt(r[2])}${r.length === 4 ? kt(r[3]) : ""}`;
11208
11219
  }
11209
11220
  class C extends Array {
11210
11221
  constructor(t = {}) {
@@ -12146,7 +12157,7 @@ async function qu(r, e, t = {}) {
12146
12157
  throw new Error("Creating a polyline layer requires an existing .sourceId or a valid .data property");
12147
12158
  let n = e.data;
12148
12159
  if (typeof n == "string") {
12149
- if ($t(n))
12160
+ if (Ot(n))
12150
12161
  n = `https://api.maptiler.com/data/${e.data}/features.json?key=${D.apiKey}`;
12151
12162
  else if (((a = n.split(".").pop()) == null ? void 0 : a.toLowerCase().trim()) === "gpx") {
12152
12163
  const s = await (await fetch(n, t)).text();
@@ -12178,7 +12189,7 @@ function Gu(r, e) {
12178
12189
  type: "geojson",
12179
12190
  data: e.data
12180
12191
  });
12181
- const o = e.lineWidth ?? 3, i = e.lineColor ?? Qt(), s = e.lineOpacity ?? 1, l = e.lineBlur ?? 0, u = e.lineGapWidth ?? 0;
12192
+ const o = e.lineWidth ?? 3, i = e.lineColor ?? er(), s = e.lineOpacity ?? 1, l = e.lineBlur ?? 0, u = e.lineGapWidth ?? 0;
12182
12193
  let c = e.lineDashArray ?? null;
12183
12194
  const p = e.outlineWidth ?? 1, f = e.outlineColor ?? "#FFFFFF", d = e.outlineOpacity ?? 1, h = e.outlineBlur ?? 0;
12184
12195
  if (typeof c == "string" && (c = pn(c)), e.outline === !0) {
@@ -12195,10 +12206,10 @@ function Gu(r, e) {
12195
12206
  minzoom: e.minzoom ?? 0,
12196
12207
  maxzoom: e.maxzoom ?? 23,
12197
12208
  paint: {
12198
- "line-opacity": typeof d == "number" ? d : z(d),
12209
+ "line-opacity": typeof d == "number" ? d : F(d),
12199
12210
  "line-color": typeof f == "string" ? f : Ae(f),
12200
12211
  "line-width": po(o, p),
12201
- "line-blur": typeof h == "number" ? h : z(h)
12212
+ "line-blur": typeof h == "number" ? h : F(h)
12202
12213
  }
12203
12214
  },
12204
12215
  e.beforeId
@@ -12216,11 +12227,11 @@ function Gu(r, e) {
12216
12227
  minzoom: e.minzoom ?? 0,
12217
12228
  maxzoom: e.maxzoom ?? 23,
12218
12229
  paint: {
12219
- "line-opacity": typeof s == "number" ? s : z(s),
12230
+ "line-opacity": typeof s == "number" ? s : F(s),
12220
12231
  "line-color": typeof i == "string" ? i : Ae(i),
12221
- "line-width": typeof o == "number" ? o : z(o),
12222
- "line-blur": typeof l == "number" ? l : z(l),
12223
- "line-gap-width": typeof u == "number" ? u : z(u),
12232
+ "line-width": typeof o == "number" ? o : F(o),
12233
+ "line-blur": typeof l == "number" ? l : F(l),
12234
+ "line-gap-width": typeof u == "number" ? u : F(u),
12224
12235
  // For some reasons passing "line-dasharray" with the value "undefined"
12225
12236
  // results in no showing the line while it should have the same behavior
12226
12237
  // of not adding the property "line-dasharray" as all.
@@ -12242,13 +12253,13 @@ function Vu(r, e) {
12242
12253
  };
12243
12254
  if (e.data && !r.getSource(t)) {
12244
12255
  let y = e.data;
12245
- typeof y == "string" && $t(y) && (y = `https://api.maptiler.com/data/${y}/features.json?key=${D.apiKey}`), r.addSource(t, {
12256
+ typeof y == "string" && Ot(y) && (y = `https://api.maptiler.com/data/${y}/features.json?key=${D.apiKey}`), r.addSource(t, {
12246
12257
  type: "geojson",
12247
12258
  data: y
12248
12259
  });
12249
12260
  }
12250
12261
  let o = e.outlineDashArray ?? null;
12251
- const i = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? Qt(), p = e.fillOpacity ?? 1, f = e.outlinePosition ?? "center", d = e.pattern ?? null;
12262
+ const i = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? er(), p = e.fillOpacity ?? 1, f = e.outlinePosition ?? "center", d = e.pattern ?? null;
12252
12263
  typeof o == "string" && (o = pn(o));
12253
12264
  const h = (y = null) => {
12254
12265
  if (r.addLayer(
@@ -12260,7 +12271,7 @@ function Vu(r, e) {
12260
12271
  maxzoom: e.maxzoom ?? 23,
12261
12272
  paint: {
12262
12273
  "fill-color": typeof c == "string" ? c : Ae(c),
12263
- "fill-opacity": typeof p == "number" ? p : z(p),
12274
+ "fill-opacity": typeof p == "number" ? p : F(p),
12264
12275
  // Adding a pattern if provided
12265
12276
  ...y && { "fill-pattern": y }
12266
12277
  }
@@ -12268,12 +12279,12 @@ function Vu(r, e) {
12268
12279
  e.beforeId
12269
12280
  ), e.outline === !0) {
12270
12281
  let m;
12271
- f === "inside" ? typeof i == "number" ? m = 0.5 * i : m = z(
12282
+ f === "inside" ? typeof i == "number" ? m = 0.5 * i : m = F(
12272
12283
  i.map(({ zoom: w, value: v }) => ({
12273
12284
  zoom: w,
12274
12285
  value: 0.5 * v
12275
12286
  }))
12276
- ) : f === "outside" ? typeof i == "number" ? m = -0.5 * i : m = z(
12287
+ ) : f === "outside" ? typeof i == "number" ? m = -0.5 * i : m = F(
12277
12288
  i.map((w) => ({
12278
12289
  zoom: w.zoom,
12279
12290
  value: -0.5 * w.value
@@ -12290,10 +12301,10 @@ function Vu(r, e) {
12290
12301
  minzoom: e.minzoom ?? 0,
12291
12302
  maxzoom: e.maxzoom ?? 23,
12292
12303
  paint: {
12293
- "line-opacity": typeof l == "number" ? l : z(l),
12304
+ "line-opacity": typeof l == "number" ? l : F(l),
12294
12305
  "line-color": typeof s == "string" ? s : Ae(s),
12295
- "line-width": typeof i == "number" ? i : z(i),
12296
- "line-blur": typeof u == "number" ? u : z(u),
12306
+ "line-width": typeof i == "number" ? i : F(i),
12307
+ "line-blur": typeof u == "number" ? u : F(u),
12297
12308
  "line-offset": m,
12298
12309
  // For some reasons passing "line-dasharray" with the value "undefined"
12299
12310
  // results in no showing the line while it should have the same behavior
@@ -12321,7 +12332,7 @@ function Hu(r, e) {
12321
12332
  const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : mo.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ?? yt(), u = e.layerId ?? mt(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, f = e.outline ?? !1, d = e.outlineOpacity ?? 1, h = e.outlineWidth ?? 1, y = e.outlineColor ?? "#FFFFFF";
12322
12333
  let m;
12323
12334
  const w = e.zoomCompensation ?? !0, v = e.minzoom ?? 0, x = e.maxzoom ?? 23;
12324
- typeof e.pointOpacity == "number" ? m = e.pointOpacity : Array.isArray(e.pointOpacity) ? m = z(e.pointOpacity) : e.cluster ? m = Or(i, "point_count") : e.property ? m = Or(i, e.property) : m = z([
12335
+ typeof e.pointOpacity == "number" ? m = e.pointOpacity : Array.isArray(e.pointOpacity) ? m = F(e.pointOpacity) : e.cluster ? m = Or(i, "point_count") : e.property ? m = Or(i, e.property) : m = F([
12325
12336
  { zoom: v, value: 0 },
12326
12337
  { zoom: v + 0.25, value: 1 },
12327
12338
  { zoom: x - 0.25, value: 1 },
@@ -12335,7 +12346,7 @@ function Hu(r, e) {
12335
12346
  };
12336
12347
  if (e.data && !r.getSource(l)) {
12337
12348
  let L = e.data;
12338
- typeof L == "string" && $t(L) && (L = `https://api.maptiler.com/data/${L}/features.json?key=${D.apiKey}`), r.addSource(l, {
12349
+ typeof L == "string" && Ot(L) && (L = `https://api.maptiler.com/data/${L}/features.json?key=${D.apiKey}`), r.addSource(l, {
12339
12350
  type: "geojson",
12340
12351
  data: L,
12341
12352
  cluster: a
@@ -12343,7 +12354,7 @@ function Hu(r, e) {
12343
12354
  }
12344
12355
  if (a) {
12345
12356
  A.clusterLayerId = `${u}_cluster`;
12346
- const L = Array.from({ length: o }, ($, Te) => {
12357
+ const L = Array.from({ length: o }, (z, Te) => {
12347
12358
  const We = s.min + Te * (s.max - s.min) / (o - 1);
12348
12359
  return {
12349
12360
  value: We,
@@ -12360,14 +12371,14 @@ function Hu(r, e) {
12360
12371
  paint: {
12361
12372
  // 'circle-color': options.pointColor ?? colorDrivenByProperty(clusterStyle, "point_count"),
12362
12373
  "circle-color": typeof e.pointColor == "string" ? e.pointColor : Fr(L, "point_count"),
12363
- "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? z(e.pointRadius) : $r(L, "point_count", !1),
12374
+ "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? F(e.pointRadius) : $r(L, "point_count", !1),
12364
12375
  "circle-pitch-alignment": p ? "viewport" : "map",
12365
12376
  "circle-pitch-scale": "map",
12366
12377
  // scale with camera distance regardless of viewport/biewport alignement
12367
12378
  "circle-opacity": m,
12368
12379
  ...f && {
12369
- "circle-stroke-opacity": typeof d == "number" ? d : z(d),
12370
- "circle-stroke-width": typeof h == "number" ? h : z(h),
12380
+ "circle-stroke-opacity": typeof d == "number" ? d : F(d),
12381
+ "circle-stroke-width": typeof h == "number" ? h : F(h),
12371
12382
  "circle-stroke-color": typeof y == "string" ? y : Ae(y)
12372
12383
  }
12373
12384
  },
@@ -12387,11 +12398,11 @@ function Hu(r, e) {
12387
12398
  // scale with camera distance regardless of viewport/biewport alignement
12388
12399
  // 'circle-color': options.pointColor ?? clusterStyle[0].color,
12389
12400
  "circle-color": typeof e.pointColor == "string" ? e.pointColor : i.getColorHex(i.getBounds().min),
12390
- "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? z(e.pointRadius) : L[0].pointRadius * 0.75,
12401
+ "circle-radius": typeof e.pointRadius == "number" ? e.pointRadius : Array.isArray(e.pointRadius) ? F(e.pointRadius) : L[0].pointRadius * 0.75,
12391
12402
  "circle-opacity": m,
12392
12403
  ...f && {
12393
- "circle-stroke-opacity": typeof d == "number" ? d : z(d),
12394
- "circle-stroke-width": typeof h == "number" ? h : z(h),
12404
+ "circle-stroke-opacity": typeof d == "number" ? d : F(d),
12405
+ "circle-stroke-width": typeof h == "number" ? h : F(h),
12395
12406
  "circle-stroke-color": typeof y == "string" ? y : Ae(y)
12396
12407
  }
12397
12408
  },
@@ -12401,13 +12412,13 @@ function Hu(r, e) {
12401
12412
  e.beforeId
12402
12413
  );
12403
12414
  } else {
12404
- let L = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : Qt(), $ = typeof e.pointRadius == "number" ? w ? z([
12415
+ let L = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : er(), z = typeof e.pointRadius == "number" ? w ? F([
12405
12416
  { zoom: 0, value: e.pointRadius * 0.025 },
12406
12417
  { zoom: 2, value: e.pointRadius * 0.05 },
12407
12418
  { zoom: 4, value: e.pointRadius * 0.1 },
12408
12419
  { zoom: 8, value: e.pointRadius * 0.25 },
12409
12420
  { zoom: 16, value: e.pointRadius * 1 }
12410
- ]) : e.pointRadius : Array.isArray(e.pointRadius) ? z(e.pointRadius) : w ? z([
12421
+ ]) : e.pointRadius : Array.isArray(e.pointRadius) ? F(e.pointRadius) : w ? F([
12411
12422
  { zoom: 0, value: t * 0.05 },
12412
12423
  { zoom: 2, value: t * 0.1 },
12413
12424
  { zoom: 4, value: t * 0.2 },
@@ -12423,7 +12434,7 @@ function Hu(r, e) {
12423
12434
  color: typeof e.pointColor == "string" ? e.pointColor : i.getColorHex(vt)
12424
12435
  };
12425
12436
  });
12426
- L = Fr(Te, e.property), $ = $r(Te, e.property, w);
12437
+ L = Fr(Te, e.property), z = $r(Te, e.property, w);
12427
12438
  }
12428
12439
  r.addLayer(
12429
12440
  {
@@ -12440,10 +12451,10 @@ function Hu(r, e) {
12440
12451
  // scale with camera distance regardless of viewport/biewport alignement
12441
12452
  "circle-color": L,
12442
12453
  "circle-opacity": m,
12443
- "circle-radius": $,
12454
+ "circle-radius": z,
12444
12455
  ...f && {
12445
- "circle-stroke-opacity": typeof d == "number" ? d : z(d),
12446
- "circle-stroke-width": typeof h == "number" ? h : z(h),
12456
+ "circle-stroke-opacity": typeof d == "number" ? d : F(d),
12457
+ "circle-stroke-width": typeof h == "number" ? h : F(h),
12447
12458
  "circle-stroke-color": typeof y == "string" ? y : Ae(y)
12448
12459
  }
12449
12460
  },
@@ -12455,7 +12466,7 @@ function Hu(r, e) {
12455
12466
  }
12456
12467
  if (c !== !1 && (e.cluster || e.property)) {
12457
12468
  A.labelLayerId = `${u}_label`;
12458
- const L = e.labelColor ?? "#fff", $ = e.labelSize ?? 12;
12469
+ const L = e.labelColor ?? "#fff", z = e.labelSize ?? 12;
12459
12470
  r.addLayer(
12460
12471
  {
12461
12472
  id: A.labelLayerId,
@@ -12465,7 +12476,7 @@ function Hu(r, e) {
12465
12476
  layout: {
12466
12477
  "text-field": e.cluster ? "{point_count_abbreviated}" : `{${e.property}}`,
12467
12478
  "text-font": ["Noto Sans Regular"],
12468
- "text-size": $,
12479
+ "text-size": z,
12469
12480
  "text-pitch-alignment": p ? "viewport" : "map",
12470
12481
  "symbol-sort-key": ["/", 1, ["get", e.cluster ? "point_count" : e.property]]
12471
12482
  // so that the largest value goes on top
@@ -12509,14 +12520,14 @@ function Ku(r, e) {
12509
12520
  { zoom: 16, value: 50 }
12510
12521
  ], y = e.radius ?? (i ? h : 10);
12511
12522
  let m = 1;
12512
- typeof y == "number" ? m = y : Array.isArray(y) && "zoom" in y[0] ? m = z(y) : p && Array.isArray(y) && "propertyValue" in y[0] ? m = ho(y, p, i) : !p && Array.isArray(y) && "propertyValue" in y[0] ? (m = z(h), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : m = z(h);
12523
+ typeof y == "number" ? m = y : Array.isArray(y) && "zoom" in y[0] ? m = F(y) : p && Array.isArray(y) && "propertyValue" in y[0] ? m = ho(y, p, i) : !p && Array.isArray(y) && "propertyValue" in y[0] ? (m = F(h), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : m = F(h);
12513
12524
  const w = {
12514
12525
  heatmapLayerId: n,
12515
12526
  heatmapSourceId: t
12516
12527
  };
12517
12528
  if (e.data && !r.getSource(t)) {
12518
12529
  let v = e.data;
12519
- typeof v == "string" && $t(v) && (v = `https://api.maptiler.com/data/${v}/features.json?key=${D.apiKey}`), r.addSource(t, {
12530
+ typeof v == "string" && Ot(v) && (v = `https://api.maptiler.com/data/${v}/features.json?key=${D.apiKey}`), r.addSource(t, {
12520
12531
  type: "geojson",
12521
12532
  data: v
12522
12533
  });
@@ -12530,10 +12541,10 @@ function Ku(r, e) {
12530
12541
  maxzoom: o,
12531
12542
  paint: {
12532
12543
  "heatmap-weight": d,
12533
- "heatmap-intensity": typeof c == "number" ? c : z(c),
12544
+ "heatmap-intensity": typeof c == "number" ? c : F(c),
12534
12545
  "heatmap-color": yo(l),
12535
12546
  "heatmap-radius": m,
12536
- "heatmap-opacity": typeof s == "number" ? s : z(s)
12547
+ "heatmap-opacity": typeof s == "number" ? s : F(s)
12537
12548
  }
12538
12549
  },
12539
12550
  e.beforeId
@@ -12551,20 +12562,20 @@ const xc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12551
12562
  dashArrayMaker: pn,
12552
12563
  generateRandomLayerName: mt,
12553
12564
  generateRandomSourceName: yt,
12554
- getRandomColor: Qt,
12565
+ getRandomColor: er,
12555
12566
  heatmapIntensityFromColorRamp: yo,
12556
12567
  lerpZoomNumberValues: zr,
12557
12568
  opacityDrivenByProperty: Or,
12558
12569
  paintColorOptionsToPaintSpec: Ae,
12559
12570
  radiusDrivenByProperty: $r,
12560
12571
  radiusDrivenByPropertyHeatmap: ho,
12561
- rampedOptionsToLayerPaintSpec: z,
12572
+ rampedOptionsToLayerPaintSpec: F,
12562
12573
  rampedPropertyValueWeight: fo,
12563
12574
  takeScreenshot: Du
12564
12575
  }, Symbol.toStringTag, { value: "Module" }));
12565
12576
  qo();
12566
12577
  function kc() {
12567
- return "3.5.1-rc6";
12578
+ return "3.6.1-rc1";
12568
12579
  }
12569
12580
  const Cc = k.Map, Lc = k.Marker, Ac = k.Popup, Ec = k.Style, Tc = k.CanvasSource, _c = k.GeoJSONSource, Ic = k.ImageSource, Mc = k.RasterTileSource, Pc = k.RasterDEMTileSource, Rc = k.VectorTileSource, zc = k.VideoSource, Fc = k.NavigationControl, $c = k.GeolocateControl, Oc = k.AttributionControl, jc = k.LogoControl, Nc = k.ScaleControl, Dc = k.FullscreenControl, Uc = k.TerrainControl, Bc = k.BoxZoomHandler, qc = k.ScrollZoomHandler, Gc = k.CooperativeGesturesHandler, Vc = k.KeyboardHandler, Hc = k.TwoFingersTouchPitchHandler, Kc = k.MapWheelEvent, Xc = k.MapTouchEvent, Zc = k.MapMouseEvent, Wc = k.config, Yc = k.getVersion, {
12570
12581
  setRTLTextPlugin: Jc,