@telia-ace/widget-components-area-flamingo 1.1.70-rc.8 → 1.1.70

Sign up to get free protection for your applications and to get access to all the features.
package/area-dcc89d29.mjs DELETED
@@ -1,1734 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const z = globalThis, tt = z.ShadowRoot && (z.ShadyCSS === void 0 || z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, et = Symbol(), lt = /* @__PURE__ */ new WeakMap();
7
- let St = class {
8
- constructor(t, e, s) {
9
- if (this._$cssResult$ = !0, s !== et)
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 (tt && t === void 0) {
17
- const s = e !== void 0 && e.length === 1;
18
- s && (t = lt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && lt.set(e, t));
19
- }
20
- return t;
21
- }
22
- toString() {
23
- return this.cssText;
24
- }
25
- };
26
- const It = (r) => new St(typeof r == "string" ? r : r + "", void 0, et), C = (r, ...t) => {
27
- const e = r.length === 1 ? r[0] : t.reduce((s, i, o) => s + ((n) => {
28
- if (n._$cssResult$ === !0)
29
- return n.cssText;
30
- if (typeof n == "number")
31
- return n;
32
- throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
33
- })(i) + r[o + 1], r[0]);
34
- return new St(e, r, et);
35
- }, Wt = (r, t) => {
36
- if (tt)
37
- r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
38
- else
39
- for (const e of t) {
40
- const s = document.createElement("style"), i = z.litNonce;
41
- i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
42
- }
43
- }, ct = tt ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
44
- let e = "";
45
- for (const s of t.cssRules)
46
- e += s.cssText;
47
- return It(e);
48
- })(r) : r;
49
- /**
50
- * @license
51
- * Copyright 2017 Google LLC
52
- * SPDX-License-Identifier: BSD-3-Clause
53
- */
54
- const { is: Yt, defineProperty: Ft, getOwnPropertyDescriptor: Vt, getOwnPropertyNames: qt, getOwnPropertySymbols: Zt, getPrototypeOf: Kt } = Object, $ = globalThis, dt = $.trustedTypes, Gt = dt ? dt.emptyScript : "", q = $.reactiveElementPolyfillSupport, T = (r, t) => r, I = { toAttribute(r, t) {
55
- switch (t) {
56
- case Boolean:
57
- r = r ? Gt : null;
58
- break;
59
- case Object:
60
- case Array:
61
- r = r == null ? r : JSON.stringify(r);
62
- }
63
- return r;
64
- }, fromAttribute(r, t) {
65
- let e = r;
66
- switch (t) {
67
- case Boolean:
68
- e = r !== null;
69
- break;
70
- case Number:
71
- e = r === null ? null : Number(r);
72
- break;
73
- case Object:
74
- case Array:
75
- try {
76
- e = JSON.parse(r);
77
- } catch {
78
- e = null;
79
- }
80
- }
81
- return e;
82
- } }, st = (r, t) => !Yt(r, t), pt = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: st };
83
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), $.litPropertyMetadata ?? ($.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
84
- let S = class 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 = pt) {
92
- if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
93
- const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
94
- i !== void 0 && Ft(this.prototype, t, i);
95
- }
96
- }
97
- static getPropertyDescriptor(t, e, s) {
98
- const { get: i, set: o } = Vt(this.prototype, t) ?? { get() {
99
- return this[e];
100
- }, set(n) {
101
- this[e] = n;
102
- } };
103
- return { get() {
104
- return i == null ? void 0 : i.call(this);
105
- }, set(n) {
106
- const h = i == null ? void 0 : i.call(this);
107
- o.call(this, n), this.requestUpdate(t, h, s);
108
- }, configurable: !0, enumerable: !0 };
109
- }
110
- static getPropertyOptions(t) {
111
- return this.elementProperties.get(t) ?? pt;
112
- }
113
- static _$Ei() {
114
- if (this.hasOwnProperty(T("elementProperties")))
115
- return;
116
- const t = Kt(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(T("finalized")))
121
- return;
122
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(T("properties"))) {
123
- const e = this.properties, s = [...qt(e), ...Zt(e)];
124
- for (const i of s)
125
- this.createProperty(i, e[i]);
126
- }
127
- const t = this[Symbol.metadata];
128
- if (t !== null) {
129
- const e = litPropertyMetadata.get(t);
130
- if (e !== void 0)
131
- for (const [s, i] of e)
132
- this.elementProperties.set(s, i);
133
- }
134
- this._$Eh = /* @__PURE__ */ new Map();
135
- for (const [e, s] of this.elementProperties) {
136
- const i = this._$Eu(e, s);
137
- i !== void 0 && this._$Eh.set(i, e);
138
- }
139
- this.elementStyles = this.finalizeStyles(this.styles);
140
- }
141
- static finalizeStyles(t) {
142
- const e = [];
143
- if (Array.isArray(t)) {
144
- const s = new Set(t.flat(1 / 0).reverse());
145
- for (const i of s)
146
- e.unshift(ct(i));
147
- } else
148
- t !== void 0 && e.push(ct(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._$ES = 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._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
165
- }
166
- removeController(t) {
167
- var e;
168
- (e = this._$EO) == null || e.delete(t);
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 Wt(t, this.constructor.elementStyles), t;
179
- }
180
- connectedCallback() {
181
- var t;
182
- this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == 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._$EO) == 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
- _$EC(t, e) {
200
- var o;
201
- const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
202
- if (i !== void 0 && s.reflect === !0) {
203
- const n = (((o = s.converter) == null ? void 0 : o.toAttribute) !== void 0 ? s.converter : I).toAttribute(e, s.type);
204
- this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
205
- }
206
- }
207
- _$AK(t, e) {
208
- var o;
209
- const s = this.constructor, i = s._$Eh.get(t);
210
- if (i !== void 0 && this._$Em !== i) {
211
- const n = s.getPropertyOptions(i), h = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((o = n.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? n.converter : I;
212
- this._$Em = i, this[i] = h.fromAttribute(e, n.type), this._$Em = null;
213
- }
214
- }
215
- requestUpdate(t, e, s) {
216
- if (t !== void 0) {
217
- if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? st)(this[t], e))
218
- return;
219
- this.P(t, e, s);
220
- }
221
- this.isUpdatePending === !1 && (this._$ES = this._$ET());
222
- }
223
- P(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 _$ET() {
227
- this.isUpdatePending = !0;
228
- try {
229
- await this._$ES;
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.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
245
- for (const [o, n] of this._$Ep)
246
- this[o] = n;
247
- this._$Ep = void 0;
248
- }
249
- const i = this.constructor.elementProperties;
250
- if (i.size > 0)
251
- for (const [o, n] of i)
252
- n.wrapped !== !0 || this._$AL.has(o) || this[o] === void 0 || this.P(o, this[o], n);
253
- }
254
- let t = !1;
255
- const e = this._$AL;
256
- try {
257
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((i) => {
258
- var o;
259
- return (o = i.hostUpdate) == null ? void 0 : o.call(i);
260
- }), this.update(e)) : this._$EU();
261
- } catch (i) {
262
- throw t = !1, this._$EU(), i;
263
- }
264
- t && this._$AE(e);
265
- }
266
- willUpdate(t) {
267
- }
268
- _$AE(t) {
269
- var e;
270
- (e = this._$EO) == null || e.forEach((s) => {
271
- var i;
272
- return (i = s.hostUpdated) == null ? void 0 : i.call(s);
273
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
274
- }
275
- _$EU() {
276
- this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
277
- }
278
- get updateComplete() {
279
- return this.getUpdateComplete();
280
- }
281
- getUpdateComplete() {
282
- return this._$ES;
283
- }
284
- shouldUpdate(t) {
285
- return !0;
286
- }
287
- update(t) {
288
- this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EC(e, this[e]))), this._$EU();
289
- }
290
- updated(t) {
291
- }
292
- firstUpdated(t) {
293
- }
294
- };
295
- S.elementStyles = [], S.shadowRootOptions = { mode: "open" }, S[T("elementProperties")] = /* @__PURE__ */ new Map(), S[T("finalized")] = /* @__PURE__ */ new Map(), q == null || q({ ReactiveElement: S }), ($.reactiveElementVersions ?? ($.reactiveElementVersions = [])).push("2.0.4");
296
- /**
297
- * @license
298
- * Copyright 2017 Google LLC
299
- * SPDX-License-Identifier: BSD-3-Clause
300
- */
301
- const N = globalThis, W = N.trustedTypes, ut = W ? W.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Pt = "$lit$", v = `lit$${(Math.random() + "").slice(9)}$`, Ot = "?" + v, Xt = `<${Ot}>`, w = document, R = () => w.createComment(""), U = (r) => r === null || typeof r != "object" && typeof r != "function", Tt = Array.isArray, Jt = (r) => Tt(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", Z = `[
302
- \f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, gt = /-->/g, ft = />/g, y = RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^
303
- \f\r"'\`<>=]|("|')|))|$)`, "g"), mt = /'/g, vt = /"/g, Nt = /^(?:script|style|textarea|title)$/i, Qt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), _ = Qt(1), x = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), $t = /* @__PURE__ */ new WeakMap(), A = w.createTreeWalker(w, 129);
304
- function kt(r, t) {
305
- if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
306
- throw Error("invalid template strings array");
307
- return ut !== void 0 ? ut.createHTML(t) : t;
308
- }
309
- const te = (r, t) => {
310
- const e = r.length - 1, s = [];
311
- let i, o = t === 2 ? "<svg>" : "", n = O;
312
- for (let h = 0; h < e; h++) {
313
- const a = r[h];
314
- let l, c, p = -1, u = 0;
315
- for (; u < a.length && (n.lastIndex = u, c = n.exec(a), c !== null); )
316
- u = n.lastIndex, n === O ? c[1] === "!--" ? n = gt : c[1] !== void 0 ? n = ft : c[2] !== void 0 ? (Nt.test(c[2]) && (i = RegExp("</" + c[2], "g")), n = y) : c[3] !== void 0 && (n = y) : n === y ? c[0] === ">" ? (n = i ?? O, p = -1) : c[1] === void 0 ? p = -2 : (p = n.lastIndex - c[2].length, l = c[1], n = c[3] === void 0 ? y : c[3] === '"' ? vt : mt) : n === vt || n === mt ? n = y : n === gt || n === ft ? n = O : (n = y, i = void 0);
317
- const m = n === y && r[h + 1].startsWith("/>") ? " " : "";
318
- o += n === O ? a + Xt : p >= 0 ? (s.push(l), a.slice(0, p) + Pt + a.slice(p) + v + m) : a + v + (p === -2 ? h : m);
319
- }
320
- return [kt(r, o + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
321
- };
322
- class M {
323
- constructor({ strings: t, _$litType$: e }, s) {
324
- let i;
325
- this.parts = [];
326
- let o = 0, n = 0;
327
- const h = t.length - 1, a = this.parts, [l, c] = te(t, e);
328
- if (this.el = M.createElement(l, s), A.currentNode = this.el.content, e === 2) {
329
- const p = this.el.content.firstChild;
330
- p.replaceWith(...p.childNodes);
331
- }
332
- for (; (i = A.nextNode()) !== null && a.length < h; ) {
333
- if (i.nodeType === 1) {
334
- if (i.hasAttributes())
335
- for (const p of i.getAttributeNames())
336
- if (p.endsWith(Pt)) {
337
- const u = c[n++], m = i.getAttribute(p).split(v), D = /([.?@])?(.*)/.exec(u);
338
- a.push({ type: 1, index: o, name: D[2], strings: m, ctor: D[1] === "." ? se : D[1] === "?" ? ie : D[1] === "@" ? re : F }), i.removeAttribute(p);
339
- } else
340
- p.startsWith(v) && (a.push({ type: 6, index: o }), i.removeAttribute(p));
341
- if (Nt.test(i.tagName)) {
342
- const p = i.textContent.split(v), u = p.length - 1;
343
- if (u > 0) {
344
- i.textContent = W ? W.emptyScript : "";
345
- for (let m = 0; m < u; m++)
346
- i.append(p[m], R()), A.nextNode(), a.push({ type: 2, index: ++o });
347
- i.append(p[u], R());
348
- }
349
- }
350
- } else if (i.nodeType === 8)
351
- if (i.data === Ot)
352
- a.push({ type: 2, index: o });
353
- else {
354
- let p = -1;
355
- for (; (p = i.data.indexOf(v, p + 1)) !== -1; )
356
- a.push({ type: 7, index: o }), p += v.length - 1;
357
- }
358
- o++;
359
- }
360
- }
361
- static createElement(t, e) {
362
- const s = w.createElement("template");
363
- return s.innerHTML = t, s;
364
- }
365
- }
366
- function P(r, t, e = r, s) {
367
- var n, h;
368
- if (t === x)
369
- return t;
370
- let i = s !== void 0 ? (n = e._$Co) == null ? void 0 : n[s] : e._$Cl;
371
- const o = U(t) ? void 0 : t._$litDirective$;
372
- return (i == null ? void 0 : i.constructor) !== o && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), o === void 0 ? i = void 0 : (i = new o(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = P(r, i._$AS(r, t.values), i, s)), t;
373
- }
374
- class ee {
375
- constructor(t, e) {
376
- this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
377
- }
378
- get parentNode() {
379
- return this._$AM.parentNode;
380
- }
381
- get _$AU() {
382
- return this._$AM._$AU;
383
- }
384
- u(t) {
385
- const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? w).importNode(e, !0);
386
- A.currentNode = i;
387
- let o = A.nextNode(), n = 0, h = 0, a = s[0];
388
- for (; a !== void 0; ) {
389
- if (n === a.index) {
390
- let l;
391
- a.type === 2 ? l = new L(o, o.nextSibling, this, t) : a.type === 1 ? l = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (l = new oe(o, this, t)), this._$AV.push(l), a = s[++h];
392
- }
393
- n !== (a == null ? void 0 : a.index) && (o = A.nextNode(), n++);
394
- }
395
- return A.currentNode = w, i;
396
- }
397
- p(t) {
398
- let e = 0;
399
- for (const s of this._$AV)
400
- s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
401
- }
402
- }
403
- class L {
404
- get _$AU() {
405
- var t;
406
- return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
407
- }
408
- constructor(t, e, s, i) {
409
- this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
410
- }
411
- get parentNode() {
412
- let t = this._$AA.parentNode;
413
- const e = this._$AM;
414
- return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
415
- }
416
- get startNode() {
417
- return this._$AA;
418
- }
419
- get endNode() {
420
- return this._$AB;
421
- }
422
- _$AI(t, e = this) {
423
- t = P(this, t, e), U(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Jt(t) ? this.k(t) : this._(t);
424
- }
425
- S(t) {
426
- return this._$AA.parentNode.insertBefore(t, this._$AB);
427
- }
428
- T(t) {
429
- this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
430
- }
431
- _(t) {
432
- this._$AH !== d && U(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
433
- }
434
- $(t) {
435
- var o;
436
- const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = M.createElement(kt(s.h, s.h[0]), this.options)), s);
437
- if (((o = this._$AH) == null ? void 0 : o._$AD) === i)
438
- this._$AH.p(e);
439
- else {
440
- const n = new ee(i, this), h = n.u(this.options);
441
- n.p(e), this.T(h), this._$AH = n;
442
- }
443
- }
444
- _$AC(t) {
445
- let e = $t.get(t.strings);
446
- return e === void 0 && $t.set(t.strings, e = new M(t)), e;
447
- }
448
- k(t) {
449
- Tt(this._$AH) || (this._$AH = [], this._$AR());
450
- const e = this._$AH;
451
- let s, i = 0;
452
- for (const o of t)
453
- i === e.length ? e.push(s = new L(this.S(R()), this.S(R()), this, this.options)) : s = e[i], s._$AI(o), i++;
454
- i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
455
- }
456
- _$AR(t = this._$AA.nextSibling, e) {
457
- var s;
458
- for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
459
- const i = t.nextSibling;
460
- t.remove(), t = i;
461
- }
462
- }
463
- setConnected(t) {
464
- var e;
465
- this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
466
- }
467
- }
468
- class F {
469
- get tagName() {
470
- return this.element.tagName;
471
- }
472
- get _$AU() {
473
- return this._$AM._$AU;
474
- }
475
- constructor(t, e, s, i, o) {
476
- this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = d;
477
- }
478
- _$AI(t, e = this, s, i) {
479
- const o = this.strings;
480
- let n = !1;
481
- if (o === void 0)
482
- t = P(this, t, e, 0), n = !U(t) || t !== this._$AH && t !== x, n && (this._$AH = t);
483
- else {
484
- const h = t;
485
- let a, l;
486
- for (t = o[0], a = 0; a < o.length - 1; a++)
487
- l = P(this, h[s + a], e, a), l === x && (l = this._$AH[a]), n || (n = !U(l) || l !== this._$AH[a]), l === d ? t = d : t !== d && (t += (l ?? "") + o[a + 1]), this._$AH[a] = l;
488
- }
489
- n && !i && this.j(t);
490
- }
491
- j(t) {
492
- t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
493
- }
494
- }
495
- class se extends F {
496
- constructor() {
497
- super(...arguments), this.type = 3;
498
- }
499
- j(t) {
500
- this.element[this.name] = t === d ? void 0 : t;
501
- }
502
- }
503
- class ie extends F {
504
- constructor() {
505
- super(...arguments), this.type = 4;
506
- }
507
- j(t) {
508
- this.element.toggleAttribute(this.name, !!t && t !== d);
509
- }
510
- }
511
- class re extends F {
512
- constructor(t, e, s, i, o) {
513
- super(t, e, s, i, o), this.type = 5;
514
- }
515
- _$AI(t, e = this) {
516
- if ((t = P(this, t, e, 0) ?? d) === x)
517
- return;
518
- const s = this._$AH, i = t === d && s !== d || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== d && (s === d || i);
519
- i && this.element.removeEventListener(this.name, this, s), o && 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 oe {
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
- P(this, t);
535
- }
536
- }
537
- const K = N.litHtmlPolyfillSupport;
538
- K == null || K(M, L), (N.litHtmlVersions ?? (N.litHtmlVersions = [])).push("3.1.2");
539
- const ne = (r, t, e) => {
540
- const s = (e == null ? void 0 : e.renderBefore) ?? t;
541
- let i = s._$litPart$;
542
- if (i === void 0) {
543
- const o = (e == null ? void 0 : e.renderBefore) ?? null;
544
- s._$litPart$ = i = new L(t.insertBefore(R(), o), o, void 0, e ?? {});
545
- }
546
- return i._$AI(r), i;
547
- };
548
- /**
549
- * @license
550
- * Copyright 2017 Google LLC
551
- * SPDX-License-Identifier: BSD-3-Clause
552
- */
553
- let f = class extends S {
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 = ne(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 x;
576
- }
577
- };
578
- var Et;
579
- f._$litElement$ = !0, f.finalized = !0, (Et = globalThis.litElementHydrateSupport) == null || Et.call(globalThis, { LitElement: f });
580
- const G = globalThis.litElementPolyfillSupport;
581
- G == null || G({ LitElement: f });
582
- (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
583
- /**
584
- * @license
585
- * Copyright 2021 Google LLC
586
- * SPDX-License-Identifier: BSD-3-Clause
587
- */
588
- function* Rt(r, t) {
589
- if (r !== void 0) {
590
- let e = 0;
591
- for (const s of r)
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 ae = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: st }, he = (r = ae, t, e) => {
601
- const { kind: s, metadata: i } = e;
602
- let o = globalThis.litPropertyMetadata.get(i);
603
- if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), o.set(e.name, r), s === "accessor") {
604
- const { name: n } = e;
605
- return { set(h) {
606
- const a = t.get.call(this);
607
- t.set.call(this, h), this.requestUpdate(n, a, r);
608
- }, init(h) {
609
- return h !== void 0 && this.P(n, void 0, r), h;
610
- } };
611
- }
612
- if (s === "setter") {
613
- const { name: n } = e;
614
- return function(h) {
615
- const a = this[n];
616
- t.call(this, h), this.requestUpdate(n, a, r);
617
- };
618
- }
619
- throw Error("Unsupported decorator location: " + s);
620
- };
621
- function g(r) {
622
- return (t, e) => typeof e == "object" ? he(r, t, e) : ((s, i, o) => {
623
- const n = i.hasOwnProperty(o);
624
- return i.constructor.createProperty(o, n ? { ...s, wrapped: !0 } : s), n ? Object.getOwnPropertyDescriptor(i, o) : void 0;
625
- })(r, t, e);
626
- }
627
- /**
628
- * @license
629
- * Copyright 2017 Google LLC
630
- * SPDX-License-Identifier: BSD-3-Clause
631
- */
632
- function H(r) {
633
- return g({ ...r, state: !0, attribute: !1 });
634
- }
635
- var le = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, de = (r, t, e, s) => {
636
- for (var i = s > 1 ? void 0 : s ? ce(t, e) : t, o = r.length - 1, n; o >= 0; o--)
637
- (n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i);
638
- return s && i && le(t, e, i), i;
639
- };
640
- class it extends f {
641
- constructor() {
642
- super(...arguments), this.anchor = "BottomRight";
643
- }
644
- appendChild(t) {
645
- var e;
646
- return (e = this.shadowRoot) == null || e.appendChild(t), t;
647
- }
648
- render() {
649
- return this.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right"), d;
650
- }
651
- }
652
- it.styles = [
653
- C`
654
- :host {
655
- position: fixed;
656
- display: flex;
657
- align-items: center;
658
- gap: 1rem;
659
- }
660
-
661
- :host(.bottom-right) {
662
- bottom: 20px;
663
- right: 20px;
664
- }
665
- :host(.bottom-left) {
666
- bottom: 20px;
667
- left: 20px;
668
- }
669
- `
670
- ];
671
- de([
672
- g({ attribute: !0 })
673
- ], it.prototype, "anchor", 2);
674
- /**
675
- * @license
676
- * Copyright 2017 Google LLC
677
- * SPDX-License-Identifier: BSD-3-Clause
678
- */
679
- const rt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, ot = (r) => (...t) => ({ _$litDirective$: r, values: t });
680
- let Ut = class {
681
- constructor(t) {
682
- }
683
- get _$AU() {
684
- return this._$AM._$AU;
685
- }
686
- _$AT(t, e, s) {
687
- this._$Ct = t, this._$AM = e, this._$Ci = s;
688
- }
689
- _$AS(t, e) {
690
- return this.update(t, e);
691
- }
692
- update(t, e) {
693
- return this.render(...e);
694
- }
695
- };
696
- /**
697
- * @license
698
- * Copyright 2020 Google LLC
699
- * SPDX-License-Identifier: BSD-3-Clause
700
- */
701
- const pe = (r) => r.strings === void 0;
702
- /**
703
- * @license
704
- * Copyright 2017 Google LLC
705
- * SPDX-License-Identifier: BSD-3-Clause
706
- */
707
- const k = (r, t) => {
708
- var s;
709
- const e = r._$AN;
710
- if (e === void 0)
711
- return !1;
712
- for (const i of e)
713
- (s = i._$AO) == null || s.call(i, t, !1), k(i, t);
714
- return !0;
715
- }, Y = (r) => {
716
- let t, e;
717
- do {
718
- if ((t = r._$AM) === void 0)
719
- break;
720
- e = t._$AN, e.delete(r), r = t;
721
- } while ((e == null ? void 0 : e.size) === 0);
722
- }, Mt = (r) => {
723
- for (let t; t = r._$AM; r = t) {
724
- let e = t._$AN;
725
- if (e === void 0)
726
- t._$AN = e = /* @__PURE__ */ new Set();
727
- else if (e.has(r))
728
- break;
729
- e.add(r), fe(t);
730
- }
731
- };
732
- function ue(r) {
733
- this._$AN !== void 0 ? (Y(this), this._$AM = r, Mt(this)) : this._$AM = r;
734
- }
735
- function ge(r, t = !1, e = 0) {
736
- const s = this._$AH, i = this._$AN;
737
- if (i !== void 0 && i.size !== 0)
738
- if (t)
739
- if (Array.isArray(s))
740
- for (let o = e; o < s.length; o++)
741
- k(s[o], !1), Y(s[o]);
742
- else
743
- s != null && (k(s, !1), Y(s));
744
- else
745
- k(this, r);
746
- }
747
- const fe = (r) => {
748
- r.type == rt.CHILD && (r._$AP ?? (r._$AP = ge), r._$AQ ?? (r._$AQ = ue));
749
- };
750
- class Lt extends Ut {
751
- constructor() {
752
- super(...arguments), this._$AN = void 0;
753
- }
754
- _$AT(t, e, s) {
755
- super._$AT(t, e, s), Mt(this), this.isConnected = t._$AU;
756
- }
757
- _$AO(t, e = !0) {
758
- var s, i;
759
- 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), Y(this));
760
- }
761
- setValue(t) {
762
- if (pe(this._$Ct))
763
- this._$Ct._$AI(t, this);
764
- else {
765
- const e = [...this._$Ct._$AH];
766
- e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
767
- }
768
- }
769
- disconnected() {
770
- }
771
- reconnected() {
772
- }
773
- }
774
- const me = /* @__PURE__ */ new WeakMap();
775
- let yt = 0;
776
- const X = /* @__PURE__ */ new Map(), bt = /* @__PURE__ */ new WeakSet(), _t = () => new Promise((r) => requestAnimationFrame(r)), ve = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], At = (r, t) => {
777
- const e = r - t;
778
- return e === 0 ? void 0 : e;
779
- }, wt = (r, t) => {
780
- const e = r / t;
781
- return e === 1 ? void 0 : e;
782
- }, J = { left: (r, t) => {
783
- const e = At(r, t);
784
- return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateX(${e}px)` };
785
- }, top: (r, t) => {
786
- const e = At(r, t);
787
- return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateY(${e}px)` };
788
- }, width: (r, t) => {
789
- let e;
790
- t === 0 && (t = 1, e = { width: "1px" });
791
- const s = wt(r, t);
792
- return { value: s, overrideFrom: e, transform: s == null || isNaN(s) ? void 0 : `scaleX(${s})` };
793
- }, height: (r, t) => {
794
- let e;
795
- t === 0 && (t = 1, e = { height: "1px" });
796
- const s = wt(r, t);
797
- return { value: s, overrideFrom: e, transform: s == null || isNaN(s) ? void 0 : `scaleY(${s})` };
798
- } }, $e = { duration: 333, easing: "ease-in-out" }, ye = ["left", "top", "width", "height", "opacity", "color", "background"], xt = /* @__PURE__ */ new WeakMap();
799
- class be extends Lt {
800
- constructor(t) {
801
- if (super(t), this.t = !1, this.i = null, this.o = null, this.h = !0, this.shouldLog = !1, t.type === rt.CHILD)
802
- throw Error("The `animate` directive must be used in attribute position.");
803
- this.createFinished();
804
- }
805
- createFinished() {
806
- var t;
807
- (t = this.resolveFinished) == null || t.call(this), this.finished = new Promise((e) => {
808
- this.l = e;
809
- });
810
- }
811
- async resolveFinished() {
812
- var t;
813
- (t = this.l) == null || t.call(this), this.l = void 0;
814
- }
815
- render(t) {
816
- return d;
817
- }
818
- getController() {
819
- return me.get(this.u);
820
- }
821
- isDisabled() {
822
- var t;
823
- return this.options.disabled || ((t = this.getController()) == null ? void 0 : t.disabled);
824
- }
825
- update(t, [e]) {
826
- var i;
827
- const s = this.u === void 0;
828
- return s && (this.u = (i = t.options) == null ? void 0 : i.host, this.u.addController(this), this.u.updateComplete.then((o) => this.t = !0), this.element = t.element, xt.set(this.element, this)), this.optionsOrCallback = e, (s || typeof e != "function") && this.p(e), this.render(e);
829
- }
830
- p(t) {
831
- t = t ?? {};
832
- const e = this.getController();
833
- e !== void 0 && ((t = { ...e.defaultOptions, ...t }).keyframeOptions = { ...e.defaultOptions.keyframeOptions, ...t.keyframeOptions }), t.properties ?? (t.properties = ye), this.options = t;
834
- }
835
- m() {
836
- const t = {}, e = this.element.getBoundingClientRect(), s = getComputedStyle(this.element);
837
- return this.options.properties.forEach((i) => {
838
- const o = e[i] ?? (J[i] ? void 0 : s[i]), n = Number(o);
839
- t[i] = isNaN(n) ? o + "" : n;
840
- }), t;
841
- }
842
- v() {
843
- let t, e = !0;
844
- return this.options.guard && (t = this.options.guard(), e = ((s, i) => {
845
- if (Array.isArray(s)) {
846
- if (Array.isArray(i) && i.length === s.length && s.every((o, n) => o === i[n]))
847
- return !1;
848
- } else if (i === s)
849
- return !1;
850
- return !0;
851
- })(t, this._)), this.h = this.t && !this.isDisabled() && !this.isAnimating() && e && this.element.isConnected, this.h && (this._ = Array.isArray(t) ? Array.from(t) : t), this.h;
852
- }
853
- hostUpdate() {
854
- typeof this.optionsOrCallback == "function" && this.p(this.optionsOrCallback()), this.v() && (this.A = this.m(), this.i = this.i ?? this.element.parentNode, this.o = this.element.nextSibling);
855
- }
856
- async hostUpdated() {
857
- if (!this.h || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered)
858
- return;
859
- let t;
860
- this.prepare(), await _t;
861
- const e = this.O(), s = this.j(this.options.keyframeOptions, e), i = this.m();
862
- if (this.A !== void 0) {
863
- const { from: o, to: n } = this.N(this.A, i, e);
864
- this.log("measured", [this.A, i, o, n]), t = this.calculateKeyframes(o, n);
865
- } else {
866
- const o = X.get(this.options.inId);
867
- if (o) {
868
- X.delete(this.options.inId);
869
- const { from: n, to: h } = this.N(o, i, e);
870
- t = this.calculateKeyframes(n, h), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, yt++, t.forEach((a) => a.zIndex = yt);
871
- } else
872
- this.options.in && (t = [...this.options.in, {}]);
873
- }
874
- this.animate(t, s);
875
- }
876
- resetStyles() {
877
- this.P !== void 0 && (this.element.setAttribute("style", this.P ?? ""), this.P = void 0);
878
- }
879
- commitStyles() {
880
- var t, e;
881
- this.P = this.element.getAttribute("style"), (t = this.webAnimation) == null || t.commitStyles(), (e = this.webAnimation) == null || e.cancel();
882
- }
883
- reconnected() {
884
- }
885
- async disconnected() {
886
- var e;
887
- if (!this.h || (this.options.id !== void 0 && X.set(this.options.id, this.A), this.options.out === void 0))
888
- return;
889
- if (this.prepare(), await _t(), (e = this.i) == null ? void 0 : e.isConnected) {
890
- const s = this.o && this.o.parentNode === this.i ? this.o : null;
891
- if (this.i.insertBefore(this.element, s), this.options.stabilizeOut) {
892
- const i = this.m();
893
- this.log("stabilizing out");
894
- const o = this.A.left - i.left, n = this.A.top - i.top;
895
- getComputedStyle(this.element).position !== "static" || o === 0 && n === 0 || (this.element.style.position = "relative"), o !== 0 && (this.element.style.left = o + "px"), n !== 0 && (this.element.style.top = n + "px");
896
- }
897
- }
898
- const t = this.j(this.options.keyframeOptions);
899
- await this.animate(this.options.out, t), this.element.remove();
900
- }
901
- prepare() {
902
- this.createFinished();
903
- }
904
- start() {
905
- var t, e;
906
- (e = (t = this.options).onStart) == null || e.call(t, this);
907
- }
908
- didFinish(t) {
909
- var e, s;
910
- t && ((s = (e = this.options).onComplete) == null || s.call(e, this)), this.A = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
911
- }
912
- O() {
913
- const t = [];
914
- for (let e = this.element.parentNode; e; e = e == null ? void 0 : e.parentNode) {
915
- const s = xt.get(e);
916
- s && !s.isDisabled() && s && t.push(s);
917
- }
918
- return t;
919
- }
920
- get isHostRendered() {
921
- const t = bt.has(this.u);
922
- return t || this.u.updateComplete.then(() => {
923
- bt.add(this.u);
924
- }), t;
925
- }
926
- j(t, e = this.O()) {
927
- const s = { ...$e };
928
- return e.forEach((i) => Object.assign(s, i.options.keyframeOptions)), Object.assign(s, t), s;
929
- }
930
- N(t, e, s) {
931
- t = { ...t }, e = { ...e };
932
- const i = s.map((h) => h.animatingProperties).filter((h) => h !== void 0);
933
- let o = 1, n = 1;
934
- return i.length > 0 && (i.forEach((h) => {
935
- h.width && (o /= h.width), h.height && (n /= h.height);
936
- }), t.left !== void 0 && e.left !== void 0 && (t.left = o * t.left, e.left = o * e.left), t.top !== void 0 && e.top !== void 0 && (t.top = n * t.top, e.top = n * e.top)), { from: t, to: e };
937
- }
938
- calculateKeyframes(t, e, s = !1) {
939
- const i = {}, o = {};
940
- let n = !1;
941
- const h = {};
942
- for (const a in e) {
943
- const l = t[a], c = e[a];
944
- if (a in J) {
945
- const p = J[a];
946
- if (l === void 0 || c === void 0)
947
- continue;
948
- const u = p(l, c);
949
- u.transform !== void 0 && (h[a] = u.value, n = !0, i.transform = `${i.transform ?? ""} ${u.transform}`, u.overrideFrom !== void 0 && Object.assign(i, u.overrideFrom));
950
- } else
951
- l !== c && l !== void 0 && c !== void 0 && (n = !0, i[a] = l, o[a] = c);
952
- }
953
- return i.transformOrigin = o.transformOrigin = s ? "center center" : "top left", this.animatingProperties = h, n ? [i, o] : void 0;
954
- }
955
- async animate(t, e = this.options.keyframeOptions) {
956
- this.start(), this.frames = t;
957
- let s = !1;
958
- if (!this.isAnimating() && !this.isDisabled() && (this.options.onFrames && (this.frames = t = this.options.onFrames(this), this.log("modified frames", t)), t !== void 0)) {
959
- this.log("animate", [t, e]), s = !0, this.webAnimation = this.element.animate(t, e);
960
- const i = this.getController();
961
- i == null || i.add(this);
962
- try {
963
- await this.webAnimation.finished;
964
- } catch {
965
- }
966
- i == null || i.remove(this);
967
- }
968
- return this.didFinish(s), s;
969
- }
970
- isAnimating() {
971
- var t, e;
972
- return ((t = this.webAnimation) == null ? void 0 : t.playState) === "running" || ((e = this.webAnimation) == null ? void 0 : e.pending);
973
- }
974
- log(t, e) {
975
- this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, e);
976
- }
977
- }
978
- const _e = ot(be), Ae = { name: "question", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 4C16.536 4 4 16.536 4 32C4 47.464 16.536 60 32 60C47.464 60 60 47.464 60 32C59.9827 16.5432 47.4568 4.01731 32 4ZM32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.30769 18.9151 18.9151 8.30769 32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6775 45.0788 45.0788 55.6775 32 55.6923Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9423 37.5723L36.311 32.9068L36.7354 32.4448C39.7555 29.1161 40.7645 27.0647 40.7645 24.5087C40.7645 23.1091 40.4251 21.7942 39.7041 20.6491C38.3044 18.3587 35.6323 16.9166 32.2816 16.9166C28.7565 16.9166 25.3125 18.7414 23.2581 21.6772L23.1201 21.8791C22.8232 22.3032 22.696 22.6849 22.696 22.9818C22.696 23.7029 23.926 25.9932 25.2833 25.9932C25.5378 25.9932 25.7922 25.9084 26.0467 25.7388C26.2588 25.5691 26.5981 25.2298 27.0647 24.7208C28.8885 22.6849 30.1185 21.9215 31.7726 21.9215C33.6813 21.9215 35.081 23.1939 35.081 24.8905C35.081 26.375 34.2751 27.7746 32.3664 29.8529L28.2523 34.2216C27.9554 34.6033 27.7857 34.9426 27.7857 35.282C27.7857 35.6213 27.9978 36.1726 28.4219 36.8937C29.0581 37.8692 29.7368 38.3782 30.4578 38.3782C30.9244 38.3782 31.3909 38.1237 31.9423 37.5723ZM30.882 47.4972C29.2278 47.4972 27.6585 44.7403 27.6585 43.6799C27.6585 42.1954 30.0761 40.6261 32.4089 40.6261C33.6389 40.6261 34.2751 41.1775 34.2751 42.3227C34.2751 44.0616 33.4692 45.843 32.4513 46.7761C31.9423 47.2427 31.4334 47.4972 30.882 47.4972Z"/></svg>' };
979
- /**
980
- * @license
981
- * Copyright 2018 Google LLC
982
- * SPDX-License-Identifier: BSD-3-Clause
983
- */
984
- const we = ot(class extends Ut {
985
- constructor(r) {
986
- var t;
987
- if (super(r), r.type !== rt.ATTRIBUTE || r.name !== "class" || ((t = r.strings) == null ? void 0 : t.length) > 2)
988
- throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
989
- }
990
- render(r) {
991
- return " " + Object.keys(r).filter((t) => r[t]).join(" ") + " ";
992
- }
993
- update(r, [t]) {
994
- var s, i;
995
- if (this.st === void 0) {
996
- this.st = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.nt = new Set(r.strings.join(" ").split(/\s/).filter((o) => o !== "")));
997
- for (const o in t)
998
- t[o] && !((s = this.nt) != null && s.has(o)) && this.st.add(o);
999
- return this.render(t);
1000
- }
1001
- const e = r.element.classList;
1002
- for (const o of this.st)
1003
- o in t || (e.remove(o), this.st.delete(o));
1004
- for (const o in t) {
1005
- const n = !!t[o];
1006
- n === this.st.has(o) || (i = this.nt) != null && i.has(o) || (n ? (e.add(o), this.st.add(o)) : (e.remove(o), this.st.delete(o)));
1007
- }
1008
- return x;
1009
- }
1010
- }), B = (r, t, e) => {
1011
- r && e.style.setProperty(t, r);
1012
- }, Ht = (r, t) => {
1013
- var e, s, i, o;
1014
- B((e = r.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), B(
1015
- (s = r.colors) == null ? void 0 : s.textOnPrimaryBackground,
1016
- "--text-on-primary-background",
1017
- t
1018
- ), B(
1019
- (i = r.colors) == null ? void 0 : i.secondaryBackground,
1020
- "--secondary-background",
1021
- t
1022
- ), B(
1023
- (o = r.colors) == null ? void 0 : o.textOnSecondaryBackground,
1024
- "--text-on-secondary-background",
1025
- t
1026
- );
1027
- };
1028
- /**
1029
- * @license
1030
- * Copyright 2020 Google LLC
1031
- * SPDX-License-Identifier: BSD-3-Clause
1032
- */
1033
- const jt = () => new xe();
1034
- class xe {
1035
- }
1036
- const Q = /* @__PURE__ */ new WeakMap(), Dt = ot(class extends Lt {
1037
- render(r) {
1038
- return d;
1039
- }
1040
- update(r, [t]) {
1041
- var s;
1042
- const e = t !== this.Y;
1043
- return e && this.Y !== void 0 && this.rt(void 0), (e || this.lt !== this.ct) && (this.Y = t, this.ht = (s = r.options) == null ? void 0 : s.host, this.rt(this.ct = r.element)), d;
1044
- }
1045
- rt(r) {
1046
- if (typeof this.Y == "function") {
1047
- const t = this.ht ?? globalThis;
1048
- let e = Q.get(t);
1049
- e === void 0 && (e = /* @__PURE__ */ new WeakMap(), Q.set(t, e)), e.get(this.Y) !== void 0 && this.Y.call(this.ht, void 0), e.set(this.Y, r), r !== void 0 && this.Y.call(this.ht, r);
1050
- } else
1051
- this.Y.value = r;
1052
- }
1053
- get lt() {
1054
- var r, t;
1055
- return typeof this.Y == "function" ? (r = Q.get(this.ht ?? globalThis)) == null ? void 0 : r.get(this.Y) : (t = this.Y) == null ? void 0 : t.value;
1056
- }
1057
- disconnected() {
1058
- this.lt === this.ct && this.rt(void 0);
1059
- }
1060
- reconnected() {
1061
- this.rt(this.ct);
1062
- }
1063
- });
1064
- var Ce = Object.defineProperty, Ee = Object.getOwnPropertyDescriptor, V = (r, t, e, s) => {
1065
- for (var i = s > 1 ? void 0 : s ? Ee(t, e) : t, o = r.length - 1, n; o >= 0; o--)
1066
- (n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i);
1067
- return s && i && Ce(t, e, i), i;
1068
- };
1069
- class E extends f {
1070
- constructor() {
1071
- super(...arguments), this.active = !1, this.loaded = !1, this.containerRef = jt();
1072
- }
1073
- async connectedCallback() {
1074
- super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
1075
- }
1076
- toggleActive() {
1077
- var t;
1078
- if (!((t = this.application) != null && t.root)) {
1079
- console.warn(
1080
- "Could not activate widget. No root element assigned to widget."
1081
- );
1082
- return;
1083
- }
1084
- this.active = !this.active, this.active ? this.application.appendToDOM() : this.application.hide();
1085
- }
1086
- _applyBranding() {
1087
- var t;
1088
- (t = this.application) != null && t.settings && Ht(this.application.settings.branding, this);
1089
- }
1090
- async _renderSymbol() {
1091
- var h, a, l;
1092
- const t = (h = this.application) == null ? void 0 : h.branding(), e = (a = t == null ? void 0 : t.graphics) == null ? void 0 : a.trigger;
1093
- if (e)
1094
- return _` <img src=${e} class="trigger-icon" alt="" /> `;
1095
- const s = (l = this.application) == null ? void 0 : l.triggerIcon;
1096
- if (!s)
1097
- return d;
1098
- const i = async (c) => Ae, { type: o, content: n } = s;
1099
- switch (o) {
1100
- case "Telia": {
1101
- const c = await i();
1102
- return c ? _`<telia-icon
1103
- class="trigger-icon"
1104
- svg=${c.svg}
1105
- size="lg"
1106
- ></telia-icon>` : d;
1107
- }
1108
- default:
1109
- return d;
1110
- }
1111
- }
1112
- render() {
1113
- var t, e, s, i;
1114
- return _`<div class="trigger-container" ${Dt(this.containerRef)}>
1115
- ${!this.active && ((i = (s = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : s.other) != null && i.showButtonLabel) ? _`
1116
- <button
1117
- label="${this.application.settings.branding.other.buttonLabelText ?? "Widget trigger"}"
1118
- class="trigger-label"
1119
- @click=${this.toggleActive}
1120
- ${_e({
1121
- keyframeOptions: {},
1122
- in: ve,
1123
- stabilizeOut: !0,
1124
- skipInitial: !1
1125
- })}
1126
- >
1127
- ${this.application.settings.branding.other.buttonLabelText}
1128
- </button>
1129
- ` : d}
1130
-
1131
- <button
1132
- label="Widget trigger"
1133
- class=${we({
1134
- trigger: !0,
1135
- active: this.active,
1136
- rendered: this.loaded
1137
- })}
1138
- @click=${this.toggleActive}
1139
- >
1140
- ${this.icon}
1141
- <span class="trigger-close">
1142
- <svg
1143
- width="18"
1144
- height="9"
1145
- viewBox="0 0 18 9"
1146
- fill="none"
1147
- xmlns="http://www.w3.org/2000/svg"
1148
- >
1149
- <path
1150
- 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"
1151
- fill="white"
1152
- />
1153
- </svg>
1154
- </span>
1155
- <span class="trigger-loader">
1156
- <svg viewBox="25 25 50 50">
1157
- <circle
1158
- cx="50"
1159
- cy="50"
1160
- r="20"
1161
- fill="none"
1162
- stroke="#000"
1163
- stroke-width="2"
1164
- stroke-miterlimit="10"
1165
- />
1166
- </svg>
1167
- </span>
1168
- </button>
1169
- </div>`;
1170
- }
1171
- }
1172
- E.styles = [
1173
- C`
1174
- :host {
1175
- --voca-rem-multiplier: 0.625;
1176
- --trigger-label-bg: #f5e0ff;
1177
- --trigger-label-text-color: rgba(0, 0, 0, 0.8);
1178
- display: block;
1179
- box-sizing: border-box;
1180
- /* font-family: var(--font-family); */
1181
- font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
1182
- }
1183
-
1184
- .trigger-container {
1185
- display: flex;
1186
- align-items: center;
1187
- gap: 1rem;
1188
- }
1189
-
1190
- .trigger {
1191
- transform: scale(0);
1192
- box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
1193
- z-index: 5;
1194
- display: flex;
1195
- align-items: center;
1196
- justify-content: center;
1197
- border: none;
1198
- line-height: 55px;
1199
- height: 55px;
1200
- width: 55px;
1201
- border-radius: 55px;
1202
- cursor: pointer;
1203
- background-color: var(--trigger-bg, var(--primary-background));
1204
- font-family: Lato;
1205
- text-decoration: none;
1206
- border: 3px dashed transparent;
1207
- box-sizing: border-box;
1208
- transition: transform 200ms ease-out;
1209
- }
1210
- .trigger:active {
1211
- transform: scale(0.8) !important;
1212
- }
1213
- .trigger:hover:not(:active) {
1214
- transform: scale(1.1) !important;
1215
- }
1216
- .trigger.rendered {
1217
- transform: scale(1);
1218
- }
1219
- .trigger.active .trigger-icon {
1220
- opacity: 0;
1221
- transform: rotate(-180deg) scale(0);
1222
- }
1223
- .trigger.active .trigger-close {
1224
- opacity: 1;
1225
- transform: rotate(0deg) scale(1);
1226
- }
1227
-
1228
- .trigger-icon {
1229
- display: inline-block;
1230
- line-height: inherit;
1231
- text-align: center;
1232
- opacity: 1;
1233
- transform: rotate(0deg) scale(1);
1234
- transition: opacity 200ms ease-out, transform 200ms ease-out;
1235
- color: var(--trigger-text-color, var(--text-on-primary-background));
1236
- }
1237
- .trigger-close {
1238
- opacity: 0;
1239
- transition: transform 200ms ease-out;
1240
- transform: rotate(180deg) scale(0);
1241
- position: absolute;
1242
- top: 0;
1243
- bottom: 0;
1244
- left: 0;
1245
- right: 0;
1246
- display: flex;
1247
- justify-content: center;
1248
- align-items: center;
1249
- }
1250
- .trigger-close svg path {
1251
- fill: var(--trigger-text-color, var(--text-on-primary-background));
1252
- }
1253
-
1254
- img {
1255
- max-width: 100%;
1256
- }
1257
-
1258
- .trigger-label {
1259
- box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);
1260
- background-color: var(--trigger-label-bg);
1261
- color: var(--trigger-label-text-color);
1262
- white-space: nowrap;
1263
- padding: 0.7rem 1rem;
1264
- border-radius: 0.3rem;
1265
- font-weight: 500;
1266
- display: flex;
1267
- justify-content: center;
1268
- align-items: center;
1269
- cursor: pointer;
1270
- border: none;
1271
- font-size: 1rem;
1272
- font-family: inherit;
1273
- transition: all 300ms ease-in-out;
1274
- }
1275
-
1276
- .trigger-label:hover {
1277
- opacity: 0.8;
1278
- }
1279
- `
1280
- ];
1281
- V([
1282
- g({ attribute: !1 })
1283
- ], E.prototype, "application", 2);
1284
- V([
1285
- H()
1286
- ], E.prototype, "active", 2);
1287
- V([
1288
- H()
1289
- ], E.prototype, "loaded", 2);
1290
- V([
1291
- H()
1292
- ], E.prototype, "icon", 2);
1293
- var Se = Object.defineProperty, Pe = Object.getOwnPropertyDescriptor, b = (r, t, e, s) => {
1294
- for (var i = s > 1 ? void 0 : s ? Pe(t, e) : t, o = r.length - 1, n; o >= 0; o--)
1295
- (n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i);
1296
- return s && i && Se(t, e, i), i;
1297
- };
1298
- const Bt = (r) => {
1299
- class t extends r {
1300
- constructor() {
1301
- super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
1302
- }
1303
- writeProperties(s) {
1304
- this.properties = s;
1305
- }
1306
- writeLayout(s) {
1307
- this.layout = s;
1308
- }
1309
- writeContext(s) {
1310
- this.context = s;
1311
- }
1312
- addChild(s) {
1313
- s.parent = this, this.nodes.push(s);
1314
- }
1315
- connectedCallback() {
1316
- super.connectedCallback(), this.renderRoot.host.style.setProperty(
1317
- "--width",
1318
- this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
1319
- ), this.application.mountComponent(this);
1320
- }
1321
- }
1322
- return t.styles = [
1323
- // (superClass as unknown as typeof LitElement).styles ?? [],
1324
- C`
1325
- :host {
1326
- font-family: var(--font-family);
1327
- grid-column: span var(--width);
1328
- max-width: 100%;
1329
- overflow: hidden;
1330
- box-sizing: border-box;
1331
- display: block;
1332
- }
1333
- * {
1334
- box-sizing: border-box;
1335
- }
1336
- `
1337
- ], b([
1338
- g()
1339
- ], t.prototype, "properties", 2), b([
1340
- g()
1341
- ], t.prototype, "context", 2), b([
1342
- g()
1343
- ], t.prototype, "layout", 2), b([
1344
- g()
1345
- ], t.prototype, "name", 2), b([
1346
- g()
1347
- ], t.prototype, "type", 2), b([
1348
- g({ attribute: !1 })
1349
- ], t.prototype, "application", 2), b([
1350
- g({ attribute: !1 })
1351
- ], t.prototype, "parent", 2), t;
1352
- };
1353
- class zt extends Bt(f) {
1354
- render() {
1355
- return _`Non resolved component`;
1356
- }
1357
- }
1358
- zt.styles = [
1359
- C`
1360
- :host {
1361
- display: block;
1362
- }
1363
- `
1364
- ];
1365
- var nt = /* @__PURE__ */ ((r) => (r.Inline = "inline", r.Trigger = "trigger", r))(nt || {});
1366
- /**
1367
- * @license
1368
- * Copyright 2021 Google LLC
1369
- * SPDX-License-Identifier: BSD-3-Clause
1370
- */
1371
- let Oe = class extends Event {
1372
- constructor(t, e, s) {
1373
- super("context-request", { bubbles: !0, composed: !0 }), this.context = t, this.callback = e, this.subscribe = s ?? !1;
1374
- }
1375
- };
1376
- /**
1377
- * @license
1378
- * Copyright 2021 Google LLC
1379
- * SPDX-License-Identifier: BSD-3-Clause
1380
- */
1381
- /**
1382
- * @license
1383
- * Copyright 2021 Google LLC
1384
- * SPDX-License-Identifier: BSD-3-Clause
1385
- */
1386
- class Te {
1387
- get value() {
1388
- return this.o;
1389
- }
1390
- set value(t) {
1391
- this.setValue(t);
1392
- }
1393
- setValue(t, e = !1) {
1394
- const s = e || !Object.is(t, this.o);
1395
- this.o = t, s && this.updateObservers();
1396
- }
1397
- constructor(t) {
1398
- this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
1399
- for (const [e, { disposer: s }] of this.subscriptions)
1400
- e(this.o, s);
1401
- }, t !== void 0 && (this.value = t);
1402
- }
1403
- addCallback(t, e, s) {
1404
- if (!s)
1405
- return void t(this.value);
1406
- this.subscriptions.has(t) || this.subscriptions.set(t, { disposer: () => {
1407
- this.subscriptions.delete(t);
1408
- }, consumerHost: e });
1409
- const { disposer: i } = this.subscriptions.get(t);
1410
- t(this.value, i);
1411
- }
1412
- clearCallbacks() {
1413
- this.subscriptions.clear();
1414
- }
1415
- }
1416
- /**
1417
- * @license
1418
- * Copyright 2021 Google LLC
1419
- * SPDX-License-Identifier: BSD-3-Clause
1420
- */
1421
- let Ne = class extends Event {
1422
- constructor(t) {
1423
- super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
1424
- }
1425
- };
1426
- class Ct extends Te {
1427
- constructor(t, e, s) {
1428
- var i, o;
1429
- super(e.context !== void 0 ? e.initialValue : s), this.onContextRequest = (n) => {
1430
- const h = n.composedPath()[0];
1431
- n.context === this.context && h !== this.host && (n.stopPropagation(), this.addCallback(n.callback, h, n.subscribe));
1432
- }, this.onProviderRequest = (n) => {
1433
- const h = n.composedPath()[0];
1434
- if (n.context !== this.context || h === this.host)
1435
- return;
1436
- const a = /* @__PURE__ */ new Set();
1437
- for (const [l, { consumerHost: c }] of this.subscriptions)
1438
- a.has(l) || (a.add(l), c.dispatchEvent(new Oe(this.context, l, !0)));
1439
- n.stopPropagation();
1440
- }, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (o = (i = this.host).addController) == null || o.call(i, this);
1441
- }
1442
- attachListeners() {
1443
- this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
1444
- }
1445
- hostConnected() {
1446
- this.host.dispatchEvent(new Ne(this.context));
1447
- }
1448
- }
1449
- /**
1450
- * @license
1451
- * Copyright 2017 Google LLC
1452
- * SPDX-License-Identifier: BSD-3-Clause
1453
- */
1454
- function ke({ context: r }) {
1455
- return (t, e) => {
1456
- const s = /* @__PURE__ */ new WeakMap();
1457
- if (typeof e == "object")
1458
- return e.addInitializer(function() {
1459
- s.set(this, new Ct(this, { context: r }));
1460
- }), { get() {
1461
- return t.get.call(this);
1462
- }, set(i) {
1463
- var o;
1464
- return (o = s.get(this)) == null || o.setValue(i), t.set.call(this, i);
1465
- }, init(i) {
1466
- var o;
1467
- return (o = s.get(this)) == null || o.setValue(i), i;
1468
- } };
1469
- {
1470
- t.constructor.addInitializer((n) => {
1471
- s.set(n, new Ct(n, { context: r }));
1472
- });
1473
- const i = Object.getOwnPropertyDescriptor(t, e);
1474
- let o;
1475
- if (i === void 0) {
1476
- const n = /* @__PURE__ */ new WeakMap();
1477
- o = { get: function() {
1478
- return n.get(this);
1479
- }, set: function(h) {
1480
- s.get(this).setValue(h), n.set(this, h);
1481
- }, configurable: !0, enumerable: !0 };
1482
- } else {
1483
- const n = i.set;
1484
- o = { ...i, set: function(h) {
1485
- s.get(this).setValue(h), n == null || n.call(this, h);
1486
- } };
1487
- }
1488
- return void Object.defineProperty(t, e, o);
1489
- }
1490
- };
1491
- }
1492
- var Re = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, Me = (r, t, e, s) => {
1493
- for (var i = s > 1 ? void 0 : s ? Ue(t, e) : t, o = r.length - 1, n; o >= 0; o--)
1494
- (n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i);
1495
- return s && i && Re(t, e, i), i;
1496
- };
1497
- const Le = "application";
1498
- class at extends f {
1499
- constructor() {
1500
- super(...arguments), this.nodes = [], this.wrapperRef = jt();
1501
- }
1502
- addChild(t) {
1503
- t.parent = this, this.nodes.push(t);
1504
- }
1505
- applyBranding() {
1506
- if (!this.wrapperRef.value)
1507
- return;
1508
- const t = this.application.settings;
1509
- t != null && t.branding && Ht(t.branding, this.wrapperRef.value);
1510
- }
1511
- applyStyles() {
1512
- if (!this.wrapperRef.value)
1513
- return;
1514
- const t = this.application.styles(), e = this.wrapperRef.value;
1515
- Object.entries(t).forEach(([s, i]) => {
1516
- e.style.setProperty(`--${s}`, i);
1517
- });
1518
- }
1519
- firstUpdated(t) {
1520
- this.applyBranding(), this.applyStyles();
1521
- }
1522
- render() {
1523
- return this.application.renderStrategy === nt.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), _`<div class="widget-container" ${Dt(this.wrapperRef)}>
1524
- ${Rt(this.nodes, (t) => t)}
1525
- </div>`;
1526
- }
1527
- }
1528
- at.styles = C`
1529
- :host {
1530
- --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
1531
- --spacing-xs: 0.2rem;
1532
- --spacing-sm: 0.5rem;
1533
- --spacing-md: 1rem;
1534
- --spacing-lg: 1.2rem;
1535
- --spacing-xl: 1.8rem;
1536
-
1537
- --inverted-spacing-lg: -1.2rem;
1538
-
1539
- --text-color: #222222;
1540
- --link-color: #990ae3;
1541
- --gray-color: #f3f3f8;
1542
- --white-color: #fff;
1543
- --gray-dark-color: #a6a6a6;
1544
-
1545
- --box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
1546
- --border-radius: var(--spacing-sm);
1547
- --border-radius-sm: var(--spacing-sm);
1548
- --border-radius-lg: var(--spacing-lg);
1549
- --border-radius-xl: var(--spacing-xl);
1550
- --gap: var(--spacing-sm);
1551
-
1552
- --header-height: 69px;
1553
- }
1554
- :host {
1555
- --voca-rem-multiplier: 0.625;
1556
- box-sizing: border-box;
1557
- display: block;
1558
- }
1559
-
1560
- :host(.inline) {
1561
- height: 100%;
1562
- position: fixed;
1563
- inset: 0 0 0 0;
1564
- }
1565
-
1566
- :host(.floating) {
1567
- z-index: 6;
1568
- position: fixed;
1569
- }
1570
- @media screen and (max-width: 800px) {
1571
- :host(.floating) {
1572
- inset: 0 0 95px 0;
1573
- }
1574
- }
1575
- @media screen and (min-width: 801px) {
1576
- :host(.floating) {
1577
- inset: auto 20px 95px auto;
1578
- max-height: calc(100vh - 120px);
1579
- width: 400px;
1580
- height: 700px;
1581
- }
1582
- :host(.floating.bottom-right) {
1583
- inset: auto 20px 95px auto;
1584
- }
1585
- :host(.floating.bottom-left) {
1586
- inset: auto auto 95px 20px;
1587
- }
1588
- }
1589
-
1590
- :host(.floating) .widget-container {
1591
- box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
1592
- border-radius: 0.7rem;
1593
- }
1594
-
1595
- * {
1596
- box-sizing: border-box;
1597
- }
1598
- .widget-container {
1599
- height: 100%;
1600
- background-color: var(--primary-background);
1601
- padding: var(--spacing-sm);
1602
- border: var(--widget-border, none);
1603
- }
1604
- @keyframes slideDown {
1605
- from {
1606
- transform: translateY(0);
1607
- opacity: 1;
1608
- }
1609
- to {
1610
- transform: translateY(100%);
1611
- opacity: 0;
1612
- }
1613
- }
1614
- @keyframes slideUp {
1615
- from {
1616
- transform: translateY(100%);
1617
- opacity: 0;
1618
- }
1619
- to {
1620
- transform: translateY(0);
1621
- opacity: 1;
1622
- }
1623
- }
1624
- :host(.expanded) {
1625
- opacity: 1;
1626
- animation: slideUp 0.3s linear;
1627
- }
1628
- :host(.hidden) {
1629
- opacity: 0;
1630
- animation: slideDown 0.3s linear;
1631
- }
1632
- `;
1633
- Me([
1634
- g({ attribute: !1 }),
1635
- ke({ context: Le })
1636
- ], at.prototype, "application", 2);
1637
- var He = Object.defineProperty, je = Object.getOwnPropertyDescriptor, ht = (r, t, e, s) => {
1638
- for (var i = s > 1 ? void 0 : s ? je(t, e) : t, o = r.length - 1, n; o >= 0; o--)
1639
- (n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i);
1640
- return s && i && He(t, e, i), i;
1641
- };
1642
- class j extends f {
1643
- constructor() {
1644
- super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
1645
- }
1646
- async connectedCallback() {
1647
- super.connectedCallback(), await this.getGlobalEnvironment();
1648
- }
1649
- disconnectedCallback() {
1650
- super.disconnectedCallback(), this.removeEventListener("environment-created", this.onEnvironmentCreated);
1651
- }
1652
- async onEnvironmentCreated(t) {
1653
- this.widget = t.detail.widget, await this.activate(), this.requestUpdate();
1654
- }
1655
- async activate() {
1656
- this.widget && (await this.widget.activate(), this.status = "activated");
1657
- }
1658
- async getGlobalEnvironment() {
1659
- const t = globalThis.widgets;
1660
- t && (this.widget = t.applications.find(
1661
- (e) => e.name === this.name
1662
- ), await this.activate());
1663
- }
1664
- render() {
1665
- if (!this.widget || this.status !== "activated")
1666
- return d;
1667
- if (this.widget.renderStrategy === nt.Trigger) {
1668
- const t = new E();
1669
- return t.application = this.widget, t;
1670
- }
1671
- return this.widget.render();
1672
- }
1673
- }
1674
- j.styles = [
1675
- C`
1676
- :host {
1677
- display: block;
1678
- }
1679
- `
1680
- ];
1681
- ht([
1682
- g({ attribute: !0 })
1683
- ], j.prototype, "name", 2);
1684
- ht([
1685
- H()
1686
- ], j.prototype, "widget", 2);
1687
- ht([
1688
- H()
1689
- ], j.prototype, "status", 2);
1690
- customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", it);
1691
- customElements.get("ace-trigger") || customElements.define("ace-trigger", E);
1692
- customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", zt);
1693
- customElements.get("ace-wrapper") || customElements.define("ace-wrapper", at);
1694
- customElements.get("ace-widget") || customElements.define("ace-widget", j);
1695
- const De = (r) => {
1696
- const t = {};
1697
- return Object.keys(r).forEach((e) => {
1698
- e.indexOf("css-") > -1 && (t[e] = r[e]);
1699
- }), t;
1700
- }, Be = (r, t) => {
1701
- const e = De(t);
1702
- Object.entries(e).forEach(([s, i]) => {
1703
- r.style.setProperty(s.replace("css-", ""), i);
1704
- });
1705
- };
1706
- class ze extends Bt(f) {
1707
- constructor() {
1708
- super(...arguments), this.nodes = [];
1709
- }
1710
- render() {
1711
- var t;
1712
- return Be(this.renderRoot.host, this.properties), this.renderRoot.host.style.setProperty(
1713
- "--columns",
1714
- ((t = this.properties.columns) == null ? void 0 : t.toString()) || "1"
1715
- ), _`${Rt(this.nodes, (e) => e)}`;
1716
- }
1717
- }
1718
- ze.styles = [
1719
- C`
1720
- :host {
1721
- height: 100%;
1722
- display: grid;
1723
- justify-content: center;
1724
- grid-auto-rows: max-content;
1725
- grid-template-rows: auto;
1726
- grid-template-columns: repeat(var(--columns), 1fr);
1727
- gap: var(--gap);
1728
- }
1729
- `
1730
- ];
1731
- export {
1732
- ze as Area,
1733
- ze as default
1734
- };