@telia-ace/widget-components-area-flamingo 1.0.13 → 1.1.12-rc.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1266 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const B = globalThis, Q = B.ShadowRoot && (B.ShadyCSS === void 0 || B.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 Ot = (i) => new ft(typeof i == "string" ? i : i + "", void 0, X), S = (i, ...t) => {
27
+ const e = i.length === 1 ? i[0] : t.reduce((s, r, 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
+ })(r) + i[n + 1], i[0]);
34
+ return new ft(e, i, X);
35
+ }, Tt = (i, t) => {
36
+ if (Q)
37
+ i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
38
+ else
39
+ for (const e of t) {
40
+ const s = document.createElement("style"), r = B.litNonce;
41
+ r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
42
+ }
43
+ }, nt = Q ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
44
+ let e = "";
45
+ for (const s of t.cssRules)
46
+ e += s.cssText;
47
+ return Ot(e);
48
+ })(i) : i;
49
+ /**
50
+ * @license
51
+ * Copyright 2017 Google LLC
52
+ * SPDX-License-Identifier: BSD-3-Clause
53
+ */
54
+ const { is: Ut, defineProperty: Nt, getOwnPropertyDescriptor: Mt, getOwnPropertyNames: kt, getOwnPropertySymbols: Ht, getPrototypeOf: Rt } = Object, _ = globalThis, ot = _.trustedTypes, Lt = ot ? ot.emptyScript : "", Y = _.reactiveElementPolyfillSupport, O = (i, t) => i, I = { toAttribute(i, t) {
55
+ switch (t) {
56
+ case Boolean:
57
+ i = i ? Lt : null;
58
+ break;
59
+ case Object:
60
+ case Array:
61
+ i = i == null ? i : JSON.stringify(i);
62
+ }
63
+ return i;
64
+ }, fromAttribute(i, t) {
65
+ let e = i;
66
+ switch (t) {
67
+ case Boolean:
68
+ e = i !== null;
69
+ break;
70
+ case Number:
71
+ e = i === null ? null : Number(i);
72
+ break;
73
+ case Object:
74
+ case Array:
75
+ try {
76
+ e = JSON.parse(i);
77
+ } catch {
78
+ e = null;
79
+ }
80
+ }
81
+ return e;
82
+ } }, tt = (i, t) => !Ut(i, 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(), r = this.getPropertyDescriptor(t, s, e);
94
+ r !== void 0 && Nt(this.prototype, t, r);
95
+ }
96
+ }
97
+ static getPropertyDescriptor(t, e, s) {
98
+ const { get: r, set: n } = Mt(this.prototype, t) ?? { get() {
99
+ return this[e];
100
+ }, set(o) {
101
+ this[e] = o;
102
+ } };
103
+ return { get() {
104
+ return r == null ? void 0 : r.call(this);
105
+ }, set(o) {
106
+ const c = r == null ? void 0 : r.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 = [...kt(e), ...Ht(e)];
124
+ for (const r of s)
125
+ this.createProperty(r, e[r]);
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, r] of e)
132
+ this.elementProperties.set(s, r);
133
+ }
134
+ this._$Eh = /* @__PURE__ */ new Map();
135
+ for (const [e, s] of this.elementProperties) {
136
+ const r = this._$Eu(e, s);
137
+ r !== void 0 && this._$Eh.set(r, 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 r of s)
146
+ e.unshift(nt(r));
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 Tt(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), r = this.constructor._$Eu(t, s);
202
+ if (r !== 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(r) : this.setAttribute(r, o), this._$Em = null;
205
+ }
206
+ }
207
+ _$AK(t, e) {
208
+ var n;
209
+ const s = this.constructor, r = s._$Eh.get(t);
210
+ if (r !== void 0 && this._$Em !== r) {
211
+ const o = s.getPropertyOptions(r), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : I;
212
+ this._$Em = r, this[r] = c.fromAttribute(e, o.type), this._$Em = null;
213
+ }
214
+ }
215
+ requestUpdate(t, e, s, r = !1, n) {
216
+ if (t !== void 0) {
217
+ if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? tt)(r ? 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 r = this.constructor.elementProperties;
250
+ if (r.size > 0)
251
+ for (const [n, o] of r)
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((r) => {
258
+ var n;
259
+ return (n = r.hostUpdate) == null ? void 0 : n.call(r);
260
+ }), this.update(e)) : this._$ET();
261
+ } catch (r) {
262
+ throw t = !1, this._$ET(), r;
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 r;
272
+ return (r = s.hostUpdated) == null ? void 0 : r.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 T = globalThis, G = T.trustedTypes, ct = G ? G.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, $t = "$lit$", m = `lit$${(Math.random() + "").slice(9)}$`, mt = "?" + m, Dt = `<${mt}>`, b = document, N = () => b.createComment(""), M = (i) => i === null || typeof i != "object" && typeof i != "function", _t = Array.isArray, jt = (i) => _t(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", F = `[
302
+ \f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ht = /-->/g, lt = />/g, y = RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^
303
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), dt = /'/g, pt = /"/g, yt = /^(?:script|style|textarea|title)$/i, zt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), k = zt(1), w = Symbol.for("lit-noChange"), l = Symbol.for("lit-nothing"), ut = /* @__PURE__ */ new WeakMap(), A = b.createTreeWalker(b, 129);
304
+ function vt(i, t) {
305
+ if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
306
+ throw Error("invalid template strings array");
307
+ return ct !== void 0 ? ct.createHTML(t) : t;
308
+ }
309
+ const Bt = (i, t) => {
310
+ const e = i.length - 1, s = [];
311
+ let r, n = t === 2 ? "<svg>" : "", o = P;
312
+ for (let c = 0; c < e; c++) {
313
+ const a = i[c];
314
+ let d, p, h = -1, g = 0;
315
+ for (; g < a.length && (o.lastIndex = g, p = o.exec(a), p !== null); )
316
+ g = o.lastIndex, o === P ? p[1] === "!--" ? o = ht : p[1] !== void 0 ? o = lt : p[2] !== void 0 ? (yt.test(p[2]) && (r = RegExp("</" + p[2], "g")), o = y) : p[3] !== void 0 && (o = y) : o === y ? p[0] === ">" ? (o = r ?? P, h = -1) : p[1] === void 0 ? h = -2 : (h = o.lastIndex - p[2].length, d = p[1], o = p[3] === void 0 ? y : p[3] === '"' ? pt : dt) : o === pt || o === dt ? o = y : o === ht || o === lt ? o = P : (o = y, r = void 0);
317
+ const $ = o === y && i[c + 1].startsWith("/>") ? " " : "";
318
+ n += o === P ? a + Dt : h >= 0 ? (s.push(d), a.slice(0, h) + $t + a.slice(h) + m + $) : a + m + (h === -2 ? c : $);
319
+ }
320
+ return [vt(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
321
+ };
322
+ class H {
323
+ constructor({ strings: t, _$litType$: e }, s) {
324
+ let r;
325
+ this.parts = [];
326
+ let n = 0, o = 0;
327
+ const c = t.length - 1, a = this.parts, [d, p] = Bt(t, e);
328
+ if (this.el = H.createElement(d, s), A.currentNode = this.el.content, e === 2) {
329
+ const h = this.el.content.firstChild;
330
+ h.replaceWith(...h.childNodes);
331
+ }
332
+ for (; (r = A.nextNode()) !== null && a.length < c; ) {
333
+ if (r.nodeType === 1) {
334
+ if (r.hasAttributes())
335
+ for (const h of r.getAttributeNames())
336
+ if (h.endsWith($t)) {
337
+ const g = p[o++], $ = r.getAttribute(h).split(m), j = /([.?@])?(.*)/.exec(g);
338
+ a.push({ type: 1, index: n, name: j[2], strings: $, ctor: j[1] === "." ? Gt : j[1] === "?" ? Wt : j[1] === "@" ? Vt : V }), r.removeAttribute(h);
339
+ } else
340
+ h.startsWith(m) && (a.push({ type: 6, index: n }), r.removeAttribute(h));
341
+ if (yt.test(r.tagName)) {
342
+ const h = r.textContent.split(m), g = h.length - 1;
343
+ if (g > 0) {
344
+ r.textContent = G ? G.emptyScript : "";
345
+ for (let $ = 0; $ < g; $++)
346
+ r.append(h[$], N()), A.nextNode(), a.push({ type: 2, index: ++n });
347
+ r.append(h[g], N());
348
+ }
349
+ }
350
+ } else if (r.nodeType === 8)
351
+ if (r.data === mt)
352
+ a.push({ type: 2, index: n });
353
+ else {
354
+ let h = -1;
355
+ for (; (h = r.data.indexOf(m, h + 1)) !== -1; )
356
+ a.push({ type: 7, index: n }), h += 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 C(i, t, e = i, s) {
367
+ var o, c;
368
+ if (t === w)
369
+ return t;
370
+ let r = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
371
+ const n = M(t) ? void 0 : t._$litDirective$;
372
+ return (r == null ? void 0 : r.constructor) !== n && ((c = r == null ? void 0 : r._$AO) == null || c.call(r, !1), n === void 0 ? r = void 0 : (r = new n(i), r._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = r : e._$Cl = r), r !== void 0 && (t = C(i, r._$AS(i, t.values), r, 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, r = ((t == null ? void 0 : t.creationScope) ?? b).importNode(e, !0);
386
+ A.currentNode = r;
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, r;
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, r) {
409
+ this.type = 2, this._$AH = l, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = r, this._$Cv = (r == null ? void 0 : r.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 = C(this, t, e), M(t) ? t === l || t == null || t === "" ? (this._$AH !== l && this._$AR(), this._$AH = l) : t !== this._$AH && t !== w && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : jt(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 !== l && 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, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = H.createElement(vt(s.h, s.h[0]), this.options)), s);
437
+ if (((n = this._$AH) == null ? void 0 : n._$AD) === r)
438
+ this._$AH.p(e);
439
+ else {
440
+ const o = new It(r, 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, r = 0;
452
+ for (const n of t)
453
+ r === e.length ? e.push(s = new R(this.k(N()), this.k(N()), this, this.options)) : s = e[r], s._$AI(n), r++;
454
+ r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
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 r = t.nextSibling;
460
+ t.remove(), t = r;
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, r, n) {
476
+ this.type = 1, this._$AH = l, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = l;
477
+ }
478
+ _$AI(t, e = this, s, r) {
479
+ const n = this.strings;
480
+ let o = !1;
481
+ if (n === void 0)
482
+ t = C(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 = C(this, c[s + a], e, a), d === w && (d = this._$AH[a]), o || (o = !M(d) || d !== this._$AH[a]), d === l ? t = l : t !== l && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
488
+ }
489
+ o && !r && this.O(t);
490
+ }
491
+ O(t) {
492
+ t === l ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
493
+ }
494
+ }
495
+ class Gt extends V {
496
+ constructor() {
497
+ super(...arguments), this.type = 3;
498
+ }
499
+ O(t) {
500
+ this.element[this.name] = t === l ? void 0 : t;
501
+ }
502
+ }
503
+ class Wt extends V {
504
+ constructor() {
505
+ super(...arguments), this.type = 4;
506
+ }
507
+ O(t) {
508
+ this.element.toggleAttribute(this.name, !!t && t !== l);
509
+ }
510
+ }
511
+ class Vt extends V {
512
+ constructor(t, e, s, r, n) {
513
+ super(t, e, s, r, n), this.type = 5;
514
+ }
515
+ _$AI(t, e = this) {
516
+ if ((t = C(this, t, e, 0) ?? l) === w)
517
+ return;
518
+ const s = this._$AH, r = t === l && s !== l || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== l && (s === l || r);
519
+ r && 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
+ C(this, t);
535
+ }
536
+ }
537
+ const J = T.litHtmlPolyfillSupport;
538
+ J == null || J(H, R), (T.litHtmlVersions ?? (T.litHtmlVersions = [])).push("3.0.2");
539
+ const Yt = (i, t, e) => {
540
+ const s = (e == null ? void 0 : e.renderBefore) ?? t;
541
+ let r = s._$litPart$;
542
+ if (r === void 0) {
543
+ const n = (e == null ? void 0 : e.renderBefore) ?? null;
544
+ s._$litPart$ = r = new R(t.insertBefore(N(), n), n, void 0, e ?? {});
545
+ }
546
+ return r._$AI(i), r;
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 K = globalThis.litElementPolyfillSupport;
581
+ K == null || K({ LitElement: f });
582
+ (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
583
+ /**
584
+ * @license
585
+ * Copyright 2021 Google LLC
586
+ * SPDX-License-Identifier: BSD-3-Clause
587
+ */
588
+ function* At(i, t) {
589
+ if (i !== void 0) {
590
+ let e = 0;
591
+ for (const s of i)
592
+ yield t(s, e++);
593
+ }
594
+ }
595
+ /**
596
+ * @license
597
+ * Copyright 2017 Google LLC
598
+ * SPDX-License-Identifier: BSD-3-Clause
599
+ */
600
+ const Ft = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: tt }, Jt = (i = Ft, t, e) => {
601
+ const { kind: s, metadata: r } = e;
602
+ let n = globalThis.litPropertyMetadata.get(r);
603
+ if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), n.set(e.name, i), s === "accessor") {
604
+ const { name: o } = e;
605
+ return { set(c) {
606
+ const a = t.get.call(this);
607
+ t.set.call(this, c), this.requestUpdate(o, a, i);
608
+ }, init(c) {
609
+ return c !== void 0 && this.C(o, void 0, i), c;
610
+ } };
611
+ }
612
+ if (s === "setter") {
613
+ const { name: o } = e;
614
+ return function(c) {
615
+ const a = this[o];
616
+ t.call(this, c), this.requestUpdate(o, a, i);
617
+ };
618
+ }
619
+ throw Error("Unsupported decorator location: " + s);
620
+ };
621
+ function u(i) {
622
+ return (t, e) => typeof e == "object" ? Jt(i, t, e) : ((s, r, n) => {
623
+ const o = r.hasOwnProperty(n);
624
+ return r.constructor.createProperty(n, o ? { ...s, wrapped: !0 } : s), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
625
+ })(i, t, e);
626
+ }
627
+ /**
628
+ * @license
629
+ * Copyright 2017 Google LLC
630
+ * SPDX-License-Identifier: BSD-3-Clause
631
+ */
632
+ function L(i) {
633
+ return u({ ...i, state: !0, attribute: !1 });
634
+ }
635
+ /**
636
+ * @license
637
+ * Copyright 2017 Google LLC
638
+ * SPDX-License-Identifier: BSD-3-Clause
639
+ */
640
+ const bt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, wt = (i) => (...t) => ({ _$litDirective$: i, values: t });
641
+ class xt {
642
+ constructor(t) {
643
+ }
644
+ get _$AU() {
645
+ return this._$AM._$AU;
646
+ }
647
+ _$AT(t, e, s) {
648
+ this._$Ct = t, this._$AM = e, this._$Ci = s;
649
+ }
650
+ _$AS(t, e) {
651
+ return this.update(t, e);
652
+ }
653
+ update(t, e) {
654
+ return this.render(...e);
655
+ }
656
+ }
657
+ /**
658
+ * @license
659
+ * Copyright 2018 Google LLC
660
+ * SPDX-License-Identifier: BSD-3-Clause
661
+ */
662
+ const Kt = wt(class extends xt {
663
+ constructor(i) {
664
+ var t;
665
+ if (super(i), i.type !== bt.ATTRIBUTE || i.name !== "class" || ((t = i.strings) == null ? void 0 : t.length) > 2)
666
+ throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
667
+ }
668
+ render(i) {
669
+ return " " + Object.keys(i).filter((t) => i[t]).join(" ") + " ";
670
+ }
671
+ update(i, [t]) {
672
+ var s, r;
673
+ if (this.it === void 0) {
674
+ this.it = /* @__PURE__ */ new Set(), i.strings !== void 0 && (this.st = new Set(i.strings.join(" ").split(/\s/).filter((n) => n !== "")));
675
+ for (const n in t)
676
+ t[n] && !((s = this.st) != null && s.has(n)) && this.it.add(n);
677
+ return this.render(t);
678
+ }
679
+ const e = i.element.classList;
680
+ for (const n of this.it)
681
+ n in t || (e.remove(n), this.it.delete(n));
682
+ for (const n in t) {
683
+ const o = !!t[n];
684
+ o === this.it.has(n) || (r = this.st) != null && r.has(n) || (o ? (e.add(n), this.it.add(n)) : (e.remove(n), this.it.delete(n)));
685
+ }
686
+ return w;
687
+ }
688
+ }), z = (i, t, e) => {
689
+ i && e.style.setProperty(t, i);
690
+ }, Et = (i, t) => {
691
+ var e, s, r, n;
692
+ z((e = i.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), z(
693
+ (s = i.colors) == null ? void 0 : s.textOnPrimaryBackground,
694
+ "--text-on-primary-background",
695
+ t
696
+ ), z(
697
+ (r = i.colors) == null ? void 0 : r.secondaryBackground,
698
+ "--secondary-background",
699
+ t
700
+ ), z(
701
+ (n = i.colors) == null ? void 0 : n.textOnSecondaryBackground,
702
+ "--text-on-secondary-background",
703
+ t
704
+ );
705
+ };
706
+ var Zt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, q = (i, t, e, s) => {
707
+ for (var r = s > 1 ? void 0 : s ? Qt(t, e) : t, n = i.length - 1, o; n >= 0; n--)
708
+ (o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
709
+ return s && r && Zt(t, e, r), r;
710
+ };
711
+ class x extends f {
712
+ constructor() {
713
+ super(...arguments), this.active = !1, this.loaded = !1;
714
+ }
715
+ async connectedCallback() {
716
+ super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
717
+ }
718
+ _toggleActive() {
719
+ var t;
720
+ if (!((t = this.application) != null && t.root)) {
721
+ console.warn(
722
+ "Could not activate widget. No root element assigned to widget."
723
+ );
724
+ return;
725
+ }
726
+ this.active = !this.active, this.active ? this.application.appendToDOM() : this.application.removeFromDOM();
727
+ }
728
+ _applyBranding() {
729
+ var t;
730
+ (t = this.application) != null && t.settings && Et(this.application.settings.branding, this);
731
+ }
732
+ async _renderSymbol() {
733
+ var n;
734
+ const t = (n = this.application) == null ? void 0 : n.triggerIcon;
735
+ if (!t)
736
+ return l;
737
+ const e = async (o) => await import("./index-5087564d.mjs").then(
738
+ (a) => a[o]
739
+ ), { type: s, content: r } = t;
740
+ switch (s) {
741
+ case "Telia": {
742
+ const o = await e(r);
743
+ return o ? k`<telia-icon
744
+ class="trigger-icon"
745
+ svg=${o.svg}
746
+ size="lg"
747
+ ></telia-icon>` : l;
748
+ }
749
+ default:
750
+ return l;
751
+ }
752
+ }
753
+ render() {
754
+ return k`<button
755
+ class=${Kt({
756
+ trigger: !0,
757
+ active: this.active,
758
+ rendered: this.loaded
759
+ })}
760
+ @click=${this._toggleActive}
761
+ >
762
+ ${this.icon}
763
+ <span class="trigger-close">
764
+ <svg
765
+ width="18"
766
+ height="9"
767
+ viewBox="0 0 18 9"
768
+ fill="none"
769
+ xmlns="http://www.w3.org/2000/svg"
770
+ >
771
+ <path
772
+ 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"
773
+ fill="white"
774
+ />
775
+ </svg>
776
+ </span>
777
+ <span class="trigger-loader">
778
+ <svg viewBox="25 25 50 50">
779
+ <circle
780
+ cx="50"
781
+ cy="50"
782
+ r="20"
783
+ fill="none"
784
+ stroke="#000"
785
+ stroke-width="2"
786
+ stroke-miterlimit="10"
787
+ />
788
+ </svg>
789
+ </span>
790
+ </button>`;
791
+ }
792
+ }
793
+ x.styles = [
794
+ S`
795
+ :host {
796
+ --voca-rem-multiplier: 0.625;
797
+ display: block;
798
+ box-sizing: border-box;
799
+ }
800
+
801
+ .trigger {
802
+ position: fixed;
803
+ transform: scale(0);
804
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
805
+ bottom: 20px;
806
+ right: 20px;
807
+ z-index: 5;
808
+ display: flex;
809
+ align-items: center;
810
+ justify-content: center;
811
+ border: none;
812
+ line-height: 55px;
813
+ height: 55px;
814
+ width: 55px;
815
+ border-radius: 55px;
816
+ cursor: pointer;
817
+ background-color: var(--trigger-bg, var(--primary-background));
818
+ font-family: Lato;
819
+ text-decoration: none;
820
+ border: 3px dashed transparent;
821
+ box-sizing: border-box;
822
+ transition: transform 200ms ease-out;
823
+ }
824
+ .trigger:hover {
825
+ transform: scale(1.1) !important;
826
+ }
827
+ .trigger.rendered {
828
+ transform: scale(1);
829
+ }
830
+ .trigger.active .trigger-icon {
831
+ opacity: 0;
832
+ transform: rotate(-180deg) scale(0);
833
+ }
834
+ .trigger.active .trigger-close {
835
+ opacity: 1;
836
+ transform: rotate(0deg) scale(1);
837
+ }
838
+
839
+ .trigger-icon {
840
+ display: inline-block;
841
+ line-height: inherit;
842
+ text-align: center;
843
+ opacity: 1;
844
+ transform: rotate(0deg) scale(1);
845
+ transition: opacity 200ms ease-out, transform 200ms ease-out;
846
+ color: var(--trigger-text-color, var(--text-on-primary-background));
847
+ }
848
+ .trigger-close {
849
+ opacity: 0;
850
+ transition: transform 200ms ease-out;
851
+ transform: rotate(180deg) scale(0);
852
+ position: absolute;
853
+ top: 0;
854
+ bottom: 0;
855
+ left: 0;
856
+ right: 0;
857
+ display: flex;
858
+ justify-content: center;
859
+ align-items: center;
860
+ fill: var(--trigger-text-color, var(--text-on-primary-background));
861
+ }
862
+ `
863
+ ];
864
+ q([
865
+ u({ attribute: !1 })
866
+ ], x.prototype, "application", 2);
867
+ q([
868
+ L()
869
+ ], x.prototype, "active", 2);
870
+ q([
871
+ L()
872
+ ], x.prototype, "loaded", 2);
873
+ q([
874
+ L()
875
+ ], x.prototype, "icon", 2);
876
+ var Xt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, v = (i, t, e, s) => {
877
+ for (var r = s > 1 ? void 0 : s ? te(t, e) : t, n = i.length - 1, o; n >= 0; n--)
878
+ (o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
879
+ return s && r && Xt(t, e, r), r;
880
+ };
881
+ const Ct = (i) => {
882
+ class t extends i {
883
+ constructor() {
884
+ super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
885
+ }
886
+ writeProperties(s) {
887
+ this.properties = s;
888
+ }
889
+ writeLayout(s) {
890
+ this.layout = s;
891
+ }
892
+ writeContext(s) {
893
+ this.context = s;
894
+ }
895
+ addChild(s) {
896
+ s.parent = this, this.nodes.push(s);
897
+ }
898
+ connectedCallback() {
899
+ super.connectedCallback(), this.renderRoot.host.style.setProperty(
900
+ "--width",
901
+ this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
902
+ );
903
+ }
904
+ }
905
+ return t.styles = [
906
+ // (superClass as unknown as typeof LitElement).styles ?? [],
907
+ S`
908
+ :host {
909
+ font-family: var(--font-family);
910
+ grid-column: span var(--width);
911
+ max-width: 100%;
912
+ overflow: hidden;
913
+ box-sizing: border-box;
914
+ display: block;
915
+ }
916
+ * {
917
+ box-sizing: border-box;
918
+ }
919
+ `
920
+ ], v([
921
+ u()
922
+ ], t.prototype, "properties", 2), v([
923
+ u()
924
+ ], t.prototype, "context", 2), v([
925
+ u()
926
+ ], t.prototype, "layout", 2), v([
927
+ u()
928
+ ], t.prototype, "name", 2), v([
929
+ u()
930
+ ], t.prototype, "type", 2), v([
931
+ u({ attribute: !1 })
932
+ ], t.prototype, "application", 2), v([
933
+ u({ attribute: !1 })
934
+ ], t.prototype, "parent", 2), t;
935
+ };
936
+ class St extends Ct(f) {
937
+ render() {
938
+ return k`Non resolved component`;
939
+ }
940
+ }
941
+ St.styles = [
942
+ S`
943
+ :host {
944
+ display: block;
945
+ }
946
+ `
947
+ ];
948
+ /**
949
+ * @license
950
+ * Copyright 2020 Google LLC
951
+ * SPDX-License-Identifier: BSD-3-Clause
952
+ */
953
+ const ee = (i) => i.strings === void 0;
954
+ /**
955
+ * @license
956
+ * Copyright 2017 Google LLC
957
+ * SPDX-License-Identifier: BSD-3-Clause
958
+ */
959
+ const U = (i, t) => {
960
+ var s;
961
+ const e = i._$AN;
962
+ if (e === void 0)
963
+ return !1;
964
+ for (const r of e)
965
+ (s = r._$AO) == null || s.call(r, t, !1), U(r, t);
966
+ return !0;
967
+ }, W = (i) => {
968
+ let t, e;
969
+ do {
970
+ if ((t = i._$AM) === void 0)
971
+ break;
972
+ e = t._$AN, e.delete(i), i = t;
973
+ } while ((e == null ? void 0 : e.size) === 0);
974
+ }, Pt = (i) => {
975
+ for (let t; t = i._$AM; i = t) {
976
+ let e = t._$AN;
977
+ if (e === void 0)
978
+ t._$AN = e = /* @__PURE__ */ new Set();
979
+ else if (e.has(i))
980
+ break;
981
+ e.add(i), re(t);
982
+ }
983
+ };
984
+ function se(i) {
985
+ this._$AN !== void 0 ? (W(this), this._$AM = i, Pt(this)) : this._$AM = i;
986
+ }
987
+ function ie(i, t = !1, e = 0) {
988
+ const s = this._$AH, r = this._$AN;
989
+ if (r !== void 0 && r.size !== 0)
990
+ if (t)
991
+ if (Array.isArray(s))
992
+ for (let n = e; n < s.length; n++)
993
+ U(s[n], !1), W(s[n]);
994
+ else
995
+ s != null && (U(s, !1), W(s));
996
+ else
997
+ U(this, i);
998
+ }
999
+ const re = (i) => {
1000
+ i.type == bt.CHILD && (i._$AP ?? (i._$AP = ie), i._$AQ ?? (i._$AQ = se));
1001
+ };
1002
+ class ne extends xt {
1003
+ constructor() {
1004
+ super(...arguments), this._$AN = void 0;
1005
+ }
1006
+ _$AT(t, e, s) {
1007
+ super._$AT(t, e, s), Pt(this), this.isConnected = t._$AU;
1008
+ }
1009
+ _$AO(t, e = !0) {
1010
+ var s, r;
1011
+ t !== this.isConnected && (this.isConnected = t, t ? (s = this.reconnected) == null || s.call(this) : (r = this.disconnected) == null || r.call(this)), e && (U(this, t), W(this));
1012
+ }
1013
+ setValue(t) {
1014
+ if (ee(this._$Ct))
1015
+ this._$Ct._$AI(t, this);
1016
+ else {
1017
+ const e = [...this._$Ct._$AH];
1018
+ e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
1019
+ }
1020
+ }
1021
+ disconnected() {
1022
+ }
1023
+ reconnected() {
1024
+ }
1025
+ }
1026
+ /**
1027
+ * @license
1028
+ * Copyright 2020 Google LLC
1029
+ * SPDX-License-Identifier: BSD-3-Clause
1030
+ */
1031
+ const oe = () => new ae();
1032
+ class ae {
1033
+ }
1034
+ const Z = /* @__PURE__ */ new WeakMap(), ce = wt(class extends ne {
1035
+ render(i) {
1036
+ return l;
1037
+ }
1038
+ update(i, [t]) {
1039
+ var s;
1040
+ const e = t !== this.G;
1041
+ return e && this.G !== void 0 && this.ot(void 0), (e || this.rt !== this.lt) && (this.G = t, this.ct = (s = i.options) == null ? void 0 : s.host, this.ot(this.lt = i.element)), l;
1042
+ }
1043
+ ot(i) {
1044
+ if (typeof this.G == "function") {
1045
+ const t = this.ct ?? globalThis;
1046
+ let e = Z.get(t);
1047
+ e === void 0 && (e = /* @__PURE__ */ new WeakMap(), Z.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ct, void 0), e.set(this.G, i), i !== void 0 && this.G.call(this.ct, i);
1048
+ } else
1049
+ this.G.value = i;
1050
+ }
1051
+ get rt() {
1052
+ var i, t;
1053
+ return typeof this.G == "function" ? (i = Z.get(this.ct ?? globalThis)) == null ? void 0 : i.get(this.G) : (t = this.G) == null ? void 0 : t.value;
1054
+ }
1055
+ disconnected() {
1056
+ this.rt === this.lt && this.ot(void 0);
1057
+ }
1058
+ reconnected() {
1059
+ this.ot(this.lt);
1060
+ }
1061
+ });
1062
+ var et = /* @__PURE__ */ ((i) => (i.Inline = "inline", i.Trigger = "trigger", i))(et || {}), he = Object.defineProperty, le = Object.getOwnPropertyDescriptor, de = (i, t, e, s) => {
1063
+ for (var r = s > 1 ? void 0 : s ? le(t, e) : t, n = i.length - 1, o; n >= 0; n--)
1064
+ (o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
1065
+ return s && r && he(t, e, r), r;
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 && Et(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"), k`<div class="widget-container" ${ce(this.wrapperRef)}>
1085
+ ${At(this.nodes, (t) => t)}
1086
+ </div>`;
1087
+ }
1088
+ }
1089
+ st.styles = S`
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
+ de([
1169
+ u({ attribute: !1 })
1170
+ ], st.prototype, "application", 2);
1171
+ var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, it = (i, t, e, s) => {
1172
+ for (var r = s > 1 ? void 0 : s ? ue(t, e) : t, n = i.length - 1, o; n >= 0; n--)
1173
+ (o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
1174
+ return s && r && pe(t, e, r), r;
1175
+ };
1176
+ class D 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 l;
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
+ D.styles = [
1209
+ S`
1210
+ :host {
1211
+ display: block;
1212
+ }
1213
+ `
1214
+ ];
1215
+ it([
1216
+ u({ attribute: !0 })
1217
+ ], D.prototype, "name", 2);
1218
+ it([
1219
+ L()
1220
+ ], D.prototype, "widget", 2);
1221
+ it([
1222
+ L()
1223
+ ], D.prototype, "status", 2);
1224
+ customElements.get("ace-trigger") || customElements.define("ace-trigger", x);
1225
+ customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", St);
1226
+ customElements.get("ace-wrapper") || customElements.define("ace-wrapper", st);
1227
+ customElements.get("ace-widget") || customElements.define("ace-widget", D);
1228
+ const ge = (i) => {
1229
+ const t = {};
1230
+ return Object.keys(i).forEach((e) => {
1231
+ e.indexOf("css-") > -1 && (t[e] = i[e]);
1232
+ }), t;
1233
+ }, fe = (i, t) => {
1234
+ const e = ge(t);
1235
+ Object.entries(e).forEach(([s, r]) => {
1236
+ i.style.setProperty(s.replace("css-", ""), r);
1237
+ });
1238
+ };
1239
+ class $e extends Ct(f) {
1240
+ constructor() {
1241
+ super(...arguments), this.nodes = [];
1242
+ }
1243
+ render() {
1244
+ var t;
1245
+ return fe(this.renderRoot.host, this.properties), this.renderRoot.host.style.setProperty(
1246
+ "--columns",
1247
+ ((t = this.properties.columns) == null ? void 0 : t.toString()) || "1"
1248
+ ), k`${At(this.nodes, (e) => e)}`;
1249
+ }
1250
+ }
1251
+ $e.styles = [
1252
+ S`
1253
+ :host {
1254
+ height: 100%;
1255
+ display: grid;
1256
+ justify-content: center;
1257
+ grid-auto-rows: max-content;
1258
+ grid-template-rows: auto;
1259
+ grid-template-columns: repeat(var(--columns), 1fr);
1260
+ }
1261
+ `
1262
+ ];
1263
+ export {
1264
+ $e as Area,
1265
+ $e as default
1266
+ };