@telia-ace/widget-components-widget-header-flamingo 1.1.26 → 1.1.27-rc.1
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.
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-
|
|
1
|
+
"use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-c8f50b63.js")))};module.exports=r;
|
package/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-components-widget-header-flamingo",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.27-rc.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"lit": "^3.0.2",
|
|
6
|
-
"@telia-ace/widget-core-flamingo": "1.1.
|
|
6
|
+
"@telia-ace/widget-core-flamingo": "1.1.27-rc.1"
|
|
7
7
|
},
|
|
8
8
|
"main": "./index.js",
|
|
9
9
|
"module": "./index.mjs",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
6
|
+
const I = globalThis, F = I.ShadowRoot && (I.ShadyCSS === void 0 || I.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, X = Symbol(), rt = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
let ft = class {
|
|
8
8
|
constructor(t, e, s) {
|
|
9
9
|
if (this._$cssResult$ = !0, s !== X)
|
|
@@ -23,7 +23,7 @@ let ft = class {
|
|
|
23
23
|
return this.cssText;
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
const
|
|
26
|
+
const Ut = (r) => new ft(typeof r == "string" ? r : r + "", void 0, X), P = (r, ...t) => {
|
|
27
27
|
const e = r.length === 1 ? r[0] : t.reduce((s, i, n) => s + ((o) => {
|
|
28
28
|
if (o._$cssResult$ === !0)
|
|
29
29
|
return o.cssText;
|
|
@@ -32,29 +32,29 @@ const Tt = (r) => new ft(typeof r == "string" ? r : r + "", void 0, X), P = (r,
|
|
|
32
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
33
|
})(i) + r[n + 1], r[0]);
|
|
34
34
|
return new ft(e, r, X);
|
|
35
|
-
},
|
|
35
|
+
}, kt = (r, t) => {
|
|
36
36
|
if (F)
|
|
37
37
|
r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
38
38
|
else
|
|
39
39
|
for (const e of t) {
|
|
40
|
-
const s = document.createElement("style"), i =
|
|
40
|
+
const s = document.createElement("style"), i = I.litNonce;
|
|
41
41
|
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
|
|
42
42
|
}
|
|
43
43
|
}, nt = F ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
|
44
44
|
let e = "";
|
|
45
45
|
for (const s of t.cssRules)
|
|
46
46
|
e += s.cssText;
|
|
47
|
-
return
|
|
47
|
+
return Ut(e);
|
|
48
48
|
})(r) : r;
|
|
49
49
|
/**
|
|
50
50
|
* @license
|
|
51
51
|
* Copyright 2017 Google LLC
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
53
|
*/
|
|
54
|
-
const { is:
|
|
54
|
+
const { is: Nt, defineProperty: Rt, getOwnPropertyDescriptor: Mt, getOwnPropertyNames: Ht, getOwnPropertySymbols: Lt, getPrototypeOf: zt } = Object, _ = globalThis, ot = _.trustedTypes, Dt = ot ? ot.emptyScript : "", Y = _.reactiveElementPolyfillSupport, U = (r, t) => r, W = { toAttribute(r, t) {
|
|
55
55
|
switch (t) {
|
|
56
56
|
case Boolean:
|
|
57
|
-
r = r ?
|
|
57
|
+
r = r ? Dt : null;
|
|
58
58
|
break;
|
|
59
59
|
case Object:
|
|
60
60
|
case Array:
|
|
@@ -79,7 +79,7 @@ const { is: Ut, defineProperty: kt, getOwnPropertyDescriptor: Nt, getOwnProperty
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
return e;
|
|
82
|
-
} }, tt = (r, t) => !
|
|
82
|
+
} }, tt = (r, t) => !Nt(r, t), at = { attribute: !0, type: String, converter: W, reflect: !1, hasChanged: tt };
|
|
83
83
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), _.litPropertyMetadata ?? (_.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
84
84
|
class C extends HTMLElement {
|
|
85
85
|
static addInitializer(t) {
|
|
@@ -91,11 +91,11 @@ class C extends HTMLElement {
|
|
|
91
91
|
static createProperty(t, e = at) {
|
|
92
92
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
93
93
|
const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
|
|
94
|
-
i !== void 0 &&
|
|
94
|
+
i !== void 0 && Rt(this.prototype, t, i);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
static getPropertyDescriptor(t, e, s) {
|
|
98
|
-
const { get: i, set: n } =
|
|
98
|
+
const { get: i, set: n } = Mt(this.prototype, t) ?? { get() {
|
|
99
99
|
return this[e];
|
|
100
100
|
}, set(o) {
|
|
101
101
|
this[e] = o;
|
|
@@ -103,24 +103,24 @@ class C extends HTMLElement {
|
|
|
103
103
|
return { get() {
|
|
104
104
|
return i == null ? void 0 : i.call(this);
|
|
105
105
|
}, set(o) {
|
|
106
|
-
const
|
|
107
|
-
n.call(this, o), this.requestUpdate(t,
|
|
106
|
+
const h = i == null ? void 0 : i.call(this);
|
|
107
|
+
n.call(this, o), this.requestUpdate(t, h, s);
|
|
108
108
|
}, configurable: !0, enumerable: !0 };
|
|
109
109
|
}
|
|
110
110
|
static getPropertyOptions(t) {
|
|
111
111
|
return this.elementProperties.get(t) ?? at;
|
|
112
112
|
}
|
|
113
113
|
static _$Ei() {
|
|
114
|
-
if (this.hasOwnProperty(
|
|
114
|
+
if (this.hasOwnProperty(U("elementProperties")))
|
|
115
115
|
return;
|
|
116
|
-
const t =
|
|
116
|
+
const t = zt(this);
|
|
117
117
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
118
118
|
}
|
|
119
119
|
static finalize() {
|
|
120
|
-
if (this.hasOwnProperty(
|
|
120
|
+
if (this.hasOwnProperty(U("finalized")))
|
|
121
121
|
return;
|
|
122
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
123
|
-
const e = this.properties, s = [...
|
|
122
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(U("properties"))) {
|
|
123
|
+
const e = this.properties, s = [...Ht(e), ...Lt(e)];
|
|
124
124
|
for (const i of s)
|
|
125
125
|
this.createProperty(i, e[i]);
|
|
126
126
|
}
|
|
@@ -175,7 +175,7 @@ class C extends HTMLElement {
|
|
|
175
175
|
}
|
|
176
176
|
createRenderRoot() {
|
|
177
177
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
178
|
-
return
|
|
178
|
+
return kt(t, this.constructor.elementStyles), t;
|
|
179
179
|
}
|
|
180
180
|
connectedCallback() {
|
|
181
181
|
var t;
|
|
@@ -200,7 +200,7 @@ class C extends HTMLElement {
|
|
|
200
200
|
var n;
|
|
201
201
|
const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
|
|
202
202
|
if (i !== void 0 && s.reflect === !0) {
|
|
203
|
-
const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter :
|
|
203
|
+
const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : W).toAttribute(e, s.type);
|
|
204
204
|
this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
|
|
205
205
|
}
|
|
206
206
|
}
|
|
@@ -208,8 +208,8 @@ class C extends HTMLElement {
|
|
|
208
208
|
var n;
|
|
209
209
|
const s = this.constructor, i = s._$Eh.get(t);
|
|
210
210
|
if (i !== void 0 && this._$Em !== i) {
|
|
211
|
-
const o = s.getPropertyOptions(i),
|
|
212
|
-
this._$Em = i, this[i] =
|
|
211
|
+
const o = s.getPropertyOptions(i), h = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : W;
|
|
212
|
+
this._$Em = i, this[i] = h.fromAttribute(e, o.type), this._$Em = null;
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
requestUpdate(t, e, s, i = !1, n) {
|
|
@@ -292,30 +292,30 @@ class C extends HTMLElement {
|
|
|
292
292
|
firstUpdated(t) {
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
C.elementStyles = [], C.shadowRootOptions = { mode: "open" }, C[
|
|
295
|
+
C.elementStyles = [], C.shadowRootOptions = { mode: "open" }, C[U("elementProperties")] = /* @__PURE__ */ new Map(), C[U("finalized")] = /* @__PURE__ */ new Map(), Y == null || Y({ ReactiveElement: C }), (_.reactiveElementVersions ?? (_.reactiveElementVersions = [])).push("2.0.1");
|
|
296
296
|
/**
|
|
297
297
|
* @license
|
|
298
298
|
* Copyright 2017 Google LLC
|
|
299
299
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
300
300
|
*/
|
|
301
|
-
const
|
|
302
|
-
\f\r]`,
|
|
303
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), dt = /'/g, pt = /"/g, yt = /^(?:script|style|textarea|title)$/i,
|
|
301
|
+
const k = globalThis, G = k.trustedTypes, ht = G ? G.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, $t = "$lit$", m = `lit$${(Math.random() + "").slice(9)}$`, mt = "?" + m, Bt = `<${mt}>`, x = document, R = () => x.createComment(""), M = (r) => r === null || typeof r != "object" && typeof r != "function", _t = Array.isArray, jt = (r) => _t(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", J = `[
|
|
302
|
+
\f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ct = /-->/g, lt = />/g, b = RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
|
|
303
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), dt = /'/g, pt = /"/g, yt = /^(?:script|style|textarea|title)$/i, It = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), y = It(1), E = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), ut = /* @__PURE__ */ new WeakMap(), w = x.createTreeWalker(x, 129);
|
|
304
304
|
function vt(r, t) {
|
|
305
305
|
if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
|
|
306
306
|
throw Error("invalid template strings array");
|
|
307
|
-
return
|
|
307
|
+
return ht !== void 0 ? ht.createHTML(t) : t;
|
|
308
308
|
}
|
|
309
|
-
const
|
|
309
|
+
const Wt = (r, t) => {
|
|
310
310
|
const e = r.length - 1, s = [];
|
|
311
|
-
let i, n = t === 2 ? "<svg>" : "", o =
|
|
312
|
-
for (let
|
|
313
|
-
const a = r[
|
|
311
|
+
let i, n = t === 2 ? "<svg>" : "", o = O;
|
|
312
|
+
for (let h = 0; h < e; h++) {
|
|
313
|
+
const a = r[h];
|
|
314
314
|
let d, p, l = -1, u = 0;
|
|
315
315
|
for (; u < a.length && (o.lastIndex = u, p = o.exec(a), p !== null); )
|
|
316
|
-
u = o.lastIndex, o ===
|
|
317
|
-
const $ = o ===
|
|
318
|
-
n += o ===
|
|
316
|
+
u = o.lastIndex, o === O ? p[1] === "!--" ? o = ct : p[1] !== void 0 ? o = lt : p[2] !== void 0 ? (yt.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = b) : p[3] !== void 0 && (o = b) : o === b ? p[0] === ">" ? (o = i ?? O, l = -1) : p[1] === void 0 ? l = -2 : (l = o.lastIndex - p[2].length, d = p[1], o = p[3] === void 0 ? b : p[3] === '"' ? pt : dt) : o === pt || o === dt ? o = b : o === ct || o === lt ? o = O : (o = b, i = void 0);
|
|
317
|
+
const $ = o === b && r[h + 1].startsWith("/>") ? " " : "";
|
|
318
|
+
n += o === O ? a + Bt : l >= 0 ? (s.push(d), a.slice(0, l) + $t + a.slice(l) + m + $) : a + m + (l === -2 ? h : $);
|
|
319
319
|
}
|
|
320
320
|
return [vt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
|
|
321
321
|
};
|
|
@@ -324,27 +324,27 @@ class H {
|
|
|
324
324
|
let i;
|
|
325
325
|
this.parts = [];
|
|
326
326
|
let n = 0, o = 0;
|
|
327
|
-
const
|
|
328
|
-
if (this.el = H.createElement(d, s),
|
|
327
|
+
const h = t.length - 1, a = this.parts, [d, p] = Wt(t, e);
|
|
328
|
+
if (this.el = H.createElement(d, s), w.currentNode = this.el.content, e === 2) {
|
|
329
329
|
const l = this.el.content.firstChild;
|
|
330
330
|
l.replaceWith(...l.childNodes);
|
|
331
331
|
}
|
|
332
|
-
for (; (i =
|
|
332
|
+
for (; (i = w.nextNode()) !== null && a.length < h; ) {
|
|
333
333
|
if (i.nodeType === 1) {
|
|
334
334
|
if (i.hasAttributes())
|
|
335
335
|
for (const l of i.getAttributeNames())
|
|
336
336
|
if (l.endsWith($t)) {
|
|
337
|
-
const u = p[o++], $ = i.getAttribute(l).split(m),
|
|
338
|
-
a.push({ type: 1, index: n, name:
|
|
337
|
+
const u = p[o++], $ = i.getAttribute(l).split(m), B = /([.?@])?(.*)/.exec(u);
|
|
338
|
+
a.push({ type: 1, index: n, name: B[2], strings: $, ctor: B[1] === "." ? Vt : B[1] === "?" ? qt : B[1] === "@" ? Yt : q }), i.removeAttribute(l);
|
|
339
339
|
} else
|
|
340
340
|
l.startsWith(m) && (a.push({ type: 6, index: n }), i.removeAttribute(l));
|
|
341
341
|
if (yt.test(i.tagName)) {
|
|
342
342
|
const l = i.textContent.split(m), u = l.length - 1;
|
|
343
343
|
if (u > 0) {
|
|
344
|
-
i.textContent =
|
|
344
|
+
i.textContent = G ? G.emptyScript : "";
|
|
345
345
|
for (let $ = 0; $ < u; $++)
|
|
346
|
-
i.append(l[$],
|
|
347
|
-
i.append(l[u],
|
|
346
|
+
i.append(l[$], R()), w.nextNode(), a.push({ type: 2, index: ++n });
|
|
347
|
+
i.append(l[u], R());
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
} else if (i.nodeType === 8)
|
|
@@ -359,19 +359,19 @@ class H {
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
static createElement(t, e) {
|
|
362
|
-
const s =
|
|
362
|
+
const s = x.createElement("template");
|
|
363
363
|
return s.innerHTML = t, s;
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
function S(r, t, e = r, s) {
|
|
367
|
-
var o,
|
|
368
|
-
if (t ===
|
|
367
|
+
var o, h;
|
|
368
|
+
if (t === E)
|
|
369
369
|
return t;
|
|
370
370
|
let i = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
|
|
371
371
|
const n = M(t) ? void 0 : t._$litDirective$;
|
|
372
|
-
return (i == null ? void 0 : i.constructor) !== n && ((
|
|
372
|
+
return (i == null ? void 0 : i.constructor) !== n && ((h = i == null ? void 0 : i._$AO) == null || h.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
373
|
}
|
|
374
|
-
class
|
|
374
|
+
class Gt {
|
|
375
375
|
constructor(t, e) {
|
|
376
376
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
377
377
|
}
|
|
@@ -382,17 +382,17 @@ class It {
|
|
|
382
382
|
return this._$AM._$AU;
|
|
383
383
|
}
|
|
384
384
|
u(t) {
|
|
385
|
-
const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ??
|
|
386
|
-
|
|
387
|
-
let n =
|
|
385
|
+
const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? x).importNode(e, !0);
|
|
386
|
+
w.currentNode = i;
|
|
387
|
+
let n = w.nextNode(), o = 0, h = 0, a = s[0];
|
|
388
388
|
for (; a !== void 0; ) {
|
|
389
389
|
if (o === a.index) {
|
|
390
390
|
let d;
|
|
391
|
-
a.type === 2 ? d = new
|
|
391
|
+
a.type === 2 ? d = new L(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new Jt(n, this, t)), this._$AV.push(d), a = s[++h];
|
|
392
392
|
}
|
|
393
|
-
o !== (a == null ? void 0 : a.index) && (n =
|
|
393
|
+
o !== (a == null ? void 0 : a.index) && (n = w.nextNode(), o++);
|
|
394
394
|
}
|
|
395
|
-
return
|
|
395
|
+
return w.currentNode = x, i;
|
|
396
396
|
}
|
|
397
397
|
p(t) {
|
|
398
398
|
let e = 0;
|
|
@@ -400,13 +400,13 @@ class It {
|
|
|
400
400
|
s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
class
|
|
403
|
+
class L {
|
|
404
404
|
get _$AU() {
|
|
405
405
|
var t;
|
|
406
406
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
407
407
|
}
|
|
408
408
|
constructor(t, e, s, i) {
|
|
409
|
-
this.type = 2, this._$AH =
|
|
409
|
+
this.type = 2, this._$AH = c, 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
410
|
}
|
|
411
411
|
get parentNode() {
|
|
412
412
|
let t = this._$AA.parentNode;
|
|
@@ -420,7 +420,7 @@ class R {
|
|
|
420
420
|
return this._$AB;
|
|
421
421
|
}
|
|
422
422
|
_$AI(t, e = this) {
|
|
423
|
-
t = S(this, t, e), M(t) ? t ===
|
|
423
|
+
t = S(this, t, e), M(t) ? t === c || t == null || t === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : jt(t) ? this.T(t) : this._(t);
|
|
424
424
|
}
|
|
425
425
|
k(t) {
|
|
426
426
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -429,7 +429,7 @@ class R {
|
|
|
429
429
|
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
430
430
|
}
|
|
431
431
|
_(t) {
|
|
432
|
-
this._$AH !==
|
|
432
|
+
this._$AH !== c && M(this._$AH) ? this._$AA.nextSibling.data = t : this.$(x.createTextNode(t)), this._$AH = t;
|
|
433
433
|
}
|
|
434
434
|
g(t) {
|
|
435
435
|
var n;
|
|
@@ -437,8 +437,8 @@ class R {
|
|
|
437
437
|
if (((n = this._$AH) == null ? void 0 : n._$AD) === i)
|
|
438
438
|
this._$AH.p(e);
|
|
439
439
|
else {
|
|
440
|
-
const o = new
|
|
441
|
-
o.p(e), this.$(
|
|
440
|
+
const o = new Gt(i, this), h = o.u(this.options);
|
|
441
|
+
o.p(e), this.$(h), this._$AH = o;
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
444
|
_$AC(t) {
|
|
@@ -450,7 +450,7 @@ class R {
|
|
|
450
450
|
const e = this._$AH;
|
|
451
451
|
let s, i = 0;
|
|
452
452
|
for (const n of t)
|
|
453
|
-
i === e.length ? e.push(s = new
|
|
453
|
+
i === e.length ? e.push(s = new L(this.k(R()), this.k(R()), this, this.options)) : s = e[i], s._$AI(n), i++;
|
|
454
454
|
i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
|
|
455
455
|
}
|
|
456
456
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -465,7 +465,7 @@ class R {
|
|
|
465
465
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
class
|
|
468
|
+
class q {
|
|
469
469
|
get tagName() {
|
|
470
470
|
return this.element.tagName;
|
|
471
471
|
}
|
|
@@ -473,49 +473,49 @@ class V {
|
|
|
473
473
|
return this._$AM._$AU;
|
|
474
474
|
}
|
|
475
475
|
constructor(t, e, s, i, n) {
|
|
476
|
-
this.type = 1, this._$AH =
|
|
476
|
+
this.type = 1, this._$AH = c, 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 = c;
|
|
477
477
|
}
|
|
478
478
|
_$AI(t, e = this, s, i) {
|
|
479
479
|
const n = this.strings;
|
|
480
480
|
let o = !1;
|
|
481
481
|
if (n === void 0)
|
|
482
|
-
t = S(this, t, e, 0), o = !M(t) || t !== this._$AH && t !==
|
|
482
|
+
t = S(this, t, e, 0), o = !M(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
|
|
483
483
|
else {
|
|
484
|
-
const
|
|
484
|
+
const h = t;
|
|
485
485
|
let a, d;
|
|
486
486
|
for (t = n[0], a = 0; a < n.length - 1; a++)
|
|
487
|
-
d = S(this,
|
|
487
|
+
d = S(this, h[s + a], e, a), d === E && (d = this._$AH[a]), o || (o = !M(d) || d !== this._$AH[a]), d === c ? t = c : t !== c && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
|
|
488
488
|
}
|
|
489
489
|
o && !i && this.O(t);
|
|
490
490
|
}
|
|
491
491
|
O(t) {
|
|
492
|
-
t ===
|
|
492
|
+
t === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
class
|
|
495
|
+
class Vt extends q {
|
|
496
496
|
constructor() {
|
|
497
497
|
super(...arguments), this.type = 3;
|
|
498
498
|
}
|
|
499
499
|
O(t) {
|
|
500
|
-
this.element[this.name] = t ===
|
|
500
|
+
this.element[this.name] = t === c ? void 0 : t;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
class
|
|
503
|
+
class qt extends q {
|
|
504
504
|
constructor() {
|
|
505
505
|
super(...arguments), this.type = 4;
|
|
506
506
|
}
|
|
507
507
|
O(t) {
|
|
508
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
508
|
+
this.element.toggleAttribute(this.name, !!t && t !== c);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
class
|
|
511
|
+
class Yt extends q {
|
|
512
512
|
constructor(t, e, s, i, n) {
|
|
513
513
|
super(t, e, s, i, n), this.type = 5;
|
|
514
514
|
}
|
|
515
515
|
_$AI(t, e = this) {
|
|
516
|
-
if ((t = S(this, t, e, 0) ??
|
|
516
|
+
if ((t = S(this, t, e, 0) ?? c) === E)
|
|
517
517
|
return;
|
|
518
|
-
const s = this._$AH, i = t ===
|
|
518
|
+
const s = this._$AH, i = t === c && s !== c || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== c && (s === c || i);
|
|
519
519
|
i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
520
520
|
}
|
|
521
521
|
handleEvent(t) {
|
|
@@ -523,7 +523,7 @@ class Vt extends V {
|
|
|
523
523
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
|
-
class
|
|
526
|
+
class Jt {
|
|
527
527
|
constructor(t, e, s) {
|
|
528
528
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
529
529
|
}
|
|
@@ -534,14 +534,14 @@ class qt {
|
|
|
534
534
|
S(this, t);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
const K =
|
|
538
|
-
K == null || K(H,
|
|
539
|
-
const
|
|
537
|
+
const K = k.litHtmlPolyfillSupport;
|
|
538
|
+
K == null || K(H, L), (k.litHtmlVersions ?? (k.litHtmlVersions = [])).push("3.0.2");
|
|
539
|
+
const Kt = (r, t, e) => {
|
|
540
540
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
541
541
|
let i = s._$litPart$;
|
|
542
542
|
if (i === void 0) {
|
|
543
543
|
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
544
|
-
s._$litPart$ = i = new
|
|
544
|
+
s._$litPart$ = i = new L(t.insertBefore(R(), n), n, void 0, e ?? {});
|
|
545
545
|
}
|
|
546
546
|
return i._$AI(r), i;
|
|
547
547
|
};
|
|
@@ -561,7 +561,7 @@ let f = class extends C {
|
|
|
561
561
|
}
|
|
562
562
|
update(t) {
|
|
563
563
|
const e = this.render();
|
|
564
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
564
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Kt(e, this.renderRoot, this.renderOptions);
|
|
565
565
|
}
|
|
566
566
|
connectedCallback() {
|
|
567
567
|
var t;
|
|
@@ -572,7 +572,7 @@ let f = class extends C {
|
|
|
572
572
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
573
573
|
}
|
|
574
574
|
render() {
|
|
575
|
-
return
|
|
575
|
+
return E;
|
|
576
576
|
}
|
|
577
577
|
};
|
|
578
578
|
var gt;
|
|
@@ -585,29 +585,29 @@ Z == null || Z({ LitElement: f });
|
|
|
585
585
|
* Copyright 2017 Google LLC
|
|
586
586
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
587
587
|
*/
|
|
588
|
-
const
|
|
588
|
+
const Zt = { attribute: !0, type: String, converter: W, reflect: !1, hasChanged: tt }, Qt = (r = Zt, t, e) => {
|
|
589
589
|
const { kind: s, metadata: i } = e;
|
|
590
590
|
let n = globalThis.litPropertyMetadata.get(i);
|
|
591
591
|
if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), n.set(e.name, r), s === "accessor") {
|
|
592
592
|
const { name: o } = e;
|
|
593
|
-
return { set(
|
|
593
|
+
return { set(h) {
|
|
594
594
|
const a = t.get.call(this);
|
|
595
|
-
t.set.call(this,
|
|
596
|
-
}, init(
|
|
597
|
-
return
|
|
595
|
+
t.set.call(this, h), this.requestUpdate(o, a, r);
|
|
596
|
+
}, init(h) {
|
|
597
|
+
return h !== void 0 && this.C(o, void 0, r), h;
|
|
598
598
|
} };
|
|
599
599
|
}
|
|
600
600
|
if (s === "setter") {
|
|
601
601
|
const { name: o } = e;
|
|
602
|
-
return function(
|
|
602
|
+
return function(h) {
|
|
603
603
|
const a = this[o];
|
|
604
|
-
t.call(this,
|
|
604
|
+
t.call(this, h), this.requestUpdate(o, a, r);
|
|
605
605
|
};
|
|
606
606
|
}
|
|
607
607
|
throw Error("Unsupported decorator location: " + s);
|
|
608
608
|
};
|
|
609
609
|
function g(r) {
|
|
610
|
-
return (t, e) => typeof e == "object" ?
|
|
610
|
+
return (t, e) => typeof e == "object" ? Qt(r, t, e) : ((s, i, n) => {
|
|
611
611
|
const o = i.hasOwnProperty(n);
|
|
612
612
|
return i.constructor.createProperty(n, o ? { ...s, wrapped: !0 } : s), o ? Object.getOwnPropertyDescriptor(i, n) : void 0;
|
|
613
613
|
})(r, t, e);
|
|
@@ -617,7 +617,7 @@ function g(r) {
|
|
|
617
617
|
* Copyright 2017 Google LLC
|
|
618
618
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
619
619
|
*/
|
|
620
|
-
function
|
|
620
|
+
function T(r) {
|
|
621
621
|
return g({ ...r, state: !0, attribute: !1 });
|
|
622
622
|
}
|
|
623
623
|
/**
|
|
@@ -625,7 +625,7 @@ function L(r) {
|
|
|
625
625
|
* Copyright 2017 Google LLC
|
|
626
626
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
627
627
|
*/
|
|
628
|
-
const
|
|
628
|
+
const bt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, At = (r) => (...t) => ({ _$litDirective$: r, values: t });
|
|
629
629
|
class wt {
|
|
630
630
|
constructor(t) {
|
|
631
631
|
}
|
|
@@ -647,10 +647,10 @@ class wt {
|
|
|
647
647
|
* Copyright 2018 Google LLC
|
|
648
648
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
649
649
|
*/
|
|
650
|
-
const
|
|
650
|
+
const Ft = At(class extends wt {
|
|
651
651
|
constructor(r) {
|
|
652
652
|
var t;
|
|
653
|
-
if (super(r), r.type !==
|
|
653
|
+
if (super(r), r.type !== bt.ATTRIBUTE || r.name !== "class" || ((t = r.strings) == null ? void 0 : t.length) > 2)
|
|
654
654
|
throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
655
655
|
}
|
|
656
656
|
render(r) {
|
|
@@ -671,37 +671,151 @@ const Zt = bt(class extends wt {
|
|
|
671
671
|
const o = !!t[n];
|
|
672
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
673
|
}
|
|
674
|
-
return
|
|
674
|
+
return E;
|
|
675
675
|
}
|
|
676
|
-
}),
|
|
676
|
+
}), j = (r, t, e) => {
|
|
677
677
|
r && e.style.setProperty(t, r);
|
|
678
678
|
}, xt = (r, t) => {
|
|
679
679
|
var e, s, i, n;
|
|
680
|
-
|
|
680
|
+
j((e = r.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), j(
|
|
681
681
|
(s = r.colors) == null ? void 0 : s.textOnPrimaryBackground,
|
|
682
682
|
"--text-on-primary-background",
|
|
683
683
|
t
|
|
684
|
-
),
|
|
684
|
+
), j(
|
|
685
685
|
(i = r.colors) == null ? void 0 : i.secondaryBackground,
|
|
686
686
|
"--secondary-background",
|
|
687
687
|
t
|
|
688
|
-
),
|
|
688
|
+
), j(
|
|
689
689
|
(n = r.colors) == null ? void 0 : n.textOnSecondaryBackground,
|
|
690
690
|
"--text-on-secondary-background",
|
|
691
691
|
t
|
|
692
692
|
);
|
|
693
693
|
};
|
|
694
|
-
|
|
695
|
-
|
|
694
|
+
/**
|
|
695
|
+
* @license
|
|
696
|
+
* Copyright 2020 Google LLC
|
|
697
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
698
|
+
*/
|
|
699
|
+
const Xt = (r) => r.strings === void 0;
|
|
700
|
+
/**
|
|
701
|
+
* @license
|
|
702
|
+
* Copyright 2017 Google LLC
|
|
703
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
704
|
+
*/
|
|
705
|
+
const N = (r, t) => {
|
|
706
|
+
var s;
|
|
707
|
+
const e = r._$AN;
|
|
708
|
+
if (e === void 0)
|
|
709
|
+
return !1;
|
|
710
|
+
for (const i of e)
|
|
711
|
+
(s = i._$AO) == null || s.call(i, t, !1), N(i, t);
|
|
712
|
+
return !0;
|
|
713
|
+
}, V = (r) => {
|
|
714
|
+
let t, e;
|
|
715
|
+
do {
|
|
716
|
+
if ((t = r._$AM) === void 0)
|
|
717
|
+
break;
|
|
718
|
+
e = t._$AN, e.delete(r), r = t;
|
|
719
|
+
} while ((e == null ? void 0 : e.size) === 0);
|
|
720
|
+
}, Et = (r) => {
|
|
721
|
+
for (let t; t = r._$AM; r = t) {
|
|
722
|
+
let e = t._$AN;
|
|
723
|
+
if (e === void 0)
|
|
724
|
+
t._$AN = e = /* @__PURE__ */ new Set();
|
|
725
|
+
else if (e.has(r))
|
|
726
|
+
break;
|
|
727
|
+
e.add(r), se(t);
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
function te(r) {
|
|
731
|
+
this._$AN !== void 0 ? (V(this), this._$AM = r, Et(this)) : this._$AM = r;
|
|
732
|
+
}
|
|
733
|
+
function ee(r, t = !1, e = 0) {
|
|
734
|
+
const s = this._$AH, i = this._$AN;
|
|
735
|
+
if (i !== void 0 && i.size !== 0)
|
|
736
|
+
if (t)
|
|
737
|
+
if (Array.isArray(s))
|
|
738
|
+
for (let n = e; n < s.length; n++)
|
|
739
|
+
N(s[n], !1), V(s[n]);
|
|
740
|
+
else
|
|
741
|
+
s != null && (N(s, !1), V(s));
|
|
742
|
+
else
|
|
743
|
+
N(this, r);
|
|
744
|
+
}
|
|
745
|
+
const se = (r) => {
|
|
746
|
+
r.type == bt.CHILD && (r._$AP ?? (r._$AP = ee), r._$AQ ?? (r._$AQ = te));
|
|
747
|
+
};
|
|
748
|
+
class ie extends wt {
|
|
749
|
+
constructor() {
|
|
750
|
+
super(...arguments), this._$AN = void 0;
|
|
751
|
+
}
|
|
752
|
+
_$AT(t, e, s) {
|
|
753
|
+
super._$AT(t, e, s), Et(this), this.isConnected = t._$AU;
|
|
754
|
+
}
|
|
755
|
+
_$AO(t, e = !0) {
|
|
756
|
+
var s, i;
|
|
757
|
+
t !== this.isConnected && (this.isConnected = t, t ? (s = this.reconnected) == null || s.call(this) : (i = this.disconnected) == null || i.call(this)), e && (N(this, t), V(this));
|
|
758
|
+
}
|
|
759
|
+
setValue(t) {
|
|
760
|
+
if (Xt(this._$Ct))
|
|
761
|
+
this._$Ct._$AI(t, this);
|
|
762
|
+
else {
|
|
763
|
+
const e = [...this._$Ct._$AH];
|
|
764
|
+
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
disconnected() {
|
|
768
|
+
}
|
|
769
|
+
reconnected() {
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* @license
|
|
774
|
+
* Copyright 2020 Google LLC
|
|
775
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
776
|
+
*/
|
|
777
|
+
const Ct = () => new re();
|
|
778
|
+
class re {
|
|
779
|
+
}
|
|
780
|
+
const Q = /* @__PURE__ */ new WeakMap(), St = At(class extends ie {
|
|
781
|
+
render(r) {
|
|
782
|
+
return c;
|
|
783
|
+
}
|
|
784
|
+
update(r, [t]) {
|
|
785
|
+
var s;
|
|
786
|
+
const e = t !== this.G;
|
|
787
|
+
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)), c;
|
|
788
|
+
}
|
|
789
|
+
ot(r) {
|
|
790
|
+
if (typeof this.G == "function") {
|
|
791
|
+
const t = this.ct ?? globalThis;
|
|
792
|
+
let e = Q.get(t);
|
|
793
|
+
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), Q.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);
|
|
794
|
+
} else
|
|
795
|
+
this.G.value = r;
|
|
796
|
+
}
|
|
797
|
+
get rt() {
|
|
798
|
+
var r, t;
|
|
799
|
+
return typeof this.G == "function" ? (r = Q.get(this.ct ?? globalThis)) == null ? void 0 : r.get(this.G) : (t = this.G) == null ? void 0 : t.value;
|
|
800
|
+
}
|
|
801
|
+
disconnected() {
|
|
802
|
+
this.rt === this.lt && this.ot(void 0);
|
|
803
|
+
}
|
|
804
|
+
reconnected() {
|
|
805
|
+
this.ot(this.lt);
|
|
806
|
+
}
|
|
807
|
+
});
|
|
808
|
+
var ne = Object.defineProperty, oe = Object.getOwnPropertyDescriptor, z = (r, t, e, s) => {
|
|
809
|
+
for (var i = s > 1 ? void 0 : s ? oe(t, e) : t, n = r.length - 1, o; n >= 0; n--)
|
|
696
810
|
(o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
|
|
697
|
-
return s && i &&
|
|
811
|
+
return s && i && ne(t, e, i), i;
|
|
698
812
|
};
|
|
699
|
-
class
|
|
813
|
+
class v extends f {
|
|
700
814
|
constructor() {
|
|
701
|
-
super(...arguments), this.active = !1, this.loaded = !1;
|
|
815
|
+
super(...arguments), this.active = !1, this.loaded = !1, this.offset = 0, this.buttonRef = Ct();
|
|
702
816
|
}
|
|
703
817
|
async connectedCallback() {
|
|
704
|
-
super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
|
|
818
|
+
super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding(), this.offset > 0 && this.buttonRef.value && (this.buttonRef.value.style.right = `calc(${this.offset}px + 20px)`);
|
|
705
819
|
}
|
|
706
820
|
_toggleActive() {
|
|
707
821
|
var t;
|
|
@@ -718,13 +832,13 @@ class E extends f {
|
|
|
718
832
|
(t = this.application) != null && t.settings && xt(this.application.settings.branding, this);
|
|
719
833
|
}
|
|
720
834
|
async _renderSymbol() {
|
|
721
|
-
var
|
|
722
|
-
const t = (
|
|
835
|
+
var h, a, d;
|
|
836
|
+
const t = (h = this.application) == null ? void 0 : h.branding(), e = (a = t == null ? void 0 : t.graphics) == null ? void 0 : a.trigger;
|
|
723
837
|
if (e)
|
|
724
838
|
return y` <img src=${e} class="trigger-icon" alt="" /> `;
|
|
725
839
|
const s = (d = this.application) == null ? void 0 : d.triggerIcon;
|
|
726
840
|
if (!s)
|
|
727
|
-
return
|
|
841
|
+
return c;
|
|
728
842
|
const i = async (p) => await import("./index-5087564d.mjs").then(
|
|
729
843
|
(u) => u[p]
|
|
730
844
|
), { type: n, content: o } = s;
|
|
@@ -735,20 +849,24 @@ class E extends f {
|
|
|
735
849
|
class="trigger-icon"
|
|
736
850
|
svg=${p.svg}
|
|
737
851
|
size="lg"
|
|
738
|
-
></telia-icon>` :
|
|
852
|
+
></telia-icon>` : c;
|
|
739
853
|
}
|
|
740
854
|
default:
|
|
741
|
-
return
|
|
855
|
+
return c;
|
|
742
856
|
}
|
|
743
857
|
}
|
|
858
|
+
setOffset(t) {
|
|
859
|
+
this.offset = t;
|
|
860
|
+
}
|
|
744
861
|
render() {
|
|
745
862
|
return y`<button
|
|
746
|
-
class=${
|
|
863
|
+
class=${Ft({
|
|
747
864
|
trigger: !0,
|
|
748
865
|
active: this.active,
|
|
749
866
|
rendered: this.loaded
|
|
750
867
|
})}
|
|
751
868
|
@click=${this._toggleActive}
|
|
869
|
+
${St(this.buttonRef)}
|
|
752
870
|
>
|
|
753
871
|
${this.icon}
|
|
754
872
|
<span class="trigger-close">
|
|
@@ -781,7 +899,7 @@ class E extends f {
|
|
|
781
899
|
</button>`;
|
|
782
900
|
}
|
|
783
901
|
}
|
|
784
|
-
|
|
902
|
+
v.styles = [
|
|
785
903
|
P`
|
|
786
904
|
:host {
|
|
787
905
|
--voca-rem-multiplier: 0.625;
|
|
@@ -856,24 +974,27 @@ E.styles = [
|
|
|
856
974
|
}
|
|
857
975
|
`
|
|
858
976
|
];
|
|
859
|
-
|
|
977
|
+
z([
|
|
860
978
|
g({ attribute: !1 })
|
|
861
|
-
],
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
],
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
],
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
],
|
|
871
|
-
|
|
872
|
-
|
|
979
|
+
], v.prototype, "application", 2);
|
|
980
|
+
z([
|
|
981
|
+
T()
|
|
982
|
+
], v.prototype, "active", 2);
|
|
983
|
+
z([
|
|
984
|
+
T()
|
|
985
|
+
], v.prototype, "loaded", 2);
|
|
986
|
+
z([
|
|
987
|
+
T()
|
|
988
|
+
], v.prototype, "icon", 2);
|
|
989
|
+
z([
|
|
990
|
+
T()
|
|
991
|
+
], v.prototype, "offset", 2);
|
|
992
|
+
var ae = Object.defineProperty, he = Object.getOwnPropertyDescriptor, A = (r, t, e, s) => {
|
|
993
|
+
for (var i = s > 1 ? void 0 : s ? he(t, e) : t, n = r.length - 1, o; n >= 0; n--)
|
|
873
994
|
(o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
|
|
874
|
-
return s && i &&
|
|
995
|
+
return s && i && ae(t, e, i), i;
|
|
875
996
|
};
|
|
876
|
-
const
|
|
997
|
+
const Pt = (r) => {
|
|
877
998
|
class t extends r {
|
|
878
999
|
constructor() {
|
|
879
1000
|
super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
|
|
@@ -928,138 +1049,24 @@ const Et = (r) => {
|
|
|
928
1049
|
g({ attribute: !1 })
|
|
929
1050
|
], t.prototype, "parent", 2), t;
|
|
930
1051
|
};
|
|
931
|
-
class
|
|
1052
|
+
class Tt extends Pt(f) {
|
|
932
1053
|
render() {
|
|
933
1054
|
return y`Non resolved component`;
|
|
934
1055
|
}
|
|
935
1056
|
}
|
|
936
|
-
|
|
1057
|
+
Tt.styles = [
|
|
937
1058
|
P`
|
|
938
1059
|
:host {
|
|
939
1060
|
display: block;
|
|
940
1061
|
}
|
|
941
1062
|
`
|
|
942
1063
|
];
|
|
943
|
-
/**
|
|
944
|
-
* @license
|
|
945
|
-
* Copyright 2020 Google LLC
|
|
946
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
947
|
-
*/
|
|
948
|
-
const ee = (r) => r.strings === void 0;
|
|
949
|
-
/**
|
|
950
|
-
* @license
|
|
951
|
-
* Copyright 2017 Google LLC
|
|
952
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
953
|
-
*/
|
|
954
|
-
const k = (r, t) => {
|
|
955
|
-
var s;
|
|
956
|
-
const e = r._$AN;
|
|
957
|
-
if (e === void 0)
|
|
958
|
-
return !1;
|
|
959
|
-
for (const i of e)
|
|
960
|
-
(s = i._$AO) == null || s.call(i, t, !1), k(i, t);
|
|
961
|
-
return !0;
|
|
962
|
-
}, G = (r) => {
|
|
963
|
-
let t, e;
|
|
964
|
-
do {
|
|
965
|
-
if ((t = r._$AM) === void 0)
|
|
966
|
-
break;
|
|
967
|
-
e = t._$AN, e.delete(r), r = t;
|
|
968
|
-
} while ((e == null ? void 0 : e.size) === 0);
|
|
969
|
-
}, St = (r) => {
|
|
970
|
-
for (let t; t = r._$AM; r = t) {
|
|
971
|
-
let e = t._$AN;
|
|
972
|
-
if (e === void 0)
|
|
973
|
-
t._$AN = e = /* @__PURE__ */ new Set();
|
|
974
|
-
else if (e.has(r))
|
|
975
|
-
break;
|
|
976
|
-
e.add(r), re(t);
|
|
977
|
-
}
|
|
978
|
-
};
|
|
979
|
-
function se(r) {
|
|
980
|
-
this._$AN !== void 0 ? (G(this), this._$AM = r, St(this)) : this._$AM = r;
|
|
981
|
-
}
|
|
982
|
-
function ie(r, t = !1, e = 0) {
|
|
983
|
-
const s = this._$AH, i = this._$AN;
|
|
984
|
-
if (i !== void 0 && i.size !== 0)
|
|
985
|
-
if (t)
|
|
986
|
-
if (Array.isArray(s))
|
|
987
|
-
for (let n = e; n < s.length; n++)
|
|
988
|
-
k(s[n], !1), G(s[n]);
|
|
989
|
-
else
|
|
990
|
-
s != null && (k(s, !1), G(s));
|
|
991
|
-
else
|
|
992
|
-
k(this, r);
|
|
993
|
-
}
|
|
994
|
-
const re = (r) => {
|
|
995
|
-
r.type == At.CHILD && (r._$AP ?? (r._$AP = ie), r._$AQ ?? (r._$AQ = se));
|
|
996
|
-
};
|
|
997
|
-
class ne extends wt {
|
|
998
|
-
constructor() {
|
|
999
|
-
super(...arguments), this._$AN = void 0;
|
|
1000
|
-
}
|
|
1001
|
-
_$AT(t, e, s) {
|
|
1002
|
-
super._$AT(t, e, s), St(this), this.isConnected = t._$AU;
|
|
1003
|
-
}
|
|
1004
|
-
_$AO(t, e = !0) {
|
|
1005
|
-
var s, i;
|
|
1006
|
-
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));
|
|
1007
|
-
}
|
|
1008
|
-
setValue(t) {
|
|
1009
|
-
if (ee(this._$Ct))
|
|
1010
|
-
this._$Ct._$AI(t, this);
|
|
1011
|
-
else {
|
|
1012
|
-
const e = [...this._$Ct._$AH];
|
|
1013
|
-
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
|
1014
|
-
}
|
|
1015
|
-
}
|
|
1016
|
-
disconnected() {
|
|
1017
|
-
}
|
|
1018
|
-
reconnected() {
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
/**
|
|
1022
|
-
* @license
|
|
1023
|
-
* Copyright 2020 Google LLC
|
|
1024
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1025
|
-
*/
|
|
1026
|
-
const oe = () => new ae();
|
|
1027
|
-
class ae {
|
|
1028
|
-
}
|
|
1029
|
-
const Q = /* @__PURE__ */ new WeakMap(), ce = bt(class extends ne {
|
|
1030
|
-
render(r) {
|
|
1031
|
-
return h;
|
|
1032
|
-
}
|
|
1033
|
-
update(r, [t]) {
|
|
1034
|
-
var s;
|
|
1035
|
-
const e = t !== this.G;
|
|
1036
|
-
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;
|
|
1037
|
-
}
|
|
1038
|
-
ot(r) {
|
|
1039
|
-
if (typeof this.G == "function") {
|
|
1040
|
-
const t = this.ct ?? globalThis;
|
|
1041
|
-
let e = Q.get(t);
|
|
1042
|
-
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), Q.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);
|
|
1043
|
-
} else
|
|
1044
|
-
this.G.value = r;
|
|
1045
|
-
}
|
|
1046
|
-
get rt() {
|
|
1047
|
-
var r, t;
|
|
1048
|
-
return typeof this.G == "function" ? (r = Q.get(this.ct ?? globalThis)) == null ? void 0 : r.get(this.G) : (t = this.G) == null ? void 0 : t.value;
|
|
1049
|
-
}
|
|
1050
|
-
disconnected() {
|
|
1051
|
-
this.rt === this.lt && this.ot(void 0);
|
|
1052
|
-
}
|
|
1053
|
-
reconnected() {
|
|
1054
|
-
this.ot(this.lt);
|
|
1055
|
-
}
|
|
1056
|
-
});
|
|
1057
1064
|
/**
|
|
1058
1065
|
* @license
|
|
1059
1066
|
* Copyright 2021 Google LLC
|
|
1060
1067
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1061
1068
|
*/
|
|
1062
|
-
function*
|
|
1069
|
+
function* ce(r, t) {
|
|
1063
1070
|
if (r !== void 0) {
|
|
1064
1071
|
let e = 0;
|
|
1065
1072
|
for (const s of r)
|
|
@@ -1073,7 +1080,7 @@ var et = /* @__PURE__ */ ((r) => (r.Inline = "inline", r.Trigger = "trigger", r)
|
|
|
1073
1080
|
};
|
|
1074
1081
|
class st extends f {
|
|
1075
1082
|
constructor() {
|
|
1076
|
-
super(...arguments), this.nodes = [], this.wrapperRef =
|
|
1083
|
+
super(...arguments), this.nodes = [], this.wrapperRef = Ct();
|
|
1077
1084
|
}
|
|
1078
1085
|
addChild(t) {
|
|
1079
1086
|
t.parent = this, this.nodes.push(t);
|
|
@@ -1096,8 +1103,8 @@ class st extends f {
|
|
|
1096
1103
|
this.applyBranding(), this.applyStyles();
|
|
1097
1104
|
}
|
|
1098
1105
|
render() {
|
|
1099
|
-
return this.application.renderStrategy === et.Trigger && this.renderRoot.host.classList.add("floating"), y`<div class="widget-container" ${
|
|
1100
|
-
${
|
|
1106
|
+
return this.application.renderStrategy === et.Trigger && this.renderRoot.host.classList.add("floating"), y`<div class="widget-container" ${St(this.wrapperRef)}>
|
|
1107
|
+
${ce(this.nodes, (t) => t)}
|
|
1101
1108
|
</div>`;
|
|
1102
1109
|
}
|
|
1103
1110
|
}
|
|
@@ -1201,7 +1208,7 @@ var ue = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, it = (r, t
|
|
|
1201
1208
|
(o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
|
|
1202
1209
|
return s && i && ue(t, e, i), i;
|
|
1203
1210
|
};
|
|
1204
|
-
class
|
|
1211
|
+
class D extends f {
|
|
1205
1212
|
constructor() {
|
|
1206
1213
|
super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
|
|
1207
1214
|
}
|
|
@@ -1225,15 +1232,15 @@ class z extends f {
|
|
|
1225
1232
|
}
|
|
1226
1233
|
render() {
|
|
1227
1234
|
if (!this.widget || this.status !== "activated")
|
|
1228
|
-
return
|
|
1235
|
+
return c;
|
|
1229
1236
|
if (this.widget.renderStrategy === et.Trigger) {
|
|
1230
|
-
const t = new
|
|
1237
|
+
const t = new v();
|
|
1231
1238
|
return t.application = this.widget, t;
|
|
1232
1239
|
}
|
|
1233
1240
|
return this.widget.render();
|
|
1234
1241
|
}
|
|
1235
1242
|
}
|
|
1236
|
-
|
|
1243
|
+
D.styles = [
|
|
1237
1244
|
P`
|
|
1238
1245
|
:host {
|
|
1239
1246
|
display: block;
|
|
@@ -1242,36 +1249,36 @@ z.styles = [
|
|
|
1242
1249
|
];
|
|
1243
1250
|
it([
|
|
1244
1251
|
g({ attribute: !0 })
|
|
1245
|
-
],
|
|
1252
|
+
], D.prototype, "name", 2);
|
|
1246
1253
|
it([
|
|
1247
|
-
|
|
1248
|
-
],
|
|
1254
|
+
T()
|
|
1255
|
+
], D.prototype, "widget", 2);
|
|
1249
1256
|
it([
|
|
1250
|
-
|
|
1251
|
-
],
|
|
1252
|
-
customElements.get("ace-trigger") || customElements.define("ace-trigger",
|
|
1253
|
-
customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component",
|
|
1257
|
+
T()
|
|
1258
|
+
], D.prototype, "status", 2);
|
|
1259
|
+
customElements.get("ace-trigger") || customElements.define("ace-trigger", v);
|
|
1260
|
+
customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", Tt);
|
|
1254
1261
|
customElements.get("ace-wrapper") || customElements.define("ace-wrapper", st);
|
|
1255
|
-
customElements.get("ace-widget") || customElements.define("ace-widget",
|
|
1256
|
-
const
|
|
1257
|
-
class fe extends
|
|
1262
|
+
customElements.get("ace-widget") || customElements.define("ace-widget", D);
|
|
1263
|
+
const Ot = Pt(f);
|
|
1264
|
+
class fe extends Ot {
|
|
1258
1265
|
render() {
|
|
1259
1266
|
var n;
|
|
1260
1267
|
const t = this.application.branding(), e = (n = t == null ? void 0 : t.graphics) == null ? void 0 : n.logotype, i = this.application.texts.get("widget-header.header", "ACE Widget");
|
|
1261
1268
|
return y` <div class="widget-header">
|
|
1262
1269
|
<!-- <telia-icon svg={aiRobot.svg} size="lg"></telia-icon> -->
|
|
1263
|
-
${e ? y` <img src=${e} class="logotype" alt="" />` :
|
|
1270
|
+
${e ? y` <img src=${e} class="logotype" alt="" />` : c}
|
|
1264
1271
|
|
|
1265
1272
|
<div>
|
|
1266
1273
|
<h1>${i}</h1>
|
|
1267
1274
|
|
|
1268
|
-
${this.properties.tagline ? y`<p>${this.properties.tagline}</p>` :
|
|
1275
|
+
${this.properties.tagline ? y`<p>${this.properties.tagline}</p>` : c}
|
|
1269
1276
|
</div>
|
|
1270
1277
|
</div>`;
|
|
1271
1278
|
}
|
|
1272
1279
|
}
|
|
1273
1280
|
fe.styles = [
|
|
1274
|
-
|
|
1281
|
+
Ot.styles || [],
|
|
1275
1282
|
P`
|
|
1276
1283
|
:host {
|
|
1277
1284
|
--header-text-color: var(--text-on-primary-background);
|
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const I=globalThis,F=I.ShadowRoot&&(I.ShadyCSS===void 0||I.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,X=Symbol(),nt=new WeakMap;let $t=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==X)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(F&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=nt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&nt.set(e,t))}return t}toString(){return this.cssText}};const kt=r=>new $t(typeof r=="string"?r:r+"",void 0,X),P=(r,...t)=>{const e=r.length===1?r[0]:t.reduce((s,i,n)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;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.")})(i)+r[n+1],r[0]);return new $t(e,r,X)},Nt=(r,t)=>{if(F)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=I.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},ot=F?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return kt(e)})(r):r;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:Rt,defineProperty:Mt,getOwnPropertyDescriptor:Ht,getOwnPropertyNames:Lt,getOwnPropertySymbols:zt,getPrototypeOf:Dt}=Object,_=globalThis,at=_.trustedTypes,Bt=at?at.emptyScript:"",Y=_.reactiveElementPolyfillSupport,U=(r,t)=>r,W={toAttribute(r,t){switch(t){case Boolean:r=r?Bt:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},tt=(r,t)=>!Rt(r,t),ht={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:tt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),_.litPropertyMetadata??(_.litPropertyMetadata=new WeakMap);class C extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ht){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Mt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=Ht(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return i==null?void 0:i.call(this)},set(o){const h=i==null?void 0:i.call(this);n.call(this,o),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ht}static _$Ei(){if(this.hasOwnProperty(U("elementProperties")))return;const t=Dt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(U("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(U("properties"))){const e=this.properties,s=[...Lt(e),...zt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(ot(i))}else t!==void 0&&e.push(ot(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$Eg=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$ES??(this._$ES=[])).push(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$ES)==null||e.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Nt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e){var n;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:W).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){var n;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const o=s.getPropertyOptions(i),h=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:W;this._$Em=i,this[i]=h.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,s,i=!1,n){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??tt)(i?n:this[t],e))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,o]of i)o.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.C(n,this[n],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$ES)==null||s.forEach(i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)}),this.update(e)):this._$ET()}catch(i){throw t=!1,this._$ET(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EO(e,this[e]))),this._$ET()}updated(t){}firstUpdated(t){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[U("elementProperties")]=new Map,C[U("finalized")]=new Map,Y==null||Y({ReactiveElement:C}),(_.reactiveElementVersions??(_.reactiveElementVersions=[])).push("2.0.1");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,ut=/"/g,vt=/^(?:script|style|textarea|title)$/i,
|
|
13
|
+
*/const k=globalThis,G=k.trustedTypes,ct=G?G.createPolicy("lit-html",{createHTML:r=>r}):void 0,mt="$lit$",m=`lit$${(Math.random()+"").slice(9)}$`,_t="?"+m,jt=`<${_t}>`,x=document,R=()=>x.createComment(""),M=r=>r===null||typeof r!="object"&&typeof r!="function",yt=Array.isArray,It=r=>yt(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",J=`[
|
|
14
|
+
\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lt=/-->/g,dt=/>/g,b=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,ut=/"/g,vt=/^(?:script|style|textarea|title)$/i,Wt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),y=Wt(1),E=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),gt=new WeakMap,w=x.createTreeWalker(x,129);function bt(r,t){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return ct!==void 0?ct.createHTML(t):t}const Gt=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":"",o=O;for(let h=0;h<e;h++){const a=r[h];let d,p,l=-1,u=0;for(;u<a.length&&(o.lastIndex=u,p=o.exec(a),p!==null);)u=o.lastIndex,o===O?p[1]==="!--"?o=lt:p[1]!==void 0?o=dt:p[2]!==void 0?(vt.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=b):p[3]!==void 0&&(o=b):o===b?p[0]===">"?(o=i??O,l=-1):p[1]===void 0?l=-2:(l=o.lastIndex-p[2].length,d=p[1],o=p[3]===void 0?b:p[3]==='"'?ut:pt):o===ut||o===pt?o=b:o===lt||o===dt?o=O:(o=b,i=void 0);const $=o===b&&r[h+1].startsWith("/>")?" ":"";n+=o===O?a+jt:l>=0?(s.push(d),a.slice(0,l)+mt+a.slice(l)+m+$):a+m+(l===-2?h:$)}return[bt(r,n+(r[e]||"<?>")+(t===2?"</svg>":"")),s]};class H{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const h=t.length-1,a=this.parts,[d,p]=Gt(t,e);if(this.el=H.createElement(d,s),w.currentNode=this.el.content,e===2){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=w.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(mt)){const u=p[o++],$=i.getAttribute(l).split(m),B=/([.?@])?(.*)/.exec(u);a.push({type:1,index:n,name:B[2],strings:$,ctor:B[1]==="."?qt:B[1]==="?"?Yt:B[1]==="@"?Jt:q}),i.removeAttribute(l)}else l.startsWith(m)&&(a.push({type:6,index:n}),i.removeAttribute(l));if(vt.test(i.tagName)){const l=i.textContent.split(m),u=l.length-1;if(u>0){i.textContent=G?G.emptyScript:"";for(let $=0;$<u;$++)i.append(l[$],R()),w.nextNode(),a.push({type:2,index:++n});i.append(l[u],R())}}}else if(i.nodeType===8)if(i.data===_t)a.push({type:2,index:n});else{let l=-1;for(;(l=i.data.indexOf(m,l+1))!==-1;)a.push({type:7,index:n}),l+=m.length-1}n++}}static createElement(t,e){const s=x.createElement("template");return s.innerHTML=t,s}}function S(r,t,e=r,s){var o,h;if(t===E)return t;let i=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=M(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((h=i==null?void 0:i._$AO)==null||h.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}class Vt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??x).importNode(e,!0);w.currentNode=i;let n=w.nextNode(),o=0,h=0,a=s[0];for(;a!==void 0;){if(o===a.index){let d;a.type===2?d=new L(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new Kt(n,this,t)),this._$AV.push(d),a=s[++h]}o!==(a==null?void 0:a.index)&&(n=w.nextNode(),o++)}return w.currentNode=x,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class L{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=c,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}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),M(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==E&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):It(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==c&&M(this._$AH)?this._$AA.nextSibling.data=t:this.$(x.createTextNode(t)),this._$AH=t}g(t){var n;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=H.createElement(bt(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const o=new Vt(i,this),h=o.u(this.options);o.p(e),this.$(h),this._$AH=o}}_$AC(t){let e=gt.get(t.strings);return e===void 0&>.set(t.strings,e=new H(t)),e}T(t){yt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new L(this.k(R()),this.k(R()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class q{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=c,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=c}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=S(this,t,e,0),o=!M(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const h=t;let a,d;for(t=n[0],a=0;a<n.length-1;a++)d=S(this,h[s+a],e,a),d===E&&(d=this._$AH[a]),o||(o=!M(d)||d!==this._$AH[a]),d===c?t=c:t!==c&&(t+=(d??"")+n[a+1]),this._$AH[a]=d}o&&!i&&this.O(t)}O(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class qt extends q{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===c?void 0:t}}class Yt extends q{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}}class Jt extends q{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??c)===E)return;const s=this._$AH,i=t===c&&s!==c||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==c&&(s===c||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Kt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const K=k.litHtmlPolyfillSupport;K==null||K(H,L),(k.litHtmlVersions??(k.litHtmlVersions=[])).push("3.0.2");const Zt=(r,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new L(t.insertBefore(R(),n),n,void 0,e??{})}return i._$AI(r),i};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/let f=class extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=
|
|
19
|
+
*/let f=class extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Zt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return E}};var ft;f._$litElement$=!0,f.finalized=!0,(ft=globalThis.litElementHydrateSupport)==null||ft.call(globalThis,{LitElement:f});const Z=globalThis.litElementPolyfillSupport;Z==null||Z({LitElement:f});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
23
|
+
*/const Qt={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:tt},Ft=(r=Qt,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),n.set(e.name,r),s==="accessor"){const{name:o}=e;return{set(h){const a=t.get.call(this);t.set.call(this,h),this.requestUpdate(o,a,r)},init(h){return h!==void 0&&this.C(o,void 0,r),h}}}if(s==="setter"){const{name:o}=e;return function(h){const a=this[o];t.call(this,h),this.requestUpdate(o,a,r)}}throw Error("Unsupported decorator location: "+s)};function g(r){return(t,e)=>typeof e=="object"?Ft(r,t,e):((s,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,o?{...s,wrapped:!0}:s),o?Object.getOwnPropertyDescriptor(i,n):void 0})(r,t,e)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/function
|
|
27
|
+
*/function T(r){return g({...r,state:!0,attribute:!1})}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -32,13 +32,26 @@
|
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2018 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const
|
|
35
|
+
*/const Xt=wt(class extends xt{constructor(r){var t;if(super(r),r.type!==At.ATTRIBUTE||r.name!=="class"||((t=r.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(t=>r[t]).join(" ")+" "}update(r,[t]){var s,i;if(this.it===void 0){this.it=new Set,r.strings!==void 0&&(this.st=new Set(r.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!((s=this.st)!=null&&s.has(n))&&this.it.add(n);return this.render(t)}const e=r.element.classList;for(const n of this.it)n in t||(e.remove(n),this.it.delete(n));for(const n in t){const o=!!t[n];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)))}return E}}),j=(r,t,e)=>{r&&e.style.setProperty(t,r)},Et=(r,t)=>{var e,s,i,n;j((e=r.colors)==null?void 0:e.primaryBackground,"--primary-background",t),j((s=r.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",t),j((i=r.colors)==null?void 0:i.secondaryBackground,"--secondary-background",t),j((n=r.colors)==null?void 0:n.textOnSecondaryBackground,"--text-on-secondary-background",t)};/**
|
|
36
|
+
* @license
|
|
37
|
+
* Copyright 2020 Google LLC
|
|
38
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
+
*/const te=r=>r.strings===void 0;/**
|
|
40
|
+
* @license
|
|
41
|
+
* Copyright 2017 Google LLC
|
|
42
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
+
*/const N=(r,t)=>{var s;const e=r._$AN;if(e===void 0)return!1;for(const i of e)(s=i._$AO)==null||s.call(i,t,!1),N(i,t);return!0},V=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while((e==null?void 0:e.size)===0)},Ct=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),ie(t)}};function ee(r){this._$AN!==void 0?(V(this),this._$AM=r,Ct(this)):this._$AM=r}function se(r,t=!1,e=0){const s=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(s))for(let n=e;n<s.length;n++)N(s[n],!1),V(s[n]);else s!=null&&(N(s,!1),V(s));else N(this,r)}const ie=r=>{r.type==At.CHILD&&(r._$AP??(r._$AP=se),r._$AQ??(r._$AQ=ee))};class re extends xt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Ct(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,i;t!==this.isConnected&&(this.isConnected=t,t?(s=this.reconnected)==null||s.call(this):(i=this.disconnected)==null||i.call(this)),e&&(N(this,t),V(this))}setValue(t){if(te(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}/**
|
|
44
|
+
* @license
|
|
45
|
+
* Copyright 2020 Google LLC
|
|
46
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
+
*/const St=()=>new ne;class ne{}const Q=new WeakMap,Pt=wt(class extends re{render(r){return c}update(r,[t]){var s;const e=t!==this.G;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)),c}ot(r){if(typeof this.G=="function"){const t=this.ct??globalThis;let e=Q.get(t);e===void 0&&(e=new WeakMap,Q.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)}else this.G.value=r}get rt(){var r,t;return typeof this.G=="function"?(r=Q.get(this.ct??globalThis))==null?void 0:r.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var oe=Object.defineProperty,ae=Object.getOwnPropertyDescriptor,z=(r,t,e,s)=>{for(var i=s>1?void 0:s?ae(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&oe(t,e,i),i};class v extends f{constructor(){super(...arguments),this.active=!1,this.loaded=!1,this.offset=0,this.buttonRef=St()}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding(),this.offset>0&&this.buttonRef.value&&(this.buttonRef.value.style.right=`calc(${this.offset}px + 20px)`)}_toggleActive(){var t;if(!((t=this.application)!=null&&t.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?this.application.appendToDOM():this.application.hide()}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&Et(this.application.settings.branding,this)}async _renderSymbol(){var h,a,d;const t=(h=this.application)==null?void 0:h.branding(),e=(a=t==null?void 0:t.graphics)==null?void 0:a.trigger;if(e)return y` <img src=${e} class="trigger-icon" alt="" /> `;const s=(d=this.application)==null?void 0:d.triggerIcon;if(!s)return c;const i=async p=>await Promise.resolve().then(()=>require("./index-6dd00f59.js")).then(u=>u[p]),{type:n,content:o}=s;switch(n){case"Telia":{const p=await i(o);return p?y`<telia-icon
|
|
36
48
|
class="trigger-icon"
|
|
37
49
|
svg=${p.svg}
|
|
38
50
|
size="lg"
|
|
39
|
-
></telia-icon>`:
|
|
40
|
-
class=${
|
|
51
|
+
></telia-icon>`:c}default:return c}}setOffset(t){this.offset=t}render(){return y`<button
|
|
52
|
+
class=${Xt({trigger:!0,active:this.active,rendered:this.loaded})}
|
|
41
53
|
@click=${this._toggleActive}
|
|
54
|
+
${Pt(this.buttonRef)}
|
|
42
55
|
>
|
|
43
56
|
${this.icon}
|
|
44
57
|
<span class="trigger-close">
|
|
@@ -68,7 +81,7 @@
|
|
|
68
81
|
/>
|
|
69
82
|
</svg>
|
|
70
83
|
</span>
|
|
71
|
-
</button>`}}
|
|
84
|
+
</button>`}}v.styles=[P`
|
|
72
85
|
:host {
|
|
73
86
|
--voca-rem-multiplier: 0.625;
|
|
74
87
|
display: block;
|
|
@@ -140,7 +153,7 @@
|
|
|
140
153
|
img {
|
|
141
154
|
max-width: 100%;
|
|
142
155
|
}
|
|
143
|
-
`];
|
|
156
|
+
`];z([g({attribute:!1})],v.prototype,"application",2);z([T()],v.prototype,"active",2);z([T()],v.prototype,"loaded",2);z([T()],v.prototype,"icon",2);z([T()],v.prototype,"offset",2);var he=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,A=(r,t,e,s)=>{for(var i=s>1?void 0:s?ce(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&he(t,e,i),i};const Tt=r=>{class t extends r{constructor(){super(...arguments),this.properties={},this.context={},this.layout={},this.nodes=[]}writeProperties(s){this.properties=s}writeLayout(s){this.layout=s}writeContext(s){this.context=s}addChild(s){s.parent=this,this.nodes.push(s)}connectedCallback(){super.connectedCallback(),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`)}}return t.styles=[P`
|
|
144
157
|
:host {
|
|
145
158
|
font-family: var(--font-family);
|
|
146
159
|
grid-column: span var(--width);
|
|
@@ -152,27 +165,15 @@
|
|
|
152
165
|
* {
|
|
153
166
|
box-sizing: border-box;
|
|
154
167
|
}
|
|
155
|
-
`],
|
|
168
|
+
`],A([g()],t.prototype,"properties",2),A([g()],t.prototype,"context",2),A([g()],t.prototype,"layout",2),A([g()],t.prototype,"name",2),A([g()],t.prototype,"type",2),A([g({attribute:!1})],t.prototype,"application",2),A([g({attribute:!1})],t.prototype,"parent",2),t};class Ot extends Tt(f){render(){return y`Non resolved component`}}Ot.styles=[P`
|
|
156
169
|
:host {
|
|
157
170
|
display: block;
|
|
158
171
|
}
|
|
159
172
|
`];/**
|
|
160
173
|
* @license
|
|
161
|
-
* Copyright 2020 Google LLC
|
|
162
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
163
|
-
*/const se=r=>r.strings===void 0;/**
|
|
164
|
-
* @license
|
|
165
|
-
* Copyright 2017 Google LLC
|
|
166
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
167
|
-
*/const k=(r,t)=>{var s;const e=r._$AN;if(e===void 0)return!1;for(const i of e)(s=i._$AO)==null||s.call(i,t,!1),k(i,t);return!0},G=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while((e==null?void 0:e.size)===0)},Pt=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),ne(t)}};function ie(r){this._$AN!==void 0?(G(this),this._$AM=r,Pt(this)):this._$AM=r}function re(r,t=!1,e=0){const s=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(s))for(let n=e;n<s.length;n++)k(s[n],!1),G(s[n]);else s!=null&&(k(s,!1),G(s));else k(this,r)}const ne=r=>{r.type==At.CHILD&&(r._$AP??(r._$AP=re),r._$AQ??(r._$AQ=ie))};class oe extends xt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Pt(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,i;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))}setValue(t){if(se(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}/**
|
|
168
|
-
* @license
|
|
169
|
-
* Copyright 2020 Google LLC
|
|
170
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
171
|
-
*/const ae=()=>new ce;class ce{}const Q=new WeakMap,he=wt(class extends oe{render(r){return h}update(r,[t]){var s;const e=t!==this.G;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}ot(r){if(typeof this.G=="function"){const t=this.ct??globalThis;let e=Q.get(t);e===void 0&&(e=new WeakMap,Q.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)}else this.G.value=r}get rt(){var r,t;return typeof this.G=="function"?(r=Q.get(this.ct??globalThis))==null?void 0:r.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});/**
|
|
172
|
-
* @license
|
|
173
174
|
* Copyright 2021 Google LLC
|
|
174
175
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
175
|
-
*/function*le(r,t){if(r!==void 0){let e=0;for(const s of r)yield t(s,e++)}}var et=(r=>(r.Inline="inline",r.Trigger="trigger",r))(et||{}),de=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,ue=(r,t,e,s)=>{for(var i=s>1?void 0:s?pe(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&de(t,e,i),i};class st extends f{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=
|
|
176
|
+
*/function*le(r,t){if(r!==void 0){let e=0;for(const s of r)yield t(s,e++)}}var et=(r=>(r.Inline="inline",r.Trigger="trigger",r))(et||{}),de=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,ue=(r,t,e,s)=>{for(var i=s>1?void 0:s?pe(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&de(t,e,i),i};class st extends f{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=St()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&Et(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([s,i])=>{e.style.setProperty(`--${s}`,i)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){return this.application.renderStrategy===et.Trigger&&this.renderRoot.host.classList.add("floating"),y`<div class="widget-container" ${Pt(this.wrapperRef)}>
|
|
176
177
|
${le(this.nodes,t=>t)}
|
|
177
178
|
</div>`}}st.styles=P`
|
|
178
179
|
:host {
|
|
@@ -265,20 +266,20 @@
|
|
|
265
266
|
opacity: 0;
|
|
266
267
|
animation: slideDown 0.3s linear;
|
|
267
268
|
}
|
|
268
|
-
`;ue([g({attribute:!1})],st.prototype,"application",2);var ge=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,it=(r,t,e,s)=>{for(var i=s>1?void 0:s?fe(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&ge(t,e,i),i};class
|
|
269
|
+
`;ue([g({attribute:!1})],st.prototype,"application",2);var ge=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,it=(r,t,e,s)=>{for(var i=s>1?void 0:s?fe(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&ge(t,e,i),i};class D extends f{constructor(){super(),this.status="deactivated",this.addEventListener("environment-created",this.onEnvironmentCreated)}async connectedCallback(){super.connectedCallback(),await this.getGlobalEnvironment()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("environment-created",this.onEnvironmentCreated)}async onEnvironmentCreated(t){this.widget=t.detail.widget,await this.activate(),this.requestUpdate()}async activate(){this.widget&&(await this.widget.activate(),this.status="activated")}async getGlobalEnvironment(){const t=globalThis.widgets;t&&(this.widget=t.applications.find(e=>e.name===this.name),await this.activate())}render(){if(!this.widget||this.status!=="activated")return c;if(this.widget.renderStrategy===et.Trigger){const t=new v;return t.application=this.widget,t}return this.widget.render()}}D.styles=[P`
|
|
269
270
|
:host {
|
|
270
271
|
display: block;
|
|
271
272
|
}
|
|
272
|
-
`];it([g({attribute:!0})],
|
|
273
|
+
`];it([g({attribute:!0})],D.prototype,"name",2);it([T()],D.prototype,"widget",2);it([T()],D.prototype,"status",2);customElements.get("ace-trigger")||customElements.define("ace-trigger",v);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Ot);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",st);customElements.get("ace-widget")||customElements.define("ace-widget",D);const Ut=Tt(f);class rt extends Ut{render(){var n;const t=this.application.branding(),e=(n=t==null?void 0:t.graphics)==null?void 0:n.logotype,i=this.application.texts.get("widget-header.header","ACE Widget");return y` <div class="widget-header">
|
|
273
274
|
<!-- <telia-icon svg={aiRobot.svg} size="lg"></telia-icon> -->
|
|
274
|
-
${e?y` <img src=${e} class="logotype" alt="" />`:
|
|
275
|
+
${e?y` <img src=${e} class="logotype" alt="" />`:c}
|
|
275
276
|
|
|
276
277
|
<div>
|
|
277
278
|
<h1>${i}</h1>
|
|
278
279
|
|
|
279
|
-
${this.properties.tagline?y`<p>${this.properties.tagline}</p>`:
|
|
280
|
+
${this.properties.tagline?y`<p>${this.properties.tagline}</p>`:c}
|
|
280
281
|
</div>
|
|
281
|
-
</div>`}}rt.styles=[
|
|
282
|
+
</div>`}}rt.styles=[Ut.styles||[],P`
|
|
282
283
|
:host {
|
|
283
284
|
--header-text-color: var(--text-on-primary-background);
|
|
284
285
|
}
|
package/widget-header.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
declare const WidgetElement: (new (...args: any[]) => import("@telia-ace/widget-core-flamingo").WidgetComponentType) & typeof LitElement;
|
|
3
3
|
export declare class WidgetHeader extends WidgetElement {
|
|
4
4
|
static styles: import("lit").CSSResultGroup[];
|
|
5
|
-
render(): import("lit").TemplateResult<1>;
|
|
5
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
6
6
|
}
|
|
7
7
|
export default WidgetHeader;
|