@mappedin/viewer 0.52.1-e4b38e0.0 → 0.52.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.52.1](https://github.com/MappedIn/viewer/compare/viewer-v0.52.0...viewer-v0.52.1) (2025-08-14)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **SRV-2806:** darkroast success color is too dark ([#592](https://github.com/MappedIn/viewer/issues/592)) ([a3863bc](https://github.com/MappedIn/viewer/commit/a3863bc70f2b1b73634cd5ee04a93571499e3522))
9
+ * **SRV-2816:** support hiding watermark ([#594](https://github.com/MappedIn/viewer/issues/594)) ([49ee7fb](https://github.com/MappedIn/viewer/commit/49ee7fb353b2c64dfd35bb71ed63e8fb7219c638))
10
+ * **SRV-2818:** prevent empty maps from throwing ([#595](https://github.com/MappedIn/viewer/issues/595)) ([5e3acc1](https://github.com/MappedIn/viewer/commit/5e3acc1ef4d3f90245f395e07606e405f6e3eab4))
11
+
3
12
  ## [0.52.0](https://github.com/MappedIn/viewer/compare/viewer-v0.51.0...viewer-v0.52.0) (2025-08-08)
4
13
 
5
14
 
package/dist/index.js CHANGED
@@ -9507,12 +9507,12 @@ bF.exports;
9507
9507
  we(re, ae, mr);
9508
9508
  return;
9509
9509
  }
9510
- var dr = Ct ? Ct(Ot, Ht, ae + "", re, Ce, Bt) : void 0, $i = dr === void 0;
9510
+ var pr = Ct ? Ct(Ot, Ht, ae + "", re, Ce, Bt) : void 0, $i = pr === void 0;
9511
9511
  if ($i) {
9512
9512
  var si = ar(Ht), Ki = !si && ji(Ht), an = !si && !Ki && io(Ht);
9513
- dr = Ht, si || Ki || an ? ar(Ot) ? dr = Ot : ss(Ot) ? dr = Fr(Ot) : Ki ? ($i = !1, dr = Lr(Ht)) : an ? ($i = !1, dr = ci(Ht)) : dr = [] : zn(Ht) || $t(Ht) ? (dr = Ot, $t(Ot) ? dr = ko(Ot) : (!Hr(Ot) || Po(Ot)) && (dr = S(Ht))) : $i = !1;
9513
+ pr = Ht, si || Ki || an ? ar(Ot) ? pr = Ot : ss(Ot) ? pr = Fr(Ot) : Ki ? ($i = !1, pr = Lr(Ht)) : an ? ($i = !1, pr = ci(Ht)) : pr = [] : zn(Ht) || $t(Ht) ? (pr = Ot, $t(Ot) ? pr = ko(Ot) : (!Hr(Ot) || Po(Ot)) && (pr = S(Ht))) : $i = !1;
9514
9514
  }
9515
- $i && (Bt.set(Ht, dr), Ze(dr, Ht, Te, Ct, Bt), Bt.delete(Ht)), we(re, ae, dr);
9515
+ $i && (Bt.set(Ht, pr), Ze(pr, Ht, Te, Ct, Bt), Bt.delete(Ht)), we(re, ae, pr);
9516
9516
  }
9517
9517
  function mi(re, Ce) {
9518
9518
  return Ft(ut(re, Ce, no), re + "");
@@ -9747,13 +9747,13 @@ class qFe {
9747
9747
  this.prefix = e;
9748
9748
  }
9749
9749
  }
9750
- const pr = new qFe("[Mappedin Viewer]"), VN = {}, wE = (t) => t == null || t === "" ? "" : t.startsWith("http://") || t.startsWith("https://") ? t : `http://${t}`, Sq = (t) => {
9750
+ const dr = new qFe("[Mappedin Viewer]"), VN = {}, wE = (t) => t == null || t === "" ? "" : t.startsWith("http://") || t.startsWith("https://") ? t : `http://${t}`, Sq = (t) => {
9751
9751
  const e = wE(t);
9752
9752
  try {
9753
9753
  const r = new URL(e), i = r.origin !== window.location.origin, n = VN[r.href];
9754
9754
  return i || n == null || n.closed ? VN[r.href] = window.open(r.href, "_blank") : n.focus(), VN[r.href];
9755
9755
  } catch {
9756
- pr.error(`Invalid URL: ${t}`);
9756
+ dr.error(`Invalid URL: ${t}`);
9757
9757
  }
9758
9758
  }, eR = (t) => {
9759
9759
  const e = wE(t);
@@ -9871,7 +9871,7 @@ const pr = new qFe("[Mappedin Viewer]"), VN = {}, wE = (t) => t == null || t ===
9871
9871
  ...o
9872
9872
  };
9873
9873
  }
9874
- return r.length > 0 && pr.log(`The following styles were not overridden: ${r.join(", ")}`), i;
9874
+ return r.length > 0 && dr.log(`The following styles were not overridden: ${r.join(", ")}`), i;
9875
9875
  }, c5 = {
9876
9876
  name: "default",
9877
9877
  isDark: !1,
@@ -10436,7 +10436,7 @@ const pr = new qFe("[Mappedin Viewer]"), VN = {}, wE = (t) => t == null || t ===
10436
10436
  secondary: "#6A6A6A",
10437
10437
  neutral: "#3E3E3E",
10438
10438
  neutral2: "#505050",
10439
- success: "#5C8070",
10439
+ success: "#79B99D",
10440
10440
  error: "#A46B53"
10441
10441
  },
10442
10442
  background: {
@@ -10510,7 +10510,7 @@ const pr = new qFe("[Mappedin Viewer]"), VN = {}, wE = (t) => t == null || t ===
10510
10510
  return e;
10511
10511
  const r = Ane[t];
10512
10512
  if (r == null)
10513
- return pr.warn(
10513
+ return dr.warn(
10514
10514
  `Theme variant ${t} does not exist! Please choose a number between 0 and ${Ane.length - 1}. Falling back to default theme.`
10515
10515
  ), c5;
10516
10516
  const i = _E({}, c5, r);
@@ -13519,7 +13519,7 @@ FF.exports;
13519
13519
  function on(He, re, Ce, ae, Te, Ze) {
13520
13520
  var Ct = ji(He), Bt = ji(re), Ot = Ct ? l : mt(He), Ht = Bt ? l : mt(re);
13521
13521
  Ot = Ot == a ? _ : Ot, Ht = Ht == a ? _ : Ht;
13522
- var mr = Ot == _, dr = Ht == _, $i = Ot == Ht;
13522
+ var mr = Ot == _, pr = Ht == _, $i = Ot == Ht;
13523
13523
  if ($i && gs(He)) {
13524
13524
  if (!gs(re))
13525
13525
  return !1;
@@ -13528,7 +13528,7 @@ FF.exports;
13528
13528
  if ($i && !mr)
13529
13529
  return Ze || (Ze = new cr()), Ct || Ji(He) ? P(He, re, Ce, ae, Te, Ze) : $(He, re, Ot, Ce, ae, Te, Ze);
13530
13530
  if (!(Ce & n)) {
13531
- var si = mr && ce.call(He, "__wrapped__"), Ki = dr && ce.call(re, "__wrapped__");
13531
+ var si = mr && ce.call(He, "__wrapped__"), Ki = pr && ce.call(re, "__wrapped__");
13532
13532
  if (si || Ki) {
13533
13533
  var an = si ? He.value() : He, Ro = Ki ? re.value() : re;
13534
13534
  return Ze || (Ze = new cr()), Te(an, Ro, Ce, ae, Ze);
@@ -13560,7 +13560,7 @@ FF.exports;
13560
13560
  var Ht = Ze.get(He);
13561
13561
  if (Ht && Ze.get(re))
13562
13562
  return Ht == re;
13563
- var mr = -1, dr = !0, $i = Ce & s ? new jt() : void 0;
13563
+ var mr = -1, pr = !0, $i = Ce & s ? new jt() : void 0;
13564
13564
  for (Ze.set(He, re), Ze.set(re, He); ++mr < Bt; ) {
13565
13565
  var si = He[mr], Ki = re[mr];
13566
13566
  if (ae)
@@ -13568,7 +13568,7 @@ FF.exports;
13568
13568
  if (an !== void 0) {
13569
13569
  if (an)
13570
13570
  continue;
13571
- dr = !1;
13571
+ pr = !1;
13572
13572
  break;
13573
13573
  }
13574
13574
  if ($i) {
@@ -13576,15 +13576,15 @@ FF.exports;
13576
13576
  if (!nt($i, bn) && (si === Ro || Te(si, Ro, Ce, ae, Ze)))
13577
13577
  return $i.push(bn);
13578
13578
  })) {
13579
- dr = !1;
13579
+ pr = !1;
13580
13580
  break;
13581
13581
  }
13582
13582
  } else if (!(si === Ki || Te(si, Ki, Ce, ae, Ze))) {
13583
- dr = !1;
13583
+ pr = !1;
13584
13584
  break;
13585
13585
  }
13586
13586
  }
13587
- return Ze.delete(He), Ze.delete(re), dr;
13587
+ return Ze.delete(He), Ze.delete(re), pr;
13588
13588
  }
13589
13589
  function $(He, re, Ce, ae, Te, Ze, Ct) {
13590
13590
  switch (Ce) {
@@ -13625,8 +13625,8 @@ FF.exports;
13625
13625
  var Ct = Ce & n, Bt = le(He), Ot = Bt.length, Ht = le(re), mr = Ht.length;
13626
13626
  if (Ot != mr && !Ct)
13627
13627
  return !1;
13628
- for (var dr = Ot; dr--; ) {
13629
- var $i = Bt[dr];
13628
+ for (var pr = Ot; pr--; ) {
13629
+ var $i = Bt[pr];
13630
13630
  if (!(Ct ? $i in re : ce.call(re, $i)))
13631
13631
  return !1;
13632
13632
  }
@@ -13635,8 +13635,8 @@ FF.exports;
13635
13635
  return si == re;
13636
13636
  var Ki = !0;
13637
13637
  Ze.set(He, re), Ze.set(re, He);
13638
- for (var an = Ct; ++dr < Ot; ) {
13639
- $i = Bt[dr];
13638
+ for (var an = Ct; ++pr < Ot; ) {
13639
+ $i = Bt[pr];
13640
13640
  var Ro = He[$i], bn = re[$i];
13641
13641
  if (ae)
13642
13642
  var Ma = Ct ? ae(bn, Ro, $i, re, He, Ze) : ae(Ro, bn, $i, He, re, Ze);
@@ -17694,7 +17694,7 @@ const R6e = function() {
17694
17694
  }(), t;
17695
17695
  }(), A8 = { current: R6e, captureEnabled: !0 }, XOe = (t) => {
17696
17696
  A8.current = t;
17697
- }, ZA = () => (A8 == null ? void 0 : A8.current) == null ? (pr.warn("Posthog instance not set! Falling back to default instance."), R6e) : A8.current, JOe = (t) => {
17697
+ }, ZA = () => (A8 == null ? void 0 : A8.current) == null ? (dr.warn("Posthog instance not set! Falling back to default instance."), R6e) : A8.current, JOe = (t) => {
17698
17698
  A8.captureEnabled = t;
17699
17699
  }, O6e = () => A8.captureEnabled, KOe = (...t) => {
17700
17700
  if (!O6e())
@@ -17702,7 +17702,7 @@ const R6e = function() {
17702
17702
  const e = ZA(), [r, i] = t;
17703
17703
  e.capture(r, i);
17704
17704
  }, N6e = (t = {}) => {
17705
- const e = "phc_vZrwt3z6JmdPnErvTgZoazTAGlCRMiz6c2NqWtBt8qz", r = "https://ph-api.mappedin.com";
17705
+ const e = "phc_sRrjUwz9zicl4GeXtSnwcuKMr50SB76ma6NVi6zlPou", r = "https://ph-api.mappedin.com";
17706
17706
  JOe(t.captureEnabled ?? !0);
17707
17707
  const i = ZA();
17708
17708
  if (!i.__loaded && e != null && r != null) {
@@ -17720,7 +17720,7 @@ const R6e = function() {
17720
17720
  ...t
17721
17721
  });
17722
17722
  const n = Rfe();
17723
- n.error != null ? pr.error(n.error) : i.setPersonProperties({
17723
+ n.error != null ? dr.error(n.error) : i.setPersonProperties({
17724
17724
  mapId: t.mapId ?? n.venueId,
17725
17725
  mapView: t.configId ?? n.configId,
17726
17726
  isPreview: t.isMakerPreview ?? !1
@@ -17818,7 +17818,7 @@ class eNe {
17818
17818
  try {
17819
17819
  typeof l == "string" && (l = JSON.parse(l));
17820
17820
  } catch {
17821
- pr.warn(`Failed to parse payload for feature flag ${o}`);
17821
+ dr.warn(`Failed to parse payload for feature flag ${o}`);
17822
17822
  }
17823
17823
  s[o] = {
17824
17824
  key: o,
@@ -17831,11 +17831,11 @@ class eNe {
17831
17831
  async init() {
17832
17832
  return new Promise((e) => {
17833
17833
  ZA().onFeatureFlags(() => {
17834
- this.timeout && clearTimeout(this.timeout), this.updateFeatureFlags(), pr.log("Feature flags loaded!"), Xl(() => {
17834
+ this.timeout && clearTimeout(this.timeout), this.updateFeatureFlags(), dr.log("Feature flags loaded!"), Xl(() => {
17835
17835
  this.initialized = !0;
17836
17836
  }), e(!0);
17837
17837
  }), this.timeout = setTimeout(() => {
17838
- this.initialized || pr.warn("Feature flags took too long to load! Using default flags."), Xl(() => {
17838
+ this.initialized || dr.warn("Feature flags took too long to load! Using default flags."), Xl(() => {
17839
17839
  this.initialized = !0;
17840
17840
  }), e(!1);
17841
17841
  }, 5e3);
@@ -60399,7 +60399,7 @@ var gP = yt((t) => {
60399
60399
  }, mr.prototype.getClass = function() {
60400
60400
  return mr;
60401
60401
  };
60402
- var dr = function(f) {
60402
+ var pr = function(f) {
60403
60403
  function m(M) {
60404
60404
  M = M || m.DEFAULT_NODE_CAPACITY, f.call(this, M);
60405
60405
  }
@@ -61032,7 +61032,7 @@ var gP = yt((t) => {
61032
61032
  };
61033
61033
  var XO = function(f) {
61034
61034
  function m(M) {
61035
- M ? f.call(this, M) : f.call(this), this._monoChains = new Ge(), this._index = new dr(), this._idCounter = 0, this._nodedSegStrings = null, this._nOverlaps = 0;
61035
+ M ? f.call(this, M) : f.call(this), this._monoChains = new Ge(), this._index = new pr(), this._idCounter = 0, this._nodedSegStrings = null, this._nOverlaps = 0;
61036
61036
  }
61037
61037
  f && (m.__proto__ = f), (m.prototype = Object.create(f && f.prototype)).constructor = m;
61038
61038
  var w = { SegmentOverlapAction: { configurable: !0 } };
@@ -64805,7 +64805,7 @@ var gP = yt((t) => {
64805
64805
  if (this._inputPolys === null) throw new Error("union() method cannot be called twice");
64806
64806
  if (this._inputPolys.isEmpty()) return null;
64807
64807
  this._geomFactory = this._inputPolys.iterator().next().getFactory();
64808
- for (var f = new dr(Eo.STRTREE_NODE_CAPACITY), m = this._inputPolys.iterator(); m.hasNext(); ) {
64808
+ for (var f = new pr(Eo.STRTREE_NODE_CAPACITY), m = this._inputPolys.iterator(); m.hasNext(); ) {
64809
64809
  var w = m.next();
64810
64810
  f.insert(w.getEnvelopeInternal(), w);
64811
64811
  }
@@ -65111,12 +65111,12 @@ var gP = yt((t) => {
65111
65111
  we(re, ae, mr);
65112
65112
  return;
65113
65113
  }
65114
- var dr = Ct ? Ct(Ot, Ht, ae + "", re, Ce, Bt) : void 0, $i = dr === void 0;
65114
+ var pr = Ct ? Ct(Ot, Ht, ae + "", re, Ce, Bt) : void 0, $i = pr === void 0;
65115
65115
  if ($i) {
65116
65116
  var si = ar(Ht), Ki = !si && ji(Ht), an = !si && !Ki && io(Ht);
65117
- dr = Ht, si || Ki || an ? ar(Ot) ? dr = Ot : ss(Ot) ? dr = Fr(Ot) : Ki ? ($i = !1, dr = Lr(Ht)) : an ? ($i = !1, dr = ci(Ht)) : dr = [] : zn(Ht) || $t(Ht) ? (dr = Ot, $t(Ot) ? dr = ko(Ot) : (!Hr(Ot) || Po(Ot)) && (dr = S(Ht))) : $i = !1;
65117
+ pr = Ht, si || Ki || an ? ar(Ot) ? pr = Ot : ss(Ot) ? pr = Fr(Ot) : Ki ? ($i = !1, pr = Lr(Ht)) : an ? ($i = !1, pr = ci(Ht)) : pr = [] : zn(Ht) || $t(Ht) ? (pr = Ot, $t(Ot) ? pr = ko(Ot) : (!Hr(Ot) || Po(Ot)) && (pr = S(Ht))) : $i = !1;
65118
65118
  }
65119
- $i && (Bt.set(Ht, dr), Ze(dr, Ht, Te, Ct, Bt), Bt.delete(Ht)), we(re, ae, dr);
65119
+ $i && (Bt.set(Ht, pr), Ze(pr, Ht, Te, Ct, Bt), Bt.delete(Ht)), we(re, ae, pr);
65120
65120
  }
65121
65121
  function mi(re, Ce) {
65122
65122
  return Ft(ut(re, Ce, no), re + "");
@@ -65486,8 +65486,8 @@ var gP = yt((t) => {
65486
65486
  }
65487
65487
  yi.prototype.clear = Oi, yi.prototype.delete = ro, yi.prototype.get = ns, yi.prototype.has = fr, yi.prototype.set = st;
65488
65488
  function Vt(ae, Te) {
65489
- var Ze = Xi(ae), Ct = !Ze && ar(ae), Bt = !Ze && !Ct && Po(ae), Ot = !Ze && !Ct && !Bt && ko(ae), Ht = Ze || Ct || Bt || Ot, mr = Ht ? oe(ae.length, String) : [], dr = mr.length;
65490
- for (var $i in ae) !(Ht && ($i == "length" || Bt && ($i == "offset" || $i == "parent") || Ot && ($i == "buffer" || $i == "byteLength" || $i == "byteOffset") || $($i, dr))) && mr.push($i);
65489
+ var Ze = Xi(ae), Ct = !Ze && ar(ae), Bt = !Ze && !Ct && Po(ae), Ot = !Ze && !Ct && !Bt && ko(ae), Ht = Ze || Ct || Bt || Ot, mr = Ht ? oe(ae.length, String) : [], pr = mr.length;
65490
+ for (var $i in ae) !(Ht && ($i == "length" || Bt && ($i == "offset" || $i == "parent") || Ot && ($i == "buffer" || $i == "byteLength" || $i == "byteOffset") || $($i, pr))) && mr.push($i);
65491
65491
  return mr;
65492
65492
  }
65493
65493
  function we(ae, Te, Ze) {
@@ -65535,17 +65535,17 @@ var gP = yt((t) => {
65535
65535
  }, Wa);
65536
65536
  }
65537
65537
  function Qr(ae, Te, Ze, Ct, Bt, Ot, Ht) {
65538
- var mr = Ft(ae, Ze), dr = Ft(Te, Ze), $i = Ht.get(dr);
65538
+ var mr = Ft(ae, Ze), pr = Ft(Te, Ze), $i = Ht.get(pr);
65539
65539
  if ($i) {
65540
65540
  we(ae, Ze, $i);
65541
65541
  return;
65542
65542
  }
65543
- var si = Ot ? Ot(mr, dr, Ze + "", ae, Te, Ht) : void 0, Ki = si === void 0;
65543
+ var si = Ot ? Ot(mr, pr, Ze + "", ae, Te, Ht) : void 0, Ki = si === void 0;
65544
65544
  if (Ki) {
65545
- var an = Xi(dr), Ro = !an && Po(dr), bn = !an && !Ro && ko(dr);
65546
- si = dr, an || Ro || bn ? Xi(mr) ? si = mr : ji(mr) ? si = Fr(mr) : Ro ? (Ki = !1, si = Lr(dr)) : bn ? (Ki = !1, si = ci(dr)) : si = [] : io(dr) || ar(dr) ? (si = mr, ar(mr) ? si = Ji(mr) : (!Wn(mr) || gs(mr)) && (si = P(dr))) : Ki = !1;
65545
+ var an = Xi(pr), Ro = !an && Po(pr), bn = !an && !Ro && ko(pr);
65546
+ si = pr, an || Ro || bn ? Xi(mr) ? si = mr : ji(mr) ? si = Fr(mr) : Ro ? (Ki = !1, si = Lr(pr)) : bn ? (Ki = !1, si = ci(pr)) : si = [] : io(pr) || ar(pr) ? (si = mr, ar(mr) ? si = Ji(mr) : (!Wn(mr) || gs(mr)) && (si = P(pr))) : Ki = !1;
65547
65547
  }
65548
- Ki && (Ht.set(dr, si), Bt(si, dr, Ct, Ot, Ht), Ht.delete(dr)), we(ae, Ze, si);
65548
+ Ki && (Ht.set(pr, si), Bt(si, pr, Ct, Ot, Ht), Ht.delete(pr)), we(ae, Ze, si);
65549
65549
  }
65550
65550
  function mi(ae, Te) {
65551
65551
  return Qt(mt(ae, Te, re), ae + "");
@@ -65573,8 +65573,8 @@ var gP = yt((t) => {
65573
65573
  var Bt = !Ze;
65574
65574
  Ze || (Ze = {});
65575
65575
  for (var Ot = -1, Ht = Te.length; ++Ot < Ht; ) {
65576
- var mr = Te[Ot], dr = void 0;
65577
- dr === void 0 && (dr = ae[mr]), Bt ? We(Ze, mr, dr) : qe(Ze, mr, dr);
65576
+ var mr = Te[Ot], pr = void 0;
65577
+ pr === void 0 && (pr = ae[mr]), Bt ? We(Ze, mr, pr) : qe(Ze, mr, pr);
65578
65578
  }
65579
65579
  return Ze;
65580
65580
  }
@@ -65591,8 +65591,8 @@ var gP = yt((t) => {
65591
65591
  function _s(ae) {
65592
65592
  return function(Te, Ze, Ct) {
65593
65593
  for (var Bt = -1, Ot = Object(Te), Ht = Ct(Te), mr = Ht.length; mr--; ) {
65594
- var dr = Ht[++Bt];
65595
- if (Ze(Ot[dr], dr, Ot) === !1) break;
65594
+ var pr = Ht[++Bt];
65595
+ if (Ze(Ot[pr], pr, Ot) === !1) break;
65596
65596
  }
65597
65597
  return Te;
65598
65598
  };
@@ -90501,7 +90501,7 @@ const Zwe = async (t, e) => {
90501
90501
  logEvents: !1
90502
90502
  }
90503
90503
  });
90504
- return pr.log("Hydrated map data in", performance.now() - r, "ms"), i;
90504
+ return dr.log("Hydrated map data in", performance.now() - r, "ms"), i;
90505
90505
  };
90506
90506
  class obt extends Error {
90507
90507
  constructor(e) {
@@ -90520,7 +90520,7 @@ const Dee = {
90520
90520
  throw new Error("Custom auth URL is not enabled!");
90521
90521
  if (!n.includes(e))
90522
90522
  throw new Dee.UnallowedCustomAuthUrlError(e);
90523
- pr.log("Fetching token from custom auth URL", e);
90523
+ dr.log("Fetching token from custom auth URL", e);
90524
90524
  const [s, o] = t.split("-");
90525
90525
  return await nbt({
90526
90526
  mapId: s,
@@ -93133,12 +93133,12 @@ function exe() {
93133
93133
  var Bbt = exe();
93134
93134
  const txe = () => {
93135
93135
  let t = document.querySelector("meta[name=app-version]");
93136
- t == null && (t = document.createElement("meta"), t.name = "app-version", document.head.appendChild(t)), t.content = "0.52.0";
93136
+ t == null && (t = document.createElement("meta"), t.name = "app-version", document.head.appendChild(t)), t.content = "0.52.1";
93137
93137
  let e = document.querySelector("meta[name=viewport]");
93138
93138
  e == null && (e = document.createElement("meta"), e.name = "viewport", document.head.appendChild(e)), e.content = "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no";
93139
93139
  }, rxe = (t) => {
93140
93140
  let e = t;
93141
- if (e == null && (pr.warn("options.root was not specified. Defaulting to #viewer-app-root."), e = document.getElementById("viewer-app-root")), e == null)
93141
+ if (e == null && (dr.warn("options.root was not specified. Defaulting to #viewer-app-root."), e = document.getElementById("viewer-app-root")), e == null)
93142
93142
  throw new Error("Could not find #viewer-app-root. Please add it to your HTML file.");
93143
93143
  return e.classList.contains("viewer-app-root") || e.classList.add("viewer-app-root"), e;
93144
93144
  }, uZ = "Mappedin__ComponentType", Fbt = (t, e) => (t[uZ] = e, t), F1e = (t, e) => (typeof t.type == "object" || typeof t.type == "function") && t.type != null && uZ in t.type && t.type[uZ] === e, ixe = (t) => {
@@ -93151,16 +93151,16 @@ const txe = () => {
93151
93151
  }, Pbt = (t) => Bbt.sanitize(t, { USE_PROFILES: { svg: !0 } }), kbt = (t, e) => {
93152
93152
  const n = new DOMParser().parseFromString(t, "image/svg+xml").documentElement;
93153
93153
  if (n == null || n.tagName === "parsererror" || n.tagName.toLowerCase() !== "svg") {
93154
- pr.error("Failed to parse SVG", { svg: t, tagName: n == null ? void 0 : n.tagName });
93154
+ dr.error("Failed to parse SVG", { svg: t, tagName: n == null ? void 0 : n.tagName });
93155
93155
  return;
93156
93156
  }
93157
93157
  return e != null && (n.setAttribute("color", e), n.querySelectorAll("*").forEach((a) => {
93158
93158
  (a.getAttribute("fill") != null || a.tagName === "path") && a.getAttribute("fill") !== "none" && a.setAttribute("fill", "currentColor"), a.getAttribute("stroke") != null && a.getAttribute("stroke") !== "none" && a.setAttribute("stroke", "currentColor");
93159
93159
  })), new XMLSerializer().serializeToString(n);
93160
- }, Rbt = (t) => Array.isArray(t) ? t.reduce((e, r) => typeof r != "object" || r == null || !("id" in r) || typeof r.id != "string" ? (pr.error("Symbol item is not an object or does not have an id!"), e) : !("svg" in r) || typeof r.svg != "string" ? (pr.error("Symbol item does not have svg data!"), e) : (e[r.id] = {
93160
+ }, Rbt = (t) => Array.isArray(t) ? t.reduce((e, r) => typeof r != "object" || r == null || !("id" in r) || typeof r.id != "string" ? (dr.error("Symbol item is not an object or does not have an id!"), e) : !("svg" in r) || typeof r.svg != "string" ? (dr.error("Symbol item does not have svg data!"), e) : (e[r.id] = {
93161
93161
  id: r.id,
93162
93162
  src: r.svg
93163
- }, e), {}) : (pr.error("Symbol directory is not an array!"), {}), Obt = {
93163
+ }, e), {}) : (dr.error("Symbol directory is not an array!"), {}), Obt = {
93164
93164
  Annotation: Rbt(cbt)
93165
93165
  }, Nbt = (t, e) => {
93166
93166
  var r, i;
@@ -93190,7 +93190,7 @@ const txe = () => {
93190
93190
  const i = await (await fetch(t)).text(), n = Pbt(i);
93191
93191
  return e != null ? kbt(n, e) : n;
93192
93192
  } catch (r) {
93193
- pr.error("Failed to fetch icon from CDN", { icon: t, color: e, error: r });
93193
+ dr.error("Failed to fetch icon from CDN", { icon: t, color: e, error: r });
93194
93194
  return;
93195
93195
  }
93196
93196
  }, $bt = (t) => {
@@ -93255,7 +93255,7 @@ const k1e = (t) => t.map(
93255
93255
  try {
93256
93256
  return new u_e(t, e, r, i);
93257
93257
  } catch (n) {
93258
- pr.warn(n, "Failed to hydrate directions!");
93258
+ dr.warn(n, "Failed to hydrate directions!");
93259
93259
  return;
93260
93260
  }
93261
93261
  }, Ubt = async (t, e, r, i, n, s) => {
@@ -93263,7 +93263,7 @@ const k1e = (t) => t.map(
93263
93263
  return;
93264
93264
  const o = e != null && e.length > 0 ? `${t}-${e}` : t, a = Array.isArray(i) ? i : [i], l = Array.isArray(n) ? n : [n], u = new URL(
93265
93265
  "/directions",
93266
- "https://mappedin-public-mvf-staging.azurewebsites.net"
93266
+ "https://mappedin-public-mvf-prod.azurewebsites.net"
93267
93267
  );
93268
93268
  u.search = new URLSearchParams({
93269
93269
  mapId: o,
@@ -93273,7 +93273,7 @@ const k1e = (t) => t.map(
93273
93273
  }).toString();
93274
93274
  const c = await fetch(u.toString(), { mode: "cors" }).catch((d) => d instanceof Error ? d : new Error(d)), h = c instanceof Error ? { error: c.message } : await c.json().catch(() => null);
93275
93275
  if (c instanceof Error || !c.ok) {
93276
- pr.error(h, "Failed to get online directions!");
93276
+ dr.error(h, "Failed to get online directions!");
93277
93277
  return;
93278
93278
  }
93279
93279
  if (h != null && Array.isArray(h.directions))
@@ -94534,7 +94534,7 @@ const Lee = /* @__PURE__ */ zd(aEt), hZ = (t, e, r) => `${t},${e}${r ? `,${r}` :
94534
94534
  if ("center" in t)
94535
94535
  return t.center;
94536
94536
  const r = t;
94537
- return pr.warn(`Could not determine coordinate for place: ${r.id}`), new nr({
94537
+ return dr.warn(`Could not determine coordinate for place: ${r.id}`), new nr({
94538
94538
  latitude: 0,
94539
94539
  longitude: 0,
94540
94540
  floorId: e == null ? void 0 : e.id
@@ -94687,7 +94687,7 @@ class bEt {
94687
94687
  defer(e) {
94688
94688
  requestAnimationFrame(() => {
94689
94689
  this.isAnimating() ? (this.scheduledFunctions.push(e), setTimeout(() => {
94690
- this.scheduledFunctions.includes(e) && (this.scheduledFunctions = this.scheduledFunctions.filter((r) => r !== e), pr.warn(
94690
+ this.scheduledFunctions.includes(e) && (this.scheduledFunctions = this.scheduledFunctions.filter((r) => r !== e), dr.warn(
94691
94691
  `AnimationScheduler: function was not called within timeout. The following animations are preventing the function from being executed normally: ${Array.from(
94692
94692
  this.highPriorityAnimations
94693
94693
  ).toString()}`
@@ -94881,7 +94881,7 @@ const OEt = (t, e) => {
94881
94881
  if (i === n && s === o)
94882
94882
  return t;
94883
94883
  if (s === o || i === n || a.some(isNaN) || a.some((c) => c === 1 / 0))
94884
- return pr.warn("Cannot map value to range! Ranges are invalid!", e, r), s;
94884
+ return dr.warn("Cannot map value to range! Ranges are invalid!", e, r), s;
94885
94885
  const l = (t - i) / (n - i);
94886
94886
  return s + (o - s) * l;
94887
94887
  }, xxe = $1`
@@ -94960,7 +94960,7 @@ const OEt = (t, e) => {
94960
94960
  debug: s = !1
94961
94961
  }) => {
94962
94962
  const o = Ai(), a = r ?? o.fontSize.normal, l = i ?? o.fontSize.xsmall, { refFn: u, width: c } = Ch(), { refFn: h, width: d } = Ch(), p = Se.useMemo(() => c > 0, [c]), g = $Et(d, 50), v = Se.useMemo(() => c > g ? Math.floor(Fg(a * g / c, l, a)) : a, [g, a, p]);
94963
- return s && pr.log("DynamicallySizedText", { textWidth: c, containerWidth: g, fontSize: v }), /* @__PURE__ */ W.jsx("div", { className: "dynamically-sized-text", style: { position: "relative", width: e }, ref: h, children: g > 0 && /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
94963
+ return s && dr.log("DynamicallySizedText", { textWidth: c, containerWidth: g, fontSize: v }), /* @__PURE__ */ W.jsx("div", { className: "dynamically-sized-text", style: { position: "relative", width: e }, ref: h, children: g > 0 && /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
94964
94964
  /* @__PURE__ */ W.jsx(vr, { ...t, style: { ...t.style, fontSize: v }, children: n }),
94965
94965
  /* @__PURE__ */ W.jsx(UEt, { ...t, style: { ...t.style, fontSize: v }, ref: u, children: n })
94966
94966
  ] }) });
@@ -95977,7 +95977,7 @@ const pMt = At.div`
95977
95977
  `, Ii = ({ icon: t, width: e, height: r, color: i, style: n, className: s, onLoad: o }) => {
95978
95978
  let a;
95979
95979
  const l = tR(t);
95980
- return l ? a = /* @__PURE__ */ W.jsx(Z1e, { src: t, color: i }) : t.includes("<svg") ? a = /* @__PURE__ */ W.jsx(Z1e, { src: t, color: i }) : a = Wwe.get(t), a == null ? (pr.warn(`No icon found for ${t}. <Icon> component will return null.`), null) : (typeof n == "object" && (a = Se.cloneElement(a, {
95980
+ return l ? a = /* @__PURE__ */ W.jsx(Z1e, { src: t, color: i }) : t.includes("<svg") ? a = /* @__PURE__ */ W.jsx(Z1e, { src: t, color: i }) : a = Wwe.get(t), a == null ? (dr.warn(`No icon found for ${t}. <Icon> component will return null.`), null) : (typeof n == "object" && (a = Se.cloneElement(a, {
95981
95981
  style: {
95982
95982
  stroke: "none",
95983
95983
  ...a.props.style,
@@ -96644,7 +96644,10 @@ class kMt {
96644
96644
  theme: s9.struct
96645
96645
  },
96646
96646
  { autoBind: !0, deep: !1 }
96647
- ), this.locationCardStore = new TMt({ rootStore: this.rootStore, uiStore: this }), this.reactiveToasts = [
96647
+ ), this.locationCardStore = new TMt({
96648
+ rootStore: this.rootStore,
96649
+ uiStore: this
96650
+ }), this.reactiveToasts = [
96648
96651
  new IMt(this.rootStore),
96649
96652
  new BMt(this.rootStore),
96650
96653
  new FMt(this.rootStore),
@@ -96716,9 +96719,11 @@ class kMt {
96716
96719
  });
96717
96720
  else
96718
96721
  try {
96719
- navigator.clipboard.writeText(e), i.toast && T1(ki.t("share.copied-to-clipboard"), { icon: "checkmark-16x16" });
96722
+ navigator.clipboard.writeText(e), i.toast && T1(ki.t("share.copied-to-clipboard"), {
96723
+ icon: "checkmark-16x16"
96724
+ });
96720
96725
  } catch (n) {
96721
- pr.error("Failed to copy to clipboard!", n), i.toast && T1(ki.t("share.clipboard-error"));
96726
+ dr.error("Failed to copy to clipboard!", n), i.toast && T1(ki.t("share.clipboard-error"));
96722
96727
  }
96723
96728
  }
96724
96729
  syncSearchQueryWithSelectedPlaces() {
@@ -96759,7 +96764,8 @@ class kMt {
96759
96764
  const e = {
96760
96765
  map: {
96761
96766
  initialBearing: this.rootStore.initialBearing,
96762
- initialPitch: this.rootStore.initialPitch
96767
+ initialPitch: this.rootStore.initialPitch,
96768
+ watermarkVisible: this.rootStore.startupOptions.hideWatermark !== !0
96763
96769
  }
96764
96770
  };
96765
96771
  return _E({}, this.themeBase, e);
@@ -96923,7 +96929,7 @@ class kMt {
96923
96929
  })
96924
96930
  );
96925
96931
  } catch (u) {
96926
- pr.error(u), T1(ki.t("share.clipboard-error"));
96932
+ dr.error(u), T1(ki.t("share.clipboard-error"));
96927
96933
  }
96928
96934
  }
96929
96935
  };
@@ -97718,7 +97724,7 @@ const oSt = (t, e) => (S7 != null || (XC == null && globalThis.OffscreenCanvas !
97718
97724
  e != null && e.debug && (i = performance.now()), await $ee(t, (s, o) => {
97719
97725
  const a = s.getImageData(0, 0, o.width, o.height).data, l = Nxe(a);
97720
97726
  fB.set(t, l);
97721
- }), e != null && e.debug && pr.log("Average color computed in " + (performance.now() - i) + "ms");
97727
+ }), e != null && e.debug && dr.log("Average color computed in " + (performance.now() - i) + "ms");
97722
97728
  const n = fB.get(t);
97723
97729
  return n == null ? Promise.reject() : Promise.resolve(n);
97724
97730
  }, $xe = async (t, e) => {
@@ -97726,7 +97732,7 @@ const oSt = (t, e) => (S7 != null || (XC == null && globalThis.OffscreenCanvas !
97726
97732
  if (r != null)
97727
97733
  return Promise.resolve(r);
97728
97734
  const i = 4, n = (e == null ? void 0 : e.resolution) ?? i;
97729
- n < i && pr.warn(
97735
+ n < i && dr.warn(
97730
97736
  `Using a resolution below ${i} may produce inconsistent results when approximating average pixel color!`
97731
97737
  );
97732
97738
  let s = 0;
@@ -97740,7 +97746,7 @@ const oSt = (t, e) => (S7 != null || (XC == null && globalThis.OffscreenCanvas !
97740
97746
  width: n,
97741
97747
  height: n
97742
97748
  }
97743
- ), e != null && e.debug && pr.log("Average color approximated in " + (performance.now() - s) + "ms");
97749
+ ), e != null && e.debug && dr.log("Average color approximated in " + (performance.now() - s) + "ms");
97744
97750
  const o = mB.get(t);
97745
97751
  return o == null ? Promise.reject() : Promise.resolve(o);
97746
97752
  }, aSt = {
@@ -97751,7 +97757,7 @@ const oSt = (t, e) => (S7 != null || (XC == null && globalThis.OffscreenCanvas !
97751
97757
  const i = {
97752
97758
  fit: "fit",
97753
97759
  ...r
97754
- }, n = "https://image-proxy-staging.mappedin.net", s = lSt(e, i.fit), o = encodeURIComponent(t);
97760
+ }, n = "https://image-proxy.mappedin.com", s = lSt(e, i.fit), o = encodeURIComponent(t);
97755
97761
  return `${n}/resize:${i.fit}:${s}:${s}:0/format:webp/max_bytes:5000000/plain/${o}`.replaceAll(/\/+/g, "/").replace("https:/", "https://").replace("http:/", "http://");
97756
97762
  }, uSt = (t, e) => {
97757
97763
  if (e == null || e === "")
@@ -97760,7 +97766,7 @@ const oSt = (t, e) => (S7 != null || (XC == null && globalThis.OffscreenCanvas !
97760
97766
  const r = new URL(wE(t)), i = new URLSearchParams(e);
97761
97767
  return r.search = i.toString(), r.toString();
97762
97768
  } catch {
97763
- return pr.error("Failed to append SAS token to URL!", { url: t }), t;
97769
+ return dr.error("Failed to append SAS token to URL!", { url: t }), t;
97764
97770
  }
97765
97771
  }, ter = async (t, e) => {
97766
97772
  if (!tR(t))
@@ -98384,7 +98390,7 @@ class vSt {
98384
98390
  try {
98385
98391
  u = await r();
98386
98392
  } catch (h) {
98387
- pr.error("Error creating marker element", h);
98393
+ dr.error("Error creating marker element", h);
98388
98394
  return;
98389
98395
  }
98390
98396
  if (l = this.sdkMarkersByKey.get(a), l == null)
@@ -98611,7 +98617,7 @@ class CSt {
98611
98617
  topColor: this.rootStore.uiStore.theme.colors.map.geometry.wallTops
98612
98618
  }), this.mapStore.mapView.updateState(LT.Exterior, {
98613
98619
  topColor: this.rootStore.uiStore.theme.colors.map.geometry.wallTops
98614
- }), this.updateHoverColors(), pr.log("Synced geometry state with theme in", performance.now() - e, "ms");
98620
+ }), this.updateHoverColors(), dr.log("Synced geometry state with theme in", performance.now() - e, "ms");
98615
98621
  }
98616
98622
  highlightGeometry(e, r) {
98617
98623
  this.mapStore.mapView != null && this.cachedHighlightedGeometries[e.id] !== r && (r === "initial" ? delete this.cachedHighlightedGeometries[e.id] : this.cachedHighlightedGeometries[e.id] = r, this.mapStore.mapView.updateState(e, {
@@ -98868,7 +98874,7 @@ class wSt {
98868
98874
  try {
98869
98875
  this.mapStore.mapView.Navigation.clear(), this.mapStore.mapView.Paths.removeAll();
98870
98876
  } catch {
98871
- pr.warn("Failed to clear navigation");
98877
+ dr.warn("Failed to clear navigation");
98872
98878
  }
98873
98879
  if (this.directions == null || this.directions.distance === 0)
98874
98880
  return;
@@ -99176,13 +99182,13 @@ const xSt = 250, zxe = 500, bSt = 500 + zxe, ESt = At.div`
99176
99182
  v(D), y(L);
99177
99183
  })();
99178
99184
  }, [t, o]), Se.useEffect(() => {
99179
- d && o < s.length - 1 && (pr.warn(`Failed to load image at '${s[o]}'! Trying '${s[o + 1]}'...`), a(o + 1), p(!1));
99185
+ d && o < s.length - 1 && (dr.warn(`Failed to load image at '${s[o]}'! Trying '${s[o + 1]}'...`), a(o + 1), p(!1));
99180
99186
  }, [d]);
99181
99187
  const C = Se.useMemo(() => {
99182
99188
  if (!l || g == null || A == null)
99183
99189
  return n ?? "#FFFFFF";
99184
99190
  let x = i;
99185
- return x === "auto" && (x = DEt(A)[3] < 10 ? "contrast" : "top-left"), x === "top-left" ? A ?? "#FFFFFF" : x === "average" ? g ?? "#FFFFFF" : x === "contrast" ? Fee(g ?? "#000000") ? Rxe : Oxe : (pr.warn(`Unknown image background style: '${x}'!`), "#FFFFFF");
99191
+ return x === "auto" && (x = DEt(A)[3] < 10 ? "contrast" : "top-left"), x === "top-left" ? A ?? "#FFFFFF" : x === "average" ? g ?? "#FFFFFF" : x === "contrast" ? Fee(g ?? "#000000") ? Rxe : Oxe : (dr.warn(`Unknown image background style: '${x}'!`), "#FFFFFF");
99186
99192
  }, [i, A, g, l]);
99187
99193
  return { loaded: l, error: d, initialized: c, imgSrc: s[o], background: C };
99188
99194
  }, kSt = At.div.attrs({ className: "async-image" })`
@@ -99229,7 +99235,7 @@ const xSt = 250, zxe = 500, bSt = 500 + zxe, ESt = At.div`
99229
99235
  imageBackgroundStyle: o,
99230
99236
  loadingBackgroundColor: l.colors.background.primary
99231
99237
  }), { width: g, height: v, refFn: A } = Ch();
99232
- return a && pr.log(`Async image background: ${d}`), /* @__PURE__ */ W.jsxs(
99238
+ return a && dr.log(`Async image background: ${d}`), /* @__PURE__ */ W.jsxs(
99233
99239
  kSt,
99234
99240
  {
99235
99241
  style: {
@@ -101163,12 +101169,12 @@ class QIt {
101163
101169
  }
101164
101170
  updateDefaultCameraForFloor(e) {
101165
101171
  if (this.mapStore.__mv == null) {
101166
- pr.error("Tried to compute default camera states when MapView is null");
101172
+ dr.error("Tried to compute default camera states when MapView is null");
101167
101173
  return;
101168
101174
  }
101169
101175
  if (e == null || this.defaultCameraByFloorId[e.id] != null)
101170
101176
  return;
101171
- pr.log("Updating default camera for floor", e.id);
101177
+ dr.log("Updating default camera for floor", e.id);
101172
101178
  const r = this.getPadding(), i = this.mapStore.__mv.Camera.getFocusOnTransform(e, {
101173
101179
  screenOffsets: r
101174
101180
  });
@@ -101501,13 +101507,13 @@ class GIt {
101501
101507
  }
101502
101508
  async updateImageLabelDarkness() {
101503
101509
  try {
101504
- pr.log("Processing images for labelling...");
101510
+ dr.log("Processing images for labelling...");
101505
101511
  const e = [];
101506
101512
  for (const r of this.rootStore.places)
101507
101513
  e.push(this.updateImageLabelDarknessForPlace(r));
101508
- await Promise.all(e), pr.log("Finished processing images for labelling!");
101514
+ await Promise.all(e), dr.log("Finished processing images for labelling!");
101509
101515
  } catch (e) {
101510
- pr.error("Failed to process images for labelling", e);
101516
+ dr.error("Failed to process images for labelling", e);
101511
101517
  } finally {
101512
101518
  Xl(() => {
101513
101519
  this.labelImagesProcessed = !0;
@@ -101515,7 +101521,7 @@ class GIt {
101515
101521
  }
101516
101522
  }
101517
101523
  async initialize() {
101518
- this.initialized || this.mapStore.mapView != null && (this.labelMapName(), this.labelFloorStacks(), await this.labelPlaces(), pr.log("Labels initialized!"), Xl(() => {
101524
+ this.initialized || this.mapStore.mapView != null && (this.labelMapName(), this.labelFloorStacks(), await this.labelPlaces(), dr.log("Labels initialized!"), Xl(() => {
101519
101525
  this.initialized = !0;
101520
101526
  }));
101521
101527
  }
@@ -101587,7 +101593,7 @@ class GIt {
101587
101593
  };
101588
101594
  return i instanceof Promise ? new Promise((u) => {
101589
101595
  i.then((c) => {
101590
- c == null && pr.error("Icon string is null", e), l.appearance.marker.icon = c, l.appearance.marker.iconPadding += 2, u(l);
101596
+ c == null && dr.error("Icon string is null", e), l.appearance.marker.icon = c, l.appearance.marker.iconPadding += 2, u(l);
101591
101597
  });
101592
101598
  }) : (l.appearance.marker.icon = i ?? void 0, l);
101593
101599
  }
@@ -101854,7 +101860,7 @@ class qIt {
101854
101860
  this.rootStore.isMultiFloorViewEnabled ? void 0 : e
101855
101861
  );
101856
101862
  if (n == null) {
101857
- pr.error("Failed to create coordinate from screen coordinate", i);
101863
+ dr.error("Failed to create coordinate from screen coordinate", i);
101858
101864
  return;
101859
101865
  }
101860
101866
  if ((n == null ? void 0 : n.floorId) == null) {
@@ -105283,9 +105289,10 @@ class qDt {
105283
105289
  color: this.rootStore.uiStore.theme.isDark ? "light" : "dark"
105284
105290
  };
105285
105291
  }
105292
+ return { visible: !1, interactive: !1 };
105286
105293
  }
105287
105294
  setOutdoorViewLoaded() {
105288
- if (pr.log("Outdoor view loaded!"), this.outdoorViewLoaded = !0, document.head.querySelector('[itemprop="outdoor-tiles-loaded"]') != null)
105295
+ if (dr.log("Outdoor view loaded!"), this.outdoorViewLoaded = !0, document.head.querySelector('[itemprop="outdoor-tiles-loaded"]') != null)
105289
105296
  return;
105290
105297
  const e = document.createElement("meta");
105291
105298
  e.setAttribute("itemprop", "outdoor-tiles-loaded"), document.head.appendChild(e);
@@ -105305,7 +105312,7 @@ class qDt {
105305
105312
  }
105306
105313
  async init(e) {
105307
105314
  this.container = e;
105308
- const r = this.rootStore.startupOptions.outdoorMapsKey ?? "f8fd42d9e1c2751f", i = {
105315
+ const r = this.rootStore.startupOptions.outdoorMapsKey ?? "zixaliyV5cGjHU", i = {
105309
105316
  auto: !1,
105310
105317
  // In campus mode, we need to load the outdoors first
105311
105318
  initialFloor: this.rootStore.isCampus ? this.rootStore.defaultFloor : this.rootStore.currentFloor,
@@ -105336,9 +105343,9 @@ class qDt {
105336
105343
  });
105337
105344
  try {
105338
105345
  const n = performance.now();
105339
- pr.log("Showing 3d map...", e);
105346
+ dr.log("Showing 3d map...", e);
105340
105347
  const s = await sbt(e, this.rootStore.data, i);
105341
- return this.__mv = s, pr.log("Initialized 3D map in", performance.now() - n, "ms"), this.rootStore.isCampus && Xl(() => {
105348
+ return this.__mv = s, dr.log("Initialized 3D map in", performance.now() - n, "ms"), this.rootStore.isCampus && Xl(() => {
105342
105349
  this.dynamicFocus = new WDt(s, {
105343
105350
  indoorZoomThreshold: this.camera.zoomBreakpoints.facadesIndoor,
105344
105351
  outdoorZoomThreshold: this.camera.zoomBreakpoints.facadesOutdoor,
@@ -105347,7 +105354,7 @@ class qDt {
105347
105354
  mode: this.rootStore.dynamicFocusBuildingChangeMode,
105348
105355
  autoAdjustFacadeHeights: !0,
105349
105356
  preloadFloors: !1
105350
- }), pr.log(
105357
+ }), dr.log(
105351
105358
  `Initialized Dynamic Focus with building change mode "${this.dynamicFocus.getState().mode}"`
105352
105359
  ), setTimeout(() => {
105353
105360
  var o;
@@ -105360,7 +105367,7 @@ class qDt {
105360
105367
  bearingAndPitch: !1
105361
105368
  }), this.geometries.updateHoverColors(s), s.on("outdoor-view-loaded", this.setOutdoorViewLoaded), setTimeout(
105362
105369
  Wc(() => {
105363
- this.outdoorViewLoaded || (this.outdoorViewTimedOut = !0, pr.warn("Outdoor view timed out!"));
105370
+ this.outdoorViewLoaded || (this.outdoorViewTimedOut = !0, dr.warn("Outdoor view timed out!"));
105364
105371
  }),
105365
105372
  3e3
105366
105373
  ), new Promise(
@@ -105371,7 +105378,7 @@ class qDt {
105371
105378
  })
105372
105379
  );
105373
105380
  } catch (n) {
105374
- pr.error("Failed to initialize map", n), Xl(() => {
105381
+ dr.error("Failed to initialize map", n), Xl(() => {
105375
105382
  this.renderFailed = !0;
105376
105383
  });
105377
105384
  }
@@ -105903,7 +105910,7 @@ const oLt = (t) => {
105903
105910
  for (const T of t.getByType(_5.__type))
105904
105911
  for (const O of T.spaces)
105905
105912
  _[O.id] = T;
105906
- return pr.log("Processed places in", performance.now() - C, "ms"), {
105913
+ return dr.log("Processed places in", performance.now() - C, "ms"), {
105907
105914
  places: e,
105908
105915
  placesById: r,
105909
105916
  placesByExternalId: i,
@@ -107246,7 +107253,7 @@ const _Ee = 2, CLt = " ", wEe = ",", Nue = (t) => t.map((e) => {
107246
107253
  continue;
107247
107254
  const g = a * 0.2, v = Math.max(0, p - g);
107248
107255
  let A = c.substring(v, v + a);
107249
- r && pr.log(c, v, v + a, A), v > 0 && A.length > a - 3 ? A = "..." + A.substring(0, A.length - 3) : v > 0 && (A = "..." + A), l.push(A);
107256
+ r && dr.log(c, v, v + a, A), v > 0 && A.length > a - 3 ? A = "..." + A.substring(0, A.length - 3) : v > 0 && (A = "..." + A), l.push(A);
107250
107257
  }
107251
107258
  let u = "";
107252
107259
  for (let c = 0; c < l.length; c++)
@@ -107329,7 +107336,7 @@ class MLt {
107329
107336
  const n = performance.now(), s = this.rootStore.places.filter(
107330
107337
  (o) => Ws.is(o) || vEt(o).length === 0
107331
107338
  );
107332
- await this.index.addAllAsync(s), pr.log("Search index initialized in", performance.now() - n, "ms"), Xl(() => {
107339
+ await this.index.addAllAsync(s), dr.log("Search index initialized in", performance.now() - n, "ms"), Xl(() => {
107333
107340
  this.initialized = !0;
107334
107341
  });
107335
107342
  }
@@ -107539,7 +107546,7 @@ const xEe = (t) => t.geometry.type === "Point", ILt = () => ({
107539
107546
  for (const u of l)
107540
107547
  s[u] = l;
107541
107548
  }
107542
- return pr.log("Processed MVF in", performance.now() - e, "ms"), {
107549
+ return dr.log("Processed MVF in", performance.now() - e, "ms"), {
107543
107550
  connectionSpaceById: r,
107544
107551
  connectionSpaceIdsByLatLonFloor: i,
107545
107552
  connectionSpaceIdsByLatLon: n,
@@ -110553,7 +110560,7 @@ class UTt {
110553
110560
  building: (o = this.rootStore.currentFloorStack) == null ? void 0 : o.id
110554
110561
  }
110555
110562
  }, r = zTt.safeParse(e);
110556
- r.success ? this.sendMessage(e) : pr.error("Unable to send state changed message", r.error.message, e);
110563
+ r.success ? this.sendMessage(e) : dr.error("Unable to send state changed message", r.error.message, e);
110557
110564
  });
110558
110565
  /**
110559
110566
  * Inform the parent window that the app has loaded.
@@ -110562,7 +110569,7 @@ class UTt {
110562
110569
  const e = {
110563
110570
  type: "app-loaded"
110564
110571
  }, r = VTt.safeParse(e);
110565
- r.success ? this.sendMessage(e) : pr.error("Unable to send app loaded message", r.error.message, e);
110572
+ r.success ? this.sendMessage(e) : dr.error("Unable to send app loaded message", r.error.message, e);
110566
110573
  });
110567
110574
  /**
110568
110575
  * Update the app state based on a set state message from the parent window.
@@ -110570,7 +110577,7 @@ class UTt {
110570
110577
  Ve(this, "handleSetStateMessage", (e) => {
110571
110578
  const r = $Tt.safeParse(e);
110572
110579
  if (!r.success)
110573
- return pr.warn("Unable to handle set state message", r.error.message, e), !1;
110580
+ return dr.warn("Unable to handle set state message", r.error.message, e), !1;
110574
110581
  const { state: i, location: n, departure: s, floor: o, building: a } = r.data.payload;
110575
110582
  i != null && this.rootStore.setState(i);
110576
110583
  const l = this.toPlaces(n);
@@ -110582,7 +110589,7 @@ class UTt {
110582
110589
  const c = o != null ? this.rootStore.resolveFloor(o) : void 0;
110583
110590
  c != null && this.rootStore.setCurrentFloor(c);
110584
110591
  const h = a != null ? this.rootStore.resolveFloorStack(a) : void 0;
110585
- return h != null && (c != null ? pr.warn("Floor was provided! Ignoring building.") : this.rootStore.setCurrentFloor(h.defaultFloor ?? h.floors[0])), !0;
110592
+ return h != null && (c != null ? dr.warn("Floor was provided! Ignoring building.") : this.rootStore.setCurrentFloor(h.defaultFloor ?? h.floors[0])), !0;
110586
110593
  });
110587
110594
  /**
110588
110595
  * Handle a message from the parent window.
@@ -110591,12 +110598,12 @@ class UTt {
110591
110598
  if (!this.enabled)
110592
110599
  return;
110593
110600
  const r = e.data;
110594
- pr.log("Recieved message", r);
110601
+ dr.log("Recieved message", r);
110595
110602
  const i = [this.handleSetStateMessage];
110596
110603
  for (const n of i)
110597
110604
  if (n(r))
110598
110605
  return;
110599
- pr.warn("Unhandled message!");
110606
+ dr.warn("Unhandled message!");
110600
110607
  });
110601
110608
  /**
110602
110609
  * Send a message to the parent window.
@@ -110615,7 +110622,7 @@ class UTt {
110615
110622
  ],
110616
110623
  () => this.sendStateChangedMessage()
110617
110624
  )
110618
- ), pr.log("Message API ready!"), this.sendAppLoadedMessage());
110625
+ ), dr.log("Message API ready!"), this.sendAppLoadedMessage());
110619
110626
  }
110620
110627
  get enabled() {
110621
110628
  return this.rootStore.isAppEmbedded;
@@ -110728,7 +110735,7 @@ function eBt(t, e) {
110728
110735
  const Gue = (t, e) => e in t && t[e] != null, kEe = (t) => {
110729
110736
  if (t.hideRouterState && t.mapId == null)
110730
110737
  throw new Error("mapId is required when using hideRouterState");
110731
- t.hideMapIdInUrl && t.hideRouterState && pr.warn("hideRouterState is set to true, so hideMapIdInUrl will have no effect"), Gue(t, "authDataUrl") && !Gue(t, "authUrl") && pr.warn("authDataUrl is set, but authUrl is not set; this will have no effect");
110738
+ t.hideMapIdInUrl && t.hideRouterState && dr.warn("hideRouterState is set to true, so hideMapIdInUrl will have no effect"), Gue(t, "authDataUrl") && !Gue(t, "authUrl") && dr.warn("authDataUrl is set, but authUrl is not set; this will have no effect");
110732
110739
  }, ete = (t) => !("data" in t), tBt = (t) => "data" in t, ep = Se.createContext({}), rBt = 10, iBt = ["manifest.geojson", "styles.json"];
110733
110740
  class Yue {
110734
110741
  constructor({
@@ -111052,7 +111059,7 @@ class Yue {
111052
111059
  if (e == null)
111053
111060
  return;
111054
111061
  const r = Fg(e, 0, 68);
111055
- return r !== e && pr.warn(`Pitch should be between 0 and 68, but was ${e}. Rounding to ${r}`), r;
111062
+ return r !== e && dr.warn(`Pitch should be between 0 and 68, but was ${e}. Rounding to ${r}`), r;
111056
111063
  }
111057
111064
  /**
111058
111065
  * The initial bearing from the router params or MVF. To get the initial bearing with defaults from
@@ -111108,7 +111115,7 @@ class Yue {
111108
111115
  }
111109
111116
  get floorClosestToGroundLevel() {
111110
111117
  if (!M2(this.nonEmptyFloors, 1))
111111
- throw new Error("No maps found");
111118
+ return dr.warn("No floors found"), this.data.getByType("floor")[0];
111112
111119
  const e = this.sortedAllFloors;
111113
111120
  if (r5(e))
111114
111121
  return e[0];
@@ -111354,7 +111361,7 @@ class Yue {
111354
111361
  * Only use this from within the editor preview.
111355
111362
  */
111356
111363
  setSelectedPlacesByMVFIds(e) {
111357
- this.isMakerPreview || pr.warn("setSelectedPlacesByMVFIds should only be used in the editor preview!"), this.routerStore.go(this.routerStore.path, {
111364
+ this.isMakerPreview || dr.warn("setSelectedPlacesByMVFIds should only be used in the editor preview!"), this.routerStore.go(this.routerStore.path, {
111358
111365
  location: e
111359
111366
  });
111360
111367
  }
@@ -111467,7 +111474,7 @@ class Yue {
111467
111474
  continue;
111468
111475
  const o = this.geometryRbushByFloorId[s.id];
111469
111476
  if (o == null) {
111470
- pr.error("No geometry RBush found for floor", s.id);
111477
+ dr.error("No geometry RBush found for floor", s.id);
111471
111478
  continue;
111472
111479
  }
111473
111480
  const a = dEe([e.longitude, e.latitude]), l = o.search(a);
@@ -111853,7 +111860,7 @@ const $Ee = (t, e = {}) => {
111853
111860
  const [r, i] = M5(null), n = Se.useRef(null), s = e.enabled ?? !0;
111854
111861
  Se.useEffect(() => {
111855
111862
  if (r != null)
111856
- return pr.log("Creating new HiResCanvas..."), n.current = new SBt(r, t, e), () => {
111863
+ return dr.log("Creating new HiResCanvas..."), n.current = new SBt(r, t, e), () => {
111857
111864
  var a;
111858
111865
  (a = n.current) == null || a.destroy();
111859
111866
  };
@@ -112014,10 +112021,10 @@ const $Ee = (t, e = {}) => {
112014
112021
  r(null);
112015
112022
  }, u = (c) => {
112016
112023
  var g;
112017
- pr.log("Showing context menu");
112024
+ dr.log("Showing context menu");
112018
112025
  const h = (g = t.current) == null ? void 0 : g.getBoundingClientRect();
112019
112026
  if (h == null) {
112020
- pr.error("No container found for context menu!");
112027
+ dr.error("No container found for context menu!");
112021
112028
  return;
112022
112029
  }
112023
112030
  const d = c.clientX - h.left, p = c.clientY - h.top;
@@ -112131,7 +112138,7 @@ const $Ee = (t, e = {}) => {
112131
112138
  r == null && (r = a / GBt);
112132
112139
  const l = a / 2;
112133
112140
  if (r < l)
112134
- return pr.warn(`Cannot fit an arc with radius ${r} between points ${t} and ${e}`), QBt;
112141
+ return dr.warn(`Cannot fit an arc with radius ${r} between points ${t} and ${e}`), QBt;
112135
112142
  const u = Math.sqrt(r * r - a * a / 4), c = Math.atan2(o, s);
112136
112143
  let h = i - u * Math.sin(c), d = n + u * Math.cos(c);
112137
112144
  d < n && (h = i + (i - h), d = n + (n - d));
@@ -121102,7 +121109,7 @@ Behavioral notes:
121102
121109
  if (e === "json")
121103
121110
  throw new Error("JSON format is no longer supported");
121104
121111
  if (e === "mvf") {
121105
- iNt(t.data) || pr.warn(
121112
+ iNt(t.data) || dr.warn(
121106
121113
  "An problem was detected with the MVF data provided! This may cause issues rendering.",
121107
121114
  nNt(t.data)
121108
121115
  );
@@ -121135,10 +121142,10 @@ Behavioral notes:
121135
121142
  return i;
121136
121143
  }, lNt = (t) => {
121137
121144
  const e = Rfe();
121138
- e.error != null && pr.error(e.error);
121145
+ e.error != null && dr.error(e.error);
121139
121146
  const r = t.mapId ?? e.venueId, i = t.configId ?? e.configId;
121140
121147
  let n = e.combinedId;
121141
- return n == null && r != null && i != null ? n = `${r}-${i}` : n == null && r != null ? n = r : n == null && i != null && pr.error("Specified config ID without a venue ID"), { venueId: r, configId: i, combinedId: n };
121148
+ return n == null && r != null && i != null ? n = `${r}-${i}` : n == null && r != null ? n = r : n == null && i != null && dr.error("Specified config ID without a venue ID"), { venueId: r, configId: i, combinedId: n };
121142
121149
  }, uNt = (t) => {
121143
121150
  if (t.hideRouterState) {
121144
121151
  const e = window.location.pathname + window.location.search;
@@ -121169,7 +121176,7 @@ Behavioral notes:
121169
121176
  const D = new eNe();
121170
121177
  await D.init(), (E = (x = D.flags) == null ? void 0 : x[Jl.ONLINE_DIRECTIONS]) != null && E.variant && t.onlineDirections == null && (t.onlineDirections = !0);
121171
121178
  const { data: L, mvf: B, theme: T, authUrl: O } = await aNt(g, t, D);
121172
- typeof t.onMVFParsed == "function" && t.onMVFParsed(B), O != null && ete(t) && (t.authUrl = O), globalThis.RootStore instanceof Yue && pr.warn("RootStore already exists, overwriting it");
121179
+ typeof t.onMVFParsed == "function" && t.onMVFParsed(B), O != null && ete(t) && (t.authUrl = O), globalThis.RootStore instanceof Yue && dr.warn("RootStore already exists, overwriting it");
121173
121180
  let N = `${t.baseUrl ?? "/map"}/`;
121174
121181
  !t.hideMapIdInUrl && g != null && (N = `${N}${g}`);
121175
121182
  const z = new nFt({
@@ -121189,9 +121196,11 @@ Behavioral notes:
121189
121196
  theme: T,
121190
121197
  featureFlagStore: D
121191
121198
  });
121199
+ if (F.nonEmptyFloors.length < 1)
121200
+ throw new Error("Map has no non-empty floors!");
121192
121201
  l(F), (I = t.onRootStore) == null || I.call(t, F);
121193
121202
  } catch (D) {
121194
- abt(D) && c(D), pr.error(D), o(!0), KOe("not-found");
121203
+ abt(D) && c(D), dr.error(D), o(!0), KOe("not-found");
121195
121204
  } finally {
121196
121205
  n(!1);
121197
121206
  }
@@ -121492,14 +121501,14 @@ Behavioral notes:
121492
121501
  `, Y9 = (t, e) => {
121493
121502
  const [r, i] = Se.useState(!1), n = Se.useCallback(() => {
121494
121503
  var o, a;
121495
- r || (i(!0), (o = e == null ? void 0 : e.onFocus) == null || o.call(e), e != null && e.debug && pr.log("focus", document.activeElement), typeof (e == null ? void 0 : e.onKeyboardFocus) == "function" && t.current != null && t.current.matches(":focus-visible") && ((a = e == null ? void 0 : e.onKeyboardFocus) == null || a.call(e)));
121504
+ r || (i(!0), (o = e == null ? void 0 : e.onFocus) == null || o.call(e), e != null && e.debug && dr.log("focus", document.activeElement), typeof (e == null ? void 0 : e.onKeyboardFocus) == "function" && t.current != null && t.current.matches(":focus-visible") && ((a = e == null ? void 0 : e.onKeyboardFocus) == null || a.call(e)));
121496
121505
  }, [r]), s = Se.useCallback(
121497
121506
  (o) => {
121498
121507
  var c;
121499
121508
  if (!r)
121500
121509
  return;
121501
121510
  const a = o.currentTarget, l = o.target, u = o.relatedTarget;
121502
- e != null && e.debug && pr.log("blur", {
121511
+ e != null && e.debug && dr.log("blur", {
121503
121512
  currentTarget: a,
121504
121513
  target: l,
121505
121514
  relatedTarget: u,
@@ -122974,7 +122983,7 @@ const WMe = ({ resizeWidth: t, resizeHeight: e, maxHeight: r, maxWidth: i } = {}
122974
122983
  );
122975
122984
  }, KMe = {
122976
122985
  isDirectionsSearchBarFocused: !1
122977
- }, eSe = Se.createContext({}), i$t = (t, e) => Object.keys(e).some((r) => !Object.keys(KMe).includes(r)) ? (pr.warn("Cannot update state! New state is trying to override external dependencies.", e), t) : { ...t, ...e }, n$t = (t) => {
122986
+ }, eSe = Se.createContext({}), i$t = (t, e) => Object.keys(e).some((r) => !Object.keys(KMe).includes(r)) ? (dr.warn("Cannot update state! New state is trying to override external dependencies.", e), t) : { ...t, ...e }, n$t = (t) => {
122978
122987
  const [e, r] = Se.useReducer(i$t, KMe);
122979
122988
  return [Se.useMemo(() => ({ ...t, ...e }), [e, t]), r];
122980
122989
  }, YO = () => {
@@ -126074,13 +126083,13 @@ const tVt = ({ color: t = ef.color, changeFrequency: e = ef.changeFrequency, rad
126074
126083
  );
126075
126084
  }, nVt = ({ timeout: t, gracePeriod: e, enabled: r = !0, onTimeout: i, debug: n }) => {
126076
126085
  const [s, o] = Se.useState(!1), a = Se.useRef(null), l = Se.useRef(null), u = () => {
126077
- n && pr.log("clearTimers"), a.current && clearTimeout(a.current), l.current && clearTimeout(l.current), o(!1);
126086
+ n && dr.log("clearTimers"), a.current && clearTimeout(a.current), l.current && clearTimeout(l.current), o(!1);
126078
126087
  }, c = () => {
126079
- n && pr.log("startTimeout"), r && (u(), a.current = setTimeout(() => {
126088
+ n && dr.log("startTimeout"), r && (u(), a.current = setTimeout(() => {
126080
126089
  h();
126081
126090
  }, t * 1e3));
126082
126091
  }, h = () => {
126083
- n && pr.log("startGracePeriod"), r && (u(), o(!0), l.current = setTimeout(() => {
126092
+ n && dr.log("startGracePeriod"), r && (u(), o(!0), l.current = setTimeout(() => {
126084
126093
  o(!1), i == null || i(), c();
126085
126094
  }, e * 1e3));
126086
126095
  };
@@ -129270,7 +129279,7 @@ const LSe = (t, e) => Se.useMemo(() => {
129270
129279
  };
129271
129280
  return s(t);
129272
129281
  }, [t, r]);
129273
- return r && pr.log("isEmpty", n, Se.Children.toArray(t)), /* @__PURE__ */ W.jsx(XVt, { className: e, ...i, style: { ...n ? { display: "none" } : {}, ...i.style }, children: t });
129282
+ return r && dr.log("isEmpty", n, Se.Children.toArray(t)), /* @__PURE__ */ W.jsx(XVt, { className: e, ...i, style: { ...n ? { display: "none" } : {}, ...i.style }, children: t });
129274
129283
  }, nre = Fbt(JVt, dW), KVt = At(ire)``, eUt = At.div`
129275
129284
  display: flex;
129276
129285
  flex-direction: row;
@@ -132046,9 +132055,9 @@ function VHt() {
132046
132055
  }
132047
132056
  }
132048
132057
  }
132049
- for (var dr = gt.start; dr <= gt.end; dr++) {
132050
- var $i = at[dr], si = ve[dr];
132051
- if ($i & 1 ? si & (D | B | N) && at[dr]++ : si & L ? at[dr]++ : si & (N | B) && (at[dr] += 2), si & l && (at[dr] = dr === 0 ? gt.level : at[dr - 1]), dr === gt.end || d($e[dr]) & (Y | F)) for (var Ki = dr; Ki >= 0 && d($e[Ki]) & u; Ki--) at[Ki] = gt.level;
132058
+ for (var pr = gt.start; pr <= gt.end; pr++) {
132059
+ var $i = at[pr], si = ve[pr];
132060
+ if ($i & 1 ? si & (D | B | N) && at[pr]++ : si & L ? at[pr]++ : si & (N | B) && (at[pr] += 2), si & l && (at[pr] = pr === 0 ? gt.level : at[pr - 1]), pr === gt.end || d($e[pr]) & (Y | F)) for (var Ki = pr; Ki >= 0 && d($e[Ki]) & u; Ki--) at[Ki] = gt.level;
132052
132061
  }
132053
132062
  }
132054
132063
  return { levels: at, paragraphs: it };
@@ -82,6 +82,10 @@ export type TStartViewerCommonOptions = {
82
82
  * Show the debug panel.
83
83
  */
84
84
  debugPanel?: boolean;
85
+ /**
86
+ * Specifies if the Mappedin watermark in the SDK should be hidden.
87
+ */
88
+ hideWatermark?: boolean;
85
89
  };
86
90
  export type TStartViewerOptions = {
87
91
  /**
@@ -209,14 +209,14 @@ declare class RootStore {
209
209
  get outdoorFloor(): Floor | undefined;
210
210
  get sortedAllFloors(): Floor[];
211
211
  get sortedFloorsByFloorStack(): Map<FloorStack, Floor[]>;
212
- get floorClosestToGroundLevel(): Floor;
212
+ get floorClosestToGroundLevel(): Floor | undefined;
213
213
  get selectedPlaces(): Place[] | undefined;
214
214
  get selectedCategory(): LocationCategory | undefined;
215
215
  get similarPlaces(): Place[] | undefined;
216
216
  get departures(): Place[] | undefined;
217
217
  get placeIdsWithLocationIcon(): Set<string>;
218
218
  get youAreHere(): Coordinate | undefined;
219
- get defaultFloor(): Floor;
219
+ get defaultFloor(): Floor | undefined;
220
220
  get currentFloor(): Floor | undefined;
221
221
  get state(): E_APP_STATE;
222
222
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappedin/viewer",
3
- "version": "0.52.1-e4b38e0.0",
3
+ "version": "0.52.1",
4
4
  "type": "module",
5
5
  "browser": "./dist/index.js",
6
6
  "license": "UNLICENSED",