@_solaris/messenger-widget 0.5.43 → 0.5.44

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,15 +1,15 @@
1
- import { reactive as He, openBlock as c, createElementBlock as d, normalizeStyle as H, normalizeClass as I, toDisplayString as v, resolveComponent as R, createVNode as K, Transition as Pe, withCtx as Ue, Fragment as E, renderList as j, withKeys as me, withModifiers as Y, createElementVNode as a, createCommentVNode as w, createBlock as P, resolveDynamicComponent as ye, mergeProps as Te, withDirectives as W, vModelText as ee, createTextVNode as be, renderSlot as ze, vModelCheckbox as qe, vModelSelect as Ve, markRaw as xe } from "vue";
2
- const Ke = [
1
+ import { reactive as qe, openBlock as c, createElementBlock as d, normalizeStyle as H, normalizeClass as I, toDisplayString as v, resolveComponent as R, createVNode as K, Transition as Ue, withCtx as Fe, Fragment as E, renderList as F, withKeys as fe, withModifiers as Y, createElementVNode as a, createCommentVNode as w, createBlock as P, resolveDynamicComponent as we, mergeProps as xe, withDirectives as W, vModelText as ee, createTextVNode as ke, renderSlot as Ve, vModelCheckbox as Ke, vModelSelect as $e, markRaw as Oe } from "vue";
2
+ const We = [
3
3
  "connected",
4
4
  "message",
5
5
  "message_stream",
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], ge = "/client", $e = 5 * 60 * 1e3, We = 10 * 60 * 1e3, Ge = 5 * 60 * 1e3;
10
- function Ye(e) {
9
+ ], pe = "/client", Ge = 5 * 60 * 1e3, Ye = 10 * 60 * 1e3, Xe = 5 * 60 * 1e3;
10
+ function Je(e) {
11
11
  const t = {
12
- baseUrl: Je(e.baseUrl || ""),
12
+ baseUrl: Qe(e.baseUrl || ""),
13
13
  widgetId: e.widgetId || "",
14
14
  // Posé après `start()` à partir de la response /session.
15
15
  userId: "",
@@ -65,7 +65,7 @@ function Ye(e) {
65
65
  };
66
66
  }
67
67
  async function o(u, _, p) {
68
- const S = await fetch(`${t.baseUrl}${ge}${_}`, {
68
+ const S = await fetch(`${t.baseUrl}${pe}${_}`, {
69
69
  method: u,
70
70
  credentials: "include",
71
71
  headers: s(),
@@ -92,7 +92,7 @@ function Ye(e) {
92
92
  throw new Error("[transport] start requires origin");
93
93
  t.started = !0, t.origin = u.origin, t.token = u.token || "";
94
94
  const _ = await fetch(
95
- `${t.baseUrl}${ge}/session`,
95
+ `${t.baseUrl}${pe}/session`,
96
96
  {
97
97
  method: "POST",
98
98
  credentials: "include",
@@ -112,10 +112,10 @@ function Ye(e) {
112
112
  }
113
113
  );
114
114
  if (!_.ok) {
115
- const V = await l(_), X = new Error(
115
+ const V = await l(_), Q = new Error(
116
116
  `Session bootstrap failed: HTTP ${_.status} :: ${(V == null ? void 0 : V.error) || _.statusText}`
117
117
  );
118
- throw X.status = _.status, X.body = V, X;
118
+ throw Q.status = _.status, Q.body = V, Q;
119
119
  }
120
120
  const p = await _.json();
121
121
  t.userId = p.external_id;
@@ -125,9 +125,9 @@ function Ye(e) {
125
125
  { credentials: "include" }
126
126
  ).then(async (V) => {
127
127
  if (!V.ok) {
128
- const X = await l(V);
128
+ const Q = await l(V);
129
129
  throw new Error(
130
- `HTTP ${V.status} GET /widgets/:id/config :: ${(X == null ? void 0 : X.error) || V.statusText}`
130
+ `HTTP ${V.status} GET /widgets/:id/config :: ${(Q == null ? void 0 : Q.error) || V.statusText}`
131
131
  );
132
132
  }
133
133
  return V.json();
@@ -209,7 +209,7 @@ function Ye(e) {
209
209
  p
210
210
  );
211
211
  }
212
- async function J(u, _, p) {
212
+ async function X(u, _, p) {
213
213
  return ie(), o(
214
214
  "POST",
215
215
  `/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(_)}`,
@@ -229,7 +229,7 @@ function Ye(e) {
229
229
  if (!T.ok)
230
230
  throw new Error(`HTTP ${T.status} PUT signed upload`);
231
231
  return {
232
- type: Qe(p),
232
+ type: Ze(p),
233
233
  path: O.path,
234
234
  mime_type: p,
235
235
  size_bytes: S
@@ -243,13 +243,13 @@ function Ye(e) {
243
243
  }
244
244
  function se() {
245
245
  const u = new URLSearchParams({ widgetId: t.widgetId }).toString();
246
- return `${t.baseUrl}${ge}/stream?${u}`;
246
+ return `${t.baseUrl}${pe}/stream?${u}`;
247
247
  }
248
248
  function $() {
249
249
  if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
250
250
  try {
251
251
  const u = new EventSource(se(), { withCredentials: !0 });
252
- for (const _ of Ke)
252
+ for (const _ of We)
253
253
  u.addEventListener(_, (p) => re(_, p.data));
254
254
  u.addEventListener(
255
255
  "error",
@@ -267,18 +267,18 @@ function Ye(e) {
267
267
  console.error("[transport] bad SSE payload", u, p);
268
268
  }
269
269
  }
270
- function Q() {
270
+ function J() {
271
271
  t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
272
272
  }
273
273
  function ie() {
274
274
  clearTimeout(t.burstTimer), $(), t.panelOpen || (t.burstTimer = setTimeout(() => {
275
- t.panelOpen || Q();
276
- }, We));
275
+ t.panelOpen || J();
276
+ }, Ye));
277
277
  }
278
278
  function ue(u) {
279
279
  t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), $()) : ie();
280
280
  }
281
- async function _e() {
281
+ async function ge() {
282
282
  try {
283
283
  const u = await B(), _ = u.reduce((S, O) => {
284
284
  const T = O == null ? void 0 : O.last_message_at;
@@ -290,7 +290,7 @@ function Ye(e) {
290
290
  }
291
291
  }
292
292
  function he() {
293
- h(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(_e, $e));
293
+ h(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(ge, Ge));
294
294
  }
295
295
  function h() {
296
296
  t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
@@ -298,8 +298,8 @@ function Ye(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(), Q(), r("paused"));
302
- }, Ge);
301
+ t.hiddenGraceTimer = null, document.hidden && (h(), J(), r("paused"));
302
+ }, Xe);
303
303
  else {
304
304
  if (t.hiddenGraceTimer) {
305
305
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
@@ -309,7 +309,7 @@ function Ye(e) {
309
309
  }
310
310
  }
311
311
  function f() {
312
- h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, Q(), t.visibilityHandler && (document.removeEventListener(
312
+ h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, J(), t.visibilityHandler && (document.removeEventListener(
313
313
  "visibilitychange",
314
314
  t.visibilityHandler
315
315
  ), t.visibilityHandler = null), t.started = !1;
@@ -344,7 +344,7 @@ function Ye(e) {
344
344
  markConversationRead: U,
345
345
  listMessages: L,
346
346
  postMessage: q,
347
- postCallback: J,
347
+ postCallback: X,
348
348
  uploadAttachment: te,
349
349
  signAttachment: ne,
350
350
  // Read-only state
@@ -353,13 +353,13 @@ function Ye(e) {
353
353
  }
354
354
  };
355
355
  }
356
- function Je(e) {
356
+ function Qe(e) {
357
357
  return e.endsWith("/") ? e.slice(0, -1) : e;
358
358
  }
359
- function Qe(e) {
359
+ function Ze(e) {
360
360
  return e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : "file";
361
361
  }
362
- function Xe() {
362
+ function et() {
363
363
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
364
364
  return crypto.randomUUID();
365
365
  const e = new Uint8Array(16);
@@ -371,8 +371,8 @@ function Xe() {
371
371
  const t = [...e].map((n) => n.toString(16).padStart(2, "0"));
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
- function Ze(e) {
375
- const t = He({
374
+ function tt(e) {
375
+ const t = qe({
376
376
  ready: !1,
377
377
  error: null,
378
378
  config: null,
@@ -475,7 +475,7 @@ function Ze(e) {
475
475
  e.stop();
476
476
  }
477
477
  async function s(h) {
478
- const m = _e(h);
478
+ const m = ge(h);
479
479
  if (!m) return t.customer;
480
480
  try {
481
481
  const f = await e.patchCustomer(m);
@@ -590,7 +590,7 @@ function Ze(e) {
590
590
  var O;
591
591
  const C = (m || "").trim(), u = Array.isArray(f) && f.length > 0;
592
592
  if (!h || !C && !u) return;
593
- const _ = Xe(), p = he(h), S = {
593
+ const _ = et(), p = he(h), S = {
594
594
  id: _,
595
595
  client_msg_id: _,
596
596
  conversation_id: h,
@@ -616,7 +616,7 @@ function Ze(e) {
616
616
  ...y && typeof y == "object" ? { metadata: y } : {}
617
617
  });
618
618
  } catch (T) {
619
- console.error("[store] send failed", T), Q(h, _, {
619
+ console.error("[store] send failed", T), J(h, _, {
620
620
  _failed: !0,
621
621
  _pending: !1
622
622
  });
@@ -661,7 +661,7 @@ function Ze(e) {
661
661
  };
662
662
  await x(h, { metadata: u });
663
663
  }
664
- function J(h) {
664
+ function X(h) {
665
665
  var f, y;
666
666
  const m = t.messagesByConv[h] || [];
667
667
  for (let C = m.length - 1; C >= 0; C--) {
@@ -736,7 +736,7 @@ function Ze(e) {
736
736
  function re(h, m) {
737
737
  return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
738
738
  }
739
- function Q(h, m, f) {
739
+ function J(h, m, f) {
740
740
  const y = t.messagesByConv[h];
741
741
  if (!y) return;
742
742
  const C = y.findIndex((_) => _.id === m);
@@ -758,7 +758,7 @@ function Ze(e) {
758
758
  function ue(h, m) {
759
759
  return (h.created_at || "").localeCompare(m.created_at || "");
760
760
  }
761
- function _e(h) {
761
+ function ge(h) {
762
762
  if (!h || typeof h != "object") return null;
763
763
  const m = {}, f = {};
764
764
  for (const [y, C] of Object.entries(h))
@@ -788,7 +788,7 @@ function Ze(e) {
788
788
  clickCallback: M,
789
789
  signAttachment: L,
790
790
  submitFeedback: q,
791
- getPendingApproval: J,
791
+ getPendingApproval: X,
792
792
  getActionInFlight: ne,
793
793
  getLatestSuggestions: se,
794
794
  getLatestForm: te,
@@ -812,7 +812,7 @@ const D = {
812
812
  green: "#22C55E",
813
813
  red: "#B91C1C",
814
814
  redBg: "#FDECEC"
815
- }, pe = [
815
+ }, ve = [
816
816
  "#5B5FEF",
817
817
  "#7C3AED",
818
818
  "#DB2777",
@@ -820,16 +820,16 @@ const D = {
820
820
  "#D97706",
821
821
  "#059669"
822
822
  ];
823
- function ke(e = "") {
824
- return e ? pe[e.charCodeAt(0) % pe.length] : pe[0];
825
- }
826
823
  function Ce(e = "") {
824
+ return e ? ve[e.charCodeAt(0) % ve.length] : ve[0];
825
+ }
826
+ function Ae(e = "") {
827
827
  return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
828
828
  }
829
- function we(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
829
+ function be(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
830
830
  return e.toLocaleTimeString(t, { hour: "2-digit", minute: "2-digit" });
831
831
  }
832
- const et = `
832
+ const nt = `
833
833
  @import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
834
834
 
835
835
  .wm-root {
@@ -876,7 +876,21 @@ const et = `
876
876
  0% { transform: translateX(110%); opacity: 0; }
877
877
  100% { transform: translateX(0); opacity: 1; }
878
878
  }
879
- `, tt = "https://api.messenger.victorc.fr", le = "fr", nt = ["fr", "en"], Oe = { fr: "fr-FR", en: "en-US" }, ve = {
879
+ `, st = "https://api.messenger.victorc.fr", rt = /^[a-zA-Z]{3,32}$/, it = /^#[0-9a-fA-F]{3,8}$/, at = /^(rgb|rgba|hsl|hsla)\(\s*[\d.,%\s/]{1,60}\)$/;
880
+ function je(e) {
881
+ return typeof e != "string" || !e || e.length > 64 ? !1 : it.test(e) || at.test(e) || rt.test(e);
882
+ }
883
+ function ot(e) {
884
+ if (typeof e != "string" || !e || e.length > 2048 || /["'()\\;\s<>]/.test(e)) return null;
885
+ let t;
886
+ try {
887
+ t = new URL(e);
888
+ } catch {
889
+ return null;
890
+ }
891
+ return t.protocol === "https:" || t.protocol === "http:" || t.protocol === "data:" && /^data:image\//i.test(e) ? e : null;
892
+ }
893
+ const le = "fr", lt = ["fr", "en"], Ie = { fr: "fr-FR", en: "en-US" }, ye = {
880
894
  fr: {
881
895
  // ── Common ───────────────────────────────────────────────────────
882
896
  "common.newConversation": "Nouvelle conversation",
@@ -1126,16 +1140,16 @@ I reply within seconds.`,
1126
1140
  "export.createdOn": "Created on: {date}"
1127
1141
  }
1128
1142
  };
1129
- function Ae(e) {
1143
+ function Se(e) {
1130
1144
  if (typeof e != "string") return le;
1131
1145
  const t = e.trim().toLowerCase().slice(0, 2);
1132
- return nt.includes(t) ? t : le;
1146
+ return lt.includes(t) ? t : le;
1133
1147
  }
1134
1148
  function ae(e) {
1135
- return Oe[Ae(e)] || Oe[le];
1149
+ return Ie[Se(e)] || Ie[le];
1136
1150
  }
1137
- function F(e) {
1138
- const t = Ae(e), n = ve[t] || ve[le], i = ve[le];
1151
+ function j(e) {
1152
+ const t = Se(e), n = ye[t] || ye[le], i = ye[le];
1139
1153
  return function(s, o) {
1140
1154
  let l = n[s];
1141
1155
  return l == null && (l = i[s]), l == null ? s : (o && (l = l.replace(
@@ -1144,22 +1158,22 @@ function F(e) {
1144
1158
  )), l);
1145
1159
  };
1146
1160
  }
1147
- function Ie(e, t) {
1161
+ function Le(e, t) {
1148
1162
  if (!Array.isArray(e == null ? void 0 : e.options)) return t;
1149
1163
  const n = e.options.find((i) => (i == null ? void 0 : i.value) === t);
1150
1164
  return (n == null ? void 0 : n.label) || t;
1151
1165
  }
1152
- function je(e, t, n) {
1153
- return Array.isArray(t) ? t.map((i) => Ie(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Ie(e, String(t));
1166
+ function De(e, t, n) {
1167
+ return Array.isArray(t) ? t.map((i) => Le(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Le(e, String(t));
1154
1168
  }
1155
- function st(e, t, n = F()) {
1169
+ function ct(e, t, n = j()) {
1156
1170
  if (!e || !t) return "";
1157
1171
  const i = Array.isArray(e.fields) ? e.fields : [], r = [];
1158
1172
  for (const s of i) {
1159
1173
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1160
1174
  const o = t[s.key];
1161
1175
  if (o == null || o === "") continue;
1162
- const l = je(s, o, n);
1176
+ const l = De(s, o, n);
1163
1177
  l && r.push(`${s.label} :
1164
1178
  ${l}`);
1165
1179
  }
@@ -1167,13 +1181,13 @@ ${l}`);
1167
1181
 
1168
1182
  `);
1169
1183
  }
1170
- function rt(e, t, n = F()) {
1184
+ function dt(e, t, n = j()) {
1171
1185
  const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1172
1186
  for (const s of r) {
1173
1187
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1174
1188
  const o = t == null ? void 0 : t[s.key];
1175
1189
  if (o == null || o === "") continue;
1176
- const l = je(s, o, n);
1190
+ const l = De(s, o, n);
1177
1191
  if (!l) continue;
1178
1192
  const g = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
1179
1193
  `));
@@ -1187,6 +1201,95 @@ function rt(e, t, n = F()) {
1187
1201
  }
1188
1202
  };
1189
1203
  }
1204
+ function He(e) {
1205
+ return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1206
+ }
1207
+ function me(e) {
1208
+ return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
1209
+ }
1210
+ const Ee = "";
1211
+ function oe(e) {
1212
+ let t = e;
1213
+ const n = [];
1214
+ return t = t.replace(/`([^`\n]+)`/g, (i, r) => {
1215
+ const s = n.length;
1216
+ return n.push(r), `${Ee}CODE${s}${Ee}`;
1217
+ }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) => me(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (i, r) => `<code class="wm-md-code">${n[+r]}</code>`), t;
1218
+ }
1219
+ function ut(e) {
1220
+ if (!e) return "";
1221
+ const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
1222
+ return oe(He(t));
1223
+ }
1224
+ function ht(e) {
1225
+ if (!e) return "";
1226
+ const t = He(e).split(`
1227
+ `), n = [];
1228
+ let i = 0;
1229
+ for (; i < t.length; ) {
1230
+ const s = t[i];
1231
+ if (/^\s*```([\w-]*)\s*$/.exec(s)) {
1232
+ i++;
1233
+ const k = [];
1234
+ for (; i < t.length && !/^\s*```\s*$/.test(t[i]); )
1235
+ k.push(t[i]), i++;
1236
+ i < t.length && i++, n.push({
1237
+ type: "block",
1238
+ html: `<pre class="wm-md-pre"><code>${k.join(`
1239
+ `)}</code></pre>`
1240
+ });
1241
+ continue;
1242
+ }
1243
+ if (/^\s*[-*]\s+/.test(s)) {
1244
+ const k = [];
1245
+ for (; i < t.length; ) {
1246
+ const x = /^\s*[-*]\s+(.*)$/.exec(t[i]);
1247
+ if (!x) break;
1248
+ k.push(x[1]), i++;
1249
+ }
1250
+ const b = k.map((x) => `<li>${oe(x)}</li>`).join("");
1251
+ n.push({
1252
+ type: "block",
1253
+ html: `<ul class="wm-md-ul">${b}</ul>`
1254
+ });
1255
+ continue;
1256
+ }
1257
+ const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
1258
+ if (l) {
1259
+ const k = parseInt(l[1], 10), b = [l[2]];
1260
+ for (i++; i < t.length; ) {
1261
+ const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
1262
+ if (!A) break;
1263
+ b.push(A[1]), i++;
1264
+ }
1265
+ const x = b.map((A) => `<li>${oe(A)}</li>`).join(""), B = k !== 1 ? ` start="${k}"` : "";
1266
+ n.push({
1267
+ type: "block",
1268
+ html: `<ol class="wm-md-ol"${B}>${x}</ol>`
1269
+ });
1270
+ continue;
1271
+ }
1272
+ const g = /^(#{1,6})\s+(.*)$/.exec(s);
1273
+ if (g) {
1274
+ const k = g[1].length;
1275
+ n.push({
1276
+ type: "block",
1277
+ html: `<h${k} class="wm-md-h wm-md-h${k}">${oe(g[2])}</h${k}>`
1278
+ }), i++;
1279
+ continue;
1280
+ }
1281
+ n.push({ type: "text", html: oe(s) }), i++;
1282
+ }
1283
+ let r = "";
1284
+ for (let s = 0; s < n.length; s++) {
1285
+ const o = n[s];
1286
+ r += o.html;
1287
+ const l = n[s + 1];
1288
+ l && o.type !== "block" && l.type !== "block" && (r += `
1289
+ `);
1290
+ }
1291
+ return r;
1292
+ }
1190
1293
  function ce(e) {
1191
1294
  var n;
1192
1295
  const t = (n = e == null ? void 0 : e.author) == null ? void 0 : n.type;
@@ -1197,13 +1300,13 @@ function G(e) {
1197
1300
  const t = typeof e == "number" ? e : Number(e);
1198
1301
  return Number.isFinite(t) ? t : null;
1199
1302
  }
1200
- function Le(e, t) {
1303
+ function Be(e, t) {
1201
1304
  let n = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
1202
1305
  for (const i of t)
1203
1306
  i != null && i.created_at && i.created_at > n && (n = i.created_at);
1204
1307
  return n;
1205
1308
  }
1206
- function it(e, t) {
1309
+ function mt(e, t) {
1207
1310
  var n, i, r;
1208
1311
  for (let s = t.length - 1; s >= 0; s--) {
1209
1312
  const o = t[s];
@@ -1216,10 +1319,10 @@ function it(e, t) {
1216
1319
  }
1217
1320
  return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((r = e == null ? void 0 : e.metadata) == null ? void 0 : r.last_preview) || "";
1218
1321
  }
1219
- function at(e, t) {
1322
+ function ft(e, t) {
1220
1323
  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"));
1221
1324
  }
1222
- function ot(e, t, n, i) {
1325
+ function _t(e, t, n, i) {
1223
1326
  const r = [
1224
1327
  `# ${e.name || n("common.conversation")}`,
1225
1328
  e.created_at ? n("export.createdOn", {
@@ -1231,15 +1334,15 @@ function ot(e, t, n, i) {
1231
1334
  if (!s) continue;
1232
1335
  const o = (s.text_md || "").trim();
1233
1336
  if (!o) continue;
1234
- const l = at(s.author, n), g = s.created_at ? new Date(s.created_at).toLocaleString(i) : "";
1337
+ const l = ft(s.author, n), g = s.created_at ? new Date(s.created_at).toLocaleString(i) : "";
1235
1338
  r.push(`[${g}] ${l} :`), r.push(o), r.push("");
1236
1339
  }
1237
1340
  return r.join(`
1238
1341
  `);
1239
1342
  }
1240
- function lt(e, t, n = F(), i) {
1343
+ function gt(e, t, n = j(), i) {
1241
1344
  if (!e) return;
1242
- const r = ot(e, t || [], n, ae(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1345
+ const r = _t(e, t || [], n, ae(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1243
1346
  try {
1244
1347
  const o = URL.createObjectURL(s), l = document.createElement("a");
1245
1348
  l.href = o, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(o), 1e3);
@@ -1247,7 +1350,7 @@ function lt(e, t, n = F(), i) {
1247
1350
  console.error("[ww-messenger] export failed", o);
1248
1351
  }
1249
1352
  }
1250
- const ct = {
1353
+ const pt = {
1251
1354
  data() {
1252
1355
  const e = typeof Notification < "u";
1253
1356
  return {
@@ -1405,7 +1508,7 @@ const ct = {
1405
1508
  }
1406
1509
  }
1407
1510
  }
1408
- }, dt = 450, ut = 50, ht = 900, mt = 12e3, ft = 300, _t = {
1511
+ }, vt = 450, yt = 50, wt = 900, bt = 12e3, kt = 300, Ct = {
1409
1512
  data() {
1410
1513
  return {
1411
1514
  // Map: messageId → ms timestamp once shown.
@@ -1514,11 +1617,11 @@ const ct = {
1514
1617
  // bounded by MIN/MAX_TYPING_MS.
1515
1618
  scheduleReveal(e, t) {
1516
1619
  const n = Date.now(), i = ((e == null ? void 0 : e.text_md) || "").length, r = Math.min(
1517
- mt,
1518
- Math.max(ht, i * ut)
1620
+ bt,
1621
+ Math.max(wt, i * yt)
1519
1622
  ), o = Math.max(
1520
- n + dt,
1521
- this.nextRevealAt + ft
1623
+ n + vt,
1624
+ this.nextRevealAt + kt
1522
1625
  ) + r;
1523
1626
  this.nextRevealAt = o;
1524
1627
  const l = Math.max(0, o - n), g = e.id, k = setTimeout(() => {
@@ -1580,7 +1683,7 @@ const ct = {
1580
1683
  this.revealedAt = { ...this.revealedAt, [e.id]: 0 }, this.scheduleReveal(e, t);
1581
1684
  }
1582
1685
  }
1583
- }, gt = {
1686
+ }, At = {
1584
1687
  data() {
1585
1688
  return {
1586
1689
  approvalSettled: !0,
@@ -1610,7 +1713,7 @@ const ct = {
1610
1713
  }, e);
1611
1714
  }
1612
1715
  }
1613
- }, pt = 300, vt = {
1716
+ }, St = 300, Mt = {
1614
1717
  data() {
1615
1718
  return {
1616
1719
  // Numeric message id snapshot frozen the moment the user
@@ -1641,7 +1744,7 @@ const ct = {
1641
1744
  markConvRead(e) {
1642
1745
  var s, o;
1643
1746
  if (!(e != null && e.id) || e._draft || !this.store) return;
1644
- const t = ((o = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : o[e.id]) || [], n = yt(t);
1747
+ const t = ((o = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : o[e.id]) || [], n = Tt(t);
1645
1748
  if (n == null) return;
1646
1749
  const i = G(e.last_read_message_id), r = G(n);
1647
1750
  r != null && (i != null && r <= i || (this._readMarkerPending = { convId: e.id, messageId: n }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
@@ -1650,11 +1753,11 @@ const ct = {
1650
1753
  l.convId,
1651
1754
  l.messageId
1652
1755
  );
1653
- }, pt))));
1756
+ }, St))));
1654
1757
  }
1655
1758
  }
1656
1759
  };
1657
- function yt(e) {
1760
+ function Tt(e) {
1658
1761
  for (let t = e.length - 1; t >= 0; t--) {
1659
1762
  const n = e[t];
1660
1763
  if (!(!n || n._pending) && G(n.id) != null)
@@ -1667,7 +1770,7 @@ const N = (e, t) => {
1667
1770
  for (const [i, r] of t)
1668
1771
  n[i] = r;
1669
1772
  return n;
1670
- }, wt = {
1773
+ }, xt = {
1671
1774
  name: "WmHumanAvatar",
1672
1775
  props: {
1673
1776
  name: { type: String, default: "" },
@@ -1681,14 +1784,14 @@ const N = (e, t) => {
1681
1784
  },
1682
1785
  computed: {
1683
1786
  bg() {
1684
- return this.avatarUrl ? "transparent" : ke(this.name);
1787
+ return this.avatarUrl ? "transparent" : Ce(this.name);
1685
1788
  },
1686
1789
  initials() {
1687
- return Ce(this.name);
1790
+ return Ae(this.name);
1688
1791
  }
1689
1792
  }
1690
- }, bt = ["src", "alt"];
1691
- function kt(e, t, n, i, r, s) {
1793
+ }, Ot = ["src", "alt"];
1794
+ function It(e, t, n, i, r, s) {
1692
1795
  return c(), d("div", {
1693
1796
  class: I(["wm-huav", { "wm-huav--tail": n.tail }]),
1694
1797
  style: H({
@@ -1702,19 +1805,19 @@ function kt(e, t, n, i, r, s) {
1702
1805
  key: 0,
1703
1806
  src: n.avatarUrl,
1704
1807
  alt: n.name || ""
1705
- }, null, 8, bt)) : (c(), d("span", {
1808
+ }, null, 8, Ot)) : (c(), d("span", {
1706
1809
  key: 1,
1707
1810
  style: H({ fontSize: n.size * 0.36 + "px" })
1708
1811
  }, v(s.initials), 5))
1709
1812
  ], 6);
1710
1813
  }
1711
- const Se = /* @__PURE__ */ N(wt, [["render", kt], ["__scopeId", "data-v-14e10c0d"]]), Ct = 3, At = {
1814
+ const Me = /* @__PURE__ */ N(xt, [["render", It], ["__scopeId", "data-v-14e10c0d"]]), Lt = 3, Et = {
1712
1815
  name: "WmLauncher",
1713
- components: { HumanAvatar: Se },
1816
+ components: { HumanAvatar: Me },
1714
1817
  inject: {
1715
1818
  // Translator shared by the Messenger shell; French fallback when
1716
1819
  // the component is used standalone.
1717
- t: { default: () => F() }
1820
+ t: { default: () => j() }
1718
1821
  },
1719
1822
  props: {
1720
1823
  // Nombre de conversations non lues — pilote la pastille.
@@ -1731,11 +1834,11 @@ const Se = /* @__PURE__ */ N(wt, [["render", kt], ["__scopeId", "data-v-14e10c0d
1731
1834
  // élément en ordre DOM avec un flex column normal). Les plus
1732
1835
  // anciens remontent dans la pile.
1733
1836
  visiblePeeks() {
1734
- return this.peeks.slice(0, Ct).reverse();
1837
+ return this.peeks.slice(0, Lt).reverse();
1735
1838
  }
1736
1839
  }
1737
- }, St = ["aria-label", "onClick", "onKeydown"], Mt = ["aria-label", "onClick"], Tt = { class: "wm-peek__avatar" }, xt = ["aria-label"], Ot = { class: "wm-peek__body" }, It = { class: "wm-peek__head" }, Lt = { class: "wm-peek__name" }, Et = { class: "wm-peek__action" }, Bt = { class: "wm-peek__text" }, Rt = ["onClick"], Nt = ["aria-label"], Pt = ["aria-label"];
1738
- function Ut(e, t, n, i, r, s) {
1840
+ }, Bt = ["aria-label", "onClick", "onKeydown"], Rt = ["aria-label", "onClick"], Nt = { class: "wm-peek__avatar" }, Pt = ["aria-label"], Ut = { class: "wm-peek__body" }, Ft = { class: "wm-peek__head" }, jt = { class: "wm-peek__name" }, Dt = { class: "wm-peek__action" }, Ht = { class: "wm-peek__text" }, zt = ["onClick"], qt = ["aria-label"], Vt = ["aria-label"];
1841
+ function Kt(e, t, n, i, r, s) {
1739
1842
  const o = R("HumanAvatar");
1740
1843
  return c(), d("div", {
1741
1844
  class: "wm-launcherWrap",
@@ -1744,13 +1847,13 @@ function Ut(e, t, n, i, r, s) {
1744
1847
  onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
1745
1848
  onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1746
1849
  }, [
1747
- K(Pe, { name: "wm-peek" }, {
1748
- default: Ue(() => [
1850
+ K(Ue, { name: "wm-peek" }, {
1851
+ default: Fe(() => [
1749
1852
  s.visiblePeeks.length ? (c(), d("div", {
1750
1853
  key: 0,
1751
1854
  class: I(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1752
1855
  }, [
1753
- (c(!0), d(E, null, j(s.visiblePeeks, (l, g) => (c(), d("div", {
1856
+ (c(!0), d(E, null, F(s.visiblePeeks, (l, g) => (c(), d("div", {
1754
1857
  key: l.convId,
1755
1858
  class: "wm-peek",
1756
1859
  style: H({
@@ -1764,8 +1867,8 @@ function Ut(e, t, n, i, r, s) {
1764
1867
  }),
1765
1868
  onClick: (k) => e.$emit("open", l.convId),
1766
1869
  onKeydown: [
1767
- me(Y((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
1768
- me(Y((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1870
+ fe(Y((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
1871
+ fe(Y((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1769
1872
  ]
1770
1873
  }, [
1771
1874
  a("button", {
@@ -1787,8 +1890,8 @@ function Ut(e, t, n, i, r, s) {
1787
1890
  }, [
1788
1891
  a("path", { d: "M18 6L6 18M6 6l12 12" })
1789
1892
  ], -1)
1790
- ])], 8, Mt),
1791
- a("div", Tt, [
1893
+ ])], 8, Rt),
1894
+ a("div", Nt, [
1792
1895
  K(o, {
1793
1896
  name: l.senderName,
1794
1897
  "avatar-url": l.senderAvatarUrl,
@@ -1798,21 +1901,21 @@ function Ut(e, t, n, i, r, s) {
1798
1901
  key: 0,
1799
1902
  class: "wm-peek__avatarBadge",
1800
1903
  "aria-label": s.t("launcher.unreadMessages", { count: l.count })
1801
- }, v(l.count > 9 ? "9+" : l.count), 9, xt)) : w("", !0)
1904
+ }, v(l.count > 9 ? "9+" : l.count), 9, Pt)) : w("", !0)
1802
1905
  ]),
1803
- a("div", Ot, [
1804
- a("div", It, [
1805
- a("span", Lt, v(l.senderName || s.t("common.agent")), 1),
1806
- a("span", Et, v(s.t("launcher.repliedToYou")), 1)
1906
+ a("div", Ut, [
1907
+ a("div", Ft, [
1908
+ a("span", jt, v(l.senderName || s.t("common.agent")), 1),
1909
+ a("span", Dt, v(s.t("launcher.repliedToYou")), 1)
1807
1910
  ]),
1808
- a("p", Bt, v(l.preview), 1)
1911
+ a("p", Ht, v(l.preview), 1)
1809
1912
  ]),
1810
1913
  a("button", {
1811
1914
  type: "button",
1812
1915
  class: "wm-peek__open",
1813
1916
  onClick: Y((k) => e.$emit("open", l.convId), ["stop"])
1814
- }, v(s.t("common.open")), 9, Rt)
1815
- ], 44, St))), 128))
1917
+ }, v(s.t("common.open")), 9, zt)
1918
+ ], 44, Bt))), 128))
1816
1919
  ], 2)) : w("", !0)
1817
1920
  ]),
1818
1921
  _: 1
@@ -1844,11 +1947,11 @@ function Ut(e, t, n, i, r, s) {
1844
1947
  }) : s.t("launcher.unreadConversationsOne", {
1845
1948
  count: n.unreadCount
1846
1949
  })
1847
- }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Pt)) : w("", !0)
1848
- ], 8, Nt)
1950
+ }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Vt)) : w("", !0)
1951
+ ], 8, qt)
1849
1952
  ], 32);
1850
1953
  }
1851
- const jt = /* @__PURE__ */ N(At, [["render", Ut], ["__scopeId", "data-v-44ddf1a1"]]), Ft = {
1954
+ const $t = /* @__PURE__ */ N(Et, [["render", Kt], ["__scopeId", "data-v-44ddf1a1"]]), Wt = {
1852
1955
  name: "WmAIAvatar",
1853
1956
  props: {
1854
1957
  size: { type: Number, default: 26 },
@@ -1871,17 +1974,17 @@ const jt = /* @__PURE__ */ N(At, [["render", Ut], ["__scopeId", "data-v-44ddf1a1
1871
1974
  },
1872
1975
  computed: {
1873
1976
  initials() {
1874
- return Ce(this.name);
1977
+ return Ae(this.name);
1875
1978
  },
1876
1979
  bgColor() {
1877
- return ke(this.name);
1980
+ return Ce(this.name);
1878
1981
  }
1879
1982
  }
1880
- }, Dt = {
1983
+ }, Gt = {
1881
1984
  key: 0,
1882
1985
  class: "wm-aiav__pulse"
1883
- }, Ht = ["src", "alt"], zt = ["width", "height"];
1884
- function qt(e, t, n, i, r, s) {
1986
+ }, Yt = ["src", "alt"], Xt = ["width", "height"];
1987
+ function Jt(e, t, n, i, r, s) {
1885
1988
  return c(), d("div", {
1886
1989
  class: I(["wm-aiav", { "wm-aiav--tail": n.tail }]),
1887
1990
  style: H({
@@ -1890,7 +1993,7 @@ function qt(e, t, n, i, r, s) {
1890
1993
  "--wm-avr": n.size * 0.32 + "px"
1891
1994
  })
1892
1995
  }, [
1893
- n.pulse ? (c(), d("div", Dt)) : w("", !0),
1996
+ n.pulse ? (c(), d("div", Gt)) : w("", !0),
1894
1997
  a("div", {
1895
1998
  class: I(["wm-aiav__inner", {
1896
1999
  "wm-aiav__inner--glow": n.pulse,
@@ -1905,7 +2008,7 @@ function qt(e, t, n, i, r, s) {
1905
2008
  key: 0,
1906
2009
  src: n.imageUrl,
1907
2010
  alt: n.name || ""
1908
- }, null, 8, Ht)) : s.initials ? (c(), d("span", {
2011
+ }, null, 8, Yt)) : s.initials ? (c(), d("span", {
1909
2012
  key: 1,
1910
2013
  style: H({ fontSize: n.size * 0.36 + "px" })
1911
2014
  }, v(s.initials), 5)) : (c(), d("svg", {
@@ -1935,11 +2038,11 @@ function qt(e, t, n, i, r, s) {
1935
2038
  fill: "white",
1936
2039
  opacity: "0.38"
1937
2040
  }, null, -1)
1938
- ])], 8, zt))
2041
+ ])], 8, Xt))
1939
2042
  ], 6)
1940
2043
  ], 6);
1941
2044
  }
1942
- const de = /* @__PURE__ */ N(Ft, [["render", qt], ["__scopeId", "data-v-6f7f685d"]]), Vt = {
2045
+ const de = /* @__PURE__ */ N(Wt, [["render", Jt], ["__scopeId", "data-v-6f7f685d"]]), Qt = {
1943
2046
  name: "WmTeamAvatars",
1944
2047
  props: {
1945
2048
  members: { type: Array, default: () => [] },
@@ -1955,26 +2058,26 @@ const de = /* @__PURE__ */ N(Ft, [["render", qt], ["__scopeId", "data-v-6f7f685d
1955
2058
  },
1956
2059
  methods: {
1957
2060
  colorFor(e) {
1958
- return e.avatar_url ? "transparent" : ke(e.name || "");
2061
+ return e.avatar_url ? "transparent" : Ce(e.name || "");
1959
2062
  },
1960
2063
  initialsFor(e) {
1961
- return Ce(e.name || "");
2064
+ return Ae(e.name || "");
1962
2065
  }
1963
2066
  }
1964
- }, Kt = {
2067
+ }, Zt = {
1965
2068
  key: 0,
1966
2069
  class: "wm-team"
1967
- }, $t = ["src", "alt"], Wt = { key: 1 }, Gt = {
2070
+ }, en = ["src", "alt"], tn = { key: 1 }, nn = {
1968
2071
  key: 0,
1969
2072
  class: "wm-team__label"
1970
2073
  };
1971
- function Yt(e, t, n, i, r, s) {
1972
- return s.visible ? (c(), d("div", Kt, [
2074
+ function sn(e, t, n, i, r, s) {
2075
+ return s.visible ? (c(), d("div", Zt, [
1973
2076
  a("div", {
1974
2077
  class: "wm-team__stack",
1975
2078
  style: H({ width: s.stackWidth + "px" })
1976
2079
  }, [
1977
- (c(!0), d(E, null, j(n.members.slice(0, 3), (o, l) => (c(), d("div", {
2080
+ (c(!0), d(E, null, F(n.members.slice(0, 3), (o, l) => (c(), d("div", {
1978
2081
  key: l,
1979
2082
  class: "wm-team__pill",
1980
2083
  style: H({
@@ -1987,19 +2090,19 @@ function Yt(e, t, n, i, r, s) {
1987
2090
  key: 0,
1988
2091
  src: o.avatar_url,
1989
2092
  alt: o.name || ""
1990
- }, null, 8, $t)) : (c(), d("span", Wt, v(s.initialsFor(o)), 1))
2093
+ }, null, 8, en)) : (c(), d("span", tn, v(s.initialsFor(o)), 1))
1991
2094
  ], 4))), 128))
1992
2095
  ], 4),
1993
- n.responseLabel ? (c(), d("span", Gt, v(n.responseLabel), 1)) : w("", !0)
2096
+ n.responseLabel ? (c(), d("span", nn, v(n.responseLabel), 1)) : w("", !0)
1994
2097
  ])) : w("", !0);
1995
2098
  }
1996
- const Jt = /* @__PURE__ */ N(Vt, [["render", Yt], ["__scopeId", "data-v-e49a9063"]]), Qt = {
2099
+ const rn = /* @__PURE__ */ N(Qt, [["render", sn], ["__scopeId", "data-v-e49a9063"]]), an = {
1997
2100
  name: "WmHeader",
1998
- components: { AIAvatar: de, TeamAvatars: Jt },
2101
+ components: { AIAvatar: de, TeamAvatars: rn },
1999
2102
  inject: {
2000
2103
  // Translator shared by the Messenger shell. Falls back to a French
2001
2104
  // translator when the component is used standalone (no provider).
2002
- t: { default: () => F() }
2105
+ t: { default: () => j() }
2003
2106
  },
2004
2107
  props: {
2005
2108
  title: { type: String, default: "Nouvelle conversation" },
@@ -2032,16 +2135,16 @@ const Jt = /* @__PURE__ */ N(Vt, [["render", Yt], ["__scopeId", "data-v-e49a9063
2032
2135
  return n;
2033
2136
  }
2034
2137
  }
2035
- }, Xt = { class: "wm-header" }, Zt = ["aria-label"], en = {
2138
+ }, on = { class: "wm-header" }, ln = ["aria-label"], cn = {
2036
2139
  key: 1,
2037
2140
  style: { width: "30px", height: "30px", "flex-shrink": "0" }
2038
- }, tn = { class: "wm-header__avatar" }, nn = { class: "wm-header__main" }, sn = { class: "wm-header__title" }, rn = {
2141
+ }, dn = { class: "wm-header__avatar" }, un = { class: "wm-header__main" }, hn = { class: "wm-header__title" }, mn = {
2039
2142
  key: 3,
2040
2143
  class: "wm-header__fill"
2041
- }, an = { class: "wm-header__actions" }, on = ["aria-label", "title"], ln = ["aria-label", "title"];
2042
- function cn(e, t, n, i, r, s) {
2144
+ }, fn = { class: "wm-header__actions" }, _n = ["aria-label", "title"], gn = ["aria-label", "title"];
2145
+ function pn(e, t, n, i, r, s) {
2043
2146
  const o = R("AIAvatar"), l = R("TeamAvatars");
2044
- return c(), d("div", Xt, [
2147
+ return c(), d("div", on, [
2045
2148
  n.showBack ? (c(), d("button", {
2046
2149
  key: 0,
2047
2150
  type: "button",
@@ -2062,25 +2165,25 @@ function cn(e, t, n, i, r, s) {
2062
2165
  }, [
2063
2166
  a("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2064
2167
  ], -1)
2065
- ])], 8, Zt)) : (c(), d("div", en)),
2168
+ ])], 8, ln)) : (c(), d("div", cn)),
2066
2169
  n.showIdentity ? (c(), d(E, { key: 2 }, [
2067
- a("div", tn, [
2170
+ a("div", dn, [
2068
2171
  K(o, {
2069
2172
  size: 30,
2070
2173
  name: n.agentName,
2071
2174
  "image-url": n.agentAvatarUrl
2072
2175
  }, null, 8, ["name", "image-url"])
2073
2176
  ]),
2074
- a("div", nn, [
2075
- a("div", sn, v(n.title), 1)
2177
+ a("div", un, [
2178
+ a("div", hn, v(n.title), 1)
2076
2179
  ]),
2077
2180
  s.hasTeam ? (c(), P(l, {
2078
2181
  key: 0,
2079
2182
  members: s.displayedTeamMembers,
2080
2183
  "response-label": ""
2081
2184
  }, null, 8, ["members"])) : w("", !0)
2082
- ], 64)) : (c(), d("div", rn)),
2083
- a("div", an, [
2185
+ ], 64)) : (c(), d("div", mn)),
2186
+ a("div", fn, [
2084
2187
  n.showMore ? (c(), d("button", {
2085
2188
  key: 0,
2086
2189
  type: "button",
@@ -2112,7 +2215,7 @@ function cn(e, t, n, i, r, s) {
2112
2215
  r: "1.6"
2113
2216
  })
2114
2217
  ], -1)
2115
- ])], 10, on)) : w("", !0),
2218
+ ])], 10, _n)) : w("", !0),
2116
2219
  n.showClose ? (c(), d("button", {
2117
2220
  key: 1,
2118
2221
  type: "button",
@@ -2134,113 +2237,23 @@ function cn(e, t, n, i, r, s) {
2134
2237
  }, [
2135
2238
  a("path", { d: "M18 6L6 18M6 6l12 12" })
2136
2239
  ], -1)
2137
- ])], 8, ln)) : w("", !0)
2240
+ ])], 8, gn)) : w("", !0)
2138
2241
  ])
2139
2242
  ]);
2140
2243
  }
2141
- const dn = /* @__PURE__ */ N(Qt, [["render", cn], ["__scopeId", "data-v-7af4c118"]]);
2142
- function Fe(e) {
2143
- return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2144
- }
2145
- function un(e) {
2146
- return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
2147
- }
2148
- const Ee = "";
2149
- function oe(e) {
2150
- let t = e;
2151
- const n = [];
2152
- return t = t.replace(/`([^`\n]+)`/g, (i, r) => {
2153
- const s = n.length;
2154
- return n.push(r), `${Ee}CODE${s}${Ee}`;
2155
- }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) => un(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (i, r) => `<code class="wm-md-code">${n[+r]}</code>`), t;
2156
- }
2157
- function hn(e) {
2158
- if (!e) return "";
2159
- const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
2160
- return oe(Fe(t));
2161
- }
2162
- function mn(e) {
2163
- if (!e) return "";
2164
- const t = Fe(e).split(`
2165
- `), n = [];
2166
- let i = 0;
2167
- for (; i < t.length; ) {
2168
- const s = t[i];
2169
- if (/^\s*```([\w-]*)\s*$/.exec(s)) {
2170
- i++;
2171
- const k = [];
2172
- for (; i < t.length && !/^\s*```\s*$/.test(t[i]); )
2173
- k.push(t[i]), i++;
2174
- i < t.length && i++, n.push({
2175
- type: "block",
2176
- html: `<pre class="wm-md-pre"><code>${k.join(`
2177
- `)}</code></pre>`
2178
- });
2179
- continue;
2180
- }
2181
- if (/^\s*[-*]\s+/.test(s)) {
2182
- const k = [];
2183
- for (; i < t.length; ) {
2184
- const x = /^\s*[-*]\s+(.*)$/.exec(t[i]);
2185
- if (!x) break;
2186
- k.push(x[1]), i++;
2187
- }
2188
- const b = k.map((x) => `<li>${oe(x)}</li>`).join("");
2189
- n.push({
2190
- type: "block",
2191
- html: `<ul class="wm-md-ul">${b}</ul>`
2192
- });
2193
- continue;
2194
- }
2195
- const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
2196
- if (l) {
2197
- const k = parseInt(l[1], 10), b = [l[2]];
2198
- for (i++; i < t.length; ) {
2199
- const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
2200
- if (!A) break;
2201
- b.push(A[1]), i++;
2202
- }
2203
- const x = b.map((A) => `<li>${oe(A)}</li>`).join(""), B = k !== 1 ? ` start="${k}"` : "";
2204
- n.push({
2205
- type: "block",
2206
- html: `<ol class="wm-md-ol"${B}>${x}</ol>`
2207
- });
2208
- continue;
2209
- }
2210
- const g = /^(#{1,6})\s+(.*)$/.exec(s);
2211
- if (g) {
2212
- const k = g[1].length;
2213
- n.push({
2214
- type: "block",
2215
- html: `<h${k} class="wm-md-h wm-md-h${k}">${oe(g[2])}</h${k}>`
2216
- }), i++;
2217
- continue;
2218
- }
2219
- n.push({ type: "text", html: oe(s) }), i++;
2220
- }
2221
- let r = "";
2222
- for (let s = 0; s < n.length; s++) {
2223
- const o = n[s];
2224
- r += o.html;
2225
- const l = n[s + 1];
2226
- l && o.type !== "block" && l.type !== "block" && (r += `
2227
- `);
2228
- }
2229
- return r;
2230
- }
2231
- const Be = {
2244
+ const vn = /* @__PURE__ */ N(an, [["render", pn], ["__scopeId", "data-v-7af4c118"]]), Re = {
2232
2245
  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",
2233
2246
  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",
2234
2247
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
2235
2248
  chat: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",
2236
2249
  link: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
2237
- }, fn = {
2250
+ }, yn = {
2238
2251
  name: "WmOnboarding",
2239
- components: { AIAvatar: de, HumanAvatar: Se },
2252
+ components: { AIAvatar: de, HumanAvatar: Me },
2240
2253
  inject: {
2241
2254
  // Translator + resolved-language getter shared by the Messenger
2242
2255
  // shell. Fall back to French wording when used standalone.
2243
- t: { default: () => F() },
2256
+ t: { default: () => j() },
2244
2257
  wmLocale: { default: () => () => "fr" }
2245
2258
  },
2246
2259
  props: {
@@ -2281,7 +2294,7 @@ const Be = {
2281
2294
  },
2282
2295
  methods: {
2283
2296
  iconPath(e) {
2284
- return Be[e] || Be.link;
2297
+ return Re[e] || Re.link;
2285
2298
  },
2286
2299
  // True when activating the link opens an external destination
2287
2300
  // (full URL or relative path) — anchor links (`#…`, which route
@@ -2290,8 +2303,26 @@ const Be = {
2290
2303
  const t = e == null ? void 0 : e.url;
2291
2304
  return !!t && !t.startsWith("#");
2292
2305
  },
2306
+ // Returns the link's `icon_url` only if it's safe to embed as
2307
+ // the body of a CSS `url("…")` token. Used both as a `v-if`
2308
+ // guard on the masked-glyph span and as the source for the
2309
+ // `--icon-url` custom property below.
2310
+ safeIconUrl(e) {
2311
+ return ot(e == null ? void 0 : e.icon_url);
2312
+ },
2313
+ // Gated inline style for each quick-link card. `--card-color`
2314
+ // is only set when `l.color` is a recognised CSS color literal,
2315
+ // `--icon-url` only when `l.icon_url` parses to an http(s) or
2316
+ // data:image URL free of CSS-breaking characters. Anything
2317
+ // invalid silently falls through to the brand-accent fallback.
2318
+ cardInlineStyle(e) {
2319
+ const t = {};
2320
+ e != null && e.color && je(e.color) && (t["--card-color"] = e.color);
2321
+ const n = this.safeIconUrl(e);
2322
+ return n && (t["--icon-url"] = `url("${n}")`), Object.keys(t).length ? t : null;
2323
+ },
2293
2324
  renderPreview(e) {
2294
- return hn(e);
2325
+ return ut(e);
2295
2326
  },
2296
2327
  // Avatar resolution for a thread row, in priority order :
2297
2328
  // 1. last sender's `avatar_url` (image)
@@ -2347,7 +2378,7 @@ const Be = {
2347
2378
  });
2348
2379
  }
2349
2380
  }
2350
- }, _n = { class: "wm-onb" }, gn = { class: "wm-onb__hero" }, pn = { class: "wm-onb__hero-text" }, vn = { class: "wm-onb__title" }, yn = { class: "wm-onb__sub" }, wn = { class: "wm-onb__cta" }, bn = ["disabled"], kn = { class: "wm-onb__startLabel" }, Cn = ["onClick"], An = { class: "wm-onb__card-icon" }, Sn = ["aria-label"], Mn = {
2381
+ }, wn = { class: "wm-onb" }, bn = { class: "wm-onb__hero" }, kn = { class: "wm-onb__hero-text" }, Cn = { class: "wm-onb__title" }, An = { class: "wm-onb__sub" }, Sn = { class: "wm-onb__cta" }, Mn = ["disabled"], Tn = { class: "wm-onb__startLabel" }, xn = ["onClick"], On = { class: "wm-onb__card-icon" }, In = ["aria-label"], Ln = {
2351
2382
  key: 1,
2352
2383
  width: "18",
2353
2384
  height: "18",
@@ -2358,10 +2389,10 @@ const Be = {
2358
2389
  "stroke-linecap": "round",
2359
2390
  "stroke-linejoin": "round",
2360
2391
  "aria-hidden": "true"
2361
- }, Tn = ["d"], xn = { class: "wm-onb__card-body" }, On = { class: "wm-onb__card-title" }, In = {
2392
+ }, En = ["d"], Bn = { class: "wm-onb__card-body" }, Rn = { class: "wm-onb__card-title" }, Nn = {
2362
2393
  key: 0,
2363
2394
  class: "wm-onb__card-sub"
2364
- }, Ln = {
2395
+ }, Pn = {
2365
2396
  key: 0,
2366
2397
  class: "wm-onb__card-ext",
2367
2398
  width: "11",
@@ -2373,32 +2404,32 @@ const Be = {
2373
2404
  "stroke-linecap": "round",
2374
2405
  "stroke-linejoin": "round",
2375
2406
  "aria-hidden": "true"
2376
- }, En = {
2407
+ }, Un = {
2377
2408
  key: 1,
2378
2409
  class: "wm-onb__section wm-onb__section--card"
2379
- }, Bn = { class: "wm-onb__section-title" }, Rn = { class: "wm-onb__alertList" }, Nn = ["onClick"], Pn = {
2410
+ }, Fn = { class: "wm-onb__section-title" }, jn = { class: "wm-onb__alertList" }, Dn = ["onClick"], Hn = {
2380
2411
  key: 0,
2381
2412
  class: "wm-onb__defaultAvatar"
2382
- }, Un = ["aria-label"], jn = { class: "wm-onb__alert-body" }, Fn = { class: "wm-onb__alert-title" }, Dn = ["innerHTML"], Hn = { class: "wm-onb__alert-meta" }, zn = {
2413
+ }, zn = ["aria-label"], qn = { class: "wm-onb__alert-body" }, Vn = { class: "wm-onb__alert-title" }, Kn = ["innerHTML"], $n = { class: "wm-onb__alert-meta" }, Wn = {
2383
2414
  key: 0,
2384
2415
  class: "wm-onb__alert-time"
2385
- }, qn = { class: "wm-onb__alert-resume" }, Vn = {
2416
+ }, Gn = { class: "wm-onb__alert-resume" }, Yn = {
2386
2417
  key: 2,
2387
2418
  class: "wm-onb__section wm-onb__section--card"
2388
- }, Kn = { class: "wm-onb__section-title" }, $n = { class: "wm-onb__search" }, Wn = ["placeholder", "aria-label"], Gn = { class: "wm-onb__list" }, Yn = ["onClick"], Jn = {
2419
+ }, Xn = { class: "wm-onb__section-title" }, Jn = { class: "wm-onb__search" }, Qn = ["placeholder", "aria-label"], Zn = { class: "wm-onb__list" }, es = ["onClick"], ts = {
2389
2420
  key: 0,
2390
2421
  class: "wm-onb__defaultAvatar"
2391
- }, Qn = ["aria-label"], Xn = { class: "wm-onb__thread-body" }, Zn = { class: "wm-onb__thread-title" }, es = ["innerHTML"], ts = { class: "wm-onb__thread-meta" }, ns = {
2422
+ }, ns = ["aria-label"], ss = { class: "wm-onb__thread-body" }, rs = { class: "wm-onb__thread-title" }, is = ["innerHTML"], as = { class: "wm-onb__thread-meta" }, os = {
2392
2423
  key: 0,
2393
2424
  class: "wm-onb__thread-time"
2394
- }, ss = {
2425
+ }, ls = {
2395
2426
  key: 0,
2396
2427
  class: "wm-onb__empty"
2397
2428
  };
2398
- function rs(e, t, n, i, r, s) {
2429
+ function cs(e, t, n, i, r, s) {
2399
2430
  const o = R("AIAvatar");
2400
- return c(), d("div", _n, [
2401
- a("div", gn, [
2431
+ return c(), d("div", wn, [
2432
+ a("div", bn, [
2402
2433
  t[2] || (t[2] = a("svg", {
2403
2434
  class: "wm-onb__hero-deco",
2404
2435
  width: "180",
@@ -2437,12 +2468,12 @@ function rs(e, t, n, i, r, s) {
2437
2468
  size: 52,
2438
2469
  "image-url": n.defaultIconUrl
2439
2470
  }, null, 8, ["image-url"]),
2440
- a("div", pn, [
2441
- a("div", vn, v(s.heroTitle), 1),
2442
- a("div", yn, v(s.heroSub), 1)
2471
+ a("div", kn, [
2472
+ a("div", Cn, v(s.heroTitle), 1),
2473
+ a("div", An, v(s.heroSub), 1)
2443
2474
  ])
2444
2475
  ]),
2445
- a("div", wn, [
2476
+ a("div", Sn, [
2446
2477
  a("button", {
2447
2478
  type: "button",
2448
2479
  class: "wm-onb__startBtn",
@@ -2464,7 +2495,7 @@ function rs(e, t, n, i, r, s) {
2464
2495
  a("path", { d: "M12 5v14M5 12h14" })
2465
2496
  ])
2466
2497
  ], -1)),
2467
- a("span", kn, v(n.busy ? "…" : s.t("onboarding.start")), 1),
2498
+ a("span", Tn, v(n.busy ? "…" : s.t("onboarding.start")), 1),
2468
2499
  t[4] || (t[4] = a("svg", {
2469
2500
  class: "wm-onb__startArrow",
2470
2501
  width: "14",
@@ -2479,47 +2510,44 @@ function rs(e, t, n, i, r, s) {
2479
2510
  }, [
2480
2511
  a("path", { d: "M5 12h14M13 5l7 7-7 7" })
2481
2512
  ], -1))
2482
- ], 8, bn)
2513
+ ], 8, Mn)
2483
2514
  ]),
2484
2515
  n.quickLinks.length ? (c(), d("div", {
2485
2516
  key: 0,
2486
2517
  class: I(s.quickLinksLayout)
2487
2518
  }, [
2488
- (c(!0), d(E, null, j(n.quickLinks, (l, g) => (c(), d("button", {
2519
+ (c(!0), d(E, null, F(n.quickLinks, (l, g) => (c(), d("button", {
2489
2520
  key: g,
2490
2521
  type: "button",
2491
2522
  class: I(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
2492
- style: H(l.color ? { "--card-color": l.color } : null),
2523
+ style: H(s.cardInlineStyle(l)),
2493
2524
  onClick: (k) => e.$emit("select", l)
2494
2525
  }, [
2495
- a("span", An, [
2496
- l.icon_url ? (c(), d("span", {
2526
+ a("span", On, [
2527
+ s.safeIconUrl(l) ? (c(), d("span", {
2497
2528
  key: 0,
2498
2529
  class: "wm-onb__card-iconImg",
2499
- style: H({
2500
- "--icon-url": `url('${l.icon_url}')`
2501
- }),
2502
2530
  role: "img",
2503
2531
  "aria-label": l.label || ""
2504
- }, null, 12, Sn)) : (c(), d("svg", Mn, [
2532
+ }, null, 8, In)) : (c(), d("svg", Ln, [
2505
2533
  a("path", {
2506
2534
  d: s.iconPath(l.icon)
2507
- }, null, 8, Tn)
2535
+ }, null, 8, En)
2508
2536
  ]))
2509
2537
  ]),
2510
- a("span", xn, [
2511
- a("span", On, v(l.label), 1),
2512
- l.subtitle ? (c(), d("span", In, v(l.subtitle), 1)) : w("", !0)
2538
+ a("span", Bn, [
2539
+ a("span", Rn, v(l.label), 1),
2540
+ l.subtitle ? (c(), d("span", Nn, v(l.subtitle), 1)) : w("", !0)
2513
2541
  ]),
2514
- s.isExternalLink(l) ? (c(), d("svg", Ln, [...t[5] || (t[5] = [
2542
+ s.isExternalLink(l) ? (c(), d("svg", Pn, [...t[5] || (t[5] = [
2515
2543
  a("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
2516
2544
  ])])) : w("", !0)
2517
- ], 14, Cn))), 128))
2545
+ ], 14, xn))), 128))
2518
2546
  ], 2)) : w("", !0),
2519
- s.unreadThreads.length ? (c(), d("div", En, [
2520
- a("div", Bn, v(s.t("onboarding.unreadConversations")), 1),
2521
- a("div", Rn, [
2522
- (c(!0), d(E, null, j(s.unreadThreads, (l) => (c(), d("button", {
2547
+ s.unreadThreads.length ? (c(), d("div", Un, [
2548
+ a("div", Fn, v(s.t("onboarding.unreadConversations")), 1),
2549
+ a("div", jn, [
2550
+ (c(!0), d(E, null, F(s.unreadThreads, (l) => (c(), d("button", {
2523
2551
  key: l.id,
2524
2552
  type: "button",
2525
2553
  class: "wm-onb__alert",
@@ -2528,7 +2556,7 @@ function rs(e, t, n, i, r, s) {
2528
2556
  a("span", {
2529
2557
  class: I(["wm-onb__alert-avatar", s.avatarWrapperClass(l)])
2530
2558
  }, [
2531
- s.isDefaultAvatar(l) ? (c(), d("span", Pn, [...t[6] || (t[6] = [
2559
+ s.isDefaultAvatar(l) ? (c(), d("span", Hn, [...t[6] || (t[6] = [
2532
2560
  a("svg", {
2533
2561
  width: "20",
2534
2562
  height: "20",
@@ -2542,32 +2570,32 @@ function rs(e, t, n, i, r, s) {
2542
2570
  }, [
2543
2571
  a("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2544
2572
  ], -1)
2545
- ])])) : (c(), P(ye(s.avatarComponent(l)), Te({
2573
+ ])])) : (c(), P(we(s.avatarComponent(l)), xe({
2546
2574
  key: 1,
2547
2575
  ref_for: !0
2548
2576
  }, s.avatarProps(l)), null, 16)),
2549
2577
  a("span", {
2550
2578
  class: "wm-onb__alert-dot",
2551
2579
  "aria-label": s.t("onboarding.unread")
2552
- }, null, 8, Un)
2580
+ }, null, 8, zn)
2553
2581
  ], 2),
2554
- a("span", jn, [
2555
- a("span", Fn, v(l.title), 1),
2582
+ a("span", qn, [
2583
+ a("span", Vn, v(l.title), 1),
2556
2584
  a("span", {
2557
2585
  class: "wm-onb__alert-preview",
2558
2586
  innerHTML: s.renderPreview(l.preview)
2559
- }, null, 8, Dn)
2587
+ }, null, 8, Kn)
2560
2588
  ]),
2561
- a("span", Hn, [
2562
- s.formatTs(l._ts) ? (c(), d("span", zn, v(s.formatTs(l._ts)), 1)) : w("", !0),
2563
- a("span", qn, v(s.t("onboarding.resume")), 1)
2589
+ a("span", $n, [
2590
+ s.formatTs(l._ts) ? (c(), d("span", Wn, v(s.formatTs(l._ts)), 1)) : w("", !0),
2591
+ a("span", Gn, v(s.t("onboarding.resume")), 1)
2564
2592
  ])
2565
- ], 8, Nn))), 128))
2593
+ ], 8, Dn))), 128))
2566
2594
  ])
2567
2595
  ])) : w("", !0),
2568
- n.openThreads.length ? (c(), d("div", Vn, [
2569
- a("div", Kn, v(s.t("onboarding.recentConversations")), 1),
2570
- a("div", $n, [
2596
+ n.openThreads.length ? (c(), d("div", Yn, [
2597
+ a("div", Xn, v(s.t("onboarding.recentConversations")), 1),
2598
+ a("div", Jn, [
2571
2599
  t[7] || (t[7] = a("span", { class: "wm-onb__searchIcon" }, [
2572
2600
  a("svg", {
2573
2601
  width: "12",
@@ -2588,12 +2616,12 @@ function rs(e, t, n, i, r, s) {
2588
2616
  type: "text",
2589
2617
  placeholder: s.t("onboarding.search"),
2590
2618
  "aria-label": s.t("onboarding.search")
2591
- }, null, 8, Wn), [
2619
+ }, null, 8, Qn), [
2592
2620
  [ee, r.query]
2593
2621
  ])
2594
2622
  ]),
2595
- a("div", Gn, [
2596
- (c(!0), d(E, null, j(s.filteredThreads, (l) => (c(), d("button", {
2623
+ a("div", Zn, [
2624
+ (c(!0), d(E, null, F(s.filteredThreads, (l) => (c(), d("button", {
2597
2625
  key: l.id,
2598
2626
  type: "button",
2599
2627
  class: I(["wm-onb__thread", { "wm-onb__thread--unread": l.unread }]),
@@ -2602,7 +2630,7 @@ function rs(e, t, n, i, r, s) {
2602
2630
  a("span", {
2603
2631
  class: I(["wm-onb__thread-avatar", s.avatarWrapperClass(l)])
2604
2632
  }, [
2605
- s.isDefaultAvatar(l) ? (c(), d("span", Jn, [...t[8] || (t[8] = [
2633
+ s.isDefaultAvatar(l) ? (c(), d("span", ts, [...t[8] || (t[8] = [
2606
2634
  a("svg", {
2607
2635
  width: "20",
2608
2636
  height: "20",
@@ -2616,7 +2644,7 @@ function rs(e, t, n, i, r, s) {
2616
2644
  }, [
2617
2645
  a("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2618
2646
  ], -1)
2619
- ])])) : (c(), P(ye(s.avatarComponent(l)), Te({
2647
+ ])])) : (c(), P(we(s.avatarComponent(l)), xe({
2620
2648
  key: 1,
2621
2649
  ref_for: !0
2622
2650
  }, s.avatarProps(l)), null, 16)),
@@ -2624,17 +2652,17 @@ function rs(e, t, n, i, r, s) {
2624
2652
  key: 2,
2625
2653
  class: "wm-onb__thread-dot",
2626
2654
  "aria-label": s.t("onboarding.unread")
2627
- }, null, 8, Qn)) : w("", !0)
2655
+ }, null, 8, ns)) : w("", !0)
2628
2656
  ], 2),
2629
- a("span", Xn, [
2630
- a("span", Zn, v(l.title), 1),
2657
+ a("span", ss, [
2658
+ a("span", rs, v(l.title), 1),
2631
2659
  a("span", {
2632
2660
  class: "wm-onb__thread-preview",
2633
2661
  innerHTML: s.renderPreview(l.preview)
2634
- }, null, 8, es)
2662
+ }, null, 8, is)
2635
2663
  ]),
2636
- a("span", ts, [
2637
- s.formatTs(l._ts) ? (c(), d("span", ns, v(s.formatTs(l._ts)), 1)) : w("", !0),
2664
+ a("span", as, [
2665
+ s.formatTs(l._ts) ? (c(), d("span", os, v(s.formatTs(l._ts)), 1)) : w("", !0),
2638
2666
  t[9] || (t[9] = a("svg", {
2639
2667
  width: "14",
2640
2668
  height: "14",
@@ -2650,17 +2678,17 @@ function rs(e, t, n, i, r, s) {
2650
2678
  a("path", { d: "M5 12h14M13 5l7 7-7 7" })
2651
2679
  ], -1))
2652
2680
  ])
2653
- ], 10, Yn))), 128)),
2654
- s.filteredThreads.length ? w("", !0) : (c(), d("div", ss, v(s.t("onboarding.noResults", { query: r.query })), 1))
2681
+ ], 10, es))), 128)),
2682
+ s.filteredThreads.length ? w("", !0) : (c(), d("div", ls, v(s.t("onboarding.noResults", { query: r.query })), 1))
2655
2683
  ])
2656
2684
  ])) : w("", !0)
2657
2685
  ]);
2658
2686
  }
2659
- const is = /* @__PURE__ */ N(fn, [["render", rs], ["__scopeId", "data-v-37fd5506"]]);
2660
- function as(e) {
2687
+ const ds = /* @__PURE__ */ N(yn, [["render", cs], ["__scopeId", "data-v-7b678f17"]]);
2688
+ function us(e) {
2661
2689
  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();
2662
2690
  }
2663
- const os = {
2691
+ const hs = {
2664
2692
  name: "WmActionResult",
2665
2693
  props: {
2666
2694
  state: { type: String, default: "success" },
@@ -2670,13 +2698,13 @@ const os = {
2670
2698
  },
2671
2699
  computed: {
2672
2700
  detailText() {
2673
- return as(this.detail);
2701
+ return us(this.detail);
2674
2702
  }
2675
2703
  }
2676
- }, ls = {
2704
+ }, ms = {
2677
2705
  class: "wm-result__icon",
2678
2706
  "aria-hidden": "true"
2679
- }, cs = {
2707
+ }, fs = {
2680
2708
  key: 0,
2681
2709
  width: "11",
2682
2710
  height: "11",
@@ -2686,7 +2714,7 @@ const os = {
2686
2714
  "stroke-width": "2.8",
2687
2715
  "stroke-linecap": "round",
2688
2716
  "stroke-linejoin": "round"
2689
- }, ds = {
2717
+ }, _s = {
2690
2718
  key: 1,
2691
2719
  width: "11",
2692
2720
  height: "11",
@@ -2696,7 +2724,7 @@ const os = {
2696
2724
  "stroke-width": "2.6",
2697
2725
  "stroke-linecap": "round",
2698
2726
  "stroke-linejoin": "round"
2699
- }, us = {
2727
+ }, gs = {
2700
2728
  key: 2,
2701
2729
  width: "11",
2702
2730
  height: "11",
@@ -2706,7 +2734,7 @@ const os = {
2706
2734
  "stroke-width": "2.4",
2707
2735
  "stroke-linecap": "round",
2708
2736
  "stroke-linejoin": "round"
2709
- }, hs = {
2737
+ }, ps = {
2710
2738
  key: 3,
2711
2739
  width: "12",
2712
2740
  height: "12",
@@ -2716,24 +2744,24 @@ const os = {
2716
2744
  "stroke-width": "2.2",
2717
2745
  "stroke-linecap": "round",
2718
2746
  "stroke-linejoin": "round"
2719
- }, ms = { class: "wm-result__body" }, fs = { class: "wm-result__label" }, _s = { class: "wm-result__detail" };
2720
- function gs(e, t, n, i, r, s) {
2747
+ }, vs = { class: "wm-result__body" }, ys = { class: "wm-result__label" }, ws = { class: "wm-result__detail" };
2748
+ function bs(e, t, n, i, r, s) {
2721
2749
  return c(), d("div", {
2722
2750
  class: I(["wm-result", `wm-result--${n.state}`])
2723
2751
  }, [
2724
- a("span", ls, [
2725
- n.state === "success" ? (c(), d("svg", cs, [...t[0] || (t[0] = [
2752
+ a("span", ms, [
2753
+ n.state === "success" ? (c(), d("svg", fs, [...t[0] || (t[0] = [
2726
2754
  a("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2727
- ])])) : n.state === "rejected" ? (c(), d("svg", ds, [...t[1] || (t[1] = [
2755
+ ])])) : n.state === "rejected" ? (c(), d("svg", _s, [...t[1] || (t[1] = [
2728
2756
  a("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2729
- ])])) : n.state === "awaiting" ? (c(), d("svg", us, [...t[2] || (t[2] = [
2757
+ ])])) : n.state === "awaiting" ? (c(), d("svg", gs, [...t[2] || (t[2] = [
2730
2758
  a("circle", {
2731
2759
  cx: "12",
2732
2760
  cy: "12",
2733
2761
  r: "10"
2734
2762
  }, null, -1),
2735
2763
  a("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2736
- ])])) : (c(), d("svg", hs, [...t[3] || (t[3] = [
2764
+ ])])) : (c(), d("svg", ps, [...t[3] || (t[3] = [
2737
2765
  a("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),
2738
2766
  a("line", {
2739
2767
  x1: "12",
@@ -2749,24 +2777,24 @@ function gs(e, t, n, i, r, s) {
2749
2777
  }, null, -1)
2750
2778
  ])]))
2751
2779
  ]),
2752
- a("span", ms, [
2753
- a("span", fs, v(n.label), 1),
2780
+ a("span", vs, [
2781
+ a("span", ys, v(n.label), 1),
2754
2782
  s.detailText ? (c(), d(E, { key: 0 }, [
2755
2783
  t[4] || (t[4] = a("span", {
2756
2784
  class: "wm-result__sep",
2757
2785
  "aria-hidden": "true"
2758
2786
  }, " · ", -1)),
2759
- a("span", _s, v(s.detailText), 1)
2787
+ a("span", ws, v(s.detailText), 1)
2760
2788
  ], 64)) : w("", !0)
2761
2789
  ])
2762
2790
  ], 2);
2763
2791
  }
2764
- const ps = /* @__PURE__ */ N(os, [["render", gs], ["__scopeId", "data-v-7284acd0"]]), vs = {
2792
+ const ks = /* @__PURE__ */ N(hs, [["render", bs], ["__scopeId", "data-v-7284acd0"]]), Cs = {
2765
2793
  name: "WmArtifactFormResponse",
2766
2794
  inject: {
2767
2795
  // Translator shared by the Messenger shell; French fallback when
2768
2796
  // the component is used standalone.
2769
- t: { default: () => F() }
2797
+ t: { default: () => j() }
2770
2798
  },
2771
2799
  props: {
2772
2800
  data: { type: Object, required: !0 }
@@ -2777,12 +2805,12 @@ const ps = /* @__PURE__ */ N(os, [["render", gs], ["__scopeId", "data-v-7284acd0
2777
2805
  return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
2778
2806
  }
2779
2807
  }
2780
- }, ys = { class: "wm-art wm-art--formResponse" }, ws = { class: "wm-art__head" }, bs = { class: "wm-art__title" }, ks = { class: "wm-art__badge wm-art__badge--success" }, Cs = { class: "wm-art__body" }, As = { class: "wm-art__fieldLabel" };
2781
- function Ss(e, t, n, i, r, s) {
2782
- return c(), d("div", ys, [
2783
- a("div", ws, [
2784
- a("div", bs, v(n.data.title || s.t("form.title")), 1),
2785
- a("span", ks, [
2808
+ }, As = { class: "wm-art wm-art--formResponse" }, Ss = { class: "wm-art__head" }, Ms = { class: "wm-art__title" }, Ts = { class: "wm-art__badge wm-art__badge--success" }, xs = { class: "wm-art__body" }, Os = { class: "wm-art__fieldLabel" };
2809
+ function Is(e, t, n, i, r, s) {
2810
+ return c(), d("div", As, [
2811
+ a("div", Ss, [
2812
+ a("div", Ms, v(n.data.title || s.t("form.title")), 1),
2813
+ a("span", Ts, [
2786
2814
  t[0] || (t[0] = a("svg", {
2787
2815
  width: "11",
2788
2816
  height: "11",
@@ -2796,15 +2824,15 @@ function Ss(e, t, n, i, r, s) {
2796
2824
  }, [
2797
2825
  a("polyline", { points: "20 6 9 17 4 12" })
2798
2826
  ], -1)),
2799
- be(" " + v(s.t("form.sent")), 1)
2827
+ ke(" " + v(s.t("form.sent")), 1)
2800
2828
  ])
2801
2829
  ]),
2802
- a("div", Cs, [
2803
- (c(!0), d(E, null, j(s.fields, (o, l) => (c(), d("div", {
2830
+ a("div", xs, [
2831
+ (c(!0), d(E, null, F(s.fields, (o, l) => (c(), d("div", {
2804
2832
  key: l,
2805
2833
  class: "wm-art__field"
2806
2834
  }, [
2807
- a("div", As, v(o.label), 1),
2835
+ a("div", Os, v(o.label), 1),
2808
2836
  a("div", {
2809
2837
  class: I([
2810
2838
  "wm-art__fieldValue",
@@ -2815,7 +2843,7 @@ function Ss(e, t, n, i, r, s) {
2815
2843
  ])
2816
2844
  ]);
2817
2845
  }
2818
- const Ms = /* @__PURE__ */ N(vs, [["render", Ss], ["__scopeId", "data-v-713aecf1"]]), Ts = {
2846
+ const Ls = /* @__PURE__ */ N(Cs, [["render", Is], ["__scopeId", "data-v-713aecf1"]]), Es = {
2819
2847
  name: "WmArtifactInfoCard",
2820
2848
  props: {
2821
2849
  data: { type: Object, required: !0 }
@@ -2830,32 +2858,32 @@ const Ms = /* @__PURE__ */ N(vs, [["render", Ss], ["__scopeId", "data-v-713aecf1
2830
2858
  return !!((e = this.data) != null && e.body) || this.fields.length > 0;
2831
2859
  }
2832
2860
  }
2833
- }, xs = { class: "wm-art wm-art--infoCard" }, Os = {
2861
+ }, Bs = { class: "wm-art wm-art--infoCard" }, Rs = {
2834
2862
  key: 0,
2835
2863
  class: "wm-art__image"
2836
- }, Is = ["src", "alt"], Ls = { class: "wm-art__head" }, Es = { class: "wm-art__headMain" }, Bs = { class: "wm-art__title" }, Rs = {
2864
+ }, Ns = ["src", "alt"], Ps = { class: "wm-art__head" }, Us = { class: "wm-art__headMain" }, Fs = { class: "wm-art__title" }, js = {
2837
2865
  key: 0,
2838
2866
  class: "wm-art__subtitle"
2839
- }, Ns = {
2867
+ }, Ds = {
2840
2868
  key: 1,
2841
2869
  class: "wm-art__body"
2842
- }, Ps = {
2870
+ }, Hs = {
2843
2871
  key: 0,
2844
2872
  class: "wm-art__text"
2845
- }, Us = { class: "wm-art__fieldLabel" };
2846
- function js(e, t, n, i, r, s) {
2847
- return c(), d("div", xs, [
2848
- n.data.image_url ? (c(), d("figure", Os, [
2873
+ }, zs = { class: "wm-art__fieldLabel" };
2874
+ function qs(e, t, n, i, r, s) {
2875
+ return c(), d("div", Bs, [
2876
+ n.data.image_url ? (c(), d("figure", Rs, [
2849
2877
  a("img", {
2850
2878
  src: n.data.image_url,
2851
2879
  alt: n.data.title || "",
2852
2880
  loading: "lazy"
2853
- }, null, 8, Is)
2881
+ }, null, 8, Ns)
2854
2882
  ])) : w("", !0),
2855
- a("div", Ls, [
2856
- a("div", Es, [
2857
- a("div", Bs, v(n.data.title), 1),
2858
- n.data.subtitle ? (c(), d("div", Rs, v(n.data.subtitle), 1)) : w("", !0)
2883
+ a("div", Ps, [
2884
+ a("div", Us, [
2885
+ a("div", Fs, v(n.data.title), 1),
2886
+ n.data.subtitle ? (c(), d("div", js, v(n.data.subtitle), 1)) : w("", !0)
2859
2887
  ]),
2860
2888
  n.data.badge && n.data.badge.label ? (c(), d("span", {
2861
2889
  key: 0,
@@ -2865,13 +2893,13 @@ function js(e, t, n, i, r, s) {
2865
2893
  ])
2866
2894
  }, v(n.data.badge.label), 3)) : w("", !0)
2867
2895
  ]),
2868
- s.hasBody ? (c(), d("div", Ns, [
2869
- n.data.body ? (c(), d("div", Ps, v(n.data.body), 1)) : w("", !0),
2870
- s.fields.length ? (c(!0), d(E, { key: 1 }, j(s.fields, (o, l) => (c(), d("div", {
2896
+ s.hasBody ? (c(), d("div", Ds, [
2897
+ n.data.body ? (c(), d("div", Hs, v(n.data.body), 1)) : w("", !0),
2898
+ s.fields.length ? (c(!0), d(E, { key: 1 }, F(s.fields, (o, l) => (c(), d("div", {
2871
2899
  key: l,
2872
2900
  class: "wm-art__field"
2873
2901
  }, [
2874
- a("div", Us, v(o.label), 1),
2902
+ a("div", zs, v(o.label), 1),
2875
2903
  a("div", {
2876
2904
  class: I([
2877
2905
  "wm-art__fieldValue",
@@ -2882,8 +2910,8 @@ function js(e, t, n, i, r, s) {
2882
2910
  ])) : w("", !0)
2883
2911
  ]);
2884
2912
  }
2885
- const Fs = /* @__PURE__ */ N(Ts, [["render", js], ["__scopeId", "data-v-7eae0e4a"]]);
2886
- function Ds(e, t, n) {
2913
+ const Vs = /* @__PURE__ */ N(Es, [["render", qs], ["__scopeId", "data-v-7eae0e4a"]]);
2914
+ function Ks(e, t, n) {
2887
2915
  if (!e) return "";
2888
2916
  const i = new Date(e);
2889
2917
  if (Number.isNaN(i.getTime())) return e;
@@ -2897,12 +2925,12 @@ function Ds(e, t, n) {
2897
2925
  });
2898
2926
  return `${r}${n}${s}`;
2899
2927
  }
2900
- const Hs = {
2928
+ const $s = {
2901
2929
  name: "WmArtifactTicket",
2902
2930
  inject: {
2903
2931
  // Translator + resolved-language getter shared by the Messenger
2904
2932
  // shell. Fall back to French wording when used standalone.
2905
- t: { default: () => F() },
2933
+ t: { default: () => j() },
2906
2934
  wmLocale: { default: () => () => "fr" }
2907
2935
  },
2908
2936
  props: {
@@ -2915,7 +2943,7 @@ const Hs = {
2915
2943
  },
2916
2944
  formattedDate() {
2917
2945
  var e;
2918
- return Ds(
2946
+ return Ks(
2919
2947
  (e = this.data) == null ? void 0 : e.created_at,
2920
2948
  ae(this.wmLocale()),
2921
2949
  this.t("ticket.dateAt")
@@ -2943,13 +2971,13 @@ const Hs = {
2943
2971
  return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
2944
2972
  }
2945
2973
  }
2946
- }, zs = { class: "wm-art wm-art--ticket" }, qs = { class: "wm-art__head wm-tk__head" }, Vs = { class: "wm-art__title wm-tk__title" }, Ks = { class: "wm-tk__sub" }, $s = { class: "wm-tk__ref" }, Ws = {
2974
+ }, Ws = { class: "wm-art wm-art--ticket" }, Gs = { class: "wm-art__head wm-tk__head" }, Ys = { class: "wm-art__title wm-tk__title" }, Xs = { class: "wm-tk__sub" }, Js = { class: "wm-tk__ref" }, Qs = {
2947
2975
  key: 0,
2948
2976
  class: "wm-tk__text"
2949
- }, Gs = {
2977
+ }, Zs = {
2950
2978
  key: 0,
2951
2979
  class: "wm-art__body"
2952
- }, Ys = { class: "wm-art__fieldLabel" }, Js = ["data-level"], Qs = {
2980
+ }, er = { class: "wm-art__fieldLabel" }, tr = ["data-level"], nr = {
2953
2981
  key: 1,
2954
2982
  class: "wm-tk__date",
2955
2983
  width: "12",
@@ -2961,16 +2989,16 @@ const Hs = {
2961
2989
  "stroke-linecap": "round",
2962
2990
  "stroke-linejoin": "round",
2963
2991
  "aria-hidden": "true"
2964
- }, Xs = {
2992
+ }, sr = {
2965
2993
  key: 1,
2966
2994
  class: "wm-art__footer wm-tk__footer"
2967
2995
  };
2968
- function Zs(e, t, n, i, r, s) {
2969
- return c(), d("div", zs, [
2970
- a("div", qs, [
2971
- a("div", Vs, v(n.data.title), 1),
2972
- a("div", Ks, [
2973
- a("div", $s, [
2996
+ function rr(e, t, n, i, r, s) {
2997
+ return c(), d("div", Ws, [
2998
+ a("div", Gs, [
2999
+ a("div", Ys, v(n.data.title), 1),
3000
+ a("div", Xs, [
3001
+ a("div", Js, [
2974
3002
  t[0] || (t[0] = a("svg", {
2975
3003
  width: "11",
2976
3004
  height: "11",
@@ -2998,17 +3026,17 @@ function Zs(e, t, n, i, r, s) {
2998
3026
  class: "wm-tk__dot",
2999
3027
  "aria-hidden": "true"
3000
3028
  }, null, -1)),
3001
- be(" " + v(n.data.status.label), 1)
3029
+ ke(" " + v(n.data.status.label), 1)
3002
3030
  ], 2)
3003
3031
  ]),
3004
- n.data.body ? (c(), d("div", Ws, v(n.data.body), 1)) : w("", !0)
3032
+ n.data.body ? (c(), d("div", Qs, v(n.data.body), 1)) : w("", !0)
3005
3033
  ]),
3006
- s.fields.length ? (c(), d("div", Gs, [
3007
- (c(!0), d(E, null, j(s.fields, (o, l) => (c(), d("div", {
3034
+ s.fields.length ? (c(), d("div", Zs, [
3035
+ (c(!0), d(E, null, F(s.fields, (o, l) => (c(), d("div", {
3008
3036
  key: l,
3009
3037
  class: "wm-art__field"
3010
3038
  }, [
3011
- a("div", Ys, v(o.label), 1),
3039
+ a("div", er, v(o.label), 1),
3012
3040
  a("div", {
3013
3041
  class: I([
3014
3042
  "wm-art__fieldValue",
@@ -3045,7 +3073,7 @@ function Zs(e, t, n, i, r, s) {
3045
3073
  height: "9",
3046
3074
  rx: "0.5"
3047
3075
  }, null, -1)
3048
- ])], 8, Js)) : s.isDate(o.label) ? (c(), d("svg", Qs, [...t[3] || (t[3] = [
3076
+ ])], 8, tr)) : s.isDate(o.label) ? (c(), d("svg", nr, [...t[3] || (t[3] = [
3049
3077
  a("rect", {
3050
3078
  x: "3",
3051
3079
  y: "4",
@@ -3059,7 +3087,7 @@ function Zs(e, t, n, i, r, s) {
3059
3087
  ], 2)
3060
3088
  ]))), 128))
3061
3089
  ])) : w("", !0),
3062
- n.data.created_at ? (c(), d("div", Xs, [
3090
+ n.data.created_at ? (c(), d("div", sr, [
3063
3091
  t[4] || (t[4] = a("svg", {
3064
3092
  width: "11",
3065
3093
  height: "11",
@@ -3084,11 +3112,11 @@ function Zs(e, t, n, i, r, s) {
3084
3112
  ])) : w("", !0)
3085
3113
  ]);
3086
3114
  }
3087
- const er = /* @__PURE__ */ N(Hs, [["render", Zs], ["__scopeId", "data-v-5f30c914"]]), tr = {
3088
- form_response: Ms,
3089
- info_card: Fs,
3090
- ticket: er
3091
- }, nr = {
3115
+ const ir = /* @__PURE__ */ N($s, [["render", rr], ["__scopeId", "data-v-5f30c914"]]), ar = {
3116
+ form_response: Ls,
3117
+ info_card: Vs,
3118
+ ticket: ir
3119
+ }, or = {
3092
3120
  name: "WmArtifactRenderer",
3093
3121
  props: {
3094
3122
  // Forme : { kind: string, data: any } (le `data` est validé
@@ -3099,23 +3127,23 @@ const er = /* @__PURE__ */ N(Hs, [["render", Zs], ["__scopeId", "data-v-5f30c914
3099
3127
  component() {
3100
3128
  var t;
3101
3129
  const e = (t = this.artifact) == null ? void 0 : t.kind;
3102
- return e && tr[e] || null;
3130
+ return e && ar[e] || null;
3103
3131
  }
3104
3132
  }
3105
3133
  };
3106
- function sr(e, t, n, i, r, s) {
3107
- return s.component ? (c(), P(ye(s.component), {
3134
+ function lr(e, t, n, i, r, s) {
3135
+ return s.component ? (c(), P(we(s.component), {
3108
3136
  key: 0,
3109
3137
  data: n.artifact.data
3110
3138
  }, null, 8, ["data"])) : w("", !0);
3111
3139
  }
3112
- const rr = /* @__PURE__ */ N(nr, [["render", sr]]), ir = {
3140
+ const cr = /* @__PURE__ */ N(or, [["render", lr]]), dr = {
3113
3141
  name: "WmAttachmentPreview",
3114
3142
  inject: {
3115
3143
  signAttachmentFn: { default: null },
3116
3144
  // Translator shared by the Messenger shell; French fallback when
3117
3145
  // the component is used standalone.
3118
- t: { default: () => F() }
3146
+ t: { default: () => j() }
3119
3147
  },
3120
3148
  props: {
3121
3149
  attachment: { type: Object, required: !0 }
@@ -3177,15 +3205,15 @@ const rr = /* @__PURE__ */ N(nr, [["render", sr]]), ir = {
3177
3205
  this.safeHref === "#" && e.preventDefault();
3178
3206
  }
3179
3207
  }
3180
- }, ar = ["href"], or = ["src", "alt"], lr = ["src"], cr = ["src"], dr = ["href", "download"], ur = { class: "wm-att__main" }, hr = { class: "wm-att__name" }, mr = {
3208
+ }, ur = ["href"], hr = ["src", "alt"], mr = ["src"], fr = ["src"], _r = ["href", "download"], gr = { class: "wm-att__main" }, pr = { class: "wm-att__name" }, vr = {
3181
3209
  key: 0,
3182
3210
  class: "wm-att__meta"
3183
- }, fr = {
3211
+ }, yr = {
3184
3212
  key: 0,
3185
3213
  class: "wm-att__spin",
3186
3214
  "aria-hidden": "true"
3187
3215
  };
3188
- function _r(e, t, n, i, r, s) {
3216
+ function wr(e, t, n, i, r, s) {
3189
3217
  return c(), d("div", {
3190
3218
  class: I(["wm-att", ["wm-att--" + (s.kind || "file")]])
3191
3219
  }, [
@@ -3200,18 +3228,18 @@ function _r(e, t, n, i, r, s) {
3200
3228
  src: r.url,
3201
3229
  alt: s.displayName,
3202
3230
  loading: "lazy"
3203
- }, null, 8, or)
3204
- ], 8, ar)) : s.kind === "audio" && r.url ? (c(), d("audio", {
3231
+ }, null, 8, hr)
3232
+ ], 8, ur)) : s.kind === "audio" && r.url ? (c(), d("audio", {
3205
3233
  key: 1,
3206
3234
  src: r.url,
3207
3235
  controls: "",
3208
3236
  preload: "metadata"
3209
- }, null, 8, lr)) : s.kind === "video" && r.url ? (c(), d("video", {
3237
+ }, null, 8, mr)) : s.kind === "video" && r.url ? (c(), d("video", {
3210
3238
  key: 2,
3211
3239
  src: r.url,
3212
3240
  controls: "",
3213
3241
  preload: "metadata"
3214
- }, null, 8, cr)) : (c(), d("a", {
3242
+ }, null, 8, fr)) : (c(), d("a", {
3215
3243
  key: 3,
3216
3244
  class: "wm-att__file",
3217
3245
  href: s.safeHref,
@@ -3236,15 +3264,15 @@ function _r(e, t, n, i, r, s) {
3236
3264
  a("path", { d: "M14 2v6h6" })
3237
3265
  ])
3238
3266
  ], -1)),
3239
- a("span", ur, [
3240
- a("span", hr, v(s.displayName), 1),
3241
- s.sizeLabel ? (c(), d("span", mr, v(s.sizeLabel), 1)) : w("", !0)
3267
+ a("span", gr, [
3268
+ a("span", pr, v(s.displayName), 1),
3269
+ s.sizeLabel ? (c(), d("span", vr, v(s.sizeLabel), 1)) : w("", !0)
3242
3270
  ]),
3243
- r.loading ? (c(), d("span", fr)) : w("", !0)
3244
- ], 8, dr))
3271
+ r.loading ? (c(), d("span", yr)) : w("", !0)
3272
+ ], 8, _r))
3245
3273
  ], 2);
3246
3274
  }
3247
- const gr = /* @__PURE__ */ N(ir, [["render", _r], ["__scopeId", "data-v-0c877a62"]]), pr = {
3275
+ const br = /* @__PURE__ */ N(dr, [["render", wr], ["__scopeId", "data-v-0c877a62"]]), kr = {
3248
3276
  name: "WmBubble",
3249
3277
  props: {
3250
3278
  role: { type: String, default: "ai" },
@@ -3253,53 +3281,53 @@ const gr = /* @__PURE__ */ N(ir, [["render", _r], ["__scopeId", "data-v-0c877a62
3253
3281
  },
3254
3282
  computed: {
3255
3283
  rendered() {
3256
- return mn(this.text);
3284
+ return ht(this.text);
3257
3285
  }
3258
3286
  }
3259
- }, vr = ["innerHTML"];
3260
- function yr(e, t, n, i, r, s) {
3287
+ }, Cr = ["innerHTML"];
3288
+ function Ar(e, t, n, i, r, s) {
3261
3289
  return c(), d("div", {
3262
3290
  class: I(["wm-bubble", "wm-bubble--" + n.role])
3263
3291
  }, [
3264
- ze(e.$slots, "default", {}, () => [
3265
- a("span", { innerHTML: s.rendered }, null, 8, vr)
3292
+ Ve(e.$slots, "default", {}, () => [
3293
+ a("span", { innerHTML: s.rendered }, null, 8, Cr)
3266
3294
  ], !0)
3267
3295
  ], 2);
3268
3296
  }
3269
- const wr = /* @__PURE__ */ N(pr, [["render", yr], ["__scopeId", "data-v-7ab13147"]]), br = { name: "WmTyping" }, kr = { class: "wm-typing" };
3270
- function Cr(e, t, n, i, r, s) {
3271
- return c(), d("div", kr, [...t[0] || (t[0] = [
3297
+ const Sr = /* @__PURE__ */ N(kr, [["render", Ar], ["__scopeId", "data-v-7ab13147"]]), Mr = { name: "WmTyping" }, Tr = { class: "wm-typing" };
3298
+ function xr(e, t, n, i, r, s) {
3299
+ return c(), d("div", Tr, [...t[0] || (t[0] = [
3272
3300
  a("span", { style: { "animation-delay": "0s" } }, null, -1),
3273
3301
  a("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3274
3302
  a("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3275
3303
  ])]);
3276
3304
  }
3277
- const Ar = /* @__PURE__ */ N(br, [["render", Cr], ["__scopeId", "data-v-df2447fd"]]);
3305
+ const Or = /* @__PURE__ */ N(Mr, [["render", xr], ["__scopeId", "data-v-df2447fd"]]);
3278
3306
  function Z(e) {
3279
3307
  return e ? e.client_msg_id || e.id : "";
3280
3308
  }
3281
- const Sr = {
3309
+ const Ir = {
3282
3310
  transferred_to_human: "system.transferredToHuman",
3283
3311
  assigned: "system.assigned",
3284
3312
  unassigned: "system.unassigned",
3285
3313
  resolved: "system.resolved",
3286
3314
  reopened: "system.reopened",
3287
3315
  idle: "system.idle"
3288
- }, Mr = 80, Tr = 200, xr = {
3316
+ }, Lr = 80, Er = 200, Br = {
3289
3317
  name: "WmMessageList",
3290
3318
  components: {
3291
3319
  AIAvatar: de,
3292
- HumanAvatar: Se,
3293
- Bubble: wr,
3294
- Typing: Ar,
3295
- ActionResult: ps,
3296
- AttachmentPreview: gr,
3297
- ArtifactRenderer: rr
3320
+ HumanAvatar: Me,
3321
+ Bubble: Sr,
3322
+ Typing: Or,
3323
+ ActionResult: ks,
3324
+ AttachmentPreview: br,
3325
+ ArtifactRenderer: cr
3298
3326
  },
3299
3327
  inject: {
3300
3328
  // Translator + resolved-language getter shared by the Messenger
3301
3329
  // shell. Fall back to French wording when used standalone.
3302
- t: { default: () => F() },
3330
+ t: { default: () => j() },
3303
3331
  wmLocale: { default: () => () => "fr" }
3304
3332
  },
3305
3333
  props: {
@@ -3484,11 +3512,11 @@ const Sr = {
3484
3512
  return `g-${n}`;
3485
3513
  },
3486
3514
  isAtBottom(e) {
3487
- return e.scrollHeight - e.scrollTop - e.clientHeight <= Mr;
3515
+ return e.scrollHeight - e.scrollTop - e.clientHeight <= Lr;
3488
3516
  },
3489
3517
  onScroll() {
3490
3518
  const e = this.$refs.scrollEl;
3491
- e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Tr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3519
+ e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Er && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3492
3520
  },
3493
3521
  // Capture pre-patch scroll state and restore it on the next tick.
3494
3522
  //
@@ -3689,9 +3717,9 @@ const Sr = {
3689
3717
  // doit garder son arrondi.
3690
3718
  cornersFor(e, t) {
3691
3719
  var te, ne, se;
3692
- const n = e.items, i = (te = n[t]) == null ? void 0 : te.kind, r = (ne = n[t - 1]) == null ? void 0 : ne.kind, s = (se = n[t + 1]) == null ? void 0 : se.kind, o = e.role === "user", l = 14, g = 4, k = r == null ? void 0 : r.bottom, b = s == null ? void 0 : s.top, x = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, M = ($, re, Q) => $ != null && x != null ? $ + z >= x : re === Q || re === "card" && Q === "bubble";
3693
- let U = l, L = l, q = l, J = l;
3694
- return o ? (k && (L = g), (b || !s) && (q = g), k && M(B, k, i == null ? void 0 : i.top) && (U = g), b && M(A, b, i == null ? void 0 : i.bottom) && (J = g)) : (k && (U = g), (b || !s) && (J = g), k && M(B, k, i == null ? void 0 : i.top) && (L = g), b && M(A, b, i == null ? void 0 : i.bottom) && (q = g)), { tl: U, tr: L, br: q, bl: J };
3720
+ const n = e.items, i = (te = n[t]) == null ? void 0 : te.kind, r = (ne = n[t - 1]) == null ? void 0 : ne.kind, s = (se = n[t + 1]) == null ? void 0 : se.kind, o = e.role === "user", l = 14, g = 4, k = r == null ? void 0 : r.bottom, b = s == null ? void 0 : s.top, x = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, M = ($, re, J) => $ != null && x != null ? $ + z >= x : re === J || re === "card" && J === "bubble";
3721
+ let U = l, L = l, q = l, X = l;
3722
+ return o ? (k && (L = g), (b || !s) && (q = g), k && M(B, k, i == null ? void 0 : i.top) && (U = g), b && M(A, b, i == null ? void 0 : i.bottom) && (X = g)) : (k && (U = g), (b || !s) && (X = g), k && M(B, k, i == null ? void 0 : i.top) && (L = g), b && M(A, b, i == null ? void 0 : i.bottom) && (q = g)), { tl: U, tr: L, br: q, bl: X };
3695
3723
  },
3696
3724
  // Inline style emitting the four corner CSS variables. Set on
3697
3725
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3767,7 +3795,7 @@ const Sr = {
3767
3795
  timeOf(e) {
3768
3796
  if (!(e != null && e.created_at)) return "";
3769
3797
  try {
3770
- return we(
3798
+ return be(
3771
3799
  new Date(e.created_at),
3772
3800
  ae(this.wmLocale())
3773
3801
  );
@@ -3779,7 +3807,7 @@ const Sr = {
3779
3807
  const t = e.items[e.items.length - 1], n = (t == null ? void 0 : t.message) || e.messages[e.messages.length - 1];
3780
3808
  if (!(n != null && n.created_at)) return "";
3781
3809
  try {
3782
- return we(
3810
+ return be(
3783
3811
  new Date(n.created_at),
3784
3812
  ae(this.wmLocale())
3785
3813
  );
@@ -3826,7 +3854,7 @@ const Sr = {
3826
3854
  },
3827
3855
  systemLabel(e) {
3828
3856
  var r, s, o;
3829
- const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = Sr[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((o = e == null ? void 0 : e.author) == null ? void 0 : o.name) || this.t("messageList.anAgent");
3857
+ const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = Ir[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((o = e == null ? void 0 : e.author) == null ? void 0 : o.name) || this.t("messageList.anAgent");
3830
3858
  return n ? this.t(n, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
3831
3859
  },
3832
3860
  scrollToBottom() {
@@ -3841,77 +3869,77 @@ const Sr = {
3841
3869
  e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
3842
3870
  }
3843
3871
  }
3844
- }, Or = { class: "wm-list__wrap" }, Ir = {
3872
+ }, Rr = { class: "wm-list__wrap" }, Nr = {
3845
3873
  key: 0,
3846
3874
  class: "wm-list__loadMore",
3847
3875
  role: "status",
3848
3876
  "aria-live": "polite"
3849
- }, Lr = { class: "wm-list__loadMore-lbl" }, Er = {
3877
+ }, Pr = { class: "wm-list__loadMore-lbl" }, Ur = {
3850
3878
  key: 1,
3851
3879
  class: "wm-list__historyEnd"
3852
- }, Br = {
3880
+ }, Fr = {
3853
3881
  key: 2,
3854
3882
  class: "wm-list__sep"
3855
- }, Rr = { class: "wm-list__sep-label" }, Nr = {
3883
+ }, jr = { class: "wm-list__sep-label" }, Dr = {
3856
3884
  key: 0,
3857
3885
  class: "wm-list__sep wm-list__sep--unread"
3858
- }, Pr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Ur = {
3886
+ }, Hr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, zr = {
3859
3887
  key: 0,
3860
3888
  class: "wm-list__sysep"
3861
- }, jr = { class: "wm-list__sysep-label" }, Fr = ["data-row-key", "onPointerdown"], Dr = {
3889
+ }, qr = { class: "wm-list__sysep-label" }, Vr = ["data-row-key", "onPointerdown"], Kr = {
3862
3890
  key: 0,
3863
3891
  class: "wm-list__avatarSlot"
3864
- }, Hr = {
3892
+ }, $r = {
3865
3893
  key: 5,
3866
3894
  class: "wm-list__body"
3867
- }, zr = { key: 0 }, qr = {
3895
+ }, Wr = { key: 0 }, Gr = {
3868
3896
  key: 1,
3869
3897
  "aria-hidden": "true"
3870
- }, Vr = { key: 2 }, Kr = { key: 0 }, $r = {
3898
+ }, Yr = { key: 2 }, Xr = { key: 0 }, Jr = {
3871
3899
  key: 1,
3872
3900
  "aria-hidden": "true"
3873
- }, Wr = { key: 2 }, Gr = {
3901
+ }, Qr = { key: 2 }, Zr = {
3874
3902
  key: 3,
3875
3903
  class: "wm-list__row wm-list__row--ai fade-up"
3876
- }, Yr = { class: "wm-list__avatarSlot" }, Jr = ["aria-label", "title"];
3877
- function Qr(e, t, n, i, r, s) {
3904
+ }, ei = { class: "wm-list__avatarSlot" }, ti = ["aria-label", "title"];
3905
+ function ni(e, t, n, i, r, s) {
3878
3906
  const o = R("AIAvatar"), l = R("HumanAvatar"), g = R("ActionResult"), k = R("ArtifactRenderer"), b = R("Bubble"), x = R("AttachmentPreview"), B = R("Typing");
3879
- return c(), d("div", Or, [
3907
+ return c(), d("div", Rr, [
3880
3908
  a("div", {
3881
3909
  ref: "scrollEl",
3882
3910
  class: I(["wm-list", { "wm-list--silent": r.silentFades }]),
3883
3911
  onScrollPassive: t[4] || (t[4] = (...A) => s.onScroll && s.onScroll(...A))
3884
3912
  }, [
3885
- n.loadingMore ? (c(), d("div", Ir, [
3913
+ n.loadingMore ? (c(), d("div", Nr, [
3886
3914
  t[6] || (t[6] = a("span", {
3887
3915
  class: "wm-list__loadMore-spinner",
3888
3916
  "aria-hidden": "true"
3889
3917
  }, null, -1)),
3890
- a("span", Lr, v(s.t("messageList.loadingHistory")), 1)
3891
- ])) : s.historyExhausted ? (c(), d("div", Er, v(s.t("messageList.conversationStart")), 1)) : w("", !0),
3892
- n.dateLabel ? (c(), d("div", Br, [
3918
+ a("span", Pr, v(s.t("messageList.loadingHistory")), 1)
3919
+ ])) : s.historyExhausted ? (c(), d("div", Ur, v(s.t("messageList.conversationStart")), 1)) : w("", !0),
3920
+ n.dateLabel ? (c(), d("div", Fr, [
3893
3921
  t[7] || (t[7] = a("div", { class: "wm-list__line" }, null, -1)),
3894
- a("span", Rr, v(n.dateLabel), 1),
3922
+ a("span", jr, v(n.dateLabel), 1),
3895
3923
  t[8] || (t[8] = a("div", { class: "wm-list__line" }, null, -1))
3896
3924
  ])) : w("", !0),
3897
- (c(!0), d(E, null, j(s.groups, (A, z) => (c(), d(E, {
3925
+ (c(!0), d(E, null, F(s.groups, (A, z) => (c(), d(E, {
3898
3926
  key: A.key
3899
3927
  }, [
3900
- A.key === s.unreadGroupKey ? (c(), d("div", Nr, [
3928
+ A.key === s.unreadGroupKey ? (c(), d("div", Dr, [
3901
3929
  t[9] || (t[9] = a("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3902
- a("span", Pr, v(s.t("messageList.unread")), 1),
3930
+ a("span", Hr, v(s.t("messageList.unread")), 1),
3903
3931
  t[10] || (t[10] = a("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3904
3932
  ])) : w("", !0),
3905
3933
  A.role === "system" || A.items.length ? (c(), d("div", {
3906
3934
  key: 1,
3907
3935
  class: I(["wm-list__group", "wm-list__group--" + A.role])
3908
3936
  }, [
3909
- A.role === "system" ? (c(), d("div", Ur, [
3937
+ A.role === "system" ? (c(), d("div", zr, [
3910
3938
  t[11] || (t[11] = a("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3911
- a("span", jr, v(A.systemLabel), 1),
3939
+ a("span", qr, v(A.systemLabel), 1),
3912
3940
  t[12] || (t[12] = a("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3913
3941
  ])) : (c(), d(E, { key: 1 }, [
3914
- (c(!0), d(E, null, j(A.items, (M, U) => (c(), d(E, {
3942
+ (c(!0), d(E, null, F(A.items, (M, U) => (c(), d(E, {
3915
3943
  key: `${s.messageKey(M.message)}-${M.partKey}`
3916
3944
  }, [
3917
3945
  a("div", {
@@ -3931,7 +3959,7 @@ function Qr(e, t, n, i, r, s) {
3931
3959
  onContextmenu: t[3] || (t[3] = Y(() => {
3932
3960
  }, ["prevent"]))
3933
3961
  }, [
3934
- A.role !== "user" ? (c(), d("div", Dr, [
3962
+ A.role !== "user" ? (c(), d("div", Kr, [
3935
3963
  U === A.items.length - 1 ? (c(), d(E, { key: 0 }, [
3936
3964
  A.role === "ai" ? (c(), P(o, {
3937
3965
  key: 0,
@@ -3964,7 +3992,7 @@ function Qr(e, t, n, i, r, s) {
3964
3992
  }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), P(k, {
3965
3993
  key: 4,
3966
3994
  artifact: s.artifactOf(M.message)
3967
- }, null, 8, ["artifact"])) : (c(), d("div", Hr, [
3995
+ }, null, 8, ["artifact"])) : (c(), d("div", $r, [
3968
3996
  M.message.text_md ? (c(), P(b, {
3969
3997
  key: 0,
3970
3998
  role: A.role,
@@ -3976,7 +4004,7 @@ function Qr(e, t, n, i, r, s) {
3976
4004
  "wm-list__atts--align-end": A.role === "user"
3977
4005
  }])
3978
4006
  }, [
3979
- (c(!0), d(E, null, j(s.attachmentsOf(
4007
+ (c(!0), d(E, null, F(s.attachmentsOf(
3980
4008
  M.message
3981
4009
  ), (L, q) => (c(), P(x, {
3982
4010
  key: `${s.messageKey(M.message)}-att-${q}`,
@@ -3984,29 +4012,29 @@ function Qr(e, t, n, i, r, s) {
3984
4012
  }, null, 8, ["attachment"]))), 128))
3985
4013
  ], 2)) : w("", !0)
3986
4014
  ]))
3987
- ], 46, Fr),
4015
+ ], 46, Vr),
3988
4016
  U < A.items.length - 1 && r.pressedItemKey === `${s.messageKey(M.message)}-${M.partKey}` && (A.role !== "user" || s.timeOf(M.message)) ? (c(), d("div", {
3989
4017
  key: 0,
3990
4018
  class: I(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
3991
4019
  }, [
3992
- A.role !== "user" ? (c(), d("span", zr, v(s.roleLabel(A)), 1)) : w("", !0),
3993
- A.role !== "user" && s.timeOf(M.message) ? (c(), d("span", qr, "·")) : w("", !0),
3994
- s.timeOf(M.message) ? (c(), d("span", Vr, v(s.timeOf(M.message)), 1)) : w("", !0)
4020
+ A.role !== "user" ? (c(), d("span", Wr, v(s.roleLabel(A)), 1)) : w("", !0),
4021
+ A.role !== "user" && s.timeOf(M.message) ? (c(), d("span", Gr, "")) : w("", !0),
4022
+ s.timeOf(M.message) ? (c(), d("span", Yr, v(s.timeOf(M.message)), 1)) : w("", !0)
3995
4023
  ], 2)) : w("", !0)
3996
4024
  ], 64))), 128)),
3997
4025
  (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), d("div", {
3998
4026
  key: 0,
3999
4027
  class: I(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
4000
4028
  }, [
4001
- A.role !== "user" ? (c(), d("span", Kr, v(s.roleLabel(A)), 1)) : w("", !0),
4002
- A.role !== "user" && s.lastTimeOf(A) ? (c(), d("span", $r, "·")) : w("", !0),
4003
- s.lastTimeOf(A) ? (c(), d("span", Wr, v(s.lastTimeOf(A)), 1)) : w("", !0)
4029
+ A.role !== "user" ? (c(), d("span", Xr, v(s.roleLabel(A)), 1)) : w("", !0),
4030
+ A.role !== "user" && s.lastTimeOf(A) ? (c(), d("span", Jr, "")) : w("", !0),
4031
+ s.lastTimeOf(A) ? (c(), d("span", Qr, v(s.lastTimeOf(A)), 1)) : w("", !0)
4004
4032
  ], 2)) : w("", !0)
4005
4033
  ], 64))
4006
4034
  ], 2)) : w("", !0)
4007
4035
  ], 64))), 128)),
4008
- n.streamingActive ? (c(), d("div", Gr, [
4009
- a("div", Yr, [
4036
+ n.streamingActive ? (c(), d("div", Zr, [
4037
+ a("div", ei, [
4010
4038
  K(o, {
4011
4039
  size: 26,
4012
4040
  tail: !0,
@@ -4017,8 +4045,8 @@ function Qr(e, t, n, i, r, s) {
4017
4045
  K(B)
4018
4046
  ])) : w("", !0)
4019
4047
  ], 34),
4020
- K(Pe, { name: "wm-scrollDown" }, {
4021
- default: Ue(() => [
4048
+ K(Ue, { name: "wm-scrollDown" }, {
4049
+ default: Fe(() => [
4022
4050
  r.showScrollDown ? (c(), d("button", {
4023
4051
  key: 0,
4024
4052
  type: "button",
@@ -4040,15 +4068,15 @@ function Qr(e, t, n, i, r, s) {
4040
4068
  }, [
4041
4069
  a("path", { d: "M6 9l6 6 6-6" })
4042
4070
  ], -1)
4043
- ])], 8, Jr)) : w("", !0)
4071
+ ])], 8, ti)) : w("", !0)
4044
4072
  ]),
4045
4073
  _: 1
4046
4074
  })
4047
4075
  ]);
4048
4076
  }
4049
- const Xr = /* @__PURE__ */ N(xr, [["render", Qr], ["__scopeId", "data-v-9ddbd0e3"]]), fe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Me = typeof window < "u" && typeof window.MediaRecorder < "u";
4050
- function Zr() {
4051
- return Me && [
4077
+ const si = /* @__PURE__ */ N(Br, [["render", ni], ["__scopeId", "data-v-cf20685c"]]), _e = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Te = typeof window < "u" && typeof window.MediaRecorder < "u";
4078
+ function ri() {
4079
+ return Te && [
4052
4080
  "video/webm;codecs=vp9,opus",
4053
4081
  "video/webm;codecs=vp8,opus",
4054
4082
  "video/webm",
@@ -4058,7 +4086,7 @@ function Zr() {
4058
4086
  return (i = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : i.call(n, t);
4059
4087
  }) || "";
4060
4088
  }
4061
- function De({ audio: e }) {
4089
+ function ze({ audio: e }) {
4062
4090
  return {
4063
4091
  video: !0,
4064
4092
  audio: !!e,
@@ -4067,21 +4095,21 @@ function De({ audio: e }) {
4067
4095
  systemAudio: e ? "include" : "exclude"
4068
4096
  };
4069
4097
  }
4070
- function oo(e) {
4098
+ function mo(e) {
4071
4099
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
4072
4100
  }
4073
- async function ei() {
4074
- if (!fe) return null;
4101
+ async function ii() {
4102
+ if (!_e) return null;
4075
4103
  let e;
4076
4104
  try {
4077
4105
  e = await navigator.mediaDevices.getDisplayMedia(
4078
- De({ audio: !1 })
4106
+ ze({ audio: !1 })
4079
4107
  );
4080
4108
  } catch (t) {
4081
4109
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
4082
4110
  }
4083
4111
  try {
4084
- return await ti(e);
4112
+ return await ai(e);
4085
4113
  } catch (t) {
4086
4114
  return console.error("[media] screenshot capture", t), null;
4087
4115
  } finally {
@@ -4090,7 +4118,7 @@ async function ei() {
4090
4118
  });
4091
4119
  }
4092
4120
  }
4093
- async function ti(e) {
4121
+ async function ai(e) {
4094
4122
  const t = document.createElement("video");
4095
4123
  t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
4096
4124
  const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
@@ -4103,18 +4131,18 @@ async function ti(e) {
4103
4131
  }), o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4104
4132
  return new File([s], `capture-${o}.png`, { type: "image/png" });
4105
4133
  }
4106
- async function ni(e = {}) {
4134
+ async function oi(e = {}) {
4107
4135
  var k;
4108
- if (!fe || !Me) return null;
4136
+ if (!_e || !Te) return null;
4109
4137
  let t;
4110
4138
  try {
4111
4139
  t = await navigator.mediaDevices.getDisplayMedia(
4112
- De({ audio: !0 })
4140
+ ze({ audio: !0 })
4113
4141
  );
4114
4142
  } catch (b) {
4115
4143
  return (b == null ? void 0 : b.name) !== "NotAllowedError" && console.error("[media] record picker", b), null;
4116
4144
  }
4117
- const n = Zr();
4145
+ const n = ri();
4118
4146
  let i;
4119
4147
  try {
4120
4148
  i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
@@ -4168,7 +4196,7 @@ async function ni(e = {}) {
4168
4196
  }
4169
4197
  };
4170
4198
  }
4171
- const si = [
4199
+ const li = [
4172
4200
  {
4173
4201
  action: "file",
4174
4202
  labelKey: "composer.attachFile",
@@ -4184,12 +4212,12 @@ const si = [
4184
4212
  labelKey: "composer.recordScreen",
4185
4213
  path: "M23 7l-7 5 7 5V7z M1 5a2 2 0 012-2h12a2 2 0 012 2v14a2 2 0 01-2 2H3a2 2 0 01-2-2V5z"
4186
4214
  }
4187
- ], ri = {
4215
+ ], ci = {
4188
4216
  name: "WmComposer",
4189
4217
  inject: {
4190
4218
  // Translator shared by the Messenger shell; French fallback when
4191
4219
  // the component is used standalone.
4192
- t: { default: () => F() }
4220
+ t: { default: () => j() }
4193
4221
  },
4194
4222
  props: {
4195
4223
  modelValue: { type: String, default: "" },
@@ -4218,10 +4246,10 @@ const si = [
4218
4246
  return !this.disabled && !!this.local.trim();
4219
4247
  },
4220
4248
  attachItems() {
4221
- return si.map((e) => ({
4249
+ return li.map((e) => ({
4222
4250
  ...e,
4223
4251
  label: this.t(e.labelKey),
4224
- disabled: e.action === "screenshot" && !fe || e.action === "record" && (!fe || !Me)
4252
+ disabled: e.action === "screenshot" && !_e || e.action === "record" && (!_e || !Te)
4225
4253
  }));
4226
4254
  },
4227
4255
  recordingElapsedLabel() {
@@ -4292,13 +4320,13 @@ const si = [
4292
4320
  },
4293
4321
  async captureScreenshot() {
4294
4322
  if (this.disabled) return;
4295
- const e = await ei();
4323
+ const e = await ii();
4296
4324
  e && this.$emit("attach", e);
4297
4325
  },
4298
4326
  async startRecording() {
4299
4327
  if (this.recording || this.disabled) return;
4300
4328
  this.recordingElapsed = 0;
4301
- const e = await ni({
4329
+ const e = await oi({
4302
4330
  onstart: () => {
4303
4331
  this.recording = !0;
4304
4332
  },
@@ -4340,30 +4368,30 @@ const si = [
4340
4368
  !e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
4341
4369
  }
4342
4370
  }
4343
- }, ii = {
4371
+ }, di = {
4344
4372
  key: 0,
4345
4373
  class: "wm-rec"
4346
- }, ai = { class: "wm-rec__lbl" }, oi = {
4374
+ }, ui = { class: "wm-rec__lbl" }, hi = {
4347
4375
  key: 1,
4348
4376
  class: "wm-compose__menu",
4349
4377
  role: "menu"
4350
- }, li = ["disabled", "onClick"], ci = { class: "wm-compose__menuIcon" }, di = {
4378
+ }, mi = ["disabled", "onClick"], fi = { class: "wm-compose__menuIcon" }, _i = {
4351
4379
  viewBox: "0 0 24 24",
4352
4380
  width: "14",
4353
4381
  height: "14",
4354
4382
  "aria-hidden": "true"
4355
- }, ui = ["d"], hi = ["placeholder", "disabled"], mi = { class: "wm-compose__actions" }, fi = ["title", "aria-label", "disabled"], _i = ["disabled", "aria-label"];
4356
- function gi(e, t, n, i, r, s) {
4383
+ }, gi = ["d"], pi = ["placeholder", "disabled"], vi = { class: "wm-compose__actions" }, yi = ["title", "aria-label", "disabled"], wi = ["disabled", "aria-label"];
4384
+ function bi(e, t, n, i, r, s) {
4357
4385
  return c(), d("div", {
4358
4386
  class: I(["wm-compose-wrap", { "wm-compose-wrap--sheet": n.displayMode === "sheet" }]),
4359
4387
  style: H(r.kbOffset ? { transform: `translateY(-${r.kbOffset}px)` } : null)
4360
4388
  }, [
4361
- r.recording ? (c(), d("div", ii, [
4389
+ r.recording ? (c(), d("div", di, [
4362
4390
  t[8] || (t[8] = a("span", {
4363
4391
  class: "wm-rec__dot",
4364
4392
  "aria-hidden": "true"
4365
4393
  }, null, -1)),
4366
- a("span", ai, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4394
+ a("span", ui, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4367
4395
  a("button", {
4368
4396
  type: "button",
4369
4397
  class: "wm-rec__stop",
@@ -4386,16 +4414,16 @@ function gi(e, t, n, i, r, s) {
4386
4414
  class: "wm-compose__overlay",
4387
4415
  onClick: t[2] || (t[2] = (o) => r.attachOpen = !1)
4388
4416
  })) : w("", !0),
4389
- r.attachOpen ? (c(), d("div", oi, [
4390
- (c(!0), d(E, null, j(s.attachItems, (o) => (c(), d("button", {
4417
+ r.attachOpen ? (c(), d("div", hi, [
4418
+ (c(!0), d(E, null, F(s.attachItems, (o) => (c(), d("button", {
4391
4419
  key: o.action,
4392
4420
  type: "button",
4393
4421
  class: "wm-compose__menuItem",
4394
4422
  disabled: o.disabled,
4395
4423
  onClick: (l) => s.onAttachAction(o.action)
4396
4424
  }, [
4397
- a("span", ci, [
4398
- (c(), d("svg", di, [
4425
+ a("span", fi, [
4426
+ (c(), d("svg", _i, [
4399
4427
  a("path", {
4400
4428
  d: o.path,
4401
4429
  stroke: "currentColor",
@@ -4403,11 +4431,11 @@ function gi(e, t, n, i, r, s) {
4403
4431
  "stroke-linecap": "round",
4404
4432
  "stroke-linejoin": "round",
4405
4433
  fill: "none"
4406
- }, null, 8, ui)
4434
+ }, null, 8, gi)
4407
4435
  ]))
4408
4436
  ]),
4409
4437
  a("span", null, v(o.label), 1)
4410
- ], 8, li))), 128))
4438
+ ], 8, mi))), 128))
4411
4439
  ])) : w("", !0),
4412
4440
  W(a("textarea", {
4413
4441
  ref: "inputEl",
@@ -4418,10 +4446,10 @@ function gi(e, t, n, i, r, s) {
4418
4446
  disabled: n.disabled,
4419
4447
  onKeydown: t[4] || (t[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
4420
4448
  onInput: t[5] || (t[5] = (...o) => s.autosize && s.autosize(...o))
4421
- }, null, 40, hi), [
4449
+ }, null, 40, pi), [
4422
4450
  [ee, r.local]
4423
4451
  ]),
4424
- a("div", mi, [
4452
+ a("div", vi, [
4425
4453
  a("button", {
4426
4454
  type: "button",
4427
4455
  class: I(["wm-compose__icon", { "is-open": r.attachOpen }]),
@@ -4443,7 +4471,7 @@ function gi(e, t, n, i, r, s) {
4443
4471
  }, [
4444
4472
  a("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" })
4445
4473
  ], -1)
4446
- ])], 10, fi),
4474
+ ])], 10, yi),
4447
4475
  a("button", {
4448
4476
  type: "submit",
4449
4477
  class: I(["wm-compose__send", { "is-empty": !s.canSend }]),
@@ -4463,12 +4491,12 @@ function gi(e, t, n, i, r, s) {
4463
4491
  }, [
4464
4492
  a("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4465
4493
  ], -1)
4466
- ])], 10, _i)
4494
+ ])], 10, wi)
4467
4495
  ])
4468
4496
  ], 34)
4469
4497
  ], 6);
4470
4498
  }
4471
- const pi = /* @__PURE__ */ N(ri, [["render", gi], ["__scopeId", "data-v-01e81a27"]]), vi = {
4499
+ const ki = /* @__PURE__ */ N(ci, [["render", bi], ["__scopeId", "data-v-01e81a27"]]), Ci = {
4472
4500
  name: "WmSuggestionChips",
4473
4501
  props: {
4474
4502
  items: { type: Array, default: () => [] },
@@ -4485,28 +4513,28 @@ const pi = /* @__PURE__ */ N(ri, [["render", gi], ["__scopeId", "data-v-01e81a27
4485
4513
  return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
4486
4514
  }
4487
4515
  }
4488
- }, yi = ["onClick"];
4489
- function wi(e, t, n, i, r, s) {
4516
+ }, Ai = ["onClick"];
4517
+ function Si(e, t, n, i, r, s) {
4490
4518
  return n.items.length ? (c(), d("div", {
4491
4519
  key: s.batchKey,
4492
4520
  class: "wm-chips"
4493
4521
  }, [
4494
- (c(!0), d(E, null, j(n.items, (o, l) => (c(), d("button", {
4522
+ (c(!0), d(E, null, F(n.items, (o, l) => (c(), d("button", {
4495
4523
  key: l,
4496
4524
  type: "button",
4497
4525
  class: "wm-chip",
4498
4526
  style: H({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4499
4527
  onClick: (g) => e.$emit("select", o)
4500
- }, v(o.label), 13, yi))), 128))
4528
+ }, v(o.label), 13, Ai))), 128))
4501
4529
  ])) : w("", !0);
4502
4530
  }
4503
- const bi = /* @__PURE__ */ N(vi, [["render", wi], ["__scopeId", "data-v-47ad8085"]]), ki = {
4531
+ const Mi = /* @__PURE__ */ N(Ci, [["render", Si], ["__scopeId", "data-v-47ad8085"]]), Ti = {
4504
4532
  name: "WmApprovalCard",
4505
4533
  components: { AIAvatar: de },
4506
4534
  inject: {
4507
4535
  // Translator shared by the Messenger shell; French fallback when
4508
4536
  // the component is used standalone.
4509
- t: { default: () => F() }
4537
+ t: { default: () => j() }
4510
4538
  },
4511
4539
  props: {
4512
4540
  action: { type: String, required: !0 },
@@ -4544,27 +4572,27 @@ const bi = /* @__PURE__ */ N(vi, [["render", wi], ["__scopeId", "data-v-47ad8085
4544
4572
  return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
4545
4573
  }
4546
4574
  }
4547
- }, Ci = { class: "wm-approval" }, Ai = { class: "wm-approval__head" }, Si = { class: "wm-approval__icon" }, Mi = { class: "wm-approval__main" }, Ti = { class: "wm-approval__title" }, xi = {
4575
+ }, xi = { class: "wm-approval" }, Oi = { class: "wm-approval__head" }, Ii = { class: "wm-approval__icon" }, Li = { class: "wm-approval__main" }, Ei = { class: "wm-approval__title" }, Bi = {
4548
4576
  key: 0,
4549
4577
  class: "wm-approval__detail"
4550
- }, Oi = { class: "wm-approval__actions" };
4551
- function Ii(e, t, n, i, r, s) {
4578
+ }, Ri = { class: "wm-approval__actions" };
4579
+ function Ni(e, t, n, i, r, s) {
4552
4580
  const o = R("AIAvatar");
4553
- return c(), d("div", Ci, [
4554
- a("div", Ai, [
4555
- a("div", Si, [
4581
+ return c(), d("div", xi, [
4582
+ a("div", Oi, [
4583
+ a("div", Ii, [
4556
4584
  K(o, {
4557
4585
  size: 24,
4558
4586
  name: n.agentName,
4559
4587
  "image-url": n.agentAvatarUrl
4560
4588
  }, null, 8, ["name", "image-url"])
4561
4589
  ]),
4562
- a("div", Mi, [
4563
- a("div", Ti, v(n.action), 1),
4564
- n.detail ? (c(), d("div", xi, v(n.detail), 1)) : w("", !0)
4590
+ a("div", Li, [
4591
+ a("div", Ei, v(n.action), 1),
4592
+ n.detail ? (c(), d("div", Bi, v(n.detail), 1)) : w("", !0)
4565
4593
  ])
4566
4594
  ]),
4567
- a("div", Oi, [
4595
+ a("div", Ri, [
4568
4596
  s.rejectId ? (c(), d("button", {
4569
4597
  key: 0,
4570
4598
  type: "button",
@@ -4580,9 +4608,9 @@ function Ii(e, t, n, i, r, s) {
4580
4608
  ])
4581
4609
  ]);
4582
4610
  }
4583
- const Li = /* @__PURE__ */ N(ki, [["render", Ii], ["__scopeId", "data-v-a2bed37e"]]);
4584
- let Re = 0;
4585
- const Ei = /* @__PURE__ */ new Set([
4611
+ const Pi = /* @__PURE__ */ N(Ti, [["render", Ni], ["__scopeId", "data-v-a2bed37e"]]);
4612
+ let Ne = 0;
4613
+ const Ui = /* @__PURE__ */ new Set([
4586
4614
  "text",
4587
4615
  "textarea",
4588
4616
  "number",
@@ -4590,13 +4618,13 @@ const Ei = /* @__PURE__ */ new Set([
4590
4618
  "select",
4591
4619
  "multiselect",
4592
4620
  "date"
4593
- ]), Bi = {
4621
+ ]), Fi = {
4594
4622
  name: "WmFormCard",
4595
4623
  components: { AIAvatar: de },
4596
4624
  inject: {
4597
4625
  // Translator shared by the Messenger shell; French fallback when
4598
4626
  // the component is used standalone.
4599
- t: { default: () => F() }
4627
+ t: { default: () => j() }
4600
4628
  },
4601
4629
  props: {
4602
4630
  form: { type: Object, required: !0 },
@@ -4607,8 +4635,8 @@ const Ei = /* @__PURE__ */ new Set([
4607
4635
  },
4608
4636
  emits: ["submit"],
4609
4637
  data() {
4610
- return Re += 1, {
4611
- _uid: Re,
4638
+ return Ne += 1, {
4639
+ _uid: Ne,
4612
4640
  values: {},
4613
4641
  busy: !1,
4614
4642
  error: ""
@@ -4620,7 +4648,7 @@ const Ei = /* @__PURE__ */ new Set([
4620
4648
  // douteux.
4621
4649
  normalizedFields() {
4622
4650
  var t;
4623
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !Ei.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4651
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !Ui.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4624
4652
  }
4625
4653
  },
4626
4654
  created() {
@@ -4673,54 +4701,54 @@ const Ei = /* @__PURE__ */ new Set([
4673
4701
  }
4674
4702
  }
4675
4703
  }
4676
- }, Ri = { class: "wm-form" }, Ni = { class: "wm-form__head" }, Pi = { class: "wm-form__icon" }, Ui = { class: "wm-form__main" }, ji = { class: "wm-form__title" }, Fi = {
4704
+ }, ji = { class: "wm-form" }, Di = { class: "wm-form__head" }, Hi = { class: "wm-form__icon" }, zi = { class: "wm-form__main" }, qi = { class: "wm-form__title" }, Vi = {
4677
4705
  key: 0,
4678
4706
  class: "wm-form__detail"
4679
- }, Di = ["for"], Hi = {
4707
+ }, Ki = ["for"], $i = {
4680
4708
  key: 0,
4681
4709
  class: "wm-form__req",
4682
4710
  "aria-hidden": "true"
4683
- }, zi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], qi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Vi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ki = ["id", "onUpdate:modelValue", "required", "disabled"], $i = {
4711
+ }, Wi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Gi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Yi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Xi = ["id", "onUpdate:modelValue", "required", "disabled"], Ji = {
4684
4712
  key: 4,
4685
4713
  class: "wm-form__bool"
4686
- }, Wi = ["id", "onUpdate:modelValue", "disabled"], Gi = ["id", "onUpdate:modelValue", "required", "disabled"], Yi = {
4714
+ }, Qi = ["id", "onUpdate:modelValue", "disabled"], Zi = ["id", "onUpdate:modelValue", "required", "disabled"], ea = {
4687
4715
  value: "",
4688
4716
  disabled: ""
4689
- }, Ji = ["value"], Qi = {
4717
+ }, ta = ["value"], na = {
4690
4718
  key: 6,
4691
4719
  class: "wm-form__multi"
4692
- }, Xi = ["value", "checked", "disabled", "onChange"], Zi = {
4720
+ }, sa = ["value", "checked", "disabled", "onChange"], ra = {
4693
4721
  key: 0,
4694
4722
  class: "wm-form__err"
4695
- }, ea = ["disabled"], ta = {
4723
+ }, ia = ["disabled"], aa = {
4696
4724
  key: 0,
4697
4725
  class: "wm-form__spinner",
4698
4726
  "aria-hidden": "true"
4699
- }, na = {
4727
+ }, oa = {
4700
4728
  key: 2,
4701
4729
  class: "wm-form__doneLbl"
4702
4730
  };
4703
- function sa(e, t, n, i, r, s) {
4731
+ function la(e, t, n, i, r, s) {
4704
4732
  const o = R("AIAvatar");
4705
- return c(), d("div", Ri, [
4706
- a("div", Ni, [
4707
- a("div", Pi, [
4733
+ return c(), d("div", ji, [
4734
+ a("div", Di, [
4735
+ a("div", Hi, [
4708
4736
  K(o, {
4709
4737
  size: 24,
4710
4738
  name: n.agentName,
4711
4739
  "image-url": n.agentAvatarUrl
4712
4740
  }, null, 8, ["name", "image-url"])
4713
4741
  ]),
4714
- a("div", Ui, [
4715
- a("div", ji, v(n.form.title || s.t("form.title")), 1),
4716
- n.form.description ? (c(), d("div", Fi, v(n.form.description), 1)) : w("", !0)
4742
+ a("div", zi, [
4743
+ a("div", qi, v(n.form.title || s.t("form.title")), 1),
4744
+ n.form.description ? (c(), d("div", Vi, v(n.form.description), 1)) : w("", !0)
4717
4745
  ])
4718
4746
  ]),
4719
4747
  a("form", {
4720
4748
  class: "wm-form__body",
4721
4749
  onSubmit: t[0] || (t[0] = Y((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4722
4750
  }, [
4723
- (c(!0), d(E, null, j(s.normalizedFields, (l) => (c(), d("div", {
4751
+ (c(!0), d(E, null, F(s.normalizedFields, (l) => (c(), d("div", {
4724
4752
  key: l.key,
4725
4753
  class: "wm-form__field"
4726
4754
  }, [
@@ -4728,9 +4756,9 @@ function sa(e, t, n, i, r, s) {
4728
4756
  for: `wm-f-${r._uid}-${l.key}`,
4729
4757
  class: "wm-form__label"
4730
4758
  }, [
4731
- be(v(l.label), 1),
4732
- l.required ? (c(), d("span", Hi, "*")) : w("", !0)
4733
- ], 8, Di),
4759
+ ke(v(l.label), 1),
4760
+ l.required ? (c(), d("span", $i, "*")) : w("", !0)
4761
+ ], 8, Ki),
4734
4762
  l.type === "text" ? W((c(), d("input", {
4735
4763
  key: 0,
4736
4764
  id: `wm-f-${r._uid}-${l.key}`,
@@ -4740,7 +4768,7 @@ function sa(e, t, n, i, r, s) {
4740
4768
  placeholder: l.placeholder || "",
4741
4769
  required: l.required,
4742
4770
  disabled: n.readOnly || r.busy
4743
- }, null, 8, zi)), [
4771
+ }, null, 8, Wi)), [
4744
4772
  [ee, r.values[l.key]]
4745
4773
  ]) : l.type === "textarea" ? W((c(), d("textarea", {
4746
4774
  key: 1,
@@ -4751,7 +4779,7 @@ function sa(e, t, n, i, r, s) {
4751
4779
  placeholder: l.placeholder || "",
4752
4780
  required: l.required,
4753
4781
  disabled: n.readOnly || r.busy
4754
- }, null, 8, qi)), [
4782
+ }, null, 8, Gi)), [
4755
4783
  [ee, r.values[l.key]]
4756
4784
  ]) : l.type === "number" ? W((c(), d("input", {
4757
4785
  key: 2,
@@ -4762,7 +4790,7 @@ function sa(e, t, n, i, r, s) {
4762
4790
  placeholder: l.placeholder || "",
4763
4791
  required: l.required,
4764
4792
  disabled: n.readOnly || r.busy
4765
- }, null, 8, Vi)), [
4793
+ }, null, 8, Yi)), [
4766
4794
  [
4767
4795
  ee,
4768
4796
  r.values[l.key],
@@ -4777,16 +4805,16 @@ function sa(e, t, n, i, r, s) {
4777
4805
  class: "wm-form__input",
4778
4806
  required: l.required,
4779
4807
  disabled: n.readOnly || r.busy
4780
- }, null, 8, Ki)), [
4808
+ }, null, 8, Xi)), [
4781
4809
  [ee, r.values[l.key]]
4782
- ]) : l.type === "boolean" ? (c(), d("label", $i, [
4810
+ ]) : l.type === "boolean" ? (c(), d("label", Ji, [
4783
4811
  W(a("input", {
4784
4812
  id: `wm-f-${r._uid}-${l.key}`,
4785
4813
  "onUpdate:modelValue": (g) => r.values[l.key] = g,
4786
4814
  type: "checkbox",
4787
4815
  disabled: n.readOnly || r.busy
4788
- }, null, 8, Wi), [
4789
- [qe, r.values[l.key]]
4816
+ }, null, 8, Qi), [
4817
+ [Ke, r.values[l.key]]
4790
4818
  ]),
4791
4819
  a("span", null, v(l.placeholder || s.t("common.yes")), 1)
4792
4820
  ])) : l.type === "select" ? W((c(), d("select", {
@@ -4797,15 +4825,15 @@ function sa(e, t, n, i, r, s) {
4797
4825
  required: l.required,
4798
4826
  disabled: n.readOnly || r.busy
4799
4827
  }, [
4800
- a("option", Yi, v(l.placeholder || s.t("form.choose")), 1),
4801
- (c(!0), d(E, null, j(l.options, (g) => (c(), d("option", {
4828
+ a("option", ea, v(l.placeholder || s.t("form.choose")), 1),
4829
+ (c(!0), d(E, null, F(l.options, (g) => (c(), d("option", {
4802
4830
  key: g.value,
4803
4831
  value: g.value
4804
- }, v(g.label), 9, Ji))), 128))
4805
- ], 8, Gi)), [
4806
- [Ve, r.values[l.key]]
4807
- ]) : l.type === "multiselect" ? (c(), d("div", Qi, [
4808
- (c(!0), d(E, null, j(l.options, (g) => (c(), d("label", {
4832
+ }, v(g.label), 9, ta))), 128))
4833
+ ], 8, Zi)), [
4834
+ [$e, r.values[l.key]]
4835
+ ]) : l.type === "multiselect" ? (c(), d("div", na, [
4836
+ (c(!0), d(E, null, F(l.options, (g) => (c(), d("label", {
4809
4837
  key: g.value,
4810
4838
  class: "wm-form__multiItem"
4811
4839
  }, [
@@ -4819,30 +4847,30 @@ function sa(e, t, n, i, r, s) {
4819
4847
  g.value,
4820
4848
  k.target.checked
4821
4849
  )
4822
- }, null, 40, Xi),
4850
+ }, null, 40, sa),
4823
4851
  a("span", null, v(g.label), 1)
4824
4852
  ]))), 128))
4825
4853
  ])) : w("", !0)
4826
4854
  ]))), 128)),
4827
- r.error ? (c(), d("div", Zi, v(r.error), 1)) : w("", !0),
4828
- n.readOnly ? (c(), d("div", na, v(s.t("form.responseSent")), 1)) : (c(), d("button", {
4855
+ r.error ? (c(), d("div", ra, v(r.error), 1)) : w("", !0),
4856
+ n.readOnly ? (c(), d("div", oa, v(s.t("form.responseSent")), 1)) : (c(), d("button", {
4829
4857
  key: 1,
4830
4858
  type: "submit",
4831
4859
  class: "wm-form__submit",
4832
4860
  disabled: r.busy
4833
4861
  }, [
4834
- r.busy ? (c(), d("span", ta)) : w("", !0),
4862
+ r.busy ? (c(), d("span", aa)) : w("", !0),
4835
4863
  a("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4836
- ], 8, ea))
4864
+ ], 8, ia))
4837
4865
  ], 32)
4838
4866
  ]);
4839
4867
  }
4840
- const ra = /* @__PURE__ */ N(Bi, [["render", sa], ["__scopeId", "data-v-fe65cc56"]]), ia = {
4868
+ const ca = /* @__PURE__ */ N(Fi, [["render", la], ["__scopeId", "data-v-fe65cc56"]]), da = {
4841
4869
  name: "WmFeedback",
4842
4870
  inject: {
4843
4871
  // Translator shared by the Messenger shell; French fallback when
4844
4872
  // the component is used standalone.
4845
- t: { default: () => F() }
4873
+ t: { default: () => j() }
4846
4874
  },
4847
4875
  props: {
4848
4876
  busy: { type: Boolean, default: !1 },
@@ -4871,13 +4899,13 @@ const ra = /* @__PURE__ */ N(Bi, [["render", sa], ["__scopeId", "data-v-fe65cc56
4871
4899
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
4872
4900
  }
4873
4901
  }
4874
- }, aa = { class: "wm-fb" }, oa = { class: "wm-fb__title" }, la = { class: "wm-fb__sub" }, ca = { class: "wm-fb__row" }, da = ["onClick"], ua = { class: "wm-fb__emoji" }, ha = { class: "wm-fb__label" }, ma = ["disabled"], fa = {
4902
+ }, ua = { class: "wm-fb" }, ha = { class: "wm-fb__title" }, ma = { class: "wm-fb__sub" }, fa = { class: "wm-fb__row" }, _a = ["onClick"], ga = { class: "wm-fb__emoji" }, pa = { class: "wm-fb__label" }, va = ["disabled"], ya = {
4875
4903
  key: 1,
4876
4904
  class: "wm-fb__done"
4877
- }, _a = { class: "wm-fb__doneTitle" }, ga = { class: "wm-fb__doneSub" };
4878
- function pa(e, t, n, i, r, s) {
4879
- return c(), d("div", aa, [
4880
- n.done ? (c(), d("div", fa, [
4905
+ }, wa = { class: "wm-fb__doneTitle" }, ba = { class: "wm-fb__doneSub" };
4906
+ function ka(e, t, n, i, r, s) {
4907
+ return c(), d("div", ua, [
4908
+ n.done ? (c(), d("div", ya, [
4881
4909
  t[1] || (t[1] = a("div", { class: "wm-fb__check" }, [
4882
4910
  a("svg", {
4883
4911
  width: "16",
@@ -4893,37 +4921,37 @@ function pa(e, t, n, i, r, s) {
4893
4921
  a("path", { d: "M20 6L9 17l-5-5" })
4894
4922
  ])
4895
4923
  ], -1)),
4896
- a("div", _a, v(s.t("feedback.doneTitle")), 1),
4897
- a("div", ga, v(s.t("feedback.doneSubtitle")), 1)
4924
+ a("div", wa, v(s.t("feedback.doneTitle")), 1),
4925
+ a("div", ba, v(s.t("feedback.doneSubtitle")), 1)
4898
4926
  ])) : (c(), d(E, { key: 0 }, [
4899
- a("div", oa, v(s.t("feedback.question")), 1),
4900
- a("div", la, v(s.t("feedback.subtitle")), 1),
4901
- a("div", ca, [
4902
- (c(!0), d(E, null, j(s.options, (o) => (c(), d("button", {
4927
+ a("div", ha, v(s.t("feedback.question")), 1),
4928
+ a("div", ma, v(s.t("feedback.subtitle")), 1),
4929
+ a("div", fa, [
4930
+ (c(!0), d(E, null, F(s.options, (o) => (c(), d("button", {
4903
4931
  key: o.v,
4904
4932
  type: "button",
4905
4933
  class: I(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
4906
4934
  onClick: (l) => r.sel = o.v
4907
4935
  }, [
4908
- a("span", ua, v(o.e), 1),
4909
- a("span", ha, v(o.l), 1)
4910
- ], 10, da))), 128))
4936
+ a("span", ga, v(o.e), 1),
4937
+ a("span", pa, v(o.l), 1)
4938
+ ], 10, _a))), 128))
4911
4939
  ]),
4912
4940
  a("button", {
4913
4941
  type: "button",
4914
4942
  class: "wm-fb__send",
4915
4943
  disabled: !r.sel || n.busy,
4916
4944
  onClick: t[0] || (t[0] = (...o) => s.onSend && s.onSend(...o))
4917
- }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, ma)
4945
+ }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, va)
4918
4946
  ], 64))
4919
4947
  ]);
4920
4948
  }
4921
- const va = /* @__PURE__ */ N(ia, [["render", pa], ["__scopeId", "data-v-9b630564"]]), ya = {
4949
+ const Ca = /* @__PURE__ */ N(da, [["render", ka], ["__scopeId", "data-v-9b630564"]]), Aa = {
4922
4950
  name: "WmMoreMenu",
4923
4951
  inject: {
4924
4952
  // Translator shared by the Messenger shell; French fallback when
4925
4953
  // the component is used standalone.
4926
- t: { default: () => F() }
4954
+ t: { default: () => j() }
4927
4955
  },
4928
4956
  props: {
4929
4957
  canRename: { type: Boolean, default: !0 },
@@ -4961,24 +4989,24 @@ const va = /* @__PURE__ */ N(ia, [["render", pa], ["__scopeId", "data-v-9b630564
4961
4989
  this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
4962
4990
  }
4963
4991
  }
4964
- }, wa = { class: "wm-mm" }, ba = {
4992
+ }, Sa = { class: "wm-mm" }, Ma = {
4965
4993
  class: "wm-mm__pop",
4966
4994
  role: "menu"
4967
- }, ka = {
4995
+ }, Ta = {
4968
4996
  key: 0,
4969
4997
  class: "wm-mm__section"
4970
- }, Ca = { class: "wm-mm__label" }, Aa = { class: "wm-mm__label" }, Sa = {
4998
+ }, xa = { class: "wm-mm__label" }, Oa = { class: "wm-mm__label" }, Ia = {
4971
4999
  key: 1,
4972
5000
  class: "wm-mm__sep"
4973
- }, Ma = { class: "wm-mm__section" }, Ta = { class: "wm-mm__label" }, xa = { class: "wm-mm__label" }, Oa = { class: "wm-mm__section" }, Ia = { class: "wm-mm__label" }, La = { class: "wm-mm__label" };
4974
- function Ea(e, t, n, i, r, s) {
4975
- return c(), d("div", wa, [
5001
+ }, La = { class: "wm-mm__section" }, Ea = { class: "wm-mm__label" }, Ba = { class: "wm-mm__label" }, Ra = { class: "wm-mm__section" }, Na = { class: "wm-mm__label" }, Pa = { class: "wm-mm__label" };
5002
+ function Ua(e, t, n, i, r, s) {
5003
+ return c(), d("div", Sa, [
4976
5004
  a("div", {
4977
5005
  class: "wm-mm__scrim",
4978
5006
  onClick: t[0] || (t[0] = (o) => e.$emit("close"))
4979
5007
  }),
4980
- a("div", ba, [
4981
- n.canRename || n.canExport ? (c(), d("div", ka, [
5008
+ a("div", Ma, [
5009
+ n.canRename || n.canExport ? (c(), d("div", Ta, [
4982
5010
  n.canRename ? (c(), d("button", {
4983
5011
  key: 0,
4984
5012
  type: "button",
@@ -5001,7 +5029,7 @@ function Ea(e, t, n, i, r, s) {
5001
5029
  a("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
5002
5030
  ])
5003
5031
  ], -1)),
5004
- a("span", Ca, v(s.t("moreMenu.editTitle")), 1)
5032
+ a("span", xa, v(s.t("moreMenu.editTitle")), 1)
5005
5033
  ])) : w("", !0),
5006
5034
  n.canExport ? (c(), d("button", {
5007
5035
  key: 1,
@@ -5024,12 +5052,12 @@ function Ea(e, t, n, i, r, s) {
5024
5052
  a("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
5025
5053
  ])
5026
5054
  ], -1)),
5027
- a("span", Aa, v(s.t("moreMenu.exportTranscript")), 1),
5055
+ a("span", Oa, v(s.t("moreMenu.exportTranscript")), 1),
5028
5056
  t[9] || (t[9] = a("span", { class: "wm-mm__hint" }, ".txt", -1))
5029
5057
  ])) : w("", !0)
5030
5058
  ])) : w("", !0),
5031
- n.canRename || n.canExport ? (c(), d("div", Sa)) : w("", !0),
5032
- a("div", Ma, [
5059
+ n.canRename || n.canExport ? (c(), d("div", Ia)) : w("", !0),
5060
+ a("div", La, [
5033
5061
  a("button", {
5034
5062
  type: "button",
5035
5063
  class: "wm-mm__item",
@@ -5051,7 +5079,7 @@ function Ea(e, t, n, i, r, s) {
5051
5079
  a("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
5052
5080
  ])
5053
5081
  ], -1)),
5054
- a("span", Ta, v(s.t("moreMenu.sound")), 1),
5082
+ a("span", Ea, v(s.t("moreMenu.sound")), 1),
5055
5083
  a("span", {
5056
5084
  class: I(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
5057
5085
  }, [...t[10] || (t[10] = [
@@ -5078,7 +5106,7 @@ function Ea(e, t, n, i, r, s) {
5078
5106
  a("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
5079
5107
  ])
5080
5108
  ], -1)),
5081
- a("span", xa, v(s.t("moreMenu.browserNotifications")), 1),
5109
+ a("span", Ba, v(s.t("moreMenu.browserNotifications")), 1),
5082
5110
  a("span", {
5083
5111
  class: I(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
5084
5112
  }, [...t[12] || (t[12] = [
@@ -5087,7 +5115,7 @@ function Ea(e, t, n, i, r, s) {
5087
5115
  ])
5088
5116
  ]),
5089
5117
  t[16] || (t[16] = a("div", { class: "wm-mm__sep" }, null, -1)),
5090
- a("div", Oa, [
5118
+ a("div", Ra, [
5091
5119
  n.statusUrl ? (c(), d("button", {
5092
5120
  key: 0,
5093
5121
  type: "button",
@@ -5109,7 +5137,7 @@ function Ea(e, t, n, i, r, s) {
5109
5137
  a("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5110
5138
  ])
5111
5139
  ], -1)),
5112
- a("span", Ia, v(s.t("moreMenu.serviceStatus")), 1)
5140
+ a("span", Na, v(s.t("moreMenu.serviceStatus")), 1)
5113
5141
  ])) : w("", !0),
5114
5142
  n.helpUrl ? (c(), d("button", {
5115
5143
  key: 1,
@@ -5132,18 +5160,18 @@ function Ea(e, t, n, i, r, s) {
5132
5160
  a("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" })
5133
5161
  ])
5134
5162
  ], -1)),
5135
- a("span", La, v(s.t("moreMenu.helpCenter")), 1)
5163
+ a("span", Pa, v(s.t("moreMenu.helpCenter")), 1)
5136
5164
  ])) : w("", !0)
5137
5165
  ])
5138
5166
  ])
5139
5167
  ]);
5140
5168
  }
5141
- const Ba = /* @__PURE__ */ N(ya, [["render", Ea], ["__scopeId", "data-v-76281e95"]]), Ra = {
5169
+ const Fa = /* @__PURE__ */ N(Aa, [["render", Ua], ["__scopeId", "data-v-76281e95"]]), ja = {
5142
5170
  name: "WmRenameDialog",
5143
5171
  inject: {
5144
5172
  // Translator shared by the Messenger shell; French fallback when
5145
5173
  // the component is used standalone.
5146
- t: { default: () => F() }
5174
+ t: { default: () => j() }
5147
5175
  },
5148
5176
  props: {
5149
5177
  // Empty defaults: the resolved fallback comes from the translator
@@ -5180,20 +5208,20 @@ const Ba = /* @__PURE__ */ N(ya, [["render", Ea], ["__scopeId", "data-v-76281e95
5180
5208
  this.canSubmit && this.$emit("submit", this.value.trim());
5181
5209
  }
5182
5210
  }
5183
- }, Na = { class: "wm-dialog" }, Pa = {
5211
+ }, Da = { class: "wm-dialog" }, Ha = {
5184
5212
  class: "wm-dialog__card",
5185
5213
  role: "dialog",
5186
5214
  "aria-modal": "true"
5187
- }, Ua = { class: "wm-dialog__head" }, ja = { class: "wm-dialog__title" }, Fa = ["aria-label"], Da = { class: "wm-dialog__body" }, Ha = ["placeholder"], za = { class: "wm-dialog__actions" }, qa = ["disabled"];
5188
- function Va(e, t, n, i, r, s) {
5189
- return c(), d("div", Na, [
5215
+ }, za = { class: "wm-dialog__head" }, qa = { class: "wm-dialog__title" }, Va = ["aria-label"], Ka = { class: "wm-dialog__body" }, $a = ["placeholder"], Wa = { class: "wm-dialog__actions" }, Ga = ["disabled"];
5216
+ function Ya(e, t, n, i, r, s) {
5217
+ return c(), d("div", Da, [
5190
5218
  a("div", {
5191
5219
  class: "wm-dialog__scrim",
5192
5220
  onClick: t[0] || (t[0] = (o) => e.$emit("close"))
5193
5221
  }),
5194
- a("div", Pa, [
5195
- a("div", Ua, [
5196
- a("div", ja, v(n.title || s.t("rename.title")), 1),
5222
+ a("div", Ha, [
5223
+ a("div", za, [
5224
+ a("div", qa, v(n.title || s.t("rename.title")), 1),
5197
5225
  a("button", {
5198
5226
  type: "button",
5199
5227
  class: "wm-dialog__close",
@@ -5213,9 +5241,9 @@ function Va(e, t, n, i, r, s) {
5213
5241
  }, [
5214
5242
  a("path", { d: "M18 6L6 18M6 6l12 12" })
5215
5243
  ], -1)
5216
- ])], 8, Fa)
5244
+ ])], 8, Va)
5217
5245
  ]),
5218
- a("div", Da, [
5246
+ a("div", Ka, [
5219
5247
  W(a("input", {
5220
5248
  ref: "input",
5221
5249
  "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
@@ -5224,14 +5252,14 @@ function Va(e, t, n, i, r, s) {
5224
5252
  placeholder: n.placeholder || s.t("rename.placeholder"),
5225
5253
  maxlength: 120,
5226
5254
  onKeydown: [
5227
- t[3] || (t[3] = me(Y((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]), ["enter"])),
5228
- t[4] || (t[4] = me(Y((o) => e.$emit("close"), ["prevent"]), ["esc"]))
5255
+ t[3] || (t[3] = fe(Y((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]), ["enter"])),
5256
+ t[4] || (t[4] = fe(Y((o) => e.$emit("close"), ["prevent"]), ["esc"]))
5229
5257
  ]
5230
- }, null, 40, Ha), [
5258
+ }, null, 40, $a), [
5231
5259
  [ee, r.value]
5232
5260
  ])
5233
5261
  ]),
5234
- a("div", za, [
5262
+ a("div", Wa, [
5235
5263
  a("button", {
5236
5264
  type: "button",
5237
5265
  class: "wm-dialog__btn",
@@ -5242,31 +5270,31 @@ function Va(e, t, n, i, r, s) {
5242
5270
  class: "wm-dialog__btn wm-dialog__btn--primary",
5243
5271
  disabled: !s.canSubmit,
5244
5272
  onClick: t[6] || (t[6] = (...o) => s.onSubmit && s.onSubmit(...o))
5245
- }, v(s.t("common.save")), 9, qa)
5273
+ }, v(s.t("common.save")), 9, Ga)
5246
5274
  ])
5247
5275
  ])
5248
5276
  ]);
5249
5277
  }
5250
- const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8"]]), Ne = "ww-messenger-tokens", $a = {
5278
+ const Xa = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8"]]), Pe = "ww-messenger-tokens", Ja = {
5251
5279
  name: "Messenger",
5252
5280
  components: {
5253
- Launcher: jt,
5254
- Header: dn,
5255
- Onboarding: is,
5256
- MessageList: Xr,
5257
- Composer: pi,
5258
- SuggestionChips: bi,
5259
- ApprovalCard: Li,
5260
- FormCard: ra,
5261
- Feedback: va,
5262
- MoreMenu: Ba,
5263
- RenameDialog: Ka
5281
+ Launcher: $t,
5282
+ Header: vn,
5283
+ Onboarding: ds,
5284
+ MessageList: si,
5285
+ Composer: ki,
5286
+ SuggestionChips: Mi,
5287
+ ApprovalCard: Pi,
5288
+ FormCard: ca,
5289
+ Feedback: Ca,
5290
+ MoreMenu: Fa,
5291
+ RenameDialog: Xa
5264
5292
  },
5265
5293
  mixins: [
5266
- ct,
5267
- _t,
5268
- gt,
5269
- vt
5294
+ pt,
5295
+ Ct,
5296
+ At,
5297
+ Mt
5270
5298
  ],
5271
5299
  // Make signAttachment available to deep children (AttachmentPreview)
5272
5300
  // without prop drilling. The store may not exist yet at provide-time
@@ -5288,7 +5316,7 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
5288
5316
  },
5289
5317
  props: {
5290
5318
  // Hardcoded server default (overridable for staging/dev).
5291
- baseUrl: { type: String, default: tt },
5319
+ baseUrl: { type: String, default: st },
5292
5320
  widgetId: { type: String, default: "" },
5293
5321
  // En mode iframe (modèle par défaut), `origin` et `token` ne sont
5294
5322
  // PAS des props : ils sont reçus via `postMessage` du parent
@@ -5406,7 +5434,7 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
5406
5434
  // 4. French.
5407
5435
  locale() {
5408
5436
  var e;
5409
- return Ae(
5437
+ return Se(
5410
5438
  this.language || this.customerLanguage || ((e = this.widget) == null ? void 0 : e.default_language) || ""
5411
5439
  );
5412
5440
  },
@@ -5414,7 +5442,7 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
5414
5442
  // `locale` changes. `t()` below (and the provided closure) delegate
5415
5443
  // to it so every string resolves against the current language.
5416
5444
  translator() {
5417
- return F(this.locale);
5445
+ return j(this.locale);
5418
5446
  },
5419
5447
  error() {
5420
5448
  var e;
@@ -5467,7 +5495,7 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
5467
5495
  );
5468
5496
  return {
5469
5497
  ...i,
5470
- _preview: it(i, g),
5498
+ _preview: mt(i, g),
5471
5499
  _unread: o > 0,
5472
5500
  _unreadCount: o,
5473
5501
  _lastAuthor: l
@@ -5491,7 +5519,7 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
5491
5519
  preview: n._preview || this.t("onboarding.newMessage"),
5492
5520
  unread: !!n._unread,
5493
5521
  author: n._lastAuthor || null,
5494
- _ts: Le(n, e[n.id] || [])
5522
+ _ts: Be(n, e[n.id] || [])
5495
5523
  })).sort((n, i) => n._ts < i._ts ? 1 : n._ts > i._ts ? -1 : 0);
5496
5524
  },
5497
5525
  // Unread threads (one entry per conv with unseen agent/human
@@ -5503,7 +5531,7 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
5503
5531
  const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
5504
5532
  for (const i of this.drawerConversations) {
5505
5533
  if (!i._unread) continue;
5506
- const r = Le(i, e[i.id] || []), s = i._lastAuthor, o = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (o ? this.agentName : "") || "", g = (s == null ? void 0 : s.avatar_url) || (o ? this.agentAvatarUrl : null);
5534
+ const r = Be(i, e[i.id] || []), s = i._lastAuthor, o = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (o ? this.agentName : "") || "", g = (s == null ? void 0 : s.avatar_url) || (o ? this.agentAvatarUrl : null);
5507
5535
  t.push({
5508
5536
  convId: i.id,
5509
5537
  preview: i._preview || this.t("notification.youHaveNewMessage"),
@@ -5568,11 +5596,14 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
5568
5596
  // Lets the merchant override the brand colour via widget.primary_color.
5569
5597
  // Only --wm-primary is overridden (used by the CTA swatch + hero
5570
5598
  // halo) ; --wm-a (unread dot, caret, AI ring) keeps its default
5571
- // token value, intentionally fixed.
5599
+ // token value, intentionally fixed. Value is gated through
5600
+ // `isValidCssColor` so a misconfigured / hostile config can't
5601
+ // break out of the custom-property substitution and inject
5602
+ // arbitrary CSS tokens into the inline declaration.
5572
5603
  rootStyle() {
5573
5604
  var t;
5574
5605
  const e = (t = this.widget) == null ? void 0 : t.primary_color;
5575
- return e ? { "--wm-primary": e } : null;
5606
+ return e && je(e) ? { "--wm-primary": e } : null;
5576
5607
  },
5577
5608
  widgetWelcomeMessage() {
5578
5609
  var e;
@@ -5744,7 +5775,7 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
5744
5775
  }
5745
5776
  }
5746
5777
  return this.t("messageList.today", {
5747
- time: we(t, ae(this.locale))
5778
+ time: be(t, ae(this.locale))
5748
5779
  });
5749
5780
  },
5750
5781
  // Pagination state for the active conversation. Drives the
@@ -5849,9 +5880,9 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
5849
5880
  }
5850
5881
  },
5851
5882
  async mounted() {
5852
- if (typeof document < "u" && !document.getElementById(Ne)) {
5883
+ if (typeof document < "u" && !document.getElementById(Pe)) {
5853
5884
  const e = document.createElement("style");
5854
- e.id = Ne, e.textContent = et, document.head.appendChild(e);
5885
+ e.id = Pe, e.textContent = nt, document.head.appendChild(e);
5855
5886
  }
5856
5887
  this._parentMessageHandler = this.onParentMessage.bind(this), window.addEventListener("message", this._parentMessageHandler), window.parent && window.parent !== window && window.parent.postMessage({ type: "READY" }, "*"), this.isEmbedded ? (await this.boot(), this.store && await this.open()) : (await this.$nextTick(), this.sendCurrentLauncherSize(), this.observeLauncherSize());
5857
5888
  },
@@ -5917,12 +5948,12 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
5917
5948
  return;
5918
5949
  }
5919
5950
  try {
5920
- await this.waitForParentInit(), this.transport = xe(
5921
- Ye({
5951
+ await this.waitForParentInit(), this.transport = Oe(
5952
+ Je({
5922
5953
  baseUrl: this.baseUrl,
5923
5954
  widgetId: this.widgetId
5924
5955
  })
5925
- ), this.store = xe(Ze(this.transport)), this.hydrateNotifPref();
5956
+ ), this.store = Oe(tt(this.transport)), this.hydrateNotifPref();
5926
5957
  const e = this.parentVariables || this.context || null;
5927
5958
  if (await this.store.start({
5928
5959
  origin: this.parentOrigin,
@@ -6134,7 +6165,7 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
6134
6165
  this.openRenameDialog();
6135
6166
  break;
6136
6167
  case "export":
6137
- lt(
6168
+ gt(
6138
6169
  this.currentConv,
6139
6170
  this.currentConv ? (n = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : n[this.currentConv.id] : [],
6140
6171
  this.translator,
@@ -6142,14 +6173,14 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
6142
6173
  );
6143
6174
  break;
6144
6175
  case "status":
6145
- if (this.statusUrl)
6176
+ if (me(this.statusUrl))
6146
6177
  try {
6147
6178
  window.open(this.statusUrl, "_blank", "noopener");
6148
6179
  } catch {
6149
6180
  }
6150
6181
  break;
6151
6182
  case "help":
6152
- if (this.helpUrl)
6183
+ if (me(this.helpUrl))
6153
6184
  try {
6154
6185
  window.open(this.helpUrl, "_blank", "noopener");
6155
6186
  } catch {
@@ -6198,12 +6229,12 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
6198
6229
  async onFormSubmit({ values: e }) {
6199
6230
  const t = this.pendingForm;
6200
6231
  if (!(t != null && t.form)) return;
6201
- const n = st(t.form, e, this.translator);
6232
+ const n = ct(t.form, e, this.translator);
6202
6233
  if (!n) return;
6203
6234
  let i = this.currentConv;
6204
6235
  i && (i._draft && (i = await this.ensureRealConv(), !i) || await this.store.send(i.id, n, {
6205
6236
  metadata: {
6206
- artifact: rt(
6237
+ artifact: dt(
6207
6238
  t.form,
6208
6239
  e,
6209
6240
  this.translator
@@ -6254,6 +6285,13 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
6254
6285
  if (e) {
6255
6286
  if (e.url) {
6256
6287
  if (await this.openInternalUrl(e.url)) return;
6288
+ if (!me(e.url)) {
6289
+ console.warn(
6290
+ "[messenger] refusing unsafe quick-link url",
6291
+ e.url
6292
+ );
6293
+ return;
6294
+ }
6257
6295
  try {
6258
6296
  window.open(e.url, "_blank", "noopener");
6259
6297
  } catch {
@@ -6279,28 +6317,28 @@ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8
6279
6317
  }
6280
6318
  }
6281
6319
  }
6282
- }, Wa = {
6320
+ }, Qa = {
6283
6321
  key: 0,
6284
6322
  class: "wm-loading",
6285
6323
  "aria-busy": "true",
6286
6324
  "aria-live": "polite"
6287
- }, Ga = ["aria-label"], Ya = {
6325
+ }, Za = ["aria-label"], eo = {
6288
6326
  key: 0,
6289
6327
  class: "wm-state"
6290
- }, Ja = { class: "wm-state__err" }, Qa = { class: "wm-state__errTitle" }, Xa = { class: "wm-state__errSub" }, Za = { class: "wm-bottom" }, eo = {
6328
+ }, to = { class: "wm-state__err" }, no = { class: "wm-state__errTitle" }, so = { class: "wm-state__errSub" }, ro = { class: "wm-bottom" }, io = {
6291
6329
  key: 0,
6292
6330
  ref: "floatEl",
6293
6331
  class: "wm-float"
6294
- }, to = {
6332
+ }, ao = {
6295
6333
  key: 1,
6296
6334
  class: "wm-actionWait",
6297
6335
  role: "status",
6298
6336
  "aria-live": "polite"
6299
- }, no = { class: "wm-actionWait__lbl" }, so = {
6337
+ }, oo = { class: "wm-actionWait__lbl" }, lo = {
6300
6338
  key: 2,
6301
6339
  class: "wm-attached"
6302
- }, ro = ["aria-label", "onClick"];
6303
- function io(e, t, n, i, r, s) {
6340
+ }, co = ["aria-label", "onClick"];
6341
+ function uo(e, t, n, i, r, s) {
6304
6342
  const o = R("Launcher"), l = R("Header"), g = R("Onboarding"), k = R("MessageList"), b = R("ApprovalCard"), x = R("FormCard"), B = R("Feedback"), A = R("SuggestionChips"), z = R("Composer"), M = R("MoreMenu"), U = R("RenameDialog");
6305
6343
  return c(), d("div", {
6306
6344
  class: I(["wm-root", `wm-root--${n.displayMode}`]),
@@ -6326,7 +6364,7 @@ function io(e, t, n, i, r, s) {
6326
6364
  "aria-label": "Messenger",
6327
6365
  onClick: t[5] || (t[5] = (...L) => s.onPanelClick && s.onPanelClick(...L))
6328
6366
  }, [
6329
- !s.ready && !s.error ? (c(), d("div", Wa, [
6367
+ !s.ready && !s.error ? (c(), d("div", Qa, [
6330
6368
  s.isEmbedded ? w("", !0) : (c(), d("button", {
6331
6369
  key: 0,
6332
6370
  type: "button",
@@ -6347,7 +6385,7 @@ function io(e, t, n, i, r, s) {
6347
6385
  }, [
6348
6386
  a("path", { d: "M18 6L6 18M6 6l12 12" })
6349
6387
  ], -1)
6350
- ])], 8, Ga)),
6388
+ ])], 8, Za)),
6351
6389
  t[7] || (t[7] = a("div", {
6352
6390
  class: "wm-loading__spinner",
6353
6391
  "aria-hidden": "true"
@@ -6367,8 +6405,8 @@ function io(e, t, n, i, r, s) {
6367
6405
  onMore: s.toggleMore,
6368
6406
  onClose: s.close
6369
6407
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
6370
- s.error ? (c(), d("div", Ya, [
6371
- a("div", Ja, [
6408
+ s.error ? (c(), d("div", eo, [
6409
+ a("div", to, [
6372
6410
  t[8] || (t[8] = a("div", { class: "wm-state__errIcon" }, [
6373
6411
  a("svg", {
6374
6412
  width: "14",
@@ -6385,8 +6423,8 @@ function io(e, t, n, i, r, s) {
6385
6423
  ])
6386
6424
  ], -1)),
6387
6425
  a("div", null, [
6388
- a("div", Qa, v(s.t("error.connectionFailed")), 1),
6389
- a("div", Xa, v(s.error), 1)
6426
+ a("div", no, v(s.t("error.connectionFailed")), 1),
6427
+ a("div", so, v(s.error), 1)
6390
6428
  ])
6391
6429
  ])
6392
6430
  ])) : s.currentConv ? (c(), d(E, { key: 2 }, [
@@ -6404,8 +6442,8 @@ function io(e, t, n, i, r, s) {
6404
6442
  "ai-agent-avatar-url": s.agentAvatarUrl,
6405
6443
  onLoadMore: s.onLoadMore
6406
6444
  }, 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"]),
6407
- a("div", Za, [
6408
- s.floatVisible ? (c(), d("div", eo, [
6445
+ a("div", ro, [
6446
+ s.floatVisible ? (c(), d("div", io, [
6409
6447
  s.approvalReady ? (c(), P(b, {
6410
6448
  key: 0,
6411
6449
  action: s.approvalTitle,
@@ -6431,12 +6469,12 @@ function io(e, t, n, i, r, s) {
6431
6469
  onSelect: s.onSuggestion
6432
6470
  }, null, 8, ["items", "onSelect"]))
6433
6471
  ], 512)) : w("", !0),
6434
- s.actionInFlight ? (c(), d("div", to, [
6472
+ s.actionInFlight ? (c(), d("div", ao, [
6435
6473
  t[9] || (t[9] = a("span", {
6436
6474
  class: "wm-actionWait__spinner",
6437
6475
  "aria-hidden": "true"
6438
6476
  }, null, -1)),
6439
- a("span", no, v(s.t("action.inProgress", {
6477
+ a("span", oo, v(s.t("action.inProgress", {
6440
6478
  name: s.actionInFlightName
6441
6479
  })), 1)
6442
6480
  ])) : (c(), P(z, {
@@ -6472,8 +6510,8 @@ function io(e, t, n, i, r, s) {
6472
6510
  onClose: t[3] || (t[3] = (L) => r.renameDialogOpen = !1),
6473
6511
  onSubmit: s.onRenameSubmit
6474
6512
  }, null, 8, ["initial-value", "title", "onSubmit"])) : w("", !0),
6475
- r.pendingAttachments.length ? (c(), d("div", so, [
6476
- (c(!0), d(E, null, j(r.pendingAttachments, (L, q) => (c(), d("div", {
6513
+ r.pendingAttachments.length ? (c(), d("div", lo, [
6514
+ (c(!0), d(E, null, F(r.pendingAttachments, (L, q) => (c(), d("div", {
6477
6515
  key: q,
6478
6516
  class: "wm-attached__chip"
6479
6517
  }, [
@@ -6494,7 +6532,7 @@ function io(e, t, n, i, r, s) {
6494
6532
  a("button", {
6495
6533
  type: "button",
6496
6534
  "aria-label": s.t("attachment.remove"),
6497
- onClick: (J) => r.pendingAttachments.splice(q, 1)
6535
+ onClick: (X) => r.pendingAttachments.splice(q, 1)
6498
6536
  }, [...t[10] || (t[10] = [
6499
6537
  a("svg", {
6500
6538
  width: "10",
@@ -6509,7 +6547,7 @@ function io(e, t, n, i, r, s) {
6509
6547
  }, [
6510
6548
  a("path", { d: "M18 6L6 18M6 6l12 12" })
6511
6549
  ], -1)
6512
- ])], 8, ro)
6550
+ ])], 8, co)
6513
6551
  ]))), 128))
6514
6552
  ])) : w("", !0)
6515
6553
  ], 64)) : (c(), P(g, {
@@ -6542,54 +6580,54 @@ function io(e, t, n, i, r, s) {
6542
6580
  ], 6)) : w("", !0)
6543
6581
  ], 6);
6544
6582
  }
6545
- const lo = /* @__PURE__ */ N($a, [["render", io], ["__scopeId", "data-v-fc80add0"]]), co = "0.5.43";
6583
+ const fo = /* @__PURE__ */ N(Ja, [["render", uo], ["__scopeId", "data-v-3cb987cc"]]), _o = "0.5.44";
6546
6584
  export {
6547
6585
  de as AIAvatar,
6548
- pe as AVATAR_COLORS,
6549
- ps as ActionResult,
6550
- Li as ApprovalCard,
6551
- Ms as ArtifactFormResponse,
6552
- Fs as ArtifactInfoCard,
6553
- rr as ArtifactRenderer,
6554
- er as ArtifactTicket,
6555
- gr as AttachmentPreview,
6556
- wr as Bubble,
6557
- pi as Composer,
6558
- tt as DEFAULT_BASE_URL,
6586
+ ve as AVATAR_COLORS,
6587
+ ks as ActionResult,
6588
+ Pi as ApprovalCard,
6589
+ Ls as ArtifactFormResponse,
6590
+ Vs as ArtifactInfoCard,
6591
+ cr as ArtifactRenderer,
6592
+ ir as ArtifactTicket,
6593
+ br as AttachmentPreview,
6594
+ Sr as Bubble,
6595
+ ki as Composer,
6596
+ st as DEFAULT_BASE_URL,
6559
6597
  le as DEFAULT_LANGUAGE,
6560
- va as Feedback,
6561
- ra as FormCard,
6562
- dn as Header,
6563
- Se as HumanAvatar,
6564
- jt as Launcher,
6565
- Me as MEDIA_RECORDER_SUPPORTED,
6566
- Xr as MessageList,
6567
- lo as Messenger,
6568
- Ba as MoreMenu,
6569
- is as Onboarding,
6570
- fe as SCREEN_CAPTURE_SUPPORTED,
6571
- nt as SUPPORTED_LANGUAGES,
6572
- bi as SuggestionChips,
6573
- Jt as TeamAvatars,
6574
- Ar as Typing,
6575
- co as VERSION,
6576
- ke as avatarColor,
6577
- Ce as avatarInitials,
6578
- ei as captureScreenshotFile,
6598
+ Ca as Feedback,
6599
+ ca as FormCard,
6600
+ vn as Header,
6601
+ Me as HumanAvatar,
6602
+ $t as Launcher,
6603
+ Te as MEDIA_RECORDER_SUPPORTED,
6604
+ si as MessageList,
6605
+ fo as Messenger,
6606
+ Fa as MoreMenu,
6607
+ ds as Onboarding,
6608
+ _e as SCREEN_CAPTURE_SUPPORTED,
6609
+ lt as SUPPORTED_LANGUAGES,
6610
+ Mi as SuggestionChips,
6611
+ rn as TeamAvatars,
6612
+ Or as Typing,
6613
+ _o as VERSION,
6614
+ Ce as avatarColor,
6615
+ Ae as avatarInitials,
6616
+ ii as captureScreenshotFile,
6579
6617
  D as colors,
6580
- Ze as createStore,
6581
- F as createTranslator,
6582
- Ye as createTransport,
6618
+ tt as createStore,
6619
+ j as createTranslator,
6620
+ Je as createTransport,
6583
6621
  ae as dateLocale,
6584
- lo as default,
6585
- we as formatTime,
6586
- oo as guessAttachmentKind,
6587
- Zr as pickRecorderMime,
6588
- hn as renderInlineMarkdown,
6589
- mn as renderMarkdown,
6590
- Ae as resolveLanguage,
6591
- ni as startScreenRecording,
6592
- et as tokensCss,
6593
- Xe as uuid,
6594
- Xe as v4
6622
+ fo as default,
6623
+ be as formatTime,
6624
+ mo as guessAttachmentKind,
6625
+ ri as pickRecorderMime,
6626
+ ut as renderInlineMarkdown,
6627
+ ht as renderMarkdown,
6628
+ Se as resolveLanguage,
6629
+ oi as startScreenRecording,
6630
+ nt as tokensCss,
6631
+ et as uuid,
6632
+ et as v4
6595
6633
  };