@_solaris/messenger-widget 0.2.17 → 0.2.19

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/messenger.js CHANGED
@@ -1,4 +1,4 @@
1
- import { reactive as Ae, openBlock as l, createElementBlock as d, createVNode as V, Transition as Se, withCtx as xe, withKeys as me, withModifiers as Q, createElementVNode as i, toDisplayString as b, createCommentVNode as y, normalizeStyle as q, normalizeClass as E, Fragment as M, renderList as j, resolveComponent as O, createBlock as $, createTextVNode as ae, resolveDynamicComponent as Me, renderSlot as Te, withDirectives as z, vModelText as Y, vModelCheckbox as Ie, vModelSelect as Oe, createStaticVNode as ue, markRaw as fe } from "vue";
1
+ import { reactive as Ae, openBlock as l, createElementBlock as d, createVNode as z, Transition as Se, withCtx as xe, withKeys as me, withModifiers as J, createElementVNode as i, toDisplayString as b, createCommentVNode as w, normalizeStyle as V, normalizeClass as E, Fragment as M, renderList as j, resolveComponent as O, createBlock as R, createTextVNode as re, resolveDynamicComponent as Me, renderSlot as Te, withDirectives as H, vModelText as K, vModelCheckbox as Ie, vModelSelect as Oe, createStaticVNode as ue, markRaw as fe } from "vue";
2
2
  const Ee = [
3
3
  "connected",
4
4
  "message",
@@ -100,7 +100,7 @@ function $e(t) {
100
100
  const h = await o("GET", "/customers/me");
101
101
  return (h == null ? void 0 : h.customer) ?? null;
102
102
  }
103
- async function w(h) {
103
+ async function y(h) {
104
104
  const f = await o("PATCH", "/customers/me", h);
105
105
  return (f == null ? void 0 : f.customer) ?? null;
106
106
  }
@@ -108,7 +108,7 @@ function $e(t) {
108
108
  const h = await o("GET", "/conversations");
109
109
  return (h == null ? void 0 : h.conversations) ?? [];
110
110
  }
111
- async function L(h = {}) {
111
+ async function $(h = {}) {
112
112
  return (await o("POST", "/conversations", h)).conversation;
113
113
  }
114
114
  async function A(h) {
@@ -127,7 +127,7 @@ function $e(t) {
127
127
  );
128
128
  }
129
129
  async function U(h, f) {
130
- K();
130
+ G();
131
131
  const _ = {
132
132
  client_msg_id: f.client_msg_id,
133
133
  type: "content",
@@ -142,7 +142,7 @@ function $e(t) {
142
142
  );
143
143
  }
144
144
  async function F(h, f, _) {
145
- return K(), o(
145
+ return G(), o(
146
146
  "POST",
147
147
  `/messages/${encodeURIComponent(h)}/callbacks/${encodeURIComponent(f)}`,
148
148
  _ ? { inputs: _ } : {}
@@ -173,13 +173,13 @@ function $e(t) {
173
173
  size_bytes: k
174
174
  };
175
175
  }
176
- async function W(h) {
176
+ async function q(h) {
177
177
  return o(
178
178
  "GET",
179
179
  `/attachments/sign?path=${encodeURIComponent(h)}`
180
180
  );
181
181
  }
182
- function G() {
182
+ function ie() {
183
183
  const h = new URLSearchParams({
184
184
  userId: e.userId,
185
185
  userHash: e.userHash,
@@ -187,18 +187,18 @@ function $e(t) {
187
187
  }).toString();
188
188
  return `${e.baseUrl}/stream?${h}`;
189
189
  }
190
- function H() {
190
+ function W() {
191
191
  if (!e.eventSource && !(typeof document < "u" && document.hidden))
192
192
  try {
193
- const h = new EventSource(G());
193
+ const h = new EventSource(ie());
194
194
  for (const f of Ee)
195
- h.addEventListener(f, (_) => J(f, _.data));
195
+ h.addEventListener(f, (_) => ae(f, _.data));
196
196
  h.addEventListener("error", () => a("error", new Error("SSE error"))), e.eventSource = h, r("open");
197
197
  } catch (h) {
198
198
  console.error("[transport] SSE open failed", h), a("error", h);
199
199
  }
200
200
  }
201
- function J(h, f) {
201
+ function ae(h, f) {
202
202
  try {
203
203
  const _ = JSON.parse(f), k = _ && typeof _ == "object" && "data" in _ ? _.data : _;
204
204
  a(h, k);
@@ -206,16 +206,16 @@ function $e(t) {
206
206
  console.error("[transport] bad SSE payload", h, _);
207
207
  }
208
208
  }
209
- function X() {
209
+ function Y() {
210
210
  e.eventSource && (e.eventSource.close(), e.eventSource = null), e.connection !== "paused" && r("idle");
211
211
  }
212
- function K() {
213
- clearTimeout(e.burstTimer), H(), e.panelOpen || (e.burstTimer = setTimeout(() => {
214
- e.panelOpen || X();
212
+ function G() {
213
+ clearTimeout(e.burstTimer), W(), e.panelOpen || (e.burstTimer = setTimeout(() => {
214
+ e.panelOpen || Y();
215
215
  }, Le));
216
216
  }
217
217
  function oe(h) {
218
- e.panelOpen = !!h, e.panelOpen ? (clearTimeout(e.burstTimer), H()) : K();
218
+ e.panelOpen = !!h, e.panelOpen ? (clearTimeout(e.burstTimer), W()) : G();
219
219
  }
220
220
  async function le() {
221
221
  try {
@@ -223,12 +223,12 @@ function $e(t) {
223
223
  const T = I == null ? void 0 : I.last_message_at;
224
224
  return T && (!k || T > k) ? T : k;
225
225
  }, null);
226
- f && (!e.lastActivityAt || f > e.lastActivityAt) && (e.lastActivityAt = f, a("activity", { conversations: h, latestAt: f }), K());
226
+ f && (!e.lastActivityAt || f > e.lastActivityAt) && (e.lastActivityAt = f, a("activity", { conversations: h, latestAt: f }), G());
227
227
  } catch (h) {
228
228
  console.error("[transport] poll failed", h);
229
229
  }
230
230
  }
231
- function ee() {
231
+ function Q() {
232
232
  u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(le, Be));
233
233
  }
234
234
  function u() {
@@ -237,14 +237,14 @@ function $e(t) {
237
237
  function m() {
238
238
  if (document.hidden)
239
239
  clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = setTimeout(() => {
240
- e.hiddenGraceTimer = null, document.hidden && (u(), X(), r("paused"));
240
+ e.hiddenGraceTimer = null, document.hidden && (u(), Y(), r("paused"));
241
241
  }, Re);
242
242
  else {
243
243
  if (e.hiddenGraceTimer) {
244
244
  clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null;
245
245
  return;
246
246
  }
247
- r("idle"), ee(), e.panelOpen && H();
247
+ r("idle"), Q(), e.panelOpen && W();
248
248
  }
249
249
  }
250
250
  async function p() {
@@ -261,10 +261,10 @@ function $e(t) {
261
261
  } catch (f) {
262
262
  console.error("[transport] initial /conversations failed", f);
263
263
  }
264
- return typeof document < "u" && (e.visibilityHandler = m, document.addEventListener("visibilitychange", e.visibilityHandler)), ee(), h;
264
+ return typeof document < "u" && (e.visibilityHandler = m, document.addEventListener("visibilitychange", e.visibilityHandler)), Q(), h;
265
265
  }
266
266
  function g() {
267
- u(), clearTimeout(e.burstTimer), clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null, X(), e.visibilityHandler && (document.removeEventListener("visibilitychange", e.visibilityHandler), e.visibilityHandler = null), e.started = !1;
267
+ u(), clearTimeout(e.burstTimer), clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null, Y(), e.visibilityHandler && (document.removeEventListener("visibilitychange", e.visibilityHandler), e.visibilityHandler = null), e.started = !1;
268
268
  }
269
269
  return {
270
270
  on: n,
@@ -274,16 +274,16 @@ function $e(t) {
274
274
  // REST
275
275
  bootstrap: v,
276
276
  getCustomer: C,
277
- patchCustomer: w,
277
+ patchCustomer: y,
278
278
  listConversations: S,
279
- createConversation: L,
279
+ createConversation: $,
280
280
  getConversation: A,
281
281
  patchConversation: N,
282
282
  listMessages: x,
283
283
  postMessage: U,
284
284
  postCallback: F,
285
285
  uploadAttachment: P,
286
- signAttachment: W,
286
+ signAttachment: q,
287
287
  // Read-only state
288
288
  get connection() {
289
289
  return e.connection;
@@ -344,7 +344,7 @@ function De(t) {
344
344
  e.connection = u;
345
345
  })), n.push(t.on("message", (u) => {
346
346
  const m = u == null ? void 0 : u.conversation_id, p = u == null ? void 0 : u.message;
347
- !m || !(p != null && p.id) || (H(m, p), p.client_msg_id && delete e.streamingByMsgId[p.client_msg_id], K(m, p.created_at));
347
+ !m || !(p != null && p.id) || (W(m, p), p.client_msg_id && delete e.streamingByMsgId[p.client_msg_id], G(m, p.created_at));
348
348
  })), n.push(t.on("message_stream", (u) => {
349
349
  const m = u == null ? void 0 : u.message_id, p = u == null ? void 0 : u.token;
350
350
  !m || typeof p != "string" || (e.streamingByMsgId[m] = (e.streamingByMsgId[m] || "") + p);
@@ -400,7 +400,7 @@ function De(t) {
400
400
  async function v(u) {
401
401
  if (e.messagesByConv[u]) return;
402
402
  const m = await t.listMessages(u, { limit: c });
403
- e.messagesByConv[u] = (m == null ? void 0 : m.messages) ?? [], w(u, {
403
+ e.messagesByConv[u] = (m == null ? void 0 : m.messages) ?? [], y(u, {
404
404
  nextCursor: (m == null ? void 0 : m.next_cursor) ?? null,
405
405
  loading: !1,
406
406
  loaded: !0
@@ -409,39 +409,39 @@ function De(t) {
409
409
  async function C(u) {
410
410
  const m = e.paginationByConv[u];
411
411
  if (!(!m || m.loading || !m.nextCursor)) {
412
- w(u, { ...m, loading: !0 });
412
+ y(u, { ...m, loading: !0 });
413
413
  try {
414
414
  let h = m.nextCursor, f = [], _ = 0;
415
415
  for (; _ < 6 && h; _++) {
416
- const R = await t.listMessages(u, {
416
+ const L = await t.listMessages(u, {
417
417
  before: h,
418
418
  limit: c
419
- }), te = (R == null ? void 0 : R.messages) ?? [];
420
- if (f = [...te, ...f], h = (R == null ? void 0 : R.next_cursor) ?? null, !te.length || f.length >= 60) break;
419
+ }), Z = (L == null ? void 0 : L.messages) ?? [];
420
+ if (f = [...Z, ...f], h = (L == null ? void 0 : L.next_cursor) ?? null, !Z.length || f.length >= 60) break;
421
421
  }
422
- const k = e.messagesByConv[u] || [], I = new Set(k.map((R) => String(R == null ? void 0 : R.id))), T = [...f.filter((R) => !I.has(String(R == null ? void 0 : R.id))), ...k];
423
- e.messagesByConv[u] = T, w(u, {
422
+ const k = e.messagesByConv[u] || [], I = new Set(k.map((L) => String(L == null ? void 0 : L.id))), T = [...f.filter((L) => !I.has(String(L == null ? void 0 : L.id))), ...k];
423
+ e.messagesByConv[u] = T, y(u, {
424
424
  nextCursor: h,
425
425
  loading: !1,
426
426
  loaded: !0
427
427
  });
428
428
  } catch (p) {
429
- console.error("[store] loadMore failed", p), w(u, { ...m, loading: !1 });
429
+ console.error("[store] loadMore failed", p), y(u, { ...m, loading: !1 });
430
430
  }
431
431
  }
432
432
  }
433
- function w(u, m) {
433
+ function y(u, m) {
434
434
  e.paginationByConv = { ...e.paginationByConv, [u]: m };
435
435
  }
436
436
  async function S(u, m) {
437
437
  const p = await t.patchConversation(u, m), g = e.conversations.findIndex((h) => h.id === u);
438
438
  g !== -1 && (e.conversations[g] = p);
439
439
  }
440
- async function L(u, m, { attachments: p, metadata: g } = {}) {
440
+ async function $(u, m, { attachments: p, metadata: g } = {}) {
441
441
  var T;
442
442
  const h = (m || "").trim(), f = Array.isArray(p) && p.length > 0;
443
443
  if (!u || !h && !f) return;
444
- const _ = Ue(), k = ee(u), I = {
444
+ const _ = Ue(), k = Q(u), I = {
445
445
  id: _,
446
446
  client_msg_id: _,
447
447
  conversation_id: u,
@@ -457,7 +457,7 @@ function De(t) {
457
457
  ...f ? { payload: { type: "content", attachments: p } } : {},
458
458
  ...g && typeof g == "object" ? { metadata: g } : {}
459
459
  };
460
- H(u, I);
460
+ W(u, I);
461
461
  try {
462
462
  await t.postMessage(u, {
463
463
  client_msg_id: _,
@@ -466,8 +466,8 @@ function De(t) {
466
466
  ...f ? { attachments: p } : {},
467
467
  ...g && typeof g == "object" ? { metadata: g } : {}
468
468
  });
469
- } catch (R) {
470
- console.error("[store] send failed", R), X(u, _, { _failed: !0, _pending: !1 });
469
+ } catch (L) {
470
+ console.error("[store] send failed", L), Y(u, _, { _failed: !0, _pending: !1 });
471
471
  }
472
472
  }
473
473
  async function A(u, m, p) {
@@ -528,7 +528,7 @@ function De(t) {
528
528
  }
529
529
  return null;
530
530
  }
531
- function W(u) {
531
+ function q(u) {
532
532
  const m = e.runningActionsByConv[u];
533
533
  if (!m) return null;
534
534
  const p = Object.keys(m);
@@ -536,7 +536,7 @@ function De(t) {
536
536
  const g = p[0];
537
537
  return { id: g, payload: { name: m[g] } };
538
538
  }
539
- function G(u) {
539
+ function ie(u) {
540
540
  var p, g, h, f;
541
541
  const m = e.messagesByConv[u] || [];
542
542
  for (let _ = m.length - 1; _ >= 0; _--) {
@@ -547,34 +547,34 @@ function De(t) {
547
547
  const I = (f = k == null ? void 0 : k.metadata) == null ? void 0 : f.suggested_replies;
548
548
  return Array.isArray(I) && I.length ? I.map((T) => {
549
549
  if (typeof T == "string") {
550
- const R = T.trim();
551
- return R ? { label: R, kind: null } : null;
550
+ const L = T.trim();
551
+ return L ? { label: L, kind: null } : null;
552
552
  }
553
553
  if (T && typeof T == "object" && typeof T.label == "string") {
554
- const R = T.label.trim();
555
- if (!R) return null;
556
- const te = T.kind === "cta" || T.kind === "choice" || T.kind === "followup" ? T.kind : null;
557
- return { label: R, kind: te };
554
+ const L = T.label.trim();
555
+ if (!L) return null;
556
+ const Z = T.kind === "cta" || T.kind === "choice" || T.kind === "followup" ? T.kind : null;
557
+ return { label: L, kind: Z };
558
558
  }
559
559
  return null;
560
560
  }).filter(Boolean).slice(0, 4) : [];
561
561
  }
562
562
  return [];
563
563
  }
564
- function H(u, m) {
564
+ function W(u, m) {
565
565
  var f;
566
566
  const p = e.messagesByConv[u] || [];
567
567
  let g = -1;
568
568
  m != null && m.client_msg_id && (g = p.findIndex(
569
569
  (_) => (_ == null ? void 0 : _.client_msg_id) && _.client_msg_id === m.client_msg_id
570
- )), g === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (g = p.findIndex((_) => J(_ == null ? void 0 : _.id, m.id)));
570
+ )), g === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (g = p.findIndex((_) => ae(_ == null ? void 0 : _.id, m.id)));
571
571
  let h;
572
572
  g === -1 ? h = [...p, m].sort(oe) : (h = p.slice(), h[g] = { ...p[g], ...m, _pending: !1, _failed: !1 }), e.messagesByConv[u] = h, (m == null ? void 0 : m.type) === "action" && ((f = m == null ? void 0 : m.payload) != null && f.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && e.awaitingCallback[m.id] && delete e.awaitingCallback[m.id];
573
573
  }
574
- function J(u, m) {
574
+ function ae(u, m) {
575
575
  return u === m ? !0 : u == null || m == null ? !1 : String(u) === String(m);
576
576
  }
577
- function X(u, m, p) {
577
+ function Y(u, m, p) {
578
578
  const g = e.messagesByConv[u];
579
579
  if (!g) return;
580
580
  const h = g.findIndex((_) => _.id === m);
@@ -582,7 +582,7 @@ function De(t) {
582
582
  const f = g.slice();
583
583
  f[h] = { ...g[h], ...p }, e.messagesByConv[u] = f;
584
584
  }
585
- function K(u, m) {
585
+ function G(u, m) {
586
586
  const p = e.conversations.findIndex((h) => h.id === u);
587
587
  if (p === -1) return;
588
588
  const g = e.conversations[p];
@@ -603,7 +603,7 @@ function De(t) {
603
603
  h !== void 0 && (g === "name" || g === "email" ? h != null && String(h).trim() !== "" && (m[g] = h) : (g === "values" || g === "metadata") && h && typeof h == "object" ? Object.assign(p, h) : p[g] = h);
604
604
  return Object.keys(p).length && (m.values = p), Object.keys(m).length ? m : null;
605
605
  }
606
- function ee(u) {
606
+ function Q(u) {
607
607
  const m = e.messagesByConv[u] || [];
608
608
  let p = "";
609
609
  for (const f of m)
@@ -620,13 +620,13 @@ function De(t) {
620
620
  openConversation: v,
621
621
  loadMore: C,
622
622
  patchConversation: S,
623
- send: L,
623
+ send: $,
624
624
  clickCallback: A,
625
625
  signAttachment: x,
626
626
  submitFeedback: U,
627
627
  getPendingApproval: F,
628
- getActionInFlight: W,
629
- getLatestSuggestions: G,
628
+ getActionInFlight: q,
629
+ getLatestSuggestions: ie,
630
630
  getLatestForm: P,
631
631
  // Pass-through for panel open/close (controls SSE burst).
632
632
  setPanelOpen: t.setPanelOpen
@@ -722,7 +722,7 @@ const Ne = `
722
722
  }, ze = { class: "wm-launcherWrap" }, Ve = { class: "wm-peek__text" }, qe = ["aria-label"];
723
723
  function We(t, e, n, a, r, s) {
724
724
  return l(), d("div", ze, [
725
- V(Se, { name: "wm-peek" }, {
725
+ z(Se, { name: "wm-peek" }, {
726
726
  default: xe(() => [
727
727
  n.peek ? (l(), d("div", {
728
728
  key: 0,
@@ -732,8 +732,8 @@ function We(t, e, n, a, r, s) {
732
732
  "aria-label": "Ouvrir le messenger sur le dernier message",
733
733
  onClick: e[1] || (e[1] = (o) => t.$emit("open")),
734
734
  onKeydown: [
735
- e[2] || (e[2] = me(Q((o) => t.$emit("open"), ["prevent"]), ["enter"])),
736
- e[3] || (e[3] = me(Q((o) => t.$emit("open"), ["prevent"]), ["space"]))
735
+ e[2] || (e[2] = me(J((o) => t.$emit("open"), ["prevent"]), ["enter"])),
736
+ e[3] || (e[3] = me(J((o) => t.$emit("open"), ["prevent"]), ["space"]))
737
737
  ]
738
738
  }, [
739
739
  i("p", Ve, b(n.peek), 1),
@@ -741,7 +741,7 @@ function We(t, e, n, a, r, s) {
741
741
  type: "button",
742
742
  class: "wm-peek__close",
743
743
  "aria-label": "Ignorer",
744
- onClick: e[0] || (e[0] = Q((o) => t.$emit("dismiss"), ["stop"]))
744
+ onClick: e[0] || (e[0] = J((o) => t.$emit("dismiss"), ["stop"]))
745
745
  }, [...e[5] || (e[5] = [
746
746
  i("svg", {
747
747
  width: "11",
@@ -757,7 +757,7 @@ function We(t, e, n, a, r, s) {
757
757
  i("path", { d: "M18 6L6 18M6 6l12 12" })
758
758
  ], -1)
759
759
  ])])
760
- ], 32)) : y("", !0)
760
+ ], 32)) : w("", !0)
761
761
  ]),
762
762
  _: 1
763
763
  }),
@@ -784,7 +784,7 @@ function We(t, e, n, a, r, s) {
784
784
  key: 0,
785
785
  class: "wm-launcher__badge",
786
786
  "aria-label": `${n.unreadCount} conversation${n.unreadCount > 1 ? "s" : ""} non lue${n.unreadCount > 1 ? "s" : ""}`
787
- }, b(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, qe)) : y("", !0)
787
+ }, b(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, qe)) : w("", !0)
788
788
  ])
789
789
  ]);
790
790
  }
@@ -807,9 +807,9 @@ const Ge = /* @__PURE__ */ B(He, [["render", We], ["__scopeId", "data-v-fabef371
807
807
  function Xe(t, e, n, a, r, s) {
808
808
  return l(), d("div", {
809
809
  class: E(["wm-aiav", { "wm-aiav--tail": n.tail }]),
810
- style: q({ width: n.size + "px", height: n.size + "px", "--wm-avr": n.size * 0.32 + "px" })
810
+ style: V({ width: n.size + "px", height: n.size + "px", "--wm-avr": n.size * 0.32 + "px" })
811
811
  }, [
812
- n.pulse ? (l(), d("div", Ye)) : y("", !0),
812
+ n.pulse ? (l(), d("div", Ye)) : w("", !0),
813
813
  i("div", {
814
814
  class: E(["wm-aiav__inner", { "wm-aiav__inner--glow": n.pulse }])
815
815
  }, [
@@ -843,7 +843,7 @@ function Xe(t, e, n, a, r, s) {
843
843
  ], 2)
844
844
  ], 6);
845
845
  }
846
- const Z = /* @__PURE__ */ B(Ke, [["render", Xe], ["__scopeId", "data-v-8c924688"]]), Qe = {
846
+ const X = /* @__PURE__ */ B(Ke, [["render", Xe], ["__scopeId", "data-v-8c924688"]]), Qe = {
847
847
  name: "WmHumanAvatar",
848
848
  props: {
849
849
  name: { type: String, default: "" },
@@ -862,7 +862,7 @@ const Z = /* @__PURE__ */ B(Ke, [["render", Xe], ["__scopeId", "data-v-8c924688"
862
862
  function et(t, e, n, a, r, s) {
863
863
  return l(), d("div", {
864
864
  class: "wm-huav",
865
- style: q({
865
+ style: V({
866
866
  width: n.size + "px",
867
867
  height: n.size + "px",
868
868
  "--wm-avr": Math.round(n.size * 0.32) + "px",
@@ -875,7 +875,7 @@ function et(t, e, n, a, r, s) {
875
875
  alt: n.name || ""
876
876
  }, null, 8, Ze)) : (l(), d("span", {
877
877
  key: 1,
878
- style: q({ fontSize: n.size * 0.36 + "px" })
878
+ style: V({ fontSize: n.size * 0.36 + "px" })
879
879
  }, b(s.initials), 5))
880
880
  ], 4);
881
881
  }
@@ -912,12 +912,12 @@ function at(t, e, n, a, r, s) {
912
912
  return s.visible ? (l(), d("div", nt, [
913
913
  i("div", {
914
914
  class: "wm-team__stack",
915
- style: q({ width: s.stackWidth + "px" })
915
+ style: V({ width: s.stackWidth + "px" })
916
916
  }, [
917
917
  (l(!0), d(M, null, j(n.members.slice(0, 3), (o, c) => (l(), d("div", {
918
918
  key: c,
919
919
  class: "wm-team__pill",
920
- style: q({ left: c * 13 + "px", zIndex: 3 - c, background: s.colorFor(o) })
920
+ style: V({ left: c * 13 + "px", zIndex: 3 - c, background: s.colorFor(o) })
921
921
  }, [
922
922
  o.avatar_url ? (l(), d("img", {
923
923
  key: 0,
@@ -926,12 +926,12 @@ function at(t, e, n, a, r, s) {
926
926
  }, null, 8, st)) : (l(), d("span", rt, b(s.initialsFor(o)), 1))
927
927
  ], 4))), 128))
928
928
  ], 4),
929
- n.responseLabel ? (l(), d("span", it, b(n.responseLabel), 1)) : y("", !0)
930
- ])) : y("", !0);
929
+ n.responseLabel ? (l(), d("span", it, b(n.responseLabel), 1)) : w("", !0)
930
+ ])) : w("", !0);
931
931
  }
932
932
  const ot = /* @__PURE__ */ B(tt, [["render", at], ["__scopeId", "data-v-3659b9c1"]]), lt = {
933
933
  name: "WmHeader",
934
- components: { AIAvatar: Z, HumanAvatar: ke, TeamAvatars: ot },
934
+ components: { AIAvatar: X, HumanAvatar: ke, TeamAvatars: ot },
935
935
  props: {
936
936
  title: { type: String, default: "Nouvelle conversation" },
937
937
  escalated: { type: Boolean, default: !1 },
@@ -998,12 +998,12 @@ function gt(t, e, n, a, r, s) {
998
998
  ])])) : (l(), d("div", dt)),
999
999
  n.showIdentity ? (l(), d(M, { key: 2 }, [
1000
1000
  i("div", ut, [
1001
- n.escalated ? (l(), $(o, {
1001
+ n.escalated ? (l(), R(o, {
1002
1002
  key: 0,
1003
1003
  name: n.agentName,
1004
1004
  "avatar-url": n.agentAvatarUrl,
1005
1005
  size: 34
1006
- }, null, 8, ["name", "avatar-url"])) : (l(), $(c, {
1006
+ }, null, 8, ["name", "avatar-url"])) : (l(), R(c, {
1007
1007
  key: 1,
1008
1008
  size: 34
1009
1009
  }))
@@ -1011,16 +1011,16 @@ function gt(t, e, n, a, r, s) {
1011
1011
  i("div", ht, [
1012
1012
  i("div", mt, b(n.title), 1),
1013
1013
  s.showPresence ? (l(), d("div", ft, [
1014
- s.hasTeam ? (l(), $(v, {
1014
+ s.hasTeam ? (l(), R(v, {
1015
1015
  key: 0,
1016
1016
  members: n.teamMembers,
1017
1017
  "response-label": n.responseLabel
1018
- }, null, 8, ["members", "response-label"])) : y("", !0),
1018
+ }, null, 8, ["members", "response-label"])) : w("", !0),
1019
1019
  i("span", pt, [
1020
1020
  e[4] || (e[4] = i("span", { class: "wm-header__dot" }, null, -1)),
1021
- ae(" " + b(s.statusText), 1)
1021
+ re(" " + b(s.statusText), 1)
1022
1022
  ])
1023
- ])) : y("", !0)
1023
+ ])) : w("", !0)
1024
1024
  ])
1025
1025
  ], 64)) : (l(), d("div", _t)),
1026
1026
  i("div", vt, [
@@ -1055,7 +1055,7 @@ function gt(t, e, n, a, r, s) {
1055
1055
  r: "1.6"
1056
1056
  })
1057
1057
  ], -1)
1058
- ])], 2)) : y("", !0),
1058
+ ])], 2)) : w("", !0),
1059
1059
  n.showClose ? (l(), d("button", {
1060
1060
  key: 1,
1061
1061
  type: "button",
@@ -1077,7 +1077,7 @@ function gt(t, e, n, a, r, s) {
1077
1077
  }, [
1078
1078
  i("path", { d: "M18 6L6 18M6 6l12 12" })
1079
1079
  ], -1)
1080
- ])])) : y("", !0)
1080
+ ])])) : w("", !0)
1081
1081
  ])
1082
1082
  ]);
1083
1083
  }
@@ -1089,7 +1089,7 @@ const yt = /* @__PURE__ */ B(lt, [["render", gt], ["__scopeId", "data-v-b5f5f6a9
1089
1089
  link: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
1090
1090
  }, wt = {
1091
1091
  name: "WmOnboarding",
1092
- components: { AIAvatar: Z },
1092
+ components: { AIAvatar: X },
1093
1093
  props: {
1094
1094
  welcomeMessage: { type: String, default: "" },
1095
1095
  agentName: { type: String, default: "" },
@@ -1133,7 +1133,7 @@ function Nt(t, e, n, a, r, s) {
1133
1133
  const o = O("AIAvatar");
1134
1134
  return l(), d("div", bt, [
1135
1135
  i("div", kt, [
1136
- V(o, {
1136
+ z(o, {
1137
1137
  size: 56,
1138
1138
  pulse: !0
1139
1139
  }),
@@ -1188,7 +1188,7 @@ function Nt(t, e, n, a, r, s) {
1188
1188
  ], -1))
1189
1189
  ], 8, Mt))), 128))
1190
1190
  ])
1191
- ])) : y("", !0),
1191
+ ])) : w("", !0),
1192
1192
  n.quickLinks.length ? (l(), d("div", Et, [
1193
1193
  e[5] || (e[5] = i("div", { class: "wm-onb__section-title" }, "Accès rapide", -1)),
1194
1194
  i("div", Bt, [
@@ -1222,7 +1222,7 @@ function Nt(t, e, n, a, r, s) {
1222
1222
  ], -1))
1223
1223
  ], 8, Lt))), 128))
1224
1224
  ])
1225
- ])) : y("", !0),
1225
+ ])) : w("", !0),
1226
1226
  i("div", Ut, [
1227
1227
  i("button", {
1228
1228
  type: "button",
@@ -1333,7 +1333,7 @@ function Xt(t, e, n, a, r, s) {
1333
1333
  "aria-hidden": "true"
1334
1334
  }, "·", -1)),
1335
1335
  i("span", Jt, b(s.detailText), 1)
1336
- ], 64)) : y("", !0)
1336
+ ], 64)) : w("", !0)
1337
1337
  ], 2);
1338
1338
  }
1339
1339
  const Qt = /* @__PURE__ */ B(zt, [["render", Xt], ["__scopeId", "data-v-7f90dad6"]]), Zt = {
@@ -1366,7 +1366,7 @@ function an(t, e, n, a, r, s) {
1366
1366
  }, [
1367
1367
  i("polyline", { points: "20 6 9 17 4 12" })
1368
1368
  ]),
1369
- ae(" Envoyé ")
1369
+ re(" Envoyé ")
1370
1370
  ], -1))
1371
1371
  ]),
1372
1372
  i("div", sn, [
@@ -1418,19 +1418,19 @@ function yn(t, e, n, a, r, s) {
1418
1418
  alt: n.data.title || "",
1419
1419
  loading: "lazy"
1420
1420
  }, null, 8, un)
1421
- ])) : y("", !0),
1421
+ ])) : w("", !0),
1422
1422
  i("div", hn, [
1423
1423
  i("div", mn, [
1424
1424
  i("div", fn, b(n.data.title), 1),
1425
- n.data.subtitle ? (l(), d("div", pn, b(n.data.subtitle), 1)) : y("", !0)
1425
+ n.data.subtitle ? (l(), d("div", pn, b(n.data.subtitle), 1)) : w("", !0)
1426
1426
  ]),
1427
1427
  n.data.badge && n.data.badge.label ? (l(), d("span", {
1428
1428
  key: 0,
1429
1429
  class: E(["wm-art__badge", `wm-art__badge--${n.data.badge.tone || "neutral"}`])
1430
- }, b(n.data.badge.label), 3)) : y("", !0)
1430
+ }, b(n.data.badge.label), 3)) : w("", !0)
1431
1431
  ]),
1432
1432
  s.hasBody ? (l(), d("div", _n, [
1433
- n.data.body ? (l(), d("div", vn, b(n.data.body), 1)) : y("", !0),
1433
+ n.data.body ? (l(), d("div", vn, b(n.data.body), 1)) : w("", !0),
1434
1434
  s.fields.length ? (l(!0), d(M, { key: 1 }, j(s.fields, (o, c) => (l(), d("div", {
1435
1435
  key: c,
1436
1436
  class: "wm-art__field"
@@ -1439,8 +1439,8 @@ function yn(t, e, n, a, r, s) {
1439
1439
  i("div", {
1440
1440
  class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1441
1441
  }, b(o.value), 3)
1442
- ]))), 128)) : y("", !0)
1443
- ])) : y("", !0)
1442
+ ]))), 128)) : w("", !0)
1443
+ ])) : w("", !0)
1444
1444
  ]);
1445
1445
  }
1446
1446
  const wn = /* @__PURE__ */ B(ln, [["render", yn], ["__scopeId", "data-v-d7369333"]]);
@@ -1519,10 +1519,10 @@ function Ln(t, e, n, a, r, s) {
1519
1519
  class: "wm-tk__dot",
1520
1520
  "aria-hidden": "true"
1521
1521
  }, null, -1)),
1522
- ae(" " + b(n.data.status.label), 1)
1522
+ re(" " + b(n.data.status.label), 1)
1523
1523
  ], 2)
1524
1524
  ]),
1525
- n.data.body ? (l(), d("div", Tn, b(n.data.body), 1)) : y("", !0)
1525
+ n.data.body ? (l(), d("div", Tn, b(n.data.body), 1)) : w("", !0)
1526
1526
  ]),
1527
1527
  s.fields.length ? (l(), d("div", In, [
1528
1528
  (l(!0), d(M, null, j(s.fields, (o, c) => (l(), d("div", {
@@ -1563,11 +1563,11 @@ function Ln(t, e, n, a, r, s) {
1563
1563
  height: "9",
1564
1564
  rx: "0.5"
1565
1565
  }, null, -1)
1566
- ])], 8, En)) : y("", !0),
1566
+ ])], 8, En)) : w("", !0),
1567
1567
  i("span", null, b(o.value), 1)
1568
1568
  ], 2)
1569
1569
  ]))), 128))
1570
- ])) : y("", !0),
1570
+ ])) : w("", !0),
1571
1571
  n.data.created_at ? (l(), d("div", Bn, [
1572
1572
  e[3] || (e[3] = i("svg", {
1573
1573
  width: "11",
@@ -1590,7 +1590,7 @@ function Ln(t, e, n, a, r, s) {
1590
1590
  i("path", { d: "M16 2v4M8 2v4M3 10h18" })
1591
1591
  ], -1)),
1592
1592
  i("span", null, b(s.formattedDate), 1)
1593
- ])) : y("", !0)
1593
+ ])) : w("", !0)
1594
1594
  ]);
1595
1595
  }
1596
1596
  const Rn = /* @__PURE__ */ B(kn, [["render", Ln], ["__scopeId", "data-v-97001af0"]]), $n = {
@@ -1613,10 +1613,10 @@ const Rn = /* @__PURE__ */ B(kn, [["render", Ln], ["__scopeId", "data-v-97001af0
1613
1613
  }
1614
1614
  };
1615
1615
  function jn(t, e, n, a, r, s) {
1616
- return s.component ? (l(), $(Me(s.component), {
1616
+ return s.component ? (l(), R(Me(s.component), {
1617
1617
  key: 0,
1618
1618
  data: n.artifact.data
1619
- }, null, 8, ["data"])) : y("", !0);
1619
+ }, null, 8, ["data"])) : w("", !0);
1620
1620
  }
1621
1621
  const Un = /* @__PURE__ */ B(Fn, [["render", jn]]), Dn = {
1622
1622
  name: "WmAttachmentPreview",
@@ -1733,9 +1733,9 @@ function Yn(t, e, n, a, r, s) {
1733
1733
  ], -1)),
1734
1734
  i("span", qn, [
1735
1735
  i("span", Wn, b(s.displayName), 1),
1736
- s.sizeLabel ? (l(), d("span", Gn, b(s.sizeLabel), 1)) : y("", !0)
1736
+ s.sizeLabel ? (l(), d("span", Gn, b(s.sizeLabel), 1)) : w("", !0)
1737
1737
  ]),
1738
- r.loading ? (l(), d("span", Kn)) : y("", !0)
1738
+ r.loading ? (l(), d("span", Kn)) : w("", !0)
1739
1739
  ], 8, Vn))
1740
1740
  ], 2);
1741
1741
  }
@@ -1747,7 +1747,7 @@ function Qn(t) {
1747
1747
  return /^(https?:\/\/|mailto:|tel:)/i.test(String(t).trim());
1748
1748
  }
1749
1749
  const _e = "";
1750
- function ne(t) {
1750
+ function ee(t) {
1751
1751
  let e = t;
1752
1752
  const n = [];
1753
1753
  return e = e.replace(/`([^`\n]+)`/g, (a, r) => {
@@ -1781,20 +1781,20 @@ function Zn(t) {
1781
1781
  if (!S) break;
1782
1782
  C.push(S[1]), a++;
1783
1783
  }
1784
- const w = C.map((S) => `<li>${ne(S)}</li>`).join("");
1785
- n.push({ type: "block", html: `<ul class="wm-md-ul">${w}</ul>` });
1784
+ const y = C.map((S) => `<li>${ee(S)}</li>`).join("");
1785
+ n.push({ type: "block", html: `<ul class="wm-md-ul">${y}</ul>` });
1786
1786
  continue;
1787
1787
  }
1788
1788
  const c = /^\s*(\d+)\.\s+(.*)$/.exec(s);
1789
1789
  if (c) {
1790
- const C = parseInt(c[1], 10), w = [c[2]];
1790
+ const C = parseInt(c[1], 10), y = [c[2]];
1791
1791
  for (a++; a < e.length; ) {
1792
1792
  const A = /^\s*\d+\.\s+(.*)$/.exec(e[a]);
1793
1793
  if (!A) break;
1794
- w.push(A[1]), a++;
1794
+ y.push(A[1]), a++;
1795
1795
  }
1796
- const S = w.map((A) => `<li>${ne(A)}</li>`).join(""), L = C !== 1 ? ` start="${C}"` : "";
1797
- n.push({ type: "block", html: `<ol class="wm-md-ol"${L}>${S}</ol>` });
1796
+ const S = y.map((A) => `<li>${ee(A)}</li>`).join(""), $ = C !== 1 ? ` start="${C}"` : "";
1797
+ n.push({ type: "block", html: `<ol class="wm-md-ol"${$}>${S}</ol>` });
1798
1798
  continue;
1799
1799
  }
1800
1800
  const v = /^(#{1,6})\s+(.*)$/.exec(s);
@@ -1802,11 +1802,11 @@ function Zn(t) {
1802
1802
  const C = v[1].length;
1803
1803
  n.push({
1804
1804
  type: "block",
1805
- html: `<h${C} class="wm-md-h wm-md-h${C}">${ne(v[2])}</h${C}>`
1805
+ html: `<h${C} class="wm-md-h wm-md-h${C}">${ee(v[2])}</h${C}>`
1806
1806
  }), a++;
1807
1807
  continue;
1808
1808
  }
1809
- n.push({ type: "text", html: ne(s) }), a++;
1809
+ n.push({ type: "text", html: ee(s) }), a++;
1810
1810
  }
1811
1811
  let r = "";
1812
1812
  for (let s = 0; s < n.length; s++) {
@@ -1849,7 +1849,7 @@ function as(t, e, n, a, r, s) {
1849
1849
  ])]);
1850
1850
  }
1851
1851
  const os = /* @__PURE__ */ B(rs, [["render", as], ["__scopeId", "data-v-df2447fd"]]);
1852
- function se(t) {
1852
+ function te(t) {
1853
1853
  return t ? t.client_msg_id || t.id : "";
1854
1854
  }
1855
1855
  const ls = {
@@ -1861,7 +1861,7 @@ const ls = {
1861
1861
  idle: "Conversation en pause"
1862
1862
  }, cs = 80, ds = 200, us = {
1863
1863
  name: "WmMessageList",
1864
- components: { AIAvatar: Z, HumanAvatar: ke, Bubble: ss, Typing: os, ActionResult: Qt, AttachmentPreview: Jn, ArtifactRenderer: Un },
1864
+ components: { AIAvatar: X, HumanAvatar: ke, Bubble: ss, Typing: os, ActionResult: Qt, AttachmentPreview: Jn, ArtifactRenderer: Un },
1865
1865
  props: {
1866
1866
  messages: { type: Array, default: () => [] },
1867
1867
  streamingActive: { type: Boolean, default: !1 },
@@ -1902,7 +1902,7 @@ const ls = {
1902
1902
  if (((e = s == null ? void 0 : s.payload) == null ? void 0 : e.event) === "action_admin_pending") {
1903
1903
  const C = t[t.length - 1];
1904
1904
  C && C.role === "ai" ? C.messages.push(s) : t.push({
1905
- key: `g-${se(s)}`,
1905
+ key: `g-${te(s)}`,
1906
1906
  role: "ai",
1907
1907
  agentName: "",
1908
1908
  agentAvatarUrl: null,
@@ -1912,7 +1912,7 @@ const ls = {
1912
1912
  continue;
1913
1913
  }
1914
1914
  t.push({
1915
- key: `sys-${se(s)}`,
1915
+ key: `sys-${te(s)}`,
1916
1916
  role: o,
1917
1917
  messages: [s],
1918
1918
  items: [],
@@ -1922,7 +1922,7 @@ const ls = {
1922
1922
  }
1923
1923
  const c = t[t.length - 1];
1924
1924
  c && c.role === o && (o === "ai" || c.agentName === (((n = s == null ? void 0 : s.author) == null ? void 0 : n.name) || "")) ? c.messages.push(s) : t.push({
1925
- key: `g-${se(s)}`,
1925
+ key: `g-${te(s)}`,
1926
1926
  role: o,
1927
1927
  agentName: ((a = s == null ? void 0 : s.author) == null ? void 0 : a.name) || "",
1928
1928
  agentAvatarUrl: ((r = s == null ? void 0 : s.author) == null ? void 0 : r.avatar_url) || null,
@@ -1966,7 +1966,7 @@ const ls = {
1966
1966
  this._lastSeenConvId = this.conversationId, this.scrollToBottom();
1967
1967
  },
1968
1968
  methods: {
1969
- messageKey: se,
1969
+ messageKey: te,
1970
1970
  isAtBottom(t) {
1971
1971
  return t.scrollHeight - t.scrollTop - t.clientHeight <= cs;
1972
1972
  },
@@ -2133,10 +2133,10 @@ const ls = {
2133
2133
  // they're the last item of the cluster — BL for ai/human, BR for
2134
2134
  // user.
2135
2135
  cornersFor(t, e) {
2136
- var P, W, G;
2137
- const n = t.items, a = (P = n[e]) == null ? void 0 : P.kind, r = (W = n[e - 1]) == null ? void 0 : W.kind, s = (G = n[e + 1]) == null ? void 0 : G.kind, o = t.role === "user", c = 14, v = 4, C = (H, J) => H === "card" && J === "bubble", w = r ? r.bottom : null, S = s ? s.top : null, L = C(w, a.top), A = C(S, a.bottom);
2138
- let N = c, x = c, U = c, F = c;
2139
- return o ? (w && (x = v, (L || A && a.top === "bubble") && (N = v)), S && (U = v, (A || L && a.bottom === "bubble") && (F = v)), !S && a.bottom === "bubble" && (U = v)) : (w && (N = v, (L || A && a.top === "bubble") && (x = v)), S && (F = v, (A || L && a.bottom === "bubble") && (U = v)), !S && a.bottom === "bubble" && (F = v)), { tl: N, tr: x, br: U, bl: F };
2136
+ var F, P, q;
2137
+ const n = t.items, a = (F = n[e]) == null ? void 0 : F.kind, r = (P = n[e - 1]) == null ? void 0 : P.kind, s = (q = n[e + 1]) == null ? void 0 : q.kind, o = t.role === "user", c = 14, v = 4, C = r == null ? void 0 : r.bottom, y = s == null ? void 0 : s.top, S = !!C && !!(a != null && a.top) && C !== a.top, $ = !!y && !!(a != null && a.bottom) && y !== a.bottom;
2138
+ let A = c, N = c, x = c, U = c;
2139
+ return o ? (C && (N = v, S && (A = v)), y && (x = v, $ && (U = v)), !y && (a == null ? void 0 : a.bottom) === "bubble" && (x = v)) : (C && (A = v, S && (N = v)), y && (U = v, $ && (x = v)), !y && (a == null ? void 0 : a.bottom) === "bubble" && (U = v)), { tl: A, tr: N, br: x, bl: U };
2140
2140
  },
2141
2141
  // Inline style emitting the four corner CSS variables. Set on
2142
2142
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -2230,7 +2230,7 @@ const ls = {
2230
2230
  class: "wm-list__row wm-list__row--ai fade-up"
2231
2231
  }, Ss = { class: "wm-list__avatarSlot" };
2232
2232
  function xs(t, e, n, a, r, s) {
2233
- const o = O("AIAvatar"), c = O("HumanAvatar"), v = O("ActionResult"), C = O("ArtifactRenderer"), w = O("Bubble"), S = O("AttachmentPreview"), L = O("Typing");
2233
+ const o = O("AIAvatar"), c = O("HumanAvatar"), v = O("ActionResult"), C = O("ArtifactRenderer"), y = O("Bubble"), S = O("AttachmentPreview"), $ = O("Typing");
2234
2234
  return l(), d("div", {
2235
2235
  ref: "scrollEl",
2236
2236
  class: E(["wm-list", { "wm-list--silent": r.silentFades }]),
@@ -2242,12 +2242,12 @@ function xs(t, e, n, a, r, s) {
2242
2242
  "aria-hidden": "true"
2243
2243
  }, null, -1),
2244
2244
  i("span", { class: "wm-list__loadMore-lbl" }, "Chargement de l'historique…", -1)
2245
- ])])) : s.historyExhausted ? (l(), d("div", ms, "Début de la conversation")) : y("", !0),
2245
+ ])])) : s.historyExhausted ? (l(), d("div", ms, "Début de la conversation")) : w("", !0),
2246
2246
  n.dateLabel ? (l(), d("div", fs, [
2247
2247
  e[2] || (e[2] = i("div", { class: "wm-list__line" }, null, -1)),
2248
2248
  i("span", ps, b(n.dateLabel), 1),
2249
2249
  e[3] || (e[3] = i("div", { class: "wm-list__line" }, null, -1))
2250
- ])) : y("", !0),
2250
+ ])) : w("", !0),
2251
2251
  (l(!0), d(M, null, j(s.groups, (A, N) => (l(), d(M, {
2252
2252
  key: A.key
2253
2253
  }, [
@@ -2255,7 +2255,7 @@ function xs(t, e, n, a, r, s) {
2255
2255
  i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1),
2256
2256
  i("span", { class: "wm-list__sep-label wm-list__sep-label--unread" }, "Non lus", -1),
2257
2257
  i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)
2258
- ])])) : y("", !0),
2258
+ ])])) : w("", !0),
2259
2259
  i("div", {
2260
2260
  class: E(["wm-list__group", "wm-list__group--" + A.role])
2261
2261
  }, [
@@ -2267,78 +2267,78 @@ function xs(t, e, n, a, r, s) {
2267
2267
  (l(!0), d(M, null, j(A.items, (x, U) => (l(), d("div", {
2268
2268
  key: `${s.messageKey(x.message)}-${x.partKey}`,
2269
2269
  class: E(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x.message._pending, "is-failed": x.message._failed }]]),
2270
- style: q(s.cornersStyle(A, U))
2270
+ style: V(s.cornersStyle(A, U))
2271
2271
  }, [
2272
2272
  A.role !== "user" ? (l(), d("div", ys, [
2273
2273
  U === A.items.length - 1 ? (l(), d(M, { key: 0 }, [
2274
- A.role === "ai" ? (l(), $(o, {
2274
+ A.role === "ai" ? (l(), R(o, {
2275
2275
  key: 0,
2276
2276
  size: 26,
2277
2277
  tail: !0
2278
- })) : (l(), $(c, {
2278
+ })) : (l(), R(c, {
2279
2279
  key: 1,
2280
2280
  name: A.agentName,
2281
2281
  "avatar-url": A.agentAvatarUrl,
2282
2282
  size: 26
2283
2283
  }, null, 8, ["name", "avatar-url"]))
2284
- ], 64)) : y("", !0)
2285
- ])) : y("", !0),
2286
- x.renderAs === "action" ? (l(), $(v, {
2284
+ ], 64)) : w("", !0)
2285
+ ])) : w("", !0),
2286
+ x.renderAs === "action" ? (l(), R(v, {
2287
2287
  key: 1,
2288
2288
  state: x.message.payload.state,
2289
2289
  label: s.actionLabel(x.message),
2290
2290
  detail: s.actionDetail(x.message)
2291
- }, null, 8, ["state", "label", "detail"])) : x.renderAs === "admin-pending" ? (l(), $(v, {
2291
+ }, null, 8, ["state", "label", "detail"])) : x.renderAs === "admin-pending" ? (l(), R(v, {
2292
2292
  key: 2,
2293
2293
  state: "awaiting",
2294
2294
  label: "Demande d'approbation envoyée",
2295
2295
  detail: x.message.text_md || ""
2296
- }, null, 8, ["detail"])) : x.renderAs === "artifact-of-action" ? (l(), $(C, {
2296
+ }, null, 8, ["detail"])) : x.renderAs === "artifact-of-action" ? (l(), R(C, {
2297
2297
  key: 3,
2298
2298
  artifact: s.actionArtifact(x.message)
2299
- }, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(), $(C, {
2299
+ }, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(), R(C, {
2300
2300
  key: 4,
2301
2301
  artifact: s.artifactOf(x.message)
2302
2302
  }, null, 8, ["artifact"])) : (l(), d("div", ws, [
2303
- x.message.text_md ? (l(), $(w, {
2303
+ x.message.text_md ? (l(), R(y, {
2304
2304
  key: 0,
2305
2305
  role: A.role,
2306
2306
  text: x.message.text_md
2307
- }, null, 8, ["role", "text"])) : y("", !0),
2307
+ }, null, 8, ["role", "text"])) : w("", !0),
2308
2308
  s.attachmentsOf(x.message).length ? (l(), d("div", {
2309
2309
  key: 1,
2310
2310
  class: E(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
2311
2311
  }, [
2312
- (l(!0), d(M, null, j(s.attachmentsOf(x.message), (F, P) => (l(), $(S, {
2312
+ (l(!0), d(M, null, j(s.attachmentsOf(x.message), (F, P) => (l(), R(S, {
2313
2313
  key: `${s.messageKey(x.message)}-att-${P}`,
2314
2314
  attachment: F
2315
2315
  }, null, 8, ["attachment"]))), 128))
2316
- ], 2)) : y("", !0)
2316
+ ], 2)) : w("", !0)
2317
2317
  ]))
2318
2318
  ], 6))), 128)),
2319
2319
  A.role !== "user" || s.lastTimeOf(A) ? (l(), d("div", {
2320
2320
  key: 0,
2321
2321
  class: E(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
2322
2322
  }, [
2323
- A.role !== "user" ? (l(), d("span", bs, b(s.roleLabel(A)), 1)) : y("", !0),
2324
- A.role !== "user" && s.lastTimeOf(A) ? (l(), d("span", ks, "·")) : y("", !0),
2325
- s.lastTimeOf(A) ? (l(), d("span", Cs, b(s.lastTimeOf(A)), 1)) : y("", !0)
2326
- ], 2)) : y("", !0)
2323
+ A.role !== "user" ? (l(), d("span", bs, b(s.roleLabel(A)), 1)) : w("", !0),
2324
+ A.role !== "user" && s.lastTimeOf(A) ? (l(), d("span", ks, "·")) : w("", !0),
2325
+ s.lastTimeOf(A) ? (l(), d("span", Cs, b(s.lastTimeOf(A)), 1)) : w("", !0)
2326
+ ], 2)) : w("", !0)
2327
2327
  ], 64))
2328
2328
  ], 2)
2329
2329
  ], 64))), 128)),
2330
2330
  n.streamingActive ? (l(), d("div", As, [
2331
2331
  i("div", Ss, [
2332
- V(o, {
2332
+ z(o, {
2333
2333
  size: 26,
2334
2334
  tail: !0
2335
2335
  })
2336
2336
  ]),
2337
- V(L)
2338
- ])) : y("", !0)
2337
+ z($)
2338
+ ])) : w("", !0)
2339
2339
  ], 34);
2340
2340
  }
2341
- const Ms = /* @__PURE__ */ B(us, [["render", xs], ["__scopeId", "data-v-508689eb"]]), re = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
2341
+ const Ms = /* @__PURE__ */ B(us, [["render", xs], ["__scopeId", "data-v-6d8aa76a"]]), ne = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
2342
2342
  function Ts() {
2343
2343
  return he && [
2344
2344
  "video/webm;codecs=vp9,opus",
@@ -2363,7 +2363,7 @@ function Ni(t) {
2363
2363
  return t ? t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : "file" : "file";
2364
2364
  }
2365
2365
  async function Is() {
2366
- if (!re) return null;
2366
+ if (!ne) return null;
2367
2367
  let t;
2368
2368
  try {
2369
2369
  t = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !1 }));
@@ -2392,58 +2392,58 @@ async function Os(t) {
2392
2392
  }
2393
2393
  async function Es(t = {}) {
2394
2394
  var C;
2395
- if (!re || !he) return null;
2395
+ if (!ne || !he) return null;
2396
2396
  let e;
2397
2397
  try {
2398
2398
  e = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !0 }));
2399
- } catch (w) {
2400
- return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
2399
+ } catch (y) {
2400
+ return (y == null ? void 0 : y.name) !== "NotAllowedError" && console.error("[media] record picker", y), null;
2401
2401
  }
2402
2402
  const n = Ts();
2403
2403
  let a;
2404
2404
  try {
2405
2405
  a = n ? new window.MediaRecorder(e, { mimeType: n }) : new window.MediaRecorder(e);
2406
- } catch (w) {
2407
- return console.error("[media] recorder init", w), e.getTracks().forEach((S) => {
2406
+ } catch (y) {
2407
+ return console.error("[media] recorder init", y), e.getTracks().forEach((S) => {
2408
2408
  S.stop();
2409
2409
  }), null;
2410
2410
  }
2411
2411
  const r = [];
2412
2412
  let s = null, o = !1;
2413
- a.addEventListener("dataavailable", (w) => {
2414
- w.data && w.data.size > 0 && r.push(w.data);
2413
+ a.addEventListener("dataavailable", (y) => {
2414
+ y.data && y.data.size > 0 && r.push(y.data);
2415
2415
  }), a.addEventListener("stop", () => {
2416
- var w, S;
2417
- if (s && clearInterval(s), e.getTracks().forEach((L) => {
2418
- L.stop();
2416
+ var y, S;
2417
+ if (s && clearInterval(s), e.getTracks().forEach(($) => {
2418
+ $.stop();
2419
2419
  }), r.length) {
2420
- const L = a.mimeType || n || "video/webm", A = new Blob(r, { type: L }), N = /mp4/.test(L) ? "mp4" : "webm", x = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${x}.${N}`, { type: L });
2421
- (w = t.onfinalize) == null || w.call(t, U);
2420
+ const $ = a.mimeType || n || "video/webm", A = new Blob(r, { type: $ }), N = /mp4/.test($) ? "mp4" : "webm", x = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${x}.${N}`, { type: $ });
2421
+ (y = t.onfinalize) == null || y.call(t, U);
2422
2422
  } else
2423
2423
  (S = t.oncancel) == null || S.call(t);
2424
- }), e.getVideoTracks().forEach((w) => {
2425
- w.addEventListener("ended", () => c(), { once: !0 });
2424
+ }), e.getVideoTracks().forEach((y) => {
2425
+ y.addEventListener("ended", () => c(), { once: !0 });
2426
2426
  });
2427
2427
  function c() {
2428
2428
  if (!o && (o = !0, a.state !== "inactive"))
2429
2429
  try {
2430
2430
  a.stop();
2431
- } catch (w) {
2432
- console.error("[media] recorder stop", w);
2431
+ } catch (y) {
2432
+ console.error("[media] recorder stop", y);
2433
2433
  }
2434
2434
  }
2435
2435
  try {
2436
2436
  a.start(1e3);
2437
- } catch (w) {
2438
- return console.error("[media] recorder start", w), e.getTracks().forEach((S) => {
2437
+ } catch (y) {
2438
+ return console.error("[media] recorder start", y), e.getTracks().forEach((S) => {
2439
2439
  S.stop();
2440
2440
  }), null;
2441
2441
  }
2442
2442
  (C = t.onstart) == null || C.call(t);
2443
2443
  const v = Date.now();
2444
2444
  return s = setInterval(() => {
2445
- var w;
2446
- (w = t.ontick) == null || w.call(t, Date.now() - v);
2445
+ var y;
2446
+ (y = t.ontick) == null || y.call(t, Date.now() - v);
2447
2447
  }, 500), {
2448
2448
  stop: c,
2449
2449
  get state() {
@@ -2492,7 +2492,7 @@ const Bs = [
2492
2492
  attachItems() {
2493
2493
  return Bs.map((t) => ({
2494
2494
  ...t,
2495
- disabled: t.action === "screenshot" && !re || t.action === "record" && (!re || !he)
2495
+ disabled: t.action === "screenshot" && !ne || t.action === "record" && (!ne || !he)
2496
2496
  }));
2497
2497
  },
2498
2498
  recordingElapsedLabel() {
@@ -2619,10 +2619,10 @@ function Ws(t, e, n, a, r, s) {
2619
2619
  class: "wm-rec__stop",
2620
2620
  onClick: e[0] || (e[0] = (...o) => s.stopRecording && s.stopRecording(...o))
2621
2621
  }, "Arrêter")
2622
- ])) : y("", !0),
2622
+ ])) : w("", !0),
2623
2623
  i("form", {
2624
2624
  class: E(["wm-compose", { "has-attach": r.attachOpen }]),
2625
- onSubmit: e[7] || (e[7] = Q((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
2625
+ onSubmit: e[7] || (e[7] = J((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
2626
2626
  }, [
2627
2627
  i("input", {
2628
2628
  ref: "fileEl",
@@ -2635,7 +2635,7 @@ function Ws(t, e, n, a, r, s) {
2635
2635
  key: 0,
2636
2636
  class: "wm-compose__overlay",
2637
2637
  onClick: e[2] || (e[2] = (o) => r.attachOpen = !1)
2638
- })) : y("", !0),
2638
+ })) : w("", !0),
2639
2639
  r.attachOpen ? (l(), d("div", js, [
2640
2640
  (l(!0), d(M, null, j(s.attachItems, (o) => (l(), d("button", {
2641
2641
  key: o.action,
@@ -2658,8 +2658,8 @@ function Ws(t, e, n, a, r, s) {
2658
2658
  ]),
2659
2659
  i("span", null, b(o.label), 1)
2660
2660
  ], 8, Us))), 128))
2661
- ])) : y("", !0),
2662
- z(i("textarea", {
2661
+ ])) : w("", !0),
2662
+ H(i("textarea", {
2663
2663
  ref: "inputEl",
2664
2664
  "onUpdate:modelValue": e[3] || (e[3] = (o) => r.local = o),
2665
2665
  class: "wm-compose__input",
@@ -2669,7 +2669,7 @@ function Ws(t, e, n, a, r, s) {
2669
2669
  onKeydown: e[4] || (e[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
2670
2670
  onInput: e[5] || (e[5] = (...o) => s.autosize && s.autosize(...o))
2671
2671
  }, null, 40, Hs), [
2672
- [Y, r.local]
2672
+ [K, r.local]
2673
2673
  ]),
2674
2674
  i("div", zs, [
2675
2675
  i("button", {
@@ -2745,14 +2745,14 @@ function Js(t, e, n, a, r, s) {
2745
2745
  key: c,
2746
2746
  type: "button",
2747
2747
  class: "wm-chip",
2748
- style: q({ animationDelay: n.baseDelay + c * n.stepDelay + "ms" }),
2748
+ style: V({ animationDelay: n.baseDelay + c * n.stepDelay + "ms" }),
2749
2749
  onClick: (v) => t.$emit("select", o)
2750
2750
  }, b(o.label), 13, Ys))), 128))
2751
- ])) : y("", !0);
2751
+ ])) : w("", !0);
2752
2752
  }
2753
2753
  const Xs = /* @__PURE__ */ B(Ks, [["render", Js], ["__scopeId", "data-v-55aa529d"]]), Qs = {
2754
2754
  name: "WmApprovalCard",
2755
- components: { AIAvatar: Z },
2755
+ components: { AIAvatar: X },
2756
2756
  props: {
2757
2757
  action: { type: String, required: !0 },
2758
2758
  detail: { type: String, default: "" },
@@ -2792,11 +2792,11 @@ function ar(t, e, n, a, r, s) {
2792
2792
  return l(), d("div", Zs, [
2793
2793
  i("div", er, [
2794
2794
  i("div", tr, [
2795
- V(o, { size: 24 })
2795
+ z(o, { size: 24 })
2796
2796
  ]),
2797
2797
  i("div", nr, [
2798
2798
  i("div", sr, b(n.action), 1),
2799
- n.detail ? (l(), d("div", rr, b(n.detail), 1)) : y("", !0)
2799
+ n.detail ? (l(), d("div", rr, b(n.detail), 1)) : w("", !0)
2800
2800
  ])
2801
2801
  ]),
2802
2802
  i("div", ir, [
@@ -2805,13 +2805,13 @@ function ar(t, e, n, a, r, s) {
2805
2805
  type: "button",
2806
2806
  class: "wm-approval__btn wm-approval__btn--neutral",
2807
2807
  onClick: e[0] || (e[0] = (c) => t.$emit("callback", s.rejectId))
2808
- }, b(s.rejectLabel), 1)) : y("", !0),
2808
+ }, b(s.rejectLabel), 1)) : w("", !0),
2809
2809
  s.approveId ? (l(), d("button", {
2810
2810
  key: 1,
2811
2811
  type: "button",
2812
2812
  class: "wm-approval__btn wm-approval__btn--primary",
2813
2813
  onClick: e[1] || (e[1] = (c) => t.$emit("callback", s.approveId))
2814
- }, b(s.approveLabel), 1)) : y("", !0)
2814
+ }, b(s.approveLabel), 1)) : w("", !0)
2815
2815
  ])
2816
2816
  ]);
2817
2817
  }
@@ -2827,7 +2827,7 @@ const lr = /* @__PURE__ */ new Set([
2827
2827
  "date"
2828
2828
  ]), cr = {
2829
2829
  name: "WmFormCard",
2830
- components: { AIAvatar: Z },
2830
+ components: { AIAvatar: X },
2831
2831
  props: {
2832
2832
  form: { type: Object, required: !0 },
2833
2833
  readOnly: { type: Boolean, default: !1 },
@@ -2931,16 +2931,16 @@ function Lr(t, e, n, a, r, s) {
2931
2931
  return l(), d("div", dr, [
2932
2932
  i("div", ur, [
2933
2933
  i("div", hr, [
2934
- V(o, { size: 24 })
2934
+ z(o, { size: 24 })
2935
2935
  ]),
2936
2936
  i("div", mr, [
2937
2937
  i("div", fr, b(n.form.title || "Formulaire"), 1),
2938
- n.form.description ? (l(), d("div", pr, b(n.form.description), 1)) : y("", !0)
2938
+ n.form.description ? (l(), d("div", pr, b(n.form.description), 1)) : w("", !0)
2939
2939
  ])
2940
2940
  ]),
2941
2941
  i("form", {
2942
2942
  class: "wm-form__body",
2943
- onSubmit: e[0] || (e[0] = Q((...c) => s.onSubmit && s.onSubmit(...c), ["prevent"]))
2943
+ onSubmit: e[0] || (e[0] = J((...c) => s.onSubmit && s.onSubmit(...c), ["prevent"]))
2944
2944
  }, [
2945
2945
  (l(!0), d(M, null, j(s.normalizedFields, (c) => (l(), d("div", {
2946
2946
  key: c.key,
@@ -2950,10 +2950,10 @@ function Lr(t, e, n, a, r, s) {
2950
2950
  for: `wm-f-${r._uid}-${c.key}`,
2951
2951
  class: "wm-form__label"
2952
2952
  }, [
2953
- ae(b(c.label), 1),
2954
- c.required ? (l(), d("span", vr, "*")) : y("", !0)
2953
+ re(b(c.label), 1),
2954
+ c.required ? (l(), d("span", vr, "*")) : w("", !0)
2955
2955
  ], 8, _r),
2956
- c.type === "text" ? z((l(), d("input", {
2956
+ c.type === "text" ? H((l(), d("input", {
2957
2957
  key: 0,
2958
2958
  id: `wm-f-${r._uid}-${c.key}`,
2959
2959
  "onUpdate:modelValue": (v) => r.values[c.key] = v,
@@ -2963,8 +2963,8 @@ function Lr(t, e, n, a, r, s) {
2963
2963
  required: c.required,
2964
2964
  disabled: n.readOnly || r.busy
2965
2965
  }, null, 8, gr)), [
2966
- [Y, r.values[c.key]]
2967
- ]) : c.type === "textarea" ? z((l(), d("textarea", {
2966
+ [K, r.values[c.key]]
2967
+ ]) : c.type === "textarea" ? H((l(), d("textarea", {
2968
2968
  key: 1,
2969
2969
  id: `wm-f-${r._uid}-${c.key}`,
2970
2970
  "onUpdate:modelValue": (v) => r.values[c.key] = v,
@@ -2974,8 +2974,8 @@ function Lr(t, e, n, a, r, s) {
2974
2974
  required: c.required,
2975
2975
  disabled: n.readOnly || r.busy
2976
2976
  }, null, 8, yr)), [
2977
- [Y, r.values[c.key]]
2978
- ]) : c.type === "number" ? z((l(), d("input", {
2977
+ [K, r.values[c.key]]
2978
+ ]) : c.type === "number" ? H((l(), d("input", {
2979
2979
  key: 2,
2980
2980
  id: `wm-f-${r._uid}-${c.key}`,
2981
2981
  "onUpdate:modelValue": (v) => r.values[c.key] = v,
@@ -2986,12 +2986,12 @@ function Lr(t, e, n, a, r, s) {
2986
2986
  disabled: n.readOnly || r.busy
2987
2987
  }, null, 8, wr)), [
2988
2988
  [
2989
- Y,
2989
+ K,
2990
2990
  r.values[c.key],
2991
2991
  void 0,
2992
2992
  { number: !0 }
2993
2993
  ]
2994
- ]) : c.type === "date" ? z((l(), d("input", {
2994
+ ]) : c.type === "date" ? H((l(), d("input", {
2995
2995
  key: 3,
2996
2996
  id: `wm-f-${r._uid}-${c.key}`,
2997
2997
  "onUpdate:modelValue": (v) => r.values[c.key] = v,
@@ -3000,9 +3000,9 @@ function Lr(t, e, n, a, r, s) {
3000
3000
  required: c.required,
3001
3001
  disabled: n.readOnly || r.busy
3002
3002
  }, null, 8, br)), [
3003
- [Y, r.values[c.key]]
3003
+ [K, r.values[c.key]]
3004
3004
  ]) : c.type === "boolean" ? (l(), d("label", kr, [
3005
- z(i("input", {
3005
+ H(i("input", {
3006
3006
  id: `wm-f-${r._uid}-${c.key}`,
3007
3007
  "onUpdate:modelValue": (v) => r.values[c.key] = v,
3008
3008
  type: "checkbox",
@@ -3011,7 +3011,7 @@ function Lr(t, e, n, a, r, s) {
3011
3011
  [Ie, r.values[c.key]]
3012
3012
  ]),
3013
3013
  i("span", null, b(c.placeholder || "Oui"), 1)
3014
- ])) : c.type === "select" ? z((l(), d("select", {
3014
+ ])) : c.type === "select" ? H((l(), d("select", {
3015
3015
  key: 5,
3016
3016
  id: `wm-f-${r._uid}-${c.key}`,
3017
3017
  "onUpdate:modelValue": (v) => r.values[c.key] = v,
@@ -3040,16 +3040,16 @@ function Lr(t, e, n, a, r, s) {
3040
3040
  }, null, 40, Tr),
3041
3041
  i("span", null, b(v.label), 1)
3042
3042
  ]))), 128))
3043
- ])) : y("", !0)
3043
+ ])) : w("", !0)
3044
3044
  ]))), 128)),
3045
- r.error ? (l(), d("div", Ir, b(r.error), 1)) : y("", !0),
3045
+ r.error ? (l(), d("div", Ir, b(r.error), 1)) : w("", !0),
3046
3046
  n.readOnly ? (l(), d("div", Br, "Réponse envoyée")) : (l(), d("button", {
3047
3047
  key: 1,
3048
3048
  type: "submit",
3049
3049
  class: "wm-form__submit",
3050
3050
  disabled: r.busy
3051
3051
  }, [
3052
- r.busy ? (l(), d("span", Er)) : y("", !0),
3052
+ r.busy ? (l(), d("span", Er)) : w("", !0),
3053
3053
  i("span", null, b(r.busy ? "Envoi…" : n.form.submit_label || "Envoyer"), 1)
3054
3054
  ], 8, Or))
3055
3055
  ], 32)
@@ -3254,13 +3254,13 @@ function di(t, e, n, a, r, s) {
3254
3254
  i("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
3255
3255
  ])
3256
3256
  ], -1)),
3257
- z(i("input", {
3257
+ H(i("input", {
3258
3258
  "onUpdate:modelValue": e[3] || (e[3] = (o) => r.query = o),
3259
3259
  type: "text",
3260
3260
  placeholder: "Rechercher dans vos messages",
3261
3261
  "aria-label": "Rechercher dans vos messages"
3262
3262
  }, null, 512), [
3263
- [Y, r.query]
3263
+ [K, r.query]
3264
3264
  ])
3265
3265
  ])
3266
3266
  ]),
@@ -3294,7 +3294,7 @@ function di(t, e, n, a, r, s) {
3294
3294
  opacity: "0.92"
3295
3295
  })
3296
3296
  ], -1)),
3297
- c.unread ? (l(), d("span", ri)) : y("", !0)
3297
+ c.unread ? (l(), d("span", ri)) : w("", !0)
3298
3298
  ]),
3299
3299
  i("div", ii, [
3300
3300
  i("div", ai, [
@@ -3304,9 +3304,9 @@ function di(t, e, n, a, r, s) {
3304
3304
  ])
3305
3305
  ], 10, ni))), 128))
3306
3306
  ])
3307
- ])) : y("", !0)
3307
+ ])) : w("", !0)
3308
3308
  ], 64))), 128)),
3309
- s.hasAny ? y("", !0) : (l(), d("div", ci, " Aucun fil pour le moment. "))
3309
+ s.hasAny ? w("", !0) : (l(), d("div", ci, " Aucun fil pour le moment. "))
3310
3310
  ])
3311
3311
  ])
3312
3312
  ]);
@@ -3379,7 +3379,7 @@ function gi(t, e, n, a, r, s) {
3379
3379
  onClick: e[2] || (e[2] = (o) => s.emit("rename"))
3380
3380
  }, [...e[9] || (e[9] = [
3381
3381
  ue('<span class="wm-mm__icon" data-v-c1bb81d2><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-c1bb81d2><path d="M12 20h9" data-v-c1bb81d2></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" data-v-c1bb81d2></path></svg></span><span class="wm-mm__label" data-v-c1bb81d2>Renommer le fil</span>', 2)
3382
- ])])) : y("", !0),
3382
+ ])])) : w("", !0),
3383
3383
  n.canClear ? (l(), d("button", {
3384
3384
  key: 1,
3385
3385
  type: "button",
@@ -3402,7 +3402,7 @@ function gi(t, e, n, a, r, s) {
3402
3402
  ])
3403
3403
  ], -1),
3404
3404
  i("span", { class: "wm-mm__label" }, "Effacer ce fil", -1)
3405
- ])])) : y("", !0),
3405
+ ])])) : w("", !0),
3406
3406
  n.canExport ? (l(), d("button", {
3407
3407
  key: 2,
3408
3408
  type: "button",
@@ -3410,7 +3410,7 @@ function gi(t, e, n, a, r, s) {
3410
3410
  onClick: e[4] || (e[4] = (o) => s.emit("export"))
3411
3411
  }, [...e[11] || (e[11] = [
3412
3412
  ue('<span class="wm-mm__icon" data-v-c1bb81d2><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-c1bb81d2><path d="M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" data-v-c1bb81d2></path></svg></span><span class="wm-mm__label" data-v-c1bb81d2>Exporter la transcription</span><span class="wm-mm__hint" data-v-c1bb81d2>.txt</span>', 3)
3413
- ])])) : y("", !0)
3413
+ ])])) : w("", !0)
3414
3414
  ]),
3415
3415
  e[17] || (e[17] = i("div", { class: "wm-mm__sep" }, null, -1)),
3416
3416
  i("div", _i, [
@@ -3466,7 +3466,7 @@ function gi(t, e, n, a, r, s) {
3466
3466
  ])
3467
3467
  ], -1),
3468
3468
  i("span", { class: "wm-mm__label" }, "Statut des services", -1)
3469
- ])])) : y("", !0),
3469
+ ])])) : w("", !0),
3470
3470
  n.helpUrl ? (l(), d("button", {
3471
3471
  key: 1,
3472
3472
  type: "button",
@@ -3489,7 +3489,7 @@ function gi(t, e, n, a, r, s) {
3489
3489
  ])
3490
3490
  ], -1),
3491
3491
  i("span", { class: "wm-mm__label" }, "Centre d'aide", -1)
3492
- ])])) : y("", !0)
3492
+ ])])) : w("", !0)
3493
3493
  ])
3494
3494
  ])
3495
3495
  ]);
@@ -3509,8 +3509,8 @@ function wi(t, e) {
3509
3509
  if (s == null || s === "") continue;
3510
3510
  let o;
3511
3511
  if (Array.isArray(s)) {
3512
- if (o = s.map((c) => ie(r, String(c))).join(", "), !o) continue;
3513
- } else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = ie(r, String(s));
3512
+ if (o = s.map((c) => se(r, String(c))).join(", "), !o) continue;
3513
+ } else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = se(r, String(s));
3514
3514
  a.push(`${r.label} :
3515
3515
  ${o}`);
3516
3516
  }
@@ -3518,7 +3518,7 @@ ${o}`);
3518
3518
 
3519
3519
  `);
3520
3520
  }
3521
- function ie(t, e) {
3521
+ function se(t, e) {
3522
3522
  if (!Array.isArray(t == null ? void 0 : t.options)) return e;
3523
3523
  const n = t.options.find((a) => (a == null ? void 0 : a.value) === e);
3524
3524
  return (n == null ? void 0 : n.label) || e;
@@ -3531,8 +3531,8 @@ function bi(t, e) {
3531
3531
  if (s == null || s === "") continue;
3532
3532
  let o;
3533
3533
  if (Array.isArray(s)) {
3534
- if (o = s.map((v) => ie(r, String(v))).join(", "), !o) continue;
3535
- } else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = ie(r, String(s));
3534
+ if (o = s.map((v) => se(r, String(v))).join(", "), !o) continue;
3535
+ } else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = se(r, String(s));
3536
3536
  const c = r.type === "textarea" || typeof o == "string" && (o.length > 60 || o.includes(`
3537
3537
  `));
3538
3538
  n.push({ label: r.label, value: o, multiline: c });
@@ -3911,7 +3911,7 @@ const ki = 450, Ci = 50, Ai = 900, Si = 12e3, xi = 300, Mi = {
3911
3911
  const e = (v = (c = (o = this.pendingApproval) == null ? void 0 : o.payload) == null ? void 0 : c.pending) == null ? void 0 : v.prepared_params;
3912
3912
  if (!e || typeof e != "object") return "";
3913
3913
  const n = Object.entries(e);
3914
- return n.length ? n.slice(0, 2).map(([C, w]) => `${C}: ${w}`).join(" · ") : "";
3914
+ return n.length ? n.slice(0, 2).map(([C, y]) => `${C}: ${y}`).join(" · ") : "";
3915
3915
  },
3916
3916
  actionInFlight() {
3917
3917
  var t, e;
@@ -4242,11 +4242,11 @@ const ki = 450, Ci = 50, Ai = 900, Si = 12e3, xi = 300, Mi = {
4242
4242
  ) + a;
4243
4243
  this.nextRevealAt = s;
4244
4244
  const o = Math.max(0, s - e), c = t.id, v = setTimeout(() => {
4245
- this.revealedAt = { ...this.revealedAt, [c]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== v);
4245
+ this.revealedAt = { ...this.revealedAt, [c]: Date.now() }, this.revealTimers = this.revealTimers.filter((y) => y !== v);
4246
4246
  }, o);
4247
4247
  this.revealTimers.push(v);
4248
4248
  const C = setTimeout(() => {
4249
- this.revealedAt[c] > 0 || (this.revealedAt = { ...this.revealedAt, [c]: Date.now() }), this.revealTimers = this.revealTimers.filter((w) => w !== C);
4249
+ this.revealedAt[c] > 0 || (this.revealedAt = { ...this.revealedAt, [c]: Date.now() }), this.revealTimers = this.revealTimers.filter((y) => y !== C);
4250
4250
  }, o + 4e3);
4251
4251
  this.revealTimers.push(C);
4252
4252
  },
@@ -4409,18 +4409,18 @@ const ki = 450, Ci = 50, Ai = 900, Si = 12e3, xi = 300, Mi = {
4409
4409
  t.created_at ? `Créée le : ${t.created_at}` : "",
4410
4410
  ""
4411
4411
  ];
4412
- for (const w of e) {
4413
- if (!w) continue;
4414
- const S = ((o = w.author) == null ? void 0 : o.name) || (((c = w.author) == null ? void 0 : c.type) === "user" ? "Vous" : ((v = w.author) == null ? void 0 : v.type) === "agent_human" ? "Agent" : ((C = w.author) == null ? void 0 : C.type) === "agent_ia" ? "Assistant IA" : "Système"), L = w.created_at ? new Date(w.created_at).toLocaleString("fr-FR") : "", A = (w.text_md || "").trim();
4415
- A && (n.push(`[${L}] ${S} :`), n.push(A), n.push(""));
4412
+ for (const y of e) {
4413
+ if (!y) continue;
4414
+ const S = ((o = y.author) == null ? void 0 : o.name) || (((c = y.author) == null ? void 0 : c.type) === "user" ? "Vous" : ((v = y.author) == null ? void 0 : v.type) === "agent_human" ? "Agent" : ((C = y.author) == null ? void 0 : C.type) === "agent_ia" ? "Assistant IA" : "Système"), $ = y.created_at ? new Date(y.created_at).toLocaleString("fr-FR") : "", A = (y.text_md || "").trim();
4415
+ A && (n.push(`[${$}] ${S} :`), n.push(A), n.push(""));
4416
4416
  }
4417
4417
  const a = new Blob([n.join(`
4418
4418
  `)], { type: "text/plain;charset=utf-8" });
4419
4419
  try {
4420
- const w = URL.createObjectURL(a), S = document.createElement("a");
4421
- S.href = w, S.download = `${(t.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(S), S.click(), document.body.removeChild(S), setTimeout(() => URL.revokeObjectURL(w), 1e3);
4422
- } catch (w) {
4423
- console.error("[ww-messenger] export failed", w);
4420
+ const y = URL.createObjectURL(a), S = document.createElement("a");
4421
+ S.href = y, S.download = `${(t.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(S), S.click(), document.body.removeChild(S), setTimeout(() => URL.revokeObjectURL(y), 1e3);
4422
+ } catch (y) {
4423
+ console.error("[ww-messenger] export failed", y);
4424
4424
  }
4425
4425
  },
4426
4426
  async onSend(t) {
@@ -4517,26 +4517,26 @@ const ki = 450, Ci = 50, Ai = 900, Si = 12e3, xi = 300, Mi = {
4517
4517
  class: "wm-attached"
4518
4518
  }, ji = ["onClick"];
4519
4519
  function Ui(t, e, n, a, r, s) {
4520
- const o = O("Launcher"), c = O("Header"), v = O("Onboarding"), C = O("MessageList"), w = O("ApprovalCard"), S = O("FormCard"), L = O("Feedback"), A = O("SuggestionChips"), N = O("Composer"), x = O("MoreMenu"), U = O("HistoryDrawer");
4520
+ const o = O("Launcher"), c = O("Header"), v = O("Onboarding"), C = O("MessageList"), y = O("ApprovalCard"), S = O("FormCard"), $ = O("Feedback"), A = O("SuggestionChips"), N = O("Composer"), x = O("MoreMenu"), U = O("HistoryDrawer");
4521
4521
  return l(), d("div", {
4522
4522
  class: E(["wm-root", `wm-root--${n.displayMode}`])
4523
4523
  }, [
4524
- !r.isOpen && !s.isEmbedded ? (l(), $(o, {
4524
+ !r.isOpen && !s.isEmbedded ? (l(), R(o, {
4525
4525
  key: 0,
4526
4526
  "unread-count": s.unreadCount,
4527
4527
  peek: s.launcherPeek,
4528
4528
  onOpen: s.openFromPeek,
4529
4529
  onDismiss: e[0] || (e[0] = (F) => r.labelDismissed = !0)
4530
- }, null, 8, ["unread-count", "peek", "onOpen"])) : y("", !0),
4530
+ }, null, 8, ["unread-count", "peek", "onOpen"])) : w("", !0),
4531
4531
  r.isOpen || s.isEmbedded ? (l(), d("section", {
4532
4532
  key: 1,
4533
4533
  class: E(["wm-panel", `wm-panel--${n.displayMode}`]),
4534
- style: q(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
4534
+ style: V(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
4535
4535
  role: "dialog",
4536
4536
  "aria-label": "Messenger"
4537
4537
  }, [
4538
4538
  !s.ready && !s.error ? (l(), d("div", Ti, [
4539
- s.isEmbedded ? y("", !0) : (l(), d("button", {
4539
+ s.isEmbedded ? w("", !0) : (l(), d("button", {
4540
4540
  key: 0,
4541
4541
  type: "button",
4542
4542
  class: "wm-loading__close",
@@ -4562,7 +4562,7 @@ function Ui(t, e, n, a, r, s) {
4562
4562
  "aria-hidden": "true"
4563
4563
  }, null, -1))
4564
4564
  ])) : (l(), d(M, { key: 1 }, [
4565
- V(c, {
4565
+ z(c, {
4566
4566
  title: s.headerTitle,
4567
4567
  escalated: s.isEscalated,
4568
4568
  "agent-name": s.humanAgentName,
@@ -4600,7 +4600,7 @@ function Ui(t, e, n, a, r, s) {
4600
4600
  ])
4601
4601
  ])
4602
4602
  ])) : s.currentConv ? (l(), d(M, { key: 2 }, [
4603
- V(C, {
4603
+ z(C, {
4604
4604
  ref: "messageList",
4605
4605
  messages: s.displayedMessages,
4606
4606
  "streaming-active": s.streamingActive,
@@ -4613,34 +4613,34 @@ function Ui(t, e, n, a, r, s) {
4613
4613
  }, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "onLoadMore"]),
4614
4614
  i("div", Bi, [
4615
4615
  s.floatVisible ? (l(), d("div", Li, [
4616
- s.approvalReady ? (l(), $(w, {
4616
+ s.approvalReady ? (l(), R(y, {
4617
4617
  key: 0,
4618
4618
  action: s.approvalTitle,
4619
4619
  detail: s.approvalDetail,
4620
4620
  callbacks: s.pendingApproval.callbacks,
4621
4621
  onCallback: s.onApprovalCallback
4622
- }, null, 8, ["action", "detail", "callbacks", "onCallback"])) : s.pendingForm ? (l(), $(S, {
4622
+ }, null, 8, ["action", "detail", "callbacks", "onCallback"])) : s.pendingForm ? (l(), R(S, {
4623
4623
  key: s.pendingForm.message && s.pendingForm.message.id,
4624
4624
  form: s.pendingForm.form,
4625
4625
  onSubmit: s.onFormSubmit
4626
- }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (l(), $(L, {
4626
+ }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (l(), R($, {
4627
4627
  key: 2,
4628
4628
  busy: r.feedbackBusy,
4629
4629
  done: r.feedbackDone,
4630
4630
  onSubmit: s.onFeedback
4631
- }, null, 8, ["busy", "done", "onSubmit"])) : (l(), $(A, {
4631
+ }, null, 8, ["busy", "done", "onSubmit"])) : (l(), R(A, {
4632
4632
  key: 3,
4633
4633
  items: s.suggestions,
4634
4634
  onSelect: s.onSuggestion
4635
4635
  }, null, 8, ["items", "onSelect"]))
4636
- ], 512)) : y("", !0),
4636
+ ], 512)) : w("", !0),
4637
4637
  s.actionInFlight ? (l(), d("div", Ri, [
4638
4638
  e[10] || (e[10] = i("span", {
4639
4639
  class: "wm-actionWait__spinner",
4640
4640
  "aria-hidden": "true"
4641
4641
  }, null, -1)),
4642
4642
  i("span", $i, b(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
4643
- ])) : (l(), $(N, {
4643
+ ])) : (l(), R(N, {
4644
4644
  key: 2,
4645
4645
  ref: "composer",
4646
4646
  modelValue: r.draft,
@@ -4652,7 +4652,7 @@ function Ui(t, e, n, a, r, s) {
4652
4652
  onAttach: s.onAttach
4653
4653
  }, null, 8, ["modelValue", "placeholder", "disabled", "onSend", "onAttach"]))
4654
4654
  ]),
4655
- r.moreOpen ? (l(), $(x, {
4655
+ r.moreOpen ? (l(), R(x, {
4656
4656
  key: 0,
4657
4657
  "can-rename": !!s.currentConv,
4658
4658
  "can-clear": !!s.currentConv,
@@ -4663,7 +4663,7 @@ function Ui(t, e, n, a, r, s) {
4663
4663
  onClose: e[3] || (e[3] = (F) => r.moreOpen = !1),
4664
4664
  onNotifToggle: s.onNotifToggle,
4665
4665
  onAction: s.onMoreAction
4666
- }, null, 8, ["can-rename", "can-clear", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0),
4666
+ }, null, 8, ["can-rename", "can-clear", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : w("", !0),
4667
4667
  r.pendingAttachments.length ? (l(), d("div", Fi, [
4668
4668
  (l(!0), d(M, null, j(r.pendingAttachments, (F, P) => (l(), d("div", {
4669
4669
  key: P,
@@ -4686,7 +4686,7 @@ function Ui(t, e, n, a, r, s) {
4686
4686
  i("button", {
4687
4687
  type: "button",
4688
4688
  "aria-label": "Retirer",
4689
- onClick: (W) => r.pendingAttachments.splice(P, 1)
4689
+ onClick: (q) => r.pendingAttachments.splice(P, 1)
4690
4690
  }, [...e[11] || (e[11] = [
4691
4691
  i("svg", {
4692
4692
  width: "10",
@@ -4703,8 +4703,8 @@ function Ui(t, e, n, a, r, s) {
4703
4703
  ], -1)
4704
4704
  ])], 8, ji)
4705
4705
  ]))), 128))
4706
- ])) : y("", !0)
4707
- ], 64)) : (l(), $(v, {
4706
+ ])) : w("", !0)
4707
+ ], 64)) : (l(), R(v, {
4708
4708
  key: 1,
4709
4709
  "welcome-message": s.widgetWelcomeMessage,
4710
4710
  "agent-name": s.agentName,
@@ -4715,15 +4715,15 @@ function Ui(t, e, n, a, r, s) {
4715
4715
  onSelect: s.onQuickLink,
4716
4716
  onResume: s.onDrawerPick
4717
4717
  }, null, 8, ["welcome-message", "agent-name", "quick-links", "unread-threads", "busy", "onStart", "onSelect", "onResume"])),
4718
- r.historyOpen ? (l(), $(U, {
4718
+ r.historyOpen ? (l(), R(U, {
4719
4719
  key: 3,
4720
4720
  conversations: s.drawerConversations,
4721
4721
  "active-id": s.currentConv ? s.currentConv.id : null,
4722
4722
  onClose: e[4] || (e[4] = (F) => r.historyOpen = !1),
4723
4723
  onNew: s.onDrawerNew,
4724
4724
  onPick: s.onDrawerPick
4725
- }, null, 8, ["conversations", "active-id", "onNew", "onPick"])) : y("", !0),
4726
- r.moreOpen && !s.currentConv ? (l(), $(x, {
4725
+ }, null, 8, ["conversations", "active-id", "onNew", "onPick"])) : w("", !0),
4726
+ r.moreOpen && !s.currentConv ? (l(), R(x, {
4727
4727
  key: 4,
4728
4728
  "can-rename": !1,
4729
4729
  "can-clear": !1,
@@ -4734,14 +4734,14 @@ function Ui(t, e, n, a, r, s) {
4734
4734
  onClose: e[5] || (e[5] = (F) => r.moreOpen = !1),
4735
4735
  onNotifToggle: s.onNotifToggle,
4736
4736
  onAction: s.onMoreAction
4737
- }, null, 8, ["notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0)
4737
+ }, null, 8, ["notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : w("", !0)
4738
4738
  ], 64))
4739
- ], 6)) : y("", !0)
4739
+ ], 6)) : w("", !0)
4740
4740
  ], 2);
4741
4741
  }
4742
- const Pi = /* @__PURE__ */ B(Mi, [["render", Ui], ["__scopeId", "data-v-8264e504"]]), Hi = "0.2.17";
4742
+ const Pi = /* @__PURE__ */ B(Mi, [["render", Ui], ["__scopeId", "data-v-8264e504"]]), Hi = "0.2.19";
4743
4743
  export {
4744
- Z as AIAvatar,
4744
+ X as AIAvatar,
4745
4745
  ce as AVATAR_COLORS,
4746
4746
  Qt as ActionResult,
4747
4747
  or as ApprovalCard,
@@ -4764,7 +4764,7 @@ export {
4764
4764
  Pi as Messenger,
4765
4765
  yi as MoreMenu,
4766
4766
  Pt as Onboarding,
4767
- re as SCREEN_CAPTURE_SUPPORTED,
4767
+ ne as SCREEN_CAPTURE_SUPPORTED,
4768
4768
  Xs as SuggestionChips,
4769
4769
  ot as TeamAvatars,
4770
4770
  os as Typing,