@mapcreator/sdk 3.1.1 → 3.2.0

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.
@@ -202,36 +202,35 @@ function ee(e, t = F.MAPLIBRE_COMPAT) {
202
202
  }
203
203
  //#endregion
204
204
  //#region src/utils/helpers.ts
205
- var L = /^\s*[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?\s*$/;
206
- function R(e) {
205
+ function L(e) {
207
206
  return e / 180 * Math.PI;
208
207
  }
209
- function z(e) {
208
+ function R(e) {
210
209
  return e * 180 / Math.PI;
211
210
  }
212
- function B(e, t) {
211
+ function z(e, t) {
213
212
  let n = Math.PI / 180, r = e.lat * n, i = t.lat * n, a = Math.sin(r) * Math.sin(i) + Math.cos(r) * Math.cos(i) * Math.cos((t.lng - e.lng) * n);
214
213
  return 6371e3 * Math.acos(Math.min(a, 1));
215
214
  }
216
- function V(e) {
215
+ function B(e) {
217
216
  let t = 0;
218
217
  for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n), t &= t;
219
218
  return Math.abs(t);
220
219
  }
221
- function te(e, t) {
222
- return e.startsWith("$") ? ne(t[e.slice(1)]) : e;
220
+ function V(e, t) {
221
+ return e.startsWith("$") ? H(t[e.slice(1)]) : e;
223
222
  }
224
- function ne(e) {
223
+ function H(e) {
225
224
  return typeof e == "string" ? e : typeof e == "number" ? String(e) : typeof e == "boolean" ? String(e).toUpperCase() : typeof e == "object" && e && (e.t === "n" || e.t === "d") ? e.w ?? "" : "";
226
225
  }
227
- function re(e) {
228
- return typeof e == "string" && L.test(e) ? Number(e) : typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? e : typeof e == "object" && e && e.t === "n" ? e.v : null;
226
+ function te(e) {
227
+ return typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? e : typeof e == "object" && e && e.t === "n" ? e.v : null;
229
228
  }
230
- function ie(e) {
229
+ function ne(e) {
231
230
  return e = e.trim(), /^\$?[\w\-_]+$/.test(e) ? e : (/(?:https?:\/\/)?(?:www\.)?youtu\.?be(?:\.com)?\/?.*(?:watch|embed)?(?:.*v=|v\/|\/)([\w\-_]+)&?/.exec(e) || [])[1];
232
231
  }
233
- var ae = 72;
234
- function oe(e, t, n) {
232
+ var re = 72;
233
+ function ie(e, t, n) {
235
234
  if (e === t) return n;
236
235
  let r = {
237
236
  millimeter: 1,
@@ -242,70 +241,70 @@ function oe(e, t, n) {
242
241
  mile: 6.21371e-7,
243
242
  nauticalMile: 5.39957e-7,
244
243
  inch: .0393701,
245
- pixel: .0393701 * ae,
244
+ pixel: .0393701 * re,
246
245
  pica: .236222
247
246
  };
248
247
  return n / r[e] * r[t];
249
248
  }
250
- function se(e, t = "pixel", n = ae) {
251
- return t === "pixel" ? e : oe(t, "pixel", e) * (n / ae);
249
+ function ae(e, t = "pixel", n = re) {
250
+ return t === "pixel" ? e : ie(t, "pixel", e) * (n / re);
252
251
  }
253
- var ce;
254
- function le() {
255
- if (ce === void 0) {
252
+ var oe;
253
+ function se() {
254
+ if (oe === void 0) {
256
255
  let e = document.createElement("canvas").getContext("webgl");
257
256
  try {
258
- ce = e ? e.getParameter(e.MAX_TEXTURE_SIZE) : 4096;
257
+ oe = e ? e.getParameter(e.MAX_TEXTURE_SIZE) : 4096;
259
258
  } catch {
260
- ce = 4096;
259
+ oe = 4096;
261
260
  } finally {
262
261
  e?.getExtension("WEBGL_lose_context")?.loseContext();
263
262
  }
264
263
  }
265
- return [ce, ce];
264
+ return [oe, oe];
266
265
  }
267
- function ue(e) {
266
+ function ce(e) {
268
267
  return 2 * Math.round(e / 2);
269
268
  }
270
- function H(e, t, n) {
269
+ function U(e, t, n) {
271
270
  return e + (t - e) * n;
272
271
  }
273
- function de(e, t, n) {
272
+ function le(e, t, n) {
274
273
  return (n - e) / (t - e);
275
274
  }
276
- function U(e, t, n) {
275
+ function ue(e, t, n) {
277
276
  return Math.max(Math.min(e, n), t);
278
277
  }
279
- function fe(e) {
278
+ function de(e) {
280
279
  return Array.from(new Set(e));
281
280
  }
282
- function pe(e) {
281
+ function fe(e) {
283
282
  let t = e.split("").map((e) => e.charCodeAt(0)).reduce((e, t) => (e ^= t, e + (e << 1) + (e << 4) + (e << 7) + (e << 8) + (e << 24)), 2166136261);
284
283
  return t ^= t << 3, t += t >> 5, t ^= t << 4, t += t >> 17, t ^= t << 25, t += t >> 6, `0000000${(t >>> 0).toString(16)}`.substr(-8);
285
284
  }
286
- function me(e, t, n, r) {
285
+ function pe(e, t, n, r) {
287
286
  if (t.clientWidth > 0 && t.clientHeight > 0) {
288
287
  let i = e.export?.size ?? [600, 400], a = e.export?.unit, o = [
289
288
  "jpg",
290
289
  "png",
291
290
  "tiff"
292
- ].includes(r), s = se(i[0], a), c = se(i[1], a);
293
- return Math.min(t.clientWidth / (n === "video" ? ue(s) : o ? Math.round(s) : s), t.clientHeight / (n === "video" ? ue(c) : o ? Math.round(c) : c));
291
+ ].includes(r), s = ae(i[0], a), c = ae(i[1], a);
292
+ return Math.min(t.clientWidth / (n === "video" ? ce(s) : o ? Math.round(s) : s), t.clientHeight / (n === "video" ? ce(c) : o ? Math.round(c) : c));
294
293
  }
295
294
  return 1;
296
295
  }
297
- function he(e, t, n = 1e-4) {
296
+ function me(e, t, n = 1e-4) {
298
297
  return Math.abs(e - t) < n;
299
298
  }
300
- function ge(e, t, n) {
301
- let { lng: r, lat: i } = e.getCenter(), a = e.getPitch() * Math.PI / 180, o = e.getBearing() * Math.PI / 180, s = _e(r, i), c = _e(t, n), l = ve(s, ye(xe(be([
299
+ function he(e, t, n) {
300
+ let { lng: r, lat: i } = e.getCenter(), a = e.getPitch() * Math.PI / 180, o = e.getBearing() * Math.PI / 180, s = ge(r, i), c = ge(t, n), l = _e(s, ve(be(ye([
302
301
  0,
303
302
  0,
304
303
  1
305
304
  ], s)), o), a);
306
305
  return l[0] * c[0] + l[1] * c[1] + l[2] * c[2] > .3;
307
306
  }
308
- function _e(e, t) {
307
+ function ge(e, t) {
309
308
  let n = t * Math.PI / 180, r = e * Math.PI / 180;
310
309
  return [
311
310
  Math.cos(n) * Math.cos(r),
@@ -313,7 +312,7 @@ function _e(e, t) {
313
312
  Math.sin(n)
314
313
  ];
315
314
  }
316
- function ve(e, t, n) {
315
+ function _e(e, t, n) {
317
316
  let [r, i, a] = e, [o, s, c] = t, l = Math.cos(n), u = Math.sin(n), d = r * o + i * s + a * c;
318
317
  return [
319
318
  r * l + (s * a - c * i) * u + o * d * (1 - l),
@@ -321,7 +320,7 @@ function ve(e, t, n) {
321
320
  a * l + (o * i - s * r) * u + c * d * (1 - l)
322
321
  ];
323
322
  }
324
- function ye(e, t) {
323
+ function ve(e, t) {
325
324
  let [n, r, i] = e, a = Math.cos(t), o = Math.sin(t);
326
325
  return [
327
326
  n * a - r * o,
@@ -329,7 +328,7 @@ function ye(e, t) {
329
328
  i
330
329
  ];
331
330
  }
332
- function be(e, t) {
331
+ function ye(e, t) {
333
332
  let [n, r, i] = e, [a, o, s] = t;
334
333
  return [
335
334
  r * s - i * o,
@@ -337,7 +336,7 @@ function be(e, t) {
337
336
  n * o - r * a
338
337
  ];
339
338
  }
340
- function xe(e) {
339
+ function be(e) {
341
340
  let [t, n, r] = e, i = Math.hypot(t, n, r);
342
341
  return [
343
342
  t / i,
@@ -347,7 +346,7 @@ function xe(e) {
347
346
  }
348
347
  //#endregion
349
348
  //#region src/utils/labelFreeAreas.ts
350
- function Se(e, t) {
349
+ function xe(e, t) {
351
350
  if (t === "video") return;
352
351
  let n = Array.from(e.getContainer().querySelectorAll(".adornment, .maplibregl-ctrl-attrib")), r = e.getCanvas().getBoundingClientRect(), i = n.map((e) => {
353
352
  let t = e.getBoundingClientRect(), n = t.x - r.x, i = t.y - r.y;
@@ -382,13 +381,14 @@ function Se(e, t) {
382
381
  }
383
382
  //#endregion
384
383
  //#region src/adornments/customAdornment.ts
384
+ var Se = /^\s*[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?\s*$/;
385
385
  function Ce(e, t, n) {
386
386
  let r = document.createElement("div");
387
387
  r.className = "adornment";
388
388
  let { svg: i, scale: a = 1 } = e, o = new DOMParser().parseFromString(i, "image/svg+xml").querySelector("svg");
389
389
  if (o) {
390
- let i = new RegExp(L.toString().replace(/^\/\^|\$\/$/g, "").replace(/.*/, "^($&)[, ]($&)[, ]($&)[, ]($&)$$")), s = o.getAttribute("width"), c = o.getAttribute("height"), l, u;
391
- if (s && c && L.test(s) && L.test(c)) l = Number(s), u = Number(c);
390
+ let i = new RegExp(Se.toString().replace(/^\/\^|\$\/$/g, "").replace(/.*/, "^($&)[, ]($&)[, ]($&)[, ]($&)$$")), s = o.getAttribute("width"), c = o.getAttribute("height"), l, u;
391
+ if (s && c && Se.test(s) && Se.test(c)) l = Number(s), u = Number(c);
392
392
  else {
393
393
  let e = i.exec(o.getAttribute("viewBox"));
394
394
  l = e ? Number(e[3]) : 300, u = e ? Number(e[4]) : 150;
@@ -734,7 +734,7 @@ var $e = class {
734
734
  });
735
735
  else {
736
736
  let { rgba: t } = r, n = i.getAttribute("fill-opacity");
737
- t[3] *= n ? U(Number(n), 0, 1) : 1, e.push({
737
+ t[3] *= n ? ue(Number(n), 0, 1) : 1, e.push({
738
738
  name: `fill#${a}`,
739
739
  color: st.fromRGB(t)
740
740
  });
@@ -750,7 +750,7 @@ var $e = class {
750
750
  });
751
751
  else {
752
752
  let { rgba: t } = n, r = i.getAttribute("stroke-opacity");
753
- t[3] *= r ? U(Number(r), 0, 1) : 1, e.push({
753
+ t[3] *= r ? ue(Number(r), 0, 1) : 1, e.push({
754
754
  name: `stroke#${a}`,
755
755
  color: st.fromRGB(t)
756
756
  });
@@ -1142,7 +1142,7 @@ var $e = class {
1142
1142
  let r = n.get(e);
1143
1143
  if (!r) {
1144
1144
  let i = e + t, a = new $e(e).getSvgSize(), o = Math.max(a[0] * t, 1), s = Math.max(a[1] * t, 1);
1145
- r = `mc-image-${pe(i)}`, this.promises.push(Be(e, o, s, this.fonts).then((e) => void this.map.addImage(r, e, { pixelRatio: t })).catch((e) => console.log(e))), n.set(e, r);
1145
+ r = `mc-image-${fe(i)}`, this.promises.push(Be(e, o, s, this.fonts).then((e) => void this.map.addImage(r, e, { pixelRatio: t })).catch((e) => console.log(e))), n.set(e, r);
1146
1146
  }
1147
1147
  return r;
1148
1148
  }
@@ -1176,11 +1176,11 @@ function it(e, t, n) {
1176
1176
  };
1177
1177
  }
1178
1178
  function q(e, t, n, r, i) {
1179
- let a = n ?? t, o = !r, s = a?.match(/\$\{([^}]+)}/)?.[1], c = s ? o ? ne(e[s]) : re(e[s]) : null, l = s ? o ? c : typeof c != "boolean" && c !== null && c !== "" ? r(c) : i : a;
1179
+ let a = n ?? t, o = !r, s = a?.match(/\$\{([^}]+)}/)?.[1], c = s ? o ? H(e[s]) : te(e[s]) : null, l = s ? o ? c : typeof c != "boolean" && c !== null && c !== "" ? r(c) : i : a;
1180
1180
  return l && !new st(l).badValue ? l : "#000000";
1181
1181
  }
1182
1182
  function at(e, t, n) {
1183
- return (n ?? t)?.split(Ue).map((t, n) => n & 1 ? ne(e[t]) : t).join("") || void 0;
1183
+ return (n ?? t)?.split(Ue).map((t, n) => n & 1 ? H(e[t]) : t).join("") || void 0;
1184
1184
  }
1185
1185
  function ot(e, t, n) {
1186
1186
  let r = t;
@@ -2215,7 +2215,7 @@ function bt(e, t) {
2215
2215
  }
2216
2216
  function xt(e, t, n) {
2217
2217
  let r = [], i = t / 100;
2218
- for (let t = 0; t <= 100; t++) r.push(St(e, t * i, R(n)));
2218
+ for (let t = 0; t <= 100; t++) r.push(St(e, t * i, L(n)));
2219
2219
  return S(vt(r), [
2220
2220
  -Infinity,
2221
2221
  -85.051129,
@@ -2224,17 +2224,17 @@ function xt(e, t, n) {
2224
2224
  ]).geometry.coordinates;
2225
2225
  }
2226
2226
  function St(e, t, n) {
2227
- let r = t / 6378.1, i = R(e.lng), a = R(e.lat), o = Math.asin(Math.sin(a) * Math.cos(r) + Math.cos(a) * Math.sin(r) * Math.cos(n));
2228
- return [z(i + Math.atan2(Math.sin(n) * Math.sin(r) * Math.cos(a), Math.cos(r) - Math.sin(a) * Math.sin(o))), z(o)];
2227
+ let r = t / 6378.1, i = L(e.lng), a = L(e.lat), o = Math.asin(Math.sin(a) * Math.cos(r) + Math.cos(a) * Math.sin(r) * Math.cos(n));
2228
+ return [R(i + Math.atan2(Math.sin(n) * Math.sin(r) * Math.cos(a), Math.cos(r) - Math.sin(a) * Math.sin(o))), R(o)];
2229
2229
  }
2230
2230
  function Ct(e, t) {
2231
- return B(e, {
2231
+ return z(e, {
2232
2232
  lng: 0,
2233
2233
  lat: 90
2234
2234
  }) / 1e3 < t;
2235
2235
  }
2236
2236
  function wt(e, t) {
2237
- return B(e, {
2237
+ return z(e, {
2238
2238
  lng: 0,
2239
2239
  lat: -90
2240
2240
  }) / 1e3 < t;
@@ -2244,15 +2244,15 @@ function Tt(e) {
2244
2244
  return t === "smooth" ? x(_t(n), { iterations: 4 }).features?.[0]?.geometry?.coordinates ?? n.slice() : n.slice();
2245
2245
  }
2246
2246
  function Et(e, t) {
2247
- return `${e}-${pe(`${t.vectorUrl}/${t.sourceLayerId}`)}`;
2247
+ return `${e}-${fe(`${t.vectorUrl}/${t.sourceLayerId}`)}`;
2248
2248
  }
2249
2249
  function Dt(e) {
2250
- return `custom-area-${pe(e.vectorUrl)}`;
2250
+ return `custom-area-${fe(e.vectorUrl)}`;
2251
2251
  }
2252
2252
  function Ot(e, t) {
2253
2253
  return e.reduce((e, n) => {
2254
2254
  let r = n.dataBindings?.[t];
2255
- return typeof r == "object" && r && r.t === "n" ? e.push(r.v) : typeof r == "number" ? e.push(r) : typeof r == "string" && r && e.push(L.test(r) ? Number(r) : r), e;
2255
+ return typeof r == "object" && r && r.t === "n" ? e.push(r.v) : (typeof r == "number" || typeof r == "string" && r) && e.push(r), e;
2256
2256
  }, []);
2257
2257
  }
2258
2258
  function kt(e, t) {
@@ -2435,7 +2435,7 @@ function Kt(e, t, n, r, i) {
2435
2435
  width: Math.max(0, ...k.map((e) => e.width)),
2436
2436
  height: Math.max(0, ...k.map((e) => e.height)),
2437
2437
  ascent: Math.max(0, ...k.map((e) => e.ascent))
2438
- }, F = N ? M.height + 10 : 0, I = N ? M.width : 0, ee = E.length - 1, L = U(45 * ee, Math.ceil(x ? (P.width + 10) * ee : (P.height + 10) * ee), Math.floor(x ? n.getContainer().clientWidth / r - 10 - Z * 2 : n.getContainer().clientHeight / r - 10 - Z * 2 - F)), R = Math.ceil(x ? Z * 2 + Math.max(I, L) : Z * 2 + Math.max(I, 25 + P.width)), z = Math.ceil(x ? Z * 2 + F + 20 + 5 + P.ascent : Z * 2 + F + L);
2438
+ }, F = N ? M.height + 10 : 0, I = N ? M.width : 0, ee = E.length - 1, L = ue(45 * ee, Math.ceil(x ? (P.width + 10) * ee : (P.height + 10) * ee), Math.floor(x ? n.getContainer().clientWidth / r - 10 - Z * 2 : n.getContainer().clientHeight / r - 10 - Z * 2 - F)), R = Math.ceil(x ? Z * 2 + Math.max(I, L) : Z * 2 + Math.max(I, 25 + P.width)), z = Math.ceil(x ? Z * 2 + F + 20 + 5 + P.ascent : Z * 2 + F + L);
2439
2439
  g && C.push(`
2440
2440
  <rect
2441
2441
  x="0"
@@ -2470,7 +2470,7 @@ function Kt(e, t, n, r, i) {
2470
2470
  />
2471
2471
  `);
2472
2472
  for (let e = 1; e < E.length - 1; e++) {
2473
- let t = E[e], n = O[e], r = k[e], i = H(0, L, de(w, T, t));
2473
+ let t = E[e], n = O[e], r = k[e], i = U(0, L, le(w, T, t));
2474
2474
  i > a && i < L - a && C.push(`
2475
2475
  <line
2476
2476
  x1="${x ? Math.floor(B + i) + .5 : B}"
@@ -2513,7 +2513,7 @@ function qt(e, t, n, r, i) {
2513
2513
  height: Math.max(0, ...T.map((e) => e.height)),
2514
2514
  ascent: Math.max(0, ...T.map((e) => e.ascent))
2515
2515
  }, k = D ? E.height + 10 : 0, A = D ? E.width : 0, j = o.length, M = 45, N = 15 / 2;
2516
- x ? (M = U(M, Math.ceil(O.height) + 10, Math.floor((n.getContainer().clientHeight / r - 10 - Z * 2 - k) / j)), c = Math.ceil(Z * 2 + k + j * M), l = Math.ceil(Z * 2 + Math.max(A, 25 + O.width))) : (M = U(M, Math.ceil(O.width) + 10, Math.floor((n.getContainer().clientWidth / r - 10 - Z * 2) / j)), l = Math.ceil(Z * 2 + Math.max(A, j * M)), c = Math.ceil(Z * 2 + k + 15 + 10 + O.ascent)), _ && s.push(`
2516
+ x ? (M = ue(M, Math.ceil(O.height) + 10, Math.floor((n.getContainer().clientHeight / r - 10 - Z * 2 - k) / j)), c = Math.ceil(Z * 2 + k + j * M), l = Math.ceil(Z * 2 + Math.max(A, 25 + O.width))) : (M = ue(M, Math.ceil(O.width) + 10, Math.floor((n.getContainer().clientWidth / r - 10 - Z * 2) / j)), l = Math.ceil(Z * 2 + Math.max(A, j * M)), c = Math.ceil(Z * 2 + k + 15 + 10 + O.ascent)), _ && s.push(`
2517
2517
  <rect
2518
2518
  x="0"
2519
2519
  y="0"
@@ -2668,7 +2668,7 @@ function Qt(e, t, n) {
2668
2668
  return a(), t.on("move", a), n !== "interactive" && t.on("resize", a), r;
2669
2669
  }
2670
2670
  function $t(e, t, n) {
2671
- let r = t.getPitch(), i = t.getBearing(), a = Math.cos(R(r));
2671
+ let r = t.getPitch(), i = t.getBearing(), a = Math.cos(L(r));
2672
2672
  return `
2673
2673
  <svg class="adornment-svg" data-adornment-name="${G(e.name)}" width="${n}" height="${n}" viewBox="-5 -5 30 30" xmlns="http://www.w3.org/2000/svg">
2674
2674
  <g class="tilt" transform="matrix(1 0 0 ${a} 0 ${10 * (1 - a)})">
@@ -2696,7 +2696,7 @@ function nn(e, t) {
2696
2696
  className: "control-button toggle-adornments-button",
2697
2697
  content: en,
2698
2698
  onClick: () => {
2699
- t.querySelectorAll(".adornment:not(.web-control)").forEach((e) => e.classList.toggle("hide")), t.querySelector(".toggle-adornments-button")?.classList.toggle("active"), Se(e, "interactive");
2699
+ t.querySelectorAll(".adornment:not(.web-control)").forEach((e) => e.classList.toggle("hide")), t.querySelector(".toggle-adornments-button")?.classList.toggle("active"), xe(e, "interactive");
2700
2700
  }
2701
2701
  });
2702
2702
  }
@@ -2892,27 +2892,28 @@ function Tn(e, t) {
2892
2892
  //#endregion
2893
2893
  //#region src/images/search.svg?raw
2894
2894
  var En = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\"><path d=\"M5.374.952a4.546 4.546 0 0 1 4.656 4.175 4.55 4.55 0 0 1-.958 3.184l1.824 1.81a.55.55 0 0 1 0 .765.55.55 0 0 1-.602.121.6.6 0 0 1-.179-.12l-1.807-1.81A4.544 4.544 0 0 1 .953 5.376 4.553 4.553 0 0 1 5.374.952m1.454 1.37a3.447 3.447 0 0 0-4.505 4.51 3.45 3.45 0 0 0 3.186 2.13A3.45 3.45 0 0 0 8.957 5.51a3.455 3.455 0 0 0-2.129-3.187\"/></svg>\n", Dn = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path d=\"m7.038 5.96 3.03 3.03L13.1 5.958l1.01 1.01L11.078 10l3.031 3.032-1.01 1.01-3.031-3.031-3.03 3.028-1.01-1.01L9.059 10l-3.03-3.03z\"/></svg>\n", On = {
2895
- da_DK: {
2896
- search: "Search",
2897
- videoAlert: "The video will only work when you publish the map",
2898
- mobileHelpText: "Use two fingers to move the map",
2899
- windowsHelpText: "Use Ctrl + scroll to zoom the map",
2900
- macHelpText: "Use ⌘ + scroll to zoom the map"
2901
- },
2902
- de_DE: {
2903
- search: "Suche",
2904
- videoAlert: "Das Video ist in der veröffentlichten Karte sichtbar.",
2905
- mobileHelpText: "Verwenden Sie zwei Finger um die Karte zu bewegen",
2906
- windowsHelpText: "Verwenden Sie Strg + Scroll um in der Karte zu zoomen",
2907
- macHelpText: "Verwenden Sie ⌘ + Scroll um in der Karte zu zoomen"
2908
- },
2909
- en_GB: {
2910
- search: "Search",
2911
- videoAlert: "The video will only work when you publish the map",
2912
- mobileHelpText: "Use two fingers to move the map",
2913
- windowsHelpText: "Use Ctrl + scroll to zoom the map",
2914
- macHelpText: "Use ⌘ + scroll to zoom the map"
2915
- },
2895
+ search: "Search",
2896
+ videoAlert: "The video will only work when you publish the map",
2897
+ mobileHelpText: "Use two fingers to move the map",
2898
+ windowsHelpText: "Use Ctrl + scroll to zoom the map",
2899
+ macHelpText: "Use ⌘ + scroll to zoom the map"
2900
+ }, kn = {
2901
+ search: "Suche",
2902
+ videoAlert: "Das Video ist in der veröffentlichten Karte sichtbar.",
2903
+ mobileHelpText: "Verwenden Sie zwei Finger um die Karte zu bewegen",
2904
+ windowsHelpText: "Verwenden Sie Strg + Scroll um in der Karte zu zoomen",
2905
+ macHelpText: "Verwenden Sie ⌘ + Scroll um in der Karte zu zoomen"
2906
+ }, An = {
2907
+ search: "Search",
2908
+ videoAlert: "The video will only work when you publish the map",
2909
+ mobileHelpText: "Use two fingers to move the map",
2910
+ windowsHelpText: "Use Ctrl + scroll to zoom the map",
2911
+ macHelpText: "Use ⌘ + scroll to zoom the map",
2912
+ loadingMap: "Loading map"
2913
+ }, jn = {
2914
+ da_DK: On,
2915
+ de_DE: kn,
2916
+ en_GB: An,
2916
2917
  es_ES: {
2917
2918
  search: "Buscar",
2918
2919
  videoAlert: "The video will only work when you publish the map",
@@ -2942,17 +2943,17 @@ var En = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" v
2942
2943
  macHelpText: "Gebruik ⌘ + Scroll om de kaart te zoomen"
2943
2944
  }
2944
2945
  };
2945
- function kn() {
2946
- let e = navigator.language.replace("-", "_"), t = Object.keys(On);
2946
+ function Mn() {
2947
+ let e = navigator.language.replace("-", "_"), t = Object.keys(jn);
2947
2948
  return t.find((t) => t === e) ?? t.find((t) => t.split("_")[0] === e.split("_")[0]) ?? "en_GB";
2948
2949
  }
2949
- var An = kn();
2950
- function jn(e) {
2951
- return On[An][e] ?? e;
2950
+ var Nn = Mn();
2951
+ function Pn(e) {
2952
+ return jn[Nn][e] ?? An[e] ?? e;
2952
2953
  }
2953
2954
  //#endregion
2954
2955
  //#region src/utils/graphhopper.ts
2955
- var Mn = class {
2956
+ var Fn = class {
2956
2957
  async getLocationInBounds(e, t, n = 10) {
2957
2958
  try {
2958
2959
  let r = await this._callGraphHopper({
@@ -2967,7 +2968,7 @@ var Mn = class {
2967
2968
  }
2968
2969
  async _callGraphHopper(e) {
2969
2970
  let t = new URLSearchParams(e);
2970
- t.append("key", "c5c40ac9-ed73-4e20-aed6-cfe495604ca8"), t.append("locale", An.slice(0, 2));
2971
+ t.append("key", "c5c40ac9-ed73-4e20-aed6-cfe495604ca8"), t.append("locale", Nn.slice(0, 2));
2971
2972
  let n = { headers: { Accept: "application/json" } }, r = `https://graphhopper.com/api/1/geocode?${t}`;
2972
2973
  return await (await fetch(r, n)).json();
2973
2974
  }
@@ -2994,7 +2995,7 @@ var Mn = class {
2994
2995
  ].filter(Boolean).join(", ")
2995
2996
  }));
2996
2997
  }
2997
- }, Nn = class {
2998
+ }, In = class {
2998
2999
  map;
2999
3000
  mapContainer;
3000
3001
  container;
@@ -3004,7 +3005,7 @@ var Mn = class {
3004
3005
  inputWrapper;
3005
3006
  button;
3006
3007
  isOpen = !1;
3007
- geocoder = new Mn();
3008
+ geocoder = new Fn();
3008
3009
  suggestions = [];
3009
3010
  items = [];
3010
3011
  index = 0;
@@ -3013,7 +3014,7 @@ var Mn = class {
3013
3014
  this.map = e, this.container = document.createElement("div"), this.control = document.createElement("div"), this.input = document.createElement("input"), this.dropdown = document.createElement("div"), this.inputWrapper = document.createElement("div"), this.button = document.createElement("button"), this.mapContainer = this.map.getContainer();
3014
3015
  }
3015
3016
  init() {
3016
- this.container.className = "geocoder-container", this.control.className = "geocoder-control", this.input.className = "geocoder-input", this.dropdown.className = "geocoder-dropdown", this.inputWrapper.className = "geocoder-input-wrapper", this.button.className = "control-button", this.input.type = "text", this.input.placeholder = jn("search"), this.button.innerHTML = En;
3017
+ this.container.className = "geocoder-container", this.control.className = "geocoder-control", this.input.className = "geocoder-input", this.dropdown.className = "geocoder-dropdown", this.inputWrapper.className = "geocoder-input-wrapper", this.button.className = "control-button", this.input.type = "text", this.input.placeholder = Pn("search"), this.button.innerHTML = En;
3017
3018
  let e = document.createElement("button");
3018
3019
  e.className = "geocoder-clear", e.innerHTML = Dn;
3019
3020
  let t = document.createElement("div");
@@ -3098,29 +3099,29 @@ var Mn = class {
3098
3099
  };
3099
3100
  //#endregion
3100
3101
  //#region src/utils/browser.ts
3101
- function Pn() {
3102
+ function Ln() {
3102
3103
  return navigator.userAgent.toLowerCase().indexOf("mobile") >= 0;
3103
3104
  }
3104
3105
  //#endregion
3105
3106
  //#region src/controls/webControls.ts
3106
- function Fn(e, t, n, r, i) {
3107
+ function Rn(e, t, n, r, i) {
3107
3108
  let a = document.createElement("div");
3108
- return a.classList.add("web-control", "adornment"), In(e, i).forEach((e) => {
3109
+ return a.classList.add("web-control", "adornment"), zn(e, i).forEach((e) => {
3109
3110
  let i;
3110
3111
  if (e === "zoomIn") i = on(t);
3111
3112
  else if (e === "zoomOut") i = sn(t);
3112
3113
  else if (e === "fullscreen") i = Cn(t);
3113
3114
  else if (e === "geolocation") i = gn(t, n);
3114
3115
  else if (e === "refresh") i = Tn(t, r);
3115
- else if (e === "search") i = new Nn(t).init();
3116
+ else if (e === "search") i = new In(t).init();
3116
3117
  else if (e === "toggleAdornments") i = nn(t, t.getContainer());
3117
3118
  else return;
3118
3119
  a.appendChild(i);
3119
3120
  }), a;
3120
3121
  }
3121
- function In(e, t) {
3122
+ function zn(e, t) {
3122
3123
  let n = e.buttons.flatMap((e) => e === "zoom" ? ["zoomIn", "zoomOut"] : e);
3123
- if (Pn()) {
3124
+ if (Ln()) {
3124
3125
  let e = n.filter((e) => e !== "zoomIn" && e !== "zoomOut");
3125
3126
  if (t) {
3126
3127
  let t = e[0] === "search" ? 1 : 0;
@@ -3132,7 +3133,7 @@ function In(e, t) {
3132
3133
  }
3133
3134
  //#endregion
3134
3135
  //#region src/adornments/copyright.ts
3135
- var Ln = {
3136
+ var Bn = {
3136
3137
  here: {
3137
3138
  href: "https://www.here.com/",
3138
3139
  label: "© HERE 2025"
@@ -3146,19 +3147,19 @@ var Ln = {
3146
3147
  label: "© OpenStreetMap"
3147
3148
  }
3148
3149
  };
3149
- function Rn(e, t, n) {
3150
+ function Vn(e, t, n) {
3150
3151
  let r = document.createElement("div");
3151
3152
  r.className = "adornment";
3152
3153
  let i = () => {
3153
- r.innerHTML = Vn(t, e, t.getScale(), n);
3154
+ r.innerHTML = Wn(t, e, t.getScale(), n);
3154
3155
  }, a = n.loadReference(e.font ?? "Arial, sans-serif").then(i);
3155
3156
  return t.on("attributionchange", i), t.on("zoomend", i), t.on("resize", i), {
3156
3157
  element: r,
3157
3158
  ready: a
3158
3159
  };
3159
3160
  }
3160
- function zn(e) {
3161
- let t = Object.values(e.style.tileManagers), n = [Ln.mapcreator], r = {
3161
+ function Hn(e) {
3162
+ let t = Object.values(e.style.tileManagers), n = [Bn.mapcreator], r = {
3162
3163
  osm: !1,
3163
3164
  here: !1
3164
3165
  };
@@ -3169,16 +3170,16 @@ function zn(e) {
3169
3170
  "attribution" in e && typeof e.attribution == "string" && (e.attribution.includes("OpenStreetMap") && (r.osm = !0), e.attribution.includes("HERE") && (r.here = !0));
3170
3171
  }
3171
3172
  }
3172
- return r.osm && n.push(Ln.openStreetMap), r.here && n.push(Ln.here), n;
3173
+ return r.osm && n.push(Bn.openStreetMap), r.here && n.push(Bn.here), n;
3173
3174
  }
3174
- function Bn(e, t, n) {
3175
+ function Un(e, t, n) {
3175
3176
  let r = document.createElement("span");
3176
3177
  r.style.fontFamily = t.cssFamily, r.style.fontWeight = t.weight, r.style.fontStyle = t.style, r.style.fontSize = `${n}px`, r.style.position = "absolute", r.style.visibility = "hidden", r.innerText = e, document.body.appendChild(r);
3177
3178
  let i = Math.max(r.offsetWidth, 1);
3178
3179
  return r.remove(), i;
3179
3180
  }
3180
- function Vn(e, t, n, r) {
3181
- let { color: i = "#000000", font: a = "Arial, sans-serif", fontSize: o = 10, orientation: s = "horizontal", position: c } = t, l = r.resolve(a), u = zn(e), d = Bn(u.map(({ label: e }) => e).join(" "), l, o), f = o * 1.2, p = s === "vertical", m = ["top_left", "bottom_left"].includes(c), h = p ? f : d, g = p ? d : f, _ = p ? m ? -90 : 90 : 0, v = p ? m ? .38 * o : .3 * o : .38 * o, y = u.map((e) => `<a href="${e.href}" target="_blank">${e.label}</a>`).join(" ");
3181
+ function Wn(e, t, n, r) {
3182
+ let { color: i = "#000000", font: a = "Arial, sans-serif", fontSize: o = 10, orientation: s = "horizontal", position: c } = t, l = r.resolve(a), u = Hn(e), d = Un(u.map(({ label: e }) => e).join(" "), l, o), f = o * 1.2, p = s === "vertical", m = ["top_left", "bottom_left"].includes(c), h = p ? f : d, g = p ? d : f, _ = p ? m ? -90 : 90 : 0, v = p ? m ? .38 * o : .3 * o : .38 * o, y = u.map((e) => `<a href="${e.href}" target="_blank">${e.label}</a>`).join(" ");
3182
3183
  return `
3183
3184
  <svg
3184
3185
  class="adornment-svg"
@@ -3204,7 +3205,7 @@ function Vn(e, t, n, r) {
3204
3205
  }
3205
3206
  //#endregion
3206
3207
  //#region node_modules/@turf/meta/dist/esm/index.js
3207
- function Hn(e, t, n) {
3208
+ function Gn(e, t, n) {
3208
3209
  if (e !== null) for (var r, i, a, o, s, c, l, u = 0, d = 0, f, p = e.type, m = p === "FeatureCollection", h = p === "Feature", g = m ? e.features.length : 1, _ = 0; _ < g; _++) {
3209
3210
  l = m ? e.features[_].geometry : h ? e.geometry : e, f = l ? l.type === "GeometryCollection" : !1, s = f ? l.geometries.length : 1;
3210
3211
  for (var v = 0; v < s; v++) {
@@ -3250,7 +3251,7 @@ function Hn(e, t, n) {
3250
3251
  }
3251
3252
  break;
3252
3253
  case "GeometryCollection":
3253
- for (r = 0; r < o.geometries.length; r++) if (Hn(o.geometries[r], t, n) === !1) return !1;
3254
+ for (r = 0; r < o.geometries.length; r++) if (Gn(o.geometries[r], t, n) === !1) return !1;
3254
3255
  break;
3255
3256
  default: throw Error("Unknown Geometry Type");
3256
3257
  }
@@ -3260,8 +3261,8 @@ function Hn(e, t, n) {
3260
3261
  }
3261
3262
  //#endregion
3262
3263
  //#region src/adornments/insetMap.ts
3263
- var Un = 100;
3264
- function Wn(e, t, n, r) {
3264
+ var Kn = 100;
3265
+ function qn(e, t, n, r) {
3265
3266
  let i = document.createElement("div");
3266
3267
  i.className = "adornment";
3267
3268
  let a = e.scale ?? 1;
@@ -3299,33 +3300,33 @@ function Wn(e, t, n, r) {
3299
3300
  });
3300
3301
  s.push(e);
3301
3302
  }
3302
- Gn(o), r !== "interactive" && t.on("resize", () => Gn(o));
3303
- let c = Promise.all(s).then(() => Gn(o)).catch(() => {});
3303
+ Jn(o), r !== "interactive" && t.on("resize", () => Jn(o));
3304
+ let c = Promise.all(s).then(() => Jn(o)).catch(() => {});
3304
3305
  return t.on("moveend", () => {
3305
- o.moveEndPosition = t.getCenter(), (o.isGlobe || o.globeFallbackActive) && Gn(o);
3306
+ o.moveEndPosition = t.getCenter(), (o.isGlobe || o.globeFallbackActive) && Jn(o);
3306
3307
  }), t.on("move", () => {
3307
3308
  if (!o.isGlobe) {
3308
- let [e, n, r, i] = o.boundingBox, a = Jn(t), s = T(yt([a, _t([[
3309
+ let [e, n, r, i] = o.boundingBox, a = Zn(t), s = T(yt([a, _t([[
3309
3310
  [e, n],
3310
3311
  [e, i],
3311
3312
  [r, i],
3312
3313
  [r, n],
3313
3314
  [e, n]
3314
3315
  ]])])), c = C(a), l = (s ? C(s) : 0) < c * .75;
3315
- o.globeFallbackActive !== l && (o.globeFallbackActive = l, o.moveEndPosition = t.getCenter(), Gn(o));
3316
+ o.globeFallbackActive !== l && (o.globeFallbackActive = l, o.moveEndPosition = t.getCenter(), Jn(o));
3316
3317
  }
3317
- qn(o);
3318
+ Xn(o);
3318
3319
  }), {
3319
3320
  element: i,
3320
3321
  ready: c
3321
3322
  };
3322
3323
  }
3323
- function Gn(e) {
3324
- let { id: t, map: n, container: r, scale: i, backgroundColor: a, globeBackgroundColor: o, secondaryFillColor: s, secondaryStrokeColor: c, primaryFillColor: l, primaryStrokeColor: u, graticuleColor: d, borderColor: f, frameColor: p, frameOutlineColor: m, dotColor: h, dotOutlineColor: g } = e, _ = Un * i, v = n.getScale();
3324
+ function Jn(e) {
3325
+ let { id: t, map: n, container: r, scale: i, backgroundColor: a, globeBackgroundColor: o, secondaryFillColor: s, secondaryStrokeColor: c, primaryFillColor: l, primaryStrokeColor: u, graticuleColor: d, borderColor: f, frameColor: p, frameOutlineColor: m, dotColor: h, dotOutlineColor: g } = e, _ = Kn * i, v = n.getScale();
3325
3326
  r.style.width = `${_ * v}px`, r.style.height = `${_ * v}px`;
3326
3327
  let y = e.globeFallbackActive && e.globeGeoJson !== void 0, b = y ? e.globeGeoJson : e.geoJson, x = y || e.isGlobe;
3327
3328
  if (b === void 0) return;
3328
- let S = _ / 2, C = .1 * i, w = [x ? `<circle cx="${S}" cy="${S}" r="${S}" ${J(o)}></circle>` : `<rect x="0" y="0" width="${_}" height="${_}" ${J(a)}></rect>`], { path: T } = Kn(e), D = T({
3329
+ let S = _ / 2, C = .1 * i, w = [x ? `<circle cx="${S}" cy="${S}" r="${S}" ${J(o)}></circle>` : `<rect x="0" y="0" width="${_}" height="${_}" ${J(a)}></rect>`], { path: T } = Yn(e), D = T({
3329
3330
  ...b,
3330
3331
  features: b.features.filter((e) => e.properties?.class !== "P1")
3331
3332
  });
@@ -3402,10 +3403,10 @@ function Gn(e) {
3402
3403
  >
3403
3404
  ${w.join("")}
3404
3405
  </svg>
3405
- `, qn(e);
3406
+ `, Xn(e);
3406
3407
  }
3407
- function Kn(e) {
3408
- let { scale: t, boundingBox: n, moveEndPosition: r } = e, i = e.globeFallbackActive && e.globeGeoJson !== void 0 || e.isGlobe, a = Un * t, o = k(), s;
3408
+ function Yn(e) {
3409
+ let { scale: t, boundingBox: n, moveEndPosition: r } = e, i = e.globeFallbackActive && e.globeGeoJson !== void 0 || e.isGlobe, a = Kn * t, o = k(), s;
3409
3410
  if (i) {
3410
3411
  let { lng: e, lat: t } = r;
3411
3412
  s = O().scale(a / 2).translate([a / 2, a / 2]).rotate([-e, -t]).clipAngle(90);
@@ -3419,11 +3420,11 @@ function Kn(e) {
3419
3420
  projection: s
3420
3421
  };
3421
3422
  }
3422
- function qn(e) {
3423
+ function Xn(e) {
3423
3424
  let { id: t, map: n, container: r, scale: i } = e, a = r.querySelector(`#frame-${t}`), o = r.querySelector(`#frame-outline-${t}`), s = r.querySelector(`#dot-${t}`);
3424
3425
  if (!a || !o || !s) return;
3425
- let c = Jn(n), { path: l, projection: u } = Kn(e), d = Infinity, f = -Infinity, p = Infinity, m = -Infinity, h = Infinity, g = -Infinity;
3426
- Hn(c, (e) => {
3426
+ let c = Zn(n), { path: l, projection: u } = Yn(e), d = Infinity, f = -Infinity, p = Infinity, m = -Infinity, h = Infinity, g = -Infinity;
3427
+ Gn(c, (e) => {
3427
3428
  let t = u(e);
3428
3429
  d = Math.min(d, e[0]), f = Math.max(f, e[0]), p = Math.min(p, t[0]), m = Math.max(m, t[0]), h = Math.min(h, t[1]), g = Math.max(g, t[1]);
3429
3430
  });
@@ -3438,22 +3439,22 @@ function qn(e) {
3438
3439
  a.setAttribute("d", e), o.setAttribute("d", e);
3439
3440
  } else a.style.display = "none", o.style.display = "none", s.style.display = "none";
3440
3441
  }
3441
- function Jn(e) {
3442
+ function Zn(e) {
3442
3443
  let { clientWidth: t, clientHeight: n } = e.getCanvas(), r = [];
3443
3444
  for (let n = 0; n < 64; n++) {
3444
- let { lng: i, lat: a } = e.unprojectWithScaleCorrection([H(0, t, n / 64), 0]);
3445
+ let { lng: i, lat: a } = e.unprojectWithScaleCorrection([U(0, t, n / 64), 0]);
3445
3446
  r.push([i, a]);
3446
3447
  }
3447
3448
  for (let i = 0; i < 64; i++) {
3448
- let { lng: a, lat: o } = e.unprojectWithScaleCorrection([t, H(0, n, i / 64)]);
3449
+ let { lng: a, lat: o } = e.unprojectWithScaleCorrection([t, U(0, n, i / 64)]);
3449
3450
  r.push([a, o]);
3450
3451
  }
3451
3452
  for (let i = 0; i < 64; i++) {
3452
- let { lng: a, lat: o } = e.unprojectWithScaleCorrection([H(t, 0, i / 64), n]);
3453
+ let { lng: a, lat: o } = e.unprojectWithScaleCorrection([U(t, 0, i / 64), n]);
3453
3454
  r.push([a, o]);
3454
3455
  }
3455
3456
  for (let t = 0; t < 64; t++) {
3456
- let { lng: i, lat: a } = e.unprojectWithScaleCorrection([0, H(n, 0, t / 64)]);
3457
+ let { lng: i, lat: a } = e.unprojectWithScaleCorrection([0, U(n, 0, t / 64)]);
3457
3458
  r.push([i, a]);
3458
3459
  }
3459
3460
  let { lng: i, lat: a } = e.unprojectWithScaleCorrection([0, 0]);
@@ -3468,14 +3469,14 @@ function Jn(e) {
3468
3469
  }
3469
3470
  //#endregion
3470
3471
  //#region src/utils/scalebar.ts
3471
- var Yn = [
3472
+ var Qn = [
3472
3473
  10,
3473
3474
  5,
3474
3475
  3,
3475
3476
  2,
3476
3477
  1
3477
3478
  ];
3478
- function Xn(e, t = 1e-6) {
3479
+ function $n(e, t = 1e-6) {
3479
3480
  let n = Math.floor(e);
3480
3481
  if (e -= n, e < t) return [n, 1];
3481
3482
  if (1 - t < e) return [n + 1, 1];
@@ -3487,25 +3488,25 @@ function Xn(e, t = 1e-6) {
3487
3488
  else return [n * c + s, c];
3488
3489
  }
3489
3490
  }
3490
- function Zn(e) {
3491
+ function er(e) {
3491
3492
  let t = 10 ** Math.floor(Math.log10(e)), n = e / t;
3492
- for (let e of Yn) if (n >= e) return e * t;
3493
- return Qn(n) * t;
3493
+ for (let e of Qn) if (n >= e) return e * t;
3494
+ return tr(n) * t;
3494
3495
  }
3495
- function Qn(e) {
3496
+ function tr(e) {
3496
3497
  let t = 10 ** Math.ceil(-Math.log(e) / Math.LN10);
3497
3498
  return Math.round(e * t) / t;
3498
3499
  }
3499
3500
  //#endregion
3500
3501
  //#region src/adornments/scalebar.ts
3501
- var $n = {
3502
+ var nr = {
3502
3503
  kilometer: "km",
3503
3504
  meter: "m",
3504
3505
  mile: "mi",
3505
3506
  foot: "ft",
3506
3507
  nauticalMile: "nm"
3507
3508
  };
3508
- function er(e, t, n, r) {
3509
+ function rr(e, t, n, r) {
3509
3510
  let i = document.createElement("div");
3510
3511
  i.className = "adornment";
3511
3512
  let a = "Arial, sans-serif";
@@ -3513,19 +3514,19 @@ function er(e, t, n, r) {
3513
3514
  element: i,
3514
3515
  ready: n.loadReference(e.font ?? a, "700").then(() => {
3515
3516
  let o = () => {
3516
- i.innerHTML = tr(t, e, t.getScale(), a, n);
3517
+ i.innerHTML = ir(t, e, t.getScale(), a, n);
3517
3518
  };
3518
3519
  o(), t.on("move", o), r !== "interactive" && t.on("resize", o);
3519
3520
  })
3520
3521
  };
3521
3522
  }
3522
- function tr(e, t, n, r, i) {
3523
- let { maxWidth: a = 100, fontSize: o = 8, color: s = "#000000", unit: c = "metric_and_imperial" } = t, l = i.resolve(t.font ?? r, "700"), u = e.getCenter(), d = e.project(u), f = B(u, e.unproject([d.x + a, d.y])), p = Object.fromEntries(Object.entries($n).map(([e, t]) => {
3524
- let n = oe("meter", e, f), r = Zn(n) || 0;
3523
+ function ir(e, t, n, r, i) {
3524
+ let { maxWidth: a = 100, fontSize: o = 8, color: s = "#000000", unit: c = "metric_and_imperial" } = t, l = i.resolve(t.font ?? r, "700"), u = e.getCenter(), d = e.project(u), f = z(u, e.unproject([d.x + a, d.y])), p = Object.fromEntries(Object.entries(nr).map(([e, t]) => {
3525
+ let n = ie("meter", e, f), r = er(n) || 0;
3525
3526
  return [e, {
3526
3527
  value: n,
3527
3528
  ratio: n ? r / n : 0,
3528
- humanized: r < 1 ? `${Xn(r).join("/")} ${t}` : `${r} ${t}`
3529
+ humanized: r < 1 ? `${$n(r).join("/")} ${t}` : `${r} ${t}`
3529
3530
  }];
3530
3531
  })), m = p.meter.value > 1e3 ? p.kilometer : p.meter, h = p.foot.value > 5280 ? p.mile : p.foot, g = {
3531
3532
  imperial: h,
@@ -3665,7 +3666,7 @@ function tr(e, t, n, r, i) {
3665
3666
  }
3666
3667
  //#endregion
3667
3668
  //#region src/adornments/heading.ts
3668
- function nr(e, t, n, r) {
3669
+ function ar(e, t, n, r) {
3669
3670
  let i = document.createElement("div");
3670
3671
  i.className = "adornment";
3671
3672
  let a = "ArialMT", o = Array.from(new Set([e.titleFont ?? a, e.subtitleFont ?? a]));
@@ -3673,13 +3674,13 @@ function nr(e, t, n, r) {
3673
3674
  element: i,
3674
3675
  ready: Promise.all(o.map((e) => n.loadReference(e))).then(() => {
3675
3676
  let o = () => {
3676
- i.innerHTML = rr(e, a, t.getScale(), n);
3677
+ i.innerHTML = or(e, a, t.getScale(), n);
3677
3678
  };
3678
3679
  o(), r !== "interactive" && t.on("resize", o);
3679
3680
  })
3680
3681
  };
3681
3682
  }
3682
- function rr(e, t, n, r) {
3683
+ function or(e, t, n, r) {
3683
3684
  let { title: i, titleColor: a = "#000000", titleFontSize: o = 20, titleJustify: s = "center", subtitle: c, subtitleColor: l = "#000000", subtitleFontSize: u = 12, subtitleJustify: d = "center", background: f = "#ffffff", showBackground: p = !1 } = e, m = r.resolve(e.titleFont ?? t), h = r.resolve(e.subtitleFont ?? t), g = 0, _ = 0, v = 0, y = 0, b = 0, x = i.trim().length > 0 ? it([i], m, o) : null, S = c.trim().length > 0 ? it([c], h, u) : null;
3684
3685
  if (g = Math.max(x?.width ?? 0, S?.width ?? 0), x) {
3685
3686
  let { ascent: e, descent: t } = x;
@@ -3698,7 +3699,7 @@ function rr(e, t, n, r) {
3698
3699
  }
3699
3700
  //#endregion
3700
3701
  //#region src/constants/index.ts
3701
- var ir = {
3702
+ var sr = {
3702
3703
  "sky-color": "#6babff",
3703
3704
  "sky-horizon-blend": 1,
3704
3705
  "horizon-color": [
@@ -3716,7 +3717,7 @@ var ir = {
3716
3717
  "fog-color": "#edf7fc",
3717
3718
  "fog-ground-blend": .5,
3718
3719
  "atmosphere-blend": 1
3719
- }, ar = {
3720
+ }, cr = {
3720
3721
  top_left: {
3721
3722
  x: 5,
3722
3723
  y: 5,
@@ -3757,7 +3758,7 @@ var ir = {
3757
3758
  y: 0,
3758
3759
  unit: "px"
3759
3760
  }
3760
- }, or = {
3761
+ }, lr = {
3761
3762
  top_left: {
3762
3763
  x: "left",
3763
3764
  y: "top"
@@ -3790,7 +3791,7 @@ var ir = {
3790
3791
  x: "left",
3791
3792
  y: "center"
3792
3793
  }
3793
- }, sr = {
3794
+ }, ur = {
3794
3795
  fill: {
3795
3796
  props: ["fill-opacity"],
3796
3797
  defaultValue: 1
@@ -3835,17 +3836,17 @@ var ir = {
3835
3836
  props: [],
3836
3837
  defaultValue: 1
3837
3838
  }
3838
- }, cr = [
3839
+ }, dr = [
3839
3840
  "beforeWaters",
3840
3841
  "beforeBoundaries",
3841
3842
  "beforeNames",
3842
3843
  "beforeNone"
3843
- ], lr = {
3844
+ ], fr = {
3844
3845
  beforeWaters: "mc-before-waters",
3845
3846
  beforeBoundaries: "mc-before-boundaries",
3846
3847
  beforeNames: "mc-before-names",
3847
3848
  beforeNone: "mc-before-none"
3848
- }, ur = {
3849
+ }, pr = {
3849
3850
  jpg: "static",
3850
3851
  png: "static",
3851
3852
  svg: "static",
@@ -3863,7 +3864,7 @@ var ir = {
3863
3864
  web_video: "video",
3864
3865
  web: "interactive",
3865
3866
  web_download: "interactive"
3866
- }, dr = [
3867
+ }, mr = [
3867
3868
  "top_left",
3868
3869
  "top_right",
3869
3870
  "bottom_left",
@@ -3872,12 +3873,12 @@ var ir = {
3872
3873
  "left_center",
3873
3874
  "right_center",
3874
3875
  "bottom_center"
3875
- ], fr = /* @__PURE__ */ new Map(), pr = (e) => fr.delete(e);
3876
- async function mr(e, t, n, r, i, a, o) {
3876
+ ], hr = /* @__PURE__ */ new Map(), gr = (e) => hr.delete(e);
3877
+ async function _r(e, t, n, r, i, a, o) {
3877
3878
  let s = [...e.adornments ?? []], { fonts: c } = r;
3878
- hr(n), gr(n, t, o);
3879
+ vr(n), yr(n, t, o);
3879
3880
  let l = [], u = s.some((e) => !["copyright", "webControls"].includes(e.type));
3880
- Pn() && u && !s.some((e) => e.type === "webControls") && s.unshift({
3881
+ Ln() && u && !s.some((e) => e.type === "webControls") && s.unshift({
3881
3882
  type: "webControls",
3882
3883
  id: "web_controls",
3883
3884
  name: "Web controls",
@@ -3887,15 +3888,15 @@ async function mr(e, t, n, r, i, a, o) {
3887
3888
  }), s.forEach((t) => {
3888
3889
  if (t.type === "custom") Q(n, Ce(t, n, o), t.position, t.stacking);
3889
3890
  else if (t.type === "northArrow") Q(n, Qt(t, n, o), t.position, t.stacking);
3890
- else if (t.type === "webControls" && t.buttons && o === "interactive") Q(n, Fn(t, n, r, i, u), t.position, t.stacking);
3891
+ else if (t.type === "webControls" && t.buttons && o === "interactive") Q(n, Rn(t, n, r, i, u), t.position, t.stacking);
3891
3892
  else if (t.type === "scalebar") {
3892
- let { element: e, ready: r } = er(t, n, c, o);
3893
+ let { element: e, ready: r } = rr(t, n, c, o);
3893
3894
  Q(n, e, t.position, t.stacking), l.push(r);
3894
3895
  } else if (t.type === "insetMap") {
3895
- let { element: e, ready: r } = Wn(t, n, a, o);
3896
+ let { element: e, ready: r } = qn(t, n, a, o);
3896
3897
  Q(n, e, t.position, t.stacking), l.push(r);
3897
3898
  } else if (t.type === "heading") {
3898
- let { element: e, ready: r } = nr(t, n, c, o);
3899
+ let { element: e, ready: r } = ar(t, n, c, o);
3899
3900
  Q(n, e, t.position, t.stacking), l.push(r);
3900
3901
  } else if (t.type === "manualLegend") {
3901
3902
  let { element: e, ready: r } = Zt(t, n, c, o);
@@ -3904,15 +3905,15 @@ async function mr(e, t, n, r, i, a, o) {
3904
3905
  let { element: r, ready: i } = Ut(t, e, n, c, o);
3905
3906
  Q(n, r, t.position, t.stacking), l.push(i);
3906
3907
  } else if (t.type === "copyright" && o !== "interactive") {
3907
- let { element: e, ready: r } = Rn(t, n, c);
3908
+ let { element: e, ready: r } = Vn(t, n, c);
3908
3909
  Q(n, e, t.position, t.stacking), l.push(r);
3909
3910
  }
3910
- }), n.on("resize", () => gr(n, t, o)), await Promise.all(l);
3911
+ }), n.on("resize", () => yr(n, t, o)), await Promise.all(l);
3911
3912
  }
3912
- function hr(e) {
3913
+ function vr(e) {
3913
3914
  let t = /* @__PURE__ */ new Map(), n = e.getContainer(), r = window.getComputedStyle(n);
3914
3915
  n.style.setProperty("--adornment-text-direction", r.direction), n.style.setProperty("--adornment-text-writing-mode", r.writingMode);
3915
- for (let e of dr) {
3916
+ for (let e of mr) {
3916
3917
  let r = document.createElement("div"), i = document.createElement("div"), a = document.createElement("div");
3917
3918
  r.classList.add("adornment-container", e), i.classList.add("inner"), a.classList.add("inner", "vertical"), r.append(i, a), n.appendChild(r), t.set(e, {
3918
3919
  container: r,
@@ -3920,29 +3921,59 @@ function hr(e) {
3920
3921
  vertical: a
3921
3922
  });
3922
3923
  }
3923
- fr.set(e, t);
3924
+ hr.set(e, t);
3924
3925
  }
3925
- function gr(e, t, n) {
3926
- let r = fr.get(e), i = e.getScale();
3926
+ function yr(e, t, n) {
3927
+ let r = hr.get(e), i = e.getScale();
3927
3928
  if (r) {
3928
3929
  e.getContainer().style.setProperty("--adornment-spacing", `${5 * i}px`);
3929
- for (let [e, { container: a }] of r) a.style.cssText = _r(e, t[e], i, n);
3930
+ for (let [e, { container: a }] of r) a.style.cssText = br(e, t[e], i, n);
3930
3931
  }
3931
3932
  }
3932
- function _r(e, t, n, r) {
3933
- let i = or[e], a = "", o = [], { x: s, y: c, unit: l } = t;
3933
+ function br(e, t, n, r) {
3934
+ let i = lr[e], a = "", o = [], { x: s, y: c, unit: l } = t;
3934
3935
  return l === "px" && (s *= n, c *= n), i.x === "center" ? o.push(`translateX(${s}${l})`) : a += `${i.x}: ${s}${l};`, i.y === "center" ? o.push(`translateY(${c}${l})`) : e === "bottom_right" && r === "interactive" ? a += `${i.y}: max(${c}${l}, 25px);` : a += `${i.y}: ${c}${l};`, o.length && (a += `transform: ${o.join(" ")};`), a;
3935
3936
  }
3936
3937
  function Q(e, t, n, r) {
3937
- Pn() && !t.classList.contains("web-control") && t.classList.add("hide"), r ||= ["left_center", "right_center"].includes(n) ? "vertical" : "horizontal";
3938
- let i = fr.get(e)?.get(n), a = n === "left_center" || n === "right_center" ? "vertical" : "horizontal";
3938
+ Ln() && !t.classList.contains("web-control") && t.classList.add("hide"), r ||= ["left_center", "right_center"].includes(n) ? "vertical" : "horizontal";
3939
+ let i = hr.get(e)?.get(n), a = n === "left_center" || n === "right_center" ? "vertical" : "horizontal";
3939
3940
  i?.[a].hasChildNodes() || (r = a), (i?.[r])?.appendChild(t);
3940
3941
  }
3941
3942
  //#endregion
3943
+ //#region src/utils/jobObject.ts
3944
+ function xr(e) {
3945
+ let t = e.registry, n = t?.models;
3946
+ if (!n) return {
3947
+ ...e,
3948
+ version: 2
3949
+ };
3950
+ let r = /^\s*[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?\s*$/, i = (e) => typeof e == "string" && r.test(e) && isFinite(e) ? {
3951
+ t: "n",
3952
+ v: Number(e),
3953
+ w: e,
3954
+ z: "custom"
3955
+ } : e, a = Object.fromEntries(Object.entries(n).map(([e, t]) => [e, t?.map((e) => ({
3956
+ ...e,
3957
+ models: e.models.map((e) => ({
3958
+ ...e,
3959
+ dataBindings: e.dataBindings && Object.fromEntries(Object.entries(e.dataBindings).map(([e, t]) => [e, i(t)]))
3960
+ }))
3961
+ }))]));
3962
+ return {
3963
+ ...e,
3964
+ registry: {
3965
+ ...t,
3966
+ models: a
3967
+ },
3968
+ version: 2
3969
+ };
3970
+ }
3971
+ var Sr = [(e) => e, xr], Cr = (e) => Sr.slice(e.version || 1).reduce((e, t) => t(e), e);
3972
+ //#endregion
3942
3973
  //#region src/utils/mapstyle.ts
3943
- function vr(e) {
3944
- for (let t of cr) {
3945
- let n = lr[t];
3974
+ function wr(e) {
3975
+ for (let t of dr) {
3976
+ let n = fr[t];
3946
3977
  e.layers.find((e) => e.id === n) === void 0 && (e.sources.empty === void 0 && (e.sources.empty = {
3947
3978
  type: "geojson",
3948
3979
  data: {
@@ -3959,12 +3990,12 @@ function vr(e) {
3959
3990
  }
3960
3991
  //#endregion
3961
3992
  //#region src/models/polygon.ts
3962
- function yr(e, t, n, r, i) {
3993
+ function Tr(e, t, n, r, i) {
3963
3994
  e.addSource(t.id, {
3964
3995
  type: "geojson",
3965
3996
  data: {
3966
3997
  type: "FeatureCollection",
3967
- features: t.models.filter((e) => e.visible ?? !0).map((e) => br(t, e, r, i))
3998
+ features: t.models.filter((e) => e.visible ?? !0).map((e) => Er(t, e, r, i))
3968
3999
  }
3969
4000
  }), e.addLayer({
3970
4001
  id: t.id,
@@ -4022,11 +4053,11 @@ function yr(e, t, n, r, i) {
4022
4053
  }
4023
4054
  }, n);
4024
4055
  }
4025
- function br(e, t, n, r) {
4056
+ function Er(e, t, n, r) {
4026
4057
  let i = t.fillPattern === void 0 ? void 0 : r.getMapLibreImageKey(n[t.fillPattern], 2 * window.devicePixelRatio);
4027
4058
  return {
4028
4059
  type: "Feature",
4029
- id: V(t.id),
4060
+ id: B(t.id),
4030
4061
  properties: {
4031
4062
  id: t.id,
4032
4063
  "fill-color": e.fillColor || t.fillColor ? q(t.dataBindings ?? {}, t.fillColor, e.fillColor) : "#000000",
@@ -4042,12 +4073,12 @@ function br(e, t, n, r) {
4042
4073
  }
4043
4074
  //#endregion
4044
4075
  //#region src/models/circle.ts
4045
- function xr(e, t, n, r, i) {
4076
+ function Dr(e, t, n, r, i) {
4046
4077
  e.addSource(t.id, {
4047
4078
  type: "geojson",
4048
4079
  data: {
4049
4080
  type: "FeatureCollection",
4050
- features: t.models.filter((e) => e.visible ?? !0).map((e) => Sr(t, e, 1, r, i))
4081
+ features: t.models.filter((e) => e.visible ?? !0).map((e) => Or(t, e, 1, r, i))
4051
4082
  }
4052
4083
  }), e.addLayer({
4053
4084
  id: t.id,
@@ -4141,11 +4172,11 @@ function xr(e, t, n, r, i) {
4141
4172
  }
4142
4173
  }, n);
4143
4174
  }
4144
- function Sr(e, t, n, r, i) {
4175
+ function Or(e, t, n, r, i) {
4145
4176
  let a = t.fillPattern === void 0 ? void 0 : i.getMapLibreImageKey(r[t.fillPattern], 2 * window.devicePixelRatio);
4146
4177
  return {
4147
4178
  type: "Feature",
4148
- id: V(t.id),
4179
+ id: B(t.id),
4149
4180
  properties: {
4150
4181
  id: t.id,
4151
4182
  "fill-color": e.fillColor || t.fillColor ? q(t.dataBindings ?? {}, t.fillColor, e.fillColor) : "#000000",
@@ -4170,13 +4201,13 @@ function Sr(e, t, n, r, i) {
4170
4201
  }
4171
4202
  //#endregion
4172
4203
  //#region src/models/marker.ts
4173
- var Cr = "Roboto-Regular";
4174
- function wr(e, t, n, r, i, a) {
4204
+ var kr = "Roboto-Regular";
4205
+ function Ar(e, t, n, r, i, a) {
4175
4206
  let o = [], s = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), l = ["match", ["get", "text-font"]], u = !!t.clustering;
4176
- for (let n of t.models) (n.visible ?? !0) && o.push(Er(e, t, n, 1, r, i)), s.add(n.textFont), c.add(n.textLineHeight ?? 1.2);
4207
+ for (let n of t.models) (n.visible ?? !0) && o.push(Mr(e, t, n, 1, r, i)), s.add(n.textFont), c.add(n.textLineHeight ?? 1.2);
4177
4208
  if (Array.from(s).length > 0) {
4178
- for (let e of Array.from(s)) l.push(e, ["literal", [e, Cr]]);
4179
- l.push(["literal", [Cr]]);
4209
+ for (let e of Array.from(s)) l.push(e, ["literal", [e, kr]]);
4210
+ l.push(["literal", [kr]]);
4180
4211
  }
4181
4212
  e.addSource(t.id, {
4182
4213
  type: "geojson",
@@ -4273,7 +4304,7 @@ function wr(e, t, n, r, i, a) {
4273
4304
  stops: t.clusterTextColor ?? []
4274
4305
  } },
4275
4306
  layout: {
4276
- "text-font": ["literal", [Cr]],
4307
+ "text-font": ["literal", [kr]],
4277
4308
  "text-field": "{point_count_abbreviated}",
4278
4309
  "text-size": {
4279
4310
  property: "point_count",
@@ -4344,9 +4375,9 @@ function wr(e, t, n, r, i, a) {
4344
4375
  ["!", ["has", "point_count"]]
4345
4376
  ]
4346
4377
  });
4347
- }), Tr(e, t)));
4378
+ }), jr(e, t)));
4348
4379
  }
4349
- function Tr(e, t) {
4380
+ function jr(e, t) {
4350
4381
  e.on("click", `${t.id}-circle-cluster`, async (t) => {
4351
4382
  let n = e.queryRenderedFeatures(t.point).find((e) => e.properties.cluster);
4352
4383
  if (!n) return;
@@ -4359,11 +4390,11 @@ function Tr(e, t) {
4359
4390
  });
4360
4391
  });
4361
4392
  }
4362
- function Er(e, t, n, r, i, a) {
4393
+ function Mr(e, t, n, r, i, a) {
4363
4394
  let o = n.svg === void 0 ? void 0 : ot(n.dataBindings ?? {}, i[n.svg], t.svg ? i[t.svg] : void 0), s = o === void 0 ? void 0 : a.getMapLibreImageKey(o, window.devicePixelRatio * (n.iconScale ?? 1) * e.getScale()), c = o === void 0 ? void 0 : Qe(o);
4364
4395
  return {
4365
4396
  type: "Feature",
4366
- id: V(n.id),
4397
+ id: B(n.id),
4367
4398
  properties: {
4368
4399
  id: n.id,
4369
4400
  "mc-image-key": s,
@@ -4400,25 +4431,25 @@ function Er(e, t, n, r, i, a) {
4400
4431
  }
4401
4432
  //#endregion
4402
4433
  //#region src/utils/overlays.ts
4403
- async function Dr(e, t, n, r, i, a) {
4404
- let o = await Promise.all(t.map((e) => `${r}/styles/${e}.json?access_token=${i}`).map((e) => fetch(e).then((e) => e.json()))), s = fe(o.map((e) => e.sprite).filter((e) => typeof e == "string"));
4434
+ async function Nr(e, t, n, r, i, a) {
4435
+ let o = await Promise.all(t.map((e) => `${r}/styles/${e}.json?access_token=${i}`).map((e) => fetch(e).then((e) => e.json()))), s = de(o.map((e) => e.sprite).filter((e) => typeof e == "string"));
4405
4436
  await Promise.all(s.map((e) => n.loadSprite(e).then((e) => n.addImages(e)).catch(() => {})));
4406
4437
  for (let t = 0; t < e.length; t++) {
4407
4438
  let r = e[t], i = o[t];
4408
4439
  for (let e of i.layers) e.metadata === void 0 && (e.metadata = {}), e.metadata["mc-original-layer-id"] = e.id, e.id = `${r} | ${e.id}`;
4409
- Or(i, n, a);
4440
+ Pr(i, n, a);
4410
4441
  }
4411
4442
  return o;
4412
4443
  }
4413
- function Or(e, t, n) {
4444
+ function Pr(e, t, n) {
4414
4445
  for (let n in e.sources) t.getSource(n) === void 0 && t.addSource(n, e.sources[n]);
4415
4446
  for (let r of e.layers) {
4416
4447
  t.getLayer(r.id) !== void 0 && t.removeLayer(r.id);
4417
4448
  let e = r.metadata?.["mc-add-before"] ?? "mc-before-none";
4418
- t.addLayer(kr(r, n), e);
4449
+ t.addLayer(Fr(r, n), e);
4419
4450
  }
4420
4451
  }
4421
- function kr(e, t) {
4452
+ function Fr(e, t) {
4422
4453
  let n = t ?? {}, r = e.metadata?.["mc-original-layer-id"], i = r === void 0 ? {} : n[r] ?? {}, a = {
4423
4454
  ...e,
4424
4455
  layout: {
@@ -4438,23 +4469,23 @@ function kr(e, t) {
4438
4469
  }
4439
4470
  //#endregion
4440
4471
  //#region src/images/popup-previous.svg?raw
4441
- var Ar = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"6\" height=\"10\" viewBox=\"0 0 6 10\" fill=\"currentColor\"><path d=\"m0 4.647 4.282 4.4a.814.814 0 0 0 1.166-1.134L2.27 4.647l3.178-3.266A.814.814 0 1 0 4.282.246z\"/></svg>\n", jr = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"11\" viewBox=\"0 0 10 11\" fill=\"currentColor\"><path d=\"M.21.71a.714.714 0 0 1 1.011 0l3.78 3.78L8.778.71a.715.715 0 0 1 1.013 1.01L6.01 5.501l3.78 3.778a.715.715 0 0 1-1.01 1.012L5 6.51l-3.779 3.78A.716.716 0 0 1 .21 9.28L3.99 5.5.21 1.721A.714.714 0 0 1 .21.71\"/></svg>\n", Mr = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"6\" height=\"10\" viewBox=\"0 0 6 10\" fill=\"currentColor\"><path d=\"m5.678 4.647-4.282 4.4A.814.814 0 1 1 .23 7.914l3.177-3.266L.23 1.381A.814.814 0 1 1 1.396.246z\"/></svg>\n", Nr = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 40 40\" stroke=\"currentColor\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M20 4.167 1.667 35.834h36.667z\" stroke-width=\"2\" stroke-linejoin=\"round\"/><path d=\"M20 29.167v.834m0-14.167.007 8.333\" stroke-width=\"2\" stroke-linecap=\"round\"/></svg>\n";
4472
+ var Ir = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"6\" height=\"10\" viewBox=\"0 0 6 10\" fill=\"currentColor\"><path d=\"m0 4.647 4.282 4.4a.814.814 0 0 0 1.166-1.134L2.27 4.647l3.178-3.266A.814.814 0 1 0 4.282.246z\"/></svg>\n", Lr = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"11\" viewBox=\"0 0 10 11\" fill=\"currentColor\"><path d=\"M.21.71a.714.714 0 0 1 1.011 0l3.78 3.78L8.778.71a.715.715 0 0 1 1.013 1.01L6.01 5.501l3.78 3.778a.715.715 0 0 1-1.01 1.012L5 6.51l-3.779 3.78A.716.716 0 0 1 .21 9.28L3.99 5.5.21 1.721A.714.714 0 0 1 .21.71\"/></svg>\n", Rr = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"6\" height=\"10\" viewBox=\"0 0 6 10\" fill=\"currentColor\"><path d=\"m5.678 4.647-4.282 4.4A.814.814 0 1 1 .23 7.914l3.177-3.266L.23 1.381A.814.814 0 1 1 1.396.246z\"/></svg>\n", zr = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 40 40\" stroke=\"currentColor\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M20 4.167 1.667 35.834h36.667z\" stroke-width=\"2\" stroke-linejoin=\"round\"/><path d=\"M20 29.167v.834m0-14.167.007 8.333\" stroke-width=\"2\" stroke-linecap=\"round\"/></svg>\n";
4442
4473
  //#endregion
4443
4474
  //#region src/utils/youtube.ts
4444
- function Pr(e, t) {
4445
- let { allowFullscreen: n, loop: r } = e, i = te(e.src, t), a, o = i.match(/(?:youtube\.com\/(?:watch\?.*v=|embed\/|v\/)|youtu\.be\/)([-\w]{11})/)?.[1];
4475
+ function Br(e, t) {
4476
+ let { allowFullscreen: n, loop: r } = e, i = V(e.src, t), a, o = i.match(/(?:youtube\.com\/(?:watch\?.*v=|embed\/|v\/)|youtu\.be\/)([-\w]{11})/)?.[1];
4446
4477
  a = o ? `https://www.youtube.com/embed/${o}` : i;
4447
4478
  let s = [];
4448
- if (n || s.push("fs=0"), r && o && s.push(`loop=1&playlist=${o}`), a = Ir(a), a = Fr(a), s.length) {
4479
+ if (n || s.push("fs=0"), r && o && s.push(`loop=1&playlist=${o}`), a = Hr(a), a = Vr(a), s.length) {
4449
4480
  let e = a.includes("?") ? "&" : "?";
4450
4481
  a += `${e}${s.join("&")}`;
4451
4482
  }
4452
4483
  return a;
4453
4484
  }
4454
- function Fr(e) {
4485
+ function Vr(e) {
4455
4486
  return e.replace(/([?&])si=[^&]+(&)?/, (e, t, n) => t === "?" && !n ? "" : t === "?" && n ? "?" : n ? "&" : "");
4456
4487
  }
4457
- function Ir(e) {
4488
+ function Hr(e) {
4458
4489
  let t = new URL(e), n = t.searchParams.get("t");
4459
4490
  if (!n) return e;
4460
4491
  let r = 0, i = /^((\d+)m)?((\d+)s)?$/;
@@ -4470,18 +4501,18 @@ function Ir(e) {
4470
4501
  }
4471
4502
  //#endregion
4472
4503
  //#region src/utils/template.ts
4473
- function Lr(e, t, n, r) {
4504
+ function Ur(e, t, n, r) {
4474
4505
  let i;
4475
- if (t?.type === "video") i = r ? Hr(t.src, n) : `
4506
+ if (t?.type === "video") i = r ? Jr(t.src, n) : `
4476
4507
  <div class="youtube-container">
4477
4508
  <iframe
4478
- src="${Pr(t, n)}"
4509
+ src="${Br(t, n)}"
4479
4510
  width="100%" height="300" style="border: none" allowfullscreen>
4480
4511
  </iframe>
4481
4512
  </div>
4482
4513
  `;
4483
4514
  else if (t?.type === "image") {
4484
- let e = te(t.src, n), r = te(t.alt, n);
4515
+ let e = V(t.src, n), r = V(t.alt, n);
4485
4516
  i = `
4486
4517
  <div class="image-container ${t.fill ? "fill" : ""}">
4487
4518
  <img src="${e}" alt="${r}" />
@@ -4489,7 +4520,7 @@ function Lr(e, t, n, r) {
4489
4520
  `;
4490
4521
  }
4491
4522
  i = i ? `<div class="media-content">${i}</div>` : "";
4492
- let a = e ? `<div class="text-content">${Br(e, n)}</div>` : "";
4523
+ let a = e ? `<div class="text-content">${Kr(e, n)}</div>` : "";
4493
4524
  return `
4494
4525
  <div class="popup-scroll-wrapper">
4495
4526
  <div class="mc-popup">
@@ -4499,53 +4530,53 @@ function Lr(e, t, n, r) {
4499
4530
  </div>
4500
4531
  `;
4501
4532
  }
4502
- var Rr = `
4533
+ var Wr = `
4503
4534
  <button class="mc-popup-button close">
4504
- ${jr}
4535
+ ${Lr}
4505
4536
  </button>
4506
- `, zr = `
4537
+ `, Gr = `
4507
4538
  <div class="cycle-buttons">
4508
4539
  <button class="mc-popup-button prev">
4509
- ${Ar}
4540
+ ${Ir}
4510
4541
  </button>
4511
4542
  <button class="mc-popup-button next">
4512
- ${Mr}
4543
+ ${Rr}
4513
4544
  </button>
4514
4545
  </div>
4515
4546
  `;
4516
- function Br(e, t) {
4547
+ function Kr(e, t) {
4517
4548
  return e ? (e = e.replace(/placeholder="[^"]+"/, ""), e = e.replace(/onerror="[^"]+"/, ""), e = e.replace(/youtube\.com\/embed\/\$([^"'<>\\]+)/gi, (e, n) => {
4518
- let r = ne(t[n]);
4519
- return r ? `youtube.com/embed/${ie(r)}?` : "";
4549
+ let r = H(t[n]);
4550
+ return r ? `youtube.com/embed/${ne(r)}?` : "";
4520
4551
  }), e = e.replace(/(\S+?)\s*=\s*"\$([^"]+?)"/g, (e, n, r) => {
4521
- let i = ne(t[r]);
4522
- return ["src", "href"].includes(n) && !i ? "" : ["src", "href"].includes(n) ? /^(mailto:|tel:|ftp:|data:|http:\/\/|https:\/\/)/i.test(i) ? ` ${n}="${i}"` : ` ${n}="${Vr(i)}"` : ` ${n}="${i}"`;
4523
- }), e = e.replace(/>\$(.+?)</gi, (e, n) => `>${ne(t[n])}<`), e = e.replace(/<span\s+class="mention"\s+data-mention-id="[^"]*">(.*?)<\/span>/gim, (e, t) => t), e) : "";
4552
+ let i = H(t[r]);
4553
+ return ["src", "href"].includes(n) && !i ? "" : ["src", "href"].includes(n) ? /^(mailto:|tel:|ftp:|data:|http:\/\/|https:\/\/)/i.test(i) ? ` ${n}="${i}"` : ` ${n}="${qr(i)}"` : ` ${n}="${i}"`;
4554
+ }), e = e.replace(/>\$(.+?)</gi, (e, n) => `>${H(t[n])}<`), e = e.replace(/<span\s+class="mention"\s+data-mention-id="[^"]*">(.*?)<\/span>/gim, (e, t) => t), e) : "";
4524
4555
  }
4525
- function Vr(e) {
4556
+ function qr(e) {
4526
4557
  return /^https?:\/\//i.test(e) ? e : `https://${e}`;
4527
4558
  }
4528
- function Hr(e, t) {
4559
+ function Jr(e, t) {
4529
4560
  return `
4530
4561
  <div class="youtube-placeholder">
4531
- <img src="${`https://img.youtube.com/vi/${ie(te(e, t))}/hqdefault.jpg`}" />
4562
+ <img src="${`https://img.youtube.com/vi/${ne(V(e, t))}/hqdefault.jpg`}" />
4532
4563
  <div class="popup-alert">
4533
- <div class="alert-icon">${Nr}</div>
4534
- <div>${jn("videoAlert")}</div>
4564
+ <div class="alert-icon">${zr}</div>
4565
+ <div>${Pn("videoAlert")}</div>
4535
4566
  </div>
4536
4567
  </div>
4537
4568
  `;
4538
4569
  }
4539
4570
  //#endregion
4540
4571
  //#region src/Registry.ts
4541
- var Ur = [
4572
+ var Yr = [
4542
4573
  "area",
4543
4574
  "circle",
4544
4575
  "dot",
4545
4576
  "line",
4546
4577
  "marker",
4547
4578
  "polygon"
4548
- ], Wr = class {
4579
+ ], Xr = class {
4549
4580
  models;
4550
4581
  groups;
4551
4582
  customGroupIds;
@@ -4565,7 +4596,7 @@ var Ur = [
4565
4596
  marker: {},
4566
4597
  polygon: {}
4567
4598
  };
4568
- for (let t of Ur) for (let n of e.registry?.models?.[t] ?? []) {
4599
+ for (let t of Yr) for (let n of e.registry?.models?.[t] ?? []) {
4569
4600
  this.models[t][n.id] = {}, this.groups[t][n.id] = n;
4570
4601
  for (let e of n.models) {
4571
4602
  if (t === "area") {
@@ -4611,7 +4642,7 @@ var Ur = [
4611
4642
  }
4612
4643
  return e.reverse();
4613
4644
  }
4614
- }, Gr = class {
4645
+ }, Zr = class {
4615
4646
  map;
4616
4647
  popupElements;
4617
4648
  currentPopupElement;
@@ -4727,7 +4758,7 @@ var Ur = [
4727
4758
  ]), n.forEach((n) => {
4728
4759
  this.map.setFeatureState({
4729
4760
  source: e,
4730
- id: V(n.modelId)
4761
+ id: B(n.modelId)
4731
4762
  }, { highlighted: n.modelId === t });
4732
4763
  }));
4733
4764
  }
@@ -4763,7 +4794,7 @@ var Ur = [
4763
4794
  e.getNorthEast(),
4764
4795
  e.getNorthWest(),
4765
4796
  e.getSouthEast()
4766
- ].some((e) => !ge(this.map, e.lng, e.lat))) {
4797
+ ].some((e) => !he(this.map, e.lng, e.lat))) {
4767
4798
  i.easeTo({
4768
4799
  center: e.getCenter(),
4769
4800
  duration: 500
@@ -4795,7 +4826,7 @@ var Ur = [
4795
4826
  });
4796
4827
  }
4797
4828
  }
4798
- }, Kr = class {
4829
+ }, Qr = class {
4799
4830
  map;
4800
4831
  youTubePlaceholder;
4801
4832
  language = "en";
@@ -4816,7 +4847,7 @@ var Ur = [
4816
4847
  this.map = e, this.youTubePlaceholder = t, this.mapContainer = this.map.getContainer(), this.popupContainer = document.createElement("div"), this.popupContainer.classList.add("popup-container"), this.map.on("mousemove", (e) => this.onMouseMove(e)), this.map.on("click", (e) => this.onClick(e));
4817
4848
  }
4818
4849
  setJobObject(e) {
4819
- this.registry = new Wr(e);
4850
+ this.registry = new Xr(e);
4820
4851
  }
4821
4852
  setParams(e, t, n, r) {
4822
4853
  this.popupPosition = e, this.language = t, this.restrictMapMovement = n, this.center = r;
@@ -4828,7 +4859,7 @@ var Ur = [
4828
4859
  this.popupElements = this.registry.getPopupElements();
4829
4860
  }
4830
4861
  setHighlightManager() {
4831
- this.highlightManager = new Gr(this.map, this.popupElements);
4862
+ this.highlightManager = new Zr(this.map, this.popupElements);
4832
4863
  }
4833
4864
  onMouseMove(e) {
4834
4865
  this.feature = this.getInteractiveFeature(e), this.feature ? this.map.getCanvas().style.cursor = "pointer" : this.map.getCanvas().style.cursor = "";
@@ -4874,7 +4905,7 @@ var Ur = [
4874
4905
  }
4875
4906
  getTemplate(e) {
4876
4907
  let { layer: t } = e, n, r = this.registry.getModel(e);
4877
- if (r?.popup || r?.popupMedia) n = Lr(r.popup, r.popupMedia, r.dataBindings ?? {}, this.youTubePlaceholder);
4908
+ if (r?.popup || r?.popupMedia) n = Ur(r.popup, r.popupMedia, r.dataBindings ?? {}, this.youTubePlaceholder);
4878
4909
  else {
4879
4910
  let r = [];
4880
4911
  this.publication && (r.push(`:${this.publication}-${this.language}`), r.push(`:${this.publication}-:en`)), r.push(`:${this.language}`), r.push(":en"), r.push("");
@@ -4898,11 +4929,11 @@ var Ur = [
4898
4929
  return t.innerHTML = e.trim(), t.content.firstElementChild;
4899
4930
  }
4900
4931
  addPopupControls() {
4901
- let e = this.htmlToElement(Rr);
4932
+ let e = this.htmlToElement(Wr);
4902
4933
  if (e && (e.addEventListener("click", () => {
4903
4934
  this.hidePopup(), this.highlightManager.highlight(void 0);
4904
4935
  }), this.popupContainer.appendChild(e)), this.popupElements.length > 1) {
4905
- let e = this.htmlToElement(zr);
4936
+ let e = this.htmlToElement(Gr);
4906
4937
  e && (e.querySelector(".prev")?.addEventListener("click", () => this.cyclePopups(!1)), e.querySelector(".next")?.addEventListener("click", () => this.cyclePopups()), this.popupContainer.appendChild(e));
4907
4938
  }
4908
4939
  }
@@ -4939,17 +4970,17 @@ var Ur = [
4939
4970
  n = e ? t === this.popupElements.length - 1 ? 0 : t + 1 : t === 0 ? this.popupElements.length - 1 : t - 1;
4940
4971
  let r = this.popupElements?.[n];
4941
4972
  this.currentModelId = r.modelId, this.highlightManager.highlight(r, !0);
4942
- let i = Lr(r.popup, r.popupMedia, r.dataBindings ?? {}, this.youTubePlaceholder), a = this.popupContainer;
4973
+ let i = Ur(r.popup, r.popupMedia, r.dataBindings ?? {}, this.youTubePlaceholder), a = this.popupContainer;
4943
4974
  this.popupContainer.remove(), a.innerHTML = i, this.mapContainer.appendChild(a), this.addPopupControls(), e ? this.popupContainer.querySelector(".mc-popup-button.next")?.focus() : this.popupContainer.querySelector(".mc-popup-button.prev")?.focus();
4944
4975
  }
4945
4976
  }
4946
- }, qr = class {
4977
+ }, $r = class {
4947
4978
  line;
4948
4979
  mercatorLine;
4949
4980
  distances;
4950
4981
  totalLength;
4951
4982
  constructor(e) {
4952
- this.line = e.filter((t, n) => n === 0 || e[n][0] !== e[n - 1][0] || e[n][1] !== e[n - 1][1]), this.mercatorLine = this.line.map((e) => a.fromLngLat(e)), this.distances = Jr(this.mercatorLine), this.totalLength = this.distances[this.distances.length - 1];
4983
+ this.line = e.filter((t, n) => n === 0 || e[n][0] !== e[n - 1][0] || e[n][1] !== e[n - 1][1]), this.mercatorLine = this.line.map((e) => a.fromLngLat(e)), this.distances = ei(this.mercatorLine), this.totalLength = this.distances[this.distances.length - 1];
4953
4984
  }
4954
4985
  sample(e) {
4955
4986
  let t = this.mercatorLine, n = this.distances;
@@ -4959,7 +4990,7 @@ var Ur = [
4959
4990
  let i = t[r - 1], o = t[r], s = n[r - 1], c = n[r];
4960
4991
  if (c >= e) {
4961
4992
  let t = (e - s) / (c - s);
4962
- return new a(H(i.x, o.x, t), H(i.y, o.y, t));
4993
+ return new a(U(i.x, o.x, t), U(i.y, o.y, t));
4963
4994
  }
4964
4995
  }
4965
4996
  return new a(t[t.length - 1].x, t[t.length - 1].y);
@@ -4969,11 +5000,11 @@ var Ur = [
4969
5000
  let n = this.mercatorLine.filter((n, r) => this.distances[r] >= e * this.totalLength && this.distances[r] <= t * this.totalLength);
4970
5001
  if (e > 0) {
4971
5002
  let t = this.sample(e);
4972
- Yr(t, n[0]) || n.unshift(t);
5003
+ ti(t, n[0]) || n.unshift(t);
4973
5004
  }
4974
5005
  if (t < 1) {
4975
5006
  let e = this.sample(t);
4976
- Yr(e, n[n.length - 1]) || n.push(e);
5007
+ ti(e, n[n.length - 1]) || n.push(e);
4977
5008
  }
4978
5009
  return n.map((e) => {
4979
5010
  let { lng: t, lat: n } = e.toLngLat();
@@ -4984,7 +5015,7 @@ var Ur = [
4984
5015
  return this.totalLength;
4985
5016
  }
4986
5017
  };
4987
- function Jr(e) {
5018
+ function ei(e) {
4988
5019
  let t = 0, n = [t];
4989
5020
  for (let r = 1; r < e.length; ++r) {
4990
5021
  let i = e[r - 1], a = e[r], o = a.x - i.x, s = a.y - i.y;
@@ -4992,24 +5023,24 @@ function Jr(e) {
4992
5023
  }
4993
5024
  return n;
4994
5025
  }
4995
- function Yr(e, t) {
5026
+ function ti(e, t) {
4996
5027
  return e.x === t.x && e.y === t.y;
4997
5028
  }
4998
5029
  //#endregion
4999
5030
  //#region src/models/line.ts
5000
- var Xr = {
5031
+ var ni = {
5001
5032
  solid: [1, 0],
5002
5033
  dotted: [.7, .3],
5003
5034
  dashed: [3.5, 1.5]
5004
5035
  };
5005
- function Zr(e, t, n, r, i) {
5036
+ function ri(e, t, n, r, i) {
5006
5037
  e.addSource(t.id, {
5007
5038
  type: "geojson",
5008
5039
  data: {
5009
5040
  type: "FeatureCollection",
5010
- features: t.models.filter((e) => e.visible ?? !0).map((n) => Qr(e, t, n, 1, r))
5041
+ features: t.models.filter((e) => e.visible ?? !0).map((n) => ii(e, t, n, 1, r))
5011
5042
  }
5012
- }), Object.entries(Xr).forEach(([r, i]) => {
5043
+ }), Object.entries(ni).forEach(([r, i]) => {
5013
5044
  t.models.some((e) => (e.lineStyle ?? "solid") === r) && e.addLayer({
5014
5045
  id: `${t.id}-${r}`,
5015
5046
  type: "line",
@@ -5092,11 +5123,11 @@ function Zr(e, t, n, r, i) {
5092
5123
  ]
5093
5124
  }, n);
5094
5125
  }
5095
- function Qr(e, t, n, r, i) {
5096
- let a = new qr(n.geometry).slice(0, r), o = n.svg !== void 0 && a.length > 1 ? ot(n.dataBindings ?? {}, n.svg, void 0) : void 0, s = o === void 0 ? void 0 : i.getMapLibreImageKey(o, window.devicePixelRatio * (n.iconScale ?? 1) * e.getScale());
5126
+ function ii(e, t, n, r, i) {
5127
+ let a = new $r(n.geometry).slice(0, r), o = n.svg !== void 0 && a.length > 1 ? ot(n.dataBindings ?? {}, n.svg, void 0) : void 0, s = o === void 0 ? void 0 : i.getMapLibreImageKey(o, window.devicePixelRatio * (n.iconScale ?? 1) * e.getScale());
5097
5128
  return {
5098
5129
  type: "Feature",
5099
- id: V(n.id),
5130
+ id: B(n.id),
5100
5131
  properties: {
5101
5132
  id: n.id,
5102
5133
  "line-width": n.lineWidth ?? 3,
@@ -5104,7 +5135,7 @@ function Qr(e, t, n, r, i) {
5104
5135
  "line-style": n.lineStyle ?? "solid",
5105
5136
  "mc-image-key": s,
5106
5137
  "mc-svg-string": o,
5107
- "icon-rotate": $r(n, a, e),
5138
+ "icon-rotate": ai(n, a, e),
5108
5139
  "icon-offset": n.iconOffset,
5109
5140
  "icon-size": n.iconScale
5110
5141
  },
@@ -5120,12 +5151,12 @@ function Qr(e, t, n, r, i) {
5120
5151
  }
5121
5152
  };
5122
5153
  }
5123
- function $r(e, t, n) {
5154
+ function ai(e, t, n) {
5124
5155
  return e.iconRotation ? e.iconAlign ? kt(t, n) + e.iconRotation : e.iconRotation : 0;
5125
5156
  }
5126
5157
  //#endregion
5127
5158
  //#region src/models/area.ts
5128
- function ei(e, t, n, r, i, a, o) {
5159
+ function oi(e, t, n, r, i, a, o) {
5129
5160
  let s = It(t), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
5130
5161
  for (let e of t.models) {
5131
5162
  let n = e.featureId, a = t.id, o = [], u = Dt(e), d = Et(a, e), f = l.get(d) ?? {
@@ -5293,12 +5324,12 @@ function ei(e, t, n, r, i, a, o) {
5293
5324
  }
5294
5325
  //#endregion
5295
5326
  //#region src/models/dot.ts
5296
- function ti(e, t, n) {
5327
+ function si(e, t, n) {
5297
5328
  e.addSource(t.id, {
5298
5329
  type: "geojson",
5299
5330
  data: {
5300
5331
  type: "FeatureCollection",
5301
- features: t.models.filter((e) => e.visible ?? !0).map((e) => ni(t, e))
5332
+ features: t.models.filter((e) => e.visible ?? !0).map((e) => ci(t, e))
5302
5333
  }
5303
5334
  }), e.addLayer({
5304
5335
  id: t.id,
@@ -5319,7 +5350,7 @@ function ti(e, t, n) {
5319
5350
  }
5320
5351
  }, n);
5321
5352
  }
5322
- function ni(e, t) {
5353
+ function ci(e, t) {
5323
5354
  return {
5324
5355
  type: "Feature",
5325
5356
  id: t.id,
@@ -5336,7 +5367,7 @@ function ni(e, t) {
5336
5367
  }
5337
5368
  //#endregion
5338
5369
  //#region src/utils/pdfFonts.ts
5339
- function ri(e) {
5370
+ function li(e) {
5340
5371
  let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
5341
5372
  function i(n) {
5342
5373
  return t.get(n) ?? t.set(n, e.load(n)).get(n);
@@ -5379,18 +5410,18 @@ function ri(e) {
5379
5410
  }
5380
5411
  //#endregion
5381
5412
  //#region src/utils/svg2pdf.ts
5382
- function ii(e, t, n) {
5383
- let r = e.metadata?.colorconversion, i = r ? new Map(r.map((e) => [ai(e.rgbin.split(" ").map((e) => Number(e))), e.cmykout.split(" ").map((e) => Number(e) * 100)])) : null;
5413
+ function ui(e, t, n) {
5414
+ let r = e.metadata?.colorconversion, i = r ? new Map(r.map((e) => [di(e.rgbin.split(" ").map((e) => Number(e))), e.cmykout.split(" ").map((e) => Number(e) * 100)])) : null;
5384
5415
  return {
5385
- colorCallback: oi.bind(null, i),
5386
- fontCallback: si(t, n),
5416
+ colorCallback: fi.bind(null, i),
5417
+ fontCallback: pi(t, n),
5387
5418
  assumePt: !0
5388
5419
  };
5389
5420
  }
5390
- var ai = ([e, t, n]) => `R${e}G${t}B${n}`;
5391
- function oi(e, t) {
5421
+ var di = ([e, t, n]) => `R${e}G${t}B${n}`;
5422
+ function fi(e, t) {
5392
5423
  if (!t) return;
5393
- let n = t[0], r = ai(n), i = e?.get(r);
5424
+ let n = t[0], r = di(n), i = e?.get(r);
5394
5425
  if (i) return [i, t[1]];
5395
5426
  let a = (255 - n[0]) / 255, o = (255 - n[1]) / 255, s = (255 - n[2]) / 255, c = Math.min(a, o, s);
5396
5427
  return [[
@@ -5400,8 +5431,8 @@ function oi(e, t) {
5400
5431
  c * 100
5401
5432
  ], t[1]];
5402
5433
  }
5403
- function si(e, t) {
5404
- return ri({
5434
+ function pi(e, t) {
5435
+ return li({
5405
5436
  registered: (t, n, r) => {
5406
5437
  let i = Fe(e.fontMap.values(), t, n, r) ?? e.getDirectFont(t);
5407
5438
  return i && {
@@ -5410,7 +5441,7 @@ function si(e, t) {
5410
5441
  style: i.style
5411
5442
  };
5412
5443
  },
5413
- search: async (e, n, r) => (await ci(t, {
5444
+ search: async (e, n, r) => (await mi(t, {
5414
5445
  family: e,
5415
5446
  weight: String(n),
5416
5447
  style: r
@@ -5424,7 +5455,7 @@ function si(e, t) {
5424
5455
  }
5425
5456
  });
5426
5457
  }
5427
- async function ci(e, t) {
5458
+ async function mi(e, t) {
5428
5459
  let n = new URLSearchParams(Object.entries(t).map(([e, t]) => [e, String(t)])), r = `${e.apiUrl ?? "https://api.mapcreator.io"}/v1/fonts/search?${n}`, i = {
5429
5460
  Accept: "application/json",
5430
5461
  Authorization: e.bearerToken.startsWith("Bearer ") ? e.bearerToken : `Bearer ${e.bearerToken}`
@@ -5443,10 +5474,10 @@ async function ci(e, t) {
5443
5474
  }
5444
5475
  //#endregion
5445
5476
  //#region src/utils/geoTiff.ts
5446
- function li(e, { width: t, height: n }) {
5477
+ function hi(e, { width: t, height: n }) {
5447
5478
  let r = [];
5448
5479
  for (let i = 0; i <= 2; i++) for (let s = 0; s <= 2; s++) {
5449
- let c = i / 2 * t, l = s / 2 * n, { x: u, y: d } = ui(a.fromLngLat(e.unprojectWithScaleCorrection(new o(c, l))));
5480
+ let c = i / 2 * t, l = s / 2 * n, { x: u, y: d } = gi(a.fromLngLat(e.unprojectWithScaleCorrection(new o(c, l))));
5450
5481
  r.push(c, l, 0, u, d, 0);
5451
5482
  }
5452
5483
  return {
@@ -5459,15 +5490,15 @@ function li(e, { width: t, height: n }) {
5459
5490
  ModelPixelScale: []
5460
5491
  };
5461
5492
  }
5462
- function ui(e) {
5493
+ function gi(e) {
5463
5494
  return {
5464
- x: H(-20037508.34, 20037508.34, e.x),
5465
- y: H(20037508.34, -20037508.34, e.y)
5495
+ x: U(-20037508.34, 20037508.34, e.x),
5496
+ y: U(20037508.34, -20037508.34, e.y)
5466
5497
  };
5467
5498
  }
5468
5499
  //#endregion
5469
5500
  //#region src/Image.ts
5470
- var di = class {
5501
+ var _i = class {
5471
5502
  mcMap;
5472
5503
  format;
5473
5504
  svgCache;
@@ -5493,49 +5524,63 @@ var di = class {
5493
5524
  };
5494
5525
  //#endregion
5495
5526
  //#region src/utils/video/index.ts
5496
- function fi(e) {
5497
- let t = e.length > 0 ? [pi(e[0])] : [], n = 0, r = 0;
5527
+ function vi(e) {
5528
+ let t = e.length > 0 ? [yi(e[0])] : [], n = 0, r = 0;
5498
5529
  for (let i = 1; i < e.length; ++i) {
5499
- let a = pi(e[i]);
5500
- n += mi(e[i - 1].center[0], a.center[0]), r += mi(e[i - 1].bearing, a.bearing), a.center[0] += n * 360, a.x += n, a.bearing += r * 360, t.push(a);
5530
+ let a = yi(e[i]);
5531
+ n += bi(e[i - 1].center[0], a.center[0]), r += bi(e[i - 1].bearing, a.bearing), a.center[0] += n * 360, a.x += n, a.bearing += r * 360, t.push(a);
5501
5532
  }
5502
5533
  return t;
5503
5534
  }
5504
- function pi(e) {
5535
+ function yi(e) {
5505
5536
  return {
5506
5537
  ...e,
5507
5538
  center: [e.center[0], e.center[1]]
5508
5539
  };
5509
5540
  }
5510
- function mi(e, t) {
5541
+ function bi(e, t) {
5511
5542
  if (Math.abs(e) + Math.abs(t) > 180) {
5512
5543
  if (e > 0 && t < 0) return 1;
5513
5544
  if (e < 0 && t > 0) return -1;
5514
5545
  }
5515
5546
  return 0;
5516
5547
  }
5517
- function hi(e) {
5548
+ function xi(e) {
5518
5549
  return 2 ** -e;
5519
5550
  }
5520
- function gi(e) {
5551
+ function Si(e) {
5521
5552
  return e.length > 0 ? e[e.length - 1].time : 0;
5522
5553
  }
5523
- function _i(e) {
5554
+ function Ci(e) {
5524
5555
  return `${String(Math.floor(e % 36e5 / 6e4)).padStart(2, "0")}:${String(Math.floor(e % 6e4 / 1e3)).padStart(2, "0")}`;
5525
5556
  }
5526
- function vi(e) {
5527
- return he(e, 23.976) ? 24e3 / 1001 : he(e, 29.97) ? 3e4 / 1001 : he(e, 59.94) ? 6e4 / 1001 : e;
5557
+ function wi(e) {
5558
+ return me(e, 23.976) ? 24e3 / 1001 : me(e, 29.97) ? 3e4 / 1001 : me(e, 59.94) ? 6e4 / 1001 : e;
5528
5559
  }
5529
- function yi(e, t) {
5560
+ function Ti(e, t) {
5530
5561
  return e === void 0 || t === void 0 ? e === t : e.center.lat === t.center.lat && e.center.lng === t.center.lng && e.zoom === t.zoom && e.bearing === t.bearing && e.pitch === t.pitch && e.fov === t.fov && e.elevation === t.elevation;
5531
5562
  }
5532
5563
  //#endregion
5533
5564
  //#region src/VideoPreloadOverlay.ts
5534
- var bi = "\n <div class=\"preload-bar-vertical\"></div>\n <div class=\"preload-bar-horizontal\"></div>\n <div class=\"preload-badge\">\n <div class=\"preload-ring-outer\"></div>\n <div class=\"preload-ring-inner\"></div>\n <div class=\"preload-ring-dots\"></div>\n <div class=\"preload-content\">\n <div class=\"preload-logo\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"130\" height=\"18\" viewBox=\"0 0 130 18\" fill=\"currentColor\"><path d=\"M16.49.815h-3.283V17.35h3.283zm-6.566 0h-3.32v6.567h3.32zm16.461 0h-6.567v3.32h6.567zm0 13.215h-6.567v3.319h6.567zM3.321.815H.038V17.35h3.283zM38.38 5.18l2.01 5.667 2-5.666h2.12v7.812h-1.62v-2.137l.164-3.684-2.092 5.82h-1.128l-2.11-5.82.164 3.684v2.137h-1.61V5.18zm14.488 6.176h-2.81l-.537 1.61h-1.728l2.91-7.812h1.492l2.928 7.812h-1.719zm-2.392-1.273h1.955l-.982-2.929zm9.432.154v2.729h-1.61V5.18h3.046a3.5 3.5 0 0 1 1.547.318c.426.193.784.51 1.027.91.246.405.372.872.364 1.346a2.21 2.21 0 0 1-.791 1.819 3.27 3.27 0 0 1-2.174.663zm0-1.3h1.436c.352.02.698-.09.974-.31a1.1 1.1 0 0 0 .336-.909 1.2 1.2 0 0 0-1.1-1.291h-1.646zm14.059 1.455a2.73 2.73 0 0 1-.91 1.982 3.2 3.2 0 0 1-2.21.728 2.94 2.94 0 0 1-2.364-1.01 4.16 4.16 0 0 1-.91-2.783v-.472a4.7 4.7 0 0 1 .419-2.028c.25-.535.656-.982 1.164-1.283a3.24 3.24 0 0 1 1.71-.455 3.17 3.17 0 0 1 2.182.728c.557.53.884 1.259.91 2.028h-1.592a1.62 1.62 0 0 0-.418-1.091 1.57 1.57 0 0 0-1.11-.346 1.35 1.35 0 0 0-1.2.582 3.1 3.1 0 0 0-.41 1.82v.59c-.037.63.095 1.258.383 1.82a1.32 1.32 0 0 0 1.21.581c.398.034.796-.086 1.109-.336.273-.284.426-.662.427-1.055zm6.393-.255h-1.28v2.856h-1.61V5.18h2.9a3.2 3.2 0 0 1 2.138.618 2.12 2.12 0 0 1 .755 1.737 2.17 2.17 0 0 1-1.373 2.192l1.691 3.192v.073H81.89zm-1.281-1.31h1.3c.332.018.657-.092.91-.309a1.1 1.1 0 0 0 .336-.845 1.2 1.2 0 0 0-.318-.91 1.32 1.32 0 0 0-.964-.318h-1.264zm12.55.783h-3.093v2.09h3.638v1.292h-5.247V5.18h5.23v1.3h-3.639v1.865h3.092zm8.339 1.746H97.14l-.537 1.61h-1.71l2.91-7.812h1.492l2.929 7.812h-1.71zm-2.392-1.3h1.956l-.983-2.929zm13.06-3.575h-2.374v6.512h-1.609V6.48h-2.365v-1.3h6.366zm9.631 2.783a4.7 4.7 0 0 1-.409 2.028 3 3 0 0 1-1.164 1.337 3.44 3.44 0 0 1-3.474 0 3.07 3.07 0 0 1-1.183-1.337 4.55 4.55 0 0 1-.427-1.991V8.91a4.56 4.56 0 0 1 .418-2.028 3.1 3.1 0 0 1 1.174-1.355 3.48 3.48 0 0 1 3.474 0c.516.325.925.797 1.173 1.355a4.56 4.56 0 0 1 .418 2.028zm-1.628-.354a3.2 3.2 0 0 0-.445-1.874 1.45 1.45 0 0 0-1.255-.636 1.42 1.42 0 0 0-1.246.636 3.2 3.2 0 0 0-.446 1.82v.381c-.03.636.121 1.267.437 1.819a1.53 1.53 0 0 0 1.255.65 1.54 1.54 0 0 0 1.255-.65 3.36 3.36 0 0 0 .445-1.819zm8.14 1.227h-1.237v2.856h-1.619V5.18h2.91a3.2 3.2 0 0 1 2.137.618 2.12 2.12 0 0 1 .755 1.737 2.23 2.23 0 0 1-1.455 2.192l1.692 3.192v.073h-1.692zm-1.237-1.31h1.291c.33.01.653-.1.91-.309a1.08 1.08 0 0 0 .327-.845 1.2 1.2 0 0 0-.309-.91 1.33 1.33 0 0 0-.964-.318h-1.255z\"/></svg>\n</div>\n <div class=\"preload-percentage\">0%</div>\n <div class=\"preload-label\">Preloading tiles...</div>\n </div>\n </div>\n", xi = class {
5565
+ var Ei = `
5566
+ <div class="preload-bar-vertical"></div>
5567
+ <div class="preload-bar-horizontal"></div>
5568
+ <div class="preload-badge">
5569
+ <div class="preload-ring-outer"></div>
5570
+ <div class="preload-ring-inner"></div>
5571
+ <div class="preload-ring-dots"></div>
5572
+ <div class="preload-content">
5573
+ <div class="preload-logo"><svg xmlns="http://www.w3.org/2000/svg" width="130" height="18" viewBox="0 0 130 18" fill="currentColor"><path d="M16.49.815h-3.283V17.35h3.283zm-6.566 0h-3.32v6.567h3.32zm16.461 0h-6.567v3.32h6.567zm0 13.215h-6.567v3.319h6.567zM3.321.815H.038V17.35h3.283zM38.38 5.18l2.01 5.667 2-5.666h2.12v7.812h-1.62v-2.137l.164-3.684-2.092 5.82h-1.128l-2.11-5.82.164 3.684v2.137h-1.61V5.18zm14.488 6.176h-2.81l-.537 1.61h-1.728l2.91-7.812h1.492l2.928 7.812h-1.719zm-2.392-1.273h1.955l-.982-2.929zm9.432.154v2.729h-1.61V5.18h3.046a3.5 3.5 0 0 1 1.547.318c.426.193.784.51 1.027.91.246.405.372.872.364 1.346a2.21 2.21 0 0 1-.791 1.819 3.27 3.27 0 0 1-2.174.663zm0-1.3h1.436c.352.02.698-.09.974-.31a1.1 1.1 0 0 0 .336-.909 1.2 1.2 0 0 0-1.1-1.291h-1.646zm14.059 1.455a2.73 2.73 0 0 1-.91 1.982 3.2 3.2 0 0 1-2.21.728 2.94 2.94 0 0 1-2.364-1.01 4.16 4.16 0 0 1-.91-2.783v-.472a4.7 4.7 0 0 1 .419-2.028c.25-.535.656-.982 1.164-1.283a3.24 3.24 0 0 1 1.71-.455 3.17 3.17 0 0 1 2.182.728c.557.53.884 1.259.91 2.028h-1.592a1.62 1.62 0 0 0-.418-1.091 1.57 1.57 0 0 0-1.11-.346 1.35 1.35 0 0 0-1.2.582 3.1 3.1 0 0 0-.41 1.82v.59c-.037.63.095 1.258.383 1.82a1.32 1.32 0 0 0 1.21.581c.398.034.796-.086 1.109-.336.273-.284.426-.662.427-1.055zm6.393-.255h-1.28v2.856h-1.61V5.18h2.9a3.2 3.2 0 0 1 2.138.618 2.12 2.12 0 0 1 .755 1.737 2.17 2.17 0 0 1-1.373 2.192l1.691 3.192v.073H81.89zm-1.281-1.31h1.3c.332.018.657-.092.91-.309a1.1 1.1 0 0 0 .336-.845 1.2 1.2 0 0 0-.318-.91 1.32 1.32 0 0 0-.964-.318h-1.264zm12.55.783h-3.093v2.09h3.638v1.292h-5.247V5.18h5.23v1.3h-3.639v1.865h3.092zm8.339 1.746H97.14l-.537 1.61h-1.71l2.91-7.812h1.492l2.929 7.812h-1.71zm-2.392-1.3h1.956l-.983-2.929zm13.06-3.575h-2.374v6.512h-1.609V6.48h-2.365v-1.3h6.366zm9.631 2.783a4.7 4.7 0 0 1-.409 2.028 3 3 0 0 1-1.164 1.337 3.44 3.44 0 0 1-3.474 0 3.07 3.07 0 0 1-1.183-1.337 4.55 4.55 0 0 1-.427-1.991V8.91a4.56 4.56 0 0 1 .418-2.028 3.1 3.1 0 0 1 1.174-1.355 3.48 3.48 0 0 1 3.474 0c.516.325.925.797 1.173 1.355a4.56 4.56 0 0 1 .418 2.028zm-1.628-.354a3.2 3.2 0 0 0-.445-1.874 1.45 1.45 0 0 0-1.255-.636 1.42 1.42 0 0 0-1.246.636 3.2 3.2 0 0 0-.446 1.82v.381c-.03.636.121 1.267.437 1.819a1.53 1.53 0 0 0 1.255.65 1.54 1.54 0 0 0 1.255-.65 3.36 3.36 0 0 0 .445-1.819zm8.14 1.227h-1.237v2.856h-1.619V5.18h2.91a3.2 3.2 0 0 1 2.137.618 2.12 2.12 0 0 1 .755 1.737 2.23 2.23 0 0 1-1.455 2.192l1.692 3.192v.073h-1.692zm-1.237-1.31h1.291c.33.01.653-.1.91-.309a1.08 1.08 0 0 0 .327-.845 1.2 1.2 0 0 0-.309-.91 1.33 1.33 0 0 0-.964-.318h-1.255z"/></svg>
5574
+ </div>
5575
+ <div class="preload-percentage">0%</div>
5576
+ <div class="preload-label">${Pn("loadingMap")}</div>
5577
+ </div>
5578
+ </div>
5579
+ `, Di = class {
5535
5580
  container;
5536
5581
  percentage;
5537
5582
  constructor(e) {
5538
- this.container = document.createElement("div"), this.container.className = "preload-overlay", this.container.innerHTML = bi, this.percentage = this.container.querySelector(".preload-percentage"), e.getContainer().appendChild(this.container);
5583
+ this.container = document.createElement("div"), this.container.className = "preload-overlay", this.container.innerHTML = Ei, this.percentage = this.container.querySelector(".preload-percentage"), e.getContainer().appendChild(this.container);
5539
5584
  }
5540
5585
  remove() {
5541
5586
  this.container.remove();
@@ -5543,11 +5588,11 @@ var bi = "\n <div class=\"preload-bar-vertical\"></div>\n <div class=\"preload
5543
5588
  setProgress(e) {
5544
5589
  this.percentage.innerText = `${Math.floor(e * 100)}%`;
5545
5590
  }
5546
- }, Si = class {
5591
+ }, Oi = class {
5547
5592
  segments;
5548
5593
  constructor(e) {
5549
5594
  this.segments = [];
5550
- let t = new Ci(), n = A(t);
5595
+ let t = new ki(), n = A(t);
5551
5596
  n.lineStart();
5552
5597
  for (let t of e) n.point(t.x, t.y);
5553
5598
  n.lineEnd(), this.segments = t.segments;
@@ -5555,14 +5600,14 @@ var bi = "\n <div class=\"preload-bar-vertical\"></div>\n <div class=\"preload
5555
5600
  sample(e) {
5556
5601
  if (e <= 0) return this.segments[0].startY;
5557
5602
  if (e >= this.segments[this.segments.length - 1].endX) return this.segments[this.segments.length - 1].endY;
5558
- let t = this.segments.find((t) => e >= t.startX && e < t.endX), n = de(t.startX, t.endX, e);
5559
- return t.startY !== t.endY && t.easing !== void 0 ? H(t.startY, t.endY, t.easing(n)) : H(t.startY, t.endY, n);
5603
+ let t = this.segments.find((t) => e >= t.startX && e < t.endX), n = le(t.startX, t.endX, e);
5604
+ return t.startY !== t.endY && t.easing !== void 0 ? U(t.startY, t.endY, t.easing(n)) : U(t.startY, t.endY, n);
5560
5605
  }
5561
5606
  solve(e, t) {
5562
5607
  let n = M((t) => this.sample(t) - e, t);
5563
5608
  return n === !1 ? t : n;
5564
5609
  }
5565
- }, Ci = class {
5610
+ }, ki = class {
5566
5611
  previousPoint = {
5567
5612
  x: 0,
5568
5613
  y: 0
@@ -5607,25 +5652,25 @@ var bi = "\n <div class=\"preload-bar-vertical\"></div>\n <div class=\"preload
5607
5652
  };
5608
5653
  //#endregion
5609
5654
  //#region src/utils/video/easings.ts
5610
- function wi(e, t, n, r) {
5655
+ function Ai(e, t, n, r) {
5611
5656
  return t + n / r * e;
5612
5657
  }
5613
- function Ti(e, t, n, r) {
5658
+ function ji(e, t, n, r) {
5614
5659
  return n * ((e = e / r - 1) * e * e + 1) + t;
5615
5660
  }
5616
- function Ei(e, t, n, r) {
5661
+ function Mi(e, t, n, r) {
5617
5662
  let i = 1.70158, a = 0, o = n;
5618
5663
  return e === 0 ? t : (e /= r) === 1 ? t + n : (a ||= r * .3, o < Math.abs(n) ? (o = n, i = a / 4) : i = a / (2 * Math.PI) * Math.asin(n / o), o * 2 ** (-10 * e) * Math.sin((e * r - i) * (2 * Math.PI) / a) + n + t);
5619
5664
  }
5620
- function Di(e, t, n, r, i) {
5665
+ function Ni(e, t, n, r, i) {
5621
5666
  return i === void 0 && (i = 1.70158), n * ((e = e / r - 1) * e * ((i + 1) * e + i) + 1) + t;
5622
5667
  }
5623
- function Oi(e, t, n, r) {
5668
+ function Pi(e, t, n, r) {
5624
5669
  return (e /= r) < 1 / 2.75 ? n * (7.5625 * e * e) + t : e < 2 / 2.75 ? n * (7.5625 * (e -= 1.5 / 2.75) * e + .75) + t : e < 2.5 / 2.75 ? n * (7.5625 * (e -= 2.25 / 2.75) * e + .9375) + t : n * (7.5625 * (e -= 2.625 / 2.75) * e + .984375) + t;
5625
5670
  }
5626
5671
  //#endregion
5627
5672
  //#region src/utils/video/cameraCurve.ts
5628
- var ki = class {
5673
+ var Fi = class {
5629
5674
  script;
5630
5675
  xCurve;
5631
5676
  yCurve;
@@ -5636,10 +5681,10 @@ var ki = class {
5636
5681
  altitudeCurve;
5637
5682
  elevationCurve;
5638
5683
  constructor(e) {
5639
- this.script = fi(e), this.xCurve = this.createMonotonicCurve(this.script, "x"), this.yCurve = this.createMonotonicCurve(this.script, "y"), this.fovCurve = this.createMonotonicCurve(this.script, "fov"), this.zoomCurve = this.createMonotonicCurve(this.script, "zoom"), this.pitchCurve = this.createMonotonicCurve(this.script, "pitch"), this.bearingCurve = this.createMonotonicCurve(this.script, "bearing"), this.altitudeCurve = this.createMonotonicCurve(this.script, "altitude"), this.elevationCurve = this.createMonotonicCurve(this.script, "elevation");
5684
+ this.script = vi(e), this.xCurve = this.createMonotonicCurve(this.script, "x"), this.yCurve = this.createMonotonicCurve(this.script, "y"), this.fovCurve = this.createMonotonicCurve(this.script, "fov"), this.zoomCurve = this.createMonotonicCurve(this.script, "zoom"), this.pitchCurve = this.createMonotonicCurve(this.script, "pitch"), this.bearingCurve = this.createMonotonicCurve(this.script, "bearing"), this.altitudeCurve = this.createMonotonicCurve(this.script, "altitude"), this.elevationCurve = this.createMonotonicCurve(this.script, "elevation");
5640
5685
  }
5641
5686
  sample(e) {
5642
- let t = this.zoomCurve.sample(e), n = this.altitudeCurve.solve(hi(t), e), r = this.xCurve.sample(n), i = this.yCurve.sample(n), o = this.elevationCurve.sample(n), s = this.bearingCurve.sample(e), c = this.pitchCurve.sample(e), l = this.fovCurve.sample(e);
5687
+ let t = this.zoomCurve.sample(e), n = this.altitudeCurve.solve(xi(t), e), r = this.xCurve.sample(n), i = this.yCurve.sample(n), o = this.elevationCurve.sample(n), s = this.bearingCurve.sample(e), c = this.pitchCurve.sample(e), l = this.fovCurve.sample(e);
5643
5688
  return {
5644
5689
  center: new a(r, i).toLngLat(),
5645
5690
  zoom: t,
@@ -5663,13 +5708,13 @@ var ki = class {
5663
5708
  x: o.time + .1,
5664
5709
  y: l
5665
5710
  }), !a) if (o.transition === "linear") {
5666
- let e = o.time + .1, r = s.time - .1, i = de(o.time, s.time, e), a = de(o.time, s.time, r), c = this.getKeyframeValue(s, t);
5711
+ let e = o.time + .1, r = s.time - .1, i = le(o.time, s.time, e), a = le(o.time, s.time, r), c = this.getKeyframeValue(s, t);
5667
5712
  n.push({
5668
5713
  x: e,
5669
- y: H(l, c, i)
5714
+ y: U(l, c, i)
5670
5715
  }), n.push({
5671
5716
  x: r,
5672
- y: H(l, c, a)
5717
+ y: U(l, c, a)
5673
5718
  });
5674
5719
  } else o.transition === "instant" && (n.push({
5675
5720
  x: o.time + .1,
@@ -5683,7 +5728,7 @@ var ki = class {
5683
5728
  y: l
5684
5729
  });
5685
5730
  }
5686
- return new Si(n);
5731
+ return new Oi(n);
5687
5732
  }
5688
5733
  sampleAutoHideOpacity(e) {
5689
5734
  let t = this.script;
@@ -5694,12 +5739,12 @@ var ki = class {
5694
5739
  if (r.hideLabels === (a?.hideLabels ?? !1)) o = r.hideLabels ? 0 : 1;
5695
5740
  else {
5696
5741
  let t = e - r.time, n = Math.min(400, i.time - r.time);
5697
- o = U(Ti(t, r.hideLabels ? 1 : 0, r.hideLabels ? -1 : 1, n), 0, 1);
5742
+ o = ue(ji(t, r.hideLabels ? 1 : 0, r.hideLabels ? -1 : 1, n), 0, 1);
5698
5743
  }
5699
5744
  let s;
5700
5745
  if (n === t.length - 2 && r.hideLabels) {
5701
5746
  let t = Math.max(r.time, i.time - 400);
5702
- s = U(Ti(e - t, 0, 1, i.time - t), 0, 1);
5747
+ s = ue(ji(e - t, 0, 1, i.time - t), 0, 1);
5703
5748
  } else s = 0;
5704
5749
  return Math.max(o, s);
5705
5750
  }
@@ -5711,9 +5756,9 @@ var ki = class {
5711
5756
  }
5712
5757
  }
5713
5758
  getKeyframeValue(e, t) {
5714
- return t === "altitude" ? hi(e.zoom) : e[t];
5759
+ return t === "altitude" ? xi(e.zoom) : e[t];
5715
5760
  }
5716
- }, Ai = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\"><path d=\"M2.83545 2.66675V6.00008H6.00078M3.38078 5.33341C3.99882 4.26305 4.96943 3.44057 6.1267 3.00656C7.28398 2.57255 8.55607 2.55396 9.72553 2.95397C10.895 3.35397 11.8892 4.14774 12.5383 5.19959C13.1873 6.25144 13.4509 7.49606 13.2839 8.72072C13.117 9.94537 12.5298 11.074 11.6229 11.9137C10.716 12.7535 9.54555 13.2521 8.31169 13.3245C7.07782 13.3968 5.85714 13.0384 4.85828 12.3104C3.85942 11.5824 3.1444 10.5302 2.83545 9.33341\" stroke-width=\"1.25\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n", ji = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"12\" viewBox=\"0 0 10 12\" fill=\"currentColor\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0.991136 3.66807e-08C1.53861 1.64225e-08 1.98242 0.474849 1.98242 1.06061L1.98242 10.6061C1.98242 11.1918 1.53861 11.6667 0.991137 11.6667C0.443665 11.6667 -0.000148911 11.1918 -0.000148941 10.6061L-0.000149434 1.06061C-0.000149464 0.47485 0.443664 5.69389e-08 0.991136 3.66807e-08Z\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M8.92082 3.66807e-08C9.4683 1.64225e-08 9.91211 0.474849 9.91211 1.06061L9.91211 10.6061C9.91211 11.1918 9.4683 11.6667 8.92082 11.6667C8.37335 11.6667 7.92954 11.1918 7.92954 10.6061L7.92954 1.06061C7.92954 0.47485 8.37335 5.69389e-08 8.92082 3.66807e-08Z\"/></svg>\n", Mi = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"currentColor\"><path d=\"M4.88141 14.9874C4.58039 14.9874 4.2919 14.9121 4.01596 14.774C3.38883 14.4475 3 13.8072 3 13.104V2.88322C3 2.18007 3.38883 1.5397 4.01596 1.21323C4.6431 0.886771 5.39567 0.936996 5.97263 1.35135L13.2098 6.46175C13.7115 6.81332 14 7.39091 14 8.00617C14 8.62142 13.699 9.18645 13.2098 9.55059L5.97263 14.6484C5.64652 14.8744 5.27024 15 4.89396 15L4.88141 14.9874ZM4.88141 2.2554C4.78107 2.2554 4.68073 2.28052 4.59293 2.33074C4.3797 2.44375 4.25428 2.64465 4.25428 2.88322V13.104C4.25428 13.3426 4.3797 13.556 4.59293 13.6565C4.80616 13.7695 5.04447 13.7444 5.24515 13.6063L12.4823 8.49586C12.5634 8.4368 12.6294 8.35937 12.6749 8.2699C12.7204 8.18043 12.7442 8.08145 12.7442 7.98105C12.7442 7.88065 12.7204 7.78168 12.6749 7.69221C12.6294 7.60274 12.5634 7.52531 12.4823 7.46625L5.24515 2.36841C5.1378 2.29542 5.01118 2.25608 4.88141 2.2554Z\"/></svg>\n", Ni = (e) => `
5761
+ }, Ii = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\"><path d=\"M2.83545 2.66675V6.00008H6.00078M3.38078 5.33341C3.99882 4.26305 4.96943 3.44057 6.1267 3.00656C7.28398 2.57255 8.55607 2.55396 9.72553 2.95397C10.895 3.35397 11.8892 4.14774 12.5383 5.19959C13.1873 6.25144 13.4509 7.49606 13.2839 8.72072C13.117 9.94537 12.5298 11.074 11.6229 11.9137C10.716 12.7535 9.54555 13.2521 8.31169 13.3245C7.07782 13.3968 5.85714 13.0384 4.85828 12.3104C3.85942 11.5824 3.1444 10.5302 2.83545 9.33341\" stroke-width=\"1.25\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n", Li = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"12\" viewBox=\"0 0 10 12\" fill=\"currentColor\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0.991136 3.66807e-08C1.53861 1.64225e-08 1.98242 0.474849 1.98242 1.06061L1.98242 10.6061C1.98242 11.1918 1.53861 11.6667 0.991137 11.6667C0.443665 11.6667 -0.000148911 11.1918 -0.000148941 10.6061L-0.000149434 1.06061C-0.000149464 0.47485 0.443664 5.69389e-08 0.991136 3.66807e-08Z\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M8.92082 3.66807e-08C9.4683 1.64225e-08 9.91211 0.474849 9.91211 1.06061L9.91211 10.6061C9.91211 11.1918 9.4683 11.6667 8.92082 11.6667C8.37335 11.6667 7.92954 11.1918 7.92954 10.6061L7.92954 1.06061C7.92954 0.47485 8.37335 5.69389e-08 8.92082 3.66807e-08Z\"/></svg>\n", Ri = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"currentColor\"><path d=\"M4.88141 14.9874C4.58039 14.9874 4.2919 14.9121 4.01596 14.774C3.38883 14.4475 3 13.8072 3 13.104V2.88322C3 2.18007 3.38883 1.5397 4.01596 1.21323C4.6431 0.886771 5.39567 0.936996 5.97263 1.35135L13.2098 6.46175C13.7115 6.81332 14 7.39091 14 8.00617C14 8.62142 13.699 9.18645 13.2098 9.55059L5.97263 14.6484C5.64652 14.8744 5.27024 15 4.89396 15L4.88141 14.9874ZM4.88141 2.2554C4.78107 2.2554 4.68073 2.28052 4.59293 2.33074C4.3797 2.44375 4.25428 2.64465 4.25428 2.88322V13.104C4.25428 13.3426 4.3797 13.556 4.59293 13.6565C4.80616 13.7695 5.04447 13.7444 5.24515 13.6063L12.4823 8.49586C12.5634 8.4368 12.6294 8.35937 12.6749 8.2699C12.7204 8.18043 12.7442 8.08145 12.7442 7.98105C12.7442 7.88065 12.7204 7.78168 12.6749 7.69221C12.6294 7.60274 12.5634 7.52531 12.4823 7.46625L5.24515 2.36841C5.1378 2.29542 5.01118 2.25608 4.88141 2.2554Z\"/></svg>\n", zi = (e) => `
5717
5762
  <div class="video-slider-container">
5718
5763
  <div class="video-slider-line-wrapper">
5719
5764
  <div class="video-slider-line-left"></div>
@@ -5723,21 +5768,21 @@ var ki = class {
5723
5768
  </div>
5724
5769
  <div class="video-controls-row">
5725
5770
  <button class="video-button play">
5726
- <span class="video-icon play-icon">${Mi}</span>
5727
- <span class="video-icon pause-icon">${ji}</span>
5771
+ <span class="video-icon play-icon">${Ri}</span>
5772
+ <span class="video-icon pause-icon">${Li}</span>
5728
5773
  </button>
5729
5774
  <button class="video-button restart">
5730
- ${Ai}
5775
+ ${Ii}
5731
5776
  </button>
5732
5777
  <div class="video-time">
5733
- <span class="video-playhead">${_i(0)}</span> /
5734
- <span class="video-duration">${_i(e)}</span>
5778
+ <span class="video-playhead">${Ci(0)}</span> /
5779
+ <span class="video-duration">${Ci(e)}</span>
5735
5780
  </div>
5736
5781
  <button class="video-button fullscreen">
5737
5782
  ${_n}
5738
5783
  </button>
5739
5784
  </div>
5740
- `, Pi = class {
5785
+ `, Bi = class {
5741
5786
  callbacks;
5742
5787
  duration;
5743
5788
  container;
@@ -5751,7 +5796,7 @@ var ki = class {
5751
5796
  playhead = 0;
5752
5797
  isPlaying = !1;
5753
5798
  constructor(e, t, n) {
5754
- this.duration = t, this.callbacks = n, this.mapContainer = e.getContainer(), this.container = document.createElement("div"), this.container.className = "video-controls", this.container.innerHTML = Ni(t), this.playButton = this.container.querySelector(".video-button.play"), this.restartButton = this.container.querySelector(".video-button.restart"), this.fullscreenButton = this.container.querySelector(".video-button.fullscreen"), this.slider = this.container.querySelector(".video-slider"), this.sliderFill = this.container.querySelector(".video-slider-line-left"), this.playheadLabel = this.container.querySelector(".video-playhead"), this.playButton.addEventListener("click", () => this.callbacks.playPause()), this.restartButton.addEventListener("click", () => this.callbacks.restart()), this.fullscreenButton.addEventListener("click", () => Sn(this.mapContainer)), this.slider.addEventListener("input", () => {
5799
+ this.duration = t, this.callbacks = n, this.mapContainer = e.getContainer(), this.container = document.createElement("div"), this.container.className = "video-controls", this.container.innerHTML = zi(t), this.playButton = this.container.querySelector(".video-button.play"), this.restartButton = this.container.querySelector(".video-button.restart"), this.fullscreenButton = this.container.querySelector(".video-button.fullscreen"), this.slider = this.container.querySelector(".video-slider"), this.sliderFill = this.container.querySelector(".video-slider-line-left"), this.playheadLabel = this.container.querySelector(".video-playhead"), this.playButton.addEventListener("click", () => this.callbacks.playPause()), this.restartButton.addEventListener("click", () => this.callbacks.restart()), this.fullscreenButton.addEventListener("click", () => Sn(this.mapContainer)), this.slider.addEventListener("input", () => {
5755
5800
  this.duration > 0 && this.callbacks.seek(Number(this.slider.value));
5756
5801
  }), this.mapContainer.appendChild(this.container), this.update();
5757
5802
  }
@@ -5763,39 +5808,39 @@ var ki = class {
5763
5808
  }
5764
5809
  update() {
5765
5810
  let { duration: e, playhead: t } = this;
5766
- this.playButton.classList.toggle("playing", this.isPlaying), this.restartButton.classList.toggle("disabled", t === 0), this.slider.value = String(t), this.sliderFill.style.width = `${de(0, e, t) * 100}%`, this.playheadLabel.textContent = _i(t);
5811
+ this.playButton.classList.toggle("playing", this.isPlaying), this.restartButton.classList.toggle("disabled", t === 0), this.slider.value = String(t), this.sliderFill.style.width = `${le(0, e, t) * 100}%`, this.playheadLabel.textContent = Ci(t);
5767
5812
  }
5768
- }, Fi = class extends t {
5813
+ }, Vi = class extends t {
5769
5814
  time;
5770
5815
  constructor(e, t) {
5771
5816
  super(e), this.time = t;
5772
5817
  }
5773
- }, Ii = {
5774
- linear: wi,
5775
- easeOutCubic: Ti,
5776
- easeOutBack: Di,
5777
- easeOutBounce: Oi,
5778
- easeOutElastic: Ei
5818
+ }, Hi = {
5819
+ linear: Ai,
5820
+ easeOutCubic: ji,
5821
+ easeOutBack: Ni,
5822
+ easeOutBounce: Pi,
5823
+ easeOutElastic: Mi
5779
5824
  };
5780
- function Li(e) {
5825
+ function Ui(e) {
5781
5826
  return e.entryType === "fade" || e.exitType === "fade" || e.entryType === "instant" || e.exitType === "instant";
5782
5827
  }
5783
- function Ri(e) {
5828
+ function Wi(e) {
5784
5829
  return e.entryType === "grow" || e.exitType === "grow";
5785
5830
  }
5786
5831
  function $(e, t, n) {
5787
5832
  let { entry: r, entryDuration: i, exit: a, exitDuration: o } = e, { entryType: s, entryEasing: c, exitType: l, exitEasing: u } = e;
5788
- return n < r && (s === t || s === "instant" && t === "fade") || n > a && (l === t || l === "instant" && t === "fade") ? 0 : i > 0 && n < r + i && s === t ? Ii[c](n - r, 0, 1, i) : o > 0 && n > a - o && l === t ? Ii[u](n - (a - o), 1, -1, o) : 1;
5833
+ return n < r && (s === t || s === "instant" && t === "fade") || n > a && (l === t || l === "instant" && t === "fade") ? 0 : i > 0 && n < r + i && s === t ? Hi[c](n - r, 0, 1, i) : o > 0 && n > a - o && l === t ? Hi[u](n - (a - o), 1, -1, o) : 1;
5789
5834
  }
5790
- function zi(e) {
5835
+ function Gi(e) {
5791
5836
  return e.target.type === "model";
5792
5837
  }
5793
- function Bi(e) {
5838
+ function Ki(e) {
5794
5839
  return e.target.type === "layer" || e.target.type === "overlay";
5795
5840
  }
5796
5841
  //#endregion
5797
5842
  //#region src/Video.ts
5798
- var Vi = class {
5843
+ var qi = class {
5799
5844
  mcMap;
5800
5845
  cameraCurve;
5801
5846
  registryAnimations;
@@ -5826,11 +5871,11 @@ var Vi = class {
5826
5871
  elevation: e.elevation ?? 0
5827
5872
  };
5828
5873
  }), u = t.video?.animations ?? [];
5829
- this.layerAnimations = u.filter(Bi);
5830
- let d = u.filter(zi);
5831
- this.registryAnimations = [...d.filter((e) => e.target.modelId === void 0), ...d.filter((e) => e.target.modelId !== void 0)], this.duration = gi(l), this.frameRate = vi(t.export?.frameRate ?? 60), this.cameraCurve = new ki(l), this.registry = new Wr(t), this.svgs = n, this.svgCache = r, this.mapstyle = i, this.overlays = o, this.layerInfo = s, this.backgroundColor = c;
5874
+ this.layerAnimations = u.filter(Ki);
5875
+ let d = u.filter(Gi);
5876
+ this.registryAnimations = [...d.filter((e) => e.target.modelId === void 0), ...d.filter((e) => e.target.modelId !== void 0)], this.duration = Si(l), this.frameRate = wi(t.export?.frameRate ?? 60), this.cameraCurve = new Fi(l), this.registry = new Xr(t), this.svgs = n, this.svgCache = r, this.mapstyle = i, this.overlays = o, this.layerInfo = s, this.backgroundColor = c;
5832
5877
  let f = t.export?.format === "web_video";
5833
- this.loop = f && (t.web?.loop ?? !1), f && t.web?.controls && (this.controls = new Pi(e.map, this.duration, {
5878
+ this.loop = f && (t.web?.loop ?? !1), f && t.web?.controls && (this.controls = new Bi(e.map, this.duration, {
5834
5879
  playPause: () => this.playbackContext === void 0 ? this.play() : this.pause(),
5835
5880
  restart: () => {
5836
5881
  this.seekTo(0), this.play();
@@ -5852,13 +5897,13 @@ var Vi = class {
5852
5897
  this.playbackContext === void 0 && this.duration > 0 && (this.playhead >= this.duration && (this.playhead = 0), this.playbackContext = {
5853
5898
  startTime: Date.now(),
5854
5899
  startPlayhead: this.playhead
5855
- }, this.mcMap.fire(new Fi("playstart", this.playhead)), this.controls?.setPlaying(!0), this.playFrame());
5900
+ }, this.mcMap.fire(new Vi("playstart", this.playhead)), this.controls?.setPlaying(!0), this.playFrame());
5856
5901
  }
5857
5902
  pause() {
5858
- this.playbackContext !== void 0 && (this.playbackContext = void 0, this.mcMap.fire(new Fi("playend", this.playhead)), this.controls?.setPlaying(!1));
5903
+ this.playbackContext !== void 0 && (this.playbackContext = void 0, this.mcMap.fire(new Vi("playend", this.playhead)), this.controls?.setPlaying(!1));
5859
5904
  }
5860
5905
  seekTo(e) {
5861
- this.duration > 0 && (e = U(e, 0, this.duration), this.setFrame(e), this.playbackContext !== void 0 && (this.playbackContext = {
5906
+ this.duration > 0 && (e = ue(e, 0, this.duration), this.setFrame(e), this.playbackContext !== void 0 && (this.playbackContext = {
5862
5907
  startTime: Date.now(),
5863
5908
  startPlayhead: e
5864
5909
  }));
@@ -5886,13 +5931,13 @@ var Vi = class {
5886
5931
  });
5887
5932
  }
5888
5933
  }
5889
- this.preloadOverlay = new xi(this.mcMap.map), e._fadeDuration = 0;
5934
+ this.preloadOverlay = new Di(this.mcMap.map), e._fadeDuration = 0;
5890
5935
  try {
5891
5936
  let i, a = /* @__PURE__ */ new Set();
5892
5937
  for (let o = 0; o < t; o++) {
5893
5938
  this.preloadOverlay?.setProgress(o / t);
5894
5939
  let s = this.cameraCurve.sample(o * 1e3 / this.frameRate);
5895
- if (yi(i, s)) continue;
5940
+ if (Ti(i, s)) continue;
5896
5941
  this.setCamera(s);
5897
5942
  let c = new Set([...n].flatMap(([t, n]) => e.coveringTiles(n).map((e) => `${t}/${e.key}`)));
5898
5943
  if (i !== void 0 && [...a].some((e) => !r.has(e) && !c.has(e))) {
@@ -5912,13 +5957,13 @@ var Vi = class {
5912
5957
  playFrame() {
5913
5958
  if (this.playbackContext !== void 0) {
5914
5959
  let e = this.playbackContext.startPlayhead + (Date.now() - this.playbackContext.startTime);
5915
- e > this.duration ? this.loop ? (this.seekTo(0), requestAnimationFrame(() => this.playFrame())) : (this.setFrame(this.duration), this.playbackContext = void 0, this.mcMap.fire(new Fi("playend", this.playhead)), this.controls?.setPlaying(!1)) : (this.setFrame(e), requestAnimationFrame(() => this.playFrame()));
5960
+ e > this.duration ? this.loop ? (this.seekTo(0), requestAnimationFrame(() => this.playFrame())) : (this.setFrame(this.duration), this.playbackContext = void 0, this.mcMap.fire(new Vi("playend", this.playhead)), this.controls?.setPlaying(!1)) : (this.setFrame(e), requestAnimationFrame(() => this.playFrame()));
5916
5961
  }
5917
5962
  }
5918
5963
  setFrame(e) {
5919
5964
  this.playhead = e;
5920
5965
  let t = this.cameraCurve.sample(e);
5921
- this.setCamera(t), this.applyAnimations(e), this.mcMap.fire(new Fi("play", e)), this.controls?.setPlayhead(e);
5966
+ this.setCamera(t), this.applyAnimations(e), this.mcMap.fire(new Vi("play", e)), this.controls?.setPlayhead(e);
5922
5967
  }
5923
5968
  setCamera(e) {
5924
5969
  let t = this.mcMap.map, n = t.getCenter(), r = t.getZoom(), i = t.getBearing(), a = t.getPitch(), o = t.getCenterElevation(), s = t.getVerticalFieldOfView();
@@ -5928,7 +5973,7 @@ var Vi = class {
5928
5973
  let t = this.mcMap.map, { svgs: n, svgCache: r, registryAnimations: i } = this;
5929
5974
  for (let n of i) {
5930
5975
  let { target: r } = n;
5931
- if (!Li(n)) continue;
5976
+ if (!Ui(n)) continue;
5932
5977
  let { modelType: i, groupId: a, modelId: o } = r, s = $(n, "fade", e);
5933
5978
  if (i === "area") {
5934
5979
  let e = this.registry.models.area[a] ?? {}, n = o === void 0 ? Object.values(e) : e[o] ? [e[o]] : [];
@@ -5941,7 +5986,7 @@ var Vi = class {
5941
5986
  let e = this.registry.models[i][a] ?? {}, n = o === void 0 ? Object.keys(e) : [o];
5942
5987
  for (let e of n) t.setFeatureState({
5943
5988
  source: a,
5944
- id: V(e)
5989
+ id: B(e)
5945
5990
  }, { opacity: s });
5946
5991
  }
5947
5992
  }
@@ -5951,7 +5996,7 @@ var Vi = class {
5951
5996
  type: "FeatureCollection",
5952
5997
  features: i.models.filter((e) => e.visible ?? !0).map((t) => {
5953
5998
  let a = o.get(t.id);
5954
- return Sr(i, t, a === void 0 ? s : $(a, "grow", e), n, r);
5999
+ return Or(i, t, a === void 0 ? s : $(a, "grow", e), n, r);
5955
6000
  })
5956
6001
  });
5957
6002
  }
@@ -5961,7 +6006,7 @@ var Vi = class {
5961
6006
  type: "FeatureCollection",
5962
6007
  features: n.models.filter((e) => e.visible ?? !0).map((i) => {
5963
6008
  let s = a.get(i.id);
5964
- return Qr(t, n, i, s === void 0 ? o : $(s, "grow", e), r);
6009
+ return ii(t, n, i, s === void 0 ? o : $(s, "grow", e), r);
5965
6010
  })
5966
6011
  });
5967
6012
  }
@@ -5971,7 +6016,7 @@ var Vi = class {
5971
6016
  type: "FeatureCollection",
5972
6017
  features: i.models.filter((e) => e.visible ?? !0).map((a) => {
5973
6018
  let c = o.get(a.id);
5974
- return Er(t, i, a, c === void 0 ? s : $(c, "grow", e), n, r);
6019
+ return Mr(t, i, a, c === void 0 ? s : $(c, "grow", e), n, r);
5975
6020
  })
5976
6021
  });
5977
6022
  }
@@ -5989,7 +6034,7 @@ var Vi = class {
5989
6034
  let r, i = /* @__PURE__ */ new Map();
5990
6035
  for (let a of this.registryAnimations) {
5991
6036
  let { target: o } = a;
5992
- o.modelType === e && o.groupId === t && (n === "opacity" && Li(a) || n === "scale" && Ri(a)) && (o.modelId === void 0 ? r = a : i.set(o.modelId, a));
6037
+ o.modelType === e && o.groupId === t && (n === "opacity" && Ui(a) || n === "scale" && Wi(a)) && (o.modelId === void 0 ? r = a : i.set(o.modelId, a));
5993
6038
  }
5994
6039
  return {
5995
6040
  groupAnimation: r,
@@ -6003,18 +6048,18 @@ var Vi = class {
6003
6048
  let { target: n } = t;
6004
6049
  n.type === "layer" && n.ids.includes(e.id) && n.ids.length < a && (i = t, a = n.ids.length);
6005
6050
  }
6006
- let o = this.layerInfo[e.id]?.opacity ?? sr[e.type].defaultValue;
6051
+ let o = this.layerInfo[e.id]?.opacity ?? ur[e.type].defaultValue;
6007
6052
  return i === void 0 ? r === void 0 ? void 0 : $(r, "fade", t) * o : $(i, "fade", t) * o;
6008
6053
  }
6009
6054
  setLayerOpacity(e, t) {
6010
- let n = this.mcMap.map, r = sr[e.type];
6055
+ let n = this.mcMap.map, r = ur[e.type];
6011
6056
  for (let i of r.props) n.setPaintProperty(e.id, i, t);
6012
6057
  }
6013
6058
  resetLayerOpacity(e) {
6014
- let t = this.mcMap.map, n = sr[e.type], r = this.layerInfo[e.id]?.opacity;
6059
+ let t = this.mcMap.map, n = ur[e.type], r = this.layerInfo[e.id]?.opacity;
6015
6060
  for (let i of n.props) t.setPaintProperty(e.id, i, r ?? e.paint?.[i] ?? n.defaultValue);
6016
6061
  }
6017
- }, Hi = class extends n {
6062
+ }, Ji = class extends n {
6018
6063
  map;
6019
6064
  format;
6020
6065
  mapstyle;
@@ -6025,7 +6070,7 @@ var Vi = class {
6025
6070
  image;
6026
6071
  video;
6027
6072
  constructor(e, t, n, r, i, a, o, s, c, l, u, d) {
6028
- super(), this.map = e, this.format = t, this.mapstyle = o, this.svgCache = a, this.backgroundColor = l, this.vapiUrl = u, this.accessToken = d, this.image = new di(this, t, a, l), n === "video" && (r.video?.keyframes ?? []).length > 0 && (this.video = new Vi(this, r, i, a, o, s, c, l));
6073
+ super(), this.map = e, this.format = t, this.mapstyle = o, this.svgCache = a, this.backgroundColor = l, this.vapiUrl = u, this.accessToken = d, this.image = new _i(this, t, a, l), n === "video" && (r.video?.keyframes ?? []).length > 0 && (this.video = new qi(this, r, i, a, o, s, c, l));
6029
6074
  }
6030
6075
  play() {
6031
6076
  this.video?.play();
@@ -6043,7 +6088,7 @@ var Vi = class {
6043
6088
  return this.video?.preload() ?? Promise.resolve();
6044
6089
  }
6045
6090
  geoTiffMetadata(e) {
6046
- return li(this.map, e);
6091
+ return hi(this.map, e);
6047
6092
  }
6048
6093
  svgExportOptions(e, t, n) {
6049
6094
  return {
@@ -6061,7 +6106,7 @@ var Vi = class {
6061
6106
  };
6062
6107
  }
6063
6108
  pdfExportOptions(e) {
6064
- return ii(this.mapstyle, this.svgCache.fonts, {
6109
+ return ui(this.mapstyle, this.svgCache.fonts, {
6065
6110
  vapiUrl: this.vapiUrl,
6066
6111
  accessToken: this.accessToken,
6067
6112
  apiUrl: e.href,
@@ -6070,14 +6115,14 @@ var Vi = class {
6070
6115
  }
6071
6116
  remove() {
6072
6117
  let e = this.map.getContainer();
6073
- pr(this.map), this.video?.remove(), this.map.remove(), e.innerHTML = "", e.style.backgroundColor = "", e.classList.remove("mc-map"), e.classList.remove("mc-mode-web");
6118
+ gr(this.map), this.video?.remove(), this.map.remove(), e.innerHTML = "", e.style.backgroundColor = "", e.classList.remove("mc-map"), e.classList.remove("mc-mode-web");
6074
6119
  }
6075
6120
  };
6076
6121
  //#endregion
6077
6122
  //#region src/initMap.ts
6078
- async function Ui(t) {
6079
- let { accessToken: n, env: r = "production" } = t, a = r === "bleeding" ? "https://vapi.bleeding.mc-cdn.io" : r === "beta" ? "https://vapi.beta.mc-cdn.io" : "https://vapi.mc-cdn.io", o = r === "bleeding" ? "https://cdn.bleeding.mapcreator.io" : r === "beta" ? "https://cdn.beta.mapcreator.io" : "https://cdn.mapcreator.io", s = typeof t.job == "string" ? await Wi(t.job, o, n) : t.job, c = s.export?.format ?? "png", l = ur[c] ?? "static";
6080
- await Gi();
6123
+ async function Yi(t) {
6124
+ let { accessToken: n, env: r = "production" } = t, a = r === "bleeding" ? "https://vapi.bleeding.mc-cdn.io" : r === "beta" ? "https://vapi.beta.mc-cdn.io" : "https://vapi.mc-cdn.io", o = r === "bleeding" ? "https://cdn.bleeding.mapcreator.io" : r === "beta" ? "https://cdn.beta.mapcreator.io" : "https://cdn.mapcreator.io", s = Cr(typeof t.job == "string" ? await Xi(t.job, o, n) : t.job), c = s.export?.format ?? "png", l = pr[c] ?? "static";
6125
+ await Zi();
6081
6126
  let u = {
6082
6127
  container: t.container,
6083
6128
  attributionControl: !1,
@@ -6091,28 +6136,28 @@ async function Ui(t) {
6091
6136
  maxPitch: 85,
6092
6137
  maxZoom: 22,
6093
6138
  locale: {
6094
- "CooperativeGesturesHandler.WindowsHelpText": jn("windowsHelpText"),
6095
- "CooperativeGesturesHandler.MacHelpText": jn("macHelpText"),
6096
- "CooperativeGesturesHandler.MobileHelpText": jn("mobileHelpText")
6139
+ "CooperativeGesturesHandler.WindowsHelpText": Pn("windowsHelpText"),
6140
+ "CooperativeGesturesHandler.MacHelpText": Pn("macHelpText"),
6141
+ "CooperativeGesturesHandler.MobileHelpText": Pn("mobileHelpText")
6097
6142
  },
6098
- maxCanvasSize: le(),
6143
+ maxCanvasSize: se(),
6099
6144
  canvasContextAttributes: { preserveDrawingBuffer: t.preserveDrawingBuffer ?? !1 }
6100
6145
  };
6101
6146
  l === "video" && (u.maxTileCacheSize = Infinity, u.maxTileCacheZoomLevels = Infinity, u.refreshExpiredTiles = !1);
6102
6147
  let d = new i(u), f = d.getContainer();
6103
6148
  f.classList.add("mc-map"), l === "interactive" && f.classList.add("mc-mode-web");
6104
- let p = l === "interactive" ? new Kr(d, t.youTubePlaceholder ?? !1) : void 0, { map: { language: m, hideBasemap: h, detailLevel: g = 0, projection: _ = "mercator", terrain: v = !1, terrainExaggeration: y = 1 }, registry: b = {}, web: x, positionOffsets: S } = s, { models: C = {}, slots: w = {}, svgs: T = {} } = b, E = new et(d, await Oe(r, a, n), a, n);
6149
+ let p = l === "interactive" ? new Qr(d, t.youTubePlaceholder ?? !1) : void 0, { map: { language: m, hideBasemap: h, detailLevel: g = 0, projection: _ = "mercator", terrain: v = !1, terrainExaggeration: y = 1 }, registry: b = {}, web: x, positionOffsets: S } = s, { models: C = {}, slots: w = {}, svgs: T = {} } = b, E = new et(d, await Oe(r, a, n), a, n);
6105
6150
  d.resize();
6106
6151
  let D = l === "video" ? s.video?.keyframes[0] : void 0, O = D?.pitch ?? s.map.pitch ?? 0, k = D?.bearing ?? s.map.rotation ?? 0, A = D?.zoom ?? s.map.zoom, j = D?.center === void 0 ? s.map.center : {
6107
6152
  lng: D.center[0],
6108
6153
  lat: D.center[1]
6109
6154
  };
6110
6155
  d.setPitch(O), d.setBearing(k);
6111
- let M = me(s, f, l, c), P, I;
6156
+ let M = pe(s, f, l, c), P, I;
6112
6157
  l === "interactive" ? (I = A - g + Math.log2(M), P = 1) : (I = A - g, P = M, d.on("resize", () => {
6113
- let e = me(s, f, l, c);
6158
+ let e = pe(s, f, l, c);
6114
6159
  e !== d.getScale() && d.setScale(e);
6115
- })), d.setScale(P), d.setZoom(I), d.setCenter(j), d.setDetailLevel(g), d.setMinZoom(g), d.addControl(new e({ compact: !1 })), await mr(s, S ?? ar, d, E, {
6160
+ })), d.setScale(P), d.setZoom(I), d.setCenter(j), d.setDetailLevel(g), d.setMinZoom(g), d.addControl(new e({ compact: !1 })), await _r(s, S ?? cr, d, E, {
6116
6161
  center: j,
6117
6162
  zoom: I,
6118
6163
  pitch: O,
@@ -6125,22 +6170,22 @@ async function Ui(t) {
6125
6170
  sources: {},
6126
6171
  layers: []
6127
6172
  } : await fetch(`${a}/styles/${R}.json?access_token=${n}`).then((e) => e.json());
6128
- vr(z), d.setStyle(null), d.setStyle(z), await d.once("style.load"), Se(d, l), d.on("moveend", () => Se(d, l)), d.on("resize", () => Se(d, l)), d.on("attributionchange", () => Se(d, l)), N(m, d);
6173
+ wr(z), d.setStyle(null), d.setStyle(z), await d.once("style.load"), xe(d, l), d.on("moveend", () => xe(d, l)), d.on("resize", () => xe(d, l)), d.on("attributionchange", () => xe(d, l)), N(m, d);
6129
6174
  let B = s.map.overlays ?? [], V = s.meta?.layers ?? [];
6130
6175
  B.length !== V.length && (B = [], V = []);
6131
- let te = await Dr(B, V, d, a, n, z.metadata?.styleOverride), ne = B.reduce((e, t, n) => e.set(t, te[n]), /* @__PURE__ */ new Map());
6132
- Zi(d, E, C, w, T, a, n, l), N(m, d), p?.setPublication(z.metadata?.publication), p?.setpopupElements(), p?.setHighlightManager(), d.setProjection({ type: _ === "globe" ? "globe" : "mercator" });
6133
- let re = Ki(d, _);
6134
- qi(d, re), v && Ji(d, a, n, y);
6135
- let ie = Yi(s.map.layerInfo, z, te);
6136
- Xi(d, ie, !h);
6137
- let ae = new Hi(d, c, l, s, T, E, z, ne, ie, re, a, n);
6138
- return await E.settledImages(), ae;
6139
- }
6140
- function Wi(e, t, n) {
6176
+ let H = await Nr(B, V, d, a, n, z.metadata?.styleOverride), te = B.reduce((e, t, n) => e.set(t, H[n]), /* @__PURE__ */ new Map());
6177
+ ra(d, E, C, w, T, a, n, l), N(m, d), p?.setPublication(z.metadata?.publication), p?.setpopupElements(), p?.setHighlightManager(), d.setProjection({ type: _ === "globe" ? "globe" : "mercator" });
6178
+ let ne = Qi(d, _);
6179
+ $i(d, ne), v && ea(d, a, n, y);
6180
+ let re = ta(s.map.layerInfo, z, H);
6181
+ na(d, re, !h);
6182
+ let ie = new Ji(d, c, l, s, T, E, z, te, re, ne, a, n);
6183
+ return await E.settledImages(), ie;
6184
+ }
6185
+ function Xi(e, t, n) {
6141
6186
  return fetch(`${t}/jobs/${e}.json?access_token=${n}`).then((e) => e.json());
6142
6187
  }
6143
- function Gi() {
6188
+ function Zi() {
6144
6189
  return new Promise((e) => {
6145
6190
  let t = () => {
6146
6191
  window.innerWidth > 0 && window.innerHeight > 0 && (window.removeEventListener("resize", t), e());
@@ -6148,18 +6193,18 @@ function Gi() {
6148
6193
  window.addEventListener("resize", t), t();
6149
6194
  });
6150
6195
  }
6151
- function Ki(e, t) {
6196
+ function Qi(e, t) {
6152
6197
  let n = e.getStyle().metadata ?? {}, r = n["mc:background-color"] ?? "#f8f8f8", i = n["mc:background-color-globe"] ?? "#000000";
6153
6198
  return t === "globe" ? i : r;
6154
6199
  }
6155
- function qi(e, t) {
6156
- e.getContainer().style.backgroundColor = t, e.setSky(e.getStyle().sky ?? ir), e.setLight({ position: [
6200
+ function $i(e, t) {
6201
+ e.getContainer().style.backgroundColor = t, e.setSky(e.getStyle().sky ?? sr), e.setLight({ position: [
6157
6202
  1.15,
6158
6203
  210,
6159
6204
  45
6160
6205
  ] });
6161
6206
  }
6162
- function Ji(e, t, n, r) {
6207
+ function ea(e, t, n, r) {
6163
6208
  e.addSource("mc-dem", {
6164
6209
  type: "raster-dem",
6165
6210
  tiles: [`${t}/dataset/jaxa_terrainrgb/{z}/{x}/{y}?access_token=${n}`],
@@ -6171,7 +6216,7 @@ function Ji(e, t, n, r) {
6171
6216
  exaggeration: r
6172
6217
  });
6173
6218
  }
6174
- function Yi(e, t, n) {
6219
+ function ta(e, t, n) {
6175
6220
  let r = e?.reduce((e, t) => (e[t.id] = {
6176
6221
  visibility: t.visibility,
6177
6222
  ...t.opacity !== void 0 && { opacity: t.opacity }
@@ -6180,53 +6225,53 @@ function Yi(e, t, n) {
6180
6225
  for (let e of n) for (let t of e.layers) i[t.id] = r[t.id] ?? { visibility: !1 };
6181
6226
  return i;
6182
6227
  }
6183
- function Xi(e, t, n) {
6228
+ function na(e, t, n) {
6184
6229
  for (let r in t) {
6185
6230
  let i = e.getLayer(r);
6186
6231
  if (i !== void 0) {
6187
6232
  let a = t[r];
6188
6233
  if (e.setLayoutProperty(r, "visibility", a.visibility && n ? "visible" : "none"), a.opacity !== void 0) {
6189
- let t = sr[i.type];
6234
+ let t = ur[i.type];
6190
6235
  for (let n of t.props) e.setPaintProperty(r, n, a.opacity);
6191
6236
  }
6192
6237
  }
6193
6238
  }
6194
6239
  }
6195
- function Zi(e, t, n, r, i, a, o, s) {
6240
+ function ra(e, t, n, r, i, a, o, s) {
6196
6241
  let { beforeNone: c = [], beforeNames: l = [], beforeBoundaries: u = [], beforeWaters: d = [] } = r;
6197
6242
  c.forEach((r) => {
6198
- Qi(e, t, n, r, i, "mc-before-none", a, o, s);
6243
+ ia(e, t, n, r, i, "mc-before-none", a, o, s);
6199
6244
  }), l.forEach((r) => {
6200
- Qi(e, t, n, r, i, "mc-before-names", a, o, s);
6245
+ ia(e, t, n, r, i, "mc-before-names", a, o, s);
6201
6246
  }), u.forEach((r) => {
6202
- Qi(e, t, n, r, i, "mc-before-boundaries", a, o, s);
6247
+ ia(e, t, n, r, i, "mc-before-boundaries", a, o, s);
6203
6248
  }), d.forEach((r) => {
6204
- Qi(e, t, n, r, i, "mc-before-waters", a, o, s);
6249
+ ia(e, t, n, r, i, "mc-before-waters", a, o, s);
6205
6250
  });
6206
6251
  }
6207
- function Qi(e, t, n, r, i, a, o, s, c) {
6252
+ function ia(e, t, n, r, i, a, o, s, c) {
6208
6253
  if (r.type === "marker") {
6209
6254
  let o = n.marker?.find((e) => e.id === r.groupId);
6210
- o && wr(e, o, a, i, t, c);
6255
+ o && Ar(e, o, a, i, t, c);
6211
6256
  } else if (r.type === "polygon") {
6212
6257
  let o = n.polygon?.find((e) => e.id === r.groupId);
6213
- o && yr(e, o, a, i, t);
6258
+ o && Tr(e, o, a, i, t);
6214
6259
  } else if (r.type === "circle") {
6215
6260
  let o = n.circle?.find((e) => e.id === r.groupId);
6216
- o && xr(e, o, a, i, t);
6261
+ o && Dr(e, o, a, i, t);
6217
6262
  } else if (r.type === "line") {
6218
6263
  let i = n.line?.find((e) => e.id === r.groupId);
6219
- i && Zr(e, i, a, t, c);
6264
+ i && ri(e, i, a, t, c);
6220
6265
  } else if (r.type === "dot") {
6221
6266
  let t = n.dot?.find((e) => e.id === r.groupId);
6222
- t && ti(e, t, a);
6267
+ t && si(e, t, a);
6223
6268
  } else if (r.type === "area") {
6224
6269
  let c = n.area?.find((e) => e.id === r.groupId);
6225
- c && ei(e, c, a, i, t, o, s);
6270
+ c && oi(e, c, a, i, t, o, s);
6226
6271
  }
6227
6272
  }
6228
6273
  //#endregion
6229
6274
  //#region src/index.bundler.ts
6230
6275
  c() || l(new URL("./mapcreator-sdk-worker.mjs",import.meta.url).href);
6231
6276
  //#endregion
6232
- export { Ui as initMap };
6277
+ export { Yi as initMap };