@_solaris/messenger-widget 0.5.63 → 0.5.65

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 Ve, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as V, Transition as Ne, withCtx as je, Fragment as I, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as o, createCommentVNode as w, createBlock as U, resolveDynamicComponent as Ae, mergeProps as Fe, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as Ke, vModelCheckbox as We, vModelSelect as Ge, markRaw as Re } from "vue";
1
+ import { reactive as Ve, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as V, Transition as Ne, withCtx as Fe, Fragment as I, renderList as F, withKeys as ge, withModifiers as J, createElementVNode as o, createCommentVNode as w, createBlock as U, resolveDynamicComponent as Ae, mergeProps as je, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as Ke, vModelCheckbox as We, vModelSelect as Ge, markRaw as Re } from "vue";
2
2
  const Ye = [
3
3
  "connected",
4
4
  "message",
@@ -1150,7 +1150,7 @@ function xe(e) {
1150
1150
  function ne(e) {
1151
1151
  return Le[xe(e)] || Le[ue];
1152
1152
  }
1153
- function F(e) {
1153
+ function j(e) {
1154
1154
  const t = xe(e), n = ke[t] || ke[ue], r = ke[ue];
1155
1155
  return function(s, i) {
1156
1156
  let l = n[s];
@@ -1168,7 +1168,7 @@ function Ie(e, t) {
1168
1168
  function He(e, t, n) {
1169
1169
  return Array.isArray(t) ? t.map((r) => Ie(e, String(r))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Ie(e, String(t));
1170
1170
  }
1171
- function ht(e, t, n = F()) {
1171
+ function ht(e, t, n = j()) {
1172
1172
  if (!e || !t) return "";
1173
1173
  const r = Array.isArray(e.fields) ? e.fields : [], a = [];
1174
1174
  for (const s of r) {
@@ -1183,7 +1183,7 @@ ${l}`);
1183
1183
 
1184
1184
  `);
1185
1185
  }
1186
- function mt(e, t, n = F()) {
1186
+ function mt(e, t, n = j()) {
1187
1187
  const r = [], a = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1188
1188
  for (const s of a) {
1189
1189
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
@@ -1342,7 +1342,7 @@ function pt(e, t, n, r) {
1342
1342
  return a.join(`
1343
1343
  `);
1344
1344
  }
1345
- function vt(e, t, n = F(), r) {
1345
+ function vt(e, t, n = j(), r) {
1346
1346
  if (!e) return;
1347
1347
  const a = pt(e, t || [], n, ne(r)), s = new Blob([a], { type: "text/plain;charset=utf-8" });
1348
1348
  try {
@@ -1857,7 +1857,7 @@ const ve = /* @__PURE__ */ P(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d
1857
1857
  inject: {
1858
1858
  // Translator shared by the Messenger shell; French fallback when
1859
1859
  // the component is used standalone.
1860
- t: { default: () => F() }
1860
+ t: { default: () => j() }
1861
1861
  },
1862
1862
  props: {
1863
1863
  // Nombre de conversations non lues — pilote la pastille.
@@ -1877,7 +1877,7 @@ const ve = /* @__PURE__ */ P(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d
1877
1877
  return this.peeks.slice(0, xt).reverse();
1878
1878
  }
1879
1879
  }
1880
- }, 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" }, Ut = { class: "wm-peek__name" }, Dt = { class: "wm-peek__action" }, Nt = { class: "wm-peek__text" }, jt = ["onClick"], Ft = ["aria-label"], Ht = ["aria-label"];
1880
+ }, 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" }, Ut = { class: "wm-peek__name" }, Dt = { class: "wm-peek__action" }, Nt = { class: "wm-peek__text" }, Ft = ["onClick"], jt = ["aria-label"], Ht = ["aria-label"];
1881
1881
  function zt(e, t, n, r, a, s) {
1882
1882
  const i = B("HumanAvatar");
1883
1883
  return c(), d("div", {
@@ -1888,12 +1888,12 @@ function zt(e, t, n, r, a, s) {
1888
1888
  onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1889
1889
  }, [
1890
1890
  V(Ne, { name: "wm-peek" }, {
1891
- default: je(() => [
1891
+ default: Fe(() => [
1892
1892
  s.visiblePeeks.length ? (c(), d("div", {
1893
1893
  key: 0,
1894
1894
  class: R(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1895
1895
  }, [
1896
- (c(!0), d(I, null, j(s.visiblePeeks, (l, g) => (c(), d("div", {
1896
+ (c(!0), d(I, null, F(s.visiblePeeks, (l, g) => (c(), d("div", {
1897
1897
  key: l.convId,
1898
1898
  class: "wm-peek",
1899
1899
  style: z({
@@ -1954,7 +1954,7 @@ function zt(e, t, n, r, a, s) {
1954
1954
  type: "button",
1955
1955
  class: "wm-peek__open",
1956
1956
  onClick: J((k) => e.$emit("open", l.convId), ["stop"])
1957
- }, v(s.t("common.open")), 9, jt)
1957
+ }, v(s.t("common.open")), 9, Ft)
1958
1958
  ], 44, Rt))), 128))
1959
1959
  ], 2)) : w("", !0)
1960
1960
  ]),
@@ -1988,7 +1988,7 @@ function zt(e, t, n, r, a, s) {
1988
1988
  count: n.unreadCount
1989
1989
  })
1990
1990
  }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Ht)) : w("", !0)
1991
- ], 8, Ft)
1991
+ ], 8, jt)
1992
1992
  ], 32);
1993
1993
  }
1994
1994
  const qt = /* @__PURE__ */ P(Ot, [["render", zt], ["__scopeId", "data-v-44ddf1a1"]]), $t = {
@@ -2117,7 +2117,7 @@ function en(e, t, n, r, a, s) {
2117
2117
  class: "wm-team__stack",
2118
2118
  style: z({ width: s.stackWidth + "px" })
2119
2119
  }, [
2120
- (c(!0), d(I, null, j(n.members.slice(0, 3), (i, l) => (c(), d("div", {
2120
+ (c(!0), d(I, null, F(n.members.slice(0, 3), (i, l) => (c(), d("div", {
2121
2121
  key: l,
2122
2122
  class: "wm-team__pill",
2123
2123
  style: z({
@@ -2142,7 +2142,7 @@ const tn = /* @__PURE__ */ P(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
2142
2142
  inject: {
2143
2143
  // Translator shared by the Messenger shell. Falls back to a French
2144
2144
  // translator when the component is used standalone (no provider).
2145
- t: { default: () => F() }
2145
+ t: { default: () => j() }
2146
2146
  },
2147
2147
  props: {
2148
2148
  title: { type: String, default: "Nouvelle conversation" },
@@ -2295,7 +2295,7 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2295
2295
  // shell. The language getter feeds `formatTs` (relative date
2296
2296
  // labels on unread alerts) ; falls back to French when the
2297
2297
  // component is used standalone.
2298
- t: { default: () => F() },
2298
+ t: { default: () => j() },
2299
2299
  wmLocale: { default: () => () => "fr" }
2300
2300
  },
2301
2301
  props: {
@@ -2415,7 +2415,7 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2415
2415
  }, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, In = {
2416
2416
  key: 0,
2417
2417
  class: "wm-onb__alert-time"
2418
- }, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Un = { class: "wm-onb__btn-label" }, Dn = ["onClick"], Nn = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], Fn = {
2418
+ }, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Un = { class: "wm-onb__btn-label" }, Dn = ["onClick"], Nn = { class: "wm-onb__btn-icon" }, Fn = ["aria-label"], jn = {
2419
2419
  key: 1,
2420
2420
  width: "18",
2421
2421
  height: "18",
@@ -2497,7 +2497,7 @@ function Yn(e, t, n, r, a, s) {
2497
2497
  ])
2498
2498
  ]),
2499
2499
  s.unreadThreads.length ? (c(), d("div", kn, [
2500
- (c(!0), d(I, null, j(s.unreadThreads, (l) => (c(), d("button", {
2500
+ (c(!0), d(I, null, F(s.unreadThreads, (l) => (c(), d("button", {
2501
2501
  key: l.id,
2502
2502
  type: "button",
2503
2503
  class: "wm-onb__alert",
@@ -2520,7 +2520,7 @@ function Yn(e, t, n, r, a, s) {
2520
2520
  }, [
2521
2521
  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" })
2522
2522
  ], -1)
2523
- ])])) : (c(), U(Ae(s.avatarComponent(l)), Fe({
2523
+ ])])) : (c(), U(Ae(s.avatarComponent(l)), je({
2524
2524
  key: 1,
2525
2525
  ref_for: !0
2526
2526
  }, s.avatarProps(l)), null, 16)),
@@ -2568,7 +2568,7 @@ function Yn(e, t, n, r, a, s) {
2568
2568
  ], -1)),
2569
2569
  o("span", Un, v(n.busy ? "…" : s.t("onboarding.start")), 1)
2570
2570
  ], 8, Pn),
2571
- (c(!0), d(I, null, j(n.quickLinks, (l, g) => (c(), d("button", {
2571
+ (c(!0), d(I, null, F(n.quickLinks, (l, g) => (c(), d("button", {
2572
2572
  key: "ql-" + g,
2573
2573
  type: "button",
2574
2574
  class: "wm-onb__btn",
@@ -2581,7 +2581,7 @@ function Yn(e, t, n, r, a, s) {
2581
2581
  style: z(s.iconUrlStyle(l)),
2582
2582
  role: "img",
2583
2583
  "aria-label": l.label || ""
2584
- }, null, 12, jn)) : (c(), d("svg", Fn, [
2584
+ }, null, 12, Fn)) : (c(), d("svg", jn, [
2585
2585
  o("path", {
2586
2586
  d: s.iconPath(l.icon)
2587
2587
  }, null, 8, Hn)
@@ -2629,7 +2629,7 @@ const Jn = /* @__PURE__ */ P(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
2629
2629
  name: "WmHistory",
2630
2630
  components: { AIAvatar: oe, HumanAvatar: ve },
2631
2631
  inject: {
2632
- t: { default: () => F() },
2632
+ t: { default: () => j() },
2633
2633
  wmLocale: { default: () => () => "fr" }
2634
2634
  },
2635
2635
  props: {
@@ -2732,7 +2732,7 @@ function us(e, t, n, r, a, s) {
2732
2732
  ])
2733
2733
  ]),
2734
2734
  o("div", ts, [
2735
- (c(!0), d(I, null, j(s.filteredThreads, (i) => (c(), d("button", {
2735
+ (c(!0), d(I, null, F(s.filteredThreads, (i) => (c(), d("button", {
2736
2736
  key: i.id,
2737
2737
  type: "button",
2738
2738
  class: R(["wm-hist__thread", { "wm-hist__thread--unread": i.unread }]),
@@ -2755,7 +2755,7 @@ function us(e, t, n, r, a, s) {
2755
2755
  }, [
2756
2756
  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" })
2757
2757
  ], -1)
2758
- ])])) : (c(), U(Ae(s.avatarComponent(i)), Fe({
2758
+ ])])) : (c(), U(Ae(s.avatarComponent(i)), je({
2759
2759
  key: 1,
2760
2760
  ref_for: !0
2761
2761
  }, s.avatarProps(i)), null, 16)),
@@ -2904,7 +2904,7 @@ const As = /* @__PURE__ */ P(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0
2904
2904
  inject: {
2905
2905
  // Translator shared by the Messenger shell; French fallback when
2906
2906
  // the component is used standalone.
2907
- t: { default: () => F() }
2907
+ t: { default: () => j() }
2908
2908
  },
2909
2909
  props: {
2910
2910
  data: { type: Object, required: !0 }
@@ -2938,7 +2938,7 @@ function Is(e, t, n, r, a, s) {
2938
2938
  ])
2939
2939
  ]),
2940
2940
  o("div", Rs, [
2941
- (c(!0), d(I, null, j(s.fields, (i, l) => (c(), d("div", {
2941
+ (c(!0), d(I, null, F(s.fields, (i, l) => (c(), d("div", {
2942
2942
  key: l,
2943
2943
  class: "wm-art__field"
2944
2944
  }, [
@@ -2971,7 +2971,7 @@ const Es = /* @__PURE__ */ P(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1
2971
2971
  }, Ps = { class: "wm-art wm-art--infoCard" }, Us = {
2972
2972
  key: 0,
2973
2973
  class: "wm-art__image"
2974
- }, Ds = ["src", "alt"], Ns = { class: "wm-art__head" }, js = { class: "wm-art__headMain" }, Fs = { class: "wm-art__title" }, Hs = {
2974
+ }, Ds = ["src", "alt"], Ns = { class: "wm-art__head" }, Fs = { class: "wm-art__headMain" }, js = { class: "wm-art__title" }, Hs = {
2975
2975
  key: 0,
2976
2976
  class: "wm-art__subtitle"
2977
2977
  }, zs = {
@@ -2991,8 +2991,8 @@ function Vs(e, t, n, r, a, s) {
2991
2991
  }, null, 8, Ds)
2992
2992
  ])) : w("", !0),
2993
2993
  o("div", Ns, [
2994
- o("div", js, [
2995
- o("div", Fs, v(n.data.title), 1),
2994
+ o("div", Fs, [
2995
+ o("div", js, v(n.data.title), 1),
2996
2996
  n.data.subtitle ? (c(), d("div", Hs, v(n.data.subtitle), 1)) : w("", !0)
2997
2997
  ]),
2998
2998
  n.data.badge && n.data.badge.label ? (c(), d("span", {
@@ -3005,7 +3005,7 @@ function Vs(e, t, n, r, a, s) {
3005
3005
  ]),
3006
3006
  s.hasBody ? (c(), d("div", zs, [
3007
3007
  n.data.body ? (c(), d("div", qs, v(n.data.body), 1)) : w("", !0),
3008
- s.fields.length ? (c(!0), d(I, { key: 1 }, j(s.fields, (i, l) => (c(), d("div", {
3008
+ s.fields.length ? (c(!0), d(I, { key: 1 }, F(s.fields, (i, l) => (c(), d("div", {
3009
3009
  key: l,
3010
3010
  class: "wm-art__field"
3011
3011
  }, [
@@ -3040,7 +3040,7 @@ const Gs = {
3040
3040
  inject: {
3041
3041
  // Translator + resolved-language getter shared by the Messenger
3042
3042
  // shell. Fall back to French wording when used standalone.
3043
- t: { default: () => F() },
3043
+ t: { default: () => j() },
3044
3044
  wmLocale: { default: () => () => "fr" }
3045
3045
  },
3046
3046
  props: {
@@ -3142,7 +3142,7 @@ function ar(e, t, n, r, a, s) {
3142
3142
  n.data.body ? (c(), d("div", er, v(n.data.body), 1)) : w("", !0)
3143
3143
  ]),
3144
3144
  s.fields.length ? (c(), d("div", tr, [
3145
- (c(!0), d(I, null, j(s.fields, (i, l) => (c(), d("div", {
3145
+ (c(!0), d(I, null, F(s.fields, (i, l) => (c(), d("div", {
3146
3146
  key: l,
3147
3147
  class: "wm-art__field"
3148
3148
  }, [
@@ -3253,7 +3253,7 @@ const ur = /* @__PURE__ */ P(cr, [["render", dr]]), hr = {
3253
3253
  signAttachmentFn: { default: null },
3254
3254
  // Translator shared by the Messenger shell; French fallback when
3255
3255
  // the component is used standalone.
3256
- t: { default: () => F() }
3256
+ t: { default: () => j() }
3257
3257
  },
3258
3258
  props: {
3259
3259
  attachment: { type: Object, required: !0 }
@@ -3348,7 +3348,8 @@ function kr(e, t, n, r, a, s) {
3348
3348
  key: 2,
3349
3349
  src: a.url,
3350
3350
  controls: "",
3351
- preload: "metadata"
3351
+ playsinline: "",
3352
+ preload: "auto"
3352
3353
  }, null, 8, gr)) : (c(), d("a", {
3353
3354
  key: 3,
3354
3355
  class: "wm-att__file",
@@ -3382,7 +3383,7 @@ function kr(e, t, n, r, a, s) {
3382
3383
  ], 8, pr))
3383
3384
  ], 2);
3384
3385
  }
3385
- const Cr = /* @__PURE__ */ P(hr, [["render", kr], ["__scopeId", "data-v-0c3d5983"]]), Ar = {
3386
+ const Cr = /* @__PURE__ */ P(hr, [["render", kr], ["__scopeId", "data-v-0d27fca6"]]), Ar = {
3386
3387
  name: "WmBubble",
3387
3388
  props: {
3388
3389
  role: { type: String, default: "ai" },
@@ -3437,7 +3438,7 @@ const Ir = {
3437
3438
  inject: {
3438
3439
  // Translator + resolved-language getter shared by the Messenger
3439
3440
  // shell. Fall back to French wording when used standalone.
3440
- t: { default: () => F() },
3441
+ t: { default: () => j() },
3441
3442
  wmLocale: { default: () => () => "fr" }
3442
3443
  },
3443
3444
  props: {
@@ -3831,6 +3832,14 @@ const Ir = {
3831
3832
  let D = l, N = l, L = l, K = l;
3832
3833
  return i ? (k && (N = g), (b || !s) && (L = g), k && M(E, k, r == null ? void 0 : r.top) && (D = g), b && M(A, b, r == null ? void 0 : r.bottom) && (K = g)) : (k && (D = g), (b || !s) && (K = g), k && M(E, k, r == null ? void 0 : r.top) && (N = g), b && M(A, b, r == null ? void 0 : r.bottom) && (L = g)), { tl: D, tr: N, br: L, bl: K };
3833
3834
  },
3835
+ // Inline column-count for the mosaic grid, capped at 4. Single
3836
+ // attachment falls back to the vertical-list layout (null). Two
3837
+ // or three attachments take their exact count ; four or more
3838
+ // wrap in a 4-column grid, so a 5th attachment lands alone on
3839
+ // the next row rather than blowing out the bubble width.
3840
+ mosaicGridStyle(e) {
3841
+ return !e || e < 2 ? null : { "grid-template-columns": `repeat(${Math.min(e, 4)}, 1fr)` };
3842
+ },
3834
3843
  // Inline style emitting the four corner CSS variables. Set on
3835
3844
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
3836
3845
  // ArtifactRenderer. Returns null for single-item clusters so
@@ -3984,10 +3993,10 @@ const Ir = {
3984
3993
  class: "wm-list__loadMore",
3985
3994
  role: "status",
3986
3995
  "aria-live": "polite"
3987
- }, Nr = { class: "wm-list__loadMore-lbl" }, jr = {
3996
+ }, Nr = { class: "wm-list__loadMore-lbl" }, Fr = {
3988
3997
  key: 1,
3989
3998
  class: "wm-list__historyEnd"
3990
- }, Fr = {
3999
+ }, jr = {
3991
4000
  key: 2,
3992
4001
  class: "wm-list__sep"
3993
4002
  }, Hr = { class: "wm-list__sep-label" }, zr = {
@@ -4023,13 +4032,13 @@ function si(e, t, n, r, a, s) {
4023
4032
  "aria-hidden": "true"
4024
4033
  }, null, -1)),
4025
4034
  o("span", Nr, v(s.t("messageList.loadingHistory")), 1)
4026
- ])) : s.historyExhausted ? (c(), d("div", jr, v(s.t("messageList.conversationStart")), 1)) : w("", !0),
4027
- n.dateLabel ? (c(), d("div", Fr, [
4035
+ ])) : s.historyExhausted ? (c(), d("div", Fr, v(s.t("messageList.conversationStart")), 1)) : w("", !0),
4036
+ n.dateLabel ? (c(), d("div", jr, [
4028
4037
  t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
4029
4038
  o("span", Hr, v(n.dateLabel), 1),
4030
4039
  t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
4031
4040
  ])) : w("", !0),
4032
- (c(!0), d(I, null, j(s.groups, (A, q) => (c(), d(I, {
4041
+ (c(!0), d(I, null, F(s.groups, (A, q) => (c(), d(I, {
4033
4042
  key: A.key
4034
4043
  }, [
4035
4044
  A.key === s.unreadGroupKey ? (c(), d("div", zr, [
@@ -4046,7 +4055,7 @@ function si(e, t, n, r, a, s) {
4046
4055
  o("span", Vr, v(A.systemLabel), 1),
4047
4056
  t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
4048
4057
  ])) : (c(), d(I, { key: 1 }, [
4049
- (c(!0), d(I, null, j(A.items, (M, D) => (c(), d(I, {
4058
+ (c(!0), d(I, null, F(A.items, (M, D) => (c(), d(I, {
4050
4059
  key: `${s.messageKey(M.message)}-${M.partKey}`
4051
4060
  }, [
4052
4061
  o("div", {
@@ -4113,16 +4122,22 @@ function si(e, t, n, r, a, s) {
4113
4122
  s.attachmentsOf(M.message).length ? (c(), d("div", {
4114
4123
  key: 1,
4115
4124
  class: R(["wm-list__atts", {
4116
- "wm-list__atts--align-end": A.role === "user"
4117
- }])
4125
+ "wm-list__atts--align-end": A.role === "user",
4126
+ "wm-list__atts--mosaic": s.attachmentsOf(M.message).length >= 2
4127
+ }]),
4128
+ style: z(
4129
+ s.mosaicGridStyle(
4130
+ s.attachmentsOf(M.message).length
4131
+ )
4132
+ )
4118
4133
  }, [
4119
- (c(!0), d(I, null, j(s.attachmentsOf(
4134
+ (c(!0), d(I, null, F(s.attachmentsOf(
4120
4135
  M.message
4121
4136
  ), (N, L) => (c(), U(T, {
4122
4137
  key: `${s.messageKey(M.message)}-att-${L}`,
4123
4138
  attachment: N
4124
4139
  }, null, 8, ["attachment"]))), 128))
4125
- ], 2)) : w("", !0)
4140
+ ], 6)) : w("", !0)
4126
4141
  ], 2))
4127
4142
  ], 46, Kr),
4128
4143
  D < A.items.length - 1 && a.pressedItemKey === `${s.messageKey(M.message)}-${M.partKey}` && (A.role !== "user" || s.timeOf(M.message)) ? (c(), d("div", {
@@ -4158,7 +4173,7 @@ function si(e, t, n, r, a, s) {
4158
4173
  ])) : w("", !0)
4159
4174
  ], 34),
4160
4175
  V(Ne, { name: "wm-scrollDown" }, {
4161
- default: je(() => [
4176
+ default: Fe(() => [
4162
4177
  a.showScrollDown ? (c(), d("button", {
4163
4178
  key: 0,
4164
4179
  type: "button",
@@ -4186,7 +4201,7 @@ function si(e, t, n, r, a, s) {
4186
4201
  })
4187
4202
  ]);
4188
4203
  }
4189
- const ri = /* @__PURE__ */ P(Pr, [["render", si], ["__scopeId", "data-v-7486891c"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4204
+ const ri = /* @__PURE__ */ P(Pr, [["render", si], ["__scopeId", "data-v-4cd2d53a"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4190
4205
  function ii() {
4191
4206
  return Oe && [
4192
4207
  "video/webm;codecs=vp9,opus",
@@ -4329,7 +4344,7 @@ const ci = [
4329
4344
  inject: {
4330
4345
  // Translator shared by the Messenger shell; French fallback when
4331
4346
  // the component is used standalone.
4332
- t: { default: () => F() }
4347
+ t: { default: () => j() }
4333
4348
  },
4334
4349
  props: {
4335
4350
  modelValue: { type: String, default: "" },
@@ -4527,7 +4542,7 @@ function ki(e, t, n, r, a, s) {
4527
4542
  onClick: t[2] || (t[2] = (i) => a.attachOpen = !1)
4528
4543
  })) : w("", !0),
4529
4544
  a.attachOpen ? (c(), d("div", mi, [
4530
- (c(!0), d(I, null, j(s.attachItems, (i) => (c(), d("button", {
4545
+ (c(!0), d(I, null, F(s.attachItems, (i) => (c(), d("button", {
4531
4546
  key: i.action,
4532
4547
  type: "button",
4533
4548
  class: "wm-compose__menuItem",
@@ -4631,7 +4646,7 @@ function Mi(e, t, n, r, a, s) {
4631
4646
  key: s.batchKey,
4632
4647
  class: "wm-chips"
4633
4648
  }, [
4634
- (c(!0), d(I, null, j(n.items, (i, l) => (c(), d("button", {
4649
+ (c(!0), d(I, null, F(n.items, (i, l) => (c(), d("button", {
4635
4650
  key: l,
4636
4651
  type: "button",
4637
4652
  class: "wm-chip",
@@ -4646,7 +4661,7 @@ const Ti = /* @__PURE__ */ P(Ai, [["render", Mi], ["__scopeId", "data-v-47ad8085
4646
4661
  inject: {
4647
4662
  // Translator shared by the Messenger shell; French fallback when
4648
4663
  // the component is used standalone.
4649
- t: { default: () => F() }
4664
+ t: { default: () => j() }
4650
4665
  },
4651
4666
  props: {
4652
4667
  action: { type: String, required: !0 },
@@ -4730,13 +4745,13 @@ const Ni = /* @__PURE__ */ new Set([
4730
4745
  "select",
4731
4746
  "multiselect",
4732
4747
  "date"
4733
- ]), ji = {
4748
+ ]), Fi = {
4734
4749
  name: "WmFormCard",
4735
4750
  components: { AIAvatar: oe },
4736
4751
  inject: {
4737
4752
  // Translator shared by the Messenger shell; French fallback when
4738
4753
  // the component is used standalone.
4739
- t: { default: () => F() }
4754
+ t: { default: () => j() }
4740
4755
  },
4741
4756
  props: {
4742
4757
  form: { type: Object, required: !0 },
@@ -4813,7 +4828,7 @@ const Ni = /* @__PURE__ */ new Set([
4813
4828
  }
4814
4829
  }
4815
4830
  }
4816
- }, Fi = { class: "wm-form" }, Hi = { class: "wm-form__head" }, zi = { class: "wm-form__icon" }, qi = { class: "wm-form__main" }, $i = { class: "wm-form__title" }, Vi = {
4831
+ }, ji = { class: "wm-form" }, Hi = { class: "wm-form__head" }, zi = { class: "wm-form__icon" }, qi = { class: "wm-form__main" }, $i = { class: "wm-form__title" }, Vi = {
4817
4832
  key: 0,
4818
4833
  class: "wm-form__detail"
4819
4834
  }, Ki = ["for"], Wi = {
@@ -4842,7 +4857,7 @@ const Ni = /* @__PURE__ */ new Set([
4842
4857
  };
4843
4858
  function ca(e, t, n, r, a, s) {
4844
4859
  const i = B("AIAvatar");
4845
- return c(), d("div", Fi, [
4860
+ return c(), d("div", ji, [
4846
4861
  o("div", Hi, [
4847
4862
  o("div", zi, [
4848
4863
  V(i, {
@@ -4860,7 +4875,7 @@ function ca(e, t, n, r, a, s) {
4860
4875
  class: "wm-form__body",
4861
4876
  onSubmit: t[0] || (t[0] = J((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4862
4877
  }, [
4863
- (c(!0), d(I, null, j(s.normalizedFields, (l) => (c(), d("div", {
4878
+ (c(!0), d(I, null, F(s.normalizedFields, (l) => (c(), d("div", {
4864
4879
  key: l.key,
4865
4880
  class: "wm-form__field"
4866
4881
  }, [
@@ -4938,14 +4953,14 @@ function ca(e, t, n, r, a, s) {
4938
4953
  disabled: n.readOnly || a.busy
4939
4954
  }, [
4940
4955
  o("option", ta, v(l.placeholder || s.t("form.choose")), 1),
4941
- (c(!0), d(I, null, j(l.options, (g) => (c(), d("option", {
4956
+ (c(!0), d(I, null, F(l.options, (g) => (c(), d("option", {
4942
4957
  key: g.value,
4943
4958
  value: g.value
4944
4959
  }, v(g.label), 9, na))), 128))
4945
4960
  ], 8, ea)), [
4946
4961
  [Ge, a.values[l.key]]
4947
4962
  ]) : l.type === "multiselect" ? (c(), d("div", sa, [
4948
- (c(!0), d(I, null, j(l.options, (g) => (c(), d("label", {
4963
+ (c(!0), d(I, null, F(l.options, (g) => (c(), d("label", {
4949
4964
  key: g.value,
4950
4965
  class: "wm-form__multiItem"
4951
4966
  }, [
@@ -4977,12 +4992,12 @@ function ca(e, t, n, r, a, s) {
4977
4992
  ], 32)
4978
4993
  ]);
4979
4994
  }
4980
- const da = /* @__PURE__ */ P(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56"]]), ua = {
4995
+ const da = /* @__PURE__ */ P(Fi, [["render", ca], ["__scopeId", "data-v-fe65cc56"]]), ua = {
4981
4996
  name: "WmFeedback",
4982
4997
  inject: {
4983
4998
  // Translator shared by the Messenger shell; French fallback when
4984
4999
  // the component is used standalone.
4985
- t: { default: () => F() }
5000
+ t: { default: () => j() }
4986
5001
  },
4987
5002
  props: {
4988
5003
  busy: { type: Boolean, default: !1 },
@@ -5039,7 +5054,7 @@ function Ca(e, t, n, r, a, s) {
5039
5054
  o("div", ma, v(s.t("feedback.question")), 1),
5040
5055
  o("div", fa, v(s.t("feedback.subtitle")), 1),
5041
5056
  o("div", _a, [
5042
- (c(!0), d(I, null, j(s.options, (i) => (c(), d("button", {
5057
+ (c(!0), d(I, null, F(s.options, (i) => (c(), d("button", {
5043
5058
  key: i.v,
5044
5059
  type: "button",
5045
5060
  class: R(["wm-fb__opt", { "is-selected": a.sel === i.v }]),
@@ -5063,7 +5078,7 @@ const Aa = /* @__PURE__ */ P(ua, [["render", Ca], ["__scopeId", "data-v-9b630564
5063
5078
  inject: {
5064
5079
  // Translator shared by the Messenger shell; French fallback when
5065
5080
  // the component is used standalone.
5066
- t: { default: () => F() }
5081
+ t: { default: () => j() }
5067
5082
  },
5068
5083
  props: {
5069
5084
  canRename: { type: Boolean, default: !0 },
@@ -5243,12 +5258,12 @@ function Da(e, t, n, r, a, s) {
5243
5258
  ])
5244
5259
  ]);
5245
5260
  }
5246
- const Na = /* @__PURE__ */ P(Sa, [["render", Da], ["__scopeId", "data-v-4cf6d578"]]), ja = {
5261
+ const Na = /* @__PURE__ */ P(Sa, [["render", Da], ["__scopeId", "data-v-4cf6d578"]]), Fa = {
5247
5262
  name: "WmRenameDialog",
5248
5263
  inject: {
5249
5264
  // Translator shared by the Messenger shell; French fallback when
5250
5265
  // the component is used standalone.
5251
- t: { default: () => F() }
5266
+ t: { default: () => j() }
5252
5267
  },
5253
5268
  props: {
5254
5269
  // Empty defaults: the resolved fallback comes from the translator
@@ -5285,13 +5300,13 @@ const Na = /* @__PURE__ */ P(Sa, [["render", Da], ["__scopeId", "data-v-4cf6d578
5285
5300
  this.canSubmit && this.$emit("submit", this.value.trim());
5286
5301
  }
5287
5302
  }
5288
- }, Fa = { class: "wm-dialog" }, Ha = {
5303
+ }, ja = { class: "wm-dialog" }, Ha = {
5289
5304
  class: "wm-dialog__card",
5290
5305
  role: "dialog",
5291
5306
  "aria-modal": "true"
5292
5307
  }, za = { class: "wm-dialog__head" }, qa = { class: "wm-dialog__title" }, $a = ["aria-label"], Va = { class: "wm-dialog__body" }, Ka = ["placeholder"], Wa = { class: "wm-dialog__actions" }, Ga = ["disabled"];
5293
5308
  function Ya(e, t, n, r, a, s) {
5294
- return c(), d("div", Fa, [
5309
+ return c(), d("div", ja, [
5295
5310
  o("div", {
5296
5311
  class: "wm-dialog__scrim",
5297
5312
  onClick: t[0] || (t[0] = (i) => e.$emit("close"))
@@ -5352,7 +5367,7 @@ function Ya(e, t, n, r, a, s) {
5352
5367
  ])
5353
5368
  ]);
5354
5369
  }
5355
- const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8"]]), De = "ww-messenger-tokens", Xa = {
5370
+ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8"]]), De = "ww-messenger-tokens", Xa = {
5356
5371
  name: "Messenger",
5357
5372
  components: {
5358
5373
  Launcher: qt,
@@ -5543,7 +5558,7 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5543
5558
  // `locale` changes. `t()` below (and the provided closure) delegate
5544
5559
  // to it so every string resolves against the current language.
5545
5560
  translator() {
5546
- return F(this.locale);
5561
+ return j(this.locale);
5547
5562
  },
5548
5563
  error() {
5549
5564
  var e;
@@ -6118,14 +6133,7 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6118
6133
  }
6119
6134
  },
6120
6135
  async refresh() {
6121
- this.store && this.store.destroy(), this.cancelReveals(), this.cancelWelcomeTimers(), this.welcomeRevealedAt = {}, this.teardownLiveReveal(), this.teardownNotifications(), this.convOpenedAt = 0, this.transport = null, this.store = null, this.isOpen = !1, this.draft = "", this.busy = !1, this.bootError = null;
6122
- for (const e of this.pendingAttachments)
6123
- if (e != null && e._previewUrl)
6124
- try {
6125
- URL.revokeObjectURL(e._previewUrl);
6126
- } catch {
6127
- }
6128
- this.pendingAttachments = [], this.feedbackBusy = !1, this.feedbackDone = !1, this.moreOpen = !1, this.renameDialogOpen = !1, this.draftConv = null, this.activeConvId = null, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1, await this.boot(), this.isEmbedded && this.store && await this.open();
6136
+ this.store && this.store.destroy(), this.cancelReveals(), this.cancelWelcomeTimers(), this.welcomeRevealedAt = {}, this.teardownLiveReveal(), this.teardownNotifications(), this.convOpenedAt = 0, this.transport = null, this.store = null, this.isOpen = !1, this.draft = "", this.busy = !1, this.bootError = null, this.pendingAttachments = [], this.feedbackBusy = !1, this.feedbackDone = !1, this.moreOpen = !1, this.renameDialogOpen = !1, this.draftConv = null, this.activeConvId = null, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1, await this.boot(), this.isEmbedded && this.store && await this.open();
6129
6137
  },
6130
6138
  // ── Float overlay measurement ────────────────────────────────────
6131
6139
  syncFloatObserver(e) {
@@ -6443,12 +6451,7 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6443
6451
  const n = t.id, r = this.pendingAttachments.slice();
6444
6452
  this.pendingAttachments = [], this.unreadAnchorId = null, this.unreadBoundaryTs = "";
6445
6453
  const a = r.map((s) => {
6446
- const { _previewUrl: i, ...l } = s;
6447
- if (i)
6448
- try {
6449
- URL.revokeObjectURL(i);
6450
- } catch {
6451
- }
6454
+ const { previewUrl: i, ...l } = s;
6452
6455
  return l;
6453
6456
  });
6454
6457
  await this.store.send(n, e, {
@@ -6484,11 +6487,6 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6484
6487
  }
6485
6488
  }));
6486
6489
  },
6487
- // True for attachments whose mime type makes them eligible for a
6488
- // local-blob thumbnail in the pending strip.
6489
- isPendingImage(e) {
6490
- return ((e == null ? void 0 : e.mime_type) || "").toLowerCase().startsWith("image/");
6491
- },
6492
6490
  // Human-readable size label (bytes / KB / MB) for the pending
6493
6491
  // file-card footer. Returns an empty string when the size is
6494
6492
  // unknown so the row keeps a single-line layout.
@@ -6499,40 +6497,32 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6499
6497
  size: (e / (1024 * 1024)).toFixed(1)
6500
6498
  }) : "";
6501
6499
  },
6502
- // Drop a pending attachment from the strip, revoking the blob URL
6503
- // we created at attach time so the browser releases the underlying
6504
- // memory. Safe to call on non-image attachments (the field is
6505
- // simply absent).
6500
+ // Drop a pending attachment from the strip.
6506
6501
  removePendingAttachment(e) {
6507
- const t = this.pendingAttachments[e];
6508
- if (t != null && t._previewUrl)
6509
- try {
6510
- URL.revokeObjectURL(t._previewUrl);
6511
- } catch {
6512
- }
6513
6502
  this.pendingAttachments.splice(e, 1);
6514
6503
  },
6515
6504
  async onAttach(e) {
6516
- if (!e || !this.transport) return;
6517
- const n = (e.type || "").toLowerCase().startsWith("image/") ? URL.createObjectURL(e) : null;
6518
- try {
6519
- const r = await this.transport.uploadAttachment(e);
6520
- this.pendingAttachments.push({
6521
- type: r.type || "file",
6522
- path: r.path,
6523
- name: e.name || this.t("attachment.fileFallbackName"),
6524
- mime_type: e.type,
6525
- size_bytes: e.size,
6526
- _previewUrl: n
6527
- });
6528
- } catch (r) {
6529
- if (n)
6530
- try {
6531
- URL.revokeObjectURL(n);
6532
- } catch {
6533
- }
6534
- console.error("[ww-messenger] attachment upload failed", r);
6535
- }
6505
+ var t, n;
6506
+ if (!(!e || !this.transport))
6507
+ try {
6508
+ const r = await this.transport.uploadAttachment(e), a = (r == null ? void 0 : r.type) === "image" || (e.type || "").toLowerCase().startsWith("image/") || ((r == null ? void 0 : r.mime_type) || "").toLowerCase().startsWith("image/");
6509
+ let s = null;
6510
+ if (a)
6511
+ try {
6512
+ s = await ((n = (t = this.store) == null ? void 0 : t.signAttachment) == null ? void 0 : n.call(t, r.path)) || null;
6513
+ } catch {
6514
+ }
6515
+ this.pendingAttachments.push({
6516
+ type: r.type || "file",
6517
+ path: r.path,
6518
+ name: e.name || this.t("attachment.fileFallbackName"),
6519
+ mime_type: e.type,
6520
+ size_bytes: e.size,
6521
+ previewUrl: s
6522
+ });
6523
+ } catch (r) {
6524
+ console.error("[ww-messenger] attachment upload failed", r);
6525
+ }
6536
6526
  },
6537
6527
  // Délégation des clics sur les liens `<a href="#...">` rendus dans le
6538
6528
  // panel (typiquement par le markdown des messages agent). On capture
@@ -6766,14 +6756,14 @@ function go(e, t, n, r, a, s) {
6766
6756
  })), 1)
6767
6757
  ])) : w("", !0),
6768
6758
  a.pendingAttachments.length ? (c(), d("div", lo, [
6769
- (c(!0), d(I, null, j(a.pendingAttachments, (L, K) => (c(), d("div", {
6759
+ (c(!0), d(I, null, F(a.pendingAttachments, (L, K) => (c(), d("div", {
6770
6760
  key: L.path || K,
6771
6761
  class: "wm-attached__item"
6772
6762
  }, [
6773
- s.isPendingImage(L) && L._previewUrl ? (c(), d("img", {
6763
+ L.previewUrl ? (c(), d("img", {
6774
6764
  key: 0,
6775
6765
  class: "wm-attached__thumb",
6776
- src: L._previewUrl,
6766
+ src: L.previewUrl,
6777
6767
  alt: L.name
6778
6768
  }, null, 8, co)) : (c(), d("div", uo, [
6779
6769
  t[11] || (t[11] = o("span", { class: "wm-attached__fileIcon" }, [
@@ -6881,7 +6871,7 @@ function go(e, t, n, r, a, s) {
6881
6871
  ], 6)) : w("", !0)
6882
6872
  ], 6);
6883
6873
  }
6884
- const yo = /* @__PURE__ */ P(Xa, [["render", go], ["__scopeId", "data-v-b87f85e6"]]), wo = "0.5.63";
6874
+ const yo = /* @__PURE__ */ P(Xa, [["render", go], ["__scopeId", "data-v-a54649f6"]]), wo = "0.5.65";
6885
6875
  export {
6886
6876
  oe as AIAvatar,
6887
6877
  be as AVATAR_COLORS,
@@ -6917,7 +6907,7 @@ export {
6917
6907
  ai as captureScreenshotFile,
6918
6908
  H as colors,
6919
6909
  st as createStore,
6920
- F as createTranslator,
6910
+ j as createTranslator,
6921
6911
  Ze as createTransport,
6922
6912
  ne as dateLocale,
6923
6913
  yo as default,