@_solaris/messenger-widget 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/messenger.js CHANGED
@@ -1,15 +1,15 @@
1
- import { reactive as xe, openBlock as l, createElementBlock as c, createVNode as P, Transition as Me, withCtx as Te, withKeys as me, withModifiers as Y, createElementVNode as i, toDisplayString as b, createCommentVNode as y, normalizeStyle as V, normalizeClass as E, Fragment as T, renderList as F, resolveComponent as I, createBlock as $, createTextVNode as se, resolveDynamicComponent as Oe, renderSlot as Ie, withDirectives as z, vModelText as G, vModelCheckbox as Ee, vModelSelect as Be, createStaticVNode as ue, markRaw as fe } from "vue";
2
- const Le = [
1
+ import { reactive as Se, openBlock as l, createElementBlock as c, createVNode as P, Transition as xe, withCtx as Me, withKeys as me, withModifiers as Y, createElementVNode as i, toDisplayString as b, createCommentVNode as y, normalizeStyle as V, normalizeClass as E, Fragment as M, renderList as F, resolveComponent as I, createBlock as $, createTextVNode as se, resolveDynamicComponent as Te, renderSlot as Oe, withDirectives as z, vModelText as G, vModelCheckbox as Ie, vModelSelect as Ee, createStaticVNode as ue, markRaw as fe } from "vue";
2
+ const Be = [
3
3
  "connected",
4
4
  "message",
5
5
  "message_stream",
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], Re = 5 * 60 * 1e3, $e = 10 * 60 * 1e3, Fe = 5 * 60 * 1e3;
10
- function je(t) {
9
+ ], Le = 5 * 60 * 1e3, Re = 10 * 60 * 1e3, $e = 5 * 60 * 1e3;
10
+ function Fe(t) {
11
11
  const e = {
12
- baseUrl: Ue(t.baseUrl || ""),
12
+ baseUrl: je(t.baseUrl || ""),
13
13
  widgetId: t.widgetId || "",
14
14
  userId: t.userId || "",
15
15
  userHash: t.userHash || "",
@@ -61,10 +61,10 @@ function je(t) {
61
61
  body: p !== void 0 ? JSON.stringify(p) : void 0
62
62
  });
63
63
  if (!k.ok) {
64
- const O = await d(k), M = new Error(
64
+ const O = await d(k), T = new Error(
65
65
  `HTTP ${k.status} ${h} ${f} :: ${(O == null ? void 0 : O.error) || k.statusText}`
66
66
  );
67
- throw M.status = k.status, M.body = O, M;
67
+ throw T.status = k.status, T.body = O, T;
68
68
  }
69
69
  return k.status === 204 ? null : k.json();
70
70
  }
@@ -159,15 +159,15 @@ function je(t) {
159
159
  size_bytes: k,
160
160
  name: f
161
161
  })
162
- ), M = await fetch(O.upload_url, {
162
+ ), T = await fetch(O.upload_url, {
163
163
  method: "PUT",
164
164
  headers: { "Content-Type": p },
165
165
  body: h
166
166
  });
167
- if (!M.ok)
168
- throw new Error(`HTTP ${M.status} PUT signed upload`);
167
+ if (!T.ok)
168
+ throw new Error(`HTTP ${T.status} PUT signed upload`);
169
169
  return {
170
- type: De(p),
170
+ type: Ue(p),
171
171
  path: O.path,
172
172
  mime_type: p,
173
173
  size_bytes: k
@@ -191,7 +191,7 @@ function je(t) {
191
191
  if (!e.eventSource && !(typeof document < "u" && document.hidden))
192
192
  try {
193
193
  const h = new EventSource(re());
194
- for (const f of Le)
194
+ for (const f of Be)
195
195
  h.addEventListener(f, (p) => ie(f, p.data));
196
196
  h.addEventListener("error", () => a("error", new Error("SSE error"))), e.eventSource = h, r("open");
197
197
  } catch (h) {
@@ -212,7 +212,7 @@ function je(t) {
212
212
  function W() {
213
213
  clearTimeout(e.burstTimer), q(), e.panelOpen || (e.burstTimer = setTimeout(() => {
214
214
  e.panelOpen || K();
215
- }, $e));
215
+ }, Re));
216
216
  }
217
217
  function ae(h) {
218
218
  e.panelOpen = !!h, e.panelOpen ? (clearTimeout(e.burstTimer), q()) : W();
@@ -220,8 +220,8 @@ function je(t) {
220
220
  async function oe() {
221
221
  try {
222
222
  const h = await S(), f = h.reduce((k, O) => {
223
- const M = O == null ? void 0 : O.last_message_at;
224
- return M && (!k || M > k) ? M : k;
223
+ const T = O == null ? void 0 : O.last_message_at;
224
+ return T && (!k || T > k) ? T : k;
225
225
  }, null);
226
226
  f && (!e.lastActivityAt || f > e.lastActivityAt) && (e.lastActivityAt = f, a("activity", { conversations: h, latestAt: f }), W());
227
227
  } catch (h) {
@@ -229,7 +229,7 @@ function je(t) {
229
229
  }
230
230
  }
231
231
  function Q() {
232
- u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(oe, Re));
232
+ u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(oe, Le));
233
233
  }
234
234
  function u() {
235
235
  e.pollTimer && (clearInterval(e.pollTimer), e.pollTimer = null);
@@ -238,7 +238,7 @@ function je(t) {
238
238
  if (document.hidden)
239
239
  clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = setTimeout(() => {
240
240
  e.hiddenGraceTimer = null, document.hidden && (u(), K(), r("paused"));
241
- }, Fe);
241
+ }, $e);
242
242
  else {
243
243
  if (e.hiddenGraceTimer) {
244
244
  clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null;
@@ -290,13 +290,13 @@ function je(t) {
290
290
  }
291
291
  };
292
292
  }
293
- function Ue(t) {
293
+ function je(t) {
294
294
  return t.endsWith("/") ? t.slice(0, -1) : t;
295
295
  }
296
- function De(t) {
296
+ function Ue(t) {
297
297
  return t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : t.startsWith("audio/") ? "audio" : "file";
298
298
  }
299
- function Ne() {
299
+ function De() {
300
300
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
301
301
  return crypto.randomUUID();
302
302
  const t = new Uint8Array(16);
@@ -308,8 +308,8 @@ function Ne() {
308
308
  const e = [...t].map((n) => n.toString(16).padStart(2, "0"));
309
309
  return e.slice(0, 4).join("") + "-" + e.slice(4, 6).join("") + "-" + e.slice(6, 8).join("") + "-" + e.slice(8, 10).join("") + "-" + e.slice(10, 16).join("");
310
310
  }
311
- function Pe(t) {
312
- const e = xe({
311
+ function Ne(t) {
312
+ const e = Se({
313
313
  ready: !1,
314
314
  error: null,
315
315
  config: null,
@@ -419,8 +419,8 @@ function Pe(t) {
419
419
  }), Z = (R == null ? void 0 : R.messages) ?? [];
420
420
  if (f = [...Z, ...f], h = (R == null ? void 0 : R.next_cursor) ?? null, !Z.length || f.length >= 60) break;
421
421
  }
422
- const k = e.messagesByConv[u] || [], O = new Set(k.map((R) => String(R == null ? void 0 : R.id))), M = [...f.filter((R) => !O.has(String(R == null ? void 0 : R.id))), ...k];
423
- e.messagesByConv[u] = M, w(u, {
422
+ const k = e.messagesByConv[u] || [], O = new Set(k.map((R) => String(R == null ? void 0 : R.id))), T = [...f.filter((R) => !O.has(String(R == null ? void 0 : R.id))), ...k];
423
+ e.messagesByConv[u] = T, w(u, {
424
424
  nextCursor: h,
425
425
  loading: !1,
426
426
  loaded: !0
@@ -438,10 +438,10 @@ function Pe(t) {
438
438
  g !== -1 && (e.conversations[g] = _);
439
439
  }
440
440
  async function L(u, m, { attachments: _, metadata: g } = {}) {
441
- var M;
441
+ var T;
442
442
  const h = (m || "").trim(), f = Array.isArray(_) && _.length > 0;
443
443
  if (!u || !h && !f) return;
444
- const p = Ne(), k = Q(u), O = {
444
+ const p = De(), k = Q(u), O = {
445
445
  id: p,
446
446
  client_msg_id: p,
447
447
  conversation_id: u,
@@ -449,7 +449,7 @@ function Pe(t) {
449
449
  text_md: h,
450
450
  author: {
451
451
  type: "user",
452
- id: ((M = e.customer) == null ? void 0 : M.external_id) || null
452
+ id: ((T = e.customer) == null ? void 0 : T.external_id) || null
453
453
  },
454
454
  created_at: k,
455
455
  // Local-only flag — UI may render dimmed until the SSE echo lands.
@@ -545,15 +545,15 @@ function Pe(t) {
545
545
  if ((k == null ? void 0 : k.type) === "action" && ((g = k == null ? void 0 : k.payload) == null ? void 0 : g.state) === "pending") return [];
546
546
  if (((h = k == null ? void 0 : k.author) == null ? void 0 : h.type) !== "agent_ia") continue;
547
547
  const O = (f = k == null ? void 0 : k.metadata) == null ? void 0 : f.suggested_replies;
548
- return Array.isArray(O) && O.length ? O.map((M) => {
549
- if (typeof M == "string") {
550
- const R = M.trim();
548
+ return Array.isArray(O) && O.length ? O.map((T) => {
549
+ if (typeof T == "string") {
550
+ const R = T.trim();
551
551
  return R ? { label: R, kind: null } : null;
552
552
  }
553
- if (M && typeof M == "object" && typeof M.label == "string") {
554
- const R = M.label.trim();
553
+ if (T && typeof T == "object" && typeof T.label == "string") {
554
+ const R = T.label.trim();
555
555
  if (!R) return null;
556
- const Z = M.kind === "cta" || M.kind === "choice" || M.kind === "followup" ? M.kind : null;
556
+ const Z = T.kind === "cta" || T.kind === "choice" || T.kind === "followup" ? T.kind : null;
557
557
  return { label: R, kind: Z };
558
558
  }
559
559
  return null;
@@ -649,7 +649,7 @@ const U = {
649
649
  red: "#B91C1C",
650
650
  redBg: "#FDECEC"
651
651
  }, le = ["#5B5FEF", "#7C3AED", "#DB2777", "#0891B2", "#D97706", "#059669"];
652
- function ge(t = "") {
652
+ function ye(t = "") {
653
653
  return t ? le[t.charCodeAt(0) % le.length] : le[0];
654
654
  }
655
655
  function we(t = "") {
@@ -658,7 +658,7 @@ function we(t = "") {
658
658
  function be(t = /* @__PURE__ */ new Date()) {
659
659
  return t.toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
660
660
  }
661
- const He = `
661
+ const Pe = `
662
662
  @import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
663
663
 
664
664
  .wm-root {
@@ -704,12 +704,12 @@ const He = `
704
704
  0% { transform: translateX(110%); opacity: 0; }
705
705
  100% { transform: translateX(0); opacity: 1; }
706
706
  }
707
- `, ze = "https://api.messenger.victorc.fr", B = (t, e) => {
707
+ `, He = "https://api.messenger.victorc.fr", B = (t, e) => {
708
708
  const n = t.__vccOpts || t;
709
709
  for (const [a, r] of e)
710
710
  n[a] = r;
711
711
  return n;
712
- }, Ve = {
712
+ }, ze = {
713
713
  name: "WmLauncher",
714
714
  props: {
715
715
  // Nombre de conversations non lues — pilote la pastille.
@@ -719,11 +719,11 @@ const He = `
719
719
  peek: { type: String, default: "" }
720
720
  },
721
721
  emits: ["open", "dismiss"]
722
- }, qe = { class: "wm-launcherWrap" }, We = { class: "wm-peek__text" }, Ge = ["aria-label"];
723
- function Ke(t, e, n, a, r, s) {
724
- return l(), c("div", qe, [
725
- P(Me, { name: "wm-peek" }, {
726
- default: Te(() => [
722
+ }, Ve = { class: "wm-launcherWrap" }, qe = { class: "wm-peek__text" }, We = ["aria-label"];
723
+ function Ge(t, e, n, a, r, s) {
724
+ return l(), c("div", Ve, [
725
+ P(xe, { name: "wm-peek" }, {
726
+ default: Me(() => [
727
727
  n.peek ? (l(), c("div", {
728
728
  key: 0,
729
729
  class: "wm-peek",
@@ -736,7 +736,7 @@ function Ke(t, e, n, a, r, s) {
736
736
  e[3] || (e[3] = me(Y((o) => t.$emit("open"), ["prevent"]), ["space"]))
737
737
  ]
738
738
  }, [
739
- i("p", We, b(n.peek), 1),
739
+ i("p", qe, b(n.peek), 1),
740
740
  i("button", {
741
741
  type: "button",
742
742
  class: "wm-peek__close",
@@ -784,26 +784,26 @@ function Ke(t, e, n, a, r, s) {
784
784
  key: 0,
785
785
  class: "wm-launcher__badge",
786
786
  "aria-label": `${n.unreadCount} conversation${n.unreadCount > 1 ? "s" : ""} non lue${n.unreadCount > 1 ? "s" : ""}`
787
- }, b(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Ge)) : y("", !0)
787
+ }, b(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, We)) : y("", !0)
788
788
  ])
789
789
  ]);
790
790
  }
791
- const Ye = /* @__PURE__ */ B(Ve, [["render", Ke], ["__scopeId", "data-v-fabef371"]]), Je = {
791
+ const Ke = /* @__PURE__ */ B(ze, [["render", Ge], ["__scopeId", "data-v-fabef371"]]), Ye = {
792
792
  name: "WmAIAvatar",
793
793
  props: {
794
794
  size: { type: Number, default: 26 },
795
795
  pulse: { type: Boolean, default: !1 }
796
796
  }
797
- }, Xe = {
797
+ }, Je = {
798
798
  key: 0,
799
799
  class: "wm-aiav__pulse"
800
- }, Qe = ["width", "height"];
801
- function Ze(t, e, n, a, r, s) {
800
+ }, Xe = ["width", "height"];
801
+ function Qe(t, e, n, a, r, s) {
802
802
  return l(), c("div", {
803
803
  class: "wm-aiav",
804
804
  style: V({ width: n.size + "px", height: n.size + "px", "--wm-avr": n.size * 0.32 + "px" })
805
805
  }, [
806
- n.pulse ? (l(), c("div", Xe)) : y("", !0),
806
+ n.pulse ? (l(), c("div", Je)) : y("", !0),
807
807
  i("div", {
808
808
  class: E(["wm-aiav__inner", { "wm-aiav__inner--glow": n.pulse }])
809
809
  }, [
@@ -833,11 +833,11 @@ function Ze(t, e, n, a, r, s) {
833
833
  fill: "white",
834
834
  opacity: "0.38"
835
835
  }, null, -1)
836
- ])], 8, Qe))
836
+ ])], 8, Xe))
837
837
  ], 2)
838
838
  ], 4);
839
839
  }
840
- const J = /* @__PURE__ */ B(Je, [["render", Ze], ["__scopeId", "data-v-5ce9c382"]]), et = {
840
+ const J = /* @__PURE__ */ B(Ye, [["render", Qe], ["__scopeId", "data-v-5ce9c382"]]), Ze = {
841
841
  name: "WmHumanAvatar",
842
842
  props: {
843
843
  name: { type: String, default: "" },
@@ -846,14 +846,14 @@ const J = /* @__PURE__ */ B(Je, [["render", Ze], ["__scopeId", "data-v-5ce9c382"
846
846
  },
847
847
  computed: {
848
848
  bg() {
849
- return this.avatarUrl ? "transparent" : ge(this.name);
849
+ return this.avatarUrl ? "transparent" : ye(this.name);
850
850
  },
851
851
  initials() {
852
852
  return we(this.name);
853
853
  }
854
854
  }
855
- }, tt = ["src", "alt"];
856
- function nt(t, e, n, a, r, s) {
855
+ }, et = ["src", "alt"];
856
+ function tt(t, e, n, a, r, s) {
857
857
  return l(), c("div", {
858
858
  class: "wm-huav",
859
859
  style: V({
@@ -867,13 +867,13 @@ function nt(t, e, n, a, r, s) {
867
867
  key: 0,
868
868
  src: n.avatarUrl,
869
869
  alt: n.name || ""
870
- }, null, 8, tt)) : (l(), c("span", {
870
+ }, null, 8, et)) : (l(), c("span", {
871
871
  key: 1,
872
872
  style: V({ fontSize: n.size * 0.36 + "px" })
873
873
  }, b(s.initials), 5))
874
874
  ], 4);
875
875
  }
876
- const ke = /* @__PURE__ */ B(et, [["render", nt], ["__scopeId", "data-v-a772b179"]]), st = {
876
+ const ke = /* @__PURE__ */ B(Ze, [["render", tt], ["__scopeId", "data-v-a772b179"]]), nt = {
877
877
  name: "WmTeamAvatars",
878
878
  props: {
879
879
  members: { type: Array, default: () => [] },
@@ -889,26 +889,26 @@ const ke = /* @__PURE__ */ B(et, [["render", nt], ["__scopeId", "data-v-a772b179
889
889
  },
890
890
  methods: {
891
891
  colorFor(t) {
892
- return t.avatar_url ? "transparent" : ge(t.name || "");
892
+ return t.avatar_url ? "transparent" : ye(t.name || "");
893
893
  },
894
894
  initialsFor(t) {
895
895
  return we(t.name || "");
896
896
  }
897
897
  }
898
- }, rt = {
898
+ }, st = {
899
899
  key: 0,
900
900
  class: "wm-team"
901
- }, it = ["src", "alt"], at = { key: 1 }, ot = {
901
+ }, rt = ["src", "alt"], it = { key: 1 }, at = {
902
902
  key: 0,
903
903
  class: "wm-team__label"
904
904
  };
905
- function lt(t, e, n, a, r, s) {
906
- return s.visible ? (l(), c("div", rt, [
905
+ function ot(t, e, n, a, r, s) {
906
+ return s.visible ? (l(), c("div", st, [
907
907
  i("div", {
908
908
  class: "wm-team__stack",
909
909
  style: V({ width: s.stackWidth + "px" })
910
910
  }, [
911
- (l(!0), c(T, null, F(n.members.slice(0, 3), (o, d) => (l(), c("div", {
911
+ (l(!0), c(M, null, F(n.members.slice(0, 3), (o, d) => (l(), c("div", {
912
912
  key: d,
913
913
  class: "wm-team__pill",
914
914
  style: V({ left: d * 13 + "px", zIndex: 3 - d, background: s.colorFor(o) })
@@ -917,15 +917,15 @@ function lt(t, e, n, a, r, s) {
917
917
  key: 0,
918
918
  src: o.avatar_url,
919
919
  alt: o.name || ""
920
- }, null, 8, it)) : (l(), c("span", at, b(s.initialsFor(o)), 1))
920
+ }, null, 8, rt)) : (l(), c("span", it, b(s.initialsFor(o)), 1))
921
921
  ], 4))), 128))
922
922
  ], 4),
923
- n.responseLabel ? (l(), c("span", ot, b(n.responseLabel), 1)) : y("", !0)
923
+ n.responseLabel ? (l(), c("span", at, b(n.responseLabel), 1)) : y("", !0)
924
924
  ])) : y("", !0);
925
925
  }
926
- const ct = /* @__PURE__ */ B(st, [["render", lt], ["__scopeId", "data-v-3659b9c1"]]), dt = {
926
+ const lt = /* @__PURE__ */ B(nt, [["render", ot], ["__scopeId", "data-v-3659b9c1"]]), ct = {
927
927
  name: "WmHeader",
928
- components: { AIAvatar: J, HumanAvatar: ke, TeamAvatars: ct },
928
+ components: { AIAvatar: J, HumanAvatar: ke, TeamAvatars: lt },
929
929
  props: {
930
930
  title: { type: String, default: "Nouvelle conversation" },
931
931
  escalated: { type: Boolean, default: !1 },
@@ -956,19 +956,19 @@ const ct = /* @__PURE__ */ B(st, [["render", lt], ["__scopeId", "data-v-3659b9c1
956
956
  return this.escalated && this.agentName ? this.agentName : "En ligne";
957
957
  }
958
958
  }
959
- }, ut = { class: "wm-header" }, ht = {
959
+ }, dt = { class: "wm-header" }, ut = {
960
960
  key: 1,
961
961
  style: { width: "30px", height: "30px", "flex-shrink": "0" }
962
- }, mt = { class: "wm-header__avatar" }, ft = { class: "wm-header__main" }, _t = { class: "wm-header__title" }, pt = {
962
+ }, ht = { class: "wm-header__avatar" }, mt = { class: "wm-header__main" }, ft = { class: "wm-header__title" }, _t = {
963
963
  key: 0,
964
964
  class: "wm-header__sub"
965
- }, vt = { class: "wm-header__status" }, yt = {
965
+ }, pt = { class: "wm-header__status" }, vt = {
966
966
  key: 3,
967
967
  class: "wm-header__fill"
968
968
  }, gt = { class: "wm-header__actions" };
969
- function wt(t, e, n, a, r, s) {
969
+ function yt(t, e, n, a, r, s) {
970
970
  const o = I("HumanAvatar"), d = I("AIAvatar"), v = I("TeamAvatars");
971
- return l(), c("div", ut, [
971
+ return l(), c("div", dt, [
972
972
  n.showBack ? (l(), c("button", {
973
973
  key: 0,
974
974
  type: "button",
@@ -989,9 +989,9 @@ function wt(t, e, n, a, r, s) {
989
989
  }, [
990
990
  i("path", { d: "M19 12H5M12 5l-7 7 7 7" })
991
991
  ], -1)
992
- ])])) : (l(), c("div", ht)),
993
- n.showIdentity ? (l(), c(T, { key: 2 }, [
994
- i("div", mt, [
992
+ ])])) : (l(), c("div", ut)),
993
+ n.showIdentity ? (l(), c(M, { key: 2 }, [
994
+ i("div", ht, [
995
995
  n.escalated ? (l(), $(o, {
996
996
  key: 0,
997
997
  name: n.agentName,
@@ -1002,21 +1002,21 @@ function wt(t, e, n, a, r, s) {
1002
1002
  size: 34
1003
1003
  }))
1004
1004
  ]),
1005
- i("div", ft, [
1006
- i("div", _t, b(n.title), 1),
1007
- s.showPresence ? (l(), c("div", pt, [
1005
+ i("div", mt, [
1006
+ i("div", ft, b(n.title), 1),
1007
+ s.showPresence ? (l(), c("div", _t, [
1008
1008
  s.hasTeam ? (l(), $(v, {
1009
1009
  key: 0,
1010
1010
  members: n.teamMembers,
1011
1011
  "response-label": n.responseLabel
1012
1012
  }, null, 8, ["members", "response-label"])) : y("", !0),
1013
- i("span", vt, [
1013
+ i("span", pt, [
1014
1014
  e[4] || (e[4] = i("span", { class: "wm-header__dot" }, null, -1)),
1015
1015
  se(" " + b(s.statusText), 1)
1016
1016
  ])
1017
1017
  ])) : y("", !0)
1018
1018
  ])
1019
- ], 64)) : (l(), c("div", yt)),
1019
+ ], 64)) : (l(), c("div", vt)),
1020
1020
  i("div", gt, [
1021
1021
  n.showMore ? (l(), c("button", {
1022
1022
  key: 0,
@@ -1075,13 +1075,13 @@ function wt(t, e, n, a, r, s) {
1075
1075
  ])
1076
1076
  ]);
1077
1077
  }
1078
- const bt = /* @__PURE__ */ B(dt, [["render", wt], ["__scopeId", "data-v-b5f5f6a9"]]), _e = {
1078
+ const wt = /* @__PURE__ */ B(ct, [["render", yt], ["__scopeId", "data-v-b5f5f6a9"]]), _e = {
1079
1079
  book: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253",
1080
1080
  changelog: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",
1081
1081
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
1082
1082
  chat: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",
1083
1083
  link: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
1084
- }, kt = {
1084
+ }, bt = {
1085
1085
  name: "WmOnboarding",
1086
1086
  components: { AIAvatar: J },
1087
1087
  props: {
@@ -1106,13 +1106,13 @@ Je réponds en quelques secondes.`;
1106
1106
  return _e[t] || _e.link;
1107
1107
  }
1108
1108
  }
1109
- }, Ct = { class: "wm-onb" }, At = { class: "wm-onb__hero" }, St = { class: "wm-onb__title" }, xt = { class: "wm-onb__sub" }, Mt = {
1109
+ }, kt = { class: "wm-onb" }, Ct = { class: "wm-onb__hero" }, At = { class: "wm-onb__title" }, St = { class: "wm-onb__sub" }, xt = {
1110
1110
  key: 0,
1111
1111
  class: "wm-onb__section"
1112
- }, Tt = { class: "wm-onb__links" }, Ot = ["onClick"], It = { class: "wm-onb__resume-body" }, Et = { class: "wm-onb__resume-title" }, Bt = { class: "wm-onb__resume-preview" }, Lt = {
1112
+ }, Mt = { class: "wm-onb__links" }, Tt = ["onClick"], Ot = { class: "wm-onb__resume-body" }, It = { class: "wm-onb__resume-title" }, Et = { class: "wm-onb__resume-preview" }, Bt = {
1113
1113
  key: 1,
1114
1114
  class: "wm-onb__section"
1115
- }, Rt = { class: "wm-onb__links" }, $t = ["onClick"], Ft = { class: "wm-onb__link-icon" }, jt = {
1115
+ }, Lt = { class: "wm-onb__links" }, Rt = ["onClick"], $t = { class: "wm-onb__link-icon" }, Ft = {
1116
1116
  width: "14",
1117
1117
  height: "14",
1118
1118
  viewBox: "0 0 24 24",
@@ -1122,22 +1122,22 @@ Je réponds en quelques secondes.`;
1122
1122
  "stroke-linecap": "round",
1123
1123
  "stroke-linejoin": "round",
1124
1124
  "aria-hidden": "true"
1125
- }, Ut = ["d"], Dt = { class: "wm-onb__link-label" }, Nt = { class: "wm-onb__cta" }, Pt = ["disabled"];
1126
- function Ht(t, e, n, a, r, s) {
1125
+ }, jt = ["d"], Ut = { class: "wm-onb__link-label" }, Dt = { class: "wm-onb__cta" }, Nt = ["disabled"];
1126
+ function Pt(t, e, n, a, r, s) {
1127
1127
  const o = I("AIAvatar");
1128
- return l(), c("div", Ct, [
1129
- i("div", At, [
1128
+ return l(), c("div", kt, [
1129
+ i("div", Ct, [
1130
1130
  P(o, {
1131
1131
  size: 56,
1132
1132
  pulse: !0
1133
1133
  }),
1134
- i("div", St, b(s.heroTitle), 1),
1135
- i("div", xt, b(s.heroSub), 1)
1134
+ i("div", At, b(s.heroTitle), 1),
1135
+ i("div", St, b(s.heroSub), 1)
1136
1136
  ]),
1137
- n.unreadThreads.length ? (l(), c("div", Mt, [
1137
+ n.unreadThreads.length ? (l(), c("div", xt, [
1138
1138
  e[3] || (e[3] = i("div", { class: "wm-onb__section-title" }, "Messages non lus", -1)),
1139
- i("div", Tt, [
1140
- (l(!0), c(T, null, F(n.unreadThreads, (d) => (l(), c("button", {
1139
+ i("div", Mt, [
1140
+ (l(!0), c(M, null, F(n.unreadThreads, (d) => (l(), c("button", {
1141
1141
  key: d.id,
1142
1142
  type: "button",
1143
1143
  class: "wm-onb__link wm-onb__resume",
@@ -1162,9 +1162,9 @@ function Ht(t, e, n, a, r, s) {
1162
1162
  "aria-label": "Non lu"
1163
1163
  })
1164
1164
  ], -1)),
1165
- i("span", It, [
1166
- i("span", Et, b(d.title), 1),
1167
- i("span", Bt, b(d.preview), 1)
1165
+ i("span", Ot, [
1166
+ i("span", It, b(d.title), 1),
1167
+ i("span", Et, b(d.preview), 1)
1168
1168
  ]),
1169
1169
  e[2] || (e[2] = i("svg", {
1170
1170
  width: "13",
@@ -1180,26 +1180,26 @@ function Ht(t, e, n, a, r, s) {
1180
1180
  }, [
1181
1181
  i("path", { d: "M9 18l6-6-6-6" })
1182
1182
  ], -1))
1183
- ], 8, Ot))), 128))
1183
+ ], 8, Tt))), 128))
1184
1184
  ])
1185
1185
  ])) : y("", !0),
1186
- n.quickLinks.length ? (l(), c("div", Lt, [
1186
+ n.quickLinks.length ? (l(), c("div", Bt, [
1187
1187
  e[5] || (e[5] = i("div", { class: "wm-onb__section-title" }, "Accès rapide", -1)),
1188
- i("div", Rt, [
1189
- (l(!0), c(T, null, F(n.quickLinks, (d, v) => (l(), c("button", {
1188
+ i("div", Lt, [
1189
+ (l(!0), c(M, null, F(n.quickLinks, (d, v) => (l(), c("button", {
1190
1190
  key: v,
1191
1191
  type: "button",
1192
1192
  class: "wm-onb__link",
1193
1193
  onClick: (C) => t.$emit("select", d)
1194
1194
  }, [
1195
- i("span", Ft, [
1196
- (l(), c("svg", jt, [
1195
+ i("span", $t, [
1196
+ (l(), c("svg", Ft, [
1197
1197
  i("path", {
1198
1198
  d: s.iconPath(d.icon)
1199
- }, null, 8, Ut)
1199
+ }, null, 8, jt)
1200
1200
  ]))
1201
1201
  ]),
1202
- i("span", Dt, b(d.label), 1),
1202
+ i("span", Ut, b(d.label), 1),
1203
1203
  e[4] || (e[4] = i("svg", {
1204
1204
  width: "13",
1205
1205
  height: "13",
@@ -1214,99 +1214,20 @@ function Ht(t, e, n, a, r, s) {
1214
1214
  }, [
1215
1215
  i("path", { d: "M9 18l6-6-6-6" })
1216
1216
  ], -1))
1217
- ], 8, $t))), 128))
1217
+ ], 8, Rt))), 128))
1218
1218
  ])
1219
1219
  ])) : y("", !0),
1220
- i("div", Nt, [
1220
+ i("div", Dt, [
1221
1221
  i("button", {
1222
1222
  type: "button",
1223
1223
  class: "wm-onb__startBtn",
1224
1224
  disabled: n.busy,
1225
1225
  onClick: e[0] || (e[0] = (d) => t.$emit("start"))
1226
- }, b(n.busy ? "…" : "Commencer une conversation"), 9, Pt)
1226
+ }, b(n.busy ? "…" : "Commencer une conversation"), 9, Nt)
1227
1227
  ])
1228
1228
  ]);
1229
1229
  }
1230
- const zt = /* @__PURE__ */ B(kt, [["render", Ht], ["__scopeId", "data-v-bd89bc8f"]]);
1231
- function Vt(t) {
1232
- return String(t).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1233
- }
1234
- function qt(t) {
1235
- return /^(https?:\/\/|mailto:|tel:)/i.test(String(t).trim());
1236
- }
1237
- const pe = "";
1238
- function ee(t) {
1239
- let e = t;
1240
- const n = [];
1241
- return e = e.replace(/`([^`\n]+)`/g, (a, r) => {
1242
- const s = n.length;
1243
- return n.push(r), `${pe}CODE${s}${pe}`;
1244
- }), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) => qt(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), e = e.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), e = e.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), e = e.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), e = e.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), e = e.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), e = e.replace(/CODE(\d+)/g, (a, r) => `<code class="wm-md-code">${n[+r]}</code>`), e;
1245
- }
1246
- function Ce(t) {
1247
- if (!t) return "";
1248
- const e = Vt(t).split(`
1249
- `), n = [];
1250
- let a = 0;
1251
- for (; a < e.length; ) {
1252
- const s = e[a];
1253
- if (/^\s*```([\w-]*)\s*$/.exec(s)) {
1254
- a++;
1255
- const C = [];
1256
- for (; a < e.length && !/^\s*```\s*$/.test(e[a]); )
1257
- C.push(e[a]), a++;
1258
- a < e.length && a++, n.push({
1259
- type: "block",
1260
- html: `<pre class="wm-md-pre"><code>${C.join(`
1261
- `)}</code></pre>`
1262
- });
1263
- continue;
1264
- }
1265
- if (/^\s*[-*]\s+/.test(s)) {
1266
- const C = [];
1267
- for (; a < e.length; ) {
1268
- const S = /^\s*[-*]\s+(.*)$/.exec(e[a]);
1269
- if (!S) break;
1270
- C.push(S[1]), a++;
1271
- }
1272
- const w = C.map((S) => `<li>${ee(S)}</li>`).join("");
1273
- n.push({ type: "block", html: `<ul class="wm-md-ul">${w}</ul>` });
1274
- continue;
1275
- }
1276
- const d = /^\s*(\d+)\.\s+(.*)$/.exec(s);
1277
- if (d) {
1278
- const C = parseInt(d[1], 10), w = [d[2]];
1279
- for (a++; a < e.length; ) {
1280
- const A = /^\s*\d+\.\s+(.*)$/.exec(e[a]);
1281
- if (!A) break;
1282
- w.push(A[1]), a++;
1283
- }
1284
- const S = w.map((A) => `<li>${ee(A)}</li>`).join(""), L = C !== 1 ? ` start="${C}"` : "";
1285
- n.push({ type: "block", html: `<ol class="wm-md-ol"${L}>${S}</ol>` });
1286
- continue;
1287
- }
1288
- const v = /^(#{1,6})\s+(.*)$/.exec(s);
1289
- if (v) {
1290
- const C = v[1].length;
1291
- n.push({
1292
- type: "block",
1293
- html: `<h${C} class="wm-md-h wm-md-h${C}">${ee(v[2])}</h${C}>`
1294
- }), a++;
1295
- continue;
1296
- }
1297
- n.push({ type: "text", html: ee(s) }), a++;
1298
- }
1299
- let r = "";
1300
- for (let s = 0; s < n.length; s++) {
1301
- const o = n[s];
1302
- r += o.html;
1303
- const d = n[s + 1];
1304
- d && o.type !== "block" && d.type !== "block" && (r += `
1305
- `);
1306
- }
1307
- return r;
1308
- }
1309
- const Wt = {
1230
+ const Ht = /* @__PURE__ */ B(bt, [["render", Pt], ["__scopeId", "data-v-bd89bc8f"]]), zt = {
1310
1231
  name: "WmArtifactFormResponse",
1311
1232
  props: {
1312
1233
  data: { type: Object, required: !0 }
@@ -1317,11 +1238,11 @@ const Wt = {
1317
1238
  return Array.isArray((t = this.data) == null ? void 0 : t.fields) ? this.data.fields : [];
1318
1239
  }
1319
1240
  }
1320
- }, Gt = { class: "wm-art wm-art--formResponse" }, Kt = { class: "wm-art__head" }, Yt = { class: "wm-art__title" }, Jt = { class: "wm-art__body" }, Xt = { class: "wm-art__fieldLabel" };
1321
- function Qt(t, e, n, a, r, s) {
1322
- return l(), c("div", Gt, [
1323
- i("div", Kt, [
1324
- i("div", Yt, b(n.data.title || "Formulaire"), 1),
1241
+ }, Vt = { class: "wm-art wm-art--formResponse" }, qt = { class: "wm-art__head" }, Wt = { class: "wm-art__title" }, Gt = { class: "wm-art__body" }, Kt = { class: "wm-art__fieldLabel" };
1242
+ function Yt(t, e, n, a, r, s) {
1243
+ return l(), c("div", Vt, [
1244
+ i("div", qt, [
1245
+ i("div", Wt, b(n.data.title || "Formulaire"), 1),
1325
1246
  e[0] || (e[0] = i("span", { class: "wm-art__badge wm-art__badge--success" }, [
1326
1247
  i("svg", {
1327
1248
  width: "11",
@@ -1339,12 +1260,12 @@ function Qt(t, e, n, a, r, s) {
1339
1260
  se(" Envoyé ")
1340
1261
  ], -1))
1341
1262
  ]),
1342
- i("div", Jt, [
1343
- (l(!0), c(T, null, F(s.fields, (o, d) => (l(), c("div", {
1263
+ i("div", Gt, [
1264
+ (l(!0), c(M, null, F(s.fields, (o, d) => (l(), c("div", {
1344
1265
  key: d,
1345
1266
  class: "wm-art__field"
1346
1267
  }, [
1347
- i("div", Xt, b(o.label), 1),
1268
+ i("div", Kt, b(o.label), 1),
1348
1269
  i("div", {
1349
1270
  class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1350
1271
  }, b(o.value), 3)
@@ -1352,7 +1273,7 @@ function Qt(t, e, n, a, r, s) {
1352
1273
  ])
1353
1274
  ]);
1354
1275
  }
1355
- const Zt = /* @__PURE__ */ B(Wt, [["render", Qt], ["__scopeId", "data-v-812bda8b"]]), en = {
1276
+ const Jt = /* @__PURE__ */ B(zt, [["render", Yt], ["__scopeId", "data-v-812bda8b"]]), Xt = {
1356
1277
  name: "WmArtifactInfoCard",
1357
1278
  props: {
1358
1279
  data: { type: Object, required: !0 }
@@ -1367,45 +1288,45 @@ const Zt = /* @__PURE__ */ B(Wt, [["render", Qt], ["__scopeId", "data-v-812bda8b
1367
1288
  return !!((t = this.data) != null && t.body) || this.fields.length > 0;
1368
1289
  }
1369
1290
  }
1370
- }, tn = { class: "wm-art wm-art--infoCard" }, nn = {
1291
+ }, Qt = { class: "wm-art wm-art--infoCard" }, Zt = {
1371
1292
  key: 0,
1372
1293
  class: "wm-art__image"
1373
- }, sn = ["src", "alt"], rn = { class: "wm-art__head" }, an = { class: "wm-art__headMain" }, on = { class: "wm-art__title" }, ln = {
1294
+ }, en = ["src", "alt"], tn = { class: "wm-art__head" }, nn = { class: "wm-art__headMain" }, sn = { class: "wm-art__title" }, rn = {
1374
1295
  key: 0,
1375
1296
  class: "wm-art__subtitle"
1376
- }, cn = {
1297
+ }, an = {
1377
1298
  key: 1,
1378
1299
  class: "wm-art__body"
1379
- }, dn = {
1300
+ }, on = {
1380
1301
  key: 0,
1381
1302
  class: "wm-art__text"
1382
- }, un = { class: "wm-art__fieldLabel" };
1383
- function hn(t, e, n, a, r, s) {
1384
- return l(), c("div", tn, [
1385
- n.data.image_url ? (l(), c("figure", nn, [
1303
+ }, ln = { class: "wm-art__fieldLabel" };
1304
+ function cn(t, e, n, a, r, s) {
1305
+ return l(), c("div", Qt, [
1306
+ n.data.image_url ? (l(), c("figure", Zt, [
1386
1307
  i("img", {
1387
1308
  src: n.data.image_url,
1388
1309
  alt: n.data.title || "",
1389
1310
  loading: "lazy"
1390
- }, null, 8, sn)
1311
+ }, null, 8, en)
1391
1312
  ])) : y("", !0),
1392
- i("div", rn, [
1393
- i("div", an, [
1394
- i("div", on, b(n.data.title), 1),
1395
- n.data.subtitle ? (l(), c("div", ln, b(n.data.subtitle), 1)) : y("", !0)
1313
+ i("div", tn, [
1314
+ i("div", nn, [
1315
+ i("div", sn, b(n.data.title), 1),
1316
+ n.data.subtitle ? (l(), c("div", rn, b(n.data.subtitle), 1)) : y("", !0)
1396
1317
  ]),
1397
1318
  n.data.badge && n.data.badge.label ? (l(), c("span", {
1398
1319
  key: 0,
1399
1320
  class: E(["wm-art__badge", `wm-art__badge--${n.data.badge.tone || "neutral"}`])
1400
1321
  }, b(n.data.badge.label), 3)) : y("", !0)
1401
1322
  ]),
1402
- s.hasBody ? (l(), c("div", cn, [
1403
- n.data.body ? (l(), c("div", dn, b(n.data.body), 1)) : y("", !0),
1404
- s.fields.length ? (l(!0), c(T, { key: 1 }, F(s.fields, (o, d) => (l(), c("div", {
1323
+ s.hasBody ? (l(), c("div", an, [
1324
+ n.data.body ? (l(), c("div", on, b(n.data.body), 1)) : y("", !0),
1325
+ s.fields.length ? (l(!0), c(M, { key: 1 }, F(s.fields, (o, d) => (l(), c("div", {
1405
1326
  key: d,
1406
1327
  class: "wm-art__field"
1407
1328
  }, [
1408
- i("div", un, b(o.label), 1),
1329
+ i("div", ln, b(o.label), 1),
1409
1330
  i("div", {
1410
1331
  class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1411
1332
  }, b(o.value), 3)
@@ -1413,15 +1334,15 @@ function hn(t, e, n, a, r, s) {
1413
1334
  ])) : y("", !0)
1414
1335
  ]);
1415
1336
  }
1416
- const mn = /* @__PURE__ */ B(en, [["render", hn], ["__scopeId", "data-v-d7369333"]]);
1417
- function fn(t) {
1337
+ const dn = /* @__PURE__ */ B(Xt, [["render", cn], ["__scopeId", "data-v-d7369333"]]);
1338
+ function un(t) {
1418
1339
  if (!t) return "";
1419
1340
  const e = new Date(t);
1420
1341
  if (Number.isNaN(e.getTime())) return t;
1421
1342
  const n = e.toLocaleDateString("fr-FR", { day: "numeric", month: "long", year: "numeric" }), a = e.toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
1422
1343
  return `${n} à ${a}`;
1423
1344
  }
1424
- const _n = {
1345
+ const hn = {
1425
1346
  name: "WmArtifactTicket",
1426
1347
  props: {
1427
1348
  data: { type: Object, required: !0 }
@@ -1431,13 +1352,9 @@ const _n = {
1431
1352
  var t;
1432
1353
  return Array.isArray((t = this.data) == null ? void 0 : t.fields) ? this.data.fields : [];
1433
1354
  },
1434
- hasBody() {
1435
- var t;
1436
- return !!((t = this.data) != null && t.body) || this.fields.length > 0;
1437
- },
1438
1355
  formattedDate() {
1439
1356
  var t;
1440
- return fn((t = this.data) == null ? void 0 : t.created_at);
1357
+ return un((t = this.data) == null ? void 0 : t.created_at);
1441
1358
  }
1442
1359
  },
1443
1360
  methods: {
@@ -1454,22 +1371,22 @@ const _n = {
1454
1371
  return /high|haute|élev|elev|critic|critiq|urgent/.test(e) ? 3 : /low|basse|faible|minor/.test(e) ? 1 : 2;
1455
1372
  }
1456
1373
  }
1457
- }, pn = { class: "wm-art wm-art--ticket" }, vn = { class: "wm-art__head wm-tk__head" }, yn = { class: "wm-art__title wm-tk__title" }, gn = { class: "wm-tk__sub" }, wn = { class: "wm-tk__ref" }, bn = {
1458
- key: 0,
1459
- class: "wm-art__body"
1460
- }, kn = {
1374
+ }, mn = { class: "wm-art wm-art--ticket" }, fn = { class: "wm-art__head wm-tk__head" }, _n = { class: "wm-art__title wm-tk__title" }, pn = { class: "wm-tk__sub" }, vn = { class: "wm-tk__ref" }, gn = {
1461
1375
  key: 0,
1462
1376
  class: "wm-tk__text"
1463
- }, Cn = { class: "wm-art__fieldLabel" }, An = ["data-level"], Sn = {
1377
+ }, yn = {
1378
+ key: 0,
1379
+ class: "wm-art__body"
1380
+ }, wn = { class: "wm-art__fieldLabel" }, bn = ["data-level"], kn = {
1464
1381
  key: 1,
1465
1382
  class: "wm-art__footer wm-tk__footer"
1466
1383
  };
1467
- function xn(t, e, n, a, r, s) {
1468
- return l(), c("div", pn, [
1469
- i("div", vn, [
1470
- i("div", yn, b(n.data.title), 1),
1471
- i("div", gn, [
1472
- i("div", wn, [
1384
+ function Cn(t, e, n, a, r, s) {
1385
+ return l(), c("div", mn, [
1386
+ i("div", fn, [
1387
+ i("div", _n, b(n.data.title), 1),
1388
+ i("div", pn, [
1389
+ i("div", vn, [
1473
1390
  e[0] || (e[0] = i("svg", {
1474
1391
  width: "11",
1475
1392
  height: "11",
@@ -1495,15 +1412,15 @@ function xn(t, e, n, a, r, s) {
1495
1412
  }, null, -1)),
1496
1413
  se(" " + b(n.data.status.label), 1)
1497
1414
  ], 2)
1498
- ])
1415
+ ]),
1416
+ n.data.body ? (l(), c("div", gn, b(n.data.body), 1)) : y("", !0)
1499
1417
  ]),
1500
- s.hasBody ? (l(), c("div", bn, [
1501
- n.data.body ? (l(), c("div", kn, b(n.data.body), 1)) : y("", !0),
1502
- s.fields.length ? (l(!0), c(T, { key: 1 }, F(s.fields, (o, d) => (l(), c("div", {
1418
+ s.fields.length ? (l(), c("div", yn, [
1419
+ (l(!0), c(M, null, F(s.fields, (o, d) => (l(), c("div", {
1503
1420
  key: d,
1504
1421
  class: "wm-art__field"
1505
1422
  }, [
1506
- i("div", Cn, b(o.label), 1),
1423
+ i("div", wn, b(o.label), 1),
1507
1424
  i("div", {
1508
1425
  class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1509
1426
  }, [
@@ -1537,12 +1454,12 @@ function xn(t, e, n, a, r, s) {
1537
1454
  height: "9",
1538
1455
  rx: "0.5"
1539
1456
  }, null, -1)
1540
- ])], 8, An)) : y("", !0),
1457
+ ])], 8, bn)) : y("", !0),
1541
1458
  i("span", null, b(o.value), 1)
1542
1459
  ], 2)
1543
- ]))), 128)) : y("", !0)
1460
+ ]))), 128))
1544
1461
  ])) : y("", !0),
1545
- n.data.created_at ? (l(), c("div", Sn, [
1462
+ n.data.created_at ? (l(), c("div", kn, [
1546
1463
  e[3] || (e[3] = i("svg", {
1547
1464
  width: "11",
1548
1465
  height: "11",
@@ -1567,11 +1484,11 @@ function xn(t, e, n, a, r, s) {
1567
1484
  ])) : y("", !0)
1568
1485
  ]);
1569
1486
  }
1570
- const Mn = /* @__PURE__ */ B(_n, [["render", xn], ["__scopeId", "data-v-f0495924"]]), Tn = {
1571
- form_response: Zt,
1572
- info_card: mn,
1573
- ticket: Mn
1574
- }, On = {
1487
+ const An = /* @__PURE__ */ B(hn, [["render", Cn], ["__scopeId", "data-v-1253a996"]]), Sn = {
1488
+ form_response: Jt,
1489
+ info_card: dn,
1490
+ ticket: An
1491
+ }, xn = {
1575
1492
  name: "WmArtifactRenderer",
1576
1493
  props: {
1577
1494
  // Forme : { kind: string, data: any } (le `data` est validé
@@ -1582,95 +1499,114 @@ const Mn = /* @__PURE__ */ B(_n, [["render", xn], ["__scopeId", "data-v-f0495924
1582
1499
  component() {
1583
1500
  var e;
1584
1501
  const t = (e = this.artifact) == null ? void 0 : e.kind;
1585
- return t && Tn[t] || null;
1502
+ return t && Sn[t] || null;
1586
1503
  }
1587
1504
  }
1588
1505
  };
1589
- function In(t, e, n, a, r, s) {
1590
- return s.component ? (l(), $(Oe(s.component), {
1506
+ function Mn(t, e, n, a, r, s) {
1507
+ return s.component ? (l(), $(Te(s.component), {
1591
1508
  key: 0,
1592
1509
  data: n.artifact.data
1593
1510
  }, null, 8, ["data"])) : y("", !0);
1594
1511
  }
1595
- const Ae = /* @__PURE__ */ B(On, [["render", In]]), En = {
1512
+ const Ce = /* @__PURE__ */ B(xn, [["render", Mn]]);
1513
+ function Tn(t) {
1514
+ return typeof t != "string" ? "" : t.replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)", "g"), "$1").replace(/__([^_]+)__/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\s+/g, " ").trim();
1515
+ }
1516
+ const On = {
1596
1517
  name: "WmActionResult",
1597
- components: { ArtifactRenderer: Ae },
1518
+ components: { ArtifactRenderer: Ce },
1598
1519
  props: {
1599
1520
  state: { type: String, default: "success" },
1600
1521
  // 'success' | 'failure' | 'rejected'
1601
1522
  label: { type: String, required: !0 },
1602
1523
  detail: { type: String, default: "" },
1603
- // Artifact attaché au résultat (forme `{ kind, data }`, posé par
1604
- // le sub-agent via `set_result_artifact`). `null` si rien à afficher.
1605
1524
  artifact: { type: Object, default: null }
1606
1525
  },
1607
1526
  computed: {
1608
- ok() {
1609
- return this.state === "success";
1610
- },
1611
- // Sub-agent summaries arrive as free-form text often containing
1612
- // bullet lists / bold emphasis / inline code. Render them through
1613
- // the shared markdown pipeline so they read like the chat bubbles.
1614
- detailHtml() {
1615
- return Ce(this.detail);
1527
+ detailText() {
1528
+ return Tn(this.detail);
1616
1529
  }
1617
1530
  }
1618
- }, Bn = { class: "wm-result-wrap" }, Ln = { class: "wm-result" }, Rn = {
1531
+ }, In = { class: "wm-result-wrap" }, En = {
1532
+ class: "wm-result__icon",
1533
+ "aria-hidden": "true"
1534
+ }, Bn = {
1619
1535
  key: 0,
1620
- width: "10",
1621
- height: "10",
1536
+ width: "11",
1537
+ height: "11",
1622
1538
  viewBox: "0 0 24 24",
1623
1539
  fill: "none",
1624
- stroke: "#fff",
1625
- "stroke-width": "2.5",
1540
+ stroke: "currentColor",
1541
+ "stroke-width": "2.8",
1626
1542
  "stroke-linecap": "round",
1627
- "stroke-linejoin": "round",
1628
- "aria-hidden": "true"
1629
- }, $n = {
1543
+ "stroke-linejoin": "round"
1544
+ }, Ln = {
1630
1545
  key: 1,
1631
- width: "10",
1632
- height: "10",
1546
+ width: "11",
1547
+ height: "11",
1633
1548
  viewBox: "0 0 24 24",
1634
1549
  fill: "none",
1635
1550
  stroke: "currentColor",
1636
- "stroke-width": "2.5",
1551
+ "stroke-width": "2.6",
1637
1552
  "stroke-linecap": "round",
1638
- "stroke-linejoin": "round",
1639
- "aria-hidden": "true"
1640
- }, Fn = { class: "wm-result__body" }, jn = ["innerHTML"], Un = {
1553
+ "stroke-linejoin": "round"
1554
+ }, Rn = {
1555
+ key: 2,
1556
+ width: "12",
1557
+ height: "12",
1558
+ viewBox: "0 0 24 24",
1559
+ fill: "none",
1560
+ stroke: "currentColor",
1561
+ "stroke-width": "2.2",
1562
+ "stroke-linecap": "round",
1563
+ "stroke-linejoin": "round"
1564
+ }, $n = { class: "wm-result__label" }, Fn = { class: "wm-result__detail" }, jn = {
1641
1565
  key: 0,
1642
1566
  class: "wm-result-art"
1643
1567
  };
1644
- function Dn(t, e, n, a, r, s) {
1568
+ function Un(t, e, n, a, r, s) {
1645
1569
  const o = I("ArtifactRenderer");
1646
- return l(), c("div", Bn, [
1647
- i("div", Ln, [
1648
- i("div", {
1649
- class: E(["wm-result__check", { "wm-result__check--ok": s.ok }])
1650
- }, [
1651
- s.ok ? (l(), c("svg", Rn, [...e[0] || (e[0] = [
1570
+ return l(), c("div", In, [
1571
+ i("div", {
1572
+ class: E(["wm-result", `wm-result--${n.state}`])
1573
+ }, [
1574
+ i("span", En, [
1575
+ n.state === "success" ? (l(), c("svg", Bn, [...e[0] || (e[0] = [
1652
1576
  i("path", { d: "M20 6L9 17l-5-5" }, null, -1)
1653
- ])])) : (l(), c("svg", $n, [...e[1] || (e[1] = [
1577
+ ])])) : n.state === "rejected" ? (l(), c("svg", Ln, [...e[1] || (e[1] = [
1654
1578
  i("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
1579
+ ])])) : (l(), c("svg", Rn, [...e[2] || (e[2] = [
1580
+ i("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
1581
+ i("line", {
1582
+ x1: "12",
1583
+ y1: "9",
1584
+ x2: "12",
1585
+ y2: "13"
1586
+ }, null, -1),
1587
+ i("line", {
1588
+ x1: "12",
1589
+ y1: "17",
1590
+ x2: "12.01",
1591
+ y2: "17"
1592
+ }, null, -1)
1655
1593
  ])]))
1656
- ], 2),
1657
- i("div", Fn, [
1658
- i("div", {
1659
- class: E(["wm-result__label", { "wm-result__label--struck": !s.ok }])
1660
- }, b(n.label), 3),
1661
- n.detail ? (l(), c("div", {
1662
- key: 0,
1663
- class: "wm-result__detail",
1664
- innerHTML: s.detailHtml
1665
- }, null, 8, jn)) : y("", !0)
1666
- ])
1667
- ]),
1668
- n.artifact ? (l(), c("div", Un, [
1594
+ ]),
1595
+ i("span", $n, b(n.label), 1),
1596
+ s.detailText ? (l(), c(M, { key: 0 }, [
1597
+ e[3] || (e[3] = i("span", {
1598
+ class: "wm-result__sep",
1599
+ "aria-hidden": "true"
1600
+ }, "·", -1)),
1601
+ i("span", Fn, b(s.detailText), 1)
1602
+ ], 64)) : y("", !0)
1603
+ ], 2),
1604
+ n.artifact ? (l(), c("div", jn, [
1669
1605
  P(o, { artifact: n.artifact }, null, 8, ["artifact"])
1670
1606
  ])) : y("", !0)
1671
1607
  ]);
1672
1608
  }
1673
- const Nn = /* @__PURE__ */ B(En, [["render", Dn], ["__scopeId", "data-v-037fd69e"]]), Pn = {
1609
+ const Dn = /* @__PURE__ */ B(On, [["render", Un], ["__scopeId", "data-v-6cd32022"]]), Nn = {
1674
1610
  name: "WmAttachmentPreview",
1675
1611
  inject: {
1676
1612
  signAttachmentFn: { default: null }
@@ -1724,15 +1660,15 @@ const Nn = /* @__PURE__ */ B(En, [["render", Dn], ["__scopeId", "data-v-037fd69e
1724
1660
  this.url || t.preventDefault();
1725
1661
  }
1726
1662
  }
1727
- }, Hn = ["href"], zn = ["src", "alt"], Vn = ["src"], qn = ["src"], Wn = ["href", "download"], Gn = { class: "wm-att__main" }, Kn = { class: "wm-att__name" }, Yn = {
1663
+ }, Pn = ["href"], Hn = ["src", "alt"], zn = ["src"], Vn = ["src"], qn = ["href", "download"], Wn = { class: "wm-att__main" }, Gn = { class: "wm-att__name" }, Kn = {
1728
1664
  key: 0,
1729
1665
  class: "wm-att__meta"
1730
- }, Jn = {
1666
+ }, Yn = {
1731
1667
  key: 0,
1732
1668
  class: "wm-att__spin",
1733
1669
  "aria-hidden": "true"
1734
1670
  };
1735
- function Xn(t, e, n, a, r, s) {
1671
+ function Jn(t, e, n, a, r, s) {
1736
1672
  return l(), c("div", {
1737
1673
  class: E(["wm-att", ["wm-att--" + (s.kind || "file")]])
1738
1674
  }, [
@@ -1747,18 +1683,18 @@ function Xn(t, e, n, a, r, s) {
1747
1683
  src: r.url,
1748
1684
  alt: s.displayName,
1749
1685
  loading: "lazy"
1750
- }, null, 8, zn)
1751
- ], 8, Hn)) : s.kind === "audio" && r.url ? (l(), c("audio", {
1686
+ }, null, 8, Hn)
1687
+ ], 8, Pn)) : s.kind === "audio" && r.url ? (l(), c("audio", {
1752
1688
  key: 1,
1753
1689
  src: r.url,
1754
1690
  controls: "",
1755
1691
  preload: "metadata"
1756
- }, null, 8, Vn)) : s.kind === "video" && r.url ? (l(), c("video", {
1692
+ }, null, 8, zn)) : s.kind === "video" && r.url ? (l(), c("video", {
1757
1693
  key: 2,
1758
1694
  src: r.url,
1759
1695
  controls: "",
1760
1696
  preload: "metadata"
1761
- }, null, 8, qn)) : (l(), c("a", {
1697
+ }, null, 8, Vn)) : (l(), c("a", {
1762
1698
  key: 3,
1763
1699
  class: "wm-att__file",
1764
1700
  href: r.url || "#",
@@ -1783,15 +1719,94 @@ function Xn(t, e, n, a, r, s) {
1783
1719
  i("path", { d: "M14 2v6h6" })
1784
1720
  ])
1785
1721
  ], -1)),
1786
- i("span", Gn, [
1787
- i("span", Kn, b(s.displayName), 1),
1788
- s.sizeLabel ? (l(), c("span", Yn, b(s.sizeLabel), 1)) : y("", !0)
1722
+ i("span", Wn, [
1723
+ i("span", Gn, b(s.displayName), 1),
1724
+ s.sizeLabel ? (l(), c("span", Kn, b(s.sizeLabel), 1)) : y("", !0)
1789
1725
  ]),
1790
- r.loading ? (l(), c("span", Jn)) : y("", !0)
1791
- ], 8, Wn))
1726
+ r.loading ? (l(), c("span", Yn)) : y("", !0)
1727
+ ], 8, qn))
1792
1728
  ], 2);
1793
1729
  }
1794
- const Qn = /* @__PURE__ */ B(Pn, [["render", Xn], ["__scopeId", "data-v-1cd1267b"]]), Zn = {
1730
+ const Xn = /* @__PURE__ */ B(Nn, [["render", Jn], ["__scopeId", "data-v-1cd1267b"]]);
1731
+ function Qn(t) {
1732
+ return String(t).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1733
+ }
1734
+ function Zn(t) {
1735
+ return /^(https?:\/\/|mailto:|tel:)/i.test(String(t).trim());
1736
+ }
1737
+ const pe = "";
1738
+ function ee(t) {
1739
+ let e = t;
1740
+ const n = [];
1741
+ return e = e.replace(/`([^`\n]+)`/g, (a, r) => {
1742
+ const s = n.length;
1743
+ return n.push(r), `${pe}CODE${s}${pe}`;
1744
+ }), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) => Zn(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), e = e.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), e = e.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), e = e.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), e = e.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), e = e.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), e = e.replace(/CODE(\d+)/g, (a, r) => `<code class="wm-md-code">${n[+r]}</code>`), e;
1745
+ }
1746
+ function es(t) {
1747
+ if (!t) return "";
1748
+ const e = Qn(t).split(`
1749
+ `), n = [];
1750
+ let a = 0;
1751
+ for (; a < e.length; ) {
1752
+ const s = e[a];
1753
+ if (/^\s*```([\w-]*)\s*$/.exec(s)) {
1754
+ a++;
1755
+ const C = [];
1756
+ for (; a < e.length && !/^\s*```\s*$/.test(e[a]); )
1757
+ C.push(e[a]), a++;
1758
+ a < e.length && a++, n.push({
1759
+ type: "block",
1760
+ html: `<pre class="wm-md-pre"><code>${C.join(`
1761
+ `)}</code></pre>`
1762
+ });
1763
+ continue;
1764
+ }
1765
+ if (/^\s*[-*]\s+/.test(s)) {
1766
+ const C = [];
1767
+ for (; a < e.length; ) {
1768
+ const S = /^\s*[-*]\s+(.*)$/.exec(e[a]);
1769
+ if (!S) break;
1770
+ C.push(S[1]), a++;
1771
+ }
1772
+ const w = C.map((S) => `<li>${ee(S)}</li>`).join("");
1773
+ n.push({ type: "block", html: `<ul class="wm-md-ul">${w}</ul>` });
1774
+ continue;
1775
+ }
1776
+ const d = /^\s*(\d+)\.\s+(.*)$/.exec(s);
1777
+ if (d) {
1778
+ const C = parseInt(d[1], 10), w = [d[2]];
1779
+ for (a++; a < e.length; ) {
1780
+ const A = /^\s*\d+\.\s+(.*)$/.exec(e[a]);
1781
+ if (!A) break;
1782
+ w.push(A[1]), a++;
1783
+ }
1784
+ const S = w.map((A) => `<li>${ee(A)}</li>`).join(""), L = C !== 1 ? ` start="${C}"` : "";
1785
+ n.push({ type: "block", html: `<ol class="wm-md-ol"${L}>${S}</ol>` });
1786
+ continue;
1787
+ }
1788
+ const v = /^(#{1,6})\s+(.*)$/.exec(s);
1789
+ if (v) {
1790
+ const C = v[1].length;
1791
+ n.push({
1792
+ type: "block",
1793
+ html: `<h${C} class="wm-md-h wm-md-h${C}">${ee(v[2])}</h${C}>`
1794
+ }), a++;
1795
+ continue;
1796
+ }
1797
+ n.push({ type: "text", html: ee(s) }), a++;
1798
+ }
1799
+ let r = "";
1800
+ for (let s = 0; s < n.length; s++) {
1801
+ const o = n[s];
1802
+ r += o.html;
1803
+ const d = n[s + 1];
1804
+ d && o.type !== "block" && d.type !== "block" && (r += `
1805
+ `);
1806
+ }
1807
+ return r;
1808
+ }
1809
+ const ts = {
1795
1810
  name: "WmBubble",
1796
1811
  props: {
1797
1812
  role: { type: String, default: "ai" },
@@ -1800,41 +1815,41 @@ const Qn = /* @__PURE__ */ B(Pn, [["render", Xn], ["__scopeId", "data-v-1cd1267b
1800
1815
  },
1801
1816
  computed: {
1802
1817
  rendered() {
1803
- return Ce(this.text);
1818
+ return es(this.text);
1804
1819
  }
1805
1820
  }
1806
- }, es = ["innerHTML"];
1807
- function ts(t, e, n, a, r, s) {
1821
+ }, ns = ["innerHTML"];
1822
+ function ss(t, e, n, a, r, s) {
1808
1823
  return l(), c("div", {
1809
1824
  class: E(["wm-bubble", "wm-bubble--" + n.role])
1810
1825
  }, [
1811
- Ie(t.$slots, "default", {}, () => [
1812
- i("span", { innerHTML: s.rendered }, null, 8, es)
1826
+ Oe(t.$slots, "default", {}, () => [
1827
+ i("span", { innerHTML: s.rendered }, null, 8, ns)
1813
1828
  ], !0)
1814
1829
  ], 2);
1815
1830
  }
1816
- const ns = /* @__PURE__ */ B(Zn, [["render", ts], ["__scopeId", "data-v-c52bb028"]]), ss = { name: "WmTyping" }, rs = { class: "wm-typing" };
1817
- function is(t, e, n, a, r, s) {
1818
- return l(), c("div", rs, [...e[0] || (e[0] = [
1831
+ const rs = /* @__PURE__ */ B(ts, [["render", ss], ["__scopeId", "data-v-c52bb028"]]), is = { name: "WmTyping" }, as = { class: "wm-typing" };
1832
+ function os(t, e, n, a, r, s) {
1833
+ return l(), c("div", as, [...e[0] || (e[0] = [
1819
1834
  i("span", { style: { "animation-delay": "0s" } }, null, -1),
1820
1835
  i("span", { style: { "animation-delay": "0.2s" } }, null, -1),
1821
1836
  i("span", { style: { "animation-delay": "0.4s" } }, null, -1)
1822
1837
  ])]);
1823
1838
  }
1824
- const as = /* @__PURE__ */ B(ss, [["render", is], ["__scopeId", "data-v-df2447fd"]]);
1839
+ const ls = /* @__PURE__ */ B(is, [["render", os], ["__scopeId", "data-v-df2447fd"]]);
1825
1840
  function ce(t) {
1826
1841
  return t ? t.client_msg_id || t.id : "";
1827
1842
  }
1828
- const os = {
1843
+ const cs = {
1829
1844
  transferred_to_human: "Conversation transférée à un humain",
1830
1845
  assigned: "{name} a rejoint la conversation",
1831
1846
  unassigned: "L'agent a quitté la conversation",
1832
1847
  resolved: "Conversation résolue",
1833
1848
  reopened: "Conversation rouverte",
1834
1849
  idle: "Conversation en pause"
1835
- }, ls = 80, cs = 200, ds = {
1850
+ }, ds = 80, us = 200, hs = {
1836
1851
  name: "WmMessageList",
1837
- components: { AIAvatar: J, HumanAvatar: ke, Bubble: ns, Typing: as, ActionResult: Nn, AttachmentPreview: Qn, ArtifactRenderer: Ae },
1852
+ components: { AIAvatar: J, HumanAvatar: ke, Bubble: rs, Typing: ls, ActionResult: Dn, AttachmentPreview: Xn, ArtifactRenderer: Ce },
1838
1853
  props: {
1839
1854
  messages: { type: Array, default: () => [] },
1840
1855
  streamingActive: { type: Boolean, default: !1 },
@@ -1920,11 +1935,11 @@ const os = {
1920
1935
  methods: {
1921
1936
  messageKey: ce,
1922
1937
  isAtBottom(t) {
1923
- return t.scrollHeight - t.scrollTop - t.clientHeight <= ls;
1938
+ return t.scrollHeight - t.scrollTop - t.clientHeight <= ds;
1924
1939
  },
1925
1940
  onScroll() {
1926
1941
  const t = this.$refs.scrollEl;
1927
- t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <= cs && (this._pendingLoadMore = !0, this.$emit("load-more")));
1942
+ t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <= us && (this._pendingLoadMore = !0, this.$emit("load-more")));
1928
1943
  },
1929
1944
  // Capture pre-patch scroll state and restore it on the next tick.
1930
1945
  //
@@ -2022,7 +2037,7 @@ const os = {
2022
2037
  // logic. `null` means the item renders nothing (no body, no
2023
2038
  // bubble) and shouldn't count as a neighbour.
2024
2039
  itemKindOf(t) {
2025
- return t ? t.type === "action" && t.payload && t.payload.state !== "pending" || this.artifactOf(t) ? "card" : t.text_md ? "bubble" : null : null;
2040
+ return t ? t.type === "action" && t.payload && t.payload.state !== "pending" ? "bubble" : this.artifactOf(t) ? "card" : t.text_md ? "bubble" : null : null;
2026
2041
  },
2027
2042
  // Per-corner border radius for an item inside a multi-item
2028
2043
  // cluster. Geometric model:
@@ -2096,7 +2111,7 @@ const os = {
2096
2111
  },
2097
2112
  systemLabel(t) {
2098
2113
  var r, s, o;
2099
- const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n = os[e] || (t == null ? void 0 : t.text_md) || "Mise à jour de la conversation", a = ((s = t == null ? void 0 : t.metadata) == null ? void 0 : s.agent_name) || ((o = t == null ? void 0 : t.author) == null ? void 0 : o.name) || "";
2114
+ const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n = cs[e] || (t == null ? void 0 : t.text_md) || "Mise à jour de la conversation", a = ((s = t == null ? void 0 : t.metadata) == null ? void 0 : s.agent_name) || ((o = t == null ? void 0 : t.author) == null ? void 0 : o.name) || "";
2100
2115
  return n.replace("{name}", a || "Un agent");
2101
2116
  },
2102
2117
  scrollToBottom() {
@@ -2104,59 +2119,59 @@ const os = {
2104
2119
  t && (t.scrollTop = t.scrollHeight);
2105
2120
  }
2106
2121
  }
2107
- }, us = {
2122
+ }, ms = {
2108
2123
  key: 0,
2109
2124
  class: "wm-list__loadMore",
2110
2125
  role: "status",
2111
2126
  "aria-live": "polite"
2112
- }, hs = {
2127
+ }, fs = {
2113
2128
  key: 1,
2114
2129
  class: "wm-list__historyEnd"
2115
- }, ms = {
2130
+ }, _s = {
2116
2131
  key: 2,
2117
2132
  class: "wm-list__sep"
2118
- }, fs = { class: "wm-list__sep-label" }, _s = {
2133
+ }, ps = { class: "wm-list__sep-label" }, vs = {
2119
2134
  key: 0,
2120
2135
  class: "wm-list__sep wm-list__sep--unread"
2121
- }, ps = {
2136
+ }, gs = {
2122
2137
  key: 0,
2123
2138
  class: "wm-list__sysep"
2124
- }, vs = { class: "wm-list__sysep-label" }, ys = {
2139
+ }, ys = { class: "wm-list__sysep-label" }, ws = {
2125
2140
  key: 0,
2126
2141
  class: "wm-list__avatarSlot"
2127
- }, gs = {
2142
+ }, bs = {
2128
2143
  key: 3,
2129
2144
  class: "wm-list__body"
2130
- }, ws = { key: 0 }, bs = {
2145
+ }, ks = { key: 0 }, Cs = {
2131
2146
  key: 1,
2132
2147
  "aria-hidden": "true"
2133
- }, ks = { key: 2 }, Cs = {
2148
+ }, As = { key: 2 }, Ss = {
2134
2149
  key: 3,
2135
2150
  class: "wm-list__row wm-list__row--ai fade-up"
2136
- }, As = { class: "wm-list__avatarSlot" };
2137
- function Ss(t, e, n, a, r, s) {
2151
+ }, xs = { class: "wm-list__avatarSlot" };
2152
+ function Ms(t, e, n, a, r, s) {
2138
2153
  const o = I("AIAvatar"), d = I("HumanAvatar"), v = I("ActionResult"), C = I("ArtifactRenderer"), w = I("Bubble"), S = I("AttachmentPreview"), L = I("Typing");
2139
2154
  return l(), c("div", {
2140
2155
  ref: "scrollEl",
2141
2156
  class: E(["wm-list", { "wm-list--silent": r.silentFades }]),
2142
2157
  onScrollPassive: e[0] || (e[0] = (...A) => s.onScroll && s.onScroll(...A))
2143
2158
  }, [
2144
- n.loadingMore ? (l(), c("div", us, [...e[1] || (e[1] = [
2159
+ n.loadingMore ? (l(), c("div", ms, [...e[1] || (e[1] = [
2145
2160
  i("span", {
2146
2161
  class: "wm-list__loadMore-spinner",
2147
2162
  "aria-hidden": "true"
2148
2163
  }, null, -1),
2149
2164
  i("span", { class: "wm-list__loadMore-lbl" }, "Chargement de l'historique…", -1)
2150
- ])])) : s.historyExhausted ? (l(), c("div", hs, "Début de la conversation")) : y("", !0),
2151
- n.dateLabel ? (l(), c("div", ms, [
2165
+ ])])) : s.historyExhausted ? (l(), c("div", fs, "Début de la conversation")) : y("", !0),
2166
+ n.dateLabel ? (l(), c("div", _s, [
2152
2167
  e[2] || (e[2] = i("div", { class: "wm-list__line" }, null, -1)),
2153
- i("span", fs, b(n.dateLabel), 1),
2168
+ i("span", ps, b(n.dateLabel), 1),
2154
2169
  e[3] || (e[3] = i("div", { class: "wm-list__line" }, null, -1))
2155
2170
  ])) : y("", !0),
2156
- (l(!0), c(T, null, F(s.groups, (A, D) => (l(), c(T, {
2171
+ (l(!0), c(M, null, F(s.groups, (A, D) => (l(), c(M, {
2157
2172
  key: A.key
2158
2173
  }, [
2159
- A.key === s.unreadGroupKey ? (l(), c("div", _s, [...e[4] || (e[4] = [
2174
+ A.key === s.unreadGroupKey ? (l(), c("div", vs, [...e[4] || (e[4] = [
2160
2175
  i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1),
2161
2176
  i("span", { class: "wm-list__sep-label wm-list__sep-label--unread" }, "Non lus", -1),
2162
2177
  i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)
@@ -2164,18 +2179,18 @@ function Ss(t, e, n, a, r, s) {
2164
2179
  i("div", {
2165
2180
  class: E(["wm-list__group", "wm-list__group--" + A.role])
2166
2181
  }, [
2167
- A.role === "system" ? (l(), c("div", ps, [
2182
+ A.role === "system" ? (l(), c("div", gs, [
2168
2183
  e[5] || (e[5] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
2169
- i("span", vs, b(A.systemLabel), 1),
2184
+ i("span", ys, b(A.systemLabel), 1),
2170
2185
  e[6] || (e[6] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
2171
- ])) : (l(), c(T, { key: 1 }, [
2172
- (l(!0), c(T, null, F(A.messages, (x, N) => (l(), c("div", {
2186
+ ])) : (l(), c(M, { key: 1 }, [
2187
+ (l(!0), c(M, null, F(A.messages, (x, N) => (l(), c("div", {
2173
2188
  key: s.messageKey(x),
2174
2189
  class: E(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x._pending, "is-failed": x._failed }]]),
2175
2190
  style: V(s.cornersStyle(A, N))
2176
2191
  }, [
2177
- A.role !== "user" ? (l(), c("div", ys, [
2178
- N === A.messages.length - 1 ? (l(), c(T, { key: 0 }, [
2192
+ A.role !== "user" ? (l(), c("div", ws, [
2193
+ N === A.messages.length - 1 ? (l(), c(M, { key: 0 }, [
2179
2194
  A.role === "ai" ? (l(), $(o, {
2180
2195
  key: 0,
2181
2196
  size: 26
@@ -2196,7 +2211,7 @@ function Ss(t, e, n, a, r, s) {
2196
2211
  }, null, 8, ["state", "label", "detail", "artifact"])) : s.artifactOf(x) ? (l(), $(C, {
2197
2212
  key: 2,
2198
2213
  artifact: s.artifactOf(x)
2199
- }, null, 8, ["artifact"])) : (l(), c("div", gs, [
2214
+ }, null, 8, ["artifact"])) : (l(), c("div", bs, [
2200
2215
  x.text_md ? (l(), $(w, {
2201
2216
  key: 0,
2202
2217
  role: A.role,
@@ -2206,7 +2221,7 @@ function Ss(t, e, n, a, r, s) {
2206
2221
  key: 1,
2207
2222
  class: E(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
2208
2223
  }, [
2209
- (l(!0), c(T, null, F(s.attachmentsOf(x), (j, H) => (l(), $(S, {
2224
+ (l(!0), c(M, null, F(s.attachmentsOf(x), (j, H) => (l(), $(S, {
2210
2225
  key: `${s.messageKey(x)}-att-${H}`,
2211
2226
  attachment: j
2212
2227
  }, null, 8, ["attachment"]))), 128))
@@ -2217,23 +2232,23 @@ function Ss(t, e, n, a, r, s) {
2217
2232
  key: 0,
2218
2233
  class: E(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
2219
2234
  }, [
2220
- A.role !== "user" ? (l(), c("span", ws, b(s.roleLabel(A)), 1)) : y("", !0),
2221
- A.role !== "user" && s.lastTimeOf(A) ? (l(), c("span", bs, "·")) : y("", !0),
2222
- s.lastTimeOf(A) ? (l(), c("span", ks, b(s.lastTimeOf(A)), 1)) : y("", !0)
2235
+ A.role !== "user" ? (l(), c("span", ks, b(s.roleLabel(A)), 1)) : y("", !0),
2236
+ A.role !== "user" && s.lastTimeOf(A) ? (l(), c("span", Cs, "·")) : y("", !0),
2237
+ s.lastTimeOf(A) ? (l(), c("span", As, b(s.lastTimeOf(A)), 1)) : y("", !0)
2223
2238
  ], 2)) : y("", !0)
2224
2239
  ], 64))
2225
2240
  ], 2)
2226
2241
  ], 64))), 128)),
2227
- n.streamingActive ? (l(), c("div", Cs, [
2228
- i("div", As, [
2242
+ n.streamingActive ? (l(), c("div", Ss, [
2243
+ i("div", xs, [
2229
2244
  P(o, { size: 26 })
2230
2245
  ]),
2231
2246
  P(L)
2232
2247
  ])) : y("", !0)
2233
2248
  ], 34);
2234
2249
  }
2235
- const xs = /* @__PURE__ */ B(ds, [["render", Ss], ["__scopeId", "data-v-195ed9b1"]]), te = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
2236
- function Ms() {
2250
+ const Ts = /* @__PURE__ */ B(hs, [["render", Ms], ["__scopeId", "data-v-0404f48d"]]), te = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
2251
+ function Os() {
2237
2252
  return he && [
2238
2253
  "video/webm;codecs=vp9,opus",
2239
2254
  "video/webm;codecs=vp8,opus",
@@ -2244,7 +2259,7 @@ function Ms() {
2244
2259
  return (a = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : a.call(n, e);
2245
2260
  }) || "";
2246
2261
  }
2247
- function Se({ audio: t }) {
2262
+ function Ae({ audio: t }) {
2248
2263
  return {
2249
2264
  video: !0,
2250
2265
  audio: !!t,
@@ -2253,19 +2268,19 @@ function Se({ audio: t }) {
2253
2268
  systemAudio: t ? "include" : "exclude"
2254
2269
  };
2255
2270
  }
2256
- function Di(t) {
2271
+ function Pi(t) {
2257
2272
  return t ? t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : "file" : "file";
2258
2273
  }
2259
- async function Ts() {
2274
+ async function Is() {
2260
2275
  if (!te) return null;
2261
2276
  let t;
2262
2277
  try {
2263
- t = await navigator.mediaDevices.getDisplayMedia(Se({ audio: !1 }));
2278
+ t = await navigator.mediaDevices.getDisplayMedia(Ae({ audio: !1 }));
2264
2279
  } catch (e) {
2265
2280
  return (e == null ? void 0 : e.name) !== "NotAllowedError" && console.error("[media] screenshot picker", e), null;
2266
2281
  }
2267
2282
  try {
2268
- return await Os(t);
2283
+ return await Es(t);
2269
2284
  } catch (e) {
2270
2285
  return console.error("[media] screenshot capture", e), null;
2271
2286
  } finally {
@@ -2274,7 +2289,7 @@ async function Ts() {
2274
2289
  });
2275
2290
  }
2276
2291
  }
2277
- async function Os(t) {
2292
+ async function Es(t) {
2278
2293
  const e = document.createElement("video");
2279
2294
  e.muted = !0, e.playsInline = !0, e.srcObject = t, await e.play(), await new Promise((d) => requestAnimationFrame(d));
2280
2295
  const n = e.videoWidth || 1280, a = e.videoHeight || 720, r = document.createElement("canvas");
@@ -2284,16 +2299,16 @@ async function Os(t) {
2284
2299
  }), o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
2285
2300
  return new File([s], `capture-${o}.png`, { type: "image/png" });
2286
2301
  }
2287
- async function Is(t = {}) {
2302
+ async function Bs(t = {}) {
2288
2303
  var C;
2289
2304
  if (!te || !he) return null;
2290
2305
  let e;
2291
2306
  try {
2292
- e = await navigator.mediaDevices.getDisplayMedia(Se({ audio: !0 }));
2307
+ e = await navigator.mediaDevices.getDisplayMedia(Ae({ audio: !0 }));
2293
2308
  } catch (w) {
2294
2309
  return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
2295
2310
  }
2296
- const n = Ms();
2311
+ const n = Os();
2297
2312
  let a;
2298
2313
  try {
2299
2314
  a = n ? new window.MediaRecorder(e, { mimeType: n }) : new window.MediaRecorder(e);
@@ -2345,7 +2360,7 @@ async function Is(t = {}) {
2345
2360
  }
2346
2361
  };
2347
2362
  }
2348
- const Es = [
2363
+ const Ls = [
2349
2364
  {
2350
2365
  action: "file",
2351
2366
  label: "Joindre un fichier",
@@ -2361,7 +2376,7 @@ const Es = [
2361
2376
  label: "Enregistrer l'écran",
2362
2377
  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"
2363
2378
  }
2364
- ], Bs = {
2379
+ ], Rs = {
2365
2380
  name: "WmComposer",
2366
2381
  props: {
2367
2382
  modelValue: { type: String, default: "" },
@@ -2384,7 +2399,7 @@ const Es = [
2384
2399
  return !this.disabled && !!this.local.trim();
2385
2400
  },
2386
2401
  attachItems() {
2387
- return Es.map((t) => ({
2402
+ return Ls.map((t) => ({
2388
2403
  ...t,
2389
2404
  disabled: t.action === "screenshot" && !te || t.action === "record" && (!te || !he)
2390
2405
  }));
@@ -2456,13 +2471,13 @@ const Es = [
2456
2471
  },
2457
2472
  async captureScreenshot() {
2458
2473
  if (this.disabled) return;
2459
- const t = await Ts();
2474
+ const t = await Is();
2460
2475
  t && this.$emit("attach", t);
2461
2476
  },
2462
2477
  async startRecording() {
2463
2478
  if (this.recording || this.disabled) return;
2464
2479
  this.recordingElapsed = 0;
2465
- const t = await Is({
2480
+ const t = await Bs({
2466
2481
  onstart: () => {
2467
2482
  this.recording = !0;
2468
2483
  },
@@ -2487,27 +2502,27 @@ const Es = [
2487
2502
  }
2488
2503
  }
2489
2504
  }
2490
- }, Ls = { class: "wm-compose-wrap" }, Rs = {
2505
+ }, $s = { class: "wm-compose-wrap" }, Fs = {
2491
2506
  key: 0,
2492
2507
  class: "wm-rec"
2493
- }, $s = { class: "wm-rec__lbl" }, Fs = {
2508
+ }, js = { class: "wm-rec__lbl" }, Us = {
2494
2509
  key: 1,
2495
2510
  class: "wm-compose__menu",
2496
2511
  role: "menu"
2497
- }, js = ["disabled", "onClick"], Us = { class: "wm-compose__menuIcon" }, Ds = {
2512
+ }, Ds = ["disabled", "onClick"], Ns = { class: "wm-compose__menuIcon" }, Ps = {
2498
2513
  viewBox: "0 0 24 24",
2499
2514
  width: "14",
2500
2515
  height: "14",
2501
2516
  "aria-hidden": "true"
2502
- }, Ns = ["d"], Ps = ["placeholder", "disabled"], Hs = { class: "wm-compose__actions" }, zs = ["title", "aria-label", "disabled"], Vs = ["disabled"];
2503
- function qs(t, e, n, a, r, s) {
2504
- return l(), c("div", Ls, [
2505
- r.recording ? (l(), c("div", Rs, [
2517
+ }, Hs = ["d"], zs = ["placeholder", "disabled"], Vs = { class: "wm-compose__actions" }, qs = ["title", "aria-label", "disabled"], Ws = ["disabled"];
2518
+ function Gs(t, e, n, a, r, s) {
2519
+ return l(), c("div", $s, [
2520
+ r.recording ? (l(), c("div", Fs, [
2506
2521
  e[8] || (e[8] = i("span", {
2507
2522
  class: "wm-rec__dot",
2508
2523
  "aria-hidden": "true"
2509
2524
  }, null, -1)),
2510
- i("span", $s, "Enregistrement · " + b(s.recordingElapsedLabel), 1),
2525
+ i("span", js, "Enregistrement · " + b(s.recordingElapsedLabel), 1),
2511
2526
  i("button", {
2512
2527
  type: "button",
2513
2528
  class: "wm-rec__stop",
@@ -2530,16 +2545,16 @@ function qs(t, e, n, a, r, s) {
2530
2545
  class: "wm-compose__overlay",
2531
2546
  onClick: e[2] || (e[2] = (o) => r.attachOpen = !1)
2532
2547
  })) : y("", !0),
2533
- r.attachOpen ? (l(), c("div", Fs, [
2534
- (l(!0), c(T, null, F(s.attachItems, (o) => (l(), c("button", {
2548
+ r.attachOpen ? (l(), c("div", Us, [
2549
+ (l(!0), c(M, null, F(s.attachItems, (o) => (l(), c("button", {
2535
2550
  key: o.action,
2536
2551
  type: "button",
2537
2552
  class: "wm-compose__menuItem",
2538
2553
  disabled: o.disabled,
2539
2554
  onClick: (d) => s.onAttachAction(o.action)
2540
2555
  }, [
2541
- i("span", Us, [
2542
- (l(), c("svg", Ds, [
2556
+ i("span", Ns, [
2557
+ (l(), c("svg", Ps, [
2543
2558
  i("path", {
2544
2559
  d: o.path,
2545
2560
  stroke: "currentColor",
@@ -2547,11 +2562,11 @@ function qs(t, e, n, a, r, s) {
2547
2562
  "stroke-linecap": "round",
2548
2563
  "stroke-linejoin": "round",
2549
2564
  fill: "none"
2550
- }, null, 8, Ns)
2565
+ }, null, 8, Hs)
2551
2566
  ]))
2552
2567
  ]),
2553
2568
  i("span", null, b(o.label), 1)
2554
- ], 8, js))), 128))
2569
+ ], 8, Ds))), 128))
2555
2570
  ])) : y("", !0),
2556
2571
  z(i("textarea", {
2557
2572
  ref: "inputEl",
@@ -2562,10 +2577,10 @@ function qs(t, e, n, a, r, s) {
2562
2577
  disabled: n.disabled,
2563
2578
  onKeydown: e[4] || (e[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
2564
2579
  onInput: e[5] || (e[5] = (...o) => s.autosize && s.autosize(...o))
2565
- }, null, 40, Ps), [
2580
+ }, null, 40, zs), [
2566
2581
  [G, r.local]
2567
2582
  ]),
2568
- i("div", Hs, [
2583
+ i("div", Vs, [
2569
2584
  i("button", {
2570
2585
  type: "button",
2571
2586
  class: E(["wm-compose__icon", { "is-open": r.attachOpen }]),
@@ -2587,7 +2602,7 @@ function qs(t, e, n, a, r, s) {
2587
2602
  }, [
2588
2603
  i("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" })
2589
2604
  ], -1)
2590
- ])], 10, zs),
2605
+ ])], 10, qs),
2591
2606
  i("button", {
2592
2607
  type: "submit",
2593
2608
  class: E(["wm-compose__send", { "is-empty": !s.canSend }]),
@@ -2607,12 +2622,12 @@ function qs(t, e, n, a, r, s) {
2607
2622
  }, [
2608
2623
  i("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
2609
2624
  ], -1)
2610
- ])], 10, Vs)
2625
+ ])], 10, Ws)
2611
2626
  ])
2612
2627
  ], 34)
2613
2628
  ]);
2614
2629
  }
2615
- const Ws = /* @__PURE__ */ B(Bs, [["render", qs], ["__scopeId", "data-v-14fa9ec0"]]), Gs = {
2630
+ const Ks = /* @__PURE__ */ B(Rs, [["render", Gs], ["__scopeId", "data-v-14fa9ec0"]]), Ys = {
2616
2631
  name: "WmSuggestionChips",
2617
2632
  props: {
2618
2633
  items: { type: Array, default: () => [] },
@@ -2629,22 +2644,22 @@ const Ws = /* @__PURE__ */ B(Bs, [["render", qs], ["__scopeId", "data-v-14fa9ec0
2629
2644
  return this.items.map((t) => (t == null ? void 0 : t.label) || (t == null ? void 0 : t.text) || "").join("§");
2630
2645
  }
2631
2646
  }
2632
- }, Ks = ["onClick"];
2633
- function Ys(t, e, n, a, r, s) {
2647
+ }, Js = ["onClick"];
2648
+ function Xs(t, e, n, a, r, s) {
2634
2649
  return n.items.length ? (l(), c("div", {
2635
2650
  key: s.batchKey,
2636
2651
  class: "wm-chips"
2637
2652
  }, [
2638
- (l(!0), c(T, null, F(n.items, (o, d) => (l(), c("button", {
2653
+ (l(!0), c(M, null, F(n.items, (o, d) => (l(), c("button", {
2639
2654
  key: d,
2640
2655
  type: "button",
2641
2656
  class: "wm-chip",
2642
2657
  style: V({ animationDelay: n.baseDelay + d * n.stepDelay + "ms" }),
2643
2658
  onClick: (v) => t.$emit("select", o)
2644
- }, b(o.label), 13, Ks))), 128))
2659
+ }, b(o.label), 13, Js))), 128))
2645
2660
  ])) : y("", !0);
2646
2661
  }
2647
- const Js = /* @__PURE__ */ B(Gs, [["render", Ys], ["__scopeId", "data-v-55aa529d"]]), Xs = {
2662
+ const Qs = /* @__PURE__ */ B(Ys, [["render", Xs], ["__scopeId", "data-v-55aa529d"]]), Zs = {
2648
2663
  name: "WmApprovalCard",
2649
2664
  components: { AIAvatar: J },
2650
2665
  props: {
@@ -2677,23 +2692,23 @@ const Js = /* @__PURE__ */ B(Gs, [["render", Ys], ["__scopeId", "data-v-55aa529d
2677
2692
  return ((t = this.rejectCallback) == null ? void 0 : t.label) || "Refuser";
2678
2693
  }
2679
2694
  }
2680
- }, Qs = { class: "wm-approval" }, Zs = { class: "wm-approval__head" }, er = { class: "wm-approval__icon" }, tr = { class: "wm-approval__main" }, nr = { class: "wm-approval__title" }, sr = {
2695
+ }, er = { class: "wm-approval" }, tr = { class: "wm-approval__head" }, nr = { class: "wm-approval__icon" }, sr = { class: "wm-approval__main" }, rr = { class: "wm-approval__title" }, ir = {
2681
2696
  key: 0,
2682
2697
  class: "wm-approval__detail"
2683
- }, rr = { class: "wm-approval__actions" };
2684
- function ir(t, e, n, a, r, s) {
2698
+ }, ar = { class: "wm-approval__actions" };
2699
+ function or(t, e, n, a, r, s) {
2685
2700
  const o = I("AIAvatar");
2686
- return l(), c("div", Qs, [
2687
- i("div", Zs, [
2688
- i("div", er, [
2701
+ return l(), c("div", er, [
2702
+ i("div", tr, [
2703
+ i("div", nr, [
2689
2704
  P(o, { size: 24 })
2690
2705
  ]),
2691
- i("div", tr, [
2692
- i("div", nr, b(n.action), 1),
2693
- n.detail ? (l(), c("div", sr, b(n.detail), 1)) : y("", !0)
2706
+ i("div", sr, [
2707
+ i("div", rr, b(n.action), 1),
2708
+ n.detail ? (l(), c("div", ir, b(n.detail), 1)) : y("", !0)
2694
2709
  ])
2695
2710
  ]),
2696
- i("div", rr, [
2711
+ i("div", ar, [
2697
2712
  s.rejectId ? (l(), c("button", {
2698
2713
  key: 0,
2699
2714
  type: "button",
@@ -2709,9 +2724,9 @@ function ir(t, e, n, a, r, s) {
2709
2724
  ])
2710
2725
  ]);
2711
2726
  }
2712
- const ar = /* @__PURE__ */ B(Xs, [["render", ir], ["__scopeId", "data-v-b1be139c"]]);
2727
+ const lr = /* @__PURE__ */ B(Zs, [["render", or], ["__scopeId", "data-v-b1be139c"]]);
2713
2728
  let ve = 0;
2714
- const or = /* @__PURE__ */ new Set([
2729
+ const cr = /* @__PURE__ */ new Set([
2715
2730
  "text",
2716
2731
  "textarea",
2717
2732
  "number",
@@ -2719,7 +2734,7 @@ const or = /* @__PURE__ */ new Set([
2719
2734
  "select",
2720
2735
  "multiselect",
2721
2736
  "date"
2722
- ]), lr = {
2737
+ ]), dr = {
2723
2738
  name: "WmFormCard",
2724
2739
  components: { AIAvatar: J },
2725
2740
  props: {
@@ -2742,7 +2757,7 @@ const or = /* @__PURE__ */ new Set([
2742
2757
  // douteux.
2743
2758
  normalizedFields() {
2744
2759
  var e;
2745
- return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !or.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
2760
+ return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !cr.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
2746
2761
  }
2747
2762
  },
2748
2763
  created() {
@@ -2793,50 +2808,50 @@ const or = /* @__PURE__ */ new Set([
2793
2808
  }
2794
2809
  }
2795
2810
  }
2796
- }, cr = { class: "wm-form" }, dr = { class: "wm-form__head" }, ur = { class: "wm-form__icon" }, hr = { class: "wm-form__main" }, mr = { class: "wm-form__title" }, fr = {
2811
+ }, ur = { class: "wm-form" }, hr = { class: "wm-form__head" }, mr = { class: "wm-form__icon" }, fr = { class: "wm-form__main" }, _r = { class: "wm-form__title" }, pr = {
2797
2812
  key: 0,
2798
2813
  class: "wm-form__detail"
2799
- }, _r = ["for"], pr = {
2814
+ }, vr = ["for"], gr = {
2800
2815
  key: 0,
2801
2816
  class: "wm-form__req",
2802
2817
  "aria-hidden": "true"
2803
- }, vr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], yr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], gr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], wr = ["id", "onUpdate:modelValue", "required", "disabled"], br = {
2818
+ }, yr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], wr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], br = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], kr = ["id", "onUpdate:modelValue", "required", "disabled"], Cr = {
2804
2819
  key: 4,
2805
2820
  class: "wm-form__bool"
2806
- }, kr = ["id", "onUpdate:modelValue", "disabled"], Cr = ["id", "onUpdate:modelValue", "required", "disabled"], Ar = {
2821
+ }, Ar = ["id", "onUpdate:modelValue", "disabled"], Sr = ["id", "onUpdate:modelValue", "required", "disabled"], xr = {
2807
2822
  value: "",
2808
2823
  disabled: ""
2809
- }, Sr = ["value"], xr = {
2824
+ }, Mr = ["value"], Tr = {
2810
2825
  key: 6,
2811
2826
  class: "wm-form__multi"
2812
- }, Mr = ["value", "checked", "disabled", "onChange"], Tr = {
2827
+ }, Or = ["value", "checked", "disabled", "onChange"], Ir = {
2813
2828
  key: 0,
2814
2829
  class: "wm-form__err"
2815
- }, Or = ["disabled"], Ir = {
2830
+ }, Er = ["disabled"], Br = {
2816
2831
  key: 0,
2817
2832
  class: "wm-form__spinner",
2818
2833
  "aria-hidden": "true"
2819
- }, Er = {
2834
+ }, Lr = {
2820
2835
  key: 2,
2821
2836
  class: "wm-form__doneLbl"
2822
2837
  };
2823
- function Br(t, e, n, a, r, s) {
2838
+ function Rr(t, e, n, a, r, s) {
2824
2839
  const o = I("AIAvatar");
2825
- return l(), c("div", cr, [
2826
- i("div", dr, [
2827
- i("div", ur, [
2840
+ return l(), c("div", ur, [
2841
+ i("div", hr, [
2842
+ i("div", mr, [
2828
2843
  P(o, { size: 24 })
2829
2844
  ]),
2830
- i("div", hr, [
2831
- i("div", mr, b(n.form.title || "Formulaire"), 1),
2832
- n.form.description ? (l(), c("div", fr, b(n.form.description), 1)) : y("", !0)
2845
+ i("div", fr, [
2846
+ i("div", _r, b(n.form.title || "Formulaire"), 1),
2847
+ n.form.description ? (l(), c("div", pr, b(n.form.description), 1)) : y("", !0)
2833
2848
  ])
2834
2849
  ]),
2835
2850
  i("form", {
2836
2851
  class: "wm-form__body",
2837
2852
  onSubmit: e[0] || (e[0] = Y((...d) => s.onSubmit && s.onSubmit(...d), ["prevent"]))
2838
2853
  }, [
2839
- (l(!0), c(T, null, F(s.normalizedFields, (d) => (l(), c("div", {
2854
+ (l(!0), c(M, null, F(s.normalizedFields, (d) => (l(), c("div", {
2840
2855
  key: d.key,
2841
2856
  class: "wm-form__field"
2842
2857
  }, [
@@ -2845,8 +2860,8 @@ function Br(t, e, n, a, r, s) {
2845
2860
  class: "wm-form__label"
2846
2861
  }, [
2847
2862
  se(b(d.label), 1),
2848
- d.required ? (l(), c("span", pr, "*")) : y("", !0)
2849
- ], 8, _r),
2863
+ d.required ? (l(), c("span", gr, "*")) : y("", !0)
2864
+ ], 8, vr),
2850
2865
  d.type === "text" ? z((l(), c("input", {
2851
2866
  key: 0,
2852
2867
  id: `wm-f-${r._uid}-${d.key}`,
@@ -2856,7 +2871,7 @@ function Br(t, e, n, a, r, s) {
2856
2871
  placeholder: d.placeholder || "",
2857
2872
  required: d.required,
2858
2873
  disabled: n.readOnly || r.busy
2859
- }, null, 8, vr)), [
2874
+ }, null, 8, yr)), [
2860
2875
  [G, r.values[d.key]]
2861
2876
  ]) : d.type === "textarea" ? z((l(), c("textarea", {
2862
2877
  key: 1,
@@ -2867,7 +2882,7 @@ function Br(t, e, n, a, r, s) {
2867
2882
  placeholder: d.placeholder || "",
2868
2883
  required: d.required,
2869
2884
  disabled: n.readOnly || r.busy
2870
- }, null, 8, yr)), [
2885
+ }, null, 8, wr)), [
2871
2886
  [G, r.values[d.key]]
2872
2887
  ]) : d.type === "number" ? z((l(), c("input", {
2873
2888
  key: 2,
@@ -2878,7 +2893,7 @@ function Br(t, e, n, a, r, s) {
2878
2893
  placeholder: d.placeholder || "",
2879
2894
  required: d.required,
2880
2895
  disabled: n.readOnly || r.busy
2881
- }, null, 8, gr)), [
2896
+ }, null, 8, br)), [
2882
2897
  [
2883
2898
  G,
2884
2899
  r.values[d.key],
@@ -2893,16 +2908,16 @@ function Br(t, e, n, a, r, s) {
2893
2908
  class: "wm-form__input",
2894
2909
  required: d.required,
2895
2910
  disabled: n.readOnly || r.busy
2896
- }, null, 8, wr)), [
2911
+ }, null, 8, kr)), [
2897
2912
  [G, r.values[d.key]]
2898
- ]) : d.type === "boolean" ? (l(), c("label", br, [
2913
+ ]) : d.type === "boolean" ? (l(), c("label", Cr, [
2899
2914
  z(i("input", {
2900
2915
  id: `wm-f-${r._uid}-${d.key}`,
2901
2916
  "onUpdate:modelValue": (v) => r.values[d.key] = v,
2902
2917
  type: "checkbox",
2903
2918
  disabled: n.readOnly || r.busy
2904
- }, null, 8, kr), [
2905
- [Ee, r.values[d.key]]
2919
+ }, null, 8, Ar), [
2920
+ [Ie, r.values[d.key]]
2906
2921
  ]),
2907
2922
  i("span", null, b(d.placeholder || "Oui"), 1)
2908
2923
  ])) : d.type === "select" ? z((l(), c("select", {
@@ -2913,15 +2928,15 @@ function Br(t, e, n, a, r, s) {
2913
2928
  required: d.required,
2914
2929
  disabled: n.readOnly || r.busy
2915
2930
  }, [
2916
- i("option", Ar, b(d.placeholder || "Choisir…"), 1),
2917
- (l(!0), c(T, null, F(d.options, (v) => (l(), c("option", {
2931
+ i("option", xr, b(d.placeholder || "Choisir…"), 1),
2932
+ (l(!0), c(M, null, F(d.options, (v) => (l(), c("option", {
2918
2933
  key: v.value,
2919
2934
  value: v.value
2920
- }, b(v.label), 9, Sr))), 128))
2921
- ], 8, Cr)), [
2922
- [Be, r.values[d.key]]
2923
- ]) : d.type === "multiselect" ? (l(), c("div", xr, [
2924
- (l(!0), c(T, null, F(d.options, (v) => (l(), c("label", {
2935
+ }, b(v.label), 9, Mr))), 128))
2936
+ ], 8, Sr)), [
2937
+ [Ee, r.values[d.key]]
2938
+ ]) : d.type === "multiselect" ? (l(), c("div", Tr, [
2939
+ (l(!0), c(M, null, F(d.options, (v) => (l(), c("label", {
2925
2940
  key: v.value,
2926
2941
  class: "wm-form__multiItem"
2927
2942
  }, [
@@ -2931,25 +2946,25 @@ function Br(t, e, n, a, r, s) {
2931
2946
  checked: Array.isArray(r.values[d.key]) && r.values[d.key].includes(v.value),
2932
2947
  disabled: n.readOnly || r.busy,
2933
2948
  onChange: (C) => s.toggleMulti(d.key, v.value, C.target.checked)
2934
- }, null, 40, Mr),
2949
+ }, null, 40, Or),
2935
2950
  i("span", null, b(v.label), 1)
2936
2951
  ]))), 128))
2937
2952
  ])) : y("", !0)
2938
2953
  ]))), 128)),
2939
- r.error ? (l(), c("div", Tr, b(r.error), 1)) : y("", !0),
2940
- n.readOnly ? (l(), c("div", Er, "Réponse envoyée")) : (l(), c("button", {
2954
+ r.error ? (l(), c("div", Ir, b(r.error), 1)) : y("", !0),
2955
+ n.readOnly ? (l(), c("div", Lr, "Réponse envoyée")) : (l(), c("button", {
2941
2956
  key: 1,
2942
2957
  type: "submit",
2943
2958
  class: "wm-form__submit",
2944
2959
  disabled: r.busy
2945
2960
  }, [
2946
- r.busy ? (l(), c("span", Ir)) : y("", !0),
2961
+ r.busy ? (l(), c("span", Br)) : y("", !0),
2947
2962
  i("span", null, b(r.busy ? "Envoi…" : n.form.submit_label || "Envoyer"), 1)
2948
- ], 8, Or))
2963
+ ], 8, Er))
2949
2964
  ], 32)
2950
2965
  ]);
2951
2966
  }
2952
- const Lr = /* @__PURE__ */ B(lr, [["render", Br], ["__scopeId", "data-v-64b40f76"]]), Rr = {
2967
+ const $r = /* @__PURE__ */ B(dr, [["render", Rr], ["__scopeId", "data-v-64b40f76"]]), Fr = {
2953
2968
  name: "WmFeedback",
2954
2969
  props: {
2955
2970
  busy: { type: Boolean, default: !1 },
@@ -2973,43 +2988,43 @@ const Lr = /* @__PURE__ */ B(lr, [["render", Br], ["__scopeId", "data-v-64b40f76
2973
2988
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
2974
2989
  }
2975
2990
  }
2976
- }, $r = { class: "wm-fb" }, Fr = { class: "wm-fb__row" }, jr = ["onClick"], Ur = { class: "wm-fb__emoji" }, Dr = { class: "wm-fb__label" }, Nr = ["disabled"], Pr = {
2991
+ }, jr = { class: "wm-fb" }, Ur = { class: "wm-fb__row" }, Dr = ["onClick"], Nr = { class: "wm-fb__emoji" }, Pr = { class: "wm-fb__label" }, Hr = ["disabled"], zr = {
2977
2992
  key: 1,
2978
2993
  class: "wm-fb__done"
2979
2994
  };
2980
- function Hr(t, e, n, a, r, s) {
2981
- return l(), c("div", $r, [
2982
- n.done ? (l(), c("div", Pr, [...e[3] || (e[3] = [
2995
+ function Vr(t, e, n, a, r, s) {
2996
+ return l(), c("div", jr, [
2997
+ n.done ? (l(), c("div", zr, [...e[3] || (e[3] = [
2983
2998
  ue('<div class="wm-fb__check" data-v-6f45ff3b><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-6f45ff3b><path d="M20 6L9 17l-5-5" data-v-6f45ff3b></path></svg></div><div class="wm-fb__doneTitle" data-v-6f45ff3b>Merci pour votre retour !</div><div class="wm-fb__doneSub" data-v-6f45ff3b>Votre avis a bien été pris en compte.</div>', 3)
2984
- ])])) : (l(), c(T, { key: 0 }, [
2999
+ ])])) : (l(), c(M, { key: 0 }, [
2985
3000
  e[1] || (e[1] = i("div", { class: "wm-fb__title" }, "Comment s'est passée cette conversation ?", -1)),
2986
3001
  e[2] || (e[2] = i("div", { class: "wm-fb__sub" }, "Votre avis nous aide à améliorer l'assistant.", -1)),
2987
- i("div", Fr, [
2988
- (l(!0), c(T, null, F(r.options, (o) => (l(), c("button", {
3002
+ i("div", Ur, [
3003
+ (l(!0), c(M, null, F(r.options, (o) => (l(), c("button", {
2989
3004
  key: o.v,
2990
3005
  type: "button",
2991
3006
  class: E(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
2992
3007
  onClick: (d) => r.sel = o.v
2993
3008
  }, [
2994
- i("span", Ur, b(o.e), 1),
2995
- i("span", Dr, b(o.l), 1)
2996
- ], 10, jr))), 128))
3009
+ i("span", Nr, b(o.e), 1),
3010
+ i("span", Pr, b(o.l), 1)
3011
+ ], 10, Dr))), 128))
2997
3012
  ]),
2998
3013
  i("button", {
2999
3014
  type: "button",
3000
3015
  class: "wm-fb__send",
3001
3016
  disabled: !r.sel || n.busy,
3002
3017
  onClick: e[0] || (e[0] = (...o) => s.onSend && s.onSend(...o))
3003
- }, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9, Nr)
3018
+ }, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9, Hr)
3004
3019
  ], 64))
3005
3020
  ]);
3006
3021
  }
3007
- const zr = /* @__PURE__ */ B(Rr, [["render", Hr], ["__scopeId", "data-v-6f45ff3b"]]);
3008
- function Vr(t) {
3022
+ const qr = /* @__PURE__ */ B(Fr, [["render", Vr], ["__scopeId", "data-v-6f45ff3b"]]);
3023
+ function Wr(t) {
3009
3024
  const e = new Date(t);
3010
3025
  return e.setHours(0, 0, 0, 0), e;
3011
3026
  }
3012
- const qr = {
3027
+ const Gr = {
3013
3028
  name: "WmHistoryDrawer",
3014
3029
  props: {
3015
3030
  conversations: { type: Array, default: () => [] },
@@ -3043,7 +3058,7 @@ const qr = {
3043
3058
  ) : this.normalized;
3044
3059
  },
3045
3060
  groups() {
3046
- const e = Vr(/* @__PURE__ */ new Date()).getTime(), n = e - 6 * 864e5, a = [], r = [], s = [];
3061
+ const e = Wr(/* @__PURE__ */ new Date()).getTime(), n = e - 6 * 864e5, a = [], r = [], s = [];
3047
3062
  for (const o of this.filtered) {
3048
3063
  if (!o.stamp) {
3049
3064
  s.push(o);
@@ -3061,29 +3076,29 @@ const qr = {
3061
3076
  return this.filtered.length > 0;
3062
3077
  }
3063
3078
  }
3064
- }, Wr = { class: "wm-hd" }, Gr = {
3079
+ }, Kr = { class: "wm-hd" }, Yr = {
3065
3080
  class: "wm-hd__panel",
3066
3081
  role: "dialog",
3067
3082
  "aria-label": "Vos discussions"
3068
- }, Kr = { class: "wm-hd__head" }, Yr = { class: "wm-hd__top" }, Jr = { class: "wm-hd__search" }, Xr = { class: "wm-hd__list" }, Qr = {
3083
+ }, Jr = { class: "wm-hd__head" }, Xr = { class: "wm-hd__top" }, Qr = { class: "wm-hd__search" }, Zr = { class: "wm-hd__list" }, ei = {
3069
3084
  key: 0,
3070
3085
  class: "wm-hd__group"
3071
- }, Zr = { class: "wm-hd__groupLabel" }, ei = { class: "wm-hd__rows" }, ti = ["onClick"], ni = { class: "wm-hd__rowIcon" }, si = {
3086
+ }, ti = { class: "wm-hd__groupLabel" }, ni = { class: "wm-hd__rows" }, si = ["onClick"], ri = { class: "wm-hd__rowIcon" }, ii = {
3072
3087
  key: 0,
3073
3088
  class: "wm-hd__rowDot",
3074
3089
  "aria-label": "Message non lu"
3075
- }, ri = { class: "wm-hd__rowBody" }, ii = { class: "wm-hd__rowTop" }, ai = { class: "wm-hd__rowTitle" }, oi = { class: "wm-hd__rowPreview" }, li = {
3090
+ }, ai = { class: "wm-hd__rowBody" }, oi = { class: "wm-hd__rowTop" }, li = { class: "wm-hd__rowTitle" }, ci = { class: "wm-hd__rowPreview" }, di = {
3076
3091
  key: 0,
3077
3092
  class: "wm-hd__empty"
3078
3093
  };
3079
- function ci(t, e, n, a, r, s) {
3080
- return l(), c("div", Wr, [
3094
+ function ui(t, e, n, a, r, s) {
3095
+ return l(), c("div", Kr, [
3081
3096
  i("div", {
3082
3097
  class: "wm-hd__scrim",
3083
3098
  onClick: e[0] || (e[0] = (o) => t.$emit("close"))
3084
3099
  }),
3085
- i("aside", Gr, [
3086
- i("div", Kr, [
3100
+ i("aside", Yr, [
3101
+ i("div", Jr, [
3087
3102
  e[5] || (e[5] = i("div", { class: "wm-hd__heading" }, [
3088
3103
  i("div", { class: "wm-hd__title" }, "Vos discussions"),
3089
3104
  i("div", { class: "wm-hd__sub" }, "Reprenez là où vous en étiez.")
@@ -3109,7 +3124,7 @@ function ci(t, e, n, a, r, s) {
3109
3124
  ], -1)
3110
3125
  ])])
3111
3126
  ]),
3112
- i("div", Yr, [
3127
+ i("div", Xr, [
3113
3128
  i("button", {
3114
3129
  type: "button",
3115
3130
  class: "wm-hd__new",
@@ -3132,7 +3147,7 @@ function ci(t, e, n, a, r, s) {
3132
3147
  ], -1),
3133
3148
  i("span", null, "Démarrer un nouveau fil", -1)
3134
3149
  ])]),
3135
- i("div", Jr, [
3150
+ i("div", Qr, [
3136
3151
  e[7] || (e[7] = i("span", { class: "wm-hd__searchIcon" }, [
3137
3152
  i("svg", {
3138
3153
  width: "12",
@@ -3158,14 +3173,14 @@ function ci(t, e, n, a, r, s) {
3158
3173
  ])
3159
3174
  ])
3160
3175
  ]),
3161
- i("div", Xr, [
3162
- (l(!0), c(T, null, F(s.groups, (o) => (l(), c(T, {
3176
+ i("div", Zr, [
3177
+ (l(!0), c(M, null, F(s.groups, (o) => (l(), c(M, {
3163
3178
  key: o.key
3164
3179
  }, [
3165
- o.items.length ? (l(), c("div", Qr, [
3166
- i("div", Zr, b(o.label), 1),
3167
- i("div", ei, [
3168
- (l(!0), c(T, null, F(o.items, (d) => (l(), c("button", {
3180
+ o.items.length ? (l(), c("div", ei, [
3181
+ i("div", ti, b(o.label), 1),
3182
+ i("div", ni, [
3183
+ (l(!0), c(M, null, F(o.items, (d) => (l(), c("button", {
3169
3184
  key: d.id,
3170
3185
  type: "button",
3171
3186
  class: E(["wm-hd__row", {
@@ -3174,7 +3189,7 @@ function ci(t, e, n, a, r, s) {
3174
3189
  }]),
3175
3190
  onClick: (v) => t.$emit("pick", d)
3176
3191
  }, [
3177
- i("div", ni, [
3192
+ i("div", ri, [
3178
3193
  e[8] || (e[8] = i("svg", {
3179
3194
  width: "11",
3180
3195
  height: "11",
@@ -3188,24 +3203,24 @@ function ci(t, e, n, a, r, s) {
3188
3203
  opacity: "0.92"
3189
3204
  })
3190
3205
  ], -1)),
3191
- d.unread ? (l(), c("span", si)) : y("", !0)
3206
+ d.unread ? (l(), c("span", ii)) : y("", !0)
3192
3207
  ]),
3193
- i("div", ri, [
3194
- i("div", ii, [
3195
- i("span", ai, b(d.title), 1)
3208
+ i("div", ai, [
3209
+ i("div", oi, [
3210
+ i("span", li, b(d.title), 1)
3196
3211
  ]),
3197
- i("div", oi, b(d.preview || "Aucun message"), 1)
3212
+ i("div", ci, b(d.preview || "Aucun message"), 1)
3198
3213
  ])
3199
- ], 10, ti))), 128))
3214
+ ], 10, si))), 128))
3200
3215
  ])
3201
3216
  ])) : y("", !0)
3202
3217
  ], 64))), 128)),
3203
- s.hasAny ? y("", !0) : (l(), c("div", li, " Aucun fil pour le moment. "))
3218
+ s.hasAny ? y("", !0) : (l(), c("div", di, " Aucun fil pour le moment. "))
3204
3219
  ])
3205
3220
  ])
3206
3221
  ]);
3207
3222
  }
3208
- const di = /* @__PURE__ */ B(qr, [["render", ci], ["__scopeId", "data-v-1259e822"]]), ui = {
3223
+ const hi = /* @__PURE__ */ B(Gr, [["render", ui], ["__scopeId", "data-v-1259e822"]]), mi = {
3209
3224
  name: "WmMoreMenu",
3210
3225
  props: {
3211
3226
  canRename: { type: Boolean, default: !0 },
@@ -3232,18 +3247,18 @@ const di = /* @__PURE__ */ B(qr, [["render", ci], ["__scopeId", "data-v-1259e822
3232
3247
  this.notifOn = !this.notifOn, this.$emit("notif-toggle", this.notifOn);
3233
3248
  }
3234
3249
  }
3235
- }, hi = { class: "wm-mm" }, mi = {
3250
+ }, fi = { class: "wm-mm" }, _i = {
3236
3251
  class: "wm-mm__pop",
3237
3252
  role: "menu"
3238
- }, fi = { class: "wm-mm__section" }, _i = { class: "wm-mm__section" }, pi = { class: "wm-mm__section" };
3239
- function vi(t, e, n, a, r, s) {
3240
- return l(), c("div", hi, [
3253
+ }, pi = { class: "wm-mm__section" }, vi = { class: "wm-mm__section" }, gi = { class: "wm-mm__section" };
3254
+ function yi(t, e, n, a, r, s) {
3255
+ return l(), c("div", fi, [
3241
3256
  i("div", {
3242
3257
  class: "wm-mm__scrim",
3243
3258
  onClick: e[0] || (e[0] = (o) => t.$emit("close"))
3244
3259
  }),
3245
- i("div", mi, [
3246
- i("div", fi, [
3260
+ i("div", _i, [
3261
+ i("div", pi, [
3247
3262
  i("button", {
3248
3263
  type: "button",
3249
3264
  class: "wm-mm__item",
@@ -3307,7 +3322,7 @@ function vi(t, e, n, a, r, s) {
3307
3322
  ])])) : y("", !0)
3308
3323
  ]),
3309
3324
  e[17] || (e[17] = i("div", { class: "wm-mm__sep" }, null, -1)),
3310
- i("div", _i, [
3325
+ i("div", vi, [
3311
3326
  i("button", {
3312
3327
  type: "button",
3313
3328
  class: "wm-mm__item",
@@ -3337,7 +3352,7 @@ function vi(t, e, n, a, r, s) {
3337
3352
  ])
3338
3353
  ]),
3339
3354
  e[18] || (e[18] = i("div", { class: "wm-mm__sep" }, null, -1)),
3340
- i("div", pi, [
3355
+ i("div", gi, [
3341
3356
  n.statusUrl ? (l(), c("button", {
3342
3357
  key: 0,
3343
3358
  type: "button",
@@ -3388,13 +3403,13 @@ function vi(t, e, n, a, r, s) {
3388
3403
  ])
3389
3404
  ]);
3390
3405
  }
3391
- const yi = /* @__PURE__ */ B(ui, [["render", vi], ["__scopeId", "data-v-c1bb81d2"]]), ye = "ww-messenger-tokens";
3406
+ const wi = /* @__PURE__ */ B(mi, [["render", yi], ["__scopeId", "data-v-c1bb81d2"]]), ge = "ww-messenger-tokens";
3392
3407
  function de(t) {
3393
3408
  var n;
3394
3409
  const e = (n = t == null ? void 0 : t.author) == null ? void 0 : n.type;
3395
3410
  return e === "agent_ia" || e === "agent_human";
3396
3411
  }
3397
- function gi(t, e) {
3412
+ function bi(t, e) {
3398
3413
  if (!t || !e) return "";
3399
3414
  const n = Array.isArray(t.fields) ? t.fields : [], a = [];
3400
3415
  for (const r of n) {
@@ -3417,7 +3432,7 @@ function ne(t, e) {
3417
3432
  const n = t.options.find((a) => (a == null ? void 0 : a.value) === e);
3418
3433
  return (n == null ? void 0 : n.label) || e;
3419
3434
  }
3420
- function wi(t, e) {
3435
+ function ki(t, e) {
3421
3436
  const n = [], a = Array.isArray(t == null ? void 0 : t.fields) ? t.fields : [];
3422
3437
  for (const r of a) {
3423
3438
  if (!(r != null && r.key) || !(r != null && r.label)) continue;
@@ -3439,20 +3454,20 @@ function wi(t, e) {
3439
3454
  }
3440
3455
  };
3441
3456
  }
3442
- const bi = 450, ki = 50, Ci = 900, Ai = 12e3, Si = 300, xi = {
3457
+ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
3443
3458
  name: "Messenger",
3444
3459
  components: {
3445
- Launcher: Ye,
3446
- Header: bt,
3447
- Onboarding: zt,
3448
- MessageList: xs,
3449
- Composer: Ws,
3450
- SuggestionChips: Js,
3451
- ApprovalCard: ar,
3452
- FormCard: Lr,
3453
- Feedback: zr,
3454
- HistoryDrawer: di,
3455
- MoreMenu: yi
3460
+ Launcher: Ke,
3461
+ Header: wt,
3462
+ Onboarding: Ht,
3463
+ MessageList: Ts,
3464
+ Composer: Ks,
3465
+ SuggestionChips: Qs,
3466
+ ApprovalCard: lr,
3467
+ FormCard: $r,
3468
+ Feedback: qr,
3469
+ HistoryDrawer: hi,
3470
+ MoreMenu: wi
3456
3471
  },
3457
3472
  // Make signAttachment available to deep children (AttachmentPreview)
3458
3473
  // without prop drilling. The store may not exist yet at provide-time
@@ -3468,7 +3483,7 @@ const bi = 450, ki = 50, Ci = 900, Ai = 12e3, Si = 300, xi = {
3468
3483
  },
3469
3484
  props: {
3470
3485
  // Hardcoded server default (overridable for staging/dev).
3471
- baseUrl: { type: String, default: ze },
3486
+ baseUrl: { type: String, default: He },
3472
3487
  widgetId: { type: String, default: "" },
3473
3488
  userId: { type: String, default: "" },
3474
3489
  userHash: { type: String, default: "" },
@@ -3975,9 +3990,9 @@ const bi = 450, ki = 50, Ci = 900, Ai = 12e3, Si = 300, xi = {
3975
3990
  hasWidgetId: !!this.widgetId,
3976
3991
  hasUserId: !!this.userId,
3977
3992
  hasUserHash: !!this.userHash
3978
- }), typeof document < "u" && !document.getElementById(ye)) {
3993
+ }), typeof document < "u" && !document.getElementById(ge)) {
3979
3994
  const t = document.createElement("style");
3980
- t.id = ye, t.textContent = He, document.head.appendChild(t);
3995
+ t.id = ge, t.textContent = Pe, document.head.appendChild(t);
3981
3996
  }
3982
3997
  this.hydrateReadState(), await this.boot(), this.isEmbedded && this.store && await this.open();
3983
3998
  },
@@ -4128,11 +4143,11 @@ const bi = 450, ki = 50, Ci = 900, Ai = 12e3, Si = 300, xi = {
4128
4143
  // bounded by MIN/MAX_BETWEEN_MS.
4129
4144
  scheduleReveal(t) {
4130
4145
  const e = Date.now(), n = ((t == null ? void 0 : t.text_md) || "").length, a = Math.min(
4131
- Ai,
4132
- Math.max(Ci, n * ki)
4146
+ xi,
4147
+ Math.max(Si, n * Ai)
4133
4148
  ), s = Math.max(
4134
- e + bi,
4135
- this.nextRevealAt + Si
4149
+ e + Ci,
4150
+ this.nextRevealAt + Mi
4136
4151
  ) + a;
4137
4152
  this.nextRevealAt = s;
4138
4153
  const o = Math.max(0, s - e), d = t.id, v = setTimeout(() => {
@@ -4159,12 +4174,12 @@ const bi = 450, ki = 50, Ci = 900, Ai = 12e3, Si = 300, xi = {
4159
4174
  baseUrl: this.baseUrl,
4160
4175
  widgetId: this.widgetId,
4161
4176
  userId: this.userId
4162
- }), this.transport = fe(je({
4177
+ }), this.transport = fe(Fe({
4163
4178
  baseUrl: this.baseUrl,
4164
4179
  widgetId: this.widgetId,
4165
4180
  userId: this.userId,
4166
4181
  userHash: this.userHash
4167
- })), this.store = fe(Pe(this.transport)), await this.store.start(), this.customer && typeof this.customer == "object" && await this.store.applyCustomer(this.customer), console.log("[ww-messenger] boot done", {
4182
+ })), this.store = fe(Ne(this.transport)), await this.store.start(), this.customer && typeof this.customer == "object" && await this.store.applyCustomer(this.customer), console.log("[ww-messenger] boot done", {
4168
4183
  ready: this.store.state.ready,
4169
4184
  error: this.store.state.error
4170
4185
  });
@@ -4340,12 +4355,12 @@ const bi = 450, ki = 50, Ci = 900, Ai = 12e3, Si = 300, xi = {
4340
4355
  async onFormSubmit({ values: t }) {
4341
4356
  const e = this.pendingForm;
4342
4357
  if (!(e != null && e.form)) return;
4343
- const n = gi(e.form, t);
4358
+ const n = bi(e.form, t);
4344
4359
  if (!n) return;
4345
4360
  const a = this.currentConv;
4346
4361
  a && await this.store.send(a.id, n, {
4347
4362
  metadata: {
4348
- artifact: wi(e.form, t)
4363
+ artifact: ki(e.form, t)
4349
4364
  }
4350
4365
  });
4351
4366
  },
@@ -4389,28 +4404,28 @@ const bi = 450, ki = 50, Ci = 900, Ai = 12e3, Si = 300, xi = {
4389
4404
  }
4390
4405
  }
4391
4406
  }
4392
- }, Mi = {
4407
+ }, Oi = {
4393
4408
  key: 0,
4394
4409
  class: "wm-loading",
4395
4410
  "aria-busy": "true",
4396
4411
  "aria-live": "polite"
4397
- }, Ti = {
4412
+ }, Ii = {
4398
4413
  key: 0,
4399
4414
  class: "wm-state"
4400
- }, Oi = { class: "wm-state__err" }, Ii = { class: "wm-state__errSub" }, Ei = { class: "wm-bottom" }, Bi = {
4415
+ }, Ei = { class: "wm-state__err" }, Bi = { class: "wm-state__errSub" }, Li = { class: "wm-bottom" }, Ri = {
4401
4416
  key: 0,
4402
4417
  ref: "floatEl",
4403
4418
  class: "wm-float"
4404
- }, Li = {
4419
+ }, $i = {
4405
4420
  key: 1,
4406
4421
  class: "wm-actionWait",
4407
4422
  role: "status",
4408
4423
  "aria-live": "polite"
4409
- }, Ri = { class: "wm-actionWait__lbl" }, $i = {
4424
+ }, Fi = { class: "wm-actionWait__lbl" }, ji = {
4410
4425
  key: 1,
4411
4426
  class: "wm-attached"
4412
- }, Fi = ["onClick"];
4413
- function ji(t, e, n, a, r, s) {
4427
+ }, Ui = ["onClick"];
4428
+ function Di(t, e, n, a, r, s) {
4414
4429
  const o = I("Launcher"), d = I("Header"), v = I("Onboarding"), C = I("MessageList"), w = I("ApprovalCard"), S = I("FormCard"), L = I("Feedback"), A = I("SuggestionChips"), D = I("Composer"), x = I("MoreMenu"), N = I("HistoryDrawer");
4415
4430
  return l(), c("div", {
4416
4431
  class: E(["wm-root", `wm-root--${n.displayMode}`])
@@ -4429,7 +4444,7 @@ function ji(t, e, n, a, r, s) {
4429
4444
  role: "dialog",
4430
4445
  "aria-label": "Messenger"
4431
4446
  }, [
4432
- !s.ready && !s.error ? (l(), c("div", Mi, [
4447
+ !s.ready && !s.error ? (l(), c("div", Oi, [
4433
4448
  s.isEmbedded ? y("", !0) : (l(), c("button", {
4434
4449
  key: 0,
4435
4450
  type: "button",
@@ -4455,7 +4470,7 @@ function ji(t, e, n, a, r, s) {
4455
4470
  class: "wm-loading__spinner",
4456
4471
  "aria-hidden": "true"
4457
4472
  }, null, -1))
4458
- ])) : (l(), c(T, { key: 1 }, [
4473
+ ])) : (l(), c(M, { key: 1 }, [
4459
4474
  P(d, {
4460
4475
  title: s.headerTitle,
4461
4476
  escalated: s.isEscalated,
@@ -4471,8 +4486,8 @@ function ji(t, e, n, a, r, s) {
4471
4486
  onMore: s.toggleMore,
4472
4487
  onClose: s.close
4473
4488
  }, null, 8, ["title", "escalated", "agent-name", "agent-avatar-url", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "onBack", "onMore", "onClose"]),
4474
- s.error ? (l(), c("div", Ti, [
4475
- i("div", Oi, [
4489
+ s.error ? (l(), c("div", Ii, [
4490
+ i("div", Ei, [
4476
4491
  e[9] || (e[9] = i("div", { class: "wm-state__errIcon" }, [
4477
4492
  i("svg", {
4478
4493
  width: "14",
@@ -4490,10 +4505,10 @@ function ji(t, e, n, a, r, s) {
4490
4505
  ], -1)),
4491
4506
  i("div", null, [
4492
4507
  e[8] || (e[8] = i("div", { class: "wm-state__errTitle" }, "Connexion impossible", -1)),
4493
- i("div", Ii, b(s.error), 1)
4508
+ i("div", Bi, b(s.error), 1)
4494
4509
  ])
4495
4510
  ])
4496
- ])) : s.currentConv ? (l(), c(T, { key: 2 }, [
4511
+ ])) : s.currentConv ? (l(), c(M, { key: 2 }, [
4497
4512
  P(C, {
4498
4513
  ref: "messageList",
4499
4514
  messages: s.displayedMessages,
@@ -4505,8 +4520,8 @@ function ji(t, e, n, a, r, s) {
4505
4520
  "unread-anchor-ts": r.unreadAnchorTs,
4506
4521
  onLoadMore: s.onLoadMore
4507
4522
  }, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "onLoadMore"]),
4508
- i("div", Ei, [
4509
- s.floatVisible ? (l(), c("div", Bi, [
4523
+ i("div", Li, [
4524
+ s.floatVisible ? (l(), c("div", Ri, [
4510
4525
  s.approvalReady ? (l(), $(w, {
4511
4526
  key: 0,
4512
4527
  action: s.approvalTitle,
@@ -4528,12 +4543,12 @@ function ji(t, e, n, a, r, s) {
4528
4543
  onSelect: s.onSuggestion
4529
4544
  }, null, 8, ["items", "onSelect"]))
4530
4545
  ], 512)) : y("", !0),
4531
- s.actionInFlight ? (l(), c("div", Li, [
4546
+ s.actionInFlight ? (l(), c("div", $i, [
4532
4547
  e[10] || (e[10] = i("span", {
4533
4548
  class: "wm-actionWait__spinner",
4534
4549
  "aria-hidden": "true"
4535
4550
  }, null, -1)),
4536
- i("span", Ri, b(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
4551
+ i("span", Fi, b(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
4537
4552
  ])) : (l(), $(D, {
4538
4553
  key: 2,
4539
4554
  ref: "composer",
@@ -4558,8 +4573,8 @@ function ji(t, e, n, a, r, s) {
4558
4573
  onNotifToggle: s.onNotifToggle,
4559
4574
  onAction: s.onMoreAction
4560
4575
  }, null, 8, ["can-rename", "can-clear", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0),
4561
- r.pendingAttachments.length ? (l(), c("div", $i, [
4562
- (l(!0), c(T, null, F(r.pendingAttachments, (j, H) => (l(), c("div", {
4576
+ r.pendingAttachments.length ? (l(), c("div", ji, [
4577
+ (l(!0), c(M, null, F(r.pendingAttachments, (j, H) => (l(), c("div", {
4563
4578
  key: H,
4564
4579
  class: "wm-attached__chip"
4565
4580
  }, [
@@ -4595,7 +4610,7 @@ function ji(t, e, n, a, r, s) {
4595
4610
  }, [
4596
4611
  i("path", { d: "M18 6L6 18M6 6l12 12" })
4597
4612
  ], -1)
4598
- ])], 8, Fi)
4613
+ ])], 8, Ui)
4599
4614
  ]))), 128))
4600
4615
  ])) : y("", !0)
4601
4616
  ], 64)) : (l(), $(v, {
@@ -4633,49 +4648,49 @@ function ji(t, e, n, a, r, s) {
4633
4648
  ], 6)) : y("", !0)
4634
4649
  ], 2);
4635
4650
  }
4636
- const Ni = /* @__PURE__ */ B(xi, [["render", ji], ["__scopeId", "data-v-5233982a"]]), Pi = "0.2.1";
4651
+ const Hi = /* @__PURE__ */ B(Ti, [["render", Di], ["__scopeId", "data-v-5233982a"]]), zi = "0.2.2";
4637
4652
  export {
4638
4653
  J as AIAvatar,
4639
4654
  le as AVATAR_COLORS,
4640
- Nn as ActionResult,
4641
- ar as ApprovalCard,
4642
- Zt as ArtifactFormResponse,
4643
- mn as ArtifactInfoCard,
4644
- Ae as ArtifactRenderer,
4645
- Mn as ArtifactTicket,
4646
- Qn as AttachmentPreview,
4647
- ns as Bubble,
4648
- Ws as Composer,
4649
- ze as DEFAULT_BASE_URL,
4650
- zr as Feedback,
4651
- Lr as FormCard,
4652
- bt as Header,
4653
- di as HistoryDrawer,
4655
+ Dn as ActionResult,
4656
+ lr as ApprovalCard,
4657
+ Jt as ArtifactFormResponse,
4658
+ dn as ArtifactInfoCard,
4659
+ Ce as ArtifactRenderer,
4660
+ An as ArtifactTicket,
4661
+ Xn as AttachmentPreview,
4662
+ rs as Bubble,
4663
+ Ks as Composer,
4664
+ He as DEFAULT_BASE_URL,
4665
+ qr as Feedback,
4666
+ $r as FormCard,
4667
+ wt as Header,
4668
+ hi as HistoryDrawer,
4654
4669
  ke as HumanAvatar,
4655
- Ye as Launcher,
4670
+ Ke as Launcher,
4656
4671
  he as MEDIA_RECORDER_SUPPORTED,
4657
- xs as MessageList,
4658
- Ni as Messenger,
4659
- yi as MoreMenu,
4660
- zt as Onboarding,
4672
+ Ts as MessageList,
4673
+ Hi as Messenger,
4674
+ wi as MoreMenu,
4675
+ Ht as Onboarding,
4661
4676
  te as SCREEN_CAPTURE_SUPPORTED,
4662
- Js as SuggestionChips,
4663
- ct as TeamAvatars,
4664
- as as Typing,
4665
- Pi as VERSION,
4666
- ge as avatarColor,
4677
+ Qs as SuggestionChips,
4678
+ lt as TeamAvatars,
4679
+ ls as Typing,
4680
+ zi as VERSION,
4681
+ ye as avatarColor,
4667
4682
  we as avatarInitials,
4668
- Ts as captureScreenshotFile,
4683
+ Is as captureScreenshotFile,
4669
4684
  U as colors,
4670
- Pe as createStore,
4671
- je as createTransport,
4672
- Ni as default,
4685
+ Ne as createStore,
4686
+ Fe as createTransport,
4687
+ Hi as default,
4673
4688
  be as formatTime,
4674
- Di as guessAttachmentKind,
4675
- Ms as pickRecorderMime,
4676
- Ce as renderMarkdown,
4677
- Is as startScreenRecording,
4678
- He as tokensCss,
4679
- Ne as uuid,
4680
- Ne as v4
4689
+ Pi as guessAttachmentKind,
4690
+ Os as pickRecorderMime,
4691
+ es as renderMarkdown,
4692
+ Bs as startScreenRecording,
4693
+ Pe as tokensCss,
4694
+ De as uuid,
4695
+ De as v4
4681
4696
  };