@telia-ace/widget-core-flamingo 1.1.76 → 1.1.77-rc.1

Sign up to get free protection for your applications and to get access to all the features.
package/index.mjs CHANGED
@@ -31,27 +31,27 @@ function J(s, t) {
31
31
  var e = typeof Symbol == "function" && s[Symbol.iterator];
32
32
  if (!e)
33
33
  return s;
34
- var i = e.call(s), r, o = [], n;
34
+ var i = e.call(s), r, n = [], o;
35
35
  try {
36
36
  for (; (t === void 0 || t-- > 0) && !(r = i.next()).done; )
37
- o.push(r.value);
37
+ n.push(r.value);
38
38
  } catch (a) {
39
- n = { error: a };
39
+ o = { error: a };
40
40
  } finally {
41
41
  try {
42
42
  r && !r.done && (e = i.return) && e.call(i);
43
43
  } finally {
44
- if (n)
45
- throw n.error;
44
+ if (o)
45
+ throw o.error;
46
46
  }
47
47
  }
48
- return o;
48
+ return n;
49
49
  }
50
50
  function G(s, t, e) {
51
51
  if (e || arguments.length === 2)
52
- for (var i = 0, r = t.length, o; i < r; i++)
53
- (o || !(i in t)) && (o || (o = Array.prototype.slice.call(t, 0, i)), o[i] = t[i]);
54
- return s.concat(o || Array.prototype.slice.call(t));
52
+ for (var i = 0, r = t.length, n; i < r; i++)
53
+ (n || !(i in t)) && (n || (n = Array.prototype.slice.call(t, 0, i)), n[i] = t[i]);
54
+ return s.concat(n || Array.prototype.slice.call(t));
55
55
  }
56
56
  function w(s) {
57
57
  return typeof s == "function";
@@ -62,7 +62,7 @@ function Qt(s) {
62
62
  }, e = s(t);
63
63
  return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
64
64
  }
65
- var nt = Qt(function(s) {
65
+ var ot = Qt(function(s) {
66
66
  return function(e) {
67
67
  s(this), this.message = e ? e.length + ` errors occurred during unsubscription:
68
68
  ` + e.map(function(i, r) {
@@ -82,14 +82,14 @@ var it = function() {
82
82
  this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
83
83
  }
84
84
  return s.prototype.unsubscribe = function() {
85
- var t, e, i, r, o;
85
+ var t, e, i, r, n;
86
86
  if (!this.closed) {
87
87
  this.closed = !0;
88
- var n = this._parentage;
89
- if (n)
90
- if (this._parentage = null, Array.isArray(n))
88
+ var o = this._parentage;
89
+ if (o)
90
+ if (this._parentage = null, Array.isArray(o))
91
91
  try {
92
- for (var a = mt(n), c = a.next(); !c.done; c = a.next()) {
92
+ for (var a = mt(o), c = a.next(); !c.done; c = a.next()) {
93
93
  var h = c.value;
94
94
  h.remove(this);
95
95
  }
@@ -104,13 +104,13 @@ var it = function() {
104
104
  }
105
105
  }
106
106
  else
107
- n.remove(this);
107
+ o.remove(this);
108
108
  var l = this.initialTeardown;
109
109
  if (w(l))
110
110
  try {
111
111
  l();
112
112
  } catch (v) {
113
- o = v instanceof nt ? v.errors : [v];
113
+ n = v instanceof ot ? v.errors : [v];
114
114
  }
115
115
  var d = this._finalizers;
116
116
  if (d) {
@@ -121,7 +121,7 @@ var it = function() {
121
121
  try {
122
122
  Pt(g);
123
123
  } catch (v) {
124
- o = o ?? [], v instanceof nt ? o = G(G([], J(o)), J(v.errors)) : o.push(v);
124
+ n = n ?? [], v instanceof ot ? n = G(G([], J(n)), J(v.errors)) : n.push(v);
125
125
  }
126
126
  }
127
127
  } catch (v) {
@@ -135,8 +135,8 @@ var it = function() {
135
135
  }
136
136
  }
137
137
  }
138
- if (o)
139
- throw new nt(o);
138
+ if (n)
139
+ throw new ot(n);
140
140
  }
141
141
  }, s.prototype.add = function(t) {
142
142
  var e;
@@ -193,7 +193,7 @@ var ie = {
193
193
  },
194
194
  delegate: void 0
195
195
  };
196
- function we(s) {
196
+ function $e(s) {
197
197
  yt.setTimeout(function() {
198
198
  throw s;
199
199
  });
@@ -272,29 +272,29 @@ var Ae = function() {
272
272
  }(), bt = function(s) {
273
273
  W(t, s);
274
274
  function t(e, i, r) {
275
- var o = s.call(this) || this, n;
275
+ var n = s.call(this) || this, o;
276
276
  if (w(e) || !e)
277
- n = {
277
+ o = {
278
278
  next: e ?? void 0,
279
279
  error: i ?? void 0,
280
280
  complete: r ?? void 0
281
281
  };
282
282
  else {
283
283
  var a;
284
- o && ie.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
285
- return o.unsubscribe();
286
- }, n = {
284
+ n && ie.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
285
+ return n.unsubscribe();
286
+ }, o = {
287
287
  next: e.next && at(e.next, a),
288
288
  error: e.error && at(e.error, a),
289
289
  complete: e.complete && at(e.complete, a)
290
- }) : n = e;
290
+ }) : o = e;
291
291
  }
292
- return o.destination = new Ae(n), o;
292
+ return n.destination = new Ae(o), n;
293
293
  }
294
294
  return t;
295
295
  }(se);
296
296
  function q(s) {
297
- we(s);
297
+ $e(s);
298
298
  }
299
299
  function xe(s) {
300
300
  throw s;
@@ -325,11 +325,11 @@ var Tt = function() {
325
325
  var e = new s();
326
326
  return e.source = this, e.operator = t, e;
327
327
  }, s.prototype.subscribe = function(t, e, i) {
328
- var r = this, o = Te(t) ? t : new bt(t, e, i);
328
+ var r = this, n = Te(t) ? t : new bt(t, e, i);
329
329
  return K(function() {
330
- var n = r, a = n.operator, c = n.source;
331
- o.add(a ? a.call(o, c) : c ? r._subscribe(o) : r._trySubscribe(o));
332
- }), o;
330
+ var o = r, a = o.operator, c = o.source;
331
+ n.add(a ? a.call(n, c) : c ? r._subscribe(n) : r._trySubscribe(n));
332
+ }), n;
333
333
  }, s.prototype._trySubscribe = function(t) {
334
334
  try {
335
335
  return this._subscribe(t);
@@ -338,19 +338,19 @@ var Tt = function() {
338
338
  }
339
339
  }, s.prototype.forEach = function(t, e) {
340
340
  var i = this;
341
- return e = It(e), new e(function(r, o) {
342
- var n = new bt({
341
+ return e = It(e), new e(function(r, n) {
342
+ var o = new bt({
343
343
  next: function(a) {
344
344
  try {
345
345
  t(a);
346
346
  } catch (c) {
347
- o(c), n.unsubscribe();
347
+ n(c), o.unsubscribe();
348
348
  }
349
349
  },
350
- error: o,
350
+ error: n,
351
351
  complete: r
352
352
  });
353
- i.subscribe(n);
353
+ i.subscribe(o);
354
354
  });
355
355
  }, s.prototype._subscribe = function(t) {
356
356
  var e;
@@ -364,13 +364,13 @@ var Tt = function() {
364
364
  }, s.prototype.toPromise = function(t) {
365
365
  var e = this;
366
366
  return t = It(t), new t(function(i, r) {
367
- var o;
368
- e.subscribe(function(n) {
369
- return o = n;
370
- }, function(n) {
371
- return r(n);
367
+ var n;
368
+ e.subscribe(function(o) {
369
+ return n = o;
370
+ }, function(o) {
371
+ return r(o);
372
372
  }, function() {
373
- return i(o);
373
+ return i(n);
374
374
  });
375
375
  });
376
376
  }, s.create = function(t) {
@@ -391,7 +391,7 @@ var Ie = Qt(function(s) {
391
391
  return function() {
392
392
  s(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
393
393
  };
394
- }), $t = function(s) {
394
+ }), wt = function(s) {
395
395
  W(t, s);
396
396
  function t() {
397
397
  var e = s.call(this) || this;
@@ -406,11 +406,11 @@ var Ie = Qt(function(s) {
406
406
  }, t.prototype.next = function(e) {
407
407
  var i = this;
408
408
  K(function() {
409
- var r, o;
409
+ var r, n;
410
410
  if (i._throwIfClosed(), !i.isStopped) {
411
411
  i.currentObservers || (i.currentObservers = Array.from(i.observers));
412
412
  try {
413
- for (var n = mt(i.currentObservers), a = n.next(); !a.done; a = n.next()) {
413
+ for (var o = mt(i.currentObservers), a = o.next(); !a.done; a = o.next()) {
414
414
  var c = a.value;
415
415
  c.next(e);
416
416
  }
@@ -418,7 +418,7 @@ var Ie = Qt(function(s) {
418
418
  r = { error: h };
419
419
  } finally {
420
420
  try {
421
- a && !a.done && (o = n.return) && o.call(n);
421
+ a && !a.done && (n = o.return) && n.call(o);
422
422
  } finally {
423
423
  if (r)
424
424
  throw r.error;
@@ -458,13 +458,13 @@ var Ie = Qt(function(s) {
458
458
  }, t.prototype._subscribe = function(e) {
459
459
  return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
460
460
  }, t.prototype._innerSubscribe = function(e) {
461
- var i = this, r = this, o = r.hasError, n = r.isStopped, a = r.observers;
462
- return o || n ? te : (this.currentObservers = null, a.push(e), new it(function() {
461
+ var i = this, r = this, n = r.hasError, o = r.isStopped, a = r.observers;
462
+ return n || o ? te : (this.currentObservers = null, a.push(e), new it(function() {
463
463
  i.currentObservers = null, vt(a, e);
464
464
  }));
465
465
  }, t.prototype._checkFinalizedStatuses = function(e) {
466
- var i = this, r = i.hasError, o = i.thrownError, n = i.isStopped;
467
- r ? e.error(o) : n && e.complete();
466
+ var i = this, r = i.hasError, n = i.thrownError, o = i.isStopped;
467
+ r ? e.error(n) : o && e.complete();
468
468
  }, t.prototype.asObservable = function() {
469
469
  var e = new Tt();
470
470
  return e.source = this, e;
@@ -490,7 +490,7 @@ var Ie = Qt(function(s) {
490
490
  var i, r;
491
491
  return (r = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(e)) !== null && r !== void 0 ? r : te;
492
492
  }, t;
493
- }($t), re = function(s) {
493
+ }(wt), re = function(s) {
494
494
  W(t, s);
495
495
  function t(e) {
496
496
  var i = s.call(this) || this;
@@ -506,14 +506,14 @@ var Ie = Qt(function(s) {
506
506
  var i = s.prototype._subscribe.call(this, e);
507
507
  return !i.closed && e.next(this._value), i;
508
508
  }, t.prototype.getValue = function() {
509
- var e = this, i = e.hasError, r = e.thrownError, o = e._value;
509
+ var e = this, i = e.hasError, r = e.thrownError, n = e._value;
510
510
  if (i)
511
511
  throw r;
512
- return this._throwIfClosed(), o;
512
+ return this._throwIfClosed(), n;
513
513
  }, t.prototype.next = function(e) {
514
514
  s.prototype.next.call(this, this._value = e);
515
515
  }, t;
516
- }($t), oe = /* @__PURE__ */ ((s) => (s.Loading = "loading", s.Ready = "ready", s))(oe || {});
516
+ }(wt), ne = /* @__PURE__ */ ((s) => (s.Loading = "loading", s.Ready = "ready", s))(ne || {});
517
517
  class kt {
518
518
  constructor(t, e) {
519
519
  this.state = new re(
@@ -539,8 +539,8 @@ class kt {
539
539
  * Copyright 2019 Google LLC
540
540
  * SPDX-License-Identifier: BSD-3-Clause
541
541
  */
542
- const Z = globalThis, wt = Z.ShadowRoot && (Z.ShadyCSS === void 0 || Z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _t = Symbol(), Nt = /* @__PURE__ */ new WeakMap();
543
- let ne = class {
542
+ const Z = globalThis, $t = Z.ShadowRoot && (Z.ShadyCSS === void 0 || Z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _t = Symbol(), Ut = /* @__PURE__ */ new WeakMap();
543
+ let oe = class {
544
544
  constructor(t, e, i) {
545
545
  if (this._$cssResult$ = !0, i !== _t)
546
546
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
@@ -549,9 +549,9 @@ let ne = class {
549
549
  get styleSheet() {
550
550
  let t = this.o;
551
551
  const e = this.t;
552
- if (wt && t === void 0) {
552
+ if ($t && t === void 0) {
553
553
  const i = e !== void 0 && e.length === 1;
554
- i && (t = Nt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Nt.set(e, t));
554
+ i && (t = Ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Ut.set(e, t));
555
555
  }
556
556
  return t;
557
557
  }
@@ -559,24 +559,24 @@ let ne = class {
559
559
  return this.cssText;
560
560
  }
561
561
  };
562
- const Re = (s) => new ne(typeof s == "string" ? s : s + "", void 0, _t), N = (s, ...t) => {
563
- const e = s.length === 1 ? s[0] : t.reduce((i, r, o) => i + ((n) => {
564
- if (n._$cssResult$ === !0)
565
- return n.cssText;
566
- if (typeof n == "number")
567
- return n;
568
- throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
569
- })(r) + s[o + 1], s[0]);
570
- return new ne(e, s, _t);
562
+ const Re = (s) => new oe(typeof s == "string" ? s : s + "", void 0, _t), U = (s, ...t) => {
563
+ const e = s.length === 1 ? s[0] : t.reduce((i, r, n) => i + ((o) => {
564
+ if (o._$cssResult$ === !0)
565
+ return o.cssText;
566
+ if (typeof o == "number")
567
+ return o;
568
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
569
+ })(r) + s[n + 1], s[0]);
570
+ return new oe(e, s, _t);
571
571
  }, ke = (s, t) => {
572
- if (wt)
572
+ if ($t)
573
573
  s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
574
574
  else
575
575
  for (const e of t) {
576
576
  const i = document.createElement("style"), r = Z.litNonce;
577
577
  r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i);
578
578
  }
579
- }, Ut = wt ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
579
+ }, Nt = $t ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
580
580
  let e = "";
581
581
  for (const i of t.cssRules)
582
582
  e += i.cssText;
@@ -587,7 +587,7 @@ const Re = (s) => new ne(typeof s == "string" ? s : s + "", void 0, _t), N = (s,
587
587
  * Copyright 2017 Google LLC
588
588
  * SPDX-License-Identifier: BSD-3-Clause
589
589
  */
590
- const { is: Ne, defineProperty: Ue, getOwnPropertyDescriptor: Me, getOwnPropertyNames: je, getOwnPropertySymbols: He, getPrototypeOf: Le } = Object, C = globalThis, Mt = C.trustedTypes, De = Mt ? Mt.emptyScript : "", ct = C.reactiveElementPolyfillSupport, j = (s, t) => s, X = { toAttribute(s, t) {
590
+ const { is: Ue, defineProperty: Ne, getOwnPropertyDescriptor: Me, getOwnPropertyNames: je, getOwnPropertySymbols: Le, getPrototypeOf: He } = Object, x = globalThis, Mt = x.trustedTypes, De = Mt ? Mt.emptyScript : "", ct = x.reactiveElementPolyfillSupport, j = (s, t) => s, X = { toAttribute(s, t) {
591
591
  switch (t) {
592
592
  case Boolean:
593
593
  s = s ? De : null;
@@ -615,8 +615,8 @@ const { is: Ne, defineProperty: Ue, getOwnPropertyDescriptor: Me, getOwnProperty
615
615
  }
616
616
  }
617
617
  return e;
618
- } }, At = (s, t) => !Ne(s, t), jt = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: At };
619
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), C.litPropertyMetadata ?? (C.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
618
+ } }, At = (s, t) => !Ue(s, t), jt = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: At };
619
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), x.litPropertyMetadata ?? (x.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
620
620
  let I = class extends HTMLElement {
621
621
  static addInitializer(t) {
622
622
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
@@ -627,20 +627,20 @@ let I = class extends HTMLElement {
627
627
  static createProperty(t, e = jt) {
628
628
  if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
629
629
  const i = Symbol(), r = this.getPropertyDescriptor(t, i, e);
630
- r !== void 0 && Ue(this.prototype, t, r);
630
+ r !== void 0 && Ne(this.prototype, t, r);
631
631
  }
632
632
  }
633
633
  static getPropertyDescriptor(t, e, i) {
634
- const { get: r, set: o } = Me(this.prototype, t) ?? { get() {
634
+ const { get: r, set: n } = Me(this.prototype, t) ?? { get() {
635
635
  return this[e];
636
- }, set(n) {
637
- this[e] = n;
636
+ }, set(o) {
637
+ this[e] = o;
638
638
  } };
639
639
  return { get() {
640
640
  return r == null ? void 0 : r.call(this);
641
- }, set(n) {
641
+ }, set(o) {
642
642
  const a = r == null ? void 0 : r.call(this);
643
- o.call(this, n), this.requestUpdate(t, a, i);
643
+ n.call(this, o), this.requestUpdate(t, a, i);
644
644
  }, configurable: !0, enumerable: !0 };
645
645
  }
646
646
  static getPropertyOptions(t) {
@@ -649,14 +649,14 @@ let I = class extends HTMLElement {
649
649
  static _$Ei() {
650
650
  if (this.hasOwnProperty(j("elementProperties")))
651
651
  return;
652
- const t = Le(this);
652
+ const t = He(this);
653
653
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
654
654
  }
655
655
  static finalize() {
656
656
  if (this.hasOwnProperty(j("finalized")))
657
657
  return;
658
658
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(j("properties"))) {
659
- const e = this.properties, i = [...je(e), ...He(e)];
659
+ const e = this.properties, i = [...je(e), ...Le(e)];
660
660
  for (const r of i)
661
661
  this.createProperty(r, e[r]);
662
662
  }
@@ -679,9 +679,9 @@ let I = class extends HTMLElement {
679
679
  if (Array.isArray(t)) {
680
680
  const i = new Set(t.flat(1 / 0).reverse());
681
681
  for (const r of i)
682
- e.unshift(Ut(r));
682
+ e.unshift(Nt(r));
683
683
  } else
684
- t !== void 0 && e.push(Ut(t));
684
+ t !== void 0 && e.push(Nt(t));
685
685
  return e;
686
686
  }
687
687
  static _$Eu(t, e) {
@@ -733,19 +733,19 @@ let I = class extends HTMLElement {
733
733
  this._$AK(t, i);
734
734
  }
735
735
  _$EC(t, e) {
736
- var o;
736
+ var n;
737
737
  const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
738
738
  if (r !== void 0 && i.reflect === !0) {
739
- const n = (((o = i.converter) == null ? void 0 : o.toAttribute) !== void 0 ? i.converter : X).toAttribute(e, i.type);
740
- this._$Em = t, n == null ? this.removeAttribute(r) : this.setAttribute(r, n), this._$Em = null;
739
+ const o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : X).toAttribute(e, i.type);
740
+ this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
741
741
  }
742
742
  }
743
743
  _$AK(t, e) {
744
- var o;
744
+ var n;
745
745
  const i = this.constructor, r = i._$Eh.get(t);
746
746
  if (r !== void 0 && this._$Em !== r) {
747
- const n = i.getPropertyOptions(r), a = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((o = n.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? n.converter : X;
748
- this._$Em = r, this[r] = a.fromAttribute(e, n.type), this._$Em = null;
747
+ const o = i.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : X;
748
+ this._$Em = r, this[r] = a.fromAttribute(e, o.type), this._$Em = null;
749
749
  }
750
750
  }
751
751
  requestUpdate(t, e, i) {
@@ -778,21 +778,21 @@ let I = class extends HTMLElement {
778
778
  return;
779
779
  if (!this.hasUpdated) {
780
780
  if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
781
- for (const [o, n] of this._$Ep)
782
- this[o] = n;
781
+ for (const [n, o] of this._$Ep)
782
+ this[n] = o;
783
783
  this._$Ep = void 0;
784
784
  }
785
785
  const r = this.constructor.elementProperties;
786
786
  if (r.size > 0)
787
- for (const [o, n] of r)
788
- n.wrapped !== !0 || this._$AL.has(o) || this[o] === void 0 || this.P(o, this[o], n);
787
+ for (const [n, o] of r)
788
+ o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.P(n, this[n], o);
789
789
  }
790
790
  let t = !1;
791
791
  const e = this._$AL;
792
792
  try {
793
793
  t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((r) => {
794
- var o;
795
- return (o = r.hostUpdate) == null ? void 0 : o.call(r);
794
+ var n;
795
+ return (n = r.hostUpdate) == null ? void 0 : n.call(r);
796
796
  }), this.update(e)) : this._$EU();
797
797
  } catch (r) {
798
798
  throw t = !1, this._$EU(), r;
@@ -828,70 +828,70 @@ let I = class extends HTMLElement {
828
828
  firstUpdated(t) {
829
829
  }
830
830
  };
831
- I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[j("elementProperties")] = /* @__PURE__ */ new Map(), I[j("finalized")] = /* @__PURE__ */ new Map(), ct == null || ct({ ReactiveElement: I }), (C.reactiveElementVersions ?? (C.reactiveElementVersions = [])).push("2.0.4");
831
+ I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[j("elementProperties")] = /* @__PURE__ */ new Map(), I[j("finalized")] = /* @__PURE__ */ new Map(), ct == null || ct({ ReactiveElement: I }), (x.reactiveElementVersions ?? (x.reactiveElementVersions = [])).push("2.0.4");
832
832
  /**
833
833
  * @license
834
834
  * Copyright 2017 Google LLC
835
835
  * SPDX-License-Identifier: BSD-3-Clause
836
836
  */
837
- const H = globalThis, Q = H.trustedTypes, Ht = Q ? Q.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, ae = "$lit$", x = `lit$${(Math.random() + "").slice(9)}$`, ce = "?" + x, Be = `<${ce}>`, O = document, D = () => O.createComment(""), B = (s) => s === null || typeof s != "object" && typeof s != "function", he = Array.isArray, ze = (s) => he(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", ht = `[
838
- \f\r]`, M = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Lt = /-->/g, Dt = />/g, S = RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
839
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Bt = /'/g, zt = /"/g, le = /^(?:script|style|textarea|title)$/i, We = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), R = We(1), T = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), Wt = /* @__PURE__ */ new WeakMap(), P = O.createTreeWalker(O, 129);
837
+ const L = globalThis, Q = L.trustedTypes, Lt = Q ? Q.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, ae = "$lit$", A = `lit$${(Math.random() + "").slice(9)}$`, ce = "?" + A, Be = `<${ce}>`, O = document, D = () => O.createComment(""), B = (s) => s === null || typeof s != "object" && typeof s != "function", he = Array.isArray, ze = (s) => he(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", ht = `[
838
+ \f\r]`, M = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ht = /-->/g, Dt = />/g, C = RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
839
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Bt = /'/g, zt = /"/g, le = /^(?:script|style|textarea|title)$/i, We = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), R = We(1), T = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), Wt = /* @__PURE__ */ new WeakMap(), E = O.createTreeWalker(O, 129);
840
840
  function de(s, t) {
841
841
  if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
842
842
  throw Error("invalid template strings array");
843
- return Ht !== void 0 ? Ht.createHTML(t) : t;
843
+ return Lt !== void 0 ? Lt.createHTML(t) : t;
844
844
  }
845
845
  const Fe = (s, t) => {
846
846
  const e = s.length - 1, i = [];
847
- let r, o = t === 2 ? "<svg>" : "", n = M;
847
+ let r, n = t === 2 ? "<svg>" : "", o = M;
848
848
  for (let a = 0; a < e; a++) {
849
849
  const c = s[a];
850
850
  let h, l, d = -1, p = 0;
851
- for (; p < c.length && (n.lastIndex = p, l = n.exec(c), l !== null); )
852
- p = n.lastIndex, n === M ? l[1] === "!--" ? n = Lt : l[1] !== void 0 ? n = Dt : l[2] !== void 0 ? (le.test(l[2]) && (r = RegExp("</" + l[2], "g")), n = S) : l[3] !== void 0 && (n = S) : n === S ? l[0] === ">" ? (n = r ?? M, d = -1) : l[1] === void 0 ? d = -2 : (d = n.lastIndex - l[2].length, h = l[1], n = l[3] === void 0 ? S : l[3] === '"' ? zt : Bt) : n === zt || n === Bt ? n = S : n === Lt || n === Dt ? n = M : (n = S, r = void 0);
853
- const f = n === S && s[a + 1].startsWith("/>") ? " " : "";
854
- o += n === M ? c + Be : d >= 0 ? (i.push(h), c.slice(0, d) + ae + c.slice(d) + x + f) : c + x + (d === -2 ? a : f);
851
+ for (; p < c.length && (o.lastIndex = p, l = o.exec(c), l !== null); )
852
+ p = o.lastIndex, o === M ? l[1] === "!--" ? o = Ht : l[1] !== void 0 ? o = Dt : l[2] !== void 0 ? (le.test(l[2]) && (r = RegExp("</" + l[2], "g")), o = C) : l[3] !== void 0 && (o = C) : o === C ? l[0] === ">" ? (o = r ?? M, d = -1) : l[1] === void 0 ? d = -2 : (d = o.lastIndex - l[2].length, h = l[1], o = l[3] === void 0 ? C : l[3] === '"' ? zt : Bt) : o === zt || o === Bt ? o = C : o === Ht || o === Dt ? o = M : (o = C, r = void 0);
853
+ const f = o === C && s[a + 1].startsWith("/>") ? " " : "";
854
+ n += o === M ? c + Be : d >= 0 ? (i.push(h), c.slice(0, d) + ae + c.slice(d) + A + f) : c + A + (d === -2 ? a : f);
855
855
  }
856
- return [de(s, o + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
856
+ return [de(s, n + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
857
857
  };
858
858
  class z {
859
859
  constructor({ strings: t, _$litType$: e }, i) {
860
860
  let r;
861
861
  this.parts = [];
862
- let o = 0, n = 0;
862
+ let n = 0, o = 0;
863
863
  const a = t.length - 1, c = this.parts, [h, l] = Fe(t, e);
864
- if (this.el = z.createElement(h, i), P.currentNode = this.el.content, e === 2) {
864
+ if (this.el = z.createElement(h, i), E.currentNode = this.el.content, e === 2) {
865
865
  const d = this.el.content.firstChild;
866
866
  d.replaceWith(...d.childNodes);
867
867
  }
868
- for (; (r = P.nextNode()) !== null && c.length < a; ) {
868
+ for (; (r = E.nextNode()) !== null && c.length < a; ) {
869
869
  if (r.nodeType === 1) {
870
870
  if (r.hasAttributes())
871
871
  for (const d of r.getAttributeNames())
872
872
  if (d.endsWith(ae)) {
873
- const p = l[n++], f = r.getAttribute(d).split(x), g = /([.?@])?(.*)/.exec(p);
874
- c.push({ type: 1, index: o, name: g[2], strings: f, ctor: g[1] === "." ? Ye : g[1] === "?" ? qe : g[1] === "@" ? Ke : st }), r.removeAttribute(d);
873
+ const p = l[o++], f = r.getAttribute(d).split(A), g = /([.?@])?(.*)/.exec(p);
874
+ c.push({ type: 1, index: n, name: g[2], strings: f, ctor: g[1] === "." ? Ye : g[1] === "?" ? qe : g[1] === "@" ? Ke : st }), r.removeAttribute(d);
875
875
  } else
876
- d.startsWith(x) && (c.push({ type: 6, index: o }), r.removeAttribute(d));
876
+ d.startsWith(A) && (c.push({ type: 6, index: n }), r.removeAttribute(d));
877
877
  if (le.test(r.tagName)) {
878
- const d = r.textContent.split(x), p = d.length - 1;
878
+ const d = r.textContent.split(A), p = d.length - 1;
879
879
  if (p > 0) {
880
880
  r.textContent = Q ? Q.emptyScript : "";
881
881
  for (let f = 0; f < p; f++)
882
- r.append(d[f], D()), P.nextNode(), c.push({ type: 2, index: ++o });
882
+ r.append(d[f], D()), E.nextNode(), c.push({ type: 2, index: ++n });
883
883
  r.append(d[p], D());
884
884
  }
885
885
  }
886
886
  } else if (r.nodeType === 8)
887
887
  if (r.data === ce)
888
- c.push({ type: 2, index: o });
888
+ c.push({ type: 2, index: n });
889
889
  else {
890
890
  let d = -1;
891
- for (; (d = r.data.indexOf(x, d + 1)) !== -1; )
892
- c.push({ type: 7, index: o }), d += x.length - 1;
891
+ for (; (d = r.data.indexOf(A, d + 1)) !== -1; )
892
+ c.push({ type: 7, index: n }), d += A.length - 1;
893
893
  }
894
- o++;
894
+ n++;
895
895
  }
896
896
  }
897
897
  static createElement(t, e) {
@@ -900,12 +900,12 @@ class z {
900
900
  }
901
901
  }
902
902
  function k(s, t, e = s, i) {
903
- var n, a;
903
+ var o, a;
904
904
  if (t === T)
905
905
  return t;
906
- let r = i !== void 0 ? (n = e._$Co) == null ? void 0 : n[i] : e._$Cl;
907
- const o = B(t) ? void 0 : t._$litDirective$;
908
- return (r == null ? void 0 : r.constructor) !== o && ((a = r == null ? void 0 : r._$AO) == null || a.call(r, !1), o === void 0 ? r = void 0 : (r = new o(s), r._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = r : e._$Cl = r), r !== void 0 && (t = k(s, r._$AS(s, t.values), r, i)), t;
906
+ let r = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
907
+ const n = B(t) ? void 0 : t._$litDirective$;
908
+ return (r == null ? void 0 : r.constructor) !== n && ((a = r == null ? void 0 : r._$AO) == null || a.call(r, !1), n === void 0 ? r = void 0 : (r = new n(s), r._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = r : e._$Cl = r), r !== void 0 && (t = k(s, r._$AS(s, t.values), r, i)), t;
909
909
  }
910
910
  class Ve {
911
911
  constructor(t, e) {
@@ -919,16 +919,16 @@ class Ve {
919
919
  }
920
920
  u(t) {
921
921
  const { el: { content: e }, parts: i } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? O).importNode(e, !0);
922
- P.currentNode = r;
923
- let o = P.nextNode(), n = 0, a = 0, c = i[0];
922
+ E.currentNode = r;
923
+ let n = E.nextNode(), o = 0, a = 0, c = i[0];
924
924
  for (; c !== void 0; ) {
925
- if (n === c.index) {
925
+ if (o === c.index) {
926
926
  let h;
927
- c.type === 2 ? h = new F(o, o.nextSibling, this, t) : c.type === 1 ? h = new c.ctor(o, c.name, c.strings, this, t) : c.type === 6 && (h = new Ze(o, this, t)), this._$AV.push(h), c = i[++a];
927
+ c.type === 2 ? h = new F(n, n.nextSibling, this, t) : c.type === 1 ? h = new c.ctor(n, c.name, c.strings, this, t) : c.type === 6 && (h = new Ze(n, this, t)), this._$AV.push(h), c = i[++a];
928
928
  }
929
- n !== (c == null ? void 0 : c.index) && (o = P.nextNode(), n++);
929
+ o !== (c == null ? void 0 : c.index) && (n = E.nextNode(), o++);
930
930
  }
931
- return P.currentNode = O, r;
931
+ return E.currentNode = O, r;
932
932
  }
933
933
  p(t) {
934
934
  let e = 0;
@@ -968,13 +968,13 @@ class F {
968
968
  this._$AH !== u && B(this._$AH) ? this._$AA.nextSibling.data = t : this.T(O.createTextNode(t)), this._$AH = t;
969
969
  }
970
970
  $(t) {
971
- var o;
971
+ var n;
972
972
  const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = z.createElement(de(i.h, i.h[0]), this.options)), i);
973
- if (((o = this._$AH) == null ? void 0 : o._$AD) === r)
973
+ if (((n = this._$AH) == null ? void 0 : n._$AD) === r)
974
974
  this._$AH.p(e);
975
975
  else {
976
- const n = new Ve(r, this), a = n.u(this.options);
977
- n.p(e), this.T(a), this._$AH = n;
976
+ const o = new Ve(r, this), a = o.u(this.options);
977
+ o.p(e), this.T(a), this._$AH = o;
978
978
  }
979
979
  }
980
980
  _$AC(t) {
@@ -985,8 +985,8 @@ class F {
985
985
  he(this._$AH) || (this._$AH = [], this._$AR());
986
986
  const e = this._$AH;
987
987
  let i, r = 0;
988
- for (const o of t)
989
- r === e.length ? e.push(i = new F(this.S(D()), this.S(D()), this, this.options)) : i = e[r], i._$AI(o), r++;
988
+ for (const n of t)
989
+ r === e.length ? e.push(i = new F(this.S(D()), this.S(D()), this, this.options)) : i = e[r], i._$AI(n), r++;
990
990
  r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r);
991
991
  }
992
992
  _$AR(t = this._$AA.nextSibling, e) {
@@ -1008,21 +1008,21 @@ class st {
1008
1008
  get _$AU() {
1009
1009
  return this._$AM._$AU;
1010
1010
  }
1011
- constructor(t, e, i, r, o) {
1012
- this.type = 1, this._$AH = u, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = u;
1011
+ constructor(t, e, i, r, n) {
1012
+ this.type = 1, this._$AH = u, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = u;
1013
1013
  }
1014
1014
  _$AI(t, e = this, i, r) {
1015
- const o = this.strings;
1016
- let n = !1;
1017
- if (o === void 0)
1018
- t = k(this, t, e, 0), n = !B(t) || t !== this._$AH && t !== T, n && (this._$AH = t);
1015
+ const n = this.strings;
1016
+ let o = !1;
1017
+ if (n === void 0)
1018
+ t = k(this, t, e, 0), o = !B(t) || t !== this._$AH && t !== T, o && (this._$AH = t);
1019
1019
  else {
1020
1020
  const a = t;
1021
1021
  let c, h;
1022
- for (t = o[0], c = 0; c < o.length - 1; c++)
1023
- h = k(this, a[i + c], e, c), h === T && (h = this._$AH[c]), n || (n = !B(h) || h !== this._$AH[c]), h === u ? t = u : t !== u && (t += (h ?? "") + o[c + 1]), this._$AH[c] = h;
1022
+ for (t = n[0], c = 0; c < n.length - 1; c++)
1023
+ h = k(this, a[i + c], e, c), h === T && (h = this._$AH[c]), o || (o = !B(h) || h !== this._$AH[c]), h === u ? t = u : t !== u && (t += (h ?? "") + n[c + 1]), this._$AH[c] = h;
1024
1024
  }
1025
- n && !r && this.j(t);
1025
+ o && !r && this.j(t);
1026
1026
  }
1027
1027
  j(t) {
1028
1028
  t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
@@ -1045,14 +1045,14 @@ class qe extends st {
1045
1045
  }
1046
1046
  }
1047
1047
  class Ke extends st {
1048
- constructor(t, e, i, r, o) {
1049
- super(t, e, i, r, o), this.type = 5;
1048
+ constructor(t, e, i, r, n) {
1049
+ super(t, e, i, r, n), this.type = 5;
1050
1050
  }
1051
1051
  _$AI(t, e = this) {
1052
1052
  if ((t = k(this, t, e, 0) ?? u) === T)
1053
1053
  return;
1054
- const i = this._$AH, r = t === u && i !== u || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== u && (i === u || r);
1055
- r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
1054
+ const i = this._$AH, r = t === u && i !== u || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== u && (i === u || r);
1055
+ r && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
1056
1056
  }
1057
1057
  handleEvent(t) {
1058
1058
  var e;
@@ -1070,14 +1070,14 @@ class Ze {
1070
1070
  k(this, t);
1071
1071
  }
1072
1072
  }
1073
- const lt = H.litHtmlPolyfillSupport;
1074
- lt == null || lt(z, F), (H.litHtmlVersions ?? (H.litHtmlVersions = [])).push("3.1.2");
1073
+ const lt = L.litHtmlPolyfillSupport;
1074
+ lt == null || lt(z, F), (L.litHtmlVersions ?? (L.litHtmlVersions = [])).push("3.1.2");
1075
1075
  const Je = (s, t, e) => {
1076
1076
  const i = (e == null ? void 0 : e.renderBefore) ?? t;
1077
1077
  let r = i._$litPart$;
1078
1078
  if (r === void 0) {
1079
- const o = (e == null ? void 0 : e.renderBefore) ?? null;
1080
- i._$litPart$ = r = new F(t.insertBefore(D(), o), o, void 0, e ?? {});
1079
+ const n = (e == null ? void 0 : e.renderBefore) ?? null;
1080
+ i._$litPart$ = r = new F(t.insertBefore(D(), n), n, void 0, e ?? {});
1081
1081
  }
1082
1082
  return r._$AI(s), r;
1083
1083
  };
@@ -1086,7 +1086,7 @@ const Je = (s, t, e) => {
1086
1086
  * Copyright 2017 Google LLC
1087
1087
  * SPDX-License-Identifier: BSD-3-Clause
1088
1088
  */
1089
- let _ = class extends I {
1089
+ let $ = class extends I {
1090
1090
  constructor() {
1091
1091
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
1092
1092
  }
@@ -1112,9 +1112,9 @@ let _ = class extends I {
1112
1112
  }
1113
1113
  };
1114
1114
  var Xt;
1115
- _._$litElement$ = !0, _.finalized = !0, (Xt = globalThis.litElementHydrateSupport) == null || Xt.call(globalThis, { LitElement: _ });
1115
+ $._$litElement$ = !0, $.finalized = !0, (Xt = globalThis.litElementHydrateSupport) == null || Xt.call(globalThis, { LitElement: $ });
1116
1116
  const dt = globalThis.litElementPolyfillSupport;
1117
- dt == null || dt({ LitElement: _ });
1117
+ dt == null || dt({ LitElement: $ });
1118
1118
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
1119
1119
  /**
1120
1120
  * @license
@@ -1123,29 +1123,29 @@ dt == null || dt({ LitElement: _ });
1123
1123
  */
1124
1124
  const Ge = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: At }, Xe = (s = Ge, t, e) => {
1125
1125
  const { kind: i, metadata: r } = e;
1126
- let o = globalThis.litPropertyMetadata.get(r);
1127
- if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), o.set(e.name, s), i === "accessor") {
1128
- const { name: n } = e;
1126
+ let n = globalThis.litPropertyMetadata.get(r);
1127
+ if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), n.set(e.name, s), i === "accessor") {
1128
+ const { name: o } = e;
1129
1129
  return { set(a) {
1130
1130
  const c = t.get.call(this);
1131
- t.set.call(this, a), this.requestUpdate(n, c, s);
1131
+ t.set.call(this, a), this.requestUpdate(o, c, s);
1132
1132
  }, init(a) {
1133
- return a !== void 0 && this.P(n, void 0, s), a;
1133
+ return a !== void 0 && this.P(o, void 0, s), a;
1134
1134
  } };
1135
1135
  }
1136
1136
  if (i === "setter") {
1137
- const { name: n } = e;
1137
+ const { name: o } = e;
1138
1138
  return function(a) {
1139
- const c = this[n];
1140
- t.call(this, a), this.requestUpdate(n, c, s);
1139
+ const c = this[o];
1140
+ t.call(this, a), this.requestUpdate(o, c, s);
1141
1141
  };
1142
1142
  }
1143
1143
  throw Error("Unsupported decorator location: " + i);
1144
1144
  };
1145
1145
  function m(s) {
1146
- return (t, e) => typeof e == "object" ? Xe(s, t, e) : ((i, r, o) => {
1147
- const n = r.hasOwnProperty(o);
1148
- return r.constructor.createProperty(o, n ? { ...i, wrapped: !0 } : i), n ? Object.getOwnPropertyDescriptor(r, o) : void 0;
1146
+ return (t, e) => typeof e == "object" ? Xe(s, t, e) : ((i, r, n) => {
1147
+ const o = r.hasOwnProperty(n);
1148
+ return r.constructor.createProperty(n, o ? { ...i, wrapped: !0 } : i), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
1149
1149
  })(s, t, e);
1150
1150
  }
1151
1151
  /**
@@ -1153,15 +1153,15 @@ function m(s) {
1153
1153
  * Copyright 2017 Google LLC
1154
1154
  * SPDX-License-Identifier: BSD-3-Clause
1155
1155
  */
1156
- function U(s) {
1156
+ function N(s) {
1157
1157
  return m({ ...s, state: !0, attribute: !1 });
1158
1158
  }
1159
1159
  var Qe = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, ei = (s, t, e, i) => {
1160
- for (var r = i > 1 ? void 0 : i ? ti(t, e) : t, o = s.length - 1, n; o >= 0; o--)
1161
- (n = s[o]) && (r = (i ? n(t, e, r) : n(r)) || r);
1160
+ for (var r = i > 1 ? void 0 : i ? ti(t, e) : t, n = s.length - 1, o; n >= 0; n--)
1161
+ (o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
1162
1162
  return i && r && Qe(t, e, r), r;
1163
1163
  };
1164
- class rt extends _ {
1164
+ class rt extends $ {
1165
1165
  constructor() {
1166
1166
  super(...arguments), this.anchor = "BottomRight";
1167
1167
  }
@@ -1174,7 +1174,7 @@ class rt extends _ {
1174
1174
  }
1175
1175
  }
1176
1176
  rt.styles = [
1177
- N`
1177
+ U`
1178
1178
  :host {
1179
1179
  position: fixed;
1180
1180
  display: flex;
@@ -1228,13 +1228,13 @@ const ii = (s) => s.strings === void 0;
1228
1228
  * Copyright 2017 Google LLC
1229
1229
  * SPDX-License-Identifier: BSD-3-Clause
1230
1230
  */
1231
- const L = (s, t) => {
1231
+ const H = (s, t) => {
1232
1232
  var i;
1233
1233
  const e = s._$AN;
1234
1234
  if (e === void 0)
1235
1235
  return !1;
1236
1236
  for (const r of e)
1237
- (i = r._$AO) == null || i.call(r, t, !1), L(r, t);
1237
+ (i = r._$AO) == null || i.call(r, t, !1), H(r, t);
1238
1238
  return !0;
1239
1239
  }, tt = (s) => {
1240
1240
  let t, e;
@@ -1250,7 +1250,7 @@ const L = (s, t) => {
1250
1250
  t._$AN = e = /* @__PURE__ */ new Set();
1251
1251
  else if (e.has(s))
1252
1252
  break;
1253
- e.add(s), oi(t);
1253
+ e.add(s), ni(t);
1254
1254
  }
1255
1255
  };
1256
1256
  function si(s) {
@@ -1261,14 +1261,14 @@ function ri(s, t = !1, e = 0) {
1261
1261
  if (r !== void 0 && r.size !== 0)
1262
1262
  if (t)
1263
1263
  if (Array.isArray(i))
1264
- for (let o = e; o < i.length; o++)
1265
- L(i[o], !1), tt(i[o]);
1264
+ for (let n = e; n < i.length; n++)
1265
+ H(i[n], !1), tt(i[n]);
1266
1266
  else
1267
- i != null && (L(i, !1), tt(i));
1267
+ i != null && (H(i, !1), tt(i));
1268
1268
  else
1269
- L(this, s);
1269
+ H(this, s);
1270
1270
  }
1271
- const oi = (s) => {
1271
+ const ni = (s) => {
1272
1272
  s.type == xt.CHILD && (s._$AP ?? (s._$AP = ri), s._$AQ ?? (s._$AQ = si));
1273
1273
  };
1274
1274
  class fe extends pe {
@@ -1280,7 +1280,7 @@ class fe extends pe {
1280
1280
  }
1281
1281
  _$AO(t, e = !0) {
1282
1282
  var i, r;
1283
- t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (r = this.disconnected) == null || r.call(this)), e && (L(this, t), tt(this));
1283
+ t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (r = this.disconnected) == null || r.call(this)), e && (H(this, t), tt(this));
1284
1284
  }
1285
1285
  setValue(t) {
1286
1286
  if (ii(this._$Ct))
@@ -1295,7 +1295,7 @@ class fe extends pe {
1295
1295
  reconnected() {
1296
1296
  }
1297
1297
  }
1298
- const ni = /* @__PURE__ */ new WeakMap();
1298
+ const oi = /* @__PURE__ */ new WeakMap();
1299
1299
  let Ft = 0;
1300
1300
  const pt = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new WeakSet(), Yt = () => new Promise((s) => requestAnimationFrame(s)), ai = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], qt = (s, t) => {
1301
1301
  const e = s - t;
@@ -1340,7 +1340,7 @@ class li extends fe {
1340
1340
  return u;
1341
1341
  }
1342
1342
  getController() {
1343
- return ni.get(this.u);
1343
+ return oi.get(this.u);
1344
1344
  }
1345
1345
  isDisabled() {
1346
1346
  var t;
@@ -1349,7 +1349,7 @@ class li extends fe {
1349
1349
  update(t, [e]) {
1350
1350
  var r;
1351
1351
  const i = this.u === void 0;
1352
- return i && (this.u = (r = t.options) == null ? void 0 : r.host, this.u.addController(this), this.u.updateComplete.then((o) => this.t = !0), this.element = t.element, Zt.set(this.element, this)), this.optionsOrCallback = e, (i || typeof e != "function") && this.p(e), this.render(e);
1352
+ return i && (this.u = (r = t.options) == null ? void 0 : r.host, this.u.addController(this), this.u.updateComplete.then((n) => this.t = !0), this.element = t.element, Zt.set(this.element, this)), this.optionsOrCallback = e, (i || typeof e != "function") && this.p(e), this.render(e);
1353
1353
  }
1354
1354
  p(t) {
1355
1355
  t = t ?? {};
@@ -1359,15 +1359,15 @@ class li extends fe {
1359
1359
  m() {
1360
1360
  const t = {}, e = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
1361
1361
  return this.options.properties.forEach((r) => {
1362
- const o = e[r] ?? (ut[r] ? void 0 : i[r]), n = Number(o);
1363
- t[r] = isNaN(n) ? o + "" : n;
1362
+ const n = e[r] ?? (ut[r] ? void 0 : i[r]), o = Number(n);
1363
+ t[r] = isNaN(o) ? n + "" : o;
1364
1364
  }), t;
1365
1365
  }
1366
1366
  v() {
1367
1367
  let t, e = !0;
1368
1368
  return this.options.guard && (t = this.options.guard(), e = ((i, r) => {
1369
1369
  if (Array.isArray(i)) {
1370
- if (Array.isArray(r) && r.length === i.length && i.every((o, n) => o === r[n]))
1370
+ if (Array.isArray(r) && r.length === i.length && i.every((n, o) => n === r[o]))
1371
1371
  return !1;
1372
1372
  } else if (r === i)
1373
1373
  return !1;
@@ -1384,14 +1384,14 @@ class li extends fe {
1384
1384
  this.prepare(), await Yt;
1385
1385
  const e = this.O(), i = this.j(this.options.keyframeOptions, e), r = this.m();
1386
1386
  if (this.A !== void 0) {
1387
- const { from: o, to: n } = this.N(this.A, r, e);
1388
- this.log("measured", [this.A, r, o, n]), t = this.calculateKeyframes(o, n);
1387
+ const { from: n, to: o } = this.N(this.A, r, e);
1388
+ this.log("measured", [this.A, r, n, o]), t = this.calculateKeyframes(n, o);
1389
1389
  } else {
1390
- const o = pt.get(this.options.inId);
1391
- if (o) {
1390
+ const n = pt.get(this.options.inId);
1391
+ if (n) {
1392
1392
  pt.delete(this.options.inId);
1393
- const { from: n, to: a } = this.N(o, r, e);
1394
- t = this.calculateKeyframes(n, a), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, Ft++, t.forEach((c) => c.zIndex = Ft);
1393
+ const { from: o, to: a } = this.N(n, r, e);
1394
+ t = this.calculateKeyframes(o, a), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, Ft++, t.forEach((c) => c.zIndex = Ft);
1395
1395
  } else
1396
1396
  this.options.in && (t = [...this.options.in, {}]);
1397
1397
  }
@@ -1415,8 +1415,8 @@ class li extends fe {
1415
1415
  if (this.i.insertBefore(this.element, i), this.options.stabilizeOut) {
1416
1416
  const r = this.m();
1417
1417
  this.log("stabilizing out");
1418
- const o = this.A.left - r.left, n = this.A.top - r.top;
1419
- getComputedStyle(this.element).position !== "static" || o === 0 && n === 0 || (this.element.style.position = "relative"), o !== 0 && (this.element.style.left = o + "px"), n !== 0 && (this.element.style.top = n + "px");
1418
+ const n = this.A.left - r.left, o = this.A.top - r.top;
1419
+ getComputedStyle(this.element).position !== "static" || n === 0 && o === 0 || (this.element.style.position = "relative"), n !== 0 && (this.element.style.left = n + "px"), o !== 0 && (this.element.style.top = o + "px");
1420
1420
  }
1421
1421
  }
1422
1422
  const t = this.j(this.options.keyframeOptions);
@@ -1454,14 +1454,14 @@ class li extends fe {
1454
1454
  N(t, e, i) {
1455
1455
  t = { ...t }, e = { ...e };
1456
1456
  const r = i.map((a) => a.animatingProperties).filter((a) => a !== void 0);
1457
- let o = 1, n = 1;
1457
+ let n = 1, o = 1;
1458
1458
  return r.length > 0 && (r.forEach((a) => {
1459
- a.width && (o /= a.width), a.height && (n /= a.height);
1460
- }), t.left !== void 0 && e.left !== void 0 && (t.left = o * t.left, e.left = o * e.left), t.top !== void 0 && e.top !== void 0 && (t.top = n * t.top, e.top = n * e.top)), { from: t, to: e };
1459
+ a.width && (n /= a.width), a.height && (o /= a.height);
1460
+ }), t.left !== void 0 && e.left !== void 0 && (t.left = n * t.left, e.left = n * e.left), t.top !== void 0 && e.top !== void 0 && (t.top = o * t.top, e.top = o * e.top)), { from: t, to: e };
1461
1461
  }
1462
1462
  calculateKeyframes(t, e, i = !1) {
1463
- const r = {}, o = {};
1464
- let n = !1;
1463
+ const r = {}, n = {};
1464
+ let o = !1;
1465
1465
  const a = {};
1466
1466
  for (const c in e) {
1467
1467
  const h = t[c], l = e[c];
@@ -1470,11 +1470,11 @@ class li extends fe {
1470
1470
  if (h === void 0 || l === void 0)
1471
1471
  continue;
1472
1472
  const p = d(h, l);
1473
- p.transform !== void 0 && (a[c] = p.value, n = !0, r.transform = `${r.transform ?? ""} ${p.transform}`, p.overrideFrom !== void 0 && Object.assign(r, p.overrideFrom));
1473
+ p.transform !== void 0 && (a[c] = p.value, o = !0, r.transform = `${r.transform ?? ""} ${p.transform}`, p.overrideFrom !== void 0 && Object.assign(r, p.overrideFrom));
1474
1474
  } else
1475
- h !== l && h !== void 0 && l !== void 0 && (n = !0, r[c] = h, o[c] = l);
1475
+ h !== l && h !== void 0 && l !== void 0 && (o = !0, r[c] = h, n[c] = l);
1476
1476
  }
1477
- return r.transformOrigin = o.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, n ? [r, o] : void 0;
1477
+ return r.transformOrigin = n.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, o ? [r, n] : void 0;
1478
1478
  }
1479
1479
  async animate(t, e = this.options.keyframeOptions) {
1480
1480
  this.start(), this.frames = t;
@@ -1517,53 +1517,53 @@ const Jt = Ct(class extends pe {
1517
1517
  update(s, [t]) {
1518
1518
  var i, r;
1519
1519
  if (this.st === void 0) {
1520
- this.st = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter((o) => o !== "")));
1521
- for (const o in t)
1522
- t[o] && !((i = this.nt) != null && i.has(o)) && this.st.add(o);
1520
+ this.st = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter((n) => n !== "")));
1521
+ for (const n in t)
1522
+ t[n] && !((i = this.nt) != null && i.has(n)) && this.st.add(n);
1523
1523
  return this.render(t);
1524
1524
  }
1525
1525
  const e = s.element.classList;
1526
- for (const o of this.st)
1527
- o in t || (e.remove(o), this.st.delete(o));
1528
- for (const o in t) {
1529
- const n = !!t[o];
1530
- n === this.st.has(o) || (r = this.nt) != null && r.has(o) || (n ? (e.add(o), this.st.add(o)) : (e.remove(o), this.st.delete(o)));
1526
+ for (const n of this.st)
1527
+ n in t || (e.remove(n), this.st.delete(n));
1528
+ for (const n in t) {
1529
+ const o = !!t[n];
1530
+ o === this.st.has(n) || (r = this.nt) != null && r.has(n) || (o ? (e.add(n), this.st.add(n)) : (e.remove(n), this.st.delete(n)));
1531
1531
  }
1532
1532
  return T;
1533
1533
  }
1534
- }), b = (s, t, e) => {
1534
+ }), y = (s, t, e) => {
1535
1535
  s && e.style.setProperty(t, s);
1536
1536
  }, ge = (s, t) => {
1537
- var e, i, r, o, n, a, c, h, l;
1538
- b((e = s.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), b(
1537
+ var e, i, r, n, o, a, c, h, l;
1538
+ y((e = s.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), y(
1539
1539
  (i = s.colors) == null ? void 0 : i.textOnPrimaryBackground,
1540
1540
  "--text-on-primary-background",
1541
1541
  t
1542
- ), b(
1542
+ ), y(
1543
1543
  (r = s.colors) == null ? void 0 : r.secondaryBackground,
1544
1544
  "--secondary-background",
1545
1545
  t
1546
- ), b(
1547
- (o = s.colors) == null ? void 0 : o.textOnSecondaryBackground,
1546
+ ), y(
1547
+ (n = s.colors) == null ? void 0 : n.textOnSecondaryBackground,
1548
1548
  "--text-on-secondary-background",
1549
1549
  t
1550
- ), b(
1551
- (n = s.colors) == null ? void 0 : n.interactiveDestructiveBackground,
1550
+ ), y(
1551
+ (o = s.colors) == null ? void 0 : o.interactiveDestructiveBackground,
1552
1552
  "--destructive-color",
1553
1553
  t
1554
- ), b(
1554
+ ), y(
1555
1555
  (a = s.colors) == null ? void 0 : a.interactiveTextOnDestructiveBackground,
1556
1556
  "--text-on-destructive-color",
1557
1557
  t
1558
- ), b(
1558
+ ), y(
1559
1559
  (c = s.colors) == null ? void 0 : c.interactivePrimaryBackground,
1560
1560
  "--interactive-primary-background",
1561
1561
  t
1562
- ), b(
1562
+ ), y(
1563
1563
  (h = s.colors) == null ? void 0 : h.interactiveTextOnPrimaryBackground,
1564
1564
  "--interactive-text-on-primary-background",
1565
1565
  t
1566
- ), b((l = s.colors) == null ? void 0 : l.focusColor, "--focus-color", t);
1566
+ ), y((l = s.colors) == null ? void 0 : l.focusColor, "--focus-color", t);
1567
1567
  };
1568
1568
  /**
1569
1569
  * @license
@@ -1602,13 +1602,13 @@ const ft = /* @__PURE__ */ new WeakMap(), ve = Ct(class extends fe {
1602
1602
  }
1603
1603
  });
1604
1604
  var fi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, V = (s, t, e, i) => {
1605
- for (var r = i > 1 ? void 0 : i ? gi(t, e) : t, o = s.length - 1, n; o >= 0; o--)
1606
- (n = s[o]) && (r = (i ? n(t, e, r) : n(r)) || r);
1605
+ for (var r = i > 1 ? void 0 : i ? gi(t, e) : t, n = s.length - 1, o; n >= 0; n--)
1606
+ (o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
1607
1607
  return i && r && fi(t, e, r), r;
1608
1608
  };
1609
- class A extends _ {
1609
+ class _ extends $ {
1610
1610
  constructor() {
1611
- super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = me(), this.widgetActive$ = new re(!1), this.componentIsDestroyed$ = new $t();
1611
+ super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = me(), this.widgetActive$ = new re(!1), this.componentIsDestroyed$ = new wt();
1612
1612
  }
1613
1613
  async connectedCallback() {
1614
1614
  super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
@@ -1624,7 +1624,22 @@ class A extends _ {
1624
1624
  );
1625
1625
  return;
1626
1626
  }
1627
- this.active = !this.active, this.active ? (this.application.appendToDOM(), this.widgetActive$.next(!0), this.hideTrigger()) : (this.application.hide(), this.widgetActive$.next(!1), this.showTrigger());
1627
+ this.active = !this.active, this.active ? (this.application.appendToDOM(), this.notify("widget-set-active", {
1628
+ widgetId: this.application.id,
1629
+ active: !0
1630
+ }), this.widgetActive$.next(!0), this.hideTrigger()) : (this.application.hide(), this.notify("widget-set-active", {
1631
+ widgetId: this.application.id,
1632
+ active: !1
1633
+ }), this.widgetActive$.next(!1), this.showTrigger());
1634
+ }
1635
+ notify(t, e = {}) {
1636
+ window != null && window.parent && window.parent.postMessage(
1637
+ {
1638
+ type: t,
1639
+ data: e
1640
+ },
1641
+ "*"
1642
+ );
1628
1643
  }
1629
1644
  _applyBranding() {
1630
1645
  var t;
@@ -1638,8 +1653,8 @@ class A extends _ {
1638
1653
  const i = (h = this.application) == null ? void 0 : h.triggerIcon;
1639
1654
  if (!i)
1640
1655
  return u;
1641
- const r = async (l) => pi, { type: o, content: n } = i;
1642
- switch (o) {
1656
+ const r = async (l) => pi, { type: n, content: o } = i;
1657
+ switch (n) {
1643
1658
  case "Telia": {
1644
1659
  const l = await r();
1645
1660
  return l ? R`<telia-icon
@@ -1724,8 +1739,8 @@ class A extends _ {
1724
1739
  </div>`;
1725
1740
  }
1726
1741
  }
1727
- A.styles = [
1728
- N`
1742
+ _.styles = [
1743
+ U`
1729
1744
  :host {
1730
1745
  --voca-rem-multiplier: 0.625;
1731
1746
  --trigger-label-bg: #f5e0ff;
@@ -1858,22 +1873,22 @@ A.styles = [
1858
1873
  ];
1859
1874
  V([
1860
1875
  m({ attribute: !1 })
1861
- ], A.prototype, "application", 2);
1876
+ ], _.prototype, "application", 2);
1862
1877
  V([
1863
- U()
1864
- ], A.prototype, "active", 2);
1878
+ N()
1879
+ ], _.prototype, "active", 2);
1865
1880
  V([
1866
- U()
1867
- ], A.prototype, "triggerVisible", 2);
1881
+ N()
1882
+ ], _.prototype, "triggerVisible", 2);
1868
1883
  V([
1869
- U()
1870
- ], A.prototype, "loaded", 2);
1884
+ N()
1885
+ ], _.prototype, "loaded", 2);
1871
1886
  V([
1872
- U()
1873
- ], A.prototype, "icon", 2);
1874
- var mi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, E = (s, t, e, i) => {
1875
- for (var r = i > 1 ? void 0 : i ? vi(t, e) : t, o = s.length - 1, n; o >= 0; o--)
1876
- (n = s[o]) && (r = (i ? n(t, e, r) : n(r)) || r);
1887
+ N()
1888
+ ], _.prototype, "icon", 2);
1889
+ var mi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, S = (s, t, e, i) => {
1890
+ for (var r = i > 1 ? void 0 : i ? vi(t, e) : t, n = s.length - 1, o; n >= 0; n--)
1891
+ (o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
1877
1892
  return i && r && mi(t, e, r), r;
1878
1893
  };
1879
1894
  const yi = (s) => {
@@ -1902,7 +1917,7 @@ const yi = (s) => {
1902
1917
  }
1903
1918
  return t.styles = [
1904
1919
  // (superClass as unknown as typeof LitElement).styles ?? [],
1905
- N`
1920
+ U`
1906
1921
  :host {
1907
1922
  font-family: var(--font-family);
1908
1923
  grid-column: span var(--width);
@@ -1915,29 +1930,29 @@ const yi = (s) => {
1915
1930
  box-sizing: border-box;
1916
1931
  }
1917
1932
  `
1918
- ], E([
1933
+ ], S([
1919
1934
  m()
1920
- ], t.prototype, "properties", 2), E([
1935
+ ], t.prototype, "properties", 2), S([
1921
1936
  m()
1922
- ], t.prototype, "context", 2), E([
1937
+ ], t.prototype, "context", 2), S([
1923
1938
  m()
1924
- ], t.prototype, "layout", 2), E([
1939
+ ], t.prototype, "layout", 2), S([
1925
1940
  m()
1926
- ], t.prototype, "name", 2), E([
1941
+ ], t.prototype, "name", 2), S([
1927
1942
  m()
1928
- ], t.prototype, "type", 2), E([
1943
+ ], t.prototype, "type", 2), S([
1929
1944
  m({ attribute: !1 })
1930
- ], t.prototype, "application", 2), E([
1945
+ ], t.prototype, "application", 2), S([
1931
1946
  m({ attribute: !1 })
1932
1947
  ], t.prototype, "parent", 2), t;
1933
1948
  };
1934
- class St extends yi(_) {
1949
+ class St extends yi($) {
1935
1950
  render() {
1936
1951
  return R`Non resolved component`;
1937
1952
  }
1938
1953
  }
1939
1954
  St.styles = [
1940
- N`
1955
+ U`
1941
1956
  :host {
1942
1957
  display: block;
1943
1958
  }
@@ -1955,13 +1970,13 @@ function* bi(s, t) {
1955
1970
  yield t(i, e++);
1956
1971
  }
1957
1972
  }
1958
- var $ = /* @__PURE__ */ ((s) => (s.Inline = "inline", s.Trigger = "trigger", s))($ || {});
1973
+ var b = /* @__PURE__ */ ((s) => (s.Inline = "inline", s.Trigger = "trigger", s))(b || {});
1959
1974
  /**
1960
1975
  * @license
1961
1976
  * Copyright 2021 Google LLC
1962
1977
  * SPDX-License-Identifier: BSD-3-Clause
1963
1978
  */
1964
- let $i = class extends Event {
1979
+ let wi = class extends Event {
1965
1980
  constructor(t, e, i) {
1966
1981
  super("context-request", { bubbles: !0, composed: !0 }), this.context = t, this.callback = e, this.subscribe = i ?? !1;
1967
1982
  }
@@ -1976,7 +1991,7 @@ let $i = class extends Event {
1976
1991
  * Copyright 2021 Google LLC
1977
1992
  * SPDX-License-Identifier: BSD-3-Clause
1978
1993
  */
1979
- class wi {
1994
+ class $i {
1980
1995
  get value() {
1981
1996
  return this.o;
1982
1997
  }
@@ -2016,21 +2031,21 @@ let _i = class extends Event {
2016
2031
  super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
2017
2032
  }
2018
2033
  };
2019
- class Gt extends wi {
2034
+ class Gt extends $i {
2020
2035
  constructor(t, e, i) {
2021
- var r, o;
2022
- super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (n) => {
2023
- const a = n.composedPath()[0];
2024
- n.context === this.context && a !== this.host && (n.stopPropagation(), this.addCallback(n.callback, a, n.subscribe));
2025
- }, this.onProviderRequest = (n) => {
2026
- const a = n.composedPath()[0];
2027
- if (n.context !== this.context || a === this.host)
2036
+ var r, n;
2037
+ super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (o) => {
2038
+ const a = o.composedPath()[0];
2039
+ o.context === this.context && a !== this.host && (o.stopPropagation(), this.addCallback(o.callback, a, o.subscribe));
2040
+ }, this.onProviderRequest = (o) => {
2041
+ const a = o.composedPath()[0];
2042
+ if (o.context !== this.context || a === this.host)
2028
2043
  return;
2029
2044
  const c = /* @__PURE__ */ new Set();
2030
2045
  for (const [h, { consumerHost: l }] of this.subscriptions)
2031
- c.has(h) || (c.add(h), l.dispatchEvent(new $i(this.context, h, !0)));
2032
- n.stopPropagation();
2033
- }, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (o = (r = this.host).addController) == null || o.call(r, this);
2046
+ c.has(h) || (c.add(h), l.dispatchEvent(new wi(this.context, h, !0)));
2047
+ o.stopPropagation();
2048
+ }, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (n = (r = this.host).addController) == null || n.call(r, this);
2034
2049
  }
2035
2050
  attachListeners() {
2036
2051
  this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
@@ -2053,42 +2068,42 @@ function Ai({ context: s }) {
2053
2068
  }), { get() {
2054
2069
  return t.get.call(this);
2055
2070
  }, set(r) {
2056
- var o;
2057
- return (o = i.get(this)) == null || o.setValue(r), t.set.call(this, r);
2071
+ var n;
2072
+ return (n = i.get(this)) == null || n.setValue(r), t.set.call(this, r);
2058
2073
  }, init(r) {
2059
- var o;
2060
- return (o = i.get(this)) == null || o.setValue(r), r;
2074
+ var n;
2075
+ return (n = i.get(this)) == null || n.setValue(r), r;
2061
2076
  } };
2062
2077
  {
2063
- t.constructor.addInitializer((n) => {
2064
- i.set(n, new Gt(n, { context: s }));
2078
+ t.constructor.addInitializer((o) => {
2079
+ i.set(o, new Gt(o, { context: s }));
2065
2080
  });
2066
2081
  const r = Object.getOwnPropertyDescriptor(t, e);
2067
- let o;
2082
+ let n;
2068
2083
  if (r === void 0) {
2069
- const n = /* @__PURE__ */ new WeakMap();
2070
- o = { get: function() {
2071
- return n.get(this);
2084
+ const o = /* @__PURE__ */ new WeakMap();
2085
+ n = { get: function() {
2086
+ return o.get(this);
2072
2087
  }, set: function(a) {
2073
- i.get(this).setValue(a), n.set(this, a);
2088
+ i.get(this).setValue(a), o.set(this, a);
2074
2089
  }, configurable: !0, enumerable: !0 };
2075
2090
  } else {
2076
- const n = r.set;
2077
- o = { ...r, set: function(a) {
2078
- i.get(this).setValue(a), n == null || n.call(this, a);
2091
+ const o = r.set;
2092
+ n = { ...r, set: function(a) {
2093
+ i.get(this).setValue(a), o == null || o.call(this, a);
2079
2094
  } };
2080
2095
  }
2081
- return void Object.defineProperty(t, e, o);
2096
+ return void Object.defineProperty(t, e, n);
2082
2097
  }
2083
2098
  };
2084
2099
  }
2085
2100
  var xi = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, Si = (s, t, e, i) => {
2086
- for (var r = i > 1 ? void 0 : i ? Ci(t, e) : t, o = s.length - 1, n; o >= 0; o--)
2087
- (n = s[o]) && (r = (i ? n(t, e, r) : n(r)) || r);
2101
+ for (var r = i > 1 ? void 0 : i ? Ci(t, e) : t, n = s.length - 1, o; n >= 0; n--)
2102
+ (o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
2088
2103
  return i && r && xi(t, e, r), r;
2089
2104
  };
2090
2105
  const Ei = "application";
2091
- class ot extends _ {
2106
+ class nt extends $ {
2092
2107
  constructor() {
2093
2108
  super(...arguments), this.nodes = [], this.wrapperRef = me();
2094
2109
  }
@@ -2115,12 +2130,12 @@ class ot extends _ {
2115
2130
  render() {
2116
2131
  var i, r;
2117
2132
  const t = this.application.settings.components.conversation;
2118
- return ((r = (i = t == null ? void 0 : t.properties) == null ? void 0 : i.chat) == null ? void 0 : r.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === $.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), R`<div class="widget-container" ${ve(this.wrapperRef)}>
2119
- ${bi(this.nodes, (o) => o)}
2133
+ return ((r = (i = t == null ? void 0 : t.properties) == null ? void 0 : i.chat) == null ? void 0 : r.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === b.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), R`<div class="widget-container" ${ve(this.wrapperRef)}>
2134
+ ${bi(this.nodes, (n) => n)}
2120
2135
  </div>`;
2121
2136
  }
2122
2137
  }
2123
- ot.styles = N`
2138
+ nt.styles = U`
2124
2139
  :host {
2125
2140
  --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
2126
2141
  --spacing-xs: 0.2rem;
@@ -2259,7 +2274,7 @@ ot.styles = N`
2259
2274
  Si([
2260
2275
  m({ attribute: !1 }),
2261
2276
  Ai({ context: Ei })
2262
- ], ot.prototype, "application", 2);
2277
+ ], nt.prototype, "application", 2);
2263
2278
  class Pi {
2264
2279
  constructor() {
2265
2280
  this.root = this.createRoot();
@@ -2296,17 +2311,18 @@ class Pi {
2296
2311
  // views
2297
2312
  ));
2298
2313
  });
2299
- }, { entry: o, components: n } = t;
2300
- return r(this, this.root, [o], n), this.root;
2314
+ }, { entry: n, components: o } = t;
2315
+ return r(this, this.root, [n], o), this.root;
2301
2316
  }
2302
2317
  createRoot() {
2303
- return new ot();
2318
+ return typeof window < "u" && (window.customElements.get("ace-wrapper") || window.customElements.define("ace-wrapper", nt)), document.createElement("ace-wrapper");
2304
2319
  }
2305
2320
  createNode(t, e) {
2306
- const i = this.resolveComponent(e);
2307
- if (!i)
2321
+ if (!this.resolveComponent(e))
2308
2322
  return console.warn(`Unable to resolve component: ${e}`), new St();
2309
- const r = new i();
2323
+ const r = document.createElement(
2324
+ `ace-${e}`
2325
+ );
2310
2326
  return r.type = e, r.name = t, r;
2311
2327
  }
2312
2328
  resolveComponent(t) {
@@ -2342,20 +2358,27 @@ const ye = class {
2342
2358
  };
2343
2359
  let be = ye;
2344
2360
  be.ResolveWebComponentName = (s) => `ace-${s}`;
2345
- var y = /* @__PURE__ */ ((s) => (s.Necessary = "necessary", s.Functional = "functional", s.Analytics = "analytics", s))(y || {});
2361
+ var P = /* @__PURE__ */ ((s) => (s.Necessary = "necessary", s.Functional = "functional", s.Analytics = "analytics", s))(P || {});
2346
2362
  class Oi {
2347
- constructor(t, e, i) {
2348
- this.disallowedKeys = [], this.widgetId = t, this.storage = e === "localStorage" ? window.localStorage : window.sessionStorage, this.policy = i;
2363
+ constructor(t, e, i, r) {
2364
+ this.disallowedKeys = [], this.widgetId = t, this.storage = e === "localStorage" ? window.localStorage : window.sessionStorage, this.policy = i, this.storageEntries = r;
2349
2365
  }
2350
- set(t, e, i) {
2351
- if (!this.disallowedKeys.includes(t))
2352
- if (this.policy[i]) {
2353
- const r = { value: e, category: i };
2354
- this.storage.setItem(this._prefixKey(t), JSON.stringify(r));
2355
- } else
2356
- console.warn(
2357
- `Storage policy does not allow storing items in category: ${i}`
2358
- );
2366
+ set(t, e) {
2367
+ if (this.disallowedKeys.includes(t))
2368
+ return;
2369
+ const i = this.storageEntries[t];
2370
+ if (!i) {
2371
+ console.warn(`Storage key '${t}' is not defined.`);
2372
+ return;
2373
+ }
2374
+ const r = i.category;
2375
+ if (this.policy[r]) {
2376
+ const n = { value: e, category: r };
2377
+ this.storage.setItem(this._prefixKey(t), JSON.stringify(n));
2378
+ } else
2379
+ console.warn(
2380
+ `Storage policy does not allow storing items in category: ${r}`
2381
+ );
2359
2382
  }
2360
2383
  get(t) {
2361
2384
  const e = this.storage.getItem(this._prefixKey(t));
@@ -2420,17 +2443,33 @@ class Ii {
2420
2443
  }
2421
2444
  }
2422
2445
  class Ri {
2423
- constructor(t, e, i, r, o) {
2424
- this.id = t, this.name = e, this.container = i, this.settings = r, this.options = o, this.platform = new Pi(), this.texts = new Ti(), this.renderStrategy = $.Inline, this.anchor = "BottomRight", this.autoActivate = !1, this.plugins = [], this.componentResolver = new be(), this.components = [], this.trigger = null, this.api = new Ii(this), this.renderStrategy = this.options.renderStrategy || $.Inline, this.triggerIcon = this.options.triggerIcon;
2425
- const n = {
2426
- [y.Necessary]: !0,
2427
- [y.Functional]: !0,
2428
- [y.Analytics]: !0
2446
+ constructor(t, e, i, r, n) {
2447
+ this.id = t, this.name = e, this.container = i, this.settings = r, this.options = n, this.platform = new Pi(), this.texts = new Ti(), this.renderStrategy = b.Inline, this.anchor = "BottomRight", this.autoActivate = !1, this.plugins = [], this.componentResolver = new be(), this.components = [], this.trigger = null, this.api = new Ii(this), this.onMessageReceived = async (a) => {
2448
+ var h;
2449
+ switch (a.data.type) {
2450
+ case "deactivate-widget": {
2451
+ const l = this.storage.get("open");
2452
+ this.hide(), (h = this.trigger) == null || h.hideTrigger(), l && this.storage.set("open", !0);
2453
+ return;
2454
+ }
2455
+ default:
2456
+ return;
2457
+ }
2458
+ }, this.renderStrategy = this.options.renderStrategy || b.Inline, this.triggerIcon = this.options.triggerIcon;
2459
+ const o = {
2460
+ [P.Necessary]: !0,
2461
+ [P.Functional]: !0,
2462
+ [P.Analytics]: !0
2429
2463
  };
2430
- this.storage = new Oi(this.id, "sessionStorage", n), typeof o.autoActivate == "boolean" && (this.autoActivate = o.autoActivate), o.anchor && (this.anchor = o.anchor), this.container.register("$settings", r), this.texts.loadTexts(r.texts || {});
2464
+ this.storage = new Oi(
2465
+ this.id,
2466
+ "sessionStorage",
2467
+ o,
2468
+ this.settings.storage
2469
+ ), typeof n.autoActivate == "boolean" && (this.autoActivate = n.autoActivate), n.anchor && (this.anchor = n.anchor), this.container.register("$settings", r), this.texts.loadTexts(r.texts || {}), window.addEventListener("message", this.onMessageReceived);
2431
2470
  }
2432
2471
  async activate() {
2433
- if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(oe.Ready), this.autoActivate) {
2472
+ if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(ne.Ready), this.autoActivate) {
2434
2473
  const t = this.render();
2435
2474
  t && this._getTargetElement().appendChild(t);
2436
2475
  }
@@ -2449,23 +2488,19 @@ class Ri {
2449
2488
  return this.plugins.push(t), this;
2450
2489
  }
2451
2490
  appendToDOM() {
2452
- this.root && (this.root.classList.add("expanded"), this.root.classList.remove("hidden"), document.body.appendChild(this.root)), this.storage.set("open", !0, y.Necessary);
2491
+ this.root && (this.root.classList.add("expanded"), this.root.classList.remove("hidden"), document.body.appendChild(this.root)), this.storage.set("open", !0);
2453
2492
  }
2454
2493
  hide() {
2455
- this.root && (this.root.classList.add("hidden"), this.root.classList.remove("expanded")), this.storage.set("open", !1, y.Necessary);
2494
+ this.root && (this.root.classList.add("hidden"), this.root.classList.remove("expanded")), this.storage.set("open", !1);
2456
2495
  }
2457
2496
  setZIndex(t) {
2458
2497
  this.root && (this.root.style.zIndex = t.toString());
2459
2498
  }
2460
2499
  mute() {
2461
- this.storage.set("muteAudioNotifications", !0, y.Necessary);
2500
+ this.storage.set("muteAudioNotifications", !0);
2462
2501
  }
2463
2502
  unmute() {
2464
- this.storage.set(
2465
- "muteAudioNotifications",
2466
- !1,
2467
- y.Necessary
2468
- );
2503
+ this.storage.set("muteAudioNotifications", !1);
2469
2504
  }
2470
2505
  registerComponent(t, e) {
2471
2506
  this.componentResolver.registerComponent(t, e);
@@ -2482,7 +2517,7 @@ class Ri {
2482
2517
  }
2483
2518
  _getTargetElement() {
2484
2519
  let t = "bottom-right";
2485
- if (this.anchor === "BottomRight" ? t = "bottom-right" : this.anchor === "BottomLeft" && (t = "bottom-left"), this.renderStrategy === $.Trigger) {
2520
+ if (this.anchor === "BottomRight" ? t = "bottom-right" : this.anchor === "BottomLeft" && (t = "bottom-left"), this.renderStrategy === b.Trigger) {
2486
2521
  let e = document.querySelector(
2487
2522
  `ace-trigger-slot.${t}`
2488
2523
  );
@@ -2490,18 +2525,23 @@ class Ri {
2490
2525
  }
2491
2526
  return document.body;
2492
2527
  }
2528
+ _isEmbeddedInIFrame() {
2529
+ return window.self !== window.top;
2530
+ }
2493
2531
  render() {
2494
- if (this.renderStrategy === $.Trigger) {
2495
- const t = new A();
2532
+ if (this._isEmbeddedInIFrame())
2533
+ return this.root;
2534
+ if (this.renderStrategy === b.Trigger) {
2535
+ const t = new _();
2496
2536
  return t.application = this, this.trigger = t, this.storage.get("open") && this.trigger.toggleActive(), t;
2497
2537
  }
2498
2538
  return this.root;
2499
2539
  }
2500
2540
  }
2501
- const Fi = (s) => new et(s), $e = class {
2541
+ const Fi = (s) => new et(s), we = class {
2502
2542
  // TODO:
2503
2543
  // private static endpoint = 'http://localhost:5299/api'; // TODO:
2504
- constructor(s = $e.endpoint) {
2544
+ constructor(s = we.endpoint) {
2505
2545
  this._endpoint = s;
2506
2546
  }
2507
2547
  async getSite(s) {
@@ -2510,8 +2550,8 @@ const Fi = (s) => new et(s), $e = class {
2510
2550
  id: e.id,
2511
2551
  triggers: e.triggers || [],
2512
2552
  apps: e.widgets.map((i) => {
2513
- let r = $.Inline;
2514
- return i.renderStrategy === "Trigger" && (r = $.Trigger), {
2553
+ let r = b.Inline;
2554
+ return i.renderStrategy === "Trigger" && (r = b.Trigger), {
2515
2555
  id: i.id,
2516
2556
  widgetId: i.widgetId,
2517
2557
  renderStrategy: r,
@@ -2533,7 +2573,7 @@ const Fi = (s) => new et(s), $e = class {
2533
2573
  } : null;
2534
2574
  }
2535
2575
  };
2536
- let et = $e;
2576
+ let et = we;
2537
2577
  et.endpoint = "https://widgets.ace.teliacompany.net/api";
2538
2578
  class ki {
2539
2579
  constructor(t) {
@@ -2543,12 +2583,12 @@ class ki {
2543
2583
  var i;
2544
2584
  (((i = this.site.environment) == null ? void 0 : i.applications) || []).forEach((r) => {
2545
2585
  if (r.storage) {
2546
- const o = {
2547
- [y.Analytics]: t.includes("analytics"),
2548
- [y.Necessary]: t.includes("necessary"),
2549
- [y.Functional]: t.includes("functional")
2586
+ const n = {
2587
+ [P.Analytics]: t.includes("analytics"),
2588
+ [P.Necessary]: t.includes("necessary"),
2589
+ [P.Functional]: t.includes("functional")
2550
2590
  };
2551
- r.storage.updatePolicy(o);
2591
+ r.storage.updatePolicy(n);
2552
2592
  }
2553
2593
  });
2554
2594
  }
@@ -2559,7 +2599,7 @@ class ki {
2559
2599
  });
2560
2600
  }
2561
2601
  }
2562
- class Ni {
2602
+ class Ui {
2563
2603
  constructor() {
2564
2604
  this.applications = [], this.container = new kt("environment", this), this.bootstrapped = !1, this.site = null, this.widgetAPIHandlers = /* @__PURE__ */ new Map(), this.siteConfigurationHandlers = [], setTimeout(() => {
2565
2605
  this.notifyWidgetsOfCreation();
@@ -2581,13 +2621,13 @@ class Ni {
2581
2621
  (i) => i.autoActivate
2582
2622
  );
2583
2623
  (((e = this.site) == null ? void 0 : e.triggers) || []).filter((i) => i.triggerType === "visit").forEach((i) => {
2584
- const r = window.location.pathname, o = i.condition.outputs || [];
2585
- i.condition.type === "url" && o.forEach((n) => {
2586
- const a = n.action.type === "render_widget";
2587
- if ((n.value === r || n.value === "*") && a) {
2624
+ const r = window.location.pathname, n = i.condition.outputs || [];
2625
+ i.condition.type === "url" && n.forEach((o) => {
2626
+ const a = o.action.type === "render_widget";
2627
+ if ((o.value === r || o.value === "*") && a) {
2588
2628
  let h = { widgetId: "" };
2589
2629
  try {
2590
- h = JSON.parse(n.action.data);
2630
+ h = JSON.parse(o.action.data);
2591
2631
  } catch {
2592
2632
  h = {
2593
2633
  widgetId: ""
@@ -2627,16 +2667,16 @@ class Ni {
2627
2667
  if (!i) {
2628
2668
  const r = this.widgetAPIHandlers.get(t) || [];
2629
2669
  r.push(() => {
2630
- const o = this.applications.find((n) => n.name === t);
2631
- e(o == null ? void 0 : o.api);
2670
+ const n = this.applications.find((o) => o.name === t);
2671
+ e(n == null ? void 0 : n.api);
2632
2672
  }), this.widgetAPIHandlers.set(t, r);
2633
2673
  return;
2634
2674
  }
2635
2675
  e(i == null ? void 0 : i.api);
2636
2676
  }
2637
2677
  registerApp(t, e, i, r) {
2638
- const o = new kt(e, this), n = new Ri(t, e, o, i, r);
2639
- this.applications.push(n);
2678
+ const n = new kt(e, this), o = new Ri(t, e, n, i, r);
2679
+ this.applications.push(o);
2640
2680
  }
2641
2681
  registerSite(t) {
2642
2682
  this.site = t;
@@ -2647,7 +2687,7 @@ class Ni {
2647
2687
  }), this;
2648
2688
  }
2649
2689
  }
2650
- class Ui {
2690
+ class Ni {
2651
2691
  constructor(t) {
2652
2692
  this.configurations = [], this.httpClient = new et(), this.api = new ki(this), this.triggers = [], this.httpClient = new et(), typeof t == "string" ? this.url = t : (t.httpClient && (this.httpClient = t.httpClient), this.loadFromConfig(t));
2653
2693
  }
@@ -2677,7 +2717,7 @@ class Ui {
2677
2717
  }
2678
2718
  async bootstrap(t) {
2679
2719
  var e;
2680
- this.url && await this.load(this.url), this.environment = new Ni(), this.addGlobal(this.environment);
2720
+ this.url && await this.load(this.url), this.environment = new Ui(), this.addGlobal(this.environment);
2681
2721
  for await (const i of this.configurations) {
2682
2722
  const r = await this.httpClient.getWidget(i.widgetId);
2683
2723
  r && ((e = this.environment) == null || e.registerApp(
@@ -2704,11 +2744,11 @@ class Ui {
2704
2744
  }
2705
2745
  }
2706
2746
  var Mi = Object.defineProperty, ji = Object.getOwnPropertyDescriptor, Et = (s, t, e, i) => {
2707
- for (var r = i > 1 ? void 0 : i ? ji(t, e) : t, o = s.length - 1, n; o >= 0; o--)
2708
- (n = s[o]) && (r = (i ? n(t, e, r) : n(r)) || r);
2747
+ for (var r = i > 1 ? void 0 : i ? ji(t, e) : t, n = s.length - 1, o; n >= 0; n--)
2748
+ (o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
2709
2749
  return i && r && Mi(t, e, r), r;
2710
2750
  };
2711
- class Y extends _ {
2751
+ class Y extends $ {
2712
2752
  constructor() {
2713
2753
  super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
2714
2754
  }
@@ -2733,15 +2773,15 @@ class Y extends _ {
2733
2773
  render() {
2734
2774
  if (!this.widget || this.status !== "activated")
2735
2775
  return u;
2736
- if (this.widget.renderStrategy === $.Trigger) {
2737
- const t = new A();
2776
+ if (this.widget.renderStrategy === b.Trigger) {
2777
+ const t = new _();
2738
2778
  return t.application = this.widget, t;
2739
2779
  }
2740
2780
  return this.widget.render();
2741
2781
  }
2742
2782
  }
2743
2783
  Y.styles = [
2744
- N`
2784
+ U`
2745
2785
  :host {
2746
2786
  display: block;
2747
2787
  }
@@ -2751,30 +2791,30 @@ Et([
2751
2791
  m({ attribute: !0 })
2752
2792
  ], Y.prototype, "name", 2);
2753
2793
  Et([
2754
- U()
2794
+ N()
2755
2795
  ], Y.prototype, "widget", 2);
2756
2796
  Et([
2757
- U()
2797
+ N()
2758
2798
  ], Y.prototype, "status", 2);
2759
2799
  customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", rt);
2760
- customElements.get("ace-trigger") || customElements.define("ace-trigger", A);
2800
+ customElements.get("ace-trigger") || customElements.define("ace-trigger", _);
2761
2801
  customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", St);
2762
- customElements.get("ace-wrapper") || customElements.define("ace-wrapper", ot);
2802
+ customElements.get("ace-wrapper") || customElements.define("ace-wrapper", nt);
2763
2803
  customElements.get("ace-widget") || customElements.define("ace-widget", Y);
2764
2804
  const Vi = async (s, t, e = {}) => {
2765
- const i = new Ui(s);
2805
+ const i = new Ni(s);
2766
2806
  e.httpClient && i.setHttpClient(e.httpClient), await i.bootstrap(t);
2767
2807
  };
2768
2808
  export {
2769
2809
  Y as AceWidget,
2770
2810
  Ri as Application,
2771
2811
  kt as Container,
2772
- Ni as Environment,
2812
+ Ui as Environment,
2773
2813
  et as HttpClient,
2774
- Ui as Site,
2775
- y as StorageCategory,
2814
+ Ni as Site,
2815
+ P as StorageCategory,
2776
2816
  Oi as StorageService,
2777
- A as Trigger,
2817
+ _ as Trigger,
2778
2818
  yi as WidgetComponent,
2779
2819
  Ei as applicationContext,
2780
2820
  Vi as bootstrap,