@telia-ace/widget-conversation 1.0.34-experimental.2 → 1.0.34-experimental.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,97 +1,88 @@
1
- var j = Object.defineProperty, G = Object.defineProperties;
2
- var J = Object.getOwnPropertyDescriptors;
3
- var A = Object.getOwnPropertySymbols;
4
- var B = Object.prototype.hasOwnProperty, M = Object.prototype.propertyIsEnumerable;
5
- var E = (r, e, t) => e in r ? j(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, g = (r, e) => {
1
+ var K = Object.defineProperty, F = Object.defineProperties;
2
+ var j = Object.getOwnPropertyDescriptors;
3
+ var S = Object.getOwnPropertySymbols;
4
+ var _ = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable;
5
+ var O = (r, e, t) => e in r ? K(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, p = (r, e) => {
6
6
  for (var t in e || (e = {}))
7
- B.call(e, t) && E(r, t, e[t]);
8
- if (A)
9
- for (var t of A(e))
10
- M.call(e, t) && E(r, t, e[t]);
7
+ _.call(e, t) && O(r, t, e[t]);
8
+ if (S)
9
+ for (var t of S(e))
10
+ B.call(e, t) && O(r, t, e[t]);
11
11
  return r;
12
- }, m = (r, e) => G(r, J(e));
13
- var $ = (r, e) => {
12
+ }, g = (r, e) => F(r, j(e));
13
+ var M = (r, e) => {
14
14
  var t = {};
15
15
  for (var s in r)
16
- B.call(r, s) && e.indexOf(s) < 0 && (t[s] = r[s]);
17
- if (r != null && A)
18
- for (var s of A(r))
19
- e.indexOf(s) < 0 && M.call(r, s) && (t[s] = r[s]);
16
+ _.call(r, s) && e.indexOf(s) < 0 && (t[s] = r[s]);
17
+ if (r != null && S)
18
+ for (var s of S(r))
19
+ e.indexOf(s) < 0 && B.call(r, s) && (t[s] = r[s]);
20
20
  return t;
21
21
  };
22
- var d = (r, e, t) => (E(r, typeof e != "symbol" ? e + "" : e, t), t);
23
- var v = (r, e, t) => new Promise((s, n) => {
24
- var i = (c) => {
22
+ var u = (r, e, t) => new Promise((s, i) => {
23
+ var n = (c) => {
25
24
  try {
26
25
  o(t.next(c));
27
- } catch (h) {
28
- n(h);
26
+ } catch (d) {
27
+ i(d);
29
28
  }
30
29
  }, a = (c) => {
31
30
  try {
32
31
  o(t.throw(c));
33
- } catch (h) {
34
- n(h);
32
+ } catch (d) {
33
+ i(d);
35
34
  }
36
- }, o = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(i, a);
35
+ }, o = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(n, a);
37
36
  o((t = t.apply(r, e)).next());
38
37
  });
39
- import { ComponentPlatform as K } from "@telia-ace/widget-core";
40
- import { createStorageWriter as N, StorageCategory as R, readStorage as b, StorageMedium as w, StorageScope as V } from "@telia-ace/widget-services";
41
- import { uuid as L, lock as Y } from "@telia-ace/widget-utilities";
42
- import { FormBuilder as X } from "@telia-ace/widget-forms";
43
- import { closeAllModals as z } from "@telia-ace/widget-plugins";
44
- import { createReactComponent as U } from "@telia-ace/widget-ui";
38
+ import { ComponentPlatform as Q } from "@telia-ace/widget-core";
39
+ import { createStorageWriter as x, StorageCategory as W, readStorage as y, StorageMedium as b, StorageScope as G } from "@telia-ace/widget-services";
40
+ import { uuid as L, lock as J } from "@telia-ace/widget-utilities";
41
+ import { FormBuilder as V } from "@telia-ace/widget-forms";
42
+ import { closeAllModals as $ } from "@telia-ace/widget-plugins";
43
+ import { createWebComponent as Y, createReactComponent as X } from "@telia-ace/widget-ui";
45
44
  import { lazy as Z } from "react";
46
- class x {
45
+ class I {
47
46
  constructor(e, t) {
48
- d(this, "id");
49
- d(this, "name");
50
- d(this, "avatar");
51
- d(this, "print", (e, t) => {
52
- const s = {
47
+ this.provider = e, this.print = (s, i) => {
48
+ const n = {
53
49
  name: this.name,
54
50
  avatar: this.avatar,
55
51
  id: this.id
56
- }, n = D(e, t);
52
+ }, a = R(s, i);
57
53
  return this.provider.createEntry(
58
- n.key,
59
- n.content,
60
- I.Agent,
61
- s,
62
- n.timestamp
54
+ a.key,
55
+ a.content,
56
+ C.Agent,
57
+ n,
58
+ a.timestamp
63
59
  );
64
- });
65
- d(this, "typing", () => this.provider.setTypingState({ name: this.name, avatar: this.avatar }));
66
- this.provider = e, this.id = t.id || L(), this.name = t.name, this.avatar = t.avatar;
60
+ }, this.typing = () => this.provider.setTypingState({ name: this.name, avatar: this.avatar }), this.id = t.id || L(), this.name = t.name, this.avatar = t.avatar;
67
61
  }
68
62
  update(e) {
69
- var n;
63
+ var i;
70
64
  const { name: t, avatar: s } = e;
71
- s === null ? this.avatar = void 0 : s && (this.avatar = s), t === null ? this.name = void 0 : t && (this.name = t), (n = this.provider.controller) == null || n.events.dispatch("conversation:agent-updated", {
65
+ s === null ? this.avatar = void 0 : s && (this.avatar = s), t === null ? this.name = void 0 : t && (this.name = t), (i = this.provider.controller) == null || i.events.dispatch("conversation:agent-updated", {
72
66
  agent: this
73
67
  });
74
68
  }
75
69
  }
76
- class T {
70
+ class N {
77
71
  constructor(e, t, s) {
78
- d(this, "subscriptions", []);
79
- d(this, "options");
80
- d(this, "user");
81
- this.name = e, this.container = t, this.controller = s, this.user = s == null ? void 0 : s.user, this.options = {
72
+ this.name = e, this.container = t, this.controller = s, this.subscriptions = [], this.user = s == null ? void 0 : s.user, this.options = {
82
73
  silent: !1
83
74
  };
84
75
  }
85
76
  static create(e, t, s) {
86
- return new T(e, t, s);
77
+ return new N(e, t, s);
87
78
  }
88
79
  createAgent(e = {}) {
89
80
  var t;
90
81
  if (this.controller) {
91
- const s = this.controller.getAgentById(e.id), n = s ? new x(this, g(g({}, s), e)) : new x(this, e);
82
+ const s = this.controller.getAgentById(e.id), i = s ? new I(this, p(p({}, s), e)) : new I(this, e);
92
83
  return s || (t = this.controller) == null || t.events.dispatch("conversation:agent-created", {
93
- agent: n
94
- }), n;
84
+ agent: i
85
+ }), i;
95
86
  }
96
87
  }
97
88
  print(e) {
@@ -106,9 +97,9 @@ class T {
106
97
  return this.controller ? this.controller.loader() : () => () => {
107
98
  };
108
99
  }
109
- createEntry(e, t, s, n, i) {
100
+ createEntry(e, t, s, i, n) {
110
101
  var a;
111
- return (a = this.controller) == null ? void 0 : a.createEntry(e, t, s, n, i);
102
+ return (a = this.controller) == null ? void 0 : a.createEntry(e, t, s, i, n);
112
103
  }
113
104
  dispose() {
114
105
  var e;
@@ -147,11 +138,10 @@ class T {
147
138
  }
148
139
  }
149
140
  }
150
- const q = (r) => `conversation-${r}`;
141
+ const U = (r) => `conversation-${r}`;
151
142
  class ee {
152
143
  constructor() {
153
- d(this, "_locking", Promise.resolve());
154
- d(this, "_locks", 0);
144
+ this._locking = Promise.resolve(), this._locks = 0;
155
145
  }
156
146
  isLocked() {
157
147
  return this._locks > 0;
@@ -159,8 +149,8 @@ class ee {
159
149
  lock() {
160
150
  this._locks += 1;
161
151
  let e, t = new Promise(
162
- (n) => e = () => {
163
- this._locks -= 1, n();
152
+ (i) => e = () => {
153
+ this._locks -= 1, i();
164
154
  }
165
155
  ), s = this._locking.then(() => e);
166
156
  return this._locking = this._locking.then(() => t), s;
@@ -168,24 +158,21 @@ class ee {
168
158
  }
169
159
  class te {
170
160
  constructor(e, t, s) {
171
- d(this, "sessionStorageKey");
172
- d(this, "locker", new ee());
173
- d(this, "initialStoredAgents", []);
174
- this.container = e, this.conversation = t, this.enabled = s, this.sessionStorageKey = q(t.id), t.onStarted(() => v(this, null, function* () {
161
+ this.container = e, this.conversation = t, this.enabled = s, this.locker = new ee(), this.initialStoredAgents = [], this.sessionStorageKey = U(t.id), t.onStarted(() => u(this, null, function* () {
175
162
  if (t.messages.length > 0)
176
163
  return;
177
- const { agents: n } = yield this.read(), i = [];
178
- n && n.forEach((o) => {
179
- const c = t.providerIndex(o.providerName), h = c > -1 ? t.registeredProviders[c] : t.createProvider(o.providerName), u = new x(h, { name: o.name, avatar: o.avatar, id: o.id });
180
- i.push(u);
164
+ const { agents: i } = yield this.read(), n = [];
165
+ i && i.forEach((o) => {
166
+ const c = t.providerIndex(o.providerName), d = c > -1 ? t.registeredProviders[c] : t.createProvider(o.providerName), l = new I(d, { name: o.name, avatar: o.avatar, id: o.id });
167
+ n.push(l);
181
168
  });
182
169
  const { messages: a } = yield this.read();
183
170
  a.forEach((o) => {
184
171
  switch (o.type) {
185
172
  case "agent": {
186
- const c = i.find((h) => {
187
- var u;
188
- return h.id === ((u = o.sender) == null ? void 0 : u.id);
173
+ const c = n.find((d) => {
174
+ var l;
175
+ return d.id === ((l = o.sender) == null ? void 0 : l.id);
189
176
  });
190
177
  c && c.print(o.content.items || o.content, {
191
178
  key: o.key
@@ -203,23 +190,23 @@ class te {
203
190
  t.print(o.content.items || o.content);
204
191
  }
205
192
  });
206
- })), t.onMessageCreated((n, i) => v(this, null, function* () {
207
- this.write(i.message, "messages");
208
- })), t.events.subscribe("conversation:agent-created", (n, i) => v(this, null, function* () {
193
+ })), t.onMessageCreated((i, n) => u(this, null, function* () {
194
+ this.write(n.message, "messages");
195
+ })), t.events.subscribe("conversation:agent-created", (i, n) => u(this, null, function* () {
209
196
  const a = {
210
- id: i.agent.id,
211
- name: i.agent.name,
212
- avatar: i.agent.avatar,
213
- providerName: i.agent.provider.name
197
+ id: n.agent.id,
198
+ name: n.agent.name,
199
+ avatar: n.agent.avatar,
200
+ providerName: n.agent.provider.name
214
201
  };
215
202
  yield this.write(a, "agents");
216
- })), t.events.subscribe("conversation:agent-updated", (n, i) => v(this, null, function* () {
203
+ })), t.events.subscribe("conversation:agent-updated", (i, n) => u(this, null, function* () {
217
204
  const { agents: a } = yield this.read();
218
205
  yield this.write(
219
206
  [
220
- ...a.map((o) => o.id === i.agent.id ? m(g({}, o), {
221
- name: i.agent.name,
222
- avatar: i.agent.avatar
207
+ ...a.map((o) => o.id === n.agent.id ? g(p({}, o), {
208
+ name: n.agent.name,
209
+ avatar: n.agent.avatar
223
210
  }) : o)
224
211
  ],
225
212
  "agents",
@@ -231,7 +218,7 @@ class te {
231
218
  this.initialStoredAgents = e.agents;
232
219
  }
233
220
  isRehydrated() {
234
- return v(this, null, function* () {
221
+ return u(this, null, function* () {
235
222
  const { messages: e } = yield this.read();
236
223
  return e.length > 0;
237
224
  });
@@ -241,43 +228,43 @@ class te {
241
228
  return this.initialStoredAgents.find((t) => t.id === e);
242
229
  }
243
230
  write(e, t, s = "add") {
244
- return v(this, null, function* () {
231
+ return u(this, null, function* () {
245
232
  if (!this.enabled)
246
233
  return;
247
- const n = yield this.locker.lock();
248
- return N(
234
+ const i = yield this.locker.lock();
235
+ return x(
249
236
  this.container,
250
237
  this.sessionStorageKey,
251
- R.Necessary
252
- ).then((i) => v(this, null, function* () {
238
+ W.Necessary
239
+ ).then((n) => u(this, null, function* () {
253
240
  if (s === "add") {
254
241
  const a = yield this.read();
255
242
  if (t === "messages" && a.messages.findIndex((c) => c.key === e.key) > -1) {
256
- n();
243
+ i();
257
244
  return;
258
245
  }
259
- let o = g({}, a);
260
- return t === "messages" ? o.messages = [...o.messages, e] : t === "agents" && (o.agents = [...o.agents, e]), i(g(g({}, a), o)).then(() => {
261
- n();
246
+ let o = p({}, a);
247
+ return t === "messages" ? o.messages = [...o.messages, e] : t === "agents" && (o.agents = [...o.agents, e]), n(p(p({}, a), o)).then(() => {
248
+ i();
262
249
  });
263
250
  }
264
251
  if (s === "update" && t === "agents") {
265
252
  const a = yield this.read();
266
- return i(m(g({}, a), {
253
+ return n(g(p({}, a), {
267
254
  agents: e
268
255
  })).then(() => {
269
- n();
256
+ i();
270
257
  });
271
258
  }
272
- return i(e).then(() => {
273
- n();
259
+ return n(e).then(() => {
260
+ i();
274
261
  });
275
262
  }));
276
263
  });
277
264
  }
278
265
  read() {
279
- return v(this, null, function* () {
280
- return b(this.container, this.sessionStorageKey).then((e) => e || {
266
+ return u(this, null, function* () {
267
+ return y(this.container, this.sessionStorageKey).then((e) => e || {
281
268
  messages: [],
282
269
  agents: []
283
270
  });
@@ -287,28 +274,27 @@ class te {
287
274
  const se = te;
288
275
  class re {
289
276
  constructor(e) {
290
- d(this, "print", (e, t) => {
291
- const s = D(e, t);
277
+ this.controller = e, this.print = (t, s) => {
278
+ const i = R(t, s);
292
279
  return this.controller.createEntry(
293
- s.key,
294
- s.content,
295
- I.User,
280
+ i.key,
281
+ i.content,
282
+ C.User,
296
283
  void 0,
297
- s.timestamp
284
+ i.timestamp
298
285
  );
299
- });
300
- this.controller = e;
286
+ };
301
287
  }
302
288
  }
303
- const W = (r, e, t) => v(void 0, null, function* () {
304
- const s = yield r.getAsync("conversation"), n = yield r.getAsync("components"), i = s.controllers.find((a) => a.conversation.id === e);
305
- if (i) {
306
- const a = [...i.conversation.providers];
289
+ const E = (r, e, t) => u(void 0, null, function* () {
290
+ const s = yield r.getAsync("conversation"), i = yield r.getAsync("components"), n = s.controllers.find((a) => a.conversation.id === e);
291
+ if (n) {
292
+ const a = [...n.conversation.providers];
307
293
  a.forEach((c) => {
308
- i.conversation.setProviderOptions(c, { silent: !0 });
309
- }), i.conversation.queueProviders(a), i.conversation.setProviders([t]);
310
- const o = n.components().ofType("conversation");
311
- n.write({
294
+ n.conversation.setProviderOptions(c, { silent: !0 });
295
+ }), n.conversation.queueProviders(a), n.conversation.setProviders([t]);
296
+ const o = i.components().ofType("conversation");
297
+ i.write({
312
298
  key: "setConversationProvider",
313
299
  attributes: {
314
300
  properties: { providers: [t] }
@@ -318,7 +304,7 @@ const W = (r, e, t) => v(void 0, null, function* () {
318
304
  });
319
305
  }
320
306
  });
321
- class ne {
307
+ class ie {
322
308
  constructor(e) {
323
309
  this.writer = e;
324
310
  }
@@ -333,81 +319,68 @@ class ne {
333
319
  return typeof e == "string" ? { body: e } : e.length > -1 && typeof e == "object" ? { items: e } : e;
334
320
  }
335
321
  }
336
- var I = /* @__PURE__ */ ((r) => (r.User = "user", r.Agent = "agent", r.System = "system", r))(I || {});
337
- const D = (r, e) => {
338
- let t, s = (e == null ? void 0 : e.key) || L(), n = Date.now();
322
+ var C = /* @__PURE__ */ ((r) => (r.User = "user", r.Agent = "agent", r.System = "system", r))(C || {});
323
+ const R = (r, e) => {
324
+ let t, s = (e == null ? void 0 : e.key) || L(), i = Date.now();
339
325
  if (Array.isArray(r) && r.length > -1)
340
326
  typeof r[0] == "string" ? t = { items: [r] } : t = { items: r };
341
327
  else if (typeof r == "string")
342
328
  t = { body: r };
343
329
  else if (r = r || {}, r.type)
344
- t = g({}, r);
330
+ t = p({}, r);
345
331
  else {
346
332
  if (t = {
347
333
  body: r.body,
348
334
  actions: r.actions,
349
335
  title: r.title
350
- }, r.key && (s = r.key), r.timestamp && (n = r.timestamp), typeof r.form == "function") {
351
- const i = X.create(s);
352
- r.form(i);
353
- const a = i.get();
336
+ }, r.key && (s = r.key), r.timestamp && (i = r.timestamp), typeof r.form == "function") {
337
+ const n = V.create(s);
338
+ r.form(n);
339
+ const a = n.get();
354
340
  t.form = a;
355
341
  }
356
- r.timestamp === null && (n = null);
342
+ r.timestamp === null && (i = null);
357
343
  }
358
- return { content: t, key: s, timestamp: n };
359
- }, H = (r, e) => {
344
+ return { content: t, key: s, timestamp: i };
345
+ }, z = (r, e) => {
360
346
  if (!e)
361
347
  return;
362
- const t = JSON.stringify(e), s = r.findIndex((n) => t === JSON.stringify(n));
348
+ const t = JSON.stringify(e), s = r.findIndex((i) => t === JSON.stringify(i));
363
349
  if (s > -1)
364
350
  return r.splice(s, 1);
365
351
  };
366
- class ie {
352
+ class ne {
367
353
  constructor(e, t, s) {
368
- d(this, "formHandlers", {});
369
- d(this, "user", new re(this));
370
- d(this, "events");
371
- d(this, "providers", []);
372
- d(this, "active", !1);
373
- d(this, "queuedProviders", []);
374
- d(this, "registeredProviders", []);
375
- d(this, "loaders", 0);
376
- d(this, "componentMounted", !1);
377
- d(this, "store");
378
- d(this, "messages", []);
379
- d(this, "typingActors", []);
380
- d(this, "print", (e) => {
381
- const t = D(e);
354
+ this.container = e, this.id = t, this.formHandlers = {}, this.user = new re(this), this.providers = [], this.active = !1, this.queuedProviders = [], this.registeredProviders = [], this.loaders = 0, this.componentMounted = !1, this.messages = [], this.typingActors = [], this.print = (n) => {
355
+ const a = R(n);
382
356
  return this.createEntry(
383
- t.key,
384
- t.content,
357
+ a.key,
358
+ a.content,
385
359
  "system",
386
360
  void 0,
387
- t.timestamp
361
+ a.timestamp
388
362
  );
389
- });
390
- this.container = e, this.id = t;
391
- const n = e.get("$widget");
392
- this.events = n.events.createChild(this), this.store = new se(e, this, s.rehydrate);
363
+ };
364
+ const i = e.get("$widget");
365
+ this.events = i.events.createChild(this), this.store = new se(e, this, s.rehydrate);
393
366
  }
394
367
  setInitialStorage(e) {
395
368
  this.store.setInitialData(e);
396
369
  }
397
370
  setProviders(e) {
398
371
  const t = [], s = [];
399
- this.providers.reduce((n, i) => (e.indexOf(i) === -1 && n.push(i), n), []).forEach((n) => {
400
- const i = this.providers.indexOf(n);
401
- i > -1 && (t.push(n), this.providers.splice(i, 1));
402
- }), e.forEach((n) => {
403
- this.providers.indexOf(n) === -1 && (s.push(n), this.providers.push(n));
372
+ this.providers.reduce((i, n) => (e.indexOf(n) === -1 && i.push(n), i), []).forEach((i) => {
373
+ const n = this.providers.indexOf(i);
374
+ n > -1 && (t.push(i), this.providers.splice(n, 1));
375
+ }), e.forEach((i) => {
376
+ this.providers.indexOf(i) === -1 && (s.push(i), this.providers.push(i));
404
377
  }), (s.length || t.length) && this.events.dispatch("conversation:providers-changed", { added: s, removed: t });
405
378
  }
406
379
  createProvider(e) {
407
380
  const t = this.providerIndex(e);
408
381
  if (t > -1)
409
382
  return this.registeredProviders[t];
410
- const s = T.create(e, this.container, this);
383
+ const s = N.create(e, this.container, this);
411
384
  return this.registeredProviders.push(s), s;
412
385
  }
413
386
  providerIndex(e) {
@@ -447,14 +420,14 @@ class ie {
447
420
  s > -1 && this.registeredProviders[s].setOptions(t);
448
421
  }
449
422
  changeProvider(e) {
450
- this.registeredProviders.find((s) => s.name === e) && W(this.container, this.id, e);
423
+ this.registeredProviders.find((s) => s.name === e) && E(this.container, this.id, e);
451
424
  }
452
425
  queueProviders(e) {
453
426
  this.queuedProviders = e;
454
427
  }
455
428
  onCompleteProvider() {
456
429
  const e = this.queuedProviders.pop();
457
- e && W(this.container, this.id, e);
430
+ e && E(this.container, this.id, e);
458
431
  }
459
432
  getComponentMountedState() {
460
433
  return this.componentMounted;
@@ -462,22 +435,22 @@ class ie {
462
435
  onUnreadMessage(e) {
463
436
  return this.events.subscribe("conversation:unread-message", e);
464
437
  }
465
- createEntry(e, t, s, n, i) {
438
+ createEntry(e, t, s, i, n) {
466
439
  const a = {
467
440
  key: e,
468
441
  content: t,
469
442
  type: s,
470
- sender: n || null,
471
- timestamp: i || i === null ? i : Date.now()
443
+ sender: i || null,
444
+ timestamp: n || n === null ? n : Date.now()
472
445
  };
473
- this.messages.push(a), a.type === "agent" && H(this.typingActors, n);
474
- const o = new ne((c) => {
446
+ this.messages.push(a), a.type === "agent" && z(this.typingActors, i);
447
+ const o = new ie((c) => {
475
448
  if (c !== null) {
476
- const h = c, { timestamp: u = void 0 } = h, f = $(h, ["timestamp"]);
477
- a.content = f, u && (a.timestamp = u);
449
+ const d = c, { timestamp: l = void 0 } = d, m = M(d, ["timestamp"]);
450
+ a.content = m, l && (a.timestamp = l);
478
451
  } else {
479
- const u = this.messages.indexOf(a);
480
- a.content = null, u > -1 && this.messages.splice(u, 1);
452
+ const l = this.messages.indexOf(a);
453
+ a.content = null, l > -1 && this.messages.splice(l, 1);
481
454
  }
482
455
  this.events.dispatch("conversation:message-updated", { message: a }), this.update();
483
456
  });
@@ -499,7 +472,7 @@ class ie {
499
472
  }
500
473
  setTypingState(e, t) {
501
474
  return this.typingActors.indexOf(e) === -1 && (this.typingActors.push(e), this.update()), () => {
502
- H(this.typingActors, e), this.update();
475
+ z(this.typingActors, e), this.update();
503
476
  };
504
477
  }
505
478
  loader() {
@@ -510,34 +483,34 @@ class ie {
510
483
  };
511
484
  }
512
485
  submitForm(e, t) {
513
- this.formHandlers[e] = m(g({}, this.formHandlers[e]), { submit: t });
486
+ this.formHandlers[e] = g(p({}, this.formHandlers[e]), { submit: t });
514
487
  }
515
488
  validateForm(e, t) {
516
- this.formHandlers[e] = m(g({}, this.formHandlers[e]), { validate: t });
489
+ this.formHandlers[e] = g(p({}, this.formHandlers[e]), { validate: t });
517
490
  }
518
491
  }
519
492
  const oe = (r, e) => {
520
493
  const t = r.split("_contact");
521
494
  return e.widgets.get(t[0]);
522
- }, O = (r) => {
523
- const e = r.get("$widget"), { name: t, implementation: s } = r.get("$widget"), n = t.indexOf("_contact") > -1 ? oe(t, s) : e, { data: i } = r.get("$settings"), { trigger: a } = n.container.get("$settings"), o = `${t.replace("_contact-method", "").replace("_contact", "")}_contact-method`, c = s.widgets.get(o);
524
- return c && !a ? { chatWidget: c, mainWidget: n, data: i } : { mainWidget: n, data: i };
495
+ }, T = (r) => {
496
+ const e = r.get("$widget"), { name: t, implementation: s } = r.get("$widget"), i = t.indexOf("_contact") > -1 ? oe(t, s) : e, { data: n } = r.get("$settings"), { trigger: a } = i.container.get("$settings"), o = `${t.replace("_contact-method", "").replace("_contact", "")}_contact-method`, c = s.widgets.get(o);
497
+ return c && !a ? { chatWidget: c, mainWidget: i, data: n } : { mainWidget: i, data: n };
525
498
  }, ae = (r) => {
526
- const { chatWidget: e } = O(r);
499
+ const { chatWidget: e } = T(r);
527
500
  return !!e;
528
- }, Q = (r, e, t) => {
529
- const { mainWidget: s, data: n, chatWidget: i } = O(r);
530
- return i ? i.state === "activated" ? i.invoke("open").then(() => {
531
- i.container.getAsync("conversation").then((a) => {
532
- a.navigateToConversationIfActive(e.id).then(() => z(r));
501
+ }, H = (r, e, t) => {
502
+ const { mainWidget: s, data: i, chatWidget: n } = T(r);
503
+ return n ? n.state === "activated" ? n.invoke("open").then(() => {
504
+ n.container.getAsync("conversation").then((a) => {
505
+ a.navigateToConversationIfActive(e.id).then(() => $(r));
533
506
  });
534
- }) : i.activate().then(() => {
535
- const { trigger: a } = i.container.get("$settings");
536
- return a.action = "hide", i.invoke("setSettings", () => ({
537
- data: n,
507
+ }) : n.activate().then(() => {
508
+ const { trigger: a } = n.container.get("$settings");
509
+ return a.action = "hide", n.invoke("setSettings", () => ({
510
+ data: i,
538
511
  trigger: a,
539
512
  activate: !0
540
- })).then(() => i.container.getAsync("components").then((o) => {
513
+ })).then(() => n.container.getAsync("components").then((o) => {
541
514
  const c = o.components().ofType("contact-method");
542
515
  o.write({
543
516
  key: "setContactMethodId",
@@ -550,45 +523,45 @@ const oe = (r, e) => {
550
523
  target: c,
551
524
  provider: "localStorage"
552
525
  });
553
- const h = o.components().ofType("conversation");
526
+ const d = o.components().ofType("conversation");
554
527
  o.write({
555
528
  key: "setConversationProvider",
556
529
  attributes: {
557
530
  properties: { providers: [e.clientName] }
558
531
  },
559
- target: h,
532
+ target: d,
560
533
  provider: "localStorage"
561
534
  });
562
535
  }));
563
- }).then(() => i.invoke("attach", {
536
+ }).then(() => n.invoke("attach", {
564
537
  key: "contact-method",
565
538
  triggerDOMElement: t,
566
539
  withRenderState: "open"
567
- })).then(() => (N(
568
- i.container,
540
+ })).then(() => (x(
541
+ n.container,
569
542
  "activeStickyWidget",
570
- R.Necessary,
543
+ W.Necessary,
571
544
  {
572
- medium: w.Local,
573
- scope: V.Implementation
545
+ medium: b.Local,
546
+ scope: G.Implementation
574
547
  }
575
- ).then((a) => a(i.name)), i.container.getAsync("conversation").then((a) => {
576
- a.setConversationEndedBehavior(C.Deactivate);
577
- }).then(() => z(r)).then(() => !1))) : (s.container.getAsync("conversation").then((a) => a.navigateToConversationIfActive(e.id).then(() => a.setConversationEndedBehavior(C.Navigate))), !i);
548
+ ).then((a) => a(n.name)), n.container.getAsync("conversation").then((a) => {
549
+ a.setConversationEndedBehavior(A.Deactivate);
550
+ }).then(() => $(r)).then(() => !1))) : (s.container.getAsync("conversation").then((a) => a.navigateToConversationIfActive(e.id).then(() => a.setConversationEndedBehavior(A.Navigate))), !n);
578
551
  }, ce = (r, e, t = "conversation") => {
579
- const { mainWidget: s, chatWidget: n } = O(r);
580
- return n ? n.container.getAsync("router").then((i) => {
581
- i.navigate(t, { id: e.id });
582
- }) : s.container.getAsync("conversation").then((i) => {
552
+ const { mainWidget: s, chatWidget: i } = T(r);
553
+ return i ? i.container.getAsync("router").then((n) => {
554
+ n.navigate(t, { id: e.id });
555
+ }) : s.container.getAsync("conversation").then((n) => {
583
556
  var a;
584
- (a = i.setConversationEndedBehavior(C.Navigate)) == null || a.then(() => {
557
+ (a = n.setConversationEndedBehavior(A.Navigate)) == null || a.then(() => {
585
558
  s.container.getAsync("router").then((o) => {
586
559
  s.container.getAsync("components").then((c) => {
587
- const h = c.components().ofType("conversation");
560
+ const d = c.components().ofType("conversation");
588
561
  c.write({
589
562
  key: "setConversationProvider",
590
563
  attributes: { properties: { providers: [e.clientName] } },
591
- target: h,
564
+ target: d,
592
565
  provider: "localStorage"
593
566
  });
594
567
  }).then(() => {
@@ -597,39 +570,30 @@ const oe = (r, e) => {
597
570
  });
598
571
  });
599
572
  });
600
- }, P = "conversations";
601
- var C = /* @__PURE__ */ ((r) => (r.Deactivate = "deactivate", r.Navigate = "navigate", r.None = "none", r))(C || {});
602
- class k {
573
+ }, w = "conversations";
574
+ var A = /* @__PURE__ */ ((r) => (r.Deactivate = "deactivate", r.Navigate = "navigate", r.None = "none", r))(A || {});
575
+ class P {
603
576
  constructor(e, t) {
604
- d(this, "events");
605
- d(this, "controllers", []);
606
- d(this, "providers", []);
607
- d(this, "disposeProviders", {});
608
- d(this, "subscriptions", []);
609
- d(this, "storageWriter", null);
610
- d(this, "router", null);
611
- d(this, "buttonQuery", null);
612
- d(this, "sessionInfo", null);
613
- this.container = e, this.components = t;
577
+ this.container = e, this.components = t, this.controllers = [], this.providers = [], this.disposeProviders = {}, this.subscriptions = [], this.storageWriter = null, this.router = null, this.buttonQuery = null, this.sessionInfo = null;
614
578
  const s = e.get("$widget");
615
579
  this.events = s.events.createChild(this);
616
580
  }
617
581
  initialize() {
618
- N(this.container, P, R.Necessary, {
619
- medium: w.Local
620
- }).then((e) => this.storageWriter = e), b(this.container, P, w.Local).then(
582
+ x(this.container, w, W.Necessary, {
583
+ medium: b.Local
584
+ }).then((e) => this.storageWriter = e), y(this.container, w, b.Local).then(
621
585
  (e) => {
622
586
  this.buttonQuery = this.components.components().ofType("conversation-return-button"), e && (this.sessionInfo = e, e.id && e.route && this.writeToComponents({ active: !0, alert: { show: !1 } }));
623
587
  }
624
588
  ), this.container.getAsync("router").then((e) => this.router = e), this.events.subscribe("conversation:ended", (e, t) => {
625
- var s, n, i;
589
+ var s, i, n;
626
590
  switch ((s = this.sessionInfo) == null ? void 0 : s.conversationEndedBehavior) {
627
591
  case "deactivate":
628
592
  this.container.get("$widget").deactivate();
629
593
  break;
630
594
  case "navigate":
631
- const o = (n = this.router) == null ? void 0 : n.getInitialRoute();
632
- o && ((i = this.router) == null || i.navigate(o.name));
595
+ const o = (i = this.router) == null ? void 0 : i.getInitialRoute();
596
+ o && ((n = this.router) == null || n.navigate(o.name));
633
597
  break;
634
598
  }
635
599
  this.writeToComponents({ active: !1 }), this.sessionInfo = null, this.storageWriter && this.storageWriter();
@@ -639,24 +603,24 @@ class k {
639
603
  this.subscriptions.push(e);
640
604
  }
641
605
  static getInstance(e, t = "conversation") {
642
- return Y(e)(() => e.getAsync(t).then((s) => {
643
- let n = s;
644
- return n || K.getInstance(e).then((i) => (n = new k(e, i), n.initialize(), e.registerAsync(t, () => n), n));
606
+ return J(e)(() => e.getAsync(t).then((s) => {
607
+ let i = s;
608
+ return i || Q.getInstance(e).then((n) => (i = new P(e, n), i.initialize(), e.registerAsync(t, () => i), i));
645
609
  }));
646
610
  }
647
611
  navigateToConversationIfActive(e) {
648
- return b(this.container, P, w.Local).then(
612
+ return y(this.container, w, b.Local).then(
649
613
  (t) => {
650
614
  var s;
651
615
  if (t && t.id === e && t.route) {
652
- const { name: n, params: i } = t.route;
653
- (s = this.router) == null || s.navigate(n, i);
616
+ const { name: i, params: n } = t.route;
617
+ (s = this.router) == null || s.navigate(i, n);
654
618
  }
655
619
  }
656
620
  );
657
621
  }
658
622
  setConversationEndedBehavior(e) {
659
- return b(this.container, P, w.Local).then(
623
+ return y(this.container, w, b.Local).then(
660
624
  (t) => {
661
625
  let s = t;
662
626
  return s ? s.conversationEndedBehavior = e : s = { conversationEndedBehavior: e }, this.sessionInfo = s, this.storageWriter && this.storageWriter(this.sessionInfo) || Promise.resolve();
@@ -664,13 +628,13 @@ class k {
664
628
  );
665
629
  }
666
630
  createController(e, t) {
667
- return v(this, null, function* () {
668
- const s = q(e), { agents: n } = (yield b(
631
+ return u(this, null, function* () {
632
+ const s = U(e), { agents: i } = (yield y(
669
633
  this.container,
670
634
  s
671
- )) || { agents: [] }, i = this.controllers.findIndex((o) => o.conversation.id === e);
635
+ )) || { agents: [] }, n = this.controllers.findIndex((o) => o.conversation.id === e);
672
636
  let a;
673
- return i > -1 ? a = this.controllers[i].conversation : a = new ie(this.container, e, t), a.setInitialStorage({ agents: n || [] }), a;
637
+ return n > -1 ? a = this.controllers[n].conversation : a = new ne(this.container, e, t), a.setInitialStorage({ agents: i || [] }), a;
674
638
  });
675
639
  }
676
640
  registerProvider(e, t) {
@@ -678,41 +642,41 @@ class k {
678
642
  name: e,
679
643
  handler: t
680
644
  };
681
- this.providers.push(s), this.controllers.filter((n) => n.conversation.providers.indexOf(e) > -1).forEach((n) => {
682
- this.invokeHandler(s, n);
645
+ this.providers.push(s), this.controllers.filter((i) => i.conversation.providers.indexOf(e) > -1).forEach((i) => {
646
+ this.invokeHandler(s, i);
683
647
  });
684
648
  }
685
649
  registerController(e, t) {
686
- const s = this.controllers.findIndex((i) => i.conversation.id === e.id);
687
- let n;
650
+ const s = this.controllers.findIndex((n) => n.conversation.id === e.id);
651
+ let i;
688
652
  if (s < 0) {
689
- n = { conversation: e, component: t }, this.controllers.push(n);
690
- const i = (a) => {
653
+ i = { conversation: e, component: t }, this.controllers.push(i);
654
+ const n = (a) => {
691
655
  a && this.providers.filter((o) => a.indexOf(o.name) > -1).forEach((o) => {
692
- this.invokeHandler(o, n);
656
+ this.invokeHandler(o, i);
693
657
  });
694
658
  };
695
659
  return this.subscriptions.push(
696
660
  e.onDispose((a, o) => {
697
- const c = this.controllers.findIndex((h) => h.conversation === o);
661
+ const c = this.controllers.findIndex((d) => d.conversation === o);
698
662
  c > -1 && this.controllers.splice(c, 1), this.components.components().ofType("conversation-return-button").select().writeProperties({ active: !1 }), this.events.dispatch("conversation:ended", {}, { bubbles: !0 });
699
663
  })
700
664
  ), this.subscriptions.push(
701
665
  e.onProvidersChange((a, o) => {
702
- const { added: c, removed: h = [] } = o;
703
- h.forEach((u) => {
704
- (this.disposeProviders[u] || []).forEach((f) => {
705
- f();
666
+ const { added: c, removed: d = [] } = o;
667
+ d.forEach((l) => {
668
+ (this.disposeProviders[l] || []).forEach((m) => {
669
+ m();
706
670
  });
707
- }), i(c);
671
+ }), n(c);
708
672
  })
709
673
  ), this.subscriptions.push(
710
674
  e.onStarted((a, o) => {
711
- var h, u;
675
+ var d, l;
712
676
  const c = {
713
677
  id: e.id,
714
- route: (h = this.router) == null ? void 0 : h.getRouteData(),
715
- conversationEndedBehavior: (u = this.sessionInfo) == null ? void 0 : u.conversationEndedBehavior
678
+ route: (d = this.router) == null ? void 0 : d.getRouteData(),
679
+ conversationEndedBehavior: (l = this.sessionInfo) == null ? void 0 : l.conversationEndedBehavior
716
680
  };
717
681
  this.sessionInfo = c, this.storageWriter && this.storageWriter(c), this.writeToComponents({ active: o });
718
682
  })
@@ -720,9 +684,9 @@ class k {
720
684
  e.onUnreadMessage((a, o) => {
721
685
  this.events.dispatch("conversation:unread-message", o), this.writeToComponents({ alert: { show: o } });
722
686
  })
723
- ), i(e.providers), !0;
687
+ ), n(e.providers), !0;
724
688
  }
725
- return n = this.controllers[s], !1;
689
+ return i = this.controllers[s], !1;
726
690
  }
727
691
  writeToComponents(e, t = "conversationReturnButtonState") {
728
692
  this.buttonQuery && this.components.write({
@@ -740,7 +704,7 @@ class k {
740
704
  s && (this.disposeProviders[e.name] || (this.disposeProviders[e.name] = []), this.disposeProviders[e.name].push(s));
741
705
  }
742
706
  getComponentRoute() {
743
- return b(this.container, P, w.Local).then(
707
+ return y(this.container, w, b.Local).then(
744
708
  (e) => e == null ? void 0 : e.route
745
709
  );
746
710
  }
@@ -753,20 +717,20 @@ class k {
753
717
  e();
754
718
  }), this.controllers = [], this.providers = [];
755
719
  }
756
- static handleContactMethodClick(e, t, s, n) {
757
- return v(this, null, function* () {
720
+ static handleContactMethodClick(e, t, s, i) {
721
+ return u(this, null, function* () {
758
722
  if (ae(t)) {
759
723
  e.preventDefault();
760
- let i = document.getElementById("humany-dynamic-anchor");
761
- i || (i = document.createElement("a"), i.setAttribute("href", "#"), i.id = "humany-dynamic-anchor", document.body.appendChild(i)), Q(t, s, i);
724
+ let n = document.getElementById("humany-dynamic-anchor");
725
+ n || (n = document.createElement("a"), n.setAttribute("href", "#"), n.id = "humany-dynamic-anchor", document.body.appendChild(n)), H(t, s, n);
762
726
  }
763
- Q(t, s);
727
+ H(t, s);
764
728
  });
765
729
  }
766
730
  static handleContactMethodSubmit(e, t) {
767
- return v(this, null, function* () {
768
- var s, n;
769
- return (n = (s = t == null ? void 0 : t.body.form.meta) == null ? void 0 : s.conversation) != null && n.id ? W(
731
+ return u(this, null, function* () {
732
+ var s, i;
733
+ return (i = (s = t == null ? void 0 : t.body.form.meta) == null ? void 0 : s.conversation) != null && i.id ? E(
770
734
  e,
771
735
  t.body.form.meta.conversation.id,
772
736
  t.clientName
@@ -774,95 +738,95 @@ class k {
774
738
  });
775
739
  }
776
740
  }
777
- const de = (r, e) => r.reduce((t, s, n) => {
741
+ const de = (r, e) => r.reduce((t, s, i) => {
778
742
  var a, o;
779
- const i = m(g({}, s), {
780
- content: [m(g({}, s.content), { key: s.key })]
743
+ const n = g(p({}, s), {
744
+ content: [g(p({}, s.content), { key: s.key })]
781
745
  });
782
- if (t.length > 0 && s.type !== I.System) {
746
+ if (t.length > 0 && s.type !== C.System) {
783
747
  const c = t[t.length - 1];
784
748
  if ((!e && e !== 0 || Math.abs(c.timestamp - s.timestamp) < e) && ((a = c.sender) == null ? void 0 : a.name) === ((o = s.sender) == null ? void 0 : o.name) && c.type === s.type)
785
- return c.timestamp = s.timestamp, c.content.push(m(g({}, s.content), { key: s.key })), t;
749
+ return c.timestamp = s.timestamp, c.content.push(g(p({}, s.content), { key: s.key })), t;
786
750
  }
787
- return t.push(i), t;
751
+ return t.push(n), t;
788
752
  }, []), be = (r) => Promise.all([
789
- k.getInstance(r),
753
+ P.getInstance(r),
790
754
  r.getAsync("router")
791
- ]).then(([e, t]) => U(
755
+ ]).then(([e, t]) => Y(
792
756
  r,
793
757
  "conversation",
794
- import("./conversation.bc31361a.js"),
795
- (s) => v(void 0, null, function* () {
796
- const { rehydrate: n = !1 } = s.properties(), a = t.getRouteData().params.id || s.node.name || "component", o = yield e.createController(a, { rehydrate: n }), c = e.registerController(o, s), h = 3 * 60 * 1e3, u = (p) => {
797
- const { providers: l = [] } = p;
798
- if (l) {
799
- const y = Array.isArray(l) ? l : [l];
800
- return o.setProviders(y), y;
758
+ import("./conversation-wrapper.bfcf4c5c.js"),
759
+ (s) => u(void 0, null, function* () {
760
+ const { rehydrate: i = !1 } = s.properties(), a = t.getRouteData().params.id || s.node.name || "component", o = yield e.createController(a, { rehydrate: i }), c = e.registerController(o, s), d = 3 * 60 * 1e3, l = (v) => {
761
+ const { providers: h = [] } = v;
762
+ if (h) {
763
+ const f = Array.isArray(h) ? h : [h];
764
+ return o.setProviders(f), f;
801
765
  }
802
766
  };
803
- u(s.properties(u)), o.setComponentMountedState(!0);
804
- const f = (p) => {
805
- const { loading: l, typingActors: y, messages: S } = p;
767
+ l(s.properties(l)), o.setComponentMountedState(!0);
768
+ const m = (v) => {
769
+ const { loading: h, typingActors: f, messages: k } = v;
806
770
  s.writeProperties({
807
- loading: l,
808
- typingActors: y,
809
- messages: de(S, h)
771
+ loading: h,
772
+ typingActors: f,
773
+ messages: de(k, d)
810
774
  });
811
775
  };
812
- f(o.getMessageStream()), c && (s.writeProperties({ conversationControllerId: o.id }), s.actions.create("user-submit", (p, l) => {
813
- if (l) {
814
- const { preventDefault: y, validationPromise: S } = l;
815
- if (y) {
816
- S && S().then((_) => {
817
- _ && o.user.print(_);
776
+ m(o.getMessageStream()), c && (s.writeProperties({ conversationControllerId: o.id }), s.actions.create("user-submit", (v, h) => {
777
+ if (h) {
778
+ const { preventDefault: f, validationPromise: k } = h;
779
+ if (f) {
780
+ k && k().then((D) => {
781
+ D && o.user.print(D);
818
782
  });
819
783
  return;
820
784
  }
821
785
  }
822
- o.user.print(p.text);
823
- }), s.actions.create("user-typing", (p, l) => {
824
- }), s.actions.create("form", (p, l) => {
825
- }), s.actions.create("action", (p, l) => {
826
- }), s.actions.create("overlay-mounted", (p, l) => {
827
- }), s.actions.create("show-overlay", (p, l) => {
786
+ o.user.print(v.text);
787
+ }), s.actions.create("user-typing", (v, h) => {
788
+ }), s.actions.create("form", (v, h) => {
789
+ }), s.actions.create("action", (v, h) => {
790
+ }), s.actions.create("overlay-mounted", (v, h) => {
791
+ }), s.actions.create("show-overlay", (v, h) => {
828
792
  s.writeProperties({
829
793
  overlay: { conversation: !1, secondary: !1 }
830
794
  });
831
- }), s.actions.create("hide-overlay", (p, l) => {
795
+ }), s.actions.create("hide-overlay", (v, h) => {
832
796
  s.writeProperties({
833
797
  overlay: null
834
798
  });
835
- }), s.actions.create("show-overlay-conversation", (p, l) => {
799
+ }), s.actions.create("show-overlay-conversation", (v, h) => {
836
800
  s.writeProperties({
837
801
  overlay: { conversation: !0, secondary: !1 }
838
802
  });
839
- }), s.actions.create("hide-overlay-conversation", (p, l) => {
803
+ }), s.actions.create("hide-overlay-conversation", (v, h) => {
840
804
  s.writeProperties({
841
805
  overlay: { conversation: !1, secondary: !1 }
842
806
  });
843
807
  }));
844
- const F = o.events.subscribe(
808
+ const q = o.events.subscribe(
845
809
  "conversation:updated",
846
- (p, l) => {
847
- f(l);
810
+ (v, h) => {
811
+ m(h);
848
812
  }
849
813
  );
850
814
  return () => {
851
- o.setComponentMountedState(!1), F(), o.active || f({ messages: [], typingActors: [], loading: !1 });
815
+ o.setComponentMountedState(!1), q(), o.active || m({ messages: [], typingActors: [], loading: !1 });
852
816
  };
853
817
  }),
854
818
  { reuseController: !0 }
855
819
  )), we = (r) => Promise.all([
856
- K.getInstance(r),
857
- k.getInstance(r),
820
+ Q.getInstance(r),
821
+ P.getInstance(r),
858
822
  r.getAsync("router")
859
823
  ]).then(
860
- ([e, t, s]) => U(
824
+ ([e, t, s]) => X(
861
825
  r,
862
826
  "conversation-return-button",
863
827
  import("./return-button.fb63a16e.js"),
864
- (n) => {
865
- n.actions.create("toggle", (i = {}) => {
828
+ (i) => {
829
+ i.actions.create("toggle", (n = {}) => {
866
830
  var a;
867
831
  (a = t.getComponentRoute()) == null || a.then((o) => {
868
832
  o && s.navigate(o.name, o.params);
@@ -872,8 +836,8 @@ const de = (r, e) => r.reduce((t, s, n) => {
872
836
  )
873
837
  );
874
838
  var he = /* @__PURE__ */ ((r) => (r.LinkList = "link-list", r.Separator = "separator", r.ButtonList = "button-list", r.Text = "text", r.HTML = "html", r.VideoRequest = "video-request", r))(he || {});
875
- const Pe = (r, e, t) => r.getAsync("componentResolver").then((s) => v(void 0, null, function* () {
876
- (yield k.getInstance(r)).addSubscription(
839
+ const Pe = (r, e, t) => r.getAsync("componentResolver").then((s) => u(void 0, null, function* () {
840
+ (yield P.getInstance(r)).addSubscription(
877
841
  s.registerComponent(
878
842
  e,
879
843
  Z(() => t)
@@ -882,12 +846,12 @@ const Pe = (r, e, t) => r.getAsync("componentResolver").then((s) => v(void 0, nu
882
846
  }));
883
847
  export {
884
848
  be as ConversationComponent,
885
- ie as ConversationController,
886
- C as ConversationEndedBehavior,
887
- ne as ConversationEntry,
849
+ ne as ConversationController,
850
+ A as ConversationEndedBehavior,
851
+ ie as ConversationEntry,
888
852
  he as ConversationMessageListItemType,
889
- I as ConversationMessageType,
890
- k as ConversationPlatform,
853
+ C as ConversationMessageType,
854
+ P as ConversationPlatform,
891
855
  we as ConversationReturnButtonComponent,
892
856
  Pe as registerCustomMessageComponent
893
857
  };