@_solaris/messenger-widget 0.5.76 → 0.5.77

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 $e, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as $, Transition as Ne, withCtx as je, Fragment as I, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as D, resolveDynamicComponent as Ae, mergeProps as Fe, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as Ke, vModelCheckbox as We, vModelSelect as Ge, markRaw as Re } from "vue";
1
+ import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as K, Transition as De, withCtx as je, Fragment as I, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as l, createCommentVNode as k, createBlock as P, resolveDynamicComponent as Ae, mergeProps as Fe, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as We, vModelCheckbox as $e, vModelSelect as Ge, markRaw as Re } from "vue";
2
2
  const Ye = [
3
3
  "connected",
4
4
  "message",
@@ -38,7 +38,7 @@ function Ze(e) {
38
38
  function s(u, g) {
39
39
  return t.listeners.has(u) || t.listeners.set(u, /* @__PURE__ */ new Set()), t.listeners.get(u).add(g), () => t.listeners.get(u).delete(g);
40
40
  }
41
- function i(u, g) {
41
+ function r(u, g) {
42
42
  const p = t.listeners.get(u);
43
43
  p && p.forEach((S) => {
44
44
  try {
@@ -48,8 +48,8 @@ function Ze(e) {
48
48
  }
49
49
  });
50
50
  }
51
- function a(u) {
52
- t.connection !== u && (t.connection = u, i("connection", u));
51
+ function i(u) {
52
+ t.connection !== u && (t.connection = u, r("connection", u));
53
53
  }
54
54
  function n() {
55
55
  return {
@@ -64,7 +64,7 @@ function Ze(e) {
64
64
  ...t.origin ? { "X-Parent-Origin": t.origin } : {}
65
65
  };
66
66
  }
67
- async function r(u, g, p) {
67
+ async function a(u, g, p) {
68
68
  const S = await fetch(`${t.baseUrl}${we}${g}`, {
69
69
  method: u,
70
70
  credentials: "include",
@@ -72,14 +72,14 @@ function Ze(e) {
72
72
  body: p !== void 0 ? JSON.stringify(p) : void 0
73
73
  });
74
74
  if (!S.ok) {
75
- const O = await l(S), x = new Error(
75
+ const O = await o(S), x = new Error(
76
76
  `HTTP ${S.status} ${u} ${g} :: ${(O == null ? void 0 : O.error) || S.statusText}`
77
77
  );
78
78
  throw x.status = S.status, x.body = O, x;
79
79
  }
80
80
  return S.status === 204 ? null : S.json();
81
81
  }
82
- async function l(u) {
82
+ async function o(u) {
83
83
  try {
84
84
  return await u.json();
85
85
  } catch {
@@ -112,7 +112,7 @@ function Ze(e) {
112
112
  }
113
113
  );
114
114
  if (!g.ok) {
115
- const V = await l(g), Z = new Error(
115
+ const V = await o(g), Z = new Error(
116
116
  `Session bootstrap failed: HTTP ${g.status} :: ${(V == null ? void 0 : V.error) || g.statusText}`
117
117
  );
118
118
  throw Z.status = g.status, Z.body = V, Z;
@@ -125,21 +125,21 @@ function Ze(e) {
125
125
  { credentials: "include" }
126
126
  ).then(async (V) => {
127
127
  if (!V.ok) {
128
- const Z = await l(V);
128
+ const Z = await o(V);
129
129
  throw new Error(
130
130
  `HTTP ${V.status} GET /widgets/:id/config :: ${(Z == null ? void 0 : Z.error) || V.statusText}`
131
131
  );
132
132
  }
133
133
  return V.json();
134
134
  }),
135
- r("GET", "/customers/me")
135
+ a("GET", "/customers/me")
136
136
  ]), x = { config: S, customer: (O == null ? void 0 : O.customer) ?? null };
137
- return t.lastBootstrap = x, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
137
+ return t.lastBootstrap = x, await b(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
138
138
  "visibilitychange",
139
139
  t.visibilityHandler
140
140
  )), fe(), x;
141
141
  }
142
- async function k() {
142
+ async function b() {
143
143
  try {
144
144
  const u = await E();
145
145
  t.lastActivityAt = u.reduce((g, p) => {
@@ -151,45 +151,45 @@ function Ze(e) {
151
151
  }
152
152
  }
153
153
  async function y() {
154
- const u = await r("GET", "/customers/me");
154
+ const u = await a("GET", "/customers/me");
155
155
  return (u == null ? void 0 : u.customer) ?? null;
156
156
  }
157
- async function T(u) {
158
- const g = await r("PATCH", "/customers/me", u);
157
+ async function M(u) {
158
+ const g = await a("PATCH", "/customers/me", u);
159
159
  return (g == null ? void 0 : g.customer) ?? null;
160
160
  }
161
161
  async function E() {
162
- const u = await r("GET", "/conversations");
162
+ const u = await a("GET", "/conversations");
163
163
  return (u == null ? void 0 : u.conversations) ?? [];
164
164
  }
165
165
  async function A(u = {}) {
166
- return (await r("POST", "/conversations", u)).conversation;
166
+ return (await a("POST", "/conversations", u)).conversation;
167
167
  }
168
168
  async function q(u) {
169
- return (await r(
169
+ return (await a(
170
170
  "GET",
171
171
  `/conversations/${encodeURIComponent(u)}`
172
172
  )).conversation;
173
173
  }
174
- async function M(u, g) {
175
- return (await r(
174
+ async function T(u, g) {
175
+ return (await a(
176
176
  "PATCH",
177
177
  `/conversations/${encodeURIComponent(u)}`,
178
178
  g
179
179
  )).conversation;
180
180
  }
181
181
  async function U(u, g) {
182
- return r(
182
+ return a(
183
183
  "PATCH",
184
184
  `/conversations/${encodeURIComponent(u)}/read`,
185
185
  { message_id: g }
186
186
  );
187
187
  }
188
- async function N(u, g = {}) {
188
+ async function D(u, g = {}) {
189
189
  const p = new URLSearchParams();
190
190
  g.before && p.set("before", g.before), g.since && p.set("since", g.since), g.limit && p.set("limit", String(g.limit));
191
191
  const S = p.toString() ? `?${p.toString()}` : "";
192
- return r(
192
+ return a(
193
193
  "GET",
194
194
  `/conversations/${encodeURIComponent(u)}/messages${S}`
195
195
  );
@@ -203,21 +203,21 @@ function Ze(e) {
203
203
  author: { id: t.userId, type: "user" },
204
204
  created_at: g.created_at || (/* @__PURE__ */ new Date()).toISOString()
205
205
  };
206
- return Array.isArray(g.attachments) && g.attachments.length && (p.payload = { type: "content", attachments: g.attachments }), g.metadata && typeof g.metadata == "object" && (p.metadata = g.metadata), t.currentContext && Object.keys(t.currentContext).length > 0 && (p.context = t.currentContext), r(
206
+ return Array.isArray(g.attachments) && g.attachments.length && (p.payload = { type: "content", attachments: g.attachments }), g.metadata && typeof g.metadata == "object" && (p.metadata = g.metadata), t.currentContext && Object.keys(t.currentContext).length > 0 && (p.context = t.currentContext), a(
207
207
  "POST",
208
208
  `/conversations/${encodeURIComponent(u)}/messages`,
209
209
  p
210
210
  );
211
211
  }
212
- async function K(u, g, p) {
213
- return ae(), r(
212
+ async function W(u, g, p) {
213
+ return ae(), a(
214
214
  "POST",
215
215
  `/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(g)}`,
216
216
  p ? { inputs: p } : {}
217
217
  );
218
218
  }
219
219
  async function Q(u) {
220
- const g = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0, O = await r("POST", "/attachments", {
220
+ const g = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0, O = await a("POST", "/attachments", {
221
221
  mime_type: p,
222
222
  size_bytes: S,
223
223
  name: g
@@ -236,7 +236,7 @@ function Ze(e) {
236
236
  };
237
237
  }
238
238
  async function se(u) {
239
- return r(
239
+ return a(
240
240
  "GET",
241
241
  `/attachments/sign?path=${encodeURIComponent(u)}`
242
242
  );
@@ -245,7 +245,7 @@ function Ze(e) {
245
245
  const u = new URLSearchParams({ widgetId: t.widgetId }).toString();
246
246
  return `${t.baseUrl}${we}/stream?${u}`;
247
247
  }
248
- function W() {
248
+ function $() {
249
249
  if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
250
250
  try {
251
251
  const u = new EventSource(re(), { withCredentials: !0 });
@@ -253,30 +253,30 @@ function Ze(e) {
253
253
  u.addEventListener(g, (p) => ie(g, p.data));
254
254
  u.addEventListener(
255
255
  "error",
256
- () => i("error", new Error("SSE error"))
257
- ), t.eventSource = u, a("open");
256
+ () => r("error", new Error("SSE error"))
257
+ ), t.eventSource = u, i("open");
258
258
  } catch (u) {
259
- console.error("[transport] SSE open failed", u), i("error", u);
259
+ console.error("[transport] SSE open failed", u), r("error", u);
260
260
  }
261
261
  }
262
262
  function ie(u, g) {
263
263
  try {
264
264
  const p = JSON.parse(g), S = p && typeof p == "object" && "data" in p ? p.data : p;
265
- i(u, S);
265
+ r(u, S);
266
266
  } catch (p) {
267
267
  console.error("[transport] bad SSE payload", u, p);
268
268
  }
269
269
  }
270
270
  function X() {
271
- t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && a("idle");
271
+ t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && i("idle");
272
272
  }
273
273
  function ae() {
274
- clearTimeout(t.burstTimer), W(), t.panelOpen || (t.burstTimer = setTimeout(() => {
274
+ clearTimeout(t.burstTimer), $(), t.panelOpen || (t.burstTimer = setTimeout(() => {
275
275
  t.panelOpen || X();
276
276
  }, Xe));
277
277
  }
278
278
  function me(u) {
279
- t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), W()) : ae();
279
+ t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), $()) : ae();
280
280
  }
281
281
  async function ye() {
282
282
  try {
@@ -284,7 +284,7 @@ function Ze(e) {
284
284
  const x = O == null ? void 0 : O.last_message_at;
285
285
  return x && (!S || x > S) ? x : S;
286
286
  }, null);
287
- g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, i("activity", { conversations: u, latestAt: g }), ae());
287
+ g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }), ae());
288
288
  } catch (u) {
289
289
  console.error("[transport] poll failed", u);
290
290
  }
@@ -298,14 +298,14 @@ function Ze(e) {
298
298
  function m() {
299
299
  if (document.hidden)
300
300
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
301
- t.hiddenGraceTimer = null, document.hidden && (h(), X(), a("paused"));
301
+ t.hiddenGraceTimer = null, document.hidden && (h(), X(), i("paused"));
302
302
  }, Qe);
303
303
  else {
304
304
  if (t.hiddenGraceTimer) {
305
305
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
306
306
  return;
307
307
  }
308
- a("idle"), fe(), t.panelOpen && W();
308
+ i("idle"), fe(), t.panelOpen && $();
309
309
  }
310
310
  }
311
311
  function _() {
@@ -315,7 +315,7 @@ function Ze(e) {
315
315
  ), t.visibilityHandler = null), t.started = !1;
316
316
  }
317
317
  async function w(u) {
318
- return !u || typeof u != "object" ? null : r("POST", "/update", u);
318
+ return !u || typeof u != "object" ? null : a("POST", "/update", u);
319
319
  }
320
320
  function C(u) {
321
321
  if (!(!u || typeof u != "object"))
@@ -336,15 +336,15 @@ function Ze(e) {
336
336
  context: C,
337
337
  // REST
338
338
  getCustomer: y,
339
- patchCustomer: T,
339
+ patchCustomer: M,
340
340
  listConversations: E,
341
341
  createConversation: A,
342
342
  getConversation: q,
343
- patchConversation: M,
343
+ patchConversation: T,
344
344
  markConversationRead: U,
345
- listMessages: N,
345
+ listMessages: D,
346
346
  postMessage: L,
347
- postCallback: K,
347
+ postCallback: W,
348
348
  uploadAttachment: Q,
349
349
  signAttachment: se,
350
350
  // Read-only state
@@ -372,7 +372,7 @@ function nt() {
372
372
  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("");
373
373
  }
374
374
  function st(e) {
375
- const t = $e({
375
+ const t = Ke({
376
376
  ready: !1,
377
377
  error: null,
378
378
  config: null,
@@ -410,7 +410,7 @@ function st(e) {
410
410
  ), s.push(
411
411
  e.on("message", (h) => {
412
412
  const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.message;
413
- !m || !(_ != null && _.id) || (W(m, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], ae(m, _.created_at));
413
+ !m || !(_ != null && _.id) || ($(m, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], ae(m, _.created_at));
414
414
  })
415
415
  ), s.push(
416
416
  e.on("message_stream", (h) => {
@@ -443,7 +443,7 @@ function st(e) {
443
443
  Array.isArray(h == null ? void 0 : h.conversations) && (t.conversations = h.conversations);
444
444
  })
445
445
  );
446
- async function i(h) {
446
+ async function r(h) {
447
447
  try {
448
448
  const m = new Promise(
449
449
  (w, C) => setTimeout(
@@ -466,7 +466,7 @@ function st(e) {
466
466
  console.error("[store] start failed", m), t.error = (m == null ? void 0 : m.message) || String(m);
467
467
  }
468
468
  }
469
- function a() {
469
+ function i() {
470
470
  for (const h of s)
471
471
  try {
472
472
  h();
@@ -485,18 +485,18 @@ function st(e) {
485
485
  }
486
486
  return t.customer;
487
487
  }
488
- async function r(h = {}) {
488
+ async function a(h = {}) {
489
489
  const m = await e.createConversation(h), _ = t.conversations.findIndex((w) => w.id === m.id);
490
490
  return _ === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[_] = m, m;
491
491
  }
492
- const l = 50;
492
+ const o = 50;
493
493
  async function f(h) {
494
494
  const m = t.paginationByConv[h];
495
495
  if (!(m != null && m.loaded || m != null && m.loading)) {
496
496
  y(h, { nextCursor: null, loading: !0, loaded: !1 });
497
497
  try {
498
498
  const _ = await e.listMessages(h, {
499
- limit: l
499
+ limit: o
500
500
  }), w = (_ == null ? void 0 : _.messages) ?? [], C = t.messagesByConv[h] || [], u = /* @__PURE__ */ new Set();
501
501
  for (const p of w)
502
502
  (p == null ? void 0 : p.id) != null && u.add(`id:${String(p.id)}`), p != null && p.client_msg_id && u.add(`c:${p.client_msg_id}`);
@@ -517,7 +517,7 @@ function st(e) {
517
517
  }
518
518
  }
519
519
  }
520
- async function k(h) {
520
+ async function b(h) {
521
521
  var C;
522
522
  const m = t.paginationByConv[h];
523
523
  if (!m || m.loading || !m.nextCursor) return;
@@ -527,7 +527,7 @@ function st(e) {
527
527
  try {
528
528
  const u = await e.listMessages(h, {
529
529
  before: w,
530
- limit: l
530
+ limit: o
531
531
  }), g = (u == null ? void 0 : u.messages) ?? [], p = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
532
532
  for (const x of p)
533
533
  (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}`);
@@ -545,7 +545,7 @@ function st(e) {
545
545
  function y(h, m) {
546
546
  t.paginationByConv = { ...t.paginationByConv, [h]: m };
547
547
  }
548
- async function T(h, m) {
548
+ async function M(h, m) {
549
549
  const _ = await e.patchConversation(h, m), w = t.conversations.findIndex((C) => C.id === h);
550
550
  w !== -1 && (t.conversations[w] = _);
551
551
  }
@@ -567,7 +567,7 @@ function st(e) {
567
567
  const p = [];
568
568
  for (const S of C) {
569
569
  const O = (S == null ? void 0 : S.id) != null && u.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && g.has(S.client_msg_id);
570
- W(h, S), O || p.push(S);
570
+ $(h, S), O || p.push(S);
571
571
  }
572
572
  return p;
573
573
  } catch (w) {
@@ -606,7 +606,7 @@ function st(e) {
606
606
  ...u ? { payload: { type: "content", attachments: _ } } : {},
607
607
  ...w && typeof w == "object" ? { metadata: w } : {}
608
608
  };
609
- W(h, S);
609
+ $(h, S);
610
610
  try {
611
611
  await e.postMessage(h, {
612
612
  client_msg_id: g,
@@ -622,7 +622,7 @@ function st(e) {
622
622
  });
623
623
  }
624
624
  }
625
- async function M(h, m, _) {
625
+ async function T(h, m, _) {
626
626
  h != null && (t.awaitingCallback[h] = !0);
627
627
  try {
628
628
  await e.postCallback(h, m, _);
@@ -631,7 +631,7 @@ function st(e) {
631
631
  }
632
632
  }
633
633
  const U = /* @__PURE__ */ new Map();
634
- async function N(h) {
634
+ async function D(h) {
635
635
  if (!h) return null;
636
636
  const m = U.get(h);
637
637
  if (m != null && m.url) {
@@ -659,9 +659,9 @@ function st(e) {
659
659
  submitted_at: (/* @__PURE__ */ new Date()).toISOString()
660
660
  }
661
661
  };
662
- await T(h, { metadata: u });
662
+ await M(h, { metadata: u });
663
663
  }
664
- function K(h) {
664
+ function W(h) {
665
665
  var _, w;
666
666
  const m = t.messagesByConv[h] || [];
667
667
  for (let C = m.length - 1; C >= 0; C--) {
@@ -718,7 +718,7 @@ function st(e) {
718
718
  }
719
719
  return [];
720
720
  }
721
- function W(h, m) {
721
+ function $(h, m) {
722
722
  var u;
723
723
  const _ = t.messagesByConv[h] || [];
724
724
  let w = -1;
@@ -775,20 +775,20 @@ function st(e) {
775
775
  }
776
776
  return {
777
777
  state: t,
778
- start: i,
779
- destroy: a,
778
+ start: r,
779
+ destroy: i,
780
780
  applyCustomer: n,
781
- createConversation: r,
781
+ createConversation: a,
782
782
  openConversation: f,
783
- loadMore: k,
783
+ loadMore: b,
784
784
  fetchSinceLast: E,
785
- patchConversation: T,
785
+ patchConversation: M,
786
786
  markConversationRead: A,
787
787
  send: q,
788
- clickCallback: M,
789
- signAttachment: N,
788
+ clickCallback: T,
789
+ signAttachment: D,
790
790
  submitFeedback: L,
791
- getPendingApproval: K,
791
+ getPendingApproval: W,
792
792
  getActionInFlight: se,
793
793
  getLatestSuggestions: re,
794
794
  getLatestForm: Q,
@@ -952,6 +952,8 @@ Je réponds en quelques secondes.`,
952
952
  "composer.recordScreen": "Enregistrer l'écran",
953
953
  "composer.recording": "Enregistrement · {time}",
954
954
  "composer.stop": "Arrêter",
955
+ "composer.conversationEnded": "Cette conversation est terminée.",
956
+ "composer.newConversation": "Nouvelle conversation",
955
957
  // ── Message list ─────────────────────────────────────────────────
956
958
  "messageList.loadingHistory": "Chargement de l'historique…",
957
959
  "messageList.conversationStart": "Début de la conversation",
@@ -966,6 +968,7 @@ Je réponds en quelques secondes.`,
966
968
  "system.assigned": "{name} a rejoint la conversation",
967
969
  "system.unassigned": "L'agent a quitté la conversation",
968
970
  "system.resolved": "Conversation résolue",
971
+ "system.closed": "Conversation fermée",
969
972
  "system.reopened": "Conversation rouverte",
970
973
  "system.idle": "Conversation en pause",
971
974
  // ── Action / approval ────────────────────────────────────────────
@@ -1078,6 +1081,8 @@ I reply within seconds.`,
1078
1081
  "composer.recordScreen": "Record screen",
1079
1082
  "composer.recording": "Recording · {time}",
1080
1083
  "composer.stop": "Stop",
1084
+ "composer.conversationEnded": "This conversation has ended.",
1085
+ "composer.newConversation": "New conversation",
1081
1086
  // ── Message list ─────────────────────────────────────────────────
1082
1087
  "messageList.loadingHistory": "Loading history…",
1083
1088
  "messageList.conversationStart": "Start of the conversation",
@@ -1092,6 +1097,7 @@ I reply within seconds.`,
1092
1097
  "system.assigned": "{name} joined the conversation",
1093
1098
  "system.unassigned": "The agent left the conversation",
1094
1099
  "system.resolved": "Conversation resolved",
1100
+ "system.closed": "Conversation closed",
1095
1101
  "system.reopened": "Conversation reopened",
1096
1102
  "system.idle": "Conversation paused",
1097
1103
  // ── Action / approval ────────────────────────────────────────────
@@ -1153,55 +1159,55 @@ function ne(e) {
1153
1159
  return Le[xe(e)] || Le[ue];
1154
1160
  }
1155
1161
  function F(e) {
1156
- const t = xe(e), s = ke[t] || ke[ue], i = ke[ue];
1157
- return function(n, r) {
1158
- let l = s[n];
1159
- return l == null && (l = i[n]), l == null ? n : (r && (l = l.replace(
1162
+ const t = xe(e), s = ke[t] || ke[ue], r = ke[ue];
1163
+ return function(n, a) {
1164
+ let o = s[n];
1165
+ return o == null && (o = r[n]), o == null ? n : (a && (o = o.replace(
1160
1166
  /\{(\w+)\}/g,
1161
- (f, k) => r[k] != null ? String(r[k]) : f
1162
- )), l);
1167
+ (f, b) => a[b] != null ? String(a[b]) : f
1168
+ )), o);
1163
1169
  };
1164
1170
  }
1165
1171
  function Ie(e, t) {
1166
1172
  if (!Array.isArray(e == null ? void 0 : e.options)) return t;
1167
- const s = e.options.find((i) => (i == null ? void 0 : i.value) === t);
1173
+ const s = e.options.find((r) => (r == null ? void 0 : r.value) === t);
1168
1174
  return (s == null ? void 0 : s.label) || t;
1169
1175
  }
1170
1176
  function He(e, t, s) {
1171
- return Array.isArray(t) ? t.map((i) => Ie(e, String(i))).join(", ") : typeof t == "boolean" ? s(t ? "common.yes" : "common.no") : Ie(e, String(t));
1177
+ return Array.isArray(t) ? t.map((r) => Ie(e, String(r))).join(", ") : typeof t == "boolean" ? s(t ? "common.yes" : "common.no") : Ie(e, String(t));
1172
1178
  }
1173
1179
  function ht(e, t, s = F()) {
1174
1180
  if (!e || !t) return "";
1175
- const i = Array.isArray(e.fields) ? e.fields : [], a = [];
1176
- for (const n of i) {
1181
+ const r = Array.isArray(e.fields) ? e.fields : [], i = [];
1182
+ for (const n of r) {
1177
1183
  if (!(n != null && n.key) || !(n != null && n.label)) continue;
1178
- const r = t[n.key];
1179
- if (r == null || r === "") continue;
1180
- const l = He(n, r, s);
1181
- l && a.push(`${n.label} :
1182
- ${l}`);
1184
+ const a = t[n.key];
1185
+ if (a == null || a === "") continue;
1186
+ const o = He(n, a, s);
1187
+ o && i.push(`${n.label} :
1188
+ ${o}`);
1183
1189
  }
1184
- return a.join(`
1190
+ return i.join(`
1185
1191
 
1186
1192
  `);
1187
1193
  }
1188
1194
  function mt(e, t, s = F()) {
1189
- const i = [], a = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1190
- for (const n of a) {
1195
+ const r = [], i = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1196
+ for (const n of i) {
1191
1197
  if (!(n != null && n.key) || !(n != null && n.label)) continue;
1192
- const r = t == null ? void 0 : t[n.key];
1193
- if (r == null || r === "") continue;
1194
- const l = He(n, r, s);
1195
- if (!l) continue;
1196
- const f = n.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
1198
+ const a = t == null ? void 0 : t[n.key];
1199
+ if (a == null || a === "") continue;
1200
+ const o = He(n, a, s);
1201
+ if (!o) continue;
1202
+ const f = n.type === "textarea" || typeof o == "string" && (o.length > 60 || o.includes(`
1197
1203
  `));
1198
- i.push({ label: n.label, value: l, multiline: f });
1204
+ r.push({ label: n.label, value: o, multiline: f });
1199
1205
  }
1200
1206
  return {
1201
1207
  kind: "form_response",
1202
1208
  data: {
1203
1209
  title: (e == null ? void 0 : e.title) || s("form.title"),
1204
- fields: i
1210
+ fields: r
1205
1211
  }
1206
1212
  };
1207
1213
  }
@@ -1215,10 +1221,10 @@ const Ee = "";
1215
1221
  function de(e) {
1216
1222
  let t = e;
1217
1223
  const s = [];
1218
- return t = t.replace(/`([^`\n]+)`/g, (i, a) => {
1224
+ return t = t.replace(/`([^`\n]+)`/g, (r, i) => {
1219
1225
  const n = s.length;
1220
- return s.push(a), `${Ee}CODE${n}${Ee}`;
1221
- }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, a, n) => _e(n) ? `<a href="${n}" target="_blank" rel="noopener noreferrer">${a}</a>` : a), 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, a) => `<code class="wm-md-code">${s[+a]}</code>`), t;
1226
+ return s.push(i), `${Ee}CODE${n}${Ee}`;
1227
+ }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (r, i, n) => _e(n) ? `<a href="${n}" target="_blank" rel="noopener noreferrer">${i}</a>` : i), 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, (r, i) => `<code class="wm-md-code">${s[+i]}</code>`), t;
1222
1228
  }
1223
1229
  function qe(e) {
1224
1230
  if (!e) return "";
@@ -1229,70 +1235,70 @@ function ft(e) {
1229
1235
  if (!e) return "";
1230
1236
  const t = ze(e).split(`
1231
1237
  `), s = [];
1232
- let i = 0;
1233
- for (; i < t.length; ) {
1234
- const n = t[i];
1238
+ let r = 0;
1239
+ for (; r < t.length; ) {
1240
+ const n = t[r];
1235
1241
  if (/^\s*```([\w-]*)\s*$/.exec(n)) {
1236
- i++;
1237
- const k = [];
1238
- for (; i < t.length && !/^\s*```\s*$/.test(t[i]); )
1239
- k.push(t[i]), i++;
1240
- i < t.length && i++, s.push({
1242
+ r++;
1243
+ const b = [];
1244
+ for (; r < t.length && !/^\s*```\s*$/.test(t[r]); )
1245
+ b.push(t[r]), r++;
1246
+ r < t.length && r++, s.push({
1241
1247
  type: "block",
1242
- html: `<pre class="wm-md-pre"><code>${k.join(`
1248
+ html: `<pre class="wm-md-pre"><code>${b.join(`
1243
1249
  `)}</code></pre>`
1244
1250
  });
1245
1251
  continue;
1246
1252
  }
1247
1253
  if (/^\s*[-*]\s+/.test(n)) {
1248
- const k = [];
1249
- for (; i < t.length; ) {
1250
- const T = /^\s*[-*]\s+(.*)$/.exec(t[i]);
1251
- if (!T) break;
1252
- k.push(T[1]), i++;
1254
+ const b = [];
1255
+ for (; r < t.length; ) {
1256
+ const M = /^\s*[-*]\s+(.*)$/.exec(t[r]);
1257
+ if (!M) break;
1258
+ b.push(M[1]), r++;
1253
1259
  }
1254
- const y = k.map((T) => `<li>${de(T)}</li>`).join("");
1260
+ const y = b.map((M) => `<li>${de(M)}</li>`).join("");
1255
1261
  s.push({
1256
1262
  type: "block",
1257
1263
  html: `<ul class="wm-md-ul">${y}</ul>`
1258
1264
  });
1259
1265
  continue;
1260
1266
  }
1261
- const l = /^\s*(\d+)\.\s+(.*)$/.exec(n);
1262
- if (l) {
1263
- const k = parseInt(l[1], 10), y = [l[2]];
1264
- for (i++; i < t.length; ) {
1265
- const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
1267
+ const o = /^\s*(\d+)\.\s+(.*)$/.exec(n);
1268
+ if (o) {
1269
+ const b = parseInt(o[1], 10), y = [o[2]];
1270
+ for (r++; r < t.length; ) {
1271
+ const A = /^\s*\d+\.\s+(.*)$/.exec(t[r]);
1266
1272
  if (!A) break;
1267
- y.push(A[1]), i++;
1273
+ y.push(A[1]), r++;
1268
1274
  }
1269
- const T = y.map((A) => `<li>${de(A)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
1275
+ const M = y.map((A) => `<li>${de(A)}</li>`).join(""), E = b !== 1 ? ` start="${b}"` : "";
1270
1276
  s.push({
1271
1277
  type: "block",
1272
- html: `<ol class="wm-md-ol"${E}>${T}</ol>`
1278
+ html: `<ol class="wm-md-ol"${E}>${M}</ol>`
1273
1279
  });
1274
1280
  continue;
1275
1281
  }
1276
1282
  const f = /^(#{1,6})\s+(.*)$/.exec(n);
1277
1283
  if (f) {
1278
- const k = f[1].length;
1284
+ const b = f[1].length;
1279
1285
  s.push({
1280
1286
  type: "block",
1281
- html: `<h${k} class="wm-md-h wm-md-h${k}">${de(f[2])}</h${k}>`
1282
- }), i++;
1287
+ html: `<h${b} class="wm-md-h wm-md-h${b}">${de(f[2])}</h${b}>`
1288
+ }), r++;
1283
1289
  continue;
1284
1290
  }
1285
- s.push({ type: "text", html: de(n) }), i++;
1291
+ s.push({ type: "text", html: de(n) }), r++;
1286
1292
  }
1287
- let a = "";
1293
+ let i = "";
1288
1294
  for (let n = 0; n < s.length; n++) {
1289
- const r = s[n];
1290
- a += r.html;
1291
- const l = s[n + 1];
1292
- l && r.type !== "block" && l.type !== "block" && (a += `
1295
+ const a = s[n];
1296
+ i += a.html;
1297
+ const o = s[n + 1];
1298
+ o && a.type !== "block" && o.type !== "block" && (i += `
1293
1299
  `);
1294
1300
  }
1295
- return a;
1301
+ return i;
1296
1302
  }
1297
1303
  function he(e) {
1298
1304
  var s;
@@ -1306,52 +1312,52 @@ function Y(e) {
1306
1312
  }
1307
1313
  function Be(e, t) {
1308
1314
  let s = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
1309
- for (const i of t)
1310
- i != null && i.created_at && i.created_at > s && (s = i.created_at);
1315
+ for (const r of t)
1316
+ r != null && r.created_at && r.created_at > s && (s = r.created_at);
1311
1317
  return s;
1312
1318
  }
1313
1319
  function _t(e, t) {
1314
- var s, i, a;
1320
+ var s, r, i;
1315
1321
  for (let n = t.length - 1; n >= 0; n--) {
1316
- const r = t[n];
1317
- if (!r) continue;
1318
- const l = typeof r.text_md == "string" ? r.text_md.trim() : "";
1319
- if (l)
1320
- return (((s = r.author) == null ? void 0 : s.type) === "user" ? "Vous : " : "") + l.replace(/\s+/g, " ");
1321
- const f = (i = r.payload) == null ? void 0 : i.attachments;
1322
+ const a = t[n];
1323
+ if (!a) continue;
1324
+ const o = typeof a.text_md == "string" ? a.text_md.trim() : "";
1325
+ if (o)
1326
+ return (((s = a.author) == null ? void 0 : s.type) === "user" ? "Vous : " : "") + o.replace(/\s+/g, " ");
1327
+ const f = (r = a.payload) == null ? void 0 : r.attachments;
1322
1328
  if (Array.isArray(f) && f.length) return "📎 Pièce jointe";
1323
1329
  }
1324
- return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((a = e == null ? void 0 : e.metadata) == null ? void 0 : a.last_preview) || "";
1330
+ return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((i = e == null ? void 0 : e.metadata) == null ? void 0 : i.last_preview) || "";
1325
1331
  }
1326
1332
  function gt(e, t) {
1327
1333
  return (e == null ? void 0 : e.name) || ((e == null ? void 0 : e.type) === "user" ? t("common.you") : (e == null ? void 0 : e.type) === "agent_human" ? t("common.agent") : (e == null ? void 0 : e.type) === "agent_ia" ? t("common.aiAssistant") : t("common.system"));
1328
1334
  }
1329
- function pt(e, t, s, i) {
1330
- const a = [
1335
+ function pt(e, t, s, r) {
1336
+ const i = [
1331
1337
  `# ${e.name || s("common.conversation")}`,
1332
1338
  e.created_at ? s("export.createdOn", {
1333
- date: new Date(e.created_at).toLocaleString(i)
1339
+ date: new Date(e.created_at).toLocaleString(r)
1334
1340
  }) : "",
1335
1341
  ""
1336
1342
  ];
1337
1343
  for (const n of t) {
1338
1344
  if (!n) continue;
1339
- const r = (n.text_md || "").trim();
1340
- if (!r) continue;
1341
- const l = gt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(i) : "";
1342
- a.push(`[${f}] ${l} :`), a.push(r), a.push("");
1345
+ const a = (n.text_md || "").trim();
1346
+ if (!a) continue;
1347
+ const o = gt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(r) : "";
1348
+ i.push(`[${f}] ${o} :`), i.push(a), i.push("");
1343
1349
  }
1344
- return a.join(`
1350
+ return i.join(`
1345
1351
  `);
1346
1352
  }
1347
- function vt(e, t, s = F(), i) {
1353
+ function vt(e, t, s = F(), r) {
1348
1354
  if (!e) return;
1349
- const a = pt(e, t || [], s, ne(i)), n = new Blob([a], { type: "text/plain;charset=utf-8" });
1355
+ const i = pt(e, t || [], s, ne(r)), n = new Blob([i], { type: "text/plain;charset=utf-8" });
1350
1356
  try {
1351
- const r = URL.createObjectURL(n), l = document.createElement("a");
1352
- l.href = r, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(r), 1e3);
1353
- } catch (r) {
1354
- console.error("[ww-messenger] export failed", r);
1357
+ const a = URL.createObjectURL(n), o = document.createElement("a");
1358
+ o.href = a, o.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(o), o.click(), document.body.removeChild(o), setTimeout(() => URL.revokeObjectURL(a), 1e3);
1359
+ } catch (a) {
1360
+ console.error("[ww-messenger] export failed", a);
1355
1361
  }
1356
1362
  }
1357
1363
  const yt = {
@@ -1464,10 +1470,10 @@ const yt = {
1464
1470
  // at message-arrival time because the user may have closed the
1465
1471
  // panel or switched threads during the typing dwell.
1466
1472
  onMessageRevealed(e, t) {
1467
- var a;
1473
+ var i;
1468
1474
  if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !he(e)) return;
1469
1475
  const s = typeof document < "u" && document.hidden;
1470
- this.isOpen && !s && ((a = this.currentConv) == null ? void 0 : a.id) === t || (this.soundEnabled && this.playNotificationSound(), this.browserNotifEnabled && this.showBrowserNotification(t, e));
1476
+ this.isOpen && !s && ((i = this.currentConv) == null ? void 0 : i.id) === t || (this.soundEnabled && this.playNotificationSound(), this.browserNotifEnabled && this.showBrowserNotification(t, e));
1471
1477
  },
1472
1478
  playNotificationSound() {
1473
1479
  if (typeof window > "u") return;
@@ -1481,17 +1487,17 @@ const yt = {
1481
1487
  t.resume();
1482
1488
  } catch {
1483
1489
  }
1484
- const s = t.currentTime, i = t.createOscillator(), a = t.createGain();
1485
- i.connect(a), a.connect(t.destination), i.type = "sine", i.frequency.setValueAtTime(880, s), i.frequency.exponentialRampToValueAtTime(1320, s + 0.08), a.gain.setValueAtTime(0, s), a.gain.linearRampToValueAtTime(0.12, s + 0.02), a.gain.exponentialRampToValueAtTime(1e-4, s + 0.28), i.start(s), i.stop(s + 0.32);
1490
+ const s = t.currentTime, r = t.createOscillator(), i = t.createGain();
1491
+ r.connect(i), i.connect(t.destination), r.type = "sine", r.frequency.setValueAtTime(880, s), r.frequency.exponentialRampToValueAtTime(1320, s + 0.08), i.gain.setValueAtTime(0, s), i.gain.linearRampToValueAtTime(0.12, s + 0.02), i.gain.exponentialRampToValueAtTime(1e-4, s + 0.28), r.start(s), r.stop(s + 0.32);
1486
1492
  } catch {
1487
1493
  }
1488
1494
  },
1489
1495
  showBrowserNotification(e, t) {
1490
1496
  if (typeof Notification > "u" || Notification.permission !== "granted") return;
1491
- const s = t == null ? void 0 : t.author, i = !s || s.type === "agent_ia", n = ((s == null ? void 0 : s.name) || (i ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), r = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", l = r ? r.slice(0, 140) : this.t("notification.youHaveNewMessage");
1497
+ const s = t == null ? void 0 : t.author, r = !s || s.type === "agent_ia", n = ((s == null ? void 0 : s.name) || (r ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), a = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", o = a ? a.slice(0, 140) : this.t("notification.youHaveNewMessage");
1492
1498
  try {
1493
1499
  const f = new Notification(n, {
1494
- body: l,
1500
+ body: o,
1495
1501
  tag: `wm-${e}`,
1496
1502
  renotify: !1,
1497
1503
  silent: !0
@@ -1590,26 +1596,26 @@ const yt = {
1590
1596
  // the activity isn't replayed via SSE, so we fetch it explicitly and
1591
1597
  // run it through pacing.
1592
1598
  setupLiveReveal() {
1593
- var s, i;
1599
+ var s, r;
1594
1600
  if (!this.transport) return;
1595
1601
  this.teardownLiveReveal();
1596
- const e = this.transport.on("message", (a) => {
1597
- const n = a == null ? void 0 : a.conversation_id, r = a == null ? void 0 : a.message;
1598
- n && r && this.paceLiveMessage(r, n);
1602
+ const e = this.transport.on("message", (i) => {
1603
+ const n = i == null ? void 0 : i.conversation_id, a = i == null ? void 0 : i.message;
1604
+ n && a && this.paceLiveMessage(a, n);
1599
1605
  });
1600
1606
  this._liveRevealConvSnapshot = new Map(
1601
- (((s = this.s) == null ? void 0 : s.conversations) || []).map((a) => [
1602
- a.id,
1603
- (a == null ? void 0 : a.last_message_at) || ""
1607
+ (((s = this.s) == null ? void 0 : s.conversations) || []).map((i) => [
1608
+ i.id,
1609
+ (i == null ? void 0 : i.last_message_at) || ""
1604
1610
  ])
1605
1611
  ), this._liveHwm = Object.fromEntries(
1606
- (((i = this.s) == null ? void 0 : i.conversations) || []).map((a) => [
1607
- a.id,
1608
- (a == null ? void 0 : a.last_message_at) || ""
1612
+ (((r = this.s) == null ? void 0 : r.conversations) || []).map((i) => [
1613
+ i.id,
1614
+ (i == null ? void 0 : i.last_message_at) || ""
1609
1615
  ])
1610
1616
  );
1611
- const t = this.transport.on("activity", (a) => {
1612
- this.handleLiveActivity(a);
1617
+ const t = this.transport.on("activity", (i) => {
1618
+ this.handleLiveActivity(i);
1613
1619
  });
1614
1620
  this._liveRevealOff = () => {
1615
1621
  try {
@@ -1639,29 +1645,29 @@ const yt = {
1639
1645
  // on background convs when SSE wasn't open at the moment they
1640
1646
  // arrived.
1641
1647
  async handleLiveActivity(e) {
1642
- var a, n;
1648
+ var i, n;
1643
1649
  const t = e == null ? void 0 : e.conversations;
1644
1650
  if (!Array.isArray(t) || !this.store) return;
1645
- const s = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(), i = [];
1646
- for (const r of t) {
1647
- if (!(r != null && r.id)) continue;
1648
- const l = r.last_message_at || "";
1649
- if (!l) continue;
1650
- const f = s.get(r.id) || "";
1651
- l > f && i.push(r.id);
1651
+ const s = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(), r = [];
1652
+ for (const a of t) {
1653
+ if (!(a != null && a.id)) continue;
1654
+ const o = a.last_message_at || "";
1655
+ if (!o) continue;
1656
+ const f = s.get(a.id) || "";
1657
+ o > f && r.push(a.id);
1652
1658
  }
1653
1659
  this._liveRevealConvSnapshot = new Map(
1654
- t.map((r) => [r.id, (r == null ? void 0 : r.last_message_at) || ""])
1660
+ t.map((a) => [a.id, (a == null ? void 0 : a.last_message_at) || ""])
1655
1661
  );
1656
- for (const r of i)
1662
+ for (const a of r)
1657
1663
  try {
1658
- const l = await ((n = (a = this.store).fetchSinceLast) == null ? void 0 : n.call(a, r));
1659
- if (!Array.isArray(l)) continue;
1660
- for (const f of l) this.paceLiveMessage(f, r);
1661
- } catch (l) {
1664
+ const o = await ((n = (i = this.store).fetchSinceLast) == null ? void 0 : n.call(i, a));
1665
+ if (!Array.isArray(o)) continue;
1666
+ for (const f of o) this.paceLiveMessage(f, a);
1667
+ } catch (o) {
1662
1668
  console.error(
1663
1669
  "[ww-messenger] activity delta fetch failed",
1664
- l
1670
+ o
1665
1671
  );
1666
1672
  }
1667
1673
  },
@@ -1671,16 +1677,16 @@ const yt = {
1671
1677
  // - inter-bubble gap scales with message length (reading time),
1672
1678
  // bounded by MIN/MAX_TYPING_MS.
1673
1679
  scheduleReveal(e, t) {
1674
- const s = this.revealPacing, i = Date.now(), a = ((e == null ? void 0 : e.text_md) || "").length, n = Math.min(
1680
+ const s = this.revealPacing, r = Date.now(), i = ((e == null ? void 0 : e.text_md) || "").length, n = Math.min(
1675
1681
  s.maxTypingMs,
1676
- Math.max(s.minTypingMs, a * s.msPerChar)
1677
- ), l = Math.max(
1678
- i + s.firstRevealDelayMs,
1682
+ Math.max(s.minTypingMs, i * s.msPerChar)
1683
+ ), o = Math.max(
1684
+ r + s.firstRevealDelayMs,
1679
1685
  this.nextRevealAt + s.pauseBetweenMs
1680
1686
  ) + n;
1681
- this.nextRevealAt = l;
1682
- const f = Math.max(0, l - i), k = e.id, y = setTimeout(() => {
1683
- this.revealedAt = { ...this.revealedAt, [k]: Date.now() }, this.revealTimers = this.revealTimers.filter((T) => T !== y), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1687
+ this.nextRevealAt = o;
1688
+ const f = Math.max(0, o - r), b = e.id, y = setTimeout(() => {
1689
+ this.revealedAt = { ...this.revealedAt, [b]: Date.now() }, this.revealTimers = this.revealTimers.filter((M) => M !== y), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1684
1690
  }, f);
1685
1691
  this.revealTimers.push(y);
1686
1692
  },
@@ -1690,28 +1696,28 @@ const yt = {
1690
1696
  // history (instant) and any live message that the transport
1691
1697
  // subscription already paced (idempotent on msg.id).
1692
1698
  paceMessages(e, t) {
1693
- var a;
1699
+ var i;
1694
1700
  if (!Array.isArray(e) || !e.length) return;
1695
- const s = Date.now(), i = { ...this.revealedAt };
1701
+ const s = Date.now(), r = { ...this.revealedAt };
1696
1702
  for (const n of e) {
1697
- if ((n == null ? void 0 : n.id) == null || i[n.id] !== void 0) continue;
1703
+ if ((n == null ? void 0 : n.id) == null || r[n.id] !== void 0) continue;
1698
1704
  if (!he(n)) {
1699
- i[n.id] = s;
1705
+ r[n.id] = s;
1700
1706
  continue;
1701
1707
  }
1702
- const r = n != null && n.created_at ? Date.parse(n.created_at) : NaN;
1703
- if (!Number.isFinite(r) || r < this.convOpenedAt) {
1704
- i[n.id] = s;
1708
+ const a = n != null && n.created_at ? Date.parse(n.created_at) : NaN;
1709
+ if (!Number.isFinite(a) || a < this.convOpenedAt) {
1710
+ r[n.id] = s;
1705
1711
  continue;
1706
1712
  }
1707
- const l = typeof (n == null ? void 0 : n.text_md) == "string" && n.text_md.trim().length > 0, f = Array.isArray((a = n == null ? void 0 : n.payload) == null ? void 0 : a.attachments) && n.payload.attachments.length > 0;
1708
- if (!l && !f) {
1709
- i[n.id] = s;
1713
+ const o = typeof (n == null ? void 0 : n.text_md) == "string" && n.text_md.trim().length > 0, f = Array.isArray((i = n == null ? void 0 : n.payload) == null ? void 0 : i.attachments) && n.payload.attachments.length > 0;
1714
+ if (!o && !f) {
1715
+ r[n.id] = s;
1710
1716
  continue;
1711
1717
  }
1712
- i[n.id] = 0, this.scheduleReveal(n, t);
1718
+ r[n.id] = 0, this.scheduleReveal(n, t);
1713
1719
  }
1714
- this.revealedAt = i;
1720
+ this.revealedAt = r;
1715
1721
  },
1716
1722
  // Pace a single live message from any conversation. Called from the
1717
1723
  // transport 'message' subscription (live SSE arrival) and from the
@@ -1729,19 +1735,19 @@ const yt = {
1729
1735
  // silently. Both sides of the comparison are server timestamps, so
1730
1736
  // this is immune to client clock skew.
1731
1737
  paceLiveMessage(e, t) {
1732
- var l;
1738
+ var o;
1733
1739
  if (!(e != null && e.id) || this.revealedAt[e.id] !== void 0) return;
1734
1740
  if (!he(e)) {
1735
1741
  this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
1736
1742
  return;
1737
1743
  }
1738
- const s = typeof (e == null ? void 0 : e.text_md) == "string" && e.text_md.trim().length > 0, i = Array.isArray((l = e == null ? void 0 : e.payload) == null ? void 0 : l.attachments) && e.payload.attachments.length > 0;
1739
- if (!s && !i) {
1744
+ const s = typeof (e == null ? void 0 : e.text_md) == "string" && e.text_md.trim().length > 0, r = Array.isArray((o = e == null ? void 0 : e.payload) == null ? void 0 : o.attachments) && e.payload.attachments.length > 0;
1745
+ if (!s && !r) {
1740
1746
  this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
1741
1747
  return;
1742
1748
  }
1743
- const a = this._liveHwm[t], n = (e == null ? void 0 : e.created_at) || "";
1744
- if (n && (a === void 0 || n > a) && (this._liveHwm = { ...this._liveHwm, [t]: n }), !(a !== void 0 && n && n > a)) {
1749
+ const i = this._liveHwm[t], n = (e == null ? void 0 : e.created_at) || "";
1750
+ if (n && (i === void 0 || n > i) && (this._liveHwm = { ...this._liveHwm, [t]: n }), !(i !== void 0 && n && n > i)) {
1745
1751
  this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
1746
1752
  return;
1747
1753
  }
@@ -1807,16 +1813,16 @@ const yt = {
1807
1813
  // messages, or when the pointer is already at/ahead of the
1808
1814
  // candidate id.
1809
1815
  markConvRead(e) {
1810
- var n, r;
1816
+ var n, a;
1811
1817
  if (!(e != null && e.id) || e._draft || !this.store) return;
1812
- const t = ((r = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : r[e.id]) || [], s = At(t);
1818
+ const t = ((a = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : a[e.id]) || [], s = At(t);
1813
1819
  if (s == null) return;
1814
- const i = Y(e.last_read_message_id), a = Y(s);
1815
- a != null && (i != null && a <= i || (this._readMarkerPending = { convId: e.id, messageId: s }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
1816
- const l = this._readMarkerPending;
1817
- this._readMarkerPending = null, this._readMarkerTimer = null, l && this.store && this.store.markConversationRead(
1818
- l.convId,
1819
- l.messageId
1820
+ const r = Y(e.last_read_message_id), i = Y(s);
1821
+ i != null && (r != null && i <= r || (this._readMarkerPending = { convId: e.id, messageId: s }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
1822
+ const o = this._readMarkerPending;
1823
+ this._readMarkerPending = null, this._readMarkerTimer = null, o && this.store && this.store.markConversationRead(
1824
+ o.convId,
1825
+ o.messageId
1820
1826
  );
1821
1827
  }, kt))));
1822
1828
  }
@@ -1830,10 +1836,10 @@ function At(e) {
1830
1836
  }
1831
1837
  return null;
1832
1838
  }
1833
- const P = (e, t) => {
1839
+ const N = (e, t) => {
1834
1840
  const s = e.__vccOpts || e;
1835
- for (const [i, a] of t)
1836
- s[i] = a;
1841
+ for (const [r, i] of t)
1842
+ s[r] = i;
1837
1843
  return s;
1838
1844
  }, St = {
1839
1845
  name: "WmHumanAvatar",
@@ -1856,7 +1862,7 @@ const P = (e, t) => {
1856
1862
  }
1857
1863
  }
1858
1864
  }, Mt = ["src", "alt"];
1859
- function Tt(e, t, s, i, a, n) {
1865
+ function Tt(e, t, s, r, i, n) {
1860
1866
  return c(), d("div", {
1861
1867
  class: R(["wm-huav", { "wm-huav--tail": s.tail }]),
1862
1868
  style: z({
@@ -1876,7 +1882,7 @@ function Tt(e, t, s, i, a, n) {
1876
1882
  }, v(n.initials), 5))
1877
1883
  ], 6);
1878
1884
  }
1879
- const ve = /* @__PURE__ */ P(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
1885
+ const ve = /* @__PURE__ */ N(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
1880
1886
  name: "WmLauncher",
1881
1887
  components: { HumanAvatar: ve },
1882
1888
  inject: {
@@ -1902,24 +1908,24 @@ const ve = /* @__PURE__ */ P(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d
1902
1908
  return this.peeks.slice(0, xt).reverse();
1903
1909
  }
1904
1910
  }
1905
- }, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Et = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Dt = { class: "wm-peek__name" }, Ut = { class: "wm-peek__action" }, Nt = { class: "wm-peek__text" }, jt = ["onClick"], Ft = ["aria-label"], Ht = ["aria-label"];
1906
- function zt(e, t, s, i, a, n) {
1907
- const r = B("HumanAvatar");
1911
+ }, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Et = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Nt = { class: "wm-peek__name" }, Ut = { class: "wm-peek__action" }, Dt = { class: "wm-peek__text" }, jt = ["onClick"], Ft = ["aria-label"], Ht = ["aria-label"];
1912
+ function zt(e, t, s, r, i, n) {
1913
+ const a = B("HumanAvatar");
1908
1914
  return c(), d("div", {
1909
1915
  class: "wm-launcherWrap",
1910
- onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
1911
- onMouseleave: t[2] || (t[2] = (l) => e.$emit("hover", !1)),
1912
- onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
1913
- onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1916
+ onMouseenter: t[1] || (t[1] = (o) => e.$emit("hover", !0)),
1917
+ onMouseleave: t[2] || (t[2] = (o) => e.$emit("hover", !1)),
1918
+ onFocusin: t[3] || (t[3] = (o) => e.$emit("hover", !0)),
1919
+ onFocusout: t[4] || (t[4] = (o) => e.$emit("hover", !1))
1914
1920
  }, [
1915
- $(Ne, { name: "wm-peek" }, {
1921
+ K(De, { name: "wm-peek" }, {
1916
1922
  default: je(() => [
1917
1923
  n.visiblePeeks.length ? (c(), d("div", {
1918
1924
  key: 0,
1919
1925
  class: R(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
1920
1926
  }, [
1921
- (c(!0), d(I, null, j(n.visiblePeeks, (l, f) => (c(), d("div", {
1922
- key: l.convId,
1927
+ (c(!0), d(I, null, j(n.visiblePeeks, (o, f) => (c(), d("div", {
1928
+ key: o.convId,
1923
1929
  class: "wm-peek",
1924
1930
  style: z({
1925
1931
  "--depth": n.visiblePeeks.length - 1 - f,
@@ -1928,21 +1934,21 @@ function zt(e, t, s, i, a, n) {
1928
1934
  role: "button",
1929
1935
  tabindex: "0",
1930
1936
  "aria-label": n.t("launcher.openConversationWith", {
1931
- name: l.senderName || n.t("launcher.theAgent")
1937
+ name: o.senderName || n.t("launcher.theAgent")
1932
1938
  }),
1933
- onClick: (k) => e.$emit("open", l.convId),
1939
+ onClick: (b) => e.$emit("open", o.convId),
1934
1940
  onKeydown: [
1935
- ge(J((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
1936
- ge(J((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1941
+ ge(J((b) => e.$emit("open", o.convId), ["prevent"]), ["enter"]),
1942
+ ge(J((b) => e.$emit("open", o.convId), ["prevent"]), ["space"])
1937
1943
  ]
1938
1944
  }, [
1939
- o("button", {
1945
+ l("button", {
1940
1946
  type: "button",
1941
1947
  class: "wm-peek__close",
1942
1948
  "aria-label": n.t("launcher.dismiss"),
1943
- onClick: J((k) => e.$emit("dismiss", l.convId), ["stop"])
1949
+ onClick: J((b) => e.$emit("dismiss", o.convId), ["stop"])
1944
1950
  }, [...t[5] || (t[5] = [
1945
- o("svg", {
1951
+ l("svg", {
1946
1952
  width: "9",
1947
1953
  height: "9",
1948
1954
  viewBox: "0 0 24 24",
@@ -1953,45 +1959,45 @@ function zt(e, t, s, i, a, n) {
1953
1959
  "stroke-linejoin": "round",
1954
1960
  "aria-hidden": "true"
1955
1961
  }, [
1956
- o("path", { d: "M18 6L6 18M6 6l12 12" })
1962
+ l("path", { d: "M18 6L6 18M6 6l12 12" })
1957
1963
  ], -1)
1958
1964
  ])], 8, Lt),
1959
- o("div", It, [
1960
- $(r, {
1961
- name: l.senderName,
1962
- "avatar-url": l.senderAvatarUrl,
1965
+ l("div", It, [
1966
+ K(a, {
1967
+ name: o.senderName,
1968
+ "avatar-url": o.senderAvatarUrl,
1963
1969
  size: 34
1964
1970
  }, null, 8, ["name", "avatar-url"]),
1965
- l.count > 1 ? (c(), d("span", {
1971
+ o.count > 1 ? (c(), d("span", {
1966
1972
  key: 0,
1967
1973
  class: "wm-peek__avatarBadge",
1968
- "aria-label": n.t("launcher.unreadMessages", { count: l.count })
1969
- }, v(l.count > 9 ? "9+" : l.count), 9, Et)) : b("", !0)
1974
+ "aria-label": n.t("launcher.unreadMessages", { count: o.count })
1975
+ }, v(o.count > 9 ? "9+" : o.count), 9, Et)) : k("", !0)
1970
1976
  ]),
1971
- o("div", Bt, [
1972
- o("div", Pt, [
1973
- o("span", Dt, v(l.senderName || n.t("common.agent")), 1),
1974
- o("span", Ut, v(n.t("launcher.repliedToYou")), 1)
1977
+ l("div", Bt, [
1978
+ l("div", Pt, [
1979
+ l("span", Nt, v(o.senderName || n.t("common.agent")), 1),
1980
+ l("span", Ut, v(n.t("launcher.repliedToYou")), 1)
1975
1981
  ]),
1976
- o("p", Nt, v(l.preview), 1)
1982
+ l("p", Dt, v(o.preview), 1)
1977
1983
  ]),
1978
- o("button", {
1984
+ l("button", {
1979
1985
  type: "button",
1980
1986
  class: "wm-peek__open",
1981
- onClick: J((k) => e.$emit("open", l.convId), ["stop"])
1987
+ onClick: J((b) => e.$emit("open", o.convId), ["stop"])
1982
1988
  }, v(n.t("common.open")), 9, jt)
1983
1989
  ], 44, Rt))), 128))
1984
- ], 2)) : b("", !0)
1990
+ ], 2)) : k("", !0)
1985
1991
  ]),
1986
1992
  _: 1
1987
1993
  }),
1988
- o("button", {
1994
+ l("button", {
1989
1995
  type: "button",
1990
1996
  class: "wm-launcher",
1991
1997
  "aria-label": n.t("launcher.open"),
1992
- onClick: t[0] || (t[0] = (l) => e.$emit("open"))
1998
+ onClick: t[0] || (t[0] = (o) => e.$emit("open"))
1993
1999
  }, [
1994
- t[6] || (t[6] = o("svg", {
2000
+ t[6] || (t[6] = l("svg", {
1995
2001
  width: "20",
1996
2002
  height: "20",
1997
2003
  viewBox: "0 0 24 24",
@@ -2002,7 +2008,7 @@ function zt(e, t, s, i, a, n) {
2002
2008
  "stroke-linejoin": "round",
2003
2009
  "aria-hidden": "true"
2004
2010
  }, [
2005
- o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2011
+ l("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2006
2012
  ], -1)),
2007
2013
  s.unreadCount > 0 ? (c(), d("span", {
2008
2014
  key: 0,
@@ -2012,11 +2018,11 @@ function zt(e, t, s, i, a, n) {
2012
2018
  }) : n.t("launcher.unreadConversationsOne", {
2013
2019
  count: s.unreadCount
2014
2020
  })
2015
- }, v(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, Ht)) : b("", !0)
2021
+ }, v(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, Ht)) : k("", !0)
2016
2022
  ], 8, Ft)
2017
2023
  ], 32);
2018
2024
  }
2019
- const qt = /* @__PURE__ */ P(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
2025
+ const qt = /* @__PURE__ */ N(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
2020
2026
  name: "WmAIAvatar",
2021
2027
  props: {
2022
2028
  size: { type: Number, default: 26 },
@@ -2045,11 +2051,11 @@ const qt = /* @__PURE__ */ P(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc
2045
2051
  return Me(this.name);
2046
2052
  }
2047
2053
  }
2048
- }, $t = {
2054
+ }, Kt = {
2049
2055
  key: 0,
2050
2056
  class: "wm-aiav__pulse"
2051
- }, Kt = ["src", "alt"], Wt = ["width", "height"];
2052
- function Gt(e, t, s, i, a, n) {
2057
+ }, Wt = ["src", "alt"], $t = ["width", "height"];
2058
+ function Gt(e, t, s, r, i, n) {
2053
2059
  return c(), d("div", {
2054
2060
  class: R(["wm-aiav", { "wm-aiav--tail": s.tail }]),
2055
2061
  style: z({
@@ -2058,8 +2064,8 @@ function Gt(e, t, s, i, a, n) {
2058
2064
  "--wm-avr": s.size * 0.32 + "px"
2059
2065
  })
2060
2066
  }, [
2061
- s.pulse ? (c(), d("div", $t)) : b("", !0),
2062
- o("div", {
2067
+ s.pulse ? (c(), d("div", Kt)) : k("", !0),
2068
+ l("div", {
2063
2069
  class: R(["wm-aiav__inner", {
2064
2070
  "wm-aiav__inner--glow": s.pulse,
2065
2071
  "wm-aiav__inner--img": !!s.imageUrl,
@@ -2073,7 +2079,7 @@ function Gt(e, t, s, i, a, n) {
2073
2079
  key: 0,
2074
2080
  src: s.imageUrl,
2075
2081
  alt: s.name || ""
2076
- }, null, 8, Kt)) : n.initials ? (c(), d("span", {
2082
+ }, null, 8, Wt)) : n.initials ? (c(), d("span", {
2077
2083
  key: 1,
2078
2084
  style: z({ fontSize: s.size * 0.36 + "px" })
2079
2085
  }, v(n.initials), 5)) : (c(), d("svg", {
@@ -2084,30 +2090,30 @@ function Gt(e, t, s, i, a, n) {
2084
2090
  fill: "none",
2085
2091
  "aria-hidden": "true"
2086
2092
  }, [...t[0] || (t[0] = [
2087
- o("path", {
2093
+ l("path", {
2088
2094
  d: "M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",
2089
2095
  fill: "white",
2090
2096
  opacity: "0.92"
2091
2097
  }, null, -1),
2092
- o("circle", {
2098
+ l("circle", {
2093
2099
  cx: "19",
2094
2100
  cy: "5",
2095
2101
  r: "1.5",
2096
2102
  fill: "white",
2097
2103
  opacity: "0.55"
2098
2104
  }, null, -1),
2099
- o("circle", {
2105
+ l("circle", {
2100
2106
  cx: "5",
2101
2107
  cy: "18",
2102
2108
  r: "1",
2103
2109
  fill: "white",
2104
2110
  opacity: "0.38"
2105
2111
  }, null, -1)
2106
- ])], 8, Wt))
2112
+ ])], 8, $t))
2107
2113
  ], 6)
2108
2114
  ], 6);
2109
2115
  }
2110
- const oe = /* @__PURE__ */ P(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
2116
+ const oe = /* @__PURE__ */ N(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
2111
2117
  name: "WmTeamAvatars",
2112
2118
  props: {
2113
2119
  members: { type: Array, default: () => [] },
@@ -2136,32 +2142,32 @@ const oe = /* @__PURE__ */ P(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d
2136
2142
  key: 0,
2137
2143
  class: "wm-team__label"
2138
2144
  };
2139
- function en(e, t, s, i, a, n) {
2145
+ function en(e, t, s, r, i, n) {
2140
2146
  return n.visible ? (c(), d("div", Jt, [
2141
- o("div", {
2147
+ l("div", {
2142
2148
  class: "wm-team__stack",
2143
2149
  style: z({ width: n.stackWidth + "px" })
2144
2150
  }, [
2145
- (c(!0), d(I, null, j(s.members.slice(0, 3), (r, l) => (c(), d("div", {
2146
- key: l,
2151
+ (c(!0), d(I, null, j(s.members.slice(0, 3), (a, o) => (c(), d("div", {
2152
+ key: o,
2147
2153
  class: "wm-team__pill",
2148
2154
  style: z({
2149
- left: l * 13 + "px",
2150
- zIndex: 3 - l,
2151
- background: n.colorFor(r)
2155
+ left: o * 13 + "px",
2156
+ zIndex: 3 - o,
2157
+ background: n.colorFor(a)
2152
2158
  })
2153
2159
  }, [
2154
- r.avatar_url ? (c(), d("img", {
2160
+ a.avatar_url ? (c(), d("img", {
2155
2161
  key: 0,
2156
- src: r.avatar_url,
2157
- alt: r.name || ""
2158
- }, null, 8, Xt)) : (c(), d("span", Qt, v(n.initialsFor(r)), 1))
2162
+ src: a.avatar_url,
2163
+ alt: a.name || ""
2164
+ }, null, 8, Xt)) : (c(), d("span", Qt, v(n.initialsFor(a)), 1))
2159
2165
  ], 4))), 128))
2160
2166
  ], 4),
2161
- s.responseLabel ? (c(), d("span", Zt, v(s.responseLabel), 1)) : b("", !0)
2162
- ])) : b("", !0);
2167
+ s.responseLabel ? (c(), d("span", Zt, v(s.responseLabel), 1)) : k("", !0)
2168
+ ])) : k("", !0);
2163
2169
  }
2164
- const tn = /* @__PURE__ */ P(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
2170
+ const tn = /* @__PURE__ */ N(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
2165
2171
  name: "WmHeader",
2166
2172
  components: { AIAvatar: oe, TeamAvatars: tn },
2167
2173
  inject: {
@@ -2195,8 +2201,8 @@ const tn = /* @__PURE__ */ P(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
2195
2201
  const e = Array.isArray(this.teamMembers) ? this.teamMembers : [];
2196
2202
  if (e.length <= 3) return e;
2197
2203
  const t = (/* @__PURE__ */ new Date()).getHours() % e.length, s = [];
2198
- for (let i = 0; i < 3; i++)
2199
- s.push(e[(t + i) % e.length]);
2204
+ for (let r = 0; r < 3; r++)
2205
+ s.push(e[(t + r) % e.length]);
2200
2206
  return s;
2201
2207
  }
2202
2208
  }
@@ -2207,8 +2213,8 @@ const tn = /* @__PURE__ */ P(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
2207
2213
  key: 3,
2208
2214
  class: "wm-header__fill"
2209
2215
  }, un = { class: "wm-header__actions" }, hn = ["aria-label", "title"], mn = ["aria-label", "title"];
2210
- function fn(e, t, s, i, a, n) {
2211
- const r = B("AIAvatar"), l = B("TeamAvatars");
2216
+ function fn(e, t, s, r, i, n) {
2217
+ const a = B("AIAvatar"), o = B("TeamAvatars");
2212
2218
  return c(), d("div", sn, [
2213
2219
  s.showBack ? (c(), d("button", {
2214
2220
  key: 0,
@@ -2217,7 +2223,7 @@ function fn(e, t, s, i, a, n) {
2217
2223
  "aria-label": n.t("header.backToHome"),
2218
2224
  onClick: t[0] || (t[0] = (f) => e.$emit("back"))
2219
2225
  }, [...t[3] || (t[3] = [
2220
- o("svg", {
2226
+ l("svg", {
2221
2227
  width: "13",
2222
2228
  height: "13",
2223
2229
  viewBox: "0 0 24 24",
@@ -2228,27 +2234,27 @@ function fn(e, t, s, i, a, n) {
2228
2234
  "stroke-linejoin": "round",
2229
2235
  "aria-hidden": "true"
2230
2236
  }, [
2231
- o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2237
+ l("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2232
2238
  ], -1)
2233
2239
  ])], 8, rn)) : (c(), d("div", an)),
2234
2240
  s.showIdentity ? (c(), d(I, { key: 2 }, [
2235
- o("div", on, [
2236
- $(r, {
2241
+ l("div", on, [
2242
+ K(a, {
2237
2243
  size: 30,
2238
2244
  name: s.agentName,
2239
2245
  "image-url": s.agentAvatarUrl
2240
2246
  }, null, 8, ["name", "image-url"])
2241
2247
  ]),
2242
- o("div", ln, [
2243
- o("div", cn, v(s.title), 1)
2248
+ l("div", ln, [
2249
+ l("div", cn, v(s.title), 1)
2244
2250
  ]),
2245
- n.hasTeam ? (c(), D(l, {
2251
+ n.hasTeam ? (c(), P(o, {
2246
2252
  key: 0,
2247
2253
  members: n.displayedTeamMembers,
2248
2254
  "response-label": ""
2249
- }, null, 8, ["members"])) : b("", !0)
2255
+ }, null, 8, ["members"])) : k("", !0)
2250
2256
  ], 64)) : (c(), d("div", dn)),
2251
- o("div", un, [
2257
+ l("div", un, [
2252
2258
  s.showMore ? (c(), d("button", {
2253
2259
  key: 0,
2254
2260
  type: "button",
@@ -2257,30 +2263,30 @@ function fn(e, t, s, i, a, n) {
2257
2263
  title: n.t("header.moreOptions"),
2258
2264
  onClick: t[1] || (t[1] = (f) => e.$emit("more"))
2259
2265
  }, [...t[4] || (t[4] = [
2260
- o("svg", {
2266
+ l("svg", {
2261
2267
  width: "13",
2262
2268
  height: "13",
2263
2269
  viewBox: "0 0 24 24",
2264
2270
  fill: "currentColor",
2265
2271
  "aria-hidden": "true"
2266
2272
  }, [
2267
- o("circle", {
2273
+ l("circle", {
2268
2274
  cx: "12",
2269
2275
  cy: "5",
2270
2276
  r: "1.6"
2271
2277
  }),
2272
- o("circle", {
2278
+ l("circle", {
2273
2279
  cx: "12",
2274
2280
  cy: "12",
2275
2281
  r: "1.6"
2276
2282
  }),
2277
- o("circle", {
2283
+ l("circle", {
2278
2284
  cx: "12",
2279
2285
  cy: "19",
2280
2286
  r: "1.6"
2281
2287
  })
2282
2288
  ], -1)
2283
- ])], 10, hn)) : b("", !0),
2289
+ ])], 10, hn)) : k("", !0),
2284
2290
  s.showClose ? (c(), d("button", {
2285
2291
  key: 1,
2286
2292
  type: "button",
@@ -2289,7 +2295,7 @@ function fn(e, t, s, i, a, n) {
2289
2295
  title: n.t("header.closeWidget"),
2290
2296
  onClick: t[2] || (t[2] = (f) => e.$emit("close"))
2291
2297
  }, [...t[5] || (t[5] = [
2292
- o("svg", {
2298
+ l("svg", {
2293
2299
  width: "13",
2294
2300
  height: "13",
2295
2301
  viewBox: "0 0 24 24",
@@ -2300,13 +2306,13 @@ function fn(e, t, s, i, a, n) {
2300
2306
  "stroke-linejoin": "round",
2301
2307
  "aria-hidden": "true"
2302
2308
  }, [
2303
- o("path", { d: "M18 6L6 18M6 6l12 12" })
2309
+ l("path", { d: "M18 6L6 18M6 6l12 12" })
2304
2310
  ], -1)
2305
- ])], 8, mn)) : b("", !0)
2311
+ ])], 8, mn)) : k("", !0)
2306
2312
  ])
2307
2313
  ]);
2308
2314
  }
2309
- const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Pe = {
2315
+ const _n = /* @__PURE__ */ N(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Pe = {
2310
2316
  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",
2311
2317
  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",
2312
2318
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
@@ -2412,15 +2418,15 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2412
2418
  if (!e) return "";
2413
2419
  const t = new Date(e);
2414
2420
  if (Number.isNaN(t.getTime())) return "";
2415
- const s = ne(this.wmLocale()), i = /* @__PURE__ */ new Date();
2416
- if (t.toDateString() === i.toDateString())
2421
+ const s = ne(this.wmLocale()), r = /* @__PURE__ */ new Date();
2422
+ if (t.toDateString() === r.toDateString())
2417
2423
  return t.toLocaleTimeString(s, {
2418
2424
  hour: "2-digit",
2419
2425
  minute: "2-digit"
2420
2426
  });
2421
- if (i.getTime() - t.getTime() < 7 * 864e5) {
2422
- const r = t.toLocaleDateString(s, { weekday: "short" });
2423
- return r.charAt(0).toUpperCase() + r.slice(1);
2427
+ if (r.getTime() - t.getTime() < 7 * 864e5) {
2428
+ const a = t.toLocaleDateString(s, { weekday: "short" });
2429
+ return a.charAt(0).toUpperCase() + a.slice(1);
2424
2430
  }
2425
2431
  return t.toLocaleDateString(s, {
2426
2432
  day: "2-digit",
@@ -2440,7 +2446,7 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2440
2446
  }, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, In = {
2441
2447
  key: 0,
2442
2448
  class: "wm-onb__alert-time"
2443
- }, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Dn = { class: "wm-onb__btn-label" }, Un = ["onClick"], Nn = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], Fn = {
2449
+ }, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Nn = { class: "wm-onb__btn-label" }, Un = ["onClick"], Dn = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], Fn = {
2444
2450
  key: 1,
2445
2451
  width: "18",
2446
2452
  height: "18",
@@ -2463,7 +2469,7 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2463
2469
  "stroke-linecap": "round",
2464
2470
  "stroke-linejoin": "round",
2465
2471
  "aria-hidden": "true"
2466
- }, Vn = { class: "wm-onb__btn-icon" }, $n = {
2472
+ }, Vn = { class: "wm-onb__btn-icon" }, Kn = {
2467
2473
  width: "18",
2468
2474
  height: "18",
2469
2475
  viewBox: "0 0 24 24",
@@ -2473,12 +2479,12 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2473
2479
  "stroke-linecap": "round",
2474
2480
  "stroke-linejoin": "round",
2475
2481
  "aria-hidden": "true"
2476
- }, Kn = ["d"], Wn = { class: "wm-onb__btn-label" }, Gn = { class: "wm-onb__btn-count" };
2477
- function Yn(e, t, s, i, a, n) {
2478
- const r = B("AIAvatar");
2482
+ }, Wn = ["d"], $n = { class: "wm-onb__btn-label" }, Gn = { class: "wm-onb__btn-count" };
2483
+ function Yn(e, t, s, r, i, n) {
2484
+ const a = B("AIAvatar");
2479
2485
  return c(), d("div", pn, [
2480
- o("div", vn, [
2481
- t[2] || (t[2] = o("svg", {
2486
+ l("div", vn, [
2487
+ t[2] || (t[2] = l("svg", {
2482
2488
  class: "wm-onb__hero-deco",
2483
2489
  width: "180",
2484
2490
  height: "180",
@@ -2486,7 +2492,7 @@ function Yn(e, t, s, i, a, n) {
2486
2492
  fill: "none",
2487
2493
  "aria-hidden": "true"
2488
2494
  }, [
2489
- o("circle", {
2495
+ l("circle", {
2490
2496
  cx: "170",
2491
2497
  cy: "10",
2492
2498
  r: "105",
@@ -2495,7 +2501,7 @@ function Yn(e, t, s, i, a, n) {
2495
2501
  "stroke-dasharray": "1 5",
2496
2502
  opacity: "0.35"
2497
2503
  }),
2498
- o("circle", {
2504
+ l("circle", {
2499
2505
  cx: "170",
2500
2506
  cy: "10",
2501
2507
  r: "72",
@@ -2504,7 +2510,7 @@ function Yn(e, t, s, i, a, n) {
2504
2510
  "stroke-dasharray": "1 5",
2505
2511
  opacity: "0.5"
2506
2512
  }),
2507
- o("circle", {
2513
+ l("circle", {
2508
2514
  cx: "152",
2509
2515
  cy: "34",
2510
2516
  r: "2.5",
@@ -2512,27 +2518,27 @@ function Yn(e, t, s, i, a, n) {
2512
2518
  opacity: "0.65"
2513
2519
  })
2514
2520
  ], -1)),
2515
- $(r, {
2521
+ K(a, {
2516
2522
  size: 52,
2517
2523
  "image-url": s.defaultIconUrl
2518
2524
  }, null, 8, ["image-url"]),
2519
- o("div", yn, [
2520
- o("div", wn, v(n.heroTitle), 1),
2521
- o("div", bn, v(n.heroSub), 1)
2525
+ l("div", yn, [
2526
+ l("div", wn, v(n.heroTitle), 1),
2527
+ l("div", bn, v(n.heroSub), 1)
2522
2528
  ])
2523
2529
  ]),
2524
2530
  n.unreadThreads.length ? (c(), d("div", kn, [
2525
- (c(!0), d(I, null, j(n.unreadThreads, (l) => (c(), d("button", {
2526
- key: l.id,
2531
+ (c(!0), d(I, null, j(n.unreadThreads, (o) => (c(), d("button", {
2532
+ key: o.id,
2527
2533
  type: "button",
2528
2534
  class: "wm-onb__alert",
2529
- onClick: (f) => e.$emit("resume", l)
2535
+ onClick: (f) => e.$emit("resume", o)
2530
2536
  }, [
2531
- o("span", {
2532
- class: R(["wm-onb__alert-avatar", n.avatarWrapperClass(l)])
2537
+ l("span", {
2538
+ class: R(["wm-onb__alert-avatar", n.avatarWrapperClass(o)])
2533
2539
  }, [
2534
- n.isDefaultAvatar(l) ? (c(), d("span", An, [...t[3] || (t[3] = [
2535
- o("svg", {
2540
+ n.isDefaultAvatar(o) ? (c(), d("span", An, [...t[3] || (t[3] = [
2541
+ l("svg", {
2536
2542
  width: "20",
2537
2543
  height: "20",
2538
2544
  viewBox: "0 0 24 24",
@@ -2543,41 +2549,41 @@ function Yn(e, t, s, i, a, n) {
2543
2549
  "stroke-linejoin": "round",
2544
2550
  "aria-hidden": "true"
2545
2551
  }, [
2546
- o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2552
+ l("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2547
2553
  ], -1)
2548
- ])])) : (c(), D(Ae(n.avatarComponent(l)), Fe({
2554
+ ])])) : (c(), P(Ae(n.avatarComponent(o)), Fe({
2549
2555
  key: 1,
2550
2556
  ref_for: !0
2551
- }, n.avatarProps(l)), null, 16)),
2552
- o("span", {
2557
+ }, n.avatarProps(o)), null, 16)),
2558
+ l("span", {
2553
2559
  class: "wm-onb__alert-dot",
2554
2560
  "aria-label": n.t("onboarding.unread")
2555
2561
  }, null, 8, Sn)
2556
2562
  ], 2),
2557
- o("span", Mn, [
2558
- o("span", Tn, v(l.title), 1),
2559
- o("span", xn, [
2560
- n.senderLabel(l) ? (c(), d("span", On, v(n.senderLabel(l)) + " · ", 1)) : b("", !0),
2561
- o("span", {
2562
- innerHTML: n.renderPreview(l.preview)
2563
+ l("span", Mn, [
2564
+ l("span", Tn, v(o.title), 1),
2565
+ l("span", xn, [
2566
+ n.senderLabel(o) ? (c(), d("span", On, v(n.senderLabel(o)) + " · ", 1)) : k("", !0),
2567
+ l("span", {
2568
+ innerHTML: n.renderPreview(o.preview)
2563
2569
  }, null, 8, Rn)
2564
2570
  ])
2565
2571
  ]),
2566
- o("span", Ln, [
2567
- n.formatTs(l._ts) ? (c(), d("span", In, v(n.formatTs(l._ts)), 1)) : b("", !0),
2568
- o("span", En, v(n.t("onboarding.resume")), 1)
2572
+ l("span", Ln, [
2573
+ n.formatTs(o._ts) ? (c(), d("span", In, v(n.formatTs(o._ts)), 1)) : k("", !0),
2574
+ l("span", En, v(n.t("onboarding.resume")), 1)
2569
2575
  ])
2570
2576
  ], 8, Cn))), 128))
2571
- ])) : b("", !0),
2572
- o("div", Bn, [
2573
- o("button", {
2577
+ ])) : k("", !0),
2578
+ l("div", Bn, [
2579
+ l("button", {
2574
2580
  type: "button",
2575
2581
  class: "wm-onb__btn wm-onb__btn--start",
2576
2582
  disabled: s.busy,
2577
- onClick: t[0] || (t[0] = (l) => e.$emit("start"))
2583
+ onClick: t[0] || (t[0] = (o) => e.$emit("start"))
2578
2584
  }, [
2579
- t[4] || (t[4] = o("span", { class: "wm-onb__btn-icon" }, [
2580
- o("svg", {
2585
+ t[4] || (t[4] = l("span", { class: "wm-onb__btn-icon" }, [
2586
+ l("svg", {
2581
2587
  width: "18",
2582
2588
  height: "18",
2583
2589
  viewBox: "0 0 24 24",
@@ -2588,51 +2594,51 @@ function Yn(e, t, s, i, a, n) {
2588
2594
  "stroke-linejoin": "round",
2589
2595
  "aria-hidden": "true"
2590
2596
  }, [
2591
- o("path", { d: "M12 5v14M5 12h14" })
2597
+ l("path", { d: "M12 5v14M5 12h14" })
2592
2598
  ])
2593
2599
  ], -1)),
2594
- o("span", Dn, v(s.busy ? "…" : n.t("onboarding.start")), 1)
2600
+ l("span", Nn, v(s.busy ? "…" : n.t("onboarding.start")), 1)
2595
2601
  ], 8, Pn),
2596
- (c(!0), d(I, null, j(s.quickLinks, (l, f) => (c(), d("button", {
2602
+ (c(!0), d(I, null, j(s.quickLinks, (o, f) => (c(), d("button", {
2597
2603
  key: "ql-" + f,
2598
2604
  type: "button",
2599
2605
  class: "wm-onb__btn",
2600
- onClick: (k) => e.$emit("select", l)
2606
+ onClick: (b) => e.$emit("select", o)
2601
2607
  }, [
2602
- o("span", Nn, [
2603
- n.safeIconUrl(l) ? (c(), d("span", {
2608
+ l("span", Dn, [
2609
+ n.safeIconUrl(o) ? (c(), d("span", {
2604
2610
  key: 0,
2605
2611
  class: "wm-onb__btn-iconImg",
2606
- style: z(n.iconUrlStyle(l)),
2612
+ style: z(n.iconUrlStyle(o)),
2607
2613
  role: "img",
2608
- "aria-label": l.label || ""
2614
+ "aria-label": o.label || ""
2609
2615
  }, null, 12, jn)) : (c(), d("svg", Fn, [
2610
- o("path", {
2611
- d: n.iconPath(l.icon)
2616
+ l("path", {
2617
+ d: n.iconPath(o.icon)
2612
2618
  }, null, 8, Hn)
2613
2619
  ]))
2614
2620
  ]),
2615
- o("span", zn, v(l.label), 1),
2616
- n.isExternalLink(l) ? (c(), d("svg", qn, [...t[5] || (t[5] = [
2617
- o("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
2618
- ])])) : b("", !0)
2621
+ l("span", zn, v(o.label), 1),
2622
+ n.isExternalLink(o) ? (c(), d("svg", qn, [...t[5] || (t[5] = [
2623
+ l("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
2624
+ ])])) : k("", !0)
2619
2625
  ], 8, Un))), 128)),
2620
2626
  s.openThreads.length ? (c(), d("button", {
2621
2627
  key: 0,
2622
2628
  type: "button",
2623
2629
  class: "wm-onb__btn",
2624
- onClick: t[1] || (t[1] = (l) => e.$emit("view-history"))
2630
+ onClick: t[1] || (t[1] = (o) => e.$emit("view-history"))
2625
2631
  }, [
2626
- o("span", Vn, [
2627
- (c(), d("svg", $n, [
2628
- o("path", {
2632
+ l("span", Vn, [
2633
+ (c(), d("svg", Kn, [
2634
+ l("path", {
2629
2635
  d: n.iconPath("chat")
2630
- }, null, 8, Kn)
2636
+ }, null, 8, Wn)
2631
2637
  ]))
2632
2638
  ]),
2633
- o("span", Wn, v(n.t("onboarding.allConversations")), 1),
2634
- o("span", Gn, v(s.openThreads.length), 1),
2635
- t[6] || (t[6] = o("svg", {
2639
+ l("span", $n, v(n.t("onboarding.allConversations")), 1),
2640
+ l("span", Gn, v(s.openThreads.length), 1),
2641
+ t[6] || (t[6] = l("svg", {
2636
2642
  class: "wm-onb__btn-trail",
2637
2643
  width: "13",
2638
2644
  height: "13",
@@ -2644,13 +2650,13 @@ function Yn(e, t, s, i, a, n) {
2644
2650
  "stroke-linejoin": "round",
2645
2651
  "aria-hidden": "true"
2646
2652
  }, [
2647
- o("path", { d: "M9 18l6-6-6-6" })
2653
+ l("path", { d: "M9 18l6-6-6-6" })
2648
2654
  ], -1))
2649
- ])) : b("", !0)
2655
+ ])) : k("", !0)
2650
2656
  ])
2651
2657
  ]);
2652
2658
  }
2653
- const Jn = /* @__PURE__ */ P(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe"]]), Xn = {
2659
+ const Jn = /* @__PURE__ */ N(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe"]]), Xn = {
2654
2660
  name: "WmHistory",
2655
2661
  components: { AIAvatar: oe, HumanAvatar: ve },
2656
2662
  inject: {
@@ -2703,15 +2709,15 @@ const Jn = /* @__PURE__ */ P(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
2703
2709
  if (!e) return "";
2704
2710
  const t = new Date(e);
2705
2711
  if (Number.isNaN(t.getTime())) return "";
2706
- const s = ne(this.wmLocale()), i = /* @__PURE__ */ new Date();
2707
- if (t.toDateString() === i.toDateString())
2712
+ const s = ne(this.wmLocale()), r = /* @__PURE__ */ new Date();
2713
+ if (t.toDateString() === r.toDateString())
2708
2714
  return t.toLocaleTimeString(s, {
2709
2715
  hour: "2-digit",
2710
2716
  minute: "2-digit"
2711
2717
  });
2712
- if (i.getTime() - t.getTime() < 7 * 864e5) {
2713
- const r = t.toLocaleDateString(s, { weekday: "short" });
2714
- return r.charAt(0).toUpperCase() + r.slice(1);
2718
+ if (r.getTime() - t.getTime() < 7 * 864e5) {
2719
+ const a = t.toLocaleDateString(s, { weekday: "short" });
2720
+ return a.charAt(0).toUpperCase() + a.slice(1);
2715
2721
  }
2716
2722
  return t.toLocaleDateString(s, {
2717
2723
  day: "2-digit",
@@ -2729,11 +2735,11 @@ const Jn = /* @__PURE__ */ P(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
2729
2735
  key: 0,
2730
2736
  class: "wm-hist__empty"
2731
2737
  };
2732
- function us(e, t, s, i, a, n) {
2738
+ function us(e, t, s, r, i, n) {
2733
2739
  return c(), d("div", Qn, [
2734
- o("div", Zn, [
2735
- t[1] || (t[1] = o("span", { class: "wm-hist__searchIcon" }, [
2736
- o("svg", {
2740
+ l("div", Zn, [
2741
+ t[1] || (t[1] = l("span", { class: "wm-hist__searchIcon" }, [
2742
+ l("svg", {
2737
2743
  width: "13",
2738
2744
  height: "13",
2739
2745
  viewBox: "0 0 24 24",
@@ -2744,30 +2750,30 @@ function us(e, t, s, i, a, n) {
2744
2750
  "stroke-linejoin": "round",
2745
2751
  "aria-hidden": "true"
2746
2752
  }, [
2747
- o("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2753
+ l("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2748
2754
  ])
2749
2755
  ], -1)),
2750
- G(o("input", {
2751
- "onUpdate:modelValue": t[0] || (t[0] = (r) => a.query = r),
2756
+ G(l("input", {
2757
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => i.query = a),
2752
2758
  type: "text",
2753
2759
  placeholder: n.t("onboarding.search"),
2754
2760
  "aria-label": n.t("onboarding.search")
2755
2761
  }, null, 8, es), [
2756
- [te, a.query]
2762
+ [te, i.query]
2757
2763
  ])
2758
2764
  ]),
2759
- o("div", ts, [
2760
- (c(!0), d(I, null, j(n.filteredThreads, (r) => (c(), d("button", {
2761
- key: r.id,
2765
+ l("div", ts, [
2766
+ (c(!0), d(I, null, j(n.filteredThreads, (a) => (c(), d("button", {
2767
+ key: a.id,
2762
2768
  type: "button",
2763
- class: R(["wm-hist__thread", { "wm-hist__thread--unread": r.unread }]),
2764
- onClick: (l) => e.$emit("resume", r)
2769
+ class: R(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
2770
+ onClick: (o) => e.$emit("resume", a)
2765
2771
  }, [
2766
- o("span", {
2767
- class: R(["wm-hist__thread-avatar", n.avatarWrapperClass(r)])
2772
+ l("span", {
2773
+ class: R(["wm-hist__thread-avatar", n.avatarWrapperClass(a)])
2768
2774
  }, [
2769
- n.isDefaultAvatar(r) ? (c(), d("span", ss, [...t[2] || (t[2] = [
2770
- o("svg", {
2775
+ n.isDefaultAvatar(a) ? (c(), d("span", ss, [...t[2] || (t[2] = [
2776
+ l("svg", {
2771
2777
  width: "18",
2772
2778
  height: "18",
2773
2779
  viewBox: "0 0 24 24",
@@ -2778,28 +2784,28 @@ function us(e, t, s, i, a, n) {
2778
2784
  "stroke-linejoin": "round",
2779
2785
  "aria-hidden": "true"
2780
2786
  }, [
2781
- o("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
2787
+ l("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
2782
2788
  ], -1)
2783
- ])])) : (c(), D(Ae(n.avatarComponent(r)), Fe({
2789
+ ])])) : (c(), P(Ae(n.avatarComponent(a)), Fe({
2784
2790
  key: 1,
2785
2791
  ref_for: !0
2786
- }, n.avatarProps(r)), null, 16)),
2787
- r.unread ? (c(), d("span", {
2792
+ }, n.avatarProps(a)), null, 16)),
2793
+ a.unread ? (c(), d("span", {
2788
2794
  key: 2,
2789
2795
  class: "wm-hist__thread-dot",
2790
2796
  "aria-label": n.t("onboarding.unread")
2791
- }, null, 8, rs)) : b("", !0)
2797
+ }, null, 8, rs)) : k("", !0)
2792
2798
  ], 2),
2793
- o("span", is, [
2794
- o("span", as, v(r.title), 1),
2795
- o("span", {
2799
+ l("span", is, [
2800
+ l("span", as, v(a.title), 1),
2801
+ l("span", {
2796
2802
  class: "wm-hist__thread-preview",
2797
- innerHTML: n.renderPreview(r.preview)
2803
+ innerHTML: n.renderPreview(a.preview)
2798
2804
  }, null, 8, os)
2799
2805
  ]),
2800
- o("span", ls, [
2801
- n.formatTs(r._ts) ? (c(), d("span", cs, v(n.formatTs(r._ts)), 1)) : b("", !0),
2802
- t[3] || (t[3] = o("svg", {
2806
+ l("span", ls, [
2807
+ n.formatTs(a._ts) ? (c(), d("span", cs, v(n.formatTs(a._ts)), 1)) : k("", !0),
2808
+ t[3] || (t[3] = l("svg", {
2803
2809
  width: "14",
2804
2810
  height: "14",
2805
2811
  viewBox: "0 0 24 24",
@@ -2811,15 +2817,15 @@ function us(e, t, s, i, a, n) {
2811
2817
  class: "wm-hist__thread-chev",
2812
2818
  "aria-hidden": "true"
2813
2819
  }, [
2814
- o("path", { d: "M5 12h14M13 5l7 7-7 7" })
2820
+ l("path", { d: "M5 12h14M13 5l7 7-7 7" })
2815
2821
  ], -1))
2816
2822
  ])
2817
2823
  ], 10, ns))), 128)),
2818
- n.filteredThreads.length ? b("", !0) : (c(), d("div", ds, v(a.query ? n.t("onboarding.noResults", { query: a.query }) : n.t("onboarding.noConversations")), 1))
2824
+ n.filteredThreads.length ? k("", !0) : (c(), d("div", ds, v(i.query ? n.t("onboarding.noResults", { query: i.query }) : n.t("onboarding.noConversations")), 1))
2819
2825
  ])
2820
2826
  ]);
2821
2827
  }
2822
- const hs = /* @__PURE__ */ P(Xn, [["render", us], ["__scopeId", "data-v-6bf35ef1"]]);
2828
+ const hs = /* @__PURE__ */ N(Xn, [["render", us], ["__scopeId", "data-v-6bf35ef1"]]);
2823
2829
  function ms(e) {
2824
2830
  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();
2825
2831
  }
@@ -2880,31 +2886,31 @@ const fs = {
2880
2886
  "stroke-linecap": "round",
2881
2887
  "stroke-linejoin": "round"
2882
2888
  }, ws = { class: "wm-result__body" }, bs = { class: "wm-result__label" }, ks = { class: "wm-result__detail" };
2883
- function Cs(e, t, s, i, a, n) {
2889
+ function Cs(e, t, s, r, i, n) {
2884
2890
  return c(), d("div", {
2885
2891
  class: R(["wm-result", `wm-result--${s.state}`])
2886
2892
  }, [
2887
- o("span", _s, [
2893
+ l("span", _s, [
2888
2894
  s.state === "success" ? (c(), d("svg", gs, [...t[0] || (t[0] = [
2889
- o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2895
+ l("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2890
2896
  ])])) : s.state === "rejected" ? (c(), d("svg", ps, [...t[1] || (t[1] = [
2891
- o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2897
+ l("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2892
2898
  ])])) : s.state === "awaiting" ? (c(), d("svg", vs, [...t[2] || (t[2] = [
2893
- o("circle", {
2899
+ l("circle", {
2894
2900
  cx: "12",
2895
2901
  cy: "12",
2896
2902
  r: "10"
2897
2903
  }, null, -1),
2898
- o("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2904
+ l("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2899
2905
  ])])) : (c(), d("svg", ys, [...t[3] || (t[3] = [
2900
- 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),
2901
- o("line", {
2906
+ l("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),
2907
+ l("line", {
2902
2908
  x1: "12",
2903
2909
  y1: "9",
2904
2910
  x2: "12",
2905
2911
  y2: "13"
2906
2912
  }, null, -1),
2907
- o("line", {
2913
+ l("line", {
2908
2914
  x1: "12",
2909
2915
  y1: "17",
2910
2916
  x2: "12.01",
@@ -2912,19 +2918,19 @@ function Cs(e, t, s, i, a, n) {
2912
2918
  }, null, -1)
2913
2919
  ])]))
2914
2920
  ]),
2915
- o("span", ws, [
2916
- o("span", bs, v(s.label), 1),
2921
+ l("span", ws, [
2922
+ l("span", bs, v(s.label), 1),
2917
2923
  n.detailText ? (c(), d(I, { key: 0 }, [
2918
- t[4] || (t[4] = o("span", {
2924
+ t[4] || (t[4] = l("span", {
2919
2925
  class: "wm-result__sep",
2920
2926
  "aria-hidden": "true"
2921
2927
  }, " · ", -1)),
2922
- o("span", ks, v(n.detailText), 1)
2923
- ], 64)) : b("", !0)
2928
+ l("span", ks, v(n.detailText), 1)
2929
+ ], 64)) : k("", !0)
2924
2930
  ])
2925
2931
  ], 2);
2926
2932
  }
2927
- const As = /* @__PURE__ */ P(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0"]]), Ss = {
2933
+ const As = /* @__PURE__ */ N(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0"]]), Ss = {
2928
2934
  name: "WmArtifactFormResponse",
2929
2935
  inject: {
2930
2936
  // Translator shared by the Messenger shell; French fallback when
@@ -2941,12 +2947,12 @@ const As = /* @__PURE__ */ P(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0
2941
2947
  }
2942
2948
  }
2943
2949
  }, Ms = { class: "wm-art wm-art--formResponse" }, Ts = { class: "wm-art__head" }, xs = { class: "wm-art__title" }, Os = { class: "wm-art__badge wm-art__badge--success" }, Rs = { class: "wm-art__body" }, Ls = { class: "wm-art__fieldLabel" };
2944
- function Is(e, t, s, i, a, n) {
2950
+ function Is(e, t, s, r, i, n) {
2945
2951
  return c(), d("div", Ms, [
2946
- o("div", Ts, [
2947
- o("div", xs, v(s.data.title || n.t("form.title")), 1),
2948
- o("span", Os, [
2949
- t[0] || (t[0] = o("svg", {
2952
+ l("div", Ts, [
2953
+ l("div", xs, v(s.data.title || n.t("form.title")), 1),
2954
+ l("span", Os, [
2955
+ t[0] || (t[0] = l("svg", {
2950
2956
  width: "11",
2951
2957
  height: "11",
2952
2958
  viewBox: "0 0 24 24",
@@ -2957,28 +2963,28 @@ function Is(e, t, s, i, a, n) {
2957
2963
  "stroke-linejoin": "round",
2958
2964
  "aria-hidden": "true"
2959
2965
  }, [
2960
- o("polyline", { points: "20 6 9 17 4 12" })
2966
+ l("polyline", { points: "20 6 9 17 4 12" })
2961
2967
  ], -1)),
2962
2968
  Se(" " + v(n.t("form.sent")), 1)
2963
2969
  ])
2964
2970
  ]),
2965
- o("div", Rs, [
2966
- (c(!0), d(I, null, j(n.fields, (r, l) => (c(), d("div", {
2967
- key: l,
2971
+ l("div", Rs, [
2972
+ (c(!0), d(I, null, j(n.fields, (a, o) => (c(), d("div", {
2973
+ key: o,
2968
2974
  class: "wm-art__field"
2969
2975
  }, [
2970
- o("div", Ls, v(r.label), 1),
2971
- o("div", {
2976
+ l("div", Ls, v(a.label), 1),
2977
+ l("div", {
2972
2978
  class: R([
2973
2979
  "wm-art__fieldValue",
2974
- { "wm-art__fieldValue--multi": r.multiline }
2980
+ { "wm-art__fieldValue--multi": a.multiline }
2975
2981
  ])
2976
- }, v(r.value), 3)
2982
+ }, v(a.value), 3)
2977
2983
  ]))), 128))
2978
2984
  ])
2979
2985
  ]);
2980
2986
  }
2981
- const Es = /* @__PURE__ */ P(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1"]]), Bs = {
2987
+ const Es = /* @__PURE__ */ N(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1"]]), Bs = {
2982
2988
  name: "WmArtifactInfoCard",
2983
2989
  props: {
2984
2990
  data: { type: Object, required: !0 }
@@ -2993,10 +2999,10 @@ const Es = /* @__PURE__ */ P(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1
2993
2999
  return !!((e = this.data) != null && e.body) || this.fields.length > 0;
2994
3000
  }
2995
3001
  }
2996
- }, Ps = { class: "wm-art wm-art--infoCard" }, Ds = {
3002
+ }, Ps = { class: "wm-art wm-art--infoCard" }, Ns = {
2997
3003
  key: 0,
2998
3004
  class: "wm-art__image"
2999
- }, Us = ["src", "alt"], Ns = { class: "wm-art__head" }, js = { class: "wm-art__headMain" }, Fs = { class: "wm-art__title" }, Hs = {
3005
+ }, Us = ["src", "alt"], Ds = { class: "wm-art__head" }, js = { class: "wm-art__headMain" }, Fs = { class: "wm-art__title" }, Hs = {
3000
3006
  key: 0,
3001
3007
  class: "wm-art__subtitle"
3002
3008
  }, zs = {
@@ -3006,19 +3012,19 @@ const Es = /* @__PURE__ */ P(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1
3006
3012
  key: 0,
3007
3013
  class: "wm-art__text"
3008
3014
  }, Vs = { class: "wm-art__fieldLabel" };
3009
- function $s(e, t, s, i, a, n) {
3015
+ function Ks(e, t, s, r, i, n) {
3010
3016
  return c(), d("div", Ps, [
3011
- s.data.image_url ? (c(), d("figure", Ds, [
3012
- o("img", {
3017
+ s.data.image_url ? (c(), d("figure", Ns, [
3018
+ l("img", {
3013
3019
  src: s.data.image_url,
3014
3020
  alt: s.data.title || "",
3015
3021
  loading: "lazy"
3016
3022
  }, null, 8, Us)
3017
- ])) : b("", !0),
3018
- o("div", Ns, [
3019
- o("div", js, [
3020
- o("div", Fs, v(s.data.title), 1),
3021
- s.data.subtitle ? (c(), d("div", Hs, v(s.data.subtitle), 1)) : b("", !0)
3023
+ ])) : k("", !0),
3024
+ l("div", Ds, [
3025
+ l("div", js, [
3026
+ l("div", Fs, v(s.data.title), 1),
3027
+ s.data.subtitle ? (c(), d("div", Hs, v(s.data.subtitle), 1)) : k("", !0)
3022
3028
  ]),
3023
3029
  s.data.badge && s.data.badge.label ? (c(), d("span", {
3024
3030
  key: 0,
@@ -3026,39 +3032,39 @@ function $s(e, t, s, i, a, n) {
3026
3032
  "wm-art__badge",
3027
3033
  `wm-art__badge--${s.data.badge.tone || "neutral"}`
3028
3034
  ])
3029
- }, v(s.data.badge.label), 3)) : b("", !0)
3035
+ }, v(s.data.badge.label), 3)) : k("", !0)
3030
3036
  ]),
3031
3037
  n.hasBody ? (c(), d("div", zs, [
3032
- s.data.body ? (c(), d("div", qs, v(s.data.body), 1)) : b("", !0),
3033
- n.fields.length ? (c(!0), d(I, { key: 1 }, j(n.fields, (r, l) => (c(), d("div", {
3034
- key: l,
3038
+ s.data.body ? (c(), d("div", qs, v(s.data.body), 1)) : k("", !0),
3039
+ n.fields.length ? (c(!0), d(I, { key: 1 }, j(n.fields, (a, o) => (c(), d("div", {
3040
+ key: o,
3035
3041
  class: "wm-art__field"
3036
3042
  }, [
3037
- o("div", Vs, v(r.label), 1),
3038
- o("div", {
3043
+ l("div", Vs, v(a.label), 1),
3044
+ l("div", {
3039
3045
  class: R([
3040
3046
  "wm-art__fieldValue",
3041
- { "wm-art__fieldValue--multi": r.multiline }
3047
+ { "wm-art__fieldValue--multi": a.multiline }
3042
3048
  ])
3043
- }, v(r.value), 3)
3044
- ]))), 128)) : b("", !0)
3045
- ])) : b("", !0)
3049
+ }, v(a.value), 3)
3050
+ ]))), 128)) : k("", !0)
3051
+ ])) : k("", !0)
3046
3052
  ]);
3047
3053
  }
3048
- const Ks = /* @__PURE__ */ P(Bs, [["render", $s], ["__scopeId", "data-v-7eae0e4a"]]);
3049
- function Ws(e, t, s) {
3054
+ const Ws = /* @__PURE__ */ N(Bs, [["render", Ks], ["__scopeId", "data-v-7eae0e4a"]]);
3055
+ function $s(e, t, s) {
3050
3056
  if (!e) return "";
3051
- const i = new Date(e);
3052
- if (Number.isNaN(i.getTime())) return e;
3053
- const a = i.toLocaleDateString(t, {
3057
+ const r = new Date(e);
3058
+ if (Number.isNaN(r.getTime())) return e;
3059
+ const i = r.toLocaleDateString(t, {
3054
3060
  day: "numeric",
3055
3061
  month: "long",
3056
3062
  year: "numeric"
3057
- }), n = i.toLocaleTimeString(t, {
3063
+ }), n = r.toLocaleTimeString(t, {
3058
3064
  hour: "2-digit",
3059
3065
  minute: "2-digit"
3060
3066
  });
3061
- return `${a}${s}${n}`;
3067
+ return `${i}${s}${n}`;
3062
3068
  }
3063
3069
  const Gs = {
3064
3070
  name: "WmArtifactTicket",
@@ -3078,7 +3084,7 @@ const Gs = {
3078
3084
  },
3079
3085
  formattedDate() {
3080
3086
  var e;
3081
- return Ws(
3087
+ return $s(
3082
3088
  (e = this.data) == null ? void 0 : e.created_at,
3083
3089
  ne(this.wmLocale()),
3084
3090
  this.t("ticket.dateAt")
@@ -3128,13 +3134,13 @@ const Gs = {
3128
3134
  key: 1,
3129
3135
  class: "wm-art__footer wm-tk__footer"
3130
3136
  };
3131
- function ar(e, t, s, i, a, n) {
3137
+ function ar(e, t, s, r, i, n) {
3132
3138
  return c(), d("div", Ys, [
3133
- o("div", Js, [
3134
- o("div", Xs, v(s.data.title), 1),
3135
- o("div", Qs, [
3136
- o("div", Zs, [
3137
- t[0] || (t[0] = o("svg", {
3139
+ l("div", Js, [
3140
+ l("div", Xs, v(s.data.title), 1),
3141
+ l("div", Qs, [
3142
+ l("div", Zs, [
3143
+ t[0] || (t[0] = l("svg", {
3138
3144
  width: "11",
3139
3145
  height: "11",
3140
3146
  viewBox: "0 0 24 24",
@@ -3145,85 +3151,85 @@ function ar(e, t, s, i, a, n) {
3145
3151
  "stroke-linejoin": "round",
3146
3152
  "aria-hidden": "true"
3147
3153
  }, [
3148
- o("path", { d: "M20 12a2 2 0 0 1 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v4a2 2 0 0 1 0 4v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 1-2-2z" }),
3149
- o("path", { d: "M13 5v2M13 17v2M13 11v2" })
3154
+ l("path", { d: "M20 12a2 2 0 0 1 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v4a2 2 0 0 1 0 4v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 1-2-2z" }),
3155
+ l("path", { d: "M13 5v2M13 17v2M13 11v2" })
3150
3156
  ], -1)),
3151
- o("span", null, v(s.data.reference), 1)
3157
+ l("span", null, v(s.data.reference), 1)
3152
3158
  ]),
3153
- o("span", {
3159
+ l("span", {
3154
3160
  class: R([
3155
3161
  "wm-art__badge",
3156
3162
  "wm-tk__badge",
3157
3163
  `wm-art__badge--${s.data.status.tone || "neutral"}`
3158
3164
  ])
3159
3165
  }, [
3160
- t[1] || (t[1] = o("span", {
3166
+ t[1] || (t[1] = l("span", {
3161
3167
  class: "wm-tk__dot",
3162
3168
  "aria-hidden": "true"
3163
3169
  }, null, -1)),
3164
3170
  Se(" " + v(s.data.status.label), 1)
3165
3171
  ], 2)
3166
3172
  ]),
3167
- s.data.body ? (c(), d("div", er, v(s.data.body), 1)) : b("", !0)
3173
+ s.data.body ? (c(), d("div", er, v(s.data.body), 1)) : k("", !0)
3168
3174
  ]),
3169
3175
  n.fields.length ? (c(), d("div", tr, [
3170
- (c(!0), d(I, null, j(n.fields, (r, l) => (c(), d("div", {
3171
- key: l,
3176
+ (c(!0), d(I, null, j(n.fields, (a, o) => (c(), d("div", {
3177
+ key: o,
3172
3178
  class: "wm-art__field"
3173
3179
  }, [
3174
- o("div", nr, v(r.label), 1),
3175
- o("div", {
3180
+ l("div", nr, v(a.label), 1),
3181
+ l("div", {
3176
3182
  class: R([
3177
3183
  "wm-art__fieldValue",
3178
- { "wm-art__fieldValue--multi": r.multiline }
3184
+ { "wm-art__fieldValue--multi": a.multiline }
3179
3185
  ])
3180
3186
  }, [
3181
- n.isPriority(r.label) ? (c(), d("svg", {
3187
+ n.isPriority(a.label) ? (c(), d("svg", {
3182
3188
  key: 0,
3183
3189
  class: "wm-tk__prio",
3184
- "data-level": n.priorityLevel(r.value),
3190
+ "data-level": n.priorityLevel(a.value),
3185
3191
  width: "12",
3186
3192
  height: "12",
3187
3193
  viewBox: "0 0 12 12",
3188
3194
  "aria-hidden": "true"
3189
3195
  }, [...t[2] || (t[2] = [
3190
- o("rect", {
3196
+ l("rect", {
3191
3197
  x: "1",
3192
3198
  y: "8",
3193
3199
  width: "2",
3194
3200
  height: "3",
3195
3201
  rx: "0.5"
3196
3202
  }, null, -1),
3197
- o("rect", {
3203
+ l("rect", {
3198
3204
  x: "5",
3199
3205
  y: "5",
3200
3206
  width: "2",
3201
3207
  height: "6",
3202
3208
  rx: "0.5"
3203
3209
  }, null, -1),
3204
- o("rect", {
3210
+ l("rect", {
3205
3211
  x: "9",
3206
3212
  y: "2",
3207
3213
  width: "2",
3208
3214
  height: "9",
3209
3215
  rx: "0.5"
3210
3216
  }, null, -1)
3211
- ])], 8, sr)) : n.isDate(r.label) ? (c(), d("svg", rr, [...t[3] || (t[3] = [
3212
- o("rect", {
3217
+ ])], 8, sr)) : n.isDate(a.label) ? (c(), d("svg", rr, [...t[3] || (t[3] = [
3218
+ l("rect", {
3213
3219
  x: "3",
3214
3220
  y: "4",
3215
3221
  width: "18",
3216
3222
  height: "18",
3217
3223
  rx: "2"
3218
3224
  }, null, -1),
3219
- o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
3220
- ])])) : b("", !0),
3221
- o("span", null, v(r.value), 1)
3225
+ l("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
3226
+ ])])) : k("", !0),
3227
+ l("span", null, v(a.value), 1)
3222
3228
  ], 2)
3223
3229
  ]))), 128))
3224
- ])) : b("", !0),
3230
+ ])) : k("", !0),
3225
3231
  s.data.created_at ? (c(), d("div", ir, [
3226
- t[4] || (t[4] = o("svg", {
3232
+ t[4] || (t[4] = l("svg", {
3227
3233
  width: "11",
3228
3234
  height: "11",
3229
3235
  viewBox: "0 0 24 24",
@@ -3234,22 +3240,22 @@ function ar(e, t, s, i, a, n) {
3234
3240
  "stroke-linejoin": "round",
3235
3241
  "aria-hidden": "true"
3236
3242
  }, [
3237
- o("rect", {
3243
+ l("rect", {
3238
3244
  x: "3",
3239
3245
  y: "4",
3240
3246
  width: "18",
3241
3247
  height: "18",
3242
3248
  rx: "2"
3243
3249
  }),
3244
- o("path", { d: "M16 2v4M8 2v4M3 10h18" })
3250
+ l("path", { d: "M16 2v4M8 2v4M3 10h18" })
3245
3251
  ], -1)),
3246
- o("span", null, v(n.formattedDate), 1)
3247
- ])) : b("", !0)
3252
+ l("span", null, v(n.formattedDate), 1)
3253
+ ])) : k("", !0)
3248
3254
  ]);
3249
3255
  }
3250
- const or = /* @__PURE__ */ P(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
3256
+ const or = /* @__PURE__ */ N(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
3251
3257
  form_response: Es,
3252
- info_card: Ks,
3258
+ info_card: Ws,
3253
3259
  ticket: or
3254
3260
  }, cr = {
3255
3261
  name: "WmArtifactRenderer",
@@ -3266,13 +3272,13 @@ const or = /* @__PURE__ */ P(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914
3266
3272
  }
3267
3273
  }
3268
3274
  };
3269
- function dr(e, t, s, i, a, n) {
3270
- return n.component ? (c(), D(Ae(n.component), {
3275
+ function dr(e, t, s, r, i, n) {
3276
+ return n.component ? (c(), P(Ae(n.component), {
3271
3277
  key: 0,
3272
3278
  data: s.artifact.data
3273
- }, null, 8, ["data"])) : b("", !0);
3279
+ }, null, 8, ["data"])) : k("", !0);
3274
3280
  }
3275
- const ur = /* @__PURE__ */ P(cr, [["render", dr]]), hr = {
3281
+ const ur = /* @__PURE__ */ N(cr, [["render", dr]]), hr = {
3276
3282
  name: "WmAttachmentPreview",
3277
3283
  inject: {
3278
3284
  signAttachmentFn: { default: null },
@@ -3288,10 +3294,10 @@ const ur = /* @__PURE__ */ P(cr, [["render", dr]]), hr = {
3288
3294
  },
3289
3295
  computed: {
3290
3296
  kind() {
3291
- var s, i;
3297
+ var s, r;
3292
3298
  const e = (s = this.attachment) == null ? void 0 : s.type;
3293
3299
  if (e) return e;
3294
- const t = (((i = this.attachment) == null ? void 0 : i.mime_type) || "").toLowerCase();
3300
+ const t = (((r = this.attachment) == null ? void 0 : r.mime_type) || "").toLowerCase();
3295
3301
  return t.startsWith("image/") ? "image" : t.startsWith("audio/") ? "audio" : t.startsWith("video/") ? "video" : "file";
3296
3302
  },
3297
3303
  displayName() {
@@ -3348,30 +3354,30 @@ const ur = /* @__PURE__ */ P(cr, [["render", dr]]), hr = {
3348
3354
  class: "wm-att__spin",
3349
3355
  "aria-hidden": "true"
3350
3356
  };
3351
- function kr(e, t, s, i, a, n) {
3357
+ function kr(e, t, s, r, i, n) {
3352
3358
  return c(), d("div", {
3353
3359
  class: R(["wm-att", ["wm-att--" + (n.kind || "file")]])
3354
3360
  }, [
3355
- n.kind === "image" && a.url ? (c(), d("a", {
3361
+ n.kind === "image" && i.url ? (c(), d("a", {
3356
3362
  key: 0,
3357
3363
  href: n.safeHref,
3358
3364
  target: "_blank",
3359
3365
  rel: "noopener",
3360
3366
  class: "wm-att__imgWrap"
3361
3367
  }, [
3362
- o("img", {
3363
- src: a.url,
3368
+ l("img", {
3369
+ src: i.url,
3364
3370
  alt: n.displayName,
3365
3371
  loading: "lazy"
3366
3372
  }, null, 8, fr)
3367
- ], 8, mr)) : n.kind === "audio" && a.url ? (c(), d("audio", {
3373
+ ], 8, mr)) : n.kind === "audio" && i.url ? (c(), d("audio", {
3368
3374
  key: 1,
3369
- src: a.url,
3375
+ src: i.url,
3370
3376
  controls: "",
3371
3377
  preload: "metadata"
3372
- }, null, 8, _r)) : n.kind === "video" && a.url ? (c(), d("video", {
3378
+ }, null, 8, _r)) : n.kind === "video" && i.url ? (c(), d("video", {
3373
3379
  key: 2,
3374
- src: a.url,
3380
+ src: i.url,
3375
3381
  controls: "",
3376
3382
  playsinline: "",
3377
3383
  preload: "auto"
@@ -3382,10 +3388,10 @@ function kr(e, t, s, i, a, n) {
3382
3388
  download: n.displayName,
3383
3389
  target: "_blank",
3384
3390
  rel: "noopener",
3385
- onClick: t[0] || (t[0] = (...r) => n.onFileClick && n.onFileClick(...r))
3391
+ onClick: t[0] || (t[0] = (...a) => n.onFileClick && n.onFileClick(...a))
3386
3392
  }, [
3387
- t[1] || (t[1] = o("span", { class: "wm-att__icon" }, [
3388
- o("svg", {
3393
+ t[1] || (t[1] = l("span", { class: "wm-att__icon" }, [
3394
+ l("svg", {
3389
3395
  width: "14",
3390
3396
  height: "14",
3391
3397
  viewBox: "0 0 24 24",
@@ -3396,19 +3402,19 @@ function kr(e, t, s, i, a, n) {
3396
3402
  "stroke-linejoin": "round",
3397
3403
  "aria-hidden": "true"
3398
3404
  }, [
3399
- o("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
3400
- o("path", { d: "M14 2v6h6" })
3405
+ l("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
3406
+ l("path", { d: "M14 2v6h6" })
3401
3407
  ])
3402
3408
  ], -1)),
3403
- o("span", vr, [
3404
- o("span", yr, v(n.displayName), 1),
3405
- n.sizeLabel ? (c(), d("span", wr, v(n.sizeLabel), 1)) : b("", !0)
3409
+ l("span", vr, [
3410
+ l("span", yr, v(n.displayName), 1),
3411
+ n.sizeLabel ? (c(), d("span", wr, v(n.sizeLabel), 1)) : k("", !0)
3406
3412
  ]),
3407
- a.loading ? (c(), d("span", br)) : b("", !0)
3413
+ i.loading ? (c(), d("span", br)) : k("", !0)
3408
3414
  ], 8, pr))
3409
3415
  ], 2);
3410
3416
  }
3411
- const Cr = /* @__PURE__ */ P(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd"]]), Ar = {
3417
+ const Cr = /* @__PURE__ */ N(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd"]]), Ar = {
3412
3418
  name: "WmBubble",
3413
3419
  props: {
3414
3420
  role: { type: String, default: "ai" },
@@ -3421,24 +3427,24 @@ const Cr = /* @__PURE__ */ P(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd
3421
3427
  }
3422
3428
  }
3423
3429
  }, Sr = ["innerHTML"];
3424
- function Mr(e, t, s, i, a, n) {
3430
+ function Mr(e, t, s, r, i, n) {
3425
3431
  return c(), d("div", {
3426
3432
  class: R(["wm-bubble", "wm-bubble--" + s.role])
3427
3433
  }, [
3428
- Ke(e.$slots, "default", {}, () => [
3429
- o("span", { innerHTML: n.rendered }, null, 8, Sr)
3434
+ We(e.$slots, "default", {}, () => [
3435
+ l("span", { innerHTML: n.rendered }, null, 8, Sr)
3430
3436
  ], !0)
3431
3437
  ], 2);
3432
3438
  }
3433
- const Tr = /* @__PURE__ */ P(Ar, [["render", Mr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Or = { class: "wm-typing" };
3434
- function Rr(e, t, s, i, a, n) {
3439
+ const Tr = /* @__PURE__ */ N(Ar, [["render", Mr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Or = { class: "wm-typing" };
3440
+ function Rr(e, t, s, r, i, n) {
3435
3441
  return c(), d("div", Or, [...t[0] || (t[0] = [
3436
- o("span", { style: { "animation-delay": "0s" } }, null, -1),
3437
- o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3438
- o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3442
+ l("span", { style: { "animation-delay": "0s" } }, null, -1),
3443
+ l("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3444
+ l("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3439
3445
  ])]);
3440
3446
  }
3441
- const Lr = /* @__PURE__ */ P(xr, [["render", Rr], ["__scopeId", "data-v-df2447fd"]]);
3447
+ const Lr = /* @__PURE__ */ N(xr, [["render", Rr], ["__scopeId", "data-v-df2447fd"]]);
3442
3448
  function ee(e) {
3443
3449
  return e ? e.client_msg_id || e.id : "";
3444
3450
  }
@@ -3447,6 +3453,7 @@ const Ir = {
3447
3453
  assigned: "system.assigned",
3448
3454
  unassigned: "system.unassigned",
3449
3455
  resolved: "system.resolved",
3456
+ closed: "system.closed",
3450
3457
  reopened: "system.reopened",
3451
3458
  idle: "system.idle"
3452
3459
  }, Er = 80, Br = 200, Pr = {
@@ -3527,61 +3534,62 @@ const Ir = {
3527
3534
  return !this.hasMore && !this.loadingMore && this.messages.length >= 20;
3528
3535
  },
3529
3536
  groups() {
3530
- var s, i, a, n;
3537
+ var s, r, i, n, a;
3531
3538
  const e = [];
3532
- for (const r of this.messages) {
3533
- const l = this.roleOf(r);
3534
- if (l === "system") {
3535
- if (((s = r == null ? void 0 : r.payload) == null ? void 0 : s.event) === "action_admin_pending") {
3536
- const y = e[e.length - 1];
3537
- y && y.role === "ai" ? y.messages.push(r) : e.push({
3538
- key: `g-${ee(r)}`,
3539
+ for (const o of this.messages) {
3540
+ if ((s = o == null ? void 0 : o.metadata) != null && s.resolution_request) continue;
3541
+ const f = this.roleOf(o);
3542
+ if (f === "system") {
3543
+ if (((r = o == null ? void 0 : o.payload) == null ? void 0 : r.event) === "action_admin_pending") {
3544
+ const M = e[e.length - 1];
3545
+ M && M.role === "ai" ? M.messages.push(o) : e.push({
3546
+ key: `g-${ee(o)}`,
3539
3547
  role: "ai",
3540
3548
  agentName: "",
3541
3549
  agentAvatarUrl: null,
3542
- messages: [r],
3550
+ messages: [o],
3543
3551
  items: []
3544
3552
  });
3545
3553
  continue;
3546
3554
  }
3547
3555
  e.push({
3548
- key: `sys-${ee(r)}`,
3549
- role: l,
3550
- messages: [r],
3556
+ key: `sys-${ee(o)}`,
3557
+ role: f,
3558
+ messages: [o],
3551
3559
  items: [],
3552
- systemLabel: this.systemLabel(r)
3560
+ systemLabel: this.systemLabel(o)
3553
3561
  });
3554
3562
  continue;
3555
3563
  }
3556
- const f = e[e.length - 1];
3557
- f && f.role === l && (l === "ai" || f.agentName === (((i = r == null ? void 0 : r.author) == null ? void 0 : i.name) || "")) ? f.messages.push(r) : e.push({
3558
- key: `g-${ee(r)}`,
3559
- role: l,
3560
- agentName: ((a = r == null ? void 0 : r.author) == null ? void 0 : a.name) || "",
3561
- agentAvatarUrl: ((n = r == null ? void 0 : r.author) == null ? void 0 : n.avatar_url) || null,
3562
- messages: [r],
3564
+ const b = e[e.length - 1];
3565
+ b && b.role === f && (f === "ai" || b.agentName === (((i = o == null ? void 0 : o.author) == null ? void 0 : i.name) || "")) ? b.messages.push(o) : e.push({
3566
+ key: `g-${ee(o)}`,
3567
+ role: f,
3568
+ agentName: ((n = o == null ? void 0 : o.author) == null ? void 0 : n.name) || "",
3569
+ agentAvatarUrl: ((a = o == null ? void 0 : o.author) == null ? void 0 : a.avatar_url) || null,
3570
+ messages: [o],
3563
3571
  items: []
3564
3572
  });
3565
3573
  }
3566
- for (const r of e) {
3567
- if (r.role === "system") continue;
3568
- const l = [];
3569
- for (const f of r.messages)
3570
- for (const k of this.itemsOf(f)) l.push(k);
3571
- r.items = l;
3574
+ for (const o of e) {
3575
+ if (o.role === "system") continue;
3576
+ const f = [];
3577
+ for (const b of o.messages)
3578
+ for (const y of this.itemsOf(b)) f.push(y);
3579
+ o.items = f;
3572
3580
  }
3573
3581
  const t = [];
3574
- for (const r of e) {
3575
- if (r.role !== "system" && !r.items.length) continue;
3576
- const l = t[t.length - 1];
3577
- if (l && l.role !== "system" && l.role === r.role && (r.role === "ai" || l.agentName === r.agentName)) {
3578
- l.messages.push(...r.messages), l.items.push(...r.items);
3582
+ for (const o of e) {
3583
+ if (o.role !== "system" && !o.items.length) continue;
3584
+ const f = t[t.length - 1];
3585
+ if (f && f.role !== "system" && f.role === o.role && (o.role === "ai" || f.agentName === o.agentName)) {
3586
+ f.messages.push(...o.messages), f.items.push(...o.items);
3579
3587
  continue;
3580
3588
  }
3581
- t.push(r);
3589
+ t.push(o);
3582
3590
  }
3583
- for (const r of t)
3584
- r.role !== "system" && (r.key = this.stableGroupKey(r.messages));
3591
+ for (const o of t)
3592
+ o.role !== "system" && (o.key = this.stableGroupKey(o.messages));
3585
3593
  return t;
3586
3594
  },
3587
3595
  // Key of the first non-user group that starts after the unread
@@ -3592,10 +3600,10 @@ const Ir = {
3592
3600
  const e = this.unreadAnchorId, t = this.unreadBoundaryTs;
3593
3601
  for (const s of this.groups) {
3594
3602
  if (s.role === "user" || s.role === "system" || !s.items.length) continue;
3595
- const i = s.messages[0];
3596
- if (!i) continue;
3597
- const a = Y(i.id);
3598
- if (a != null && !(a <= e) && !(t && i.created_at && i.created_at > t))
3603
+ const r = s.messages[0];
3604
+ if (!r) continue;
3605
+ const i = Y(r.id);
3606
+ if (i != null && !(i <= e) && !(t && r.created_at && r.created_at > t))
3599
3607
  return s.key;
3600
3608
  }
3601
3609
  return null;
@@ -3633,17 +3641,17 @@ const Ir = {
3633
3641
  this._groupIdByMsgKey || (this._groupIdByMsgKey = /* @__PURE__ */ new Map(), this._groupIdCounter = 0);
3634
3642
  const t = this._groupIdByMsgKey;
3635
3643
  let s = null;
3636
- for (const i of e) {
3637
- const a = ee(i);
3638
- if (a && t.has(a)) {
3639
- s = t.get(a);
3644
+ for (const r of e) {
3645
+ const i = ee(r);
3646
+ if (i && t.has(i)) {
3647
+ s = t.get(i);
3640
3648
  break;
3641
3649
  }
3642
3650
  }
3643
3651
  s == null && (s = ++this._groupIdCounter);
3644
- for (const i of e) {
3645
- const a = ee(i);
3646
- a && t.set(a, s);
3652
+ for (const r of e) {
3653
+ const i = ee(r);
3654
+ i && t.set(i, s);
3647
3655
  }
3648
3656
  return `g-${s}`;
3649
3657
  },
@@ -3681,32 +3689,32 @@ const Ir = {
3681
3689
  const t = this._lastSeenConvId !== this.conversationId;
3682
3690
  this._lastSeenConvId = this.conversationId;
3683
3691
  const s = this.isAtBottom(e);
3684
- let i = null;
3692
+ let r = null;
3685
3693
  if (!t && !s) {
3686
3694
  const n = this.pickAnchor(e);
3687
3695
  if (n != null && n.rowKey) {
3688
- const r = this.findRowByKey(e, n.rowKey);
3689
- if (r) {
3690
- const l = e.getBoundingClientRect().top;
3691
- i = {
3696
+ const a = this.findRowByKey(e, n.rowKey);
3697
+ if (a) {
3698
+ const o = e.getBoundingClientRect().top;
3699
+ r = {
3692
3700
  rowKey: n.rowKey,
3693
- relY: r.getBoundingClientRect().top - l
3701
+ relY: a.getBoundingClientRect().top - o
3694
3702
  };
3695
3703
  }
3696
3704
  }
3697
3705
  }
3698
- const a = { forceBottom: t, wasPinned: s, anchor: i };
3699
- this._scrollSnap = a, this.$nextTick(() => {
3700
- if (this._scrollSnap = null, a.forceBottom || a.wasPinned) {
3706
+ const i = { forceBottom: t, wasPinned: s, anchor: r };
3707
+ this._scrollSnap = i, this.$nextTick(() => {
3708
+ if (this._scrollSnap = null, i.forceBottom || i.wasPinned) {
3701
3709
  e.scrollTop = e.scrollHeight;
3702
3710
  return;
3703
3711
  }
3704
- if (!a.anchor) return;
3712
+ if (!i.anchor) return;
3705
3713
  const n = () => {
3706
- const r = a.anchor, l = this.findRowByKey(e, r.rowKey);
3707
- if (!l) return;
3708
- const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top - r.relY;
3709
- Math.abs(k) > 0.5 && (e.scrollTop += k);
3714
+ const a = i.anchor, o = this.findRowByKey(e, a.rowKey);
3715
+ if (!o) return;
3716
+ const b = o.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
3717
+ Math.abs(b) > 0.5 && (e.scrollTop += b);
3710
3718
  };
3711
3719
  n(), requestAnimationFrame(() => {
3712
3720
  n(), requestAnimationFrame(n);
@@ -3737,11 +3745,11 @@ const Ir = {
3737
3745
  // very-top-of-scroll edge case the same way the old logic did.
3738
3746
  pickAnchor(e) {
3739
3747
  const t = e.getBoundingClientRect().top, s = e.querySelectorAll(".wm-list__row[data-row-key]");
3740
- let i = null;
3741
- for (const a of s)
3742
- if (i || (i = a), a.getBoundingClientRect().bottom >= t)
3743
- return { rowKey: a.dataset.rowKey };
3744
- return i ? { rowKey: i.dataset.rowKey } : null;
3748
+ let r = null;
3749
+ for (const i of s)
3750
+ if (r || (r = i), i.getBoundingClientRect().bottom >= t)
3751
+ return { rowKey: i.dataset.rowKey };
3752
+ return r ? { rowKey: r.dataset.rowKey } : null;
3745
3753
  },
3746
3754
  findRowByKey(e, t) {
3747
3755
  if (!t) return null;
@@ -3751,10 +3759,10 @@ const Ir = {
3751
3759
  );
3752
3760
  },
3753
3761
  roleOf(e) {
3754
- var s, i;
3762
+ var s, r;
3755
3763
  if ((e == null ? void 0 : e.type) === "system" || ((s = e == null ? void 0 : e.payload) == null ? void 0 : s.type) === "system")
3756
3764
  return "system";
3757
- const t = (i = e == null ? void 0 : e.author) == null ? void 0 : i.type;
3765
+ const t = (r = e == null ? void 0 : e.author) == null ? void 0 : r.type;
3758
3766
  return t === "user" ? "user" : t === "agent_human" ? "human" : "ai";
3759
3767
  },
3760
3768
  roleLabel(e) {
@@ -3853,9 +3861,9 @@ const Ir = {
3853
3861
  // doit garder son arrondi.
3854
3862
  cornersFor(e, t) {
3855
3863
  var Q, se, re;
3856
- const s = e.items, i = (Q = s[t]) == null ? void 0 : Q.kind, a = (se = s[t - 1]) == null ? void 0 : se.kind, n = (re = s[t + 1]) == null ? void 0 : re.kind, r = e.role === "user", l = 14, f = 4, k = a == null ? void 0 : a.bottom, y = n == null ? void 0 : n.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, M = (W, ie, X) => W != null && T != null ? W + q >= T : ie === X || ie === "card" && X === "bubble";
3857
- let U = l, N = l, L = l, K = l;
3858
- return r ? (k && (N = f), (y || !n) && (L = f), k && M(E, k, i == null ? void 0 : i.top) && (U = f), y && M(A, y, i == null ? void 0 : i.bottom) && (K = f)) : (k && (U = f), (y || !n) && (K = f), k && M(E, k, i == null ? void 0 : i.top) && (N = f), y && M(A, y, i == null ? void 0 : i.bottom) && (L = f)), { tl: U, tr: N, br: L, bl: K };
3864
+ const s = e.items, r = (Q = s[t]) == null ? void 0 : Q.kind, i = (se = s[t - 1]) == null ? void 0 : se.kind, n = (re = s[t + 1]) == null ? void 0 : re.kind, a = e.role === "user", o = 14, f = 4, b = i == null ? void 0 : i.bottom, y = n == null ? void 0 : n.top, M = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, T = ($, ie, X) => $ != null && M != null ? $ + q >= M : ie === X || ie === "card" && X === "bubble";
3865
+ let U = o, D = o, L = o, W = o;
3866
+ return a ? (b && (D = f), (y || !n) && (L = f), b && T(E, b, r == null ? void 0 : r.top) && (U = f), y && T(A, y, r == null ? void 0 : r.bottom) && (W = f)) : (b && (U = f), (y || !n) && (W = f), b && T(E, b, r == null ? void 0 : r.top) && (D = f), y && T(A, y, r == null ? void 0 : r.bottom) && (L = f)), { tl: U, tr: D, br: L, bl: W };
3859
3867
  },
3860
3868
  // Inline column-count for the mosaic grid, capped at 4. Single
3861
3869
  // attachment falls back to the vertical-list layout (null). Two
@@ -3878,8 +3886,8 @@ const Ir = {
3878
3886
  // corners of every top-row cell flatten too.
3879
3887
  mosaicCornerStyle(e, t, s) {
3880
3888
  if (!t || t < 2) return null;
3881
- const i = Math.min(t, 4), a = Math.floor(e / i), n = e % i, r = n > 0, l = n < i - 1 && e + 1 < t, f = a > 0, k = e + i < t, y = "4px", T = {};
3882
- return (r || f) && (T["--wm-r-tl"] = y), (l || f) && (T["--wm-r-tr"] = y), (r || k) && (T["--wm-r-bl"] = y), (l || k) && (T["--wm-r-br"] = y), s && (T["--wm-r-tl"] = y, T["--wm-r-tr"] = y), Object.keys(T).length ? T : null;
3889
+ const r = Math.min(t, 4), i = Math.floor(e / r), n = e % r, a = n > 0, o = n < r - 1 && e + 1 < t, f = i > 0, b = e + r < t, y = "4px", M = {};
3890
+ return (a || f) && (M["--wm-r-tl"] = y), (o || f) && (M["--wm-r-tr"] = y), (a || b) && (M["--wm-r-bl"] = y), (o || b) && (M["--wm-r-br"] = y), s && (M["--wm-r-tl"] = y, M["--wm-r-tr"] = y), Object.keys(M).length ? M : null;
3883
3891
  },
3884
3892
  // Inline style emitting the four corner CSS variables. Set on
3885
3893
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3898,8 +3906,8 @@ const Ir = {
3898
3906
  // Clé unique par item de cluster, alignée avec `:key` /
3899
3907
  // `data-row-key` du template. Sert d'index dans `widthByKey`.
3900
3908
  rowKeyOf(e, t) {
3901
- var i;
3902
- const s = (i = e == null ? void 0 : e.items) == null ? void 0 : i[t];
3909
+ var r;
3910
+ const s = (r = e == null ? void 0 : e.items) == null ? void 0 : r[t];
3903
3911
  return s ? `${ee(s.message)}-${s.partKey}` : "";
3904
3912
  },
3905
3913
  // rAF-debouncé : `updated()` peut être appelé en rafale (stream,
@@ -3920,20 +3928,20 @@ const Ir = {
3920
3928
  for (const n of e.querySelectorAll(
3921
3929
  ".wm-list__row[data-row-key]"
3922
3930
  )) {
3923
- const r = n.dataset.rowKey;
3924
- if (!r) continue;
3925
- const l = n.querySelector(
3931
+ const a = n.dataset.rowKey;
3932
+ if (!a) continue;
3933
+ const o = n.querySelector(
3926
3934
  ".wm-bubble, .wm-result, .wm-art, .wm-list__body"
3927
3935
  );
3928
- if (!l) continue;
3929
- const f = l.getBoundingClientRect().width;
3930
- f > 0 && (t[r] = f);
3936
+ if (!o) continue;
3937
+ const f = o.getBoundingClientRect().width;
3938
+ f > 0 && (t[a] = f);
3931
3939
  }
3932
- const s = this.widthByKey, i = Object.keys(s), a = Object.keys(t);
3933
- if (i.length === a.length) {
3940
+ const s = this.widthByKey, r = Object.keys(s), i = Object.keys(t);
3941
+ if (r.length === i.length) {
3934
3942
  let n = !0;
3935
- for (const r of a)
3936
- if (Math.abs((s[r] ?? 0) - t[r]) > 0.5) {
3943
+ for (const a of i)
3944
+ if (Math.abs((s[a] ?? 0) - t[a]) > 0.5) {
3937
3945
  n = !1;
3938
3946
  break;
3939
3947
  }
@@ -4003,27 +4011,27 @@ const Ir = {
4003
4011
  return ((t = e == null ? void 0 : e.payload) == null ? void 0 : t.name) || (e == null ? void 0 : e.text_md) || this.t("common.action");
4004
4012
  },
4005
4013
  actionDetail(e) {
4006
- var s, i, a, n, r, l, f, k;
4014
+ var s, r, i, n, a, o, f, b;
4007
4015
  const t = e == null ? void 0 : e.payload;
4008
4016
  if (!t) return "";
4009
4017
  if (t.state === "success")
4010
- return ((s = t.success) == null ? void 0 : s.summary) || ((a = (i = t.success) == null ? void 0 : i.metadata) == null ? void 0 : a.description) || "";
4018
+ return ((s = t.success) == null ? void 0 : s.summary) || ((i = (r = t.success) == null ? void 0 : r.metadata) == null ? void 0 : i.description) || "";
4011
4019
  if (t.state === "rejected") {
4012
4020
  if ((n = t.rejected) != null && n.reason) return t.rejected.reason;
4013
- const y = (l = (r = t.rejected) == null ? void 0 : r.metadata) == null ? void 0 : l.resolution, T = typeof y == "string" && y.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
4014
- return this.t(T);
4021
+ const y = (o = (a = t.rejected) == null ? void 0 : a.metadata) == null ? void 0 : o.resolution, M = typeof y == "string" && y.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
4022
+ return this.t(M);
4015
4023
  }
4016
- return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((k = t.failure) == null ? void 0 : k.error)) || "";
4024
+ return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((b = t.failure) == null ? void 0 : b.error)) || "";
4017
4025
  },
4018
4026
  actionArtifact(e) {
4019
- var s, i;
4020
- const t = (i = (s = e == null ? void 0 : e.payload) == null ? void 0 : s.success) == null ? void 0 : i.artifact;
4027
+ var s, r;
4028
+ const t = (r = (s = e == null ? void 0 : e.payload) == null ? void 0 : s.success) == null ? void 0 : r.artifact;
4021
4029
  return !t || typeof t != "object" || typeof t.kind != "string" ? null : t;
4022
4030
  },
4023
4031
  systemLabel(e) {
4024
- var a, n, r;
4025
- const t = (a = e == null ? void 0 : e.payload) == null ? void 0 : a.event, s = Ir[t], i = ((n = e == null ? void 0 : e.metadata) == null ? void 0 : n.agent_name) || ((r = e == null ? void 0 : e.author) == null ? void 0 : r.name) || this.t("messageList.anAgent");
4026
- return s ? this.t(s, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
4032
+ var i, n, a;
4033
+ const t = (i = e == null ? void 0 : e.payload) == null ? void 0 : i.event, s = Ir[t], r = ((n = e == null ? void 0 : e.metadata) == null ? void 0 : n.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
4034
+ return s ? this.t(s, { name: r }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
4027
4035
  },
4028
4036
  scrollToBottom() {
4029
4037
  const e = this.$refs.scrollEl;
@@ -4037,12 +4045,12 @@ const Ir = {
4037
4045
  e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
4038
4046
  }
4039
4047
  }
4040
- }, Dr = { class: "wm-list__wrap" }, Ur = {
4048
+ }, Nr = { class: "wm-list__wrap" }, Ur = {
4041
4049
  key: 0,
4042
4050
  class: "wm-list__loadMore",
4043
4051
  role: "status",
4044
4052
  "aria-live": "polite"
4045
- }, Nr = { class: "wm-list__loadMore-lbl" }, jr = {
4053
+ }, Dr = { class: "wm-list__loadMore-lbl" }, jr = {
4046
4054
  key: 1,
4047
4055
  class: "wm-list__historyEnd"
4048
4056
  }, Fr = {
@@ -4054,7 +4062,7 @@ const Ir = {
4054
4062
  }, qr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Vr = {
4055
4063
  key: 0,
4056
4064
  class: "wm-list__sysep"
4057
- }, $r = { class: "wm-list__sysep-label" }, Kr = ["data-row-key", "onPointerdown"], Wr = {
4065
+ }, Kr = { class: "wm-list__sysep-label" }, Wr = ["data-row-key", "onPointerdown"], $r = {
4058
4066
  key: 0,
4059
4067
  class: "wm-list__avatarSlot"
4060
4068
  }, Gr = { key: 0 }, Yr = {
@@ -4067,170 +4075,170 @@ const Ir = {
4067
4075
  key: 3,
4068
4076
  class: "wm-list__row wm-list__row--ai fade-up"
4069
4077
  }, ti = { class: "wm-list__avatarSlot" }, ni = ["aria-label", "title"];
4070
- function si(e, t, s, i, a, n) {
4071
- const r = B("AIAvatar"), l = B("HumanAvatar"), f = B("ActionResult"), k = B("ArtifactRenderer"), y = B("Bubble"), T = B("AttachmentPreview"), E = B("Typing");
4072
- return c(), d("div", Dr, [
4073
- o("div", {
4078
+ function si(e, t, s, r, i, n) {
4079
+ const a = B("AIAvatar"), o = B("HumanAvatar"), f = B("ActionResult"), b = B("ArtifactRenderer"), y = B("Bubble"), M = B("AttachmentPreview"), E = B("Typing");
4080
+ return c(), d("div", Nr, [
4081
+ l("div", {
4074
4082
  ref: "scrollEl",
4075
- class: R(["wm-list", { "wm-list--silent": a.silentFades }]),
4083
+ class: R(["wm-list", { "wm-list--silent": i.silentFades }]),
4076
4084
  onScrollPassive: t[4] || (t[4] = (...A) => n.onScroll && n.onScroll(...A))
4077
4085
  }, [
4078
4086
  s.loadingMore ? (c(), d("div", Ur, [
4079
- t[6] || (t[6] = o("span", {
4087
+ t[6] || (t[6] = l("span", {
4080
4088
  class: "wm-list__loadMore-spinner",
4081
4089
  "aria-hidden": "true"
4082
4090
  }, null, -1)),
4083
- o("span", Nr, v(n.t("messageList.loadingHistory")), 1)
4084
- ])) : n.historyExhausted ? (c(), d("div", jr, v(n.t("messageList.conversationStart")), 1)) : b("", !0),
4091
+ l("span", Dr, v(n.t("messageList.loadingHistory")), 1)
4092
+ ])) : n.historyExhausted ? (c(), d("div", jr, v(n.t("messageList.conversationStart")), 1)) : k("", !0),
4085
4093
  s.dateLabel ? (c(), d("div", Fr, [
4086
- t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
4087
- o("span", Hr, v(s.dateLabel), 1),
4088
- t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
4089
- ])) : b("", !0),
4094
+ t[7] || (t[7] = l("div", { class: "wm-list__line" }, null, -1)),
4095
+ l("span", Hr, v(s.dateLabel), 1),
4096
+ t[8] || (t[8] = l("div", { class: "wm-list__line" }, null, -1))
4097
+ ])) : k("", !0),
4090
4098
  (c(!0), d(I, null, j(n.groups, (A, q) => (c(), d(I, {
4091
4099
  key: A.key
4092
4100
  }, [
4093
4101
  A.key === n.unreadGroupKey ? (c(), d("div", zr, [
4094
- t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
4095
- o("span", qr, v(n.t("messageList.unread")), 1),
4096
- t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
4097
- ])) : b("", !0),
4102
+ t[9] || (t[9] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
4103
+ l("span", qr, v(n.t("messageList.unread")), 1),
4104
+ t[10] || (t[10] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
4105
+ ])) : k("", !0),
4098
4106
  A.role === "system" || A.items.length ? (c(), d("div", {
4099
4107
  key: 1,
4100
4108
  class: R(["wm-list__group", "wm-list__group--" + A.role])
4101
4109
  }, [
4102
4110
  A.role === "system" ? (c(), d("div", Vr, [
4103
- t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
4104
- o("span", $r, v(A.systemLabel), 1),
4105
- t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
4111
+ t[11] || (t[11] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
4112
+ l("span", Kr, v(A.systemLabel), 1),
4113
+ t[12] || (t[12] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
4106
4114
  ])) : (c(), d(I, { key: 1 }, [
4107
- (c(!0), d(I, null, j(A.items, (M, U) => (c(), d(I, {
4108
- key: `${n.messageKey(M.message)}-${M.partKey}`
4115
+ (c(!0), d(I, null, j(A.items, (T, U) => (c(), d(I, {
4116
+ key: `${n.messageKey(T.message)}-${T.partKey}`
4109
4117
  }, [
4110
- o("div", {
4111
- "data-row-key": `${n.messageKey(M.message)}-${M.partKey}`,
4118
+ l("div", {
4119
+ "data-row-key": `${n.messageKey(T.message)}-${T.partKey}`,
4112
4120
  class: R(["wm-list__row fade-up", [
4113
4121
  "wm-list__row--" + A.role,
4114
4122
  {
4115
- "is-pending": M.message._pending,
4116
- "is-failed": M.message._failed
4123
+ "is-pending": T.message._pending,
4124
+ "is-failed": T.message._failed
4117
4125
  }
4118
4126
  ]]),
4119
4127
  style: z(n.cornersStyle(A, U)),
4120
- onPointerdown: (N) => n.onPressStart(`${n.messageKey(M.message)}-${M.partKey}`),
4121
- onPointerup: t[0] || (t[0] = (N) => n.onPressEnd()),
4122
- onPointercancel: t[1] || (t[1] = (N) => n.onPressEnd()),
4123
- onPointerleave: t[2] || (t[2] = (N) => n.onPressEnd()),
4128
+ onPointerdown: (D) => n.onPressStart(`${n.messageKey(T.message)}-${T.partKey}`),
4129
+ onPointerup: t[0] || (t[0] = (D) => n.onPressEnd()),
4130
+ onPointercancel: t[1] || (t[1] = (D) => n.onPressEnd()),
4131
+ onPointerleave: t[2] || (t[2] = (D) => n.onPressEnd()),
4124
4132
  onContextmenu: t[3] || (t[3] = J(() => {
4125
4133
  }, ["prevent"]))
4126
4134
  }, [
4127
- A.role !== "user" ? (c(), d("div", Wr, [
4135
+ A.role !== "user" ? (c(), d("div", $r, [
4128
4136
  U === A.items.length - 1 ? (c(), d(I, { key: 0 }, [
4129
- A.role === "ai" ? (c(), D(r, {
4137
+ A.role === "ai" ? (c(), P(a, {
4130
4138
  key: 0,
4131
4139
  size: 26,
4132
4140
  tail: !0,
4133
4141
  name: s.aiAgentName,
4134
4142
  "image-url": s.aiAgentAvatarUrl
4135
- }, null, 8, ["name", "image-url"])) : (c(), D(l, {
4143
+ }, null, 8, ["name", "image-url"])) : (c(), P(o, {
4136
4144
  key: 1,
4137
4145
  name: A.agentName,
4138
4146
  "avatar-url": A.agentAvatarUrl,
4139
4147
  size: 26,
4140
4148
  tail: !0
4141
4149
  }, null, 8, ["name", "avatar-url"]))
4142
- ], 64)) : b("", !0)
4143
- ])) : b("", !0),
4144
- M.renderAs === "action" ? (c(), D(f, {
4150
+ ], 64)) : k("", !0)
4151
+ ])) : k("", !0),
4152
+ T.renderAs === "action" ? (c(), P(f, {
4145
4153
  key: 1,
4146
- state: M.message.payload.state,
4147
- label: n.actionLabel(M.message),
4148
- detail: n.actionDetail(M.message)
4149
- }, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), D(f, {
4154
+ state: T.message.payload.state,
4155
+ label: n.actionLabel(T.message),
4156
+ detail: n.actionDetail(T.message)
4157
+ }, null, 8, ["state", "label", "detail"])) : T.renderAs === "admin-pending" ? (c(), P(f, {
4150
4158
  key: 2,
4151
4159
  state: "awaiting",
4152
4160
  label: n.t("messageList.approvalRequestSent"),
4153
- detail: M.message.text_md || ""
4154
- }, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), D(k, {
4161
+ detail: T.message.text_md || ""
4162
+ }, null, 8, ["label", "detail"])) : T.renderAs === "artifact-of-action" ? (c(), P(b, {
4155
4163
  key: 3,
4156
- artifact: n.actionArtifact(M.message)
4157
- }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), D(k, {
4164
+ artifact: n.actionArtifact(T.message)
4165
+ }, null, 8, ["artifact"])) : T.renderAs === "artifact" ? (c(), P(b, {
4158
4166
  key: 4,
4159
- artifact: n.artifactOf(M.message)
4167
+ artifact: n.artifactOf(T.message)
4160
4168
  }, null, 8, ["artifact"])) : (c(), d("div", {
4161
4169
  key: 5,
4162
4170
  class: R(["wm-list__body", {
4163
- "wm-list__body--mixed": !!M.message.text_md && n.attachmentsOf(M.message).length > 0
4171
+ "wm-list__body--mixed": !!T.message.text_md && n.attachmentsOf(T.message).length > 0
4164
4172
  }])
4165
4173
  }, [
4166
- M.message.text_md ? (c(), D(y, {
4174
+ T.message.text_md ? (c(), P(y, {
4167
4175
  key: 0,
4168
4176
  role: A.role,
4169
- text: M.message.text_md
4170
- }, null, 8, ["role", "text"])) : b("", !0),
4171
- n.attachmentsOf(M.message).length ? (c(), d("div", {
4177
+ text: T.message.text_md
4178
+ }, null, 8, ["role", "text"])) : k("", !0),
4179
+ n.attachmentsOf(T.message).length ? (c(), d("div", {
4172
4180
  key: 1,
4173
4181
  class: R(["wm-list__atts", {
4174
4182
  "wm-list__atts--align-end": A.role === "user",
4175
- "wm-list__atts--mosaic": n.attachmentsOf(M.message).length >= 2
4183
+ "wm-list__atts--mosaic": n.attachmentsOf(T.message).length >= 2
4176
4184
  }]),
4177
4185
  style: z(
4178
4186
  n.mosaicGridStyle(
4179
- n.attachmentsOf(M.message).length
4187
+ n.attachmentsOf(T.message).length
4180
4188
  )
4181
4189
  )
4182
4190
  }, [
4183
4191
  (c(!0), d(I, null, j(n.attachmentsOf(
4184
- M.message
4185
- ), (N, L) => (c(), D(T, {
4186
- key: `${n.messageKey(M.message)}-att-${L}`,
4187
- attachment: N,
4192
+ T.message
4193
+ ), (D, L) => (c(), P(M, {
4194
+ key: `${n.messageKey(T.message)}-att-${L}`,
4195
+ attachment: D,
4188
4196
  style: z(
4189
4197
  n.mosaicCornerStyle(
4190
4198
  L,
4191
- n.attachmentsOf(M.message).length,
4192
- !!M.message.text_md
4199
+ n.attachmentsOf(T.message).length,
4200
+ !!T.message.text_md
4193
4201
  )
4194
4202
  )
4195
4203
  }, null, 8, ["attachment", "style"]))), 128))
4196
- ], 6)) : b("", !0)
4204
+ ], 6)) : k("", !0)
4197
4205
  ], 2))
4198
- ], 46, Kr),
4199
- U < A.items.length - 1 && a.pressedItemKey === `${n.messageKey(M.message)}-${M.partKey}` && (A.role !== "user" || n.timeOf(M.message)) ? (c(), d("div", {
4206
+ ], 46, Wr),
4207
+ U < A.items.length - 1 && i.pressedItemKey === `${n.messageKey(T.message)}-${T.partKey}` && (A.role !== "user" || n.timeOf(T.message)) ? (c(), d("div", {
4200
4208
  key: 0,
4201
4209
  class: R(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
4202
4210
  }, [
4203
- A.role !== "user" ? (c(), d("span", Gr, v(n.roleLabel(A)), 1)) : b("", !0),
4204
- A.role !== "user" && n.timeOf(M.message) ? (c(), d("span", Yr, "•")) : b("", !0),
4205
- n.timeOf(M.message) ? (c(), d("span", Jr, v(n.timeOf(M.message)), 1)) : b("", !0)
4206
- ], 2)) : b("", !0)
4211
+ A.role !== "user" ? (c(), d("span", Gr, v(n.roleLabel(A)), 1)) : k("", !0),
4212
+ A.role !== "user" && n.timeOf(T.message) ? (c(), d("span", Yr, "•")) : k("", !0),
4213
+ n.timeOf(T.message) ? (c(), d("span", Jr, v(n.timeOf(T.message)), 1)) : k("", !0)
4214
+ ], 2)) : k("", !0)
4207
4215
  ], 64))), 128)),
4208
4216
  (A.role !== "user" || n.lastTimeOf(A)) && !n.hasTrailingOverlay(A) ? (c(), d("div", {
4209
4217
  key: 0,
4210
4218
  class: R(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
4211
4219
  }, [
4212
- A.role !== "user" ? (c(), d("span", Xr, v(n.roleLabel(A)), 1)) : b("", !0),
4213
- A.role !== "user" && n.lastTimeOf(A) ? (c(), d("span", Qr, "•")) : b("", !0),
4214
- n.lastTimeOf(A) ? (c(), d("span", Zr, v(n.lastTimeOf(A)), 1)) : b("", !0)
4215
- ], 2)) : b("", !0)
4220
+ A.role !== "user" ? (c(), d("span", Xr, v(n.roleLabel(A)), 1)) : k("", !0),
4221
+ A.role !== "user" && n.lastTimeOf(A) ? (c(), d("span", Qr, "•")) : k("", !0),
4222
+ n.lastTimeOf(A) ? (c(), d("span", Zr, v(n.lastTimeOf(A)), 1)) : k("", !0)
4223
+ ], 2)) : k("", !0)
4216
4224
  ], 64))
4217
- ], 2)) : b("", !0)
4225
+ ], 2)) : k("", !0)
4218
4226
  ], 64))), 128)),
4219
4227
  s.streamingActive ? (c(), d("div", ei, [
4220
- o("div", ti, [
4221
- $(r, {
4228
+ l("div", ti, [
4229
+ K(a, {
4222
4230
  size: 26,
4223
4231
  tail: !0,
4224
4232
  name: s.aiAgentName,
4225
4233
  "image-url": s.aiAgentAvatarUrl
4226
4234
  }, null, 8, ["name", "image-url"])
4227
4235
  ]),
4228
- $(E)
4229
- ])) : b("", !0)
4236
+ K(E)
4237
+ ])) : k("", !0)
4230
4238
  ], 34),
4231
- $(Ne, { name: "wm-scrollDown" }, {
4239
+ K(De, { name: "wm-scrollDown" }, {
4232
4240
  default: je(() => [
4233
- a.showScrollDown ? (c(), d("button", {
4241
+ i.showScrollDown ? (c(), d("button", {
4234
4242
  key: 0,
4235
4243
  type: "button",
4236
4244
  class: "wm-list__scrollDown",
@@ -4238,7 +4246,7 @@ function si(e, t, s, i, a, n) {
4238
4246
  title: n.t("messageList.scrollToBottom"),
4239
4247
  onClick: t[5] || (t[5] = (...A) => n.scrollToBottomSmooth && n.scrollToBottomSmooth(...A))
4240
4248
  }, [...t[13] || (t[13] = [
4241
- o("svg", {
4249
+ l("svg", {
4242
4250
  width: "14",
4243
4251
  height: "14",
4244
4252
  viewBox: "0 0 24 24",
@@ -4249,15 +4257,15 @@ function si(e, t, s, i, a, n) {
4249
4257
  "stroke-linejoin": "round",
4250
4258
  "aria-hidden": "true"
4251
4259
  }, [
4252
- o("path", { d: "M6 9l6 6 6-6" })
4260
+ l("path", { d: "M6 9l6 6 6-6" })
4253
4261
  ], -1)
4254
- ])], 8, ni)) : b("", !0)
4262
+ ])], 8, ni)) : k("", !0)
4255
4263
  ]),
4256
4264
  _: 1
4257
4265
  })
4258
4266
  ]);
4259
4267
  }
4260
- const ri = /* @__PURE__ */ P(Pr, [["render", si], ["__scopeId", "data-v-434994a4"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4268
+ const ri = /* @__PURE__ */ N(Pr, [["render", si], ["__scopeId", "data-v-fd42a48c"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4261
4269
  function ii() {
4262
4270
  return Oe && [
4263
4271
  "video/webm;codecs=vp9,opus",
@@ -4265,8 +4273,8 @@ function ii() {
4265
4273
  "video/webm",
4266
4274
  "video/mp4"
4267
4275
  ].find((t) => {
4268
- var s, i;
4269
- return (i = (s = window.MediaRecorder).isTypeSupported) == null ? void 0 : i.call(s, t);
4276
+ var s, r;
4277
+ return (r = (s = window.MediaRecorder).isTypeSupported) == null ? void 0 : r.call(s, t);
4270
4278
  }) || "";
4271
4279
  }
4272
4280
  function Ve({ audio: e }) {
@@ -4278,7 +4286,7 @@ function Ve({ audio: e }) {
4278
4286
  systemAudio: e ? "include" : "exclude"
4279
4287
  };
4280
4288
  }
4281
- function vo(e) {
4289
+ function wo(e) {
4282
4290
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
4283
4291
  }
4284
4292
  async function ai() {
@@ -4303,19 +4311,19 @@ async function ai() {
4303
4311
  }
4304
4312
  async function oi(e) {
4305
4313
  const t = document.createElement("video");
4306
- t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
4307
- const s = t.videoWidth || 1280, i = t.videoHeight || 720, a = document.createElement("canvas");
4308
- a.width = s, a.height = i, a.getContext("2d").drawImage(t, 0, 0, s, i);
4309
- const n = await new Promise((l, f) => {
4310
- a.toBlob(
4311
- (k) => k ? l(k) : f(new Error("toBlob failed")),
4314
+ t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((o) => requestAnimationFrame(o));
4315
+ const s = t.videoWidth || 1280, r = t.videoHeight || 720, i = document.createElement("canvas");
4316
+ i.width = s, i.height = r, i.getContext("2d").drawImage(t, 0, 0, s, r);
4317
+ const n = await new Promise((o, f) => {
4318
+ i.toBlob(
4319
+ (b) => b ? o(b) : f(new Error("toBlob failed")),
4312
4320
  "image/png"
4313
4321
  );
4314
- }), r = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4315
- return new File([n], `capture-${r}.png`, { type: "image/png" });
4322
+ }), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4323
+ return new File([n], `capture-${a}.png`, { type: "image/png" });
4316
4324
  }
4317
4325
  async function li(e = {}) {
4318
- var k;
4326
+ var b;
4319
4327
  if (!pe || !Oe) return null;
4320
4328
  let t;
4321
4329
  try {
@@ -4326,56 +4334,56 @@ async function li(e = {}) {
4326
4334
  return (y == null ? void 0 : y.name) !== "NotAllowedError" && console.error("[media] record picker", y), null;
4327
4335
  }
4328
4336
  const s = ii();
4329
- let i;
4337
+ let r;
4330
4338
  try {
4331
- i = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
4339
+ r = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
4332
4340
  } catch (y) {
4333
- return console.error("[media] recorder init", y), t.getTracks().forEach((T) => {
4334
- T.stop();
4341
+ return console.error("[media] recorder init", y), t.getTracks().forEach((M) => {
4342
+ M.stop();
4335
4343
  }), null;
4336
4344
  }
4337
- const a = [];
4338
- let n = null, r = !1;
4339
- i.addEventListener("dataavailable", (y) => {
4340
- y.data && y.data.size > 0 && a.push(y.data);
4341
- }), i.addEventListener("stop", () => {
4342
- var y, T;
4345
+ const i = [];
4346
+ let n = null, a = !1;
4347
+ r.addEventListener("dataavailable", (y) => {
4348
+ y.data && y.data.size > 0 && i.push(y.data);
4349
+ }), r.addEventListener("stop", () => {
4350
+ var y, M;
4343
4351
  if (n && clearInterval(n), t.getTracks().forEach((E) => {
4344
4352
  E.stop();
4345
- }), a.length) {
4346
- const E = i.mimeType || s || "video/webm", A = new Blob(a, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${M}.${q}`, {
4353
+ }), i.length) {
4354
+ const E = r.mimeType || s || "video/webm", A = new Blob(i, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm", T = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${T}.${q}`, {
4347
4355
  type: E
4348
4356
  });
4349
4357
  (y = e.onfinalize) == null || y.call(e, U);
4350
4358
  } else
4351
- (T = e.oncancel) == null || T.call(e);
4359
+ (M = e.oncancel) == null || M.call(e);
4352
4360
  }), t.getVideoTracks().forEach((y) => {
4353
- y.addEventListener("ended", () => l(), { once: !0 });
4361
+ y.addEventListener("ended", () => o(), { once: !0 });
4354
4362
  });
4355
- function l() {
4356
- if (!r && (r = !0, i.state !== "inactive"))
4363
+ function o() {
4364
+ if (!a && (a = !0, r.state !== "inactive"))
4357
4365
  try {
4358
- i.stop();
4366
+ r.stop();
4359
4367
  } catch (y) {
4360
4368
  console.error("[media] recorder stop", y);
4361
4369
  }
4362
4370
  }
4363
4371
  try {
4364
- i.start(1e3);
4372
+ r.start(1e3);
4365
4373
  } catch (y) {
4366
- return console.error("[media] recorder start", y), t.getTracks().forEach((T) => {
4367
- T.stop();
4374
+ return console.error("[media] recorder start", y), t.getTracks().forEach((M) => {
4375
+ M.stop();
4368
4376
  }), null;
4369
4377
  }
4370
- (k = e.onstart) == null || k.call(e);
4378
+ (b = e.onstart) == null || b.call(e);
4371
4379
  const f = Date.now();
4372
4380
  return n = setInterval(() => {
4373
4381
  var y;
4374
4382
  (y = e.ontick) == null || y.call(e, Date.now() - f);
4375
4383
  }, 500), {
4376
- stop: l,
4384
+ stop: o,
4377
4385
  get state() {
4378
- return i.state;
4386
+ return r.state;
4379
4387
  }
4380
4388
  };
4381
4389
  }
@@ -4564,51 +4572,51 @@ const ci = [
4564
4572
  height: "14",
4565
4573
  "aria-hidden": "true"
4566
4574
  }, pi = ["d"], vi = ["placeholder", "disabled"], yi = { class: "wm-compose__actions" }, wi = ["title", "aria-label", "disabled"], bi = ["disabled", "aria-label"];
4567
- function ki(e, t, s, i, a, n) {
4575
+ function ki(e, t, s, r, i, n) {
4568
4576
  return c(), d("div", {
4569
4577
  class: R(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
4570
- style: z(a.kbOffset ? { transform: `translateY(-${a.kbOffset}px)` } : null)
4578
+ style: z(i.kbOffset ? { transform: `translateY(-${i.kbOffset}px)` } : null)
4571
4579
  }, [
4572
- a.recording ? (c(), d("div", ui, [
4573
- t[8] || (t[8] = o("span", {
4580
+ i.recording ? (c(), d("div", ui, [
4581
+ t[8] || (t[8] = l("span", {
4574
4582
  class: "wm-rec__dot",
4575
4583
  "aria-hidden": "true"
4576
4584
  }, null, -1)),
4577
- o("span", hi, v(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
4578
- o("button", {
4585
+ l("span", hi, v(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
4586
+ l("button", {
4579
4587
  type: "button",
4580
4588
  class: "wm-rec__stop",
4581
- onClick: t[0] || (t[0] = (...r) => n.stopRecording && n.stopRecording(...r))
4589
+ onClick: t[0] || (t[0] = (...a) => n.stopRecording && n.stopRecording(...a))
4582
4590
  }, v(n.t("composer.stop")), 1)
4583
- ])) : b("", !0),
4584
- o("form", {
4585
- class: R(["wm-compose", { "has-attach": a.attachOpen }]),
4586
- onSubmit: t[7] || (t[7] = J((...r) => n.onSubmit && n.onSubmit(...r), ["prevent"]))
4591
+ ])) : k("", !0),
4592
+ l("form", {
4593
+ class: R(["wm-compose", { "has-attach": i.attachOpen }]),
4594
+ onSubmit: t[7] || (t[7] = J((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]))
4587
4595
  }, [
4588
- o("input", {
4596
+ l("input", {
4589
4597
  ref: "fileEl",
4590
4598
  type: "file",
4591
4599
  hidden: "",
4592
4600
  multiple: "",
4593
- onChange: t[1] || (t[1] = (...r) => n.onFile && n.onFile(...r))
4601
+ onChange: t[1] || (t[1] = (...a) => n.onFile && n.onFile(...a))
4594
4602
  }, null, 544),
4595
- a.attachOpen ? (c(), d("div", {
4603
+ i.attachOpen ? (c(), d("div", {
4596
4604
  key: 0,
4597
4605
  class: "wm-compose__overlay",
4598
- onClick: t[2] || (t[2] = (r) => a.attachOpen = !1)
4599
- })) : b("", !0),
4600
- a.attachOpen ? (c(), d("div", mi, [
4601
- (c(!0), d(I, null, j(n.attachItems, (r) => (c(), d("button", {
4602
- key: r.action,
4606
+ onClick: t[2] || (t[2] = (a) => i.attachOpen = !1)
4607
+ })) : k("", !0),
4608
+ i.attachOpen ? (c(), d("div", mi, [
4609
+ (c(!0), d(I, null, j(n.attachItems, (a) => (c(), d("button", {
4610
+ key: a.action,
4603
4611
  type: "button",
4604
4612
  class: "wm-compose__menuItem",
4605
- disabled: r.disabled,
4606
- onClick: (l) => n.onAttachAction(r.action)
4613
+ disabled: a.disabled,
4614
+ onClick: (o) => n.onAttachAction(a.action)
4607
4615
  }, [
4608
- o("span", _i, [
4616
+ l("span", _i, [
4609
4617
  (c(), d("svg", gi, [
4610
- o("path", {
4611
- d: r.path,
4618
+ l("path", {
4619
+ d: a.path,
4612
4620
  stroke: "currentColor",
4613
4621
  "stroke-width": "1.8",
4614
4622
  "stroke-linecap": "round",
@@ -4617,31 +4625,31 @@ function ki(e, t, s, i, a, n) {
4617
4625
  }, null, 8, pi)
4618
4626
  ]))
4619
4627
  ]),
4620
- o("span", null, v(r.label), 1)
4628
+ l("span", null, v(a.label), 1)
4621
4629
  ], 8, fi))), 128))
4622
- ])) : b("", !0),
4623
- G(o("textarea", {
4630
+ ])) : k("", !0),
4631
+ G(l("textarea", {
4624
4632
  ref: "inputEl",
4625
- "onUpdate:modelValue": t[3] || (t[3] = (r) => a.local = r),
4633
+ "onUpdate:modelValue": t[3] || (t[3] = (a) => i.local = a),
4626
4634
  class: "wm-compose__input",
4627
4635
  rows: "3",
4628
4636
  placeholder: s.placeholder,
4629
4637
  disabled: s.disabled,
4630
- onKeydown: t[4] || (t[4] = (...r) => n.onKeydown && n.onKeydown(...r)),
4631
- onInput: t[5] || (t[5] = (...r) => n.autosize && n.autosize(...r))
4638
+ onKeydown: t[4] || (t[4] = (...a) => n.onKeydown && n.onKeydown(...a)),
4639
+ onInput: t[5] || (t[5] = (...a) => n.autosize && n.autosize(...a))
4632
4640
  }, null, 40, vi), [
4633
- [te, a.local]
4641
+ [te, i.local]
4634
4642
  ]),
4635
- o("div", yi, [
4636
- o("button", {
4643
+ l("div", yi, [
4644
+ l("button", {
4637
4645
  type: "button",
4638
- class: R(["wm-compose__icon", { "is-open": a.attachOpen }]),
4646
+ class: R(["wm-compose__icon", { "is-open": i.attachOpen }]),
4639
4647
  title: s.attachLabel,
4640
4648
  "aria-label": s.attachLabel,
4641
- disabled: a.recording,
4642
- onClick: t[6] || (t[6] = (r) => a.attachOpen = !a.attachOpen)
4649
+ disabled: i.recording,
4650
+ onClick: t[6] || (t[6] = (a) => i.attachOpen = !i.attachOpen)
4643
4651
  }, [...t[9] || (t[9] = [
4644
- o("svg", {
4652
+ l("svg", {
4645
4653
  width: "13",
4646
4654
  height: "13",
4647
4655
  viewBox: "0 0 24 24",
@@ -4652,16 +4660,16 @@ function ki(e, t, s, i, a, n) {
4652
4660
  "stroke-linejoin": "round",
4653
4661
  "aria-hidden": "true"
4654
4662
  }, [
4655
- 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" })
4663
+ l("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" })
4656
4664
  ], -1)
4657
4665
  ])], 10, wi),
4658
- o("button", {
4666
+ l("button", {
4659
4667
  type: "submit",
4660
4668
  class: R(["wm-compose__send", { "is-empty": !n.canSend }]),
4661
4669
  disabled: !n.canSend,
4662
4670
  "aria-label": n.t("composer.send")
4663
4671
  }, [...t[10] || (t[10] = [
4664
- o("svg", {
4672
+ l("svg", {
4665
4673
  width: "13",
4666
4674
  height: "13",
4667
4675
  viewBox: "0 0 24 24",
@@ -4672,14 +4680,14 @@ function ki(e, t, s, i, a, n) {
4672
4680
  "stroke-linejoin": "round",
4673
4681
  "aria-hidden": "true"
4674
4682
  }, [
4675
- o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4683
+ l("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4676
4684
  ], -1)
4677
4685
  ])], 10, bi)
4678
4686
  ])
4679
4687
  ], 34)
4680
4688
  ], 6);
4681
4689
  }
4682
- const Ci = /* @__PURE__ */ P(di, [["render", ki], ["__scopeId", "data-v-bba29b9c"]]), Ai = {
4690
+ const Ci = /* @__PURE__ */ N(di, [["render", ki], ["__scopeId", "data-v-bba29b9c"]]), Ai = {
4683
4691
  name: "WmSuggestionChips",
4684
4692
  props: {
4685
4693
  items: { type: Array, default: () => [] },
@@ -4697,21 +4705,21 @@ const Ci = /* @__PURE__ */ P(di, [["render", ki], ["__scopeId", "data-v-bba29b9c
4697
4705
  }
4698
4706
  }
4699
4707
  }, Si = ["onClick"];
4700
- function Mi(e, t, s, i, a, n) {
4708
+ function Mi(e, t, s, r, i, n) {
4701
4709
  return s.items.length ? (c(), d("div", {
4702
4710
  key: n.batchKey,
4703
4711
  class: "wm-chips"
4704
4712
  }, [
4705
- (c(!0), d(I, null, j(s.items, (r, l) => (c(), d("button", {
4706
- key: l,
4713
+ (c(!0), d(I, null, j(s.items, (a, o) => (c(), d("button", {
4714
+ key: o,
4707
4715
  type: "button",
4708
4716
  class: "wm-chip",
4709
- style: z({ animationDelay: s.baseDelay + l * s.stepDelay + "ms" }),
4710
- onClick: (f) => e.$emit("select", r)
4711
- }, v(r.label), 13, Si))), 128))
4712
- ])) : b("", !0);
4717
+ style: z({ animationDelay: s.baseDelay + o * s.stepDelay + "ms" }),
4718
+ onClick: (f) => e.$emit("select", a)
4719
+ }, v(a.label), 13, Si))), 128))
4720
+ ])) : k("", !0);
4713
4721
  }
4714
- const Ti = /* @__PURE__ */ P(Ai, [["render", Mi], ["__scopeId", "data-v-47ad8085"]]), xi = {
4722
+ const Ti = /* @__PURE__ */ N(Ai, [["render", Mi], ["__scopeId", "data-v-47ad8085"]]), xi = {
4715
4723
  name: "WmApprovalCard",
4716
4724
  components: { AIAvatar: oe },
4717
4725
  inject: {
@@ -4759,41 +4767,41 @@ const Ti = /* @__PURE__ */ P(Ai, [["render", Mi], ["__scopeId", "data-v-47ad8085
4759
4767
  key: 0,
4760
4768
  class: "wm-approval__detail"
4761
4769
  }, Pi = { class: "wm-approval__actions" };
4762
- function Di(e, t, s, i, a, n) {
4763
- const r = B("AIAvatar");
4770
+ function Ni(e, t, s, r, i, n) {
4771
+ const a = B("AIAvatar");
4764
4772
  return c(), d("div", Oi, [
4765
- o("div", Ri, [
4766
- o("div", Li, [
4767
- $(r, {
4773
+ l("div", Ri, [
4774
+ l("div", Li, [
4775
+ K(a, {
4768
4776
  size: 24,
4769
4777
  name: s.agentName,
4770
4778
  "image-url": s.agentAvatarUrl
4771
4779
  }, null, 8, ["name", "image-url"])
4772
4780
  ]),
4773
- o("div", Ii, [
4774
- o("div", Ei, v(s.action), 1),
4775
- s.detail ? (c(), d("div", Bi, v(s.detail), 1)) : b("", !0)
4781
+ l("div", Ii, [
4782
+ l("div", Ei, v(s.action), 1),
4783
+ s.detail ? (c(), d("div", Bi, v(s.detail), 1)) : k("", !0)
4776
4784
  ])
4777
4785
  ]),
4778
- o("div", Pi, [
4786
+ l("div", Pi, [
4779
4787
  n.rejectId ? (c(), d("button", {
4780
4788
  key: 0,
4781
4789
  type: "button",
4782
4790
  class: "wm-approval__btn wm-approval__btn--neutral",
4783
- onClick: t[0] || (t[0] = (l) => e.$emit("callback", n.rejectId))
4784
- }, v(n.rejectLabel), 1)) : b("", !0),
4791
+ onClick: t[0] || (t[0] = (o) => e.$emit("callback", n.rejectId))
4792
+ }, v(n.rejectLabel), 1)) : k("", !0),
4785
4793
  n.approveId ? (c(), d("button", {
4786
4794
  key: 1,
4787
4795
  type: "button",
4788
4796
  class: "wm-approval__btn wm-approval__btn--primary",
4789
- onClick: t[1] || (t[1] = (l) => e.$emit("callback", n.approveId))
4790
- }, v(n.approveLabel), 1)) : b("", !0)
4797
+ onClick: t[1] || (t[1] = (o) => e.$emit("callback", n.approveId))
4798
+ }, v(n.approveLabel), 1)) : k("", !0)
4791
4799
  ])
4792
4800
  ]);
4793
4801
  }
4794
- const Ui = /* @__PURE__ */ P(xi, [["render", Di], ["__scopeId", "data-v-a2bed37e"]]);
4795
- let De = 0;
4796
- const Ni = /* @__PURE__ */ new Set([
4802
+ const Ui = /* @__PURE__ */ N(xi, [["render", Ni], ["__scopeId", "data-v-a2bed37e"]]);
4803
+ let Ne = 0;
4804
+ const Di = /* @__PURE__ */ new Set([
4797
4805
  "text",
4798
4806
  "textarea",
4799
4807
  "number",
@@ -4818,8 +4826,8 @@ const Ni = /* @__PURE__ */ new Set([
4818
4826
  },
4819
4827
  emits: ["submit"],
4820
4828
  data() {
4821
- return De += 1, {
4822
- _uid: De,
4829
+ return Ne += 1, {
4830
+ _uid: Ne,
4823
4831
  values: {},
4824
4832
  busy: !1,
4825
4833
  error: ""
@@ -4831,7 +4839,7 @@ const Ni = /* @__PURE__ */ new Set([
4831
4839
  // douteux.
4832
4840
  normalizedFields() {
4833
4841
  var t;
4834
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !Ni.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
4842
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !Di.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
4835
4843
  }
4836
4844
  },
4837
4845
  created() {
@@ -4850,8 +4858,8 @@ const Ni = /* @__PURE__ */ new Set([
4850
4858
  this.values = t, this.error = "";
4851
4859
  },
4852
4860
  toggleMulti(e, t, s) {
4853
- const i = Array.isArray(this.values[e]) ? this.values[e].slice() : [], a = i.indexOf(t);
4854
- s && a === -1 ? i.push(t) : !s && a !== -1 && i.splice(a, 1), this.values = { ...this.values, [e]: i };
4861
+ const r = Array.isArray(this.values[e]) ? this.values[e].slice() : [], i = r.indexOf(t);
4862
+ s && i === -1 ? r.push(t) : !s && i !== -1 && r.splice(i, 1), this.values = { ...this.values, [e]: r };
4855
4863
  },
4856
4864
  validate() {
4857
4865
  for (const e of this.normalizedFields) {
@@ -4884,10 +4892,10 @@ const Ni = /* @__PURE__ */ new Set([
4884
4892
  }
4885
4893
  }
4886
4894
  }
4887
- }, Fi = { class: "wm-form" }, Hi = { class: "wm-form__head" }, zi = { class: "wm-form__icon" }, qi = { class: "wm-form__main" }, Vi = { class: "wm-form__title" }, $i = {
4895
+ }, Fi = { class: "wm-form" }, Hi = { class: "wm-form__head" }, zi = { class: "wm-form__icon" }, qi = { class: "wm-form__main" }, Vi = { class: "wm-form__title" }, Ki = {
4888
4896
  key: 0,
4889
4897
  class: "wm-form__detail"
4890
- }, Ki = ["for"], Wi = {
4898
+ }, Wi = ["for"], $i = {
4891
4899
  key: 0,
4892
4900
  class: "wm-form__req",
4893
4901
  "aria-hidden": "true"
@@ -4911,144 +4919,144 @@ const Ni = /* @__PURE__ */ new Set([
4911
4919
  key: 2,
4912
4920
  class: "wm-form__doneLbl"
4913
4921
  };
4914
- function ca(e, t, s, i, a, n) {
4915
- const r = B("AIAvatar");
4922
+ function ca(e, t, s, r, i, n) {
4923
+ const a = B("AIAvatar");
4916
4924
  return c(), d("div", Fi, [
4917
- o("div", Hi, [
4918
- o("div", zi, [
4919
- $(r, {
4925
+ l("div", Hi, [
4926
+ l("div", zi, [
4927
+ K(a, {
4920
4928
  size: 24,
4921
4929
  name: s.agentName,
4922
4930
  "image-url": s.agentAvatarUrl
4923
4931
  }, null, 8, ["name", "image-url"])
4924
4932
  ]),
4925
- o("div", qi, [
4926
- o("div", Vi, v(s.form.title || n.t("form.title")), 1),
4927
- s.form.description ? (c(), d("div", $i, v(s.form.description), 1)) : b("", !0)
4933
+ l("div", qi, [
4934
+ l("div", Vi, v(s.form.title || n.t("form.title")), 1),
4935
+ s.form.description ? (c(), d("div", Ki, v(s.form.description), 1)) : k("", !0)
4928
4936
  ])
4929
4937
  ]),
4930
- o("form", {
4938
+ l("form", {
4931
4939
  class: "wm-form__body",
4932
- onSubmit: t[0] || (t[0] = J((...l) => n.onSubmit && n.onSubmit(...l), ["prevent"]))
4940
+ onSubmit: t[0] || (t[0] = J((...o) => n.onSubmit && n.onSubmit(...o), ["prevent"]))
4933
4941
  }, [
4934
- (c(!0), d(I, null, j(n.normalizedFields, (l) => (c(), d("div", {
4935
- key: l.key,
4942
+ (c(!0), d(I, null, j(n.normalizedFields, (o) => (c(), d("div", {
4943
+ key: o.key,
4936
4944
  class: "wm-form__field"
4937
4945
  }, [
4938
- o("label", {
4939
- for: `wm-f-${a._uid}-${l.key}`,
4946
+ l("label", {
4947
+ for: `wm-f-${i._uid}-${o.key}`,
4940
4948
  class: "wm-form__label"
4941
4949
  }, [
4942
- Se(v(l.label), 1),
4943
- l.required ? (c(), d("span", Wi, "*")) : b("", !0)
4944
- ], 8, Ki),
4945
- l.type === "text" ? G((c(), d("input", {
4950
+ Se(v(o.label), 1),
4951
+ o.required ? (c(), d("span", $i, "*")) : k("", !0)
4952
+ ], 8, Wi),
4953
+ o.type === "text" ? G((c(), d("input", {
4946
4954
  key: 0,
4947
- id: `wm-f-${a._uid}-${l.key}`,
4948
- "onUpdate:modelValue": (f) => a.values[l.key] = f,
4955
+ id: `wm-f-${i._uid}-${o.key}`,
4956
+ "onUpdate:modelValue": (f) => i.values[o.key] = f,
4949
4957
  type: "text",
4950
4958
  class: "wm-form__input",
4951
- placeholder: l.placeholder || "",
4952
- required: l.required,
4953
- disabled: s.readOnly || a.busy
4959
+ placeholder: o.placeholder || "",
4960
+ required: o.required,
4961
+ disabled: s.readOnly || i.busy
4954
4962
  }, null, 8, Gi)), [
4955
- [te, a.values[l.key]]
4956
- ]) : l.type === "textarea" ? G((c(), d("textarea", {
4963
+ [te, i.values[o.key]]
4964
+ ]) : o.type === "textarea" ? G((c(), d("textarea", {
4957
4965
  key: 1,
4958
- id: `wm-f-${a._uid}-${l.key}`,
4959
- "onUpdate:modelValue": (f) => a.values[l.key] = f,
4966
+ id: `wm-f-${i._uid}-${o.key}`,
4967
+ "onUpdate:modelValue": (f) => i.values[o.key] = f,
4960
4968
  class: "wm-form__textarea",
4961
4969
  rows: "3",
4962
- placeholder: l.placeholder || "",
4963
- required: l.required,
4964
- disabled: s.readOnly || a.busy
4970
+ placeholder: o.placeholder || "",
4971
+ required: o.required,
4972
+ disabled: s.readOnly || i.busy
4965
4973
  }, null, 8, Yi)), [
4966
- [te, a.values[l.key]]
4967
- ]) : l.type === "number" ? G((c(), d("input", {
4974
+ [te, i.values[o.key]]
4975
+ ]) : o.type === "number" ? G((c(), d("input", {
4968
4976
  key: 2,
4969
- id: `wm-f-${a._uid}-${l.key}`,
4970
- "onUpdate:modelValue": (f) => a.values[l.key] = f,
4977
+ id: `wm-f-${i._uid}-${o.key}`,
4978
+ "onUpdate:modelValue": (f) => i.values[o.key] = f,
4971
4979
  type: "number",
4972
4980
  class: "wm-form__input",
4973
- placeholder: l.placeholder || "",
4974
- required: l.required,
4975
- disabled: s.readOnly || a.busy
4981
+ placeholder: o.placeholder || "",
4982
+ required: o.required,
4983
+ disabled: s.readOnly || i.busy
4976
4984
  }, null, 8, Ji)), [
4977
4985
  [
4978
4986
  te,
4979
- a.values[l.key],
4987
+ i.values[o.key],
4980
4988
  void 0,
4981
4989
  { number: !0 }
4982
4990
  ]
4983
- ]) : l.type === "date" ? G((c(), d("input", {
4991
+ ]) : o.type === "date" ? G((c(), d("input", {
4984
4992
  key: 3,
4985
- id: `wm-f-${a._uid}-${l.key}`,
4986
- "onUpdate:modelValue": (f) => a.values[l.key] = f,
4993
+ id: `wm-f-${i._uid}-${o.key}`,
4994
+ "onUpdate:modelValue": (f) => i.values[o.key] = f,
4987
4995
  type: "date",
4988
4996
  class: "wm-form__input",
4989
- required: l.required,
4990
- disabled: s.readOnly || a.busy
4997
+ required: o.required,
4998
+ disabled: s.readOnly || i.busy
4991
4999
  }, null, 8, Xi)), [
4992
- [te, a.values[l.key]]
4993
- ]) : l.type === "boolean" ? (c(), d("label", Qi, [
4994
- G(o("input", {
4995
- id: `wm-f-${a._uid}-${l.key}`,
4996
- "onUpdate:modelValue": (f) => a.values[l.key] = f,
5000
+ [te, i.values[o.key]]
5001
+ ]) : o.type === "boolean" ? (c(), d("label", Qi, [
5002
+ G(l("input", {
5003
+ id: `wm-f-${i._uid}-${o.key}`,
5004
+ "onUpdate:modelValue": (f) => i.values[o.key] = f,
4997
5005
  type: "checkbox",
4998
- disabled: s.readOnly || a.busy
5006
+ disabled: s.readOnly || i.busy
4999
5007
  }, null, 8, Zi), [
5000
- [We, a.values[l.key]]
5008
+ [$e, i.values[o.key]]
5001
5009
  ]),
5002
- o("span", null, v(l.placeholder || n.t("common.yes")), 1)
5003
- ])) : l.type === "select" ? G((c(), d("select", {
5010
+ l("span", null, v(o.placeholder || n.t("common.yes")), 1)
5011
+ ])) : o.type === "select" ? G((c(), d("select", {
5004
5012
  key: 5,
5005
- id: `wm-f-${a._uid}-${l.key}`,
5006
- "onUpdate:modelValue": (f) => a.values[l.key] = f,
5013
+ id: `wm-f-${i._uid}-${o.key}`,
5014
+ "onUpdate:modelValue": (f) => i.values[o.key] = f,
5007
5015
  class: "wm-form__select",
5008
- required: l.required,
5009
- disabled: s.readOnly || a.busy
5016
+ required: o.required,
5017
+ disabled: s.readOnly || i.busy
5010
5018
  }, [
5011
- o("option", ta, v(l.placeholder || n.t("form.choose")), 1),
5012
- (c(!0), d(I, null, j(l.options, (f) => (c(), d("option", {
5019
+ l("option", ta, v(o.placeholder || n.t("form.choose")), 1),
5020
+ (c(!0), d(I, null, j(o.options, (f) => (c(), d("option", {
5013
5021
  key: f.value,
5014
5022
  value: f.value
5015
5023
  }, v(f.label), 9, na))), 128))
5016
5024
  ], 8, ea)), [
5017
- [Ge, a.values[l.key]]
5018
- ]) : l.type === "multiselect" ? (c(), d("div", sa, [
5019
- (c(!0), d(I, null, j(l.options, (f) => (c(), d("label", {
5025
+ [Ge, i.values[o.key]]
5026
+ ]) : o.type === "multiselect" ? (c(), d("div", sa, [
5027
+ (c(!0), d(I, null, j(o.options, (f) => (c(), d("label", {
5020
5028
  key: f.value,
5021
5029
  class: "wm-form__multiItem"
5022
5030
  }, [
5023
- o("input", {
5031
+ l("input", {
5024
5032
  type: "checkbox",
5025
5033
  value: f.value,
5026
- checked: Array.isArray(a.values[l.key]) && a.values[l.key].includes(f.value),
5027
- disabled: s.readOnly || a.busy,
5028
- onChange: (k) => n.toggleMulti(
5029
- l.key,
5034
+ checked: Array.isArray(i.values[o.key]) && i.values[o.key].includes(f.value),
5035
+ disabled: s.readOnly || i.busy,
5036
+ onChange: (b) => n.toggleMulti(
5037
+ o.key,
5030
5038
  f.value,
5031
- k.target.checked
5039
+ b.target.checked
5032
5040
  )
5033
5041
  }, null, 40, ra),
5034
- o("span", null, v(f.label), 1)
5042
+ l("span", null, v(f.label), 1)
5035
5043
  ]))), 128))
5036
- ])) : b("", !0)
5044
+ ])) : k("", !0)
5037
5045
  ]))), 128)),
5038
- a.error ? (c(), d("div", ia, v(a.error), 1)) : b("", !0),
5046
+ i.error ? (c(), d("div", ia, v(i.error), 1)) : k("", !0),
5039
5047
  s.readOnly ? (c(), d("div", la, v(n.t("form.responseSent")), 1)) : (c(), d("button", {
5040
5048
  key: 1,
5041
5049
  type: "submit",
5042
5050
  class: "wm-form__submit",
5043
- disabled: a.busy
5051
+ disabled: i.busy
5044
5052
  }, [
5045
- a.busy ? (c(), d("span", oa)) : b("", !0),
5046
- o("span", null, v(a.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
5053
+ i.busy ? (c(), d("span", oa)) : k("", !0),
5054
+ l("span", null, v(i.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
5047
5055
  ], 8, aa))
5048
5056
  ], 32)
5049
5057
  ]);
5050
5058
  }
5051
- const da = /* @__PURE__ */ P(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56"]]), ua = {
5059
+ const da = /* @__PURE__ */ N(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56"]]), ua = {
5052
5060
  name: "WmFeedback",
5053
5061
  inject: {
5054
5062
  // Translator shared by the Messenger shell; French fallback when
@@ -5086,11 +5094,11 @@ const da = /* @__PURE__ */ P(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56
5086
5094
  key: 1,
5087
5095
  class: "wm-fb__done"
5088
5096
  }, ba = { class: "wm-fb__doneTitle" }, ka = { class: "wm-fb__doneSub" };
5089
- function Ca(e, t, s, i, a, n) {
5097
+ function Ca(e, t, s, r, i, n) {
5090
5098
  return c(), d("div", ha, [
5091
5099
  s.done ? (c(), d("div", wa, [
5092
- t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
5093
- o("svg", {
5100
+ t[1] || (t[1] = l("div", { class: "wm-fb__check" }, [
5101
+ l("svg", {
5094
5102
  width: "16",
5095
5103
  height: "16",
5096
5104
  viewBox: "0 0 24 24",
@@ -5101,35 +5109,35 @@ function Ca(e, t, s, i, a, n) {
5101
5109
  "stroke-linejoin": "round",
5102
5110
  "aria-hidden": "true"
5103
5111
  }, [
5104
- o("path", { d: "M20 6L9 17l-5-5" })
5112
+ l("path", { d: "M20 6L9 17l-5-5" })
5105
5113
  ])
5106
5114
  ], -1)),
5107
- o("div", ba, v(n.t("feedback.doneTitle")), 1),
5108
- o("div", ka, v(n.t("feedback.doneSubtitle")), 1)
5115
+ l("div", ba, v(n.t("feedback.doneTitle")), 1),
5116
+ l("div", ka, v(n.t("feedback.doneSubtitle")), 1)
5109
5117
  ])) : (c(), d(I, { key: 0 }, [
5110
- o("div", ma, v(n.t("feedback.question")), 1),
5111
- o("div", fa, v(n.t("feedback.subtitle")), 1),
5112
- o("div", _a, [
5113
- (c(!0), d(I, null, j(n.options, (r) => (c(), d("button", {
5114
- key: r.v,
5118
+ l("div", ma, v(n.t("feedback.question")), 1),
5119
+ l("div", fa, v(n.t("feedback.subtitle")), 1),
5120
+ l("div", _a, [
5121
+ (c(!0), d(I, null, j(n.options, (a) => (c(), d("button", {
5122
+ key: a.v,
5115
5123
  type: "button",
5116
- class: R(["wm-fb__opt", { "is-selected": a.sel === r.v }]),
5117
- onClick: (l) => a.sel = r.v
5124
+ class: R(["wm-fb__opt", { "is-selected": i.sel === a.v }]),
5125
+ onClick: (o) => i.sel = a.v
5118
5126
  }, [
5119
- o("span", pa, v(r.e), 1),
5120
- o("span", va, v(r.l), 1)
5127
+ l("span", pa, v(a.e), 1),
5128
+ l("span", va, v(a.l), 1)
5121
5129
  ], 10, ga))), 128))
5122
5130
  ]),
5123
- o("button", {
5131
+ l("button", {
5124
5132
  type: "button",
5125
5133
  class: "wm-fb__send",
5126
- disabled: !a.sel || s.busy,
5127
- onClick: t[0] || (t[0] = (...r) => n.onSend && n.onSend(...r))
5134
+ disabled: !i.sel || s.busy,
5135
+ onClick: t[0] || (t[0] = (...a) => n.onSend && n.onSend(...a))
5128
5136
  }, v(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, ya)
5129
5137
  ], 64))
5130
5138
  ]);
5131
5139
  }
5132
- const Aa = /* @__PURE__ */ P(ua, [["render", Ca], ["__scopeId", "data-v-9b630564"]]), Sa = {
5140
+ const Aa = /* @__PURE__ */ N(ua, [["render", Ca], ["__scopeId", "data-v-9b630564"]]), Sa = {
5133
5141
  name: "WmMoreMenu",
5134
5142
  inject: {
5135
5143
  // Translator shared by the Messenger shell; French fallback when
@@ -5173,23 +5181,23 @@ const Aa = /* @__PURE__ */ P(ua, [["render", Ca], ["__scopeId", "data-v-9b630564
5173
5181
  }, Oa = { class: "wm-mm__label" }, Ra = { class: "wm-mm__label" }, La = {
5174
5182
  key: 1,
5175
5183
  class: "wm-mm__sep"
5176
- }, Ia = { class: "wm-mm__section" }, Ea = { class: "wm-mm__label" }, Ba = { class: "wm-mm__section" }, Pa = { class: "wm-mm__label" }, Da = { class: "wm-mm__label" };
5177
- function Ua(e, t, s, i, a, n) {
5184
+ }, Ia = { class: "wm-mm__section" }, Ea = { class: "wm-mm__label" }, Ba = { class: "wm-mm__section" }, Pa = { class: "wm-mm__label" }, Na = { class: "wm-mm__label" };
5185
+ function Ua(e, t, s, r, i, n) {
5178
5186
  return c(), d("div", Ma, [
5179
- o("div", {
5187
+ l("div", {
5180
5188
  class: "wm-mm__scrim",
5181
- onClick: t[0] || (t[0] = (r) => e.$emit("close"))
5189
+ onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5182
5190
  }),
5183
- o("div", Ta, [
5191
+ l("div", Ta, [
5184
5192
  s.canRename || s.canExport ? (c(), d("div", xa, [
5185
5193
  s.canRename ? (c(), d("button", {
5186
5194
  key: 0,
5187
5195
  type: "button",
5188
5196
  class: "wm-mm__item",
5189
- onClick: t[1] || (t[1] = (r) => n.emit("rename"))
5197
+ onClick: t[1] || (t[1] = (a) => n.emit("rename"))
5190
5198
  }, [
5191
- t[6] || (t[6] = o("span", { class: "wm-mm__icon" }, [
5192
- o("svg", {
5199
+ t[6] || (t[6] = l("span", { class: "wm-mm__icon" }, [
5200
+ l("svg", {
5193
5201
  width: "12",
5194
5202
  height: "12",
5195
5203
  viewBox: "0 0 24 24",
@@ -5200,20 +5208,20 @@ function Ua(e, t, s, i, a, n) {
5200
5208
  "stroke-linejoin": "round",
5201
5209
  "aria-hidden": "true"
5202
5210
  }, [
5203
- o("path", { d: "M12 20h9" }),
5204
- o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
5211
+ l("path", { d: "M12 20h9" }),
5212
+ l("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
5205
5213
  ])
5206
5214
  ], -1)),
5207
- o("span", Oa, v(n.t("moreMenu.editTitle")), 1)
5208
- ])) : b("", !0),
5215
+ l("span", Oa, v(n.t("moreMenu.editTitle")), 1)
5216
+ ])) : k("", !0),
5209
5217
  s.canExport ? (c(), d("button", {
5210
5218
  key: 1,
5211
5219
  type: "button",
5212
5220
  class: "wm-mm__item",
5213
- onClick: t[2] || (t[2] = (r) => n.emit("export"))
5221
+ onClick: t[2] || (t[2] = (a) => n.emit("export"))
5214
5222
  }, [
5215
- t[7] || (t[7] = o("span", { class: "wm-mm__icon" }, [
5216
- o("svg", {
5223
+ t[7] || (t[7] = l("span", { class: "wm-mm__icon" }, [
5224
+ l("svg", {
5217
5225
  width: "12",
5218
5226
  height: "12",
5219
5227
  viewBox: "0 0 24 24",
@@ -5224,22 +5232,22 @@ function Ua(e, t, s, i, a, n) {
5224
5232
  "stroke-linejoin": "round",
5225
5233
  "aria-hidden": "true"
5226
5234
  }, [
5227
- o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
5235
+ l("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
5228
5236
  ])
5229
5237
  ], -1)),
5230
- o("span", Ra, v(n.t("moreMenu.exportTranscript")), 1),
5231
- t[8] || (t[8] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
5232
- ])) : b("", !0)
5233
- ])) : b("", !0),
5234
- s.canRename || s.canExport ? (c(), d("div", La)) : b("", !0),
5235
- o("div", Ia, [
5236
- o("button", {
5238
+ l("span", Ra, v(n.t("moreMenu.exportTranscript")), 1),
5239
+ t[8] || (t[8] = l("span", { class: "wm-mm__hint" }, ".txt", -1))
5240
+ ])) : k("", !0)
5241
+ ])) : k("", !0),
5242
+ s.canRename || s.canExport ? (c(), d("div", La)) : k("", !0),
5243
+ l("div", Ia, [
5244
+ l("button", {
5237
5245
  type: "button",
5238
5246
  class: "wm-mm__item",
5239
- onClick: t[3] || (t[3] = (...r) => n.toggleSound && n.toggleSound(...r))
5247
+ onClick: t[3] || (t[3] = (...a) => n.toggleSound && n.toggleSound(...a))
5240
5248
  }, [
5241
- t[10] || (t[10] = o("span", { class: "wm-mm__icon" }, [
5242
- o("svg", {
5249
+ t[10] || (t[10] = l("span", { class: "wm-mm__icon" }, [
5250
+ l("svg", {
5243
5251
  width: "12",
5244
5252
  height: "12",
5245
5253
  viewBox: "0 0 24 24",
@@ -5250,28 +5258,28 @@ function Ua(e, t, s, i, a, n) {
5250
5258
  "stroke-linejoin": "round",
5251
5259
  "aria-hidden": "true"
5252
5260
  }, [
5253
- o("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
5254
- o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
5261
+ l("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
5262
+ l("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
5255
5263
  ])
5256
5264
  ], -1)),
5257
- o("span", Ea, v(n.t("moreMenu.sound")), 1),
5258
- o("span", {
5259
- class: R(["wm-mm__toggle", { "wm-mm__toggle--on": a.soundOn }])
5265
+ l("span", Ea, v(n.t("moreMenu.sound")), 1),
5266
+ l("span", {
5267
+ class: R(["wm-mm__toggle", { "wm-mm__toggle--on": i.soundOn }])
5260
5268
  }, [...t[9] || (t[9] = [
5261
- o("span", { class: "wm-mm__knob" }, null, -1)
5269
+ l("span", { class: "wm-mm__knob" }, null, -1)
5262
5270
  ])], 2)
5263
5271
  ])
5264
5272
  ]),
5265
- t[13] || (t[13] = o("div", { class: "wm-mm__sep" }, null, -1)),
5266
- o("div", Ba, [
5273
+ t[13] || (t[13] = l("div", { class: "wm-mm__sep" }, null, -1)),
5274
+ l("div", Ba, [
5267
5275
  s.statusUrl ? (c(), d("button", {
5268
5276
  key: 0,
5269
5277
  type: "button",
5270
5278
  class: "wm-mm__item",
5271
- onClick: t[4] || (t[4] = (r) => n.emit("status"))
5279
+ onClick: t[4] || (t[4] = (a) => n.emit("status"))
5272
5280
  }, [
5273
- t[11] || (t[11] = o("span", { class: "wm-mm__icon" }, [
5274
- o("svg", {
5281
+ t[11] || (t[11] = l("span", { class: "wm-mm__icon" }, [
5282
+ l("svg", {
5275
5283
  width: "12",
5276
5284
  height: "12",
5277
5285
  viewBox: "0 0 24 24",
@@ -5282,19 +5290,19 @@ function Ua(e, t, s, i, a, n) {
5282
5290
  "stroke-linejoin": "round",
5283
5291
  "aria-hidden": "true"
5284
5292
  }, [
5285
- o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5293
+ l("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5286
5294
  ])
5287
5295
  ], -1)),
5288
- o("span", Pa, v(n.t("moreMenu.serviceStatus")), 1)
5289
- ])) : b("", !0),
5296
+ l("span", Pa, v(n.t("moreMenu.serviceStatus")), 1)
5297
+ ])) : k("", !0),
5290
5298
  s.helpUrl ? (c(), d("button", {
5291
5299
  key: 1,
5292
5300
  type: "button",
5293
5301
  class: "wm-mm__item",
5294
- onClick: t[5] || (t[5] = (r) => n.emit("help"))
5302
+ onClick: t[5] || (t[5] = (a) => n.emit("help"))
5295
5303
  }, [
5296
- t[12] || (t[12] = o("span", { class: "wm-mm__icon" }, [
5297
- o("svg", {
5304
+ t[12] || (t[12] = l("span", { class: "wm-mm__icon" }, [
5305
+ l("svg", {
5298
5306
  width: "12",
5299
5307
  height: "12",
5300
5308
  viewBox: "0 0 24 24",
@@ -5305,16 +5313,16 @@ function Ua(e, t, s, i, a, n) {
5305
5313
  "stroke-linejoin": "round",
5306
5314
  "aria-hidden": "true"
5307
5315
  }, [
5308
- 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" })
5316
+ l("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" })
5309
5317
  ])
5310
5318
  ], -1)),
5311
- o("span", Da, v(n.t("moreMenu.helpCenter")), 1)
5312
- ])) : b("", !0)
5319
+ l("span", Na, v(n.t("moreMenu.helpCenter")), 1)
5320
+ ])) : k("", !0)
5313
5321
  ])
5314
5322
  ])
5315
5323
  ]);
5316
5324
  }
5317
- const Na = /* @__PURE__ */ P(Sa, [["render", Ua], ["__scopeId", "data-v-4cf6d578"]]), ja = {
5325
+ const Da = /* @__PURE__ */ N(Sa, [["render", Ua], ["__scopeId", "data-v-4cf6d578"]]), ja = {
5318
5326
  name: "WmRenameDialog",
5319
5327
  inject: {
5320
5328
  // Translator shared by the Messenger shell; French fallback when
@@ -5360,23 +5368,23 @@ const Na = /* @__PURE__ */ P(Sa, [["render", Ua], ["__scopeId", "data-v-4cf6d578
5360
5368
  class: "wm-dialog__card",
5361
5369
  role: "dialog",
5362
5370
  "aria-modal": "true"
5363
- }, za = { class: "wm-dialog__head" }, qa = { class: "wm-dialog__title" }, Va = ["aria-label"], $a = { class: "wm-dialog__body" }, Ka = ["placeholder"], Wa = { class: "wm-dialog__actions" }, Ga = ["disabled"];
5364
- function Ya(e, t, s, i, a, n) {
5371
+ }, za = { class: "wm-dialog__head" }, qa = { class: "wm-dialog__title" }, Va = ["aria-label"], Ka = { class: "wm-dialog__body" }, Wa = ["placeholder"], $a = { class: "wm-dialog__actions" }, Ga = ["disabled"];
5372
+ function Ya(e, t, s, r, i, n) {
5365
5373
  return c(), d("div", Fa, [
5366
- o("div", {
5374
+ l("div", {
5367
5375
  class: "wm-dialog__scrim",
5368
- onClick: t[0] || (t[0] = (r) => e.$emit("close"))
5376
+ onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5369
5377
  }),
5370
- o("div", Ha, [
5371
- o("div", za, [
5372
- o("div", qa, v(s.title || n.t("rename.title")), 1),
5373
- o("button", {
5378
+ l("div", Ha, [
5379
+ l("div", za, [
5380
+ l("div", qa, v(s.title || n.t("rename.title")), 1),
5381
+ l("button", {
5374
5382
  type: "button",
5375
5383
  class: "wm-dialog__close",
5376
5384
  "aria-label": n.t("common.close"),
5377
- onClick: t[1] || (t[1] = (r) => e.$emit("close"))
5385
+ onClick: t[1] || (t[1] = (a) => e.$emit("close"))
5378
5386
  }, [...t[7] || (t[7] = [
5379
- o("svg", {
5387
+ l("svg", {
5380
5388
  width: "12",
5381
5389
  height: "12",
5382
5390
  viewBox: "0 0 24 24",
@@ -5387,43 +5395,43 @@ function Ya(e, t, s, i, a, n) {
5387
5395
  "stroke-linejoin": "round",
5388
5396
  "aria-hidden": "true"
5389
5397
  }, [
5390
- o("path", { d: "M18 6L6 18M6 6l12 12" })
5398
+ l("path", { d: "M18 6L6 18M6 6l12 12" })
5391
5399
  ], -1)
5392
5400
  ])], 8, Va)
5393
5401
  ]),
5394
- o("div", $a, [
5395
- G(o("input", {
5402
+ l("div", Ka, [
5403
+ G(l("input", {
5396
5404
  ref: "input",
5397
- "onUpdate:modelValue": t[2] || (t[2] = (r) => a.value = r),
5405
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => i.value = a),
5398
5406
  type: "text",
5399
5407
  class: "wm-dialog__input",
5400
5408
  placeholder: s.placeholder || n.t("rename.placeholder"),
5401
5409
  maxlength: 120,
5402
5410
  onKeydown: [
5403
- t[3] || (t[3] = ge(J((...r) => n.onSubmit && n.onSubmit(...r), ["prevent"]), ["enter"])),
5404
- t[4] || (t[4] = ge(J((r) => e.$emit("close"), ["prevent"]), ["esc"]))
5411
+ t[3] || (t[3] = ge(J((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]), ["enter"])),
5412
+ t[4] || (t[4] = ge(J((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5405
5413
  ]
5406
- }, null, 40, Ka), [
5407
- [te, a.value]
5414
+ }, null, 40, Wa), [
5415
+ [te, i.value]
5408
5416
  ])
5409
5417
  ]),
5410
- o("div", Wa, [
5411
- o("button", {
5418
+ l("div", $a, [
5419
+ l("button", {
5412
5420
  type: "button",
5413
5421
  class: "wm-dialog__btn",
5414
- onClick: t[5] || (t[5] = (r) => e.$emit("close"))
5422
+ onClick: t[5] || (t[5] = (a) => e.$emit("close"))
5415
5423
  }, v(n.t("common.cancel")), 1),
5416
- o("button", {
5424
+ l("button", {
5417
5425
  type: "button",
5418
5426
  class: "wm-dialog__btn wm-dialog__btn--primary",
5419
5427
  disabled: !n.canSubmit,
5420
- onClick: t[6] || (t[6] = (...r) => n.onSubmit && n.onSubmit(...r))
5428
+ onClick: t[6] || (t[6] = (...a) => n.onSubmit && n.onSubmit(...a))
5421
5429
  }, v(n.t("common.save")), 9, Ga)
5422
5430
  ])
5423
5431
  ])
5424
5432
  ]);
5425
5433
  }
5426
- const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8"]]), Ue = "ww-messenger-tokens", Xa = {
5434
+ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8"]]), Ue = "ww-messenger-tokens", Xa = {
5427
5435
  name: "Messenger",
5428
5436
  components: {
5429
5437
  Launcher: qt,
@@ -5436,7 +5444,7 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5436
5444
  ApprovalCard: Ui,
5437
5445
  FormCard: da,
5438
5446
  Feedback: Aa,
5439
- MoreMenu: Na,
5447
+ MoreMenu: Da,
5440
5448
  RenameDialog: Ja
5441
5449
  },
5442
5450
  mixins: [
@@ -5595,9 +5603,9 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5595
5603
  // so the choice applies immediately, before the boot round-trip
5596
5604
  // that materializes `state.customer` has completed.
5597
5605
  customerLanguage() {
5598
- var s, i, a, n;
5599
- const e = (s = this.s) == null ? void 0 : s.customer, t = e && (e.language || ((i = e.values) == null ? void 0 : i.language));
5600
- return t || ((n = (a = this.context) == null ? void 0 : a.customer) == null ? void 0 : n.language) || "";
5606
+ var s, r, i, n;
5607
+ const e = (s = this.s) == null ? void 0 : s.customer, t = e && (e.language || ((r = e.values) == null ? void 0 : r.language));
5608
+ return t || ((n = (i = this.context) == null ? void 0 : i.customer) == null ? void 0 : n.language) || "";
5601
5609
  },
5602
5610
  // Resolved UI language, by priority:
5603
5611
  // 1. explicit `language` prop (consumer override)
@@ -5644,33 +5652,33 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5644
5652
  drawerConversations() {
5645
5653
  var s;
5646
5654
  const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = this.revealedAt;
5647
- return this.allConversations.map((i) => {
5648
- var k;
5649
- const a = e[i.id] || [], n = Y(i.last_read_message_id);
5650
- let r = 0, l = null;
5651
- for (let y = a.length - 1; y >= 0; y--) {
5652
- const T = a[y];
5653
- if (!T) continue;
5654
- if (((k = T.author) == null ? void 0 : k.type) === "user") break;
5655
- const E = Y(T.id);
5655
+ return this.allConversations.map((r) => {
5656
+ var b;
5657
+ const i = e[r.id] || [], n = Y(r.last_read_message_id);
5658
+ let a = 0, o = null;
5659
+ for (let y = i.length - 1; y >= 0; y--) {
5660
+ const M = i[y];
5661
+ if (!M) continue;
5662
+ if (((b = M.author) == null ? void 0 : b.type) === "user") break;
5663
+ const E = Y(M.id);
5656
5664
  if (E != null) {
5657
5665
  if (n != null && E <= n) break;
5658
- t[T.id] !== 0 && (!l && T.author && (l = T.author), r++);
5666
+ t[M.id] !== 0 && (!o && M.author && (o = M.author), a++);
5659
5667
  }
5660
5668
  }
5661
- if (!a.length) {
5662
- const y = Y(i.last_message_id);
5663
- y != null && (n == null || y > n) && (r = 1, l = i.last_message_author || null);
5669
+ if (!i.length) {
5670
+ const y = Y(r.last_message_id);
5671
+ y != null && (n == null || y > n) && (a = 1, o = r.last_message_author || null);
5664
5672
  }
5665
- const f = a.filter(
5673
+ const f = i.filter(
5666
5674
  (y) => !((y == null ? void 0 : y.id) != null && t[y.id] === 0)
5667
5675
  );
5668
5676
  return {
5669
- ...i,
5670
- _preview: _t(i, f),
5671
- _unread: r > 0,
5672
- _unreadCount: r,
5673
- _lastAuthor: l
5677
+ ...r,
5678
+ _preview: _t(r, f),
5679
+ _unread: a > 0,
5680
+ _unreadCount: a,
5681
+ _lastAuthor: o
5674
5682
  };
5675
5683
  });
5676
5684
  },
@@ -5685,14 +5693,14 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5685
5693
  openThreads() {
5686
5694
  var t;
5687
5695
  const e = ((t = this.s) == null ? void 0 : t.messagesByConv) || {};
5688
- return this.drawerConversations.filter((s) => s.status !== "resolved").map((s) => ({
5696
+ return this.drawerConversations.filter((s) => s.status !== "resolved" && s.status !== "closed").map((s) => ({
5689
5697
  id: s.id,
5690
5698
  title: s.name || this.t("common.newConversation"),
5691
5699
  preview: s._preview || this.t("onboarding.newMessage"),
5692
5700
  unread: !!s._unread,
5693
5701
  author: s._lastAuthor || null,
5694
5702
  _ts: Be(s, e[s.id] || [])
5695
- })).sort((s, i) => s._ts < i._ts ? 1 : s._ts > i._ts ? -1 : 0);
5703
+ })).sort((s, r) => s._ts < r._ts ? 1 : s._ts > r._ts ? -1 : 0);
5696
5704
  },
5697
5705
  // Unread threads (one entry per conv with unseen agent/human
5698
5706
  // activity), freshest first. Each entry carries everything the
@@ -5701,19 +5709,19 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5701
5709
  latestUnreads() {
5702
5710
  var s;
5703
5711
  const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = [];
5704
- for (const i of this.drawerConversations) {
5705
- if (!i._unread) continue;
5706
- const a = Be(i, e[i.id] || []), n = i._lastAuthor, r = !n || n.type === "agent_ia", l = (n == null ? void 0 : n.name) || (r ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (r ? this.agentAvatarUrl : null);
5712
+ for (const r of this.drawerConversations) {
5713
+ if (!r._unread) continue;
5714
+ const i = Be(r, e[r.id] || []), n = r._lastAuthor, a = !n || n.type === "agent_ia", o = (n == null ? void 0 : n.name) || (a ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (a ? this.agentAvatarUrl : null);
5707
5715
  t.push({
5708
- convId: i.id,
5709
- preview: i._preview || this.t("notification.youHaveNewMessage"),
5710
- ts: a,
5711
- count: i._unreadCount || 1,
5712
- senderName: l,
5716
+ convId: r.id,
5717
+ preview: r._preview || this.t("notification.youHaveNewMessage"),
5718
+ ts: i,
5719
+ count: r._unreadCount || 1,
5720
+ senderName: o,
5713
5721
  senderAvatarUrl: f
5714
5722
  });
5715
5723
  }
5716
- return t.sort((i, a) => i.ts < a.ts ? 1 : i.ts > a.ts ? -1 : 0), t;
5724
+ return t.sort((r, i) => r.ts < i.ts ? 1 : r.ts > i.ts ? -1 : 0), t;
5717
5725
  },
5718
5726
  // Notification cards shown in the closed-launcher stack: the unread
5719
5727
  // threads above, minus any the user has dismissed (×) for their
@@ -5749,7 +5757,7 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5749
5757
  var s;
5750
5758
  const e = (s = this.widget) == null ? void 0 : s.quick_links;
5751
5759
  if (!Array.isArray(e)) return "";
5752
- const t = e.find((i) => i.icon === "status" && i.url);
5760
+ const t = e.find((r) => r.icon === "status" && r.url);
5753
5761
  return (t == null ? void 0 : t.url) || "";
5754
5762
  },
5755
5763
  helpUrl() {
@@ -5757,7 +5765,7 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5757
5765
  const e = (s = this.widget) == null ? void 0 : s.quick_links;
5758
5766
  if (!Array.isArray(e)) return "";
5759
5767
  const t = e.find(
5760
- (i) => (i.icon === "chat" || i.icon === "help") && i.url
5768
+ (r) => (r.icon === "chat" || r.icon === "help") && r.url
5761
5769
  );
5762
5770
  return (t == null ? void 0 : t.url) || "";
5763
5771
  },
@@ -5824,12 +5832,12 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5824
5832
  // Last message from a human agent in the current conversation —
5825
5833
  // used to surface the human agent's name + avatar in the header.
5826
5834
  humanMessageAuthor() {
5827
- var t, s, i;
5835
+ var t, s, r;
5828
5836
  if (!this.currentConv) return null;
5829
5837
  const e = ((t = this.s.messagesByConv) == null ? void 0 : t[this.currentConv.id]) || [];
5830
- for (let a = e.length - 1; a >= 0; a--)
5831
- if (((i = (s = e[a]) == null ? void 0 : s.author) == null ? void 0 : i.type) === "agent_human")
5832
- return e[a].author;
5838
+ for (let i = e.length - 1; i >= 0; i--)
5839
+ if (((r = (s = e[i]) == null ? void 0 : s.author) == null ? void 0 : r.type) === "agent_human")
5840
+ return e[i].author;
5833
5841
  return null;
5834
5842
  },
5835
5843
  humanAgentName() {
@@ -5847,9 +5855,13 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5847
5855
  return !!this.humanMessageAuthor;
5848
5856
  },
5849
5857
  isWaitingHuman() {
5858
+ var e;
5859
+ return ((e = this.currentConv) == null ? void 0 : e.status) === "waiting_human_response";
5860
+ },
5861
+ isTerminal() {
5850
5862
  var t;
5851
5863
  const e = (t = this.currentConv) == null ? void 0 : t.status;
5852
- return e === "waiting" || e === "handled";
5864
+ return e === "resolved" || e === "closed";
5853
5865
  },
5854
5866
  headerTitle() {
5855
5867
  var e, t;
@@ -5861,41 +5873,55 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5861
5873
  }) : this.isWaitingHuman ? this.t("composer.agentTakingOver") : this.t("composer.placeholder");
5862
5874
  },
5863
5875
  displayedMessages() {
5864
- var a, n;
5876
+ var i, n;
5865
5877
  const e = this.currentConv;
5866
5878
  if (!e) return [];
5867
5879
  const t = this.welcomeRevealedAt[e.id] > 0 ? this.buildWelcomePrefix(e) : [];
5868
5880
  if (!e._draft) {
5869
- const r = (n = (a = this.s) == null ? void 0 : a.paginationByConv) == null ? void 0 : n[e.id];
5870
- if (!(r != null && r.loaded)) return t;
5881
+ const a = (n = (i = this.s) == null ? void 0 : i.paginationByConv) == null ? void 0 : n[e.id];
5882
+ if (!(a != null && a.loaded)) return t;
5871
5883
  }
5872
- const s = this.revealedAt, i = (this.s.messagesByConv[e.id] || []).filter((r) => {
5873
- var l, f, k, y, T;
5874
- return (r == null ? void 0 : r.type) === "action" && ((l = r == null ? void 0 : r.payload) == null ? void 0 : l.state) === "pending" || he(r) && !(s[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((f = r == null ? void 0 : r.payload) == null ? void 0 : f.type) === "system" || Array.isArray((k = r == null ? void 0 : r.payload) == null ? void 0 : k.attachments) && r.payload.attachments.length || (y = r == null ? void 0 : r.metadata) != null && y.artifact || (T = r == null ? void 0 : r.metadata) != null && T.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
5884
+ const s = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((a) => {
5885
+ var o, f, b, y, M;
5886
+ return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || he(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((b = a == null ? void 0 : a.payload) == null ? void 0 : b.attachments) && a.payload.attachments.length || (y = a == null ? void 0 : a.metadata) != null && y.artifact || (M = a == null ? void 0 : a.metadata) != null && M.form ? !0 : typeof (a == null ? void 0 : a.text_md) == "string" && a.text_md.trim().length > 0;
5875
5887
  });
5876
- return t.length ? [...t, ...i] : i;
5888
+ return t.length ? [...t, ...r] : r;
5877
5889
  },
5878
5890
  // True whenever we should show the "typing" indicator at the bottom
5879
5891
  // of the list: either the LLM is actively streaming tokens, or one
5880
5892
  // or more agent messages are queued and waiting for their reveal
5881
5893
  // slot to fire.
5882
5894
  streamingActive() {
5883
- var s, i, a;
5895
+ var s, r, i;
5884
5896
  const e = this.currentConv;
5885
- return e ? Object.keys(((s = this.s) == null ? void 0 : s.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : this.widgetWelcomeMessage && this.welcomeRevealedAt[e.id] === 0 ? !0 : (((a = (i = this.s) == null ? void 0 : i.messagesByConv) == null ? void 0 : a[e.id]) || []).some(
5897
+ return e ? Object.keys(((s = this.s) == null ? void 0 : s.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : this.widgetWelcomeMessage && this.welcomeRevealedAt[e.id] === 0 ? !0 : (((i = (r = this.s) == null ? void 0 : r.messagesByConv) == null ? void 0 : i[e.id]) || []).some(
5886
5898
  (n) => he(n) && !(this.revealedAt[n.id] > 0)
5887
5899
  ) : !1;
5888
5900
  },
5889
5901
  // Internal: the raw persisted list for the current conversation. We
5890
5902
  // watch this to detect new agent messages that need to be paced.
5891
5903
  currentConvMessages() {
5892
- var t, s, i;
5904
+ var t, s, r;
5893
5905
  const e = (t = this.currentConv) == null ? void 0 : t.id;
5894
- return e ? ((i = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : i[e]) || [] : [];
5906
+ return e ? ((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e]) || [] : [];
5895
5907
  },
5896
5908
  pendingApproval() {
5897
5909
  return !this.currentConv || !this.store || this.actionInFlight ? null : this.store.getPendingApproval(this.currentConv.id);
5898
5910
  },
5911
+ // Carte de résolution (propose_resolution) : dernier message porteur de
5912
+ // `metadata.resolution_request` dont les callbacks ne sont pas encore
5913
+ // consommés (le serveur les clear au clic) et sans clic optimiste en vol.
5914
+ pendingResolution() {
5915
+ var t, s, r, i, n;
5916
+ if (!this.currentConv || !this.store || this.actionInFlight || this.pendingApproval) return null;
5917
+ const e = ((s = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : s[this.currentConv.id]) || [];
5918
+ for (let a = e.length - 1; a >= 0; a--) {
5919
+ const o = e[a];
5920
+ if ((r = o == null ? void 0 : o.metadata) != null && r.resolution_request)
5921
+ return !Array.isArray(o.callbacks) || !o.callbacks.length || (n = (i = this.s) == null ? void 0 : i.awaitingCallback) != null && n[o.id] ? null : o;
5922
+ }
5923
+ return null;
5924
+ },
5899
5925
  // The approval card sits on top of the chat as an overlay. It must
5900
5926
  // appear only once the conversation has visibly settled, never
5901
5927
  // alongside typing dots or before the explaining bubble. See
@@ -5908,14 +5934,14 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5908
5934
  return ((t = (e = this.pendingApproval) == null ? void 0 : e.payload) == null ? void 0 : t.name) || ((s = this.pendingApproval) == null ? void 0 : s.text_md) || this.t("action.title");
5909
5935
  },
5910
5936
  approvalDetail() {
5911
- var i, a, n, r, l, f;
5912
- const e = (n = (a = (i = this.pendingApproval) == null ? void 0 : i.payload) == null ? void 0 : a.pending) == null ? void 0 : n.user_explanation;
5937
+ var r, i, n, a, o, f;
5938
+ const e = (n = (i = (r = this.pendingApproval) == null ? void 0 : r.payload) == null ? void 0 : i.pending) == null ? void 0 : n.user_explanation;
5913
5939
  if (typeof e == "string" && e.trim())
5914
5940
  return e.trim();
5915
- const t = (f = (l = (r = this.pendingApproval) == null ? void 0 : r.payload) == null ? void 0 : l.pending) == null ? void 0 : f.prepared_params;
5941
+ const t = (f = (o = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : o.pending) == null ? void 0 : f.prepared_params;
5916
5942
  if (!t || typeof t != "object") return "";
5917
5943
  const s = Object.entries(t);
5918
- return s.length ? s.slice(0, 2).map(([k, y]) => `${k}: ${y}`).join(" · ") : "";
5944
+ return s.length ? s.slice(0, 2).map(([b, y]) => `${b}: ${y}`).join(" · ") : "";
5919
5945
  },
5920
5946
  actionInFlight() {
5921
5947
  var e, t;
@@ -5935,9 +5961,9 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5935
5961
  // welcome bubble is client-side only and intentionally not
5936
5962
  // counted here.
5937
5963
  conversationIsEmpty() {
5938
- var s, i;
5964
+ var s, r;
5939
5965
  const e = this.currentConv;
5940
- return e ? e._draft ? !0 : (((i = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : i[e.id]) || []).length === 0 : !1;
5966
+ return e ? e._draft ? !0 : (((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e.id]) || []).length === 0 : !1;
5941
5967
  },
5942
5968
  // Maps `widget.starter_prompts` ({ title, message }) into the
5943
5969
  // SuggestionChips shape so they render alongside / in place of
@@ -5950,14 +5976,14 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5950
5976
  const e = (s = this.widget) == null ? void 0 : s.starter_prompts;
5951
5977
  if (!Array.isArray(e)) return [];
5952
5978
  const t = [];
5953
- for (const i of e) {
5954
- if (!i || typeof i != "object") continue;
5955
- const a = typeof i.title == "string" ? i.title.trim() : "";
5956
- if (!a) continue;
5957
- const n = typeof i.message == "string" ? i.message.trim() : "";
5979
+ for (const r of e) {
5980
+ if (!r || typeof r != "object") continue;
5981
+ const i = typeof r.title == "string" ? r.title.trim() : "";
5982
+ if (!i) continue;
5983
+ const n = typeof r.message == "string" ? r.message.trim() : "";
5958
5984
  t.push({
5959
- label: a,
5960
- text: n || a,
5985
+ label: i,
5986
+ text: n || i,
5961
5987
  kind: "starter"
5962
5988
  });
5963
5989
  }
@@ -5978,17 +6004,17 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5978
6004
  return e ? this.feedbackDone ? !0 : e.status !== "resolved" ? !1 : !((t = e.metadata) != null && t.feedback) : !1;
5979
6005
  },
5980
6006
  floatVisible() {
5981
- return this.approvalReady || !!this.pendingForm || this.showFeedback || this.suggestions.length > 0;
6007
+ return this.approvalReady || !!this.pendingResolution || !!this.pendingForm || this.showFeedback || this.suggestions.length > 0;
5982
6008
  },
5983
6009
  dateLabel() {
5984
- var s, i, a;
6010
+ var s, r, i;
5985
6011
  const e = this.currentConv;
5986
6012
  let t = /* @__PURE__ */ new Date();
5987
6013
  if (e) {
5988
- const r = ((a = (((i = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : i[e.id]) || []).find((l) => l == null ? void 0 : l.created_at)) == null ? void 0 : a.created_at) || e.created_at;
5989
- if (r) {
5990
- const l = new Date(r);
5991
- Number.isNaN(l.getTime()) || (t = l);
6014
+ const a = ((i = (((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e.id]) || []).find((o) => o == null ? void 0 : o.created_at)) == null ? void 0 : i.created_at) || e.created_at;
6015
+ if (a) {
6016
+ const o = new Date(a);
6017
+ Number.isNaN(o.getTime()) || (t = o);
5992
6018
  }
5993
6019
  }
5994
6020
  return this.t("messageList.today", {
@@ -6000,8 +6026,8 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6000
6026
  // history available, nothing loading) so the loader stays inert
6001
6027
  // until `openConversation` has populated the entry.
6002
6028
  paginationState() {
6003
- var s, i, a;
6004
- const e = (s = this.currentConv) == null ? void 0 : s.id, t = e ? (a = (i = this.s) == null ? void 0 : i.paginationByConv) == null ? void 0 : a[e] : null;
6029
+ var s, r, i;
6030
+ const e = (s = this.currentConv) == null ? void 0 : s.id, t = e ? (i = (r = this.s) == null ? void 0 : r.paginationByConv) == null ? void 0 : i[e] : null;
6005
6031
  return {
6006
6032
  loading: !!(t != null && t.loading),
6007
6033
  hasMore: !!(t != null && t.nextCursor)
@@ -6016,13 +6042,13 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6016
6042
  // ts comparison in `launcherPeeks`.
6017
6043
  latestUnreads: {
6018
6044
  handler(e) {
6019
- const t = new Set(e.map((r) => r.convId)), s = this.dismissedPeeks || {}, i = Object.keys(s);
6020
- if (!i.length) return;
6021
- const a = {};
6045
+ const t = new Set(e.map((a) => a.convId)), s = this.dismissedPeeks || {}, r = Object.keys(s);
6046
+ if (!r.length) return;
6047
+ const i = {};
6022
6048
  let n = !1;
6023
- for (const r of i)
6024
- t.has(r) ? a[r] = s[r] : n = !0;
6025
- n && (this.dismissedPeeks = a);
6049
+ for (const a of r)
6050
+ t.has(a) ? i[a] = s[a] : n = !0;
6051
+ n && (this.dismissedPeeks = i);
6026
6052
  },
6027
6053
  deep: !0
6028
6054
  },
@@ -6135,8 +6161,8 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6135
6161
  const t = e == null ? void 0 : e.data;
6136
6162
  if (!(!t || typeof t != "object")) {
6137
6163
  if (t.type === "UPDATE") {
6138
- this.transport && t.payload && this.transport.update(t.payload).catch((i) => {
6139
- console.warn("[messenger] update failed", i);
6164
+ this.transport && t.payload && this.transport.update(t.payload).catch((r) => {
6165
+ console.warn("[messenger] update failed", r);
6140
6166
  });
6141
6167
  return;
6142
6168
  }
@@ -6144,8 +6170,8 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6144
6170
  this.transport && t.payload && this.transport.context(t.payload);
6145
6171
  return;
6146
6172
  }
6147
- t.type === "INIT" && (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentVariables = t.variables && typeof t.variables == "object" ? t.variables : t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (s = this.parentInitDeferred) != null && s._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.parentToken && this.hasValidSessionMarker() && this.boot().catch((i) => {
6148
- console.warn("[messenger] eager boot failed", i);
6173
+ t.type === "INIT" && (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentVariables = t.variables && typeof t.variables == "object" ? t.variables : t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (s = this.parentInitDeferred) != null && s._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.parentToken && this.hasValidSessionMarker() && this.boot().catch((r) => {
6174
+ console.warn("[messenger] eager boot failed", r);
6149
6175
  }));
6150
6176
  }
6151
6177
  },
@@ -6179,8 +6205,8 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6179
6205
  variables: e && typeof e == "object" ? e : void 0
6180
6206
  }), e && typeof e == "object") {
6181
6207
  const t = {};
6182
- for (const [s, i] of Object.entries(e))
6183
- s !== "customer" && i && typeof i == "object" && !Array.isArray(i) && (t[s] = i);
6208
+ for (const [s, r] of Object.entries(e))
6209
+ s !== "customer" && r && typeof r == "object" && !Array.isArray(r) && (t[s] = r);
6184
6210
  Object.keys(t).length > 0 && this.transport.context(t);
6185
6211
  }
6186
6212
  this.setupLiveReveal();
@@ -6206,12 +6232,12 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6206
6232
  return;
6207
6233
  }
6208
6234
  this.floatRO = new ResizeObserver((s) => {
6209
- const i = s[0];
6210
- if (!i) return;
6211
- const a = Math.ceil(i.contentRect.height + 8);
6212
- a !== this.floatHeight && (this.floatHeight = a, this.$nextTick(() => {
6213
- var n, r;
6214
- (r = (n = this.$refs.messageList) == null ? void 0 : n.scrollToBottom) == null || r.call(n);
6235
+ const r = s[0];
6236
+ if (!r) return;
6237
+ const i = Math.ceil(r.contentRect.height + 8);
6238
+ i !== this.floatHeight && (this.floatHeight = i, this.$nextTick(() => {
6239
+ var n, a;
6240
+ (a = (n = this.$refs.messageList) == null ? void 0 : n.scrollToBottom) == null || a.call(n);
6215
6241
  }));
6216
6242
  }), this.floatRO.observe(t);
6217
6243
  }
@@ -6265,37 +6291,37 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6265
6291
  this.launcherHovered = e, this.sendCurrentLauncherSize();
6266
6292
  },
6267
6293
  sendCurrentLauncherSize() {
6268
- var y, T, E, A, q, M, U;
6294
+ var y, M, E, A, q, T, U;
6269
6295
  if (this.isOpen) return;
6270
- const e = (T = (y = this.$el) == null ? void 0 : y.querySelector) == null ? void 0 : T.call(y, ".wm-launcherWrap");
6296
+ const e = (M = (y = this.$el) == null ? void 0 : y.querySelector) == null ? void 0 : M.call(y, ".wm-launcherWrap");
6271
6297
  if (!e) return;
6272
6298
  const t = e.getBoundingClientRect();
6273
6299
  if (!t.width || !t.height) return;
6274
- const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, i = 16, a = Math.ceil(t.width), n = Math.ceil(t.height), r = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), l = (U = (M = this.$el) == null ? void 0 : M.querySelectorAll) == null ? void 0 : U.call(M, ".wm-peek"), f = l && l.length ? l[l.length - 1] : null;
6275
- let k = null;
6300
+ const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), o = (U = (T = this.$el) == null ? void 0 : T.querySelectorAll) == null ? void 0 : U.call(T, ".wm-peek"), f = o && o.length ? o[o.length - 1] : null;
6301
+ let b = null;
6276
6302
  if (f) {
6277
- const N = f.getBoundingClientRect();
6278
- k = {
6279
- width: Math.ceil(N.width),
6280
- height: Math.ceil(N.height),
6281
- rightOffset: Math.max(0, Math.ceil(t.right - N.right)),
6282
- bottomOffset: Math.max(0, Math.ceil(t.bottom - N.bottom))
6303
+ const D = f.getBoundingClientRect();
6304
+ b = {
6305
+ width: Math.ceil(D.width),
6306
+ height: Math.ceil(D.height),
6307
+ rightOffset: Math.max(0, Math.ceil(t.right - D.right)),
6308
+ bottomOffset: Math.max(0, Math.ceil(t.bottom - D.bottom))
6283
6309
  };
6284
6310
  }
6285
6311
  this.notifyParentResize("closed", {
6286
- width: a + i,
6287
- height: n + i,
6288
- launcherWidth: (r == null ? void 0 : r.offsetWidth) || null,
6289
- launcherHeight: (r == null ? void 0 : r.offsetHeight) || null,
6312
+ width: i + r,
6313
+ height: n + r,
6314
+ launcherWidth: (a == null ? void 0 : a.offsetWidth) || null,
6315
+ launcherHeight: (a == null ? void 0 : a.offsetHeight) || null,
6290
6316
  launcherHovered: this.launcherHovered,
6291
- peek: k,
6317
+ peek: b,
6292
6318
  peekHovered: this.launcherHovered && s
6293
6319
  });
6294
6320
  },
6295
6321
  observeLauncherSize() {
6296
- var s, i;
6322
+ var s, r;
6297
6323
  if (typeof ResizeObserver > "u") return;
6298
- const e = (i = (s = this.$el) == null ? void 0 : s.querySelector) == null ? void 0 : i.call(s, ".wm-launcherWrap");
6324
+ const e = (r = (s = this.$el) == null ? void 0 : s.querySelector) == null ? void 0 : r.call(s, ".wm-launcherWrap");
6299
6325
  if (!e) return;
6300
6326
  this._launcherRo && this._launcherRo.disconnect();
6301
6327
  const t = new ResizeObserver(() => {
@@ -6306,9 +6332,9 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6306
6332
  // Opening straight from a notification card: land on that card's
6307
6333
  // thread rather than whatever was last active.
6308
6334
  async openFromPeek(e) {
6309
- var s, i;
6335
+ var s, r;
6310
6336
  const t = e || ((s = this.latestUnreads[0]) == null ? void 0 : s.convId);
6311
- t && t !== ((i = this.currentConv) == null ? void 0 : i.id) && (this.draftConv = null, this.activeConvId = t, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1), await this.open();
6337
+ t && t !== ((r = this.currentConv) == null ? void 0 : r.id) && (this.draftConv = null, this.activeConvId = t, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1), await this.open();
6312
6338
  },
6313
6339
  // Stamp the dismissed batch ts for a single conv so its card
6314
6340
  // disappears from the stack until a fresher message arrives.
@@ -6408,17 +6434,17 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6408
6434
  ...this.welcomeRevealedAt,
6409
6435
  [e]: 0
6410
6436
  };
6411
- const a = this.revealPacing, n = t.trim().length, r = Math.min(
6412
- a.maxTypingMs,
6413
- Math.max(a.minTypingMs, n * a.msPerChar)
6414
- ), l = a.firstRevealDelayMs + r, f = setTimeout(() => {
6437
+ const i = this.revealPacing, n = t.trim().length, a = Math.min(
6438
+ i.maxTypingMs,
6439
+ Math.max(i.minTypingMs, n * i.msPerChar)
6440
+ ), o = i.firstRevealDelayMs + a, f = setTimeout(() => {
6415
6441
  this.welcomeRevealedAt = {
6416
6442
  ...this.welcomeRevealedAt,
6417
6443
  [e]: Date.now()
6418
6444
  };
6419
- const k = { ...this.welcomeRevealTimers };
6420
- delete k[e], this.welcomeRevealTimers = k;
6421
- }, l);
6445
+ const b = { ...this.welcomeRevealTimers };
6446
+ delete b[e], this.welcomeRevealTimers = b;
6447
+ }, o);
6422
6448
  this.welcomeRevealTimers = {
6423
6449
  ...this.welcomeRevealTimers,
6424
6450
  [e]: f
@@ -6448,10 +6474,10 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6448
6474
  this.draftConv = null, this.activeConvId = e.id, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = t;
6449
6475
  try {
6450
6476
  await this.store.openConversation(e.id);
6451
- } catch (i) {
6452
- console.error("[ww-messenger] open conv failed", i);
6477
+ } catch (r) {
6478
+ console.error("[ww-messenger] open conv failed", r);
6453
6479
  }
6454
- const s = this.allConversations.find((i) => i.id === e.id);
6480
+ const s = this.allConversations.find((r) => r.id === e.id);
6455
6481
  s && this.markConvRead(s);
6456
6482
  },
6457
6483
  async onMoreAction(e) {
@@ -6495,8 +6521,8 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6495
6521
  if (!(!s || s === t.name))
6496
6522
  try {
6497
6523
  await this.store.patchConversation(t.id, { name: s });
6498
- } catch (i) {
6499
- console.error("[ww-messenger] rename failed", i);
6524
+ } catch (r) {
6525
+ console.error("[ww-messenger] rename failed", r);
6500
6526
  }
6501
6527
  },
6502
6528
  // ── Send / suggestion / form / attach / feedback ────────────────
@@ -6504,14 +6530,14 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6504
6530
  let t = this.currentConv;
6505
6531
  if (!t && (this.startConv(), t = this.currentConv, !t) || t._draft && (t = await this.ensureRealConv(), !t))
6506
6532
  return;
6507
- const s = t.id, i = this.pendingAttachments.slice();
6533
+ const s = t.id, r = this.pendingAttachments.slice();
6508
6534
  this.pendingAttachments = [], this.unreadAnchorId = null, this.unreadBoundaryTs = "";
6509
- const a = i.map((n) => {
6510
- const { previewUrl: r, ...l } = n;
6511
- return l;
6535
+ const i = r.map((n) => {
6536
+ const { previewUrl: a, ...o } = n;
6537
+ return o;
6512
6538
  });
6513
6539
  await this.store.send(s, e, {
6514
- attachments: a.length ? a : void 0
6540
+ attachments: i.length ? i : void 0
6515
6541
  });
6516
6542
  },
6517
6543
  async onSuggestion(e) {
@@ -6527,13 +6553,17 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6527
6553
  const t = this.pendingApproval;
6528
6554
  t && await this.store.clickCallback(t.id, e);
6529
6555
  },
6556
+ async onResolutionCallback(e) {
6557
+ const t = this.pendingResolution;
6558
+ t && await this.store.clickCallback(t.id, e);
6559
+ },
6530
6560
  async onFormSubmit({ values: e }) {
6531
6561
  const t = this.pendingForm;
6532
6562
  if (!(t != null && t.form)) return;
6533
6563
  const s = ht(t.form, e, this.translator);
6534
6564
  if (!s) return;
6535
- let i = this.currentConv;
6536
- i && (i._draft && (i = await this.ensureRealConv(), !i) || await this.store.send(i.id, s, {
6565
+ let r = this.currentConv;
6566
+ r && (r._draft && (r = await this.ensureRealConv(), !r) || await this.store.send(r.id, s, {
6537
6567
  metadata: {
6538
6568
  artifact: mt(
6539
6569
  t.form,
@@ -6561,23 +6591,23 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6561
6591
  var t, s;
6562
6592
  if (!(!e || !this.transport))
6563
6593
  try {
6564
- const i = await this.transport.uploadAttachment(e), a = (i == null ? void 0 : i.type) === "image" || (e.type || "").toLowerCase().startsWith("image/") || ((i == null ? void 0 : i.mime_type) || "").toLowerCase().startsWith("image/");
6594
+ const r = await this.transport.uploadAttachment(e), i = (r == null ? void 0 : r.type) === "image" || (e.type || "").toLowerCase().startsWith("image/") || ((r == null ? void 0 : r.mime_type) || "").toLowerCase().startsWith("image/");
6565
6595
  let n = null;
6566
- if (a)
6596
+ if (i)
6567
6597
  try {
6568
- n = await ((s = (t = this.store) == null ? void 0 : t.signAttachment) == null ? void 0 : s.call(t, i.path)) || null;
6598
+ n = await ((s = (t = this.store) == null ? void 0 : t.signAttachment) == null ? void 0 : s.call(t, r.path)) || null;
6569
6599
  } catch {
6570
6600
  }
6571
6601
  this.pendingAttachments.push({
6572
- type: i.type || "file",
6573
- path: i.path,
6602
+ type: r.type || "file",
6603
+ path: r.path,
6574
6604
  name: e.name || this.t("attachment.fileFallbackName"),
6575
6605
  mime_type: e.type,
6576
6606
  size_bytes: e.size,
6577
6607
  previewUrl: n
6578
6608
  });
6579
- } catch (i) {
6580
- console.error("[ww-messenger] attachment upload failed", i);
6609
+ } catch (r) {
6610
+ console.error("[ww-messenger] attachment upload failed", r);
6581
6611
  }
6582
6612
  },
6583
6613
  // Délégation des clics sur les liens `<a href="#...">` rendus dans le
@@ -6666,42 +6696,47 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6666
6696
  }, ho = { class: "wm-attached__fileMeta" }, mo = { class: "wm-attached__fileName" }, fo = {
6667
6697
  key: 0,
6668
6698
  class: "wm-attached__fileSize"
6669
- }, _o = ["aria-label", "onClick"];
6670
- function go(e, t, s, i, a, n) {
6671
- const r = B("Launcher"), l = B("Header"), f = B("History"), k = B("Onboarding"), y = B("MessageList"), T = B("ApprovalCard"), E = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), M = B("Composer"), U = B("MoreMenu"), N = B("RenameDialog");
6699
+ }, _o = ["aria-label", "onClick"], go = {
6700
+ key: 3,
6701
+ class: "wm-ended",
6702
+ role: "status",
6703
+ "aria-live": "polite"
6704
+ }, po = { class: "wm-ended__lbl" };
6705
+ function vo(e, t, s, r, i, n) {
6706
+ const a = B("Launcher"), o = B("Header"), f = B("History"), b = B("Onboarding"), y = B("MessageList"), M = B("ApprovalCard"), E = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), T = B("Composer"), U = B("MoreMenu"), D = B("RenameDialog");
6672
6707
  return c(), d("div", {
6673
6708
  class: R(["wm-root", `wm-root--${s.displayMode}`]),
6674
6709
  style: z(n.rootStyle)
6675
6710
  }, [
6676
- !a.isOpen && !n.isEmbedded ? (c(), D(r, {
6711
+ !i.isOpen && !n.isEmbedded ? (c(), P(a, {
6677
6712
  key: 0,
6678
6713
  "unread-count": n.unreadCount,
6679
6714
  peeks: n.launcherPeeks,
6680
6715
  onOpen: n.openFromPeek,
6681
6716
  onDismiss: n.dismissPeek,
6682
6717
  onHover: n.onLauncherHover
6683
- }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
6684
- a.isOpen || n.isEmbedded ? (c(), d("section", {
6718
+ }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : k("", !0),
6719
+ i.isOpen || n.isEmbedded ? (c(), d("section", {
6685
6720
  key: 1,
6686
6721
  class: R([
6687
6722
  "wm-panel",
6688
6723
  `wm-panel--${s.displayMode}`,
6689
6724
  { "wm-panel--welcome": n.ready && !n.error && !n.currentConv }
6690
6725
  ]),
6691
- style: z(a.floatHeight ? { "--wm-float-h": a.floatHeight + "px" } : null),
6726
+ style: z(i.floatHeight ? { "--wm-float-h": i.floatHeight + "px" } : null),
6692
6727
  role: "dialog",
6693
6728
  "aria-label": "Messenger",
6694
- onClick: t[6] || (t[6] = (...L) => n.onPanelClick && n.onPanelClick(...L))
6729
+ onClick: t[7] || (t[7] = (...L) => n.onPanelClick && n.onPanelClick(...L))
6695
6730
  }, [
6696
6731
  !n.ready && !n.error ? (c(), d("div", Qa, [
6697
- n.isEmbedded ? b("", !0) : (c(), d("button", {
6732
+ n.isEmbedded ? k("", !0) : (c(), d("button", {
6698
6733
  key: 0,
6699
6734
  type: "button",
6700
6735
  class: "wm-loading__close",
6701
6736
  "aria-label": n.t("loading.minimize"),
6702
6737
  onClick: t[0] || (t[0] = (...L) => n.close && n.close(...L))
6703
- }, [...t[7] || (t[7] = [
6704
- o("svg", {
6738
+ }, [...t[8] || (t[8] = [
6739
+ l("svg", {
6705
6740
  width: "13",
6706
6741
  height: "13",
6707
6742
  viewBox: "0 0 24 24",
@@ -6712,22 +6747,22 @@ function go(e, t, s, i, a, n) {
6712
6747
  "stroke-linejoin": "round",
6713
6748
  "aria-hidden": "true"
6714
6749
  }, [
6715
- o("path", { d: "M18 6L6 18M6 6l12 12" })
6750
+ l("path", { d: "M18 6L6 18M6 6l12 12" })
6716
6751
  ], -1)
6717
6752
  ])], 8, Za)),
6718
- t[8] || (t[8] = o("div", {
6753
+ t[9] || (t[9] = l("div", {
6719
6754
  class: "wm-loading__spinner",
6720
6755
  "aria-hidden": "true"
6721
6756
  }, null, -1))
6722
6757
  ])) : (c(), d(I, { key: 1 }, [
6723
- $(l, {
6758
+ K(o, {
6724
6759
  title: n.headerTitle,
6725
6760
  "team-members": n.teamMembers,
6726
6761
  "response-label": n.responseLabel,
6727
6762
  "show-identity": !!n.currentConv,
6728
6763
  "show-back": n.canBack,
6729
6764
  "show-close": !n.isEmbedded,
6730
- "more-active": a.moreOpen,
6765
+ "more-active": i.moreOpen,
6731
6766
  "agent-name": n.agentName,
6732
6767
  "agent-avatar-url": n.agentAvatarUrl,
6733
6768
  onBack: n.goHome,
@@ -6735,9 +6770,9 @@ function go(e, t, s, i, a, n) {
6735
6770
  onClose: n.close
6736
6771
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
6737
6772
  n.error ? (c(), d("div", eo, [
6738
- o("div", to, [
6739
- t[9] || (t[9] = o("div", { class: "wm-state__errIcon" }, [
6740
- o("svg", {
6773
+ l("div", to, [
6774
+ t[10] || (t[10] = l("div", { class: "wm-state__errIcon" }, [
6775
+ l("svg", {
6741
6776
  width: "14",
6742
6777
  height: "14",
6743
6778
  viewBox: "0 0 24 24",
@@ -6748,20 +6783,20 @@ function go(e, t, s, i, a, n) {
6748
6783
  "stroke-linejoin": "round",
6749
6784
  "aria-hidden": "true"
6750
6785
  }, [
6751
- o("path", { d: "M18 6L6 18M6 6l12 12" })
6786
+ l("path", { d: "M18 6L6 18M6 6l12 12" })
6752
6787
  ])
6753
6788
  ], -1)),
6754
- o("div", null, [
6755
- o("div", no, v(n.t("error.connectionFailed")), 1),
6756
- o("div", so, v(n.error), 1)
6789
+ l("div", null, [
6790
+ l("div", no, v(n.t("error.connectionFailed")), 1),
6791
+ l("div", so, v(n.error), 1)
6757
6792
  ])
6758
6793
  ])
6759
- ])) : !n.currentConv && a.showHistory ? (c(), D(f, {
6794
+ ])) : !n.currentConv && i.showHistory ? (c(), P(f, {
6760
6795
  key: 1,
6761
6796
  threads: n.openThreads,
6762
6797
  onResume: n.onDrawerPick
6763
6798
  }, null, 8, ["threads", "onResume"])) : n.currentConv ? (c(), d(I, { key: 3 }, [
6764
- $(y, {
6799
+ K(y, {
6765
6800
  ref: "messageList",
6766
6801
  messages: n.displayedMessages,
6767
6802
  "streaming-active": n.streamingActive,
@@ -6775,9 +6810,9 @@ function go(e, t, s, i, a, n) {
6775
6810
  "ai-agent-avatar-url": n.agentAvatarUrl,
6776
6811
  onLoadMore: n.onLoadMore
6777
6812
  }, 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"]),
6778
- o("div", ro, [
6813
+ l("div", ro, [
6779
6814
  n.floatVisible ? (c(), d("div", io, [
6780
- n.approvalReady ? (c(), D(T, {
6815
+ n.approvalReady ? (c(), P(M, {
6781
6816
  key: 0,
6782
6817
  action: n.approvalTitle,
6783
6818
  detail: n.approvalDetail,
@@ -6785,35 +6820,42 @@ function go(e, t, s, i, a, n) {
6785
6820
  "agent-name": n.agentName,
6786
6821
  "agent-avatar-url": n.agentAvatarUrl,
6787
6822
  onCallback: n.onApprovalCallback
6788
- }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingForm ? (c(), D(E, {
6823
+ }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingResolution ? (c(), P(M, {
6824
+ key: 1,
6825
+ action: n.pendingResolution.text_md,
6826
+ callbacks: n.pendingResolution.callbacks,
6827
+ "agent-name": n.agentName,
6828
+ "agent-avatar-url": n.agentAvatarUrl,
6829
+ onCallback: n.onResolutionCallback
6830
+ }, null, 8, ["action", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingForm ? (c(), P(E, {
6789
6831
  key: n.pendingForm.message && n.pendingForm.message.id,
6790
6832
  form: n.pendingForm.form,
6791
6833
  "agent-name": n.agentName,
6792
6834
  "agent-avatar-url": n.agentAvatarUrl,
6793
6835
  onSubmit: n.onFormSubmit
6794
- }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), D(A, {
6795
- key: 2,
6796
- busy: a.feedbackBusy,
6797
- done: a.feedbackDone,
6798
- onSubmit: n.onFeedback
6799
- }, null, 8, ["busy", "done", "onSubmit"])) : (c(), D(q, {
6836
+ }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), P(A, {
6800
6837
  key: 3,
6838
+ busy: i.feedbackBusy,
6839
+ done: i.feedbackDone,
6840
+ onSubmit: n.onFeedback
6841
+ }, null, 8, ["busy", "done", "onSubmit"])) : (c(), P(q, {
6842
+ key: 4,
6801
6843
  items: n.suggestions,
6802
6844
  onSelect: n.onSuggestion
6803
6845
  }, null, 8, ["items", "onSelect"]))
6804
- ], 512)) : b("", !0),
6846
+ ], 512)) : k("", !0),
6805
6847
  n.actionInFlight ? (c(), d("div", ao, [
6806
- t[10] || (t[10] = o("span", {
6848
+ t[11] || (t[11] = l("span", {
6807
6849
  class: "wm-actionWait__spinner",
6808
6850
  "aria-hidden": "true"
6809
6851
  }, null, -1)),
6810
- o("span", oo, v(n.t("action.inProgress", {
6852
+ l("span", oo, v(n.t("action.inProgress", {
6811
6853
  name: n.actionInFlightName
6812
6854
  })), 1)
6813
- ])) : b("", !0),
6814
- a.pendingAttachments.length ? (c(), d("div", lo, [
6815
- (c(!0), d(I, null, j(a.pendingAttachments, (L, K) => (c(), d("div", {
6816
- key: L.path || K,
6855
+ ])) : k("", !0),
6856
+ i.pendingAttachments.length ? (c(), d("div", lo, [
6857
+ (c(!0), d(I, null, j(i.pendingAttachments, (L, W) => (c(), d("div", {
6858
+ key: L.path || W,
6817
6859
  class: "wm-attached__item"
6818
6860
  }, [
6819
6861
  L.previewUrl ? (c(), d("img", {
@@ -6822,8 +6864,8 @@ function go(e, t, s, i, a, n) {
6822
6864
  src: L.previewUrl,
6823
6865
  alt: L.name
6824
6866
  }, null, 8, co)) : (c(), d("div", uo, [
6825
- t[11] || (t[11] = o("span", { class: "wm-attached__fileIcon" }, [
6826
- o("svg", {
6867
+ t[12] || (t[12] = l("span", { class: "wm-attached__fileIcon" }, [
6868
+ l("svg", {
6827
6869
  width: "16",
6828
6870
  height: "16",
6829
6871
  viewBox: "0 0 24 24",
@@ -6834,24 +6876,24 @@ function go(e, t, s, i, a, n) {
6834
6876
  "stroke-linejoin": "round",
6835
6877
  "aria-hidden": "true"
6836
6878
  }, [
6837
- o("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
6838
- o("path", { d: "M14 2v6h6" })
6879
+ l("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
6880
+ l("path", { d: "M14 2v6h6" })
6839
6881
  ])
6840
6882
  ], -1)),
6841
- o("span", ho, [
6842
- o("span", mo, v(L.name), 1),
6883
+ l("span", ho, [
6884
+ l("span", mo, v(L.name), 1),
6843
6885
  n.formatAttachmentSize(L.size_bytes) ? (c(), d("span", fo, v(n.formatAttachmentSize(
6844
6886
  L.size_bytes
6845
- )), 1)) : b("", !0)
6887
+ )), 1)) : k("", !0)
6846
6888
  ])
6847
6889
  ])),
6848
- o("button", {
6890
+ l("button", {
6849
6891
  type: "button",
6850
6892
  class: "wm-attached__remove",
6851
6893
  "aria-label": n.t("attachment.remove"),
6852
- onClick: (Q) => n.removePendingAttachment(K)
6853
- }, [...t[12] || (t[12] = [
6854
- o("svg", {
6894
+ onClick: (Q) => n.removePendingAttachment(W)
6895
+ }, [...t[13] || (t[13] = [
6896
+ l("svg", {
6855
6897
  width: "10",
6856
6898
  height: "10",
6857
6899
  viewBox: "0 0 24 24",
@@ -6862,16 +6904,23 @@ function go(e, t, s, i, a, n) {
6862
6904
  "stroke-linejoin": "round",
6863
6905
  "aria-hidden": "true"
6864
6906
  }, [
6865
- o("path", { d: "M18 6L6 18M6 6l12 12" })
6907
+ l("path", { d: "M18 6L6 18M6 6l12 12" })
6866
6908
  ], -1)
6867
6909
  ])], 8, _o)
6868
6910
  ]))), 128))
6869
- ])) : b("", !0),
6870
- n.actionInFlight ? b("", !0) : (c(), D(M, {
6871
- key: 3,
6911
+ ])) : k("", !0),
6912
+ n.isTerminal ? (c(), d("div", go, [
6913
+ l("span", po, v(n.t("composer.conversationEnded")), 1),
6914
+ l("button", {
6915
+ type: "button",
6916
+ class: "wm-ended__btn",
6917
+ onClick: t[2] || (t[2] = (...L) => n.startConv && n.startConv(...L))
6918
+ }, v(n.t("composer.newConversation")), 1)
6919
+ ])) : n.actionInFlight ? k("", !0) : (c(), P(T, {
6920
+ key: 4,
6872
6921
  ref: "composer",
6873
- modelValue: a.draft,
6874
- "onUpdate:modelValue": t[2] || (t[2] = (L) => a.draft = L),
6922
+ modelValue: i.draft,
6923
+ "onUpdate:modelValue": t[3] || (t[3] = (L) => i.draft = L),
6875
6924
  placeholder: n.composerPlaceholder,
6876
6925
  disabled: !!n.pendingApproval,
6877
6926
  "attach-label": n.t("composer.attachFile"),
@@ -6880,25 +6929,25 @@ function go(e, t, s, i, a, n) {
6880
6929
  onAttach: n.onAttach
6881
6930
  }, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "display-mode", "onSend", "onAttach"]))
6882
6931
  ]),
6883
- a.moreOpen ? (c(), D(U, {
6932
+ i.moreOpen ? (c(), P(U, {
6884
6933
  key: 0,
6885
6934
  "can-rename": !!n.currentConv && !n.currentConv._draft,
6886
6935
  "can-export": !!n.currentConv && !n.currentConv._draft,
6887
6936
  "sound-enabled": e.soundEnabled,
6888
6937
  "status-url": n.statusUrl,
6889
6938
  "help-url": n.helpUrl,
6890
- onClose: t[3] || (t[3] = (L) => a.moreOpen = !1),
6939
+ onClose: t[4] || (t[4] = (L) => i.moreOpen = !1),
6891
6940
  onSoundToggle: e.onSoundToggle,
6892
6941
  onAction: n.onMoreAction
6893
- }, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0),
6894
- a.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), D(N, {
6942
+ }, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0),
6943
+ i.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), P(D, {
6895
6944
  key: 1,
6896
6945
  "initial-value": n.currentConv.name || "",
6897
6946
  title: n.t("rename.dialogTitle"),
6898
- onClose: t[4] || (t[4] = (L) => a.renameDialogOpen = !1),
6947
+ onClose: t[5] || (t[5] = (L) => i.renameDialogOpen = !1),
6899
6948
  onSubmit: n.onRenameSubmit
6900
- }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0)
6901
- ], 64)) : (c(), D(k, {
6949
+ }, null, 8, ["initial-value", "title", "onSubmit"])) : k("", !0)
6950
+ ], 64)) : (c(), P(b, {
6902
6951
  key: 2,
6903
6952
  title: n.widgetTitle,
6904
6953
  subtitle: n.widgetSubtitle,
@@ -6906,35 +6955,35 @@ function go(e, t, s, i, a, n) {
6906
6955
  "default-icon-url": n.defaultIconUrl,
6907
6956
  "quick-links": n.quickLinks,
6908
6957
  "open-threads": n.openThreads,
6909
- busy: a.busy,
6958
+ busy: i.busy,
6910
6959
  onStart: n.startConv,
6911
6960
  onSelect: n.onQuickLink,
6912
6961
  onResume: n.onDrawerPick,
6913
- onViewHistory: t[1] || (t[1] = (L) => a.showHistory = !0)
6962
+ onViewHistory: t[1] || (t[1] = (L) => i.showHistory = !0)
6914
6963
  }, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
6915
- a.moreOpen && !n.currentConv ? (c(), D(U, {
6964
+ i.moreOpen && !n.currentConv ? (c(), P(U, {
6916
6965
  key: 4,
6917
6966
  "can-rename": !1,
6918
6967
  "can-export": !1,
6919
6968
  "sound-enabled": e.soundEnabled,
6920
6969
  "status-url": n.statusUrl,
6921
6970
  "help-url": n.helpUrl,
6922
- onClose: t[5] || (t[5] = (L) => a.moreOpen = !1),
6971
+ onClose: t[6] || (t[6] = (L) => i.moreOpen = !1),
6923
6972
  onSoundToggle: e.onSoundToggle,
6924
6973
  onAction: n.onMoreAction
6925
- }, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0)
6974
+ }, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0)
6926
6975
  ], 64))
6927
- ], 6)) : b("", !0)
6976
+ ], 6)) : k("", !0)
6928
6977
  ], 6);
6929
6978
  }
6930
- const yo = /* @__PURE__ */ P(Xa, [["render", go], ["__scopeId", "data-v-fa8045f9"]]), wo = "0.5.76";
6979
+ const bo = /* @__PURE__ */ N(Xa, [["render", vo], ["__scopeId", "data-v-b2c24313"]]), ko = "0.5.77";
6931
6980
  export {
6932
6981
  oe as AIAvatar,
6933
6982
  be as AVATAR_COLORS,
6934
6983
  As as ActionResult,
6935
6984
  Ui as ApprovalCard,
6936
6985
  Es as ArtifactFormResponse,
6937
- Ks as ArtifactInfoCard,
6986
+ Ws as ArtifactInfoCard,
6938
6987
  ur as ArtifactRenderer,
6939
6988
  or as ArtifactTicket,
6940
6989
  Cr as AttachmentPreview,
@@ -6949,15 +6998,15 @@ export {
6949
6998
  qt as Launcher,
6950
6999
  Oe as MEDIA_RECORDER_SUPPORTED,
6951
7000
  ri as MessageList,
6952
- yo as Messenger,
6953
- Na as MoreMenu,
7001
+ bo as Messenger,
7002
+ Da as MoreMenu,
6954
7003
  Jn as Onboarding,
6955
7004
  pe as SCREEN_CAPTURE_SUPPORTED,
6956
7005
  ut as SUPPORTED_LANGUAGES,
6957
7006
  Ti as SuggestionChips,
6958
7007
  tn as TeamAvatars,
6959
7008
  Lr as Typing,
6960
- wo as VERSION,
7009
+ ko as VERSION,
6961
7010
  Me as avatarColor,
6962
7011
  Te as avatarInitials,
6963
7012
  ai as captureScreenshotFile,
@@ -6966,9 +7015,9 @@ export {
6966
7015
  F as createTranslator,
6967
7016
  Ze as createTransport,
6968
7017
  ne as dateLocale,
6969
- yo as default,
7018
+ bo as default,
6970
7019
  Ce as formatTime,
6971
- vo as guessAttachmentKind,
7020
+ wo as guessAttachmentKind,
6972
7021
  ii as pickRecorderMime,
6973
7022
  qe as renderInlineMarkdown,
6974
7023
  ft as renderMarkdown,