@_solaris/messenger-widget 0.5.79 → 0.5.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/messenger.js CHANGED
@@ -1,4 +1,4 @@
1
- import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as K, Transition as Ue, withCtx as je, Fragment as I, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as D, resolveDynamicComponent as Ae, mergeProps as Fe, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as We, vModelCheckbox as $e, vModelSelect as Ge, markRaw as Re } from "vue";
1
+ import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as P, createVNode as K, Transition as Ue, withCtx as je, Fragment as I, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as N, resolveDynamicComponent as Ae, mergeProps as Fe, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as We, vModelCheckbox as $e, vModelSelect as Ge, markRaw as Re } from "vue";
2
2
  const Ye = [
3
3
  "connected",
4
4
  "message",
@@ -141,7 +141,7 @@ function Ze(e) {
141
141
  }
142
142
  async function k() {
143
143
  try {
144
- const u = await E();
144
+ const u = await B();
145
145
  t.lastActivityAt = u.reduce((g, p) => {
146
146
  const S = p == null ? void 0 : p.last_message_at;
147
147
  return S && (!g || S > g) ? S : g;
@@ -158,7 +158,7 @@ function Ze(e) {
158
158
  const g = await r("PATCH", "/customers/me", u);
159
159
  return (g == null ? void 0 : g.customer) ?? null;
160
160
  }
161
- async function E() {
161
+ async function B() {
162
162
  const u = await r("GET", "/conversations");
163
163
  return (u == null ? void 0 : u.conversations) ?? [];
164
164
  }
@@ -178,14 +178,14 @@ function Ze(e) {
178
178
  g
179
179
  )).conversation;
180
180
  }
181
- async function N(u, g) {
181
+ async function U(u, g) {
182
182
  return r(
183
183
  "PATCH",
184
184
  `/conversations/${encodeURIComponent(u)}/read`,
185
185
  { message_id: g }
186
186
  );
187
187
  }
188
- async function U(u, g = {}) {
188
+ async function E(u, g = {}) {
189
189
  const p = new URLSearchParams();
190
190
  g.before && p.set("before", g.before), g.since && p.set("since", g.since), g.limit && p.set("limit", String(g.limit));
191
191
  const S = p.toString() ? `?${p.toString()}` : "";
@@ -280,7 +280,7 @@ function Ze(e) {
280
280
  }
281
281
  async function ye() {
282
282
  try {
283
- const u = await E(), g = u.reduce((S, O) => {
283
+ const u = await B(), g = u.reduce((S, O) => {
284
284
  const x = O == null ? void 0 : O.last_message_at;
285
285
  return x && (!S || x > S) ? x : S;
286
286
  }, null);
@@ -337,12 +337,12 @@ function Ze(e) {
337
337
  // REST
338
338
  getCustomer: y,
339
339
  patchCustomer: M,
340
- listConversations: E,
340
+ listConversations: B,
341
341
  createConversation: A,
342
342
  getConversation: q,
343
343
  patchConversation: T,
344
- markConversationRead: N,
345
- listMessages: U,
344
+ markConversationRead: U,
345
+ listMessages: E,
346
346
  postMessage: L,
347
347
  postCallback: W,
348
348
  uploadAttachment: Q,
@@ -549,7 +549,7 @@ function st(e) {
549
549
  const _ = await e.patchConversation(h, m), w = t.conversations.findIndex((C) => C.id === h);
550
550
  w !== -1 && (t.conversations[w] = _);
551
551
  }
552
- async function E(h) {
552
+ async function B(h) {
553
553
  if (!h) return [];
554
554
  const m = t.messagesByConv[h] || [];
555
555
  let _ = "";
@@ -630,10 +630,10 @@ function st(e) {
630
630
  console.error("[store] callback failed", w), h != null && delete t.awaitingCallback[h];
631
631
  }
632
632
  }
633
- const N = /* @__PURE__ */ new Map();
634
- async function U(h) {
633
+ const U = /* @__PURE__ */ new Map();
634
+ async function E(h) {
635
635
  if (!h) return null;
636
- const m = N.get(h);
636
+ const m = U.get(h);
637
637
  if (m != null && m.url) {
638
638
  const _ = m.expires_at ? Date.parse(m.expires_at) : 0;
639
639
  if (!_ || _ - Date.now() > 6e4) return m.url;
@@ -641,7 +641,7 @@ function st(e) {
641
641
  try {
642
642
  const _ = await e.signAttachment(h);
643
643
  if (_ != null && _.signed_url)
644
- return N.set(h, {
644
+ return U.set(h, {
645
645
  url: _.signed_url,
646
646
  expires_at: _.expires_at
647
647
  }), _.signed_url;
@@ -781,12 +781,12 @@ function st(e) {
781
781
  createConversation: r,
782
782
  openConversation: f,
783
783
  loadMore: k,
784
- fetchSinceLast: E,
784
+ fetchSinceLast: B,
785
785
  patchConversation: M,
786
786
  markConversationRead: A,
787
787
  send: q,
788
788
  clickCallback: T,
789
- signAttachment: U,
789
+ signAttachment: E,
790
790
  submitFeedback: L,
791
791
  getPendingApproval: W,
792
792
  getActionInFlight: se,
@@ -1219,13 +1219,13 @@ function ze(e) {
1219
1219
  function _e(e) {
1220
1220
  return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
1221
1221
  }
1222
- const Ee = "";
1222
+ const Be = "";
1223
1223
  function de(e) {
1224
1224
  let t = e;
1225
1225
  const s = [];
1226
1226
  return t = t.replace(/`([^`\n]+)`/g, (i, a) => {
1227
1227
  const n = s.length;
1228
- return s.push(a), `${Ee}CODE${n}${Ee}`;
1228
+ return s.push(a), `${Be}CODE${n}${Be}`;
1229
1229
  }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, a, n) => _e(n) ? `<a href="${n}" target="_blank" rel="noopener noreferrer">${a}</a>` : a), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (i, a) => `<code class="wm-md-code">${s[+a]}</code>`), t;
1230
1230
  }
1231
1231
  function qe(e) {
@@ -1274,10 +1274,10 @@ function ft(e) {
1274
1274
  if (!A) break;
1275
1275
  y.push(A[1]), i++;
1276
1276
  }
1277
- const M = y.map((A) => `<li>${de(A)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
1277
+ const M = y.map((A) => `<li>${de(A)}</li>`).join(""), B = k !== 1 ? ` start="${k}"` : "";
1278
1278
  s.push({
1279
1279
  type: "block",
1280
- html: `<ol class="wm-md-ol"${E}>${M}</ol>`
1280
+ html: `<ol class="wm-md-ol"${B}>${M}</ol>`
1281
1281
  });
1282
1282
  continue;
1283
1283
  }
@@ -1312,7 +1312,7 @@ function Y(e) {
1312
1312
  const t = typeof e == "number" ? e : Number(e);
1313
1313
  return Number.isFinite(t) ? t : null;
1314
1314
  }
1315
- function Be(e, t) {
1315
+ function Ee(e, t) {
1316
1316
  let s = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
1317
1317
  for (const i of t)
1318
1318
  i != null && i.created_at && i.created_at > s && (s = i.created_at);
@@ -1838,7 +1838,7 @@ function At(e) {
1838
1838
  }
1839
1839
  return null;
1840
1840
  }
1841
- const P = (e, t) => {
1841
+ const D = (e, t) => {
1842
1842
  const s = e.__vccOpts || e;
1843
1843
  for (const [i, a] of t)
1844
1844
  s[i] = a;
@@ -1884,7 +1884,7 @@ function Mt(e, t, s, i, a, n) {
1884
1884
  }, v(n.initials), 5))
1885
1885
  ], 6);
1886
1886
  }
1887
- const ve = /* @__PURE__ */ P(St, [["render", Mt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
1887
+ const ve = /* @__PURE__ */ D(St, [["render", Mt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
1888
1888
  name: "WmLauncher",
1889
1889
  components: { HumanAvatar: ve },
1890
1890
  inject: {
@@ -1910,9 +1910,9 @@ const ve = /* @__PURE__ */ P(St, [["render", Mt], ["__scopeId", "data-v-14e10c0d
1910
1910
  return this.peeks.slice(0, xt).reverse();
1911
1911
  }
1912
1912
  }
1913
- }, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Et = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Dt = { class: "wm-peek__name" }, Nt = { class: "wm-peek__action" }, Ut = { class: "wm-peek__text" }, jt = ["onClick"], Ft = ["aria-label"], Ht = ["aria-label"];
1913
+ }, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Bt = ["aria-label"], Et = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Dt = { class: "wm-peek__name" }, Nt = { class: "wm-peek__action" }, Ut = { class: "wm-peek__text" }, jt = ["onClick"], Ft = ["aria-label"], Ht = ["aria-label"];
1914
1914
  function zt(e, t, s, i, a, n) {
1915
- const r = B("HumanAvatar");
1915
+ const r = P("HumanAvatar");
1916
1916
  return c(), d("div", {
1917
1917
  class: "wm-launcherWrap",
1918
1918
  onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
@@ -1974,9 +1974,9 @@ function zt(e, t, s, i, a, n) {
1974
1974
  key: 0,
1975
1975
  class: "wm-peek__avatarBadge",
1976
1976
  "aria-label": n.t("launcher.unreadMessages", { count: l.count })
1977
- }, v(l.count > 9 ? "9+" : l.count), 9, Et)) : b("", !0)
1977
+ }, v(l.count > 9 ? "9+" : l.count), 9, Bt)) : b("", !0)
1978
1978
  ]),
1979
- o("div", Bt, [
1979
+ o("div", Et, [
1980
1980
  o("div", Pt, [
1981
1981
  o("span", Dt, v(l.senderName || n.t("common.agent")), 1),
1982
1982
  o("span", Nt, v(n.t("launcher.repliedToYou")), 1)
@@ -2024,7 +2024,7 @@ function zt(e, t, s, i, a, n) {
2024
2024
  ], 8, Ft)
2025
2025
  ], 32);
2026
2026
  }
2027
- const qt = /* @__PURE__ */ P(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
2027
+ const qt = /* @__PURE__ */ D(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
2028
2028
  name: "WmAIAvatar",
2029
2029
  props: {
2030
2030
  size: { type: Number, default: 26 },
@@ -2115,7 +2115,7 @@ function Gt(e, t, s, i, a, n) {
2115
2115
  ], 6)
2116
2116
  ], 6);
2117
2117
  }
2118
- const oe = /* @__PURE__ */ P(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
2118
+ const oe = /* @__PURE__ */ D(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
2119
2119
  name: "WmTeamAvatars",
2120
2120
  props: {
2121
2121
  members: { type: Array, default: () => [] },
@@ -2169,7 +2169,7 @@ function en(e, t, s, i, a, n) {
2169
2169
  s.responseLabel ? (c(), d("span", Zt, v(s.responseLabel), 1)) : b("", !0)
2170
2170
  ])) : b("", !0);
2171
2171
  }
2172
- const tn = /* @__PURE__ */ P(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
2172
+ const tn = /* @__PURE__ */ D(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
2173
2173
  name: "WmHeader",
2174
2174
  components: { AIAvatar: oe, TeamAvatars: tn },
2175
2175
  inject: {
@@ -2216,7 +2216,7 @@ const tn = /* @__PURE__ */ P(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
2216
2216
  class: "wm-header__fill"
2217
2217
  }, un = { class: "wm-header__actions" }, hn = ["aria-label", "title"], mn = ["aria-label", "title"];
2218
2218
  function fn(e, t, s, i, a, n) {
2219
- const r = B("AIAvatar"), l = B("TeamAvatars");
2219
+ const r = P("AIAvatar"), l = P("TeamAvatars");
2220
2220
  return c(), d("div", sn, [
2221
2221
  s.showBack ? (c(), d("button", {
2222
2222
  key: 0,
@@ -2250,7 +2250,7 @@ function fn(e, t, s, i, a, n) {
2250
2250
  o("div", ln, [
2251
2251
  o("div", cn, v(s.title), 1)
2252
2252
  ]),
2253
- n.hasTeam ? (c(), D(l, {
2253
+ n.hasTeam ? (c(), N(l, {
2254
2254
  key: 0,
2255
2255
  members: n.displayedTeamMembers,
2256
2256
  "response-label": ""
@@ -2314,7 +2314,7 @@ function fn(e, t, s, i, a, n) {
2314
2314
  ])
2315
2315
  ]);
2316
2316
  }
2317
- const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Pe = {
2317
+ const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Pe = {
2318
2318
  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",
2319
2319
  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",
2320
2320
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
@@ -2448,7 +2448,7 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2448
2448
  }, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, In = {
2449
2449
  key: 0,
2450
2450
  class: "wm-onb__alert-time"
2451
- }, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Dn = { class: "wm-onb__btn-label" }, Nn = ["onClick"], Un = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], Fn = {
2451
+ }, Bn = { class: "wm-onb__alert-resume" }, En = { class: "wm-onb__actions" }, Pn = ["disabled"], Dn = { class: "wm-onb__btn-label" }, Nn = ["onClick"], Un = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], Fn = {
2452
2452
  key: 1,
2453
2453
  width: "18",
2454
2454
  height: "18",
@@ -2483,7 +2483,7 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2483
2483
  "aria-hidden": "true"
2484
2484
  }, Wn = ["d"], $n = { class: "wm-onb__btn-label" }, Gn = { class: "wm-onb__btn-count" };
2485
2485
  function Yn(e, t, s, i, a, n) {
2486
- const r = B("AIAvatar");
2486
+ const r = P("AIAvatar");
2487
2487
  return c(), d("div", pn, [
2488
2488
  o("div", vn, [
2489
2489
  t[2] || (t[2] = o("svg", {
@@ -2553,7 +2553,7 @@ function Yn(e, t, s, i, a, n) {
2553
2553
  }, [
2554
2554
  o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2555
2555
  ], -1)
2556
- ])])) : (c(), D(Ae(n.avatarComponent(l)), Fe({
2556
+ ])])) : (c(), N(Ae(n.avatarComponent(l)), Fe({
2557
2557
  key: 1,
2558
2558
  ref_for: !0
2559
2559
  }, n.avatarProps(l)), null, 16)),
@@ -2573,11 +2573,11 @@ function Yn(e, t, s, i, a, n) {
2573
2573
  ]),
2574
2574
  o("span", Ln, [
2575
2575
  n.formatTs(l._ts) ? (c(), d("span", In, v(n.formatTs(l._ts)), 1)) : b("", !0),
2576
- o("span", En, v(n.t("onboarding.resume")), 1)
2576
+ o("span", Bn, v(n.t("onboarding.resume")), 1)
2577
2577
  ])
2578
2578
  ], 8, Cn))), 128))
2579
2579
  ])) : b("", !0),
2580
- o("div", Bn, [
2580
+ o("div", En, [
2581
2581
  o("button", {
2582
2582
  type: "button",
2583
2583
  class: "wm-onb__btn wm-onb__btn--start",
@@ -2658,7 +2658,7 @@ function Yn(e, t, s, i, a, n) {
2658
2658
  ])
2659
2659
  ]);
2660
2660
  }
2661
- const Jn = /* @__PURE__ */ P(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe"]]), Xn = {
2661
+ const Jn = /* @__PURE__ */ D(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe"]]), Xn = {
2662
2662
  name: "WmHistory",
2663
2663
  components: { AIAvatar: oe, HumanAvatar: ve },
2664
2664
  inject: {
@@ -2788,7 +2788,7 @@ function us(e, t, s, i, a, n) {
2788
2788
  }, [
2789
2789
  o("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
2790
2790
  ], -1)
2791
- ])])) : (c(), D(Ae(n.avatarComponent(r)), Fe({
2791
+ ])])) : (c(), N(Ae(n.avatarComponent(r)), Fe({
2792
2792
  key: 1,
2793
2793
  ref_for: !0
2794
2794
  }, n.avatarProps(r)), null, 16)),
@@ -2827,7 +2827,7 @@ function us(e, t, s, i, a, n) {
2827
2827
  ])
2828
2828
  ]);
2829
2829
  }
2830
- const hs = /* @__PURE__ */ P(Xn, [["render", us], ["__scopeId", "data-v-6bf35ef1"]]);
2830
+ const hs = /* @__PURE__ */ D(Xn, [["render", us], ["__scopeId", "data-v-6bf35ef1"]]);
2831
2831
  function ms(e) {
2832
2832
  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();
2833
2833
  }
@@ -2932,7 +2932,7 @@ function Cs(e, t, s, i, a, n) {
2932
2932
  ])
2933
2933
  ], 2);
2934
2934
  }
2935
- const As = /* @__PURE__ */ P(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0"]]), Ss = {
2935
+ const As = /* @__PURE__ */ D(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0"]]), Ss = {
2936
2936
  name: "WmArtifactFormResponse",
2937
2937
  inject: {
2938
2938
  // Translator shared by the Messenger shell; French fallback when
@@ -2986,7 +2986,7 @@ function Is(e, t, s, i, a, n) {
2986
2986
  ])
2987
2987
  ]);
2988
2988
  }
2989
- const Es = /* @__PURE__ */ P(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1"]]), Bs = {
2989
+ const Bs = /* @__PURE__ */ D(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1"]]), Es = {
2990
2990
  name: "WmArtifactInfoCard",
2991
2991
  props: {
2992
2992
  data: { type: Object, required: !0 }
@@ -3053,7 +3053,7 @@ function Ks(e, t, s, i, a, n) {
3053
3053
  ])) : b("", !0)
3054
3054
  ]);
3055
3055
  }
3056
- const Ws = /* @__PURE__ */ P(Bs, [["render", Ks], ["__scopeId", "data-v-7eae0e4a"]]);
3056
+ const Ws = /* @__PURE__ */ D(Es, [["render", Ks], ["__scopeId", "data-v-7eae0e4a"]]);
3057
3057
  function $s(e, t, s) {
3058
3058
  if (!e) return "";
3059
3059
  const i = new Date(e);
@@ -3255,8 +3255,8 @@ function ar(e, t, s, i, a, n) {
3255
3255
  ])) : b("", !0)
3256
3256
  ]);
3257
3257
  }
3258
- const or = /* @__PURE__ */ P(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
3259
- form_response: Es,
3258
+ const or = /* @__PURE__ */ D(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
3259
+ form_response: Bs,
3260
3260
  info_card: Ws,
3261
3261
  ticket: or
3262
3262
  }, cr = {
@@ -3275,12 +3275,12 @@ const or = /* @__PURE__ */ P(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914
3275
3275
  }
3276
3276
  };
3277
3277
  function dr(e, t, s, i, a, n) {
3278
- return n.component ? (c(), D(Ae(n.component), {
3278
+ return n.component ? (c(), N(Ae(n.component), {
3279
3279
  key: 0,
3280
3280
  data: s.artifact.data
3281
3281
  }, null, 8, ["data"])) : b("", !0);
3282
3282
  }
3283
- const ur = /* @__PURE__ */ P(cr, [["render", dr]]), hr = {
3283
+ const ur = /* @__PURE__ */ D(cr, [["render", dr]]), hr = {
3284
3284
  name: "WmAttachmentPreview",
3285
3285
  inject: {
3286
3286
  signAttachmentFn: { default: null },
@@ -3416,7 +3416,7 @@ function kr(e, t, s, i, a, n) {
3416
3416
  ], 8, pr))
3417
3417
  ], 2);
3418
3418
  }
3419
- const Cr = /* @__PURE__ */ P(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd"]]), Ar = {
3419
+ const Cr = /* @__PURE__ */ D(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd"]]), Ar = {
3420
3420
  name: "WmBubble",
3421
3421
  props: {
3422
3422
  role: { type: String, default: "ai" },
@@ -3438,7 +3438,7 @@ function Tr(e, t, s, i, a, n) {
3438
3438
  ], !0)
3439
3439
  ], 2);
3440
3440
  }
3441
- const Mr = /* @__PURE__ */ P(Ar, [["render", Tr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Or = { class: "wm-typing" };
3441
+ const Mr = /* @__PURE__ */ D(Ar, [["render", Tr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Or = { class: "wm-typing" };
3442
3442
  function Rr(e, t, s, i, a, n) {
3443
3443
  return c(), d("div", Or, [...t[0] || (t[0] = [
3444
3444
  o("span", { style: { "animation-delay": "0s" } }, null, -1),
@@ -3446,7 +3446,7 @@ function Rr(e, t, s, i, a, n) {
3446
3446
  o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3447
3447
  ])]);
3448
3448
  }
3449
- const Lr = /* @__PURE__ */ P(xr, [["render", Rr], ["__scopeId", "data-v-df2447fd"]]);
3449
+ const Lr = /* @__PURE__ */ D(xr, [["render", Rr], ["__scopeId", "data-v-df2447fd"]]);
3450
3450
  function ee(e) {
3451
3451
  return e ? e.client_msg_id || e.id : "";
3452
3452
  }
@@ -3458,7 +3458,7 @@ const Ir = {
3458
3458
  closed: "system.closed",
3459
3459
  reopened: "system.reopened",
3460
3460
  idle: "system.idle"
3461
- }, Er = 80, Br = 200, Pr = {
3461
+ }, Br = 80, Er = 200, Pr = {
3462
3462
  name: "WmMessageList",
3463
3463
  components: {
3464
3464
  AIAvatar: oe,
@@ -3504,7 +3504,7 @@ const Ir = {
3504
3504
  aiAgentName: { type: String, default: "" },
3505
3505
  aiAgentAvatarUrl: { type: String, default: null }
3506
3506
  },
3507
- emits: ["load-more"],
3507
+ emits: ["load-more", "callback"],
3508
3508
  data() {
3509
3509
  return {
3510
3510
  // True while a load-more is in flight and for a short grace
@@ -3657,11 +3657,11 @@ const Ir = {
3657
3657
  return `g-${s}`;
3658
3658
  },
3659
3659
  isAtBottom(e) {
3660
- return e.scrollHeight - e.scrollTop - e.clientHeight <= Er;
3660
+ return e.scrollHeight - e.scrollTop - e.clientHeight <= Br;
3661
3661
  },
3662
3662
  onScroll() {
3663
3663
  const e = this.$refs.scrollEl;
3664
- e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Br && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3664
+ e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Er && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3665
3665
  },
3666
3666
  // Capture pre-patch scroll state and restore it on the next tick.
3667
3667
  //
@@ -3759,6 +3759,12 @@ const Ir = {
3759
3759
  `.wm-list__row[data-row-key="${s}"]`
3760
3760
  );
3761
3761
  },
3762
+ // Boutons d'une proposition de résolution (propose_resolution) : ses
3763
+ // callbacks. Vides une fois consommés (le serveur clear `callbacks`).
3764
+ resolutionButtons(e) {
3765
+ var t;
3766
+ return (t = e == null ? void 0 : e.metadata) != null && t.resolution_request ? Array.isArray(e.callbacks) ? e.callbacks : [] : [];
3767
+ },
3762
3768
  roleOf(e) {
3763
3769
  var s, i;
3764
3770
  if ((e == null ? void 0 : e.type) === "system" || ((s = e == null ? void 0 : e.payload) == null ? void 0 : s.type) === "system")
@@ -3862,9 +3868,9 @@ const Ir = {
3862
3868
  // doit garder son arrondi.
3863
3869
  cornersFor(e, t) {
3864
3870
  var Q, se, re;
3865
- const s = e.items, i = (Q = s[t]) == null ? void 0 : Q.kind, a = (se = s[t - 1]) == null ? void 0 : se.kind, n = (re = s[t + 1]) == null ? void 0 : re.kind, r = e.role === "user", l = 14, f = 4, k = a == null ? void 0 : a.bottom, y = n == null ? void 0 : n.top, M = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, T = ($, ie, X) => $ != null && M != null ? $ + q >= M : ie === X || ie === "card" && X === "bubble";
3866
- let N = l, U = l, L = l, W = l;
3867
- return r ? (k && (U = f), (y || !n) && (L = f), k && T(E, k, i == null ? void 0 : i.top) && (N = f), y && T(A, y, i == null ? void 0 : i.bottom) && (W = f)) : (k && (N = f), (y || !n) && (W = f), k && T(E, k, i == null ? void 0 : i.top) && (U = f), y && T(A, y, i == null ? void 0 : i.bottom) && (L = f)), { tl: N, tr: U, br: L, bl: W };
3871
+ const s = e.items, i = (Q = s[t]) == null ? void 0 : Q.kind, a = (se = s[t - 1]) == null ? void 0 : se.kind, n = (re = s[t + 1]) == null ? void 0 : re.kind, r = e.role === "user", l = 14, f = 4, k = a == null ? void 0 : a.bottom, y = n == null ? void 0 : n.top, M = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, T = ($, ie, X) => $ != null && M != null ? $ + q >= M : ie === X || ie === "card" && X === "bubble";
3872
+ let U = l, E = l, L = l, W = l;
3873
+ return r ? (k && (E = f), (y || !n) && (L = f), k && T(B, k, i == null ? void 0 : i.top) && (U = f), y && T(A, y, i == null ? void 0 : i.bottom) && (W = f)) : (k && (U = f), (y || !n) && (W = f), k && T(B, k, i == null ? void 0 : i.top) && (E = f), y && T(A, y, i == null ? void 0 : i.bottom) && (L = f)), { tl: U, tr: E, br: L, bl: W };
3868
3874
  },
3869
3875
  // Inline column-count for the mosaic grid, capped at 4. Single
3870
3876
  // attachment falls back to the vertical-list layout (null). Two
@@ -4066,18 +4072,21 @@ const Ir = {
4066
4072
  }, Kr = { class: "wm-list__sysep-label" }, Wr = ["data-row-key", "onPointerdown"], $r = {
4067
4073
  key: 0,
4068
4074
  class: "wm-list__avatarSlot"
4069
- }, Gr = { key: 0 }, Yr = {
4075
+ }, Gr = {
4076
+ key: 1,
4077
+ class: "wm-list__cbs"
4078
+ }, Yr = ["onClick"], Jr = { key: 0 }, Xr = {
4070
4079
  key: 1,
4071
4080
  "aria-hidden": "true"
4072
- }, Jr = { key: 2 }, Xr = { key: 0 }, Qr = {
4081
+ }, Qr = { key: 2 }, Zr = { key: 0 }, ei = {
4073
4082
  key: 1,
4074
4083
  "aria-hidden": "true"
4075
- }, Zr = { key: 2 }, ei = {
4084
+ }, ti = { key: 2 }, ni = {
4076
4085
  key: 3,
4077
4086
  class: "wm-list__row wm-list__row--ai fade-up"
4078
- }, ti = { class: "wm-list__avatarSlot" }, ni = ["aria-label", "title"];
4079
- function si(e, t, s, i, a, n) {
4080
- const r = B("AIAvatar"), l = B("HumanAvatar"), f = B("ActionResult"), k = B("ArtifactRenderer"), y = B("Bubble"), M = B("AttachmentPreview"), E = B("Typing");
4087
+ }, si = { class: "wm-list__avatarSlot" }, ri = ["aria-label", "title"];
4088
+ function ii(e, t, s, i, a, n) {
4089
+ const r = P("AIAvatar"), l = P("HumanAvatar"), f = P("ActionResult"), k = P("ArtifactRenderer"), y = P("Bubble"), M = P("AttachmentPreview"), B = P("Typing");
4081
4090
  return c(), d("div", Dr, [
4082
4091
  o("div", {
4083
4092
  ref: "scrollEl",
@@ -4113,7 +4122,7 @@ function si(e, t, s, i, a, n) {
4113
4122
  o("span", Kr, v(A.systemLabel), 1),
4114
4123
  t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
4115
4124
  ])) : (c(), d(I, { key: 1 }, [
4116
- (c(!0), d(I, null, j(A.items, (T, N) => (c(), d(I, {
4125
+ (c(!0), d(I, null, j(A.items, (T, U) => (c(), d(I, {
4117
4126
  key: `${n.messageKey(T.message)}-${T.partKey}`
4118
4127
  }, [
4119
4128
  o("div", {
@@ -4125,23 +4134,23 @@ function si(e, t, s, i, a, n) {
4125
4134
  "is-failed": T.message._failed
4126
4135
  }
4127
4136
  ]]),
4128
- style: z(n.cornersStyle(A, N)),
4129
- onPointerdown: (U) => n.onPressStart(`${n.messageKey(T.message)}-${T.partKey}`),
4130
- onPointerup: t[0] || (t[0] = (U) => n.onPressEnd()),
4131
- onPointercancel: t[1] || (t[1] = (U) => n.onPressEnd()),
4132
- onPointerleave: t[2] || (t[2] = (U) => n.onPressEnd()),
4137
+ style: z(n.cornersStyle(A, U)),
4138
+ onPointerdown: (E) => n.onPressStart(`${n.messageKey(T.message)}-${T.partKey}`),
4139
+ onPointerup: t[0] || (t[0] = (E) => n.onPressEnd()),
4140
+ onPointercancel: t[1] || (t[1] = (E) => n.onPressEnd()),
4141
+ onPointerleave: t[2] || (t[2] = (E) => n.onPressEnd()),
4133
4142
  onContextmenu: t[3] || (t[3] = J(() => {
4134
4143
  }, ["prevent"]))
4135
4144
  }, [
4136
4145
  A.role !== "user" ? (c(), d("div", $r, [
4137
- N === A.items.length - 1 ? (c(), d(I, { key: 0 }, [
4138
- A.role === "ai" ? (c(), D(r, {
4146
+ U === A.items.length - 1 ? (c(), d(I, { key: 0 }, [
4147
+ A.role === "ai" ? (c(), N(r, {
4139
4148
  key: 0,
4140
4149
  size: 26,
4141
4150
  tail: !0,
4142
4151
  name: s.aiAgentName,
4143
4152
  "image-url": s.aiAgentAvatarUrl
4144
- }, null, 8, ["name", "image-url"])) : (c(), D(l, {
4153
+ }, null, 8, ["name", "image-url"])) : (c(), N(l, {
4145
4154
  key: 1,
4146
4155
  name: A.agentName,
4147
4156
  "avatar-url": A.agentAvatarUrl,
@@ -4150,20 +4159,20 @@ function si(e, t, s, i, a, n) {
4150
4159
  }, null, 8, ["name", "avatar-url"]))
4151
4160
  ], 64)) : b("", !0)
4152
4161
  ])) : b("", !0),
4153
- T.renderAs === "action" ? (c(), D(f, {
4162
+ T.renderAs === "action" ? (c(), N(f, {
4154
4163
  key: 1,
4155
4164
  state: T.message.payload.state,
4156
4165
  label: n.actionLabel(T.message),
4157
4166
  detail: n.actionDetail(T.message)
4158
- }, null, 8, ["state", "label", "detail"])) : T.renderAs === "admin-pending" ? (c(), D(f, {
4167
+ }, null, 8, ["state", "label", "detail"])) : T.renderAs === "admin-pending" ? (c(), N(f, {
4159
4168
  key: 2,
4160
4169
  state: "awaiting",
4161
4170
  label: n.t("messageList.approvalRequestSent"),
4162
4171
  detail: T.message.text_md || ""
4163
- }, null, 8, ["label", "detail"])) : T.renderAs === "artifact-of-action" ? (c(), D(k, {
4172
+ }, null, 8, ["label", "detail"])) : T.renderAs === "artifact-of-action" ? (c(), N(k, {
4164
4173
  key: 3,
4165
4174
  artifact: n.actionArtifact(T.message)
4166
- }, null, 8, ["artifact"])) : T.renderAs === "artifact" ? (c(), D(k, {
4175
+ }, null, 8, ["artifact"])) : T.renderAs === "artifact" ? (c(), N(k, {
4167
4176
  key: 4,
4168
4177
  artifact: n.artifactOf(T.message)
4169
4178
  }, null, 8, ["artifact"])) : (c(), d("div", {
@@ -4172,13 +4181,26 @@ function si(e, t, s, i, a, n) {
4172
4181
  "wm-list__body--mixed": !!T.message.text_md && n.attachmentsOf(T.message).length > 0
4173
4182
  }])
4174
4183
  }, [
4175
- T.message.text_md ? (c(), D(y, {
4184
+ T.message.text_md ? (c(), N(y, {
4176
4185
  key: 0,
4177
4186
  role: A.role,
4178
4187
  text: T.message.text_md
4179
4188
  }, null, 8, ["role", "text"])) : b("", !0),
4189
+ n.resolutionButtons(T.message).length ? (c(), d("div", Gr, [
4190
+ (c(!0), d(I, null, j(n.resolutionButtons(T.message), (E) => (c(), d("button", {
4191
+ key: E.id,
4192
+ type: "button",
4193
+ class: R(["wm-list__cb", {
4194
+ "wm-list__cb--primary": E.style === "primary"
4195
+ }]),
4196
+ onClick: (L) => e.$emit("callback", {
4197
+ messageId: T.message.id,
4198
+ callbackId: E.id
4199
+ })
4200
+ }, v(E.label), 11, Yr))), 128))
4201
+ ])) : b("", !0),
4180
4202
  n.attachmentsOf(T.message).length ? (c(), d("div", {
4181
- key: 1,
4203
+ key: 2,
4182
4204
  class: R(["wm-list__atts", {
4183
4205
  "wm-list__atts--align-end": A.role === "user",
4184
4206
  "wm-list__atts--mosaic": n.attachmentsOf(T.message).length >= 2
@@ -4191,9 +4213,9 @@ function si(e, t, s, i, a, n) {
4191
4213
  }, [
4192
4214
  (c(!0), d(I, null, j(n.attachmentsOf(
4193
4215
  T.message
4194
- ), (U, L) => (c(), D(M, {
4216
+ ), (E, L) => (c(), N(M, {
4195
4217
  key: `${n.messageKey(T.message)}-att-${L}`,
4196
- attachment: U,
4218
+ attachment: E,
4197
4219
  style: z(
4198
4220
  n.mosaicCornerStyle(
4199
4221
  L,
@@ -4205,28 +4227,28 @@ function si(e, t, s, i, a, n) {
4205
4227
  ], 6)) : b("", !0)
4206
4228
  ], 2))
4207
4229
  ], 46, Wr),
4208
- N < A.items.length - 1 && a.pressedItemKey === `${n.messageKey(T.message)}-${T.partKey}` && (A.role !== "user" || n.timeOf(T.message)) ? (c(), d("div", {
4230
+ U < A.items.length - 1 && a.pressedItemKey === `${n.messageKey(T.message)}-${T.partKey}` && (A.role !== "user" || n.timeOf(T.message)) ? (c(), d("div", {
4209
4231
  key: 0,
4210
4232
  class: R(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
4211
4233
  }, [
4212
- A.role !== "user" ? (c(), d("span", Gr, v(n.roleLabel(A)), 1)) : b("", !0),
4213
- A.role !== "user" && n.timeOf(T.message) ? (c(), d("span", Yr, "•")) : b("", !0),
4214
- n.timeOf(T.message) ? (c(), d("span", Jr, v(n.timeOf(T.message)), 1)) : b("", !0)
4234
+ A.role !== "user" ? (c(), d("span", Jr, v(n.roleLabel(A)), 1)) : b("", !0),
4235
+ A.role !== "user" && n.timeOf(T.message) ? (c(), d("span", Xr, "•")) : b("", !0),
4236
+ n.timeOf(T.message) ? (c(), d("span", Qr, v(n.timeOf(T.message)), 1)) : b("", !0)
4215
4237
  ], 2)) : b("", !0)
4216
4238
  ], 64))), 128)),
4217
4239
  (A.role !== "user" || n.lastTimeOf(A)) && !n.hasTrailingOverlay(A) ? (c(), d("div", {
4218
4240
  key: 0,
4219
4241
  class: R(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
4220
4242
  }, [
4221
- A.role !== "user" ? (c(), d("span", Xr, v(n.roleLabel(A)), 1)) : b("", !0),
4222
- A.role !== "user" && n.lastTimeOf(A) ? (c(), d("span", Qr, "•")) : b("", !0),
4223
- n.lastTimeOf(A) ? (c(), d("span", Zr, v(n.lastTimeOf(A)), 1)) : b("", !0)
4243
+ A.role !== "user" ? (c(), d("span", Zr, v(n.roleLabel(A)), 1)) : b("", !0),
4244
+ A.role !== "user" && n.lastTimeOf(A) ? (c(), d("span", ei, "•")) : b("", !0),
4245
+ n.lastTimeOf(A) ? (c(), d("span", ti, v(n.lastTimeOf(A)), 1)) : b("", !0)
4224
4246
  ], 2)) : b("", !0)
4225
4247
  ], 64))
4226
4248
  ], 2)) : b("", !0)
4227
4249
  ], 64))), 128)),
4228
- s.streamingActive ? (c(), d("div", ei, [
4229
- o("div", ti, [
4250
+ s.streamingActive ? (c(), d("div", ni, [
4251
+ o("div", si, [
4230
4252
  K(r, {
4231
4253
  size: 26,
4232
4254
  tail: !0,
@@ -4234,7 +4256,7 @@ function si(e, t, s, i, a, n) {
4234
4256
  "image-url": s.aiAgentAvatarUrl
4235
4257
  }, null, 8, ["name", "image-url"])
4236
4258
  ]),
4237
- K(E)
4259
+ K(B)
4238
4260
  ])) : b("", !0)
4239
4261
  ], 34),
4240
4262
  K(Ue, { name: "wm-scrollDown" }, {
@@ -4260,14 +4282,14 @@ function si(e, t, s, i, a, n) {
4260
4282
  }, [
4261
4283
  o("path", { d: "M6 9l6 6 6-6" })
4262
4284
  ], -1)
4263
- ])], 8, ni)) : b("", !0)
4285
+ ])], 8, ri)) : b("", !0)
4264
4286
  ]),
4265
4287
  _: 1
4266
4288
  })
4267
4289
  ]);
4268
4290
  }
4269
- const ri = /* @__PURE__ */ P(Pr, [["render", si], ["__scopeId", "data-v-cc2c18ec"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4270
- function ii() {
4291
+ const ai = /* @__PURE__ */ D(Pr, [["render", ii], ["__scopeId", "data-v-1b77cb5b"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4292
+ function oi() {
4271
4293
  return Oe && [
4272
4294
  "video/webm;codecs=vp9,opus",
4273
4295
  "video/webm;codecs=vp8,opus",
@@ -4287,10 +4309,10 @@ function Ve({ audio: e }) {
4287
4309
  systemAudio: e ? "include" : "exclude"
4288
4310
  };
4289
4311
  }
4290
- function wo(e) {
4312
+ function ko(e) {
4291
4313
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
4292
4314
  }
4293
- async function ai() {
4315
+ async function li() {
4294
4316
  if (!pe) return null;
4295
4317
  let e;
4296
4318
  try {
@@ -4301,7 +4323,7 @@ async function ai() {
4301
4323
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
4302
4324
  }
4303
4325
  try {
4304
- return await oi(e);
4326
+ return await ci(e);
4305
4327
  } catch (t) {
4306
4328
  return console.error("[media] screenshot capture", t), null;
4307
4329
  } finally {
@@ -4310,7 +4332,7 @@ async function ai() {
4310
4332
  });
4311
4333
  }
4312
4334
  }
4313
- async function oi(e) {
4335
+ async function ci(e) {
4314
4336
  const t = document.createElement("video");
4315
4337
  t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
4316
4338
  const s = t.videoWidth || 1280, i = t.videoHeight || 720, a = document.createElement("canvas");
@@ -4323,7 +4345,7 @@ async function oi(e) {
4323
4345
  }), r = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4324
4346
  return new File([n], `capture-${r}.png`, { type: "image/png" });
4325
4347
  }
4326
- async function li(e = {}) {
4348
+ async function di(e = {}) {
4327
4349
  var k;
4328
4350
  if (!pe || !Oe) return null;
4329
4351
  let t;
@@ -4334,7 +4356,7 @@ async function li(e = {}) {
4334
4356
  } catch (y) {
4335
4357
  return (y == null ? void 0 : y.name) !== "NotAllowedError" && console.error("[media] record picker", y), null;
4336
4358
  }
4337
- const s = ii();
4359
+ const s = oi();
4338
4360
  let i;
4339
4361
  try {
4340
4362
  i = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
@@ -4349,13 +4371,13 @@ async function li(e = {}) {
4349
4371
  y.data && y.data.size > 0 && a.push(y.data);
4350
4372
  }), i.addEventListener("stop", () => {
4351
4373
  var y, M;
4352
- if (n && clearInterval(n), t.getTracks().forEach((E) => {
4353
- E.stop();
4374
+ if (n && clearInterval(n), t.getTracks().forEach((B) => {
4375
+ B.stop();
4354
4376
  }), a.length) {
4355
- const E = i.mimeType || s || "video/webm", A = new Blob(a, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm", T = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), N = new File([A], `ecran-${T}.${q}`, {
4356
- type: E
4377
+ const B = i.mimeType || s || "video/webm", A = new Blob(a, { type: B }), q = /mp4/.test(B) ? "mp4" : "webm", T = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${T}.${q}`, {
4378
+ type: B
4357
4379
  });
4358
- (y = e.onfinalize) == null || y.call(e, N);
4380
+ (y = e.onfinalize) == null || y.call(e, U);
4359
4381
  } else
4360
4382
  (M = e.oncancel) == null || M.call(e);
4361
4383
  }), t.getVideoTracks().forEach((y) => {
@@ -4388,7 +4410,7 @@ async function li(e = {}) {
4388
4410
  }
4389
4411
  };
4390
4412
  }
4391
- const ci = [
4413
+ const ui = [
4392
4414
  {
4393
4415
  action: "file",
4394
4416
  labelKey: "composer.attachFile",
@@ -4404,7 +4426,7 @@ const ci = [
4404
4426
  labelKey: "composer.recordScreen",
4405
4427
  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"
4406
4428
  }
4407
- ], di = {
4429
+ ], hi = {
4408
4430
  name: "WmComposer",
4409
4431
  inject: {
4410
4432
  // Translator shared by the Messenger shell; French fallback when
@@ -4438,7 +4460,7 @@ const ci = [
4438
4460
  return !this.disabled && !!this.local.trim();
4439
4461
  },
4440
4462
  attachItems() {
4441
- return ci.map((e) => ({
4463
+ return ui.map((e) => ({
4442
4464
  ...e,
4443
4465
  label: this.t(e.labelKey),
4444
4466
  disabled: e.action === "screenshot" && !pe || e.action === "record" && (!pe || !Oe)
@@ -4512,13 +4534,13 @@ const ci = [
4512
4534
  },
4513
4535
  async captureScreenshot() {
4514
4536
  if (this.disabled) return;
4515
- const e = await ai();
4537
+ const e = await li();
4516
4538
  e && this.$emit("attach", e);
4517
4539
  },
4518
4540
  async startRecording() {
4519
4541
  if (this.recording || this.disabled) return;
4520
4542
  this.recordingElapsed = 0;
4521
- const e = await li({
4543
+ const e = await di({
4522
4544
  onstart: () => {
4523
4545
  this.recording = !0;
4524
4546
  },
@@ -4560,30 +4582,30 @@ const ci = [
4560
4582
  !e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
4561
4583
  }
4562
4584
  }
4563
- }, ui = {
4585
+ }, mi = {
4564
4586
  key: 0,
4565
4587
  class: "wm-rec"
4566
- }, hi = { class: "wm-rec__lbl" }, mi = {
4588
+ }, fi = { class: "wm-rec__lbl" }, _i = {
4567
4589
  key: 1,
4568
4590
  class: "wm-compose__menu",
4569
4591
  role: "menu"
4570
- }, fi = ["disabled", "onClick"], _i = { class: "wm-compose__menuIcon" }, gi = {
4592
+ }, gi = ["disabled", "onClick"], pi = { class: "wm-compose__menuIcon" }, vi = {
4571
4593
  viewBox: "0 0 24 24",
4572
4594
  width: "14",
4573
4595
  height: "14",
4574
4596
  "aria-hidden": "true"
4575
- }, pi = ["d"], vi = ["placeholder", "disabled"], yi = { class: "wm-compose__actions" }, wi = ["title", "aria-label", "disabled"], bi = ["disabled", "aria-label"];
4576
- function ki(e, t, s, i, a, n) {
4597
+ }, yi = ["d"], wi = ["placeholder", "disabled"], bi = { class: "wm-compose__actions" }, ki = ["title", "aria-label", "disabled"], Ci = ["disabled", "aria-label"];
4598
+ function Ai(e, t, s, i, a, n) {
4577
4599
  return c(), d("div", {
4578
4600
  class: R(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
4579
4601
  style: z(a.kbOffset ? { transform: `translateY(-${a.kbOffset}px)` } : null)
4580
4602
  }, [
4581
- a.recording ? (c(), d("div", ui, [
4603
+ a.recording ? (c(), d("div", mi, [
4582
4604
  t[8] || (t[8] = o("span", {
4583
4605
  class: "wm-rec__dot",
4584
4606
  "aria-hidden": "true"
4585
4607
  }, null, -1)),
4586
- o("span", hi, v(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
4608
+ o("span", fi, v(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
4587
4609
  o("button", {
4588
4610
  type: "button",
4589
4611
  class: "wm-rec__stop",
@@ -4606,7 +4628,7 @@ function ki(e, t, s, i, a, n) {
4606
4628
  class: "wm-compose__overlay",
4607
4629
  onClick: t[2] || (t[2] = (r) => a.attachOpen = !1)
4608
4630
  })) : b("", !0),
4609
- a.attachOpen ? (c(), d("div", mi, [
4631
+ a.attachOpen ? (c(), d("div", _i, [
4610
4632
  (c(!0), d(I, null, j(n.attachItems, (r) => (c(), d("button", {
4611
4633
  key: r.action,
4612
4634
  type: "button",
@@ -4614,8 +4636,8 @@ function ki(e, t, s, i, a, n) {
4614
4636
  disabled: r.disabled,
4615
4637
  onClick: (l) => n.onAttachAction(r.action)
4616
4638
  }, [
4617
- o("span", _i, [
4618
- (c(), d("svg", gi, [
4639
+ o("span", pi, [
4640
+ (c(), d("svg", vi, [
4619
4641
  o("path", {
4620
4642
  d: r.path,
4621
4643
  stroke: "currentColor",
@@ -4623,11 +4645,11 @@ function ki(e, t, s, i, a, n) {
4623
4645
  "stroke-linecap": "round",
4624
4646
  "stroke-linejoin": "round",
4625
4647
  fill: "none"
4626
- }, null, 8, pi)
4648
+ }, null, 8, yi)
4627
4649
  ]))
4628
4650
  ]),
4629
4651
  o("span", null, v(r.label), 1)
4630
- ], 8, fi))), 128))
4652
+ ], 8, gi))), 128))
4631
4653
  ])) : b("", !0),
4632
4654
  G(o("textarea", {
4633
4655
  ref: "inputEl",
@@ -4638,10 +4660,10 @@ function ki(e, t, s, i, a, n) {
4638
4660
  disabled: s.disabled,
4639
4661
  onKeydown: t[4] || (t[4] = (...r) => n.onKeydown && n.onKeydown(...r)),
4640
4662
  onInput: t[5] || (t[5] = (...r) => n.autosize && n.autosize(...r))
4641
- }, null, 40, vi), [
4663
+ }, null, 40, wi), [
4642
4664
  [te, a.local]
4643
4665
  ]),
4644
- o("div", yi, [
4666
+ o("div", bi, [
4645
4667
  o("button", {
4646
4668
  type: "button",
4647
4669
  class: R(["wm-compose__icon", { "is-open": a.attachOpen }]),
@@ -4663,7 +4685,7 @@ function ki(e, t, s, i, a, n) {
4663
4685
  }, [
4664
4686
  o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
4665
4687
  ], -1)
4666
- ])], 10, wi),
4688
+ ])], 10, ki),
4667
4689
  o("button", {
4668
4690
  type: "submit",
4669
4691
  class: R(["wm-compose__send", { "is-empty": !n.canSend }]),
@@ -4683,12 +4705,12 @@ function ki(e, t, s, i, a, n) {
4683
4705
  }, [
4684
4706
  o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4685
4707
  ], -1)
4686
- ])], 10, bi)
4708
+ ])], 10, Ci)
4687
4709
  ])
4688
4710
  ], 34)
4689
4711
  ], 6);
4690
4712
  }
4691
- const Ci = /* @__PURE__ */ P(di, [["render", ki], ["__scopeId", "data-v-bba29b9c"]]), Ai = {
4713
+ const Si = /* @__PURE__ */ D(hi, [["render", Ai], ["__scopeId", "data-v-bba29b9c"]]), Ti = {
4692
4714
  name: "WmSuggestionChips",
4693
4715
  props: {
4694
4716
  items: { type: Array, default: () => [] },
@@ -4705,8 +4727,8 @@ const Ci = /* @__PURE__ */ P(di, [["render", ki], ["__scopeId", "data-v-bba29b9c
4705
4727
  return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
4706
4728
  }
4707
4729
  }
4708
- }, Si = ["onClick"];
4709
- function Ti(e, t, s, i, a, n) {
4730
+ }, Mi = ["onClick"];
4731
+ function xi(e, t, s, i, a, n) {
4710
4732
  return s.items.length ? (c(), d("div", {
4711
4733
  key: n.batchKey,
4712
4734
  class: "wm-chips"
@@ -4717,10 +4739,10 @@ function Ti(e, t, s, i, a, n) {
4717
4739
  class: "wm-chip",
4718
4740
  style: z({ animationDelay: s.baseDelay + l * s.stepDelay + "ms" }),
4719
4741
  onClick: (f) => e.$emit("select", r)
4720
- }, v(r.label), 13, Si))), 128))
4742
+ }, v(r.label), 13, Mi))), 128))
4721
4743
  ])) : b("", !0);
4722
4744
  }
4723
- const Mi = /* @__PURE__ */ P(Ai, [["render", Ti], ["__scopeId", "data-v-47ad8085"]]), xi = {
4745
+ const Oi = /* @__PURE__ */ D(Ti, [["render", xi], ["__scopeId", "data-v-47ad8085"]]), Ri = {
4724
4746
  name: "WmApprovalCard",
4725
4747
  components: { AIAvatar: oe },
4726
4748
  inject: {
@@ -4764,27 +4786,27 @@ const Mi = /* @__PURE__ */ P(Ai, [["render", Ti], ["__scopeId", "data-v-47ad8085
4764
4786
  return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
4765
4787
  }
4766
4788
  }
4767
- }, Oi = { class: "wm-approval" }, Ri = { class: "wm-approval__head" }, Li = { class: "wm-approval__icon" }, Ii = { class: "wm-approval__main" }, Ei = { class: "wm-approval__title" }, Bi = {
4789
+ }, Li = { class: "wm-approval" }, Ii = { class: "wm-approval__head" }, Bi = { class: "wm-approval__icon" }, Ei = { class: "wm-approval__main" }, Pi = { class: "wm-approval__title" }, Di = {
4768
4790
  key: 0,
4769
4791
  class: "wm-approval__detail"
4770
- }, Pi = { class: "wm-approval__actions" };
4771
- function Di(e, t, s, i, a, n) {
4772
- const r = B("AIAvatar");
4773
- return c(), d("div", Oi, [
4774
- o("div", Ri, [
4775
- o("div", Li, [
4792
+ }, Ni = { class: "wm-approval__actions" };
4793
+ function Ui(e, t, s, i, a, n) {
4794
+ const r = P("AIAvatar");
4795
+ return c(), d("div", Li, [
4796
+ o("div", Ii, [
4797
+ o("div", Bi, [
4776
4798
  K(r, {
4777
4799
  size: 24,
4778
4800
  name: s.agentName,
4779
4801
  "image-url": s.agentAvatarUrl
4780
4802
  }, null, 8, ["name", "image-url"])
4781
4803
  ]),
4782
- o("div", Ii, [
4783
- o("div", Ei, v(s.action), 1),
4784
- s.detail ? (c(), d("div", Bi, v(s.detail), 1)) : b("", !0)
4804
+ o("div", Ei, [
4805
+ o("div", Pi, v(s.action), 1),
4806
+ s.detail ? (c(), d("div", Di, v(s.detail), 1)) : b("", !0)
4785
4807
  ])
4786
4808
  ]),
4787
- o("div", Pi, [
4809
+ o("div", Ni, [
4788
4810
  n.rejectId ? (c(), d("button", {
4789
4811
  key: 0,
4790
4812
  type: "button",
@@ -4800,9 +4822,9 @@ function Di(e, t, s, i, a, n) {
4800
4822
  ])
4801
4823
  ]);
4802
4824
  }
4803
- const Ni = /* @__PURE__ */ P(xi, [["render", Di], ["__scopeId", "data-v-a2bed37e"]]);
4825
+ const ji = /* @__PURE__ */ D(Ri, [["render", Ui], ["__scopeId", "data-v-a2bed37e"]]);
4804
4826
  let De = 0;
4805
- const Ui = /* @__PURE__ */ new Set([
4827
+ const Fi = /* @__PURE__ */ new Set([
4806
4828
  "text",
4807
4829
  "textarea",
4808
4830
  "number",
@@ -4810,7 +4832,7 @@ const Ui = /* @__PURE__ */ new Set([
4810
4832
  "select",
4811
4833
  "multiselect",
4812
4834
  "date"
4813
- ]), ji = {
4835
+ ]), Hi = {
4814
4836
  name: "WmFormCard",
4815
4837
  components: { AIAvatar: oe },
4816
4838
  inject: {
@@ -4840,7 +4862,7 @@ const Ui = /* @__PURE__ */ new Set([
4840
4862
  // douteux.
4841
4863
  normalizedFields() {
4842
4864
  var t;
4843
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !Ui.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
4865
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !Fi.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
4844
4866
  }
4845
4867
  },
4846
4868
  created() {
@@ -4893,47 +4915,47 @@ const Ui = /* @__PURE__ */ new Set([
4893
4915
  }
4894
4916
  }
4895
4917
  }
4896
- }, Fi = { class: "wm-form" }, Hi = { class: "wm-form__head" }, zi = { class: "wm-form__icon" }, qi = { class: "wm-form__main" }, Vi = { class: "wm-form__title" }, Ki = {
4918
+ }, zi = { class: "wm-form" }, qi = { class: "wm-form__head" }, Vi = { class: "wm-form__icon" }, Ki = { class: "wm-form__main" }, Wi = { class: "wm-form__title" }, $i = {
4897
4919
  key: 0,
4898
4920
  class: "wm-form__detail"
4899
- }, Wi = ["for"], $i = {
4921
+ }, Gi = ["for"], Yi = {
4900
4922
  key: 0,
4901
4923
  class: "wm-form__req",
4902
4924
  "aria-hidden": "true"
4903
- }, Gi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Yi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ji = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Xi = ["id", "onUpdate:modelValue", "required", "disabled"], Qi = {
4925
+ }, Ji = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Xi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Qi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Zi = ["id", "onUpdate:modelValue", "required", "disabled"], ea = {
4904
4926
  key: 4,
4905
4927
  class: "wm-form__bool"
4906
- }, Zi = ["id", "onUpdate:modelValue", "disabled"], ea = ["id", "onUpdate:modelValue", "required", "disabled"], ta = {
4928
+ }, ta = ["id", "onUpdate:modelValue", "disabled"], na = ["id", "onUpdate:modelValue", "required", "disabled"], sa = {
4907
4929
  value: "",
4908
4930
  disabled: ""
4909
- }, na = ["value"], sa = {
4931
+ }, ra = ["value"], ia = {
4910
4932
  key: 6,
4911
4933
  class: "wm-form__multi"
4912
- }, ra = ["value", "checked", "disabled", "onChange"], ia = {
4934
+ }, aa = ["value", "checked", "disabled", "onChange"], oa = {
4913
4935
  key: 0,
4914
4936
  class: "wm-form__err"
4915
- }, aa = ["disabled"], oa = {
4937
+ }, la = ["disabled"], ca = {
4916
4938
  key: 0,
4917
4939
  class: "wm-form__spinner",
4918
4940
  "aria-hidden": "true"
4919
- }, la = {
4941
+ }, da = {
4920
4942
  key: 2,
4921
4943
  class: "wm-form__doneLbl"
4922
4944
  };
4923
- function ca(e, t, s, i, a, n) {
4924
- const r = B("AIAvatar");
4925
- return c(), d("div", Fi, [
4926
- o("div", Hi, [
4927
- o("div", zi, [
4945
+ function ua(e, t, s, i, a, n) {
4946
+ const r = P("AIAvatar");
4947
+ return c(), d("div", zi, [
4948
+ o("div", qi, [
4949
+ o("div", Vi, [
4928
4950
  K(r, {
4929
4951
  size: 24,
4930
4952
  name: s.agentName,
4931
4953
  "image-url": s.agentAvatarUrl
4932
4954
  }, null, 8, ["name", "image-url"])
4933
4955
  ]),
4934
- o("div", qi, [
4935
- o("div", Vi, v(s.form.title || n.t("form.title")), 1),
4936
- s.form.description ? (c(), d("div", Ki, v(s.form.description), 1)) : b("", !0)
4956
+ o("div", Ki, [
4957
+ o("div", Wi, v(s.form.title || n.t("form.title")), 1),
4958
+ s.form.description ? (c(), d("div", $i, v(s.form.description), 1)) : b("", !0)
4937
4959
  ])
4938
4960
  ]),
4939
4961
  o("form", {
@@ -4949,8 +4971,8 @@ function ca(e, t, s, i, a, n) {
4949
4971
  class: "wm-form__label"
4950
4972
  }, [
4951
4973
  Se(v(l.label), 1),
4952
- l.required ? (c(), d("span", $i, "*")) : b("", !0)
4953
- ], 8, Wi),
4974
+ l.required ? (c(), d("span", Yi, "*")) : b("", !0)
4975
+ ], 8, Gi),
4954
4976
  l.type === "text" ? G((c(), d("input", {
4955
4977
  key: 0,
4956
4978
  id: `wm-f-${a._uid}-${l.key}`,
@@ -4960,7 +4982,7 @@ function ca(e, t, s, i, a, n) {
4960
4982
  placeholder: l.placeholder || "",
4961
4983
  required: l.required,
4962
4984
  disabled: s.readOnly || a.busy
4963
- }, null, 8, Gi)), [
4985
+ }, null, 8, Ji)), [
4964
4986
  [te, a.values[l.key]]
4965
4987
  ]) : l.type === "textarea" ? G((c(), d("textarea", {
4966
4988
  key: 1,
@@ -4971,7 +4993,7 @@ function ca(e, t, s, i, a, n) {
4971
4993
  placeholder: l.placeholder || "",
4972
4994
  required: l.required,
4973
4995
  disabled: s.readOnly || a.busy
4974
- }, null, 8, Yi)), [
4996
+ }, null, 8, Xi)), [
4975
4997
  [te, a.values[l.key]]
4976
4998
  ]) : l.type === "number" ? G((c(), d("input", {
4977
4999
  key: 2,
@@ -4982,7 +5004,7 @@ function ca(e, t, s, i, a, n) {
4982
5004
  placeholder: l.placeholder || "",
4983
5005
  required: l.required,
4984
5006
  disabled: s.readOnly || a.busy
4985
- }, null, 8, Ji)), [
5007
+ }, null, 8, Qi)), [
4986
5008
  [
4987
5009
  te,
4988
5010
  a.values[l.key],
@@ -4997,15 +5019,15 @@ function ca(e, t, s, i, a, n) {
4997
5019
  class: "wm-form__input",
4998
5020
  required: l.required,
4999
5021
  disabled: s.readOnly || a.busy
5000
- }, null, 8, Xi)), [
5022
+ }, null, 8, Zi)), [
5001
5023
  [te, a.values[l.key]]
5002
- ]) : l.type === "boolean" ? (c(), d("label", Qi, [
5024
+ ]) : l.type === "boolean" ? (c(), d("label", ea, [
5003
5025
  G(o("input", {
5004
5026
  id: `wm-f-${a._uid}-${l.key}`,
5005
5027
  "onUpdate:modelValue": (f) => a.values[l.key] = f,
5006
5028
  type: "checkbox",
5007
5029
  disabled: s.readOnly || a.busy
5008
- }, null, 8, Zi), [
5030
+ }, null, 8, ta), [
5009
5031
  [$e, a.values[l.key]]
5010
5032
  ]),
5011
5033
  o("span", null, v(l.placeholder || n.t("common.yes")), 1)
@@ -5017,14 +5039,14 @@ function ca(e, t, s, i, a, n) {
5017
5039
  required: l.required,
5018
5040
  disabled: s.readOnly || a.busy
5019
5041
  }, [
5020
- o("option", ta, v(l.placeholder || n.t("form.choose")), 1),
5042
+ o("option", sa, v(l.placeholder || n.t("form.choose")), 1),
5021
5043
  (c(!0), d(I, null, j(l.options, (f) => (c(), d("option", {
5022
5044
  key: f.value,
5023
5045
  value: f.value
5024
- }, v(f.label), 9, na))), 128))
5025
- ], 8, ea)), [
5046
+ }, v(f.label), 9, ra))), 128))
5047
+ ], 8, na)), [
5026
5048
  [Ge, a.values[l.key]]
5027
- ]) : l.type === "multiselect" ? (c(), d("div", sa, [
5049
+ ]) : l.type === "multiselect" ? (c(), d("div", ia, [
5028
5050
  (c(!0), d(I, null, j(l.options, (f) => (c(), d("label", {
5029
5051
  key: f.value,
5030
5052
  class: "wm-form__multiItem"
@@ -5039,25 +5061,25 @@ function ca(e, t, s, i, a, n) {
5039
5061
  f.value,
5040
5062
  k.target.checked
5041
5063
  )
5042
- }, null, 40, ra),
5064
+ }, null, 40, aa),
5043
5065
  o("span", null, v(f.label), 1)
5044
5066
  ]))), 128))
5045
5067
  ])) : b("", !0)
5046
5068
  ]))), 128)),
5047
- a.error ? (c(), d("div", ia, v(a.error), 1)) : b("", !0),
5048
- s.readOnly ? (c(), d("div", la, v(n.t("form.responseSent")), 1)) : (c(), d("button", {
5069
+ a.error ? (c(), d("div", oa, v(a.error), 1)) : b("", !0),
5070
+ s.readOnly ? (c(), d("div", da, v(n.t("form.responseSent")), 1)) : (c(), d("button", {
5049
5071
  key: 1,
5050
5072
  type: "submit",
5051
5073
  class: "wm-form__submit",
5052
5074
  disabled: a.busy
5053
5075
  }, [
5054
- a.busy ? (c(), d("span", oa)) : b("", !0),
5076
+ a.busy ? (c(), d("span", ca)) : b("", !0),
5055
5077
  o("span", null, v(a.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
5056
- ], 8, aa))
5078
+ ], 8, la))
5057
5079
  ], 32)
5058
5080
  ]);
5059
5081
  }
5060
- const da = /* @__PURE__ */ P(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56"]]), ua = {
5082
+ const ha = /* @__PURE__ */ D(Hi, [["render", ua], ["__scopeId", "data-v-fe65cc56"]]), ma = {
5061
5083
  name: "WmFeedback",
5062
5084
  inject: {
5063
5085
  // Translator shared by the Messenger shell; French fallback when
@@ -5091,13 +5113,13 @@ const da = /* @__PURE__ */ P(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56
5091
5113
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
5092
5114
  }
5093
5115
  }
5094
- }, ha = { class: "wm-fb" }, ma = { class: "wm-fb__title" }, fa = { class: "wm-fb__sub" }, _a = { class: "wm-fb__row" }, ga = ["onClick"], pa = { class: "wm-fb__emoji" }, va = { class: "wm-fb__label" }, ya = ["disabled"], wa = {
5116
+ }, fa = { class: "wm-fb" }, _a = { class: "wm-fb__title" }, ga = { class: "wm-fb__sub" }, pa = { class: "wm-fb__row" }, va = ["onClick"], ya = { class: "wm-fb__emoji" }, wa = { class: "wm-fb__label" }, ba = ["disabled"], ka = {
5095
5117
  key: 1,
5096
5118
  class: "wm-fb__done"
5097
- }, ba = { class: "wm-fb__doneTitle" }, ka = { class: "wm-fb__doneSub" };
5098
- function Ca(e, t, s, i, a, n) {
5099
- return c(), d("div", ha, [
5100
- s.done ? (c(), d("div", wa, [
5119
+ }, Ca = { class: "wm-fb__doneTitle" }, Aa = { class: "wm-fb__doneSub" };
5120
+ function Sa(e, t, s, i, a, n) {
5121
+ return c(), d("div", fa, [
5122
+ s.done ? (c(), d("div", ka, [
5101
5123
  t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
5102
5124
  o("svg", {
5103
5125
  width: "16",
@@ -5113,32 +5135,32 @@ function Ca(e, t, s, i, a, n) {
5113
5135
  o("path", { d: "M20 6L9 17l-5-5" })
5114
5136
  ])
5115
5137
  ], -1)),
5116
- o("div", ba, v(n.t("feedback.doneTitle")), 1),
5117
- o("div", ka, v(n.t("feedback.doneSubtitle")), 1)
5138
+ o("div", Ca, v(n.t("feedback.doneTitle")), 1),
5139
+ o("div", Aa, v(n.t("feedback.doneSubtitle")), 1)
5118
5140
  ])) : (c(), d(I, { key: 0 }, [
5119
- o("div", ma, v(n.t("feedback.question")), 1),
5120
- o("div", fa, v(n.t("feedback.subtitle")), 1),
5121
- o("div", _a, [
5141
+ o("div", _a, v(n.t("feedback.question")), 1),
5142
+ o("div", ga, v(n.t("feedback.subtitle")), 1),
5143
+ o("div", pa, [
5122
5144
  (c(!0), d(I, null, j(n.options, (r) => (c(), d("button", {
5123
5145
  key: r.v,
5124
5146
  type: "button",
5125
5147
  class: R(["wm-fb__opt", { "is-selected": a.sel === r.v }]),
5126
5148
  onClick: (l) => a.sel = r.v
5127
5149
  }, [
5128
- o("span", pa, v(r.e), 1),
5129
- o("span", va, v(r.l), 1)
5130
- ], 10, ga))), 128))
5150
+ o("span", ya, v(r.e), 1),
5151
+ o("span", wa, v(r.l), 1)
5152
+ ], 10, va))), 128))
5131
5153
  ]),
5132
5154
  o("button", {
5133
5155
  type: "button",
5134
5156
  class: "wm-fb__send",
5135
5157
  disabled: !a.sel || s.busy,
5136
5158
  onClick: t[0] || (t[0] = (...r) => n.onSend && n.onSend(...r))
5137
- }, v(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, ya)
5159
+ }, v(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, ba)
5138
5160
  ], 64))
5139
5161
  ]);
5140
5162
  }
5141
- const Aa = /* @__PURE__ */ P(ua, [["render", Ca], ["__scopeId", "data-v-9b630564"]]), Sa = {
5163
+ const Ta = /* @__PURE__ */ D(ma, [["render", Sa], ["__scopeId", "data-v-9b630564"]]), Ma = {
5142
5164
  name: "WmMoreMenu",
5143
5165
  inject: {
5144
5166
  // Translator shared by the Messenger shell; French fallback when
@@ -5173,24 +5195,24 @@ const Aa = /* @__PURE__ */ P(ua, [["render", Ca], ["__scopeId", "data-v-9b630564
5173
5195
  this.soundOn = !this.soundOn, this.$emit("sound-toggle", this.soundOn);
5174
5196
  }
5175
5197
  }
5176
- }, Ta = { class: "wm-mm" }, Ma = {
5198
+ }, xa = { class: "wm-mm" }, Oa = {
5177
5199
  class: "wm-mm__pop",
5178
5200
  role: "menu"
5179
- }, xa = {
5201
+ }, Ra = {
5180
5202
  key: 0,
5181
5203
  class: "wm-mm__section"
5182
- }, Oa = { class: "wm-mm__label" }, Ra = { class: "wm-mm__label" }, La = {
5204
+ }, La = { class: "wm-mm__label" }, Ia = { class: "wm-mm__label" }, Ba = {
5183
5205
  key: 1,
5184
5206
  class: "wm-mm__sep"
5185
- }, Ia = { class: "wm-mm__section" }, Ea = { class: "wm-mm__label" }, Ba = { class: "wm-mm__section" }, Pa = { class: "wm-mm__label" }, Da = { class: "wm-mm__label" };
5186
- function Na(e, t, s, i, a, n) {
5187
- return c(), d("div", Ta, [
5207
+ }, Ea = { class: "wm-mm__section" }, Pa = { class: "wm-mm__label" }, Da = { class: "wm-mm__section" }, Na = { class: "wm-mm__label" }, Ua = { class: "wm-mm__label" };
5208
+ function ja(e, t, s, i, a, n) {
5209
+ return c(), d("div", xa, [
5188
5210
  o("div", {
5189
5211
  class: "wm-mm__scrim",
5190
5212
  onClick: t[0] || (t[0] = (r) => e.$emit("close"))
5191
5213
  }),
5192
- o("div", Ma, [
5193
- s.canRename || s.canExport ? (c(), d("div", xa, [
5214
+ o("div", Oa, [
5215
+ s.canRename || s.canExport ? (c(), d("div", Ra, [
5194
5216
  s.canRename ? (c(), d("button", {
5195
5217
  key: 0,
5196
5218
  type: "button",
@@ -5213,7 +5235,7 @@ function Na(e, t, s, i, a, n) {
5213
5235
  o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
5214
5236
  ])
5215
5237
  ], -1)),
5216
- o("span", Oa, v(n.t("moreMenu.editTitle")), 1)
5238
+ o("span", La, v(n.t("moreMenu.editTitle")), 1)
5217
5239
  ])) : b("", !0),
5218
5240
  s.canExport ? (c(), d("button", {
5219
5241
  key: 1,
@@ -5236,12 +5258,12 @@ function Na(e, t, s, i, a, n) {
5236
5258
  o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
5237
5259
  ])
5238
5260
  ], -1)),
5239
- o("span", Ra, v(n.t("moreMenu.exportTranscript")), 1),
5261
+ o("span", Ia, v(n.t("moreMenu.exportTranscript")), 1),
5240
5262
  t[8] || (t[8] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
5241
5263
  ])) : b("", !0)
5242
5264
  ])) : b("", !0),
5243
- s.canRename || s.canExport ? (c(), d("div", La)) : b("", !0),
5244
- o("div", Ia, [
5265
+ s.canRename || s.canExport ? (c(), d("div", Ba)) : b("", !0),
5266
+ o("div", Ea, [
5245
5267
  o("button", {
5246
5268
  type: "button",
5247
5269
  class: "wm-mm__item",
@@ -5263,7 +5285,7 @@ function Na(e, t, s, i, a, n) {
5263
5285
  o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
5264
5286
  ])
5265
5287
  ], -1)),
5266
- o("span", Ea, v(n.t("moreMenu.sound")), 1),
5288
+ o("span", Pa, v(n.t("moreMenu.sound")), 1),
5267
5289
  o("span", {
5268
5290
  class: R(["wm-mm__toggle", { "wm-mm__toggle--on": a.soundOn }])
5269
5291
  }, [...t[9] || (t[9] = [
@@ -5272,7 +5294,7 @@ function Na(e, t, s, i, a, n) {
5272
5294
  ])
5273
5295
  ]),
5274
5296
  t[13] || (t[13] = o("div", { class: "wm-mm__sep" }, null, -1)),
5275
- o("div", Ba, [
5297
+ o("div", Da, [
5276
5298
  s.statusUrl ? (c(), d("button", {
5277
5299
  key: 0,
5278
5300
  type: "button",
@@ -5294,7 +5316,7 @@ function Na(e, t, s, i, a, n) {
5294
5316
  o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5295
5317
  ])
5296
5318
  ], -1)),
5297
- o("span", Pa, v(n.t("moreMenu.serviceStatus")), 1)
5319
+ o("span", Na, v(n.t("moreMenu.serviceStatus")), 1)
5298
5320
  ])) : b("", !0),
5299
5321
  s.helpUrl ? (c(), d("button", {
5300
5322
  key: 1,
@@ -5317,13 +5339,13 @@ function Na(e, t, s, i, a, n) {
5317
5339
  o("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
5318
5340
  ])
5319
5341
  ], -1)),
5320
- o("span", Da, v(n.t("moreMenu.helpCenter")), 1)
5342
+ o("span", Ua, v(n.t("moreMenu.helpCenter")), 1)
5321
5343
  ])) : b("", !0)
5322
5344
  ])
5323
5345
  ])
5324
5346
  ]);
5325
5347
  }
5326
- const Ua = /* @__PURE__ */ P(Sa, [["render", Na], ["__scopeId", "data-v-4cf6d578"]]), ja = {
5348
+ const Fa = /* @__PURE__ */ D(Ma, [["render", ja], ["__scopeId", "data-v-4cf6d578"]]), Ha = {
5327
5349
  name: "WmRenameDialog",
5328
5350
  inject: {
5329
5351
  // Translator shared by the Messenger shell; French fallback when
@@ -5365,20 +5387,20 @@ const Ua = /* @__PURE__ */ P(Sa, [["render", Na], ["__scopeId", "data-v-4cf6d578
5365
5387
  this.canSubmit && this.$emit("submit", this.value.trim());
5366
5388
  }
5367
5389
  }
5368
- }, Fa = { class: "wm-dialog" }, Ha = {
5390
+ }, za = { class: "wm-dialog" }, qa = {
5369
5391
  class: "wm-dialog__card",
5370
5392
  role: "dialog",
5371
5393
  "aria-modal": "true"
5372
- }, za = { class: "wm-dialog__head" }, qa = { class: "wm-dialog__title" }, Va = ["aria-label"], Ka = { class: "wm-dialog__body" }, Wa = ["placeholder"], $a = { class: "wm-dialog__actions" }, Ga = ["disabled"];
5373
- function Ya(e, t, s, i, a, n) {
5374
- return c(), d("div", Fa, [
5394
+ }, Va = { class: "wm-dialog__head" }, Ka = { class: "wm-dialog__title" }, Wa = ["aria-label"], $a = { class: "wm-dialog__body" }, Ga = ["placeholder"], Ya = { class: "wm-dialog__actions" }, Ja = ["disabled"];
5395
+ function Xa(e, t, s, i, a, n) {
5396
+ return c(), d("div", za, [
5375
5397
  o("div", {
5376
5398
  class: "wm-dialog__scrim",
5377
5399
  onClick: t[0] || (t[0] = (r) => e.$emit("close"))
5378
5400
  }),
5379
- o("div", Ha, [
5380
- o("div", za, [
5381
- o("div", qa, v(s.title || n.t("rename.title")), 1),
5401
+ o("div", qa, [
5402
+ o("div", Va, [
5403
+ o("div", Ka, v(s.title || n.t("rename.title")), 1),
5382
5404
  o("button", {
5383
5405
  type: "button",
5384
5406
  class: "wm-dialog__close",
@@ -5398,9 +5420,9 @@ function Ya(e, t, s, i, a, n) {
5398
5420
  }, [
5399
5421
  o("path", { d: "M18 6L6 18M6 6l12 12" })
5400
5422
  ], -1)
5401
- ])], 8, Va)
5423
+ ])], 8, Wa)
5402
5424
  ]),
5403
- o("div", Ka, [
5425
+ o("div", $a, [
5404
5426
  G(o("input", {
5405
5427
  ref: "input",
5406
5428
  "onUpdate:modelValue": t[2] || (t[2] = (r) => a.value = r),
@@ -5412,11 +5434,11 @@ function Ya(e, t, s, i, a, n) {
5412
5434
  t[3] || (t[3] = ge(J((...r) => n.onSubmit && n.onSubmit(...r), ["prevent"]), ["enter"])),
5413
5435
  t[4] || (t[4] = ge(J((r) => e.$emit("close"), ["prevent"]), ["esc"]))
5414
5436
  ]
5415
- }, null, 40, Wa), [
5437
+ }, null, 40, Ga), [
5416
5438
  [te, a.value]
5417
5439
  ])
5418
5440
  ]),
5419
- o("div", $a, [
5441
+ o("div", Ya, [
5420
5442
  o("button", {
5421
5443
  type: "button",
5422
5444
  class: "wm-dialog__btn",
@@ -5427,26 +5449,26 @@ function Ya(e, t, s, i, a, n) {
5427
5449
  class: "wm-dialog__btn wm-dialog__btn--primary",
5428
5450
  disabled: !n.canSubmit,
5429
5451
  onClick: t[6] || (t[6] = (...r) => n.onSubmit && n.onSubmit(...r))
5430
- }, v(n.t("common.save")), 9, Ga)
5452
+ }, v(n.t("common.save")), 9, Ja)
5431
5453
  ])
5432
5454
  ])
5433
5455
  ]);
5434
5456
  }
5435
- const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8"]]), Ne = "ww-messenger-tokens", Xa = {
5457
+ const Qa = /* @__PURE__ */ D(Ha, [["render", Xa], ["__scopeId", "data-v-6d5f94a8"]]), Ne = "ww-messenger-tokens", Za = {
5436
5458
  name: "Messenger",
5437
5459
  components: {
5438
5460
  Launcher: qt,
5439
5461
  Header: _n,
5440
5462
  Onboarding: Jn,
5441
5463
  History: hs,
5442
- MessageList: ri,
5443
- Composer: Ci,
5444
- SuggestionChips: Mi,
5445
- ApprovalCard: Ni,
5446
- FormCard: da,
5447
- Feedback: Aa,
5448
- MoreMenu: Ua,
5449
- RenameDialog: Ja
5464
+ MessageList: ai,
5465
+ Composer: Si,
5466
+ SuggestionChips: Oi,
5467
+ ApprovalCard: ji,
5468
+ FormCard: ha,
5469
+ Feedback: Ta,
5470
+ MoreMenu: Fa,
5471
+ RenameDialog: Qa
5450
5472
  },
5451
5473
  mixins: [
5452
5474
  yt,
@@ -5665,9 +5687,9 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5665
5687
  const M = a[y];
5666
5688
  if (!M) continue;
5667
5689
  if (((k = M.author) == null ? void 0 : k.type) === "user") break;
5668
- const E = Y(M.id);
5669
- if (E != null) {
5670
- if (n != null && E <= n) break;
5690
+ const B = Y(M.id);
5691
+ if (B != null) {
5692
+ if (n != null && B <= n) break;
5671
5693
  t[M.id] !== 0 && (!l && M.author && (l = M.author), r++);
5672
5694
  }
5673
5695
  }
@@ -5698,13 +5720,16 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5698
5720
  openThreads() {
5699
5721
  var t;
5700
5722
  const e = ((t = this.s) == null ? void 0 : t.messagesByConv) || {};
5701
- return this.drawerConversations.filter((s) => s.status !== "resolved" && s.status !== "closed").map((s) => ({
5723
+ return this.drawerConversations.filter((s) => {
5724
+ const i = this.convStatus(s);
5725
+ return i !== "resolved" && i !== "closed";
5726
+ }).map((s) => ({
5702
5727
  id: s.id,
5703
5728
  title: s.name || this.t("common.newConversation"),
5704
5729
  preview: s._preview || this.t("onboarding.newMessage"),
5705
5730
  unread: !!s._unread,
5706
5731
  author: s._lastAuthor || null,
5707
- _ts: Be(s, e[s.id] || [])
5732
+ _ts: Ee(s, e[s.id] || [])
5708
5733
  })).sort((s, i) => s._ts < i._ts ? 1 : s._ts > i._ts ? -1 : 0);
5709
5734
  },
5710
5735
  // Unread threads (one entry per conv with unseen agent/human
@@ -5716,7 +5741,7 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5716
5741
  const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = [];
5717
5742
  for (const i of this.drawerConversations) {
5718
5743
  if (!i._unread) continue;
5719
- const a = Be(i, e[i.id] || []), n = i._lastAuthor, r = !n || n.type === "agent_ia", l = (n == null ? void 0 : n.name) || (r ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (r ? this.agentAvatarUrl : null);
5744
+ const a = Ee(i, e[i.id] || []), n = i._lastAuthor, r = !n || n.type === "agent_ia", l = (n == null ? void 0 : n.name) || (r ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (r ? this.agentAvatarUrl : null);
5720
5745
  t.push({
5721
5746
  convId: i.id,
5722
5747
  preview: i._preview || this.t("notification.youHaveNewMessage"),
@@ -5860,17 +5885,13 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5860
5885
  return !!this.humanMessageAuthor;
5861
5886
  },
5862
5887
  isWaitingHuman() {
5863
- var e;
5864
- return ((e = this.currentConv) == null ? void 0 : e.status) === "waiting_human_response";
5888
+ return this.currentStatus === "waiting_human_response";
5865
5889
  },
5866
5890
  isTerminal() {
5867
- var t;
5868
- const e = (t = this.currentConv) == null ? void 0 : t.status;
5869
- return e === "resolved" || e === "closed";
5891
+ return this.currentStatus === "resolved" || this.currentStatus === "closed";
5870
5892
  },
5871
5893
  isClosed() {
5872
- var e;
5873
- return ((e = this.currentConv) == null ? void 0 : e.status) === "closed";
5894
+ return this.currentStatus === "closed";
5874
5895
  },
5875
5896
  // Bloc "conversation terminée" (remplace le composer) : visible sur tout
5876
5897
  // statut terminal, SAUF si l'utilisateur a cliqué "Rouvrir" sur une conv
@@ -5925,19 +5946,12 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5925
5946
  pendingApproval() {
5926
5947
  return !this.currentConv || !this.store || this.actionInFlight ? null : this.store.getPendingApproval(this.currentConv.id);
5927
5948
  },
5928
- // Carte de résolution (propose_resolution) : dernier message porteur de
5929
- // `metadata.resolution_request` dont les callbacks ne sont pas encore
5930
- // consommés (le serveur les clear au clic) et sans clic optimiste en vol.
5931
- pendingResolution() {
5932
- var t, s, i, a, n;
5933
- if (!this.currentConv || !this.store || this.actionInFlight || this.pendingApproval) return null;
5934
- const e = ((s = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : s[this.currentConv.id]) || [];
5935
- for (let r = e.length - 1; r >= 0; r--) {
5936
- const l = e[r];
5937
- if ((i = l == null ? void 0 : l.metadata) != null && i.resolution_request)
5938
- return !Array.isArray(l.callbacks) || !l.callbacks.length || (n = (a = this.s) == null ? void 0 : a.awaitingCallback) != null && n[l.id] ? null : l;
5939
- }
5940
- return null;
5949
+ // Statut courant de la conversation ouverte. Source FIABLE = le
5950
+ // `conversation_status` estampillé sur le dernier message reçu (canal
5951
+ // messages, robuste, aligné avec l'archi serveur). Le champ
5952
+ // `conversation_updated` (SSE éphémère) n'est plus la source de vérité.
5953
+ currentStatus() {
5954
+ return this.convStatus(this.currentConv);
5941
5955
  },
5942
5956
  // The approval card sits on top of the chat as an overlay. It must
5943
5957
  // appear only once the conversation has visibly settled, never
@@ -6018,7 +6032,7 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6018
6032
  showFeedback() {
6019
6033
  var t;
6020
6034
  const e = this.currentConv;
6021
- return e ? this.feedbackDone ? !0 : e.status !== "resolved" ? !1 : !((t = e.metadata) != null && t.feedback) : !1;
6035
+ return e ? this.feedbackDone ? !0 : this.currentStatus !== "resolved" ? !1 : !((t = e.metadata) != null && t.feedback) : !1;
6022
6036
  },
6023
6037
  floatVisible() {
6024
6038
  return this.approvalReady || !!this.pendingForm || this.showFeedback || this.suggestions.length > 0;
@@ -6150,6 +6164,20 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6150
6164
  this._parentMessageHandler && (window.removeEventListener("message", this._parentMessageHandler), this._parentMessageHandler = null), this._launcherRo && (this._launcherRo.disconnect(), this._launcherRo = null), this.cancelReveals(), this.cancelWelcomeTimers(), this.teardownLiveReveal(), this.disconnectFloatRO(), this.resetApprovalPacing(), this.teardownNotifications(), this.store && this.store.destroy();
6151
6165
  },
6152
6166
  methods: {
6167
+ // Statut effectif d'une conversation : le `conversation_status`
6168
+ // estampillé sur son dernier message porteur (canal messages, fiable),
6169
+ // sinon le champ `conv.status` (convs sans messages chargés), sinon
6170
+ // 'open'. Un seul point de vérité pour tout ce qui dépend du statut.
6171
+ convStatus(e) {
6172
+ var s, i, a, n;
6173
+ if (!e) return "open";
6174
+ const t = ((i = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : i[e.id]) || [];
6175
+ for (let r = t.length - 1; r >= 0; r--) {
6176
+ const l = (n = (a = t[r]) == null ? void 0 : a.metadata) == null ? void 0 : n.conversation_status;
6177
+ if (l) return l;
6178
+ }
6179
+ return e.status || "open";
6180
+ },
6153
6181
  // Translate a key against the resolved language. Used in this
6154
6182
  // component's template/computeds and re-exposed to descendants via
6155
6183
  // `provide()`.
@@ -6308,21 +6336,21 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6308
6336
  this.launcherHovered = e, this.sendCurrentLauncherSize();
6309
6337
  },
6310
6338
  sendCurrentLauncherSize() {
6311
- var y, M, E, A, q, T, N;
6339
+ var y, M, B, A, q, T, U;
6312
6340
  if (this.isOpen) return;
6313
6341
  const e = (M = (y = this.$el) == null ? void 0 : y.querySelector) == null ? void 0 : M.call(y, ".wm-launcherWrap");
6314
6342
  if (!e) return;
6315
6343
  const t = e.getBoundingClientRect();
6316
6344
  if (!t.width || !t.height) return;
6317
- const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, i = 16, a = Math.ceil(t.width), n = Math.ceil(t.height), r = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), l = (N = (T = this.$el) == null ? void 0 : T.querySelectorAll) == null ? void 0 : N.call(T, ".wm-peek"), f = l && l.length ? l[l.length - 1] : null;
6345
+ const s = (((B = this.launcherPeeks) == null ? void 0 : B.length) ?? 0) > 0, i = 16, a = Math.ceil(t.width), n = Math.ceil(t.height), r = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), l = (U = (T = this.$el) == null ? void 0 : T.querySelectorAll) == null ? void 0 : U.call(T, ".wm-peek"), f = l && l.length ? l[l.length - 1] : null;
6318
6346
  let k = null;
6319
6347
  if (f) {
6320
- const U = f.getBoundingClientRect();
6348
+ const E = f.getBoundingClientRect();
6321
6349
  k = {
6322
- width: Math.ceil(U.width),
6323
- height: Math.ceil(U.height),
6324
- rightOffset: Math.max(0, Math.ceil(t.right - U.right)),
6325
- bottomOffset: Math.max(0, Math.ceil(t.bottom - U.bottom))
6350
+ width: Math.ceil(E.width),
6351
+ height: Math.ceil(E.height),
6352
+ rightOffset: Math.max(0, Math.ceil(t.right - E.right)),
6353
+ bottomOffset: Math.max(0, Math.ceil(t.bottom - E.bottom))
6326
6354
  };
6327
6355
  }
6328
6356
  this.notifyParentResize("closed", {
@@ -6578,9 +6606,8 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6578
6606
  const t = this.pendingApproval;
6579
6607
  t && await this.store.clickCallback(t.id, e);
6580
6608
  },
6581
- async onResolutionCallback(e) {
6582
- const t = this.pendingResolution;
6583
- t && await this.store.clickCallback(t.id, e);
6609
+ async onResolutionCallback({ messageId: e, callbackId: t }) {
6610
+ !e || !t || await this.store.clickCallback(e, t);
6584
6611
  },
6585
6612
  async onFormSubmit({ values: e }) {
6586
6613
  const t = this.pendingForm;
@@ -6695,45 +6722,45 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6695
6722
  }
6696
6723
  }
6697
6724
  }
6698
- }, Qa = {
6725
+ }, eo = {
6699
6726
  key: 0,
6700
6727
  class: "wm-loading",
6701
6728
  "aria-busy": "true",
6702
6729
  "aria-live": "polite"
6703
- }, Za = ["aria-label"], eo = {
6730
+ }, to = ["aria-label"], no = {
6704
6731
  key: 0,
6705
6732
  class: "wm-state"
6706
- }, to = { class: "wm-state__err" }, no = { class: "wm-state__errTitle" }, so = { class: "wm-state__errSub" }, ro = { class: "wm-bottom" }, io = {
6733
+ }, so = { class: "wm-state__err" }, ro = { class: "wm-state__errTitle" }, io = { class: "wm-state__errSub" }, ao = { class: "wm-bottom" }, oo = {
6707
6734
  key: 0,
6708
6735
  ref: "floatEl",
6709
6736
  class: "wm-float"
6710
- }, ao = {
6737
+ }, lo = {
6711
6738
  key: 1,
6712
6739
  class: "wm-actionWait",
6713
6740
  role: "status",
6714
6741
  "aria-live": "polite"
6715
- }, oo = { class: "wm-actionWait__lbl" }, lo = {
6742
+ }, co = { class: "wm-actionWait__lbl" }, uo = {
6716
6743
  key: 2,
6717
6744
  class: "wm-attached"
6718
- }, co = ["src", "alt"], uo = {
6745
+ }, ho = ["src", "alt"], mo = {
6719
6746
  key: 1,
6720
6747
  class: "wm-attached__file"
6721
- }, ho = { class: "wm-attached__fileMeta" }, mo = { class: "wm-attached__fileName" }, fo = {
6748
+ }, fo = { class: "wm-attached__fileMeta" }, _o = { class: "wm-attached__fileName" }, go = {
6722
6749
  key: 0,
6723
6750
  class: "wm-attached__fileSize"
6724
- }, _o = ["aria-label", "onClick"], go = {
6751
+ }, po = ["aria-label", "onClick"], vo = {
6725
6752
  key: 3,
6726
6753
  class: "wm-ended",
6727
6754
  role: "status",
6728
6755
  "aria-live": "polite"
6729
- }, po = { class: "wm-ended__lbl" };
6730
- function vo(e, t, s, i, a, n) {
6731
- const r = B("Launcher"), l = B("Header"), f = B("History"), k = B("Onboarding"), y = B("MessageList"), M = B("ApprovalCard"), E = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), T = B("Composer"), N = B("MoreMenu"), U = B("RenameDialog");
6756
+ }, yo = { class: "wm-ended__lbl" };
6757
+ function wo(e, t, s, i, a, n) {
6758
+ const r = P("Launcher"), l = P("Header"), f = P("History"), k = P("Onboarding"), y = P("MessageList"), M = P("ApprovalCard"), B = P("FormCard"), A = P("Feedback"), q = P("SuggestionChips"), T = P("Composer"), U = P("MoreMenu"), E = P("RenameDialog");
6732
6759
  return c(), d("div", {
6733
6760
  class: R(["wm-root", `wm-root--${s.displayMode}`]),
6734
6761
  style: z(n.rootStyle)
6735
6762
  }, [
6736
- !a.isOpen && !n.isEmbedded ? (c(), D(r, {
6763
+ !a.isOpen && !n.isEmbedded ? (c(), N(r, {
6737
6764
  key: 0,
6738
6765
  "unread-count": n.unreadCount,
6739
6766
  peeks: n.launcherPeeks,
@@ -6753,7 +6780,7 @@ function vo(e, t, s, i, a, n) {
6753
6780
  "aria-label": "Messenger",
6754
6781
  onClick: t[7] || (t[7] = (...L) => n.onPanelClick && n.onPanelClick(...L))
6755
6782
  }, [
6756
- !n.ready && !n.error ? (c(), d("div", Qa, [
6783
+ !n.ready && !n.error ? (c(), d("div", eo, [
6757
6784
  n.isEmbedded ? b("", !0) : (c(), d("button", {
6758
6785
  key: 0,
6759
6786
  type: "button",
@@ -6774,7 +6801,7 @@ function vo(e, t, s, i, a, n) {
6774
6801
  }, [
6775
6802
  o("path", { d: "M18 6L6 18M6 6l12 12" })
6776
6803
  ], -1)
6777
- ])], 8, Za)),
6804
+ ])], 8, to)),
6778
6805
  t[9] || (t[9] = o("div", {
6779
6806
  class: "wm-loading__spinner",
6780
6807
  "aria-hidden": "true"
@@ -6794,8 +6821,8 @@ function vo(e, t, s, i, a, n) {
6794
6821
  onMore: n.toggleMore,
6795
6822
  onClose: n.close
6796
6823
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
6797
- n.error ? (c(), d("div", eo, [
6798
- o("div", to, [
6824
+ n.error ? (c(), d("div", no, [
6825
+ o("div", so, [
6799
6826
  t[10] || (t[10] = o("div", { class: "wm-state__errIcon" }, [
6800
6827
  o("svg", {
6801
6828
  width: "14",
@@ -6812,11 +6839,11 @@ function vo(e, t, s, i, a, n) {
6812
6839
  ])
6813
6840
  ], -1)),
6814
6841
  o("div", null, [
6815
- o("div", no, v(n.t("error.connectionFailed")), 1),
6816
- o("div", so, v(n.error), 1)
6842
+ o("div", ro, v(n.t("error.connectionFailed")), 1),
6843
+ o("div", io, v(n.error), 1)
6817
6844
  ])
6818
6845
  ])
6819
- ])) : !n.currentConv && a.showHistory ? (c(), D(f, {
6846
+ ])) : !n.currentConv && a.showHistory ? (c(), N(f, {
6820
6847
  key: 1,
6821
6848
  threads: n.openThreads,
6822
6849
  onResume: n.onDrawerPick
@@ -6833,11 +6860,12 @@ function vo(e, t, s, i, a, n) {
6833
6860
  "unread-boundary-ts": e.unreadBoundaryTs,
6834
6861
  "ai-agent-name": n.agentName,
6835
6862
  "ai-agent-avatar-url": n.agentAvatarUrl,
6836
- onLoadMore: n.onLoadMore
6837
- }, 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"]),
6838
- o("div", ro, [
6839
- n.floatVisible ? (c(), d("div", io, [
6840
- n.approvalReady ? (c(), D(M, {
6863
+ onLoadMore: n.onLoadMore,
6864
+ onCallback: n.onResolutionCallback
6865
+ }, 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", "onCallback"]),
6866
+ o("div", ao, [
6867
+ n.floatVisible ? (c(), d("div", oo, [
6868
+ n.approvalReady ? (c(), N(M, {
6841
6869
  key: 0,
6842
6870
  action: n.approvalTitle,
6843
6871
  detail: n.approvalDetail,
@@ -6845,33 +6873,33 @@ function vo(e, t, s, i, a, n) {
6845
6873
  "agent-name": n.agentName,
6846
6874
  "agent-avatar-url": n.agentAvatarUrl,
6847
6875
  onCallback: n.onApprovalCallback
6848
- }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingForm ? (c(), D(E, {
6876
+ }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingForm ? (c(), N(B, {
6849
6877
  key: n.pendingForm.message && n.pendingForm.message.id,
6850
6878
  form: n.pendingForm.form,
6851
6879
  "agent-name": n.agentName,
6852
6880
  "agent-avatar-url": n.agentAvatarUrl,
6853
6881
  onSubmit: n.onFormSubmit
6854
- }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), D(A, {
6882
+ }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), N(A, {
6855
6883
  key: 2,
6856
6884
  busy: a.feedbackBusy,
6857
6885
  done: a.feedbackDone,
6858
6886
  onSubmit: n.onFeedback
6859
- }, null, 8, ["busy", "done", "onSubmit"])) : (c(), D(q, {
6887
+ }, null, 8, ["busy", "done", "onSubmit"])) : (c(), N(q, {
6860
6888
  key: 3,
6861
6889
  items: n.suggestions,
6862
6890
  onSelect: n.onSuggestion
6863
6891
  }, null, 8, ["items", "onSelect"]))
6864
6892
  ], 512)) : b("", !0),
6865
- n.actionInFlight ? (c(), d("div", ao, [
6893
+ n.actionInFlight ? (c(), d("div", lo, [
6866
6894
  t[11] || (t[11] = o("span", {
6867
6895
  class: "wm-actionWait__spinner",
6868
6896
  "aria-hidden": "true"
6869
6897
  }, null, -1)),
6870
- o("span", oo, v(n.t("action.inProgress", {
6898
+ o("span", co, v(n.t("action.inProgress", {
6871
6899
  name: n.actionInFlightName
6872
6900
  })), 1)
6873
6901
  ])) : b("", !0),
6874
- a.pendingAttachments.length ? (c(), d("div", lo, [
6902
+ a.pendingAttachments.length ? (c(), d("div", uo, [
6875
6903
  (c(!0), d(I, null, j(a.pendingAttachments, (L, W) => (c(), d("div", {
6876
6904
  key: L.path || W,
6877
6905
  class: "wm-attached__item"
@@ -6881,7 +6909,7 @@ function vo(e, t, s, i, a, n) {
6881
6909
  class: "wm-attached__thumb",
6882
6910
  src: L.previewUrl,
6883
6911
  alt: L.name
6884
- }, null, 8, co)) : (c(), d("div", uo, [
6912
+ }, null, 8, ho)) : (c(), d("div", mo, [
6885
6913
  t[12] || (t[12] = o("span", { class: "wm-attached__fileIcon" }, [
6886
6914
  o("svg", {
6887
6915
  width: "16",
@@ -6898,9 +6926,9 @@ function vo(e, t, s, i, a, n) {
6898
6926
  o("path", { d: "M14 2v6h6" })
6899
6927
  ])
6900
6928
  ], -1)),
6901
- o("span", ho, [
6902
- o("span", mo, v(L.name), 1),
6903
- n.formatAttachmentSize(L.size_bytes) ? (c(), d("span", fo, v(n.formatAttachmentSize(
6929
+ o("span", fo, [
6930
+ o("span", _o, v(L.name), 1),
6931
+ n.formatAttachmentSize(L.size_bytes) ? (c(), d("span", go, v(n.formatAttachmentSize(
6904
6932
  L.size_bytes
6905
6933
  )), 1)) : b("", !0)
6906
6934
  ])
@@ -6924,17 +6952,17 @@ function vo(e, t, s, i, a, n) {
6924
6952
  }, [
6925
6953
  o("path", { d: "M18 6L6 18M6 6l12 12" })
6926
6954
  ], -1)
6927
- ])], 8, _o)
6955
+ ])], 8, po)
6928
6956
  ]))), 128))
6929
6957
  ])) : b("", !0),
6930
- n.endedBlockVisible ? (c(), d("div", go, [
6931
- o("span", po, v(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
6958
+ n.endedBlockVisible ? (c(), d("div", vo, [
6959
+ o("span", yo, v(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
6932
6960
  o("button", {
6933
6961
  type: "button",
6934
6962
  class: "wm-ended__btn",
6935
6963
  onClick: t[2] || (t[2] = (L) => n.isClosed ? n.onReopen() : n.startConv())
6936
6964
  }, v(n.isClosed ? n.t("composer.reopen") : n.t("composer.newConversation")), 1)
6937
- ])) : n.actionInFlight ? b("", !0) : (c(), D(T, {
6965
+ ])) : n.actionInFlight ? b("", !0) : (c(), N(T, {
6938
6966
  key: 4,
6939
6967
  ref: "composer",
6940
6968
  modelValue: a.draft,
@@ -6947,7 +6975,7 @@ function vo(e, t, s, i, a, n) {
6947
6975
  onAttach: n.onAttach
6948
6976
  }, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "display-mode", "onSend", "onAttach"]))
6949
6977
  ]),
6950
- a.moreOpen ? (c(), D(N, {
6978
+ a.moreOpen ? (c(), N(U, {
6951
6979
  key: 0,
6952
6980
  "can-rename": !!n.currentConv && !n.currentConv._draft,
6953
6981
  "can-export": !!n.currentConv && !n.currentConv._draft,
@@ -6958,14 +6986,14 @@ function vo(e, t, s, i, a, n) {
6958
6986
  onSoundToggle: e.onSoundToggle,
6959
6987
  onAction: n.onMoreAction
6960
6988
  }, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0),
6961
- a.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), D(U, {
6989
+ a.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), N(E, {
6962
6990
  key: 1,
6963
6991
  "initial-value": n.currentConv.name || "",
6964
6992
  title: n.t("rename.dialogTitle"),
6965
6993
  onClose: t[5] || (t[5] = (L) => a.renameDialogOpen = !1),
6966
6994
  onSubmit: n.onRenameSubmit
6967
6995
  }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0)
6968
- ], 64)) : (c(), D(k, {
6996
+ ], 64)) : (c(), N(k, {
6969
6997
  key: 2,
6970
6998
  title: n.widgetTitle,
6971
6999
  subtitle: n.widgetSubtitle,
@@ -6979,7 +7007,7 @@ function vo(e, t, s, i, a, n) {
6979
7007
  onResume: n.onDrawerPick,
6980
7008
  onViewHistory: t[1] || (t[1] = (L) => a.showHistory = !0)
6981
7009
  }, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
6982
- a.moreOpen && !n.currentConv ? (c(), D(N, {
7010
+ a.moreOpen && !n.currentConv ? (c(), N(U, {
6983
7011
  key: 4,
6984
7012
  "can-rename": !1,
6985
7013
  "can-export": !1,
@@ -6994,53 +7022,53 @@ function vo(e, t, s, i, a, n) {
6994
7022
  ], 6)) : b("", !0)
6995
7023
  ], 6);
6996
7024
  }
6997
- const bo = /* @__PURE__ */ P(Xa, [["render", vo], ["__scopeId", "data-v-87556b84"]]), ko = "0.5.79";
7025
+ const Co = /* @__PURE__ */ D(Za, [["render", wo], ["__scopeId", "data-v-462e05ad"]]), Ao = "0.5.80";
6998
7026
  export {
6999
7027
  oe as AIAvatar,
7000
7028
  be as AVATAR_COLORS,
7001
7029
  As as ActionResult,
7002
- Ni as ApprovalCard,
7003
- Es as ArtifactFormResponse,
7030
+ ji as ApprovalCard,
7031
+ Bs as ArtifactFormResponse,
7004
7032
  Ws as ArtifactInfoCard,
7005
7033
  ur as ArtifactRenderer,
7006
7034
  or as ArtifactTicket,
7007
7035
  Cr as AttachmentPreview,
7008
7036
  Mr as Bubble,
7009
- Ci as Composer,
7037
+ Si as Composer,
7010
7038
  it as DEFAULT_BASE_URL,
7011
7039
  ue as DEFAULT_LANGUAGE,
7012
- Aa as Feedback,
7013
- da as FormCard,
7040
+ Ta as Feedback,
7041
+ ha as FormCard,
7014
7042
  _n as Header,
7015
7043
  ve as HumanAvatar,
7016
7044
  qt as Launcher,
7017
7045
  Oe as MEDIA_RECORDER_SUPPORTED,
7018
- ri as MessageList,
7019
- bo as Messenger,
7020
- Ua as MoreMenu,
7046
+ ai as MessageList,
7047
+ Co as Messenger,
7048
+ Fa as MoreMenu,
7021
7049
  Jn as Onboarding,
7022
7050
  pe as SCREEN_CAPTURE_SUPPORTED,
7023
7051
  ut as SUPPORTED_LANGUAGES,
7024
- Mi as SuggestionChips,
7052
+ Oi as SuggestionChips,
7025
7053
  tn as TeamAvatars,
7026
7054
  Lr as Typing,
7027
- ko as VERSION,
7055
+ Ao as VERSION,
7028
7056
  Te as avatarColor,
7029
7057
  Me as avatarInitials,
7030
- ai as captureScreenshotFile,
7058
+ li as captureScreenshotFile,
7031
7059
  H as colors,
7032
7060
  st as createStore,
7033
7061
  F as createTranslator,
7034
7062
  Ze as createTransport,
7035
7063
  ne as dateLocale,
7036
- bo as default,
7064
+ Co as default,
7037
7065
  Ce as formatTime,
7038
- wo as guessAttachmentKind,
7039
- ii as pickRecorderMime,
7066
+ ko as guessAttachmentKind,
7067
+ oi as pickRecorderMime,
7040
7068
  qe as renderInlineMarkdown,
7041
7069
  ft as renderMarkdown,
7042
7070
  xe as resolveLanguage,
7043
- li as startScreenRecording,
7071
+ di as startScreenRecording,
7044
7072
  rt as tokensCss,
7045
7073
  nt as uuid,
7046
7074
  nt as v4