@stadiamaps/ferrostar-webcomponents 0.29.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ferrostar-map.d.ts","sourceRoot":"","sources":["../src/ferrostar-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;AAEvE,OAAO,UAAU,EAAE,EACjB,gBAAgB,EAEhB,UAAU,EACV,GAAG,EACJ,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,SAAS,EACV,MAAM,uBAAuB,CAAC;AAC/B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,sBAAsB,CAAC;AAI9B;;GAEG;AACH,qBACa,YAAa,SAAQ,UAAU;IAE1C,mBAAmB,EAAE,MAAM,CAAM;IAGjC,QAAQ,EAAE,MAAM,CAAM;IAGtB,OAAO,EAAE,MAAM,CAAM;IAGrB,MAAM,EAAE,UAAU,GAAG,IAAI,CAAQ;IAGjC,KAAK,EAAE,MAAM,CAAM;IAGnB,IAAI,EAAE,MAAM,CAAK;IAGjB,UAAU,CAAC,EAAE,QAAQ,CAAS;IAI9B,gBAAgB,EAAG,GAAG,CAAC;IAIvB,OAAO,EAAE,MAAM,CAAM;IAGrB,SAAS,CAAC,UAAU,EAAE,SAAS,GAAG,IAAI,CAAQ;IAE9C;;;;;;;;OAQG;IAEH,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAGlC,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAGvC,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAGtC,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAEzD;;;OAGG;IA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cAAc,CAAC,IAAI,CAAC;IA+B/C,YAAY;IASZ;;;;;OAKG;IACH,OAAO;IAkCD,SAAS,CAAC,eAAe,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG;IAoCpD,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG;IAmFjC,cAAc;IAYpB,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,iBAAiB;IA+CzB,OAAO,CAAC,QAAQ;IAOhB,MAAM;CA+BP"}
@@ -1,4 +1,4 @@
1
- import { css as f, LitElement as w, html as x, unsafeCSS as G } from "lit";
1
+ import { css as w, LitElement as x, html as O, unsafeCSS as G } from "lit";
2
2
  import L, { LngLat as W, GeolocateControl as k } from "maplibre-gl";
3
3
  import { locationSimulationFromRoute as K, advanceLocationSimulation as P, RouteAdapter as B, NavigationController as Z } from "@stadiamaps/ferrostar";
4
4
  /**
@@ -6,7 +6,7 @@ import { locationSimulationFromRoute as K, advanceLocationSimulation as P, Route
6
6
  * Copyright 2017 Google LLC
7
7
  * SPDX-License-Identifier: BSD-3-Clause
8
8
  */
9
- const O = (a) => (t, e) => {
9
+ const S = (a) => (t, e) => {
10
10
  e !== void 0 ? e.addInitializer(() => {
11
11
  customElements.define(a, t);
12
12
  }) : customElements.define(a, t);
@@ -16,7 +16,7 @@ const O = (a) => (t, e) => {
16
16
  * Copyright 2019 Google LLC
17
17
  * SPDX-License-Identifier: BSD-3-Clause
18
18
  */
19
- const m = globalThis, A = m.ShadowRoot && (m.ShadyCSS === void 0 || m.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, E = Symbol(), N = /* @__PURE__ */ new WeakMap();
19
+ const v = globalThis, A = v.ShadowRoot && (v.ShadyCSS === void 0 || v.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, E = Symbol(), N = /* @__PURE__ */ new WeakMap();
20
20
  let T = class {
21
21
  constructor(t, e, i) {
22
22
  if (this._$cssResult$ = true, i !== E) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
@@ -38,7 +38,7 @@ let T = class {
38
38
  const $ = (a) => new T(typeof a == "string" ? a : a + "", void 0, E), U = (a, t) => {
39
39
  if (A) a.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
40
40
  else for (const e of t) {
41
- const i = document.createElement("style"), l = m.litNonce;
41
+ const i = document.createElement("style"), l = v.litNonce;
42
42
  l !== void 0 && i.setAttribute("nonce", l), i.textContent = e.cssText, a.appendChild(i);
43
43
  }
44
44
  }, I = A ? (a) => a : (a) => a instanceof CSSStyleSheet ? ((t) => {
@@ -51,7 +51,7 @@ const $ = (a) => new T(typeof a == "string" ? a : a + "", void 0, E), U = (a, t)
51
51
  * Copyright 2017 Google LLC
52
52
  * SPDX-License-Identifier: BSD-3-Clause
53
53
  */
54
- const { is: D, defineProperty: F, getOwnPropertyDescriptor: J, getOwnPropertyNames: X, getOwnPropertySymbols: Q, getPrototypeOf: Y } = Object, S = globalThis, M = S.trustedTypes, t0 = M ? M.emptyScript : "", e0 = S.reactiveElementPolyfillSupport, p = (a, t) => a, v = { toAttribute(a, t) {
54
+ const { is: D, defineProperty: F, getOwnPropertyDescriptor: J, getOwnPropertyNames: X, getOwnPropertySymbols: Q, getPrototypeOf: Y } = Object, y = globalThis, M = y.trustedTypes, t0 = M ? M.emptyScript : "", e0 = y.reactiveElementPolyfillSupport, m = (a, t) => a, u = { toAttribute(a, t) {
55
55
  switch (t) {
56
56
  case Boolean:
57
57
  a = a ? t0 : null;
@@ -79,9 +79,9 @@ const { is: D, defineProperty: F, getOwnPropertyDescriptor: J, getOwnPropertyNam
79
79
  }
80
80
  }
81
81
  return e;
82
- } }, C = (a, t) => !D(a, t), z = { attribute: true, type: String, converter: v, reflect: false, hasChanged: C };
83
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), S.litPropertyMetadata ?? (S.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
84
- class h extends HTMLElement {
82
+ } }, C = (a, t) => !D(a, t), z = { attribute: true, type: String, converter: u, reflect: false, hasChanged: C };
83
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), y.litPropertyMetadata ?? (y.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
84
+ class d extends HTMLElement {
85
85
  static addInitializer(t) {
86
86
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
87
87
  }
@@ -111,13 +111,13 @@ class h extends HTMLElement {
111
111
  return this.elementProperties.get(t) ?? z;
112
112
  }
113
113
  static _$Ei() {
114
- if (this.hasOwnProperty(p("elementProperties"))) return;
114
+ if (this.hasOwnProperty(m("elementProperties"))) return;
115
115
  const t = Y(this);
116
116
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
117
117
  }
118
118
  static finalize() {
119
- if (this.hasOwnProperty(p("finalized"))) return;
120
- if (this.finalized = true, this._$Ei(), this.hasOwnProperty(p("properties"))) {
119
+ if (this.hasOwnProperty(m("finalized"))) return;
120
+ if (this.finalized = true, this._$Ei(), this.hasOwnProperty(m("properties"))) {
121
121
  const e = this.properties, i = [...X(e), ...Q(e)];
122
122
  for (const l of i) this.createProperty(l, e[l]);
123
123
  }
@@ -192,7 +192,7 @@ class h extends HTMLElement {
192
192
  var _a;
193
193
  const i = this.constructor.elementProperties.get(t), l = this.constructor._$Eu(t, i);
194
194
  if (l !== void 0 && i.reflect === true) {
195
- const o = (((_a = i.converter) == null ? void 0 : _a.toAttribute) !== void 0 ? i.converter : v).toAttribute(e, i.type);
195
+ const o = (((_a = i.converter) == null ? void 0 : _a.toAttribute) !== void 0 ? i.converter : u).toAttribute(e, i.type);
196
196
  this._$Em = t, o == null ? this.removeAttribute(l) : this.setAttribute(l, o), this._$Em = null;
197
197
  }
198
198
  }
@@ -200,7 +200,7 @@ class h extends HTMLElement {
200
200
  var _a;
201
201
  const i = this.constructor, l = i._$Eh.get(t);
202
202
  if (l !== void 0 && this._$Em !== l) {
203
- const o = i.getPropertyOptions(l), r = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((_a = o.converter) == null ? void 0 : _a.fromAttribute) !== void 0 ? o.converter : v;
203
+ const o = i.getPropertyOptions(l), r = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((_a = o.converter) == null ? void 0 : _a.fromAttribute) !== void 0 ? o.converter : u;
204
204
  this._$Em = l, this[l] = r.fromAttribute(e, o.type), this._$Em = null;
205
205
  }
206
206
  }
@@ -279,20 +279,20 @@ class h extends HTMLElement {
279
279
  firstUpdated(t) {
280
280
  }
281
281
  }
282
- h.elementStyles = [], h.shadowRootOptions = { mode: "open" }, h[p("elementProperties")] = /* @__PURE__ */ new Map(), h[p("finalized")] = /* @__PURE__ */ new Map(), e0 == null ? void 0 : e0({ ReactiveElement: h }), (S.reactiveElementVersions ?? (S.reactiveElementVersions = [])).push("2.0.4");
282
+ d.elementStyles = [], d.shadowRootOptions = { mode: "open" }, d[m("elementProperties")] = /* @__PURE__ */ new Map(), d[m("finalized")] = /* @__PURE__ */ new Map(), e0 == null ? void 0 : e0({ ReactiveElement: d }), (y.reactiveElementVersions ?? (y.reactiveElementVersions = [])).push("2.0.4");
283
283
  /**
284
284
  * @license
285
285
  * Copyright 2017 Google LLC
286
286
  * SPDX-License-Identifier: BSD-3-Clause
287
287
  */
288
- const a0 = { attribute: true, type: String, converter: v, reflect: false, hasChanged: C }, i0 = (a = a0, t, e) => {
288
+ const a0 = { attribute: true, type: String, converter: u, reflect: false, hasChanged: C }, i0 = (a = a0, t, e) => {
289
289
  const { kind: i, metadata: l } = e;
290
290
  let o = globalThis.litPropertyMetadata.get(l);
291
291
  if (o === void 0 && globalThis.litPropertyMetadata.set(l, o = /* @__PURE__ */ new Map()), o.set(e.name, a), i === "accessor") {
292
292
  const { name: r } = e;
293
293
  return { set(g) {
294
- const y = t.get.call(this);
295
- t.set.call(this, g), this.requestUpdate(r, y, a);
294
+ const h = t.get.call(this);
295
+ t.set.call(this, g), this.requestUpdate(r, h, a);
296
296
  }, init(g) {
297
297
  return g !== void 0 && this.P(r, void 0, a), g;
298
298
  } };
@@ -300,8 +300,8 @@ const a0 = { attribute: true, type: String, converter: v, reflect: false, hasCha
300
300
  if (i === "setter") {
301
301
  const { name: r } = e;
302
302
  return function(g) {
303
- const y = this[r];
304
- t.call(this, g), this.requestUpdate(r, y, a);
303
+ const h = this[r];
304
+ t.call(this, g), this.requestUpdate(r, h, a);
305
305
  };
306
306
  }
307
307
  throw Error("Unsupported decorator location: " + i);
@@ -588,7 +588,7 @@ var _3 = Object.defineProperty, b3 = Object.getOwnPropertyDescriptor, R = (a, t,
588
588
  return i && l && _3(t, e, l), l;
589
589
  };
590
590
  const f3 = /* @__PURE__ */ Object.assign({ "./assets/directions/arrive.svg": s0, "./assets/directions/arrive_left.svg": c0, "./assets/directions/arrive_right.svg": h0, "./assets/directions/arrive_straight.svg": p0, "./assets/directions/close.svg": m0, "./assets/directions/continue.svg": u0, "./assets/directions/continue_left.svg": b0, "./assets/directions/continue_right.svg": w0, "./assets/directions/continue_slight_left.svg": O0, "./assets/directions/continue_slight_right.svg": y0, "./assets/directions/continue_straight.svg": C0, "./assets/directions/continue_uturn.svg": N0, "./assets/directions/depart.svg": M0, "./assets/directions/depart_left.svg": q0, "./assets/directions/depart_right.svg": V0, "./assets/directions/depart_straight.svg": H0, "./assets/directions/end_of_road_left.svg": G0, "./assets/directions/end_of_road_right.svg": k0, "./assets/directions/flag.svg": P0, "./assets/directions/fork.svg": Z0, "./assets/directions/fork_left.svg": $0, "./assets/directions/fork_right.svg": D0, "./assets/directions/fork_slight_left.svg": J0, "./assets/directions/fork_slight_right.svg": Q0, "./assets/directions/fork_straight.svg": t1, "./assets/directions/invalid.svg": a1, "./assets/directions/invalid_left.svg": l1, "./assets/directions/invalid_right.svg": r1, "./assets/directions/invalid_slight_left.svg": n1, "./assets/directions/invalid_slight_right.svg": g1, "./assets/directions/invalid_straight.svg": d1, "./assets/directions/invalid_uturn.svg": m1, "./assets/directions/merge_left.svg": u1, "./assets/directions/merge_right.svg": b1, "./assets/directions/merge_slight_left.svg": w1, "./assets/directions/merge_slight_right.svg": O1, "./assets/directions/merge_straight.svg": y1, "./assets/directions/new_name_left.svg": C1, "./assets/directions/new_name_right.svg": N1, "./assets/directions/new_name_sharp_left.svg": M1, "./assets/directions/new_name_sharp_right.svg": q1, "./assets/directions/new_name_slight_left.svg": V1, "./assets/directions/new_name_slight_right.svg": H1, "./assets/directions/new_name_straight.svg": G1, "./assets/directions/notification_left.svg": k1, "./assets/directions/notification_right.svg": P1, "./assets/directions/notification_sharp_left.svg": Z1, "./assets/directions/notification_sharp_right.svg": $1, "./assets/directions/notification_slight_left.svg": D1, "./assets/directions/notification_slight_right.svg": J1, "./assets/directions/notification_straight.svg": Q1, "./assets/directions/off_ramp_left.svg": t2, "./assets/directions/off_ramp_right.svg": a2, "./assets/directions/off_ramp_slight_left.svg": l2, "./assets/directions/off_ramp_slight_right.svg": r2, "./assets/directions/on_ramp_left.svg": n2, "./assets/directions/on_ramp_right.svg": g2, "./assets/directions/on_ramp_sharp_left.svg": d2, "./assets/directions/on_ramp_sharp_right.svg": m2, "./assets/directions/on_ramp_slight_left.svg": u2, "./assets/directions/on_ramp_slight_right.svg": b2, "./assets/directions/on_ramp_straight.svg": w2, "./assets/directions/rotary.svg": O2, "./assets/directions/rotary_left.svg": y2, "./assets/directions/rotary_right.svg": C2, "./assets/directions/rotary_sharp_left.svg": N2, "./assets/directions/rotary_sharp_right.svg": M2, "./assets/directions/rotary_slight_left.svg": q2, "./assets/directions/rotary_slight_right.svg": V2, "./assets/directions/rotary_straight.svg": H2, "./assets/directions/roundabout.svg": G2, "./assets/directions/roundabout_left.svg": k2, "./assets/directions/roundabout_right.svg": P2, "./assets/directions/roundabout_sharp_left.svg": Z2, "./assets/directions/roundabout_sharp_right.svg": $2, "./assets/directions/roundabout_slight_left.svg": D2, "./assets/directions/roundabout_slight_right.svg": J2, "./assets/directions/roundabout_straight.svg": Q2, "./assets/directions/turn_left.svg": t3, "./assets/directions/turn_right.svg": a3, "./assets/directions/turn_sharp_left.svg": l3, "./assets/directions/turn_sharp_right.svg": r3, "./assets/directions/turn_slight_left.svg": n3, "./assets/directions/turn_slight_right.svg": g3, "./assets/directions/turn_straight.svg": d3, "./assets/directions/updown.svg": m3, "./assets/directions/uturn.svg": u3 });
591
- let u = class extends w {
591
+ let _ = class extends x {
592
592
  constructor() {
593
593
  super(...arguments), this.visualInstruction = null;
594
594
  }
@@ -602,14 +602,14 @@ let u = class extends w {
602
602
  return f3[`./assets/directions/${this.getManeuverType().replaceAll(" ", "_")}_${this.getManeuverModifier().replaceAll(" ", "_")}.svg`].default;
603
603
  }
604
604
  render() {
605
- return x`<img
605
+ return O`<img
606
606
  src="${this.getImageUrl()}"
607
607
  alt="${this.getManeuverType()} ${this.getManeuverModifier()} maneuver"
608
608
  />`;
609
609
  }
610
610
  };
611
- u.styles = [
612
- f`
611
+ _.styles = [
612
+ w`
613
613
  img {
614
614
  width: 100%;
615
615
  height: auto;
@@ -618,16 +618,16 @@ u.styles = [
618
618
  ];
619
619
  R([
620
620
  n()
621
- ], u.prototype, "visualInstruction", 2);
622
- u = R([
623
- O("maneuver-image")
624
- ], u);
621
+ ], _.prototype, "visualInstruction", 2);
622
+ _ = R([
623
+ S("maneuver-image")
624
+ ], _);
625
625
  var w3 = Object.defineProperty, x3 = Object.getOwnPropertyDescriptor, H = (a, t, e, i) => {
626
626
  for (var l = i > 1 ? void 0 : i ? x3(t, e) : t, o = a.length - 1, r; o >= 0; o--)
627
627
  (r = a[o]) && (l = (i ? r(t, e, l) : r(l)) || l);
628
628
  return i && l && w3(t, e, l), l;
629
629
  };
630
- let _ = class extends w {
630
+ let b = class extends x {
631
631
  constructor() {
632
632
  super(...arguments), this.tripState = null;
633
633
  }
@@ -637,7 +637,7 @@ let _ = class extends w {
637
637
  render() {
638
638
  var _a;
639
639
  if ((_a = this.tripState) == null ? void 0 : _a.Navigating)
640
- return x`
640
+ return O`
641
641
  <div class="instructions-view-card">
642
642
  <maneuver-image
643
643
  .visualInstruction=${this.tripState.Navigating.visualInstruction}
@@ -656,8 +656,8 @@ let _ = class extends w {
656
656
  `;
657
657
  }
658
658
  };
659
- _.styles = [
660
- f`
659
+ b.styles = [
660
+ w`
661
661
  .instructions-view-card {
662
662
  display: flex;
663
663
  align-items: center;
@@ -695,19 +695,19 @@ _.styles = [
695
695
  ];
696
696
  H([
697
697
  n()
698
- ], _.prototype, "tripState", 2);
699
- _ = H([
700
- O("instructions-view")
701
- ], _);
698
+ ], b.prototype, "tripState", 2);
699
+ b = H([
700
+ S("instructions-view")
701
+ ], b);
702
702
  var O3 = Object.defineProperty, S3 = Object.getOwnPropertyDescriptor, j = (a, t, e, i) => {
703
703
  for (var l = i > 1 ? void 0 : i ? S3(t, e) : t, o = a.length - 1, r; o >= 0; o--)
704
704
  (r = a[o]) && (l = (i ? r(t, e, l) : r(l)) || l);
705
705
  return i && l && O3(t, e, l), l;
706
706
  };
707
- function d(a, t) {
707
+ function p(a, t) {
708
708
  return Math.round(a / t) * t;
709
709
  }
710
- let b = class extends w {
710
+ let f = class extends x {
711
711
  constructor() {
712
712
  super(...arguments), this.tripState = null;
713
713
  }
@@ -718,10 +718,10 @@ let b = class extends w {
718
718
  getDistanceRemaining(a) {
719
719
  if (a > 1e3) {
720
720
  let t = a / 1e3;
721
- return t > 1e4 ? t = d(t, 1) : t = d(t, 0.1), `${t.toLocaleString()}km`;
721
+ return t > 1e4 ? t = p(t, 1) : t = p(t, 0.1), `${t.toLocaleString()}km`;
722
722
  } else {
723
723
  let t;
724
- return a > 100 ? t = d(a, 100) : a > 10 ? t = d(a, 10) : t = d(a, 5), `${t.toLocaleString()}m`;
724
+ return a > 100 ? t = p(a, 100) : a > 10 ? t = p(a, 10) : t = p(a, 5), `${t.toLocaleString()}m`;
725
725
  }
726
726
  }
727
727
  getDurationRemaining(a) {
@@ -730,7 +730,7 @@ let b = class extends w {
730
730
  render() {
731
731
  var _a;
732
732
  if ((_a = this.tripState) == null ? void 0 : _a.Navigating)
733
- return x`
733
+ return O`
734
734
  <div class="progress-view-card">
735
735
  <p class="arrival-text">
736
736
  ${this.getArrivalTime(
@@ -751,8 +751,8 @@ let b = class extends w {
751
751
  `;
752
752
  }
753
753
  };
754
- b.styles = [
755
- f`
754
+ f.styles = [
755
+ w`
756
756
  .progress-view-card {
757
757
  display: flex;
758
758
  align-items: center;
@@ -772,10 +772,10 @@ b.styles = [
772
772
  ];
773
773
  j([
774
774
  n()
775
- ], b.prototype, "tripState", 2);
776
- b = j([
777
- O("trip-progress-view")
778
- ], b);
775
+ ], f.prototype, "tripState", 2);
776
+ f = j([
777
+ S("trip-progress-view")
778
+ ], f);
779
779
  function q(a) {
780
780
  let t = null;
781
781
  return a.coords.speed && (t = {
@@ -885,7 +885,7 @@ var A3 = Object.defineProperty, C3 = Object.getOwnPropertyDescriptor, c = (a, t,
885
885
  (r = a[o]) && (l = (i ? r(t, e, l) : r(l)) || l);
886
886
  return i && l && A3(t, e, l), l;
887
887
  };
888
- let s = class extends w {
888
+ let s = class extends x {
889
889
  constructor() {
890
890
  super(), this.valhallaEndpointUrl = "", this.styleUrl = "", this.profile = "", this.center = null, this.pitch = 60, this.zoom = 6, this.httpClient = fetch, this.options = {}, this._tripState = null, this.useVoiceGuidance = false, this.geolocateOnLoad = true, this.routeAdapter = null, this.map = null, this.geolocateControl = null, this.navigationController = null, this.simulatedLocationMarker = null, this.lastSpokenUtteranceId = null, this.httpClient === fetch && (this.httpClient = this.httpClient.bind(window));
891
891
  }
@@ -938,7 +938,11 @@ let s = class extends w {
938
938
  // FIXME: assert body is not null
939
939
  body: new Uint8Array(o).buffer
940
940
  }), g = new Uint8Array(await r.arrayBuffer());
941
- return this.routeAdapter.parseResponse(g);
941
+ try {
942
+ return this.routeAdapter.parseResponse(g);
943
+ } catch (h) {
944
+ throw console.error("Error parsing route response:", h), h;
945
+ }
942
946
  }
943
947
  // TODO: types
944
948
  startNavigation(a, t) {
@@ -1030,24 +1034,32 @@ let s = class extends w {
1030
1034
  ((_a = this.map) == null ? void 0 : _a.getLayer("route")) && ((_b = this.map) == null ? void 0 : _b.removeLayer("route")), ((_c = this.map) == null ? void 0 : _c.getLayer("route-border")) && ((_d = this.map) == null ? void 0 : _d.removeLayer("route-border")), ((_e = this.map) == null ? void 0 : _e.getSource("route")) && ((_f = this.map) == null ? void 0 : _f.removeSource("route")), (_g = this.simulatedLocationMarker) == null ? void 0 : _g.remove();
1031
1035
  }
1032
1036
  render() {
1033
- return x`
1037
+ return O`
1034
1038
  <style>
1035
1039
  ${this.customStyles}
1036
1040
  </style>
1037
1041
  <div id="container">
1038
- <slot id="map"></slot>
1039
- <instructions-view .tripState=${this._tripState}></instructions-view>
1040
- <div id="bottom-component">
1041
- <trip-progress-view
1042
- .tripState=${this._tripState}
1043
- ></trip-progress-view>
1044
- <button
1045
- id="stop-button"
1046
- @click=${this.stopNavigation}
1047
- ?hidden=${!this._tripState}
1048
- >
1049
- <img src=${V} alt="Stop navigation" class="icon" />
1050
- </button>
1042
+ <div id="map">
1043
+ <!-- Fix names/ids; currently this is a breaking change -->
1044
+ <slot id="map-content"></slot>
1045
+ <div id="overlay">
1046
+ <instructions-view
1047
+ .tripState=${this._tripState}
1048
+ ></instructions-view>
1049
+
1050
+ <div id="bottom-component">
1051
+ <trip-progress-view
1052
+ .tripState=${this._tripState}
1053
+ ></trip-progress-view>
1054
+ <button
1055
+ id="stop-button"
1056
+ @click=${this.stopNavigation}
1057
+ ?hidden=${!this._tripState}
1058
+ >
1059
+ <img src=${V} alt="Stop navigation" class="icon" />
1060
+ </button>
1061
+ </div>
1062
+ </div>
1051
1063
  </div>
1052
1064
  </div>
1053
1065
  `;
@@ -1055,7 +1067,7 @@ let s = class extends w {
1055
1067
  };
1056
1068
  s.styles = [
1057
1069
  G(o0),
1058
- f`
1070
+ w`
1059
1071
  [hidden] {
1060
1072
  display: none !important;
1061
1073
  }
@@ -1171,7 +1183,7 @@ c([
1171
1183
  n({ type: Object, attribute: false })
1172
1184
  ], s.prototype, "map", 2);
1173
1185
  s = c([
1174
- O("ferrostar-map")
1186
+ S("ferrostar-map")
1175
1187
  ], s);
1176
1188
  export {
1177
1189
  z3 as BrowserLocationProvider,