@telia-ace/widget-components-widget-header-flamingo 1.1.12 → 1.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1274 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const j = globalThis, Q = j.ShadowRoot && (j.ShadyCSS === void 0 || j.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, X = Symbol(), rt = /* @__PURE__ */ new WeakMap();
7
+ let ft = class {
8
+ constructor(t, e, s) {
9
+ if (this._$cssResult$ = !0, s !== X)
10
+ throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
11
+ this.cssText = t, this.t = e;
12
+ }
13
+ get styleSheet() {
14
+ let t = this.o;
15
+ const e = this.t;
16
+ if (Q && t === void 0) {
17
+ const s = e !== void 0 && e.length === 1;
18
+ s && (t = rt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && rt.set(e, t));
19
+ }
20
+ return t;
21
+ }
22
+ toString() {
23
+ return this.cssText;
24
+ }
25
+ };
26
+ const Tt = (r) => new ft(typeof r == "string" ? r : r + "", void 0, X), P = (r, ...t) => {
27
+ const e = r.length === 1 ? r[0] : t.reduce((s, i, n) => s + ((o) => {
28
+ if (o._$cssResult$ === !0)
29
+ return o.cssText;
30
+ if (typeof o == "number")
31
+ return o;
32
+ 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.");
33
+ })(i) + r[n + 1], r[0]);
34
+ return new ft(e, r, X);
35
+ }, Ot = (r, t) => {
36
+ if (Q)
37
+ r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
38
+ else
39
+ for (const e of t) {
40
+ const s = document.createElement("style"), i = j.litNonce;
41
+ i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
42
+ }
43
+ }, nt = Q ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
44
+ let e = "";
45
+ for (const s of t.cssRules)
46
+ e += s.cssText;
47
+ return Tt(e);
48
+ })(r) : r;
49
+ /**
50
+ * @license
51
+ * Copyright 2017 Google LLC
52
+ * SPDX-License-Identifier: BSD-3-Clause
53
+ */
54
+ const { is: Ut, defineProperty: kt, getOwnPropertyDescriptor: Nt, getOwnPropertyNames: Mt, getOwnPropertySymbols: Ht, getPrototypeOf: Rt } = Object, _ = globalThis, ot = _.trustedTypes, Lt = ot ? ot.emptyScript : "", Y = _.reactiveElementPolyfillSupport, O = (r, t) => r, I = { toAttribute(r, t) {
55
+ switch (t) {
56
+ case Boolean:
57
+ r = r ? Lt : null;
58
+ break;
59
+ case Object:
60
+ case Array:
61
+ r = r == null ? r : JSON.stringify(r);
62
+ }
63
+ return r;
64
+ }, fromAttribute(r, t) {
65
+ let e = r;
66
+ switch (t) {
67
+ case Boolean:
68
+ e = r !== null;
69
+ break;
70
+ case Number:
71
+ e = r === null ? null : Number(r);
72
+ break;
73
+ case Object:
74
+ case Array:
75
+ try {
76
+ e = JSON.parse(r);
77
+ } catch {
78
+ e = null;
79
+ }
80
+ }
81
+ return e;
82
+ } }, tt = (r, t) => !Ut(r, t), at = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: tt };
83
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), _.litPropertyMetadata ?? (_.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
84
+ class E extends HTMLElement {
85
+ static addInitializer(t) {
86
+ this._$Ei(), (this.l ?? (this.l = [])).push(t);
87
+ }
88
+ static get observedAttributes() {
89
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
90
+ }
91
+ static createProperty(t, e = at) {
92
+ if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
93
+ const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
94
+ i !== void 0 && kt(this.prototype, t, i);
95
+ }
96
+ }
97
+ static getPropertyDescriptor(t, e, s) {
98
+ const { get: i, set: n } = Nt(this.prototype, t) ?? { get() {
99
+ return this[e];
100
+ }, set(o) {
101
+ this[e] = o;
102
+ } };
103
+ return { get() {
104
+ return i == null ? void 0 : i.call(this);
105
+ }, set(o) {
106
+ const c = i == null ? void 0 : i.call(this);
107
+ n.call(this, o), this.requestUpdate(t, c, s);
108
+ }, configurable: !0, enumerable: !0 };
109
+ }
110
+ static getPropertyOptions(t) {
111
+ return this.elementProperties.get(t) ?? at;
112
+ }
113
+ static _$Ei() {
114
+ if (this.hasOwnProperty(O("elementProperties")))
115
+ return;
116
+ const t = Rt(this);
117
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
118
+ }
119
+ static finalize() {
120
+ if (this.hasOwnProperty(O("finalized")))
121
+ return;
122
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(O("properties"))) {
123
+ const e = this.properties, s = [...Mt(e), ...Ht(e)];
124
+ for (const i of s)
125
+ this.createProperty(i, e[i]);
126
+ }
127
+ const t = this[Symbol.metadata];
128
+ if (t !== null) {
129
+ const e = litPropertyMetadata.get(t);
130
+ if (e !== void 0)
131
+ for (const [s, i] of e)
132
+ this.elementProperties.set(s, i);
133
+ }
134
+ this._$Eh = /* @__PURE__ */ new Map();
135
+ for (const [e, s] of this.elementProperties) {
136
+ const i = this._$Eu(e, s);
137
+ i !== void 0 && this._$Eh.set(i, e);
138
+ }
139
+ this.elementStyles = this.finalizeStyles(this.styles);
140
+ }
141
+ static finalizeStyles(t) {
142
+ const e = [];
143
+ if (Array.isArray(t)) {
144
+ const s = new Set(t.flat(1 / 0).reverse());
145
+ for (const i of s)
146
+ e.unshift(nt(i));
147
+ } else
148
+ t !== void 0 && e.push(nt(t));
149
+ return e;
150
+ }
151
+ static _$Eu(t, e) {
152
+ const s = e.attribute;
153
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
154
+ }
155
+ constructor() {
156
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
157
+ }
158
+ _$Ev() {
159
+ var t;
160
+ this._$Eg = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
161
+ }
162
+ addController(t) {
163
+ var e;
164
+ (this._$ES ?? (this._$ES = [])).push(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
165
+ }
166
+ removeController(t) {
167
+ var e;
168
+ (e = this._$ES) == null || e.splice(this._$ES.indexOf(t) >>> 0, 1);
169
+ }
170
+ _$E_() {
171
+ const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
172
+ for (const s of e.keys())
173
+ this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
174
+ t.size > 0 && (this._$Ep = t);
175
+ }
176
+ createRenderRoot() {
177
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
178
+ return Ot(t, this.constructor.elementStyles), t;
179
+ }
180
+ connectedCallback() {
181
+ var t;
182
+ this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) == null || t.forEach((e) => {
183
+ var s;
184
+ return (s = e.hostConnected) == null ? void 0 : s.call(e);
185
+ });
186
+ }
187
+ enableUpdating(t) {
188
+ }
189
+ disconnectedCallback() {
190
+ var t;
191
+ (t = this._$ES) == null || t.forEach((e) => {
192
+ var s;
193
+ return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
194
+ });
195
+ }
196
+ attributeChangedCallback(t, e, s) {
197
+ this._$AK(t, s);
198
+ }
199
+ _$EO(t, e) {
200
+ var n;
201
+ const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
202
+ if (i !== void 0 && s.reflect === !0) {
203
+ const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : I).toAttribute(e, s.type);
204
+ this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
205
+ }
206
+ }
207
+ _$AK(t, e) {
208
+ var n;
209
+ const s = this.constructor, i = s._$Eh.get(t);
210
+ if (i !== void 0 && this._$Em !== i) {
211
+ const o = s.getPropertyOptions(i), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : I;
212
+ this._$Em = i, this[i] = c.fromAttribute(e, o.type), this._$Em = null;
213
+ }
214
+ }
215
+ requestUpdate(t, e, s, i = !1, n) {
216
+ if (t !== void 0) {
217
+ if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? tt)(i ? n : this[t], e))
218
+ return;
219
+ this.C(t, e, s);
220
+ }
221
+ this.isUpdatePending === !1 && (this._$Eg = this._$EP());
222
+ }
223
+ C(t, e, s) {
224
+ this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
225
+ }
226
+ async _$EP() {
227
+ this.isUpdatePending = !0;
228
+ try {
229
+ await this._$Eg;
230
+ } catch (e) {
231
+ Promise.reject(e);
232
+ }
233
+ const t = this.scheduleUpdate();
234
+ return t != null && await t, !this.isUpdatePending;
235
+ }
236
+ scheduleUpdate() {
237
+ return this.performUpdate();
238
+ }
239
+ performUpdate() {
240
+ var s;
241
+ if (!this.isUpdatePending)
242
+ return;
243
+ if (!this.hasUpdated) {
244
+ if (this._$Ep) {
245
+ for (const [n, o] of this._$Ep)
246
+ this[n] = o;
247
+ this._$Ep = void 0;
248
+ }
249
+ const i = this.constructor.elementProperties;
250
+ if (i.size > 0)
251
+ for (const [n, o] of i)
252
+ o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.C(n, this[n], o);
253
+ }
254
+ let t = !1;
255
+ const e = this._$AL;
256
+ try {
257
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$ES) == null || s.forEach((i) => {
258
+ var n;
259
+ return (n = i.hostUpdate) == null ? void 0 : n.call(i);
260
+ }), this.update(e)) : this._$ET();
261
+ } catch (i) {
262
+ throw t = !1, this._$ET(), i;
263
+ }
264
+ t && this._$AE(e);
265
+ }
266
+ willUpdate(t) {
267
+ }
268
+ _$AE(t) {
269
+ var e;
270
+ (e = this._$ES) == null || e.forEach((s) => {
271
+ var i;
272
+ return (i = s.hostUpdated) == null ? void 0 : i.call(s);
273
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
274
+ }
275
+ _$ET() {
276
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
277
+ }
278
+ get updateComplete() {
279
+ return this.getUpdateComplete();
280
+ }
281
+ getUpdateComplete() {
282
+ return this._$Eg;
283
+ }
284
+ shouldUpdate(t) {
285
+ return !0;
286
+ }
287
+ update(t) {
288
+ this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EO(e, this[e]))), this._$ET();
289
+ }
290
+ updated(t) {
291
+ }
292
+ firstUpdated(t) {
293
+ }
294
+ }
295
+ E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[O("elementProperties")] = /* @__PURE__ */ new Map(), E[O("finalized")] = /* @__PURE__ */ new Map(), Y == null || Y({ ReactiveElement: E }), (_.reactiveElementVersions ?? (_.reactiveElementVersions = [])).push("2.0.1");
296
+ /**
297
+ * @license
298
+ * Copyright 2017 Google LLC
299
+ * SPDX-License-Identifier: BSD-3-Clause
300
+ */
301
+ const U = globalThis, W = U.trustedTypes, ct = W ? W.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, $t = "$lit$", m = `lit$${(Math.random() + "").slice(9)}$`, mt = "?" + m, zt = `<${mt}>`, b = document, N = () => b.createComment(""), M = (r) => r === null || typeof r != "object" && typeof r != "function", _t = Array.isArray, Dt = (r) => _t(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", J = `[
302
+ \f\r]`, T = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ht = /-->/g, lt = />/g, v = RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
303
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), dt = /'/g, pt = /"/g, vt = /^(?:script|style|textarea|title)$/i, Bt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), C = Bt(1), w = Symbol.for("lit-noChange"), h = Symbol.for("lit-nothing"), ut = /* @__PURE__ */ new WeakMap(), A = b.createTreeWalker(b, 129);
304
+ function yt(r, t) {
305
+ if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
306
+ throw Error("invalid template strings array");
307
+ return ct !== void 0 ? ct.createHTML(t) : t;
308
+ }
309
+ const jt = (r, t) => {
310
+ const e = r.length - 1, s = [];
311
+ let i, n = t === 2 ? "<svg>" : "", o = T;
312
+ for (let c = 0; c < e; c++) {
313
+ const a = r[c];
314
+ let d, p, l = -1, g = 0;
315
+ for (; g < a.length && (o.lastIndex = g, p = o.exec(a), p !== null); )
316
+ g = o.lastIndex, o === T ? p[1] === "!--" ? o = ht : p[1] !== void 0 ? o = lt : p[2] !== void 0 ? (vt.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = v) : p[3] !== void 0 && (o = v) : o === v ? p[0] === ">" ? (o = i ?? T, l = -1) : p[1] === void 0 ? l = -2 : (l = o.lastIndex - p[2].length, d = p[1], o = p[3] === void 0 ? v : p[3] === '"' ? pt : dt) : o === pt || o === dt ? o = v : o === ht || o === lt ? o = T : (o = v, i = void 0);
317
+ const $ = o === v && r[c + 1].startsWith("/>") ? " " : "";
318
+ n += o === T ? a + zt : l >= 0 ? (s.push(d), a.slice(0, l) + $t + a.slice(l) + m + $) : a + m + (l === -2 ? c : $);
319
+ }
320
+ return [yt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
321
+ };
322
+ class H {
323
+ constructor({ strings: t, _$litType$: e }, s) {
324
+ let i;
325
+ this.parts = [];
326
+ let n = 0, o = 0;
327
+ const c = t.length - 1, a = this.parts, [d, p] = jt(t, e);
328
+ if (this.el = H.createElement(d, s), A.currentNode = this.el.content, e === 2) {
329
+ const l = this.el.content.firstChild;
330
+ l.replaceWith(...l.childNodes);
331
+ }
332
+ for (; (i = A.nextNode()) !== null && a.length < c; ) {
333
+ if (i.nodeType === 1) {
334
+ if (i.hasAttributes())
335
+ for (const l of i.getAttributeNames())
336
+ if (l.endsWith($t)) {
337
+ const g = p[o++], $ = i.getAttribute(l).split(m), D = /([.?@])?(.*)/.exec(g);
338
+ a.push({ type: 1, index: n, name: D[2], strings: $, ctor: D[1] === "." ? Wt : D[1] === "?" ? Gt : D[1] === "@" ? Vt : V }), i.removeAttribute(l);
339
+ } else
340
+ l.startsWith(m) && (a.push({ type: 6, index: n }), i.removeAttribute(l));
341
+ if (vt.test(i.tagName)) {
342
+ const l = i.textContent.split(m), g = l.length - 1;
343
+ if (g > 0) {
344
+ i.textContent = W ? W.emptyScript : "";
345
+ for (let $ = 0; $ < g; $++)
346
+ i.append(l[$], N()), A.nextNode(), a.push({ type: 2, index: ++n });
347
+ i.append(l[g], N());
348
+ }
349
+ }
350
+ } else if (i.nodeType === 8)
351
+ if (i.data === mt)
352
+ a.push({ type: 2, index: n });
353
+ else {
354
+ let l = -1;
355
+ for (; (l = i.data.indexOf(m, l + 1)) !== -1; )
356
+ a.push({ type: 7, index: n }), l += m.length - 1;
357
+ }
358
+ n++;
359
+ }
360
+ }
361
+ static createElement(t, e) {
362
+ const s = b.createElement("template");
363
+ return s.innerHTML = t, s;
364
+ }
365
+ }
366
+ function S(r, t, e = r, s) {
367
+ var o, c;
368
+ if (t === w)
369
+ return t;
370
+ let i = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
371
+ const n = M(t) ? void 0 : t._$litDirective$;
372
+ return (i == null ? void 0 : i.constructor) !== n && ((c = i == null ? void 0 : i._$AO) == null || c.call(i, !1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = S(r, i._$AS(r, t.values), i, s)), t;
373
+ }
374
+ class It {
375
+ constructor(t, e) {
376
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
377
+ }
378
+ get parentNode() {
379
+ return this._$AM.parentNode;
380
+ }
381
+ get _$AU() {
382
+ return this._$AM._$AU;
383
+ }
384
+ u(t) {
385
+ const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? b).importNode(e, !0);
386
+ A.currentNode = i;
387
+ let n = A.nextNode(), o = 0, c = 0, a = s[0];
388
+ for (; a !== void 0; ) {
389
+ if (o === a.index) {
390
+ let d;
391
+ a.type === 2 ? d = new R(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new qt(n, this, t)), this._$AV.push(d), a = s[++c];
392
+ }
393
+ o !== (a == null ? void 0 : a.index) && (n = A.nextNode(), o++);
394
+ }
395
+ return A.currentNode = b, i;
396
+ }
397
+ p(t) {
398
+ let e = 0;
399
+ for (const s of this._$AV)
400
+ s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
401
+ }
402
+ }
403
+ class R {
404
+ get _$AU() {
405
+ var t;
406
+ return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
407
+ }
408
+ constructor(t, e, s, i) {
409
+ this.type = 2, this._$AH = h, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
410
+ }
411
+ get parentNode() {
412
+ let t = this._$AA.parentNode;
413
+ const e = this._$AM;
414
+ return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
415
+ }
416
+ get startNode() {
417
+ return this._$AA;
418
+ }
419
+ get endNode() {
420
+ return this._$AB;
421
+ }
422
+ _$AI(t, e = this) {
423
+ t = S(this, t, e), M(t) ? t === h || t == null || t === "" ? (this._$AH !== h && this._$AR(), this._$AH = h) : t !== this._$AH && t !== w && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Dt(t) ? this.T(t) : this._(t);
424
+ }
425
+ k(t) {
426
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
427
+ }
428
+ $(t) {
429
+ this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
430
+ }
431
+ _(t) {
432
+ this._$AH !== h && M(this._$AH) ? this._$AA.nextSibling.data = t : this.$(b.createTextNode(t)), this._$AH = t;
433
+ }
434
+ g(t) {
435
+ var n;
436
+ const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = H.createElement(yt(s.h, s.h[0]), this.options)), s);
437
+ if (((n = this._$AH) == null ? void 0 : n._$AD) === i)
438
+ this._$AH.p(e);
439
+ else {
440
+ const o = new It(i, this), c = o.u(this.options);
441
+ o.p(e), this.$(c), this._$AH = o;
442
+ }
443
+ }
444
+ _$AC(t) {
445
+ let e = ut.get(t.strings);
446
+ return e === void 0 && ut.set(t.strings, e = new H(t)), e;
447
+ }
448
+ T(t) {
449
+ _t(this._$AH) || (this._$AH = [], this._$AR());
450
+ const e = this._$AH;
451
+ let s, i = 0;
452
+ for (const n of t)
453
+ i === e.length ? e.push(s = new R(this.k(N()), this.k(N()), this, this.options)) : s = e[i], s._$AI(n), i++;
454
+ i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
455
+ }
456
+ _$AR(t = this._$AA.nextSibling, e) {
457
+ var s;
458
+ for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
459
+ const i = t.nextSibling;
460
+ t.remove(), t = i;
461
+ }
462
+ }
463
+ setConnected(t) {
464
+ var e;
465
+ this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
466
+ }
467
+ }
468
+ class V {
469
+ get tagName() {
470
+ return this.element.tagName;
471
+ }
472
+ get _$AU() {
473
+ return this._$AM._$AU;
474
+ }
475
+ constructor(t, e, s, i, n) {
476
+ this.type = 1, this._$AH = h, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = h;
477
+ }
478
+ _$AI(t, e = this, s, i) {
479
+ const n = this.strings;
480
+ let o = !1;
481
+ if (n === void 0)
482
+ t = S(this, t, e, 0), o = !M(t) || t !== this._$AH && t !== w, o && (this._$AH = t);
483
+ else {
484
+ const c = t;
485
+ let a, d;
486
+ for (t = n[0], a = 0; a < n.length - 1; a++)
487
+ d = S(this, c[s + a], e, a), d === w && (d = this._$AH[a]), o || (o = !M(d) || d !== this._$AH[a]), d === h ? t = h : t !== h && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
488
+ }
489
+ o && !i && this.O(t);
490
+ }
491
+ O(t) {
492
+ t === h ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
493
+ }
494
+ }
495
+ class Wt extends V {
496
+ constructor() {
497
+ super(...arguments), this.type = 3;
498
+ }
499
+ O(t) {
500
+ this.element[this.name] = t === h ? void 0 : t;
501
+ }
502
+ }
503
+ class Gt extends V {
504
+ constructor() {
505
+ super(...arguments), this.type = 4;
506
+ }
507
+ O(t) {
508
+ this.element.toggleAttribute(this.name, !!t && t !== h);
509
+ }
510
+ }
511
+ class Vt extends V {
512
+ constructor(t, e, s, i, n) {
513
+ super(t, e, s, i, n), this.type = 5;
514
+ }
515
+ _$AI(t, e = this) {
516
+ if ((t = S(this, t, e, 0) ?? h) === w)
517
+ return;
518
+ const s = this._$AH, i = t === h && s !== h || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== h && (s === h || i);
519
+ i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
520
+ }
521
+ handleEvent(t) {
522
+ var e;
523
+ typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
524
+ }
525
+ }
526
+ class qt {
527
+ constructor(t, e, s) {
528
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
529
+ }
530
+ get _$AU() {
531
+ return this._$AM._$AU;
532
+ }
533
+ _$AI(t) {
534
+ S(this, t);
535
+ }
536
+ }
537
+ const K = U.litHtmlPolyfillSupport;
538
+ K == null || K(H, R), (U.litHtmlVersions ?? (U.litHtmlVersions = [])).push("3.0.2");
539
+ const Yt = (r, t, e) => {
540
+ const s = (e == null ? void 0 : e.renderBefore) ?? t;
541
+ let i = s._$litPart$;
542
+ if (i === void 0) {
543
+ const n = (e == null ? void 0 : e.renderBefore) ?? null;
544
+ s._$litPart$ = i = new R(t.insertBefore(N(), n), n, void 0, e ?? {});
545
+ }
546
+ return i._$AI(r), i;
547
+ };
548
+ /**
549
+ * @license
550
+ * Copyright 2017 Google LLC
551
+ * SPDX-License-Identifier: BSD-3-Clause
552
+ */
553
+ let f = class extends E {
554
+ constructor() {
555
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
556
+ }
557
+ createRenderRoot() {
558
+ var e;
559
+ const t = super.createRenderRoot();
560
+ return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
561
+ }
562
+ update(t) {
563
+ const e = this.render();
564
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Yt(e, this.renderRoot, this.renderOptions);
565
+ }
566
+ connectedCallback() {
567
+ var t;
568
+ super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
569
+ }
570
+ disconnectedCallback() {
571
+ var t;
572
+ super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
573
+ }
574
+ render() {
575
+ return w;
576
+ }
577
+ };
578
+ var gt;
579
+ f._$litElement$ = !0, f.finalized = !0, (gt = globalThis.litElementHydrateSupport) == null || gt.call(globalThis, { LitElement: f });
580
+ const Z = globalThis.litElementPolyfillSupport;
581
+ Z == null || Z({ LitElement: f });
582
+ (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
583
+ /**
584
+ * @license
585
+ * Copyright 2017 Google LLC
586
+ * SPDX-License-Identifier: BSD-3-Clause
587
+ */
588
+ const Jt = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: tt }, Kt = (r = Jt, t, e) => {
589
+ const { kind: s, metadata: i } = e;
590
+ let n = globalThis.litPropertyMetadata.get(i);
591
+ if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), n.set(e.name, r), s === "accessor") {
592
+ const { name: o } = e;
593
+ return { set(c) {
594
+ const a = t.get.call(this);
595
+ t.set.call(this, c), this.requestUpdate(o, a, r);
596
+ }, init(c) {
597
+ return c !== void 0 && this.C(o, void 0, r), c;
598
+ } };
599
+ }
600
+ if (s === "setter") {
601
+ const { name: o } = e;
602
+ return function(c) {
603
+ const a = this[o];
604
+ t.call(this, c), this.requestUpdate(o, a, r);
605
+ };
606
+ }
607
+ throw Error("Unsupported decorator location: " + s);
608
+ };
609
+ function u(r) {
610
+ return (t, e) => typeof e == "object" ? Kt(r, t, e) : ((s, i, n) => {
611
+ const o = i.hasOwnProperty(n);
612
+ return i.constructor.createProperty(n, o ? { ...s, wrapped: !0 } : s), o ? Object.getOwnPropertyDescriptor(i, n) : void 0;
613
+ })(r, t, e);
614
+ }
615
+ /**
616
+ * @license
617
+ * Copyright 2017 Google LLC
618
+ * SPDX-License-Identifier: BSD-3-Clause
619
+ */
620
+ function L(r) {
621
+ return u({ ...r, state: !0, attribute: !1 });
622
+ }
623
+ /**
624
+ * @license
625
+ * Copyright 2017 Google LLC
626
+ * SPDX-License-Identifier: BSD-3-Clause
627
+ */
628
+ const At = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, bt = (r) => (...t) => ({ _$litDirective$: r, values: t });
629
+ class wt {
630
+ constructor(t) {
631
+ }
632
+ get _$AU() {
633
+ return this._$AM._$AU;
634
+ }
635
+ _$AT(t, e, s) {
636
+ this._$Ct = t, this._$AM = e, this._$Ci = s;
637
+ }
638
+ _$AS(t, e) {
639
+ return this.update(t, e);
640
+ }
641
+ update(t, e) {
642
+ return this.render(...e);
643
+ }
644
+ }
645
+ /**
646
+ * @license
647
+ * Copyright 2018 Google LLC
648
+ * SPDX-License-Identifier: BSD-3-Clause
649
+ */
650
+ const Zt = bt(class extends wt {
651
+ constructor(r) {
652
+ var t;
653
+ if (super(r), r.type !== At.ATTRIBUTE || r.name !== "class" || ((t = r.strings) == null ? void 0 : t.length) > 2)
654
+ throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
655
+ }
656
+ render(r) {
657
+ return " " + Object.keys(r).filter((t) => r[t]).join(" ") + " ";
658
+ }
659
+ update(r, [t]) {
660
+ var s, i;
661
+ if (this.it === void 0) {
662
+ this.it = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.st = new Set(r.strings.join(" ").split(/\s/).filter((n) => n !== "")));
663
+ for (const n in t)
664
+ t[n] && !((s = this.st) != null && s.has(n)) && this.it.add(n);
665
+ return this.render(t);
666
+ }
667
+ const e = r.element.classList;
668
+ for (const n of this.it)
669
+ n in t || (e.remove(n), this.it.delete(n));
670
+ for (const n in t) {
671
+ const o = !!t[n];
672
+ o === this.it.has(n) || (i = this.st) != null && i.has(n) || (o ? (e.add(n), this.it.add(n)) : (e.remove(n), this.it.delete(n)));
673
+ }
674
+ return w;
675
+ }
676
+ }), B = (r, t, e) => {
677
+ r && e.style.setProperty(t, r);
678
+ }, xt = (r, t) => {
679
+ var e, s, i, n;
680
+ B((e = r.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), B(
681
+ (s = r.colors) == null ? void 0 : s.textOnPrimaryBackground,
682
+ "--text-on-primary-background",
683
+ t
684
+ ), B(
685
+ (i = r.colors) == null ? void 0 : i.secondaryBackground,
686
+ "--secondary-background",
687
+ t
688
+ ), B(
689
+ (n = r.colors) == null ? void 0 : n.textOnSecondaryBackground,
690
+ "--text-on-secondary-background",
691
+ t
692
+ );
693
+ };
694
+ var Ft = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, q = (r, t, e, s) => {
695
+ for (var i = s > 1 ? void 0 : s ? Qt(t, e) : t, n = r.length - 1, o; n >= 0; n--)
696
+ (o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
697
+ return s && i && Ft(t, e, i), i;
698
+ };
699
+ class x extends f {
700
+ constructor() {
701
+ super(...arguments), this.active = !1, this.loaded = !1;
702
+ }
703
+ async connectedCallback() {
704
+ super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
705
+ }
706
+ _toggleActive() {
707
+ var t;
708
+ if (!((t = this.application) != null && t.root)) {
709
+ console.warn(
710
+ "Could not activate widget. No root element assigned to widget."
711
+ );
712
+ return;
713
+ }
714
+ this.active = !this.active, this.active ? this.application.appendToDOM() : this.application.removeFromDOM();
715
+ }
716
+ _applyBranding() {
717
+ var t;
718
+ (t = this.application) != null && t.settings && xt(this.application.settings.branding, this);
719
+ }
720
+ async _renderSymbol() {
721
+ var n;
722
+ const t = (n = this.application) == null ? void 0 : n.triggerIcon;
723
+ if (!t)
724
+ return h;
725
+ const e = async (o) => await import("./index-5087564d.mjs").then(
726
+ (a) => a[o]
727
+ ), { type: s, content: i } = t;
728
+ switch (s) {
729
+ case "Telia": {
730
+ const o = await e(i);
731
+ return o ? C`<telia-icon
732
+ class="trigger-icon"
733
+ svg=${o.svg}
734
+ size="lg"
735
+ ></telia-icon>` : h;
736
+ }
737
+ default:
738
+ return h;
739
+ }
740
+ }
741
+ render() {
742
+ return C`<button
743
+ class=${Zt({
744
+ trigger: !0,
745
+ active: this.active,
746
+ rendered: this.loaded
747
+ })}
748
+ @click=${this._toggleActive}
749
+ >
750
+ ${this.icon}
751
+ <span class="trigger-close">
752
+ <svg
753
+ width="18"
754
+ height="9"
755
+ viewBox="0 0 18 9"
756
+ fill="none"
757
+ xmlns="http://www.w3.org/2000/svg"
758
+ >
759
+ <path
760
+ d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
761
+ fill="white"
762
+ />
763
+ </svg>
764
+ </span>
765
+ <span class="trigger-loader">
766
+ <svg viewBox="25 25 50 50">
767
+ <circle
768
+ cx="50"
769
+ cy="50"
770
+ r="20"
771
+ fill="none"
772
+ stroke="#000"
773
+ stroke-width="2"
774
+ stroke-miterlimit="10"
775
+ />
776
+ </svg>
777
+ </span>
778
+ </button>`;
779
+ }
780
+ }
781
+ x.styles = [
782
+ P`
783
+ :host {
784
+ --voca-rem-multiplier: 0.625;
785
+ display: block;
786
+ box-sizing: border-box;
787
+ }
788
+
789
+ .trigger {
790
+ position: fixed;
791
+ transform: scale(0);
792
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
793
+ bottom: 20px;
794
+ right: 20px;
795
+ z-index: 5;
796
+ display: flex;
797
+ align-items: center;
798
+ justify-content: center;
799
+ border: none;
800
+ line-height: 55px;
801
+ height: 55px;
802
+ width: 55px;
803
+ border-radius: 55px;
804
+ cursor: pointer;
805
+ background-color: var(--trigger-bg, var(--primary-background));
806
+ font-family: Lato;
807
+ text-decoration: none;
808
+ border: 3px dashed transparent;
809
+ box-sizing: border-box;
810
+ transition: transform 200ms ease-out;
811
+ }
812
+ .trigger:hover {
813
+ transform: scale(1.1) !important;
814
+ }
815
+ .trigger.rendered {
816
+ transform: scale(1);
817
+ }
818
+ .trigger.active .trigger-icon {
819
+ opacity: 0;
820
+ transform: rotate(-180deg) scale(0);
821
+ }
822
+ .trigger.active .trigger-close {
823
+ opacity: 1;
824
+ transform: rotate(0deg) scale(1);
825
+ }
826
+
827
+ .trigger-icon {
828
+ display: inline-block;
829
+ line-height: inherit;
830
+ text-align: center;
831
+ opacity: 1;
832
+ transform: rotate(0deg) scale(1);
833
+ transition: opacity 200ms ease-out, transform 200ms ease-out;
834
+ color: var(--trigger-text-color, var(--text-on-primary-background));
835
+ }
836
+ .trigger-close {
837
+ opacity: 0;
838
+ transition: transform 200ms ease-out;
839
+ transform: rotate(180deg) scale(0);
840
+ position: absolute;
841
+ top: 0;
842
+ bottom: 0;
843
+ left: 0;
844
+ right: 0;
845
+ display: flex;
846
+ justify-content: center;
847
+ align-items: center;
848
+ fill: var(--trigger-text-color, var(--text-on-primary-background));
849
+ }
850
+ `
851
+ ];
852
+ q([
853
+ u({ attribute: !1 })
854
+ ], x.prototype, "application", 2);
855
+ q([
856
+ L()
857
+ ], x.prototype, "active", 2);
858
+ q([
859
+ L()
860
+ ], x.prototype, "loaded", 2);
861
+ q([
862
+ L()
863
+ ], x.prototype, "icon", 2);
864
+ var Xt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, y = (r, t, e, s) => {
865
+ for (var i = s > 1 ? void 0 : s ? te(t, e) : t, n = r.length - 1, o; n >= 0; n--)
866
+ (o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
867
+ return s && i && Xt(t, e, i), i;
868
+ };
869
+ const Et = (r) => {
870
+ class t extends r {
871
+ constructor() {
872
+ super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
873
+ }
874
+ writeProperties(s) {
875
+ this.properties = s;
876
+ }
877
+ writeLayout(s) {
878
+ this.layout = s;
879
+ }
880
+ writeContext(s) {
881
+ this.context = s;
882
+ }
883
+ addChild(s) {
884
+ s.parent = this, this.nodes.push(s);
885
+ }
886
+ connectedCallback() {
887
+ super.connectedCallback(), this.renderRoot.host.style.setProperty(
888
+ "--width",
889
+ this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
890
+ );
891
+ }
892
+ }
893
+ return t.styles = [
894
+ // (superClass as unknown as typeof LitElement).styles ?? [],
895
+ P`
896
+ :host {
897
+ font-family: var(--font-family);
898
+ grid-column: span var(--width);
899
+ max-width: 100%;
900
+ overflow: hidden;
901
+ box-sizing: border-box;
902
+ display: block;
903
+ }
904
+ * {
905
+ box-sizing: border-box;
906
+ }
907
+ `
908
+ ], y([
909
+ u()
910
+ ], t.prototype, "properties", 2), y([
911
+ u()
912
+ ], t.prototype, "context", 2), y([
913
+ u()
914
+ ], t.prototype, "layout", 2), y([
915
+ u()
916
+ ], t.prototype, "name", 2), y([
917
+ u()
918
+ ], t.prototype, "type", 2), y([
919
+ u({ attribute: !1 })
920
+ ], t.prototype, "application", 2), y([
921
+ u({ attribute: !1 })
922
+ ], t.prototype, "parent", 2), t;
923
+ };
924
+ class Ct extends Et(f) {
925
+ render() {
926
+ return C`Non resolved component`;
927
+ }
928
+ }
929
+ Ct.styles = [
930
+ P`
931
+ :host {
932
+ display: block;
933
+ }
934
+ `
935
+ ];
936
+ /**
937
+ * @license
938
+ * Copyright 2020 Google LLC
939
+ * SPDX-License-Identifier: BSD-3-Clause
940
+ */
941
+ const ee = (r) => r.strings === void 0;
942
+ /**
943
+ * @license
944
+ * Copyright 2017 Google LLC
945
+ * SPDX-License-Identifier: BSD-3-Clause
946
+ */
947
+ const k = (r, t) => {
948
+ var s;
949
+ const e = r._$AN;
950
+ if (e === void 0)
951
+ return !1;
952
+ for (const i of e)
953
+ (s = i._$AO) == null || s.call(i, t, !1), k(i, t);
954
+ return !0;
955
+ }, G = (r) => {
956
+ let t, e;
957
+ do {
958
+ if ((t = r._$AM) === void 0)
959
+ break;
960
+ e = t._$AN, e.delete(r), r = t;
961
+ } while ((e == null ? void 0 : e.size) === 0);
962
+ }, St = (r) => {
963
+ for (let t; t = r._$AM; r = t) {
964
+ let e = t._$AN;
965
+ if (e === void 0)
966
+ t._$AN = e = /* @__PURE__ */ new Set();
967
+ else if (e.has(r))
968
+ break;
969
+ e.add(r), re(t);
970
+ }
971
+ };
972
+ function se(r) {
973
+ this._$AN !== void 0 ? (G(this), this._$AM = r, St(this)) : this._$AM = r;
974
+ }
975
+ function ie(r, t = !1, e = 0) {
976
+ const s = this._$AH, i = this._$AN;
977
+ if (i !== void 0 && i.size !== 0)
978
+ if (t)
979
+ if (Array.isArray(s))
980
+ for (let n = e; n < s.length; n++)
981
+ k(s[n], !1), G(s[n]);
982
+ else
983
+ s != null && (k(s, !1), G(s));
984
+ else
985
+ k(this, r);
986
+ }
987
+ const re = (r) => {
988
+ r.type == At.CHILD && (r._$AP ?? (r._$AP = ie), r._$AQ ?? (r._$AQ = se));
989
+ };
990
+ class ne extends wt {
991
+ constructor() {
992
+ super(...arguments), this._$AN = void 0;
993
+ }
994
+ _$AT(t, e, s) {
995
+ super._$AT(t, e, s), St(this), this.isConnected = t._$AU;
996
+ }
997
+ _$AO(t, e = !0) {
998
+ var s, i;
999
+ t !== this.isConnected && (this.isConnected = t, t ? (s = this.reconnected) == null || s.call(this) : (i = this.disconnected) == null || i.call(this)), e && (k(this, t), G(this));
1000
+ }
1001
+ setValue(t) {
1002
+ if (ee(this._$Ct))
1003
+ this._$Ct._$AI(t, this);
1004
+ else {
1005
+ const e = [...this._$Ct._$AH];
1006
+ e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
1007
+ }
1008
+ }
1009
+ disconnected() {
1010
+ }
1011
+ reconnected() {
1012
+ }
1013
+ }
1014
+ /**
1015
+ * @license
1016
+ * Copyright 2020 Google LLC
1017
+ * SPDX-License-Identifier: BSD-3-Clause
1018
+ */
1019
+ const oe = () => new ae();
1020
+ class ae {
1021
+ }
1022
+ const F = /* @__PURE__ */ new WeakMap(), ce = bt(class extends ne {
1023
+ render(r) {
1024
+ return h;
1025
+ }
1026
+ update(r, [t]) {
1027
+ var s;
1028
+ const e = t !== this.G;
1029
+ return e && this.G !== void 0 && this.ot(void 0), (e || this.rt !== this.lt) && (this.G = t, this.ct = (s = r.options) == null ? void 0 : s.host, this.ot(this.lt = r.element)), h;
1030
+ }
1031
+ ot(r) {
1032
+ if (typeof this.G == "function") {
1033
+ const t = this.ct ?? globalThis;
1034
+ let e = F.get(t);
1035
+ e === void 0 && (e = /* @__PURE__ */ new WeakMap(), F.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ct, void 0), e.set(this.G, r), r !== void 0 && this.G.call(this.ct, r);
1036
+ } else
1037
+ this.G.value = r;
1038
+ }
1039
+ get rt() {
1040
+ var r, t;
1041
+ return typeof this.G == "function" ? (r = F.get(this.ct ?? globalThis)) == null ? void 0 : r.get(this.G) : (t = this.G) == null ? void 0 : t.value;
1042
+ }
1043
+ disconnected() {
1044
+ this.rt === this.lt && this.ot(void 0);
1045
+ }
1046
+ reconnected() {
1047
+ this.ot(this.lt);
1048
+ }
1049
+ });
1050
+ /**
1051
+ * @license
1052
+ * Copyright 2021 Google LLC
1053
+ * SPDX-License-Identifier: BSD-3-Clause
1054
+ */
1055
+ function* he(r, t) {
1056
+ if (r !== void 0) {
1057
+ let e = 0;
1058
+ for (const s of r)
1059
+ yield t(s, e++);
1060
+ }
1061
+ }
1062
+ var et = /* @__PURE__ */ ((r) => (r.Inline = "inline", r.Trigger = "trigger", r))(et || {}), le = Object.defineProperty, de = Object.getOwnPropertyDescriptor, pe = (r, t, e, s) => {
1063
+ for (var i = s > 1 ? void 0 : s ? de(t, e) : t, n = r.length - 1, o; n >= 0; n--)
1064
+ (o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
1065
+ return s && i && le(t, e, i), i;
1066
+ };
1067
+ class st extends f {
1068
+ constructor() {
1069
+ super(...arguments), this.nodes = [], this.wrapperRef = oe();
1070
+ }
1071
+ addChild(t) {
1072
+ t.parent = this, this.nodes.push(t);
1073
+ }
1074
+ applyBranding() {
1075
+ if (this.wrapperRef.value) {
1076
+ const t = this.application.settings;
1077
+ t != null && t.branding && xt(t.branding, this.wrapperRef.value);
1078
+ }
1079
+ }
1080
+ firstUpdated(t) {
1081
+ this.applyBranding();
1082
+ }
1083
+ render() {
1084
+ return this.application.renderStrategy === et.Trigger && this.renderRoot.host.classList.add("floating"), C`<div class="widget-container" ${ce(this.wrapperRef)}>
1085
+ ${he(this.nodes, (t) => t)}
1086
+ </div>`;
1087
+ }
1088
+ }
1089
+ st.styles = P`
1090
+ :host {
1091
+ --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
1092
+ --spacing-xs: 0.2rem;
1093
+ --spacing-sm: 0.5rem;
1094
+ --spacing-md: 1rem;
1095
+ --spacing-lg: 1.2rem;
1096
+ --spacing-xl: 1.8rem;
1097
+
1098
+ --text-color: #222222;
1099
+ --link-color: #990ae3;
1100
+ --gray-color: #f3f3f8;
1101
+ --gray-dark-color: #a6a6a6;
1102
+
1103
+ --box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
1104
+ --border-radius: var(--spacing-sm);
1105
+ --border-radius-sm: var(--spacing-sm);
1106
+ }
1107
+ :host {
1108
+ --voca-rem-multiplier: 0.625;
1109
+ box-sizing: border-box;
1110
+ display: block;
1111
+ }
1112
+
1113
+ :host(.floating) {
1114
+ position: fixed;
1115
+ z-index: 6;
1116
+ inset: auto 20px 95px auto;
1117
+ max-height: calc(100vh - 120px);
1118
+ width: 400px;
1119
+ height: 700px;
1120
+ }
1121
+ :host(.floating) .widget-container {
1122
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
1123
+ border-radius: 0.7rem;
1124
+ }
1125
+ :host(.inline) {
1126
+ height: 100%;
1127
+ position: fixed;
1128
+ inset: 0 0 0 0;
1129
+ }
1130
+
1131
+ * {
1132
+ box-sizing: border-box;
1133
+ }
1134
+ .widget-container {
1135
+ height: 100%;
1136
+ background-color: var(--primary-background);
1137
+ padding: 0 var(--spacing-sm);
1138
+ }
1139
+ .widget-container.expanded {
1140
+ opacity: 1;
1141
+ animation: slideUp 0.5s;
1142
+ }
1143
+ .widget-container.hidden {
1144
+ opacity: 0;
1145
+ animation: slideDown 0.5s;
1146
+ }
1147
+ @keyframes slideDown {
1148
+ from {
1149
+ transform: translateY(0);
1150
+ opacity: 1;
1151
+ }
1152
+ to {
1153
+ transform: translateY(100%);
1154
+ opacity: 0;
1155
+ }
1156
+ }
1157
+ @keyframes slideUp {
1158
+ from {
1159
+ transform: translateY(100%);
1160
+ opacity: 0;
1161
+ }
1162
+ to {
1163
+ transform: translateY(0);
1164
+ opacity: 1;
1165
+ }
1166
+ }
1167
+ `;
1168
+ pe([
1169
+ u({ attribute: !1 })
1170
+ ], st.prototype, "application", 2);
1171
+ var ue = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, it = (r, t, e, s) => {
1172
+ for (var i = s > 1 ? void 0 : s ? ge(t, e) : t, n = r.length - 1, o; n >= 0; n--)
1173
+ (o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
1174
+ return s && i && ue(t, e, i), i;
1175
+ };
1176
+ class z extends f {
1177
+ constructor() {
1178
+ super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
1179
+ }
1180
+ async connectedCallback() {
1181
+ super.connectedCallback(), await this.getGlobalEnvironment();
1182
+ }
1183
+ disconnectedCallback() {
1184
+ super.disconnectedCallback(), this.removeEventListener("environment-created", this.onEnvironmentCreated);
1185
+ }
1186
+ async onEnvironmentCreated(t) {
1187
+ this.widget = t.detail.widget, await this.activate(), this.requestUpdate();
1188
+ }
1189
+ async activate() {
1190
+ this.widget && (await this.widget.activate(), this.status = "activated");
1191
+ }
1192
+ async getGlobalEnvironment() {
1193
+ const t = globalThis.widgets;
1194
+ t && (this.widget = t.applications.find(
1195
+ (e) => e.name === this.name
1196
+ ), await this.activate());
1197
+ }
1198
+ render() {
1199
+ if (!this.widget || this.status !== "activated")
1200
+ return h;
1201
+ if (this.widget.renderStrategy === et.Trigger) {
1202
+ const t = new x();
1203
+ return t.application = this.widget, t;
1204
+ }
1205
+ return this.widget.render();
1206
+ }
1207
+ }
1208
+ z.styles = [
1209
+ P`
1210
+ :host {
1211
+ display: block;
1212
+ }
1213
+ `
1214
+ ];
1215
+ it([
1216
+ u({ attribute: !0 })
1217
+ ], z.prototype, "name", 2);
1218
+ it([
1219
+ L()
1220
+ ], z.prototype, "widget", 2);
1221
+ it([
1222
+ L()
1223
+ ], z.prototype, "status", 2);
1224
+ customElements.get("ace-trigger") || customElements.define("ace-trigger", x);
1225
+ customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", Ct);
1226
+ customElements.get("ace-wrapper") || customElements.define("ace-wrapper", st);
1227
+ customElements.get("ace-widget") || customElements.define("ace-widget", z);
1228
+ const Pt = Et(f);
1229
+ class fe extends Pt {
1230
+ render() {
1231
+ return C` <div class="widget-header">
1232
+ <!-- <telia-icon svg={aiRobot.svg} size="lg"></telia-icon> -->
1233
+ <div>
1234
+ <h1>${this.properties.header}</h1>
1235
+
1236
+ ${this.properties.tagline ? C`<p>${this.properties.tagline}</p>` : h}
1237
+ </div>
1238
+ </div>`;
1239
+ }
1240
+ }
1241
+ fe.styles = [
1242
+ Pt.styles || [],
1243
+ P`
1244
+ :host {
1245
+ --header-text-color: var(--text-on-primary-background);
1246
+ }
1247
+
1248
+ .widget-header {
1249
+ background-color: transparent;
1250
+ color: var(--header-text-color);
1251
+ height: 85px;
1252
+ display: flex;
1253
+ gap: var(--spacing-md);
1254
+ flex-direction: row;
1255
+ align-items: center;
1256
+ border-radius: var(--spacing-sm) var(--spacing-sm) 0px 0px;
1257
+ padding: 0 var(--spacing-md);
1258
+ }
1259
+
1260
+ h1 {
1261
+ font-size: 1.2rem;
1262
+ }
1263
+
1264
+ h1,
1265
+ p {
1266
+ margin: 0;
1267
+ padding: 0;
1268
+ }
1269
+ `
1270
+ ];
1271
+ export {
1272
+ fe as WidgetHeader,
1273
+ fe as default
1274
+ };