@_solaris/messenger-widget 0.4.2 → 0.4.4

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,13 +1,13 @@
1
- import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as W, normalizeClass as x, toDisplayString as v, resolveComponent as I, createVNode as z, Transition as je, withCtx as Pe, Fragment as L, renderList as j, withKeys as ue, withModifiers as X, createElementVNode as o, createCommentVNode as b, createBlock as R, withDirectives as V, vModelText as Z, createTextVNode as pe, resolveDynamicComponent as De, renderSlot as Ue, vModelCheckbox as $e, vModelSelect as He, markRaw as ye } from "vue";
2
- const ze = [
1
+ import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as K, normalizeClass as x, toDisplayString as v, resolveComponent as I, createVNode as q, Transition as je, withCtx as Pe, Fragment as L, renderList as j, withKeys as ue, withModifiers as X, createElementVNode as o, createCommentVNode as b, createBlock as R, withDirectives as V, vModelText as ee, createTextVNode as pe, resolveDynamicComponent as De, renderSlot as Ue, vModelCheckbox as $e, vModelSelect as He, markRaw as ye } from "vue";
2
+ const qe = [
3
3
  "connected",
4
4
  "message",
5
5
  "message_stream",
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], be = "/client", qe = 5 * 60 * 1e3, Ve = 10 * 60 * 1e3, We = 5 * 60 * 1e3;
10
- function Ke(e) {
9
+ ], be = "/client", ze = 5 * 60 * 1e3, Ve = 10 * 60 * 1e3, Ke = 5 * 60 * 1e3;
10
+ function We(e) {
11
11
  const t = {
12
12
  baseUrl: Ge(e.baseUrl || ""),
13
13
  widgetId: e.widgetId || "",
@@ -112,7 +112,7 @@ function Ke(e) {
112
112
  const d = await a("GET", "/conversations");
113
113
  return (d == null ? void 0 : d.conversations) ?? [];
114
114
  }
115
- async function B(d = {}) {
115
+ async function E(d = {}) {
116
116
  return (await a("POST", "/conversations", d)).conversation;
117
117
  }
118
118
  async function A(d) {
@@ -145,7 +145,7 @@ function Ke(e) {
145
145
  );
146
146
  }
147
147
  async function N(d, f) {
148
- q();
148
+ z();
149
149
  const _ = {
150
150
  client_msg_id: f.client_msg_id,
151
151
  type: "content",
@@ -160,13 +160,13 @@ function Ke(e) {
160
160
  );
161
161
  }
162
162
  async function $(d, f, _) {
163
- return q(), a(
163
+ return z(), a(
164
164
  "POST",
165
165
  `/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
166
166
  _ ? { inputs: _ } : {}
167
167
  );
168
168
  }
169
- async function K(d) {
169
+ async function W(d) {
170
170
  const f = (
171
171
  /** @type {File} */
172
172
  d.name || "attachment"
@@ -191,13 +191,13 @@ function Ke(e) {
191
191
  size_bytes: y
192
192
  };
193
193
  }
194
- async function ee(d) {
194
+ async function te(d) {
195
195
  return a(
196
196
  "GET",
197
197
  `/attachments/sign?path=${encodeURIComponent(d)}`
198
198
  );
199
199
  }
200
- function te() {
200
+ function ne() {
201
201
  const d = new URLSearchParams({
202
202
  userId: t.userId,
203
203
  userHash: t.userHash,
@@ -208,8 +208,8 @@ function Ke(e) {
208
208
  function G() {
209
209
  if (!t.eventSource && !(typeof document < "u" && document.hidden))
210
210
  try {
211
- const d = new EventSource(te());
212
- for (const f of ze)
211
+ const d = new EventSource(ne());
212
+ for (const f of qe)
213
213
  d.addEventListener(f, (_) => Y(f, _.data));
214
214
  d.addEventListener(
215
215
  "error",
@@ -230,13 +230,13 @@ function Ke(e) {
230
230
  function Q() {
231
231
  t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
232
232
  }
233
- function q() {
233
+ function z() {
234
234
  clearTimeout(t.burstTimer), G(), t.panelOpen || (t.burstTimer = setTimeout(() => {
235
235
  t.panelOpen || Q();
236
236
  }, Ve));
237
237
  }
238
238
  function me(d) {
239
- t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), G()) : q();
239
+ t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), G()) : z();
240
240
  }
241
241
  async function ce() {
242
242
  try {
@@ -244,22 +244,22 @@ function Ke(e) {
244
244
  const S = w == null ? void 0 : w.last_message_at;
245
245
  return S && (!y || S > y) ? S : y;
246
246
  }, null);
247
- f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), q());
247
+ f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), z());
248
248
  } catch (d) {
249
249
  console.error("[transport] poll failed", d);
250
250
  }
251
251
  }
252
252
  function de() {
253
- ne(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(ce, qe));
253
+ se(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(ce, ze));
254
254
  }
255
- function ne() {
255
+ function se() {
256
256
  t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
257
257
  }
258
258
  function h() {
259
259
  if (document.hidden)
260
260
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
261
- t.hiddenGraceTimer = null, document.hidden && (ne(), Q(), r("paused"));
262
- }, We);
261
+ t.hiddenGraceTimer = null, document.hidden && (se(), Q(), r("paused"));
262
+ }, Ke);
263
263
  else {
264
264
  if (t.hiddenGraceTimer) {
265
265
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
@@ -288,7 +288,7 @@ function Ke(e) {
288
288
  )), de(), d;
289
289
  }
290
290
  function p() {
291
- ne(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, Q(), t.visibilityHandler && (document.removeEventListener(
291
+ se(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, Q(), t.visibilityHandler && (document.removeEventListener(
292
292
  "visibilitychange",
293
293
  t.visibilityHandler
294
294
  ), t.visibilityHandler = null), t.started = !1;
@@ -303,15 +303,15 @@ function Ke(e) {
303
303
  getCustomer: C,
304
304
  patchCustomer: k,
305
305
  listConversations: T,
306
- createConversation: B,
306
+ createConversation: E,
307
307
  getConversation: A,
308
308
  patchConversation: H,
309
309
  markConversationRead: M,
310
310
  listMessages: D,
311
311
  postMessage: N,
312
312
  postCallback: $,
313
- uploadAttachment: K,
314
- signAttachment: ee,
313
+ uploadAttachment: W,
314
+ signAttachment: te,
315
315
  // Read-only state
316
316
  get connection() {
317
317
  return t.connection;
@@ -511,7 +511,7 @@ function Xe(e) {
511
511
  const p = await e.patchConversation(h, m), d = t.conversations.findIndex((f) => f.id === h);
512
512
  d !== -1 && (t.conversations[d] = p);
513
513
  }
514
- async function B(h) {
514
+ async function E(h) {
515
515
  if (!h) return [];
516
516
  const m = t.messagesByConv[h] || [];
517
517
  let p = "";
@@ -552,7 +552,7 @@ function Xe(e) {
552
552
  var F;
553
553
  const f = (m || "").trim(), _ = Array.isArray(p) && p.length > 0;
554
554
  if (!h || !f && !_) return;
555
- const y = Qe(), w = ne(h), S = {
555
+ const y = Qe(), w = se(h), S = {
556
556
  id: y,
557
557
  client_msg_id: y,
558
558
  conversation_id: h,
@@ -578,7 +578,7 @@ function Xe(e) {
578
578
  ...d && typeof d == "object" ? { metadata: d } : {}
579
579
  });
580
580
  } catch (O) {
581
- console.error("[store] send failed", O), q(h, y, {
581
+ console.error("[store] send failed", O), z(h, y, {
582
582
  _failed: !0,
583
583
  _pending: !1
584
584
  });
@@ -623,7 +623,7 @@ function Xe(e) {
623
623
  };
624
624
  await T(h, { metadata: _ });
625
625
  }
626
- function K(h) {
626
+ function W(h) {
627
627
  var p, d;
628
628
  const m = t.messagesByConv[h] || [];
629
629
  for (let f = m.length - 1; f >= 0; f--) {
@@ -633,7 +633,7 @@ function Xe(e) {
633
633
  }
634
634
  return null;
635
635
  }
636
- function ee(h) {
636
+ function te(h) {
637
637
  var p, d, f;
638
638
  const m = t.messagesByConv[h] || [];
639
639
  for (let _ = m.length - 1; _ >= 0; _--) {
@@ -646,7 +646,7 @@ function Xe(e) {
646
646
  }
647
647
  return null;
648
648
  }
649
- function te(h) {
649
+ function ne(h) {
650
650
  const m = t.runningActionsByConv[h];
651
651
  if (!m) return null;
652
652
  const p = Object.keys(m);
@@ -698,7 +698,7 @@ function Xe(e) {
698
698
  function Q(h, m) {
699
699
  return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
700
700
  }
701
- function q(h, m, p) {
701
+ function z(h, m, p) {
702
702
  const d = t.messagesByConv[h];
703
703
  if (!d) return;
704
704
  const f = d.findIndex((y) => y.id === m);
@@ -727,7 +727,7 @@ function Xe(e) {
727
727
  f !== void 0 && (d === "name" || d === "email" ? f != null && String(f).trim() !== "" && (m[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(p, f) : p[d] = f);
728
728
  return Object.keys(p).length && (m.values = p), Object.keys(m).length ? m : null;
729
729
  }
730
- function ne(h) {
730
+ function se(h) {
731
731
  const m = t.messagesByConv[h] || [];
732
732
  let p = "";
733
733
  for (const _ of m)
@@ -743,17 +743,17 @@ function Xe(e) {
743
743
  createConversation: a,
744
744
  openConversation: g,
745
745
  loadMore: C,
746
- fetchSinceLast: B,
746
+ fetchSinceLast: E,
747
747
  patchConversation: T,
748
748
  markConversationRead: A,
749
749
  send: H,
750
750
  clickCallback: M,
751
751
  signAttachment: N,
752
752
  submitFeedback: $,
753
- getPendingApproval: K,
754
- getActionInFlight: te,
753
+ getPendingApproval: W,
754
+ getActionInFlight: ne,
755
755
  getLatestSuggestions: G,
756
- getLatestForm: ee,
756
+ getLatestForm: te,
757
757
  // Pass-through for panel open/close (controls SSE burst).
758
758
  setPanelOpen: e.setPanelOpen
759
759
  };
@@ -1615,7 +1615,7 @@ function gt(e) {
1615
1615
  }
1616
1616
  return null;
1617
1617
  }
1618
- const E = (e, t) => {
1618
+ const B = (e, t) => {
1619
1619
  const n = e.__vccOpts || e;
1620
1620
  for (const [i, r] of t)
1621
1621
  n[i] = r;
@@ -1644,7 +1644,7 @@ const E = (e, t) => {
1644
1644
  function bt(e, t, n, i, r, s) {
1645
1645
  return c(), u("div", {
1646
1646
  class: x(["wm-huav", { "wm-huav--tail": n.tail }]),
1647
- style: W({
1647
+ style: K({
1648
1648
  width: n.size + "px",
1649
1649
  height: n.size + "px",
1650
1650
  "--wm-avr": Math.round(n.size * 0.32) + "px",
@@ -1657,13 +1657,13 @@ function bt(e, t, n, i, r, s) {
1657
1657
  alt: n.name || ""
1658
1658
  }, null, 8, yt)) : (c(), u("span", {
1659
1659
  key: 1,
1660
- style: W({ fontSize: n.size * 0.36 + "px" })
1660
+ style: K({ fontSize: n.size * 0.36 + "px" })
1661
1661
  }, v(s.initials), 5))
1662
1662
  ], 6);
1663
1663
  }
1664
- const Ee = /* @__PURE__ */ E(vt, [["render", bt], ["__scopeId", "data-v-14e10c0d"]]), wt = 3, kt = {
1664
+ const Be = /* @__PURE__ */ B(vt, [["render", bt], ["__scopeId", "data-v-14e10c0d"]]), wt = 3, kt = {
1665
1665
  name: "WmLauncher",
1666
- components: { HumanAvatar: Ee },
1666
+ components: { HumanAvatar: Be },
1667
1667
  inject: {
1668
1668
  // Translator shared by the Messenger shell; French fallback when
1669
1669
  // the component is used standalone.
@@ -1687,11 +1687,11 @@ const Ee = /* @__PURE__ */ E(vt, [["render", bt], ["__scopeId", "data-v-14e10c0d
1687
1687
  return this.peeks.slice(0, wt).reverse();
1688
1688
  }
1689
1689
  }
1690
- }, Ct = { class: "wm-launcherWrap" }, At = ["aria-label", "onClick", "onKeydown"], St = ["aria-label", "onClick"], Mt = { class: "wm-peek__avatar" }, Tt = ["aria-label"], xt = { class: "wm-peek__body" }, Ot = { class: "wm-peek__head" }, Lt = { class: "wm-peek__name" }, It = { class: "wm-peek__action" }, Et = { class: "wm-peek__text" }, Bt = ["onClick"], Rt = ["aria-label"], Nt = ["aria-label"];
1690
+ }, Ct = { class: "wm-launcherWrap" }, At = ["aria-label", "onClick", "onKeydown"], St = ["aria-label", "onClick"], Mt = { class: "wm-peek__avatar" }, Tt = ["aria-label"], xt = { class: "wm-peek__body" }, Ot = { class: "wm-peek__head" }, Lt = { class: "wm-peek__name" }, It = { class: "wm-peek__action" }, Bt = { class: "wm-peek__text" }, Et = ["onClick"], Rt = ["aria-label"], Nt = ["aria-label"];
1691
1691
  function Ft(e, t, n, i, r, s) {
1692
1692
  const a = I("HumanAvatar");
1693
1693
  return c(), u("div", Ct, [
1694
- z(je, { name: "wm-peek" }, {
1694
+ q(je, { name: "wm-peek" }, {
1695
1695
  default: Pe(() => [
1696
1696
  s.visiblePeeks.length ? (c(), u("div", {
1697
1697
  key: 0,
@@ -1700,7 +1700,7 @@ function Ft(e, t, n, i, r, s) {
1700
1700
  (c(!0), u(L, null, j(s.visiblePeeks, (l, g) => (c(), u("div", {
1701
1701
  key: l.convId,
1702
1702
  class: "wm-peek",
1703
- style: W({
1703
+ style: K({
1704
1704
  "--depth": s.visiblePeeks.length - 1 - g,
1705
1705
  zIndex: g + 1
1706
1706
  }),
@@ -1736,7 +1736,7 @@ function Ft(e, t, n, i, r, s) {
1736
1736
  ], -1)
1737
1737
  ])], 8, St),
1738
1738
  o("div", Mt, [
1739
- z(a, {
1739
+ q(a, {
1740
1740
  name: l.senderName,
1741
1741
  "avatar-url": l.senderAvatarUrl,
1742
1742
  size: 34
@@ -1752,13 +1752,13 @@ function Ft(e, t, n, i, r, s) {
1752
1752
  o("span", Lt, v(l.senderName || s.t("common.agent")), 1),
1753
1753
  o("span", It, v(s.t("launcher.repliedToYou")), 1)
1754
1754
  ]),
1755
- o("p", Et, v(l.preview), 1)
1755
+ o("p", Bt, v(l.preview), 1)
1756
1756
  ]),
1757
1757
  o("button", {
1758
1758
  type: "button",
1759
1759
  class: "wm-peek__open",
1760
1760
  onClick: X((C) => e.$emit("open", l.convId), ["stop"])
1761
- }, v(s.t("common.open")), 9, Bt)
1761
+ }, v(s.t("common.open")), 9, Et)
1762
1762
  ], 44, At))), 128))
1763
1763
  ], 2)) : b("", !0)
1764
1764
  ]),
@@ -1795,7 +1795,7 @@ function Ft(e, t, n, i, r, s) {
1795
1795
  ], 8, Rt)
1796
1796
  ]);
1797
1797
  }
1798
- const jt = /* @__PURE__ */ E(kt, [["render", Ft], ["__scopeId", "data-v-5193a529"]]), Pt = {
1798
+ const jt = /* @__PURE__ */ B(kt, [["render", Ft], ["__scopeId", "data-v-5193a529"]]), Pt = {
1799
1799
  name: "WmAIAvatar",
1800
1800
  props: {
1801
1801
  size: { type: Number, default: 26 },
@@ -1814,7 +1814,7 @@ const jt = /* @__PURE__ */ E(kt, [["render", Ft], ["__scopeId", "data-v-5193a529
1814
1814
  function $t(e, t, n, i, r, s) {
1815
1815
  return c(), u("div", {
1816
1816
  class: x(["wm-aiav", { "wm-aiav--tail": n.tail }]),
1817
- style: W({
1817
+ style: K({
1818
1818
  width: n.size + "px",
1819
1819
  height: n.size + "px",
1820
1820
  "--wm-avr": n.size * 0.32 + "px"
@@ -1854,7 +1854,7 @@ function $t(e, t, n, i, r, s) {
1854
1854
  ], 2)
1855
1855
  ], 6);
1856
1856
  }
1857
- const le = /* @__PURE__ */ E(Pt, [["render", $t], ["__scopeId", "data-v-d621a129"]]), Ht = {
1857
+ const le = /* @__PURE__ */ B(Pt, [["render", $t], ["__scopeId", "data-v-d621a129"]]), Ht = {
1858
1858
  name: "WmTeamAvatars",
1859
1859
  props: {
1860
1860
  members: { type: Array, default: () => [] },
@@ -1876,23 +1876,23 @@ const le = /* @__PURE__ */ E(Pt, [["render", $t], ["__scopeId", "data-v-d621a129
1876
1876
  return Oe(e.name || "");
1877
1877
  }
1878
1878
  }
1879
- }, zt = {
1879
+ }, qt = {
1880
1880
  key: 0,
1881
1881
  class: "wm-team"
1882
- }, qt = ["src", "alt"], Vt = { key: 1 }, Wt = {
1882
+ }, zt = ["src", "alt"], Vt = { key: 1 }, Kt = {
1883
1883
  key: 0,
1884
1884
  class: "wm-team__label"
1885
1885
  };
1886
- function Kt(e, t, n, i, r, s) {
1887
- return s.visible ? (c(), u("div", zt, [
1886
+ function Wt(e, t, n, i, r, s) {
1887
+ return s.visible ? (c(), u("div", qt, [
1888
1888
  o("div", {
1889
1889
  class: "wm-team__stack",
1890
- style: W({ width: s.stackWidth + "px" })
1890
+ style: K({ width: s.stackWidth + "px" })
1891
1891
  }, [
1892
1892
  (c(!0), u(L, null, j(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1893
1893
  key: l,
1894
1894
  class: "wm-team__pill",
1895
- style: W({
1895
+ style: K({
1896
1896
  left: l * 13 + "px",
1897
1897
  zIndex: 3 - l,
1898
1898
  background: s.colorFor(a)
@@ -1902,13 +1902,13 @@ function Kt(e, t, n, i, r, s) {
1902
1902
  key: 0,
1903
1903
  src: a.avatar_url,
1904
1904
  alt: a.name || ""
1905
- }, null, 8, qt)) : (c(), u("span", Vt, v(s.initialsFor(a)), 1))
1905
+ }, null, 8, zt)) : (c(), u("span", Vt, v(s.initialsFor(a)), 1))
1906
1906
  ], 4))), 128))
1907
1907
  ], 4),
1908
- n.responseLabel ? (c(), u("span", Wt, v(n.responseLabel), 1)) : b("", !0)
1908
+ n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) : b("", !0)
1909
1909
  ])) : b("", !0);
1910
1910
  }
1911
- const Gt = /* @__PURE__ */ E(Ht, [["render", Kt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
1911
+ const Gt = /* @__PURE__ */ B(Ht, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
1912
1912
  name: "WmHeader",
1913
1913
  components: { AIAvatar: le, TeamAvatars: Gt },
1914
1914
  inject: {
@@ -1978,7 +1978,7 @@ function on(e, t, n, i, r, s) {
1978
1978
  ])], 8, Xt)) : (c(), u("div", Jt)),
1979
1979
  n.showIdentity ? (c(), u(L, { key: 2 }, [
1980
1980
  o("div", Zt, [
1981
- z(a, { size: 30 })
1981
+ q(a, { size: 30 })
1982
1982
  ]),
1983
1983
  o("div", en, [
1984
1984
  o("div", tn, v(n.title), 1)
@@ -2047,8 +2047,8 @@ function on(e, t, n, i, r, s) {
2047
2047
  ])
2048
2048
  ]);
2049
2049
  }
2050
- const ln = /* @__PURE__ */ E(Yt, [["render", on], ["__scopeId", "data-v-e5ed4931"]]);
2051
- function Be(e) {
2050
+ const ln = /* @__PURE__ */ B(Yt, [["render", on], ["__scopeId", "data-v-e5ed4931"]]);
2051
+ function Ee(e) {
2052
2052
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2053
2053
  }
2054
2054
  function cn(e) {
@@ -2066,11 +2066,11 @@ function re(e) {
2066
2066
  function dn(e) {
2067
2067
  if (!e) return "";
2068
2068
  const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
2069
- return re(Be(t));
2069
+ return re(Ee(t));
2070
2070
  }
2071
2071
  function un(e) {
2072
2072
  if (!e) return "";
2073
- const t = Be(e).split(`
2073
+ const t = Ee(e).split(`
2074
2074
  `), n = [];
2075
2075
  let i = 0;
2076
2076
  for (; i < t.length; ) {
@@ -2109,10 +2109,10 @@ function un(e) {
2109
2109
  if (!A) break;
2110
2110
  k.push(A[1]), i++;
2111
2111
  }
2112
- const T = k.map((A) => `<li>${re(A)}</li>`).join(""), B = C !== 1 ? ` start="${C}"` : "";
2112
+ const T = k.map((A) => `<li>${re(A)}</li>`).join(""), E = C !== 1 ? ` start="${C}"` : "";
2113
2113
  n.push({
2114
2114
  type: "block",
2115
- html: `<ol class="wm-md-ol"${B}>${T}</ol>`
2115
+ html: `<ol class="wm-md-ol"${E}>${T}</ol>`
2116
2116
  });
2117
2117
  continue;
2118
2118
  }
@@ -2229,7 +2229,7 @@ const Se = {
2229
2229
  }, xn = {
2230
2230
  key: 1,
2231
2231
  class: "wm-onb__section"
2232
- }, On = { class: "wm-onb__section-title" }, Ln = { class: "wm-onb__search" }, In = ["placeholder", "aria-label"], En = { class: "wm-onb__list" }, Bn = ["onClick"], Rn = ["aria-label"], Nn = { class: "wm-onb__thread-body" }, Fn = { class: "wm-onb__thread-title" }, jn = ["innerHTML"], Pn = { class: "wm-onb__thread-meta" }, Dn = {
2232
+ }, On = { class: "wm-onb__section-title" }, Ln = { class: "wm-onb__search" }, In = ["placeholder", "aria-label"], Bn = { class: "wm-onb__list" }, En = ["onClick"], Rn = ["aria-label"], Nn = { class: "wm-onb__thread-body" }, Fn = { class: "wm-onb__thread-title" }, jn = ["innerHTML"], Pn = { class: "wm-onb__thread-meta" }, Dn = {
2233
2233
  key: 0,
2234
2234
  class: "wm-onb__thread-time"
2235
2235
  }, Un = {
@@ -2240,7 +2240,7 @@ function $n(e, t, n, i, r, s) {
2240
2240
  const a = I("AIAvatar");
2241
2241
  return c(), u("div", mn, [
2242
2242
  o("div", fn, [
2243
- z(a, {
2243
+ q(a, {
2244
2244
  size: 56,
2245
2245
  pulse: !0
2246
2246
  }),
@@ -2321,10 +2321,10 @@ function $n(e, t, n, i, r, s) {
2321
2321
  placeholder: s.t("onboarding.search"),
2322
2322
  "aria-label": s.t("onboarding.search")
2323
2323
  }, null, 8, In), [
2324
- [Z, r.query]
2324
+ [ee, r.query]
2325
2325
  ])
2326
2326
  ]),
2327
- o("div", En, [
2327
+ o("div", Bn, [
2328
2328
  (c(!0), u(L, null, j(s.filteredThreads, (l) => (c(), u("button", {
2329
2329
  key: l.id,
2330
2330
  type: "button",
@@ -2377,17 +2377,17 @@ function $n(e, t, n, i, r, s) {
2377
2377
  o("path", { d: "M5 12h14M13 5l7 7-7 7" })
2378
2378
  ], -1))
2379
2379
  ])
2380
- ], 8, Bn))), 128)),
2380
+ ], 8, En))), 128)),
2381
2381
  s.filteredThreads.length ? b("", !0) : (c(), u("div", Un, v(s.t("onboarding.noResults", { query: r.query })), 1))
2382
2382
  ])
2383
2383
  ])) : b("", !0)
2384
2384
  ]);
2385
2385
  }
2386
- const Hn = /* @__PURE__ */ E(hn, [["render", $n], ["__scopeId", "data-v-d0d5f5b1"]]);
2387
- function zn(e) {
2386
+ const Hn = /* @__PURE__ */ B(hn, [["render", $n], ["__scopeId", "data-v-d0d5f5b1"]]);
2387
+ function qn(e) {
2388
2388
  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();
2389
2389
  }
2390
- const qn = {
2390
+ const zn = {
2391
2391
  name: "WmActionResult",
2392
2392
  props: {
2393
2393
  state: { type: String, default: "success" },
@@ -2397,13 +2397,13 @@ const qn = {
2397
2397
  },
2398
2398
  computed: {
2399
2399
  detailText() {
2400
- return zn(this.detail);
2400
+ return qn(this.detail);
2401
2401
  }
2402
2402
  }
2403
2403
  }, Vn = {
2404
2404
  class: "wm-result__icon",
2405
2405
  "aria-hidden": "true"
2406
- }, Wn = {
2406
+ }, Kn = {
2407
2407
  key: 0,
2408
2408
  width: "11",
2409
2409
  height: "11",
@@ -2413,7 +2413,7 @@ const qn = {
2413
2413
  "stroke-width": "2.8",
2414
2414
  "stroke-linecap": "round",
2415
2415
  "stroke-linejoin": "round"
2416
- }, Kn = {
2416
+ }, Wn = {
2417
2417
  key: 1,
2418
2418
  width: "11",
2419
2419
  height: "11",
@@ -2449,9 +2449,9 @@ function Zn(e, t, n, i, r, s) {
2449
2449
  class: x(["wm-result", `wm-result--${n.state}`])
2450
2450
  }, [
2451
2451
  o("span", Vn, [
2452
- n.state === "success" ? (c(), u("svg", Wn, [...t[0] || (t[0] = [
2452
+ n.state === "success" ? (c(), u("svg", Kn, [...t[0] || (t[0] = [
2453
2453
  o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2454
- ])])) : n.state === "rejected" ? (c(), u("svg", Kn, [...t[1] || (t[1] = [
2454
+ ])])) : n.state === "rejected" ? (c(), u("svg", Wn, [...t[1] || (t[1] = [
2455
2455
  o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2456
2456
  ])])) : n.state === "awaiting" ? (c(), u("svg", Gn, [...t[2] || (t[2] = [
2457
2457
  o("circle", {
@@ -2488,7 +2488,7 @@ function Zn(e, t, n, i, r, s) {
2488
2488
  ])
2489
2489
  ], 2);
2490
2490
  }
2491
- const es = /* @__PURE__ */ E(qn, [["render", Zn], ["__scopeId", "data-v-7284acd0"]]), ts = {
2491
+ const es = /* @__PURE__ */ B(zn, [["render", Zn], ["__scopeId", "data-v-7284acd0"]]), ts = {
2492
2492
  name: "WmArtifactFormResponse",
2493
2493
  inject: {
2494
2494
  // Translator shared by the Messenger shell; French fallback when
@@ -2542,7 +2542,7 @@ function ls(e, t, n, i, r, s) {
2542
2542
  ])
2543
2543
  ]);
2544
2544
  }
2545
- const cs = /* @__PURE__ */ E(ts, [["render", ls], ["__scopeId", "data-v-713aecf1"]]), ds = {
2545
+ const cs = /* @__PURE__ */ B(ts, [["render", ls], ["__scopeId", "data-v-713aecf1"]]), ds = {
2546
2546
  name: "WmArtifactInfoCard",
2547
2547
  props: {
2548
2548
  data: { type: Object, required: !0 }
@@ -2609,7 +2609,7 @@ function ws(e, t, n, i, r, s) {
2609
2609
  ])) : b("", !0)
2610
2610
  ]);
2611
2611
  }
2612
- const ks = /* @__PURE__ */ E(ds, [["render", ws], ["__scopeId", "data-v-7eae0e4a"]]);
2612
+ const ks = /* @__PURE__ */ B(ds, [["render", ws], ["__scopeId", "data-v-7eae0e4a"]]);
2613
2613
  function Cs(e, t, n) {
2614
2614
  if (!e) return "";
2615
2615
  const i = new Date(e);
@@ -2676,7 +2676,7 @@ const As = {
2676
2676
  }, Is = {
2677
2677
  key: 0,
2678
2678
  class: "wm-art__body"
2679
- }, Es = { class: "wm-art__fieldLabel" }, Bs = ["data-level"], Rs = {
2679
+ }, Bs = { class: "wm-art__fieldLabel" }, Es = ["data-level"], Rs = {
2680
2680
  key: 1,
2681
2681
  class: "wm-tk__date",
2682
2682
  width: "12",
@@ -2735,7 +2735,7 @@ function Fs(e, t, n, i, r, s) {
2735
2735
  key: l,
2736
2736
  class: "wm-art__field"
2737
2737
  }, [
2738
- o("div", Es, v(a.label), 1),
2738
+ o("div", Bs, v(a.label), 1),
2739
2739
  o("div", {
2740
2740
  class: x([
2741
2741
  "wm-art__fieldValue",
@@ -2772,7 +2772,7 @@ function Fs(e, t, n, i, r, s) {
2772
2772
  height: "9",
2773
2773
  rx: "0.5"
2774
2774
  }, null, -1)
2775
- ])], 8, Bs)) : s.isDate(a.label) ? (c(), u("svg", Rs, [...t[3] || (t[3] = [
2775
+ ])], 8, Es)) : s.isDate(a.label) ? (c(), u("svg", Rs, [...t[3] || (t[3] = [
2776
2776
  o("rect", {
2777
2777
  x: "3",
2778
2778
  y: "4",
@@ -2811,7 +2811,7 @@ function Fs(e, t, n, i, r, s) {
2811
2811
  ])) : b("", !0)
2812
2812
  ]);
2813
2813
  }
2814
- const js = /* @__PURE__ */ E(As, [["render", Fs], ["__scopeId", "data-v-5f30c914"]]), Ps = {
2814
+ const js = /* @__PURE__ */ B(As, [["render", Fs], ["__scopeId", "data-v-5f30c914"]]), Ps = {
2815
2815
  form_response: cs,
2816
2816
  info_card: ks,
2817
2817
  ticket: js
@@ -2836,7 +2836,7 @@ function Us(e, t, n, i, r, s) {
2836
2836
  data: n.artifact.data
2837
2837
  }, null, 8, ["data"])) : b("", !0);
2838
2838
  }
2839
- const $s = /* @__PURE__ */ E(Ds, [["render", Us]]), Hs = {
2839
+ const $s = /* @__PURE__ */ B(Ds, [["render", Us]]), Hs = {
2840
2840
  name: "WmAttachmentPreview",
2841
2841
  inject: {
2842
2842
  signAttachmentFn: { default: null },
@@ -2900,7 +2900,7 @@ const $s = /* @__PURE__ */ E(Ds, [["render", Us]]), Hs = {
2900
2900
  this.url || e.preventDefault();
2901
2901
  }
2902
2902
  }
2903
- }, zs = ["href"], qs = ["src", "alt"], Vs = ["src"], Ws = ["src"], Ks = ["href", "download"], Gs = { class: "wm-att__main" }, Ys = { class: "wm-att__name" }, Qs = {
2903
+ }, qs = ["href"], zs = ["src", "alt"], Vs = ["src"], Ks = ["src"], Ws = ["href", "download"], Gs = { class: "wm-att__main" }, Ys = { class: "wm-att__name" }, Qs = {
2904
2904
  key: 0,
2905
2905
  class: "wm-att__meta"
2906
2906
  }, Xs = {
@@ -2923,8 +2923,8 @@ function Js(e, t, n, i, r, s) {
2923
2923
  src: r.url,
2924
2924
  alt: s.displayName,
2925
2925
  loading: "lazy"
2926
- }, null, 8, qs)
2927
- ], 8, zs)) : s.kind === "audio" && r.url ? (c(), u("audio", {
2926
+ }, null, 8, zs)
2927
+ ], 8, qs)) : s.kind === "audio" && r.url ? (c(), u("audio", {
2928
2928
  key: 1,
2929
2929
  src: r.url,
2930
2930
  controls: "",
@@ -2934,7 +2934,7 @@ function Js(e, t, n, i, r, s) {
2934
2934
  src: r.url,
2935
2935
  controls: "",
2936
2936
  preload: "metadata"
2937
- }, null, 8, Ws)) : (c(), u("a", {
2937
+ }, null, 8, Ks)) : (c(), u("a", {
2938
2938
  key: 3,
2939
2939
  class: "wm-att__file",
2940
2940
  href: r.url || "#",
@@ -2964,10 +2964,10 @@ function Js(e, t, n, i, r, s) {
2964
2964
  s.sizeLabel ? (c(), u("span", Qs, v(s.sizeLabel), 1)) : b("", !0)
2965
2965
  ]),
2966
2966
  r.loading ? (c(), u("span", Xs)) : b("", !0)
2967
- ], 8, Ks))
2967
+ ], 8, Ws))
2968
2968
  ], 2);
2969
2969
  }
2970
- const Zs = /* @__PURE__ */ E(Hs, [["render", Js], ["__scopeId", "data-v-afc7b0d3"]]), er = {
2970
+ const Zs = /* @__PURE__ */ B(Hs, [["render", Js], ["__scopeId", "data-v-afc7b0d3"]]), er = {
2971
2971
  name: "WmBubble",
2972
2972
  props: {
2973
2973
  role: { type: String, default: "ai" },
@@ -2989,7 +2989,7 @@ function nr(e, t, n, i, r, s) {
2989
2989
  ], !0)
2990
2990
  ], 2);
2991
2991
  }
2992
- const sr = /* @__PURE__ */ E(er, [["render", nr], ["__scopeId", "data-v-7ab13147"]]), rr = { name: "WmTyping" }, ir = { class: "wm-typing" };
2992
+ const sr = /* @__PURE__ */ B(er, [["render", nr], ["__scopeId", "data-v-7ab13147"]]), rr = { name: "WmTyping" }, ir = { class: "wm-typing" };
2993
2993
  function ar(e, t, n, i, r, s) {
2994
2994
  return c(), u("div", ir, [...t[0] || (t[0] = [
2995
2995
  o("span", { style: { "animation-delay": "0s" } }, null, -1),
@@ -2997,8 +2997,8 @@ function ar(e, t, n, i, r, s) {
2997
2997
  o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
2998
2998
  ])]);
2999
2999
  }
3000
- const or = /* @__PURE__ */ E(rr, [["render", ar], ["__scopeId", "data-v-df2447fd"]]);
3001
- function se(e) {
3000
+ const or = /* @__PURE__ */ B(rr, [["render", ar], ["__scopeId", "data-v-df2447fd"]]);
3001
+ function Z(e) {
3002
3002
  return e ? e.client_msg_id || e.id : "";
3003
3003
  }
3004
3004
  const lr = {
@@ -3012,7 +3012,7 @@ const lr = {
3012
3012
  name: "WmMessageList",
3013
3013
  components: {
3014
3014
  AIAvatar: le,
3015
- HumanAvatar: Ee,
3015
+ HumanAvatar: Be,
3016
3016
  Bubble: sr,
3017
3017
  Typing: or,
3018
3018
  ActionResult: es,
@@ -3079,7 +3079,7 @@ const lr = {
3079
3079
  if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
3080
3080
  const k = e[e.length - 1];
3081
3081
  k && k.role === "ai" ? k.messages.push(a) : e.push({
3082
- key: `g-${se(a)}`,
3082
+ key: `g-${Z(a)}`,
3083
3083
  role: "ai",
3084
3084
  agentName: "",
3085
3085
  agentAvatarUrl: null,
@@ -3089,7 +3089,7 @@ const lr = {
3089
3089
  continue;
3090
3090
  }
3091
3091
  e.push({
3092
- key: `sys-${se(a)}`,
3092
+ key: `sys-${Z(a)}`,
3093
3093
  role: l,
3094
3094
  messages: [a],
3095
3095
  items: [],
@@ -3099,7 +3099,7 @@ const lr = {
3099
3099
  }
3100
3100
  const g = e[e.length - 1];
3101
3101
  g && g.role === l && (l === "ai" || g.agentName === (((i = a == null ? void 0 : a.author) == null ? void 0 : i.name) || "")) ? g.messages.push(a) : e.push({
3102
- key: `g-${se(a)}`,
3102
+ key: `g-${Z(a)}`,
3103
3103
  role: l,
3104
3104
  agentName: ((r = a == null ? void 0 : a.author) == null ? void 0 : r.name) || "",
3105
3105
  agentAvatarUrl: ((s = a == null ? void 0 : a.author) == null ? void 0 : s.avatar_url) || null,
@@ -3124,6 +3124,8 @@ const lr = {
3124
3124
  }
3125
3125
  t.push(a);
3126
3126
  }
3127
+ for (const a of t)
3128
+ a.role !== "system" && (a.key = this.stableGroupKey(a.messages));
3127
3129
  return t;
3128
3130
  },
3129
3131
  // Key of the first non-user group that starts after the unread
@@ -3145,10 +3147,11 @@ const lr = {
3145
3147
  },
3146
3148
  watch: {
3147
3149
  messages: { handler: "snapshotAndRestore", deep: !0 },
3150
+ conversationId(e, t) {
3151
+ e !== t && (this._groupIdByMsgKey = null, this.silentFades = !1);
3152
+ },
3148
3153
  loadingMore(e) {
3149
- e || (this._pendingLoadMore = !1), this.silentFades = !0, clearTimeout(this._silenceTimer), e || (this._silenceTimer = setTimeout(() => {
3150
- this.silentFades = !1;
3151
- }, 250)), this.snapshotAndRestore();
3154
+ e || (this._pendingLoadMore = !1), e && (this.silentFades = !0), this.snapshotAndRestore();
3152
3155
  },
3153
3156
  streamingActive: "snapshotAndRestore"
3154
3157
  },
@@ -3157,13 +3160,37 @@ const lr = {
3157
3160
  },
3158
3161
  beforeUnmount() {
3159
3162
  var e;
3160
- (e = this._ro) == null || e.disconnect(), this._measureFrame && cancelAnimationFrame(this._measureFrame), clearTimeout(this._silenceTimer);
3163
+ (e = this._ro) == null || e.disconnect(), this._measureFrame && cancelAnimationFrame(this._measureFrame);
3161
3164
  },
3162
3165
  updated() {
3163
3166
  this.scheduleMeasure();
3164
3167
  },
3165
3168
  methods: {
3166
- messageKey: se,
3169
+ messageKey: Z,
3170
+ // Resolve a stable Vue :key for a non-system group by checking if
3171
+ // any of its messages were previously part of a group we'd already
3172
+ // assigned an id to; if so, reuse that id, otherwise mint a new
3173
+ // one. Keyed by `messageKey(m)` (client_msg_id || id) — stable
3174
+ // across the optimistic→persisted swap. Reset on conv switch by
3175
+ // the `conversationId` watcher.
3176
+ stableGroupKey(e) {
3177
+ this._groupIdByMsgKey || (this._groupIdByMsgKey = /* @__PURE__ */ new Map(), this._groupIdCounter = 0);
3178
+ const t = this._groupIdByMsgKey;
3179
+ let n = null;
3180
+ for (const i of e) {
3181
+ const r = Z(i);
3182
+ if (r && t.has(r)) {
3183
+ n = t.get(r);
3184
+ break;
3185
+ }
3186
+ }
3187
+ n == null && (n = ++this._groupIdCounter);
3188
+ for (const i of e) {
3189
+ const r = Z(i);
3190
+ r && t.set(r, n);
3191
+ }
3192
+ return `g-${n}`;
3193
+ },
3167
3194
  isAtBottom(e) {
3168
3195
  return e.scrollHeight - e.scrollTop - e.clientHeight <= cr;
3169
3196
  },
@@ -3201,12 +3228,15 @@ const lr = {
3201
3228
  let i = null;
3202
3229
  if (!t && !n) {
3203
3230
  const s = this.pickAnchor(e);
3204
- if (s != null && s.el) {
3205
- const a = e.getBoundingClientRect().top;
3206
- i = {
3207
- el: s.el,
3208
- relY: s.el.getBoundingClientRect().top - a
3209
- };
3231
+ if (s != null && s.rowKey) {
3232
+ const a = this.findRowByKey(e, s.rowKey);
3233
+ if (a) {
3234
+ const l = e.getBoundingClientRect().top;
3235
+ i = {
3236
+ rowKey: s.rowKey,
3237
+ relY: a.getBoundingClientRect().top - l
3238
+ };
3239
+ }
3210
3240
  }
3211
3241
  }
3212
3242
  const r = { forceBottom: t, wasPinned: n, anchor: i };
@@ -3217,42 +3247,52 @@ const lr = {
3217
3247
  }
3218
3248
  if (!r.anchor) return;
3219
3249
  const s = () => {
3220
- var C;
3221
- const a = r.anchor;
3222
- if (!((C = a.el) != null && C.isConnected)) return;
3223
- const g = a.el.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
3224
- Math.abs(g) > 0.5 && (e.scrollTop += g);
3250
+ const a = r.anchor, l = this.findRowByKey(e, a.rowKey);
3251
+ if (!l) return;
3252
+ const C = l.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
3253
+ Math.abs(C) > 0.5 && (e.scrollTop += C);
3225
3254
  };
3226
3255
  s(), requestAnimationFrame(() => {
3227
3256
  s(), requestAnimationFrame(s);
3228
3257
  });
3229
3258
  });
3230
3259
  },
3231
- // Pick a *stable* DOM element to use as a scroll anchor — one
3232
- // that will still be mounted after the upcoming patch and whose
3233
- // `offsetTop` moves in lockstep with content being prepended.
3260
+ // Pick a stable identifier for the topmost partially-visible row
3261
+ // to use as a scroll anchor.
3262
+ //
3263
+ // Why ROW level, not group level: when a load-more lands and the
3264
+ // prepended messages share the role of the current top group,
3265
+ // they merge INTO that group. The group's own `offsetTop` is
3266
+ // still 0 (it's still the first child of the scroller), so a
3267
+ // group-level anchor measures a zero delta and skips the
3268
+ // correction — the user, who was at the very top reading the
3269
+ // first message, suddenly sees the prepended history in its
3270
+ // place. A row-level anchor (every `.wm-list__row` carries a
3271
+ // stable `data-row-key` derived from `client_msg_id || id`)
3272
+ // captures the row's actual displacement within the new
3273
+ // content, regardless of whether a new group sits above it or
3274
+ // the existing group simply grew at the top.
3234
3275
  //
3235
- // We must skip:
3236
- // - the loader (`wm-list__loadMore`): unmounts when loading
3237
- // ends, leaving `anchor.el.isConnected === false`;
3238
- // - the history-end marker (`wm-list__historyEnd`): same story;
3239
- // - the date sep (`wm-list__sep`): it stays glued to the very
3240
- // top of the scroller regardless of prepends, so its
3241
- // `offsetTop` delta is always 0 → preservation does nothing
3242
- // and the user stays pinned to the top, which is exactly the
3243
- // bug we're trying to avoid.
3276
+ // We still skip the loader / history-end / date-sep nodes
3277
+ // implicitly because they are not `.wm-list__row`.
3244
3278
  //
3245
- // Falling back to the *first* message group (rather than the
3246
- // first one past `scrollTop`) when the user is at the very top
3247
- // is intentional: it's the most reliable anchor and its
3248
- // `offsetTop` grows by the full prepended height.
3279
+ // Falling back to the *first* row (rather than only rows past
3280
+ // `scrollTop`) when nothing matches handles the
3281
+ // very-top-of-scroll edge case the same way the old logic did.
3249
3282
  pickAnchor(e) {
3250
- const t = e.scrollTop;
3251
- let n = null;
3252
- for (const i of e.children)
3253
- if (i.classList.contains("wm-list__group") && (n || (n = i), i.offsetTop + i.offsetHeight >= t))
3254
- return { el: i, offsetTop: i.offsetTop };
3255
- return n ? { el: n, offsetTop: n.offsetTop } : null;
3283
+ const t = e.getBoundingClientRect().top, n = e.querySelectorAll(".wm-list__row[data-row-key]");
3284
+ let i = null;
3285
+ for (const r of n)
3286
+ if (i || (i = r), r.getBoundingClientRect().bottom >= t)
3287
+ return { rowKey: r.dataset.rowKey };
3288
+ return i ? { rowKey: i.dataset.rowKey } : null;
3289
+ },
3290
+ findRowByKey(e, t) {
3291
+ if (!t) return null;
3292
+ const n = typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t.replace(/["\\]/g, "\\$&");
3293
+ return e.querySelector(
3294
+ `.wm-list__row[data-row-key="${n}"]`
3295
+ );
3256
3296
  },
3257
3297
  roleOf(e) {
3258
3298
  var n, i;
@@ -3353,10 +3393,10 @@ const lr = {
3353
3393
  // adjacent à une `bubble`) : mon coin déborde le voisin et
3354
3394
  // doit garder son arrondi.
3355
3395
  cornersFor(e, t) {
3356
- var ee, te, G;
3357
- const n = e.items, i = (ee = n[t]) == null ? void 0 : ee.kind, r = (te = n[t - 1]) == null ? void 0 : te.kind, s = (G = n[t + 1]) == null ? void 0 : G.kind, a = e.role === "user", l = 14, g = 4, C = r == null ? void 0 : r.bottom, k = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, M = (Y, Q, q) => Y != null && T != null ? Y + H >= T : Q === q || Q === "card" && q === "bubble";
3358
- let D = l, N = l, $ = l, K = l;
3359
- return a ? (C && (N = g), (k || !s) && ($ = g), C && M(B, C, i == null ? void 0 : i.top) && (D = g), k && M(A, k, i == null ? void 0 : i.bottom) && (K = g)) : (C && (D = g), (k || !s) && (K = g), C && M(B, C, i == null ? void 0 : i.top) && (N = g), k && M(A, k, i == null ? void 0 : i.bottom) && ($ = g)), { tl: D, tr: N, br: $, bl: K };
3396
+ var te, ne, G;
3397
+ const n = e.items, i = (te = n[t]) == null ? void 0 : te.kind, r = (ne = n[t - 1]) == null ? void 0 : ne.kind, s = (G = n[t + 1]) == null ? void 0 : G.kind, a = e.role === "user", l = 14, g = 4, C = r == null ? void 0 : r.bottom, k = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, M = (Y, Q, z) => Y != null && T != null ? Y + H >= T : Q === z || Q === "card" && z === "bubble";
3398
+ let D = l, N = l, $ = l, W = l;
3399
+ return a ? (C && (N = g), (k || !s) && ($ = g), C && M(E, C, i == null ? void 0 : i.top) && (D = g), k && M(A, k, i == null ? void 0 : i.bottom) && (W = g)) : (C && (D = g), (k || !s) && (W = g), C && M(E, C, i == null ? void 0 : i.top) && (N = g), k && M(A, k, i == null ? void 0 : i.bottom) && ($ = g)), { tl: D, tr: N, br: $, bl: W };
3360
3400
  },
3361
3401
  // Inline style emitting the four corner CSS variables. Set on
3362
3402
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3377,7 +3417,7 @@ const lr = {
3377
3417
  rowKeyOf(e, t) {
3378
3418
  var i;
3379
3419
  const n = (i = e == null ? void 0 : e.items) == null ? void 0 : i[t];
3380
- return n ? `${se(n.message)}-${n.partKey}` : "";
3420
+ return n ? `${Z(n.message)}-${n.partKey}` : "";
3381
3421
  },
3382
3422
  // rAF-debouncé : `updated()` peut être appelé en rafale (stream,
3383
3423
  // typing, scroll), un seul flush layout par frame suffit.
@@ -3479,80 +3519,69 @@ const lr = {
3479
3519
  }
3480
3520
  }, hr = {
3481
3521
  key: 0,
3482
- class: "wm-list__initialLoad",
3483
- role: "status",
3484
- "aria-live": "polite",
3485
- "aria-busy": "true"
3486
- }, mr = {
3487
- key: 1,
3488
3522
  class: "wm-list__loadMore",
3489
3523
  role: "status",
3490
3524
  "aria-live": "polite"
3491
- }, fr = { class: "wm-list__loadMore-lbl" }, _r = {
3492
- key: 2,
3525
+ }, mr = { class: "wm-list__loadMore-lbl" }, fr = {
3526
+ key: 1,
3493
3527
  class: "wm-list__historyEnd"
3494
- }, pr = {
3495
- key: 3,
3528
+ }, _r = {
3529
+ key: 2,
3496
3530
  class: "wm-list__sep"
3497
- }, gr = { class: "wm-list__sep-label" }, vr = {
3531
+ }, pr = { class: "wm-list__sep-label" }, gr = {
3498
3532
  key: 0,
3499
3533
  class: "wm-list__sep wm-list__sep--unread"
3500
- }, yr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, br = {
3534
+ }, vr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, yr = {
3501
3535
  key: 0,
3502
3536
  class: "wm-list__sysep"
3503
- }, wr = { class: "wm-list__sysep-label" }, kr = ["data-row-key"], Cr = {
3537
+ }, br = { class: "wm-list__sysep-label" }, wr = ["data-row-key"], kr = {
3504
3538
  key: 0,
3505
3539
  class: "wm-list__avatarSlot"
3506
- }, Ar = {
3540
+ }, Cr = {
3507
3541
  key: 5,
3508
3542
  class: "wm-list__body"
3509
- }, Sr = { key: 0 }, Mr = {
3543
+ }, Ar = { key: 0 }, Sr = {
3510
3544
  key: 1,
3511
3545
  "aria-hidden": "true"
3512
- }, Tr = { key: 2 }, xr = {
3513
- key: 4,
3546
+ }, Mr = { key: 2 }, Tr = {
3547
+ key: 3,
3514
3548
  class: "wm-list__row wm-list__row--ai fade-up"
3515
- }, Or = { class: "wm-list__avatarSlot" };
3516
- function Lr(e, t, n, i, r, s) {
3517
- const a = I("AIAvatar"), l = I("HumanAvatar"), g = I("ActionResult"), C = I("ArtifactRenderer"), k = I("Bubble"), T = I("AttachmentPreview"), B = I("Typing");
3549
+ }, xr = { class: "wm-list__avatarSlot" };
3550
+ function Or(e, t, n, i, r, s) {
3551
+ const a = I("AIAvatar"), l = I("HumanAvatar"), g = I("ActionResult"), C = I("ArtifactRenderer"), k = I("Bubble"), T = I("AttachmentPreview"), E = I("Typing");
3518
3552
  return c(), u("div", {
3519
3553
  ref: "scrollEl",
3520
3554
  class: x(["wm-list", { "wm-list--silent": r.silentFades }]),
3521
3555
  onScrollPassive: t[0] || (t[0] = (...A) => s.onScroll && s.onScroll(...A))
3522
3556
  }, [
3523
- n.loadingMore && !n.messages.length ? (c(), u("div", hr, [...t[1] || (t[1] = [
3524
- o("span", {
3525
- class: "wm-list__loadMore-spinner",
3526
- "aria-hidden": "true"
3527
- }, null, -1)
3528
- ])])) : n.loadingMore ? (c(), u("div", mr, [
3529
- t[2] || (t[2] = o("span", {
3557
+ n.loadingMore ? (c(), u("div", hr, [
3558
+ t[1] || (t[1] = o("span", {
3530
3559
  class: "wm-list__loadMore-spinner",
3531
3560
  "aria-hidden": "true"
3532
3561
  }, null, -1)),
3533
- o("span", fr, v(s.t("messageList.loadingHistory")), 1)
3534
- ])) : s.historyExhausted ? (c(), u("div", _r, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
3535
- n.dateLabel ? (c(), u("div", pr, [
3536
- t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1)),
3537
- o("span", gr, v(n.dateLabel), 1),
3538
- t[4] || (t[4] = o("div", { class: "wm-list__line" }, null, -1))
3562
+ o("span", mr, v(s.t("messageList.loadingHistory")), 1)
3563
+ ])) : s.historyExhausted ? (c(), u("div", fr, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
3564
+ n.dateLabel ? (c(), u("div", _r, [
3565
+ t[2] || (t[2] = o("div", { class: "wm-list__line" }, null, -1)),
3566
+ o("span", pr, v(n.dateLabel), 1),
3567
+ t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1))
3539
3568
  ])) : b("", !0),
3540
3569
  (c(!0), u(L, null, j(s.groups, (A, H) => (c(), u(L, {
3541
3570
  key: A.key
3542
3571
  }, [
3543
- A.key === s.unreadGroupKey ? (c(), u("div", vr, [
3544
- t[5] || (t[5] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3545
- o("span", yr, v(s.t("messageList.unread")), 1),
3546
- t[6] || (t[6] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3572
+ A.key === s.unreadGroupKey ? (c(), u("div", gr, [
3573
+ t[4] || (t[4] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3574
+ o("span", vr, v(s.t("messageList.unread")), 1),
3575
+ t[5] || (t[5] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3547
3576
  ])) : b("", !0),
3548
3577
  A.role === "system" || A.items.length ? (c(), u("div", {
3549
3578
  key: 1,
3550
3579
  class: x(["wm-list__group", "wm-list__group--" + A.role])
3551
3580
  }, [
3552
- A.role === "system" ? (c(), u("div", br, [
3553
- t[7] || (t[7] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3554
- o("span", wr, v(A.systemLabel), 1),
3555
- t[8] || (t[8] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3581
+ A.role === "system" ? (c(), u("div", yr, [
3582
+ t[6] || (t[6] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3583
+ o("span", br, v(A.systemLabel), 1),
3584
+ t[7] || (t[7] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3556
3585
  ])) : (c(), u(L, { key: 1 }, [
3557
3586
  (c(!0), u(L, null, j(A.items, (M, D) => (c(), u("div", {
3558
3587
  key: `${s.messageKey(M.message)}-${M.partKey}`,
@@ -3564,9 +3593,9 @@ function Lr(e, t, n, i, r, s) {
3564
3593
  "is-failed": M.message._failed
3565
3594
  }
3566
3595
  ]]),
3567
- style: W(s.cornersStyle(A, D))
3596
+ style: K(s.cornersStyle(A, D))
3568
3597
  }, [
3569
- A.role !== "user" ? (c(), u("div", Cr, [
3598
+ A.role !== "user" ? (c(), u("div", kr, [
3570
3599
  D === A.items.length - 1 ? (c(), u(L, { key: 0 }, [
3571
3600
  A.role === "ai" ? (c(), R(a, {
3572
3601
  key: 0,
@@ -3597,7 +3626,7 @@ function Lr(e, t, n, i, r, s) {
3597
3626
  }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), R(C, {
3598
3627
  key: 4,
3599
3628
  artifact: s.artifactOf(M.message)
3600
- }, null, 8, ["artifact"])) : (c(), u("div", Ar, [
3629
+ }, null, 8, ["artifact"])) : (c(), u("div", Cr, [
3601
3630
  M.message.text_md ? (c(), R(k, {
3602
3631
  key: 0,
3603
3632
  role: A.role,
@@ -3617,31 +3646,31 @@ function Lr(e, t, n, i, r, s) {
3617
3646
  }, null, 8, ["attachment"]))), 128))
3618
3647
  ], 2)) : b("", !0)
3619
3648
  ]))
3620
- ], 14, kr))), 128)),
3649
+ ], 14, wr))), 128)),
3621
3650
  (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
3622
3651
  key: 0,
3623
3652
  class: x(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
3624
3653
  }, [
3625
- A.role !== "user" ? (c(), u("span", Sr, v(s.roleLabel(A)), 1)) : b("", !0),
3626
- A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Mr, "·")) : b("", !0),
3627
- s.lastTimeOf(A) ? (c(), u("span", Tr, v(s.lastTimeOf(A)), 1)) : b("", !0)
3654
+ A.role !== "user" ? (c(), u("span", Ar, v(s.roleLabel(A)), 1)) : b("", !0),
3655
+ A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Sr, "·")) : b("", !0),
3656
+ s.lastTimeOf(A) ? (c(), u("span", Mr, v(s.lastTimeOf(A)), 1)) : b("", !0)
3628
3657
  ], 2)) : b("", !0)
3629
3658
  ], 64))
3630
3659
  ], 2)) : b("", !0)
3631
3660
  ], 64))), 128)),
3632
- n.streamingActive ? (c(), u("div", xr, [
3633
- o("div", Or, [
3634
- z(a, {
3661
+ n.streamingActive ? (c(), u("div", Tr, [
3662
+ o("div", xr, [
3663
+ q(a, {
3635
3664
  size: 26,
3636
3665
  tail: !0
3637
3666
  })
3638
3667
  ]),
3639
- z(B)
3668
+ q(E)
3640
3669
  ])) : b("", !0)
3641
3670
  ], 34);
3642
3671
  }
3643
- const Ir = /* @__PURE__ */ E(ur, [["render", Lr], ["__scopeId", "data-v-9748afc2"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", ve = typeof window < "u" && typeof window.MediaRecorder < "u";
3644
- function Er() {
3672
+ const Lr = /* @__PURE__ */ B(ur, [["render", Or], ["__scopeId", "data-v-8b3763d3"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", ve = typeof window < "u" && typeof window.MediaRecorder < "u";
3673
+ function Ir() {
3645
3674
  return ve && [
3646
3675
  "video/webm;codecs=vp9,opus",
3647
3676
  "video/webm;codecs=vp8,opus",
@@ -3661,7 +3690,7 @@ function Re({ audio: e }) {
3661
3690
  systemAudio: e ? "include" : "exclude"
3662
3691
  };
3663
3692
  }
3664
- function $a(e) {
3693
+ function Ua(e) {
3665
3694
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
3666
3695
  }
3667
3696
  async function Br() {
@@ -3675,7 +3704,7 @@ async function Br() {
3675
3704
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
3676
3705
  }
3677
3706
  try {
3678
- return await Rr(e);
3707
+ return await Er(e);
3679
3708
  } catch (t) {
3680
3709
  return console.error("[media] screenshot capture", t), null;
3681
3710
  } finally {
@@ -3684,7 +3713,7 @@ async function Br() {
3684
3713
  });
3685
3714
  }
3686
3715
  }
3687
- async function Rr(e) {
3716
+ async function Er(e) {
3688
3717
  const t = document.createElement("video");
3689
3718
  t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
3690
3719
  const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
@@ -3697,7 +3726,7 @@ async function Rr(e) {
3697
3726
  }), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
3698
3727
  return new File([s], `capture-${a}.png`, { type: "image/png" });
3699
3728
  }
3700
- async function Nr(e = {}) {
3729
+ async function Rr(e = {}) {
3701
3730
  var C;
3702
3731
  if (!he || !ve) return null;
3703
3732
  let t;
@@ -3708,7 +3737,7 @@ async function Nr(e = {}) {
3708
3737
  } catch (k) {
3709
3738
  return (k == null ? void 0 : k.name) !== "NotAllowedError" && console.error("[media] record picker", k), null;
3710
3739
  }
3711
- const n = Er();
3740
+ const n = Ir();
3712
3741
  let i;
3713
3742
  try {
3714
3743
  i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
@@ -3723,11 +3752,11 @@ async function Nr(e = {}) {
3723
3752
  k.data && k.data.size > 0 && r.push(k.data);
3724
3753
  }), i.addEventListener("stop", () => {
3725
3754
  var k, T;
3726
- if (s && clearInterval(s), t.getTracks().forEach((B) => {
3727
- B.stop();
3755
+ if (s && clearInterval(s), t.getTracks().forEach((E) => {
3756
+ E.stop();
3728
3757
  }), r.length) {
3729
- const B = i.mimeType || n || "video/webm", A = new Blob(r, { type: B }), H = /mp4/.test(B) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), D = new File([A], `ecran-${M}.${H}`, {
3730
- type: B
3758
+ const E = i.mimeType || n || "video/webm", A = new Blob(r, { type: E }), H = /mp4/.test(E) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), D = new File([A], `ecran-${M}.${H}`, {
3759
+ type: E
3731
3760
  });
3732
3761
  (k = e.onfinalize) == null || k.call(e, D);
3733
3762
  } else
@@ -3762,7 +3791,7 @@ async function Nr(e = {}) {
3762
3791
  }
3763
3792
  };
3764
3793
  }
3765
- const Fr = [
3794
+ const Nr = [
3766
3795
  {
3767
3796
  action: "file",
3768
3797
  labelKey: "composer.attachFile",
@@ -3778,7 +3807,7 @@ const Fr = [
3778
3807
  labelKey: "composer.recordScreen",
3779
3808
  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"
3780
3809
  }
3781
- ], jr = {
3810
+ ], Fr = {
3782
3811
  name: "WmComposer",
3783
3812
  inject: {
3784
3813
  // Translator shared by the Messenger shell; French fallback when
@@ -3806,7 +3835,7 @@ const Fr = [
3806
3835
  return !this.disabled && !!this.local.trim();
3807
3836
  },
3808
3837
  attachItems() {
3809
- return Fr.map((e) => ({
3838
+ return Nr.map((e) => ({
3810
3839
  ...e,
3811
3840
  label: this.t(e.labelKey),
3812
3841
  disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !ve)
@@ -3885,7 +3914,7 @@ const Fr = [
3885
3914
  async startRecording() {
3886
3915
  if (this.recording || this.disabled) return;
3887
3916
  this.recordingElapsed = 0;
3888
- const e = await Nr({
3917
+ const e = await Rr({
3889
3918
  onstart: () => {
3890
3919
  this.recording = !0;
3891
3920
  },
@@ -3910,27 +3939,27 @@ const Fr = [
3910
3939
  }
3911
3940
  }
3912
3941
  }
3913
- }, Pr = { class: "wm-compose-wrap" }, Dr = {
3942
+ }, jr = { class: "wm-compose-wrap" }, Pr = {
3914
3943
  key: 0,
3915
3944
  class: "wm-rec"
3916
- }, Ur = { class: "wm-rec__lbl" }, $r = {
3945
+ }, Dr = { class: "wm-rec__lbl" }, Ur = {
3917
3946
  key: 1,
3918
3947
  class: "wm-compose__menu",
3919
3948
  role: "menu"
3920
- }, Hr = ["disabled", "onClick"], zr = { class: "wm-compose__menuIcon" }, qr = {
3949
+ }, $r = ["disabled", "onClick"], Hr = { class: "wm-compose__menuIcon" }, qr = {
3921
3950
  viewBox: "0 0 24 24",
3922
3951
  width: "14",
3923
3952
  height: "14",
3924
3953
  "aria-hidden": "true"
3925
- }, Vr = ["d"], Wr = ["placeholder", "disabled"], Kr = { class: "wm-compose__actions" }, Gr = ["title", "aria-label", "disabled"], Yr = ["disabled", "aria-label"];
3926
- function Qr(e, t, n, i, r, s) {
3927
- return c(), u("div", Pr, [
3928
- r.recording ? (c(), u("div", Dr, [
3954
+ }, zr = ["d"], Vr = ["placeholder", "disabled"], Kr = { class: "wm-compose__actions" }, Wr = ["title", "aria-label", "disabled"], Gr = ["disabled", "aria-label"];
3955
+ function Yr(e, t, n, i, r, s) {
3956
+ return c(), u("div", jr, [
3957
+ r.recording ? (c(), u("div", Pr, [
3929
3958
  t[8] || (t[8] = o("span", {
3930
3959
  class: "wm-rec__dot",
3931
3960
  "aria-hidden": "true"
3932
3961
  }, null, -1)),
3933
- o("span", Ur, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
3962
+ o("span", Dr, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
3934
3963
  o("button", {
3935
3964
  type: "button",
3936
3965
  class: "wm-rec__stop",
@@ -3953,7 +3982,7 @@ function Qr(e, t, n, i, r, s) {
3953
3982
  class: "wm-compose__overlay",
3954
3983
  onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
3955
3984
  })) : b("", !0),
3956
- r.attachOpen ? (c(), u("div", $r, [
3985
+ r.attachOpen ? (c(), u("div", Ur, [
3957
3986
  (c(!0), u(L, null, j(s.attachItems, (a) => (c(), u("button", {
3958
3987
  key: a.action,
3959
3988
  type: "button",
@@ -3961,7 +3990,7 @@ function Qr(e, t, n, i, r, s) {
3961
3990
  disabled: a.disabled,
3962
3991
  onClick: (l) => s.onAttachAction(a.action)
3963
3992
  }, [
3964
- o("span", zr, [
3993
+ o("span", Hr, [
3965
3994
  (c(), u("svg", qr, [
3966
3995
  o("path", {
3967
3996
  d: a.path,
@@ -3970,11 +3999,11 @@ function Qr(e, t, n, i, r, s) {
3970
3999
  "stroke-linecap": "round",
3971
4000
  "stroke-linejoin": "round",
3972
4001
  fill: "none"
3973
- }, null, 8, Vr)
4002
+ }, null, 8, zr)
3974
4003
  ]))
3975
4004
  ]),
3976
4005
  o("span", null, v(a.label), 1)
3977
- ], 8, Hr))), 128))
4006
+ ], 8, $r))), 128))
3978
4007
  ])) : b("", !0),
3979
4008
  V(o("textarea", {
3980
4009
  ref: "inputEl",
@@ -3985,8 +4014,8 @@ function Qr(e, t, n, i, r, s) {
3985
4014
  disabled: n.disabled,
3986
4015
  onKeydown: t[4] || (t[4] = (...a) => s.onKeydown && s.onKeydown(...a)),
3987
4016
  onInput: t[5] || (t[5] = (...a) => s.autosize && s.autosize(...a))
3988
- }, null, 40, Wr), [
3989
- [Z, r.local]
4017
+ }, null, 40, Vr), [
4018
+ [ee, r.local]
3990
4019
  ]),
3991
4020
  o("div", Kr, [
3992
4021
  o("button", {
@@ -4010,7 +4039,7 @@ function Qr(e, t, n, i, r, s) {
4010
4039
  }, [
4011
4040
  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" })
4012
4041
  ], -1)
4013
- ])], 10, Gr),
4042
+ ])], 10, Wr),
4014
4043
  o("button", {
4015
4044
  type: "submit",
4016
4045
  class: x(["wm-compose__send", { "is-empty": !s.canSend }]),
@@ -4030,12 +4059,12 @@ function Qr(e, t, n, i, r, s) {
4030
4059
  }, [
4031
4060
  o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4032
4061
  ], -1)
4033
- ])], 10, Yr)
4062
+ ])], 10, Gr)
4034
4063
  ])
4035
4064
  ], 34)
4036
4065
  ]);
4037
4066
  }
4038
- const Xr = /* @__PURE__ */ E(jr, [["render", Qr], ["__scopeId", "data-v-aa81dbb8"]]), Jr = {
4067
+ const Qr = /* @__PURE__ */ B(Fr, [["render", Yr], ["__scopeId", "data-v-aa81dbb8"]]), Xr = {
4039
4068
  name: "WmSuggestionChips",
4040
4069
  props: {
4041
4070
  items: { type: Array, default: () => [] },
@@ -4052,8 +4081,8 @@ const Xr = /* @__PURE__ */ E(jr, [["render", Qr], ["__scopeId", "data-v-aa81dbb8
4052
4081
  return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
4053
4082
  }
4054
4083
  }
4055
- }, Zr = ["onClick"];
4056
- function ei(e, t, n, i, r, s) {
4084
+ }, Jr = ["onClick"];
4085
+ function Zr(e, t, n, i, r, s) {
4057
4086
  return n.items.length ? (c(), u("div", {
4058
4087
  key: s.batchKey,
4059
4088
  class: "wm-chips"
@@ -4062,12 +4091,12 @@ function ei(e, t, n, i, r, s) {
4062
4091
  key: l,
4063
4092
  type: "button",
4064
4093
  class: "wm-chip",
4065
- style: W({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4094
+ style: K({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4066
4095
  onClick: (g) => e.$emit("select", a)
4067
- }, v(a.label), 13, Zr))), 128))
4096
+ }, v(a.label), 13, Jr))), 128))
4068
4097
  ])) : b("", !0);
4069
4098
  }
4070
- const ti = /* @__PURE__ */ E(Jr, [["render", ei], ["__scopeId", "data-v-47ad8085"]]), ni = {
4099
+ const ei = /* @__PURE__ */ B(Xr, [["render", Zr], ["__scopeId", "data-v-47ad8085"]]), ti = {
4071
4100
  name: "WmApprovalCard",
4072
4101
  components: { AIAvatar: le },
4073
4102
  inject: {
@@ -4109,23 +4138,23 @@ const ti = /* @__PURE__ */ E(Jr, [["render", ei], ["__scopeId", "data-v-47ad8085
4109
4138
  return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
4110
4139
  }
4111
4140
  }
4112
- }, si = { class: "wm-approval" }, ri = { class: "wm-approval__head" }, ii = { class: "wm-approval__icon" }, ai = { class: "wm-approval__main" }, oi = { class: "wm-approval__title" }, li = {
4141
+ }, ni = { class: "wm-approval" }, si = { class: "wm-approval__head" }, ri = { class: "wm-approval__icon" }, ii = { class: "wm-approval__main" }, ai = { class: "wm-approval__title" }, oi = {
4113
4142
  key: 0,
4114
4143
  class: "wm-approval__detail"
4115
- }, ci = { class: "wm-approval__actions" };
4116
- function di(e, t, n, i, r, s) {
4144
+ }, li = { class: "wm-approval__actions" };
4145
+ function ci(e, t, n, i, r, s) {
4117
4146
  const a = I("AIAvatar");
4118
- return c(), u("div", si, [
4119
- o("div", ri, [
4120
- o("div", ii, [
4121
- z(a, { size: 24 })
4147
+ return c(), u("div", ni, [
4148
+ o("div", si, [
4149
+ o("div", ri, [
4150
+ q(a, { size: 24 })
4122
4151
  ]),
4123
- o("div", ai, [
4124
- o("div", oi, v(n.action), 1),
4125
- n.detail ? (c(), u("div", li, v(n.detail), 1)) : b("", !0)
4152
+ o("div", ii, [
4153
+ o("div", ai, v(n.action), 1),
4154
+ n.detail ? (c(), u("div", oi, v(n.detail), 1)) : b("", !0)
4126
4155
  ])
4127
4156
  ]),
4128
- o("div", ci, [
4157
+ o("div", li, [
4129
4158
  s.rejectId ? (c(), u("button", {
4130
4159
  key: 0,
4131
4160
  type: "button",
@@ -4141,9 +4170,9 @@ function di(e, t, n, i, r, s) {
4141
4170
  ])
4142
4171
  ]);
4143
4172
  }
4144
- const ui = /* @__PURE__ */ E(ni, [["render", di], ["__scopeId", "data-v-53ddf2b2"]]);
4173
+ const di = /* @__PURE__ */ B(ti, [["render", ci], ["__scopeId", "data-v-53ddf2b2"]]);
4145
4174
  let Me = 0;
4146
- const hi = /* @__PURE__ */ new Set([
4175
+ const ui = /* @__PURE__ */ new Set([
4147
4176
  "text",
4148
4177
  "textarea",
4149
4178
  "number",
@@ -4151,7 +4180,7 @@ const hi = /* @__PURE__ */ new Set([
4151
4180
  "select",
4152
4181
  "multiselect",
4153
4182
  "date"
4154
- ]), mi = {
4183
+ ]), hi = {
4155
4184
  name: "WmFormCard",
4156
4185
  components: { AIAvatar: le },
4157
4186
  inject: {
@@ -4179,7 +4208,7 @@ const hi = /* @__PURE__ */ new Set([
4179
4208
  // douteux.
4180
4209
  normalizedFields() {
4181
4210
  var t;
4182
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !hi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4211
+ 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)));
4183
4212
  }
4184
4213
  },
4185
4214
  created() {
@@ -4232,43 +4261,43 @@ const hi = /* @__PURE__ */ new Set([
4232
4261
  }
4233
4262
  }
4234
4263
  }
4235
- }, fi = { class: "wm-form" }, _i = { class: "wm-form__head" }, pi = { class: "wm-form__icon" }, gi = { class: "wm-form__main" }, vi = { class: "wm-form__title" }, yi = {
4264
+ }, mi = { class: "wm-form" }, fi = { class: "wm-form__head" }, _i = { class: "wm-form__icon" }, pi = { class: "wm-form__main" }, gi = { class: "wm-form__title" }, vi = {
4236
4265
  key: 0,
4237
4266
  class: "wm-form__detail"
4238
- }, bi = ["for"], wi = {
4267
+ }, yi = ["for"], bi = {
4239
4268
  key: 0,
4240
4269
  class: "wm-form__req",
4241
4270
  "aria-hidden": "true"
4242
- }, ki = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ci = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ai = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Si = ["id", "onUpdate:modelValue", "required", "disabled"], Mi = {
4271
+ }, wi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], ki = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ci = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ai = ["id", "onUpdate:modelValue", "required", "disabled"], Si = {
4243
4272
  key: 4,
4244
4273
  class: "wm-form__bool"
4245
- }, Ti = ["id", "onUpdate:modelValue", "disabled"], xi = ["id", "onUpdate:modelValue", "required", "disabled"], Oi = {
4274
+ }, Mi = ["id", "onUpdate:modelValue", "disabled"], Ti = ["id", "onUpdate:modelValue", "required", "disabled"], xi = {
4246
4275
  value: "",
4247
4276
  disabled: ""
4248
- }, Li = ["value"], Ii = {
4277
+ }, Oi = ["value"], Li = {
4249
4278
  key: 6,
4250
4279
  class: "wm-form__multi"
4251
- }, Ei = ["value", "checked", "disabled", "onChange"], Bi = {
4280
+ }, Ii = ["value", "checked", "disabled", "onChange"], Bi = {
4252
4281
  key: 0,
4253
4282
  class: "wm-form__err"
4254
- }, Ri = ["disabled"], Ni = {
4283
+ }, Ei = ["disabled"], Ri = {
4255
4284
  key: 0,
4256
4285
  class: "wm-form__spinner",
4257
4286
  "aria-hidden": "true"
4258
- }, Fi = {
4287
+ }, Ni = {
4259
4288
  key: 2,
4260
4289
  class: "wm-form__doneLbl"
4261
4290
  };
4262
- function ji(e, t, n, i, r, s) {
4291
+ function Fi(e, t, n, i, r, s) {
4263
4292
  const a = I("AIAvatar");
4264
- return c(), u("div", fi, [
4265
- o("div", _i, [
4266
- o("div", pi, [
4267
- z(a, { size: 24 })
4293
+ return c(), u("div", mi, [
4294
+ o("div", fi, [
4295
+ o("div", _i, [
4296
+ q(a, { size: 24 })
4268
4297
  ]),
4269
- o("div", gi, [
4270
- o("div", vi, v(n.form.title || s.t("form.title")), 1),
4271
- n.form.description ? (c(), u("div", yi, v(n.form.description), 1)) : b("", !0)
4298
+ o("div", pi, [
4299
+ o("div", gi, v(n.form.title || s.t("form.title")), 1),
4300
+ n.form.description ? (c(), u("div", vi, v(n.form.description), 1)) : b("", !0)
4272
4301
  ])
4273
4302
  ]),
4274
4303
  o("form", {
@@ -4284,8 +4313,8 @@ function ji(e, t, n, i, r, s) {
4284
4313
  class: "wm-form__label"
4285
4314
  }, [
4286
4315
  pe(v(l.label), 1),
4287
- l.required ? (c(), u("span", wi, "*")) : b("", !0)
4288
- ], 8, bi),
4316
+ l.required ? (c(), u("span", bi, "*")) : b("", !0)
4317
+ ], 8, yi),
4289
4318
  l.type === "text" ? V((c(), u("input", {
4290
4319
  key: 0,
4291
4320
  id: `wm-f-${r._uid}-${l.key}`,
@@ -4295,8 +4324,8 @@ function ji(e, t, n, i, r, s) {
4295
4324
  placeholder: l.placeholder || "",
4296
4325
  required: l.required,
4297
4326
  disabled: n.readOnly || r.busy
4298
- }, null, 8, ki)), [
4299
- [Z, r.values[l.key]]
4327
+ }, null, 8, wi)), [
4328
+ [ee, r.values[l.key]]
4300
4329
  ]) : l.type === "textarea" ? V((c(), u("textarea", {
4301
4330
  key: 1,
4302
4331
  id: `wm-f-${r._uid}-${l.key}`,
@@ -4306,8 +4335,8 @@ function ji(e, t, n, i, r, s) {
4306
4335
  placeholder: l.placeholder || "",
4307
4336
  required: l.required,
4308
4337
  disabled: n.readOnly || r.busy
4309
- }, null, 8, Ci)), [
4310
- [Z, r.values[l.key]]
4338
+ }, null, 8, ki)), [
4339
+ [ee, r.values[l.key]]
4311
4340
  ]) : l.type === "number" ? V((c(), u("input", {
4312
4341
  key: 2,
4313
4342
  id: `wm-f-${r._uid}-${l.key}`,
@@ -4317,9 +4346,9 @@ function ji(e, t, n, i, r, s) {
4317
4346
  placeholder: l.placeholder || "",
4318
4347
  required: l.required,
4319
4348
  disabled: n.readOnly || r.busy
4320
- }, null, 8, Ai)), [
4349
+ }, null, 8, Ci)), [
4321
4350
  [
4322
- Z,
4351
+ ee,
4323
4352
  r.values[l.key],
4324
4353
  void 0,
4325
4354
  { number: !0 }
@@ -4332,15 +4361,15 @@ function ji(e, t, n, i, r, s) {
4332
4361
  class: "wm-form__input",
4333
4362
  required: l.required,
4334
4363
  disabled: n.readOnly || r.busy
4335
- }, null, 8, Si)), [
4336
- [Z, r.values[l.key]]
4337
- ]) : l.type === "boolean" ? (c(), u("label", Mi, [
4364
+ }, null, 8, Ai)), [
4365
+ [ee, r.values[l.key]]
4366
+ ]) : l.type === "boolean" ? (c(), u("label", Si, [
4338
4367
  V(o("input", {
4339
4368
  id: `wm-f-${r._uid}-${l.key}`,
4340
4369
  "onUpdate:modelValue": (g) => r.values[l.key] = g,
4341
4370
  type: "checkbox",
4342
4371
  disabled: n.readOnly || r.busy
4343
- }, null, 8, Ti), [
4372
+ }, null, 8, Mi), [
4344
4373
  [$e, r.values[l.key]]
4345
4374
  ]),
4346
4375
  o("span", null, v(l.placeholder || s.t("common.yes")), 1)
@@ -4352,14 +4381,14 @@ function ji(e, t, n, i, r, s) {
4352
4381
  required: l.required,
4353
4382
  disabled: n.readOnly || r.busy
4354
4383
  }, [
4355
- o("option", Oi, v(l.placeholder || s.t("form.choose")), 1),
4384
+ o("option", xi, v(l.placeholder || s.t("form.choose")), 1),
4356
4385
  (c(!0), u(L, null, j(l.options, (g) => (c(), u("option", {
4357
4386
  key: g.value,
4358
4387
  value: g.value
4359
- }, v(g.label), 9, Li))), 128))
4360
- ], 8, xi)), [
4388
+ }, v(g.label), 9, Oi))), 128))
4389
+ ], 8, Ti)), [
4361
4390
  [He, r.values[l.key]]
4362
- ]) : l.type === "multiselect" ? (c(), u("div", Ii, [
4391
+ ]) : l.type === "multiselect" ? (c(), u("div", Li, [
4363
4392
  (c(!0), u(L, null, j(l.options, (g) => (c(), u("label", {
4364
4393
  key: g.value,
4365
4394
  class: "wm-form__multiItem"
@@ -4374,25 +4403,25 @@ function ji(e, t, n, i, r, s) {
4374
4403
  g.value,
4375
4404
  C.target.checked
4376
4405
  )
4377
- }, null, 40, Ei),
4406
+ }, null, 40, Ii),
4378
4407
  o("span", null, v(g.label), 1)
4379
4408
  ]))), 128))
4380
4409
  ])) : b("", !0)
4381
4410
  ]))), 128)),
4382
4411
  r.error ? (c(), u("div", Bi, v(r.error), 1)) : b("", !0),
4383
- n.readOnly ? (c(), u("div", Fi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4412
+ n.readOnly ? (c(), u("div", Ni, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4384
4413
  key: 1,
4385
4414
  type: "submit",
4386
4415
  class: "wm-form__submit",
4387
4416
  disabled: r.busy
4388
4417
  }, [
4389
- r.busy ? (c(), u("span", Ni)) : b("", !0),
4418
+ r.busy ? (c(), u("span", Ri)) : b("", !0),
4390
4419
  o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4391
- ], 8, Ri))
4420
+ ], 8, Ei))
4392
4421
  ], 32)
4393
4422
  ]);
4394
4423
  }
4395
- const Pi = /* @__PURE__ */ E(mi, [["render", ji], ["__scopeId", "data-v-75332dad"]]), Di = {
4424
+ const ji = /* @__PURE__ */ B(hi, [["render", Fi], ["__scopeId", "data-v-75332dad"]]), Pi = {
4396
4425
  name: "WmFeedback",
4397
4426
  inject: {
4398
4427
  // Translator shared by the Messenger shell; French fallback when
@@ -4426,13 +4455,13 @@ const Pi = /* @__PURE__ */ E(mi, [["render", ji], ["__scopeId", "data-v-75332dad
4426
4455
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
4427
4456
  }
4428
4457
  }
4429
- }, Ui = { class: "wm-fb" }, $i = { class: "wm-fb__title" }, Hi = { class: "wm-fb__sub" }, zi = { class: "wm-fb__row" }, qi = ["onClick"], Vi = { class: "wm-fb__emoji" }, Wi = { class: "wm-fb__label" }, Ki = ["disabled"], Gi = {
4458
+ }, Di = { class: "wm-fb" }, Ui = { class: "wm-fb__title" }, $i = { class: "wm-fb__sub" }, Hi = { class: "wm-fb__row" }, qi = ["onClick"], zi = { class: "wm-fb__emoji" }, Vi = { class: "wm-fb__label" }, Ki = ["disabled"], Wi = {
4430
4459
  key: 1,
4431
4460
  class: "wm-fb__done"
4432
- }, Yi = { class: "wm-fb__doneTitle" }, Qi = { class: "wm-fb__doneSub" };
4433
- function Xi(e, t, n, i, r, s) {
4434
- return c(), u("div", Ui, [
4435
- n.done ? (c(), u("div", Gi, [
4461
+ }, Gi = { class: "wm-fb__doneTitle" }, Yi = { class: "wm-fb__doneSub" };
4462
+ function Qi(e, t, n, i, r, s) {
4463
+ return c(), u("div", Di, [
4464
+ n.done ? (c(), u("div", Wi, [
4436
4465
  t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
4437
4466
  o("svg", {
4438
4467
  width: "16",
@@ -4448,20 +4477,20 @@ function Xi(e, t, n, i, r, s) {
4448
4477
  o("path", { d: "M20 6L9 17l-5-5" })
4449
4478
  ])
4450
4479
  ], -1)),
4451
- o("div", Yi, v(s.t("feedback.doneTitle")), 1),
4452
- o("div", Qi, v(s.t("feedback.doneSubtitle")), 1)
4480
+ o("div", Gi, v(s.t("feedback.doneTitle")), 1),
4481
+ o("div", Yi, v(s.t("feedback.doneSubtitle")), 1)
4453
4482
  ])) : (c(), u(L, { key: 0 }, [
4454
- o("div", $i, v(s.t("feedback.question")), 1),
4455
- o("div", Hi, v(s.t("feedback.subtitle")), 1),
4456
- o("div", zi, [
4483
+ o("div", Ui, v(s.t("feedback.question")), 1),
4484
+ o("div", $i, v(s.t("feedback.subtitle")), 1),
4485
+ o("div", Hi, [
4457
4486
  (c(!0), u(L, null, j(s.options, (a) => (c(), u("button", {
4458
4487
  key: a.v,
4459
4488
  type: "button",
4460
4489
  class: x(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
4461
4490
  onClick: (l) => r.sel = a.v
4462
4491
  }, [
4463
- o("span", Vi, v(a.e), 1),
4464
- o("span", Wi, v(a.l), 1)
4492
+ o("span", zi, v(a.e), 1),
4493
+ o("span", Vi, v(a.l), 1)
4465
4494
  ], 10, qi))), 128))
4466
4495
  ]),
4467
4496
  o("button", {
@@ -4473,7 +4502,7 @@ function Xi(e, t, n, i, r, s) {
4473
4502
  ], 64))
4474
4503
  ]);
4475
4504
  }
4476
- const Ji = /* @__PURE__ */ E(Di, [["render", Xi], ["__scopeId", "data-v-9b630564"]]), Zi = {
4505
+ const Xi = /* @__PURE__ */ B(Pi, [["render", Qi], ["__scopeId", "data-v-9b630564"]]), Ji = {
4477
4506
  name: "WmMoreMenu",
4478
4507
  inject: {
4479
4508
  // Translator shared by the Messenger shell; French fallback when
@@ -4516,24 +4545,24 @@ const Ji = /* @__PURE__ */ E(Di, [["render", Xi], ["__scopeId", "data-v-9b630564
4516
4545
  this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
4517
4546
  }
4518
4547
  }
4519
- }, ea = { class: "wm-mm" }, ta = {
4548
+ }, Zi = { class: "wm-mm" }, ea = {
4520
4549
  class: "wm-mm__pop",
4521
4550
  role: "menu"
4522
- }, na = {
4551
+ }, ta = {
4523
4552
  key: 0,
4524
4553
  class: "wm-mm__section"
4525
- }, sa = { class: "wm-mm__label" }, ra = { class: "wm-mm__label" }, ia = {
4554
+ }, na = { class: "wm-mm__label" }, sa = { class: "wm-mm__label" }, ra = {
4526
4555
  key: 1,
4527
4556
  class: "wm-mm__sep"
4528
- }, aa = { class: "wm-mm__section" }, oa = { class: "wm-mm__label" }, la = { class: "wm-mm__label" }, ca = { class: "wm-mm__section" }, da = { class: "wm-mm__label" }, ua = { class: "wm-mm__label" };
4529
- function ha(e, t, n, i, r, s) {
4530
- return c(), u("div", ea, [
4557
+ }, ia = { class: "wm-mm__section" }, aa = { class: "wm-mm__label" }, oa = { class: "wm-mm__label" }, la = { class: "wm-mm__section" }, ca = { class: "wm-mm__label" }, da = { class: "wm-mm__label" };
4558
+ function ua(e, t, n, i, r, s) {
4559
+ return c(), u("div", Zi, [
4531
4560
  o("div", {
4532
4561
  class: "wm-mm__scrim",
4533
4562
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
4534
4563
  }),
4535
- o("div", ta, [
4536
- n.canRename || n.canExport ? (c(), u("div", na, [
4564
+ o("div", ea, [
4565
+ n.canRename || n.canExport ? (c(), u("div", ta, [
4537
4566
  n.canRename ? (c(), u("button", {
4538
4567
  key: 0,
4539
4568
  type: "button",
@@ -4556,7 +4585,7 @@ function ha(e, t, n, i, r, s) {
4556
4585
  o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
4557
4586
  ])
4558
4587
  ], -1)),
4559
- o("span", sa, v(s.t("moreMenu.editTitle")), 1)
4588
+ o("span", na, v(s.t("moreMenu.editTitle")), 1)
4560
4589
  ])) : b("", !0),
4561
4590
  n.canExport ? (c(), u("button", {
4562
4591
  key: 1,
@@ -4579,12 +4608,12 @@ function ha(e, t, n, i, r, s) {
4579
4608
  o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
4580
4609
  ])
4581
4610
  ], -1)),
4582
- o("span", ra, v(s.t("moreMenu.exportTranscript")), 1),
4611
+ o("span", sa, v(s.t("moreMenu.exportTranscript")), 1),
4583
4612
  t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
4584
4613
  ])) : b("", !0)
4585
4614
  ])) : b("", !0),
4586
- n.canRename || n.canExport ? (c(), u("div", ia)) : b("", !0),
4587
- o("div", aa, [
4615
+ n.canRename || n.canExport ? (c(), u("div", ra)) : b("", !0),
4616
+ o("div", ia, [
4588
4617
  o("button", {
4589
4618
  type: "button",
4590
4619
  class: "wm-mm__item",
@@ -4606,7 +4635,7 @@ function ha(e, t, n, i, r, s) {
4606
4635
  o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
4607
4636
  ])
4608
4637
  ], -1)),
4609
- o("span", oa, v(s.t("moreMenu.sound")), 1),
4638
+ o("span", aa, v(s.t("moreMenu.sound")), 1),
4610
4639
  o("span", {
4611
4640
  class: x(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
4612
4641
  }, [...t[10] || (t[10] = [
@@ -4633,7 +4662,7 @@ function ha(e, t, n, i, r, s) {
4633
4662
  o("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
4634
4663
  ])
4635
4664
  ], -1)),
4636
- o("span", la, v(s.t("moreMenu.browserNotifications")), 1),
4665
+ o("span", oa, v(s.t("moreMenu.browserNotifications")), 1),
4637
4666
  o("span", {
4638
4667
  class: x(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
4639
4668
  }, [...t[12] || (t[12] = [
@@ -4642,7 +4671,7 @@ function ha(e, t, n, i, r, s) {
4642
4671
  ])
4643
4672
  ]),
4644
4673
  t[16] || (t[16] = o("div", { class: "wm-mm__sep" }, null, -1)),
4645
- o("div", ca, [
4674
+ o("div", la, [
4646
4675
  n.statusUrl ? (c(), u("button", {
4647
4676
  key: 0,
4648
4677
  type: "button",
@@ -4664,7 +4693,7 @@ function ha(e, t, n, i, r, s) {
4664
4693
  o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
4665
4694
  ])
4666
4695
  ], -1)),
4667
- o("span", da, v(s.t("moreMenu.serviceStatus")), 1)
4696
+ o("span", ca, v(s.t("moreMenu.serviceStatus")), 1)
4668
4697
  ])) : b("", !0),
4669
4698
  n.helpUrl ? (c(), u("button", {
4670
4699
  key: 1,
@@ -4687,13 +4716,13 @@ function ha(e, t, n, i, r, s) {
4687
4716
  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" })
4688
4717
  ])
4689
4718
  ], -1)),
4690
- o("span", ua, v(s.t("moreMenu.helpCenter")), 1)
4719
+ o("span", da, v(s.t("moreMenu.helpCenter")), 1)
4691
4720
  ])) : b("", !0)
4692
4721
  ])
4693
4722
  ])
4694
4723
  ]);
4695
4724
  }
4696
- const ma = /* @__PURE__ */ E(Zi, [["render", ha], ["__scopeId", "data-v-76281e95"]]), fa = {
4725
+ const ha = /* @__PURE__ */ B(Ji, [["render", ua], ["__scopeId", "data-v-76281e95"]]), ma = {
4697
4726
  name: "WmRenameDialog",
4698
4727
  inject: {
4699
4728
  // Translator shared by the Messenger shell; French fallback when
@@ -4735,20 +4764,20 @@ const ma = /* @__PURE__ */ E(Zi, [["render", ha], ["__scopeId", "data-v-76281e95
4735
4764
  this.canSubmit && this.$emit("submit", this.value.trim());
4736
4765
  }
4737
4766
  }
4738
- }, _a = { class: "wm-dialog" }, pa = {
4767
+ }, fa = { class: "wm-dialog" }, _a = {
4739
4768
  class: "wm-dialog__card",
4740
4769
  role: "dialog",
4741
4770
  "aria-modal": "true"
4742
- }, ga = { class: "wm-dialog__head" }, va = { class: "wm-dialog__title" }, ya = ["aria-label"], ba = { class: "wm-dialog__body" }, wa = ["placeholder"], ka = { class: "wm-dialog__actions" }, Ca = ["disabled"];
4743
- function Aa(e, t, n, i, r, s) {
4744
- return c(), u("div", _a, [
4771
+ }, pa = { class: "wm-dialog__head" }, ga = { class: "wm-dialog__title" }, va = ["aria-label"], ya = { class: "wm-dialog__body" }, ba = ["placeholder"], wa = { class: "wm-dialog__actions" }, ka = ["disabled"];
4772
+ function Ca(e, t, n, i, r, s) {
4773
+ return c(), u("div", fa, [
4745
4774
  o("div", {
4746
4775
  class: "wm-dialog__scrim",
4747
4776
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
4748
4777
  }),
4749
- o("div", pa, [
4750
- o("div", ga, [
4751
- o("div", va, v(n.title || s.t("rename.title")), 1),
4778
+ o("div", _a, [
4779
+ o("div", pa, [
4780
+ o("div", ga, v(n.title || s.t("rename.title")), 1),
4752
4781
  o("button", {
4753
4782
  type: "button",
4754
4783
  class: "wm-dialog__close",
@@ -4768,9 +4797,9 @@ function Aa(e, t, n, i, r, s) {
4768
4797
  }, [
4769
4798
  o("path", { d: "M18 6L6 18M6 6l12 12" })
4770
4799
  ], -1)
4771
- ])], 8, ya)
4800
+ ])], 8, va)
4772
4801
  ]),
4773
- o("div", ba, [
4802
+ o("div", ya, [
4774
4803
  V(o("input", {
4775
4804
  ref: "input",
4776
4805
  "onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
@@ -4782,11 +4811,11 @@ function Aa(e, t, n, i, r, s) {
4782
4811
  t[3] || (t[3] = ue(X((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
4783
4812
  t[4] || (t[4] = ue(X((a) => e.$emit("close"), ["prevent"]), ["esc"]))
4784
4813
  ]
4785
- }, null, 40, wa), [
4786
- [Z, r.value]
4814
+ }, null, 40, ba), [
4815
+ [ee, r.value]
4787
4816
  ])
4788
4817
  ]),
4789
- o("div", ka, [
4818
+ o("div", wa, [
4790
4819
  o("button", {
4791
4820
  type: "button",
4792
4821
  class: "wm-dialog__btn",
@@ -4797,25 +4826,25 @@ function Aa(e, t, n, i, r, s) {
4797
4826
  class: "wm-dialog__btn wm-dialog__btn--primary",
4798
4827
  disabled: !s.canSubmit,
4799
4828
  onClick: t[6] || (t[6] = (...a) => s.onSubmit && s.onSubmit(...a))
4800
- }, v(s.t("common.save")), 9, Ca)
4829
+ }, v(s.t("common.save")), 9, ka)
4801
4830
  ])
4802
4831
  ])
4803
4832
  ]);
4804
4833
  }
4805
- const Sa = /* @__PURE__ */ E(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8"]]), Te = "ww-messenger-tokens", Ma = {
4834
+ const Aa = /* @__PURE__ */ B(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8"]]), Te = "ww-messenger-tokens", Sa = {
4806
4835
  name: "Messenger",
4807
4836
  components: {
4808
4837
  Launcher: jt,
4809
4838
  Header: ln,
4810
4839
  Onboarding: Hn,
4811
- MessageList: Ir,
4812
- Composer: Xr,
4813
- SuggestionChips: ti,
4814
- ApprovalCard: ui,
4815
- FormCard: Pi,
4816
- Feedback: Ji,
4817
- MoreMenu: ma,
4818
- RenameDialog: Sa
4840
+ MessageList: Lr,
4841
+ Composer: Qr,
4842
+ SuggestionChips: ei,
4843
+ ApprovalCard: di,
4844
+ FormCard: ji,
4845
+ Feedback: Xi,
4846
+ MoreMenu: ha,
4847
+ RenameDialog: Aa
4819
4848
  },
4820
4849
  mixins: [
4821
4850
  ot,
@@ -4982,9 +5011,9 @@ const Sa = /* @__PURE__ */ E(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
4982
5011
  const T = r[k];
4983
5012
  if (!T) continue;
4984
5013
  if (((C = T.author) == null ? void 0 : C.type) === "user") break;
4985
- const B = J(T.id);
4986
- if (B != null) {
4987
- if (s != null && B <= s) break;
5014
+ const E = J(T.id);
5015
+ if (E != null) {
5016
+ if (s != null && E <= s) break;
4988
5017
  t[T.id] !== 0 && (!l && T.author && (l = T.author), a++);
4989
5018
  }
4990
5019
  }
@@ -5382,7 +5411,7 @@ const Sa = /* @__PURE__ */ E(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5382
5411
  }
5383
5412
  try {
5384
5413
  this.transport = ye(
5385
- Ke({
5414
+ We({
5386
5415
  baseUrl: this.baseUrl,
5387
5416
  widgetId: this.widgetId,
5388
5417
  userId: this.userId,
@@ -5648,29 +5677,29 @@ const Sa = /* @__PURE__ */ E(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5648
5677
  }
5649
5678
  }
5650
5679
  }
5651
- }, Ta = {
5680
+ }, Ma = {
5652
5681
  key: 0,
5653
5682
  class: "wm-loading",
5654
5683
  "aria-busy": "true",
5655
5684
  "aria-live": "polite"
5656
- }, xa = ["aria-label"], Oa = {
5685
+ }, Ta = ["aria-label"], xa = {
5657
5686
  key: 0,
5658
5687
  class: "wm-state"
5659
- }, La = { class: "wm-state__err" }, Ia = { class: "wm-state__errTitle" }, Ea = { class: "wm-state__errSub" }, Ba = { class: "wm-bottom" }, Ra = {
5688
+ }, Oa = { class: "wm-state__err" }, La = { class: "wm-state__errTitle" }, Ia = { class: "wm-state__errSub" }, Ba = { class: "wm-bottom" }, Ea = {
5660
5689
  key: 0,
5661
5690
  ref: "floatEl",
5662
5691
  class: "wm-float"
5663
- }, Na = {
5692
+ }, Ra = {
5664
5693
  key: 1,
5665
5694
  class: "wm-actionWait",
5666
5695
  role: "status",
5667
5696
  "aria-live": "polite"
5668
- }, Fa = { class: "wm-actionWait__lbl" }, ja = {
5697
+ }, Na = { class: "wm-actionWait__lbl" }, Fa = {
5669
5698
  key: 2,
5670
5699
  class: "wm-attached"
5671
- }, Pa = ["aria-label", "onClick"];
5672
- function Da(e, t, n, i, r, s) {
5673
- const a = I("Launcher"), l = I("Header"), g = I("Onboarding"), C = I("MessageList"), k = I("ApprovalCard"), T = I("FormCard"), B = I("Feedback"), A = I("SuggestionChips"), H = I("Composer"), M = I("MoreMenu"), D = I("RenameDialog");
5700
+ }, ja = ["aria-label", "onClick"];
5701
+ function Pa(e, t, n, i, r, s) {
5702
+ const a = I("Launcher"), l = I("Header"), g = I("Onboarding"), C = I("MessageList"), k = I("ApprovalCard"), T = I("FormCard"), E = I("Feedback"), A = I("SuggestionChips"), H = I("Composer"), M = I("MoreMenu"), D = I("RenameDialog");
5674
5703
  return c(), u("div", {
5675
5704
  class: x(["wm-root", `wm-root--${n.displayMode}`])
5676
5705
  }, [
@@ -5684,11 +5713,11 @@ function Da(e, t, n, i, r, s) {
5684
5713
  r.isOpen || s.isEmbedded ? (c(), u("section", {
5685
5714
  key: 1,
5686
5715
  class: x(["wm-panel", `wm-panel--${n.displayMode}`]),
5687
- style: W(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
5716
+ style: K(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
5688
5717
  role: "dialog",
5689
5718
  "aria-label": "Messenger"
5690
5719
  }, [
5691
- !s.ready && !s.error ? (c(), u("div", Ta, [
5720
+ !s.ready && !s.error ? (c(), u("div", Ma, [
5692
5721
  s.isEmbedded ? b("", !0) : (c(), u("button", {
5693
5722
  key: 0,
5694
5723
  type: "button",
@@ -5709,13 +5738,13 @@ function Da(e, t, n, i, r, s) {
5709
5738
  }, [
5710
5739
  o("path", { d: "M18 6L6 18M6 6l12 12" })
5711
5740
  ], -1)
5712
- ])], 8, xa)),
5741
+ ])], 8, Ta)),
5713
5742
  t[6] || (t[6] = o("div", {
5714
5743
  class: "wm-loading__spinner",
5715
5744
  "aria-hidden": "true"
5716
5745
  }, null, -1))
5717
5746
  ])) : (c(), u(L, { key: 1 }, [
5718
- z(l, {
5747
+ q(l, {
5719
5748
  title: s.headerTitle,
5720
5749
  "team-members": s.teamMembers,
5721
5750
  "response-label": s.responseLabel,
@@ -5727,8 +5756,8 @@ function Da(e, t, n, i, r, s) {
5727
5756
  onMore: s.toggleMore,
5728
5757
  onClose: s.close
5729
5758
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "onBack", "onMore", "onClose"]),
5730
- s.error ? (c(), u("div", Oa, [
5731
- o("div", La, [
5759
+ s.error ? (c(), u("div", xa, [
5760
+ o("div", Oa, [
5732
5761
  t[7] || (t[7] = o("div", { class: "wm-state__errIcon" }, [
5733
5762
  o("svg", {
5734
5763
  width: "14",
@@ -5745,12 +5774,12 @@ function Da(e, t, n, i, r, s) {
5745
5774
  ])
5746
5775
  ], -1)),
5747
5776
  o("div", null, [
5748
- o("div", Ia, v(s.t("error.connectionFailed")), 1),
5749
- o("div", Ea, v(s.error), 1)
5777
+ o("div", La, v(s.t("error.connectionFailed")), 1),
5778
+ o("div", Ia, v(s.error), 1)
5750
5779
  ])
5751
5780
  ])
5752
5781
  ])) : s.currentConv ? (c(), u(L, { key: 2 }, [
5753
- z(C, {
5782
+ q(C, {
5754
5783
  ref: "messageList",
5755
5784
  messages: s.displayedMessages,
5756
5785
  "streaming-active": s.streamingActive,
@@ -5763,7 +5792,7 @@ function Da(e, t, n, i, r, s) {
5763
5792
  onLoadMore: s.onLoadMore
5764
5793
  }, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-id", "unread-boundary-ts", "onLoadMore"]),
5765
5794
  o("div", Ba, [
5766
- s.floatVisible ? (c(), u("div", Ra, [
5795
+ s.floatVisible ? (c(), u("div", Ea, [
5767
5796
  s.approvalReady ? (c(), R(k, {
5768
5797
  key: 0,
5769
5798
  action: s.approvalTitle,
@@ -5774,7 +5803,7 @@ function Da(e, t, n, i, r, s) {
5774
5803
  key: s.pendingForm.message && s.pendingForm.message.id,
5775
5804
  form: s.pendingForm.form,
5776
5805
  onSubmit: s.onFormSubmit
5777
- }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (c(), R(B, {
5806
+ }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (c(), R(E, {
5778
5807
  key: 2,
5779
5808
  busy: r.feedbackBusy,
5780
5809
  done: r.feedbackDone,
@@ -5785,12 +5814,12 @@ function Da(e, t, n, i, r, s) {
5785
5814
  onSelect: s.onSuggestion
5786
5815
  }, null, 8, ["items", "onSelect"]))
5787
5816
  ], 512)) : b("", !0),
5788
- s.actionInFlight ? (c(), u("div", Na, [
5817
+ s.actionInFlight ? (c(), u("div", Ra, [
5789
5818
  t[8] || (t[8] = o("span", {
5790
5819
  class: "wm-actionWait__spinner",
5791
5820
  "aria-hidden": "true"
5792
5821
  }, null, -1)),
5793
- o("span", Fa, v(s.t("action.inProgress", {
5822
+ o("span", Na, v(s.t("action.inProgress", {
5794
5823
  name: s.actionInFlightName
5795
5824
  })), 1)
5796
5825
  ])) : (c(), R(H, {
@@ -5825,7 +5854,7 @@ function Da(e, t, n, i, r, s) {
5825
5854
  onClose: t[3] || (t[3] = (N) => r.renameDialogOpen = !1),
5826
5855
  onSubmit: s.onRenameSubmit
5827
5856
  }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0),
5828
- r.pendingAttachments.length ? (c(), u("div", ja, [
5857
+ r.pendingAttachments.length ? (c(), u("div", Fa, [
5829
5858
  (c(!0), u(L, null, j(r.pendingAttachments, (N, $) => (c(), u("div", {
5830
5859
  key: $,
5831
5860
  class: "wm-attached__chip"
@@ -5847,7 +5876,7 @@ function Da(e, t, n, i, r, s) {
5847
5876
  o("button", {
5848
5877
  type: "button",
5849
5878
  "aria-label": s.t("attachment.remove"),
5850
- onClick: (K) => r.pendingAttachments.splice($, 1)
5879
+ onClick: (W) => r.pendingAttachments.splice($, 1)
5851
5880
  }, [...t[9] || (t[9] = [
5852
5881
  o("svg", {
5853
5882
  width: "10",
@@ -5862,7 +5891,7 @@ function Da(e, t, n, i, r, s) {
5862
5891
  }, [
5863
5892
  o("path", { d: "M18 6L6 18M6 6l12 12" })
5864
5893
  ], -1)
5865
- ])], 8, Pa)
5894
+ ])], 8, ja)
5866
5895
  ]))), 128))
5867
5896
  ])) : b("", !0)
5868
5897
  ], 64)) : (c(), R(g, {
@@ -5893,53 +5922,53 @@ function Da(e, t, n, i, r, s) {
5893
5922
  ], 6)) : b("", !0)
5894
5923
  ], 2);
5895
5924
  }
5896
- const Ha = /* @__PURE__ */ E(Ma, [["render", Da], ["__scopeId", "data-v-d9dce1ad"]]), za = "0.4.2";
5925
+ const $a = /* @__PURE__ */ B(Sa, [["render", Pa], ["__scopeId", "data-v-d9dce1ad"]]), Ha = "0.4.4";
5897
5926
  export {
5898
5927
  le as AIAvatar,
5899
5928
  fe as AVATAR_COLORS,
5900
5929
  es as ActionResult,
5901
- ui as ApprovalCard,
5930
+ di as ApprovalCard,
5902
5931
  cs as ArtifactFormResponse,
5903
5932
  ks as ArtifactInfoCard,
5904
5933
  $s as ArtifactRenderer,
5905
5934
  js as ArtifactTicket,
5906
5935
  Zs as AttachmentPreview,
5907
5936
  sr as Bubble,
5908
- Xr as Composer,
5937
+ Qr as Composer,
5909
5938
  Ze as DEFAULT_BASE_URL,
5910
5939
  ie as DEFAULT_LANGUAGE,
5911
- Ji as Feedback,
5912
- Pi as FormCard,
5940
+ Xi as Feedback,
5941
+ ji as FormCard,
5913
5942
  ln as Header,
5914
- Ee as HumanAvatar,
5943
+ Be as HumanAvatar,
5915
5944
  jt as Launcher,
5916
5945
  ve as MEDIA_RECORDER_SUPPORTED,
5917
- Ir as MessageList,
5918
- Ha as Messenger,
5919
- ma as MoreMenu,
5946
+ Lr as MessageList,
5947
+ $a as Messenger,
5948
+ ha as MoreMenu,
5920
5949
  Hn as Onboarding,
5921
5950
  he as SCREEN_CAPTURE_SUPPORTED,
5922
5951
  et as SUPPORTED_LANGUAGES,
5923
- ti as SuggestionChips,
5952
+ ei as SuggestionChips,
5924
5953
  Gt as TeamAvatars,
5925
5954
  or as Typing,
5926
- za as VERSION,
5955
+ Ha as VERSION,
5927
5956
  xe as avatarColor,
5928
5957
  Oe as avatarInitials,
5929
5958
  Br as captureScreenshotFile,
5930
5959
  U as colors,
5931
5960
  Xe as createStore,
5932
5961
  P as createTranslator,
5933
- Ke as createTransport,
5962
+ We as createTransport,
5934
5963
  oe as dateLocale,
5935
- Ha as default,
5964
+ $a as default,
5936
5965
  Le as formatTime,
5937
- $a as guessAttachmentKind,
5938
- Er as pickRecorderMime,
5966
+ Ua as guessAttachmentKind,
5967
+ Ir as pickRecorderMime,
5939
5968
  dn as renderInlineMarkdown,
5940
5969
  un as renderMarkdown,
5941
5970
  ge as resolveLanguage,
5942
- Nr as startScreenRecording,
5971
+ Rr as startScreenRecording,
5943
5972
  Je as tokensCss,
5944
5973
  Qe as uuid,
5945
5974
  Qe as v4