@arenarium/maps 1.2.22 → 1.2.23

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.
Files changed (3) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/main.js +120 -142
  3. package/package.json +1 -1
package/dist/main.css CHANGED
@@ -1 +1 @@
1
- .pin.svelte-10kxbrm{position:absolute;border-style:solid;box-sizing:border-box;transform-origin:0% 0%;transform:translate(-50%,-50%);backface-visibility:hidden;will-change:scale}.pin.svelte-10kxbrm{display:none;content-visibility:hidden}.pin.displayed.svelte-10kxbrm{display:initial;content-visibility:initial}.pin.svelte-10kxbrm{opacity:1}.pin.suppressed.svelte-10kxbrm{opacity:.5;box-shadow:none!important}.element.svelte-1no6o2a{box-sizing:border-box}.anchor.svelte-1no6o2a{display:block;position:absolute;width:0px;height:0px;transition:filter ease-in-out 125ms}.anchor.svelte-1no6o2a>.pointer:where(.svelte-1no6o2a){position:absolute;left:0;top:0;transform-origin:0% 0%}.anchor.svelte-1no6o2a>.tooltip:where(.svelte-1no6o2a){position:absolute;left:0;top:0}.anchor.svelte-1no6o2a>.tooltip:where(.svelte-1no6o2a)>.body:where(.svelte-1no6o2a){cursor:pointer}.anchor.svelte-1no6o2a{opacity:0;will-change:opacity}.anchor.svelte-1no6o2a>.pointer:where(.svelte-1no6o2a){scale:0;transform-origin:0% 0%;will-change:transform,scale}.anchor.svelte-1no6o2a>.tooltip:where(.svelte-1no6o2a){scale:0;transform-origin:0% 0%;will-change:transform,scale}.anchor.svelte-1no6o2a>.tooltip:where(.svelte-1no6o2a)>.body:where(.svelte-1no6o2a){transform-origin:0% 0%;will-change:transform}.anchor.svelte-1no6o2a{display:none;content-visibility:hidden}.anchor.displayed.svelte-1no6o2a{display:initial;content-visibility:initial}.body.svelte-1no6o2a{backface-visibility:initial;transform-style:initial}.body.svelte-1no6o2a:hover{backface-visibility:hidden;transform-style:preserve-3d}
1
+ .pin.svelte-10kxbrm{position:absolute;border-style:solid;box-sizing:border-box;transform-origin:0% 0%;transform:translate(-50%,-50%);backface-visibility:hidden;will-change:scale}.pin.svelte-10kxbrm{display:none;content-visibility:hidden}.pin.displayed.svelte-10kxbrm{display:initial;content-visibility:initial}.pin.svelte-10kxbrm{opacity:1}.pin.suppressed.svelte-10kxbrm{opacity:.5;box-shadow:none!important}.element.svelte-1no6o2a{box-sizing:border-box;transform-style:flat}.anchor.svelte-1no6o2a{display:block;position:absolute;width:0px;height:0px;transition:filter ease-in-out 125ms}.pointer.svelte-1no6o2a{position:absolute;left:0;top:0;transform-origin:0% 0%}.tooltip.svelte-1no6o2a{position:absolute;left:0;top:0}.body.svelte-1no6o2a{cursor:pointer}.anchor.svelte-1no6o2a{opacity:0;will-change:opacity}.pointer.svelte-1no6o2a,.tooltip.svelte-1no6o2a{scale:0;transform-origin:0% 0%;will-change:transform,scale}.body.svelte-1no6o2a{transform-origin:0% 0%}.anchor.svelte-1no6o2a{display:none;content-visibility:hidden}.anchor.displayed.svelte-1no6o2a{display:initial;content-visibility:initial}.body.svelte-1no6o2a{backface-visibility:initial}.body.svelte-1no6o2a:hover{backface-visibility:hidden}
package/dist/main.js CHANGED
@@ -1,42 +1,20 @@
1
1
  class Bt {
2
- endtime = 0;
3
- lifespan;
4
- paused = !1;
5
- enqueued = !1;
2
+ invoked = !1;
6
3
  interval;
7
4
  timeout;
8
5
  callback;
9
- constructor(e, n, r) {
10
- if ((n ?? 0) < 0) throw new Error("Invalid lifespan");
11
- if ((r ?? 0) < 0) throw new Error("Invalid interval");
12
- const s = navigator?.hardwareConcurrency ? 200 / navigator.hardwareConcurrency : 100;
13
- this.interval = r ?? s;
14
- const i = this.interval;
15
- this.lifespan = n ?? i, this.callback = e;
16
- }
17
- async run() {
18
- const e = performance.now();
19
- if (this.enqueued && (this.endtime = e + this.lifespan, this.enqueued = !1), this.endtime < e) {
20
- this.stop();
21
- return;
22
- }
23
- if (this.paused == !1 && await this.callback() && !this.enqueued) {
24
- this.stop();
25
- return;
26
- }
27
- this.timeout = window.setTimeout(this.run.bind(this), this.interval);
6
+ constructor(e, n) {
7
+ if ((n ?? 0) < 0) throw new Error("Invalid interval");
8
+ this.interval = n ?? (navigator?.hardwareConcurrency ? 200 / navigator.hardwareConcurrency : 100), this.callback = e;
28
9
  }
29
- start() {
30
- this.enqueued = !0, this.timeout || this.run();
10
+ async process() {
11
+ this.invoked = !1, await this.callback() || !this.invoked ? this.stop() : this.timeout = window.setTimeout(this.process.bind(this), this.interval);
31
12
  }
32
- stop() {
33
- this.timeout && window.clearTimeout(this.timeout), this.timeout = void 0;
13
+ run() {
14
+ this.invoked = !0, this.timeout || this.process();
34
15
  }
35
- pause() {
36
- this.paused = !0;
37
- }
38
- resume() {
39
- this.paused = !1;
16
+ stop() {
17
+ this.invoked = !1, this.timeout && window.clearTimeout(this.timeout), this.timeout = void 0;
40
18
  }
41
19
  }
42
20
  class gs {
@@ -57,7 +35,7 @@ class gs {
57
35
  };
58
36
  }
59
37
  }
60
- class ws {
38
+ class ys {
61
39
  callback;
62
40
  timeout;
63
41
  id;
@@ -72,7 +50,7 @@ class ws {
72
50
  this.id != null && (window.clearInterval(this.id), this.id = void 0);
73
51
  }
74
52
  }
75
- const ys = 100;
53
+ const ws = 100;
76
54
  class ks {
77
55
  viewport = void 0;
78
56
  state = "idle";
@@ -84,7 +62,7 @@ class ks {
84
62
  onIdle;
85
63
  onClick;
86
64
  constructor(e, n, r, s, i, a) {
87
- this.provider = e, this.interval = new ws(this.onInterval.bind(this), ys / (navigator?.hardwareConcurrency ?? 1)), this.onCancel = n, this.onError = r, this.onMove = s, this.onIdle = i, this.onClick = a;
65
+ this.provider = e, this.interval = new ys(this.onInterval.bind(this), ws / (navigator?.hardwareConcurrency ?? 1)), this.onCancel = n, this.onError = r, this.onMove = s, this.onIdle = i, this.onClick = a;
88
66
  }
89
67
  start() {
90
68
  this.interval.start(), this.provider.getContainer().addEventListener("click", this.onClick.bind(this));
@@ -366,7 +344,7 @@ function Ne(t) {
366
344
  function or(t) {
367
345
  var e = _;
368
346
  if (e === null)
369
- return y.f |= Me, t;
347
+ return w.f |= Me, t;
370
348
  if ((e.f & rr) === 0) {
371
349
  if ((e.f & nn) === 0)
372
350
  throw t;
@@ -825,13 +803,13 @@ class ni {
825
803
  _.b, this.is_pending = !!this.#r.pending, this.#i = gi(() => {
826
804
  _.b = this;
827
805
  {
828
- var s = this.#y();
806
+ var s = this.#w();
829
807
  try {
830
808
  this.#s = Ae(() => r(s));
831
809
  } catch (i) {
832
810
  this.error(i);
833
811
  }
834
- this.#c > 0 ? this.#w() : this.is_pending = !1;
812
+ this.#c > 0 ? this.#y() : this.is_pending = !1;
835
813
  }
836
814
  return () => {
837
815
  this.#l?.remove();
@@ -848,8 +826,8 @@ class ni {
848
826
  #M() {
849
827
  const e = this.#r.pending;
850
828
  e && (this.#e = Ae(() => e(this.#n)), Ne(() => {
851
- var n = this.#y();
852
- this.#s = this.#g(() => (Ee.ensure(), Ae(() => this.#o(n)))), this.#c > 0 ? this.#w() : (_t(
829
+ var n = this.#w();
830
+ this.#s = this.#g(() => (Ee.ensure(), Ae(() => this.#o(n)))), this.#c > 0 ? this.#y() : (_t(
853
831
  /** @type {Effect} */
854
832
  this.#e,
855
833
  () => {
@@ -858,7 +836,7 @@ class ni {
858
836
  ), this.is_pending = !1);
859
837
  }));
860
838
  }
861
- #y() {
839
+ #w() {
862
840
  var e = this.#n;
863
841
  return this.is_pending && (this.#l = kr(), this.#n.before(this.#l), e = this.#l), e;
864
842
  }
@@ -883,7 +861,7 @@ class ni {
883
861
  * @param {() => Effect | null} fn
884
862
  */
885
863
  #g(e) {
886
- var n = _, r = y, s = ie;
864
+ var n = _, r = w, s = ie;
887
865
  ce(this.#i), K(this.#i), Ze(this.#i.ctx);
888
866
  try {
889
867
  return e();
@@ -893,7 +871,7 @@ class ni {
893
871
  ce(n), K(r), Ze(s);
894
872
  }
895
873
  }
896
- #w() {
874
+ #y() {
897
875
  const e = (
898
876
  /** @type {(anchor: Node) => void} */
899
877
  this.#r.pending
@@ -956,7 +934,7 @@ class ni {
956
934
  }
957
935
  s = !0, i && Hs(), Ee.ensure(), this.#u = 0, this.#t !== null && _t(this.#t, () => {
958
936
  this.#t = null;
959
- }), this.is_pending = this.has_pending_snippet(), this.#s = this.#g(() => (this.#p = !1, Ae(() => this.#o(this.#n)))), this.#c > 0 ? this.#w() : this.is_pending = !1;
937
+ }), this.is_pending = this.has_pending_snippet(), this.#s = this.#g(() => (this.#p = !1, Ae(() => this.#o(this.#n)))), this.#c > 0 ? this.#y() : this.is_pending = !1;
960
938
  };
961
939
  Ne(() => {
962
940
  try {
@@ -1017,7 +995,7 @@ function ri(t, e, n, r) {
1017
995
  u ? u.then(f) : f();
1018
996
  }
1019
997
  function si() {
1020
- var t = _, e = y, n = ie, r = S;
998
+ var t = _, e = w, n = ie, r = S;
1021
999
  return function(i = !0) {
1022
1000
  ce(t), K(e), Ze(n), i && r?.activate();
1023
1001
  };
@@ -1027,9 +1005,9 @@ function Kt() {
1027
1005
  }
1028
1006
  // @__NO_SIDE_EFFECTS__
1029
1007
  function ii(t) {
1030
- var e = O | F, n = y !== null && (y.f & O) !== 0 ? (
1008
+ var e = O | F, n = w !== null && (w.f & O) !== 0 ? (
1031
1009
  /** @type {Derived} */
1032
- y
1010
+ w
1033
1011
  ) : null;
1034
1012
  return _ !== null && (_.f |= Ge), {
1035
1013
  ctx: ie,
@@ -1066,7 +1044,7 @@ function ai(t, e, n) {
1066
1044
  ), a = At(
1067
1045
  /** @type {V} */
1068
1046
  N
1069
- ), o = !y, l = /* @__PURE__ */ new Map();
1047
+ ), o = !w, l = /* @__PURE__ */ new Map();
1070
1048
  return vi(() => {
1071
1049
  var u = tr();
1072
1050
  i = u.promise;
@@ -1172,9 +1150,9 @@ function B(t, e) {
1172
1150
  return _i(n), n;
1173
1151
  }
1174
1152
  function W(t, e, n = !1) {
1175
- y !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
1153
+ w !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
1176
1154
  // to ensure we error if state is set inside an inspect effect
1177
- (!ne || (y.f & Cn) !== 0) && ar() && (y.f & (O | ge | rn | Cn)) !== 0 && (G === null || !He.call(G, t)) && qs();
1155
+ (!ne || (w.f & Cn) !== 0) && ar() && (w.f & (O | ge | rn | Cn)) !== 0 && (G === null || !He.call(G, t)) && qs();
1178
1156
  let r = n ? tt(e) : e;
1179
1157
  return xt(t, r);
1180
1158
  }
@@ -1232,7 +1210,7 @@ function tt(t) {
1232
1210
  var n = /* @__PURE__ */ new Map(), r = Cs(t), s = /* @__PURE__ */ B(0), i = Ce, a = (o) => {
1233
1211
  if (Ce === i)
1234
1212
  return o();
1235
- var l = y, u = Ce;
1213
+ var l = w, u = Ce;
1236
1214
  K(null), zn(i);
1237
1215
  var c = o();
1238
1216
  return K(l), zn(u), c;
@@ -1352,12 +1330,12 @@ function tt(t) {
1352
1330
  }
1353
1331
  );
1354
1332
  }
1355
- var Dn, gr, wr, yr;
1333
+ var Dn, gr, yr, wr;
1356
1334
  function ui() {
1357
1335
  if (Dn === void 0) {
1358
1336
  Dn = window, gr = /Firefox/.test(navigator.userAgent);
1359
1337
  var t = Element.prototype, e = Node.prototype, n = Text.prototype;
1360
- wr = it(e, "firstChild").get, yr = it(e, "nextSibling").get, Nn(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Nn(n) && (n.__t = void 0);
1338
+ yr = it(e, "firstChild").get, wr = it(e, "nextSibling").get, Nn(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Nn(n) && (n.__t = void 0);
1361
1339
  }
1362
1340
  }
1363
1341
  function kr(t = "") {
@@ -1367,14 +1345,14 @@ function kr(t = "") {
1367
1345
  function _r(t) {
1368
1346
  return (
1369
1347
  /** @type {TemplateNode | null} */
1370
- wr.call(t)
1348
+ yr.call(t)
1371
1349
  );
1372
1350
  }
1373
1351
  // @__NO_SIDE_EFFECTS__
1374
1352
  function cn(t) {
1375
1353
  return (
1376
1354
  /** @type {TemplateNode | null} */
1377
- yr.call(t)
1355
+ wr.call(t)
1378
1356
  );
1379
1357
  }
1380
1358
  function On(t, e) {
@@ -1388,7 +1366,7 @@ function ci(t, e = 1, n = !1) {
1388
1366
  return r;
1389
1367
  }
1390
1368
  function br(t) {
1391
- var e = y, n = _;
1369
+ var e = w, n = _;
1392
1370
  K(null), ce(null);
1393
1371
  try {
1394
1372
  return t();
@@ -1400,7 +1378,7 @@ function hi(t, e) {
1400
1378
  var n = e.last;
1401
1379
  n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
1402
1380
  }
1403
- function we(t, e, n) {
1381
+ function ye(t, e, n) {
1404
1382
  var r = _;
1405
1383
  r !== null && (r.f & _e) !== 0 && (t |= _e);
1406
1384
  var s = {
@@ -1428,28 +1406,28 @@ function we(t, e, n) {
1428
1406
  else e !== null && oe(s);
1429
1407
  var i = s;
1430
1408
  if (n && i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && // either `null`, or a singular child
1431
- (i.f & Ge) === 0 && (i = i.first, (t & ge) !== 0 && (t & Et) !== 0 && i !== null && (i.f |= Et)), i !== null && (i.parent = r, r !== null && hi(i, r), y !== null && (y.f & O) !== 0 && (t & $e) === 0)) {
1409
+ (i.f & Ge) === 0 && (i = i.first, (t & ge) !== 0 && (t & Et) !== 0 && i !== null && (i.f |= Et)), i !== null && (i.parent = r, r !== null && hi(i, r), w !== null && (w.f & O) !== 0 && (t & $e) === 0)) {
1432
1410
  var a = (
1433
1411
  /** @type {Derived} */
1434
- y
1412
+ w
1435
1413
  );
1436
1414
  (a.effects ??= []).push(i);
1437
1415
  }
1438
1416
  return s;
1439
1417
  }
1440
1418
  function hn() {
1441
- return y !== null && !ne;
1419
+ return w !== null && !ne;
1442
1420
  }
1443
1421
  function fi(t) {
1444
- const e = we(It, null, !1);
1422
+ const e = ye(It, null, !1);
1445
1423
  return P(e, D), e.teardown = t, e;
1446
1424
  }
1447
1425
  function pi(t) {
1448
- return we(Mt | Vs, t, !1);
1426
+ return ye(Mt | Vs, t, !1);
1449
1427
  }
1450
1428
  function di(t) {
1451
1429
  Ee.ensure();
1452
- const e = we($e | Ge, t, !0);
1430
+ const e = ye($e | Ge, t, !0);
1453
1431
  return (n = {}) => new Promise((r) => {
1454
1432
  n.outro ? _t(e, () => {
1455
1433
  le(e), r(void 0);
@@ -1457,30 +1435,30 @@ function di(t) {
1457
1435
  });
1458
1436
  }
1459
1437
  function mi(t) {
1460
- return we(Mt, t, !1);
1438
+ return ye(Mt, t, !1);
1461
1439
  }
1462
1440
  function vi(t) {
1463
- return we(rn | Ge, t, !0);
1441
+ return ye(rn | Ge, t, !0);
1464
1442
  }
1465
1443
  function Mr(t, e = 0) {
1466
- return we(It | e, t, !0);
1444
+ return ye(It | e, t, !0);
1467
1445
  }
1468
1446
  function Er(t, e = [], n = [], r = []) {
1469
1447
  ri(r, e, n, (s) => {
1470
- we(It, () => t(...s.map(M)), !0);
1448
+ ye(It, () => t(...s.map(M)), !0);
1471
1449
  });
1472
1450
  }
1473
1451
  function gi(t, e = 0) {
1474
- var n = we(ge | e, t, !0);
1452
+ var n = ye(ge | e, t, !0);
1475
1453
  return n;
1476
1454
  }
1477
1455
  function Ae(t) {
1478
- return we(Se | Ge, t, !0);
1456
+ return ye(Se | Ge, t, !0);
1479
1457
  }
1480
1458
  function xr(t) {
1481
1459
  var e = t.teardown;
1482
1460
  if (e !== null) {
1483
- const n = Xe, r = y;
1461
+ const n = Xe, r = w;
1484
1462
  $n(!0), K(null);
1485
1463
  try {
1486
1464
  e.call(null);
@@ -1500,7 +1478,7 @@ function Sr(t, e = !1) {
1500
1478
  (n.f & $e) !== 0 ? n.parent = null : le(n, e), n = r;
1501
1479
  }
1502
1480
  }
1503
- function wi(t) {
1481
+ function yi(t) {
1504
1482
  for (var e = t.first; e !== null; ) {
1505
1483
  var n = e.next;
1506
1484
  (e.f & Se) === 0 && le(e), e = n;
@@ -1508,7 +1486,7 @@ function wi(t) {
1508
1486
  }
1509
1487
  function le(t, e = !0) {
1510
1488
  var n = !1;
1511
- (e || (t.f & sr) !== 0) && t.nodes !== null && t.nodes.end !== null && (yi(
1489
+ (e || (t.f & sr) !== 0) && t.nodes !== null && t.nodes.end !== null && (wi(
1512
1490
  t.nodes.start,
1513
1491
  /** @type {TemplateNode} */
1514
1492
  t.nodes.end
@@ -1521,7 +1499,7 @@ function le(t, e = !0) {
1521
1499
  var s = t.parent;
1522
1500
  s !== null && s.first !== null && Pr(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
1523
1501
  }
1524
- function yi(t, e) {
1502
+ function wi(t, e) {
1525
1503
  for (; t !== null; ) {
1526
1504
  var n = t === e ? null : /* @__PURE__ */ cn(t);
1527
1505
  t.remove(), t = n;
@@ -1571,9 +1549,9 @@ let bt = !1, Xe = !1;
1571
1549
  function $n(t) {
1572
1550
  Xe = t;
1573
1551
  }
1574
- let y = null, ne = !1;
1552
+ let w = null, ne = !1;
1575
1553
  function K(t) {
1576
- y = t;
1554
+ w = t;
1577
1555
  }
1578
1556
  let _ = null;
1579
1557
  function ce(t) {
@@ -1581,7 +1559,7 @@ function ce(t) {
1581
1559
  }
1582
1560
  let G = null;
1583
1561
  function _i(t) {
1584
- y !== null && (G === null ? G = [t] : G.push(t));
1562
+ w !== null && (G === null ? G = [t] : G.push(t));
1585
1563
  }
1586
1564
  let U = null, Y = 0, X = null;
1587
1565
  function bi(t) {
@@ -1636,9 +1614,9 @@ function Nr(t, e, n = !0) {
1636
1614
  }
1637
1615
  }
1638
1616
  function Cr(t) {
1639
- var e = U, n = Y, r = X, s = y, i = G, a = ie, o = ne, l = Ce, u = t.f;
1617
+ var e = U, n = Y, r = X, s = w, i = G, a = ie, o = ne, l = Ce, u = t.f;
1640
1618
  U = /** @type {null | Value[]} */
1641
- null, Y = 0, X = null, y = (u & (Se | $e)) === 0 ? t : null, G = null, Ze(t.ctx), ne = !1, Ce = ++Te, t.ac !== null && (br(() => {
1619
+ null, Y = 0, X = null, w = (u & (Se | $e)) === 0 ? t : null, G = null, Ze(t.ctx), ne = !1, Ce = ++Te, t.ac !== null && (br(() => {
1642
1620
  t.ac.abort(Ve);
1643
1621
  }), t.ac = null);
1644
1622
  try {
@@ -1680,7 +1658,7 @@ function Cr(t) {
1680
1658
  } catch (v) {
1681
1659
  return or(v);
1682
1660
  } finally {
1683
- t.f ^= Jt, U = e, Y = n, X = r, y = s, G = i, Ze(a), ne = o, Ce = l;
1661
+ t.f ^= Jt, U = e, Y = n, X = r, w = s, G = i, Ze(a), ne = o, Ce = l;
1684
1662
  }
1685
1663
  }
1686
1664
  function Mi(t, e) {
@@ -1716,7 +1694,7 @@ function lt(t) {
1716
1694
  var n = _, r = bt;
1717
1695
  _ = t, bt = !0;
1718
1696
  try {
1719
- (e & (ge | nr)) !== 0 ? wi(t) : Sr(t), xr(t);
1697
+ (e & (ge | nr)) !== 0 ? yi(t) : Sr(t), xr(t);
1720
1698
  var s = Cr(t);
1721
1699
  t.teardown = typeof s == "function" ? s : null, t.wv = Ar;
1722
1700
  var i;
@@ -1728,16 +1706,16 @@ function lt(t) {
1728
1706
  }
1729
1707
  function M(t) {
1730
1708
  var e = t.f, n = (e & O) !== 0;
1731
- if (y !== null && !ne) {
1709
+ if (w !== null && !ne) {
1732
1710
  var r = _ !== null && (_.f & be) !== 0;
1733
1711
  if (!r && (G === null || !He.call(G, t))) {
1734
- var s = y.deps;
1735
- if ((y.f & Jt) !== 0)
1712
+ var s = w.deps;
1713
+ if ((w.f & Jt) !== 0)
1736
1714
  t.rv < Te && (t.rv = Te, U === null && s !== null && s[Y] === t ? Y++ : U === null ? U = [t] : U.push(t));
1737
1715
  else {
1738
- (y.deps ??= []).push(t);
1716
+ (w.deps ??= []).push(t);
1739
1717
  var i = t.reactions;
1740
- i === null ? t.reactions = [y] : He.call(i, y) || i.push(y);
1718
+ i === null ? t.reactions = [w] : He.call(i, w) || i.push(w);
1741
1719
  }
1742
1720
  }
1743
1721
  }
@@ -1752,7 +1730,7 @@ function M(t) {
1752
1730
  var o = a.v;
1753
1731
  return ((a.f & D) === 0 && a.reactions !== null || Dr(a)) && (o = un(a)), xe.set(a, o), o;
1754
1732
  }
1755
- var l = (a.f & J) === 0 && !ne && y !== null && (bt || (y.f & J) !== 0), u = a.deps === null;
1733
+ var l = (a.f & J) === 0 && !ne && w !== null && (bt || (w.f & J) !== 0), u = a.deps === null;
1756
1734
  ht(a) && (l && (a.f |= J), dr(a)), l && !u && Rr(a);
1757
1735
  }
1758
1736
  if (te?.has(t))
@@ -1826,7 +1804,7 @@ function gt(t) {
1826
1804
  return i || n;
1827
1805
  }
1828
1806
  });
1829
- var c = y, f = _;
1807
+ var c = w, f = _;
1830
1808
  K(null), ce(null);
1831
1809
  try {
1832
1810
  for (var h, m = []; i !== null; ) {
@@ -2049,15 +2027,15 @@ function jr(t) {
2049
2027
  return -0.5 * (Math.cos(Math.PI * t) - 1);
2050
2028
  }
2051
2029
  class Br {
2052
- animationEasing;
2053
- animationRun;
2054
2030
  animating;
2031
+ animationEasing;
2032
+ animationCallback;
2055
2033
  value;
2056
2034
  time;
2057
2035
  constructor(e) {
2058
2036
  if (e.max <= e.min) throw new Error("Invalid min or max");
2059
2037
  if (e.value < e.min || e.max < e.value) throw new Error("Invalid value");
2060
- this.animationEasing = e.easing, this.animationRun = e.callback, this.animating = !1, this.value = { current: e.value, start: e.value, end: e.value, min: e.min, max: e.max }, this.time = { start: 0, end: 0, span: e.timespan };
2038
+ this.animationEasing = e.easing, this.animationCallback = e.callback, this.animating = !1, this.value = { current: e.value, start: e.value, end: e.value, min: e.min, max: e.max }, this.time = { start: 0, end: 0, span: e.timespan };
2061
2039
  }
2062
2040
  animationFrame() {
2063
2041
  const e = performance.now();
@@ -2067,7 +2045,7 @@ class Br {
2067
2045
  const n = (e - this.time.start) / (this.time.end - this.time.start), r = this.animationEasing(n);
2068
2046
  this.value.current = this.value.start + (this.value.end - this.value.start) * r;
2069
2047
  }
2070
- if (this.animationRun(this.value.current), this.value.current === this.value.end) {
2048
+ if (this.animationCallback(this.value.current), this.value.current === this.value.end) {
2071
2049
  this.animating = !1;
2072
2050
  return;
2073
2051
  }
@@ -2083,7 +2061,7 @@ class Br {
2083
2061
  if (e === this.value.end) return;
2084
2062
  this.value.current = e, this.value.start = e, this.value.end = e;
2085
2063
  const n = performance.now();
2086
- this.time.start = n, this.time.end = n, window.requestAnimationFrame(this.animationRun.bind(this, e));
2064
+ this.time.start = n, this.time.end = n, window.requestAnimationFrame(this.animationCallback.bind(this, e));
2087
2065
  }
2088
2066
  end() {
2089
2067
  this.set(this.value.end);
@@ -2100,7 +2078,7 @@ function $i(t, e) {
2100
2078
  getDisplayed: ze,
2101
2079
  setSuppressed: Ie,
2102
2080
  setCollapsed: fe,
2103
- getCollapsed: ye,
2081
+ getCollapsed: we,
2104
2082
  setScale: Ke
2105
2083
  };
2106
2084
  function a() {
@@ -2131,7 +2109,7 @@ function $i(t, e) {
2131
2109
  function fe(k) {
2132
2110
  k != M(j) && (W(j, k, !0), Z.target(M(j) ? 0 : Q));
2133
2111
  }
2134
- function ye() {
2112
+ function we() {
2135
2113
  return M(v) ? Z.expired() : !0;
2136
2114
  }
2137
2115
  let Q = Fe, Z = new Br({
@@ -2283,26 +2261,26 @@ function Ur(t, e) {
2283
2261
  function a() {
2284
2262
  return i;
2285
2263
  }
2286
- let o, l = r.colors?.shadow ?? er, u, c = Math.min(r.dimensions.width, r.dimensions.height) / Math.SQRT2 - r.dimensions.margin, f = r.colors?.background ?? Yt, h = Math.max(1, r.dimensions.radius / c), m, p = r.dimensions.width + 2 * r.dimensions.margin, v = r.dimensions.height + 2 * r.dimensions.margin, x = r.dimensions.margin, H, he = r.dimensions.width, ze = r.dimensions.height, Pe = r.dimensions.radius, Ie = r.colors?.background ?? Yt, j = /* @__PURE__ */ B(!1), fe = !1, ye = !1;
2287
- function Q(w) {
2288
- if (w != M(j)) {
2289
- if (W(j, w, !0), w) {
2290
- if (s == null || ye || fe) return;
2264
+ let o, l = r.colors?.shadow ?? er, u, c = Math.min(r.dimensions.width, r.dimensions.height) / Math.SQRT2 - r.dimensions.margin, f = r.colors?.background ?? Yt, h = Math.max(1, r.dimensions.radius / c), m, p = r.dimensions.width + 2 * r.dimensions.margin, v = r.dimensions.height + 2 * r.dimensions.margin, x = r.dimensions.margin, H, he = r.dimensions.width, ze = r.dimensions.height, Pe = r.dimensions.radius, Ie = r.colors?.background ?? Yt, j = /* @__PURE__ */ B(!1), fe = !1, we = !1;
2265
+ function Q(y) {
2266
+ if (y != M(j)) {
2267
+ if (W(j, y, !0), y) {
2268
+ if (s == null || we || fe) return;
2291
2269
  fe = !0, s(n).then((de) => {
2292
2270
  de instanceof HTMLElement ? H.appendChild(de) : console.error("Failed to load tooltip content");
2293
2271
  }).catch((de) => console.error(de)).finally(() => {
2294
- ye = !0, fe = !1;
2272
+ we = !0, fe = !1;
2295
2273
  });
2296
2274
  }
2297
- w == !1 && (pe.end(), Rt.end(), Dt.end());
2275
+ y == !1 && (pe.end(), Rt.end(), Dt.end());
2298
2276
  }
2299
2277
  }
2300
2278
  function Z() {
2301
2279
  return M(j);
2302
2280
  }
2303
2281
  let Ke = /* @__PURE__ */ B(!0);
2304
- function Nt(w) {
2305
- w != M(Ke) && (W(Ke, w, !0), pe.target(M(Ke) ? 0 : 1));
2282
+ function Nt(y) {
2283
+ y != M(Ke) && (W(Ke, y, !0), pe.target(M(Ke) ? 0 : 1));
2306
2284
  }
2307
2285
  function pt() {
2308
2286
  return M(j) ? pe.expired() : !0;
@@ -2318,8 +2296,8 @@ function Ur(t, e) {
2318
2296
  easing: jr,
2319
2297
  callback: dt
2320
2298
  });
2321
- function dt(w) {
2322
- o.style.opacity = `${w}`, m.style.scale = `${w}`, u.style.scale = `${w}`;
2299
+ function dt(y) {
2300
+ o.style.opacity = `${y}`, m.style.scale = `${y}`, u.style.scale = `${y}`;
2323
2301
  }
2324
2302
  let k = NaN, ke = /* @__PURE__ */ B(!1), vn = -p / 2, Rt = new Bn({
2325
2303
  value: -p / 2,
@@ -2336,45 +2314,45 @@ function Ur(t, e) {
2336
2314
  stiffness: In,
2337
2315
  callback: cs
2338
2316
  });
2339
- function ls(w, de) {
2340
- if (Number.isNaN(w)) {
2317
+ function ls(y, de) {
2318
+ if (Number.isNaN(y)) {
2341
2319
  k = NaN, W(ke, !1);
2342
2320
  return;
2343
2321
  }
2344
2322
  if (M(ke) == !1 || de == !0) {
2345
- W(ke, !0), k = w;
2346
- const me = en(p, v, w);
2323
+ W(ke, !0), k = y;
2324
+ const me = en(p, v, y);
2347
2325
  Rt.set(Math.round(me.x)), Dt.set(Math.round(me.y));
2348
2326
  return;
2349
2327
  }
2350
- if (k != w) {
2351
- k = w;
2352
- const me = en(p, v, w);
2328
+ if (k != y) {
2329
+ k = y;
2330
+ const me = en(p, v, y);
2353
2331
  Rt.target(Math.round(me.x)), Dt.target(Math.round(me.y));
2354
2332
  return;
2355
2333
  }
2356
2334
  }
2357
- function us(w) {
2358
- vn = w, wn();
2335
+ function us(y) {
2336
+ vn = y, yn();
2359
2337
  }
2360
- function cs(w) {
2361
- gn = w, wn();
2338
+ function cs(y) {
2339
+ gn = y, yn();
2362
2340
  }
2363
- function wn() {
2364
- const w = vn, de = gn, me = w + p / 2, zt = de + v / 2, Ft = v < p ? me * v / p : me, Lt = v > p ? zt * p / v : zt, fs = Math.atan2(Lt, Ft) / Math.PI * 180 - 45, Vt = Math.sqrt(Ft * Ft + Lt * Lt), et = Math.min(p, v) / 2, ps = et * Math.SQRT2, jt = (Vt - et) / (ps - et), En = 0, xn = En + jt * (22.5 - En), ds = Vt < et ? Vt / et : 1, ms = -x * (me / p) * jt, vs = -x * (zt / v) * jt;
2365
- m.style.transform = `translate(${Math.round(w)}px, ${Math.round(de)}px)`, u.style.transform = `scale(${ds}) rotate(${fs}deg) skew(${xn}deg, ${xn}deg)`, H.style.transform = `translate(${ms}px, ${vs}px)`;
2341
+ function yn() {
2342
+ const y = vn, de = gn, me = y + p / 2, zt = de + v / 2, Ft = v < p ? me * v / p : me, Lt = v > p ? zt * p / v : zt, fs = Math.atan2(Lt, Ft) / Math.PI * 180 - 45, Vt = Math.sqrt(Ft * Ft + Lt * Lt), et = Math.min(p, v) / 2, ps = et * Math.SQRT2, jt = (Vt - et) / (ps - et), En = 0, xn = En + jt * (22.5 - En), ds = Vt < et ? Vt / et : 1, ms = -x * (me / p) * jt, vs = -x * (zt / v) * jt;
2343
+ m.style.transform = `translate(${Math.round(y)}px, ${Math.round(de)}px)`, u.style.transform = `scale(${ds}) rotate(${fs}deg) skew(${xn}deg, ${xn}deg)`, H.style.transform = `translate(${Math.round(ms)}px, ${Math.round(vs)}px)`;
2366
2344
  }
2367
2345
  var hs = { invoke: a }, Qe = Fi();
2368
- let yn;
2346
+ let wn;
2369
2347
  var Ot = On(Qe);
2370
2348
  let kn;
2371
- rt(Ot, (w) => u = w, () => u);
2349
+ rt(Ot, (y) => u = y, () => u);
2372
2350
  var $t = ci(Ot, 2);
2373
2351
  let _n;
2374
2352
  var bn = On($t);
2375
2353
  let Mn;
2376
- return rt(bn, (w) => H = w, () => H), rt($t, (w) => m = w, () => m), rt(Qe, (w) => o = w, () => o), Er(() => {
2377
- Vr(Qe, 1, Lr(["element anchor", M(j) && "displayed"]), "svelte-1no6o2a"), yn = nt(Qe, "", yn, { filter: `drop-shadow(${l})` }), kn = nt(Ot, "", kn, {
2354
+ return rt(bn, (y) => H = y, () => H), rt($t, (y) => m = y, () => m), rt(Qe, (y) => o = y, () => o), Er(() => {
2355
+ Vr(Qe, 1, Lr(["element anchor", M(j) && "displayed"]), "svelte-1no6o2a"), wn = nt(Qe, "", wn, { filter: `drop-shadow(${l})` }), kn = nt(Ot, "", kn, {
2378
2356
  width: `${c}px`,
2379
2357
  height: `${c}px`,
2380
2358
  "background-color": f,
@@ -2544,11 +2522,11 @@ class qi {
2544
2522
  }
2545
2523
  show(e, n) {
2546
2524
  if (!e.popup || !e.tooltip || !e.pin || (e.pin.shown = !1, e.tooltip.shown = !1, e.popup.angle = e.tooltip.angle, e.popup.shown = !0, this.pan == !1)) return;
2547
- const r = e.popup, s = n.getViewport(), i = s.bounds, a = s.zoom, l = n.getParameters().mapSize * Math.pow(2, a), u = st(i.ne.lat, i.sw.lng, l), c = st(i.sw.lat, i.ne.lng, l), f = c.x - u.x, h = c.y - u.y, m = r.width + r.margin * 8, p = r.height + r.margin * 8, v = st(r.lat, r.lng, l), x = en(m, p, e.tooltip.angle), H = v.x + x.x, he = H + m, ze = v.y + x.y, Pe = ze + p, Ie = H - u.x, j = c.x - he, fe = ze - u.y, ye = c.y - Pe;
2525
+ const r = e.popup, s = n.getViewport(), i = s.bounds, a = s.zoom, l = n.getParameters().mapSize * Math.pow(2, a), u = st(i.ne.lat, i.sw.lng, l), c = st(i.sw.lat, i.ne.lng, l), f = c.x - u.x, h = c.y - u.y, m = r.width + r.margin * 8, p = r.height + r.margin * 8, v = st(r.lat, r.lng, l), x = en(m, p, e.tooltip.angle), H = v.x + x.x, he = H + m, ze = v.y + x.y, Pe = ze + p, Ie = H - u.x, j = c.x - he, fe = ze - u.y, we = c.y - Pe;
2548
2526
  let Q = 0;
2549
2527
  f < m ? Q = (Ie - j) / 2 : (Ie < 0 && (Q = Ie), j < 0 && (Q = -j));
2550
2528
  let Z = 0;
2551
- h < p ? Z = (fe - ye) / 2 : (fe < 0 && (Z = fe), ye < 0 && (Z = -ye)), (Q != 0 || Z != 0) && n.panBy(Q, Z);
2529
+ h < p ? Z = (fe - we) / 2 : (fe < 0 && (Z = fe), we < 0 && (Z = -we)), (Q != 0 || Z != 0) && n.panBy(Q, Z);
2552
2530
  }
2553
2531
  hide(e) {
2554
2532
  !e.popup || !e.tooltip || !e.pin || (e.pin.shown = !0, e.tooltip.shown = !0, e.popup.shown = !1);
@@ -2720,7 +2698,7 @@ function ta(t, e, n, r, s, i) {
2720
2698
  const a = s;
2721
2699
  return s = d(s + e), s = d(s + n), i = d(i + T(s, 44)), { first: d(s + r), second: d(i + a) };
2722
2700
  }
2723
- function wt(t, e, n, r) {
2701
+ function yt(t, e, n, r) {
2724
2702
  return ta(b(t, e), b(t, e + 8), b(t, e + 16), b(t, e + 24), n, r);
2725
2703
  }
2726
2704
  function na(t) {
@@ -2742,11 +2720,11 @@ function ra(t) {
2742
2720
  return n <= 16 ? Qi(e) : ea(e);
2743
2721
  if (n <= 64)
2744
2722
  return na(e);
2745
- let r = b(e), s = d(b(e, n - 16) ^ ae), i = d(b(e, n - 56) ^ Ue), a = wt(e, n - 64, BigInt(n), s), o = wt(e, n - 32, d(BigInt(n) * ae), Ue);
2723
+ let r = b(e), s = d(b(e, n - 16) ^ ae), i = d(b(e, n - 56) ^ Ue), a = yt(e, n - 64, BigInt(n), s), o = yt(e, n - 32, d(BigInt(n) * ae), Ue);
2746
2724
  i = d(i + ut(a.second) * ae), r = d(T(d(i + r), 39) * ae), s = d(T(s, 33) * ae);
2747
2725
  let l = n - 1 & -64, u = 0;
2748
2726
  for (; l > 0; )
2749
- r = d(T(d(r + s + a.first + b(e, u + 16)), 37) * ae), s = d(T(d(s + a.second + b(e, u + 48)), 42) * ae), r ^= o.second, s ^= a.first, i = T(i ^ o.first, 33), a = wt(e, u, d(a.second * ae), d(r + o.first)), o = wt(e, u + 32, d(i + o.second), s), [i, r] = [r, i], u += 64, l -= 64;
2727
+ r = d(T(d(r + s + a.first + b(e, u + 16)), 37) * ae), s = d(T(d(s + a.second + b(e, u + 48)), 42) * ae), r ^= o.second, s ^= a.first, i = T(i ^ o.first, 33), a = yt(e, u, d(a.second * ae), d(r + o.first)), o = yt(e, u + 32, d(i + o.second), s), [i, r] = [r, i], u += 64, l -= 64;
2750
2728
  return qe(qe(a.first, o.first) + d(ut(s) * ae) + i, qe(a.second, o.second) + r);
2751
2729
  }
2752
2730
  function sa(t) {
@@ -3309,7 +3287,7 @@ function De(t) {
3309
3287
  }
3310
3288
  };
3311
3289
  }
3312
- function yt(t, e, n) {
3290
+ function wt(t, e, n) {
3313
3291
  const r = t["~run"]({ value: e }, /* @__PURE__ */ Yr(n));
3314
3292
  if (r.issues) throw new Tt(r.issues);
3315
3293
  return r.value;
@@ -3355,7 +3333,7 @@ function pa(...t) {
3355
3333
  }
3356
3334
  };
3357
3335
  }
3358
- var da = /* @__PURE__ */ g(/* @__PURE__ */ ue(), /* @__PURE__ */ Gr(32)), ma = /* @__PURE__ */ g(/* @__PURE__ */ ue(), /* @__PURE__ */ dn(1)), ss = /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(-90), /* @__PURE__ */ ct(90)), is = /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(-180), /* @__PURE__ */ ct(180)), Pt = /* @__PURE__ */ R({ lat: ss, lng: is }), as = /* @__PURE__ */ R({ sw: Pt, ne: Pt }), va = /* @__PURE__ */ R({ bounds: as, center: Pt, zoom: /* @__PURE__ */ E() }), tn = /* @__PURE__ */ ns((t) => t instanceof HTMLElement, "Must be an HTMLElement"), ga = /* @__PURE__ */ R({ mapSize: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(1)), zoomMin: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), zoomMax: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), zoomScale: /* @__PURE__ */ mn([/* @__PURE__ */ Re(1), /* @__PURE__ */ Re(2), /* @__PURE__ */ Re(10)]) }), wa = /* @__PURE__ */ R({ inserted: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(/* @__PURE__ */ ts())), insert: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(/* @__PURE__ */ De())), remove: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(/* @__PURE__ */ De())), update: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([/* @__PURE__ */ E()])), /* @__PURE__ */ L(/* @__PURE__ */ De())) }), Hn = /* @__PURE__ */ mn([/* @__PURE__ */ Re("idle"), /* @__PURE__ */ Re("move"), /* @__PURE__ */ Re("click")]), ya = /* @__PURE__ */ R({ getParameters: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(ga)), getContainer: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(tn)), getZoom: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(/* @__PURE__ */ E())), getBounds: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(as)), getCenter: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(Pt)), getViewport: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(va)), panBy: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([/* @__PURE__ */ E(), /* @__PURE__ */ E()])), /* @__PURE__ */ L(/* @__PURE__ */ De())), createMarker: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([tn, ss, is, /* @__PURE__ */ E()])), /* @__PURE__ */ L(wa)), subscribe: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([Hn, /* @__PURE__ */ A()])), /* @__PURE__ */ L(/* @__PURE__ */ De())), unsubscribe: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([Hn, /* @__PURE__ */ A()])), /* @__PURE__ */ L(/* @__PURE__ */ De())) }), Zt = /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([/* @__PURE__ */ ue()])), /* @__PURE__ */ Kr(/* @__PURE__ */ pa(/* @__PURE__ */ rs(), /* @__PURE__ */ Xr(), tn))), ka = /* @__PURE__ */ R({ dimensions: /* @__PURE__ */ R({ width: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), height: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), padding: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), radius: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)) }), colors: /* @__PURE__ */ re(/* @__PURE__ */ R({ background: /* @__PURE__ */ re(/* @__PURE__ */ ue()), border: /* @__PURE__ */ re(/* @__PURE__ */ ue()), shadow: /* @__PURE__ */ re(/* @__PURE__ */ ue()) })) }), Zn = /* @__PURE__ */ R({ dimensions: /* @__PURE__ */ g(/* @__PURE__ */ R({ width: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), height: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), margin: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), radius: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)) }), /* @__PURE__ */ Jr((t) => Math.min(t.width, t.height) / t.margin >= 4, "Minimum of width or height must be greater than or equal to 4 * margin")), colors: /* @__PURE__ */ re(/* @__PURE__ */ R({ background: /* @__PURE__ */ re(/* @__PURE__ */ ue()), shadow: /* @__PURE__ */ re(/* @__PURE__ */ ue()) })) }), _a = /* @__PURE__ */ R({ id: /* @__PURE__ */ g(/* @__PURE__ */ ue(), /* @__PURE__ */ dn(1)), rank: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), lat: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(-90), /* @__PURE__ */ ct(90)), lng: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(-180), /* @__PURE__ */ ct(180)), tooltip: /* @__PURE__ */ R({ style: Zn, body: Zt }), pin: /* @__PURE__ */ re(/* @__PURE__ */ R({ style: ka, body: /* @__PURE__ */ re(Zt) })), popup: /* @__PURE__ */ re(/* @__PURE__ */ R({ style: Zn, body: Zt })) });
3336
+ var da = /* @__PURE__ */ g(/* @__PURE__ */ ue(), /* @__PURE__ */ Gr(32)), ma = /* @__PURE__ */ g(/* @__PURE__ */ ue(), /* @__PURE__ */ dn(1)), ss = /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(-90), /* @__PURE__ */ ct(90)), is = /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(-180), /* @__PURE__ */ ct(180)), Pt = /* @__PURE__ */ R({ lat: ss, lng: is }), as = /* @__PURE__ */ R({ sw: Pt, ne: Pt }), va = /* @__PURE__ */ R({ bounds: as, center: Pt, zoom: /* @__PURE__ */ E() }), tn = /* @__PURE__ */ ns((t) => t instanceof HTMLElement, "Must be an HTMLElement"), ga = /* @__PURE__ */ R({ mapSize: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(1)), zoomMin: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), zoomMax: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), zoomScale: /* @__PURE__ */ mn([/* @__PURE__ */ Re(1), /* @__PURE__ */ Re(2), /* @__PURE__ */ Re(10)]) }), ya = /* @__PURE__ */ R({ inserted: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(/* @__PURE__ */ ts())), insert: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(/* @__PURE__ */ De())), remove: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(/* @__PURE__ */ De())), update: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([/* @__PURE__ */ E()])), /* @__PURE__ */ L(/* @__PURE__ */ De())) }), Hn = /* @__PURE__ */ mn([/* @__PURE__ */ Re("idle"), /* @__PURE__ */ Re("move"), /* @__PURE__ */ Re("click")]), wa = /* @__PURE__ */ R({ getParameters: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(ga)), getContainer: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(tn)), getZoom: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(/* @__PURE__ */ E())), getBounds: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(as)), getCenter: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(Pt)), getViewport: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(va)), panBy: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([/* @__PURE__ */ E(), /* @__PURE__ */ E()])), /* @__PURE__ */ L(/* @__PURE__ */ De())), createMarker: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([tn, ss, is, /* @__PURE__ */ E()])), /* @__PURE__ */ L(ya)), subscribe: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([Hn, /* @__PURE__ */ A()])), /* @__PURE__ */ L(/* @__PURE__ */ De())), unsubscribe: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([Hn, /* @__PURE__ */ A()])), /* @__PURE__ */ L(/* @__PURE__ */ De())) }), Zt = /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([/* @__PURE__ */ ue()])), /* @__PURE__ */ Kr(/* @__PURE__ */ pa(/* @__PURE__ */ rs(), /* @__PURE__ */ Xr(), tn))), ka = /* @__PURE__ */ R({ dimensions: /* @__PURE__ */ R({ width: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), height: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), padding: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), radius: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)) }), colors: /* @__PURE__ */ re(/* @__PURE__ */ R({ background: /* @__PURE__ */ re(/* @__PURE__ */ ue()), border: /* @__PURE__ */ re(/* @__PURE__ */ ue()), shadow: /* @__PURE__ */ re(/* @__PURE__ */ ue()) })) }), Zn = /* @__PURE__ */ R({ dimensions: /* @__PURE__ */ g(/* @__PURE__ */ R({ width: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), height: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), margin: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), radius: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)) }), /* @__PURE__ */ Jr((t) => Math.min(t.width, t.height) / t.margin >= 4, "Minimum of width or height must be greater than or equal to 4 * margin")), colors: /* @__PURE__ */ re(/* @__PURE__ */ R({ background: /* @__PURE__ */ re(/* @__PURE__ */ ue()), shadow: /* @__PURE__ */ re(/* @__PURE__ */ ue()) })) }), _a = /* @__PURE__ */ R({ id: /* @__PURE__ */ g(/* @__PURE__ */ ue(), /* @__PURE__ */ dn(1)), rank: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), lat: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(-90), /* @__PURE__ */ ct(90)), lng: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(-180), /* @__PURE__ */ ct(180)), tooltip: /* @__PURE__ */ R({ style: Zn, body: Zt }), pin: /* @__PURE__ */ re(/* @__PURE__ */ R({ style: ka, body: /* @__PURE__ */ re(Zt) })), popup: /* @__PURE__ */ re(/* @__PURE__ */ R({ style: Zn, body: Zt })) });
3359
3337
  class ba {
3360
3338
  apiKey;
3361
3339
  apiJwt;
@@ -3397,7 +3375,7 @@ class ba {
3397
3375
  return s.jwt && (this.apiJwt = s.jwt), s.states;
3398
3376
  }
3399
3377
  }
3400
- const Yn = "1.2.21", Ma = "https://maps.api.arenarium.dev/auth", Ea = "https://maps.api.arenarium.dev/log", Xn = 500;
3378
+ const Yn = "1.2.22", Ma = "https://maps.api.arenarium.dev/auth", Ea = "https://maps.api.arenarium.dev/log", Xn = 500;
3401
3379
  class os {
3402
3380
  apiKey;
3403
3381
  mapProvider;
@@ -3412,14 +3390,14 @@ class os {
3412
3390
  markerStatesProcessDelay = Xn;
3413
3391
  markerStatesProcessTimeout = void 0;
3414
3392
  constructor(e, n, r, s) {
3415
- yt(da, e), yt(ma, n), yt(ya, r), this.apiKey = e, this.mapProvider = r, this.mapStateProvider = new ks(
3393
+ wt(da, e), wt(ma, n), wt(wa, r), this.apiKey = e, this.mapProvider = r, this.mapStateProvider = new ks(
3416
3394
  this.mapProvider,
3417
3395
  this.detached.bind(this),
3418
3396
  this.error.bind(this),
3419
3397
  this.onMapMove.bind(this),
3420
3398
  this.onMapIdle.bind(this),
3421
3399
  this.onMapClick.bind(this)
3422
- ), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new Ns(this.mapProvider), this.markerElementsManager = new Hi(this.mapProvider), this.markerStatesManager = new ba(e, n), this.markerVisibilityProcessor = new Bt(this.onMarkersVisiblityProcess.bind(this), 0), this.markerElementsProcessor = new Bt(this.onMarkersRenderProcess.bind(this), 0), this.markerStateProcessor = new Bt(this.onMarkersStateProcess.bind(this), 0), this.configuration = s;
3400
+ ), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new Ns(this.mapProvider), this.markerElementsManager = new Hi(this.mapProvider), this.markerStatesManager = new ba(e, n), this.markerVisibilityProcessor = new Bt(this.onMarkersVisiblityProcess.bind(this)), this.markerElementsProcessor = new Bt(this.onMarkersRenderProcess.bind(this)), this.markerStateProcessor = new Bt(this.onMarkersStateProcess.bind(this)), this.configuration = s;
3423
3401
  }
3424
3402
  //#region Core
3425
3403
  static async create(e, n, r) {
@@ -3473,11 +3451,11 @@ class os {
3473
3451
  //#endregion
3474
3452
  //#region Events
3475
3453
  onMapMove() {
3476
- this.markerVisibilityProcessor.start();
3454
+ this.markerVisibilityProcessor.run();
3477
3455
  }
3478
3456
  onMapIdle() {
3479
- this.markerStatesProcessTimeout ? window.clearTimeout(this.markerStatesProcessTimeout) : this.markerStateProcessor.start(), this.markerStatesProcessTimeout = window.setTimeout(() => {
3480
- this.markerStateProcessor.start();
3457
+ this.markerStatesProcessTimeout ? window.clearTimeout(this.markerStatesProcessTimeout) : this.markerStateProcessor.run(), this.markerStatesProcessTimeout = window.setTimeout(() => {
3458
+ this.markerStateProcessor.run();
3481
3459
  }, this.markerStatesProcessDelay);
3482
3460
  }
3483
3461
  onMapClick() {
@@ -3490,7 +3468,7 @@ class os {
3490
3468
  try {
3491
3469
  if (this.detached()) return !0;
3492
3470
  const e = this.mapProvider.getParameters(), n = this.mapProvider.getViewport(), r = await this.markerVisibilityManager.getMarkersDelta(e, n);
3493
- return this.markerStatesManager.resetStates(r.remove), this.markerElementsManager.removeElements(r.remove), this.markerElementsManager.insertElements(r.insert, this.onMapMarkerClick.bind(this)), this.markerElementsProcessor.start(), this.mapStateProvider.idle() && this.onMapIdle(), !1;
3471
+ return this.markerStatesManager.resetStates(r.remove), this.markerElementsManager.removeElements(r.remove), this.markerElementsManager.insertElements(r.insert, this.onMapMarkerClick.bind(this)), this.markerElementsProcessor.run(), this.mapStateProvider.idle() && this.onMapIdle(), !1;
3494
3472
  } catch (e) {
3495
3473
  return this.clear(), this.error("Process markers visibility error", e), !0;
3496
3474
  }
@@ -3499,7 +3477,7 @@ class os {
3499
3477
  try {
3500
3478
  if (this.detached()) return !0;
3501
3479
  const e = this.mapProvider.getParameters(), n = this.markerVisibilityManager.getMarkers();
3502
- return await this.markerStatesManager.updateStates(n, e), this.markerElementsManager.updateElements(n), this.markerElementsProcessor.start(), !1;
3480
+ return await this.markerStatesManager.updateStates(n, e), this.markerElementsManager.updateElements(n), this.markerElementsProcessor.run(), !1;
3503
3481
  } catch (e) {
3504
3482
  return this.clear(), this.error("Process markers state error", e), !0;
3505
3483
  }
@@ -3516,13 +3494,13 @@ class os {
3516
3494
  //#endregion
3517
3495
  //#region Public
3518
3496
  async updateMarkers(e) {
3519
- yt(/* @__PURE__ */ es(_a), e);
3497
+ wt(/* @__PURE__ */ es(_a), e);
3520
3498
  try {
3521
3499
  const n = this.mapProvider.getParameters();
3522
3500
  for (const s of e)
3523
3501
  this.markers.has(s.id) == !1 && this.markers.set(s.id, new gs(s));
3524
3502
  const r = Array.from(this.markers.values());
3525
- r.sort((s, i) => i.data.rank - s.data.rank), await this.markerVisibilityManager.updateMarkers(n, r), this.mapStateProvider.start(), this.markerVisibilityProcessor.start(), this.markerStateProcessor.start(), this.markerElementsProcessor.start();
3503
+ r.sort((s, i) => i.data.rank - s.data.rank), await this.markerVisibilityManager.updateMarkers(n, r), this.mapStateProvider.start(), this.markerVisibilityProcessor.run(), this.markerStateProcessor.run(), this.markerElementsProcessor.run();
3526
3504
  } catch (n) {
3527
3505
  throw this.clear(), this.error("Failed to update markers", n), n;
3528
3506
  }
@@ -3541,7 +3519,7 @@ class os {
3541
3519
  } catch (n) {
3542
3520
  throw this.markerElementsManager.hidePopups(), this.error("Failed to show popup", n), n;
3543
3521
  } finally {
3544
- this.markerElementsProcessor.start();
3522
+ this.markerElementsProcessor.run();
3545
3523
  }
3546
3524
  }
3547
3525
  hidePopup() {
@@ -3551,7 +3529,7 @@ class os {
3551
3529
  } catch (e) {
3552
3530
  throw this.error("Failed to hide popup", e), e;
3553
3531
  } finally {
3554
- this.markerElementsProcessor.start();
3532
+ this.markerElementsProcessor.run();
3555
3533
  }
3556
3534
  }
3557
3535
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arenarium/maps",
3
- "version": "1.2.22",
3
+ "version": "1.2.23",
4
4
  "license": "MIT",
5
5
  "author": "arenarium",
6
6
  "description": "Visualize complex map markers clearly. A JavaScript library for effective display of map markers, compatible with MapLibre, Mapbox, and Google Maps.",