@_solaris/messenger-widget 0.2.27 → 0.2.29
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.cjs +9 -9
- package/dist/messenger.embed.js +29 -29
- package/dist/messenger.js +398 -384
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { reactive as Ae, openBlock as l, createElementBlock as d, createVNode as K, Transition as Se, withCtx as xe, withKeys as me, withModifiers as ee, createElementVNode as i, toDisplayString as b, createCommentVNode as w, normalizeStyle as G, normalizeClass as
|
|
2
|
-
const
|
|
1
|
+
import { reactive as Ae, openBlock as l, createElementBlock as d, createVNode as K, Transition as Se, withCtx as xe, withKeys as me, withModifiers as ee, createElementVNode as i, toDisplayString as b, createCommentVNode as w, normalizeStyle as G, normalizeClass as B, Fragment as M, renderList as j, resolveComponent as I, createBlock as $, createTextVNode as oe, resolveDynamicComponent as Me, renderSlot as Te, withDirectives as W, vModelText as Q, vModelCheckbox as Oe, vModelSelect as Ie, 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
|
-
],
|
|
9
|
+
], Ee = 5 * 60 * 1e3, Le = 10 * 60 * 1e3, $e = 5 * 60 * 1e3;
|
|
10
10
|
function Re(t) {
|
|
11
11
|
const e = {
|
|
12
12
|
baseUrl: Fe(t.baseUrl || ""),
|
|
@@ -126,7 +126,7 @@ function Re(t) {
|
|
|
126
126
|
`/conversations/${encodeURIComponent(h)}/messages${C}`
|
|
127
127
|
);
|
|
128
128
|
}
|
|
129
|
-
async function
|
|
129
|
+
async function U(h, f) {
|
|
130
130
|
z();
|
|
131
131
|
const p = {
|
|
132
132
|
client_msg_id: f.client_msg_id,
|
|
@@ -191,7 +191,7 @@ function Re(t) {
|
|
|
191
191
|
if (!e.eventSource && !(typeof document < "u" && document.hidden))
|
|
192
192
|
try {
|
|
193
193
|
const h = new EventSource(Y());
|
|
194
|
-
for (const f of
|
|
194
|
+
for (const f of Be)
|
|
195
195
|
h.addEventListener(f, (p) => J(f, p.data));
|
|
196
196
|
h.addEventListener("error", () => a("error", new Error("SSE error"))), e.eventSource = h, r("open");
|
|
197
197
|
} catch (h) {
|
|
@@ -229,7 +229,7 @@ function Re(t) {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
function ne() {
|
|
232
|
-
u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(le,
|
|
232
|
+
u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(le, Ee));
|
|
233
233
|
}
|
|
234
234
|
function u() {
|
|
235
235
|
e.pollTimer && (clearInterval(e.pollTimer), e.pollTimer = null);
|
|
@@ -280,7 +280,7 @@ function Re(t) {
|
|
|
280
280
|
getConversation: A,
|
|
281
281
|
patchConversation: P,
|
|
282
282
|
listMessages: x,
|
|
283
|
-
postMessage:
|
|
283
|
+
postMessage: U,
|
|
284
284
|
postCallback: F,
|
|
285
285
|
uploadAttachment: N,
|
|
286
286
|
signAttachment: V,
|
|
@@ -296,7 +296,7 @@ function Fe(t) {
|
|
|
296
296
|
function je(t) {
|
|
297
297
|
return t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : t.startsWith("audio/") ? "audio" : "file";
|
|
298
298
|
}
|
|
299
|
-
function
|
|
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,7 +308,7 @@ function Ue() {
|
|
|
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
|
|
311
|
+
function Ue(t) {
|
|
312
312
|
const e = Ae({
|
|
313
313
|
ready: !1,
|
|
314
314
|
error: null,
|
|
@@ -441,7 +441,7 @@ function De(t) {
|
|
|
441
441
|
var T;
|
|
442
442
|
const h = (m || "").trim(), f = Array.isArray(_) && _.length > 0;
|
|
443
443
|
if (!u || !h && !f) return;
|
|
444
|
-
const p =
|
|
444
|
+
const p = De(), C = ne(u), O = {
|
|
445
445
|
id: p,
|
|
446
446
|
client_msg_id: p,
|
|
447
447
|
conversation_id: u,
|
|
@@ -495,7 +495,7 @@ function De(t) {
|
|
|
495
495
|
}
|
|
496
496
|
return null;
|
|
497
497
|
}
|
|
498
|
-
async function
|
|
498
|
+
async function U(u, { rating: m, comment: _ } = {}) {
|
|
499
499
|
const y = e.conversations.find((p) => p.id === u), f = {
|
|
500
500
|
...(y == null ? void 0 : y.metadata) || {},
|
|
501
501
|
feedback: {
|
|
@@ -623,7 +623,7 @@ function De(t) {
|
|
|
623
623
|
send: R,
|
|
624
624
|
clickCallback: A,
|
|
625
625
|
signAttachment: x,
|
|
626
|
-
submitFeedback:
|
|
626
|
+
submitFeedback: U,
|
|
627
627
|
getPendingApproval: F,
|
|
628
628
|
getActionInFlight: V,
|
|
629
629
|
getLatestSuggestions: Y,
|
|
@@ -632,7 +632,7 @@ function De(t) {
|
|
|
632
632
|
setPanelOpen: t.setPanelOpen
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
|
-
const
|
|
635
|
+
const D = {
|
|
636
636
|
w: "#ffffff",
|
|
637
637
|
g50: "#F9F9F7",
|
|
638
638
|
g100: "#F2F1EE",
|
|
@@ -664,21 +664,21 @@ const Ne = `
|
|
|
664
664
|
.wm-root {
|
|
665
665
|
--wm-f: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
666
666
|
--wm-fm: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
667
|
-
--wm-w: ${
|
|
668
|
-
--wm-g50: ${
|
|
669
|
-
--wm-g100: ${
|
|
670
|
-
--wm-g150: ${
|
|
671
|
-
--wm-g200: ${
|
|
672
|
-
--wm-g300: ${
|
|
673
|
-
--wm-g400: ${
|
|
674
|
-
--wm-g500: ${
|
|
675
|
-
--wm-g700: ${
|
|
676
|
-
--wm-g900: ${
|
|
677
|
-
--wm-a: ${
|
|
678
|
-
--wm-al: ${
|
|
679
|
-
--wm-green: ${
|
|
680
|
-
--wm-red: ${
|
|
681
|
-
--wm-redBg: ${
|
|
667
|
+
--wm-w: ${D.w};
|
|
668
|
+
--wm-g50: ${D.g50};
|
|
669
|
+
--wm-g100: ${D.g100};
|
|
670
|
+
--wm-g150: ${D.g150};
|
|
671
|
+
--wm-g200: ${D.g200};
|
|
672
|
+
--wm-g300: ${D.g300};
|
|
673
|
+
--wm-g400: ${D.g400};
|
|
674
|
+
--wm-g500: ${D.g500};
|
|
675
|
+
--wm-g700: ${D.g700};
|
|
676
|
+
--wm-g900: ${D.g900};
|
|
677
|
+
--wm-a: ${D.accent};
|
|
678
|
+
--wm-al: ${D.accentLight};
|
|
679
|
+
--wm-green: ${D.green};
|
|
680
|
+
--wm-red: ${D.red};
|
|
681
|
+
--wm-redBg: ${D.redBg};
|
|
682
682
|
--wm-sh1: 0 1px 3px rgba(0,0,0,.06);
|
|
683
683
|
--wm-sh2: 0 4px 24px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);
|
|
684
684
|
--wm-shPanel: 0 12px 40px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
|
|
@@ -704,7 +704,7 @@ const Ne = `
|
|
|
704
704
|
0% { transform: translateX(110%); opacity: 0; }
|
|
705
705
|
100% { transform: translateX(0); opacity: 1; }
|
|
706
706
|
}
|
|
707
|
-
`, Pe = "https://api.messenger.victorc.fr",
|
|
707
|
+
`, Pe = "https://api.messenger.victorc.fr", E = (t, e) => {
|
|
708
708
|
const n = t.__vccOpts || t;
|
|
709
709
|
for (const [a, r] of e)
|
|
710
710
|
n[a] = r;
|
|
@@ -788,7 +788,7 @@ function We(t, e, n, a, r, s) {
|
|
|
788
788
|
])
|
|
789
789
|
]);
|
|
790
790
|
}
|
|
791
|
-
const Ke = /* @__PURE__ */
|
|
791
|
+
const Ke = /* @__PURE__ */ E(He, [["render", We], ["__scopeId", "data-v-fabef371"]]), Ge = {
|
|
792
792
|
name: "WmAIAvatar",
|
|
793
793
|
props: {
|
|
794
794
|
size: { type: Number, default: 26 },
|
|
@@ -806,12 +806,12 @@ const Ke = /* @__PURE__ */ B(He, [["render", We], ["__scopeId", "data-v-fabef371
|
|
|
806
806
|
}, Je = ["width", "height"];
|
|
807
807
|
function Xe(t, e, n, a, r, s) {
|
|
808
808
|
return l(), d("div", {
|
|
809
|
-
class:
|
|
809
|
+
class: B(["wm-aiav", { "wm-aiav--tail": n.tail }]),
|
|
810
810
|
style: G({ width: n.size + "px", height: n.size + "px", "--wm-avr": n.size * 0.32 + "px" })
|
|
811
811
|
}, [
|
|
812
812
|
n.pulse ? (l(), d("div", Ye)) : w("", !0),
|
|
813
813
|
i("div", {
|
|
814
|
-
class:
|
|
814
|
+
class: B(["wm-aiav__inner", { "wm-aiav__inner--glow": n.pulse }])
|
|
815
815
|
}, [
|
|
816
816
|
(l(), d("svg", {
|
|
817
817
|
width: n.size * 0.5,
|
|
@@ -843,7 +843,7 @@ function Xe(t, e, n, a, r, s) {
|
|
|
843
843
|
], 2)
|
|
844
844
|
], 6);
|
|
845
845
|
}
|
|
846
|
-
const te = /* @__PURE__ */
|
|
846
|
+
const te = /* @__PURE__ */ E(Ge, [["render", Xe], ["__scopeId", "data-v-8c924688"]]), Qe = {
|
|
847
847
|
name: "WmHumanAvatar",
|
|
848
848
|
props: {
|
|
849
849
|
name: { type: String, default: "" },
|
|
@@ -879,7 +879,7 @@ function et(t, e, n, a, r, s) {
|
|
|
879
879
|
}, b(s.initials), 5))
|
|
880
880
|
], 4);
|
|
881
881
|
}
|
|
882
|
-
const ke = /* @__PURE__ */
|
|
882
|
+
const ke = /* @__PURE__ */ E(Qe, [["render", et], ["__scopeId", "data-v-a772b179"]]), tt = {
|
|
883
883
|
name: "WmTeamAvatars",
|
|
884
884
|
props: {
|
|
885
885
|
members: { type: Array, default: () => [] },
|
|
@@ -929,7 +929,7 @@ function at(t, e, n, a, r, s) {
|
|
|
929
929
|
n.responseLabel ? (l(), d("span", it, b(n.responseLabel), 1)) : w("", !0)
|
|
930
930
|
])) : w("", !0);
|
|
931
931
|
}
|
|
932
|
-
const ot = /* @__PURE__ */
|
|
932
|
+
const ot = /* @__PURE__ */ E(tt, [["render", at], ["__scopeId", "data-v-3659b9c1"]]), lt = {
|
|
933
933
|
name: "WmHeader",
|
|
934
934
|
components: { AIAvatar: te, HumanAvatar: ke, TeamAvatars: ot },
|
|
935
935
|
props: {
|
|
@@ -1027,7 +1027,7 @@ function yt(t, e, n, a, r, s) {
|
|
|
1027
1027
|
n.showMore ? (l(), d("button", {
|
|
1028
1028
|
key: 0,
|
|
1029
1029
|
type: "button",
|
|
1030
|
-
class:
|
|
1030
|
+
class: B(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
|
|
1031
1031
|
"aria-label": "Plus d'options",
|
|
1032
1032
|
title: "Plus d'options",
|
|
1033
1033
|
onClick: e[1] || (e[1] = (k) => t.$emit("more"))
|
|
@@ -1081,7 +1081,7 @@ function yt(t, e, n, a, r, s) {
|
|
|
1081
1081
|
])
|
|
1082
1082
|
]);
|
|
1083
1083
|
}
|
|
1084
|
-
const gt = /* @__PURE__ */
|
|
1084
|
+
const gt = /* @__PURE__ */ E(lt, [["render", yt], ["__scopeId", "data-v-b5f5f6a9"]]), _e = {
|
|
1085
1085
|
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",
|
|
1086
1086
|
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",
|
|
1087
1087
|
status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
@@ -1115,10 +1115,10 @@ Je réponds en quelques secondes.`;
|
|
|
1115
1115
|
}, bt = { class: "wm-onb" }, kt = { class: "wm-onb__hero" }, Ct = { class: "wm-onb__title" }, At = { class: "wm-onb__sub" }, St = {
|
|
1116
1116
|
key: 0,
|
|
1117
1117
|
class: "wm-onb__section"
|
|
1118
|
-
}, xt = { class: "wm-onb__links" }, Mt = ["onClick"], Tt = { class: "wm-onb__resume-body" }, Ot = { class: "wm-onb__resume-title" }, It = { class: "wm-onb__resume-preview" },
|
|
1118
|
+
}, xt = { class: "wm-onb__links" }, Mt = ["onClick"], Tt = { class: "wm-onb__resume-body" }, Ot = { class: "wm-onb__resume-title" }, It = { class: "wm-onb__resume-preview" }, Bt = {
|
|
1119
1119
|
key: 1,
|
|
1120
1120
|
class: "wm-onb__section"
|
|
1121
|
-
},
|
|
1121
|
+
}, Et = { class: "wm-onb__links" }, Lt = ["onClick"], $t = { class: "wm-onb__link-icon" }, Rt = {
|
|
1122
1122
|
width: "14",
|
|
1123
1123
|
height: "14",
|
|
1124
1124
|
viewBox: "0 0 24 24",
|
|
@@ -1128,7 +1128,7 @@ Je réponds en quelques secondes.`;
|
|
|
1128
1128
|
"stroke-linecap": "round",
|
|
1129
1129
|
"stroke-linejoin": "round",
|
|
1130
1130
|
"aria-hidden": "true"
|
|
1131
|
-
}, Ft = ["d"], jt = { class: "wm-onb__link-label" },
|
|
1131
|
+
}, Ft = ["d"], jt = { class: "wm-onb__link-label" }, Dt = { class: "wm-onb__cta" }, Ut = ["disabled"];
|
|
1132
1132
|
function Nt(t, e, n, a, r, s) {
|
|
1133
1133
|
const o = I("AIAvatar");
|
|
1134
1134
|
return l(), d("div", bt, [
|
|
@@ -1189,9 +1189,9 @@ function Nt(t, e, n, a, r, s) {
|
|
|
1189
1189
|
], 8, Mt))), 128))
|
|
1190
1190
|
])
|
|
1191
1191
|
])) : w("", !0),
|
|
1192
|
-
n.quickLinks.length ? (l(), d("div",
|
|
1192
|
+
n.quickLinks.length ? (l(), d("div", Bt, [
|
|
1193
1193
|
e[5] || (e[5] = i("div", { class: "wm-onb__section-title" }, "Accès rapide", -1)),
|
|
1194
|
-
i("div",
|
|
1194
|
+
i("div", Et, [
|
|
1195
1195
|
(l(!0), d(M, null, j(n.quickLinks, (c, v) => (l(), d("button", {
|
|
1196
1196
|
key: v,
|
|
1197
1197
|
type: "button",
|
|
@@ -1223,17 +1223,17 @@ function Nt(t, e, n, a, r, s) {
|
|
|
1223
1223
|
], 8, Lt))), 128))
|
|
1224
1224
|
])
|
|
1225
1225
|
])) : w("", !0),
|
|
1226
|
-
i("div",
|
|
1226
|
+
i("div", Dt, [
|
|
1227
1227
|
i("button", {
|
|
1228
1228
|
type: "button",
|
|
1229
1229
|
class: "wm-onb__startBtn",
|
|
1230
1230
|
disabled: n.busy,
|
|
1231
1231
|
onClick: e[0] || (e[0] = (c) => t.$emit("start"))
|
|
1232
|
-
}, b(n.busy ? "…" : "Commencer une conversation"), 9,
|
|
1232
|
+
}, b(n.busy ? "…" : "Commencer une conversation"), 9, Ut)
|
|
1233
1233
|
])
|
|
1234
1234
|
]);
|
|
1235
1235
|
}
|
|
1236
|
-
const Pt = /* @__PURE__ */
|
|
1236
|
+
const Pt = /* @__PURE__ */ E(wt, [["render", Nt], ["__scopeId", "data-v-bd89bc8f"]]);
|
|
1237
1237
|
function Ht(t) {
|
|
1238
1238
|
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();
|
|
1239
1239
|
}
|
|
@@ -1293,10 +1293,10 @@ const zt = {
|
|
|
1293
1293
|
"stroke-width": "2.2",
|
|
1294
1294
|
"stroke-linecap": "round",
|
|
1295
1295
|
"stroke-linejoin": "round"
|
|
1296
|
-
}, Yt = { class: "wm-
|
|
1297
|
-
function
|
|
1296
|
+
}, Yt = { class: "wm-result__body" }, Jt = { class: "wm-result__label" }, Xt = { class: "wm-result__detail" };
|
|
1297
|
+
function Qt(t, e, n, a, r, s) {
|
|
1298
1298
|
return l(), d("div", {
|
|
1299
|
-
class:
|
|
1299
|
+
class: B(["wm-result", `wm-result--${n.state}`])
|
|
1300
1300
|
}, [
|
|
1301
1301
|
i("span", Vt, [
|
|
1302
1302
|
n.state === "success" ? (l(), d("svg", qt, [...e[0] || (e[0] = [
|
|
@@ -1326,17 +1326,19 @@ function Xt(t, e, n, a, r, s) {
|
|
|
1326
1326
|
}, null, -1)
|
|
1327
1327
|
])]))
|
|
1328
1328
|
]),
|
|
1329
|
-
i("span", Yt,
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1329
|
+
i("span", Yt, [
|
|
1330
|
+
i("span", Jt, b(n.label), 1),
|
|
1331
|
+
s.detailText ? (l(), d(M, { key: 0 }, [
|
|
1332
|
+
e[4] || (e[4] = i("span", {
|
|
1333
|
+
class: "wm-result__sep",
|
|
1334
|
+
"aria-hidden": "true"
|
|
1335
|
+
}, " · ", -1)),
|
|
1336
|
+
i("span", Xt, b(s.detailText), 1)
|
|
1337
|
+
], 64)) : w("", !0)
|
|
1338
|
+
])
|
|
1337
1339
|
], 2);
|
|
1338
1340
|
}
|
|
1339
|
-
const
|
|
1341
|
+
const Zt = /* @__PURE__ */ E(zt, [["render", Qt], ["__scopeId", "data-v-62bef892"]]), en = {
|
|
1340
1342
|
name: "WmArtifactFormResponse",
|
|
1341
1343
|
props: {
|
|
1342
1344
|
data: { type: Object, required: !0 }
|
|
@@ -1347,11 +1349,11 @@ const Qt = /* @__PURE__ */ B(zt, [["render", Xt], ["__scopeId", "data-v-7f90dad6
|
|
|
1347
1349
|
return Array.isArray((t = this.data) == null ? void 0 : t.fields) ? this.data.fields : [];
|
|
1348
1350
|
}
|
|
1349
1351
|
}
|
|
1350
|
-
},
|
|
1351
|
-
function
|
|
1352
|
-
return l(), d("div",
|
|
1353
|
-
i("div",
|
|
1354
|
-
i("div",
|
|
1352
|
+
}, tn = { class: "wm-art wm-art--formResponse" }, nn = { class: "wm-art__head" }, sn = { class: "wm-art__title" }, rn = { class: "wm-art__body" }, an = { class: "wm-art__fieldLabel" };
|
|
1353
|
+
function on(t, e, n, a, r, s) {
|
|
1354
|
+
return l(), d("div", tn, [
|
|
1355
|
+
i("div", nn, [
|
|
1356
|
+
i("div", sn, b(n.data.title || "Formulaire"), 1),
|
|
1355
1357
|
e[0] || (e[0] = i("span", { class: "wm-art__badge wm-art__badge--success" }, [
|
|
1356
1358
|
i("svg", {
|
|
1357
1359
|
width: "11",
|
|
@@ -1369,20 +1371,20 @@ function an(t, e, n, a, r, s) {
|
|
|
1369
1371
|
oe(" Envoyé ")
|
|
1370
1372
|
], -1))
|
|
1371
1373
|
]),
|
|
1372
|
-
i("div",
|
|
1374
|
+
i("div", rn, [
|
|
1373
1375
|
(l(!0), d(M, null, j(s.fields, (o, c) => (l(), d("div", {
|
|
1374
1376
|
key: c,
|
|
1375
1377
|
class: "wm-art__field"
|
|
1376
1378
|
}, [
|
|
1377
|
-
i("div",
|
|
1379
|
+
i("div", an, b(o.label), 1),
|
|
1378
1380
|
i("div", {
|
|
1379
|
-
class:
|
|
1381
|
+
class: B(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1380
1382
|
}, b(o.value), 3)
|
|
1381
1383
|
]))), 128))
|
|
1382
1384
|
])
|
|
1383
1385
|
]);
|
|
1384
1386
|
}
|
|
1385
|
-
const
|
|
1387
|
+
const ln = /* @__PURE__ */ E(en, [["render", on], ["__scopeId", "data-v-ca24a9c9"]]), cn = {
|
|
1386
1388
|
name: "WmArtifactInfoCard",
|
|
1387
1389
|
props: {
|
|
1388
1390
|
data: { type: Object, required: !0 }
|
|
@@ -1397,61 +1399,61 @@ const on = /* @__PURE__ */ B(Zt, [["render", an], ["__scopeId", "data-v-ca24a9c9
|
|
|
1397
1399
|
return !!((t = this.data) != null && t.body) || this.fields.length > 0;
|
|
1398
1400
|
}
|
|
1399
1401
|
}
|
|
1400
|
-
},
|
|
1402
|
+
}, dn = { class: "wm-art wm-art--infoCard" }, un = {
|
|
1401
1403
|
key: 0,
|
|
1402
1404
|
class: "wm-art__image"
|
|
1403
|
-
},
|
|
1405
|
+
}, hn = ["src", "alt"], mn = { class: "wm-art__head" }, fn = { class: "wm-art__headMain" }, _n = { class: "wm-art__title" }, pn = {
|
|
1404
1406
|
key: 0,
|
|
1405
1407
|
class: "wm-art__subtitle"
|
|
1406
|
-
},
|
|
1408
|
+
}, vn = {
|
|
1407
1409
|
key: 1,
|
|
1408
1410
|
class: "wm-art__body"
|
|
1409
|
-
},
|
|
1411
|
+
}, yn = {
|
|
1410
1412
|
key: 0,
|
|
1411
1413
|
class: "wm-art__text"
|
|
1412
|
-
},
|
|
1413
|
-
function
|
|
1414
|
-
return l(), d("div",
|
|
1415
|
-
n.data.image_url ? (l(), d("figure",
|
|
1414
|
+
}, gn = { class: "wm-art__fieldLabel" };
|
|
1415
|
+
function wn(t, e, n, a, r, s) {
|
|
1416
|
+
return l(), d("div", dn, [
|
|
1417
|
+
n.data.image_url ? (l(), d("figure", un, [
|
|
1416
1418
|
i("img", {
|
|
1417
1419
|
src: n.data.image_url,
|
|
1418
1420
|
alt: n.data.title || "",
|
|
1419
1421
|
loading: "lazy"
|
|
1420
|
-
}, null, 8,
|
|
1422
|
+
}, null, 8, hn)
|
|
1421
1423
|
])) : w("", !0),
|
|
1422
|
-
i("div",
|
|
1423
|
-
i("div",
|
|
1424
|
-
i("div",
|
|
1425
|
-
n.data.subtitle ? (l(), d("div",
|
|
1424
|
+
i("div", mn, [
|
|
1425
|
+
i("div", fn, [
|
|
1426
|
+
i("div", _n, b(n.data.title), 1),
|
|
1427
|
+
n.data.subtitle ? (l(), d("div", pn, b(n.data.subtitle), 1)) : w("", !0)
|
|
1426
1428
|
]),
|
|
1427
1429
|
n.data.badge && n.data.badge.label ? (l(), d("span", {
|
|
1428
1430
|
key: 0,
|
|
1429
|
-
class:
|
|
1431
|
+
class: B(["wm-art__badge", `wm-art__badge--${n.data.badge.tone || "neutral"}`])
|
|
1430
1432
|
}, b(n.data.badge.label), 3)) : w("", !0)
|
|
1431
1433
|
]),
|
|
1432
|
-
s.hasBody ? (l(), d("div",
|
|
1433
|
-
n.data.body ? (l(), d("div",
|
|
1434
|
+
s.hasBody ? (l(), d("div", vn, [
|
|
1435
|
+
n.data.body ? (l(), d("div", yn, b(n.data.body), 1)) : w("", !0),
|
|
1434
1436
|
s.fields.length ? (l(!0), d(M, { key: 1 }, j(s.fields, (o, c) => (l(), d("div", {
|
|
1435
1437
|
key: c,
|
|
1436
1438
|
class: "wm-art__field"
|
|
1437
1439
|
}, [
|
|
1438
|
-
i("div",
|
|
1440
|
+
i("div", gn, b(o.label), 1),
|
|
1439
1441
|
i("div", {
|
|
1440
|
-
class:
|
|
1442
|
+
class: B(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1441
1443
|
}, b(o.value), 3)
|
|
1442
1444
|
]))), 128)) : w("", !0)
|
|
1443
1445
|
])) : w("", !0)
|
|
1444
1446
|
]);
|
|
1445
1447
|
}
|
|
1446
|
-
const
|
|
1447
|
-
function
|
|
1448
|
+
const bn = /* @__PURE__ */ E(cn, [["render", wn], ["__scopeId", "data-v-d7369333"]]);
|
|
1449
|
+
function kn(t) {
|
|
1448
1450
|
if (!t) return "";
|
|
1449
1451
|
const e = new Date(t);
|
|
1450
1452
|
if (Number.isNaN(e.getTime())) return t;
|
|
1451
1453
|
const n = e.toLocaleDateString("fr-FR", { day: "numeric", month: "long", year: "numeric" }), a = e.toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
|
|
1452
1454
|
return `${n} à ${a}`;
|
|
1453
1455
|
}
|
|
1454
|
-
const
|
|
1456
|
+
const Cn = {
|
|
1455
1457
|
name: "WmArtifactTicket",
|
|
1456
1458
|
props: {
|
|
1457
1459
|
data: { type: Object, required: !0 }
|
|
@@ -1463,7 +1465,7 @@ const kn = {
|
|
|
1463
1465
|
},
|
|
1464
1466
|
formattedDate() {
|
|
1465
1467
|
var t;
|
|
1466
|
-
return
|
|
1468
|
+
return kn((t = this.data) == null ? void 0 : t.created_at);
|
|
1467
1469
|
}
|
|
1468
1470
|
},
|
|
1469
1471
|
methods: {
|
|
@@ -1485,13 +1487,13 @@ const kn = {
|
|
|
1485
1487
|
return /high|haute|élev|elev|critic|critiq|urgent/.test(e) ? 3 : /low|basse|faible|minor/.test(e) ? 1 : 2;
|
|
1486
1488
|
}
|
|
1487
1489
|
}
|
|
1488
|
-
},
|
|
1490
|
+
}, An = { class: "wm-art wm-art--ticket" }, Sn = { class: "wm-art__head wm-tk__head" }, xn = { class: "wm-art__title wm-tk__title" }, Mn = { class: "wm-tk__sub" }, Tn = { class: "wm-tk__ref" }, On = {
|
|
1489
1491
|
key: 0,
|
|
1490
1492
|
class: "wm-tk__text"
|
|
1491
|
-
},
|
|
1493
|
+
}, In = {
|
|
1492
1494
|
key: 0,
|
|
1493
1495
|
class: "wm-art__body"
|
|
1494
|
-
},
|
|
1496
|
+
}, Bn = { class: "wm-art__fieldLabel" }, En = ["data-level"], Ln = {
|
|
1495
1497
|
key: 1,
|
|
1496
1498
|
class: "wm-tk__date",
|
|
1497
1499
|
width: "12",
|
|
@@ -1503,16 +1505,16 @@ const kn = {
|
|
|
1503
1505
|
"stroke-linecap": "round",
|
|
1504
1506
|
"stroke-linejoin": "round",
|
|
1505
1507
|
"aria-hidden": "true"
|
|
1506
|
-
},
|
|
1508
|
+
}, $n = {
|
|
1507
1509
|
key: 1,
|
|
1508
1510
|
class: "wm-art__footer wm-tk__footer"
|
|
1509
1511
|
};
|
|
1510
|
-
function
|
|
1511
|
-
return l(), d("div",
|
|
1512
|
-
i("div",
|
|
1513
|
-
i("div",
|
|
1514
|
-
i("div",
|
|
1515
|
-
i("div",
|
|
1512
|
+
function Rn(t, e, n, a, r, s) {
|
|
1513
|
+
return l(), d("div", An, [
|
|
1514
|
+
i("div", Sn, [
|
|
1515
|
+
i("div", xn, b(n.data.title), 1),
|
|
1516
|
+
i("div", Mn, [
|
|
1517
|
+
i("div", Tn, [
|
|
1516
1518
|
e[0] || (e[0] = i("svg", {
|
|
1517
1519
|
width: "11",
|
|
1518
1520
|
height: "11",
|
|
@@ -1530,7 +1532,7 @@ function $n(t, e, n, a, r, s) {
|
|
|
1530
1532
|
i("span", null, b(n.data.reference), 1)
|
|
1531
1533
|
]),
|
|
1532
1534
|
i("span", {
|
|
1533
|
-
class:
|
|
1535
|
+
class: B(["wm-art__badge", "wm-tk__badge", `wm-art__badge--${n.data.status.tone || "neutral"}`])
|
|
1534
1536
|
}, [
|
|
1535
1537
|
e[1] || (e[1] = i("span", {
|
|
1536
1538
|
class: "wm-tk__dot",
|
|
@@ -1539,16 +1541,16 @@ function $n(t, e, n, a, r, s) {
|
|
|
1539
1541
|
oe(" " + b(n.data.status.label), 1)
|
|
1540
1542
|
], 2)
|
|
1541
1543
|
]),
|
|
1542
|
-
n.data.body ? (l(), d("div",
|
|
1544
|
+
n.data.body ? (l(), d("div", On, b(n.data.body), 1)) : w("", !0)
|
|
1543
1545
|
]),
|
|
1544
|
-
s.fields.length ? (l(), d("div",
|
|
1546
|
+
s.fields.length ? (l(), d("div", In, [
|
|
1545
1547
|
(l(!0), d(M, null, j(s.fields, (o, c) => (l(), d("div", {
|
|
1546
1548
|
key: c,
|
|
1547
1549
|
class: "wm-art__field"
|
|
1548
1550
|
}, [
|
|
1549
|
-
i("div",
|
|
1551
|
+
i("div", Bn, b(o.label), 1),
|
|
1550
1552
|
i("div", {
|
|
1551
|
-
class:
|
|
1553
|
+
class: B(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1552
1554
|
}, [
|
|
1553
1555
|
s.isPriority(o.label) ? (l(), d("svg", {
|
|
1554
1556
|
key: 0,
|
|
@@ -1580,7 +1582,7 @@ function $n(t, e, n, a, r, s) {
|
|
|
1580
1582
|
height: "9",
|
|
1581
1583
|
rx: "0.5"
|
|
1582
1584
|
}, null, -1)
|
|
1583
|
-
])], 8, En)) : s.isDate(o.label) ? (l(), d("svg",
|
|
1585
|
+
])], 8, En)) : s.isDate(o.label) ? (l(), d("svg", Ln, [...e[3] || (e[3] = [
|
|
1584
1586
|
i("rect", {
|
|
1585
1587
|
x: "3",
|
|
1586
1588
|
y: "4",
|
|
@@ -1594,7 +1596,7 @@ function $n(t, e, n, a, r, s) {
|
|
|
1594
1596
|
], 2)
|
|
1595
1597
|
]))), 128))
|
|
1596
1598
|
])) : w("", !0),
|
|
1597
|
-
n.data.created_at ? (l(), d("div",
|
|
1599
|
+
n.data.created_at ? (l(), d("div", $n, [
|
|
1598
1600
|
e[4] || (e[4] = i("svg", {
|
|
1599
1601
|
width: "11",
|
|
1600
1602
|
height: "11",
|
|
@@ -1619,11 +1621,11 @@ function $n(t, e, n, a, r, s) {
|
|
|
1619
1621
|
])) : w("", !0)
|
|
1620
1622
|
]);
|
|
1621
1623
|
}
|
|
1622
|
-
const
|
|
1623
|
-
form_response:
|
|
1624
|
-
info_card:
|
|
1625
|
-
ticket:
|
|
1626
|
-
},
|
|
1624
|
+
const Fn = /* @__PURE__ */ E(Cn, [["render", Rn], ["__scopeId", "data-v-8b274eb7"]]), jn = {
|
|
1625
|
+
form_response: ln,
|
|
1626
|
+
info_card: bn,
|
|
1627
|
+
ticket: Fn
|
|
1628
|
+
}, Dn = {
|
|
1627
1629
|
name: "WmArtifactRenderer",
|
|
1628
1630
|
props: {
|
|
1629
1631
|
// Forme : { kind: string, data: any } (le `data` est validé
|
|
@@ -1634,7 +1636,7 @@ const Rn = /* @__PURE__ */ B(kn, [["render", $n], ["__scopeId", "data-v-8b274eb7
|
|
|
1634
1636
|
component() {
|
|
1635
1637
|
var e;
|
|
1636
1638
|
const t = (e = this.artifact) == null ? void 0 : e.kind;
|
|
1637
|
-
return t &&
|
|
1639
|
+
return t && jn[t] || null;
|
|
1638
1640
|
}
|
|
1639
1641
|
}
|
|
1640
1642
|
};
|
|
@@ -1644,7 +1646,7 @@ function Un(t, e, n, a, r, s) {
|
|
|
1644
1646
|
data: n.artifact.data
|
|
1645
1647
|
}, null, 8, ["data"])) : w("", !0);
|
|
1646
1648
|
}
|
|
1647
|
-
const
|
|
1649
|
+
const Nn = /* @__PURE__ */ E(Dn, [["render", Un]]), Pn = {
|
|
1648
1650
|
name: "WmAttachmentPreview",
|
|
1649
1651
|
inject: {
|
|
1650
1652
|
signAttachmentFn: { default: null }
|
|
@@ -1698,17 +1700,17 @@ const Dn = /* @__PURE__ */ B(jn, [["render", Un]]), Nn = {
|
|
|
1698
1700
|
this.url || t.preventDefault();
|
|
1699
1701
|
}
|
|
1700
1702
|
}
|
|
1701
|
-
},
|
|
1703
|
+
}, Hn = ["href"], zn = ["src", "alt"], Vn = ["src"], qn = ["src"], Wn = ["href", "download"], Kn = { class: "wm-att__main" }, Gn = { class: "wm-att__name" }, Yn = {
|
|
1702
1704
|
key: 0,
|
|
1703
1705
|
class: "wm-att__meta"
|
|
1704
|
-
},
|
|
1706
|
+
}, Jn = {
|
|
1705
1707
|
key: 0,
|
|
1706
1708
|
class: "wm-att__spin",
|
|
1707
1709
|
"aria-hidden": "true"
|
|
1708
1710
|
};
|
|
1709
|
-
function
|
|
1711
|
+
function Xn(t, e, n, a, r, s) {
|
|
1710
1712
|
return l(), d("div", {
|
|
1711
|
-
class:
|
|
1713
|
+
class: B(["wm-att", ["wm-att--" + (s.kind || "file")]])
|
|
1712
1714
|
}, [
|
|
1713
1715
|
s.kind === "image" && r.url ? (l(), d("a", {
|
|
1714
1716
|
key: 0,
|
|
@@ -1721,18 +1723,18 @@ function Jn(t, e, n, a, r, s) {
|
|
|
1721
1723
|
src: r.url,
|
|
1722
1724
|
alt: s.displayName,
|
|
1723
1725
|
loading: "lazy"
|
|
1724
|
-
}, null, 8,
|
|
1725
|
-
], 8,
|
|
1726
|
+
}, null, 8, zn)
|
|
1727
|
+
], 8, Hn)) : s.kind === "audio" && r.url ? (l(), d("audio", {
|
|
1726
1728
|
key: 1,
|
|
1727
1729
|
src: r.url,
|
|
1728
1730
|
controls: "",
|
|
1729
1731
|
preload: "metadata"
|
|
1730
|
-
}, null, 8,
|
|
1732
|
+
}, null, 8, Vn)) : s.kind === "video" && r.url ? (l(), d("video", {
|
|
1731
1733
|
key: 2,
|
|
1732
1734
|
src: r.url,
|
|
1733
1735
|
controls: "",
|
|
1734
1736
|
preload: "metadata"
|
|
1735
|
-
}, null, 8,
|
|
1737
|
+
}, null, 8, qn)) : (l(), d("a", {
|
|
1736
1738
|
key: 3,
|
|
1737
1739
|
class: "wm-att__file",
|
|
1738
1740
|
href: r.url || "#",
|
|
@@ -1757,19 +1759,19 @@ function Jn(t, e, n, a, r, s) {
|
|
|
1757
1759
|
i("path", { d: "M14 2v6h6" })
|
|
1758
1760
|
])
|
|
1759
1761
|
], -1)),
|
|
1760
|
-
i("span",
|
|
1761
|
-
i("span",
|
|
1762
|
-
s.sizeLabel ? (l(), d("span",
|
|
1762
|
+
i("span", Kn, [
|
|
1763
|
+
i("span", Gn, b(s.displayName), 1),
|
|
1764
|
+
s.sizeLabel ? (l(), d("span", Yn, b(s.sizeLabel), 1)) : w("", !0)
|
|
1763
1765
|
]),
|
|
1764
|
-
r.loading ? (l(), d("span",
|
|
1765
|
-
], 8,
|
|
1766
|
+
r.loading ? (l(), d("span", Jn)) : w("", !0)
|
|
1767
|
+
], 8, Wn))
|
|
1766
1768
|
], 2);
|
|
1767
1769
|
}
|
|
1768
|
-
const
|
|
1769
|
-
function
|
|
1770
|
+
const Qn = /* @__PURE__ */ E(Pn, [["render", Xn], ["__scopeId", "data-v-1cd1267b"]]);
|
|
1771
|
+
function Zn(t) {
|
|
1770
1772
|
return String(t).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1771
1773
|
}
|
|
1772
|
-
function
|
|
1774
|
+
function es(t) {
|
|
1773
1775
|
return /^(https?:\/\/|mailto:|tel:)/i.test(String(t).trim());
|
|
1774
1776
|
}
|
|
1775
1777
|
const pe = "";
|
|
@@ -1779,11 +1781,11 @@ function re(t) {
|
|
|
1779
1781
|
return e = e.replace(/`([^`\n]+)`/g, (a, r) => {
|
|
1780
1782
|
const s = n.length;
|
|
1781
1783
|
return n.push(r), `${pe}CODE${s}${pe}`;
|
|
1782
|
-
}), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) =>
|
|
1784
|
+
}), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) => es(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;
|
|
1783
1785
|
}
|
|
1784
|
-
function
|
|
1786
|
+
function ts(t) {
|
|
1785
1787
|
if (!t) return "";
|
|
1786
|
-
const e =
|
|
1788
|
+
const e = Zn(t).split(`
|
|
1787
1789
|
`), n = [];
|
|
1788
1790
|
let a = 0;
|
|
1789
1791
|
for (; a < e.length; ) {
|
|
@@ -1844,7 +1846,7 @@ function es(t) {
|
|
|
1844
1846
|
}
|
|
1845
1847
|
return r;
|
|
1846
1848
|
}
|
|
1847
|
-
const
|
|
1849
|
+
const ns = {
|
|
1848
1850
|
name: "WmBubble",
|
|
1849
1851
|
props: {
|
|
1850
1852
|
role: { type: String, default: "ai" },
|
|
@@ -1853,41 +1855,41 @@ const ts = {
|
|
|
1853
1855
|
},
|
|
1854
1856
|
computed: {
|
|
1855
1857
|
rendered() {
|
|
1856
|
-
return
|
|
1858
|
+
return ts(this.text);
|
|
1857
1859
|
}
|
|
1858
1860
|
}
|
|
1859
|
-
},
|
|
1860
|
-
function
|
|
1861
|
+
}, ss = ["innerHTML"];
|
|
1862
|
+
function rs(t, e, n, a, r, s) {
|
|
1861
1863
|
return l(), d("div", {
|
|
1862
|
-
class:
|
|
1864
|
+
class: B(["wm-bubble", "wm-bubble--" + n.role])
|
|
1863
1865
|
}, [
|
|
1864
1866
|
Te(t.$slots, "default", {}, () => [
|
|
1865
|
-
i("span", { innerHTML: s.rendered }, null, 8,
|
|
1867
|
+
i("span", { innerHTML: s.rendered }, null, 8, ss)
|
|
1866
1868
|
], !0)
|
|
1867
1869
|
], 2);
|
|
1868
1870
|
}
|
|
1869
|
-
const
|
|
1870
|
-
function
|
|
1871
|
-
return l(), d("div",
|
|
1871
|
+
const is = /* @__PURE__ */ E(ns, [["render", rs], ["__scopeId", "data-v-5c9e9f2b"]]), as = { name: "WmTyping" }, os = { class: "wm-typing" };
|
|
1872
|
+
function ls(t, e, n, a, r, s) {
|
|
1873
|
+
return l(), d("div", os, [...e[0] || (e[0] = [
|
|
1872
1874
|
i("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
1873
1875
|
i("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
1874
1876
|
i("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
1875
1877
|
])]);
|
|
1876
1878
|
}
|
|
1877
|
-
const
|
|
1879
|
+
const cs = /* @__PURE__ */ E(as, [["render", ls], ["__scopeId", "data-v-df2447fd"]]);
|
|
1878
1880
|
function Z(t) {
|
|
1879
1881
|
return t ? t.client_msg_id || t.id : "";
|
|
1880
1882
|
}
|
|
1881
|
-
const
|
|
1883
|
+
const ds = {
|
|
1882
1884
|
transferred_to_human: "Conversation transférée à un humain",
|
|
1883
1885
|
assigned: "{name} a rejoint la conversation",
|
|
1884
1886
|
unassigned: "L'agent a quitté la conversation",
|
|
1885
1887
|
resolved: "Conversation résolue",
|
|
1886
1888
|
reopened: "Conversation rouverte",
|
|
1887
1889
|
idle: "Conversation en pause"
|
|
1888
|
-
},
|
|
1890
|
+
}, us = 80, hs = 200, ms = {
|
|
1889
1891
|
name: "WmMessageList",
|
|
1890
|
-
components: { AIAvatar: te, HumanAvatar: ke, Bubble:
|
|
1892
|
+
components: { AIAvatar: te, HumanAvatar: ke, Bubble: is, Typing: cs, ActionResult: Zt, AttachmentPreview: Qn, ArtifactRenderer: Nn },
|
|
1891
1893
|
props: {
|
|
1892
1894
|
messages: { type: Array, default: () => [] },
|
|
1893
1895
|
streamingActive: { type: Boolean, default: !1 },
|
|
@@ -1903,7 +1905,12 @@ const cs = {
|
|
|
1903
1905
|
// current thread. Drives the "Non lus" separator: rendered before the
|
|
1904
1906
|
// first non-user group whose first message is newer than this anchor.
|
|
1905
1907
|
// Empty string disables the separator (fresh thread or no prior read).
|
|
1906
|
-
unreadAnchorTs: { type: String, default: "" }
|
|
1908
|
+
unreadAnchorTs: { type: String, default: "" },
|
|
1909
|
+
// Borne haute (instant ISO d'ouverture du thread). Les messages dont
|
|
1910
|
+
// `created_at` la dépasse sont arrivés EN DIRECT pendant que
|
|
1911
|
+
// l'utilisateur regardait — ils n'entrent pas dans le batch "Non lus".
|
|
1912
|
+
// Vide ⇒ pas de borne haute (rétrocompatible).
|
|
1913
|
+
unreadBoundaryTs: { type: String, default: "" }
|
|
1907
1914
|
},
|
|
1908
1915
|
emits: ["load-more"],
|
|
1909
1916
|
data() {
|
|
@@ -1980,7 +1987,7 @@ const cs = {
|
|
|
1980
1987
|
for (const t of this.groups) {
|
|
1981
1988
|
if (t.role === "user" || t.role === "system") continue;
|
|
1982
1989
|
const e = t.messages[0];
|
|
1983
|
-
if (e != null && e.created_at && e.created_at
|
|
1990
|
+
if (e != null && e.created_at && !(e.created_at <= this.unreadAnchorTs) && !(this.unreadBoundaryTs && e.created_at > this.unreadBoundaryTs))
|
|
1984
1991
|
return t.key;
|
|
1985
1992
|
}
|
|
1986
1993
|
return null;
|
|
@@ -2008,11 +2015,11 @@ const cs = {
|
|
|
2008
2015
|
methods: {
|
|
2009
2016
|
messageKey: Z,
|
|
2010
2017
|
isAtBottom(t) {
|
|
2011
|
-
return t.scrollHeight - t.scrollTop - t.clientHeight <=
|
|
2018
|
+
return t.scrollHeight - t.scrollTop - t.clientHeight <= us;
|
|
2012
2019
|
},
|
|
2013
2020
|
onScroll() {
|
|
2014
2021
|
const t = this.$refs.scrollEl;
|
|
2015
|
-
t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <=
|
|
2022
|
+
t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <= hs && (this._pendingLoadMore = !0, this.$emit("load-more")));
|
|
2016
2023
|
},
|
|
2017
2024
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
2018
2025
|
//
|
|
@@ -2189,8 +2196,8 @@ const cs = {
|
|
|
2189
2196
|
cornersFor(t, e) {
|
|
2190
2197
|
var Y, H, J;
|
|
2191
2198
|
const n = t.items, a = (Y = n[e]) == null ? void 0 : Y.kind, r = (H = n[e - 1]) == null ? void 0 : H.kind, s = (J = n[e + 1]) == null ? void 0 : J.kind, o = t.role === "user", c = 14, v = 4, k = r == null ? void 0 : r.bottom, g = s == null ? void 0 : s.top, S = this.widthByKey[this.rowKeyOf(t, e)], R = this.widthByKey[this.rowKeyOf(t, e - 1)], A = this.widthByKey[this.rowKeyOf(t, e + 1)], P = 0.5, x = (q, z, X) => q != null && S != null ? q + P >= S : z === X || z === "card" && X === "bubble";
|
|
2192
|
-
let
|
|
2193
|
-
return o ? (k && (F = v), (g || !s) && (N = v), k && x(R, k, a == null ? void 0 : a.top) && (
|
|
2199
|
+
let U = c, F = c, N = c, V = c;
|
|
2200
|
+
return o ? (k && (F = v), (g || !s) && (N = v), k && x(R, k, a == null ? void 0 : a.top) && (U = v), g && x(A, g, a == null ? void 0 : a.bottom) && (V = v)) : (k && (U = v), (g || !s) && (V = v), k && x(R, k, a == null ? void 0 : a.top) && (F = v), g && x(A, g, a == null ? void 0 : a.bottom) && (N = v)), { tl: U, tr: F, br: N, bl: V };
|
|
2194
2201
|
},
|
|
2195
2202
|
// Inline style emitting the four corner CSS variables. Set on
|
|
2196
2203
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -2287,7 +2294,7 @@ const cs = {
|
|
|
2287
2294
|
},
|
|
2288
2295
|
systemLabel(t) {
|
|
2289
2296
|
var r, s, o;
|
|
2290
|
-
const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n =
|
|
2297
|
+
const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n = ds[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) || "";
|
|
2291
2298
|
return n.replace("{name}", a || "Un agent");
|
|
2292
2299
|
},
|
|
2293
2300
|
scrollToBottom() {
|
|
@@ -2295,79 +2302,79 @@ const cs = {
|
|
|
2295
2302
|
t && (t.scrollTop = t.scrollHeight);
|
|
2296
2303
|
}
|
|
2297
2304
|
}
|
|
2298
|
-
},
|
|
2305
|
+
}, fs = {
|
|
2299
2306
|
key: 0,
|
|
2300
2307
|
class: "wm-list__loadMore",
|
|
2301
2308
|
role: "status",
|
|
2302
2309
|
"aria-live": "polite"
|
|
2303
|
-
},
|
|
2310
|
+
}, _s = {
|
|
2304
2311
|
key: 1,
|
|
2305
2312
|
class: "wm-list__historyEnd"
|
|
2306
|
-
},
|
|
2313
|
+
}, ps = {
|
|
2307
2314
|
key: 2,
|
|
2308
2315
|
class: "wm-list__sep"
|
|
2309
|
-
},
|
|
2316
|
+
}, vs = { class: "wm-list__sep-label" }, ys = {
|
|
2310
2317
|
key: 0,
|
|
2311
2318
|
class: "wm-list__sep wm-list__sep--unread"
|
|
2312
|
-
},
|
|
2319
|
+
}, gs = {
|
|
2313
2320
|
key: 0,
|
|
2314
2321
|
class: "wm-list__sysep"
|
|
2315
|
-
},
|
|
2322
|
+
}, ws = { class: "wm-list__sysep-label" }, bs = ["data-row-key"], ks = {
|
|
2316
2323
|
key: 0,
|
|
2317
2324
|
class: "wm-list__avatarSlot"
|
|
2318
|
-
},
|
|
2325
|
+
}, Cs = {
|
|
2319
2326
|
key: 5,
|
|
2320
2327
|
class: "wm-list__body"
|
|
2321
|
-
},
|
|
2328
|
+
}, As = { key: 0 }, Ss = {
|
|
2322
2329
|
key: 1,
|
|
2323
2330
|
"aria-hidden": "true"
|
|
2324
|
-
},
|
|
2331
|
+
}, xs = { key: 2 }, Ms = {
|
|
2325
2332
|
key: 3,
|
|
2326
2333
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
2327
|
-
},
|
|
2328
|
-
function
|
|
2334
|
+
}, Ts = { class: "wm-list__avatarSlot" };
|
|
2335
|
+
function Os(t, e, n, a, r, s) {
|
|
2329
2336
|
const o = I("AIAvatar"), c = I("HumanAvatar"), v = I("ActionResult"), k = I("ArtifactRenderer"), g = I("Bubble"), S = I("AttachmentPreview"), R = I("Typing");
|
|
2330
2337
|
return l(), d("div", {
|
|
2331
2338
|
ref: "scrollEl",
|
|
2332
|
-
class:
|
|
2339
|
+
class: B(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
2333
2340
|
onScrollPassive: e[0] || (e[0] = (...A) => s.onScroll && s.onScroll(...A))
|
|
2334
2341
|
}, [
|
|
2335
|
-
n.loadingMore ? (l(), d("div",
|
|
2342
|
+
n.loadingMore ? (l(), d("div", fs, [...e[1] || (e[1] = [
|
|
2336
2343
|
i("span", {
|
|
2337
2344
|
class: "wm-list__loadMore-spinner",
|
|
2338
2345
|
"aria-hidden": "true"
|
|
2339
2346
|
}, null, -1),
|
|
2340
2347
|
i("span", { class: "wm-list__loadMore-lbl" }, "Chargement de l'historique…", -1)
|
|
2341
|
-
])])) : s.historyExhausted ? (l(), d("div",
|
|
2342
|
-
n.dateLabel ? (l(), d("div",
|
|
2348
|
+
])])) : s.historyExhausted ? (l(), d("div", _s, "Début de la conversation")) : w("", !0),
|
|
2349
|
+
n.dateLabel ? (l(), d("div", ps, [
|
|
2343
2350
|
e[2] || (e[2] = i("div", { class: "wm-list__line" }, null, -1)),
|
|
2344
|
-
i("span",
|
|
2351
|
+
i("span", vs, b(n.dateLabel), 1),
|
|
2345
2352
|
e[3] || (e[3] = i("div", { class: "wm-list__line" }, null, -1))
|
|
2346
2353
|
])) : w("", !0),
|
|
2347
2354
|
(l(!0), d(M, null, j(s.groups, (A, P) => (l(), d(M, {
|
|
2348
2355
|
key: A.key
|
|
2349
2356
|
}, [
|
|
2350
|
-
A.key === s.unreadGroupKey ? (l(), d("div",
|
|
2357
|
+
A.key === s.unreadGroupKey ? (l(), d("div", ys, [...e[4] || (e[4] = [
|
|
2351
2358
|
i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1),
|
|
2352
2359
|
i("span", { class: "wm-list__sep-label wm-list__sep-label--unread" }, "Non lus", -1),
|
|
2353
2360
|
i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)
|
|
2354
2361
|
])])) : w("", !0),
|
|
2355
2362
|
i("div", {
|
|
2356
|
-
class:
|
|
2363
|
+
class: B(["wm-list__group", "wm-list__group--" + A.role])
|
|
2357
2364
|
}, [
|
|
2358
|
-
A.role === "system" ? (l(), d("div",
|
|
2365
|
+
A.role === "system" ? (l(), d("div", gs, [
|
|
2359
2366
|
e[5] || (e[5] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
2360
|
-
i("span",
|
|
2367
|
+
i("span", ws, b(A.systemLabel), 1),
|
|
2361
2368
|
e[6] || (e[6] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
2362
2369
|
])) : (l(), d(M, { key: 1 }, [
|
|
2363
|
-
(l(!0), d(M, null, j(A.items, (x,
|
|
2370
|
+
(l(!0), d(M, null, j(A.items, (x, U) => (l(), d("div", {
|
|
2364
2371
|
key: `${s.messageKey(x.message)}-${x.partKey}`,
|
|
2365
2372
|
"data-row-key": `${s.messageKey(x.message)}-${x.partKey}`,
|
|
2366
|
-
class:
|
|
2367
|
-
style: G(s.cornersStyle(A,
|
|
2373
|
+
class: B(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x.message._pending, "is-failed": x.message._failed }]]),
|
|
2374
|
+
style: G(s.cornersStyle(A, U))
|
|
2368
2375
|
}, [
|
|
2369
|
-
A.role !== "user" ? (l(), d("div",
|
|
2370
|
-
|
|
2376
|
+
A.role !== "user" ? (l(), d("div", ks, [
|
|
2377
|
+
U === A.items.length - 1 ? (l(), d(M, { key: 0 }, [
|
|
2371
2378
|
A.role === "ai" ? (l(), $(o, {
|
|
2372
2379
|
key: 0,
|
|
2373
2380
|
size: 26,
|
|
@@ -2396,7 +2403,7 @@ function Ts(t, e, n, a, r, s) {
|
|
|
2396
2403
|
}, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(), $(k, {
|
|
2397
2404
|
key: 4,
|
|
2398
2405
|
artifact: s.artifactOf(x.message)
|
|
2399
|
-
}, null, 8, ["artifact"])) : (l(), d("div",
|
|
2406
|
+
}, null, 8, ["artifact"])) : (l(), d("div", Cs, [
|
|
2400
2407
|
x.message.text_md ? (l(), $(g, {
|
|
2401
2408
|
key: 0,
|
|
2402
2409
|
role: A.role,
|
|
@@ -2404,7 +2411,7 @@ function Ts(t, e, n, a, r, s) {
|
|
|
2404
2411
|
}, null, 8, ["role", "text"])) : w("", !0),
|
|
2405
2412
|
s.attachmentsOf(x.message).length ? (l(), d("div", {
|
|
2406
2413
|
key: 1,
|
|
2407
|
-
class:
|
|
2414
|
+
class: B(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
|
|
2408
2415
|
}, [
|
|
2409
2416
|
(l(!0), d(M, null, j(s.attachmentsOf(x.message), (F, N) => (l(), $(S, {
|
|
2410
2417
|
key: `${s.messageKey(x.message)}-att-${N}`,
|
|
@@ -2412,20 +2419,20 @@ function Ts(t, e, n, a, r, s) {
|
|
|
2412
2419
|
}, null, 8, ["attachment"]))), 128))
|
|
2413
2420
|
], 2)) : w("", !0)
|
|
2414
2421
|
]))
|
|
2415
|
-
], 14,
|
|
2422
|
+
], 14, bs))), 128)),
|
|
2416
2423
|
A.role !== "user" || s.lastTimeOf(A) ? (l(), d("div", {
|
|
2417
2424
|
key: 0,
|
|
2418
|
-
class:
|
|
2425
|
+
class: B(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
2419
2426
|
}, [
|
|
2420
|
-
A.role !== "user" ? (l(), d("span",
|
|
2421
|
-
A.role !== "user" && s.lastTimeOf(A) ? (l(), d("span",
|
|
2422
|
-
s.lastTimeOf(A) ? (l(), d("span",
|
|
2427
|
+
A.role !== "user" ? (l(), d("span", As, b(s.roleLabel(A)), 1)) : w("", !0),
|
|
2428
|
+
A.role !== "user" && s.lastTimeOf(A) ? (l(), d("span", Ss, "·")) : w("", !0),
|
|
2429
|
+
s.lastTimeOf(A) ? (l(), d("span", xs, b(s.lastTimeOf(A)), 1)) : w("", !0)
|
|
2423
2430
|
], 2)) : w("", !0)
|
|
2424
2431
|
], 64))
|
|
2425
2432
|
], 2)
|
|
2426
2433
|
], 64))), 128)),
|
|
2427
|
-
n.streamingActive ? (l(), d("div",
|
|
2428
|
-
i("div",
|
|
2434
|
+
n.streamingActive ? (l(), d("div", Ms, [
|
|
2435
|
+
i("div", Ts, [
|
|
2429
2436
|
K(o, {
|
|
2430
2437
|
size: 26,
|
|
2431
2438
|
tail: !0
|
|
@@ -2435,8 +2442,8 @@ function Ts(t, e, n, a, r, s) {
|
|
|
2435
2442
|
])) : w("", !0)
|
|
2436
2443
|
], 34);
|
|
2437
2444
|
}
|
|
2438
|
-
const
|
|
2439
|
-
function
|
|
2445
|
+
const Is = /* @__PURE__ */ E(ms, [["render", Os], ["__scopeId", "data-v-63002c7f"]]), ie = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
2446
|
+
function Bs() {
|
|
2440
2447
|
return he && [
|
|
2441
2448
|
"video/webm;codecs=vp9,opus",
|
|
2442
2449
|
"video/webm;codecs=vp8,opus",
|
|
@@ -2456,7 +2463,7 @@ function Ce({ audio: t }) {
|
|
|
2456
2463
|
systemAudio: t ? "include" : "exclude"
|
|
2457
2464
|
};
|
|
2458
2465
|
}
|
|
2459
|
-
function
|
|
2466
|
+
function zi(t) {
|
|
2460
2467
|
return t ? t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : "file" : "file";
|
|
2461
2468
|
}
|
|
2462
2469
|
async function Es() {
|
|
@@ -2468,7 +2475,7 @@ async function Es() {
|
|
|
2468
2475
|
return (e == null ? void 0 : e.name) !== "NotAllowedError" && console.error("[media] screenshot picker", e), null;
|
|
2469
2476
|
}
|
|
2470
2477
|
try {
|
|
2471
|
-
return await
|
|
2478
|
+
return await Ls(t);
|
|
2472
2479
|
} catch (e) {
|
|
2473
2480
|
return console.error("[media] screenshot capture", e), null;
|
|
2474
2481
|
} finally {
|
|
@@ -2477,7 +2484,7 @@ async function Es() {
|
|
|
2477
2484
|
});
|
|
2478
2485
|
}
|
|
2479
2486
|
}
|
|
2480
|
-
async function
|
|
2487
|
+
async function Ls(t) {
|
|
2481
2488
|
const e = document.createElement("video");
|
|
2482
2489
|
e.muted = !0, e.playsInline = !0, e.srcObject = t, await e.play(), await new Promise((c) => requestAnimationFrame(c));
|
|
2483
2490
|
const n = e.videoWidth || 1280, a = e.videoHeight || 720, r = document.createElement("canvas");
|
|
@@ -2487,7 +2494,7 @@ async function Bs(t) {
|
|
|
2487
2494
|
}), o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
2488
2495
|
return new File([s], `capture-${o}.png`, { type: "image/png" });
|
|
2489
2496
|
}
|
|
2490
|
-
async function
|
|
2497
|
+
async function $s(t = {}) {
|
|
2491
2498
|
var k;
|
|
2492
2499
|
if (!ie || !he) return null;
|
|
2493
2500
|
let e;
|
|
@@ -2496,7 +2503,7 @@ async function Ls(t = {}) {
|
|
|
2496
2503
|
} catch (g) {
|
|
2497
2504
|
return (g == null ? void 0 : g.name) !== "NotAllowedError" && console.error("[media] record picker", g), null;
|
|
2498
2505
|
}
|
|
2499
|
-
const n =
|
|
2506
|
+
const n = Bs();
|
|
2500
2507
|
let a;
|
|
2501
2508
|
try {
|
|
2502
2509
|
a = n ? new window.MediaRecorder(e, { mimeType: n }) : new window.MediaRecorder(e);
|
|
@@ -2514,8 +2521,8 @@ async function Ls(t = {}) {
|
|
|
2514
2521
|
if (s && clearInterval(s), e.getTracks().forEach((R) => {
|
|
2515
2522
|
R.stop();
|
|
2516
2523
|
}), r.length) {
|
|
2517
|
-
const R = a.mimeType || n || "video/webm", A = new Blob(r, { type: R }), P = /mp4/.test(R) ? "mp4" : "webm", x = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19),
|
|
2518
|
-
(g = t.onfinalize) == null || g.call(t,
|
|
2524
|
+
const R = a.mimeType || n || "video/webm", A = new Blob(r, { type: R }), P = /mp4/.test(R) ? "mp4" : "webm", x = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${x}.${P}`, { type: R });
|
|
2525
|
+
(g = t.onfinalize) == null || g.call(t, U);
|
|
2519
2526
|
} else
|
|
2520
2527
|
(S = t.oncancel) == null || S.call(t);
|
|
2521
2528
|
}), e.getVideoTracks().forEach((g) => {
|
|
@@ -2548,7 +2555,7 @@ async function Ls(t = {}) {
|
|
|
2548
2555
|
}
|
|
2549
2556
|
};
|
|
2550
2557
|
}
|
|
2551
|
-
const
|
|
2558
|
+
const Rs = [
|
|
2552
2559
|
{
|
|
2553
2560
|
action: "file",
|
|
2554
2561
|
label: "Joindre un fichier",
|
|
@@ -2564,7 +2571,7 @@ const $s = [
|
|
|
2564
2571
|
label: "Enregistrer l'écran",
|
|
2565
2572
|
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"
|
|
2566
2573
|
}
|
|
2567
|
-
],
|
|
2574
|
+
], Fs = {
|
|
2568
2575
|
name: "WmComposer",
|
|
2569
2576
|
props: {
|
|
2570
2577
|
modelValue: { type: String, default: "" },
|
|
@@ -2587,7 +2594,7 @@ const $s = [
|
|
|
2587
2594
|
return !this.disabled && !!this.local.trim();
|
|
2588
2595
|
},
|
|
2589
2596
|
attachItems() {
|
|
2590
|
-
return
|
|
2597
|
+
return Rs.map((t) => ({
|
|
2591
2598
|
...t,
|
|
2592
2599
|
disabled: t.action === "screenshot" && !ie || t.action === "record" && (!ie || !he)
|
|
2593
2600
|
}));
|
|
@@ -2665,7 +2672,7 @@ const $s = [
|
|
|
2665
2672
|
async startRecording() {
|
|
2666
2673
|
if (this.recording || this.disabled) return;
|
|
2667
2674
|
this.recordingElapsed = 0;
|
|
2668
|
-
const t = await
|
|
2675
|
+
const t = await $s({
|
|
2669
2676
|
onstart: () => {
|
|
2670
2677
|
this.recording = !0;
|
|
2671
2678
|
},
|
|
@@ -2690,22 +2697,22 @@ const $s = [
|
|
|
2690
2697
|
}
|
|
2691
2698
|
}
|
|
2692
2699
|
}
|
|
2693
|
-
},
|
|
2700
|
+
}, js = { class: "wm-compose-wrap" }, Ds = {
|
|
2694
2701
|
key: 0,
|
|
2695
2702
|
class: "wm-rec"
|
|
2696
|
-
}, Us = { class: "wm-rec__lbl" },
|
|
2703
|
+
}, Us = { class: "wm-rec__lbl" }, Ns = {
|
|
2697
2704
|
key: 1,
|
|
2698
2705
|
class: "wm-compose__menu",
|
|
2699
2706
|
role: "menu"
|
|
2700
|
-
},
|
|
2707
|
+
}, Ps = ["disabled", "onClick"], Hs = { class: "wm-compose__menuIcon" }, zs = {
|
|
2701
2708
|
viewBox: "0 0 24 24",
|
|
2702
2709
|
width: "14",
|
|
2703
2710
|
height: "14",
|
|
2704
2711
|
"aria-hidden": "true"
|
|
2705
|
-
},
|
|
2706
|
-
function
|
|
2707
|
-
return l(), d("div",
|
|
2708
|
-
r.recording ? (l(), d("div",
|
|
2712
|
+
}, Vs = ["d"], qs = ["placeholder", "disabled"], Ws = { class: "wm-compose__actions" }, Ks = ["title", "aria-label", "disabled"], Gs = ["disabled"];
|
|
2713
|
+
function Ys(t, e, n, a, r, s) {
|
|
2714
|
+
return l(), d("div", js, [
|
|
2715
|
+
r.recording ? (l(), d("div", Ds, [
|
|
2709
2716
|
e[8] || (e[8] = i("span", {
|
|
2710
2717
|
class: "wm-rec__dot",
|
|
2711
2718
|
"aria-hidden": "true"
|
|
@@ -2718,7 +2725,7 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2718
2725
|
}, "Arrêter")
|
|
2719
2726
|
])) : w("", !0),
|
|
2720
2727
|
i("form", {
|
|
2721
|
-
class:
|
|
2728
|
+
class: B(["wm-compose", { "has-attach": r.attachOpen }]),
|
|
2722
2729
|
onSubmit: e[7] || (e[7] = ee((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
|
|
2723
2730
|
}, [
|
|
2724
2731
|
i("input", {
|
|
@@ -2733,7 +2740,7 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2733
2740
|
class: "wm-compose__overlay",
|
|
2734
2741
|
onClick: e[2] || (e[2] = (o) => r.attachOpen = !1)
|
|
2735
2742
|
})) : w("", !0),
|
|
2736
|
-
r.attachOpen ? (l(), d("div",
|
|
2743
|
+
r.attachOpen ? (l(), d("div", Ns, [
|
|
2737
2744
|
(l(!0), d(M, null, j(s.attachItems, (o) => (l(), d("button", {
|
|
2738
2745
|
key: o.action,
|
|
2739
2746
|
type: "button",
|
|
@@ -2741,8 +2748,8 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2741
2748
|
disabled: o.disabled,
|
|
2742
2749
|
onClick: (c) => s.onAttachAction(o.action)
|
|
2743
2750
|
}, [
|
|
2744
|
-
i("span",
|
|
2745
|
-
(l(), d("svg",
|
|
2751
|
+
i("span", Hs, [
|
|
2752
|
+
(l(), d("svg", zs, [
|
|
2746
2753
|
i("path", {
|
|
2747
2754
|
d: o.path,
|
|
2748
2755
|
stroke: "currentColor",
|
|
@@ -2750,11 +2757,11 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2750
2757
|
"stroke-linecap": "round",
|
|
2751
2758
|
"stroke-linejoin": "round",
|
|
2752
2759
|
fill: "none"
|
|
2753
|
-
}, null, 8,
|
|
2760
|
+
}, null, 8, Vs)
|
|
2754
2761
|
]))
|
|
2755
2762
|
]),
|
|
2756
2763
|
i("span", null, b(o.label), 1)
|
|
2757
|
-
], 8,
|
|
2764
|
+
], 8, Ps))), 128))
|
|
2758
2765
|
])) : w("", !0),
|
|
2759
2766
|
W(i("textarea", {
|
|
2760
2767
|
ref: "inputEl",
|
|
@@ -2765,13 +2772,13 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2765
2772
|
disabled: n.disabled,
|
|
2766
2773
|
onKeydown: e[4] || (e[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
|
|
2767
2774
|
onInput: e[5] || (e[5] = (...o) => s.autosize && s.autosize(...o))
|
|
2768
|
-
}, null, 40,
|
|
2775
|
+
}, null, 40, qs), [
|
|
2769
2776
|
[Q, r.local]
|
|
2770
2777
|
]),
|
|
2771
|
-
i("div",
|
|
2778
|
+
i("div", Ws, [
|
|
2772
2779
|
i("button", {
|
|
2773
2780
|
type: "button",
|
|
2774
|
-
class:
|
|
2781
|
+
class: B(["wm-compose__icon", { "is-open": r.attachOpen }]),
|
|
2775
2782
|
title: n.attachLabel,
|
|
2776
2783
|
"aria-label": n.attachLabel,
|
|
2777
2784
|
disabled: r.recording,
|
|
@@ -2790,10 +2797,10 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2790
2797
|
}, [
|
|
2791
2798
|
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" })
|
|
2792
2799
|
], -1)
|
|
2793
|
-
])], 10,
|
|
2800
|
+
])], 10, Ks),
|
|
2794
2801
|
i("button", {
|
|
2795
2802
|
type: "submit",
|
|
2796
|
-
class:
|
|
2803
|
+
class: B(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
2797
2804
|
disabled: !s.canSend,
|
|
2798
2805
|
"aria-label": "Envoyer"
|
|
2799
2806
|
}, [...e[10] || (e[10] = [
|
|
@@ -2810,12 +2817,12 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2810
2817
|
}, [
|
|
2811
2818
|
i("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
2812
2819
|
], -1)
|
|
2813
|
-
])], 10,
|
|
2820
|
+
])], 10, Gs)
|
|
2814
2821
|
])
|
|
2815
2822
|
], 34)
|
|
2816
2823
|
]);
|
|
2817
2824
|
}
|
|
2818
|
-
const
|
|
2825
|
+
const Js = /* @__PURE__ */ E(Fs, [["render", Ys], ["__scopeId", "data-v-14fa9ec0"]]), Xs = {
|
|
2819
2826
|
name: "WmSuggestionChips",
|
|
2820
2827
|
props: {
|
|
2821
2828
|
items: { type: Array, default: () => [] },
|
|
@@ -2832,8 +2839,8 @@ const Ys = /* @__PURE__ */ B(Rs, [["render", Gs], ["__scopeId", "data-v-14fa9ec0
|
|
|
2832
2839
|
return this.items.map((t) => (t == null ? void 0 : t.label) || (t == null ? void 0 : t.text) || "").join("§");
|
|
2833
2840
|
}
|
|
2834
2841
|
}
|
|
2835
|
-
},
|
|
2836
|
-
function
|
|
2842
|
+
}, Qs = ["onClick"];
|
|
2843
|
+
function Zs(t, e, n, a, r, s) {
|
|
2837
2844
|
return n.items.length ? (l(), d("div", {
|
|
2838
2845
|
key: s.batchKey,
|
|
2839
2846
|
class: "wm-chips"
|
|
@@ -2844,10 +2851,10 @@ function Qs(t, e, n, a, r, s) {
|
|
|
2844
2851
|
class: "wm-chip",
|
|
2845
2852
|
style: G({ animationDelay: n.baseDelay + c * n.stepDelay + "ms" }),
|
|
2846
2853
|
onClick: (v) => t.$emit("select", o)
|
|
2847
|
-
}, b(o.label), 13,
|
|
2854
|
+
}, b(o.label), 13, Qs))), 128))
|
|
2848
2855
|
])) : w("", !0);
|
|
2849
2856
|
}
|
|
2850
|
-
const
|
|
2857
|
+
const er = /* @__PURE__ */ E(Xs, [["render", Zs], ["__scopeId", "data-v-55aa529d"]]), tr = {
|
|
2851
2858
|
name: "WmApprovalCard",
|
|
2852
2859
|
components: { AIAvatar: te },
|
|
2853
2860
|
props: {
|
|
@@ -2880,23 +2887,23 @@ const Zs = /* @__PURE__ */ B(Js, [["render", Qs], ["__scopeId", "data-v-55aa529d
|
|
|
2880
2887
|
return ((t = this.rejectCallback) == null ? void 0 : t.label) || "Refuser";
|
|
2881
2888
|
}
|
|
2882
2889
|
}
|
|
2883
|
-
},
|
|
2890
|
+
}, nr = { class: "wm-approval" }, sr = { class: "wm-approval__head" }, rr = { class: "wm-approval__icon" }, ir = { class: "wm-approval__main" }, ar = { class: "wm-approval__title" }, or = {
|
|
2884
2891
|
key: 0,
|
|
2885
2892
|
class: "wm-approval__detail"
|
|
2886
|
-
},
|
|
2887
|
-
function
|
|
2893
|
+
}, lr = { class: "wm-approval__actions" };
|
|
2894
|
+
function cr(t, e, n, a, r, s) {
|
|
2888
2895
|
const o = I("AIAvatar");
|
|
2889
|
-
return l(), d("div",
|
|
2890
|
-
i("div",
|
|
2891
|
-
i("div",
|
|
2896
|
+
return l(), d("div", nr, [
|
|
2897
|
+
i("div", sr, [
|
|
2898
|
+
i("div", rr, [
|
|
2892
2899
|
K(o, { size: 24 })
|
|
2893
2900
|
]),
|
|
2894
|
-
i("div",
|
|
2895
|
-
i("div",
|
|
2896
|
-
n.detail ? (l(), d("div",
|
|
2901
|
+
i("div", ir, [
|
|
2902
|
+
i("div", ar, b(n.action), 1),
|
|
2903
|
+
n.detail ? (l(), d("div", or, b(n.detail), 1)) : w("", !0)
|
|
2897
2904
|
])
|
|
2898
2905
|
]),
|
|
2899
|
-
i("div",
|
|
2906
|
+
i("div", lr, [
|
|
2900
2907
|
s.rejectId ? (l(), d("button", {
|
|
2901
2908
|
key: 0,
|
|
2902
2909
|
type: "button",
|
|
@@ -2912,9 +2919,9 @@ function lr(t, e, n, a, r, s) {
|
|
|
2912
2919
|
])
|
|
2913
2920
|
]);
|
|
2914
2921
|
}
|
|
2915
|
-
const
|
|
2922
|
+
const dr = /* @__PURE__ */ E(tr, [["render", cr], ["__scopeId", "data-v-b1be139c"]]);
|
|
2916
2923
|
let ve = 0;
|
|
2917
|
-
const
|
|
2924
|
+
const ur = /* @__PURE__ */ new Set([
|
|
2918
2925
|
"text",
|
|
2919
2926
|
"textarea",
|
|
2920
2927
|
"number",
|
|
@@ -2922,7 +2929,7 @@ const dr = /* @__PURE__ */ new Set([
|
|
|
2922
2929
|
"select",
|
|
2923
2930
|
"multiselect",
|
|
2924
2931
|
"date"
|
|
2925
|
-
]),
|
|
2932
|
+
]), hr = {
|
|
2926
2933
|
name: "WmFormCard",
|
|
2927
2934
|
components: { AIAvatar: te },
|
|
2928
2935
|
props: {
|
|
@@ -2945,7 +2952,7 @@ const dr = /* @__PURE__ */ new Set([
|
|
|
2945
2952
|
// douteux.
|
|
2946
2953
|
normalizedFields() {
|
|
2947
2954
|
var e;
|
|
2948
|
-
return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !
|
|
2955
|
+
return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !ur.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
|
|
2949
2956
|
}
|
|
2950
2957
|
},
|
|
2951
2958
|
created() {
|
|
@@ -2996,43 +3003,43 @@ const dr = /* @__PURE__ */ new Set([
|
|
|
2996
3003
|
}
|
|
2997
3004
|
}
|
|
2998
3005
|
}
|
|
2999
|
-
},
|
|
3006
|
+
}, mr = { class: "wm-form" }, fr = { class: "wm-form__head" }, _r = { class: "wm-form__icon" }, pr = { class: "wm-form__main" }, vr = { class: "wm-form__title" }, yr = {
|
|
3000
3007
|
key: 0,
|
|
3001
3008
|
class: "wm-form__detail"
|
|
3002
|
-
},
|
|
3009
|
+
}, gr = ["for"], wr = {
|
|
3003
3010
|
key: 0,
|
|
3004
3011
|
class: "wm-form__req",
|
|
3005
3012
|
"aria-hidden": "true"
|
|
3006
|
-
},
|
|
3013
|
+
}, br = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], kr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Cr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ar = ["id", "onUpdate:modelValue", "required", "disabled"], Sr = {
|
|
3007
3014
|
key: 4,
|
|
3008
3015
|
class: "wm-form__bool"
|
|
3009
|
-
},
|
|
3016
|
+
}, xr = ["id", "onUpdate:modelValue", "disabled"], Mr = ["id", "onUpdate:modelValue", "required", "disabled"], Tr = {
|
|
3010
3017
|
value: "",
|
|
3011
3018
|
disabled: ""
|
|
3012
|
-
},
|
|
3019
|
+
}, Or = ["value"], Ir = {
|
|
3013
3020
|
key: 6,
|
|
3014
3021
|
class: "wm-form__multi"
|
|
3015
|
-
},
|
|
3022
|
+
}, Br = ["value", "checked", "disabled", "onChange"], Er = {
|
|
3016
3023
|
key: 0,
|
|
3017
3024
|
class: "wm-form__err"
|
|
3018
|
-
},
|
|
3025
|
+
}, Lr = ["disabled"], $r = {
|
|
3019
3026
|
key: 0,
|
|
3020
3027
|
class: "wm-form__spinner",
|
|
3021
3028
|
"aria-hidden": "true"
|
|
3022
|
-
},
|
|
3029
|
+
}, Rr = {
|
|
3023
3030
|
key: 2,
|
|
3024
3031
|
class: "wm-form__doneLbl"
|
|
3025
3032
|
};
|
|
3026
|
-
function
|
|
3033
|
+
function Fr(t, e, n, a, r, s) {
|
|
3027
3034
|
const o = I("AIAvatar");
|
|
3028
|
-
return l(), d("div",
|
|
3029
|
-
i("div",
|
|
3030
|
-
i("div",
|
|
3035
|
+
return l(), d("div", mr, [
|
|
3036
|
+
i("div", fr, [
|
|
3037
|
+
i("div", _r, [
|
|
3031
3038
|
K(o, { size: 24 })
|
|
3032
3039
|
]),
|
|
3033
|
-
i("div",
|
|
3034
|
-
i("div",
|
|
3035
|
-
n.form.description ? (l(), d("div",
|
|
3040
|
+
i("div", pr, [
|
|
3041
|
+
i("div", vr, b(n.form.title || "Formulaire"), 1),
|
|
3042
|
+
n.form.description ? (l(), d("div", yr, b(n.form.description), 1)) : w("", !0)
|
|
3036
3043
|
])
|
|
3037
3044
|
]),
|
|
3038
3045
|
i("form", {
|
|
@@ -3048,8 +3055,8 @@ function Rr(t, e, n, a, r, s) {
|
|
|
3048
3055
|
class: "wm-form__label"
|
|
3049
3056
|
}, [
|
|
3050
3057
|
oe(b(c.label), 1),
|
|
3051
|
-
c.required ? (l(), d("span",
|
|
3052
|
-
], 8,
|
|
3058
|
+
c.required ? (l(), d("span", wr, "*")) : w("", !0)
|
|
3059
|
+
], 8, gr),
|
|
3053
3060
|
c.type === "text" ? W((l(), d("input", {
|
|
3054
3061
|
key: 0,
|
|
3055
3062
|
id: `wm-f-${r._uid}-${c.key}`,
|
|
@@ -3059,7 +3066,7 @@ function Rr(t, e, n, a, r, s) {
|
|
|
3059
3066
|
placeholder: c.placeholder || "",
|
|
3060
3067
|
required: c.required,
|
|
3061
3068
|
disabled: n.readOnly || r.busy
|
|
3062
|
-
}, null, 8,
|
|
3069
|
+
}, null, 8, br)), [
|
|
3063
3070
|
[Q, r.values[c.key]]
|
|
3064
3071
|
]) : c.type === "textarea" ? W((l(), d("textarea", {
|
|
3065
3072
|
key: 1,
|
|
@@ -3070,7 +3077,7 @@ function Rr(t, e, n, a, r, s) {
|
|
|
3070
3077
|
placeholder: c.placeholder || "",
|
|
3071
3078
|
required: c.required,
|
|
3072
3079
|
disabled: n.readOnly || r.busy
|
|
3073
|
-
}, null, 8,
|
|
3080
|
+
}, null, 8, kr)), [
|
|
3074
3081
|
[Q, r.values[c.key]]
|
|
3075
3082
|
]) : c.type === "number" ? W((l(), d("input", {
|
|
3076
3083
|
key: 2,
|
|
@@ -3081,7 +3088,7 @@ function Rr(t, e, n, a, r, s) {
|
|
|
3081
3088
|
placeholder: c.placeholder || "",
|
|
3082
3089
|
required: c.required,
|
|
3083
3090
|
disabled: n.readOnly || r.busy
|
|
3084
|
-
}, null, 8,
|
|
3091
|
+
}, null, 8, Cr)), [
|
|
3085
3092
|
[
|
|
3086
3093
|
Q,
|
|
3087
3094
|
r.values[c.key],
|
|
@@ -3096,15 +3103,15 @@ function Rr(t, e, n, a, r, s) {
|
|
|
3096
3103
|
class: "wm-form__input",
|
|
3097
3104
|
required: c.required,
|
|
3098
3105
|
disabled: n.readOnly || r.busy
|
|
3099
|
-
}, null, 8,
|
|
3106
|
+
}, null, 8, Ar)), [
|
|
3100
3107
|
[Q, r.values[c.key]]
|
|
3101
|
-
]) : c.type === "boolean" ? (l(), d("label",
|
|
3108
|
+
]) : c.type === "boolean" ? (l(), d("label", Sr, [
|
|
3102
3109
|
W(i("input", {
|
|
3103
3110
|
id: `wm-f-${r._uid}-${c.key}`,
|
|
3104
3111
|
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
3105
3112
|
type: "checkbox",
|
|
3106
3113
|
disabled: n.readOnly || r.busy
|
|
3107
|
-
}, null, 8,
|
|
3114
|
+
}, null, 8, xr), [
|
|
3108
3115
|
[Oe, r.values[c.key]]
|
|
3109
3116
|
]),
|
|
3110
3117
|
i("span", null, b(c.placeholder || "Oui"), 1)
|
|
@@ -3116,14 +3123,14 @@ function Rr(t, e, n, a, r, s) {
|
|
|
3116
3123
|
required: c.required,
|
|
3117
3124
|
disabled: n.readOnly || r.busy
|
|
3118
3125
|
}, [
|
|
3119
|
-
i("option",
|
|
3126
|
+
i("option", Tr, b(c.placeholder || "Choisir…"), 1),
|
|
3120
3127
|
(l(!0), d(M, null, j(c.options, (v) => (l(), d("option", {
|
|
3121
3128
|
key: v.value,
|
|
3122
3129
|
value: v.value
|
|
3123
|
-
}, b(v.label), 9,
|
|
3124
|
-
], 8,
|
|
3130
|
+
}, b(v.label), 9, Or))), 128))
|
|
3131
|
+
], 8, Mr)), [
|
|
3125
3132
|
[Ie, r.values[c.key]]
|
|
3126
|
-
]) : c.type === "multiselect" ? (l(), d("div",
|
|
3133
|
+
]) : c.type === "multiselect" ? (l(), d("div", Ir, [
|
|
3127
3134
|
(l(!0), d(M, null, j(c.options, (v) => (l(), d("label", {
|
|
3128
3135
|
key: v.value,
|
|
3129
3136
|
class: "wm-form__multiItem"
|
|
@@ -3134,25 +3141,25 @@ function Rr(t, e, n, a, r, s) {
|
|
|
3134
3141
|
checked: Array.isArray(r.values[c.key]) && r.values[c.key].includes(v.value),
|
|
3135
3142
|
disabled: n.readOnly || r.busy,
|
|
3136
3143
|
onChange: (k) => s.toggleMulti(c.key, v.value, k.target.checked)
|
|
3137
|
-
}, null, 40,
|
|
3144
|
+
}, null, 40, Br),
|
|
3138
3145
|
i("span", null, b(v.label), 1)
|
|
3139
3146
|
]))), 128))
|
|
3140
3147
|
])) : w("", !0)
|
|
3141
3148
|
]))), 128)),
|
|
3142
3149
|
r.error ? (l(), d("div", Er, b(r.error), 1)) : w("", !0),
|
|
3143
|
-
n.readOnly ? (l(), d("div",
|
|
3150
|
+
n.readOnly ? (l(), d("div", Rr, "Réponse envoyée")) : (l(), d("button", {
|
|
3144
3151
|
key: 1,
|
|
3145
3152
|
type: "submit",
|
|
3146
3153
|
class: "wm-form__submit",
|
|
3147
3154
|
disabled: r.busy
|
|
3148
3155
|
}, [
|
|
3149
|
-
r.busy ? (l(), d("span",
|
|
3156
|
+
r.busy ? (l(), d("span", $r)) : w("", !0),
|
|
3150
3157
|
i("span", null, b(r.busy ? "Envoi…" : n.form.submit_label || "Envoyer"), 1)
|
|
3151
|
-
], 8,
|
|
3158
|
+
], 8, Lr))
|
|
3152
3159
|
], 32)
|
|
3153
3160
|
]);
|
|
3154
3161
|
}
|
|
3155
|
-
const
|
|
3162
|
+
const jr = /* @__PURE__ */ E(hr, [["render", Fr], ["__scopeId", "data-v-64b40f76"]]), Dr = {
|
|
3156
3163
|
name: "WmFeedback",
|
|
3157
3164
|
props: {
|
|
3158
3165
|
busy: { type: Boolean, default: !1 },
|
|
@@ -3176,43 +3183,43 @@ const Fr = /* @__PURE__ */ B(ur, [["render", Rr], ["__scopeId", "data-v-64b40f76
|
|
|
3176
3183
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
3177
3184
|
}
|
|
3178
3185
|
}
|
|
3179
|
-
}, Ur = { class: "wm-fb" },
|
|
3186
|
+
}, Ur = { class: "wm-fb" }, Nr = { class: "wm-fb__row" }, Pr = ["onClick"], Hr = { class: "wm-fb__emoji" }, zr = { class: "wm-fb__label" }, Vr = ["disabled"], qr = {
|
|
3180
3187
|
key: 1,
|
|
3181
3188
|
class: "wm-fb__done"
|
|
3182
3189
|
};
|
|
3183
|
-
function
|
|
3190
|
+
function Wr(t, e, n, a, r, s) {
|
|
3184
3191
|
return l(), d("div", Ur, [
|
|
3185
|
-
n.done ? (l(), d("div",
|
|
3192
|
+
n.done ? (l(), d("div", qr, [...e[3] || (e[3] = [
|
|
3186
3193
|
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)
|
|
3187
3194
|
])])) : (l(), d(M, { key: 0 }, [
|
|
3188
3195
|
e[1] || (e[1] = i("div", { class: "wm-fb__title" }, "Comment s'est passée cette conversation ?", -1)),
|
|
3189
3196
|
e[2] || (e[2] = i("div", { class: "wm-fb__sub" }, "Votre avis nous aide à améliorer l'assistant.", -1)),
|
|
3190
|
-
i("div",
|
|
3197
|
+
i("div", Nr, [
|
|
3191
3198
|
(l(!0), d(M, null, j(r.options, (o) => (l(), d("button", {
|
|
3192
3199
|
key: o.v,
|
|
3193
3200
|
type: "button",
|
|
3194
|
-
class:
|
|
3201
|
+
class: B(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
|
|
3195
3202
|
onClick: (c) => r.sel = o.v
|
|
3196
3203
|
}, [
|
|
3197
|
-
i("span",
|
|
3198
|
-
i("span",
|
|
3199
|
-
], 10,
|
|
3204
|
+
i("span", Hr, b(o.e), 1),
|
|
3205
|
+
i("span", zr, b(o.l), 1)
|
|
3206
|
+
], 10, Pr))), 128))
|
|
3200
3207
|
]),
|
|
3201
3208
|
i("button", {
|
|
3202
3209
|
type: "button",
|
|
3203
3210
|
class: "wm-fb__send",
|
|
3204
3211
|
disabled: !r.sel || n.busy,
|
|
3205
3212
|
onClick: e[0] || (e[0] = (...o) => s.onSend && s.onSend(...o))
|
|
3206
|
-
}, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9,
|
|
3213
|
+
}, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9, Vr)
|
|
3207
3214
|
], 64))
|
|
3208
3215
|
]);
|
|
3209
3216
|
}
|
|
3210
|
-
const
|
|
3211
|
-
function
|
|
3217
|
+
const Kr = /* @__PURE__ */ E(Dr, [["render", Wr], ["__scopeId", "data-v-6f45ff3b"]]);
|
|
3218
|
+
function Gr(t) {
|
|
3212
3219
|
const e = new Date(t);
|
|
3213
3220
|
return e.setHours(0, 0, 0, 0), e;
|
|
3214
3221
|
}
|
|
3215
|
-
const
|
|
3222
|
+
const Yr = {
|
|
3216
3223
|
name: "WmHistoryDrawer",
|
|
3217
3224
|
props: {
|
|
3218
3225
|
conversations: { type: Array, default: () => [] },
|
|
@@ -3246,7 +3253,7 @@ const Gr = {
|
|
|
3246
3253
|
) : this.normalized;
|
|
3247
3254
|
},
|
|
3248
3255
|
groups() {
|
|
3249
|
-
const e =
|
|
3256
|
+
const e = Gr(/* @__PURE__ */ new Date()).getTime(), n = e - 6 * 864e5, a = [], r = [], s = [];
|
|
3250
3257
|
for (const o of this.filtered) {
|
|
3251
3258
|
if (!o.stamp) {
|
|
3252
3259
|
s.push(o);
|
|
@@ -3264,29 +3271,29 @@ const Gr = {
|
|
|
3264
3271
|
return this.filtered.length > 0;
|
|
3265
3272
|
}
|
|
3266
3273
|
}
|
|
3267
|
-
},
|
|
3274
|
+
}, Jr = { class: "wm-hd" }, Xr = {
|
|
3268
3275
|
class: "wm-hd__panel",
|
|
3269
3276
|
role: "dialog",
|
|
3270
3277
|
"aria-label": "Vos discussions"
|
|
3271
|
-
},
|
|
3278
|
+
}, Qr = { class: "wm-hd__head" }, Zr = { class: "wm-hd__top" }, ei = { class: "wm-hd__search" }, ti = { class: "wm-hd__list" }, ni = {
|
|
3272
3279
|
key: 0,
|
|
3273
3280
|
class: "wm-hd__group"
|
|
3274
|
-
},
|
|
3281
|
+
}, si = { class: "wm-hd__groupLabel" }, ri = { class: "wm-hd__rows" }, ii = ["onClick"], ai = { class: "wm-hd__rowIcon" }, oi = {
|
|
3275
3282
|
key: 0,
|
|
3276
3283
|
class: "wm-hd__rowDot",
|
|
3277
3284
|
"aria-label": "Message non lu"
|
|
3278
|
-
},
|
|
3285
|
+
}, li = { class: "wm-hd__rowBody" }, ci = { class: "wm-hd__rowTop" }, di = { class: "wm-hd__rowTitle" }, ui = { class: "wm-hd__rowPreview" }, hi = {
|
|
3279
3286
|
key: 0,
|
|
3280
3287
|
class: "wm-hd__empty"
|
|
3281
3288
|
};
|
|
3282
|
-
function
|
|
3283
|
-
return l(), d("div",
|
|
3289
|
+
function mi(t, e, n, a, r, s) {
|
|
3290
|
+
return l(), d("div", Jr, [
|
|
3284
3291
|
i("div", {
|
|
3285
3292
|
class: "wm-hd__scrim",
|
|
3286
3293
|
onClick: e[0] || (e[0] = (o) => t.$emit("close"))
|
|
3287
3294
|
}),
|
|
3288
|
-
i("aside",
|
|
3289
|
-
i("div",
|
|
3295
|
+
i("aside", Xr, [
|
|
3296
|
+
i("div", Qr, [
|
|
3290
3297
|
e[5] || (e[5] = i("div", { class: "wm-hd__heading" }, [
|
|
3291
3298
|
i("div", { class: "wm-hd__title" }, "Vos discussions"),
|
|
3292
3299
|
i("div", { class: "wm-hd__sub" }, "Reprenez là où vous en étiez.")
|
|
@@ -3312,7 +3319,7 @@ function hi(t, e, n, a, r, s) {
|
|
|
3312
3319
|
], -1)
|
|
3313
3320
|
])])
|
|
3314
3321
|
]),
|
|
3315
|
-
i("div",
|
|
3322
|
+
i("div", Zr, [
|
|
3316
3323
|
i("button", {
|
|
3317
3324
|
type: "button",
|
|
3318
3325
|
class: "wm-hd__new",
|
|
@@ -3335,7 +3342,7 @@ function hi(t, e, n, a, r, s) {
|
|
|
3335
3342
|
], -1),
|
|
3336
3343
|
i("span", null, "Démarrer un nouveau fil", -1)
|
|
3337
3344
|
])]),
|
|
3338
|
-
i("div",
|
|
3345
|
+
i("div", ei, [
|
|
3339
3346
|
e[7] || (e[7] = i("span", { class: "wm-hd__searchIcon" }, [
|
|
3340
3347
|
i("svg", {
|
|
3341
3348
|
width: "12",
|
|
@@ -3361,23 +3368,23 @@ function hi(t, e, n, a, r, s) {
|
|
|
3361
3368
|
])
|
|
3362
3369
|
])
|
|
3363
3370
|
]),
|
|
3364
|
-
i("div",
|
|
3371
|
+
i("div", ti, [
|
|
3365
3372
|
(l(!0), d(M, null, j(s.groups, (o) => (l(), d(M, {
|
|
3366
3373
|
key: o.key
|
|
3367
3374
|
}, [
|
|
3368
|
-
o.items.length ? (l(), d("div",
|
|
3369
|
-
i("div",
|
|
3370
|
-
i("div",
|
|
3375
|
+
o.items.length ? (l(), d("div", ni, [
|
|
3376
|
+
i("div", si, b(o.label), 1),
|
|
3377
|
+
i("div", ri, [
|
|
3371
3378
|
(l(!0), d(M, null, j(o.items, (c) => (l(), d("button", {
|
|
3372
3379
|
key: c.id,
|
|
3373
3380
|
type: "button",
|
|
3374
|
-
class:
|
|
3381
|
+
class: B(["wm-hd__row", {
|
|
3375
3382
|
"wm-hd__row--active": c.id === n.activeId,
|
|
3376
3383
|
"wm-hd__row--unread": c.unread
|
|
3377
3384
|
}]),
|
|
3378
3385
|
onClick: (v) => t.$emit("pick", c)
|
|
3379
3386
|
}, [
|
|
3380
|
-
i("div",
|
|
3387
|
+
i("div", ai, [
|
|
3381
3388
|
e[8] || (e[8] = i("svg", {
|
|
3382
3389
|
width: "11",
|
|
3383
3390
|
height: "11",
|
|
@@ -3391,24 +3398,24 @@ function hi(t, e, n, a, r, s) {
|
|
|
3391
3398
|
opacity: "0.92"
|
|
3392
3399
|
})
|
|
3393
3400
|
], -1)),
|
|
3394
|
-
c.unread ? (l(), d("span",
|
|
3401
|
+
c.unread ? (l(), d("span", oi)) : w("", !0)
|
|
3395
3402
|
]),
|
|
3396
|
-
i("div",
|
|
3397
|
-
i("div",
|
|
3398
|
-
i("span",
|
|
3403
|
+
i("div", li, [
|
|
3404
|
+
i("div", ci, [
|
|
3405
|
+
i("span", di, b(c.title), 1)
|
|
3399
3406
|
]),
|
|
3400
|
-
i("div",
|
|
3407
|
+
i("div", ui, b(c.preview || "Aucun message"), 1)
|
|
3401
3408
|
])
|
|
3402
|
-
], 10,
|
|
3409
|
+
], 10, ii))), 128))
|
|
3403
3410
|
])
|
|
3404
3411
|
])) : w("", !0)
|
|
3405
3412
|
], 64))), 128)),
|
|
3406
|
-
s.hasAny ? w("", !0) : (l(), d("div",
|
|
3413
|
+
s.hasAny ? w("", !0) : (l(), d("div", hi, " Aucun fil pour le moment. "))
|
|
3407
3414
|
])
|
|
3408
3415
|
])
|
|
3409
3416
|
]);
|
|
3410
3417
|
}
|
|
3411
|
-
const
|
|
3418
|
+
const fi = /* @__PURE__ */ E(Yr, [["render", mi], ["__scopeId", "data-v-1259e822"]]), _i = {
|
|
3412
3419
|
name: "WmMoreMenu",
|
|
3413
3420
|
props: {
|
|
3414
3421
|
canRename: { type: Boolean, default: !0 },
|
|
@@ -3435,18 +3442,18 @@ const mi = /* @__PURE__ */ B(Gr, [["render", hi], ["__scopeId", "data-v-1259e822
|
|
|
3435
3442
|
this.notifOn = !this.notifOn, this.$emit("notif-toggle", this.notifOn);
|
|
3436
3443
|
}
|
|
3437
3444
|
}
|
|
3438
|
-
},
|
|
3445
|
+
}, pi = { class: "wm-mm" }, vi = {
|
|
3439
3446
|
class: "wm-mm__pop",
|
|
3440
3447
|
role: "menu"
|
|
3441
|
-
},
|
|
3442
|
-
function
|
|
3443
|
-
return l(), d("div",
|
|
3448
|
+
}, yi = { class: "wm-mm__section" }, gi = { class: "wm-mm__section" }, wi = { class: "wm-mm__section" };
|
|
3449
|
+
function bi(t, e, n, a, r, s) {
|
|
3450
|
+
return l(), d("div", pi, [
|
|
3444
3451
|
i("div", {
|
|
3445
3452
|
class: "wm-mm__scrim",
|
|
3446
3453
|
onClick: e[0] || (e[0] = (o) => t.$emit("close"))
|
|
3447
3454
|
}),
|
|
3448
|
-
i("div",
|
|
3449
|
-
i("div",
|
|
3455
|
+
i("div", vi, [
|
|
3456
|
+
i("div", yi, [
|
|
3450
3457
|
i("button", {
|
|
3451
3458
|
type: "button",
|
|
3452
3459
|
class: "wm-mm__item",
|
|
@@ -3510,7 +3517,7 @@ function wi(t, e, n, a, r, s) {
|
|
|
3510
3517
|
])])) : w("", !0)
|
|
3511
3518
|
]),
|
|
3512
3519
|
e[17] || (e[17] = i("div", { class: "wm-mm__sep" }, null, -1)),
|
|
3513
|
-
i("div",
|
|
3520
|
+
i("div", gi, [
|
|
3514
3521
|
i("button", {
|
|
3515
3522
|
type: "button",
|
|
3516
3523
|
class: "wm-mm__item",
|
|
@@ -3533,14 +3540,14 @@ function wi(t, e, n, a, r, s) {
|
|
|
3533
3540
|
], -1)),
|
|
3534
3541
|
e[14] || (e[14] = i("span", { class: "wm-mm__label" }, "Notifications", -1)),
|
|
3535
3542
|
i("span", {
|
|
3536
|
-
class:
|
|
3543
|
+
class: B(["wm-mm__toggle", { "wm-mm__toggle--on": r.notifOn }])
|
|
3537
3544
|
}, [...e[12] || (e[12] = [
|
|
3538
3545
|
i("span", { class: "wm-mm__knob" }, null, -1)
|
|
3539
3546
|
])], 2)
|
|
3540
3547
|
])
|
|
3541
3548
|
]),
|
|
3542
3549
|
e[18] || (e[18] = i("div", { class: "wm-mm__sep" }, null, -1)),
|
|
3543
|
-
i("div",
|
|
3550
|
+
i("div", wi, [
|
|
3544
3551
|
n.statusUrl ? (l(), d("button", {
|
|
3545
3552
|
key: 0,
|
|
3546
3553
|
type: "button",
|
|
@@ -3591,13 +3598,13 @@ function wi(t, e, n, a, r, s) {
|
|
|
3591
3598
|
])
|
|
3592
3599
|
]);
|
|
3593
3600
|
}
|
|
3594
|
-
const
|
|
3601
|
+
const ki = /* @__PURE__ */ E(_i, [["render", bi], ["__scopeId", "data-v-c1bb81d2"]]), ye = "ww-messenger-tokens";
|
|
3595
3602
|
function de(t) {
|
|
3596
3603
|
var n;
|
|
3597
3604
|
const e = (n = t == null ? void 0 : t.author) == null ? void 0 : n.type;
|
|
3598
3605
|
return e === "agent_ia" || e === "agent_human";
|
|
3599
3606
|
}
|
|
3600
|
-
function
|
|
3607
|
+
function Ci(t, e) {
|
|
3601
3608
|
if (!t || !e) return "";
|
|
3602
3609
|
const n = Array.isArray(t.fields) ? t.fields : [], a = [];
|
|
3603
3610
|
for (const r of n) {
|
|
@@ -3620,7 +3627,7 @@ function ae(t, e) {
|
|
|
3620
3627
|
const n = t.options.find((a) => (a == null ? void 0 : a.value) === e);
|
|
3621
3628
|
return (n == null ? void 0 : n.label) || e;
|
|
3622
3629
|
}
|
|
3623
|
-
function
|
|
3630
|
+
function Ai(t, e) {
|
|
3624
3631
|
const n = [], a = Array.isArray(t == null ? void 0 : t.fields) ? t.fields : [];
|
|
3625
3632
|
for (const r of a) {
|
|
3626
3633
|
if (!(r != null && r.key) || !(r != null && r.label)) continue;
|
|
@@ -3642,20 +3649,20 @@ function Ci(t, e) {
|
|
|
3642
3649
|
}
|
|
3643
3650
|
};
|
|
3644
3651
|
}
|
|
3645
|
-
const
|
|
3652
|
+
const Si = 450, xi = 50, Mi = 900, Ti = 12e3, Oi = 300, Ii = {
|
|
3646
3653
|
name: "Messenger",
|
|
3647
3654
|
components: {
|
|
3648
3655
|
Launcher: Ke,
|
|
3649
3656
|
Header: gt,
|
|
3650
3657
|
Onboarding: Pt,
|
|
3651
|
-
MessageList:
|
|
3652
|
-
Composer:
|
|
3653
|
-
SuggestionChips:
|
|
3654
|
-
ApprovalCard:
|
|
3655
|
-
FormCard:
|
|
3656
|
-
Feedback:
|
|
3657
|
-
HistoryDrawer:
|
|
3658
|
-
MoreMenu:
|
|
3658
|
+
MessageList: Is,
|
|
3659
|
+
Composer: Js,
|
|
3660
|
+
SuggestionChips: er,
|
|
3661
|
+
ApprovalCard: dr,
|
|
3662
|
+
FormCard: jr,
|
|
3663
|
+
Feedback: Kr,
|
|
3664
|
+
HistoryDrawer: fi,
|
|
3665
|
+
MoreMenu: ki
|
|
3659
3666
|
},
|
|
3660
3667
|
// Make signAttachment available to deep children (AttachmentPreview)
|
|
3661
3668
|
// without prop drilling. The store may not exist yet at provide-time
|
|
@@ -3739,6 +3746,12 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
3739
3746
|
// as the messages render — we need to remember what was read
|
|
3740
3747
|
// BEFORE this viewing session so the separator stays put.
|
|
3741
3748
|
unreadAnchorTs: "",
|
|
3749
|
+
// Borne haute du batch "Non lus" — instant ISO capturé à
|
|
3750
|
+
// l'ouverture du thread. Les messages arrivant APRÈS (created_at
|
|
3751
|
+
// > borne) ne déclenchent pas le séparateur : l'utilisateur est
|
|
3752
|
+
// déjà sur le ticket, il les voit arriver en direct. Vide ⇒ pas
|
|
3753
|
+
// de borne (séparateur classique).
|
|
3754
|
+
unreadBoundaryTs: "",
|
|
3742
3755
|
// Live-measured height of the floating overlay (chips / approval
|
|
3743
3756
|
// / feedback). Reserved as bottom padding on the MessageList so
|
|
3744
3757
|
// the latest message scrolls above the overlay instead of
|
|
@@ -4085,7 +4098,7 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
4085
4098
|
// we're about to load count as history and bypass pacing.
|
|
4086
4099
|
"currentConv.id": {
|
|
4087
4100
|
handler(t) {
|
|
4088
|
-
this.cancelReveals(), this.revealedAt = {}, this.nextRevealAt = 0, this.convOpenedAt = Date.now(), this.moreOpen = !1, this.resetApprovalPacing(), this.isViewingThread && (this.unreadAnchorTs = t && this.readState[t] || "");
|
|
4101
|
+
this.cancelReveals(), this.revealedAt = {}, this.nextRevealAt = 0, this.convOpenedAt = Date.now(), this.moreOpen = !1, this.resetApprovalPacing(), this.isViewingThread && (this.unreadAnchorTs = t && this.readState[t] || "", this.unreadBoundaryTs = t ? (/* @__PURE__ */ new Date()).toISOString() : "");
|
|
4089
4102
|
},
|
|
4090
4103
|
immediate: !0
|
|
4091
4104
|
},
|
|
@@ -4097,8 +4110,8 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
4097
4110
|
var n;
|
|
4098
4111
|
if (t && !e) {
|
|
4099
4112
|
const a = (n = this.currentConv) == null ? void 0 : n.id;
|
|
4100
|
-
this.unreadAnchorTs = a && this.readState[a] || "";
|
|
4101
|
-
} else t || (this.unreadAnchorTs = "");
|
|
4113
|
+
this.unreadAnchorTs = a && this.readState[a] || "", this.unreadBoundaryTs = a ? (/* @__PURE__ */ new Date()).toISOString() : "";
|
|
4114
|
+
} else t || (this.unreadAnchorTs = "", this.unreadBoundaryTs = "");
|
|
4102
4115
|
},
|
|
4103
4116
|
// Fresh `pendingApproval` arrival : kick off the settle debounce so
|
|
4104
4117
|
// the card waits for the conversation to go quiet. Historical
|
|
@@ -4331,11 +4344,11 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
4331
4344
|
// bounded by MIN/MAX_BETWEEN_MS.
|
|
4332
4345
|
scheduleReveal(t) {
|
|
4333
4346
|
const e = Date.now(), n = ((t == null ? void 0 : t.text_md) || "").length, a = Math.min(
|
|
4334
|
-
|
|
4335
|
-
Math.max(
|
|
4347
|
+
Ti,
|
|
4348
|
+
Math.max(Mi, n * xi)
|
|
4336
4349
|
), s = Math.max(
|
|
4337
|
-
e +
|
|
4338
|
-
this.nextRevealAt +
|
|
4350
|
+
e + Si,
|
|
4351
|
+
this.nextRevealAt + Oi
|
|
4339
4352
|
) + a;
|
|
4340
4353
|
this.nextRevealAt = s;
|
|
4341
4354
|
const o = Math.max(0, s - e), c = t.id, v = setTimeout(() => {
|
|
@@ -4367,7 +4380,7 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
4367
4380
|
widgetId: this.widgetId,
|
|
4368
4381
|
userId: this.userId,
|
|
4369
4382
|
userHash: this.userHash
|
|
4370
|
-
})), this.store = fe(
|
|
4383
|
+
})), this.store = fe(Ue(this.transport)), await this.store.start(), this.customer && typeof this.customer == "object" && await this.store.applyCustomer(this.customer), console.log("[ww-messenger] boot done", {
|
|
4371
4384
|
ready: this.store.state.ready,
|
|
4372
4385
|
error: this.store.state.error
|
|
4373
4386
|
});
|
|
@@ -4525,7 +4538,7 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
4525
4538
|
if (!e && (await this.startConv(), !this.currentConv))
|
|
4526
4539
|
return;
|
|
4527
4540
|
const n = (this.currentConv || e).id, a = this.pendingAttachments.slice();
|
|
4528
|
-
this.pendingAttachments = [], await this.store.send(n, t, { attachments: a.length ? a : void 0 });
|
|
4541
|
+
this.pendingAttachments = [], this.unreadAnchorTs = "", this.unreadBoundaryTs = "", await this.store.send(n, t, { attachments: a.length ? a : void 0 });
|
|
4529
4542
|
},
|
|
4530
4543
|
async onSuggestion(t) {
|
|
4531
4544
|
const e = t == null ? void 0 : t.label;
|
|
@@ -4543,12 +4556,12 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
4543
4556
|
async onFormSubmit({ values: t }) {
|
|
4544
4557
|
const e = this.pendingForm;
|
|
4545
4558
|
if (!(e != null && e.form)) return;
|
|
4546
|
-
const n =
|
|
4559
|
+
const n = Ci(e.form, t);
|
|
4547
4560
|
if (!n) return;
|
|
4548
4561
|
const a = this.currentConv;
|
|
4549
4562
|
a && await this.store.send(a.id, n, {
|
|
4550
4563
|
metadata: {
|
|
4551
|
-
artifact:
|
|
4564
|
+
artifact: Ai(e.form, t)
|
|
4552
4565
|
}
|
|
4553
4566
|
});
|
|
4554
4567
|
},
|
|
@@ -4592,7 +4605,7 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
4592
4605
|
}
|
|
4593
4606
|
}
|
|
4594
4607
|
}
|
|
4595
|
-
},
|
|
4608
|
+
}, Bi = {
|
|
4596
4609
|
key: 0,
|
|
4597
4610
|
class: "wm-loading",
|
|
4598
4611
|
"aria-busy": "true",
|
|
@@ -4600,23 +4613,23 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
4600
4613
|
}, Ei = {
|
|
4601
4614
|
key: 0,
|
|
4602
4615
|
class: "wm-state"
|
|
4603
|
-
},
|
|
4616
|
+
}, Li = { class: "wm-state__err" }, $i = { class: "wm-state__errSub" }, Ri = { class: "wm-bottom" }, Fi = {
|
|
4604
4617
|
key: 0,
|
|
4605
4618
|
ref: "floatEl",
|
|
4606
4619
|
class: "wm-float"
|
|
4607
|
-
},
|
|
4620
|
+
}, ji = {
|
|
4608
4621
|
key: 1,
|
|
4609
4622
|
class: "wm-actionWait",
|
|
4610
4623
|
role: "status",
|
|
4611
4624
|
"aria-live": "polite"
|
|
4612
|
-
},
|
|
4625
|
+
}, Di = { class: "wm-actionWait__lbl" }, Ui = {
|
|
4613
4626
|
key: 1,
|
|
4614
4627
|
class: "wm-attached"
|
|
4615
|
-
},
|
|
4616
|
-
function
|
|
4617
|
-
const o = I("Launcher"), c = I("Header"), v = I("Onboarding"), k = I("MessageList"), g = I("ApprovalCard"), S = I("FormCard"), R = I("Feedback"), A = I("SuggestionChips"), P = I("Composer"), x = I("MoreMenu"),
|
|
4628
|
+
}, Ni = ["onClick"];
|
|
4629
|
+
function Pi(t, e, n, a, r, s) {
|
|
4630
|
+
const o = I("Launcher"), c = I("Header"), v = I("Onboarding"), k = I("MessageList"), g = I("ApprovalCard"), S = I("FormCard"), R = I("Feedback"), A = I("SuggestionChips"), P = I("Composer"), x = I("MoreMenu"), U = I("HistoryDrawer");
|
|
4618
4631
|
return l(), d("div", {
|
|
4619
|
-
class:
|
|
4632
|
+
class: B(["wm-root", `wm-root--${n.displayMode}`])
|
|
4620
4633
|
}, [
|
|
4621
4634
|
!r.isOpen && !s.isEmbedded ? (l(), $(o, {
|
|
4622
4635
|
key: 0,
|
|
@@ -4627,12 +4640,12 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4627
4640
|
}, null, 8, ["unread-count", "peek", "onOpen"])) : w("", !0),
|
|
4628
4641
|
r.isOpen || s.isEmbedded ? (l(), d("section", {
|
|
4629
4642
|
key: 1,
|
|
4630
|
-
class:
|
|
4643
|
+
class: B(["wm-panel", `wm-panel--${n.displayMode}`]),
|
|
4631
4644
|
style: G(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
|
|
4632
4645
|
role: "dialog",
|
|
4633
4646
|
"aria-label": "Messenger"
|
|
4634
4647
|
}, [
|
|
4635
|
-
!s.ready && !s.error ? (l(), d("div",
|
|
4648
|
+
!s.ready && !s.error ? (l(), d("div", Bi, [
|
|
4636
4649
|
s.isEmbedded ? w("", !0) : (l(), d("button", {
|
|
4637
4650
|
key: 0,
|
|
4638
4651
|
type: "button",
|
|
@@ -4675,7 +4688,7 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4675
4688
|
onClose: s.close
|
|
4676
4689
|
}, null, 8, ["title", "escalated", "agent-name", "agent-avatar-url", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "onBack", "onMore", "onClose"]),
|
|
4677
4690
|
s.error ? (l(), d("div", Ei, [
|
|
4678
|
-
i("div",
|
|
4691
|
+
i("div", Li, [
|
|
4679
4692
|
e[9] || (e[9] = i("div", { class: "wm-state__errIcon" }, [
|
|
4680
4693
|
i("svg", {
|
|
4681
4694
|
width: "14",
|
|
@@ -4693,7 +4706,7 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4693
4706
|
], -1)),
|
|
4694
4707
|
i("div", null, [
|
|
4695
4708
|
e[8] || (e[8] = i("div", { class: "wm-state__errTitle" }, "Connexion impossible", -1)),
|
|
4696
|
-
i("div",
|
|
4709
|
+
i("div", $i, b(s.error), 1)
|
|
4697
4710
|
])
|
|
4698
4711
|
])
|
|
4699
4712
|
])) : s.currentConv ? (l(), d(M, { key: 2 }, [
|
|
@@ -4706,10 +4719,11 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4706
4719
|
"loading-more": s.paginationState.loading,
|
|
4707
4720
|
"has-more": s.paginationState.hasMore,
|
|
4708
4721
|
"unread-anchor-ts": r.unreadAnchorTs,
|
|
4722
|
+
"unread-boundary-ts": r.unreadBoundaryTs,
|
|
4709
4723
|
onLoadMore: s.onLoadMore
|
|
4710
|
-
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "onLoadMore"]),
|
|
4711
|
-
i("div",
|
|
4712
|
-
s.floatVisible ? (l(), d("div",
|
|
4724
|
+
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "unread-boundary-ts", "onLoadMore"]),
|
|
4725
|
+
i("div", Ri, [
|
|
4726
|
+
s.floatVisible ? (l(), d("div", Fi, [
|
|
4713
4727
|
s.approvalReady ? (l(), $(g, {
|
|
4714
4728
|
key: 0,
|
|
4715
4729
|
action: s.approvalTitle,
|
|
@@ -4731,12 +4745,12 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4731
4745
|
onSelect: s.onSuggestion
|
|
4732
4746
|
}, null, 8, ["items", "onSelect"]))
|
|
4733
4747
|
], 512)) : w("", !0),
|
|
4734
|
-
s.actionInFlight ? (l(), d("div",
|
|
4748
|
+
s.actionInFlight ? (l(), d("div", ji, [
|
|
4735
4749
|
e[10] || (e[10] = i("span", {
|
|
4736
4750
|
class: "wm-actionWait__spinner",
|
|
4737
4751
|
"aria-hidden": "true"
|
|
4738
4752
|
}, null, -1)),
|
|
4739
|
-
i("span",
|
|
4753
|
+
i("span", Di, b(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
|
|
4740
4754
|
])) : (l(), $(P, {
|
|
4741
4755
|
key: 2,
|
|
4742
4756
|
ref: "composer",
|
|
@@ -4798,7 +4812,7 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4798
4812
|
}, [
|
|
4799
4813
|
i("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
4800
4814
|
], -1)
|
|
4801
|
-
])], 8,
|
|
4815
|
+
])], 8, Ni)
|
|
4802
4816
|
]))), 128))
|
|
4803
4817
|
])) : w("", !0)
|
|
4804
4818
|
], 64)) : (l(), $(v, {
|
|
@@ -4812,7 +4826,7 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4812
4826
|
onSelect: s.onQuickLink,
|
|
4813
4827
|
onResume: s.onDrawerPick
|
|
4814
4828
|
}, null, 8, ["welcome-message", "agent-name", "quick-links", "unread-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
4815
|
-
r.historyOpen ? (l(), $(
|
|
4829
|
+
r.historyOpen ? (l(), $(U, {
|
|
4816
4830
|
key: 3,
|
|
4817
4831
|
conversations: s.drawerConversations,
|
|
4818
4832
|
"active-id": s.currentConv ? s.currentConv.id : null,
|
|
@@ -4836,49 +4850,49 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4836
4850
|
], 6)) : w("", !0)
|
|
4837
4851
|
], 2);
|
|
4838
4852
|
}
|
|
4839
|
-
const
|
|
4853
|
+
const Vi = /* @__PURE__ */ E(Ii, [["render", Pi], ["__scopeId", "data-v-29568eac"]]), qi = "0.2.29";
|
|
4840
4854
|
export {
|
|
4841
4855
|
te as AIAvatar,
|
|
4842
4856
|
ce as AVATAR_COLORS,
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4857
|
+
Zt as ActionResult,
|
|
4858
|
+
dr as ApprovalCard,
|
|
4859
|
+
ln as ArtifactFormResponse,
|
|
4860
|
+
bn as ArtifactInfoCard,
|
|
4861
|
+
Nn as ArtifactRenderer,
|
|
4862
|
+
Fn as ArtifactTicket,
|
|
4863
|
+
Qn as AttachmentPreview,
|
|
4864
|
+
is as Bubble,
|
|
4865
|
+
Js as Composer,
|
|
4852
4866
|
Pe as DEFAULT_BASE_URL,
|
|
4853
|
-
|
|
4854
|
-
|
|
4867
|
+
Kr as Feedback,
|
|
4868
|
+
jr as FormCard,
|
|
4855
4869
|
gt as Header,
|
|
4856
|
-
|
|
4870
|
+
fi as HistoryDrawer,
|
|
4857
4871
|
ke as HumanAvatar,
|
|
4858
4872
|
Ke as Launcher,
|
|
4859
4873
|
he as MEDIA_RECORDER_SUPPORTED,
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4874
|
+
Is as MessageList,
|
|
4875
|
+
Vi as Messenger,
|
|
4876
|
+
ki as MoreMenu,
|
|
4863
4877
|
Pt as Onboarding,
|
|
4864
4878
|
ie as SCREEN_CAPTURE_SUPPORTED,
|
|
4865
|
-
|
|
4879
|
+
er as SuggestionChips,
|
|
4866
4880
|
ot as TeamAvatars,
|
|
4867
|
-
|
|
4868
|
-
|
|
4881
|
+
cs as Typing,
|
|
4882
|
+
qi as VERSION,
|
|
4869
4883
|
ge as avatarColor,
|
|
4870
4884
|
we as avatarInitials,
|
|
4871
4885
|
Es as captureScreenshotFile,
|
|
4872
|
-
|
|
4873
|
-
|
|
4886
|
+
D as colors,
|
|
4887
|
+
Ue as createStore,
|
|
4874
4888
|
Re as createTransport,
|
|
4875
|
-
|
|
4889
|
+
Vi as default,
|
|
4876
4890
|
be as formatTime,
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4891
|
+
zi as guessAttachmentKind,
|
|
4892
|
+
Bs as pickRecorderMime,
|
|
4893
|
+
ts as renderMarkdown,
|
|
4894
|
+
$s as startScreenRecording,
|
|
4881
4895
|
Ne as tokensCss,
|
|
4882
|
-
|
|
4883
|
-
|
|
4896
|
+
De as uuid,
|
|
4897
|
+
De as v4
|
|
4884
4898
|
};
|