@telia-ace/widget-conversation-flamingo 1.0.13 → 1.0.32

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.
Files changed (68) hide show
  1. package/{dist/agent.d.ts → agent.d.ts} +0 -1
  2. package/components/conversation/conversation.d.ts +20 -0
  3. package/{dist/components → components}/conversation/plugin.d.ts +0 -1
  4. package/{dist/components → components}/conversation/ui/message-list.d.ts +1 -2
  5. package/{dist/components → components}/conversation/ui/message-types/message-type-html.d.ts +1 -2
  6. package/{dist/components → components}/conversation/ui/message-types/message-type-link-list.d.ts +1 -2
  7. package/{dist/components → components}/conversation/ui/message-types/message-type-separator.d.ts +1 -2
  8. package/{dist/components → components}/conversation/ui/message.d.ts +2 -3
  9. package/{dist/components → components}/conversation/utils.d.ts +0 -1
  10. package/conversation-18045ffc.mjs +1884 -0
  11. package/conversation-2a8210a9.js +446 -0
  12. package/{dist/conversation-controller.d.ts → conversation-controller.d.ts} +0 -1
  13. package/{dist/conversation-history.d.ts → conversation-history.d.ts} +0 -1
  14. package/{dist/conversation-platform.d.ts → conversation-platform.d.ts} +2 -6
  15. package/{dist/conversation-provider.d.ts → conversation-provider.d.ts} +0 -1
  16. package/{dist/index-9688347a-02584d39.js → index-17239ac6.mjs} +245 -245
  17. package/index-17fa2121.js +1 -0
  18. package/index-8a04bebb.mjs +3887 -0
  19. package/index-a12a1d3f.js +160 -0
  20. package/{dist/index.d.ts → index.d.ts} +0 -1
  21. package/index.js +1 -0
  22. package/{dist/index.js → index.mjs} +3 -4
  23. package/package.json +6 -48
  24. package/send-1e9780e5.mjs +5 -0
  25. package/send-df47dcea.js +1 -0
  26. package/{dist/store.d.ts → store.d.ts} +0 -1
  27. package/{dist/types.d.ts → types.d.ts} +0 -1
  28. package/{dist/user.d.ts → user.d.ts} +0 -1
  29. package/{dist/utils → utils}/custom-message.d.ts +0 -1
  30. package/{dist/utils → utils}/index.d.ts +0 -1
  31. package/{dist/utils → utils}/open-chat-widget.d.ts +1 -2
  32. package/{dist/utils → utils}/swap-provider.d.ts +0 -1
  33. package/LICENSE.txt +0 -6
  34. package/README.md +0 -490
  35. package/dist/agent.d.ts.map +0 -1
  36. package/dist/components/conversation/conversation.d.ts +0 -26
  37. package/dist/components/conversation/conversation.d.ts.map +0 -1
  38. package/dist/components/conversation/plugin.d.ts.map +0 -1
  39. package/dist/components/conversation/ui/message-list.d.ts.map +0 -1
  40. package/dist/components/conversation/ui/message-types/message-type-html.d.ts.map +0 -1
  41. package/dist/components/conversation/ui/message-types/message-type-link-list.d.ts.map +0 -1
  42. package/dist/components/conversation/ui/message-types/message-type-separator.d.ts.map +0 -1
  43. package/dist/components/conversation/ui/message.d.ts.map +0 -1
  44. package/dist/components/conversation/utils.d.ts.map +0 -1
  45. package/dist/conversation-34a9a242.js +0 -2281
  46. package/dist/conversation-34a9a242.js.map +0 -1
  47. package/dist/conversation-controller.d.ts.map +0 -1
  48. package/dist/conversation-form-adapter.d.ts +0 -7
  49. package/dist/conversation-form-adapter.d.ts.map +0 -1
  50. package/dist/conversation-history.d.ts.map +0 -1
  51. package/dist/conversation-platform.d.ts.map +0 -1
  52. package/dist/conversation-provider.d.ts.map +0 -1
  53. package/dist/index-9688347a-02584d39.js.map +0 -1
  54. package/dist/index-b8cb68ab.js +0 -5670
  55. package/dist/index-b8cb68ab.js.map +0 -1
  56. package/dist/index.d.ts.map +0 -1
  57. package/dist/index.js.map +0 -1
  58. package/dist/resolve-entity-value.d.ts +0 -11
  59. package/dist/resolve-entity-value.d.ts.map +0 -1
  60. package/dist/store.d.ts.map +0 -1
  61. package/dist/types.d.ts.map +0 -1
  62. package/dist/user.d.ts.map +0 -1
  63. package/dist/utils/custom-message.d.ts.map +0 -1
  64. package/dist/utils/index.d.ts.map +0 -1
  65. package/dist/utils/map-actions.d.ts +0 -2
  66. package/dist/utils/map-actions.d.ts.map +0 -1
  67. package/dist/utils/open-chat-widget.d.ts.map +0 -1
  68. package/dist/utils/swap-provider.d.ts.map +0 -1
@@ -1,2281 +0,0 @@
1
- var ns = Object.defineProperty, os = Object.defineProperties;
2
- var rs = Object.getOwnPropertyDescriptors;
3
- var Ft = Object.getOwnPropertySymbols;
4
- var ls = Object.prototype.hasOwnProperty, as = Object.prototype.propertyIsEnumerable;
5
- var Wt = (e, t, s) => t in e ? ns(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, m = (e, t) => {
6
- for (var s in t || (t = {}))
7
- ls.call(t, s) && Wt(e, s, t[s]);
8
- if (Ft)
9
- for (var s of Ft(t))
10
- as.call(t, s) && Wt(e, s, t[s]);
11
- return e;
12
- }, vt = (e, t) => os(e, rs(t));
13
- var b = (e, t, s) => new Promise((i, n) => {
14
- var o = (a) => {
15
- try {
16
- l(s.next(a));
17
- } catch (c) {
18
- n(c);
19
- }
20
- }, r = (a) => {
21
- try {
22
- l(s.throw(a));
23
- } catch (c) {
24
- n(c);
25
- }
26
- }, l = (a) => a.done ? i(a.value) : Promise.resolve(a.value).then(o, r);
27
- l((s = s.apply(e, t)).next());
28
- });
29
- import { C as gt, D as cs } from "./index-b8cb68ab.js";
30
- /**
31
- * @license
32
- * Copyright 2019 Google LLC
33
- * SPDX-License-Identifier: BSD-3-Clause
34
- */
35
- const X = window, Rt = X.ShadowRoot && (X.ShadyCSS === void 0 || X.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ut = Symbol(), Gt = /* @__PURE__ */ new WeakMap();
36
- let we = class {
37
- constructor(t, s, i) {
38
- if (this._$cssResult$ = !0, i !== Ut)
39
- throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
40
- this.cssText = t, this.t = s;
41
- }
42
- get styleSheet() {
43
- let t = this.o;
44
- const s = this.t;
45
- if (Rt && t === void 0) {
46
- const i = s !== void 0 && s.length === 1;
47
- i && (t = Gt.get(s)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Gt.set(s, t));
48
- }
49
- return t;
50
- }
51
- toString() {
52
- return this.cssText;
53
- }
54
- };
55
- const ds = (e) => new we(typeof e == "string" ? e : e + "", void 0, Ut), I = (e, ...t) => {
56
- const s = e.length === 1 ? e[0] : t.reduce((i, n, o) => i + ((r) => {
57
- if (r._$cssResult$ === !0)
58
- return r.cssText;
59
- if (typeof r == "number")
60
- return r;
61
- throw Error("Value passed to 'css' function must be a 'css' function result: " + r + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
62
- })(n) + e[o + 1], e[0]);
63
- return new we(s, e, Ut);
64
- }, hs = (e, t) => {
65
- Rt ? e.adoptedStyleSheets = t.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet) : t.forEach((s) => {
66
- const i = document.createElement("style"), n = X.litNonce;
67
- n !== void 0 && i.setAttribute("nonce", n), i.textContent = s.cssText, e.appendChild(i);
68
- });
69
- }, Zt = Rt ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
70
- let s = "";
71
- for (const i of t.cssRules)
72
- s += i.cssText;
73
- return ds(s);
74
- })(e) : e;
75
- /**
76
- * @license
77
- * Copyright 2017 Google LLC
78
- * SPDX-License-Identifier: BSD-3-Clause
79
- */
80
- var mt;
81
- const J = window, Kt = J.trustedTypes, us = Kt ? Kt.emptyScript : "", qt = J.reactiveElementPolyfillSupport, kt = { toAttribute(e, t) {
82
- switch (t) {
83
- case Boolean:
84
- e = e ? us : null;
85
- break;
86
- case Object:
87
- case Array:
88
- e = e == null ? e : JSON.stringify(e);
89
- }
90
- return e;
91
- }, fromAttribute(e, t) {
92
- let s = e;
93
- switch (t) {
94
- case Boolean:
95
- s = e !== null;
96
- break;
97
- case Number:
98
- s = e === null ? null : Number(e);
99
- break;
100
- case Object:
101
- case Array:
102
- try {
103
- s = JSON.parse(e);
104
- } catch (i) {
105
- s = null;
106
- }
107
- }
108
- return s;
109
- } }, xe = (e, t) => t !== e && (t == t || e == e), yt = { attribute: !0, type: String, converter: kt, reflect: !1, hasChanged: xe }, Tt = "finalized";
110
- let P = class extends HTMLElement {
111
- constructor() {
112
- super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
113
- }
114
- static addInitializer(t) {
115
- var s;
116
- this.finalize(), ((s = this.h) !== null && s !== void 0 ? s : this.h = []).push(t);
117
- }
118
- static get observedAttributes() {
119
- this.finalize();
120
- const t = [];
121
- return this.elementProperties.forEach((s, i) => {
122
- const n = this._$Ep(i, s);
123
- n !== void 0 && (this._$Ev.set(n, i), t.push(n));
124
- }), t;
125
- }
126
- static createProperty(t, s = yt) {
127
- if (s.state && (s.attribute = !1), this.finalize(), this.elementProperties.set(t, s), !s.noAccessor && !this.prototype.hasOwnProperty(t)) {
128
- const i = typeof t == "symbol" ? Symbol() : "__" + t, n = this.getPropertyDescriptor(t, i, s);
129
- n !== void 0 && Object.defineProperty(this.prototype, t, n);
130
- }
131
- }
132
- static getPropertyDescriptor(t, s, i) {
133
- return { get() {
134
- return this[s];
135
- }, set(n) {
136
- const o = this[t];
137
- this[s] = n, this.requestUpdate(t, o, i);
138
- }, configurable: !0, enumerable: !0 };
139
- }
140
- static getPropertyOptions(t) {
141
- return this.elementProperties.get(t) || yt;
142
- }
143
- static finalize() {
144
- if (this.hasOwnProperty(Tt))
145
- return !1;
146
- this[Tt] = !0;
147
- const t = Object.getPrototypeOf(this);
148
- if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
149
- const s = this.properties, i = [...Object.getOwnPropertyNames(s), ...Object.getOwnPropertySymbols(s)];
150
- for (const n of i)
151
- this.createProperty(n, s[n]);
152
- }
153
- return this.elementStyles = this.finalizeStyles(this.styles), !0;
154
- }
155
- static finalizeStyles(t) {
156
- const s = [];
157
- if (Array.isArray(t)) {
158
- const i = new Set(t.flat(1 / 0).reverse());
159
- for (const n of i)
160
- s.unshift(Zt(n));
161
- } else
162
- t !== void 0 && s.push(Zt(t));
163
- return s;
164
- }
165
- static _$Ep(t, s) {
166
- const i = s.attribute;
167
- return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
168
- }
169
- _$Eu() {
170
- var t;
171
- this._$E_ = new Promise((s) => this.enableUpdating = s), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((s) => s(this));
172
- }
173
- addController(t) {
174
- var s, i;
175
- ((s = this._$ES) !== null && s !== void 0 ? s : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((i = t.hostConnected) === null || i === void 0 || i.call(t));
176
- }
177
- removeController(t) {
178
- var s;
179
- (s = this._$ES) === null || s === void 0 || s.splice(this._$ES.indexOf(t) >>> 0, 1);
180
- }
181
- _$Eg() {
182
- this.constructor.elementProperties.forEach((t, s) => {
183
- this.hasOwnProperty(s) && (this._$Ei.set(s, this[s]), delete this[s]);
184
- });
185
- }
186
- createRenderRoot() {
187
- var t;
188
- const s = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
189
- return hs(s, this.constructor.elementStyles), s;
190
- }
191
- connectedCallback() {
192
- var t;
193
- this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((s) => {
194
- var i;
195
- return (i = s.hostConnected) === null || i === void 0 ? void 0 : i.call(s);
196
- });
197
- }
198
- enableUpdating(t) {
199
- }
200
- disconnectedCallback() {
201
- var t;
202
- (t = this._$ES) === null || t === void 0 || t.forEach((s) => {
203
- var i;
204
- return (i = s.hostDisconnected) === null || i === void 0 ? void 0 : i.call(s);
205
- });
206
- }
207
- attributeChangedCallback(t, s, i) {
208
- this._$AK(t, i);
209
- }
210
- _$EO(t, s, i = yt) {
211
- var n;
212
- const o = this.constructor._$Ep(t, i);
213
- if (o !== void 0 && i.reflect === !0) {
214
- const r = (((n = i.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? i.converter : kt).toAttribute(s, i.type);
215
- this._$El = t, r == null ? this.removeAttribute(o) : this.setAttribute(o, r), this._$El = null;
216
- }
217
- }
218
- _$AK(t, s) {
219
- var i;
220
- const n = this.constructor, o = n._$Ev.get(t);
221
- if (o !== void 0 && this._$El !== o) {
222
- const r = n.getPropertyOptions(o), l = typeof r.converter == "function" ? { fromAttribute: r.converter } : ((i = r.converter) === null || i === void 0 ? void 0 : i.fromAttribute) !== void 0 ? r.converter : kt;
223
- this._$El = o, this[o] = l.fromAttribute(s, r.type), this._$El = null;
224
- }
225
- }
226
- requestUpdate(t, s, i) {
227
- let n = !0;
228
- t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || xe)(this[t], s) ? (this._$AL.has(t) || this._$AL.set(t, s), i.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, i))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
229
- }
230
- _$Ej() {
231
- return b(this, null, function* () {
232
- this.isUpdatePending = !0;
233
- try {
234
- yield this._$E_;
235
- } catch (s) {
236
- Promise.reject(s);
237
- }
238
- const t = this.scheduleUpdate();
239
- return t != null && (yield t), !this.isUpdatePending;
240
- });
241
- }
242
- scheduleUpdate() {
243
- return this.performUpdate();
244
- }
245
- performUpdate() {
246
- var t;
247
- if (!this.isUpdatePending)
248
- return;
249
- this.hasUpdated, this._$Ei && (this._$Ei.forEach((n, o) => this[o] = n), this._$Ei = void 0);
250
- let s = !1;
251
- const i = this._$AL;
252
- try {
253
- s = this.shouldUpdate(i), s ? (this.willUpdate(i), (t = this._$ES) === null || t === void 0 || t.forEach((n) => {
254
- var o;
255
- return (o = n.hostUpdate) === null || o === void 0 ? void 0 : o.call(n);
256
- }), this.update(i)) : this._$Ek();
257
- } catch (n) {
258
- throw s = !1, this._$Ek(), n;
259
- }
260
- s && this._$AE(i);
261
- }
262
- willUpdate(t) {
263
- }
264
- _$AE(t) {
265
- var s;
266
- (s = this._$ES) === null || s === void 0 || s.forEach((i) => {
267
- var n;
268
- return (n = i.hostUpdated) === null || n === void 0 ? void 0 : n.call(i);
269
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
270
- }
271
- _$Ek() {
272
- this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
273
- }
274
- get updateComplete() {
275
- return this.getUpdateComplete();
276
- }
277
- getUpdateComplete() {
278
- return this._$E_;
279
- }
280
- shouldUpdate(t) {
281
- return !0;
282
- }
283
- update(t) {
284
- this._$EC !== void 0 && (this._$EC.forEach((s, i) => this._$EO(i, this[i], s)), this._$EC = void 0), this._$Ek();
285
- }
286
- updated(t) {
287
- }
288
- firstUpdated(t) {
289
- }
290
- };
291
- P[Tt] = !0, P.elementProperties = /* @__PURE__ */ new Map(), P.elementStyles = [], P.shadowRootOptions = { mode: "open" }, qt == null || qt({ ReactiveElement: P }), ((mt = J.reactiveElementVersions) !== null && mt !== void 0 ? mt : J.reactiveElementVersions = []).push("1.6.3");
292
- /**
293
- * @license
294
- * Copyright 2017 Google LLC
295
- * SPDX-License-Identifier: BSD-3-Clause
296
- */
297
- var bt;
298
- const V = window, U = V.trustedTypes, Qt = U ? U.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Ot = "$lit$", w = `lit$${(Math.random() + "").slice(9)}$`, Ee = "?" + w, ps = `<${Ee}>`, T = document, W = () => T.createComment(""), G = (e) => e === null || typeof e != "object" && typeof e != "function", Ce = Array.isArray, $s = (e) => Ce(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", _t = `[
299
- \f\r]`, B = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Yt = /-->/g, Xt = />/g, C = RegExp(`>|${_t}(?:([^\\s"'>=/]+)(${_t}*=${_t}*(?:[^
300
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Jt = /'/g, Vt = /"/g, ke = /^(?:script|style|textarea|title)$/i, fs = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), f = fs(1), x = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), te = /* @__PURE__ */ new WeakMap(), k = T.createTreeWalker(T, 129, null, !1);
301
- function Te(e, t) {
302
- if (!Array.isArray(e) || !e.hasOwnProperty("raw"))
303
- throw Error("invalid template strings array");
304
- return Qt !== void 0 ? Qt.createHTML(t) : t;
305
- }
306
- const vs = (e, t) => {
307
- const s = e.length - 1, i = [];
308
- let n, o = t === 2 ? "<svg>" : "", r = B;
309
- for (let l = 0; l < s; l++) {
310
- const a = e[l];
311
- let c, d, h = -1, u = 0;
312
- for (; u < a.length && (r.lastIndex = u, d = r.exec(a), d !== null); )
313
- u = r.lastIndex, r === B ? d[1] === "!--" ? r = Yt : d[1] !== void 0 ? r = Xt : d[2] !== void 0 ? (ke.test(d[2]) && (n = RegExp("</" + d[2], "g")), r = C) : d[3] !== void 0 && (r = C) : r === C ? d[0] === ">" ? (r = n != null ? n : B, h = -1) : d[1] === void 0 ? h = -2 : (h = r.lastIndex - d[2].length, c = d[1], r = d[3] === void 0 ? C : d[3] === '"' ? Vt : Jt) : r === Vt || r === Jt ? r = C : r === Yt || r === Xt ? r = B : (r = C, n = void 0);
314
- const $ = r === C && e[l + 1].startsWith("/>") ? " " : "";
315
- o += r === B ? a + ps : h >= 0 ? (i.push(c), a.slice(0, h) + Ot + a.slice(h) + w + $) : a + w + (h === -2 ? (i.push(void 0), l) : $);
316
- }
317
- return [Te(e, o + (e[s] || "<?>") + (t === 2 ? "</svg>" : "")), i];
318
- };
319
- let Pt = class Oe {
320
- constructor({ strings: t, _$litType$: s }, i) {
321
- let n;
322
- this.parts = [];
323
- let o = 0, r = 0;
324
- const l = t.length - 1, a = this.parts, [c, d] = vs(t, s);
325
- if (this.el = Oe.createElement(c, i), k.currentNode = this.el.content, s === 2) {
326
- const h = this.el.content, u = h.firstChild;
327
- u.remove(), h.append(...u.childNodes);
328
- }
329
- for (; (n = k.nextNode()) !== null && a.length < l; ) {
330
- if (n.nodeType === 1) {
331
- if (n.hasAttributes()) {
332
- const h = [];
333
- for (const u of n.getAttributeNames())
334
- if (u.endsWith(Ot) || u.startsWith(w)) {
335
- const $ = d[r++];
336
- if (h.push(u), $ !== void 0) {
337
- const E = n.getAttribute($.toLowerCase() + Ot).split(w), S = /([.?@])?(.*)/.exec($);
338
- a.push({ type: 1, index: o, name: S[2], strings: E, ctor: S[1] === "." ? ms : S[1] === "?" ? bs : S[1] === "@" ? _s : dt });
339
- } else
340
- a.push({ type: 6, index: o });
341
- }
342
- for (const u of h)
343
- n.removeAttribute(u);
344
- }
345
- if (ke.test(n.tagName)) {
346
- const h = n.textContent.split(w), u = h.length - 1;
347
- if (u > 0) {
348
- n.textContent = U ? U.emptyScript : "";
349
- for (let $ = 0; $ < u; $++)
350
- n.append(h[$], W()), k.nextNode(), a.push({ type: 2, index: ++o });
351
- n.append(h[u], W());
352
- }
353
- }
354
- } else if (n.nodeType === 8)
355
- if (n.data === Ee)
356
- a.push({ type: 2, index: o });
357
- else {
358
- let h = -1;
359
- for (; (h = n.data.indexOf(w, h + 1)) !== -1; )
360
- a.push({ type: 7, index: o }), h += w.length - 1;
361
- }
362
- o++;
363
- }
364
- }
365
- static createElement(t, s) {
366
- const i = T.createElement("template");
367
- return i.innerHTML = t, i;
368
- }
369
- };
370
- function j(e, t, s = e, i) {
371
- var n, o, r, l;
372
- if (t === x)
373
- return t;
374
- let a = i !== void 0 ? (n = s._$Co) === null || n === void 0 ? void 0 : n[i] : s._$Cl;
375
- const c = G(t) ? void 0 : t._$litDirective$;
376
- return (a == null ? void 0 : a.constructor) !== c && ((o = a == null ? void 0 : a._$AO) === null || o === void 0 || o.call(a, !1), c === void 0 ? a = void 0 : (a = new c(e), a._$AT(e, s, i)), i !== void 0 ? ((r = (l = s)._$Co) !== null && r !== void 0 ? r : l._$Co = [])[i] = a : s._$Cl = a), a !== void 0 && (t = j(e, a._$AS(e, t.values), a, i)), t;
377
- }
378
- class gs {
379
- constructor(t, s) {
380
- this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = s;
381
- }
382
- get parentNode() {
383
- return this._$AM.parentNode;
384
- }
385
- get _$AU() {
386
- return this._$AM._$AU;
387
- }
388
- u(t) {
389
- var s;
390
- const { el: { content: i }, parts: n } = this._$AD, o = ((s = t == null ? void 0 : t.creationScope) !== null && s !== void 0 ? s : T).importNode(i, !0);
391
- k.currentNode = o;
392
- let r = k.nextNode(), l = 0, a = 0, c = n[0];
393
- for (; c !== void 0; ) {
394
- if (l === c.index) {
395
- let d;
396
- c.type === 2 ? d = new q(r, r.nextSibling, this, t) : c.type === 1 ? d = new c.ctor(r, c.name, c.strings, this, t) : c.type === 6 && (d = new As(r, this, t)), this._$AV.push(d), c = n[++a];
397
- }
398
- l !== (c == null ? void 0 : c.index) && (r = k.nextNode(), l++);
399
- }
400
- return k.currentNode = T, o;
401
- }
402
- v(t) {
403
- let s = 0;
404
- for (const i of this._$AV)
405
- i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, s), s += i.strings.length - 2) : i._$AI(t[s])), s++;
406
- }
407
- }
408
- class q {
409
- constructor(t, s, i, n) {
410
- var o;
411
- this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = i, this.options = n, this._$Cp = (o = n == null ? void 0 : n.isConnected) === null || o === void 0 || o;
412
- }
413
- get _$AU() {
414
- var t, s;
415
- return (s = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && s !== void 0 ? s : this._$Cp;
416
- }
417
- get parentNode() {
418
- let t = this._$AA.parentNode;
419
- const s = this._$AM;
420
- return s !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = s.parentNode), t;
421
- }
422
- get startNode() {
423
- return this._$AA;
424
- }
425
- get endNode() {
426
- return this._$AB;
427
- }
428
- _$AI(t, s = this) {
429
- t = j(this, t, s), G(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : $s(t) ? this.T(t) : this._(t);
430
- }
431
- k(t) {
432
- return this._$AA.parentNode.insertBefore(t, this._$AB);
433
- }
434
- $(t) {
435
- this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
436
- }
437
- _(t) {
438
- this._$AH !== p && G(this._$AH) ? this._$AA.nextSibling.data = t : this.$(T.createTextNode(t)), this._$AH = t;
439
- }
440
- g(t) {
441
- var s;
442
- const { values: i, _$litType$: n } = t, o = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = Pt.createElement(Te(n.h, n.h[0]), this.options)), n);
443
- if (((s = this._$AH) === null || s === void 0 ? void 0 : s._$AD) === o)
444
- this._$AH.v(i);
445
- else {
446
- const r = new gs(o, this), l = r.u(this.options);
447
- r.v(i), this.$(l), this._$AH = r;
448
- }
449
- }
450
- _$AC(t) {
451
- let s = te.get(t.strings);
452
- return s === void 0 && te.set(t.strings, s = new Pt(t)), s;
453
- }
454
- T(t) {
455
- Ce(this._$AH) || (this._$AH = [], this._$AR());
456
- const s = this._$AH;
457
- let i, n = 0;
458
- for (const o of t)
459
- n === s.length ? s.push(i = new q(this.k(W()), this.k(W()), this, this.options)) : i = s[n], i._$AI(o), n++;
460
- n < s.length && (this._$AR(i && i._$AB.nextSibling, n), s.length = n);
461
- }
462
- _$AR(t = this._$AA.nextSibling, s) {
463
- var i;
464
- for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, s); t && t !== this._$AB; ) {
465
- const n = t.nextSibling;
466
- t.remove(), t = n;
467
- }
468
- }
469
- setConnected(t) {
470
- var s;
471
- this._$AM === void 0 && (this._$Cp = t, (s = this._$AP) === null || s === void 0 || s.call(this, t));
472
- }
473
- }
474
- class dt {
475
- constructor(t, s, i, n, o) {
476
- this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = s, this._$AM = n, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = p;
477
- }
478
- get tagName() {
479
- return this.element.tagName;
480
- }
481
- get _$AU() {
482
- return this._$AM._$AU;
483
- }
484
- _$AI(t, s = this, i, n) {
485
- const o = this.strings;
486
- let r = !1;
487
- if (o === void 0)
488
- t = j(this, t, s, 0), r = !G(t) || t !== this._$AH && t !== x, r && (this._$AH = t);
489
- else {
490
- const l = t;
491
- let a, c;
492
- for (t = o[0], a = 0; a < o.length - 1; a++)
493
- c = j(this, l[i + a], s, a), c === x && (c = this._$AH[a]), r || (r = !G(c) || c !== this._$AH[a]), c === p ? t = p : t !== p && (t += (c != null ? c : "") + o[a + 1]), this._$AH[a] = c;
494
- }
495
- r && !n && this.j(t);
496
- }
497
- j(t) {
498
- t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t != null ? t : "");
499
- }
500
- }
501
- let ms = class extends dt {
502
- constructor() {
503
- super(...arguments), this.type = 3;
504
- }
505
- j(t) {
506
- this.element[this.name] = t === p ? void 0 : t;
507
- }
508
- };
509
- const ys = U ? U.emptyScript : "";
510
- class bs extends dt {
511
- constructor() {
512
- super(...arguments), this.type = 4;
513
- }
514
- j(t) {
515
- t && t !== p ? this.element.setAttribute(this.name, ys) : this.element.removeAttribute(this.name);
516
- }
517
- }
518
- class _s extends dt {
519
- constructor(t, s, i, n, o) {
520
- super(t, s, i, n, o), this.type = 5;
521
- }
522
- _$AI(t, s = this) {
523
- var i;
524
- if ((t = (i = j(this, t, s, 0)) !== null && i !== void 0 ? i : p) === x)
525
- return;
526
- const n = this._$AH, o = t === p && n !== p || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, r = t !== p && (n === p || o);
527
- o && this.element.removeEventListener(this.name, this, n), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
528
- }
529
- handleEvent(t) {
530
- var s, i;
531
- typeof this._$AH == "function" ? this._$AH.call((i = (s = this.options) === null || s === void 0 ? void 0 : s.host) !== null && i !== void 0 ? i : this.element, t) : this._$AH.handleEvent(t);
532
- }
533
- }
534
- class As {
535
- constructor(t, s, i) {
536
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = i;
537
- }
538
- get _$AU() {
539
- return this._$AM._$AU;
540
- }
541
- _$AI(t) {
542
- j(this, t);
543
- }
544
- }
545
- const ee = V.litHtmlPolyfillSupport;
546
- ee == null || ee(Pt, q), ((bt = V.litHtmlVersions) !== null && bt !== void 0 ? bt : V.litHtmlVersions = []).push("2.8.0");
547
- const Ss = (e, t, s) => {
548
- var i, n;
549
- const o = (i = s == null ? void 0 : s.renderBefore) !== null && i !== void 0 ? i : t;
550
- let r = o._$litPart$;
551
- if (r === void 0) {
552
- const l = (n = s == null ? void 0 : s.renderBefore) !== null && n !== void 0 ? n : null;
553
- o._$litPart$ = r = new q(t.insertBefore(W(), l), l, void 0, s != null ? s : {});
554
- }
555
- return r._$AI(e), r;
556
- };
557
- /**
558
- * @license
559
- * Copyright 2017 Google LLC
560
- * SPDX-License-Identifier: BSD-3-Clause
561
- */
562
- var At, St;
563
- let _ = class extends P {
564
- constructor() {
565
- super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
566
- }
567
- createRenderRoot() {
568
- var t, s;
569
- const i = super.createRenderRoot();
570
- return (t = (s = this.renderOptions).renderBefore) !== null && t !== void 0 || (s.renderBefore = i.firstChild), i;
571
- }
572
- update(t) {
573
- const s = this.render();
574
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ss(s, this.renderRoot, this.renderOptions);
575
- }
576
- connectedCallback() {
577
- var t;
578
- super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
579
- }
580
- disconnectedCallback() {
581
- var t;
582
- super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
583
- }
584
- render() {
585
- return x;
586
- }
587
- };
588
- _.finalized = !0, _._$litElement$ = !0, (At = globalThis.litElementHydrateSupport) === null || At === void 0 || At.call(globalThis, { LitElement: _ });
589
- const se = globalThis.litElementPolyfillSupport;
590
- se == null || se({ LitElement: _ });
591
- ((St = globalThis.litElementVersions) !== null && St !== void 0 ? St : globalThis.litElementVersions = []).push("3.3.3");
592
- /**
593
- * @license
594
- * Copyright 2017 Google LLC
595
- * SPDX-License-Identifier: BSD-3-Clause
596
- */
597
- const D = (e) => (t) => typeof t == "function" ? ((s, i) => (customElements.define(s, i), i))(e, t) : ((s, i) => {
598
- const { kind: n, elements: o } = i;
599
- return { kind: n, elements: o, finisher(r) {
600
- customElements.define(s, r);
601
- } };
602
- })(e, t);
603
- /**
604
- * @license
605
- * Copyright 2017 Google LLC
606
- * SPDX-License-Identifier: BSD-3-Clause
607
- */
608
- const ws = (e, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? vt(m({}, t), { finisher(s) {
609
- s.createProperty(t.key, e);
610
- } }) : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
611
- typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
612
- }, finisher(s) {
613
- s.createProperty(t.key, e);
614
- } }, xs = (e, t, s) => {
615
- t.constructor.createProperty(s, e);
616
- };
617
- function z(e) {
618
- return (t, s) => s !== void 0 ? xs(e, t, s) : ws(e, t);
619
- }
620
- /**
621
- * @license
622
- * Copyright 2017 Google LLC
623
- * SPDX-License-Identifier: BSD-3-Clause
624
- */
625
- function Es(e) {
626
- return z(vt(m({}, e), { state: !0 }));
627
- }
628
- /**
629
- * @license
630
- * Copyright 2021 Google LLC
631
- * SPDX-License-Identifier: BSD-3-Clause
632
- */
633
- var wt;
634
- ((wt = window.HTMLSlotElement) === null || wt === void 0 ? void 0 : wt.prototype.assignedElements) != null;
635
- /**
636
- * @license
637
- * Copyright 2020 Google LLC
638
- * SPDX-License-Identifier: BSD-3-Clause
639
- */
640
- const Cs = (e) => e.strings === void 0;
641
- /**
642
- * @license
643
- * Copyright 2017 Google LLC
644
- * SPDX-License-Identifier: BSD-3-Clause
645
- */
646
- const ht = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, ut = (e) => (...t) => ({ _$litDirective$: e, values: t });
647
- let jt = class {
648
- constructor(t) {
649
- }
650
- get _$AU() {
651
- return this._$AM._$AU;
652
- }
653
- _$AT(t, s, i) {
654
- this._$Ct = t, this._$AM = s, this._$Ci = i;
655
- }
656
- _$AS(t, s) {
657
- return this.update(t, s);
658
- }
659
- update(t, s) {
660
- return this.render(...s);
661
- }
662
- };
663
- /**
664
- * @license
665
- * Copyright 2017 Google LLC
666
- * SPDX-License-Identifier: BSD-3-Clause
667
- */
668
- const F = (e, t) => {
669
- var s, i;
670
- const n = e._$AN;
671
- if (n === void 0)
672
- return !1;
673
- for (const o of n)
674
- (i = (s = o)._$AO) === null || i === void 0 || i.call(s, t, !1), F(o, t);
675
- return !0;
676
- }, tt = (e) => {
677
- let t, s;
678
- do {
679
- if ((t = e._$AM) === void 0)
680
- break;
681
- s = t._$AN, s.delete(e), e = t;
682
- } while ((s == null ? void 0 : s.size) === 0);
683
- }, Pe = (e) => {
684
- for (let t; t = e._$AM; e = t) {
685
- let s = t._$AN;
686
- if (s === void 0)
687
- t._$AN = s = /* @__PURE__ */ new Set();
688
- else if (s.has(e))
689
- break;
690
- s.add(e), Os(t);
691
- }
692
- };
693
- function ks(e) {
694
- this._$AN !== void 0 ? (tt(this), this._$AM = e, Pe(this)) : this._$AM = e;
695
- }
696
- function Ts(e, t = !1, s = 0) {
697
- const i = this._$AH, n = this._$AN;
698
- if (n !== void 0 && n.size !== 0)
699
- if (t)
700
- if (Array.isArray(i))
701
- for (let o = s; o < i.length; o++)
702
- F(i[o], !1), tt(i[o]);
703
- else
704
- i != null && (F(i, !1), tt(i));
705
- else
706
- F(this, e);
707
- }
708
- const Os = (e) => {
709
- var t, s, i, n;
710
- e.type == ht.CHILD && ((t = (i = e)._$AP) !== null && t !== void 0 || (i._$AP = Ts), (s = (n = e)._$AQ) !== null && s !== void 0 || (n._$AQ = ks));
711
- };
712
- class He extends jt {
713
- constructor() {
714
- super(...arguments), this._$AN = void 0;
715
- }
716
- _$AT(t, s, i) {
717
- super._$AT(t, s, i), Pe(this), this.isConnected = t._$AU;
718
- }
719
- _$AO(t, s = !0) {
720
- var i, n;
721
- t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) === null || i === void 0 || i.call(this) : (n = this.disconnected) === null || n === void 0 || n.call(this)), s && (F(this, t), tt(this));
722
- }
723
- setValue(t) {
724
- if (Cs(this._$Ct))
725
- this._$Ct._$AI(t, this);
726
- else {
727
- const s = [...this._$Ct._$AH];
728
- s[this._$Ci] = t, this._$Ct._$AI(s, this, 0);
729
- }
730
- }
731
- disconnected() {
732
- }
733
- reconnected() {
734
- }
735
- }
736
- /**
737
- * @license
738
- * Copyright 2020 Google LLC
739
- * SPDX-License-Identifier: BSD-3-Clause
740
- */
741
- const Ps = () => new Hs();
742
- let Hs = class {
743
- };
744
- const xt = /* @__PURE__ */ new WeakMap(), Ls = ut(class extends He {
745
- render(e) {
746
- return p;
747
- }
748
- update(e, [t]) {
749
- var s;
750
- const i = t !== this.G;
751
- return i && this.G !== void 0 && this.ot(void 0), (i || this.rt !== this.lt) && (this.G = t, this.dt = (s = e.options) === null || s === void 0 ? void 0 : s.host, this.ot(this.lt = e.element)), p;
752
- }
753
- ot(e) {
754
- var t;
755
- if (typeof this.G == "function") {
756
- const s = (t = this.dt) !== null && t !== void 0 ? t : globalThis;
757
- let i = xt.get(s);
758
- i === void 0 && (i = /* @__PURE__ */ new WeakMap(), xt.set(s, i)), i.get(this.G) !== void 0 && this.G.call(this.dt, void 0), i.set(this.G, e), e !== void 0 && this.G.call(this.dt, e);
759
- } else
760
- this.G.value = e;
761
- }
762
- get rt() {
763
- var e, t, s;
764
- return typeof this.G == "function" ? (t = xt.get((e = this.dt) !== null && e !== void 0 ? e : globalThis)) === null || t === void 0 ? void 0 : t.get(this.G) : (s = this.G) === null || s === void 0 ? void 0 : s.value;
765
- }
766
- disconnected() {
767
- this.rt === this.lt && this.ot(void 0);
768
- }
769
- reconnected() {
770
- this.ot(this.lt);
771
- }
772
- }), Ns = /* @__PURE__ */ new WeakMap();
773
- let ie = 0;
774
- const Et = /* @__PURE__ */ new Map(), ne = /* @__PURE__ */ new WeakSet(), oe = () => new Promise((e) => requestAnimationFrame(e)), re = [{ opacity: 0 }], le = [{ opacity: 0 }, { opacity: 1 }], ae = (e, t) => {
775
- const s = e - t;
776
- return s === 0 ? void 0 : s;
777
- }, ce = (e, t) => {
778
- const s = e / t;
779
- return s === 1 ? void 0 : s;
780
- }, Ct = { left: (e, t) => {
781
- const s = ae(e, t);
782
- return { value: s, transform: s == null || isNaN(s) ? void 0 : `translateX(${s}px)` };
783
- }, top: (e, t) => {
784
- const s = ae(e, t);
785
- return { value: s, transform: s == null || isNaN(s) ? void 0 : `translateY(${s}px)` };
786
- }, width: (e, t) => {
787
- let s;
788
- t === 0 && (t = 1, s = { width: "1px" });
789
- const i = ce(e, t);
790
- return { value: i, overrideFrom: s, transform: i == null || isNaN(i) ? void 0 : `scaleX(${i})` };
791
- }, height: (e, t) => {
792
- let s;
793
- t === 0 && (t = 1, s = { height: "1px" });
794
- const i = ce(e, t);
795
- return { value: i, overrideFrom: s, transform: i == null || isNaN(i) ? void 0 : `scaleY(${i})` };
796
- } }, Ms = { duration: 333, easing: "ease-in-out" }, Rs = ["left", "top", "width", "height", "opacity", "color", "background"], de = /* @__PURE__ */ new WeakMap();
797
- class Us extends He {
798
- constructor(t) {
799
- if (super(t), this.t = null, this.i = null, this.o = !0, this.shouldLog = !1, t.type === ht.CHILD)
800
- throw Error("The `animate` directive must be used in attribute position.");
801
- this.createFinished();
802
- }
803
- createFinished() {
804
- var t;
805
- (t = this.resolveFinished) === null || t === void 0 || t.call(this), this.finished = new Promise((s) => {
806
- this.h = s;
807
- });
808
- }
809
- resolveFinished() {
810
- return b(this, null, function* () {
811
- var t;
812
- (t = this.h) === null || t === void 0 || t.call(this), this.h = void 0;
813
- });
814
- }
815
- render(t) {
816
- return p;
817
- }
818
- getController() {
819
- return Ns.get(this.l);
820
- }
821
- isDisabled() {
822
- var t;
823
- return this.options.disabled || ((t = this.getController()) === null || t === void 0 ? void 0 : t.disabled);
824
- }
825
- update(t, [s]) {
826
- var i;
827
- const n = this.l === void 0;
828
- return n && (this.l = (i = t.options) === null || i === void 0 ? void 0 : i.host, this.l.addController(this), this.element = t.element, de.set(this.element, this)), this.optionsOrCallback = s, (n || typeof s != "function") && this.u(s), this.render(s);
829
- }
830
- u(t) {
831
- var s, i;
832
- t = t != null ? t : {};
833
- const n = this.getController();
834
- n !== void 0 && ((t = m(m({}, n.defaultOptions), t)).keyframeOptions = m(m({}, n.defaultOptions.keyframeOptions), t.keyframeOptions)), (s = (i = t).properties) !== null && s !== void 0 || (i.properties = Rs), this.options = t;
835
- }
836
- v() {
837
- const t = {}, s = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
838
- return this.options.properties.forEach((n) => {
839
- var o;
840
- const r = (o = s[n]) !== null && o !== void 0 ? o : Ct[n] ? void 0 : i[n], l = Number(r);
841
- t[n] = isNaN(l) ? r + "" : l;
842
- }), t;
843
- }
844
- p() {
845
- let t, s = !0;
846
- return this.options.guard && (t = this.options.guard(), s = ((i, n) => {
847
- if (Array.isArray(i)) {
848
- if (Array.isArray(n) && n.length === i.length && i.every((o, r) => o === n[r]))
849
- return !1;
850
- } else if (n === i)
851
- return !1;
852
- return !0;
853
- })(t, this.m)), this.o = this.l.hasUpdated && !this.isDisabled() && !this.isAnimating() && s && this.element.isConnected, this.o && (this.m = Array.isArray(t) ? Array.from(t) : t), this.o;
854
- }
855
- hostUpdate() {
856
- var t;
857
- typeof this.optionsOrCallback == "function" && this.u(this.optionsOrCallback()), this.p() && (this.g = this.v(), this.t = (t = this.t) !== null && t !== void 0 ? t : this.element.parentNode, this.i = this.element.nextSibling);
858
- }
859
- hostUpdated() {
860
- return b(this, null, function* () {
861
- if (!this.o || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered)
862
- return;
863
- let t;
864
- this.prepare(), yield oe;
865
- const s = this._(), i = this.A(this.options.keyframeOptions, s), n = this.v();
866
- if (this.g !== void 0) {
867
- const { from: o, to: r } = this.O(this.g, n, s);
868
- this.log("measured", [this.g, n, o, r]), t = this.calculateKeyframes(o, r);
869
- } else {
870
- const o = Et.get(this.options.inId);
871
- if (o) {
872
- Et.delete(this.options.inId);
873
- const { from: r, to: l } = this.O(o, n, s);
874
- t = this.calculateKeyframes(r, l), t = this.options.in ? [m(m({}, this.options.in[0]), t[0]), ...this.options.in.slice(1), t[1]] : t, ie++, t.forEach((a) => a.zIndex = ie);
875
- } else
876
- this.options.in && (t = [...this.options.in, {}]);
877
- }
878
- this.animate(t, i);
879
- });
880
- }
881
- resetStyles() {
882
- var t;
883
- this.j !== void 0 && (this.element.setAttribute("style", (t = this.j) !== null && t !== void 0 ? t : ""), this.j = void 0);
884
- }
885
- commitStyles() {
886
- var t, s;
887
- this.j = this.element.getAttribute("style"), (t = this.webAnimation) === null || t === void 0 || t.commitStyles(), (s = this.webAnimation) === null || s === void 0 || s.cancel();
888
- }
889
- reconnected() {
890
- }
891
- disconnected() {
892
- return b(this, null, function* () {
893
- var t;
894
- if (!this.o || (this.options.id !== void 0 && Et.set(this.options.id, this.g), this.options.out === void 0))
895
- return;
896
- if (this.prepare(), yield oe(), (t = this.t) === null || t === void 0 ? void 0 : t.isConnected) {
897
- const i = this.i && this.i.parentNode === this.t ? this.i : null;
898
- if (this.t.insertBefore(this.element, i), this.options.stabilizeOut) {
899
- const n = this.v();
900
- this.log("stabilizing out");
901
- const o = this.g.left - n.left, r = this.g.top - n.top;
902
- getComputedStyle(this.element).position !== "static" || o === 0 && r === 0 || (this.element.style.position = "relative"), o !== 0 && (this.element.style.left = o + "px"), r !== 0 && (this.element.style.top = r + "px");
903
- }
904
- }
905
- const s = this.A(this.options.keyframeOptions);
906
- yield this.animate(this.options.out, s), this.element.remove();
907
- });
908
- }
909
- prepare() {
910
- this.createFinished();
911
- }
912
- start() {
913
- var t, s;
914
- (s = (t = this.options).onStart) === null || s === void 0 || s.call(t, this);
915
- }
916
- didFinish(t) {
917
- var s, i;
918
- t && ((i = (s = this.options).onComplete) === null || i === void 0 || i.call(s, this)), this.g = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
919
- }
920
- _() {
921
- const t = [];
922
- for (let s = this.element.parentNode; s; s = s == null ? void 0 : s.parentNode) {
923
- const i = de.get(s);
924
- i && !i.isDisabled() && i && t.push(i);
925
- }
926
- return t;
927
- }
928
- get isHostRendered() {
929
- const t = ne.has(this.l);
930
- return t || this.l.updateComplete.then(() => {
931
- ne.add(this.l);
932
- }), t;
933
- }
934
- A(t, s = this._()) {
935
- const i = m({}, Ms);
936
- return s.forEach((n) => Object.assign(i, n.options.keyframeOptions)), Object.assign(i, t), i;
937
- }
938
- O(t, s, i) {
939
- t = m({}, t), s = m({}, s);
940
- const n = i.map((l) => l.animatingProperties).filter((l) => l !== void 0);
941
- let o = 1, r = 1;
942
- return n !== void 0 && (n.forEach((l) => {
943
- l.width && (o /= l.width), l.height && (r /= l.height);
944
- }), t.left !== void 0 && s.left !== void 0 && (t.left = o * t.left, s.left = o * s.left), t.top !== void 0 && s.top !== void 0 && (t.top = r * t.top, s.top = r * s.top)), { from: t, to: s };
945
- }
946
- calculateKeyframes(t, s, i = !1) {
947
- var n;
948
- const o = {}, r = {};
949
- let l = !1;
950
- const a = {};
951
- for (const c in s) {
952
- const d = t[c], h = s[c];
953
- if (c in Ct) {
954
- const u = Ct[c];
955
- if (d === void 0 || h === void 0)
956
- continue;
957
- const $ = u(d, h);
958
- $.transform !== void 0 && (a[c] = $.value, l = !0, o.transform = `${(n = o.transform) !== null && n !== void 0 ? n : ""} ${$.transform}`, $.overrideFrom !== void 0 && Object.assign(o, $.overrideFrom));
959
- } else
960
- d !== h && d !== void 0 && h !== void 0 && (l = !0, o[c] = d, r[c] = h);
961
- }
962
- return o.transformOrigin = r.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, l ? [o, r] : void 0;
963
- }
964
- animate(i) {
965
- return b(this, arguments, function* (t, s = this.options.keyframeOptions) {
966
- this.start(), this.frames = t;
967
- let n = !1;
968
- if (!this.isAnimating() && !this.isDisabled() && (this.options.onFrames && (this.frames = t = this.options.onFrames(this), this.log("modified frames", t)), t !== void 0)) {
969
- this.log("animate", [t, s]), n = !0, this.webAnimation = this.element.animate(t, s);
970
- const o = this.getController();
971
- o == null || o.add(this);
972
- try {
973
- yield this.webAnimation.finished;
974
- } catch (r) {
975
- }
976
- o == null || o.remove(this);
977
- }
978
- return this.didFinish(n), n;
979
- });
980
- }
981
- isAnimating() {
982
- var t, s;
983
- return ((t = this.webAnimation) === null || t === void 0 ? void 0 : t.playState) === "running" || ((s = this.webAnimation) === null || s === void 0 ? void 0 : s.pending);
984
- }
985
- log(t, s) {
986
- this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, s);
987
- }
988
- }
989
- const he = ut(Us), js = { name: "grid-view", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 8H28C29.1046 8 30 8.89543 30 10V28C30 29.1046 29.1046 30 28 30H10C8.89543 30 8 29.1046 8 28V10C8 8.89543 8.89543 8 10 8ZM12 12V26H26V12H12Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10 34H28C29.1046 34 30 34.8954 30 36V54C30 55.1046 29.1046 56 28 56H10C8.89543 56 8 55.1046 8 54V36C8 34.8954 8.89543 34 10 34ZM12 38V52H26V38H12Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M54 8H36C34.8954 8 34 8.89543 34 10V28C34 29.1046 34.8954 30 36 30H54C55.1046 30 56 29.1046 56 28V10C56 8.89543 55.1046 8 54 8ZM38 26V12H52V26H38Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M36 34H54C55.1046 34 56 34.8954 56 36V54C56 55.1046 55.1046 56 54 56H36C34.8954 56 34 55.1046 34 54V36C34 34.8954 34.8954 34 36 34ZM38 38V52H52V38H38Z"/></svg>' }, Is = { name: "send", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.41642 6.29292C5.99705 5.18016 3.38612 7.41823 4.12858 9.96847L10.5427 32L4.12858 54.0315C3.38612 56.5818 5.99704 58.8198 8.41642 57.7071L58.1942 34.8125C60.6019 33.7051 60.6019 30.2949 58.1942 29.1875L8.41642 6.29292ZM14.2569 29.9351L8.74174 10.9913L49.9295 29.9351H14.2569ZM14.2568 34.0651L8.74174 53.0087L49.9291 34.0651H14.2568Z"/></svg>' };
990
- /**
991
- * @license
992
- * Copyright 2018 Google LLC
993
- * SPDX-License-Identifier: BSD-3-Clause
994
- */
995
- const Le = ut(class extends jt {
996
- constructor(e) {
997
- var t;
998
- if (super(e), e.type !== ht.ATTRIBUTE || e.name !== "class" || ((t = e.strings) === null || t === void 0 ? void 0 : t.length) > 2)
999
- throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
1000
- }
1001
- render(e) {
1002
- return " " + Object.keys(e).filter((t) => e[t]).join(" ") + " ";
1003
- }
1004
- update(e, [t]) {
1005
- var s, i;
1006
- if (this.it === void 0) {
1007
- this.it = /* @__PURE__ */ new Set(), e.strings !== void 0 && (this.nt = new Set(e.strings.join(" ").split(/\s/).filter((o) => o !== "")));
1008
- for (const o in t)
1009
- t[o] && !(!((s = this.nt) === null || s === void 0) && s.has(o)) && this.it.add(o);
1010
- return this.render(t);
1011
- }
1012
- const n = e.element.classList;
1013
- this.it.forEach((o) => {
1014
- o in t || (n.remove(o), this.it.delete(o));
1015
- });
1016
- for (const o in t) {
1017
- const r = !!t[o];
1018
- r === this.it.has(o) || !((i = this.nt) === null || i === void 0) && i.has(o) || (r ? (n.add(o), this.it.add(o)) : (n.remove(o), this.it.delete(o)));
1019
- }
1020
- return x;
1021
- }
1022
- }), H = {
1023
- allRenderFn: !1,
1024
- cmpDidLoad: !0,
1025
- cmpDidUnload: !1,
1026
- cmpDidUpdate: !0,
1027
- cmpDidRender: !0,
1028
- cmpWillLoad: !0,
1029
- cmpWillUpdate: !0,
1030
- cmpWillRender: !0,
1031
- connectedCallback: !0,
1032
- disconnectedCallback: !0,
1033
- element: !0,
1034
- event: !0,
1035
- hasRenderFn: !0,
1036
- lifecycle: !0,
1037
- hostListener: !0,
1038
- hostListenerTargetWindow: !0,
1039
- hostListenerTargetDocument: !0,
1040
- hostListenerTargetBody: !0,
1041
- hostListenerTargetParent: !1,
1042
- hostListenerTarget: !0,
1043
- member: !0,
1044
- method: !0,
1045
- mode: !0,
1046
- observeAttribute: !0,
1047
- prop: !0,
1048
- propMutable: !0,
1049
- reflect: !0,
1050
- scoped: !0,
1051
- shadowDom: !0,
1052
- slot: !0,
1053
- cssAnnotations: !0,
1054
- state: !0,
1055
- style: !0,
1056
- svg: !0,
1057
- updatable: !0,
1058
- vdomAttribute: !0,
1059
- vdomXlink: !0,
1060
- vdomClass: !0,
1061
- vdomFunctional: !0,
1062
- vdomKey: !0,
1063
- vdomListener: !0,
1064
- vdomRef: !0,
1065
- vdomPropOrAttr: !0,
1066
- vdomRender: !0,
1067
- vdomStyle: !0,
1068
- vdomText: !0,
1069
- watchCallback: !0,
1070
- taskQueue: !0,
1071
- hotModuleReplacement: !1,
1072
- isDebug: !1,
1073
- isDev: !1,
1074
- isTesting: !1,
1075
- hydrateServerSide: !1,
1076
- hydrateClientSide: !1,
1077
- lifecycleDOMEvents: !1,
1078
- lazyLoad: !1,
1079
- profile: !1,
1080
- slotRelocation: !0,
1081
- appendChildSlotFix: !1,
1082
- cloneNodeFix: !1,
1083
- hydratedAttribute: !1,
1084
- hydratedClass: !0,
1085
- safari10: !1,
1086
- scriptDataOpts: !1,
1087
- scopedSlotTextContentFix: !1,
1088
- shadowDomShim: !1,
1089
- slotChildNodesFix: !1,
1090
- invisiblePrehydration: !0,
1091
- propBoolean: !0,
1092
- propNumber: !0,
1093
- propString: !0,
1094
- cssVarShim: !1,
1095
- constructableCSS: !0,
1096
- cmpShouldUpdate: !0,
1097
- devTools: !1,
1098
- dynamicImportShim: !1,
1099
- shadowDelegatesFocus: !0,
1100
- initializeNextTick: !1,
1101
- asyncLoading: !1,
1102
- asyncQueue: !1,
1103
- transformTagName: !1,
1104
- attachStyles: !0
1105
- };
1106
- let L, Ne, pt, Me = !1, et = !1, It = !1, g = !1, ue = null, Ht = !1;
1107
- const $t = typeof window != "undefined" ? window : {}, A = $t.document || { head: {} }, Re = $t.HTMLElement || class {
1108
- }, v = {
1109
- $flags$: 0,
1110
- $resourcesUrl$: "",
1111
- jmp: (e) => e(),
1112
- raf: (e) => requestAnimationFrame(e),
1113
- ael: (e, t, s, i) => e.addEventListener(t, s, i),
1114
- rel: (e, t, s, i) => e.removeEventListener(t, s, i),
1115
- ce: (e, t) => new CustomEvent(e, t)
1116
- }, Ds = /* @__PURE__ */ (() => {
1117
- let e = !1;
1118
- try {
1119
- A.addEventListener("e", null, Object.defineProperty({}, "passive", {
1120
- get() {
1121
- e = !0;
1122
- }
1123
- }));
1124
- } catch (t) {
1125
- }
1126
- return e;
1127
- })(), zs = (e) => Promise.resolve(e), Bs = /* @__PURE__ */ (() => {
1128
- try {
1129
- return new CSSStyleSheet(), typeof new CSSStyleSheet().replace == "function";
1130
- } catch (e) {
1131
- }
1132
- return !1;
1133
- })(), Ue = (e, t, s, i) => {
1134
- s && s.map(([n, o, r]) => {
1135
- const l = Ws(e, n), a = Fs(t, r), c = Gs(n);
1136
- v.ael(l, o, a, c), (t.$rmListeners$ = t.$rmListeners$ || []).push(() => v.rel(l, o, a, c));
1137
- });
1138
- }, Fs = (e, t) => (s) => {
1139
- try {
1140
- H.lazyLoad || e.$hostElement$[t](s);
1141
- } catch (i) {
1142
- Q(i);
1143
- }
1144
- }, Ws = (e, t) => t & 4 ? A : t & 8 ? $t : t & 16 ? A.body : e, Gs = (e) => Ds ? {
1145
- passive: (e & 1) !== 0,
1146
- capture: (e & 2) !== 0
1147
- } : (e & 2) !== 0, pe = "http://www.w3.org/1999/xlink", O = (e, t = "") => () => {
1148
- }, $e = /* @__PURE__ */ new WeakMap(), Zs = (e, t, s) => {
1149
- let i = nt.get(e);
1150
- Bs && s ? (i = i || new CSSStyleSheet(), i.replace(t)) : i = t, nt.set(e, i);
1151
- }, Ks = (e, t, s, i) => {
1152
- let n = je(t, s), o = nt.get(n);
1153
- if (e = e.nodeType === 11 ? e : A, o)
1154
- if (typeof o == "string") {
1155
- e = e.head || e;
1156
- let r = $e.get(e), l;
1157
- r || $e.set(e, r = /* @__PURE__ */ new Set()), r.has(n) || (l = A.createElement("style"), l.innerHTML = o, e.insertBefore(l, e.querySelector("link")), r && r.add(n));
1158
- } else
1159
- e.adoptedStyleSheets.includes(o) || (e.adoptedStyleSheets = [...e.adoptedStyleSheets, o]);
1160
- return n;
1161
- }, qs = (e) => {
1162
- const t = e.$cmpMeta$, s = e.$hostElement$, i = t.$flags$, n = O("attachStyles", t.$tagName$), o = Ks(s.shadowRoot ? s.shadowRoot : s.getRootNode(), t, e.$modeName$);
1163
- i & 10 && (s["s-sc"] = o, s.classList.add(o + "-h"), i & 2 && s.classList.add(o + "-s")), n();
1164
- }, je = (e, t) => "sc-" + (t && e.$flags$ & 32 ? e.$tagName$ + "-" + t : e.$tagName$), Qs = (e) => Si.map((t) => t(e)).find((t) => !!t), fe = {}, Ys = "http://www.w3.org/2000/svg", Xs = "http://www.w3.org/1999/xhtml", Js = (e) => e != null, Dt = (e) => (e = typeof e, e === "object" || e === "function"), M = (e, t, ...s) => {
1165
- let i = null, n = null, o = null, r = !1, l = !1, a = [];
1166
- const c = (h) => {
1167
- for (let u = 0; u < h.length; u++)
1168
- i = h[u], Array.isArray(i) ? c(i) : i != null && typeof i != "boolean" && ((r = typeof e != "function" && !Dt(i)) && (i = String(i)), r && l ? a[a.length - 1].$text$ += i : a.push(r ? st(null, i) : i), l = r);
1169
- };
1170
- if (c(s), t) {
1171
- t.key && (n = t.key), t.name && (o = t.name);
1172
- {
1173
- const h = t.className || t.class;
1174
- h && (t.class = typeof h != "object" ? h : Object.keys(h).filter((u) => h[u]).join(" "));
1175
- }
1176
- }
1177
- if (typeof e == "function")
1178
- return e(t === null ? {} : t, a, ti);
1179
- const d = st(e, null);
1180
- return d.$attrs$ = t, a.length > 0 && (d.$children$ = a), d.$key$ = n, d.$name$ = o, d;
1181
- }, st = (e, t) => {
1182
- const s = {
1183
- $flags$: 0,
1184
- $tag$: e,
1185
- $text$: t,
1186
- $elm$: null,
1187
- $children$: null
1188
- };
1189
- return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;
1190
- }, zt = {}, Vs = (e) => e && e.$tag$ === zt, ti = {
1191
- forEach: (e, t) => e.map(ve).forEach(t),
1192
- map: (e, t) => e.map(ve).map(t).map(ei)
1193
- }, ve = (e) => ({
1194
- vattrs: e.$attrs$,
1195
- vchildren: e.$children$,
1196
- vkey: e.$key$,
1197
- vname: e.$name$,
1198
- vtag: e.$tag$,
1199
- vtext: e.$text$
1200
- }), ei = (e) => {
1201
- if (typeof e.vtag == "function") {
1202
- const s = Object.assign({}, e.vattrs);
1203
- return e.vkey && (s.key = e.vkey), e.vname && (s.name = e.vname), M(e.vtag, s, ...e.vchildren || []);
1204
- }
1205
- const t = st(e.vtag, e.vtext);
1206
- return t.$attrs$ = e.vattrs, t.$children$ = e.vchildren, t.$key$ = e.vkey, t.$name$ = e.vname, t;
1207
- }, ge = (e, t, s, i, n, o) => {
1208
- if (s !== i) {
1209
- let r = _e(e, t), l = t.toLowerCase();
1210
- if (t === "class") {
1211
- const a = e.classList, c = me(s), d = me(i);
1212
- a.remove(...c.filter((h) => h && !d.includes(h))), a.add(...d.filter((h) => h && !c.includes(h)));
1213
- } else if (t === "style") {
1214
- for (const a in s)
1215
- (!i || i[a] == null) && (a.includes("-") ? e.style.removeProperty(a) : e.style[a] = "");
1216
- for (const a in i)
1217
- (!s || i[a] !== s[a]) && (a.includes("-") ? e.style.setProperty(a, i[a]) : e.style[a] = i[a]);
1218
- } else if (t !== "key")
1219
- if (t === "ref")
1220
- i && i(e);
1221
- else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n")
1222
- t[2] === "-" ? t = t.slice(3) : _e($t, l) ? t = l.slice(2) : t = l[2] + t.slice(3), s && v.rel(e, t, s, !1), i && v.ael(e, t, i, !1);
1223
- else {
1224
- const a = Dt(i);
1225
- if ((r || a && i !== null) && !n)
1226
- try {
1227
- if (e.tagName.includes("-"))
1228
- e[t] = i;
1229
- else {
1230
- let d = i == null ? "" : i;
1231
- t === "list" ? r = !1 : (s == null || e[t] != d) && (e[t] = d);
1232
- }
1233
- } catch (d) {
1234
- }
1235
- let c = !1;
1236
- l !== (l = l.replace(/^xlink\:?/, "")) && (t = l, c = !0), i == null || i === !1 ? (i !== !1 || e.getAttribute(t) === "") && (c ? e.removeAttributeNS(pe, t) : e.removeAttribute(t)) : (!r || o & 4 || n) && !a && (i = i === !0 ? "" : i, c ? e.setAttributeNS(pe, t, i) : e.setAttribute(t, i));
1237
- }
1238
- }
1239
- }, si = /\s/, me = (e) => e ? e.split(si) : [], Ie = (e, t, s, i) => {
1240
- const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, o = e && e.$attrs$ || fe, r = t.$attrs$ || fe;
1241
- for (i in o)
1242
- i in r || ge(n, i, o[i], void 0, s, t.$flags$);
1243
- for (i in r)
1244
- ge(n, i, o[i], r[i], s, t.$flags$);
1245
- }, it = (e, t, s, i) => {
1246
- let n = t.$children$[s], o = 0, r, l, a;
1247
- if (Me || (It = !0, n.$tag$ === "slot" && (L && i.classList.add(L + "-s"), n.$flags$ |= n.$children$ ? (
1248
- // slot element has fallback content
1249
- 2
1250
- ) : (
1251
- // slot element does not have fallback content
1252
- 1
1253
- ))), n.$text$ !== null)
1254
- r = n.$elm$ = A.createTextNode(n.$text$);
1255
- else if (n.$flags$ & 1)
1256
- r = n.$elm$ = A.createTextNode("");
1257
- else {
1258
- if (g || (g = n.$tag$ === "svg"), r = n.$elm$ = A.createElementNS(g ? Ys : Xs, n.$flags$ & 2 ? "slot-fb" : n.$tag$), g && n.$tag$ === "foreignObject" && (g = !1), Ie(null, n, g), Js(L) && r["s-si"] !== L && r.classList.add(r["s-si"] = L), n.$children$)
1259
- for (o = 0; o < n.$children$.length; ++o)
1260
- l = it(e, n, o, r), l && r.appendChild(l);
1261
- n.$tag$ === "svg" ? g = !1 : r.tagName === "foreignObject" && (g = !0);
1262
- }
1263
- return r["s-hn"] = pt, n.$flags$ & 3 && (r["s-sr"] = !0, r["s-cr"] = Ne, r["s-sn"] = n.$name$ || "", a = e && e.$children$ && e.$children$[s], a && a.$tag$ === n.$tag$ && e.$elm$ && Z(e.$elm$, !1)), r;
1264
- }, Z = (e, t) => {
1265
- v.$flags$ |= 1;
1266
- const s = e.childNodes;
1267
- for (let i = s.length - 1; i >= 0; i--) {
1268
- const n = s[i];
1269
- n["s-hn"] !== pt && n["s-ol"] && (Be(n).insertBefore(n, Bt(n)), n["s-ol"].remove(), n["s-ol"] = void 0, It = !0), t && Z(n, t);
1270
- }
1271
- v.$flags$ &= -2;
1272
- }, De = (e, t, s, i, n, o) => {
1273
- let r = e["s-cr"] && e["s-cr"].parentNode || e, l;
1274
- for (r.shadowRoot && r.tagName === pt && (r = r.shadowRoot); n <= o; ++n)
1275
- i[n] && (l = it(null, s, n, e), l && (i[n].$elm$ = l, r.insertBefore(l, Bt(t))));
1276
- }, ze = (e, t, s, i, n) => {
1277
- for (; t <= s; ++t)
1278
- (i = e[t]) && (n = i.$elm$, Ge(i), et = !0, n["s-ol"] ? n["s-ol"].remove() : Z(n, !0), n.remove());
1279
- }, ii = (e, t, s, i) => {
1280
- let n = 0, o = 0, r = 0, l = 0, a = t.length - 1, c = t[0], d = t[a], h = i.length - 1, u = i[0], $ = i[h], E, S;
1281
- for (; n <= a && o <= h; )
1282
- if (c == null)
1283
- c = t[++n];
1284
- else if (d == null)
1285
- d = t[--a];
1286
- else if (u == null)
1287
- u = i[++o];
1288
- else if ($ == null)
1289
- $ = i[--h];
1290
- else if (Y(c, u))
1291
- N(c, u), c = t[++n], u = i[++o];
1292
- else if (Y(d, $))
1293
- N(d, $), d = t[--a], $ = i[--h];
1294
- else if (Y(c, $))
1295
- (c.$tag$ === "slot" || $.$tag$ === "slot") && Z(c.$elm$.parentNode, !1), N(c, $), e.insertBefore(c.$elm$, d.$elm$.nextSibling), c = t[++n], $ = i[--h];
1296
- else if (Y(d, u))
1297
- (c.$tag$ === "slot" || $.$tag$ === "slot") && Z(d.$elm$.parentNode, !1), N(d, u), e.insertBefore(d.$elm$, c.$elm$), d = t[--a], u = i[++o];
1298
- else {
1299
- for (r = -1, l = n; l <= a; ++l)
1300
- if (t[l] && t[l].$key$ !== null && t[l].$key$ === u.$key$) {
1301
- r = l;
1302
- break;
1303
- }
1304
- r >= 0 ? (S = t[r], S.$tag$ !== u.$tag$ ? E = it(t && t[o], s, r, e) : (N(S, u), t[r] = void 0, E = S.$elm$), u = i[++o]) : (E = it(t && t[o], s, o, e), u = i[++o]), E && Be(c.$elm$).insertBefore(E, Bt(c.$elm$));
1305
- }
1306
- n > a ? De(e, i[h + 1] == null ? null : i[h + 1].$elm$, s, i, o, h) : o > h && ze(t, n, a);
1307
- }, Y = (e, t) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : e.$key$ === t.$key$ : !1, Bt = (e) => e && e["s-ol"] || e, Be = (e) => (e["s-ol"] ? e["s-ol"] : e).parentNode, N = (e, t) => {
1308
- const s = t.$elm$ = e.$elm$, i = e.$children$, n = t.$children$, o = t.$tag$, r = t.$text$;
1309
- let l;
1310
- r === null ? (g = o === "svg" ? !0 : o === "foreignObject" ? !1 : g, o === "slot" || Ie(e, t, g), i !== null && n !== null ? ii(s, i, t, n) : n !== null ? (e.$text$ !== null && (s.textContent = ""), De(s, null, t, n, 0, n.length - 1)) : i !== null && ze(i, 0, i.length - 1), g && o === "svg" && (g = !1)) : (l = s["s-cr"]) ? l.parentNode.textContent = r : e.$text$ !== r && (s.data = r);
1311
- }, Fe = (e) => {
1312
- let t = e.childNodes, s, i, n, o, r, l;
1313
- for (i = 0, n = t.length; i < n; i++)
1314
- if (s = t[i], s.nodeType === 1) {
1315
- if (s["s-sr"]) {
1316
- for (r = s["s-sn"], s.hidden = !1, o = 0; o < n; o++)
1317
- if (l = t[o].nodeType, t[o]["s-hn"] !== s["s-hn"] || r !== "") {
1318
- if (l === 1 && r === t[o].getAttribute("slot")) {
1319
- s.hidden = !0;
1320
- break;
1321
- }
1322
- } else if (l === 1 || l === 3 && t[o].textContent.trim() !== "") {
1323
- s.hidden = !0;
1324
- break;
1325
- }
1326
- }
1327
- Fe(s);
1328
- }
1329
- }, y = [], We = (e) => {
1330
- let t, s, i, n, o, r, l = 0, a = e.childNodes, c = a.length;
1331
- for (; l < c; l++) {
1332
- if (t = a[l], t["s-sr"] && (s = t["s-cr"]) && s.parentNode)
1333
- for (i = s.parentNode.childNodes, n = t["s-sn"], r = i.length - 1; r >= 0; r--)
1334
- s = i[r], !s["s-cn"] && !s["s-nr"] && s["s-hn"] !== t["s-hn"] && (ye(s, n) ? (o = y.find((d) => d.$nodeToRelocate$ === s), et = !0, s["s-sn"] = s["s-sn"] || n, o ? o.$slotRefNode$ = t : y.push({
1335
- $slotRefNode$: t,
1336
- $nodeToRelocate$: s
1337
- }), s["s-sr"] && y.map((d) => {
1338
- ye(d.$nodeToRelocate$, s["s-sn"]) && (o = y.find((h) => h.$nodeToRelocate$ === s), o && !d.$slotRefNode$ && (d.$slotRefNode$ = o.$slotRefNode$));
1339
- })) : y.some((d) => d.$nodeToRelocate$ === s) || y.push({
1340
- $nodeToRelocate$: s
1341
- }));
1342
- t.nodeType === 1 && We(t);
1343
- }
1344
- }, ye = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", Ge = (e) => {
1345
- e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(Ge);
1346
- }, ni = (e, t) => {
1347
- const s = e.$hostElement$, i = e.$cmpMeta$, n = e.$vnode$ || st(null, null), o = Vs(t) ? t : M(null, null, t);
1348
- pt = s.tagName, i.$attrsToReflect$ && (o.$attrs$ = o.$attrs$ || {}, i.$attrsToReflect$.map(([r, l]) => o.$attrs$[l] = s[r])), o.$tag$ = null, o.$flags$ |= 4, e.$vnode$ = o, o.$elm$ = n.$elm$ = s.shadowRoot || s, L = s["s-sc"], Ne = s["s-cr"], Me = (i.$flags$ & 1) !== 0, et = !1, N(n, o);
1349
- {
1350
- if (v.$flags$ |= 1, It) {
1351
- We(o.$elm$);
1352
- let r, l, a, c, d, h, u = 0;
1353
- for (; u < y.length; u++)
1354
- r = y[u], l = r.$nodeToRelocate$, l["s-ol"] || (a = A.createTextNode(""), a["s-nr"] = l, l.parentNode.insertBefore(l["s-ol"] = a, l));
1355
- for (u = 0; u < y.length; u++)
1356
- if (r = y[u], l = r.$nodeToRelocate$, r.$slotRefNode$) {
1357
- for (c = r.$slotRefNode$.parentNode, d = r.$slotRefNode$.nextSibling, a = l["s-ol"]; a = a.previousSibling; )
1358
- if (h = a["s-nr"], h && h["s-sn"] === l["s-sn"] && c === h.parentNode && (h = h.nextSibling, !h || !h["s-nr"])) {
1359
- d = h;
1360
- break;
1361
- }
1362
- (!d && c !== l.parentNode || l.nextSibling !== d) && l !== d && (!l["s-hn"] && l["s-ol"] && (l["s-hn"] = l["s-ol"].parentNode.nodeName), c.insertBefore(l, d));
1363
- } else
1364
- l.nodeType === 1 && (l.hidden = !0);
1365
- }
1366
- et && Fe(o.$elm$), v.$flags$ &= -2, y.length = 0;
1367
- }
1368
- }, oi = (e) => e, ri = (e, t, s) => {
1369
- const i = oi(e);
1370
- return {
1371
- emit: (n) => li(i, t, {
1372
- bubbles: !!(s & 4),
1373
- composed: !!(s & 2),
1374
- cancelable: !!(s & 1),
1375
- detail: n
1376
- })
1377
- };
1378
- }, li = (e, t, s) => {
1379
- const i = v.ce(t, s);
1380
- return e.dispatchEvent(i), i;
1381
- }, ai = (e, t) => {
1382
- }, Ze = (e, t) => (e.$flags$ |= 16, ai(e, e.$ancestorComponent$), Ei(() => ci(e, t))), ci = (e, t) => {
1383
- const s = e.$hostElement$, i = O("scheduleUpdate", e.$cmpMeta$.$tagName$), n = s;
1384
- let o;
1385
- return t ? o = R(n, "componentWillLoad") : o = R(n, "componentWillUpdate"), o = be(o, () => R(n, "componentWillRender")), i(), be(o, () => di(e, n, t));
1386
- }, di = (e, t, s) => b(void 0, null, function* () {
1387
- const i = e.$hostElement$, n = O("update", e.$cmpMeta$.$tagName$);
1388
- i["s-rc"], s && qs(e);
1389
- const o = O("render", e.$cmpMeta$.$tagName$);
1390
- hi(e, t, i), o(), n(), ui(e);
1391
- }), hi = (e, t, s) => {
1392
- try {
1393
- ue = t, t = t.render && t.render(), e.$flags$ &= -17, e.$flags$ |= 2, (H.hasRenderFn || H.reflect) && (H.vdomRender || H.reflect) && (H.hydrateServerSide || ni(e, t));
1394
- } catch (l) {
1395
- Q(l, e.$hostElement$);
1396
- }
1397
- return ue = null, null;
1398
- }, ui = (e) => {
1399
- const t = e.$cmpMeta$.$tagName$, s = e.$hostElement$, i = O("postUpdate", t), n = s;
1400
- e.$ancestorComponent$, R(n, "componentDidRender"), e.$flags$ & 64 ? (R(n, "componentDidUpdate"), i()) : (e.$flags$ |= 64, R(n, "componentDidLoad"), i());
1401
- }, R = (e, t, s) => {
1402
- if (e && e[t])
1403
- try {
1404
- return e[t](s);
1405
- } catch (i) {
1406
- Q(i);
1407
- }
1408
- }, be = (e, t) => e && e.then ? e.then(t) : t(), pi = (e, t) => e != null && !Dt(e) ? t & 4 ? e === "false" ? !1 : e === "" || !!e : t & 2 ? parseFloat(e) : t & 1 ? String(e) : e : e, $i = (e, t) => ft(e).$instanceValues$.get(t), fi = (e, t, s, i) => {
1409
- const n = ft(e), o = e, r = n.$instanceValues$.get(t), l = n.$flags$, a = o;
1410
- s = pi(s, i.$members$[t][0]);
1411
- const c = Number.isNaN(r) && Number.isNaN(s);
1412
- if (s !== r && !c) {
1413
- n.$instanceValues$.set(t, s);
1414
- {
1415
- if (i.$watchers$ && l & 128) {
1416
- const h = i.$watchers$[t];
1417
- h && h.map((u) => {
1418
- try {
1419
- a[u](s, r, t);
1420
- } catch ($) {
1421
- Q($, o);
1422
- }
1423
- });
1424
- }
1425
- if ((l & 18) === 2) {
1426
- if (a.componentShouldUpdate && a.componentShouldUpdate(s, r, t) === !1)
1427
- return;
1428
- Ze(n, !1);
1429
- }
1430
- }
1431
- }
1432
- }, vi = (e, t, s) => {
1433
- if (t.$members$) {
1434
- e.watchers && (t.$watchers$ = e.watchers);
1435
- const i = Object.entries(t.$members$), n = e.prototype;
1436
- i.map(([o, [r]]) => {
1437
- (r & 31 || r & 32) && Object.defineProperty(n, o, {
1438
- get() {
1439
- return $i(this, o);
1440
- },
1441
- set(l) {
1442
- fi(this, o, l, t);
1443
- },
1444
- configurable: !0,
1445
- enumerable: !0
1446
- });
1447
- });
1448
- {
1449
- const o = /* @__PURE__ */ new Map();
1450
- n.attributeChangedCallback = function(r, l, a) {
1451
- v.jmp(() => {
1452
- const c = o.get(r);
1453
- if (this.hasOwnProperty(c))
1454
- a = this[c], delete this[c];
1455
- else if (n.hasOwnProperty(c) && typeof this[c] == "number" && this[c] == a)
1456
- return;
1457
- this[c] = a === null && typeof this[c] == "boolean" ? !1 : a;
1458
- });
1459
- }, e.observedAttributes = i.filter(
1460
- ([r, l]) => l[0] & 15
1461
- /* HasAttribute */
1462
- ).map(([r, l]) => {
1463
- const a = l[1] || r;
1464
- return o.set(a, r), l[0] & 512 && t.$attrsToReflect$.push([r, a]), a;
1465
- });
1466
- }
1467
- }
1468
- return e;
1469
- }, gi = (e, t, s, i, n) => b(void 0, null, function* () {
1470
- if (!(t.$flags$ & 32) && (n = e.constructor, t.$flags$ |= 32, customElements.whenDefined(s.$tagName$).then(() => t.$flags$ |= 128), n.style)) {
1471
- let r = n.style;
1472
- typeof r != "string" && (r = r[t.$modeName$ = Qs(e)]);
1473
- const l = je(s, t.$modeName$);
1474
- if (!nt.has(l)) {
1475
- const a = O("registerStyles", s.$tagName$);
1476
- Zs(l, r, !!(s.$flags$ & 1)), a();
1477
- }
1478
- }
1479
- t.$ancestorComponent$, (() => Ze(t, !0))();
1480
- }), mi = (e) => {
1481
- }, yi = (e) => {
1482
- if (!(v.$flags$ & 1)) {
1483
- const t = ft(e), s = t.$cmpMeta$, i = O("connectedCallback", s.$tagName$);
1484
- t.$flags$ & 1 ? (Ue(e, t, s.$listeners$), mi(t.$lazyInstance$)) : (t.$flags$ |= 1, s.$flags$ & 12 && bi(e), s.$members$ && Object.entries(s.$members$).map(([n, [o]]) => {
1485
- if (o & 31 && e.hasOwnProperty(n)) {
1486
- const r = e[n];
1487
- delete e[n], e[n] = r;
1488
- }
1489
- }), gi(e, t, s)), i();
1490
- }
1491
- }, bi = (e) => {
1492
- const t = e["s-cr"] = A.createComment("");
1493
- t["s-cn"] = !0, e.insertBefore(t, e.firstChild);
1494
- }, _i = (e) => {
1495
- if (!(v.$flags$ & 1)) {
1496
- const t = ft(e);
1497
- t.$rmListeners$ && (t.$rmListeners$.map((s) => s()), t.$rmListeners$ = void 0);
1498
- }
1499
- }, Ke = (e, t) => {
1500
- const s = {
1501
- $flags$: t[0],
1502
- $tagName$: t[1]
1503
- };
1504
- s.$members$ = t[2], s.$listeners$ = t[3], s.$watchers$ = e.$watchers$, s.$attrsToReflect$ = [];
1505
- const i = e.prototype.connectedCallback, n = e.prototype.disconnectedCallback;
1506
- return Object.assign(e.prototype, {
1507
- __registerHost() {
1508
- Ai(this, s);
1509
- },
1510
- connectedCallback() {
1511
- yi(this), i && i.call(this);
1512
- },
1513
- disconnectedCallback() {
1514
- _i(this), n && n.call(this);
1515
- },
1516
- __attachShadow() {
1517
- this.attachShadow({
1518
- mode: "open",
1519
- delegatesFocus: !!(s.$flags$ & 16)
1520
- });
1521
- }
1522
- }), e.is = s.$tagName$, vi(e, s);
1523
- }, qe = /* @__PURE__ */ new WeakMap(), ft = (e) => qe.get(e), Ai = (e, t) => {
1524
- const s = {
1525
- $flags$: 0,
1526
- $hostElement$: e,
1527
- $cmpMeta$: t,
1528
- $instanceValues$: /* @__PURE__ */ new Map()
1529
- };
1530
- return Ue(e, s, t.$listeners$), qe.set(e, s);
1531
- }, _e = (e, t) => t in e, Q = (e, t) => (0, console.error)(e, t), nt = /* @__PURE__ */ new Map(), Si = [], Ae = [], Qe = [], wi = (e, t) => (s) => {
1532
- e.push(s), Ht || (Ht = !0, t && v.$flags$ & 4 ? xi(Lt) : v.raf(Lt));
1533
- }, Se = (e) => {
1534
- for (let t = 0; t < e.length; t++)
1535
- try {
1536
- e[t](performance.now());
1537
- } catch (s) {
1538
- Q(s);
1539
- }
1540
- e.length = 0;
1541
- }, Lt = () => {
1542
- Se(Ae), Se(Qe), (Ht = Ae.length > 0) && v.raf(Lt);
1543
- }, xi = (e) => zs().then(e), Ei = /* @__PURE__ */ wi(Qe, !0), Ci = (e = {}) => {
1544
- const { content: t = "", title: s, attributes: i = [] } = e;
1545
- let n = "", o = [
1546
- { name: "xmlns", value: "http://www.w3.org/2000/svg" },
1547
- { name: "fill", value: "currentColor" },
1548
- ...i
1549
- ];
1550
- return s && (n = `<title>${s}</title>`), `<svg ${o.map((l) => `${l.name}="${l.value}"`).join(" ")}>${n}${t}</svg>`;
1551
- }, ki = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim();
1552
- function Ti(e) {
1553
- return `${e.getFullYear()}.${e.getMonth() + 1}`;
1554
- }
1555
- class Oi {
1556
- constructor(t) {
1557
- this.voca_component = t, this.voca_added = Ti(/* @__PURE__ */ new Date());
1558
- }
1559
- }
1560
- const Pi = "telia-vst{display:none}", Hi = /* @__PURE__ */ Ke(class extends Re {
1561
- constructor() {
1562
- super(), this.__registerHost(), this.vocaInternalUStats = ri(this, "vocaInternalUStats", 7);
1563
- }
1564
- connectedCallback() {
1565
- this.vocaInternalUStats.emit(new Oi(this.dataTrackingId));
1566
- }
1567
- render() {
1568
- return M(zt, null);
1569
- }
1570
- static get style() {
1571
- return Pi;
1572
- }
1573
- }, [0, "telia-vst", {
1574
- dataTrackingId: [1, "data-tracking-id"]
1575
- }]);
1576
- function Ye() {
1577
- if (typeof customElements == "undefined")
1578
- return;
1579
- ["telia-vst"].forEach((t) => {
1580
- switch (t) {
1581
- case "telia-vst":
1582
- customElements.get(t) || customElements.define(t, Hi);
1583
- break;
1584
- }
1585
- });
1586
- }
1587
- Ye();
1588
- function Nt() {
1589
- return typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : { vocadsIcons: void 0, vocadsIconsRegistered: !1 };
1590
- }
1591
- function Li() {
1592
- if (typeof Nt().vocadsIcons !== void 0)
1593
- return Nt().vocadsIcons;
1594
- }
1595
- function Ni() {
1596
- return Nt().vocadsIconsRegistered;
1597
- }
1598
- const Mi = ".telia-icon{display:inline-block}.telia-icon__container{display:block;height:inherit}.telia-icon svg{display:block}.telia-icon--sm{height:calc(1.6rem * var(--voca-rem-multiplier));min-width:calc(1.6rem * var(--voca-rem-multiplier));width:calc(1.6rem * var(--voca-rem-multiplier))}.telia-icon--md{height:calc(2.4rem * var(--voca-rem-multiplier));min-width:calc(2.4rem * var(--voca-rem-multiplier));width:calc(2.4rem * var(--voca-rem-multiplier))}.telia-icon--lg{height:calc(3.2rem * var(--voca-rem-multiplier));min-width:calc(3.2rem * var(--voca-rem-multiplier));width:calc(3.2rem * var(--voca-rem-multiplier))}", Ri = /* @__PURE__ */ Ke(class extends Re {
1599
- constructor() {
1600
- super(), this.__registerHost(), this.size = "md", this.allyTitle = null, this.dataTrackingId = "telia-icon";
1601
- }
1602
- /**
1603
- * Returns svg string from svg property or svg string from icons bundle if icons bundle is registered
1604
- * @private
1605
- * @returns string
1606
- */
1607
- getSvgString() {
1608
- if (this.svg)
1609
- return this.svg;
1610
- if (Ni() && this.name) {
1611
- const e = Li();
1612
- return e[this.name] ? e[this.name].svg : "";
1613
- }
1614
- return this.name && console.warn(this.name, "Icons bundle is not registered and will not be rendered. Check if you have registered icons bundle or use svg property"), "";
1615
- }
1616
- render() {
1617
- let e = this.getSvgString(), t = [{ name: "viewBox", value: "0 0 64 64" }];
1618
- this.allyTitle ? t = [...t, { name: "role", value: "img" }] : t = [
1619
- ...t,
1620
- { name: "aria-hidden", value: "true" }
1621
- ];
1622
- const s = Ci({
1623
- content: ki(e),
1624
- attributes: t,
1625
- title: this.allyTitle
1626
- });
1627
- return M(zt, { class: `telia-icon telia-icon--${this.size}` }, M("span", { "aria-label": this.allyTitle, class: "telia-icon__container", innerHTML: s }), M("telia-vst", { dataTrackingId: this.dataTrackingId }));
1628
- }
1629
- static get style() {
1630
- return Mi;
1631
- }
1632
- }, [0, "telia-icon", {
1633
- name: [1],
1634
- svg: [1],
1635
- size: [1],
1636
- allyTitle: [1, "ally-title"],
1637
- dataTestid: [1, "data-testid"]
1638
- }]);
1639
- function Ui() {
1640
- if (typeof customElements == "undefined")
1641
- return;
1642
- ["telia-icon", "telia-vst"].forEach((t) => {
1643
- switch (t) {
1644
- case "telia-icon":
1645
- customElements.get(t) || customElements.define(t, Ri);
1646
- break;
1647
- case "telia-vst":
1648
- customElements.get(t) || Ye();
1649
- break;
1650
- }
1651
- });
1652
- }
1653
- Ui();
1654
- var ji = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Xe = (e, t, s, i) => {
1655
- for (var n = i > 1 ? void 0 : i ? Ii(t, s) : t, o = e.length - 1, r; o >= 0; o--)
1656
- (r = e[o]) && (n = (i ? r(t, s, n) : r(n)) || n);
1657
- return i && n && ji(t, s, n), n;
1658
- };
1659
- let ot = class extends _ {
1660
- _renderTimestamp(e, t) {
1661
- if (!e && !t)
1662
- return p;
1663
- const s = (n) => new Date(n).toLocaleTimeString([], {
1664
- hour: "2-digit",
1665
- minute: "2-digit"
1666
- });
1667
- let i = "";
1668
- return e ? t ? i = `${e}: ${s(t)}` : i = e : t && (i = s(t)), f`<p class="conversation-timestamp">${i}</p>`;
1669
- }
1670
- render() {
1671
- var e, t;
1672
- switch (this.message.type) {
1673
- case gt.System:
1674
- return "";
1675
- case gt.Agent:
1676
- return f`<div
1677
- class=${Le({
1678
- "conversation-agent-message": !0,
1679
- "has-avatar": !!((e = this.message.sender) != null && e.avatar)
1680
- })}
1681
- >
1682
- ${(t = this.message.sender) != null && t.avatar ? f`<div class="avatar">
1683
- <img src=${this.message.sender.avatar} />
1684
- </div>` : p}
1685
-
1686
- <div class="content-bundle">
1687
- ${this.message.content.map(
1688
- (s) => f`
1689
- <div class="message-container">
1690
- <div class="message-content">
1691
- <conversation-component-message-list
1692
- .items=${s.items || []}
1693
- ></conversation-component-message-list>
1694
- </div>
1695
- </div>
1696
- `
1697
- )}
1698
- </div>
1699
- ${this._renderTimestamp(
1700
- this.message.sender.name || "",
1701
- this.message.timestamp
1702
- )}
1703
- </div>`;
1704
- case gt.User:
1705
- return f`<div class="conversation-user-message">
1706
- <div class="content-bundle">
1707
- ${this.message.content.map(
1708
- (s) => f`
1709
- <div class="message-container">
1710
- <div class="message-content">
1711
- <conversation-component-message-list
1712
- .items=${s.items || []}
1713
- ></conversation-component-message-list>
1714
- </div>
1715
- </div>
1716
- `
1717
- )}
1718
- </div>
1719
- ${this._renderTimestamp(
1720
- "",
1721
- // TODO: properties.userLabel || ''
1722
- this.message.timestamp
1723
- )}
1724
- </div>`;
1725
- default:
1726
- return p;
1727
- }
1728
- }
1729
- };
1730
- ot.styles = I`
1731
- :host {
1732
- box-sizing: border-box;
1733
- display: block;
1734
- }
1735
- * {
1736
- box-sizing: border-box;
1737
- }
1738
- .message-content {
1739
- padding: var(--spacing-md);
1740
- display: inline-block;
1741
- margin-top: var(--spacing-md);
1742
- max-width: 100%;
1743
- border: 1px solid var(--gray-color);
1744
- border-top-right-radius: var(--border-radius);
1745
- border-bottom-right-radius: var(--border-radius);
1746
- border-top-left-radius: var(--border-radius);
1747
- }
1748
-
1749
- .conversation-user-message {
1750
- margin-left: 10%;
1751
- width: 90%;
1752
- display: flex;
1753
- flex-direction: column;
1754
- align-items: flex-end;
1755
- }
1756
-
1757
- .conversation-agent-message {
1758
- display: grid;
1759
- margin-right: 10%;
1760
- width: 90%;
1761
-
1762
- grid-template-columns: 1fr;
1763
- grid-template-rows: 1fr auto;
1764
- grid-template-areas:
1765
- 'content'
1766
- 'info';
1767
- }
1768
- .conversation-agent-message.has-avatar {
1769
- grid-template-columns: auto 1fr;
1770
- grid-template-rows: 1fr auto;
1771
- grid-template-areas:
1772
- 'avatar content'
1773
- '. info';
1774
- }
1775
-
1776
- .avatar {
1777
- grid-area: avatar;
1778
- place-self: flex-end;
1779
- width: 32px;
1780
- height: 32px;
1781
- border-radius: 50%;
1782
- background-color: var(--accent-color);
1783
- align-self: flex-end;
1784
- justify-self: center;
1785
- overflow: hidden;
1786
- margin-right: var(--spacing-md);
1787
- justify-content: center;
1788
- align-items: center;
1789
- padding: var(--spacing-xs);
1790
- }
1791
- .avatar img {
1792
- height: 100%;
1793
- width: 100%;
1794
- object-fit: cover;
1795
- }
1796
-
1797
- .conversation-timestamp {
1798
- grid-area: info;
1799
- margin: 0;
1800
- line-height: 1.5em;
1801
- grid-area: info;
1802
- color: var(--text-color);
1803
- font-size: 0.8rem;
1804
- font-weight: 300;
1805
- }
1806
-
1807
- .content-bundle {
1808
- grid-area: content;
1809
- }
1810
- `;
1811
- Xe([
1812
- z()
1813
- ], ot.prototype, "message", 2);
1814
- ot = Xe([
1815
- D("conversation-component-message")
1816
- ], ot);
1817
- var Di = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, Je = (e, t, s, i) => {
1818
- for (var n = i > 1 ? void 0 : i ? zi(t, s) : t, o = e.length - 1, r; o >= 0; o--)
1819
- (r = e[o]) && (n = (i ? r(t, s, n) : r(n)) || n);
1820
- return i && n && Di(t, s, n), n;
1821
- };
1822
- let rt = class extends _ {
1823
- constructor() {
1824
- super(...arguments), this.items = [];
1825
- }
1826
- _isCustomComponent(e) {
1827
- return !["html", "link-list"].includes(e);
1828
- }
1829
- _createCustomComponent(e, t) {
1830
- const s = customElements.get(e);
1831
- if (s) {
1832
- const i = new s();
1833
- return i.message = t, i;
1834
- }
1835
- return p;
1836
- }
1837
- render() {
1838
- return f` <div class="message-list">
1839
- ${this.items.map(
1840
- ([e, t]) => f`
1841
- ${e === "html" ? f`
1842
- <message-type-html .message=${t}> </message-type-html>
1843
- ` : p}
1844
- ${e === "link-list" ? f`
1845
- <message-type-link-list .message=${t}>
1846
- </message-type-link-list>
1847
- ` : p}
1848
- ${e === "separator" ? f`
1849
- <message-type-separator .message=${t}>
1850
- </message-type-separator>
1851
- ` : p}
1852
- ${this._isCustomComponent(e) ? this._createCustomComponent(e, t) : p}
1853
- `
1854
- )}
1855
- </div>`;
1856
- }
1857
- };
1858
- rt.styles = I`
1859
- :host {
1860
- box-sizing: border-box;
1861
- display: block;
1862
- color: var(--text-color);
1863
- }
1864
- * {
1865
- box-sizing: border-box;
1866
- }
1867
- .message-list {
1868
- display: flex;
1869
- flex-direction: column;
1870
- gap: var(--spacing-md);
1871
- }
1872
- `;
1873
- Je([
1874
- z()
1875
- ], rt.prototype, "items", 2);
1876
- rt = Je([
1877
- D("conversation-component-message-list")
1878
- ], rt);
1879
- /**
1880
- * @license
1881
- * Copyright 2017 Google LLC
1882
- * SPDX-License-Identifier: BSD-3-Clause
1883
- */
1884
- class Mt extends jt {
1885
- constructor(t) {
1886
- if (super(t), this.et = p, t.type !== ht.CHILD)
1887
- throw Error(this.constructor.directiveName + "() can only be used in child bindings");
1888
- }
1889
- render(t) {
1890
- if (t === p || t == null)
1891
- return this.ft = void 0, this.et = t;
1892
- if (t === x)
1893
- return t;
1894
- if (typeof t != "string")
1895
- throw Error(this.constructor.directiveName + "() called with a non-string value");
1896
- if (t === this.et)
1897
- return this.ft;
1898
- this.et = t;
1899
- const s = [t];
1900
- return s.raw = s, this.ft = { _$litType$: this.constructor.resultType, strings: s, values: [] };
1901
- }
1902
- }
1903
- Mt.directiveName = "unsafeHTML", Mt.resultType = 1;
1904
- const Bi = ut(Mt);
1905
- var Fi = Object.defineProperty, Wi = Object.getOwnPropertyDescriptor, Ve = (e, t, s, i) => {
1906
- for (var n = i > 1 ? void 0 : i ? Wi(t, s) : t, o = e.length - 1, r; o >= 0; o--)
1907
- (r = e[o]) && (n = (i ? r(t, s, n) : r(n)) || n);
1908
- return i && n && Fi(t, s, n), n;
1909
- };
1910
- let lt = class extends _ {
1911
- render() {
1912
- return f`<div class="message-type-html">
1913
- ${Bi(this.message.body)}
1914
- </div>`;
1915
- }
1916
- };
1917
- lt.styles = [
1918
- I`
1919
- :host {
1920
- box-sizing: border-box;
1921
- }
1922
- * {
1923
- box-sizing: border-box;
1924
- }
1925
- p {
1926
- margin: 0;
1927
- padding: 0;
1928
- word-break: break-word;
1929
- }
1930
- `
1931
- ];
1932
- Ve([
1933
- z()
1934
- ], lt.prototype, "message", 2);
1935
- lt = Ve([
1936
- D("message-type-html")
1937
- ], lt);
1938
- var Gi = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, ts = (e, t, s, i) => {
1939
- for (var n = i > 1 ? void 0 : i ? Zi(t, s) : t, o = e.length - 1, r; o >= 0; o--)
1940
- (r = e[o]) && (n = (i ? r(t, s, n) : r(n)) || n);
1941
- return i && n && Gi(t, s, n), n;
1942
- };
1943
- let at = class extends _ {
1944
- _onItemClick(e) {
1945
- const t = new CustomEvent("action", {
1946
- bubbles: !0,
1947
- composed: !0,
1948
- detail: {
1949
- actionKey: "action",
1950
- payload: e
1951
- }
1952
- });
1953
- this.dispatchEvent(t);
1954
- }
1955
- render() {
1956
- return f`
1957
- <div class="message-type-link-list">
1958
- ${this.message.header ? f`<h1>${this.message.header}</h1>` : p}
1959
- <ul>
1960
- ${this.message.actions.map(
1961
- (e) => f`
1962
- <li>
1963
- <button @click=${() => this._onItemClick(e)}>
1964
- ${e.label}
1965
- </button>
1966
- </li>
1967
- `
1968
- )}
1969
- </ul>
1970
- </div>
1971
- `;
1972
- }
1973
- };
1974
- at.styles = [
1975
- I`
1976
- :host {
1977
- box-sizing: border-box;
1978
- }
1979
- * {
1980
- box-sizing: border-box;
1981
- }
1982
- h1 {
1983
- font-size: 1.1rem;
1984
- margin: 0 0 var(--spacing-sm);
1985
- font-weight: normal;
1986
- line-height: 1.8rem;
1987
- color: var(--text-color);
1988
- white-space: normal;
1989
- }
1990
- ul {
1991
- list-style: none;
1992
- margin: 0;
1993
- padding: 0;
1994
- }
1995
- .message-type-link-list button {
1996
- color: var(--primary-color);
1997
- background-color: transparent;
1998
- max-width: 100%;
1999
- border: none;
2000
- cursor: pointer;
2001
- text-transform: none;
2002
- font-weight: 300;
2003
- font-size: inherit;
2004
- text-align: left;
2005
- display: block;
2006
- margin: 0;
2007
- padding: 0;
2008
- }
2009
- .message-type-link-list ul {
2010
- display: flex;
2011
- flex-direction: column;
2012
- gap: var(--spacing-sm);
2013
- }
2014
- `
2015
- ];
2016
- ts([
2017
- z()
2018
- ], at.prototype, "message", 2);
2019
- at = ts([
2020
- D("message-type-link-list")
2021
- ], at);
2022
- var Ki = Object.defineProperty, qi = Object.getOwnPropertyDescriptor, es = (e, t, s, i) => {
2023
- for (var n = i > 1 ? void 0 : i ? qi(t, s) : t, o = e.length - 1, r; o >= 0; o--)
2024
- (r = e[o]) && (n = (i ? r(t, s, n) : r(n)) || n);
2025
- return i && n && Ki(t, s, n), n;
2026
- };
2027
- let ct = class extends _ {
2028
- render() {
2029
- return f`<div class="message-type-separator"></div>`;
2030
- }
2031
- };
2032
- ct.styles = [
2033
- I`
2034
- :host {
2035
- box-sizing: border-box;
2036
- }
2037
- * {
2038
- box-sizing: border-box;
2039
- }
2040
- .message-type-separator {
2041
- border-bottom: 1px solid var(--gray-color);
2042
- width: 100%;
2043
- }
2044
- `
2045
- ];
2046
- es([
2047
- z({ attribute: !1 })
2048
- ], ct.prototype, "message", 2);
2049
- ct = es([
2050
- D("message-type-separator")
2051
- ], ct);
2052
- const Qi = (e) => {
2053
- setTimeout(() => {
2054
- e.scrollTo ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight;
2055
- }, 1e3);
2056
- };
2057
- var Yi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, ss = (e, t, s, i) => {
2058
- for (var n = i > 1 ? void 0 : i ? Xi(t, s) : t, o = e.length - 1, r; o >= 0; o--)
2059
- (r = e[o]) && (n = (i ? r(t, s, n) : r(n)) || n);
2060
- return i && n && Yi(t, s, n), n;
2061
- };
2062
- const is = cs(_);
2063
- let K = class extends is {
2064
- constructor() {
2065
- super(...arguments), this.message = "", this.conversationContentRef = Ps();
2066
- }
2067
- _onClick(e) {
2068
- return b(this, null, function* () {
2069
- e.preventDefault(), console.log("Todo", this.message);
2070
- });
2071
- }
2072
- _onSendMessage(e) {
2073
- return b(this, null, function* () {
2074
- e.preventDefault(), yield this.actions.dispatch("user-submit", { text: this.message }), this.message = "";
2075
- });
2076
- }
2077
- _inputHandler(e) {
2078
- this.message = e.target.value;
2079
- }
2080
- _actionHandler(e) {
2081
- this.actions.dispatch(e.detail.actionKey, e.detail.payload);
2082
- }
2083
- updated(e) {
2084
- e.has("properties") && this.conversationContentRef.value && ((e.get("properties") || {}).messages || []).length < (this.properties.messages || []).length && Qi(this.conversationContentRef.value);
2085
- }
2086
- render() {
2087
- return f` <div
2088
- @action=${this._actionHandler}
2089
- class=${Le({
2090
- conversation: !0,
2091
- "input-has-text": this.message.length > 0
2092
- })}
2093
- >
2094
- <div class="conversation-content" ${Ls(this.conversationContentRef)}>
2095
- <div class="conversation-content-inner">
2096
- ${(this.properties.messages || []).map(
2097
- (e) => f`<div class="conversation-entry" tabindex="-1">
2098
- <conversation-component-message
2099
- .message=${e}
2100
- ${he({
2101
- keyframeOptions: {},
2102
- in: le,
2103
- out: re,
2104
- stabilizeOut: !0,
2105
- skipInitial: !1
2106
- })}
2107
- >
2108
- </conversation-component-message>
2109
- </div>`
2110
- )}
2111
- ${this.properties.loading ? f`<div
2112
- class="loader"
2113
- ${he({
2114
- in: le,
2115
- out: re,
2116
- skipInitial: !1
2117
- })}
2118
- >
2119
- <div></div>
2120
- <div></div>
2121
- <div></div>
2122
- </div>` : p}
2123
- </div>
2124
- </div>
2125
- <form class="conversation-bottom" @submit=${this._onSendMessage}>
2126
- <div class="conversation-bottom-left">
2127
- <button class="circle" @click=${this._onClick} type="button">
2128
- <telia-icon svg=${js.svg} size="sm"></telia-icon>
2129
- </button>
2130
- </div>
2131
- <input
2132
- placeholder="Type your message here..."
2133
- .value=${this.message}
2134
- @input=${this._inputHandler}
2135
- />
2136
- <div class="conversation-actions">
2137
- <button class="conversation-send-button" type="submit">
2138
- <telia-icon svg=${Is.svg}></telia-icon>
2139
- </button>
2140
- </div>
2141
- </form>
2142
- </div>`;
2143
- }
2144
- };
2145
- K.styles = [
2146
- is.styles || [],
2147
- I`
2148
- :host {
2149
- font-family: var(--font-family);
2150
- --send-icon-color: var(--gray-dark-color, #a6a6a6);
2151
- --conversation-bg: #fafafa;
2152
-
2153
- scrollbar-width: thin; /* Firefox */
2154
- scrollbar-color: #7f7f7f transparent; /* Firefox */
2155
- }
2156
- ::-webkit-scrollbar {
2157
- width: 3px !important;
2158
- background-color: transparent;
2159
- border-left: none;
2160
- }
2161
- ::-webkit-scrollbar-thumb {
2162
- background-color: #7f7f7f;
2163
- }
2164
- ::-webkit-scrollbar-track {
2165
- -webkit-box-shadow: none !important;
2166
- background-color: transparent;
2167
- }
2168
-
2169
- .conversation {
2170
- display: grid;
2171
- grid-template-rows: 1fr auto;
2172
- height: 100%;
2173
- background-color: var(--conversation-bg);
2174
- }
2175
-
2176
- .conversation.input-has-text {
2177
- --send-icon-color: var(--primary-color);
2178
- }
2179
-
2180
- .conversation-content {
2181
- flex: 1;
2182
-
2183
- padding: var(--spacing-md);
2184
- overflow-y: auto;
2185
- overflow-x: hidden;
2186
- }
2187
- .conversation-content-inner {
2188
- display: flex;
2189
- flex-direction: column;
2190
- justify-content: end;
2191
- min-height: 100%;
2192
- }
2193
- .conversation-bottom {
2194
- border-top: 1px solid var(--gray-color);
2195
- background-color: #fff;
2196
- min-height: 50px;
2197
- max-height: 150px;
2198
- display: flex;
2199
- align-items: center;
2200
- padding: 0 var(--spacing-md);
2201
- margin: 0;
2202
- }
2203
- .conversation-bottom-left {
2204
- border-right: 1px solid var(--gray-color);
2205
- padding-right: var(--spacing-md);
2206
- }
2207
- .circle {
2208
- background-color: var(--gray-dark-color, #a6a6a6);
2209
- border-radius: 50%;
2210
- color: #fff;
2211
- padding: var(--spacing-sm, 5px);
2212
- border: none;
2213
- display: flex;
2214
- justify-content: center;
2215
- align-items: center;
2216
- }
2217
- .conversation-send-button {
2218
- border: none;
2219
- background: transparent;
2220
- cursor: pointer;
2221
- color: var(--send-icon-color);
2222
- }
2223
- input {
2224
- border: none;
2225
- font-family: inherit;
2226
- font-size: inherit;
2227
- flex: 1;
2228
- padding: 0 var(--spacing-md);
2229
- height: 2.5rem;
2230
- outline: none;
2231
- }
2232
-
2233
- @keyframes loaderanim {
2234
- 0% {
2235
- opacity: 0;
2236
- }
2237
- 75% {
2238
- opacity: 1;
2239
- }
2240
- 100% {
2241
- opacity: 0;
2242
- }
2243
- }
2244
-
2245
- .loader {
2246
- display: flex;
2247
- justify-content: center;
2248
- }
2249
-
2250
- .loader > div {
2251
- height: 10px;
2252
- width: 10px;
2253
- border-radius: 50%;
2254
- margin: 5px;
2255
- background-color: var(--text-color);
2256
- animation-name: loaderanim;
2257
- animation-duration: 1s;
2258
- animation-iteration-count: infinite;
2259
- }
2260
-
2261
- .loader > div:nth-of-type(2) {
2262
- animation-delay: 100ms;
2263
- }
2264
-
2265
- .loader > div:nth-of-type(3) {
2266
- animation-delay: 200ms;
2267
- }
2268
- `
2269
- ];
2270
- ss([
2271
- Es()
2272
- ], K.prototype, "message", 2);
2273
- K = ss([
2274
- D("ace-conversation")
2275
- ], K);
2276
- const ln = K;
2277
- export {
2278
- K as ConversationComponent,
2279
- ln as default
2280
- };
2281
- //# sourceMappingURL=conversation-34a9a242.js.map