@telia-ace/widget-core-flamingo 1.1.70-rc.25 → 1.1.70-rc.27

Sign up to get free protection for your applications and to get access to all the features.
package/index.mjs CHANGED
@@ -6,7 +6,7 @@ var gt = function(s, t) {
6
6
  Object.prototype.hasOwnProperty.call(i, r) && (e[r] = i[r]);
7
7
  }, gt(s, t);
8
8
  };
9
- function B(s, t) {
9
+ function z(s, t) {
10
10
  if (typeof t != "function" && t !== null)
11
11
  throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
12
12
  gt(s, t);
@@ -27,7 +27,7 @@ function mt(s) {
27
27
  };
28
28
  throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
29
29
  }
30
- function G(s, t) {
30
+ function Z(s, t) {
31
31
  var e = typeof Symbol == "function" && s[Symbol.iterator];
32
32
  if (!e)
33
33
  return s;
@@ -47,22 +47,22 @@ function G(s, t) {
47
47
  }
48
48
  return n;
49
49
  }
50
- function Z(s, t, e) {
50
+ function J(s, t, e) {
51
51
  if (e || arguments.length === 2)
52
52
  for (var i = 0, r = t.length, n; i < r; i++)
53
53
  (n || !(i in t)) && (n || (n = Array.prototype.slice.call(t, 0, i)), n[i] = t[i]);
54
54
  return s.concat(n || Array.prototype.slice.call(t));
55
55
  }
56
- function b(s) {
56
+ function $(s) {
57
57
  return typeof s == "function";
58
58
  }
59
- function Xt(s) {
59
+ function Qt(s) {
60
60
  var t = function(i) {
61
61
  Error.call(i), i.stack = new Error().stack;
62
62
  }, e = s(t);
63
63
  return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
64
64
  }
65
- var ot = Xt(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) {
@@ -77,7 +77,7 @@ function vt(s, t) {
77
77
  0 <= e && s.splice(e, 1);
78
78
  }
79
79
  }
80
- var et = function() {
80
+ var it = function() {
81
81
  function s(t) {
82
82
  this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
83
83
  }
@@ -106,7 +106,7 @@ var et = function() {
106
106
  else
107
107
  o.remove(this);
108
108
  var l = this.initialTeardown;
109
- if (b(l))
109
+ if ($(l))
110
110
  try {
111
111
  l();
112
112
  } catch (v) {
@@ -121,7 +121,7 @@ var et = function() {
121
121
  try {
122
122
  Pt(g);
123
123
  } catch (v) {
124
- n = n ?? [], v instanceof ot ? n = Z(Z([], G(n)), G(v.errors)) : n.push(v);
124
+ n = n ?? [], v instanceof ot ? n = J(J([], Z(n)), Z(v.errors)) : n.push(v);
125
125
  }
126
126
  }
127
127
  } catch (v) {
@@ -167,14 +167,14 @@ var et = function() {
167
167
  var t = new s();
168
168
  return t.closed = !0, t;
169
169
  }(), s;
170
- }(), Qt = et.EMPTY;
171
- function te(s) {
172
- return s instanceof et || s && "closed" in s && b(s.remove) && b(s.add) && b(s.unsubscribe);
170
+ }(), te = it.EMPTY;
171
+ function ee(s) {
172
+ return s instanceof it || s && "closed" in s && $(s.remove) && $(s.add) && $(s.unsubscribe);
173
173
  }
174
174
  function Pt(s) {
175
- b(s) ? s() : s.unsubscribe();
175
+ $(s) ? s() : s.unsubscribe();
176
176
  }
177
- var ee = {
177
+ var ie = {
178
178
  onUnhandledError: null,
179
179
  onStoppedNotification: null,
180
180
  Promise: void 0,
@@ -185,7 +185,7 @@ var ee = {
185
185
  for (var e = [], i = 2; i < arguments.length; i++)
186
186
  e[i - 2] = arguments[i];
187
187
  var r = yt.delegate;
188
- return r != null && r.setTimeout ? r.setTimeout.apply(r, Z([s, t], G(e))) : setTimeout.apply(void 0, Z([s, t], G(e)));
188
+ return r != null && r.setTimeout ? r.setTimeout.apply(r, J([s, t], Z(e))) : setTimeout.apply(void 0, J([s, t], Z(e)));
189
189
  },
190
190
  clearTimeout: function(s) {
191
191
  var t = yt.delegate;
@@ -193,21 +193,21 @@ var ee = {
193
193
  },
194
194
  delegate: void 0
195
195
  };
196
- function $e(s) {
196
+ function we(s) {
197
197
  yt.setTimeout(function() {
198
198
  throw s;
199
199
  });
200
200
  }
201
201
  function Ot() {
202
202
  }
203
- function q(s) {
203
+ function K(s) {
204
204
  s();
205
205
  }
206
- var ie = function(s) {
207
- B(t, s);
206
+ var se = function(s) {
207
+ z(t, s);
208
208
  function t(e) {
209
209
  var i = s.call(this) || this;
210
- return i.isStopped = !1, e ? (i.destination = e, te(e) && e.add(i)) : i.destination = xe, i;
210
+ return i.isStopped = !1, e ? (i.destination = e, ee(e) && e.add(i)) : i.destination = Ce, i;
211
211
  }
212
212
  return t.create = function(e, i, r) {
213
213
  return new bt(e, i, r);
@@ -234,11 +234,11 @@ var ie = function(s) {
234
234
  this.unsubscribe();
235
235
  }
236
236
  }, t;
237
- }(et), _e = Function.prototype.bind;
237
+ }(it), _e = Function.prototype.bind;
238
238
  function at(s, t) {
239
239
  return _e.call(s, t);
240
240
  }
241
- var we = function() {
241
+ var Ae = function() {
242
242
  function s(t) {
243
243
  this.partialObserver = t;
244
244
  }
@@ -270,10 +270,10 @@ var we = function() {
270
270
  }
271
271
  }, s;
272
272
  }(), bt = function(s) {
273
- B(t, s);
273
+ z(t, s);
274
274
  function t(e, i, r) {
275
275
  var n = s.call(this) || this, o;
276
- if (b(e) || !e)
276
+ if ($(e) || !e)
277
277
  o = {
278
278
  next: e ?? void 0,
279
279
  error: i ?? void 0,
@@ -281,7 +281,7 @@ var we = function() {
281
281
  };
282
282
  else {
283
283
  var a;
284
- n && ee.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
284
+ n && ie.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
285
285
  return n.unsubscribe();
286
286
  }, o = {
287
287
  next: e.next && at(e.next, a),
@@ -289,29 +289,29 @@ var we = function() {
289
289
  complete: e.complete && at(e.complete, a)
290
290
  }) : o = e;
291
291
  }
292
- return n.destination = new we(o), n;
292
+ return n.destination = new Ae(o), n;
293
293
  }
294
294
  return t;
295
- }(ie);
295
+ }(se);
296
296
  function Y(s) {
297
- $e(s);
297
+ we(s);
298
298
  }
299
- function Ae(s) {
299
+ function xe(s) {
300
300
  throw s;
301
301
  }
302
- var xe = {
302
+ var Ce = {
303
303
  closed: !0,
304
304
  next: Ot,
305
- error: Ae,
305
+ error: xe,
306
306
  complete: Ot
307
- }, Ce = function() {
307
+ }, Se = function() {
308
308
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
309
309
  }();
310
- function Se(s) {
310
+ function Ee(s) {
311
311
  return s;
312
312
  }
313
- function Ee(s) {
314
- return s.length === 0 ? Se : s.length === 1 ? s[0] : function(e) {
313
+ function Pe(s) {
314
+ return s.length === 0 ? Ee : s.length === 1 ? s[0] : function(e) {
315
315
  return s.reduce(function(i, r) {
316
316
  return r(i);
317
317
  }, e);
@@ -325,8 +325,8 @@ 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, n = Oe(t) ? t : new bt(t, e, i);
329
- return q(function() {
328
+ var r = this, n = Te(t) ? t : new bt(t, e, i);
329
+ return K(function() {
330
330
  var o = r, a = o.operator, c = o.source;
331
331
  n.add(a ? a.call(n, c) : c ? r._subscribe(n) : r._trySubscribe(n));
332
332
  }), n;
@@ -338,7 +338,7 @@ var Tt = function() {
338
338
  }
339
339
  }, s.prototype.forEach = function(t, e) {
340
340
  var i = this;
341
- return e = Rt(e), new e(function(r, n) {
341
+ return e = It(e), new e(function(r, n) {
342
342
  var o = new bt({
343
343
  next: function(a) {
344
344
  try {
@@ -355,15 +355,15 @@ var Tt = function() {
355
355
  }, s.prototype._subscribe = function(t) {
356
356
  var e;
357
357
  return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
358
- }, s.prototype[Ce] = function() {
358
+ }, s.prototype[Se] = function() {
359
359
  return this;
360
360
  }, s.prototype.pipe = function() {
361
361
  for (var t = [], e = 0; e < arguments.length; e++)
362
362
  t[e] = arguments[e];
363
- return Ee(t)(this);
363
+ return Pe(t)(this);
364
364
  }, s.prototype.toPromise = function(t) {
365
365
  var e = this;
366
- return t = Rt(t), new t(function(i, r) {
366
+ return t = It(t), new t(function(i, r) {
367
367
  var n;
368
368
  e.subscribe(function(o) {
369
369
  return n = o;
@@ -377,35 +377,35 @@ var Tt = function() {
377
377
  return new s(t);
378
378
  }, s;
379
379
  }();
380
- function Rt(s) {
380
+ function It(s) {
381
381
  var t;
382
- return (t = s ?? ee.Promise) !== null && t !== void 0 ? t : Promise;
383
- }
384
- function Pe(s) {
385
- return s && b(s.next) && b(s.error) && b(s.complete);
382
+ return (t = s ?? ie.Promise) !== null && t !== void 0 ? t : Promise;
386
383
  }
387
384
  function Oe(s) {
388
- return s && s instanceof ie || Pe(s) && te(s);
385
+ return s && $(s.next) && $(s.error) && $(s.complete);
389
386
  }
390
- var Te = Xt(function(s) {
387
+ function Te(s) {
388
+ return s && s instanceof se || Oe(s) && ee(s);
389
+ }
390
+ var Ie = Qt(function(s) {
391
391
  return function() {
392
392
  s(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
393
393
  };
394
394
  }), $t = function(s) {
395
- B(t, s);
395
+ z(t, s);
396
396
  function t() {
397
397
  var e = s.call(this) || this;
398
398
  return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
399
399
  }
400
400
  return t.prototype.lift = function(e) {
401
- var i = new It(this, this);
401
+ var i = new Rt(this, this);
402
402
  return i.operator = e, i;
403
403
  }, t.prototype._throwIfClosed = function() {
404
404
  if (this.closed)
405
- throw new Te();
405
+ throw new Ie();
406
406
  }, t.prototype.next = function(e) {
407
407
  var i = this;
408
- q(function() {
408
+ K(function() {
409
409
  var r, n;
410
410
  if (i._throwIfClosed(), !i.isStopped) {
411
411
  i.currentObservers || (i.currentObservers = Array.from(i.observers));
@@ -428,7 +428,7 @@ var Te = Xt(function(s) {
428
428
  });
429
429
  }, t.prototype.error = function(e) {
430
430
  var i = this;
431
- q(function() {
431
+ K(function() {
432
432
  if (i._throwIfClosed(), !i.isStopped) {
433
433
  i.hasError = i.isStopped = !0, i.thrownError = e;
434
434
  for (var r = i.observers; r.length; )
@@ -437,7 +437,7 @@ var Te = Xt(function(s) {
437
437
  });
438
438
  }, t.prototype.complete = function() {
439
439
  var e = this;
440
- q(function() {
440
+ K(function() {
441
441
  if (e._throwIfClosed(), !e.isStopped) {
442
442
  e.isStopped = !0;
443
443
  for (var i = e.observers; i.length; )
@@ -459,7 +459,7 @@ var Te = Xt(function(s) {
459
459
  return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
460
460
  }, t.prototype._innerSubscribe = function(e) {
461
461
  var i = this, r = this, n = r.hasError, o = r.isStopped, a = r.observers;
462
- return n || o ? Qt : (this.currentObservers = null, a.push(e), new et(function() {
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) {
@@ -469,10 +469,10 @@ var Te = Xt(function(s) {
469
469
  var e = new Tt();
470
470
  return e.source = this, e;
471
471
  }, t.create = function(e, i) {
472
- return new It(e, i);
472
+ return new Rt(e, i);
473
473
  }, t;
474
- }(Tt), It = function(s) {
475
- B(t, s);
474
+ }(Tt), Rt = function(s) {
475
+ z(t, s);
476
476
  function t(e, i) {
477
477
  var r = s.call(this) || this;
478
478
  return r.destination = e, r.source = i, r;
@@ -488,10 +488,10 @@ var Te = Xt(function(s) {
488
488
  (i = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || i === void 0 || i.call(e);
489
489
  }, t.prototype._subscribe = function(e) {
490
490
  var i, r;
491
- return (r = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(e)) !== null && r !== void 0 ? r : Qt;
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), se = function(s) {
494
- B(t, s);
493
+ }($t), re = function(s) {
494
+ z(t, s);
495
495
  function t(e) {
496
496
  var i = s.call(this) || this;
497
497
  return i._value = e, i;
@@ -513,10 +513,10 @@ var Te = Xt(function(s) {
513
513
  }, t.prototype.next = function(e) {
514
514
  s.prototype.next.call(this, this._value = e);
515
515
  }, t;
516
- }($t), re = /* @__PURE__ */ ((s) => (s.Loading = "loading", s.Ready = "ready", s))(re || {});
516
+ }($t), ne = /* @__PURE__ */ ((s) => (s.Loading = "loading", s.Ready = "ready", s))(ne || {});
517
517
  class Ut {
518
518
  constructor(t, e) {
519
- this.state = new se(
519
+ this.state = new re(
520
520
  "loading"
521
521
  /* Loading */
522
522
  ), this.resolvers = /* @__PURE__ */ new Map(), this.name = t, this.environment = e, this.state.next(
@@ -539,19 +539,19 @@ class Ut {
539
539
  * Copyright 2019 Google LLC
540
540
  * SPDX-License-Identifier: BSD-3-Clause
541
541
  */
542
- const K = globalThis, _t = K.ShadowRoot && (K.ShadyCSS === void 0 || K.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, wt = Symbol(), kt = /* @__PURE__ */ new WeakMap();
543
- let ne = class {
542
+ const G = globalThis, wt = G.ShadowRoot && (G.ShadyCSS === void 0 || G.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _t = Symbol(), Mt = /* @__PURE__ */ new WeakMap();
543
+ let oe = class {
544
544
  constructor(t, e, i) {
545
- if (this._$cssResult$ = !0, i !== wt)
545
+ if (this._$cssResult$ = !0, i !== _t)
546
546
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
547
547
  this.cssText = t, this.t = e;
548
548
  }
549
549
  get styleSheet() {
550
550
  let t = this.o;
551
551
  const e = this.t;
552
- if (_t && t === void 0) {
552
+ if (wt && t === void 0) {
553
553
  const i = e !== void 0 && e.length === 1;
554
- i && (t = kt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && kt.set(e, t));
554
+ i && (t = Mt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Mt.set(e, t));
555
555
  }
556
556
  return t;
557
557
  }
@@ -559,7 +559,7 @@ 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, wt), U = (s, ...t) => {
562
+ const Re = (s) => new oe(typeof s == "string" ? s : s + "", void 0, _t), U = (s, ...t) => {
563
563
  const e = s.length === 1 ? s[0] : t.reduce((i, r, n) => i + ((o) => {
564
564
  if (o._$cssResult$ === !0)
565
565
  return o.cssText;
@@ -567,16 +567,16 @@ const Re = (s) => new ne(typeof s == "string" ? s : s + "", void 0, wt), U = (s,
567
567
  return o;
568
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
569
  })(r) + s[n + 1], s[0]);
570
- return new ne(e, s, wt);
571
- }, Ie = (s, t) => {
572
- if (_t)
570
+ return new oe(e, s, _t);
571
+ }, Ue = (s, t) => {
572
+ if (wt)
573
573
  s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
574
574
  else
575
575
  for (const e of t) {
576
- const i = document.createElement("style"), r = K.litNonce;
576
+ const i = document.createElement("style"), r = G.litNonce;
577
577
  r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i);
578
578
  }
579
- }, Mt = _t ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
579
+ }, kt = wt ? (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,10 +587,10 @@ const Re = (s) => new ne(typeof s == "string" ? s : s + "", void 0, wt), U = (s,
587
587
  * Copyright 2017 Google LLC
588
588
  * SPDX-License-Identifier: BSD-3-Clause
589
589
  */
590
- const { is: Ue, defineProperty: ke, getOwnPropertyDescriptor: Me, getOwnPropertyNames: Ne, getOwnPropertySymbols: je, getPrototypeOf: Le } = Object, A = globalThis, Nt = A.trustedTypes, He = Nt ? Nt.emptyScript : "", ct = A.reactiveElementPolyfillSupport, M = (s, t) => s, J = { toAttribute(s, t) {
590
+ const { is: Me, defineProperty: ke, getOwnPropertyDescriptor: Ne, getOwnPropertyNames: je, getOwnPropertySymbols: He, getPrototypeOf: Le } = Object, x = globalThis, Nt = x.trustedTypes, Be = Nt ? Nt.emptyScript : "", ct = x.reactiveElementPolyfillSupport, N = (s, t) => s, X = { toAttribute(s, t) {
591
591
  switch (t) {
592
592
  case Boolean:
593
- s = s ? He : null;
593
+ s = s ? Be : null;
594
594
  break;
595
595
  case Object:
596
596
  case Array:
@@ -615,8 +615,8 @@ const { is: Ue, defineProperty: ke, getOwnPropertyDescriptor: Me, getOwnProperty
615
615
  }
616
616
  }
617
617
  return e;
618
- } }, At = (s, t) => !Ue(s, t), jt = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged: At };
619
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), A.litPropertyMetadata ?? (A.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
618
+ } }, At = (s, t) => !Me(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 T = class extends HTMLElement {
621
621
  static addInitializer(t) {
622
622
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
@@ -631,7 +631,7 @@ let T = class extends HTMLElement {
631
631
  }
632
632
  }
633
633
  static getPropertyDescriptor(t, e, i) {
634
- const { get: r, set: n } = Me(this.prototype, t) ?? { get() {
634
+ const { get: r, set: n } = Ne(this.prototype, t) ?? { get() {
635
635
  return this[e];
636
636
  }, set(o) {
637
637
  this[e] = o;
@@ -647,16 +647,16 @@ let T = class extends HTMLElement {
647
647
  return this.elementProperties.get(t) ?? jt;
648
648
  }
649
649
  static _$Ei() {
650
- if (this.hasOwnProperty(M("elementProperties")))
650
+ if (this.hasOwnProperty(N("elementProperties")))
651
651
  return;
652
652
  const t = Le(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
- if (this.hasOwnProperty(M("finalized")))
656
+ if (this.hasOwnProperty(N("finalized")))
657
657
  return;
658
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
659
- const e = this.properties, i = [...Ne(e), ...je(e)];
658
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(N("properties"))) {
659
+ const e = this.properties, i = [...je(e), ...He(e)];
660
660
  for (const r of i)
661
661
  this.createProperty(r, e[r]);
662
662
  }
@@ -679,9 +679,9 @@ let T = 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(Mt(r));
682
+ e.unshift(kt(r));
683
683
  } else
684
- t !== void 0 && e.push(Mt(t));
684
+ t !== void 0 && e.push(kt(t));
685
685
  return e;
686
686
  }
687
687
  static _$Eu(t, e) {
@@ -711,7 +711,7 @@ let T = class extends HTMLElement {
711
711
  }
712
712
  createRenderRoot() {
713
713
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
714
- return Ie(t, this.constructor.elementStyles), t;
714
+ return Ue(t, this.constructor.elementStyles), t;
715
715
  }
716
716
  connectedCallback() {
717
717
  var t;
@@ -736,7 +736,7 @@ let T = class extends HTMLElement {
736
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 o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : J).toAttribute(e, i.type);
739
+ const o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : X).toAttribute(e, i.type);
740
740
  this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
741
741
  }
742
742
  }
@@ -744,7 +744,7 @@ let T = class extends HTMLElement {
744
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 o = i.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : J;
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
748
  this._$Em = r, this[r] = a.fromAttribute(e, o.type), this._$Em = null;
749
749
  }
750
750
  }
@@ -828,39 +828,39 @@ let T = class extends HTMLElement {
828
828
  firstUpdated(t) {
829
829
  }
830
830
  };
831
- T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[M("elementProperties")] = /* @__PURE__ */ new Map(), T[M("finalized")] = /* @__PURE__ */ new Map(), ct == null || ct({ ReactiveElement: T }), (A.reactiveElementVersions ?? (A.reactiveElementVersions = [])).push("2.0.4");
831
+ T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[N("elementProperties")] = /* @__PURE__ */ new Map(), T[N("finalized")] = /* @__PURE__ */ new Map(), ct == null || ct({ ReactiveElement: T }), (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 N = globalThis, X = N.trustedTypes, Lt = X ? X.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, oe = "$lit$", w = `lit$${(Math.random() + "").slice(9)}$`, ae = "?" + w, De = `<${ae}>`, P = document, L = () => P.createComment(""), H = (s) => s === null || typeof s != "object" && typeof s != "function", ce = Array.isArray, Be = (s) => ce(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", ht = `[
838
- \f\r]`, k = /<(?:(!--|\/[^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, he = /^(?:script|style|textarea|title)$/i, ze = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), R = ze(1), O = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Wt = /* @__PURE__ */ new WeakMap(), E = P.createTreeWalker(P, 129);
840
- function le(s, t) {
837
+ const j = globalThis, Q = j.trustedTypes, Ht = Q ? Q.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, ae = "$lit$", A = `lit$${(Math.random() + "").slice(9)}$`, ce = "?" + A, De = `<${ce}>`, P = document, L = () => P.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]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Lt = /-->/g, Bt = />/g, C = RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
839
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Dt = /'/g, zt = /"/g, le = /^(?:script|style|textarea|title)$/i, We = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), I = We(1), O = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Wt = /* @__PURE__ */ new WeakMap(), E = P.createTreeWalker(P, 129);
840
+ function pe(s, t) {
841
841
  if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
842
842
  throw Error("invalid template strings array");
843
- return Lt !== void 0 ? Lt.createHTML(t) : t;
843
+ return Ht !== void 0 ? Ht.createHTML(t) : t;
844
844
  }
845
- const We = (s, t) => {
845
+ const Fe = (s, t) => {
846
846
  const e = s.length - 1, i = [];
847
847
  let r, n = t === 2 ? "<svg>" : "", o = k;
848
848
  for (let a = 0; a < e; a++) {
849
849
  const c = s[a];
850
850
  let h, l, p = -1, f = 0;
851
851
  for (; f < c.length && (o.lastIndex = f, l = o.exec(c), l !== null); )
852
- f = o.lastIndex, o === k ? l[1] === "!--" ? o = Ht : l[1] !== void 0 ? o = Dt : l[2] !== void 0 ? (he.test(l[2]) && (r = RegExp("</" + l[2], "g")), o = C) : l[3] !== void 0 && (o = C) : o === C ? l[0] === ">" ? (o = r ?? k, p = -1) : l[1] === void 0 ? p = -2 : (p = 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 = k : (o = C, r = void 0);
852
+ f = o.lastIndex, o === k ? l[1] === "!--" ? o = Lt : l[1] !== void 0 ? o = Bt : 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 ?? k, p = -1) : l[1] === void 0 ? p = -2 : (p = o.lastIndex - l[2].length, h = l[1], o = l[3] === void 0 ? C : l[3] === '"' ? zt : Dt) : o === zt || o === Dt ? o = C : o === Lt || o === Bt ? o = k : (o = C, r = void 0);
853
853
  const u = o === C && s[a + 1].startsWith("/>") ? " " : "";
854
- n += o === k ? c + De : p >= 0 ? (i.push(h), c.slice(0, p) + oe + c.slice(p) + w + u) : c + w + (p === -2 ? a : u);
854
+ n += o === k ? c + De : p >= 0 ? (i.push(h), c.slice(0, p) + ae + c.slice(p) + A + u) : c + A + (p === -2 ? a : u);
855
855
  }
856
- return [le(s, n + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
856
+ return [pe(s, n + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
857
857
  };
858
858
  class D {
859
859
  constructor({ strings: t, _$litType$: e }, i) {
860
860
  let r;
861
861
  this.parts = [];
862
862
  let n = 0, o = 0;
863
- const a = t.length - 1, c = this.parts, [h, l] = We(t, e);
863
+ const a = t.length - 1, c = this.parts, [h, l] = Fe(t, e);
864
864
  if (this.el = D.createElement(h, i), E.currentNode = this.el.content, e === 2) {
865
865
  const p = this.el.content.firstChild;
866
866
  p.replaceWith(...p.childNodes);
@@ -869,27 +869,27 @@ class D {
869
869
  if (r.nodeType === 1) {
870
870
  if (r.hasAttributes())
871
871
  for (const p of r.getAttributeNames())
872
- if (p.endsWith(oe)) {
873
- const f = l[o++], u = r.getAttribute(p).split(w), g = /([.?@])?(.*)/.exec(f);
874
- c.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? Ye : g[1] === "?" ? Ve : g[1] === "@" ? qe : it }), r.removeAttribute(p);
872
+ if (p.endsWith(ae)) {
873
+ const f = l[o++], u = r.getAttribute(p).split(A), g = /([.?@])?(.*)/.exec(f);
874
+ c.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? Ye : g[1] === "?" ? qe : g[1] === "@" ? Ke : st }), r.removeAttribute(p);
875
875
  } else
876
- p.startsWith(w) && (c.push({ type: 6, index: n }), r.removeAttribute(p));
877
- if (he.test(r.tagName)) {
878
- const p = r.textContent.split(w), f = p.length - 1;
876
+ p.startsWith(A) && (c.push({ type: 6, index: n }), r.removeAttribute(p));
877
+ if (le.test(r.tagName)) {
878
+ const p = r.textContent.split(A), f = p.length - 1;
879
879
  if (f > 0) {
880
- r.textContent = X ? X.emptyScript : "";
880
+ r.textContent = Q ? Q.emptyScript : "";
881
881
  for (let u = 0; u < f; u++)
882
882
  r.append(p[u], L()), E.nextNode(), c.push({ type: 2, index: ++n });
883
883
  r.append(p[f], L());
884
884
  }
885
885
  }
886
886
  } else if (r.nodeType === 8)
887
- if (r.data === ae)
887
+ if (r.data === ce)
888
888
  c.push({ type: 2, index: n });
889
889
  else {
890
890
  let p = -1;
891
- for (; (p = r.data.indexOf(w, p + 1)) !== -1; )
892
- c.push({ type: 7, index: n }), p += w.length - 1;
891
+ for (; (p = r.data.indexOf(A, p + 1)) !== -1; )
892
+ c.push({ type: 7, index: n }), p += A.length - 1;
893
893
  }
894
894
  n++;
895
895
  }
@@ -899,15 +899,15 @@ class D {
899
899
  return i.innerHTML = t, i;
900
900
  }
901
901
  }
902
- function I(s, t, e = s, i) {
902
+ function R(s, t, e = s, i) {
903
903
  var o, a;
904
904
  if (t === O)
905
905
  return t;
906
906
  let r = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
907
- const n = H(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 = I(s, r._$AS(s, t.values), r, i)), t;
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 = R(s, r._$AS(s, t.values), r, i)), t;
909
909
  }
910
- class Fe {
910
+ class Ve {
911
911
  constructor(t, e) {
912
912
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
913
913
  }
@@ -924,7 +924,7 @@ class Fe {
924
924
  for (; c !== void 0; ) {
925
925
  if (o === c.index) {
926
926
  let h;
927
- c.type === 2 ? h = new z(n, n.nextSibling, this, t) : c.type === 1 ? h = new c.ctor(n, c.name, c.strings, this, t) : c.type === 6 && (h = new Ke(n, this, t)), this._$AV.push(h), c = i[++a];
927
+ c.type === 2 ? h = new W(n, n.nextSibling, this, t) : c.type === 1 ? h = new c.ctor(n, c.name, c.strings, this, t) : c.type === 6 && (h = new Ge(n, this, t)), this._$AV.push(h), c = i[++a];
928
928
  }
929
929
  o !== (c == null ? void 0 : c.index) && (n = E.nextNode(), o++);
930
930
  }
@@ -936,7 +936,7 @@ class Fe {
936
936
  i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
937
937
  }
938
938
  }
939
- class z {
939
+ class W {
940
940
  get _$AU() {
941
941
  var t;
942
942
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
@@ -956,7 +956,7 @@ class z {
956
956
  return this._$AB;
957
957
  }
958
958
  _$AI(t, e = this) {
959
- t = I(this, t, e), H(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== O && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Be(t) ? this.k(t) : this._(t);
959
+ t = R(this, t, e), B(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== O && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ze(t) ? this.k(t) : this._(t);
960
960
  }
961
961
  S(t) {
962
962
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -965,15 +965,15 @@ class z {
965
965
  this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
966
966
  }
967
967
  _(t) {
968
- this._$AH !== d && H(this._$AH) ? this._$AA.nextSibling.data = t : this.T(P.createTextNode(t)), this._$AH = t;
968
+ this._$AH !== d && B(this._$AH) ? this._$AA.nextSibling.data = t : this.T(P.createTextNode(t)), this._$AH = t;
969
969
  }
970
970
  $(t) {
971
971
  var n;
972
- const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = D.createElement(le(i.h, i.h[0]), this.options)), i);
972
+ const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = D.createElement(pe(i.h, i.h[0]), this.options)), i);
973
973
  if (((n = this._$AH) == null ? void 0 : n._$AD) === r)
974
974
  this._$AH.p(e);
975
975
  else {
976
- const o = new Fe(r, this), a = o.u(this.options);
976
+ const o = new Ve(r, this), a = o.u(this.options);
977
977
  o.p(e), this.T(a), this._$AH = o;
978
978
  }
979
979
  }
@@ -982,11 +982,11 @@ class z {
982
982
  return e === void 0 && Wt.set(t.strings, e = new D(t)), e;
983
983
  }
984
984
  k(t) {
985
- ce(this._$AH) || (this._$AH = [], this._$AR());
985
+ he(this._$AH) || (this._$AH = [], this._$AR());
986
986
  const e = this._$AH;
987
987
  let i, r = 0;
988
988
  for (const n of t)
989
- r === e.length ? e.push(i = new z(this.S(L()), this.S(L()), this, this.options)) : i = e[r], i._$AI(n), r++;
989
+ r === e.length ? e.push(i = new W(this.S(L()), this.S(L()), 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) {
@@ -1001,7 +1001,7 @@ class z {
1001
1001
  this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
1002
1002
  }
1003
1003
  }
1004
- class it {
1004
+ class st {
1005
1005
  get tagName() {
1006
1006
  return this.element.tagName;
1007
1007
  }
@@ -1015,12 +1015,12 @@ class it {
1015
1015
  const n = this.strings;
1016
1016
  let o = !1;
1017
1017
  if (n === void 0)
1018
- t = I(this, t, e, 0), o = !H(t) || t !== this._$AH && t !== O, o && (this._$AH = t);
1018
+ t = R(this, t, e, 0), o = !B(t) || t !== this._$AH && t !== O, o && (this._$AH = t);
1019
1019
  else {
1020
1020
  const a = t;
1021
1021
  let c, h;
1022
1022
  for (t = n[0], c = 0; c < n.length - 1; c++)
1023
- h = I(this, a[i + c], e, c), h === O && (h = this._$AH[c]), o || (o = !H(h) || h !== this._$AH[c]), h === d ? t = d : t !== d && (t += (h ?? "") + n[c + 1]), this._$AH[c] = h;
1023
+ h = R(this, a[i + c], e, c), h === O && (h = this._$AH[c]), o || (o = !B(h) || h !== this._$AH[c]), h === d ? t = d : t !== d && (t += (h ?? "") + n[c + 1]), this._$AH[c] = h;
1024
1024
  }
1025
1025
  o && !r && this.j(t);
1026
1026
  }
@@ -1028,7 +1028,7 @@ class it {
1028
1028
  t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
1029
1029
  }
1030
1030
  }
1031
- class Ye extends it {
1031
+ class Ye extends st {
1032
1032
  constructor() {
1033
1033
  super(...arguments), this.type = 3;
1034
1034
  }
@@ -1036,7 +1036,7 @@ class Ye extends it {
1036
1036
  this.element[this.name] = t === d ? void 0 : t;
1037
1037
  }
1038
1038
  }
1039
- class Ve extends it {
1039
+ class qe extends st {
1040
1040
  constructor() {
1041
1041
  super(...arguments), this.type = 4;
1042
1042
  }
@@ -1044,12 +1044,12 @@ class Ve extends it {
1044
1044
  this.element.toggleAttribute(this.name, !!t && t !== d);
1045
1045
  }
1046
1046
  }
1047
- class qe extends it {
1047
+ class Ke extends st {
1048
1048
  constructor(t, e, i, r, n) {
1049
1049
  super(t, e, i, r, n), this.type = 5;
1050
1050
  }
1051
1051
  _$AI(t, e = this) {
1052
- if ((t = I(this, t, e, 0) ?? d) === O)
1052
+ if ((t = R(this, t, e, 0) ?? d) === O)
1053
1053
  return;
1054
1054
  const i = this._$AH, r = t === d && i !== d || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== d && (i === d || r);
1055
1055
  r && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
@@ -1059,7 +1059,7 @@ class qe extends it {
1059
1059
  typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
1060
1060
  }
1061
1061
  }
1062
- class Ke {
1062
+ class Ge {
1063
1063
  constructor(t, e, i) {
1064
1064
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
1065
1065
  }
@@ -1067,17 +1067,17 @@ class Ke {
1067
1067
  return this._$AM._$AU;
1068
1068
  }
1069
1069
  _$AI(t) {
1070
- I(this, t);
1070
+ R(this, t);
1071
1071
  }
1072
1072
  }
1073
- const lt = N.litHtmlPolyfillSupport;
1074
- lt == null || lt(D, z), (N.litHtmlVersions ?? (N.litHtmlVersions = [])).push("3.1.2");
1075
- const Ge = (s, t, e) => {
1073
+ const lt = j.litHtmlPolyfillSupport;
1074
+ lt == null || lt(D, W), (j.litHtmlVersions ?? (j.litHtmlVersions = [])).push("3.1.2");
1075
+ const Ze = (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
1079
  const n = (e == null ? void 0 : e.renderBefore) ?? null;
1080
- i._$litPart$ = r = new z(t.insertBefore(L(), n), n, void 0, e ?? {});
1080
+ i._$litPart$ = r = new W(t.insertBefore(L(), n), n, void 0, e ?? {});
1081
1081
  }
1082
1082
  return r._$AI(s), r;
1083
1083
  };
@@ -1086,7 +1086,7 @@ const Ge = (s, t, e) => {
1086
1086
  * Copyright 2017 Google LLC
1087
1087
  * SPDX-License-Identifier: BSD-3-Clause
1088
1088
  */
1089
- let $ = class extends T {
1089
+ let w = class extends T {
1090
1090
  constructor() {
1091
1091
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
1092
1092
  }
@@ -1097,7 +1097,7 @@ let $ = class extends T {
1097
1097
  }
1098
1098
  update(t) {
1099
1099
  const e = this.render();
1100
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ge(e, this.renderRoot, this.renderOptions);
1100
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ze(e, this.renderRoot, this.renderOptions);
1101
1101
  }
1102
1102
  connectedCallback() {
1103
1103
  var t;
@@ -1111,17 +1111,17 @@ let $ = class extends T {
1111
1111
  return O;
1112
1112
  }
1113
1113
  };
1114
- var Jt;
1115
- $._$litElement$ = !0, $.finalized = !0, (Jt = globalThis.litElementHydrateSupport) == null || Jt.call(globalThis, { LitElement: $ });
1114
+ var Xt;
1115
+ w._$litElement$ = !0, w.finalized = !0, (Xt = globalThis.litElementHydrateSupport) == null || Xt.call(globalThis, { LitElement: w });
1116
1116
  const pt = globalThis.litElementPolyfillSupport;
1117
- pt == null || pt({ LitElement: $ });
1117
+ pt == null || pt({ LitElement: w });
1118
1118
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
1119
1119
  /**
1120
1120
  * @license
1121
1121
  * Copyright 2017 Google LLC
1122
1122
  * SPDX-License-Identifier: BSD-3-Clause
1123
1123
  */
1124
- const Ze = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged: At }, Je = (s = Ze, t, e) => {
1124
+ const Je = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: At }, Xe = (s = Je, t, e) => {
1125
1125
  const { kind: i, metadata: r } = e;
1126
1126
  let n = globalThis.litPropertyMetadata.get(r);
1127
1127
  if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), n.set(e.name, s), i === "accessor") {
@@ -1143,7 +1143,7 @@ const Ze = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged:
1143
1143
  throw Error("Unsupported decorator location: " + i);
1144
1144
  };
1145
1145
  function m(s) {
1146
- return (t, e) => typeof e == "object" ? Je(s, t, e) : ((i, r, n) => {
1146
+ return (t, e) => typeof e == "object" ? Xe(s, t, e) : ((i, r, n) => {
1147
1147
  const o = r.hasOwnProperty(n);
1148
1148
  return r.constructor.createProperty(n, o ? { ...i, wrapped: !0 } : i), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
1149
1149
  })(s, t, e);
@@ -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 W(s) {
1156
+ function M(s) {
1157
1157
  return m({ ...s, state: !0, attribute: !1 });
1158
1158
  }
1159
- var Xe = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, ti = (s, t, e, i) => {
1160
- for (var r = i > 1 ? void 0 : i ? Qe(t, e) : t, n = s.length - 1, o; n >= 0; n--)
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, n = s.length - 1, o; n >= 0; n--)
1161
1161
  (o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
1162
- return i && r && Xe(t, e, r), r;
1162
+ return i && r && Qe(t, e, r), r;
1163
1163
  };
1164
- class st extends $ {
1164
+ class rt extends w {
1165
1165
  constructor() {
1166
1166
  super(...arguments), this.anchor = "BottomRight";
1167
1167
  }
@@ -1173,7 +1173,7 @@ class st extends $ {
1173
1173
  return this.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right"), d;
1174
1174
  }
1175
1175
  }
1176
- st.styles = [
1176
+ rt.styles = [
1177
1177
  U`
1178
1178
  :host {
1179
1179
  position: fixed;
@@ -1192,16 +1192,16 @@ st.styles = [
1192
1192
  }
1193
1193
  `
1194
1194
  ];
1195
- ti([
1195
+ ei([
1196
1196
  m({ attribute: !0 })
1197
- ], st.prototype, "anchor", 2);
1197
+ ], rt.prototype, "anchor", 2);
1198
1198
  /**
1199
1199
  * @license
1200
1200
  * Copyright 2017 Google LLC
1201
1201
  * SPDX-License-Identifier: BSD-3-Clause
1202
1202
  */
1203
1203
  const xt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Ct = (s) => (...t) => ({ _$litDirective$: s, values: t });
1204
- let pe = class {
1204
+ let de = class {
1205
1205
  constructor(t) {
1206
1206
  }
1207
1207
  get _$AU() {
@@ -1222,68 +1222,68 @@ let pe = class {
1222
1222
  * Copyright 2020 Google LLC
1223
1223
  * SPDX-License-Identifier: BSD-3-Clause
1224
1224
  */
1225
- const ei = (s) => s.strings === void 0;
1225
+ const ii = (s) => s.strings === void 0;
1226
1226
  /**
1227
1227
  * @license
1228
1228
  * Copyright 2017 Google LLC
1229
1229
  * SPDX-License-Identifier: BSD-3-Clause
1230
1230
  */
1231
- const j = (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), j(r, t);
1237
+ (i = r._$AO) == null || i.call(r, t, !1), H(r, t);
1238
1238
  return !0;
1239
- }, Q = (s) => {
1239
+ }, tt = (s) => {
1240
1240
  let t, e;
1241
1241
  do {
1242
1242
  if ((t = s._$AM) === void 0)
1243
1243
  break;
1244
1244
  e = t._$AN, e.delete(s), s = t;
1245
1245
  } while ((e == null ? void 0 : e.size) === 0);
1246
- }, de = (s) => {
1246
+ }, ue = (s) => {
1247
1247
  for (let t; t = s._$AM; s = t) {
1248
1248
  let e = t._$AN;
1249
1249
  if (e === void 0)
1250
1250
  t._$AN = e = /* @__PURE__ */ new Set();
1251
1251
  else if (e.has(s))
1252
1252
  break;
1253
- e.add(s), ri(t);
1253
+ e.add(s), ni(t);
1254
1254
  }
1255
1255
  };
1256
- function ii(s) {
1257
- this._$AN !== void 0 ? (Q(this), this._$AM = s, de(this)) : this._$AM = s;
1256
+ function si(s) {
1257
+ this._$AN !== void 0 ? (tt(this), this._$AM = s, ue(this)) : this._$AM = s;
1258
1258
  }
1259
- function si(s, t = !1, e = 0) {
1259
+ function ri(s, t = !1, e = 0) {
1260
1260
  const i = this._$AH, r = this._$AN;
1261
1261
  if (r !== void 0 && r.size !== 0)
1262
1262
  if (t)
1263
1263
  if (Array.isArray(i))
1264
1264
  for (let n = e; n < i.length; n++)
1265
- j(i[n], !1), Q(i[n]);
1265
+ H(i[n], !1), tt(i[n]);
1266
1266
  else
1267
- i != null && (j(i, !1), Q(i));
1267
+ i != null && (H(i, !1), tt(i));
1268
1268
  else
1269
- j(this, s);
1269
+ H(this, s);
1270
1270
  }
1271
- const ri = (s) => {
1272
- s.type == xt.CHILD && (s._$AP ?? (s._$AP = si), s._$AQ ?? (s._$AQ = ii));
1271
+ const ni = (s) => {
1272
+ s.type == xt.CHILD && (s._$AP ?? (s._$AP = ri), s._$AQ ?? (s._$AQ = si));
1273
1273
  };
1274
- class ue extends pe {
1274
+ class fe extends de {
1275
1275
  constructor() {
1276
1276
  super(...arguments), this._$AN = void 0;
1277
1277
  }
1278
1278
  _$AT(t, e, i) {
1279
- super._$AT(t, e, i), de(this), this.isConnected = t._$AU;
1279
+ super._$AT(t, e, i), ue(this), this.isConnected = t._$AU;
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 && (j(this, t), Q(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
- if (ei(this._$Ct))
1286
+ if (ii(this._$Ct))
1287
1287
  this._$Ct._$AI(t, this);
1288
1288
  else {
1289
1289
  const e = [...this._$Ct._$AH];
@@ -1295,9 +1295,9 @@ class ue 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
- const dt = /* @__PURE__ */ new Map(), Yt = /* @__PURE__ */ new WeakSet(), Vt = () => new Promise((s) => requestAnimationFrame(s)), oi = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], qt = (s, t) => {
1300
+ const dt = /* @__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;
1302
1302
  return e === 0 ? void 0 : e;
1303
1303
  }, Kt = (s, t) => {
@@ -1319,8 +1319,8 @@ const dt = /* @__PURE__ */ new Map(), Yt = /* @__PURE__ */ new WeakSet(), Vt = (
1319
1319
  t === 0 && (t = 1, e = { height: "1px" });
1320
1320
  const i = Kt(s, t);
1321
1321
  return { value: i, overrideFrom: e, transform: i == null || isNaN(i) ? void 0 : `scaleY(${i})` };
1322
- } }, ai = { duration: 333, easing: "ease-in-out" }, ci = ["left", "top", "width", "height", "opacity", "color", "background"], Gt = /* @__PURE__ */ new WeakMap();
1323
- class hi extends ue {
1322
+ } }, ci = { duration: 333, easing: "ease-in-out" }, hi = ["left", "top", "width", "height", "opacity", "color", "background"], Gt = /* @__PURE__ */ new WeakMap();
1323
+ class li extends fe {
1324
1324
  constructor(t) {
1325
1325
  if (super(t), this.t = !1, this.i = null, this.o = null, this.h = !0, this.shouldLog = !1, t.type === xt.CHILD)
1326
1326
  throw Error("The `animate` directive must be used in attribute position.");
@@ -1340,7 +1340,7 @@ class hi extends ue {
1340
1340
  return d;
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;
@@ -1354,7 +1354,7 @@ class hi extends ue {
1354
1354
  p(t) {
1355
1355
  t = t ?? {};
1356
1356
  const e = this.getController();
1357
- e !== void 0 && ((t = { ...e.defaultOptions, ...t }).keyframeOptions = { ...e.defaultOptions.keyframeOptions, ...t.keyframeOptions }), t.properties ?? (t.properties = ci), this.options = t;
1357
+ e !== void 0 && ((t = { ...e.defaultOptions, ...t }).keyframeOptions = { ...e.defaultOptions.keyframeOptions, ...t.keyframeOptions }), t.properties ?? (t.properties = hi), this.options = t;
1358
1358
  }
1359
1359
  m() {
1360
1360
  const t = {}, e = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
@@ -1381,7 +1381,7 @@ class hi extends ue {
1381
1381
  if (!this.h || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered)
1382
1382
  return;
1383
1383
  let t;
1384
- this.prepare(), await Vt;
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
1387
  const { from: n, to: o } = this.N(this.A, r, e);
@@ -1410,7 +1410,7 @@ class hi extends ue {
1410
1410
  var e;
1411
1411
  if (!this.h || (this.options.id !== void 0 && dt.set(this.options.id, this.A), this.options.out === void 0))
1412
1412
  return;
1413
- if (this.prepare(), await Vt(), (e = this.i) == null ? void 0 : e.isConnected) {
1413
+ if (this.prepare(), await Yt(), (e = this.i) == null ? void 0 : e.isConnected) {
1414
1414
  const i = this.o && this.o.parentNode === this.i ? this.o : null;
1415
1415
  if (this.i.insertBefore(this.element, i), this.options.stabilizeOut) {
1416
1416
  const r = this.m();
@@ -1442,13 +1442,13 @@ class hi extends ue {
1442
1442
  return t;
1443
1443
  }
1444
1444
  get isHostRendered() {
1445
- const t = Yt.has(this.u);
1445
+ const t = Vt.has(this.u);
1446
1446
  return t || this.u.updateComplete.then(() => {
1447
- Yt.add(this.u);
1447
+ Vt.add(this.u);
1448
1448
  }), t;
1449
1449
  }
1450
1450
  j(t, e = this.O()) {
1451
- const i = { ...ai };
1451
+ const i = { ...ci };
1452
1452
  return e.forEach((r) => Object.assign(i, r.options.keyframeOptions)), Object.assign(i, t), i;
1453
1453
  }
1454
1454
  N(t, e, i) {
@@ -1499,13 +1499,13 @@ class hi extends ue {
1499
1499
  this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, e);
1500
1500
  }
1501
1501
  }
1502
- const li = Ct(hi), pi = { name: "question", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 4C16.536 4 4 16.536 4 32C4 47.464 16.536 60 32 60C47.464 60 60 47.464 60 32C59.9827 16.5432 47.4568 4.01731 32 4ZM32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.30769 18.9151 18.9151 8.30769 32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6775 45.0788 45.0788 55.6775 32 55.6923Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9423 37.5723L36.311 32.9068L36.7354 32.4448C39.7555 29.1161 40.7645 27.0647 40.7645 24.5087C40.7645 23.1091 40.4251 21.7942 39.7041 20.6491C38.3044 18.3587 35.6323 16.9166 32.2816 16.9166C28.7565 16.9166 25.3125 18.7414 23.2581 21.6772L23.1201 21.8791C22.8232 22.3032 22.696 22.6849 22.696 22.9818C22.696 23.7029 23.926 25.9932 25.2833 25.9932C25.5378 25.9932 25.7922 25.9084 26.0467 25.7388C26.2588 25.5691 26.5981 25.2298 27.0647 24.7208C28.8885 22.6849 30.1185 21.9215 31.7726 21.9215C33.6813 21.9215 35.081 23.1939 35.081 24.8905C35.081 26.375 34.2751 27.7746 32.3664 29.8529L28.2523 34.2216C27.9554 34.6033 27.7857 34.9426 27.7857 35.282C27.7857 35.6213 27.9978 36.1726 28.4219 36.8937C29.0581 37.8692 29.7368 38.3782 30.4578 38.3782C30.9244 38.3782 31.3909 38.1237 31.9423 37.5723ZM30.882 47.4972C29.2278 47.4972 27.6585 44.7403 27.6585 43.6799C27.6585 42.1954 30.0761 40.6261 32.4089 40.6261C33.6389 40.6261 34.2751 41.1775 34.2751 42.3227C34.2751 44.0616 33.4692 45.843 32.4513 46.7761C31.9423 47.2427 31.4334 47.4972 30.882 47.4972Z"/></svg>' };
1502
+ const pi = Ct(li), di = { name: "question", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 4C16.536 4 4 16.536 4 32C4 47.464 16.536 60 32 60C47.464 60 60 47.464 60 32C59.9827 16.5432 47.4568 4.01731 32 4ZM32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.30769 18.9151 18.9151 8.30769 32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6775 45.0788 45.0788 55.6775 32 55.6923Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9423 37.5723L36.311 32.9068L36.7354 32.4448C39.7555 29.1161 40.7645 27.0647 40.7645 24.5087C40.7645 23.1091 40.4251 21.7942 39.7041 20.6491C38.3044 18.3587 35.6323 16.9166 32.2816 16.9166C28.7565 16.9166 25.3125 18.7414 23.2581 21.6772L23.1201 21.8791C22.8232 22.3032 22.696 22.6849 22.696 22.9818C22.696 23.7029 23.926 25.9932 25.2833 25.9932C25.5378 25.9932 25.7922 25.9084 26.0467 25.7388C26.2588 25.5691 26.5981 25.2298 27.0647 24.7208C28.8885 22.6849 30.1185 21.9215 31.7726 21.9215C33.6813 21.9215 35.081 23.1939 35.081 24.8905C35.081 26.375 34.2751 27.7746 32.3664 29.8529L28.2523 34.2216C27.9554 34.6033 27.7857 34.9426 27.7857 35.282C27.7857 35.6213 27.9978 36.1726 28.4219 36.8937C29.0581 37.8692 29.7368 38.3782 30.4578 38.3782C30.9244 38.3782 31.3909 38.1237 31.9423 37.5723ZM30.882 47.4972C29.2278 47.4972 27.6585 44.7403 27.6585 43.6799C27.6585 42.1954 30.0761 40.6261 32.4089 40.6261C33.6389 40.6261 34.2751 41.1775 34.2751 42.3227C34.2751 44.0616 33.4692 45.843 32.4513 46.7761C31.9423 47.2427 31.4334 47.4972 30.882 47.4972Z"/></svg>' };
1503
1503
  /**
1504
1504
  * @license
1505
1505
  * Copyright 2018 Google LLC
1506
1506
  * SPDX-License-Identifier: BSD-3-Clause
1507
1507
  */
1508
- const di = Ct(class extends pe {
1508
+ const Zt = Ct(class extends de {
1509
1509
  constructor(s) {
1510
1510
  var t;
1511
1511
  if (super(s), s.type !== xt.ATTRIBUTE || s.name !== "class" || ((t = s.strings) == null ? void 0 : t.length) > 2)
@@ -1531,19 +1531,19 @@ const di = Ct(class extends pe {
1531
1531
  }
1532
1532
  return O;
1533
1533
  }
1534
- }), V = (s, t, e) => {
1534
+ }), q = (s, t, e) => {
1535
1535
  s && e.style.setProperty(t, s);
1536
- }, fe = (s, t) => {
1536
+ }, ge = (s, t) => {
1537
1537
  var e, i, r, n;
1538
- V((e = s.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), V(
1538
+ q((e = s.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), q(
1539
1539
  (i = s.colors) == null ? void 0 : i.textOnPrimaryBackground,
1540
1540
  "--text-on-primary-background",
1541
1541
  t
1542
- ), V(
1542
+ ), q(
1543
1543
  (r = s.colors) == null ? void 0 : r.secondaryBackground,
1544
1544
  "--secondary-background",
1545
1545
  t
1546
- ), V(
1546
+ ), q(
1547
1547
  (n = s.colors) == null ? void 0 : n.textOnSecondaryBackground,
1548
1548
  "--text-on-secondary-background",
1549
1549
  t
@@ -1554,10 +1554,10 @@ const di = Ct(class extends pe {
1554
1554
  * Copyright 2020 Google LLC
1555
1555
  * SPDX-License-Identifier: BSD-3-Clause
1556
1556
  */
1557
- const ge = () => new ui();
1557
+ const me = () => new ui();
1558
1558
  class ui {
1559
1559
  }
1560
- const ft = /* @__PURE__ */ new WeakMap(), me = Ct(class extends ue {
1560
+ const ft = /* @__PURE__ */ new WeakMap(), ve = Ct(class extends fe {
1561
1561
  render(s) {
1562
1562
  return d;
1563
1563
  }
@@ -1585,14 +1585,14 @@ const ft = /* @__PURE__ */ new WeakMap(), me = Ct(class extends ue {
1585
1585
  this.rt(this.ct);
1586
1586
  }
1587
1587
  });
1588
- var fi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, rt = (s, t, e, i) => {
1588
+ var fi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, F = (s, t, e, i) => {
1589
1589
  for (var r = i > 1 ? void 0 : i ? gi(t, e) : t, n = s.length - 1, o; n >= 0; n--)
1590
1590
  (o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
1591
1591
  return i && r && fi(t, e, r), r;
1592
1592
  };
1593
- class x extends $ {
1593
+ class _ extends w {
1594
1594
  constructor() {
1595
- super(...arguments), this.active = !1, this.loaded = !1, this.containerRef = ge(), this.widgetActive$ = new se(!1), this.componentIsDestroyed$ = new $t();
1595
+ super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = me(), this.widgetActive$ = new re(!1), this.componentIsDestroyed$ = new $t();
1596
1596
  }
1597
1597
  async connectedCallback() {
1598
1598
  super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
@@ -1612,21 +1612,21 @@ class x extends $ {
1612
1612
  }
1613
1613
  _applyBranding() {
1614
1614
  var t;
1615
- (t = this.application) != null && t.settings && fe(this.application.settings.branding, this);
1615
+ (t = this.application) != null && t.settings && ge(this.application.settings.branding, this);
1616
1616
  }
1617
1617
  async _renderSymbol() {
1618
1618
  var a, c, h;
1619
1619
  const t = (a = this.application) == null ? void 0 : a.branding(), e = (c = t == null ? void 0 : t.graphics) == null ? void 0 : c.trigger;
1620
1620
  if (e)
1621
- return R` <img src=${e} class="trigger-icon" alt="" /> `;
1621
+ return I` <img src=${e} class="trigger-icon" alt="" /> `;
1622
1622
  const i = (h = this.application) == null ? void 0 : h.triggerIcon;
1623
1623
  if (!i)
1624
1624
  return d;
1625
- const r = async (l) => pi, { type: n, content: o } = i;
1625
+ const r = async (l) => di, { type: n, content: o } = i;
1626
1626
  switch (n) {
1627
1627
  case "Telia": {
1628
1628
  const l = await r();
1629
- return l ? R`<telia-icon
1629
+ return l ? I`<telia-icon
1630
1630
  class="trigger-icon"
1631
1631
  svg=${l.svg}
1632
1632
  size="lg"
@@ -1636,17 +1636,29 @@ class x extends $ {
1636
1636
  return d;
1637
1637
  }
1638
1638
  }
1639
+ hideTrigger() {
1640
+ this.triggerVisible = !1;
1641
+ }
1642
+ showTrigger() {
1643
+ this.triggerVisible = !0;
1644
+ }
1639
1645
  render() {
1640
1646
  var t, e, i, r;
1641
- return R`<div class="trigger-container" ${me(this.containerRef)}>
1642
- ${!this.active && ((r = (i = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : i.other) != null && r.showButtonLabel) ? R`
1647
+ return I`<div
1648
+ class=${Zt({
1649
+ "trigger-container": !0,
1650
+ hidden: !this.triggerVisible
1651
+ })}
1652
+ ${ve(this.containerRef)}
1653
+ >
1654
+ ${!this.active && ((r = (i = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : i.other) != null && r.showButtonLabel) ? I`
1643
1655
  <button
1644
1656
  label="${this.application.settings.branding.other.buttonLabelText ?? "Widget trigger"}"
1645
1657
  class="trigger-label"
1646
1658
  @click=${this.toggleActive}
1647
- ${li({
1659
+ ${pi({
1648
1660
  keyframeOptions: {},
1649
- in: oi,
1661
+ in: ai,
1650
1662
  stabilizeOut: !0,
1651
1663
  skipInitial: !1
1652
1664
  })}
@@ -1657,7 +1669,7 @@ class x extends $ {
1657
1669
 
1658
1670
  <button
1659
1671
  label="Widget trigger"
1660
- class=${di({
1672
+ class=${Zt({
1661
1673
  trigger: !0,
1662
1674
  active: this.active,
1663
1675
  rendered: this.loaded
@@ -1696,7 +1708,7 @@ class x extends $ {
1696
1708
  </div>`;
1697
1709
  }
1698
1710
  }
1699
- x.styles = [
1711
+ _.styles = [
1700
1712
  U`
1701
1713
  :host {
1702
1714
  --voca-rem-multiplier: 0.625;
@@ -1713,6 +1725,9 @@ x.styles = [
1713
1725
  align-items: center;
1714
1726
  gap: 1rem;
1715
1727
  }
1728
+ .trigger-container.hidden {
1729
+ display: none;
1730
+ }
1716
1731
 
1717
1732
  .trigger {
1718
1733
  transform: scale(0);
@@ -1805,18 +1820,21 @@ x.styles = [
1805
1820
  }
1806
1821
  `
1807
1822
  ];
1808
- rt([
1823
+ F([
1809
1824
  m({ attribute: !1 })
1810
- ], x.prototype, "application", 2);
1811
- rt([
1812
- W()
1813
- ], x.prototype, "active", 2);
1814
- rt([
1815
- W()
1816
- ], x.prototype, "loaded", 2);
1817
- rt([
1818
- W()
1819
- ], x.prototype, "icon", 2);
1825
+ ], _.prototype, "application", 2);
1826
+ F([
1827
+ M()
1828
+ ], _.prototype, "active", 2);
1829
+ F([
1830
+ M()
1831
+ ], _.prototype, "triggerVisible", 2);
1832
+ F([
1833
+ M()
1834
+ ], _.prototype, "loaded", 2);
1835
+ F([
1836
+ M()
1837
+ ], _.prototype, "icon", 2);
1820
1838
  var mi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, S = (s, t, e, i) => {
1821
1839
  for (var r = i > 1 ? void 0 : i ? vi(t, e) : t, n = s.length - 1, o; n >= 0; n--)
1822
1840
  (o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
@@ -1877,9 +1895,9 @@ const yi = (s) => {
1877
1895
  m({ attribute: !1 })
1878
1896
  ], t.prototype, "parent", 2), t;
1879
1897
  };
1880
- class St extends yi($) {
1898
+ class St extends yi(w) {
1881
1899
  render() {
1882
- return R`Non resolved component`;
1900
+ return I`Non resolved component`;
1883
1901
  }
1884
1902
  }
1885
1903
  St.styles = [
@@ -1901,7 +1919,7 @@ function* bi(s, t) {
1901
1919
  yield t(i, e++);
1902
1920
  }
1903
1921
  }
1904
- var y = /* @__PURE__ */ ((s) => (s.Inline = "inline", s.Trigger = "trigger", s))(y || {});
1922
+ var b = /* @__PURE__ */ ((s) => (s.Inline = "inline", s.Trigger = "trigger", s))(b || {});
1905
1923
  /**
1906
1924
  * @license
1907
1925
  * Copyright 2021 Google LLC
@@ -1922,7 +1940,7 @@ let $i = class extends Event {
1922
1940
  * Copyright 2021 Google LLC
1923
1941
  * SPDX-License-Identifier: BSD-3-Clause
1924
1942
  */
1925
- class _i {
1943
+ class wi {
1926
1944
  get value() {
1927
1945
  return this.o;
1928
1946
  }
@@ -1957,12 +1975,12 @@ class _i {
1957
1975
  * Copyright 2021 Google LLC
1958
1976
  * SPDX-License-Identifier: BSD-3-Clause
1959
1977
  */
1960
- let wi = class extends Event {
1978
+ let _i = class extends Event {
1961
1979
  constructor(t) {
1962
1980
  super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
1963
1981
  }
1964
1982
  };
1965
- class Zt extends _i {
1983
+ class Jt extends wi {
1966
1984
  constructor(t, e, i) {
1967
1985
  var r, n;
1968
1986
  super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (o) => {
@@ -1982,7 +2000,7 @@ class Zt extends _i {
1982
2000
  this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
1983
2001
  }
1984
2002
  hostConnected() {
1985
- this.host.dispatchEvent(new wi(this.context));
2003
+ this.host.dispatchEvent(new _i(this.context));
1986
2004
  }
1987
2005
  }
1988
2006
  /**
@@ -1995,7 +2013,7 @@ function Ai({ context: s }) {
1995
2013
  const i = /* @__PURE__ */ new WeakMap();
1996
2014
  if (typeof e == "object")
1997
2015
  return e.addInitializer(function() {
1998
- i.set(this, new Zt(this, { context: s }));
2016
+ i.set(this, new Jt(this, { context: s }));
1999
2017
  }), { get() {
2000
2018
  return t.get.call(this);
2001
2019
  }, set(r) {
@@ -2007,7 +2025,7 @@ function Ai({ context: s }) {
2007
2025
  } };
2008
2026
  {
2009
2027
  t.constructor.addInitializer((o) => {
2010
- i.set(o, new Zt(o, { context: s }));
2028
+ i.set(o, new Jt(o, { context: s }));
2011
2029
  });
2012
2030
  const r = Object.getOwnPropertyDescriptor(t, e);
2013
2031
  let n;
@@ -2034,9 +2052,9 @@ var xi = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, Si = (s, t
2034
2052
  return i && r && xi(t, e, r), r;
2035
2053
  };
2036
2054
  const Ei = "application";
2037
- class nt extends $ {
2055
+ class nt extends w {
2038
2056
  constructor() {
2039
- super(...arguments), this.nodes = [], this.wrapperRef = ge();
2057
+ super(...arguments), this.nodes = [], this.wrapperRef = me();
2040
2058
  }
2041
2059
  addChild(t) {
2042
2060
  t.parent = this, this.nodes.push(t);
@@ -2045,7 +2063,7 @@ class nt extends $ {
2045
2063
  if (!this.wrapperRef.value)
2046
2064
  return;
2047
2065
  const t = this.application.settings;
2048
- t != null && t.branding && fe(t.branding, this.wrapperRef.value);
2066
+ t != null && t.branding && ge(t.branding, this.wrapperRef.value);
2049
2067
  }
2050
2068
  applyStyles() {
2051
2069
  if (!this.wrapperRef.value)
@@ -2059,7 +2077,7 @@ class nt extends $ {
2059
2077
  this.applyBranding(), this.applyStyles();
2060
2078
  }
2061
2079
  render() {
2062
- return this.application.renderStrategy === y.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" ${me(this.wrapperRef)}>
2080
+ return 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")), I`<div class="widget-container" ${ve(this.wrapperRef)}>
2063
2081
  ${bi(this.nodes, (t) => t)}
2064
2082
  </div>`;
2065
2083
  }
@@ -2235,7 +2253,7 @@ class Pi {
2235
2253
  return this.root;
2236
2254
  }
2237
2255
  }
2238
- const ve = class {
2256
+ const ye = class {
2239
2257
  constructor() {
2240
2258
  this.components = /* @__PURE__ */ new Map();
2241
2259
  }
@@ -2255,13 +2273,13 @@ const ve = class {
2255
2273
  await Promise.all(s);
2256
2274
  }
2257
2275
  defineAsWebComponent(s, t) {
2258
- const e = ve.ResolveWebComponentName(s);
2276
+ const e = ye.ResolveWebComponentName(s);
2259
2277
  customElements.get(e) || customElements.define(e, t);
2260
2278
  }
2261
2279
  };
2262
- let ye = ve;
2263
- ye.ResolveWebComponentName = (s) => `ace-${s}`;
2264
- var _ = /* @__PURE__ */ ((s) => (s.Mandatory = "mandatory", s.Preferences = "preferences", s.Analytics = "analytics", s))(_ || {});
2280
+ let be = ye;
2281
+ be.ResolveWebComponentName = (s) => `ace-${s}`;
2282
+ var y = /* @__PURE__ */ ((s) => (s.Mandatory = "mandatory", s.Preferences = "preferences", s.Analytics = "analytics", s))(y || {});
2265
2283
  class Oi {
2266
2284
  constructor(t, e, i) {
2267
2285
  this.widgetId = t, this.storage = e === "localStorage" ? window.localStorage : window.sessionStorage, this.policy = i;
@@ -2313,18 +2331,37 @@ class Ti {
2313
2331
  return this.texts.get(t) || e;
2314
2332
  }
2315
2333
  }
2334
+ class Ii {
2335
+ constructor(t) {
2336
+ this.widget = t, this.name = t.name;
2337
+ }
2338
+ open() {
2339
+ this.widget.appendToDOM();
2340
+ }
2341
+ close() {
2342
+ this.widget.hide();
2343
+ }
2344
+ hideTriggerButton() {
2345
+ var t;
2346
+ (t = this.widget.trigger) == null || t.hideTrigger();
2347
+ }
2348
+ showTriggerButton() {
2349
+ var t;
2350
+ (t = this.widget.trigger) == null || t.showTrigger();
2351
+ }
2352
+ }
2316
2353
  class Ri {
2317
2354
  constructor(t, e, i, r, n) {
2318
- 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 = y.Inline, this.anchor = "BottomRight", this.autoActivate = !1, this.plugins = [], this.componentResolver = new ye(), this.components = [], this.trigger = null, this.renderStrategy = this.options.renderStrategy || y.Inline, this.triggerIcon = this.options.triggerIcon;
2355
+ 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.renderStrategy = this.options.renderStrategy || b.Inline, this.triggerIcon = this.options.triggerIcon;
2319
2356
  const o = {
2320
- [_.Mandatory]: !0,
2321
- [_.Preferences]: !0,
2322
- [_.Analytics]: !0
2357
+ [y.Mandatory]: !0,
2358
+ [y.Preferences]: !0,
2359
+ [y.Analytics]: !0
2323
2360
  };
2324
2361
  this.storage = new Oi(this.id, "sessionStorage", o), typeof n.autoActivate == "boolean" && (this.autoActivate = n.autoActivate), n.anchor && (this.anchor = n.anchor), this.container.register("$settings", r), this.texts.loadTexts(r.texts || {});
2325
2362
  }
2326
2363
  async activate() {
2327
- if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(re.Ready), this.autoActivate) {
2364
+ if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(ne.Ready), this.autoActivate) {
2328
2365
  const t = this.render();
2329
2366
  t && this._getTargetElement().appendChild(t);
2330
2367
  }
@@ -2343,23 +2380,23 @@ class Ri {
2343
2380
  return this.plugins.push(t), this;
2344
2381
  }
2345
2382
  appendToDOM() {
2346
- this.root && (this.root.classList.add("expanded"), this.root.classList.remove("hidden"), document.body.appendChild(this.root)), this.storage.set("open", "true", _.Mandatory);
2383
+ this.root && (this.root.classList.add("expanded"), this.root.classList.remove("hidden"), document.body.appendChild(this.root)), this.storage.set("open", "true", y.Mandatory);
2347
2384
  }
2348
2385
  hide() {
2349
- this.root && (this.root.classList.add("hidden"), this.root.classList.remove("expanded")), this.storage.set("open", "false", _.Mandatory);
2386
+ this.root && (this.root.classList.add("hidden"), this.root.classList.remove("expanded")), this.storage.set("open", "false", y.Mandatory);
2350
2387
  }
2351
2388
  mute() {
2352
2389
  this.storage.set(
2353
2390
  "muteAudioNotifications",
2354
2391
  "true",
2355
- _.Mandatory
2392
+ y.Mandatory
2356
2393
  );
2357
2394
  }
2358
2395
  unmute() {
2359
2396
  this.storage.set(
2360
2397
  "muteAudioNotifications",
2361
2398
  "false",
2362
- _.Mandatory
2399
+ y.Mandatory
2363
2400
  );
2364
2401
  }
2365
2402
  registerComponent(t, e) {
@@ -2377,26 +2414,26 @@ class Ri {
2377
2414
  }
2378
2415
  _getTargetElement() {
2379
2416
  let t = "bottom-right";
2380
- if (this.anchor === "BottomRight" ? t = "bottom-right" : this.anchor === "BottomLeft" && (t = "bottom-left"), this.renderStrategy === y.Trigger) {
2417
+ if (this.anchor === "BottomRight" ? t = "bottom-right" : this.anchor === "BottomLeft" && (t = "bottom-left"), this.renderStrategy === b.Trigger) {
2381
2418
  let e = document.querySelector(
2382
2419
  `ace-trigger-slot.${t}`
2383
2420
  );
2384
- return e || (e = new st(), e.anchor = this.anchor, document.body.appendChild(e)), e;
2421
+ return e || (e = new rt(), e.anchor = this.anchor, document.body.appendChild(e)), e;
2385
2422
  }
2386
2423
  return document.body;
2387
2424
  }
2388
2425
  render() {
2389
- if (this.renderStrategy === y.Trigger) {
2390
- const t = new x();
2426
+ if (this.renderStrategy === b.Trigger) {
2427
+ const t = new _();
2391
2428
  return t.application = this, this.trigger = t, this.storage.get("open") && this.trigger.toggleActive(), t;
2392
2429
  }
2393
2430
  return this.root;
2394
2431
  }
2395
2432
  }
2396
- const zi = (s) => new tt(s), be = class {
2433
+ const Fi = (s) => new et(s), $e = class {
2397
2434
  // TODO:
2398
2435
  // private static endpoint = 'http://localhost:5299/api'; // TODO:
2399
- constructor(s = be.endpoint) {
2436
+ constructor(s = $e.endpoint) {
2400
2437
  this._endpoint = s;
2401
2438
  }
2402
2439
  async getSite(s) {
@@ -2404,8 +2441,8 @@ const zi = (s) => new tt(s), be = class {
2404
2441
  return e ? {
2405
2442
  id: e.id,
2406
2443
  apps: e.widgets.map((i) => {
2407
- let r = y.Inline;
2408
- return i.renderStrategy === "Trigger" && (r = y.Trigger), {
2444
+ let r = b.Inline;
2445
+ return i.renderStrategy === "Trigger" && (r = b.Trigger), {
2409
2446
  id: i.id,
2410
2447
  widgetId: i.widgetId,
2411
2448
  renderStrategy: r,
@@ -2427,16 +2464,41 @@ const zi = (s) => new tt(s), be = class {
2427
2464
  } : null;
2428
2465
  }
2429
2466
  };
2430
- let tt = be;
2431
- tt.endpoint = "https://widgets.ace.teliacompany.net/api";
2432
- class Ii {
2467
+ let et = $e;
2468
+ et.endpoint = "https://widgets.ace.teliacompany.net/api";
2469
+ class Ui {
2470
+ constructor(t) {
2471
+ this.site = t;
2472
+ }
2473
+ storagePolicy(t) {
2474
+ var i;
2475
+ (((i = this.site.environment) == null ? void 0 : i.applications) || []).forEach((r) => {
2476
+ if (r.storage) {
2477
+ const n = {
2478
+ [y.Analytics]: t.includes("analytics"),
2479
+ [y.Mandatory]: t.includes("mandatory"),
2480
+ [y.Preferences]: t.includes("preferences")
2481
+ };
2482
+ r.storage.updatePolicy(n);
2483
+ }
2484
+ });
2485
+ }
2486
+ }
2487
+ class Mi {
2433
2488
  constructor() {
2434
- this.applications = [], this.container = new Ut("environment", this), setTimeout(() => {
2489
+ this.applications = [], this.container = new Ut("environment", this), this.bootstrapped = !1, this.site = null, this.widgetAPIHandlers = /* @__PURE__ */ new Map(), this.siteConfigurationHandlers = [], setTimeout(() => {
2435
2490
  this.notifyWidgetsOfCreation();
2436
2491
  }, 1e3);
2437
2492
  }
2438
2493
  async bootstrap() {
2439
- await this.activate();
2494
+ await this.activate(), this.siteConfigurationHandlers.forEach((t) => {
2495
+ this.site && t(this.site.api);
2496
+ });
2497
+ for (let [t, e] of this.widgetAPIHandlers)
2498
+ e.forEach((i) => {
2499
+ i();
2500
+ });
2501
+ this.bootstrapped = !0;
2440
2502
  }
2441
2503
  async activate() {
2442
2504
  const t = this.applications.filter(
@@ -2455,19 +2517,41 @@ class Ii {
2455
2517
  );
2456
2518
  });
2457
2519
  }
2520
+ configure(t) {
2521
+ if (!this.site || !this.bootstrapped) {
2522
+ this.siteConfigurationHandlers.push(t);
2523
+ return;
2524
+ }
2525
+ t(this.site.api);
2526
+ }
2527
+ widget(t, e) {
2528
+ const i = this.applications.find((r) => r.name === t);
2529
+ if (!i) {
2530
+ const r = this.widgetAPIHandlers.get(t) || [];
2531
+ r.push(() => {
2532
+ const n = this.applications.find((o) => o.name === t);
2533
+ e(n == null ? void 0 : n.api);
2534
+ }), this.widgetAPIHandlers.set(t, r);
2535
+ return;
2536
+ }
2537
+ e(i == null ? void 0 : i.api);
2538
+ }
2458
2539
  registerApp(t, e, i, r) {
2459
2540
  const n = new Ut(e, this), o = new Ri(t, e, n, i, r);
2460
2541
  this.applications.push(o);
2461
2542
  }
2543
+ registerSite(t) {
2544
+ this.site = t;
2545
+ }
2462
2546
  plugin(t) {
2463
2547
  return this.applications.forEach((e) => {
2464
2548
  e.plugin(t);
2465
2549
  }), this;
2466
2550
  }
2467
2551
  }
2468
- class Ui {
2552
+ class ki {
2469
2553
  constructor(t) {
2470
- this.configurations = [], this.httpClient = new tt(), this.httpClient = new tt(), typeof t == "string" ? this.url = t : (t.httpClient && (this.httpClient = t.httpClient), this.loadFromConfig(t));
2554
+ this.configurations = [], this.httpClient = new et(), this.api = new Ui(this), this.httpClient = new et(), typeof t == "string" ? this.url = t : (t.httpClient && (this.httpClient = t.httpClient), this.loadFromConfig(t));
2471
2555
  }
2472
2556
  async load(t) {
2473
2557
  const e = await this.httpClient.getSite(t);
@@ -2492,7 +2576,7 @@ class Ui {
2492
2576
  }
2493
2577
  async bootstrap(t) {
2494
2578
  var e;
2495
- this.url && await this.load(this.url), this.environment = new Ii(), this.addGlobal(this.environment);
2579
+ this.url && await this.load(this.url), this.environment = new Mi(), this.addGlobal(this.environment);
2496
2580
  for await (const i of this.configurations) {
2497
2581
  const r = await this.httpClient.getWidget(i.widgetId);
2498
2582
  r && ((e = this.environment) == null || e.registerApp(
@@ -2507,18 +2591,23 @@ class Ui {
2507
2591
  }
2508
2592
  ));
2509
2593
  }
2510
- t(this.environment), await this.environment.bootstrap();
2594
+ t(this.environment), this.environment.registerSite(this), await this.environment.bootstrap();
2511
2595
  }
2512
2596
  addGlobal(t) {
2513
- globalThis.widgets = t;
2597
+ const e = globalThis.widgets;
2598
+ ((e == null ? void 0 : e._w) || []).forEach(([i, r]) => {
2599
+ t.widget(i, r);
2600
+ }), ((e == null ? void 0 : e._c) || []).forEach((i) => {
2601
+ t.configure(i);
2602
+ }), globalThis.widgets = t;
2514
2603
  }
2515
2604
  }
2516
- var ki = Object.defineProperty, Mi = Object.getOwnPropertyDescriptor, Et = (s, t, e, i) => {
2517
- for (var r = i > 1 ? void 0 : i ? Mi(t, e) : t, n = s.length - 1, o; n >= 0; n--)
2605
+ var Ni = Object.defineProperty, ji = Object.getOwnPropertyDescriptor, Et = (s, t, e, i) => {
2606
+ for (var r = i > 1 ? void 0 : i ? ji(t, e) : t, n = s.length - 1, o; n >= 0; n--)
2518
2607
  (o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
2519
- return i && r && ki(t, e, r), r;
2608
+ return i && r && Ni(t, e, r), r;
2520
2609
  };
2521
- class F extends $ {
2610
+ class V extends w {
2522
2611
  constructor() {
2523
2612
  super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
2524
2613
  }
@@ -2543,14 +2632,14 @@ class F extends $ {
2543
2632
  render() {
2544
2633
  if (!this.widget || this.status !== "activated")
2545
2634
  return d;
2546
- if (this.widget.renderStrategy === y.Trigger) {
2547
- const t = new x();
2635
+ if (this.widget.renderStrategy === b.Trigger) {
2636
+ const t = new _();
2548
2637
  return t.application = this.widget, t;
2549
2638
  }
2550
2639
  return this.widget.render();
2551
2640
  }
2552
2641
  }
2553
- F.styles = [
2642
+ V.styles = [
2554
2643
  U`
2555
2644
  :host {
2556
2645
  display: block;
@@ -2559,33 +2648,33 @@ F.styles = [
2559
2648
  ];
2560
2649
  Et([
2561
2650
  m({ attribute: !0 })
2562
- ], F.prototype, "name", 2);
2651
+ ], V.prototype, "name", 2);
2563
2652
  Et([
2564
- W()
2565
- ], F.prototype, "widget", 2);
2653
+ M()
2654
+ ], V.prototype, "widget", 2);
2566
2655
  Et([
2567
- W()
2568
- ], F.prototype, "status", 2);
2569
- customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", st);
2570
- customElements.get("ace-trigger") || customElements.define("ace-trigger", x);
2656
+ M()
2657
+ ], V.prototype, "status", 2);
2658
+ customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", rt);
2659
+ customElements.get("ace-trigger") || customElements.define("ace-trigger", _);
2571
2660
  customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", St);
2572
2661
  customElements.get("ace-wrapper") || customElements.define("ace-wrapper", nt);
2573
- customElements.get("ace-widget") || customElements.define("ace-widget", F);
2574
- const Wi = async (s, t) => {
2575
- await new Ui(s).bootstrap(t);
2662
+ customElements.get("ace-widget") || customElements.define("ace-widget", V);
2663
+ const Vi = async (s, t) => {
2664
+ await new ki(s).bootstrap(t);
2576
2665
  };
2577
2666
  export {
2578
- F as AceWidget,
2667
+ V as AceWidget,
2579
2668
  Ri as Application,
2580
2669
  Ut as Container,
2581
- Ii as Environment,
2582
- tt as HttpClient,
2583
- Ui as Site,
2584
- _ as StorageCategory,
2670
+ Mi as Environment,
2671
+ et as HttpClient,
2672
+ ki as Site,
2673
+ y as StorageCategory,
2585
2674
  Oi as StorageService,
2586
- x as Trigger,
2675
+ _ as Trigger,
2587
2676
  yi as WidgetComponent,
2588
2677
  Ei as applicationContext,
2589
- Wi as bootstrap,
2590
- zi as createHttpClient
2678
+ Vi as bootstrap,
2679
+ Fi as createHttpClient
2591
2680
  };