@_solaris/messenger-widget 0.5.28 → 0.5.30

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 De, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as I, createVNode as $, Transition as Le, withCtx as Be, Fragment as E, renderList as P, withKeys as ue, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as U, withDirectives as K, vModelText as X, createTextVNode as pe, resolveDynamicComponent as Pe, renderSlot as je, vModelCheckbox as He, vModelSelect as ze, markRaw as ke } from "vue";
1
+ import { reactive as Ue, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as $, Transition as Ie, withCtx as Ee, Fragment as B, renderList as D, withKeys as ue, withModifiers as G, createElementVNode as o, createCommentVNode as y, createBlock as F, withDirectives as V, vModelText as X, createTextVNode as ve, resolveDynamicComponent as De, renderSlot as je, vModelCheckbox as He, vModelSelect as ze, markRaw as Ce } from "vue";
2
2
  const qe = [
3
3
  "connected",
4
4
  "message",
@@ -6,7 +6,7 @@ const qe = [
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], fe = "/client", $e = 5 * 60 * 1e3, Ve = 10 * 60 * 1e3, Ke = 5 * 60 * 1e3;
9
+ ], fe = "/client", $e = 5 * 60 * 1e3, Ke = 10 * 60 * 1e3, Ve = 5 * 60 * 1e3;
10
10
  function We(e) {
11
11
  const t = {
12
12
  baseUrl: Ge(e.baseUrl || ""),
@@ -36,9 +36,9 @@ function We(e) {
36
36
  }
37
37
  function i(d, f) {
38
38
  const _ = t.listeners.get(d);
39
- _ && _.forEach((y) => {
39
+ _ && _.forEach((w) => {
40
40
  try {
41
- y(f);
41
+ w(f);
42
42
  } catch (C) {
43
43
  console.error("[transport] listener", d, C);
44
44
  }
@@ -61,19 +61,19 @@ function We(e) {
61
61
  };
62
62
  }
63
63
  async function a(d, f, _) {
64
- const y = await fetch(`${t.baseUrl}${fe}${f}`, {
64
+ const w = await fetch(`${t.baseUrl}${fe}${f}`, {
65
65
  method: d,
66
66
  credentials: "include",
67
67
  headers: s(),
68
68
  body: _ !== void 0 ? JSON.stringify(_) : void 0
69
69
  });
70
- if (!y.ok) {
71
- const C = await l(y), S = new Error(
72
- `HTTP ${y.status} ${d} ${f} :: ${(C == null ? void 0 : C.error) || y.statusText}`
70
+ if (!w.ok) {
71
+ const C = await l(w), M = new Error(
72
+ `HTTP ${w.status} ${d} ${f} :: ${(C == null ? void 0 : C.error) || w.statusText}`
73
73
  );
74
- throw S.status = y.status, S.body = C, S;
74
+ throw M.status = w.status, M.body = C, M;
75
75
  }
76
- return y.status === 204 ? null : y.json();
76
+ return w.status === 204 ? null : w.json();
77
77
  }
78
78
  async function l(d) {
79
79
  try {
@@ -116,7 +116,7 @@ function We(e) {
116
116
  }
117
117
  const _ = await f.json();
118
118
  t.userId = _.external_id;
119
- const [y, C] = await Promise.all([
119
+ const [w, C] = await Promise.all([
120
120
  fetch(
121
121
  `${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
122
122
  { credentials: "include" }
@@ -130,24 +130,24 @@ function We(e) {
130
130
  return L.json();
131
131
  }),
132
132
  a("GET", "/customers/me")
133
- ]), S = { config: y, customer: (C == null ? void 0 : C.customer) ?? null };
134
- return t.lastBootstrap = S, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
133
+ ]), M = { config: w, customer: (C == null ? void 0 : C.customer) ?? null };
134
+ return t.lastBootstrap = M, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
135
135
  "visibilitychange",
136
136
  t.visibilityHandler
137
- )), de(), S;
137
+ )), de(), M;
138
138
  }
139
139
  async function k() {
140
140
  try {
141
- const d = await B();
141
+ const d = await E();
142
142
  t.lastActivityAt = d.reduce((f, _) => {
143
- const y = _ == null ? void 0 : _.last_message_at;
144
- return y && (!f || y > f) ? y : f;
143
+ const w = _ == null ? void 0 : _.last_message_at;
144
+ return w && (!f || w > f) ? w : f;
145
145
  }, null);
146
146
  } catch (d) {
147
147
  console.error("[transport] initial /conversations failed", d);
148
148
  }
149
149
  }
150
- async function w() {
150
+ async function b() {
151
151
  const d = await a("GET", "/customers/me");
152
152
  return (d == null ? void 0 : d.customer) ?? null;
153
153
  }
@@ -155,7 +155,7 @@ function We(e) {
155
155
  const f = await a("PATCH", "/customers/me", d);
156
156
  return (f == null ? void 0 : f.customer) ?? null;
157
157
  }
158
- async function B() {
158
+ async function E() {
159
159
  const d = await a("GET", "/conversations");
160
160
  return (d == null ? void 0 : d.conversations) ?? [];
161
161
  }
@@ -168,30 +168,30 @@ function We(e) {
168
168
  `/conversations/${encodeURIComponent(d)}`
169
169
  )).conversation;
170
170
  }
171
- async function M(d, f) {
171
+ async function S(d, f) {
172
172
  return (await a(
173
173
  "PATCH",
174
174
  `/conversations/${encodeURIComponent(d)}`,
175
175
  f
176
176
  )).conversation;
177
177
  }
178
- async function F(d, f) {
178
+ async function P(d, f) {
179
179
  return a(
180
180
  "PATCH",
181
181
  `/conversations/${encodeURIComponent(d)}/read`,
182
182
  { message_id: f }
183
183
  );
184
184
  }
185
- async function N(d, f = {}) {
185
+ async function I(d, f = {}) {
186
186
  const _ = new URLSearchParams();
187
187
  f.before && _.set("before", f.before), f.since && _.set("since", f.since), f.limit && _.set("limit", String(f.limit));
188
- const y = _.toString() ? `?${_.toString()}` : "";
188
+ const w = _.toString() ? `?${_.toString()}` : "";
189
189
  return a(
190
190
  "GET",
191
- `/conversations/${encodeURIComponent(d)}/messages${y}`
191
+ `/conversations/${encodeURIComponent(d)}/messages${w}`
192
192
  );
193
193
  }
194
- async function D(d, f) {
194
+ async function U(d, f) {
195
195
  se();
196
196
  const _ = {
197
197
  client_msg_id: f.client_msg_id,
@@ -206,7 +206,7 @@ function We(e) {
206
206
  _
207
207
  );
208
208
  }
209
- async function G(d, f, _) {
209
+ async function Y(d, f, _) {
210
210
  return se(), a(
211
211
  "POST",
212
212
  `/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
@@ -214,22 +214,22 @@ function We(e) {
214
214
  );
215
215
  }
216
216
  async function Z(d) {
217
- const f = d.name || "attachment", _ = d.type || "application/octet-stream", y = d.size || 0, C = await a("POST", "/attachments", {
217
+ const f = d.name || "attachment", _ = d.type || "application/octet-stream", w = d.size || 0, C = await a("POST", "/attachments", {
218
218
  mime_type: _,
219
- size_bytes: y,
219
+ size_bytes: w,
220
220
  name: f
221
- }), S = await fetch(C.upload_url, {
221
+ }), M = await fetch(C.upload_url, {
222
222
  method: "PUT",
223
223
  headers: { "Content-Type": _ },
224
224
  body: d
225
225
  });
226
- if (!S.ok)
227
- throw new Error(`HTTP ${S.status} PUT signed upload`);
226
+ if (!M.ok)
227
+ throw new Error(`HTTP ${M.status} PUT signed upload`);
228
228
  return {
229
229
  type: Ye(_),
230
230
  path: C.path,
231
231
  mime_type: _,
232
- size_bytes: y
232
+ size_bytes: w
233
233
  };
234
234
  }
235
235
  async function ee(d) {
@@ -242,7 +242,7 @@ function We(e) {
242
242
  const d = new URLSearchParams({ widgetId: t.widgetId }).toString();
243
243
  return `${t.baseUrl}${fe}/stream?${d}`;
244
244
  }
245
- function V() {
245
+ function K() {
246
246
  if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
247
247
  try {
248
248
  const d = new EventSource(te(), { withCredentials: !0 });
@@ -258,28 +258,28 @@ function We(e) {
258
258
  }
259
259
  function ne(d, f) {
260
260
  try {
261
- const _ = JSON.parse(f), y = _ && typeof _ == "object" && "data" in _ ? _.data : _;
262
- i(d, y);
261
+ const _ = JSON.parse(f), w = _ && typeof _ == "object" && "data" in _ ? _.data : _;
262
+ i(d, w);
263
263
  } catch (_) {
264
264
  console.error("[transport] bad SSE payload", d, _);
265
265
  }
266
266
  }
267
- function Y() {
267
+ function J() {
268
268
  t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
269
269
  }
270
270
  function se() {
271
- clearTimeout(t.burstTimer), V(), t.panelOpen || (t.burstTimer = setTimeout(() => {
272
- t.panelOpen || Y();
273
- }, Ve));
271
+ clearTimeout(t.burstTimer), K(), t.panelOpen || (t.burstTimer = setTimeout(() => {
272
+ t.panelOpen || J();
273
+ }, Ke));
274
274
  }
275
275
  function ce(d) {
276
- t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), V()) : se();
276
+ t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), K()) : se();
277
277
  }
278
278
  async function me() {
279
279
  try {
280
- const d = await B(), f = d.reduce((y, C) => {
281
- const S = C == null ? void 0 : C.last_message_at;
282
- return S && (!y || S > y) ? S : y;
280
+ const d = await E(), f = d.reduce((w, C) => {
281
+ const M = C == null ? void 0 : C.last_message_at;
282
+ return M && (!w || M > w) ? M : w;
283
283
  }, null);
284
284
  f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), se());
285
285
  } catch (d) {
@@ -295,18 +295,18 @@ function We(e) {
295
295
  function m() {
296
296
  if (document.hidden)
297
297
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
298
- t.hiddenGraceTimer = null, document.hidden && (h(), Y(), r("paused"));
299
- }, Ke);
298
+ t.hiddenGraceTimer = null, document.hidden && (h(), J(), r("paused"));
299
+ }, Ve);
300
300
  else {
301
301
  if (t.hiddenGraceTimer) {
302
302
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
303
303
  return;
304
304
  }
305
- r("idle"), de(), t.panelOpen && V();
305
+ r("idle"), de(), t.panelOpen && K();
306
306
  }
307
307
  }
308
308
  function g() {
309
- h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, Y(), t.visibilityHandler && (document.removeEventListener(
309
+ h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, J(), t.visibilityHandler && (document.removeEventListener(
310
310
  "visibilitychange",
311
311
  t.visibilityHandler
312
312
  ), t.visibilityHandler = null), t.started = !1;
@@ -317,16 +317,16 @@ function We(e) {
317
317
  stop: g,
318
318
  setPanelOpen: ce,
319
319
  // REST
320
- getCustomer: w,
320
+ getCustomer: b,
321
321
  patchCustomer: T,
322
- listConversations: B,
322
+ listConversations: E,
323
323
  createConversation: A,
324
324
  getConversation: H,
325
- patchConversation: M,
326
- markConversationRead: F,
327
- listMessages: N,
328
- postMessage: D,
329
- postCallback: G,
325
+ patchConversation: S,
326
+ markConversationRead: P,
327
+ listMessages: I,
328
+ postMessage: U,
329
+ postCallback: Y,
330
330
  uploadAttachment: Z,
331
331
  signAttachment: ee,
332
332
  // Read-only state
@@ -354,7 +354,7 @@ function Je() {
354
354
  return t.slice(0, 4).join("") + "-" + t.slice(4, 6).join("") + "-" + t.slice(6, 8).join("") + "-" + t.slice(8, 10).join("") + "-" + t.slice(10, 16).join("");
355
355
  }
356
356
  function Qe(e) {
357
- const t = De({
357
+ const t = Ue({
358
358
  ready: !1,
359
359
  error: null,
360
360
  config: null,
@@ -392,7 +392,7 @@ function Qe(e) {
392
392
  ), n.push(
393
393
  e.on("message", (h) => {
394
394
  const m = h == null ? void 0 : h.conversation_id, g = h == null ? void 0 : h.message;
395
- !m || !(g != null && g.id) || (V(m, g), g.client_msg_id && delete t.streamingByMsgId[g.client_msg_id], se(m, g.created_at));
395
+ !m || !(g != null && g.id) || (K(m, g), g.client_msg_id && delete t.streamingByMsgId[g.client_msg_id], se(m, g.created_at));
396
396
  })
397
397
  ), n.push(
398
398
  e.on("message_stream", (h) => {
@@ -475,23 +475,23 @@ function Qe(e) {
475
475
  async function p(h) {
476
476
  const m = t.paginationByConv[h];
477
477
  if (!(m != null && m.loaded || m != null && m.loading)) {
478
- w(h, { nextCursor: null, loading: !0, loaded: !1 });
478
+ b(h, { nextCursor: null, loading: !0, loaded: !1 });
479
479
  try {
480
480
  const g = await e.listMessages(h, {
481
481
  limit: l
482
482
  }), d = (g == null ? void 0 : g.messages) ?? [], f = t.messagesByConv[h] || [], _ = /* @__PURE__ */ new Set();
483
483
  for (const C of d)
484
484
  (C == null ? void 0 : C.id) != null && _.add(`id:${String(C.id)}`), C != null && C.client_msg_id && _.add(`c:${C.client_msg_id}`);
485
- const y = f.filter((C) => !((C == null ? void 0 : C.id) != null && _.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && _.has(`c:${C.client_msg_id}`)));
486
- t.messagesByConv[h] = [...d, ...y].sort(
485
+ const w = f.filter((C) => !((C == null ? void 0 : C.id) != null && _.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && _.has(`c:${C.client_msg_id}`)));
486
+ t.messagesByConv[h] = [...d, ...w].sort(
487
487
  ce
488
- ), w(h, {
488
+ ), b(h, {
489
489
  nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
490
490
  loading: !1,
491
491
  loaded: !0
492
492
  });
493
493
  } catch (g) {
494
- console.error("[store] openConversation failed", g), w(h, {
494
+ console.error("[store] openConversation failed", g), b(h, {
495
495
  nextCursor: null,
496
496
  loading: !1,
497
497
  loaded: !1
@@ -505,33 +505,33 @@ function Qe(e) {
505
505
  if (!m || m.loading || !m.nextCursor) return;
506
506
  const d = (f = (t.messagesByConv[h] || []).find((_) => _ == null ? void 0 : _.created_at)) == null ? void 0 : f.created_at;
507
507
  if (d) {
508
- w(h, { ...m, loading: !0 });
508
+ b(h, { ...m, loading: !0 });
509
509
  try {
510
510
  const _ = await e.listMessages(h, {
511
511
  before: d,
512
512
  limit: l
513
- }), y = (_ == null ? void 0 : _.messages) ?? [], C = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
513
+ }), w = (_ == null ? void 0 : _.messages) ?? [], C = t.messagesByConv[h] || [], M = /* @__PURE__ */ new Set();
514
514
  for (const x of C)
515
- (x == null ? void 0 : x.id) != null && S.add(`id:${String(x.id)}`), x != null && x.client_msg_id && S.add(`c:${x.client_msg_id}`);
516
- const L = y.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
517
- t.messagesByConv[h] = [...L, ...C], w(h, {
515
+ (x == null ? void 0 : x.id) != null && M.add(`id:${String(x.id)}`), x != null && x.client_msg_id && M.add(`c:${x.client_msg_id}`);
516
+ const L = w.filter((x) => !((x == null ? void 0 : x.id) != null && M.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && M.has(`c:${x.client_msg_id}`)));
517
+ t.messagesByConv[h] = [...L, ...C], b(h, {
518
518
  nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
519
519
  loading: !1,
520
520
  loaded: !0
521
521
  });
522
522
  } catch (_) {
523
- console.error("[store] loadMore failed", _), w(h, { ...m, loading: !1 });
523
+ console.error("[store] loadMore failed", _), b(h, { ...m, loading: !1 });
524
524
  }
525
525
  }
526
526
  }
527
- function w(h, m) {
527
+ function b(h, m) {
528
528
  t.paginationByConv = { ...t.paginationByConv, [h]: m };
529
529
  }
530
530
  async function T(h, m) {
531
531
  const g = await e.patchConversation(h, m), d = t.conversations.findIndex((f) => f.id === h);
532
532
  d !== -1 && (t.conversations[d] = g);
533
533
  }
534
- async function B(h) {
534
+ async function E(h) {
535
535
  if (!h) return [];
536
536
  const m = t.messagesByConv[h] || [];
537
537
  let g = "";
@@ -543,13 +543,13 @@ function Qe(e) {
543
543
  g ? { since: g } : {}
544
544
  ), f = (d == null ? void 0 : d.messages) || [];
545
545
  if (!f.length) return [];
546
- const _ = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set();
547
- for (const S of m)
548
- (S == null ? void 0 : S.id) != null && _.add(String(S.id)), S != null && S.client_msg_id && y.add(S.client_msg_id);
546
+ const _ = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Set();
547
+ for (const M of m)
548
+ (M == null ? void 0 : M.id) != null && _.add(String(M.id)), M != null && M.client_msg_id && w.add(M.client_msg_id);
549
549
  const C = [];
550
- for (const S of f) {
551
- const L = (S == null ? void 0 : S.id) != null && _.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && y.has(S.client_msg_id);
552
- V(h, S), L || C.push(S);
550
+ for (const M of f) {
551
+ const L = (M == null ? void 0 : M.id) != null && _.has(String(M.id)) || (M == null ? void 0 : M.client_msg_id) && w.has(M.client_msg_id);
552
+ K(h, M), L || C.push(M);
553
553
  }
554
554
  return C;
555
555
  } catch (d) {
@@ -572,9 +572,9 @@ function Qe(e) {
572
572
  var L;
573
573
  const f = (m || "").trim(), _ = Array.isArray(g) && g.length > 0;
574
574
  if (!h || !f && !_) return;
575
- const y = Je(), C = de(h), S = {
576
- id: y,
577
- client_msg_id: y,
575
+ const w = Je(), C = de(h), M = {
576
+ id: w,
577
+ client_msg_id: w,
578
578
  conversation_id: h,
579
579
  type: "content",
580
580
  text_md: f,
@@ -588,23 +588,23 @@ function Qe(e) {
588
588
  ..._ ? { payload: { type: "content", attachments: g } } : {},
589
589
  ...d && typeof d == "object" ? { metadata: d } : {}
590
590
  };
591
- V(h, S);
591
+ K(h, M);
592
592
  try {
593
593
  await e.postMessage(h, {
594
- client_msg_id: y,
594
+ client_msg_id: w,
595
595
  text_md: f,
596
596
  created_at: C,
597
597
  ..._ ? { attachments: g } : {},
598
598
  ...d && typeof d == "object" ? { metadata: d } : {}
599
599
  });
600
600
  } catch (x) {
601
- console.error("[store] send failed", x), Y(h, y, {
601
+ console.error("[store] send failed", x), J(h, w, {
602
602
  _failed: !0,
603
603
  _pending: !1
604
604
  });
605
605
  }
606
606
  }
607
- async function M(h, m, g) {
607
+ async function S(h, m, g) {
608
608
  h != null && (t.awaitingCallback[h] = !0);
609
609
  try {
610
610
  await e.postCallback(h, m, g);
@@ -612,10 +612,10 @@ function Qe(e) {
612
612
  console.error("[store] callback failed", d), h != null && delete t.awaitingCallback[h];
613
613
  }
614
614
  }
615
- const F = /* @__PURE__ */ new Map();
616
- async function N(h) {
615
+ const P = /* @__PURE__ */ new Map();
616
+ async function I(h) {
617
617
  if (!h) return null;
618
- const m = F.get(h);
618
+ const m = P.get(h);
619
619
  if (m != null && m.url) {
620
620
  const g = m.expires_at ? Date.parse(m.expires_at) : 0;
621
621
  if (!g || g - Date.now() > 6e4) return m.url;
@@ -623,7 +623,7 @@ function Qe(e) {
623
623
  try {
624
624
  const g = await e.signAttachment(h);
625
625
  if (g != null && g.signed_url)
626
- return F.set(h, {
626
+ return P.set(h, {
627
627
  url: g.signed_url,
628
628
  expires_at: g.expires_at
629
629
  }), g.signed_url;
@@ -632,8 +632,8 @@ function Qe(e) {
632
632
  }
633
633
  return null;
634
634
  }
635
- async function D(h, { rating: m, comment: g } = {}) {
636
- const d = t.conversations.find((y) => y.id === h), _ = {
635
+ async function U(h, { rating: m, comment: g } = {}) {
636
+ const d = t.conversations.find((w) => w.id === h), _ = {
637
637
  ...(d == null ? void 0 : d.metadata) || {},
638
638
  feedback: {
639
639
  rating: m,
@@ -643,7 +643,7 @@ function Qe(e) {
643
643
  };
644
644
  await T(h, { metadata: _ });
645
645
  }
646
- function G(h) {
646
+ function Y(h) {
647
647
  var g, d;
648
648
  const m = t.messagesByConv[h] || [];
649
649
  for (let f = m.length - 1; f >= 0; f--) {
@@ -657,12 +657,12 @@ function Qe(e) {
657
657
  var g, d, f;
658
658
  const m = t.messagesByConv[h] || [];
659
659
  for (let _ = m.length - 1; _ >= 0; _--) {
660
- const y = m[_];
661
- if (((g = y == null ? void 0 : y.author) == null ? void 0 : g.type) === "user" || (y == null ? void 0 : y.type) === "action" && ((d = y == null ? void 0 : y.payload) == null ? void 0 : d.state) === "pending")
660
+ const w = m[_];
661
+ if (((g = w == null ? void 0 : w.author) == null ? void 0 : g.type) === "user" || (w == null ? void 0 : w.type) === "action" && ((d = w == null ? void 0 : w.payload) == null ? void 0 : d.state) === "pending")
662
662
  return null;
663
- const C = (f = y == null ? void 0 : y.metadata) == null ? void 0 : f.form;
663
+ const C = (f = w == null ? void 0 : w.metadata) == null ? void 0 : f.form;
664
664
  if (C && Array.isArray(C.fields) && C.fields.length > 0)
665
- return { message: y, form: C };
665
+ return { message: w, form: C };
666
666
  }
667
667
  return null;
668
668
  }
@@ -677,14 +677,14 @@ function Qe(e) {
677
677
  function te(h) {
678
678
  var g, d, f, _;
679
679
  const m = t.messagesByConv[h] || [];
680
- for (let y = m.length - 1; y >= 0; y--) {
681
- const C = m[y];
680
+ for (let w = m.length - 1; w >= 0; w--) {
681
+ const C = m[w];
682
682
  if (((g = C == null ? void 0 : C.author) == null ? void 0 : g.type) === "user") return [];
683
683
  if ((C == null ? void 0 : C.type) === "action" && ((d = C == null ? void 0 : C.payload) == null ? void 0 : d.state) === "pending")
684
684
  return [];
685
685
  if (((f = C == null ? void 0 : C.author) == null ? void 0 : f.type) !== "agent_ia") continue;
686
- const S = (_ = C == null ? void 0 : C.metadata) == null ? void 0 : _.suggested_replies;
687
- return Array.isArray(S) && S.length ? S.map((L) => {
686
+ const M = (_ = C == null ? void 0 : C.metadata) == null ? void 0 : _.suggested_replies;
687
+ return Array.isArray(M) && M.length ? M.map((L) => {
688
688
  if (typeof L == "string") {
689
689
  const x = L.trim();
690
690
  return x ? { label: x, kind: null } : null;
@@ -692,21 +692,21 @@ function Qe(e) {
692
692
  if (L && typeof L == "object" && typeof L.label == "string") {
693
693
  const x = L.label.trim();
694
694
  if (!x) return null;
695
- const Ue = L.kind === "cta" || L.kind === "choice" || L.kind === "followup" ? L.kind : null;
696
- return { label: x, kind: Ue };
695
+ const Fe = L.kind === "cta" || L.kind === "choice" || L.kind === "followup" ? L.kind : null;
696
+ return { label: x, kind: Fe };
697
697
  }
698
698
  return null;
699
699
  }).filter(Boolean).slice(0, 4) : [];
700
700
  }
701
701
  return [];
702
702
  }
703
- function V(h, m) {
703
+ function K(h, m) {
704
704
  var _;
705
705
  const g = t.messagesByConv[h] || [];
706
706
  let d = -1;
707
707
  m != null && m.client_msg_id && (d = g.findIndex(
708
- (y) => (y == null ? void 0 : y.client_msg_id) && y.client_msg_id === m.client_msg_id
709
- )), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d = g.findIndex((y) => ne(y == null ? void 0 : y.id, m.id)));
708
+ (w) => (w == null ? void 0 : w.client_msg_id) && w.client_msg_id === m.client_msg_id
709
+ )), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d = g.findIndex((w) => ne(w == null ? void 0 : w.id, m.id)));
710
710
  let f;
711
711
  d === -1 ? f = [...g, m].sort(ce) : (f = g.slice(), f[d] = {
712
712
  ...g[d],
@@ -718,10 +718,10 @@ function Qe(e) {
718
718
  function ne(h, m) {
719
719
  return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
720
720
  }
721
- function Y(h, m, g) {
721
+ function J(h, m, g) {
722
722
  const d = t.messagesByConv[h];
723
723
  if (!d) return;
724
- const f = d.findIndex((y) => y.id === m);
724
+ const f = d.findIndex((w) => w.id === m);
725
725
  if (f === -1) return;
726
726
  const _ = d.slice();
727
727
  _[f] = { ...d[f], ...g }, t.messagesByConv[h] = _;
@@ -733,7 +733,7 @@ function Qe(e) {
733
733
  if (m && (!d.last_message_at || m > d.last_message_at)) {
734
734
  const f = t.conversations.slice();
735
735
  f[g] = { ...d, last_message_at: m }, f.sort(
736
- (_, y) => (y.last_message_at || "").localeCompare(_.last_message_at || "")
736
+ (_, w) => (w.last_message_at || "").localeCompare(_.last_message_at || "")
737
737
  ), t.conversations = f;
738
738
  }
739
739
  }
@@ -763,14 +763,14 @@ function Qe(e) {
763
763
  createConversation: a,
764
764
  openConversation: p,
765
765
  loadMore: k,
766
- fetchSinceLast: B,
766
+ fetchSinceLast: E,
767
767
  patchConversation: T,
768
768
  markConversationRead: A,
769
769
  send: H,
770
- clickCallback: M,
771
- signAttachment: N,
772
- submitFeedback: D,
773
- getPendingApproval: G,
770
+ clickCallback: S,
771
+ signAttachment: I,
772
+ submitFeedback: U,
773
+ getPendingApproval: Y,
774
774
  getActionInFlight: ee,
775
775
  getLatestSuggestions: te,
776
776
  getLatestForm: Z,
@@ -802,13 +802,13 @@ const z = {
802
802
  "#D97706",
803
803
  "#059669"
804
804
  ];
805
- function ve(e = "") {
805
+ function ye(e = "") {
806
806
  return e ? ge[e.charCodeAt(0) % ge.length] : ge[0];
807
807
  }
808
- function ye(e = "") {
808
+ function we(e = "") {
809
809
  return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
810
810
  }
811
- function Ee(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
811
+ function pe(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
812
812
  return e.toLocaleTimeString(t, { hour: "2-digit", minute: "2-digit" });
813
813
  }
814
814
  const Xe = `
@@ -857,7 +857,7 @@ const Xe = `
857
857
  0% { transform: translateX(110%); opacity: 0; }
858
858
  100% { transform: translateX(0); opacity: 1; }
859
859
  }
860
- `, Ze = "https://api.messenger.victorc.fr", ie = "fr", et = ["fr", "en"], Ce = { fr: "fr-FR", en: "en-US" }, _e = {
860
+ `, Ze = "https://api.messenger.victorc.fr", ae = "fr", et = ["fr", "en"], Ae = { fr: "fr-FR", en: "en-US" }, _e = {
861
861
  fr: {
862
862
  // ── Common ───────────────────────────────────────────────────────
863
863
  "common.newConversation": "Nouvelle conversation",
@@ -903,6 +903,8 @@ const Xe = `
903
903
  "onboarding.heroSub": `Posez-moi n'importe quelle question.
904
904
  Je réponds en quelques secondes.`,
905
905
  "onboarding.newMessage": "Nouveau message",
906
+ "onboarding.statusInProgress": "En cours",
907
+ "onboarding.resume": "Reprendre",
906
908
  // ── Composer ─────────────────────────────────────────────────────
907
909
  "composer.placeholder": "Écrivez votre message…",
908
910
  "composer.replyTo": "Répondre à {name}…",
@@ -1024,6 +1026,8 @@ Je réponds en quelques secondes.`,
1024
1026
  "onboarding.heroSub": `Ask me anything.
1025
1027
  I reply within seconds.`,
1026
1028
  "onboarding.newMessage": "New message",
1029
+ "onboarding.statusInProgress": "In progress",
1030
+ "onboarding.resume": "Resume",
1027
1031
  // ── Composer ─────────────────────────────────────────────────────
1028
1032
  "composer.placeholder": "Type your message…",
1029
1033
  "composer.replyTo": "Reply to {name}…",
@@ -1101,16 +1105,16 @@ I reply within seconds.`,
1101
1105
  "export.createdOn": "Created on: {date}"
1102
1106
  }
1103
1107
  };
1104
- function we(e) {
1105
- if (typeof e != "string") return ie;
1108
+ function be(e) {
1109
+ if (typeof e != "string") return ae;
1106
1110
  const t = e.trim().toLowerCase().slice(0, 2);
1107
- return et.includes(t) ? t : ie;
1111
+ return et.includes(t) ? t : ae;
1108
1112
  }
1109
- function oe(e) {
1110
- return Ce[we(e)] || Ce[ie];
1113
+ function re(e) {
1114
+ return Ae[be(e)] || Ae[ae];
1111
1115
  }
1112
1116
  function j(e) {
1113
- const t = we(e), n = _e[t] || _e[ie], i = _e[ie];
1117
+ const t = be(e), n = _e[t] || _e[ae], i = _e[ae];
1114
1118
  return function(s, a) {
1115
1119
  let l = n[s];
1116
1120
  return l == null && (l = i[s]), l == null ? s : (a && (l = l.replace(
@@ -1119,13 +1123,13 @@ function j(e) {
1119
1123
  )), l);
1120
1124
  };
1121
1125
  }
1122
- function Ae(e, t) {
1126
+ function Se(e, t) {
1123
1127
  if (!Array.isArray(e == null ? void 0 : e.options)) return t;
1124
1128
  const n = e.options.find((i) => (i == null ? void 0 : i.value) === t);
1125
1129
  return (n == null ? void 0 : n.label) || t;
1126
1130
  }
1127
- function Ie(e, t, n) {
1128
- return Array.isArray(t) ? t.map((i) => Ae(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Ae(e, String(t));
1131
+ function Be(e, t, n) {
1132
+ return Array.isArray(t) ? t.map((i) => Se(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Se(e, String(t));
1129
1133
  }
1130
1134
  function tt(e, t, n = j()) {
1131
1135
  if (!e || !t) return "";
@@ -1134,7 +1138,7 @@ function tt(e, t, n = j()) {
1134
1138
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1135
1139
  const a = t[s.key];
1136
1140
  if (a == null || a === "") continue;
1137
- const l = Ie(s, a, n);
1141
+ const l = Be(s, a, n);
1138
1142
  l && r.push(`${s.label} :
1139
1143
  ${l}`);
1140
1144
  }
@@ -1148,7 +1152,7 @@ function nt(e, t, n = j()) {
1148
1152
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1149
1153
  const a = t == null ? void 0 : t[s.key];
1150
1154
  if (a == null || a === "") continue;
1151
- const l = Ie(s, a, n);
1155
+ const l = Be(s, a, n);
1152
1156
  if (!l) continue;
1153
1157
  const p = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
1154
1158
  `));
@@ -1162,7 +1166,7 @@ function nt(e, t, n = j()) {
1162
1166
  }
1163
1167
  };
1164
1168
  }
1165
- function ae(e) {
1169
+ function oe(e) {
1166
1170
  var n;
1167
1171
  const t = (n = e == null ? void 0 : e.author) == null ? void 0 : n.type;
1168
1172
  return t === "agent_ia" || t === "agent_human";
@@ -1172,7 +1176,7 @@ function W(e) {
1172
1176
  const t = typeof e == "number" ? e : Number(e);
1173
1177
  return Number.isFinite(t) ? t : null;
1174
1178
  }
1175
- function Se(e, t) {
1179
+ function Me(e, t) {
1176
1180
  let n = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
1177
1181
  for (const i of t)
1178
1182
  i != null && i.created_at && i.created_at > n && (n = i.created_at);
@@ -1214,7 +1218,7 @@ function it(e, t, n, i) {
1214
1218
  }
1215
1219
  function at(e, t, n = j(), i) {
1216
1220
  if (!e) return;
1217
- const r = it(e, t || [], n, oe(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1221
+ const r = it(e, t || [], n, re(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1218
1222
  try {
1219
1223
  const a = URL.createObjectURL(s), l = document.createElement("a");
1220
1224
  l.href = a, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(a), 1e3);
@@ -1333,7 +1337,7 @@ const ot = {
1333
1337
  // panel or switched threads during the typing dwell.
1334
1338
  onMessageRevealed(e, t) {
1335
1339
  var r;
1336
- if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !ae(e)) return;
1340
+ if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !oe(e)) return;
1337
1341
  const n = typeof document < "u" && document.hidden;
1338
1342
  this.isOpen && !n && ((r = this.currentConv) == null ? void 0 : r.id) === t || (this.soundEnabled && this.playNotificationSound(), this.browserNotifEnabled && this.showBrowserNotification(t, e));
1339
1343
  },
@@ -1497,7 +1501,7 @@ const ot = {
1497
1501
  ) + r;
1498
1502
  this.nextRevealAt = a;
1499
1503
  const l = Math.max(0, a - n), p = e.id, k = setTimeout(() => {
1500
- this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1504
+ this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((b) => b !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1501
1505
  }, l);
1502
1506
  this.revealTimers.push(k);
1503
1507
  },
@@ -1512,7 +1516,7 @@ const ot = {
1512
1516
  const n = Date.now(), i = { ...this.revealedAt };
1513
1517
  for (const s of e) {
1514
1518
  if ((s == null ? void 0 : s.id) == null || i[s.id] !== void 0) continue;
1515
- if (!ae(s)) {
1519
+ if (!oe(s)) {
1516
1520
  i[s.id] = n;
1517
1521
  continue;
1518
1522
  }
@@ -1543,7 +1547,7 @@ const ot = {
1543
1547
  paceLiveMessage(e, t) {
1544
1548
  var r;
1545
1549
  if (!(e != null && e.id) || this.revealedAt[e.id] !== void 0) return;
1546
- if (!ae(e)) {
1550
+ if (!oe(e)) {
1547
1551
  this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
1548
1552
  return;
1549
1553
  }
@@ -1637,7 +1641,7 @@ function pt(e) {
1637
1641
  }
1638
1642
  return null;
1639
1643
  }
1640
- const R = (e, t) => {
1644
+ const N = (e, t) => {
1641
1645
  const n = e.__vccOpts || e;
1642
1646
  for (const [i, r] of t)
1643
1647
  n[i] = r;
@@ -1656,10 +1660,10 @@ const R = (e, t) => {
1656
1660
  },
1657
1661
  computed: {
1658
1662
  bg() {
1659
- return this.avatarUrl ? "transparent" : ve(this.name);
1663
+ return this.avatarUrl ? "transparent" : ye(this.name);
1660
1664
  },
1661
1665
  initials() {
1662
- return ye(this.name);
1666
+ return we(this.name);
1663
1667
  }
1664
1668
  }
1665
1669
  }, yt = ["src", "alt"];
@@ -1683,7 +1687,7 @@ function wt(e, t, n, i, r, s) {
1683
1687
  }, v(s.initials), 5))
1684
1688
  ], 6);
1685
1689
  }
1686
- const Re = /* @__PURE__ */ R(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d"]]), bt = 3, kt = {
1690
+ const Re = /* @__PURE__ */ N(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d"]]), bt = 3, kt = {
1687
1691
  name: "WmLauncher",
1688
1692
  components: { HumanAvatar: Re },
1689
1693
  inject: {
@@ -1709,9 +1713,9 @@ const Re = /* @__PURE__ */ R(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d
1709
1713
  return this.peeks.slice(0, bt).reverse();
1710
1714
  }
1711
1715
  }
1712
- }, Ct = ["aria-label", "onClick", "onKeydown"], At = ["aria-label", "onClick"], St = { class: "wm-peek__avatar" }, Mt = ["aria-label"], Tt = { class: "wm-peek__body" }, xt = { class: "wm-peek__head" }, Ot = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, Bt = { class: "wm-peek__text" }, Et = ["onClick"], It = ["aria-label"], Rt = ["aria-label"];
1716
+ }, Ct = ["aria-label", "onClick", "onKeydown"], At = ["aria-label", "onClick"], St = { class: "wm-peek__avatar" }, Mt = ["aria-label"], Tt = { class: "wm-peek__body" }, xt = { class: "wm-peek__head" }, Ot = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, It = { class: "wm-peek__text" }, Et = ["onClick"], Bt = ["aria-label"], Rt = ["aria-label"];
1713
1717
  function Nt(e, t, n, i, r, s) {
1714
- const a = I("HumanAvatar");
1718
+ const a = R("HumanAvatar");
1715
1719
  return c(), u("div", {
1716
1720
  class: "wm-launcherWrap",
1717
1721
  onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
@@ -1719,13 +1723,13 @@ function Nt(e, t, n, i, r, s) {
1719
1723
  onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
1720
1724
  onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1721
1725
  }, [
1722
- $(Le, { name: "wm-peek" }, {
1723
- default: Be(() => [
1726
+ $(Ie, { name: "wm-peek" }, {
1727
+ default: Ee(() => [
1724
1728
  s.visiblePeeks.length ? (c(), u("div", {
1725
1729
  key: 0,
1726
1730
  class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1727
1731
  }, [
1728
- (c(!0), u(E, null, P(s.visiblePeeks, (l, p) => (c(), u("div", {
1732
+ (c(!0), u(B, null, D(s.visiblePeeks, (l, p) => (c(), u("div", {
1729
1733
  key: l.convId,
1730
1734
  class: "wm-peek",
1731
1735
  style: q({
@@ -1739,15 +1743,15 @@ function Nt(e, t, n, i, r, s) {
1739
1743
  }),
1740
1744
  onClick: (k) => e.$emit("open", l.convId),
1741
1745
  onKeydown: [
1742
- ue(J((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
1743
- ue(J((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1746
+ ue(G((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
1747
+ ue(G((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1744
1748
  ]
1745
1749
  }, [
1746
1750
  o("button", {
1747
1751
  type: "button",
1748
1752
  class: "wm-peek__close",
1749
1753
  "aria-label": s.t("launcher.dismiss"),
1750
- onClick: J((k) => e.$emit("dismiss", l.convId), ["stop"])
1754
+ onClick: G((k) => e.$emit("dismiss", l.convId), ["stop"])
1751
1755
  }, [...t[5] || (t[5] = [
1752
1756
  o("svg", {
1753
1757
  width: "9",
@@ -1773,22 +1777,22 @@ function Nt(e, t, n, i, r, s) {
1773
1777
  key: 0,
1774
1778
  class: "wm-peek__avatarBadge",
1775
1779
  "aria-label": s.t("launcher.unreadMessages", { count: l.count })
1776
- }, v(l.count > 9 ? "9+" : l.count), 9, Mt)) : b("", !0)
1780
+ }, v(l.count > 9 ? "9+" : l.count), 9, Mt)) : y("", !0)
1777
1781
  ]),
1778
1782
  o("div", Tt, [
1779
1783
  o("div", xt, [
1780
1784
  o("span", Ot, v(l.senderName || s.t("common.agent")), 1),
1781
1785
  o("span", Lt, v(s.t("launcher.repliedToYou")), 1)
1782
1786
  ]),
1783
- o("p", Bt, v(l.preview), 1)
1787
+ o("p", It, v(l.preview), 1)
1784
1788
  ]),
1785
1789
  o("button", {
1786
1790
  type: "button",
1787
1791
  class: "wm-peek__open",
1788
- onClick: J((k) => e.$emit("open", l.convId), ["stop"])
1792
+ onClick: G((k) => e.$emit("open", l.convId), ["stop"])
1789
1793
  }, v(s.t("common.open")), 9, Et)
1790
1794
  ], 44, Ct))), 128))
1791
- ], 2)) : b("", !0)
1795
+ ], 2)) : y("", !0)
1792
1796
  ]),
1793
1797
  _: 1
1794
1798
  }),
@@ -1819,11 +1823,11 @@ function Nt(e, t, n, i, r, s) {
1819
1823
  }) : s.t("launcher.unreadConversationsOne", {
1820
1824
  count: n.unreadCount
1821
1825
  })
1822
- }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Rt)) : b("", !0)
1823
- ], 8, It)
1826
+ }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Rt)) : y("", !0)
1827
+ ], 8, Bt)
1824
1828
  ], 32);
1825
1829
  }
1826
- const Ft = /* @__PURE__ */ R(kt, [["render", Nt], ["__scopeId", "data-v-44ddf1a1"]]), Ut = {
1830
+ const Pt = /* @__PURE__ */ N(kt, [["render", Nt], ["__scopeId", "data-v-44ddf1a1"]]), Ft = {
1827
1831
  name: "WmAIAvatar",
1828
1832
  props: {
1829
1833
  size: { type: Number, default: 26 },
@@ -1846,16 +1850,16 @@ const Ft = /* @__PURE__ */ R(kt, [["render", Nt], ["__scopeId", "data-v-44ddf1a1
1846
1850
  },
1847
1851
  computed: {
1848
1852
  initials() {
1849
- return ye(this.name);
1853
+ return we(this.name);
1850
1854
  },
1851
1855
  bgColor() {
1852
- return ve(this.name);
1856
+ return ye(this.name);
1853
1857
  }
1854
1858
  }
1855
- }, Dt = {
1859
+ }, Ut = {
1856
1860
  key: 0,
1857
1861
  class: "wm-aiav__pulse"
1858
- }, Pt = ["src", "alt"], jt = ["width", "height"];
1862
+ }, Dt = ["src", "alt"], jt = ["width", "height"];
1859
1863
  function Ht(e, t, n, i, r, s) {
1860
1864
  return c(), u("div", {
1861
1865
  class: O(["wm-aiav", { "wm-aiav--tail": n.tail }]),
@@ -1865,7 +1869,7 @@ function Ht(e, t, n, i, r, s) {
1865
1869
  "--wm-avr": n.size * 0.32 + "px"
1866
1870
  })
1867
1871
  }, [
1868
- n.pulse ? (c(), u("div", Dt)) : b("", !0),
1872
+ n.pulse ? (c(), u("div", Ut)) : y("", !0),
1869
1873
  o("div", {
1870
1874
  class: O(["wm-aiav__inner", {
1871
1875
  "wm-aiav__inner--glow": n.pulse,
@@ -1880,7 +1884,7 @@ function Ht(e, t, n, i, r, s) {
1880
1884
  key: 0,
1881
1885
  src: n.imageUrl,
1882
1886
  alt: n.name || ""
1883
- }, null, 8, Pt)) : s.initials ? (c(), u("span", {
1887
+ }, null, 8, Dt)) : s.initials ? (c(), u("span", {
1884
1888
  key: 1,
1885
1889
  style: q({ fontSize: n.size * 0.36 + "px" })
1886
1890
  }, v(s.initials), 5)) : (c(), u("svg", {
@@ -1914,7 +1918,7 @@ function Ht(e, t, n, i, r, s) {
1914
1918
  ], 6)
1915
1919
  ], 6);
1916
1920
  }
1917
- const le = /* @__PURE__ */ R(Ut, [["render", Ht], ["__scopeId", "data-v-6f7f685d"]]), zt = {
1921
+ const le = /* @__PURE__ */ N(Ft, [["render", Ht], ["__scopeId", "data-v-6f7f685d"]]), zt = {
1918
1922
  name: "WmTeamAvatars",
1919
1923
  props: {
1920
1924
  members: { type: Array, default: () => [] },
@@ -1930,16 +1934,16 @@ const le = /* @__PURE__ */ R(Ut, [["render", Ht], ["__scopeId", "data-v-6f7f685d
1930
1934
  },
1931
1935
  methods: {
1932
1936
  colorFor(e) {
1933
- return e.avatar_url ? "transparent" : ve(e.name || "");
1937
+ return e.avatar_url ? "transparent" : ye(e.name || "");
1934
1938
  },
1935
1939
  initialsFor(e) {
1936
- return ye(e.name || "");
1940
+ return we(e.name || "");
1937
1941
  }
1938
1942
  }
1939
1943
  }, qt = {
1940
1944
  key: 0,
1941
1945
  class: "wm-team"
1942
- }, $t = ["src", "alt"], Vt = { key: 1 }, Kt = {
1946
+ }, $t = ["src", "alt"], Kt = { key: 1 }, Vt = {
1943
1947
  key: 0,
1944
1948
  class: "wm-team__label"
1945
1949
  };
@@ -1949,7 +1953,7 @@ function Wt(e, t, n, i, r, s) {
1949
1953
  class: "wm-team__stack",
1950
1954
  style: q({ width: s.stackWidth + "px" })
1951
1955
  }, [
1952
- (c(!0), u(E, null, P(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1956
+ (c(!0), u(B, null, D(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1953
1957
  key: l,
1954
1958
  class: "wm-team__pill",
1955
1959
  style: q({
@@ -1962,13 +1966,13 @@ function Wt(e, t, n, i, r, s) {
1962
1966
  key: 0,
1963
1967
  src: a.avatar_url,
1964
1968
  alt: a.name || ""
1965
- }, null, 8, $t)) : (c(), u("span", Vt, v(s.initialsFor(a)), 1))
1969
+ }, null, 8, $t)) : (c(), u("span", Kt, v(s.initialsFor(a)), 1))
1966
1970
  ], 4))), 128))
1967
1971
  ], 4),
1968
- n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) : b("", !0)
1969
- ])) : b("", !0);
1972
+ n.responseLabel ? (c(), u("span", Vt, v(n.responseLabel), 1)) : y("", !0)
1973
+ ])) : y("", !0);
1970
1974
  }
1971
- const Gt = /* @__PURE__ */ R(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
1975
+ const Gt = /* @__PURE__ */ N(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
1972
1976
  name: "WmHeader",
1973
1977
  components: { AIAvatar: le, TeamAvatars: Gt },
1974
1978
  inject: {
@@ -2015,7 +2019,7 @@ const Gt = /* @__PURE__ */ R(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063
2015
2019
  class: "wm-header__fill"
2016
2020
  }, sn = { class: "wm-header__actions" }, rn = ["aria-label", "title"], an = ["aria-label", "title"];
2017
2021
  function on(e, t, n, i, r, s) {
2018
- const a = I("AIAvatar"), l = I("TeamAvatars");
2022
+ const a = R("AIAvatar"), l = R("TeamAvatars");
2019
2023
  return c(), u("div", Jt, [
2020
2024
  n.showBack ? (c(), u("button", {
2021
2025
  key: 0,
@@ -2038,7 +2042,7 @@ function on(e, t, n, i, r, s) {
2038
2042
  o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2039
2043
  ], -1)
2040
2044
  ])], 8, Qt)) : (c(), u("div", Xt)),
2041
- n.showIdentity ? (c(), u(E, { key: 2 }, [
2045
+ n.showIdentity ? (c(), u(B, { key: 2 }, [
2042
2046
  o("div", Zt, [
2043
2047
  $(a, {
2044
2048
  size: 30,
@@ -2049,11 +2053,11 @@ function on(e, t, n, i, r, s) {
2049
2053
  o("div", en, [
2050
2054
  o("div", tn, v(n.title), 1)
2051
2055
  ]),
2052
- s.hasTeam ? (c(), U(l, {
2056
+ s.hasTeam ? (c(), F(l, {
2053
2057
  key: 0,
2054
2058
  members: s.displayedTeamMembers,
2055
2059
  "response-label": ""
2056
- }, null, 8, ["members"])) : b("", !0)
2060
+ }, null, 8, ["members"])) : y("", !0)
2057
2061
  ], 64)) : (c(), u("div", nn)),
2058
2062
  o("div", sn, [
2059
2063
  n.showMore ? (c(), u("button", {
@@ -2087,7 +2091,7 @@ function on(e, t, n, i, r, s) {
2087
2091
  r: "1.6"
2088
2092
  })
2089
2093
  ], -1)
2090
- ])], 10, rn)) : b("", !0),
2094
+ ])], 10, rn)) : y("", !0),
2091
2095
  n.showClose ? (c(), u("button", {
2092
2096
  key: 1,
2093
2097
  type: "button",
@@ -2109,30 +2113,30 @@ function on(e, t, n, i, r, s) {
2109
2113
  }, [
2110
2114
  o("path", { d: "M18 6L6 18M6 6l12 12" })
2111
2115
  ], -1)
2112
- ])], 8, an)) : b("", !0)
2116
+ ])], 8, an)) : y("", !0)
2113
2117
  ])
2114
2118
  ]);
2115
2119
  }
2116
- const ln = /* @__PURE__ */ R(Yt, [["render", on], ["__scopeId", "data-v-925c9e94"]]);
2120
+ const ln = /* @__PURE__ */ N(Yt, [["render", on], ["__scopeId", "data-v-0da6fbcd"]]);
2117
2121
  function Ne(e) {
2118
2122
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2119
2123
  }
2120
2124
  function cn(e) {
2121
2125
  return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
2122
2126
  }
2123
- const Me = "";
2124
- function re(e) {
2127
+ const Te = "";
2128
+ function ie(e) {
2125
2129
  let t = e;
2126
2130
  const n = [];
2127
2131
  return t = t.replace(/`([^`\n]+)`/g, (i, r) => {
2128
2132
  const s = n.length;
2129
- return n.push(r), `${Me}CODE${s}${Me}`;
2133
+ return n.push(r), `${Te}CODE${s}${Te}`;
2130
2134
  }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) => cn(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (i, r) => `<code class="wm-md-code">${n[+r]}</code>`), t;
2131
2135
  }
2132
2136
  function dn(e) {
2133
2137
  if (!e) return "";
2134
2138
  const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
2135
- return re(Ne(t));
2139
+ return ie(Ne(t));
2136
2140
  }
2137
2141
  function un(e) {
2138
2142
  if (!e) return "";
@@ -2160,25 +2164,25 @@ function un(e) {
2160
2164
  if (!T) break;
2161
2165
  k.push(T[1]), i++;
2162
2166
  }
2163
- const w = k.map((T) => `<li>${re(T)}</li>`).join("");
2167
+ const b = k.map((T) => `<li>${ie(T)}</li>`).join("");
2164
2168
  n.push({
2165
2169
  type: "block",
2166
- html: `<ul class="wm-md-ul">${w}</ul>`
2170
+ html: `<ul class="wm-md-ul">${b}</ul>`
2167
2171
  });
2168
2172
  continue;
2169
2173
  }
2170
2174
  const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
2171
2175
  if (l) {
2172
- const k = parseInt(l[1], 10), w = [l[2]];
2176
+ const k = parseInt(l[1], 10), b = [l[2]];
2173
2177
  for (i++; i < t.length; ) {
2174
2178
  const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
2175
2179
  if (!A) break;
2176
- w.push(A[1]), i++;
2180
+ b.push(A[1]), i++;
2177
2181
  }
2178
- const T = w.map((A) => `<li>${re(A)}</li>`).join(""), B = k !== 1 ? ` start="${k}"` : "";
2182
+ const T = b.map((A) => `<li>${ie(A)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
2179
2183
  n.push({
2180
2184
  type: "block",
2181
- html: `<ol class="wm-md-ol"${B}>${T}</ol>`
2185
+ html: `<ol class="wm-md-ol"${E}>${T}</ol>`
2182
2186
  });
2183
2187
  continue;
2184
2188
  }
@@ -2187,11 +2191,11 @@ function un(e) {
2187
2191
  const k = p[1].length;
2188
2192
  n.push({
2189
2193
  type: "block",
2190
- html: `<h${k} class="wm-md-h wm-md-h${k}">${re(p[2])}</h${k}>`
2194
+ html: `<h${k} class="wm-md-h wm-md-h${k}">${ie(p[2])}</h${k}>`
2191
2195
  }), i++;
2192
2196
  continue;
2193
2197
  }
2194
- n.push({ type: "text", html: re(s) }), i++;
2198
+ n.push({ type: "text", html: ie(s) }), i++;
2195
2199
  }
2196
2200
  let r = "";
2197
2201
  for (let s = 0; s < n.length; s++) {
@@ -2203,7 +2207,7 @@ function un(e) {
2203
2207
  }
2204
2208
  return r;
2205
2209
  }
2206
- const Te = {
2210
+ const xe = {
2207
2211
  book: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253",
2208
2212
  changelog: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",
2209
2213
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
@@ -2253,7 +2257,7 @@ const Te = {
2253
2257
  },
2254
2258
  methods: {
2255
2259
  iconPath(e) {
2256
- return Te[e] || Te.link;
2260
+ return xe[e] || xe.link;
2257
2261
  },
2258
2262
  renderPreview(e) {
2259
2263
  return dn(e);
@@ -2262,7 +2266,7 @@ const Te = {
2262
2266
  if (!e) return "";
2263
2267
  const t = new Date(e);
2264
2268
  if (Number.isNaN(t.getTime())) return "";
2265
- const n = oe(this.wmLocale()), i = /* @__PURE__ */ new Date();
2269
+ const n = re(this.wmLocale()), i = /* @__PURE__ */ new Date();
2266
2270
  if (t.toDateString() === i.toDateString())
2267
2271
  return t.toLocaleTimeString(n, {
2268
2272
  hour: "2-digit",
@@ -2280,7 +2284,7 @@ const Te = {
2280
2284
  }
2281
2285
  }, mn = { class: "wm-onb" }, fn = { class: "wm-onb__hero" }, gn = { class: "wm-onb__hero-text" }, _n = { class: "wm-onb__title" }, pn = { class: "wm-onb__sub" }, vn = { class: "wm-onb__cta" }, yn = ["disabled"], wn = {
2282
2286
  key: 0,
2283
- class: "wm-onb__section"
2287
+ class: "wm-onb__section wm-onb__section--card"
2284
2288
  }, bn = { class: "wm-onb__section-title" }, kn = ["onClick"], Cn = { class: "wm-onb__card-icon" }, An = {
2285
2289
  width: "16",
2286
2290
  height: "16",
@@ -2296,16 +2300,19 @@ const Te = {
2296
2300
  class: "wm-onb__card-sub"
2297
2301
  }, On = {
2298
2302
  key: 1,
2299
- class: "wm-onb__section"
2300
- }, Ln = { class: "wm-onb__section-title" }, Bn = { class: "wm-onb__search" }, En = ["placeholder", "aria-label"], In = { class: "wm-onb__list" }, Rn = ["onClick"], Nn = ["aria-label"], Fn = { class: "wm-onb__thread-body" }, Un = { class: "wm-onb__thread-title" }, Dn = ["innerHTML"], Pn = { class: "wm-onb__thread-meta" }, jn = {
2303
+ class: "wm-onb__section wm-onb__section--card"
2304
+ }, Ln = { class: "wm-onb__section-title" }, In = { class: "wm-onb__search" }, En = ["placeholder", "aria-label"], Bn = { class: "wm-onb__list" }, Rn = { class: "wm-onb__thread-body" }, Nn = { class: "wm-onb__thread-status" }, Pn = { class: "wm-onb__thread-statusLabel" }, Fn = {
2301
2305
  key: 0,
2306
+ class: "wm-onb__thread-statusSep"
2307
+ }, Un = {
2308
+ key: 1,
2302
2309
  class: "wm-onb__thread-time"
2303
- }, Hn = {
2310
+ }, Dn = { class: "wm-onb__thread-title" }, jn = ["innerHTML"], Hn = ["onClick"], zn = {
2304
2311
  key: 0,
2305
2312
  class: "wm-onb__empty"
2306
2313
  };
2307
- function zn(e, t, n, i, r, s) {
2308
- const a = I("AIAvatar");
2314
+ function qn(e, t, n, i, r, s) {
2315
+ const a = R("AIAvatar");
2309
2316
  return c(), u("div", mn, [
2310
2317
  o("div", fn, [
2311
2318
  t[2] || (t[2] = o("svg", {
@@ -2381,7 +2388,7 @@ function zn(e, t, n, i, r, s) {
2381
2388
  o("div", {
2382
2389
  class: O(s.quickLinksLayout)
2383
2390
  }, [
2384
- (c(!0), u(E, null, P(n.quickLinks, (l, p) => (c(), u("button", {
2391
+ (c(!0), u(B, null, D(n.quickLinks, (l, p) => (c(), u("button", {
2385
2392
  key: p,
2386
2393
  type: "button",
2387
2394
  class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
@@ -2396,14 +2403,14 @@ function zn(e, t, n, i, r, s) {
2396
2403
  ]),
2397
2404
  o("span", Mn, [
2398
2405
  o("span", Tn, v(l.label), 1),
2399
- l.description ? (c(), u("span", xn, v(l.description), 1)) : b("", !0)
2406
+ l.description ? (c(), u("span", xn, v(l.description), 1)) : y("", !0)
2400
2407
  ])
2401
2408
  ], 10, kn))), 128))
2402
2409
  ], 2)
2403
- ])) : b("", !0),
2410
+ ])) : y("", !0),
2404
2411
  n.openThreads.length ? (c(), u("div", On, [
2405
2412
  o("div", Ln, v(s.t("onboarding.recentConversations")), 1),
2406
- o("div", Bn, [
2413
+ o("div", In, [
2407
2414
  t[4] || (t[4] = o("span", { class: "wm-onb__searchIcon" }, [
2408
2415
  o("svg", {
2409
2416
  width: "12",
@@ -2419,7 +2426,7 @@ function zn(e, t, n, i, r, s) {
2419
2426
  o("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2420
2427
  ])
2421
2428
  ], -1)),
2422
- K(o("input", {
2429
+ V(o("input", {
2423
2430
  "onUpdate:modelValue": t[1] || (t[1] = (l) => r.query = l),
2424
2431
  type: "text",
2425
2432
  placeholder: s.t("onboarding.search"),
@@ -2428,17 +2435,13 @@ function zn(e, t, n, i, r, s) {
2428
2435
  [X, r.query]
2429
2436
  ])
2430
2437
  ]),
2431
- o("div", In, [
2432
- (c(!0), u(E, null, P(s.filteredThreads, (l) => (c(), u("button", {
2438
+ o("div", Bn, [
2439
+ (c(!0), u(B, null, D(s.filteredThreads, (l) => (c(), u("div", {
2433
2440
  key: l.id,
2434
- type: "button",
2435
- class: "wm-onb__thread",
2436
- onClick: (p) => e.$emit("resume", l)
2441
+ class: "wm-onb__thread"
2437
2442
  }, [
2438
- o("span", {
2439
- class: O(["wm-onb__thread-icon", { "wm-onb__thread-icon--inverted": !l.unread }])
2440
- }, [
2441
- t[5] || (t[5] = o("svg", {
2443
+ t[5] || (t[5] = o("span", { class: "wm-onb__thread-icon" }, [
2444
+ o("svg", {
2442
2445
  width: "18",
2443
2446
  height: "18",
2444
2447
  viewBox: "0 0 24 24",
@@ -2450,45 +2453,33 @@ function zn(e, t, n, i, r, s) {
2450
2453
  fill: "currentColor",
2451
2454
  opacity: "0.92"
2452
2455
  })
2453
- ], -1)),
2454
- l.unread ? (c(), u("span", {
2455
- key: 0,
2456
- class: "wm-onb__thread-dot",
2457
- "aria-label": s.t("onboarding.unread")
2458
- }, null, 8, Nn)) : b("", !0)
2459
- ], 2),
2460
- o("span", Fn, [
2461
- o("span", Un, v(l.title), 1),
2456
+ ])
2457
+ ], -1)),
2458
+ o("span", Rn, [
2459
+ o("span", Nn, [
2460
+ o("span", Pn, v(s.t("onboarding.statusInProgress")), 1),
2461
+ s.formatTs(l._ts) ? (c(), u("span", Fn, "·")) : y("", !0),
2462
+ s.formatTs(l._ts) ? (c(), u("span", Un, v(s.formatTs(l._ts)), 1)) : y("", !0)
2463
+ ]),
2464
+ o("span", Dn, v(l.title), 1),
2462
2465
  o("span", {
2463
2466
  class: "wm-onb__thread-preview",
2464
2467
  innerHTML: s.renderPreview(l.preview)
2465
- }, null, 8, Dn)
2468
+ }, null, 8, jn)
2466
2469
  ]),
2467
- o("span", Pn, [
2468
- s.formatTs(l._ts) ? (c(), u("span", jn, v(s.formatTs(l._ts)), 1)) : b("", !0),
2469
- t[6] || (t[6] = o("svg", {
2470
- width: "14",
2471
- height: "14",
2472
- viewBox: "0 0 24 24",
2473
- fill: "none",
2474
- stroke: "currentColor",
2475
- "stroke-width": "1.8",
2476
- "stroke-linecap": "round",
2477
- "stroke-linejoin": "round",
2478
- class: "wm-onb__thread-chev",
2479
- "aria-hidden": "true"
2480
- }, [
2481
- o("path", { d: "M5 12h14M13 5l7 7-7 7" })
2482
- ], -1))
2483
- ])
2484
- ], 8, Rn))), 128)),
2485
- s.filteredThreads.length ? b("", !0) : (c(), u("div", Hn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2470
+ o("button", {
2471
+ type: "button",
2472
+ class: "wm-onb__thread-resume",
2473
+ onClick: (p) => e.$emit("resume", l)
2474
+ }, v(s.t("onboarding.resume")), 9, Hn)
2475
+ ]))), 128)),
2476
+ s.filteredThreads.length ? y("", !0) : (c(), u("div", zn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2486
2477
  ])
2487
- ])) : b("", !0)
2478
+ ])) : y("", !0)
2488
2479
  ]);
2489
2480
  }
2490
- const qn = /* @__PURE__ */ R(hn, [["render", zn], ["__scopeId", "data-v-a85aae63"]]);
2491
- function $n(e) {
2481
+ const $n = /* @__PURE__ */ N(hn, [["render", qn], ["__scopeId", "data-v-a3b35a29"]]);
2482
+ function Kn(e) {
2492
2483
  return typeof e != "string" ? "" : e.replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)", "g"), "$1").replace(/__([^_]+)__/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\s+/g, " ").trim();
2493
2484
  }
2494
2485
  const Vn = {
@@ -2501,13 +2492,13 @@ const Vn = {
2501
2492
  },
2502
2493
  computed: {
2503
2494
  detailText() {
2504
- return $n(this.detail);
2495
+ return Kn(this.detail);
2505
2496
  }
2506
2497
  }
2507
- }, Kn = {
2498
+ }, Wn = {
2508
2499
  class: "wm-result__icon",
2509
2500
  "aria-hidden": "true"
2510
- }, Wn = {
2501
+ }, Gn = {
2511
2502
  key: 0,
2512
2503
  width: "11",
2513
2504
  height: "11",
@@ -2517,7 +2508,7 @@ const Vn = {
2517
2508
  "stroke-width": "2.8",
2518
2509
  "stroke-linecap": "round",
2519
2510
  "stroke-linejoin": "round"
2520
- }, Gn = {
2511
+ }, Yn = {
2521
2512
  key: 1,
2522
2513
  width: "11",
2523
2514
  height: "11",
@@ -2527,7 +2518,7 @@ const Vn = {
2527
2518
  "stroke-width": "2.6",
2528
2519
  "stroke-linecap": "round",
2529
2520
  "stroke-linejoin": "round"
2530
- }, Yn = {
2521
+ }, Jn = {
2531
2522
  key: 2,
2532
2523
  width: "11",
2533
2524
  height: "11",
@@ -2537,7 +2528,7 @@ const Vn = {
2537
2528
  "stroke-width": "2.4",
2538
2529
  "stroke-linecap": "round",
2539
2530
  "stroke-linejoin": "round"
2540
- }, Jn = {
2531
+ }, Qn = {
2541
2532
  key: 3,
2542
2533
  width: "12",
2543
2534
  height: "12",
@@ -2547,24 +2538,24 @@ const Vn = {
2547
2538
  "stroke-width": "2.2",
2548
2539
  "stroke-linecap": "round",
2549
2540
  "stroke-linejoin": "round"
2550
- }, Qn = { class: "wm-result__body" }, Xn = { class: "wm-result__label" }, Zn = { class: "wm-result__detail" };
2551
- function es(e, t, n, i, r, s) {
2541
+ }, Xn = { class: "wm-result__body" }, Zn = { class: "wm-result__label" }, es = { class: "wm-result__detail" };
2542
+ function ts(e, t, n, i, r, s) {
2552
2543
  return c(), u("div", {
2553
2544
  class: O(["wm-result", `wm-result--${n.state}`])
2554
2545
  }, [
2555
- o("span", Kn, [
2556
- n.state === "success" ? (c(), u("svg", Wn, [...t[0] || (t[0] = [
2546
+ o("span", Wn, [
2547
+ n.state === "success" ? (c(), u("svg", Gn, [...t[0] || (t[0] = [
2557
2548
  o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2558
- ])])) : n.state === "rejected" ? (c(), u("svg", Gn, [...t[1] || (t[1] = [
2549
+ ])])) : n.state === "rejected" ? (c(), u("svg", Yn, [...t[1] || (t[1] = [
2559
2550
  o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2560
- ])])) : n.state === "awaiting" ? (c(), u("svg", Yn, [...t[2] || (t[2] = [
2551
+ ])])) : n.state === "awaiting" ? (c(), u("svg", Jn, [...t[2] || (t[2] = [
2561
2552
  o("circle", {
2562
2553
  cx: "12",
2563
2554
  cy: "12",
2564
2555
  r: "10"
2565
2556
  }, null, -1),
2566
2557
  o("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2567
- ])])) : (c(), u("svg", Jn, [...t[3] || (t[3] = [
2558
+ ])])) : (c(), u("svg", Qn, [...t[3] || (t[3] = [
2568
2559
  o("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
2569
2560
  o("line", {
2570
2561
  x1: "12",
@@ -2580,19 +2571,19 @@ function es(e, t, n, i, r, s) {
2580
2571
  }, null, -1)
2581
2572
  ])]))
2582
2573
  ]),
2583
- o("span", Qn, [
2584
- o("span", Xn, v(n.label), 1),
2585
- s.detailText ? (c(), u(E, { key: 0 }, [
2574
+ o("span", Xn, [
2575
+ o("span", Zn, v(n.label), 1),
2576
+ s.detailText ? (c(), u(B, { key: 0 }, [
2586
2577
  t[4] || (t[4] = o("span", {
2587
2578
  class: "wm-result__sep",
2588
2579
  "aria-hidden": "true"
2589
2580
  }, " · ", -1)),
2590
- o("span", Zn, v(s.detailText), 1)
2591
- ], 64)) : b("", !0)
2581
+ o("span", es, v(s.detailText), 1)
2582
+ ], 64)) : y("", !0)
2592
2583
  ])
2593
2584
  ], 2);
2594
2585
  }
2595
- const ts = /* @__PURE__ */ R(Vn, [["render", es], ["__scopeId", "data-v-7284acd0"]]), ns = {
2586
+ const ns = /* @__PURE__ */ N(Vn, [["render", ts], ["__scopeId", "data-v-7284acd0"]]), ss = {
2596
2587
  name: "WmArtifactFormResponse",
2597
2588
  inject: {
2598
2589
  // Translator shared by the Messenger shell; French fallback when
@@ -2608,12 +2599,12 @@ const ts = /* @__PURE__ */ R(Vn, [["render", es], ["__scopeId", "data-v-7284acd0
2608
2599
  return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
2609
2600
  }
2610
2601
  }
2611
- }, ss = { class: "wm-art wm-art--formResponse" }, rs = { class: "wm-art__head" }, is = { class: "wm-art__title" }, as = { class: "wm-art__badge wm-art__badge--success" }, os = { class: "wm-art__body" }, ls = { class: "wm-art__fieldLabel" };
2612
- function cs(e, t, n, i, r, s) {
2613
- return c(), u("div", ss, [
2614
- o("div", rs, [
2615
- o("div", is, v(n.data.title || s.t("form.title")), 1),
2616
- o("span", as, [
2602
+ }, rs = { class: "wm-art wm-art--formResponse" }, is = { class: "wm-art__head" }, as = { class: "wm-art__title" }, os = { class: "wm-art__badge wm-art__badge--success" }, ls = { class: "wm-art__body" }, cs = { class: "wm-art__fieldLabel" };
2603
+ function ds(e, t, n, i, r, s) {
2604
+ return c(), u("div", rs, [
2605
+ o("div", is, [
2606
+ o("div", as, v(n.data.title || s.t("form.title")), 1),
2607
+ o("span", os, [
2617
2608
  t[0] || (t[0] = o("svg", {
2618
2609
  width: "11",
2619
2610
  height: "11",
@@ -2627,15 +2618,15 @@ function cs(e, t, n, i, r, s) {
2627
2618
  }, [
2628
2619
  o("polyline", { points: "20 6 9 17 4 12" })
2629
2620
  ], -1)),
2630
- pe(" " + v(s.t("form.sent")), 1)
2621
+ ve(" " + v(s.t("form.sent")), 1)
2631
2622
  ])
2632
2623
  ]),
2633
- o("div", os, [
2634
- (c(!0), u(E, null, P(s.fields, (a, l) => (c(), u("div", {
2624
+ o("div", ls, [
2625
+ (c(!0), u(B, null, D(s.fields, (a, l) => (c(), u("div", {
2635
2626
  key: l,
2636
2627
  class: "wm-art__field"
2637
2628
  }, [
2638
- o("div", ls, v(a.label), 1),
2629
+ o("div", cs, v(a.label), 1),
2639
2630
  o("div", {
2640
2631
  class: O([
2641
2632
  "wm-art__fieldValue",
@@ -2646,7 +2637,7 @@ function cs(e, t, n, i, r, s) {
2646
2637
  ])
2647
2638
  ]);
2648
2639
  }
2649
- const ds = /* @__PURE__ */ R(ns, [["render", cs], ["__scopeId", "data-v-713aecf1"]]), us = {
2640
+ const us = /* @__PURE__ */ N(ss, [["render", ds], ["__scopeId", "data-v-713aecf1"]]), hs = {
2650
2641
  name: "WmArtifactInfoCard",
2651
2642
  props: {
2652
2643
  data: { type: Object, required: !0 }
@@ -2661,32 +2652,32 @@ const ds = /* @__PURE__ */ R(ns, [["render", cs], ["__scopeId", "data-v-713aecf1
2661
2652
  return !!((e = this.data) != null && e.body) || this.fields.length > 0;
2662
2653
  }
2663
2654
  }
2664
- }, hs = { class: "wm-art wm-art--infoCard" }, ms = {
2655
+ }, ms = { class: "wm-art wm-art--infoCard" }, fs = {
2665
2656
  key: 0,
2666
2657
  class: "wm-art__image"
2667
- }, fs = ["src", "alt"], gs = { class: "wm-art__head" }, _s = { class: "wm-art__headMain" }, ps = { class: "wm-art__title" }, vs = {
2658
+ }, gs = ["src", "alt"], _s = { class: "wm-art__head" }, ps = { class: "wm-art__headMain" }, vs = { class: "wm-art__title" }, ys = {
2668
2659
  key: 0,
2669
2660
  class: "wm-art__subtitle"
2670
- }, ys = {
2661
+ }, ws = {
2671
2662
  key: 1,
2672
2663
  class: "wm-art__body"
2673
- }, ws = {
2664
+ }, bs = {
2674
2665
  key: 0,
2675
2666
  class: "wm-art__text"
2676
- }, bs = { class: "wm-art__fieldLabel" };
2677
- function ks(e, t, n, i, r, s) {
2678
- return c(), u("div", hs, [
2679
- n.data.image_url ? (c(), u("figure", ms, [
2667
+ }, ks = { class: "wm-art__fieldLabel" };
2668
+ function Cs(e, t, n, i, r, s) {
2669
+ return c(), u("div", ms, [
2670
+ n.data.image_url ? (c(), u("figure", fs, [
2680
2671
  o("img", {
2681
2672
  src: n.data.image_url,
2682
2673
  alt: n.data.title || "",
2683
2674
  loading: "lazy"
2684
- }, null, 8, fs)
2685
- ])) : b("", !0),
2686
- o("div", gs, [
2687
- o("div", _s, [
2688
- o("div", ps, v(n.data.title), 1),
2689
- n.data.subtitle ? (c(), u("div", vs, v(n.data.subtitle), 1)) : b("", !0)
2675
+ }, null, 8, gs)
2676
+ ])) : y("", !0),
2677
+ o("div", _s, [
2678
+ o("div", ps, [
2679
+ o("div", vs, v(n.data.title), 1),
2680
+ n.data.subtitle ? (c(), u("div", ys, v(n.data.subtitle), 1)) : y("", !0)
2690
2681
  ]),
2691
2682
  n.data.badge && n.data.badge.label ? (c(), u("span", {
2692
2683
  key: 0,
@@ -2694,27 +2685,27 @@ function ks(e, t, n, i, r, s) {
2694
2685
  "wm-art__badge",
2695
2686
  `wm-art__badge--${n.data.badge.tone || "neutral"}`
2696
2687
  ])
2697
- }, v(n.data.badge.label), 3)) : b("", !0)
2688
+ }, v(n.data.badge.label), 3)) : y("", !0)
2698
2689
  ]),
2699
- s.hasBody ? (c(), u("div", ys, [
2700
- n.data.body ? (c(), u("div", ws, v(n.data.body), 1)) : b("", !0),
2701
- s.fields.length ? (c(!0), u(E, { key: 1 }, P(s.fields, (a, l) => (c(), u("div", {
2690
+ s.hasBody ? (c(), u("div", ws, [
2691
+ n.data.body ? (c(), u("div", bs, v(n.data.body), 1)) : y("", !0),
2692
+ s.fields.length ? (c(!0), u(B, { key: 1 }, D(s.fields, (a, l) => (c(), u("div", {
2702
2693
  key: l,
2703
2694
  class: "wm-art__field"
2704
2695
  }, [
2705
- o("div", bs, v(a.label), 1),
2696
+ o("div", ks, v(a.label), 1),
2706
2697
  o("div", {
2707
2698
  class: O([
2708
2699
  "wm-art__fieldValue",
2709
2700
  { "wm-art__fieldValue--multi": a.multiline }
2710
2701
  ])
2711
2702
  }, v(a.value), 3)
2712
- ]))), 128)) : b("", !0)
2713
- ])) : b("", !0)
2703
+ ]))), 128)) : y("", !0)
2704
+ ])) : y("", !0)
2714
2705
  ]);
2715
2706
  }
2716
- const Cs = /* @__PURE__ */ R(us, [["render", ks], ["__scopeId", "data-v-7eae0e4a"]]);
2717
- function As(e, t, n) {
2707
+ const As = /* @__PURE__ */ N(hs, [["render", Cs], ["__scopeId", "data-v-7eae0e4a"]]);
2708
+ function Ss(e, t, n) {
2718
2709
  if (!e) return "";
2719
2710
  const i = new Date(e);
2720
2711
  if (Number.isNaN(i.getTime())) return e;
@@ -2728,7 +2719,7 @@ function As(e, t, n) {
2728
2719
  });
2729
2720
  return `${r}${n}${s}`;
2730
2721
  }
2731
- const Ss = {
2722
+ const Ms = {
2732
2723
  name: "WmArtifactTicket",
2733
2724
  inject: {
2734
2725
  // Translator + resolved-language getter shared by the Messenger
@@ -2746,9 +2737,9 @@ const Ss = {
2746
2737
  },
2747
2738
  formattedDate() {
2748
2739
  var e;
2749
- return As(
2740
+ return Ss(
2750
2741
  (e = this.data) == null ? void 0 : e.created_at,
2751
- oe(this.wmLocale()),
2742
+ re(this.wmLocale()),
2752
2743
  this.t("ticket.dateAt")
2753
2744
  );
2754
2745
  }
@@ -2774,13 +2765,13 @@ const Ss = {
2774
2765
  return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
2775
2766
  }
2776
2767
  }
2777
- }, Ms = { class: "wm-art wm-art--ticket" }, Ts = { class: "wm-art__head wm-tk__head" }, xs = { class: "wm-art__title wm-tk__title" }, Os = { class: "wm-tk__sub" }, Ls = { class: "wm-tk__ref" }, Bs = {
2768
+ }, Ts = { class: "wm-art wm-art--ticket" }, xs = { class: "wm-art__head wm-tk__head" }, Os = { class: "wm-art__title wm-tk__title" }, Ls = { class: "wm-tk__sub" }, Is = { class: "wm-tk__ref" }, Es = {
2778
2769
  key: 0,
2779
2770
  class: "wm-tk__text"
2780
- }, Es = {
2771
+ }, Bs = {
2781
2772
  key: 0,
2782
2773
  class: "wm-art__body"
2783
- }, Is = { class: "wm-art__fieldLabel" }, Rs = ["data-level"], Ns = {
2774
+ }, Rs = { class: "wm-art__fieldLabel" }, Ns = ["data-level"], Ps = {
2784
2775
  key: 1,
2785
2776
  class: "wm-tk__date",
2786
2777
  width: "12",
@@ -2797,11 +2788,11 @@ const Ss = {
2797
2788
  class: "wm-art__footer wm-tk__footer"
2798
2789
  };
2799
2790
  function Us(e, t, n, i, r, s) {
2800
- return c(), u("div", Ms, [
2801
- o("div", Ts, [
2802
- o("div", xs, v(n.data.title), 1),
2803
- o("div", Os, [
2804
- o("div", Ls, [
2791
+ return c(), u("div", Ts, [
2792
+ o("div", xs, [
2793
+ o("div", Os, v(n.data.title), 1),
2794
+ o("div", Ls, [
2795
+ o("div", Is, [
2805
2796
  t[0] || (t[0] = o("svg", {
2806
2797
  width: "11",
2807
2798
  height: "11",
@@ -2829,17 +2820,17 @@ function Us(e, t, n, i, r, s) {
2829
2820
  class: "wm-tk__dot",
2830
2821
  "aria-hidden": "true"
2831
2822
  }, null, -1)),
2832
- pe(" " + v(n.data.status.label), 1)
2823
+ ve(" " + v(n.data.status.label), 1)
2833
2824
  ], 2)
2834
2825
  ]),
2835
- n.data.body ? (c(), u("div", Bs, v(n.data.body), 1)) : b("", !0)
2826
+ n.data.body ? (c(), u("div", Es, v(n.data.body), 1)) : y("", !0)
2836
2827
  ]),
2837
- s.fields.length ? (c(), u("div", Es, [
2838
- (c(!0), u(E, null, P(s.fields, (a, l) => (c(), u("div", {
2828
+ s.fields.length ? (c(), u("div", Bs, [
2829
+ (c(!0), u(B, null, D(s.fields, (a, l) => (c(), u("div", {
2839
2830
  key: l,
2840
2831
  class: "wm-art__field"
2841
2832
  }, [
2842
- o("div", Is, v(a.label), 1),
2833
+ o("div", Rs, v(a.label), 1),
2843
2834
  o("div", {
2844
2835
  class: O([
2845
2836
  "wm-art__fieldValue",
@@ -2876,7 +2867,7 @@ function Us(e, t, n, i, r, s) {
2876
2867
  height: "9",
2877
2868
  rx: "0.5"
2878
2869
  }, null, -1)
2879
- ])], 8, Rs)) : s.isDate(a.label) ? (c(), u("svg", Ns, [...t[3] || (t[3] = [
2870
+ ])], 8, Ns)) : s.isDate(a.label) ? (c(), u("svg", Ps, [...t[3] || (t[3] = [
2880
2871
  o("rect", {
2881
2872
  x: "3",
2882
2873
  y: "4",
@@ -2885,11 +2876,11 @@ function Us(e, t, n, i, r, s) {
2885
2876
  rx: "2"
2886
2877
  }, null, -1),
2887
2878
  o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
2888
- ])])) : b("", !0),
2879
+ ])])) : y("", !0),
2889
2880
  o("span", null, v(a.value), 1)
2890
2881
  ], 2)
2891
2882
  ]))), 128))
2892
- ])) : b("", !0),
2883
+ ])) : y("", !0),
2893
2884
  n.data.created_at ? (c(), u("div", Fs, [
2894
2885
  t[4] || (t[4] = o("svg", {
2895
2886
  width: "11",
@@ -2912,14 +2903,14 @@ function Us(e, t, n, i, r, s) {
2912
2903
  o("path", { d: "M16 2v4M8 2v4M3 10h18" })
2913
2904
  ], -1)),
2914
2905
  o("span", null, v(s.formattedDate), 1)
2915
- ])) : b("", !0)
2906
+ ])) : y("", !0)
2916
2907
  ]);
2917
2908
  }
2918
- const Ds = /* @__PURE__ */ R(Ss, [["render", Us], ["__scopeId", "data-v-5f30c914"]]), Ps = {
2919
- form_response: ds,
2920
- info_card: Cs,
2909
+ const Ds = /* @__PURE__ */ N(Ms, [["render", Us], ["__scopeId", "data-v-5f30c914"]]), js = {
2910
+ form_response: us,
2911
+ info_card: As,
2921
2912
  ticket: Ds
2922
- }, js = {
2913
+ }, Hs = {
2923
2914
  name: "WmArtifactRenderer",
2924
2915
  props: {
2925
2916
  // Forme : { kind: string, data: any } (le `data` est validé
@@ -2930,17 +2921,17 @@ const Ds = /* @__PURE__ */ R(Ss, [["render", Us], ["__scopeId", "data-v-5f30c914
2930
2921
  component() {
2931
2922
  var t;
2932
2923
  const e = (t = this.artifact) == null ? void 0 : t.kind;
2933
- return e && Ps[e] || null;
2924
+ return e && js[e] || null;
2934
2925
  }
2935
2926
  }
2936
2927
  };
2937
- function Hs(e, t, n, i, r, s) {
2938
- return s.component ? (c(), U(Pe(s.component), {
2928
+ function zs(e, t, n, i, r, s) {
2929
+ return s.component ? (c(), F(De(s.component), {
2939
2930
  key: 0,
2940
2931
  data: n.artifact.data
2941
- }, null, 8, ["data"])) : b("", !0);
2932
+ }, null, 8, ["data"])) : y("", !0);
2942
2933
  }
2943
- const zs = /* @__PURE__ */ R(js, [["render", Hs]]), qs = {
2934
+ const qs = /* @__PURE__ */ N(Hs, [["render", zs]]), $s = {
2944
2935
  name: "WmAttachmentPreview",
2945
2936
  inject: {
2946
2937
  signAttachmentFn: { default: null },
@@ -3008,15 +2999,15 @@ const zs = /* @__PURE__ */ R(js, [["render", Hs]]), qs = {
3008
2999
  this.safeHref === "#" && e.preventDefault();
3009
3000
  }
3010
3001
  }
3011
- }, $s = ["href"], Vs = ["src", "alt"], Ks = ["src"], Ws = ["src"], Gs = ["href", "download"], Ys = { class: "wm-att__main" }, Js = { class: "wm-att__name" }, Qs = {
3002
+ }, Ks = ["href"], Vs = ["src", "alt"], Ws = ["src"], Gs = ["src"], Ys = ["href", "download"], Js = { class: "wm-att__main" }, Qs = { class: "wm-att__name" }, Xs = {
3012
3003
  key: 0,
3013
3004
  class: "wm-att__meta"
3014
- }, Xs = {
3005
+ }, Zs = {
3015
3006
  key: 0,
3016
3007
  class: "wm-att__spin",
3017
3008
  "aria-hidden": "true"
3018
3009
  };
3019
- function Zs(e, t, n, i, r, s) {
3010
+ function er(e, t, n, i, r, s) {
3020
3011
  return c(), u("div", {
3021
3012
  class: O(["wm-att", ["wm-att--" + (s.kind || "file")]])
3022
3013
  }, [
@@ -3032,17 +3023,17 @@ function Zs(e, t, n, i, r, s) {
3032
3023
  alt: s.displayName,
3033
3024
  loading: "lazy"
3034
3025
  }, null, 8, Vs)
3035
- ], 8, $s)) : s.kind === "audio" && r.url ? (c(), u("audio", {
3026
+ ], 8, Ks)) : s.kind === "audio" && r.url ? (c(), u("audio", {
3036
3027
  key: 1,
3037
3028
  src: r.url,
3038
3029
  controls: "",
3039
3030
  preload: "metadata"
3040
- }, null, 8, Ks)) : s.kind === "video" && r.url ? (c(), u("video", {
3031
+ }, null, 8, Ws)) : s.kind === "video" && r.url ? (c(), u("video", {
3041
3032
  key: 2,
3042
3033
  src: r.url,
3043
3034
  controls: "",
3044
3035
  preload: "metadata"
3045
- }, null, 8, Ws)) : (c(), u("a", {
3036
+ }, null, 8, Gs)) : (c(), u("a", {
3046
3037
  key: 3,
3047
3038
  class: "wm-att__file",
3048
3039
  href: s.safeHref,
@@ -3067,15 +3058,15 @@ function Zs(e, t, n, i, r, s) {
3067
3058
  o("path", { d: "M14 2v6h6" })
3068
3059
  ])
3069
3060
  ], -1)),
3070
- o("span", Ys, [
3071
- o("span", Js, v(s.displayName), 1),
3072
- s.sizeLabel ? (c(), u("span", Qs, v(s.sizeLabel), 1)) : b("", !0)
3061
+ o("span", Js, [
3062
+ o("span", Qs, v(s.displayName), 1),
3063
+ s.sizeLabel ? (c(), u("span", Xs, v(s.sizeLabel), 1)) : y("", !0)
3073
3064
  ]),
3074
- r.loading ? (c(), u("span", Xs)) : b("", !0)
3075
- ], 8, Gs))
3065
+ r.loading ? (c(), u("span", Zs)) : y("", !0)
3066
+ ], 8, Ys))
3076
3067
  ], 2);
3077
3068
  }
3078
- const er = /* @__PURE__ */ R(qs, [["render", Zs], ["__scopeId", "data-v-0c877a62"]]), tr = {
3069
+ const tr = /* @__PURE__ */ N($s, [["render", er], ["__scopeId", "data-v-0c877a62"]]), nr = {
3079
3070
  name: "WmBubble",
3080
3071
  props: {
3081
3072
  role: { type: String, default: "ai" },
@@ -3087,45 +3078,45 @@ const er = /* @__PURE__ */ R(qs, [["render", Zs], ["__scopeId", "data-v-0c877a62
3087
3078
  return un(this.text);
3088
3079
  }
3089
3080
  }
3090
- }, nr = ["innerHTML"];
3091
- function sr(e, t, n, i, r, s) {
3081
+ }, sr = ["innerHTML"];
3082
+ function rr(e, t, n, i, r, s) {
3092
3083
  return c(), u("div", {
3093
3084
  class: O(["wm-bubble", "wm-bubble--" + n.role])
3094
3085
  }, [
3095
3086
  je(e.$slots, "default", {}, () => [
3096
- o("span", { innerHTML: s.rendered }, null, 8, nr)
3087
+ o("span", { innerHTML: s.rendered }, null, 8, sr)
3097
3088
  ], !0)
3098
3089
  ], 2);
3099
3090
  }
3100
- const rr = /* @__PURE__ */ R(tr, [["render", sr], ["__scopeId", "data-v-7ab13147"]]), ir = { name: "WmTyping" }, ar = { class: "wm-typing" };
3101
- function or(e, t, n, i, r, s) {
3102
- return c(), u("div", ar, [...t[0] || (t[0] = [
3091
+ const ir = /* @__PURE__ */ N(nr, [["render", rr], ["__scopeId", "data-v-7ab13147"]]), ar = { name: "WmTyping" }, or = { class: "wm-typing" };
3092
+ function lr(e, t, n, i, r, s) {
3093
+ return c(), u("div", or, [...t[0] || (t[0] = [
3103
3094
  o("span", { style: { "animation-delay": "0s" } }, null, -1),
3104
3095
  o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3105
3096
  o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3106
3097
  ])]);
3107
3098
  }
3108
- const lr = /* @__PURE__ */ R(ir, [["render", or], ["__scopeId", "data-v-df2447fd"]]);
3099
+ const cr = /* @__PURE__ */ N(ar, [["render", lr], ["__scopeId", "data-v-df2447fd"]]);
3109
3100
  function Q(e) {
3110
3101
  return e ? e.client_msg_id || e.id : "";
3111
3102
  }
3112
- const cr = {
3103
+ const dr = {
3113
3104
  transferred_to_human: "system.transferredToHuman",
3114
3105
  assigned: "system.assigned",
3115
3106
  unassigned: "system.unassigned",
3116
3107
  resolved: "system.resolved",
3117
3108
  reopened: "system.reopened",
3118
3109
  idle: "system.idle"
3119
- }, dr = 80, ur = 200, hr = {
3110
+ }, ur = 80, hr = 200, mr = {
3120
3111
  name: "WmMessageList",
3121
3112
  components: {
3122
3113
  AIAvatar: le,
3123
3114
  HumanAvatar: Re,
3124
- Bubble: rr,
3125
- Typing: lr,
3126
- ActionResult: ts,
3127
- AttachmentPreview: er,
3128
- ArtifactRenderer: zs
3115
+ Bubble: ir,
3116
+ Typing: cr,
3117
+ ActionResult: ns,
3118
+ AttachmentPreview: tr,
3119
+ ArtifactRenderer: qs
3129
3120
  },
3130
3121
  inject: {
3131
3122
  // Translator + resolved-language getter shared by the Messenger
@@ -3181,7 +3172,12 @@ const cr = {
3181
3172
  // seuil "pinned" — affiche un bouton flottant pour revenir en
3182
3173
  // bas. Recalculé sur chaque `onScroll` et après chaque restore
3183
3174
  // de position.
3184
- showScrollDown: !1
3175
+ showScrollDown: !1,
3176
+ // Clé d'item actuellement long-pressé : affiche la meta-row
3177
+ // (rôle • heure) sous la bulle correspondante tant que la
3178
+ // pression est maintenue. Null hors long-press, ou pour la
3179
+ // dernière row du cluster (sa meta est déjà rendue en pied).
3180
+ pressedItemKey: null
3185
3181
  };
3186
3182
  },
3187
3183
  computed: {
@@ -3195,8 +3191,8 @@ const cr = {
3195
3191
  const l = this.roleOf(a);
3196
3192
  if (l === "system") {
3197
3193
  if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
3198
- const w = e[e.length - 1];
3199
- w && w.role === "ai" ? w.messages.push(a) : e.push({
3194
+ const b = e[e.length - 1];
3195
+ b && b.role === "ai" ? b.messages.push(a) : e.push({
3200
3196
  key: `g-${Q(a)}`,
3201
3197
  role: "ai",
3202
3198
  agentName: "",
@@ -3278,7 +3274,7 @@ const cr = {
3278
3274
  },
3279
3275
  beforeUnmount() {
3280
3276
  var e;
3281
- (e = this._ro) == null || e.disconnect(), this._measureFrame && cancelAnimationFrame(this._measureFrame);
3277
+ (e = this._ro) == null || e.disconnect(), this._measureFrame && cancelAnimationFrame(this._measureFrame), this._pressTimer && clearTimeout(this._pressTimer);
3282
3278
  },
3283
3279
  updated() {
3284
3280
  this.scheduleMeasure();
@@ -3310,11 +3306,11 @@ const cr = {
3310
3306
  return `g-${n}`;
3311
3307
  },
3312
3308
  isAtBottom(e) {
3313
- return e.scrollHeight - e.scrollTop - e.clientHeight <= dr;
3309
+ return e.scrollHeight - e.scrollTop - e.clientHeight <= ur;
3314
3310
  },
3315
3311
  onScroll() {
3316
3312
  const e = this.$refs.scrollEl;
3317
- e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= ur && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3313
+ e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= hr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3318
3314
  },
3319
3315
  // Capture pre-patch scroll state and restore it on the next tick.
3320
3316
  //
@@ -3515,9 +3511,9 @@ const cr = {
3515
3511
  // doit garder son arrondi.
3516
3512
  cornersFor(e, t) {
3517
3513
  var Z, ee, te;
3518
- const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, M = (V, ne, Y) => V != null && T != null ? V + H >= T : ne === Y || ne === "card" && Y === "bubble";
3519
- let F = l, N = l, D = l, G = l;
3520
- return a ? (k && (N = p), (w || !s) && (D = p), k && M(B, k, i == null ? void 0 : i.top) && (F = p), w && M(A, w, i == null ? void 0 : i.bottom) && (G = p)) : (k && (F = p), (w || !s) && (G = p), k && M(B, k, i == null ? void 0 : i.top) && (N = p), w && M(A, w, i == null ? void 0 : i.bottom) && (D = p)), { tl: F, tr: N, br: D, bl: G };
3514
+ const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, b = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, S = (K, ne, J) => K != null && T != null ? K + H >= T : ne === J || ne === "card" && J === "bubble";
3515
+ let P = l, I = l, U = l, Y = l;
3516
+ return a ? (k && (I = p), (b || !s) && (U = p), k && S(E, k, i == null ? void 0 : i.top) && (P = p), b && S(A, b, i == null ? void 0 : i.bottom) && (Y = p)) : (k && (P = p), (b || !s) && (Y = p), k && S(E, k, i == null ? void 0 : i.top) && (I = p), b && S(A, b, i == null ? void 0 : i.bottom) && (U = p)), { tl: P, tr: I, br: U, bl: Y };
3521
3517
  },
3522
3518
  // Inline style emitting the four corner CSS variables. Set on
3523
3519
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3579,13 +3575,35 @@ const cr = {
3579
3575
  }
3580
3576
  this.widthByKey = Object.freeze(t);
3581
3577
  },
3578
+ // Long-press : déclenche après ~400ms la révélation de la meta-row
3579
+ // sous la bulle pressée. Tout relâchement / cancel / sortie annule
3580
+ // le timer s'il est encore en attente ou efface la meta visible.
3581
+ onPressStart(e) {
3582
+ this.onPressEnd(), this._pressTimer = setTimeout(() => {
3583
+ this._pressTimer = null, this.pressedItemKey = e;
3584
+ }, 400);
3585
+ },
3586
+ onPressEnd() {
3587
+ this._pressTimer && (clearTimeout(this._pressTimer), this._pressTimer = null), this.pressedItemKey !== null && (this.pressedItemKey = null);
3588
+ },
3589
+ timeOf(e) {
3590
+ if (!(e != null && e.created_at)) return "";
3591
+ try {
3592
+ return pe(
3593
+ new Date(e.created_at),
3594
+ re(this.wmLocale())
3595
+ );
3596
+ } catch {
3597
+ return "";
3598
+ }
3599
+ },
3582
3600
  lastTimeOf(e) {
3583
3601
  const t = e.items[e.items.length - 1], n = (t == null ? void 0 : t.message) || e.messages[e.messages.length - 1];
3584
3602
  if (!(n != null && n.created_at)) return "";
3585
3603
  try {
3586
- return Ee(
3604
+ return pe(
3587
3605
  new Date(n.created_at),
3588
- oe(this.wmLocale())
3606
+ re(this.wmLocale())
3589
3607
  );
3590
3608
  } catch {
3591
3609
  return "";
@@ -3630,7 +3648,7 @@ const cr = {
3630
3648
  },
3631
3649
  systemLabel(e) {
3632
3650
  var r, s, a;
3633
- const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = cr[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
3651
+ const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = dr[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
3634
3652
  return n ? this.t(n, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
3635
3653
  },
3636
3654
  scrollToBottom() {
@@ -3645,152 +3663,172 @@ const cr = {
3645
3663
  e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
3646
3664
  }
3647
3665
  }
3648
- }, mr = { class: "wm-list__wrap" }, fr = {
3666
+ }, fr = { class: "wm-list__wrap" }, gr = {
3649
3667
  key: 0,
3650
3668
  class: "wm-list__loadMore",
3651
3669
  role: "status",
3652
3670
  "aria-live": "polite"
3653
- }, gr = { class: "wm-list__loadMore-lbl" }, _r = {
3671
+ }, _r = { class: "wm-list__loadMore-lbl" }, pr = {
3654
3672
  key: 1,
3655
3673
  class: "wm-list__historyEnd"
3656
- }, pr = {
3674
+ }, vr = {
3657
3675
  key: 2,
3658
3676
  class: "wm-list__sep"
3659
- }, vr = { class: "wm-list__sep-label" }, yr = {
3677
+ }, yr = { class: "wm-list__sep-label" }, wr = {
3660
3678
  key: 0,
3661
3679
  class: "wm-list__sep wm-list__sep--unread"
3662
- }, wr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, br = {
3680
+ }, br = { class: "wm-list__sep-label wm-list__sep-label--unread" }, kr = {
3663
3681
  key: 0,
3664
3682
  class: "wm-list__sysep"
3665
- }, kr = { class: "wm-list__sysep-label" }, Cr = ["data-row-key"], Ar = {
3683
+ }, Cr = { class: "wm-list__sysep-label" }, Ar = ["data-row-key", "onPointerdown"], Sr = {
3666
3684
  key: 0,
3667
3685
  class: "wm-list__avatarSlot"
3668
- }, Sr = {
3686
+ }, Mr = {
3669
3687
  key: 5,
3670
3688
  class: "wm-list__body"
3671
- }, Mr = { key: 0 }, Tr = {
3689
+ }, Tr = { key: 0 }, xr = {
3690
+ key: 1,
3691
+ "aria-hidden": "true"
3692
+ }, Or = { key: 2 }, Lr = { key: 0 }, Ir = {
3672
3693
  key: 1,
3673
3694
  "aria-hidden": "true"
3674
- }, xr = { key: 2 }, Or = {
3695
+ }, Er = { key: 2 }, Br = {
3675
3696
  key: 3,
3676
3697
  class: "wm-list__row wm-list__row--ai fade-up"
3677
- }, Lr = { class: "wm-list__avatarSlot" }, Br = ["aria-label", "title"];
3678
- function Er(e, t, n, i, r, s) {
3679
- const a = I("AIAvatar"), l = I("HumanAvatar"), p = I("ActionResult"), k = I("ArtifactRenderer"), w = I("Bubble"), T = I("AttachmentPreview"), B = I("Typing");
3680
- return c(), u("div", mr, [
3698
+ }, Rr = { class: "wm-list__avatarSlot" }, Nr = ["aria-label", "title"];
3699
+ function Pr(e, t, n, i, r, s) {
3700
+ const a = R("AIAvatar"), l = R("HumanAvatar"), p = R("ActionResult"), k = R("ArtifactRenderer"), b = R("Bubble"), T = R("AttachmentPreview"), E = R("Typing");
3701
+ return c(), u("div", fr, [
3681
3702
  o("div", {
3682
3703
  ref: "scrollEl",
3683
3704
  class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
3684
- onScrollPassive: t[0] || (t[0] = (...A) => s.onScroll && s.onScroll(...A))
3705
+ onScrollPassive: t[4] || (t[4] = (...A) => s.onScroll && s.onScroll(...A))
3685
3706
  }, [
3686
- n.loadingMore ? (c(), u("div", fr, [
3687
- t[2] || (t[2] = o("span", {
3707
+ n.loadingMore ? (c(), u("div", gr, [
3708
+ t[6] || (t[6] = o("span", {
3688
3709
  class: "wm-list__loadMore-spinner",
3689
3710
  "aria-hidden": "true"
3690
3711
  }, null, -1)),
3691
- o("span", gr, v(s.t("messageList.loadingHistory")), 1)
3692
- ])) : s.historyExhausted ? (c(), u("div", _r, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
3693
- n.dateLabel ? (c(), u("div", pr, [
3694
- t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1)),
3695
- o("span", vr, v(n.dateLabel), 1),
3696
- t[4] || (t[4] = o("div", { class: "wm-list__line" }, null, -1))
3697
- ])) : b("", !0),
3698
- (c(!0), u(E, null, P(s.groups, (A, H) => (c(), u(E, {
3712
+ o("span", _r, v(s.t("messageList.loadingHistory")), 1)
3713
+ ])) : s.historyExhausted ? (c(), u("div", pr, v(s.t("messageList.conversationStart")), 1)) : y("", !0),
3714
+ n.dateLabel ? (c(), u("div", vr, [
3715
+ t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
3716
+ o("span", yr, v(n.dateLabel), 1),
3717
+ t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
3718
+ ])) : y("", !0),
3719
+ (c(!0), u(B, null, D(s.groups, (A, H) => (c(), u(B, {
3699
3720
  key: A.key
3700
3721
  }, [
3701
- A.key === s.unreadGroupKey ? (c(), u("div", yr, [
3702
- t[5] || (t[5] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3703
- o("span", wr, v(s.t("messageList.unread")), 1),
3704
- t[6] || (t[6] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3705
- ])) : b("", !0),
3722
+ A.key === s.unreadGroupKey ? (c(), u("div", wr, [
3723
+ t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3724
+ o("span", br, v(s.t("messageList.unread")), 1),
3725
+ t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3726
+ ])) : y("", !0),
3706
3727
  A.role === "system" || A.items.length ? (c(), u("div", {
3707
3728
  key: 1,
3708
3729
  class: O(["wm-list__group", "wm-list__group--" + A.role])
3709
3730
  }, [
3710
- A.role === "system" ? (c(), u("div", br, [
3711
- t[7] || (t[7] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3712
- o("span", kr, v(A.systemLabel), 1),
3713
- t[8] || (t[8] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3714
- ])) : (c(), u(E, { key: 1 }, [
3715
- (c(!0), u(E, null, P(A.items, (M, F) => (c(), u("div", {
3716
- key: `${s.messageKey(M.message)}-${M.partKey}`,
3717
- "data-row-key": `${s.messageKey(M.message)}-${M.partKey}`,
3718
- class: O(["wm-list__row fade-up", [
3719
- "wm-list__row--" + A.role,
3720
- {
3721
- "is-pending": M.message._pending,
3722
- "is-failed": M.message._failed
3723
- }
3724
- ]]),
3725
- style: q(s.cornersStyle(A, F))
3731
+ A.role === "system" ? (c(), u("div", kr, [
3732
+ t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3733
+ o("span", Cr, v(A.systemLabel), 1),
3734
+ t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3735
+ ])) : (c(), u(B, { key: 1 }, [
3736
+ (c(!0), u(B, null, D(A.items, (S, P) => (c(), u(B, {
3737
+ key: `${s.messageKey(S.message)}-${S.partKey}`
3726
3738
  }, [
3727
- A.role !== "user" ? (c(), u("div", Ar, [
3728
- F === A.items.length - 1 ? (c(), u(E, { key: 0 }, [
3729
- A.role === "ai" ? (c(), U(a, {
3739
+ o("div", {
3740
+ "data-row-key": `${s.messageKey(S.message)}-${S.partKey}`,
3741
+ class: O(["wm-list__row fade-up", [
3742
+ "wm-list__row--" + A.role,
3743
+ {
3744
+ "is-pending": S.message._pending,
3745
+ "is-failed": S.message._failed
3746
+ }
3747
+ ]]),
3748
+ style: q(s.cornersStyle(A, P)),
3749
+ onPointerdown: (I) => s.onPressStart(`${s.messageKey(S.message)}-${S.partKey}`),
3750
+ onPointerup: t[0] || (t[0] = (I) => s.onPressEnd()),
3751
+ onPointercancel: t[1] || (t[1] = (I) => s.onPressEnd()),
3752
+ onPointerleave: t[2] || (t[2] = (I) => s.onPressEnd()),
3753
+ onContextmenu: t[3] || (t[3] = G(() => {
3754
+ }, ["prevent"]))
3755
+ }, [
3756
+ A.role !== "user" ? (c(), u("div", Sr, [
3757
+ P === A.items.length - 1 ? (c(), u(B, { key: 0 }, [
3758
+ A.role === "ai" ? (c(), F(a, {
3759
+ key: 0,
3760
+ size: 26,
3761
+ tail: !0,
3762
+ name: n.aiAgentName,
3763
+ "image-url": n.aiAgentAvatarUrl
3764
+ }, null, 8, ["name", "image-url"])) : (c(), F(l, {
3765
+ key: 1,
3766
+ name: A.agentName,
3767
+ "avatar-url": A.agentAvatarUrl,
3768
+ size: 26,
3769
+ tail: !0
3770
+ }, null, 8, ["name", "avatar-url"]))
3771
+ ], 64)) : y("", !0)
3772
+ ])) : y("", !0),
3773
+ S.renderAs === "action" ? (c(), F(p, {
3774
+ key: 1,
3775
+ state: S.message.payload.state,
3776
+ label: s.actionLabel(S.message),
3777
+ detail: s.actionDetail(S.message)
3778
+ }, null, 8, ["state", "label", "detail"])) : S.renderAs === "admin-pending" ? (c(), F(p, {
3779
+ key: 2,
3780
+ state: "awaiting",
3781
+ label: s.t("messageList.approvalRequestSent"),
3782
+ detail: S.message.text_md || ""
3783
+ }, null, 8, ["label", "detail"])) : S.renderAs === "artifact-of-action" ? (c(), F(k, {
3784
+ key: 3,
3785
+ artifact: s.actionArtifact(S.message)
3786
+ }, null, 8, ["artifact"])) : S.renderAs === "artifact" ? (c(), F(k, {
3787
+ key: 4,
3788
+ artifact: s.artifactOf(S.message)
3789
+ }, null, 8, ["artifact"])) : (c(), u("div", Mr, [
3790
+ S.message.text_md ? (c(), F(b, {
3730
3791
  key: 0,
3731
- size: 26,
3732
- tail: !0,
3733
- name: n.aiAgentName,
3734
- "image-url": n.aiAgentAvatarUrl
3735
- }, null, 8, ["name", "image-url"])) : (c(), U(l, {
3792
+ role: A.role,
3793
+ text: S.message.text_md
3794
+ }, null, 8, ["role", "text"])) : y("", !0),
3795
+ s.attachmentsOf(S.message).length ? (c(), u("div", {
3736
3796
  key: 1,
3737
- name: A.agentName,
3738
- "avatar-url": A.agentAvatarUrl,
3739
- size: 26,
3740
- tail: !0
3741
- }, null, 8, ["name", "avatar-url"]))
3742
- ], 64)) : b("", !0)
3743
- ])) : b("", !0),
3744
- M.renderAs === "action" ? (c(), U(p, {
3745
- key: 1,
3746
- state: M.message.payload.state,
3747
- label: s.actionLabel(M.message),
3748
- detail: s.actionDetail(M.message)
3749
- }, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), U(p, {
3750
- key: 2,
3751
- state: "awaiting",
3752
- label: s.t("messageList.approvalRequestSent"),
3753
- detail: M.message.text_md || ""
3754
- }, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), U(k, {
3755
- key: 3,
3756
- artifact: s.actionArtifact(M.message)
3757
- }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), U(k, {
3758
- key: 4,
3759
- artifact: s.artifactOf(M.message)
3760
- }, null, 8, ["artifact"])) : (c(), u("div", Sr, [
3761
- M.message.text_md ? (c(), U(w, {
3762
- key: 0,
3763
- role: A.role,
3764
- text: M.message.text_md
3765
- }, null, 8, ["role", "text"])) : b("", !0),
3766
- s.attachmentsOf(M.message).length ? (c(), u("div", {
3767
- key: 1,
3768
- class: O(["wm-list__atts", {
3769
- "wm-list__atts--align-end": A.role === "user"
3770
- }])
3771
- }, [
3772
- (c(!0), u(E, null, P(s.attachmentsOf(
3773
- M.message
3774
- ), (N, D) => (c(), U(T, {
3775
- key: `${s.messageKey(M.message)}-att-${D}`,
3776
- attachment: N
3777
- }, null, 8, ["attachment"]))), 128))
3778
- ], 2)) : b("", !0)
3779
- ]))
3780
- ], 14, Cr))), 128)),
3797
+ class: O(["wm-list__atts", {
3798
+ "wm-list__atts--align-end": A.role === "user"
3799
+ }])
3800
+ }, [
3801
+ (c(!0), u(B, null, D(s.attachmentsOf(
3802
+ S.message
3803
+ ), (I, U) => (c(), F(T, {
3804
+ key: `${s.messageKey(S.message)}-att-${U}`,
3805
+ attachment: I
3806
+ }, null, 8, ["attachment"]))), 128))
3807
+ ], 2)) : y("", !0)
3808
+ ]))
3809
+ ], 46, Ar),
3810
+ P < A.items.length - 1 && r.pressedItemKey === `${s.messageKey(S.message)}-${S.partKey}` && (A.role !== "user" || s.timeOf(S.message)) ? (c(), u("div", {
3811
+ key: 0,
3812
+ class: O(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
3813
+ }, [
3814
+ A.role !== "user" ? (c(), u("span", Tr, v(s.roleLabel(A)), 1)) : y("", !0),
3815
+ A.role !== "user" && s.timeOf(S.message) ? (c(), u("span", xr, "•")) : y("", !0),
3816
+ s.timeOf(S.message) ? (c(), u("span", Or, v(s.timeOf(S.message)), 1)) : y("", !0)
3817
+ ], 2)) : y("", !0)
3818
+ ], 64))), 128)),
3781
3819
  (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
3782
3820
  key: 0,
3783
3821
  class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
3784
3822
  }, [
3785
- A.role !== "user" ? (c(), u("span", Mr, v(s.roleLabel(A)), 1)) : b("", !0),
3786
- A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Tr, "•")) : b("", !0),
3787
- s.lastTimeOf(A) ? (c(), u("span", xr, v(s.lastTimeOf(A)), 1)) : b("", !0)
3788
- ], 2)) : b("", !0)
3823
+ A.role !== "user" ? (c(), u("span", Lr, v(s.roleLabel(A)), 1)) : y("", !0),
3824
+ A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Ir, "•")) : y("", !0),
3825
+ s.lastTimeOf(A) ? (c(), u("span", Er, v(s.lastTimeOf(A)), 1)) : y("", !0)
3826
+ ], 2)) : y("", !0)
3789
3827
  ], 64))
3790
- ], 2)) : b("", !0)
3828
+ ], 2)) : y("", !0)
3791
3829
  ], 64))), 128)),
3792
- n.streamingActive ? (c(), u("div", Or, [
3793
- o("div", Lr, [
3830
+ n.streamingActive ? (c(), u("div", Br, [
3831
+ o("div", Rr, [
3794
3832
  $(a, {
3795
3833
  size: 26,
3796
3834
  tail: !0,
@@ -3798,19 +3836,19 @@ function Er(e, t, n, i, r, s) {
3798
3836
  "image-url": n.aiAgentAvatarUrl
3799
3837
  }, null, 8, ["name", "image-url"])
3800
3838
  ]),
3801
- $(B)
3802
- ])) : b("", !0)
3839
+ $(E)
3840
+ ])) : y("", !0)
3803
3841
  ], 34),
3804
- $(Le, { name: "wm-scrollDown" }, {
3805
- default: Be(() => [
3842
+ $(Ie, { name: "wm-scrollDown" }, {
3843
+ default: Ee(() => [
3806
3844
  r.showScrollDown ? (c(), u("button", {
3807
3845
  key: 0,
3808
3846
  type: "button",
3809
3847
  class: "wm-list__scrollDown",
3810
3848
  "aria-label": s.t("messageList.scrollToBottom"),
3811
3849
  title: s.t("messageList.scrollToBottom"),
3812
- onClick: t[1] || (t[1] = (...A) => s.scrollToBottomSmooth && s.scrollToBottomSmooth(...A))
3813
- }, [...t[9] || (t[9] = [
3850
+ onClick: t[5] || (t[5] = (...A) => s.scrollToBottomSmooth && s.scrollToBottomSmooth(...A))
3851
+ }, [...t[13] || (t[13] = [
3814
3852
  o("svg", {
3815
3853
  width: "14",
3816
3854
  height: "14",
@@ -3824,15 +3862,15 @@ function Er(e, t, n, i, r, s) {
3824
3862
  }, [
3825
3863
  o("path", { d: "M6 9l6 6 6-6" })
3826
3864
  ], -1)
3827
- ])], 8, Br)) : b("", !0)
3865
+ ])], 8, Nr)) : y("", !0)
3828
3866
  ]),
3829
3867
  _: 1
3830
3868
  })
3831
3869
  ]);
3832
3870
  }
3833
- const Ir = /* @__PURE__ */ R(hr, [["render", Er], ["__scopeId", "data-v-9590b3b2"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", be = typeof window < "u" && typeof window.MediaRecorder < "u";
3834
- function Rr() {
3835
- return be && [
3871
+ const Fr = /* @__PURE__ */ N(mr, [["render", Pr], ["__scopeId", "data-v-cf20685c"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", ke = typeof window < "u" && typeof window.MediaRecorder < "u";
3872
+ function Ur() {
3873
+ return ke && [
3836
3874
  "video/webm;codecs=vp9,opus",
3837
3875
  "video/webm;codecs=vp8,opus",
3838
3876
  "video/webm",
@@ -3842,7 +3880,7 @@ function Rr() {
3842
3880
  return (i = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : i.call(n, t);
3843
3881
  }) || "";
3844
3882
  }
3845
- function Fe({ audio: e }) {
3883
+ function Pe({ audio: e }) {
3846
3884
  return {
3847
3885
  video: !0,
3848
3886
  audio: !!e,
@@ -3851,21 +3889,21 @@ function Fe({ audio: e }) {
3851
3889
  systemAudio: e ? "include" : "exclude"
3852
3890
  };
3853
3891
  }
3854
- function za(e) {
3892
+ function Va(e) {
3855
3893
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
3856
3894
  }
3857
- async function Nr() {
3895
+ async function Dr() {
3858
3896
  if (!he) return null;
3859
3897
  let e;
3860
3898
  try {
3861
3899
  e = await navigator.mediaDevices.getDisplayMedia(
3862
- Fe({ audio: !1 })
3900
+ Pe({ audio: !1 })
3863
3901
  );
3864
3902
  } catch (t) {
3865
3903
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
3866
3904
  }
3867
3905
  try {
3868
- return await Fr(e);
3906
+ return await jr(e);
3869
3907
  } catch (t) {
3870
3908
  return console.error("[media] screenshot capture", t), null;
3871
3909
  } finally {
@@ -3874,7 +3912,7 @@ async function Nr() {
3874
3912
  });
3875
3913
  }
3876
3914
  }
3877
- async function Fr(e) {
3915
+ async function jr(e) {
3878
3916
  const t = document.createElement("video");
3879
3917
  t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
3880
3918
  const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
@@ -3887,64 +3925,64 @@ async function Fr(e) {
3887
3925
  }), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
3888
3926
  return new File([s], `capture-${a}.png`, { type: "image/png" });
3889
3927
  }
3890
- async function Ur(e = {}) {
3928
+ async function Hr(e = {}) {
3891
3929
  var k;
3892
- if (!he || !be) return null;
3930
+ if (!he || !ke) return null;
3893
3931
  let t;
3894
3932
  try {
3895
3933
  t = await navigator.mediaDevices.getDisplayMedia(
3896
- Fe({ audio: !0 })
3934
+ Pe({ audio: !0 })
3897
3935
  );
3898
- } catch (w) {
3899
- return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
3936
+ } catch (b) {
3937
+ return (b == null ? void 0 : b.name) !== "NotAllowedError" && console.error("[media] record picker", b), null;
3900
3938
  }
3901
- const n = Rr();
3939
+ const n = Ur();
3902
3940
  let i;
3903
3941
  try {
3904
3942
  i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
3905
- } catch (w) {
3906
- return console.error("[media] recorder init", w), t.getTracks().forEach((T) => {
3943
+ } catch (b) {
3944
+ return console.error("[media] recorder init", b), t.getTracks().forEach((T) => {
3907
3945
  T.stop();
3908
3946
  }), null;
3909
3947
  }
3910
3948
  const r = [];
3911
3949
  let s = null, a = !1;
3912
- i.addEventListener("dataavailable", (w) => {
3913
- w.data && w.data.size > 0 && r.push(w.data);
3950
+ i.addEventListener("dataavailable", (b) => {
3951
+ b.data && b.data.size > 0 && r.push(b.data);
3914
3952
  }), i.addEventListener("stop", () => {
3915
- var w, T;
3916
- if (s && clearInterval(s), t.getTracks().forEach((B) => {
3917
- B.stop();
3953
+ var b, T;
3954
+ if (s && clearInterval(s), t.getTracks().forEach((E) => {
3955
+ E.stop();
3918
3956
  }), r.length) {
3919
- const B = i.mimeType || n || "video/webm", A = new Blob(r, { type: B }), H = /mp4/.test(B) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), F = new File([A], `ecran-${M}.${H}`, {
3920
- type: B
3957
+ const E = i.mimeType || n || "video/webm", A = new Blob(r, { type: E }), H = /mp4/.test(E) ? "mp4" : "webm", S = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), P = new File([A], `ecran-${S}.${H}`, {
3958
+ type: E
3921
3959
  });
3922
- (w = e.onfinalize) == null || w.call(e, F);
3960
+ (b = e.onfinalize) == null || b.call(e, P);
3923
3961
  } else
3924
3962
  (T = e.oncancel) == null || T.call(e);
3925
- }), t.getVideoTracks().forEach((w) => {
3926
- w.addEventListener("ended", () => l(), { once: !0 });
3963
+ }), t.getVideoTracks().forEach((b) => {
3964
+ b.addEventListener("ended", () => l(), { once: !0 });
3927
3965
  });
3928
3966
  function l() {
3929
3967
  if (!a && (a = !0, i.state !== "inactive"))
3930
3968
  try {
3931
3969
  i.stop();
3932
- } catch (w) {
3933
- console.error("[media] recorder stop", w);
3970
+ } catch (b) {
3971
+ console.error("[media] recorder stop", b);
3934
3972
  }
3935
3973
  }
3936
3974
  try {
3937
3975
  i.start(1e3);
3938
- } catch (w) {
3939
- return console.error("[media] recorder start", w), t.getTracks().forEach((T) => {
3976
+ } catch (b) {
3977
+ return console.error("[media] recorder start", b), t.getTracks().forEach((T) => {
3940
3978
  T.stop();
3941
3979
  }), null;
3942
3980
  }
3943
3981
  (k = e.onstart) == null || k.call(e);
3944
3982
  const p = Date.now();
3945
3983
  return s = setInterval(() => {
3946
- var w;
3947
- (w = e.ontick) == null || w.call(e, Date.now() - p);
3984
+ var b;
3985
+ (b = e.ontick) == null || b.call(e, Date.now() - p);
3948
3986
  }, 500), {
3949
3987
  stop: l,
3950
3988
  get state() {
@@ -3952,7 +3990,7 @@ async function Ur(e = {}) {
3952
3990
  }
3953
3991
  };
3954
3992
  }
3955
- const Dr = [
3993
+ const zr = [
3956
3994
  {
3957
3995
  action: "file",
3958
3996
  labelKey: "composer.attachFile",
@@ -3968,7 +4006,7 @@ const Dr = [
3968
4006
  labelKey: "composer.recordScreen",
3969
4007
  path: "M23 7l-7 5 7 5V7z M1 5a2 2 0 012-2h12a2 2 0 012 2v14a2 2 0 01-2 2H3a2 2 0 01-2-2V5z"
3970
4008
  }
3971
- ], Pr = {
4009
+ ], qr = {
3972
4010
  name: "WmComposer",
3973
4011
  inject: {
3974
4012
  // Translator shared by the Messenger shell; French fallback when
@@ -4002,10 +4040,10 @@ const Dr = [
4002
4040
  return !this.disabled && !!this.local.trim();
4003
4041
  },
4004
4042
  attachItems() {
4005
- return Dr.map((e) => ({
4043
+ return zr.map((e) => ({
4006
4044
  ...e,
4007
4045
  label: this.t(e.labelKey),
4008
- disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !be)
4046
+ disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !ke)
4009
4047
  }));
4010
4048
  },
4011
4049
  recordingElapsedLabel() {
@@ -4076,13 +4114,13 @@ const Dr = [
4076
4114
  },
4077
4115
  async captureScreenshot() {
4078
4116
  if (this.disabled) return;
4079
- const e = await Nr();
4117
+ const e = await Dr();
4080
4118
  e && this.$emit("attach", e);
4081
4119
  },
4082
4120
  async startRecording() {
4083
4121
  if (this.recording || this.disabled) return;
4084
4122
  this.recordingElapsed = 0;
4085
- const e = await Ur({
4123
+ const e = await Hr({
4086
4124
  onstart: () => {
4087
4125
  this.recording = !0;
4088
4126
  },
@@ -4124,39 +4162,39 @@ const Dr = [
4124
4162
  !e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
4125
4163
  }
4126
4164
  }
4127
- }, jr = {
4165
+ }, $r = {
4128
4166
  key: 0,
4129
4167
  class: "wm-rec"
4130
- }, Hr = { class: "wm-rec__lbl" }, zr = {
4168
+ }, Kr = { class: "wm-rec__lbl" }, Vr = {
4131
4169
  key: 1,
4132
4170
  class: "wm-compose__menu",
4133
4171
  role: "menu"
4134
- }, qr = ["disabled", "onClick"], $r = { class: "wm-compose__menuIcon" }, Vr = {
4172
+ }, Wr = ["disabled", "onClick"], Gr = { class: "wm-compose__menuIcon" }, Yr = {
4135
4173
  viewBox: "0 0 24 24",
4136
4174
  width: "14",
4137
4175
  height: "14",
4138
4176
  "aria-hidden": "true"
4139
- }, Kr = ["d"], Wr = ["placeholder", "disabled"], Gr = { class: "wm-compose__actions" }, Yr = ["title", "aria-label", "disabled"], Jr = ["disabled", "aria-label"];
4140
- function Qr(e, t, n, i, r, s) {
4177
+ }, Jr = ["d"], Qr = ["placeholder", "disabled"], Xr = { class: "wm-compose__actions" }, Zr = ["title", "aria-label", "disabled"], ei = ["disabled", "aria-label"];
4178
+ function ti(e, t, n, i, r, s) {
4141
4179
  return c(), u("div", {
4142
4180
  class: O(["wm-compose-wrap", { "wm-compose-wrap--sheet": n.displayMode === "sheet" }]),
4143
4181
  style: q(r.kbOffset ? { transform: `translateY(-${r.kbOffset}px)` } : null)
4144
4182
  }, [
4145
- r.recording ? (c(), u("div", jr, [
4183
+ r.recording ? (c(), u("div", $r, [
4146
4184
  t[8] || (t[8] = o("span", {
4147
4185
  class: "wm-rec__dot",
4148
4186
  "aria-hidden": "true"
4149
4187
  }, null, -1)),
4150
- o("span", Hr, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4188
+ o("span", Kr, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4151
4189
  o("button", {
4152
4190
  type: "button",
4153
4191
  class: "wm-rec__stop",
4154
4192
  onClick: t[0] || (t[0] = (...a) => s.stopRecording && s.stopRecording(...a))
4155
4193
  }, v(s.t("composer.stop")), 1)
4156
- ])) : b("", !0),
4194
+ ])) : y("", !0),
4157
4195
  o("form", {
4158
4196
  class: O(["wm-compose", { "has-attach": r.attachOpen }]),
4159
- onSubmit: t[7] || (t[7] = J((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
4197
+ onSubmit: t[7] || (t[7] = G((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
4160
4198
  }, [
4161
4199
  o("input", {
4162
4200
  ref: "fileEl",
@@ -4169,17 +4207,17 @@ function Qr(e, t, n, i, r, s) {
4169
4207
  key: 0,
4170
4208
  class: "wm-compose__overlay",
4171
4209
  onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
4172
- })) : b("", !0),
4173
- r.attachOpen ? (c(), u("div", zr, [
4174
- (c(!0), u(E, null, P(s.attachItems, (a) => (c(), u("button", {
4210
+ })) : y("", !0),
4211
+ r.attachOpen ? (c(), u("div", Vr, [
4212
+ (c(!0), u(B, null, D(s.attachItems, (a) => (c(), u("button", {
4175
4213
  key: a.action,
4176
4214
  type: "button",
4177
4215
  class: "wm-compose__menuItem",
4178
4216
  disabled: a.disabled,
4179
4217
  onClick: (l) => s.onAttachAction(a.action)
4180
4218
  }, [
4181
- o("span", $r, [
4182
- (c(), u("svg", Vr, [
4219
+ o("span", Gr, [
4220
+ (c(), u("svg", Yr, [
4183
4221
  o("path", {
4184
4222
  d: a.path,
4185
4223
  stroke: "currentColor",
@@ -4187,13 +4225,13 @@ function Qr(e, t, n, i, r, s) {
4187
4225
  "stroke-linecap": "round",
4188
4226
  "stroke-linejoin": "round",
4189
4227
  fill: "none"
4190
- }, null, 8, Kr)
4228
+ }, null, 8, Jr)
4191
4229
  ]))
4192
4230
  ]),
4193
4231
  o("span", null, v(a.label), 1)
4194
- ], 8, qr))), 128))
4195
- ])) : b("", !0),
4196
- K(o("textarea", {
4232
+ ], 8, Wr))), 128))
4233
+ ])) : y("", !0),
4234
+ V(o("textarea", {
4197
4235
  ref: "inputEl",
4198
4236
  "onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
4199
4237
  class: "wm-compose__input",
@@ -4202,10 +4240,10 @@ function Qr(e, t, n, i, r, s) {
4202
4240
  disabled: n.disabled,
4203
4241
  onKeydown: t[4] || (t[4] = (...a) => s.onKeydown && s.onKeydown(...a)),
4204
4242
  onInput: t[5] || (t[5] = (...a) => s.autosize && s.autosize(...a))
4205
- }, null, 40, Wr), [
4243
+ }, null, 40, Qr), [
4206
4244
  [X, r.local]
4207
4245
  ]),
4208
- o("div", Gr, [
4246
+ o("div", Xr, [
4209
4247
  o("button", {
4210
4248
  type: "button",
4211
4249
  class: O(["wm-compose__icon", { "is-open": r.attachOpen }]),
@@ -4227,7 +4265,7 @@ function Qr(e, t, n, i, r, s) {
4227
4265
  }, [
4228
4266
  o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
4229
4267
  ], -1)
4230
- ])], 10, Yr),
4268
+ ])], 10, Zr),
4231
4269
  o("button", {
4232
4270
  type: "submit",
4233
4271
  class: O(["wm-compose__send", { "is-empty": !s.canSend }]),
@@ -4247,12 +4285,12 @@ function Qr(e, t, n, i, r, s) {
4247
4285
  }, [
4248
4286
  o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4249
4287
  ], -1)
4250
- ])], 10, Jr)
4288
+ ])], 10, ei)
4251
4289
  ])
4252
4290
  ], 34)
4253
4291
  ], 6);
4254
4292
  }
4255
- const Xr = /* @__PURE__ */ R(Pr, [["render", Qr], ["__scopeId", "data-v-01e81a27"]]), Zr = {
4293
+ const ni = /* @__PURE__ */ N(qr, [["render", ti], ["__scopeId", "data-v-01e81a27"]]), si = {
4256
4294
  name: "WmSuggestionChips",
4257
4295
  props: {
4258
4296
  items: { type: Array, default: () => [] },
@@ -4269,22 +4307,22 @@ const Xr = /* @__PURE__ */ R(Pr, [["render", Qr], ["__scopeId", "data-v-01e81a27
4269
4307
  return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
4270
4308
  }
4271
4309
  }
4272
- }, ei = ["onClick"];
4273
- function ti(e, t, n, i, r, s) {
4310
+ }, ri = ["onClick"];
4311
+ function ii(e, t, n, i, r, s) {
4274
4312
  return n.items.length ? (c(), u("div", {
4275
4313
  key: s.batchKey,
4276
4314
  class: "wm-chips"
4277
4315
  }, [
4278
- (c(!0), u(E, null, P(n.items, (a, l) => (c(), u("button", {
4316
+ (c(!0), u(B, null, D(n.items, (a, l) => (c(), u("button", {
4279
4317
  key: l,
4280
4318
  type: "button",
4281
4319
  class: "wm-chip",
4282
4320
  style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4283
4321
  onClick: (p) => e.$emit("select", a)
4284
- }, v(a.label), 13, ei))), 128))
4285
- ])) : b("", !0);
4322
+ }, v(a.label), 13, ri))), 128))
4323
+ ])) : y("", !0);
4286
4324
  }
4287
- const ni = /* @__PURE__ */ R(Zr, [["render", ti], ["__scopeId", "data-v-47ad8085"]]), si = {
4325
+ const ai = /* @__PURE__ */ N(si, [["render", ii], ["__scopeId", "data-v-47ad8085"]]), oi = {
4288
4326
  name: "WmApprovalCard",
4289
4327
  components: { AIAvatar: le },
4290
4328
  inject: {
@@ -4328,45 +4366,45 @@ const ni = /* @__PURE__ */ R(Zr, [["render", ti], ["__scopeId", "data-v-47ad8085
4328
4366
  return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
4329
4367
  }
4330
4368
  }
4331
- }, ri = { class: "wm-approval" }, ii = { class: "wm-approval__head" }, ai = { class: "wm-approval__icon" }, oi = { class: "wm-approval__main" }, li = { class: "wm-approval__title" }, ci = {
4369
+ }, li = { class: "wm-approval" }, ci = { class: "wm-approval__head" }, di = { class: "wm-approval__icon" }, ui = { class: "wm-approval__main" }, hi = { class: "wm-approval__title" }, mi = {
4332
4370
  key: 0,
4333
4371
  class: "wm-approval__detail"
4334
- }, di = { class: "wm-approval__actions" };
4335
- function ui(e, t, n, i, r, s) {
4336
- const a = I("AIAvatar");
4337
- return c(), u("div", ri, [
4338
- o("div", ii, [
4339
- o("div", ai, [
4372
+ }, fi = { class: "wm-approval__actions" };
4373
+ function gi(e, t, n, i, r, s) {
4374
+ const a = R("AIAvatar");
4375
+ return c(), u("div", li, [
4376
+ o("div", ci, [
4377
+ o("div", di, [
4340
4378
  $(a, {
4341
4379
  size: 24,
4342
4380
  name: n.agentName,
4343
4381
  "image-url": n.agentAvatarUrl
4344
4382
  }, null, 8, ["name", "image-url"])
4345
4383
  ]),
4346
- o("div", oi, [
4347
- o("div", li, v(n.action), 1),
4348
- n.detail ? (c(), u("div", ci, v(n.detail), 1)) : b("", !0)
4384
+ o("div", ui, [
4385
+ o("div", hi, v(n.action), 1),
4386
+ n.detail ? (c(), u("div", mi, v(n.detail), 1)) : y("", !0)
4349
4387
  ])
4350
4388
  ]),
4351
- o("div", di, [
4389
+ o("div", fi, [
4352
4390
  s.rejectId ? (c(), u("button", {
4353
4391
  key: 0,
4354
4392
  type: "button",
4355
4393
  class: "wm-approval__btn wm-approval__btn--neutral",
4356
4394
  onClick: t[0] || (t[0] = (l) => e.$emit("callback", s.rejectId))
4357
- }, v(s.rejectLabel), 1)) : b("", !0),
4395
+ }, v(s.rejectLabel), 1)) : y("", !0),
4358
4396
  s.approveId ? (c(), u("button", {
4359
4397
  key: 1,
4360
4398
  type: "button",
4361
4399
  class: "wm-approval__btn wm-approval__btn--primary",
4362
4400
  onClick: t[1] || (t[1] = (l) => e.$emit("callback", s.approveId))
4363
- }, v(s.approveLabel), 1)) : b("", !0)
4401
+ }, v(s.approveLabel), 1)) : y("", !0)
4364
4402
  ])
4365
4403
  ]);
4366
4404
  }
4367
- const hi = /* @__PURE__ */ R(si, [["render", ui], ["__scopeId", "data-v-a2bed37e"]]);
4368
- let xe = 0;
4369
- const mi = /* @__PURE__ */ new Set([
4405
+ const _i = /* @__PURE__ */ N(oi, [["render", gi], ["__scopeId", "data-v-a2bed37e"]]);
4406
+ let Oe = 0;
4407
+ const pi = /* @__PURE__ */ new Set([
4370
4408
  "text",
4371
4409
  "textarea",
4372
4410
  "number",
@@ -4374,7 +4412,7 @@ const mi = /* @__PURE__ */ new Set([
4374
4412
  "select",
4375
4413
  "multiselect",
4376
4414
  "date"
4377
- ]), fi = {
4415
+ ]), vi = {
4378
4416
  name: "WmFormCard",
4379
4417
  components: { AIAvatar: le },
4380
4418
  inject: {
@@ -4391,8 +4429,8 @@ const mi = /* @__PURE__ */ new Set([
4391
4429
  },
4392
4430
  emits: ["submit"],
4393
4431
  data() {
4394
- return xe += 1, {
4395
- _uid: xe,
4432
+ return Oe += 1, {
4433
+ _uid: Oe,
4396
4434
  values: {},
4397
4435
  busy: !1,
4398
4436
  error: ""
@@ -4404,7 +4442,7 @@ const mi = /* @__PURE__ */ new Set([
4404
4442
  // douteux.
4405
4443
  normalizedFields() {
4406
4444
  var t;
4407
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !mi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4445
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !pi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4408
4446
  }
4409
4447
  },
4410
4448
  created() {
@@ -4457,54 +4495,54 @@ const mi = /* @__PURE__ */ new Set([
4457
4495
  }
4458
4496
  }
4459
4497
  }
4460
- }, gi = { class: "wm-form" }, _i = { class: "wm-form__head" }, pi = { class: "wm-form__icon" }, vi = { class: "wm-form__main" }, yi = { class: "wm-form__title" }, wi = {
4498
+ }, yi = { class: "wm-form" }, wi = { class: "wm-form__head" }, bi = { class: "wm-form__icon" }, ki = { class: "wm-form__main" }, Ci = { class: "wm-form__title" }, Ai = {
4461
4499
  key: 0,
4462
4500
  class: "wm-form__detail"
4463
- }, bi = ["for"], ki = {
4501
+ }, Si = ["for"], Mi = {
4464
4502
  key: 0,
4465
4503
  class: "wm-form__req",
4466
4504
  "aria-hidden": "true"
4467
- }, Ci = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ai = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Si = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Mi = ["id", "onUpdate:modelValue", "required", "disabled"], Ti = {
4505
+ }, Ti = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], xi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Oi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Li = ["id", "onUpdate:modelValue", "required", "disabled"], Ii = {
4468
4506
  key: 4,
4469
4507
  class: "wm-form__bool"
4470
- }, xi = ["id", "onUpdate:modelValue", "disabled"], Oi = ["id", "onUpdate:modelValue", "required", "disabled"], Li = {
4508
+ }, Ei = ["id", "onUpdate:modelValue", "disabled"], Bi = ["id", "onUpdate:modelValue", "required", "disabled"], Ri = {
4471
4509
  value: "",
4472
4510
  disabled: ""
4473
- }, Bi = ["value"], Ei = {
4511
+ }, Ni = ["value"], Pi = {
4474
4512
  key: 6,
4475
4513
  class: "wm-form__multi"
4476
- }, Ii = ["value", "checked", "disabled", "onChange"], Ri = {
4514
+ }, Fi = ["value", "checked", "disabled", "onChange"], Ui = {
4477
4515
  key: 0,
4478
4516
  class: "wm-form__err"
4479
- }, Ni = ["disabled"], Fi = {
4517
+ }, Di = ["disabled"], ji = {
4480
4518
  key: 0,
4481
4519
  class: "wm-form__spinner",
4482
4520
  "aria-hidden": "true"
4483
- }, Ui = {
4521
+ }, Hi = {
4484
4522
  key: 2,
4485
4523
  class: "wm-form__doneLbl"
4486
4524
  };
4487
- function Di(e, t, n, i, r, s) {
4488
- const a = I("AIAvatar");
4489
- return c(), u("div", gi, [
4490
- o("div", _i, [
4491
- o("div", pi, [
4525
+ function zi(e, t, n, i, r, s) {
4526
+ const a = R("AIAvatar");
4527
+ return c(), u("div", yi, [
4528
+ o("div", wi, [
4529
+ o("div", bi, [
4492
4530
  $(a, {
4493
4531
  size: 24,
4494
4532
  name: n.agentName,
4495
4533
  "image-url": n.agentAvatarUrl
4496
4534
  }, null, 8, ["name", "image-url"])
4497
4535
  ]),
4498
- o("div", vi, [
4499
- o("div", yi, v(n.form.title || s.t("form.title")), 1),
4500
- n.form.description ? (c(), u("div", wi, v(n.form.description), 1)) : b("", !0)
4536
+ o("div", ki, [
4537
+ o("div", Ci, v(n.form.title || s.t("form.title")), 1),
4538
+ n.form.description ? (c(), u("div", Ai, v(n.form.description), 1)) : y("", !0)
4501
4539
  ])
4502
4540
  ]),
4503
4541
  o("form", {
4504
4542
  class: "wm-form__body",
4505
- onSubmit: t[0] || (t[0] = J((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4543
+ onSubmit: t[0] || (t[0] = G((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4506
4544
  }, [
4507
- (c(!0), u(E, null, P(s.normalizedFields, (l) => (c(), u("div", {
4545
+ (c(!0), u(B, null, D(s.normalizedFields, (l) => (c(), u("div", {
4508
4546
  key: l.key,
4509
4547
  class: "wm-form__field"
4510
4548
  }, [
@@ -4512,10 +4550,10 @@ function Di(e, t, n, i, r, s) {
4512
4550
  for: `wm-f-${r._uid}-${l.key}`,
4513
4551
  class: "wm-form__label"
4514
4552
  }, [
4515
- pe(v(l.label), 1),
4516
- l.required ? (c(), u("span", ki, "*")) : b("", !0)
4517
- ], 8, bi),
4518
- l.type === "text" ? K((c(), u("input", {
4553
+ ve(v(l.label), 1),
4554
+ l.required ? (c(), u("span", Mi, "*")) : y("", !0)
4555
+ ], 8, Si),
4556
+ l.type === "text" ? V((c(), u("input", {
4519
4557
  key: 0,
4520
4558
  id: `wm-f-${r._uid}-${l.key}`,
4521
4559
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4524,9 +4562,9 @@ function Di(e, t, n, i, r, s) {
4524
4562
  placeholder: l.placeholder || "",
4525
4563
  required: l.required,
4526
4564
  disabled: n.readOnly || r.busy
4527
- }, null, 8, Ci)), [
4565
+ }, null, 8, Ti)), [
4528
4566
  [X, r.values[l.key]]
4529
- ]) : l.type === "textarea" ? K((c(), u("textarea", {
4567
+ ]) : l.type === "textarea" ? V((c(), u("textarea", {
4530
4568
  key: 1,
4531
4569
  id: `wm-f-${r._uid}-${l.key}`,
4532
4570
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4535,9 +4573,9 @@ function Di(e, t, n, i, r, s) {
4535
4573
  placeholder: l.placeholder || "",
4536
4574
  required: l.required,
4537
4575
  disabled: n.readOnly || r.busy
4538
- }, null, 8, Ai)), [
4576
+ }, null, 8, xi)), [
4539
4577
  [X, r.values[l.key]]
4540
- ]) : l.type === "number" ? K((c(), u("input", {
4578
+ ]) : l.type === "number" ? V((c(), u("input", {
4541
4579
  key: 2,
4542
4580
  id: `wm-f-${r._uid}-${l.key}`,
4543
4581
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4546,14 +4584,14 @@ function Di(e, t, n, i, r, s) {
4546
4584
  placeholder: l.placeholder || "",
4547
4585
  required: l.required,
4548
4586
  disabled: n.readOnly || r.busy
4549
- }, null, 8, Si)), [
4587
+ }, null, 8, Oi)), [
4550
4588
  [
4551
4589
  X,
4552
4590
  r.values[l.key],
4553
4591
  void 0,
4554
4592
  { number: !0 }
4555
4593
  ]
4556
- ]) : l.type === "date" ? K((c(), u("input", {
4594
+ ]) : l.type === "date" ? V((c(), u("input", {
4557
4595
  key: 3,
4558
4596
  id: `wm-f-${r._uid}-${l.key}`,
4559
4597
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4561,19 +4599,19 @@ function Di(e, t, n, i, r, s) {
4561
4599
  class: "wm-form__input",
4562
4600
  required: l.required,
4563
4601
  disabled: n.readOnly || r.busy
4564
- }, null, 8, Mi)), [
4602
+ }, null, 8, Li)), [
4565
4603
  [X, r.values[l.key]]
4566
- ]) : l.type === "boolean" ? (c(), u("label", Ti, [
4567
- K(o("input", {
4604
+ ]) : l.type === "boolean" ? (c(), u("label", Ii, [
4605
+ V(o("input", {
4568
4606
  id: `wm-f-${r._uid}-${l.key}`,
4569
4607
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
4570
4608
  type: "checkbox",
4571
4609
  disabled: n.readOnly || r.busy
4572
- }, null, 8, xi), [
4610
+ }, null, 8, Ei), [
4573
4611
  [He, r.values[l.key]]
4574
4612
  ]),
4575
4613
  o("span", null, v(l.placeholder || s.t("common.yes")), 1)
4576
- ])) : l.type === "select" ? K((c(), u("select", {
4614
+ ])) : l.type === "select" ? V((c(), u("select", {
4577
4615
  key: 5,
4578
4616
  id: `wm-f-${r._uid}-${l.key}`,
4579
4617
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4581,15 +4619,15 @@ function Di(e, t, n, i, r, s) {
4581
4619
  required: l.required,
4582
4620
  disabled: n.readOnly || r.busy
4583
4621
  }, [
4584
- o("option", Li, v(l.placeholder || s.t("form.choose")), 1),
4585
- (c(!0), u(E, null, P(l.options, (p) => (c(), u("option", {
4622
+ o("option", Ri, v(l.placeholder || s.t("form.choose")), 1),
4623
+ (c(!0), u(B, null, D(l.options, (p) => (c(), u("option", {
4586
4624
  key: p.value,
4587
4625
  value: p.value
4588
- }, v(p.label), 9, Bi))), 128))
4589
- ], 8, Oi)), [
4626
+ }, v(p.label), 9, Ni))), 128))
4627
+ ], 8, Bi)), [
4590
4628
  [ze, r.values[l.key]]
4591
- ]) : l.type === "multiselect" ? (c(), u("div", Ei, [
4592
- (c(!0), u(E, null, P(l.options, (p) => (c(), u("label", {
4629
+ ]) : l.type === "multiselect" ? (c(), u("div", Pi, [
4630
+ (c(!0), u(B, null, D(l.options, (p) => (c(), u("label", {
4593
4631
  key: p.value,
4594
4632
  class: "wm-form__multiItem"
4595
4633
  }, [
@@ -4603,25 +4641,25 @@ function Di(e, t, n, i, r, s) {
4603
4641
  p.value,
4604
4642
  k.target.checked
4605
4643
  )
4606
- }, null, 40, Ii),
4644
+ }, null, 40, Fi),
4607
4645
  o("span", null, v(p.label), 1)
4608
4646
  ]))), 128))
4609
- ])) : b("", !0)
4647
+ ])) : y("", !0)
4610
4648
  ]))), 128)),
4611
- r.error ? (c(), u("div", Ri, v(r.error), 1)) : b("", !0),
4612
- n.readOnly ? (c(), u("div", Ui, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4649
+ r.error ? (c(), u("div", Ui, v(r.error), 1)) : y("", !0),
4650
+ n.readOnly ? (c(), u("div", Hi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4613
4651
  key: 1,
4614
4652
  type: "submit",
4615
4653
  class: "wm-form__submit",
4616
4654
  disabled: r.busy
4617
4655
  }, [
4618
- r.busy ? (c(), u("span", Fi)) : b("", !0),
4656
+ r.busy ? (c(), u("span", ji)) : y("", !0),
4619
4657
  o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4620
- ], 8, Ni))
4658
+ ], 8, Di))
4621
4659
  ], 32)
4622
4660
  ]);
4623
4661
  }
4624
- const Pi = /* @__PURE__ */ R(fi, [["render", Di], ["__scopeId", "data-v-fe65cc56"]]), ji = {
4662
+ const qi = /* @__PURE__ */ N(vi, [["render", zi], ["__scopeId", "data-v-fe65cc56"]]), $i = {
4625
4663
  name: "WmFeedback",
4626
4664
  inject: {
4627
4665
  // Translator shared by the Messenger shell; French fallback when
@@ -4655,13 +4693,13 @@ const Pi = /* @__PURE__ */ R(fi, [["render", Di], ["__scopeId", "data-v-fe65cc56
4655
4693
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
4656
4694
  }
4657
4695
  }
4658
- }, Hi = { class: "wm-fb" }, zi = { class: "wm-fb__title" }, qi = { class: "wm-fb__sub" }, $i = { class: "wm-fb__row" }, Vi = ["onClick"], Ki = { class: "wm-fb__emoji" }, Wi = { class: "wm-fb__label" }, Gi = ["disabled"], Yi = {
4696
+ }, Ki = { class: "wm-fb" }, Vi = { class: "wm-fb__title" }, Wi = { class: "wm-fb__sub" }, Gi = { class: "wm-fb__row" }, Yi = ["onClick"], Ji = { class: "wm-fb__emoji" }, Qi = { class: "wm-fb__label" }, Xi = ["disabled"], Zi = {
4659
4697
  key: 1,
4660
4698
  class: "wm-fb__done"
4661
- }, Ji = { class: "wm-fb__doneTitle" }, Qi = { class: "wm-fb__doneSub" };
4662
- function Xi(e, t, n, i, r, s) {
4663
- return c(), u("div", Hi, [
4664
- n.done ? (c(), u("div", Yi, [
4699
+ }, ea = { class: "wm-fb__doneTitle" }, ta = { class: "wm-fb__doneSub" };
4700
+ function na(e, t, n, i, r, s) {
4701
+ return c(), u("div", Ki, [
4702
+ n.done ? (c(), u("div", Zi, [
4665
4703
  t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
4666
4704
  o("svg", {
4667
4705
  width: "16",
@@ -4677,32 +4715,32 @@ function Xi(e, t, n, i, r, s) {
4677
4715
  o("path", { d: "M20 6L9 17l-5-5" })
4678
4716
  ])
4679
4717
  ], -1)),
4680
- o("div", Ji, v(s.t("feedback.doneTitle")), 1),
4681
- o("div", Qi, v(s.t("feedback.doneSubtitle")), 1)
4682
- ])) : (c(), u(E, { key: 0 }, [
4683
- o("div", zi, v(s.t("feedback.question")), 1),
4684
- o("div", qi, v(s.t("feedback.subtitle")), 1),
4685
- o("div", $i, [
4686
- (c(!0), u(E, null, P(s.options, (a) => (c(), u("button", {
4718
+ o("div", ea, v(s.t("feedback.doneTitle")), 1),
4719
+ o("div", ta, v(s.t("feedback.doneSubtitle")), 1)
4720
+ ])) : (c(), u(B, { key: 0 }, [
4721
+ o("div", Vi, v(s.t("feedback.question")), 1),
4722
+ o("div", Wi, v(s.t("feedback.subtitle")), 1),
4723
+ o("div", Gi, [
4724
+ (c(!0), u(B, null, D(s.options, (a) => (c(), u("button", {
4687
4725
  key: a.v,
4688
4726
  type: "button",
4689
4727
  class: O(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
4690
4728
  onClick: (l) => r.sel = a.v
4691
4729
  }, [
4692
- o("span", Ki, v(a.e), 1),
4693
- o("span", Wi, v(a.l), 1)
4694
- ], 10, Vi))), 128))
4730
+ o("span", Ji, v(a.e), 1),
4731
+ o("span", Qi, v(a.l), 1)
4732
+ ], 10, Yi))), 128))
4695
4733
  ]),
4696
4734
  o("button", {
4697
4735
  type: "button",
4698
4736
  class: "wm-fb__send",
4699
4737
  disabled: !r.sel || n.busy,
4700
4738
  onClick: t[0] || (t[0] = (...a) => s.onSend && s.onSend(...a))
4701
- }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, Gi)
4739
+ }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, Xi)
4702
4740
  ], 64))
4703
4741
  ]);
4704
4742
  }
4705
- const Zi = /* @__PURE__ */ R(ji, [["render", Xi], ["__scopeId", "data-v-9b630564"]]), ea = {
4743
+ const sa = /* @__PURE__ */ N($i, [["render", na], ["__scopeId", "data-v-9b630564"]]), ra = {
4706
4744
  name: "WmMoreMenu",
4707
4745
  inject: {
4708
4746
  // Translator shared by the Messenger shell; French fallback when
@@ -4745,24 +4783,24 @@ const Zi = /* @__PURE__ */ R(ji, [["render", Xi], ["__scopeId", "data-v-9b630564
4745
4783
  this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
4746
4784
  }
4747
4785
  }
4748
- }, ta = { class: "wm-mm" }, na = {
4786
+ }, ia = { class: "wm-mm" }, aa = {
4749
4787
  class: "wm-mm__pop",
4750
4788
  role: "menu"
4751
- }, sa = {
4789
+ }, oa = {
4752
4790
  key: 0,
4753
4791
  class: "wm-mm__section"
4754
- }, ra = { class: "wm-mm__label" }, ia = { class: "wm-mm__label" }, aa = {
4792
+ }, la = { class: "wm-mm__label" }, ca = { class: "wm-mm__label" }, da = {
4755
4793
  key: 1,
4756
4794
  class: "wm-mm__sep"
4757
- }, oa = { class: "wm-mm__section" }, la = { class: "wm-mm__label" }, ca = { class: "wm-mm__label" }, da = { class: "wm-mm__section" }, ua = { class: "wm-mm__label" }, ha = { class: "wm-mm__label" };
4758
- function ma(e, t, n, i, r, s) {
4759
- return c(), u("div", ta, [
4795
+ }, ua = { class: "wm-mm__section" }, ha = { class: "wm-mm__label" }, ma = { class: "wm-mm__label" }, fa = { class: "wm-mm__section" }, ga = { class: "wm-mm__label" }, _a = { class: "wm-mm__label" };
4796
+ function pa(e, t, n, i, r, s) {
4797
+ return c(), u("div", ia, [
4760
4798
  o("div", {
4761
4799
  class: "wm-mm__scrim",
4762
4800
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
4763
4801
  }),
4764
- o("div", na, [
4765
- n.canRename || n.canExport ? (c(), u("div", sa, [
4802
+ o("div", aa, [
4803
+ n.canRename || n.canExport ? (c(), u("div", oa, [
4766
4804
  n.canRename ? (c(), u("button", {
4767
4805
  key: 0,
4768
4806
  type: "button",
@@ -4785,8 +4823,8 @@ function ma(e, t, n, i, r, s) {
4785
4823
  o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
4786
4824
  ])
4787
4825
  ], -1)),
4788
- o("span", ra, v(s.t("moreMenu.editTitle")), 1)
4789
- ])) : b("", !0),
4826
+ o("span", la, v(s.t("moreMenu.editTitle")), 1)
4827
+ ])) : y("", !0),
4790
4828
  n.canExport ? (c(), u("button", {
4791
4829
  key: 1,
4792
4830
  type: "button",
@@ -4808,12 +4846,12 @@ function ma(e, t, n, i, r, s) {
4808
4846
  o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
4809
4847
  ])
4810
4848
  ], -1)),
4811
- o("span", ia, v(s.t("moreMenu.exportTranscript")), 1),
4849
+ o("span", ca, v(s.t("moreMenu.exportTranscript")), 1),
4812
4850
  t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
4813
- ])) : b("", !0)
4814
- ])) : b("", !0),
4815
- n.canRename || n.canExport ? (c(), u("div", aa)) : b("", !0),
4816
- o("div", oa, [
4851
+ ])) : y("", !0)
4852
+ ])) : y("", !0),
4853
+ n.canRename || n.canExport ? (c(), u("div", da)) : y("", !0),
4854
+ o("div", ua, [
4817
4855
  o("button", {
4818
4856
  type: "button",
4819
4857
  class: "wm-mm__item",
@@ -4835,7 +4873,7 @@ function ma(e, t, n, i, r, s) {
4835
4873
  o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
4836
4874
  ])
4837
4875
  ], -1)),
4838
- o("span", la, v(s.t("moreMenu.sound")), 1),
4876
+ o("span", ha, v(s.t("moreMenu.sound")), 1),
4839
4877
  o("span", {
4840
4878
  class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
4841
4879
  }, [...t[10] || (t[10] = [
@@ -4862,7 +4900,7 @@ function ma(e, t, n, i, r, s) {
4862
4900
  o("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
4863
4901
  ])
4864
4902
  ], -1)),
4865
- o("span", ca, v(s.t("moreMenu.browserNotifications")), 1),
4903
+ o("span", ma, v(s.t("moreMenu.browserNotifications")), 1),
4866
4904
  o("span", {
4867
4905
  class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
4868
4906
  }, [...t[12] || (t[12] = [
@@ -4871,7 +4909,7 @@ function ma(e, t, n, i, r, s) {
4871
4909
  ])
4872
4910
  ]),
4873
4911
  t[16] || (t[16] = o("div", { class: "wm-mm__sep" }, null, -1)),
4874
- o("div", da, [
4912
+ o("div", fa, [
4875
4913
  n.statusUrl ? (c(), u("button", {
4876
4914
  key: 0,
4877
4915
  type: "button",
@@ -4893,8 +4931,8 @@ function ma(e, t, n, i, r, s) {
4893
4931
  o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
4894
4932
  ])
4895
4933
  ], -1)),
4896
- o("span", ua, v(s.t("moreMenu.serviceStatus")), 1)
4897
- ])) : b("", !0),
4934
+ o("span", ga, v(s.t("moreMenu.serviceStatus")), 1)
4935
+ ])) : y("", !0),
4898
4936
  n.helpUrl ? (c(), u("button", {
4899
4937
  key: 1,
4900
4938
  type: "button",
@@ -4916,13 +4954,13 @@ function ma(e, t, n, i, r, s) {
4916
4954
  o("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
4917
4955
  ])
4918
4956
  ], -1)),
4919
- o("span", ha, v(s.t("moreMenu.helpCenter")), 1)
4920
- ])) : b("", !0)
4957
+ o("span", _a, v(s.t("moreMenu.helpCenter")), 1)
4958
+ ])) : y("", !0)
4921
4959
  ])
4922
4960
  ])
4923
4961
  ]);
4924
4962
  }
4925
- const fa = /* @__PURE__ */ R(ea, [["render", ma], ["__scopeId", "data-v-76281e95"]]), ga = {
4963
+ const va = /* @__PURE__ */ N(ra, [["render", pa], ["__scopeId", "data-v-76281e95"]]), ya = {
4926
4964
  name: "WmRenameDialog",
4927
4965
  inject: {
4928
4966
  // Translator shared by the Messenger shell; French fallback when
@@ -4964,20 +5002,20 @@ const fa = /* @__PURE__ */ R(ea, [["render", ma], ["__scopeId", "data-v-76281e95
4964
5002
  this.canSubmit && this.$emit("submit", this.value.trim());
4965
5003
  }
4966
5004
  }
4967
- }, _a = { class: "wm-dialog" }, pa = {
5005
+ }, wa = { class: "wm-dialog" }, ba = {
4968
5006
  class: "wm-dialog__card",
4969
5007
  role: "dialog",
4970
5008
  "aria-modal": "true"
4971
- }, va = { class: "wm-dialog__head" }, ya = { class: "wm-dialog__title" }, wa = ["aria-label"], ba = { class: "wm-dialog__body" }, ka = ["placeholder"], Ca = { class: "wm-dialog__actions" }, Aa = ["disabled"];
4972
- function Sa(e, t, n, i, r, s) {
4973
- return c(), u("div", _a, [
5009
+ }, ka = { class: "wm-dialog__head" }, Ca = { class: "wm-dialog__title" }, Aa = ["aria-label"], Sa = { class: "wm-dialog__body" }, Ma = ["placeholder"], Ta = { class: "wm-dialog__actions" }, xa = ["disabled"];
5010
+ function Oa(e, t, n, i, r, s) {
5011
+ return c(), u("div", wa, [
4974
5012
  o("div", {
4975
5013
  class: "wm-dialog__scrim",
4976
5014
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
4977
5015
  }),
4978
- o("div", pa, [
4979
- o("div", va, [
4980
- o("div", ya, v(n.title || s.t("rename.title")), 1),
5016
+ o("div", ba, [
5017
+ o("div", ka, [
5018
+ o("div", Ca, v(n.title || s.t("rename.title")), 1),
4981
5019
  o("button", {
4982
5020
  type: "button",
4983
5021
  class: "wm-dialog__close",
@@ -4997,10 +5035,10 @@ function Sa(e, t, n, i, r, s) {
4997
5035
  }, [
4998
5036
  o("path", { d: "M18 6L6 18M6 6l12 12" })
4999
5037
  ], -1)
5000
- ])], 8, wa)
5038
+ ])], 8, Aa)
5001
5039
  ]),
5002
- o("div", ba, [
5003
- K(o("input", {
5040
+ o("div", Sa, [
5041
+ V(o("input", {
5004
5042
  ref: "input",
5005
5043
  "onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
5006
5044
  type: "text",
@@ -5008,14 +5046,14 @@ function Sa(e, t, n, i, r, s) {
5008
5046
  placeholder: n.placeholder || s.t("rename.placeholder"),
5009
5047
  maxlength: 120,
5010
5048
  onKeydown: [
5011
- t[3] || (t[3] = ue(J((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
5012
- t[4] || (t[4] = ue(J((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5049
+ t[3] || (t[3] = ue(G((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
5050
+ t[4] || (t[4] = ue(G((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5013
5051
  ]
5014
- }, null, 40, ka), [
5052
+ }, null, 40, Ma), [
5015
5053
  [X, r.value]
5016
5054
  ])
5017
5055
  ]),
5018
- o("div", Ca, [
5056
+ o("div", Ta, [
5019
5057
  o("button", {
5020
5058
  type: "button",
5021
5059
  class: "wm-dialog__btn",
@@ -5026,25 +5064,25 @@ function Sa(e, t, n, i, r, s) {
5026
5064
  class: "wm-dialog__btn wm-dialog__btn--primary",
5027
5065
  disabled: !s.canSubmit,
5028
5066
  onClick: t[6] || (t[6] = (...a) => s.onSubmit && s.onSubmit(...a))
5029
- }, v(s.t("common.save")), 9, Aa)
5067
+ }, v(s.t("common.save")), 9, xa)
5030
5068
  ])
5031
5069
  ])
5032
5070
  ]);
5033
5071
  }
5034
- const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8"]]), Oe = "ww-messenger-tokens", Ta = {
5072
+ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8"]]), Le = "ww-messenger-tokens", Ia = {
5035
5073
  name: "Messenger",
5036
5074
  components: {
5037
- Launcher: Ft,
5075
+ Launcher: Pt,
5038
5076
  Header: ln,
5039
- Onboarding: qn,
5040
- MessageList: Ir,
5041
- Composer: Xr,
5042
- SuggestionChips: ni,
5043
- ApprovalCard: hi,
5044
- FormCard: Pi,
5045
- Feedback: Zi,
5046
- MoreMenu: fa,
5047
- RenameDialog: Ma
5077
+ Onboarding: $n,
5078
+ MessageList: Fr,
5079
+ Composer: ni,
5080
+ SuggestionChips: ai,
5081
+ ApprovalCard: _i,
5082
+ FormCard: qi,
5083
+ Feedback: sa,
5084
+ MoreMenu: va,
5085
+ RenameDialog: La
5048
5086
  },
5049
5087
  mixins: [
5050
5088
  ot,
@@ -5187,7 +5225,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5187
5225
  // 4. French.
5188
5226
  locale() {
5189
5227
  var e;
5190
- return we(
5228
+ return be(
5191
5229
  this.language || this.customerLanguage || ((e = this.widget) == null ? void 0 : e.default_language) || ""
5192
5230
  );
5193
5231
  },
@@ -5229,22 +5267,22 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5229
5267
  var k;
5230
5268
  const r = e[i.id] || [], s = W(i.last_read_message_id);
5231
5269
  let a = 0, l = null;
5232
- for (let w = r.length - 1; w >= 0; w--) {
5233
- const T = r[w];
5270
+ for (let b = r.length - 1; b >= 0; b--) {
5271
+ const T = r[b];
5234
5272
  if (!T) continue;
5235
5273
  if (((k = T.author) == null ? void 0 : k.type) === "user") break;
5236
- const B = W(T.id);
5237
- if (B != null) {
5238
- if (s != null && B <= s) break;
5274
+ const E = W(T.id);
5275
+ if (E != null) {
5276
+ if (s != null && E <= s) break;
5239
5277
  t[T.id] !== 0 && (!l && T.author && (l = T.author), a++);
5240
5278
  }
5241
5279
  }
5242
5280
  if (!r.length) {
5243
- const w = W(i.last_message_id);
5244
- w != null && (s == null || w > s) && (a = 1, l = i.last_message_author || null);
5281
+ const b = W(i.last_message_id);
5282
+ b != null && (s == null || b > s) && (a = 1, l = i.last_message_author || null);
5245
5283
  }
5246
5284
  const p = r.filter(
5247
- (w) => !((w == null ? void 0 : w.id) != null && t[w.id] === 0)
5285
+ (b) => !((b == null ? void 0 : b.id) != null && t[b.id] === 0)
5248
5286
  );
5249
5287
  return {
5250
5288
  ...i,
@@ -5271,7 +5309,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5271
5309
  title: n.name || this.t("common.newConversation"),
5272
5310
  preview: n._preview || this.t("onboarding.newMessage"),
5273
5311
  unread: !!n._unread,
5274
- _ts: Se(n, e[n.id] || [])
5312
+ _ts: Me(n, e[n.id] || [])
5275
5313
  })).sort((n, i) => n._ts < i._ts ? 1 : n._ts > i._ts ? -1 : 0);
5276
5314
  },
5277
5315
  // Unread threads (one entry per conv with unseen agent/human
@@ -5283,7 +5321,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5283
5321
  const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
5284
5322
  for (const i of this.drawerConversations) {
5285
5323
  if (!i._unread) continue;
5286
- const r = Se(i, e[i.id] || []), s = i._lastAuthor, a = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (a ? this.agentName : "") || "", p = (s == null ? void 0 : s.avatar_url) || (a ? this.agentAvatarUrl : null);
5324
+ const r = Me(i, e[i.id] || []), s = i._lastAuthor, a = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (a ? this.agentName : "") || "", p = (s == null ? void 0 : s.avatar_url) || (a ? this.agentAvatarUrl : null);
5287
5325
  t.push({
5288
5326
  convId: i.id,
5289
5327
  preview: i._preview || this.t("notification.youHaveNewMessage"),
@@ -5429,7 +5467,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5429
5467
  const t = this.revealedAt;
5430
5468
  return (this.s.messagesByConv[e.id] || []).filter((r) => {
5431
5469
  var s, a, l, p, k;
5432
- return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || ae(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((a = r == null ? void 0 : r.payload) == null ? void 0 : a.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (k = r == null ? void 0 : r.metadata) != null && k.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
5470
+ return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || oe(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((a = r == null ? void 0 : r.payload) == null ? void 0 : a.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (k = r == null ? void 0 : r.metadata) != null && k.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
5433
5471
  });
5434
5472
  },
5435
5473
  // True whenever we should show the "typing" indicator at the bottom
@@ -5440,7 +5478,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5440
5478
  var n, i, r;
5441
5479
  const e = this.currentConv;
5442
5480
  return e ? Object.keys(((n = this.s) == null ? void 0 : n.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : (((r = (i = this.s) == null ? void 0 : i.messagesByConv) == null ? void 0 : r[e.id]) || []).some(
5443
- (s) => ae(s) && !(this.revealedAt[s.id] > 0)
5481
+ (s) => oe(s) && !(this.revealedAt[s.id] > 0)
5444
5482
  ) : !1;
5445
5483
  },
5446
5484
  // Internal: the raw persisted list for the current conversation. We
@@ -5472,7 +5510,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5472
5510
  const t = (p = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
5473
5511
  if (!t || typeof t != "object") return "";
5474
5512
  const n = Object.entries(t);
5475
- return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
5513
+ return n.length ? n.slice(0, 2).map(([k, b]) => `${k}: ${b}`).join(" · ") : "";
5476
5514
  },
5477
5515
  actionInFlight() {
5478
5516
  var e, t;
@@ -5515,7 +5553,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5515
5553
  }
5516
5554
  }
5517
5555
  return this.t("messageList.today", {
5518
- time: Ee(t, oe(this.locale))
5556
+ time: pe(t, re(this.locale))
5519
5557
  });
5520
5558
  },
5521
5559
  // Pagination state for the active conversation. Drives the
@@ -5620,9 +5658,9 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5620
5658
  }
5621
5659
  },
5622
5660
  async mounted() {
5623
- if (typeof document < "u" && !document.getElementById(Oe)) {
5661
+ if (typeof document < "u" && !document.getElementById(Le)) {
5624
5662
  const e = document.createElement("style");
5625
- e.id = Oe, e.textContent = Xe, document.head.appendChild(e);
5663
+ e.id = Le, e.textContent = Xe, document.head.appendChild(e);
5626
5664
  }
5627
5665
  this._parentMessageHandler = this.onParentMessage.bind(this), window.addEventListener("message", this._parentMessageHandler), window.parent && window.parent !== window && window.parent.postMessage({ type: "READY" }, "*"), this.isEmbedded ? (await this.boot(), this.store && await this.open()) : (await this.$nextTick(), this.sendCurrentLauncherSize(), this.observeLauncherSize());
5628
5666
  },
@@ -5656,7 +5694,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5656
5694
  onParentMessage(e) {
5657
5695
  var n;
5658
5696
  const t = e == null ? void 0 : e.data;
5659
- !t || typeof t != "object" || t.type !== "INIT" || (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentContext = t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (n = this.parentInitDeferred) != null && n._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.hasValidSessionMarker() && this.boot().catch((i) => {
5697
+ !t || typeof t != "object" || t.type !== "INIT" || (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentContext = t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (n = this.parentInitDeferred) != null && n._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.parentToken && this.hasValidSessionMarker() && this.boot().catch((i) => {
5660
5698
  console.warn("[messenger] eager boot failed", i);
5661
5699
  }));
5662
5700
  },
@@ -5677,12 +5715,12 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5677
5715
  return;
5678
5716
  }
5679
5717
  try {
5680
- await this.waitForParentInit(), this.transport = ke(
5718
+ await this.waitForParentInit(), this.transport = Ce(
5681
5719
  We({
5682
5720
  baseUrl: this.baseUrl,
5683
5721
  widgetId: this.widgetId
5684
5722
  })
5685
- ), this.store = ke(Qe(this.transport)), this.hydrateNotifPref();
5723
+ ), this.store = Ce(Qe(this.transport)), this.hydrateNotifPref();
5686
5724
  const n = ((e = this.parentContext) == null ? void 0 : e.customer) || ((t = this.context) == null ? void 0 : t.customer);
5687
5725
  await this.store.start({
5688
5726
  origin: this.parentOrigin,
@@ -5771,21 +5809,21 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5771
5809
  this.launcherHovered = e, this.sendCurrentLauncherSize();
5772
5810
  },
5773
5811
  sendCurrentLauncherSize() {
5774
- var T, B, A, H, M, F, N;
5812
+ var T, E, A, H, S, P, I;
5775
5813
  if (this.isOpen) return;
5776
- const e = (B = (T = this.$el) == null ? void 0 : T.querySelector) == null ? void 0 : B.call(T, ".wm-launcherWrap");
5814
+ const e = (E = (T = this.$el) == null ? void 0 : T.querySelector) == null ? void 0 : E.call(T, ".wm-launcherWrap");
5777
5815
  if (!e) return;
5778
5816
  const t = e.getBoundingClientRect();
5779
5817
  if (!t.width || !t.height) return;
5780
- const n = (((A = this.launcherPeeks) == null ? void 0 : A.length) ?? 0) > 0, i = this.launcherHovered ? 28 : 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (M = (H = this.$el) == null ? void 0 : H.querySelector) == null ? void 0 : M.call(H, ".wm-launcher"), l = a == null ? void 0 : a.getBoundingClientRect(), p = (N = (F = this.$el) == null ? void 0 : F.querySelectorAll) == null ? void 0 : N.call(F, ".wm-peek"), k = p && p.length ? p[p.length - 1] : null;
5781
- let w = null;
5818
+ const n = (((A = this.launcherPeeks) == null ? void 0 : A.length) ?? 0) > 0, i = this.launcherHovered ? 28 : 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (S = (H = this.$el) == null ? void 0 : H.querySelector) == null ? void 0 : S.call(H, ".wm-launcher"), l = a == null ? void 0 : a.getBoundingClientRect(), p = (I = (P = this.$el) == null ? void 0 : P.querySelectorAll) == null ? void 0 : I.call(P, ".wm-peek"), k = p && p.length ? p[p.length - 1] : null;
5819
+ let b = null;
5782
5820
  if (k) {
5783
- const D = k.getBoundingClientRect();
5784
- w = {
5785
- width: Math.ceil(D.width),
5786
- height: Math.ceil(D.height),
5787
- rightOffset: Math.max(0, Math.ceil(t.right - D.right)),
5788
- bottomOffset: Math.max(0, Math.ceil(t.bottom - D.bottom))
5821
+ const U = k.getBoundingClientRect();
5822
+ b = {
5823
+ width: Math.ceil(U.width),
5824
+ height: Math.ceil(U.height),
5825
+ rightOffset: Math.max(0, Math.ceil(t.right - U.right)),
5826
+ bottomOffset: Math.max(0, Math.ceil(t.bottom - U.bottom))
5789
5827
  };
5790
5828
  }
5791
5829
  this.notifyParentResize("closed", {
@@ -5794,7 +5832,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5794
5832
  launcherWidth: l ? Math.ceil(l.width) : null,
5795
5833
  launcherHeight: l ? Math.ceil(l.height) : null,
5796
5834
  launcherHovered: this.launcherHovered,
5797
- peek: w,
5835
+ peek: b,
5798
5836
  peekHovered: this.launcherHovered && n
5799
5837
  });
5800
5838
  },
@@ -5980,9 +6018,34 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5980
6018
  console.error("[ww-messenger] attachment upload failed", t);
5981
6019
  }
5982
6020
  },
6021
+ // Délégation des clics sur les liens `<a href="#...">` rendus dans le
6022
+ // panel (typiquement par le markdown des messages agent). On capture
6023
+ // au niveau du panel pour éviter d'ajouter un listener par composant.
6024
+ onPanelClick(e) {
6025
+ const t = e.target && e.target.closest ? e.target.closest('a[href^="#"]') : null;
6026
+ t && (e.preventDefault(), this.openInternalUrl(t.getAttribute("href")));
6027
+ },
6028
+ // Intercepte les URLs `#...` pour naviguer DANS le messenger plutôt
6029
+ // que d'ouvrir une page externe. Format :
6030
+ // - `#conversation/<convId>` : ouvre cette conv dans le panel
6031
+ // - `#new` : démarre un nouveau draft (composer)
6032
+ // Retourne `true` si le deep-link a été dispatché en interne ;
6033
+ // `false` si l'URL est externe et doit passer par `window.open`.
6034
+ async openInternalUrl(e) {
6035
+ if (typeof e != "string" || !e.startsWith("#")) return !1;
6036
+ const t = e.slice(1);
6037
+ if (t === "new" || t === "new-conversation")
6038
+ return this.isOpen || await this.open(), this.startConv(), !0;
6039
+ if (t.startsWith("conversation/")) {
6040
+ const n = t.slice(13);
6041
+ return n && await this.openFromPeek(n), !0;
6042
+ }
6043
+ return console.warn("[messenger] unknown internal url", e), !0;
6044
+ },
5983
6045
  async onQuickLink(e) {
5984
6046
  if (e) {
5985
6047
  if (e.url) {
6048
+ if (await this.openInternalUrl(e.url)) return;
5986
6049
  try {
5987
6050
  window.open(e.url, "_blank", "noopener");
5988
6051
  } catch {
@@ -6008,40 +6071,40 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
6008
6071
  }
6009
6072
  }
6010
6073
  }
6011
- }, xa = {
6074
+ }, Ea = {
6012
6075
  key: 0,
6013
6076
  class: "wm-loading",
6014
6077
  "aria-busy": "true",
6015
6078
  "aria-live": "polite"
6016
- }, Oa = ["aria-label"], La = {
6079
+ }, Ba = ["aria-label"], Ra = {
6017
6080
  key: 0,
6018
6081
  class: "wm-state"
6019
- }, Ba = { class: "wm-state__err" }, Ea = { class: "wm-state__errTitle" }, Ia = { class: "wm-state__errSub" }, Ra = { class: "wm-bottom" }, Na = {
6082
+ }, Na = { class: "wm-state__err" }, Pa = { class: "wm-state__errTitle" }, Fa = { class: "wm-state__errSub" }, Ua = { class: "wm-bottom" }, Da = {
6020
6083
  key: 0,
6021
6084
  ref: "floatEl",
6022
6085
  class: "wm-float"
6023
- }, Fa = {
6086
+ }, ja = {
6024
6087
  key: 1,
6025
6088
  class: "wm-actionWait",
6026
6089
  role: "status",
6027
6090
  "aria-live": "polite"
6028
- }, Ua = { class: "wm-actionWait__lbl" }, Da = {
6091
+ }, Ha = { class: "wm-actionWait__lbl" }, za = {
6029
6092
  key: 2,
6030
6093
  class: "wm-attached"
6031
- }, Pa = ["aria-label", "onClick"];
6032
- function ja(e, t, n, i, r, s) {
6033
- const a = I("Launcher"), l = I("Header"), p = I("Onboarding"), k = I("MessageList"), w = I("ApprovalCard"), T = I("FormCard"), B = I("Feedback"), A = I("SuggestionChips"), H = I("Composer"), M = I("MoreMenu"), F = I("RenameDialog");
6094
+ }, qa = ["aria-label", "onClick"];
6095
+ function $a(e, t, n, i, r, s) {
6096
+ const a = R("Launcher"), l = R("Header"), p = R("Onboarding"), k = R("MessageList"), b = R("ApprovalCard"), T = R("FormCard"), E = R("Feedback"), A = R("SuggestionChips"), H = R("Composer"), S = R("MoreMenu"), P = R("RenameDialog");
6034
6097
  return c(), u("div", {
6035
6098
  class: O(["wm-root", `wm-root--${n.displayMode}`])
6036
6099
  }, [
6037
- !r.isOpen && !s.isEmbedded ? (c(), U(a, {
6100
+ !r.isOpen && !s.isEmbedded ? (c(), F(a, {
6038
6101
  key: 0,
6039
6102
  "unread-count": s.unreadCount,
6040
6103
  peeks: s.launcherPeeks,
6041
6104
  onOpen: s.openFromPeek,
6042
6105
  onDismiss: s.dismissPeek,
6043
6106
  onHover: s.onLauncherHover
6044
- }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
6107
+ }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : y("", !0),
6045
6108
  r.isOpen || s.isEmbedded ? (c(), u("section", {
6046
6109
  key: 1,
6047
6110
  class: O([
@@ -6051,16 +6114,17 @@ function ja(e, t, n, i, r, s) {
6051
6114
  ]),
6052
6115
  style: q(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
6053
6116
  role: "dialog",
6054
- "aria-label": "Messenger"
6117
+ "aria-label": "Messenger",
6118
+ onClick: t[5] || (t[5] = (...I) => s.onPanelClick && s.onPanelClick(...I))
6055
6119
  }, [
6056
- !s.ready && !s.error ? (c(), u("div", xa, [
6057
- s.isEmbedded ? b("", !0) : (c(), u("button", {
6120
+ !s.ready && !s.error ? (c(), u("div", Ea, [
6121
+ s.isEmbedded ? y("", !0) : (c(), u("button", {
6058
6122
  key: 0,
6059
6123
  type: "button",
6060
6124
  class: "wm-loading__close",
6061
6125
  "aria-label": s.t("loading.minimize"),
6062
- onClick: t[0] || (t[0] = (...N) => s.close && s.close(...N))
6063
- }, [...t[5] || (t[5] = [
6126
+ onClick: t[0] || (t[0] = (...I) => s.close && s.close(...I))
6127
+ }, [...t[6] || (t[6] = [
6064
6128
  o("svg", {
6065
6129
  width: "13",
6066
6130
  height: "13",
@@ -6074,12 +6138,12 @@ function ja(e, t, n, i, r, s) {
6074
6138
  }, [
6075
6139
  o("path", { d: "M18 6L6 18M6 6l12 12" })
6076
6140
  ], -1)
6077
- ])], 8, Oa)),
6078
- t[6] || (t[6] = o("div", {
6141
+ ])], 8, Ba)),
6142
+ t[7] || (t[7] = o("div", {
6079
6143
  class: "wm-loading__spinner",
6080
6144
  "aria-hidden": "true"
6081
6145
  }, null, -1))
6082
- ])) : (c(), u(E, { key: 1 }, [
6146
+ ])) : (c(), u(B, { key: 1 }, [
6083
6147
  $(l, {
6084
6148
  title: s.headerTitle,
6085
6149
  "team-members": s.teamMembers,
@@ -6094,9 +6158,9 @@ function ja(e, t, n, i, r, s) {
6094
6158
  onMore: s.toggleMore,
6095
6159
  onClose: s.close
6096
6160
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
6097
- s.error ? (c(), u("div", La, [
6098
- o("div", Ba, [
6099
- t[7] || (t[7] = o("div", { class: "wm-state__errIcon" }, [
6161
+ s.error ? (c(), u("div", Ra, [
6162
+ o("div", Na, [
6163
+ t[8] || (t[8] = o("div", { class: "wm-state__errIcon" }, [
6100
6164
  o("svg", {
6101
6165
  width: "14",
6102
6166
  height: "14",
@@ -6112,11 +6176,11 @@ function ja(e, t, n, i, r, s) {
6112
6176
  ])
6113
6177
  ], -1)),
6114
6178
  o("div", null, [
6115
- o("div", Ea, v(s.t("error.connectionFailed")), 1),
6116
- o("div", Ia, v(s.error), 1)
6179
+ o("div", Pa, v(s.t("error.connectionFailed")), 1),
6180
+ o("div", Fa, v(s.error), 1)
6117
6181
  ])
6118
6182
  ])
6119
- ])) : s.currentConv ? (c(), u(E, { key: 2 }, [
6183
+ ])) : s.currentConv ? (c(), u(B, { key: 2 }, [
6120
6184
  $(k, {
6121
6185
  ref: "messageList",
6122
6186
  messages: s.displayedMessages,
@@ -6131,9 +6195,9 @@ function ja(e, t, n, i, r, s) {
6131
6195
  "ai-agent-avatar-url": s.agentAvatarUrl,
6132
6196
  onLoadMore: s.onLoadMore
6133
6197
  }, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-id", "unread-boundary-ts", "ai-agent-name", "ai-agent-avatar-url", "onLoadMore"]),
6134
- o("div", Ra, [
6135
- s.floatVisible ? (c(), u("div", Na, [
6136
- s.approvalReady ? (c(), U(w, {
6198
+ o("div", Ua, [
6199
+ s.floatVisible ? (c(), u("div", Da, [
6200
+ s.approvalReady ? (c(), F(b, {
6137
6201
  key: 0,
6138
6202
  action: s.approvalTitle,
6139
6203
  detail: s.approvalDetail,
@@ -6141,36 +6205,36 @@ function ja(e, t, n, i, r, s) {
6141
6205
  "agent-name": s.agentName,
6142
6206
  "agent-avatar-url": s.agentAvatarUrl,
6143
6207
  onCallback: s.onApprovalCallback
6144
- }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), U(T, {
6208
+ }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), F(T, {
6145
6209
  key: s.pendingForm.message && s.pendingForm.message.id,
6146
6210
  form: s.pendingForm.form,
6147
6211
  "agent-name": s.agentName,
6148
6212
  "agent-avatar-url": s.agentAvatarUrl,
6149
6213
  onSubmit: s.onFormSubmit
6150
- }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), U(B, {
6214
+ }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), F(E, {
6151
6215
  key: 2,
6152
6216
  busy: r.feedbackBusy,
6153
6217
  done: r.feedbackDone,
6154
6218
  onSubmit: s.onFeedback
6155
- }, null, 8, ["busy", "done", "onSubmit"])) : (c(), U(A, {
6219
+ }, null, 8, ["busy", "done", "onSubmit"])) : (c(), F(A, {
6156
6220
  key: 3,
6157
6221
  items: s.suggestions,
6158
6222
  onSelect: s.onSuggestion
6159
6223
  }, null, 8, ["items", "onSelect"]))
6160
- ], 512)) : b("", !0),
6161
- s.actionInFlight ? (c(), u("div", Fa, [
6162
- t[8] || (t[8] = o("span", {
6224
+ ], 512)) : y("", !0),
6225
+ s.actionInFlight ? (c(), u("div", ja, [
6226
+ t[9] || (t[9] = o("span", {
6163
6227
  class: "wm-actionWait__spinner",
6164
6228
  "aria-hidden": "true"
6165
6229
  }, null, -1)),
6166
- o("span", Ua, v(s.t("action.inProgress", {
6230
+ o("span", Ha, v(s.t("action.inProgress", {
6167
6231
  name: s.actionInFlightName
6168
6232
  })), 1)
6169
- ])) : (c(), U(H, {
6233
+ ])) : (c(), F(H, {
6170
6234
  key: 2,
6171
6235
  ref: "composer",
6172
6236
  modelValue: r.draft,
6173
- "onUpdate:modelValue": t[1] || (t[1] = (N) => r.draft = N),
6237
+ "onUpdate:modelValue": t[1] || (t[1] = (I) => r.draft = I),
6174
6238
  placeholder: s.composerPlaceholder,
6175
6239
  disabled: !!s.pendingApproval,
6176
6240
  "attach-label": s.t("composer.attachFile"),
@@ -6179,7 +6243,7 @@ function ja(e, t, n, i, r, s) {
6179
6243
  onAttach: s.onAttach
6180
6244
  }, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "display-mode", "onSend", "onAttach"]))
6181
6245
  ]),
6182
- r.moreOpen ? (c(), U(M, {
6246
+ r.moreOpen ? (c(), F(S, {
6183
6247
  key: 0,
6184
6248
  "can-rename": !!s.currentConv && !s.currentConv._draft,
6185
6249
  "can-export": !!s.currentConv && !s.currentConv._draft,
@@ -6187,24 +6251,24 @@ function ja(e, t, n, i, r, s) {
6187
6251
  "browser-notif-enabled": e.browserNotifEnabled,
6188
6252
  "status-url": s.statusUrl,
6189
6253
  "help-url": s.helpUrl,
6190
- onClose: t[2] || (t[2] = (N) => r.moreOpen = !1),
6254
+ onClose: t[2] || (t[2] = (I) => r.moreOpen = !1),
6191
6255
  onSoundToggle: e.onSoundToggle,
6192
6256
  onBrowserNotifToggle: e.onBrowserNotifToggle,
6193
6257
  onAction: s.onMoreAction
6194
- }, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0),
6195
- r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), U(F, {
6258
+ }, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : y("", !0),
6259
+ r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), F(P, {
6196
6260
  key: 1,
6197
6261
  "initial-value": s.currentConv.name || "",
6198
6262
  title: s.t("rename.dialogTitle"),
6199
- onClose: t[3] || (t[3] = (N) => r.renameDialogOpen = !1),
6263
+ onClose: t[3] || (t[3] = (I) => r.renameDialogOpen = !1),
6200
6264
  onSubmit: s.onRenameSubmit
6201
- }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0),
6202
- r.pendingAttachments.length ? (c(), u("div", Da, [
6203
- (c(!0), u(E, null, P(r.pendingAttachments, (N, D) => (c(), u("div", {
6204
- key: D,
6265
+ }, null, 8, ["initial-value", "title", "onSubmit"])) : y("", !0),
6266
+ r.pendingAttachments.length ? (c(), u("div", za, [
6267
+ (c(!0), u(B, null, D(r.pendingAttachments, (I, U) => (c(), u("div", {
6268
+ key: U,
6205
6269
  class: "wm-attached__chip"
6206
6270
  }, [
6207
- t[10] || (t[10] = o("svg", {
6271
+ t[11] || (t[11] = o("svg", {
6208
6272
  width: "11",
6209
6273
  height: "11",
6210
6274
  viewBox: "0 0 24 24",
@@ -6217,12 +6281,12 @@ function ja(e, t, n, i, r, s) {
6217
6281
  }, [
6218
6282
  o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
6219
6283
  ], -1)),
6220
- o("span", null, v(N.name), 1),
6284
+ o("span", null, v(I.name), 1),
6221
6285
  o("button", {
6222
6286
  type: "button",
6223
6287
  "aria-label": s.t("attachment.remove"),
6224
- onClick: (G) => r.pendingAttachments.splice(D, 1)
6225
- }, [...t[9] || (t[9] = [
6288
+ onClick: (Y) => r.pendingAttachments.splice(U, 1)
6289
+ }, [...t[10] || (t[10] = [
6226
6290
  o("svg", {
6227
6291
  width: "10",
6228
6292
  height: "10",
@@ -6236,10 +6300,10 @@ function ja(e, t, n, i, r, s) {
6236
6300
  }, [
6237
6301
  o("path", { d: "M18 6L6 18M6 6l12 12" })
6238
6302
  ], -1)
6239
- ])], 8, Pa)
6303
+ ])], 8, qa)
6240
6304
  ]))), 128))
6241
- ])) : b("", !0)
6242
- ], 64)) : (c(), U(p, {
6305
+ ])) : y("", !0)
6306
+ ], 64)) : (c(), F(p, {
6243
6307
  key: 1,
6244
6308
  "welcome-message": s.widgetWelcomeMessage,
6245
6309
  subtitle: s.widgetSubtitle,
@@ -6252,7 +6316,7 @@ function ja(e, t, n, i, r, s) {
6252
6316
  onSelect: s.onQuickLink,
6253
6317
  onResume: s.onDrawerPick
6254
6318
  }, null, 8, ["welcome-message", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
6255
- r.moreOpen && !s.currentConv ? (c(), U(M, {
6319
+ r.moreOpen && !s.currentConv ? (c(), F(S, {
6256
6320
  key: 3,
6257
6321
  "can-rename": !1,
6258
6322
  "can-export": !1,
@@ -6260,62 +6324,62 @@ function ja(e, t, n, i, r, s) {
6260
6324
  "browser-notif-enabled": e.browserNotifEnabled,
6261
6325
  "status-url": s.statusUrl,
6262
6326
  "help-url": s.helpUrl,
6263
- onClose: t[4] || (t[4] = (N) => r.moreOpen = !1),
6327
+ onClose: t[4] || (t[4] = (I) => r.moreOpen = !1),
6264
6328
  onSoundToggle: e.onSoundToggle,
6265
6329
  onBrowserNotifToggle: e.onBrowserNotifToggle,
6266
6330
  onAction: s.onMoreAction
6267
- }, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0)
6331
+ }, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : y("", !0)
6268
6332
  ], 64))
6269
- ], 6)) : b("", !0)
6333
+ ], 6)) : y("", !0)
6270
6334
  ], 2);
6271
6335
  }
6272
- const qa = /* @__PURE__ */ R(Ta, [["render", ja], ["__scopeId", "data-v-010fdbd1"]]), $a = "0.5.28";
6336
+ const Wa = /* @__PURE__ */ N(Ia, [["render", $a], ["__scopeId", "data-v-7f3d28ad"]]), Ga = "0.5.30";
6273
6337
  export {
6274
6338
  le as AIAvatar,
6275
6339
  ge as AVATAR_COLORS,
6276
- ts as ActionResult,
6277
- hi as ApprovalCard,
6278
- ds as ArtifactFormResponse,
6279
- Cs as ArtifactInfoCard,
6280
- zs as ArtifactRenderer,
6340
+ ns as ActionResult,
6341
+ _i as ApprovalCard,
6342
+ us as ArtifactFormResponse,
6343
+ As as ArtifactInfoCard,
6344
+ qs as ArtifactRenderer,
6281
6345
  Ds as ArtifactTicket,
6282
- er as AttachmentPreview,
6283
- rr as Bubble,
6284
- Xr as Composer,
6346
+ tr as AttachmentPreview,
6347
+ ir as Bubble,
6348
+ ni as Composer,
6285
6349
  Ze as DEFAULT_BASE_URL,
6286
- ie as DEFAULT_LANGUAGE,
6287
- Zi as Feedback,
6288
- Pi as FormCard,
6350
+ ae as DEFAULT_LANGUAGE,
6351
+ sa as Feedback,
6352
+ qi as FormCard,
6289
6353
  ln as Header,
6290
6354
  Re as HumanAvatar,
6291
- Ft as Launcher,
6292
- be as MEDIA_RECORDER_SUPPORTED,
6293
- Ir as MessageList,
6294
- qa as Messenger,
6295
- fa as MoreMenu,
6296
- qn as Onboarding,
6355
+ Pt as Launcher,
6356
+ ke as MEDIA_RECORDER_SUPPORTED,
6357
+ Fr as MessageList,
6358
+ Wa as Messenger,
6359
+ va as MoreMenu,
6360
+ $n as Onboarding,
6297
6361
  he as SCREEN_CAPTURE_SUPPORTED,
6298
6362
  et as SUPPORTED_LANGUAGES,
6299
- ni as SuggestionChips,
6363
+ ai as SuggestionChips,
6300
6364
  Gt as TeamAvatars,
6301
- lr as Typing,
6302
- $a as VERSION,
6303
- ve as avatarColor,
6304
- ye as avatarInitials,
6305
- Nr as captureScreenshotFile,
6365
+ cr as Typing,
6366
+ Ga as VERSION,
6367
+ ye as avatarColor,
6368
+ we as avatarInitials,
6369
+ Dr as captureScreenshotFile,
6306
6370
  z as colors,
6307
6371
  Qe as createStore,
6308
6372
  j as createTranslator,
6309
6373
  We as createTransport,
6310
- oe as dateLocale,
6311
- qa as default,
6312
- Ee as formatTime,
6313
- za as guessAttachmentKind,
6314
- Rr as pickRecorderMime,
6374
+ re as dateLocale,
6375
+ Wa as default,
6376
+ pe as formatTime,
6377
+ Va as guessAttachmentKind,
6378
+ Ur as pickRecorderMime,
6315
6379
  dn as renderInlineMarkdown,
6316
6380
  un as renderMarkdown,
6317
- we as resolveLanguage,
6318
- Ur as startScreenRecording,
6381
+ be as resolveLanguage,
6382
+ Hr as startScreenRecording,
6319
6383
  Xe as tokensCss,
6320
6384
  Je as uuid,
6321
6385
  Je as v4