@_solaris/messenger-widget 0.2.27 → 0.2.28
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 +8 -8
- package/dist/messenger.embed.js +29 -29
- package/dist/messenger.js +144 -132
- 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
|
}
|
|
@@ -1296,7 +1296,7 @@ const zt = {
|
|
|
1296
1296
|
}, Yt = { class: "wm-result__label" }, Jt = { class: "wm-result__detail" };
|
|
1297
1297
|
function Xt(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] = [
|
|
@@ -1336,7 +1336,7 @@ function Xt(t, e, n, a, r, s) {
|
|
|
1336
1336
|
], 64)) : w("", !0)
|
|
1337
1337
|
], 2);
|
|
1338
1338
|
}
|
|
1339
|
-
const Qt = /* @__PURE__ */
|
|
1339
|
+
const Qt = /* @__PURE__ */ E(zt, [["render", Xt], ["__scopeId", "data-v-1a71943e"]]), Zt = {
|
|
1340
1340
|
name: "WmArtifactFormResponse",
|
|
1341
1341
|
props: {
|
|
1342
1342
|
data: { type: Object, required: !0 }
|
|
@@ -1376,13 +1376,13 @@ function an(t, e, n, a, r, s) {
|
|
|
1376
1376
|
}, [
|
|
1377
1377
|
i("div", rn, b(o.label), 1),
|
|
1378
1378
|
i("div", {
|
|
1379
|
-
class:
|
|
1379
|
+
class: B(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1380
1380
|
}, b(o.value), 3)
|
|
1381
1381
|
]))), 128))
|
|
1382
1382
|
])
|
|
1383
1383
|
]);
|
|
1384
1384
|
}
|
|
1385
|
-
const on = /* @__PURE__ */
|
|
1385
|
+
const on = /* @__PURE__ */ E(Zt, [["render", an], ["__scopeId", "data-v-ca24a9c9"]]), ln = {
|
|
1386
1386
|
name: "WmArtifactInfoCard",
|
|
1387
1387
|
props: {
|
|
1388
1388
|
data: { type: Object, required: !0 }
|
|
@@ -1426,7 +1426,7 @@ function gn(t, e, n, a, r, s) {
|
|
|
1426
1426
|
]),
|
|
1427
1427
|
n.data.badge && n.data.badge.label ? (l(), d("span", {
|
|
1428
1428
|
key: 0,
|
|
1429
|
-
class:
|
|
1429
|
+
class: B(["wm-art__badge", `wm-art__badge--${n.data.badge.tone || "neutral"}`])
|
|
1430
1430
|
}, b(n.data.badge.label), 3)) : w("", !0)
|
|
1431
1431
|
]),
|
|
1432
1432
|
s.hasBody ? (l(), d("div", pn, [
|
|
@@ -1437,13 +1437,13 @@ function gn(t, e, n, a, r, s) {
|
|
|
1437
1437
|
}, [
|
|
1438
1438
|
i("div", yn, b(o.label), 1),
|
|
1439
1439
|
i("div", {
|
|
1440
|
-
class:
|
|
1440
|
+
class: B(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1441
1441
|
}, b(o.value), 3)
|
|
1442
1442
|
]))), 128)) : w("", !0)
|
|
1443
1443
|
])) : w("", !0)
|
|
1444
1444
|
]);
|
|
1445
1445
|
}
|
|
1446
|
-
const wn = /* @__PURE__ */
|
|
1446
|
+
const wn = /* @__PURE__ */ E(ln, [["render", gn], ["__scopeId", "data-v-d7369333"]]);
|
|
1447
1447
|
function bn(t) {
|
|
1448
1448
|
if (!t) return "";
|
|
1449
1449
|
const e = new Date(t);
|
|
@@ -1491,7 +1491,7 @@ const kn = {
|
|
|
1491
1491
|
}, On = {
|
|
1492
1492
|
key: 0,
|
|
1493
1493
|
class: "wm-art__body"
|
|
1494
|
-
}, In = { class: "wm-art__fieldLabel" },
|
|
1494
|
+
}, In = { class: "wm-art__fieldLabel" }, Bn = ["data-level"], En = {
|
|
1495
1495
|
key: 1,
|
|
1496
1496
|
class: "wm-tk__date",
|
|
1497
1497
|
width: "12",
|
|
@@ -1530,7 +1530,7 @@ function $n(t, e, n, a, r, s) {
|
|
|
1530
1530
|
i("span", null, b(n.data.reference), 1)
|
|
1531
1531
|
]),
|
|
1532
1532
|
i("span", {
|
|
1533
|
-
class:
|
|
1533
|
+
class: B(["wm-art__badge", "wm-tk__badge", `wm-art__badge--${n.data.status.tone || "neutral"}`])
|
|
1534
1534
|
}, [
|
|
1535
1535
|
e[1] || (e[1] = i("span", {
|
|
1536
1536
|
class: "wm-tk__dot",
|
|
@@ -1548,7 +1548,7 @@ function $n(t, e, n, a, r, s) {
|
|
|
1548
1548
|
}, [
|
|
1549
1549
|
i("div", In, b(o.label), 1),
|
|
1550
1550
|
i("div", {
|
|
1551
|
-
class:
|
|
1551
|
+
class: B(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1552
1552
|
}, [
|
|
1553
1553
|
s.isPriority(o.label) ? (l(), d("svg", {
|
|
1554
1554
|
key: 0,
|
|
@@ -1580,7 +1580,7 @@ function $n(t, e, n, a, r, s) {
|
|
|
1580
1580
|
height: "9",
|
|
1581
1581
|
rx: "0.5"
|
|
1582
1582
|
}, null, -1)
|
|
1583
|
-
])], 8,
|
|
1583
|
+
])], 8, Bn)) : s.isDate(o.label) ? (l(), d("svg", En, [...e[3] || (e[3] = [
|
|
1584
1584
|
i("rect", {
|
|
1585
1585
|
x: "3",
|
|
1586
1586
|
y: "4",
|
|
@@ -1619,7 +1619,7 @@ function $n(t, e, n, a, r, s) {
|
|
|
1619
1619
|
])) : w("", !0)
|
|
1620
1620
|
]);
|
|
1621
1621
|
}
|
|
1622
|
-
const Rn = /* @__PURE__ */
|
|
1622
|
+
const Rn = /* @__PURE__ */ E(kn, [["render", $n], ["__scopeId", "data-v-8b274eb7"]]), Fn = {
|
|
1623
1623
|
form_response: on,
|
|
1624
1624
|
info_card: wn,
|
|
1625
1625
|
ticket: Rn
|
|
@@ -1638,13 +1638,13 @@ const Rn = /* @__PURE__ */ B(kn, [["render", $n], ["__scopeId", "data-v-8b274eb7
|
|
|
1638
1638
|
}
|
|
1639
1639
|
}
|
|
1640
1640
|
};
|
|
1641
|
-
function
|
|
1641
|
+
function Dn(t, e, n, a, r, s) {
|
|
1642
1642
|
return s.component ? (l(), $(Me(s.component), {
|
|
1643
1643
|
key: 0,
|
|
1644
1644
|
data: n.artifact.data
|
|
1645
1645
|
}, null, 8, ["data"])) : w("", !0);
|
|
1646
1646
|
}
|
|
1647
|
-
const
|
|
1647
|
+
const Un = /* @__PURE__ */ E(jn, [["render", Dn]]), Nn = {
|
|
1648
1648
|
name: "WmAttachmentPreview",
|
|
1649
1649
|
inject: {
|
|
1650
1650
|
signAttachmentFn: { default: null }
|
|
@@ -1708,7 +1708,7 @@ const Dn = /* @__PURE__ */ B(jn, [["render", Un]]), Nn = {
|
|
|
1708
1708
|
};
|
|
1709
1709
|
function Jn(t, e, n, a, r, s) {
|
|
1710
1710
|
return l(), d("div", {
|
|
1711
|
-
class:
|
|
1711
|
+
class: B(["wm-att", ["wm-att--" + (s.kind || "file")]])
|
|
1712
1712
|
}, [
|
|
1713
1713
|
s.kind === "image" && r.url ? (l(), d("a", {
|
|
1714
1714
|
key: 0,
|
|
@@ -1765,7 +1765,7 @@ function Jn(t, e, n, a, r, s) {
|
|
|
1765
1765
|
], 8, qn))
|
|
1766
1766
|
], 2);
|
|
1767
1767
|
}
|
|
1768
|
-
const Xn = /* @__PURE__ */
|
|
1768
|
+
const Xn = /* @__PURE__ */ E(Nn, [["render", Jn], ["__scopeId", "data-v-1cd1267b"]]);
|
|
1769
1769
|
function Qn(t) {
|
|
1770
1770
|
return String(t).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1771
1771
|
}
|
|
@@ -1859,14 +1859,14 @@ const ts = {
|
|
|
1859
1859
|
}, ns = ["innerHTML"];
|
|
1860
1860
|
function ss(t, e, n, a, r, s) {
|
|
1861
1861
|
return l(), d("div", {
|
|
1862
|
-
class:
|
|
1862
|
+
class: B(["wm-bubble", "wm-bubble--" + n.role])
|
|
1863
1863
|
}, [
|
|
1864
1864
|
Te(t.$slots, "default", {}, () => [
|
|
1865
1865
|
i("span", { innerHTML: s.rendered }, null, 8, ns)
|
|
1866
1866
|
], !0)
|
|
1867
1867
|
], 2);
|
|
1868
1868
|
}
|
|
1869
|
-
const rs = /* @__PURE__ */
|
|
1869
|
+
const rs = /* @__PURE__ */ E(ts, [["render", ss], ["__scopeId", "data-v-5c9e9f2b"]]), is = { name: "WmTyping" }, as = { class: "wm-typing" };
|
|
1870
1870
|
function os(t, e, n, a, r, s) {
|
|
1871
1871
|
return l(), d("div", as, [...e[0] || (e[0] = [
|
|
1872
1872
|
i("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
@@ -1874,7 +1874,7 @@ function os(t, e, n, a, r, s) {
|
|
|
1874
1874
|
i("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
1875
1875
|
])]);
|
|
1876
1876
|
}
|
|
1877
|
-
const ls = /* @__PURE__ */
|
|
1877
|
+
const ls = /* @__PURE__ */ E(is, [["render", os], ["__scopeId", "data-v-df2447fd"]]);
|
|
1878
1878
|
function Z(t) {
|
|
1879
1879
|
return t ? t.client_msg_id || t.id : "";
|
|
1880
1880
|
}
|
|
@@ -1887,7 +1887,7 @@ const cs = {
|
|
|
1887
1887
|
idle: "Conversation en pause"
|
|
1888
1888
|
}, ds = 80, us = 200, hs = {
|
|
1889
1889
|
name: "WmMessageList",
|
|
1890
|
-
components: { AIAvatar: te, HumanAvatar: ke, Bubble: rs, Typing: ls, ActionResult: Qt, AttachmentPreview: Xn, ArtifactRenderer:
|
|
1890
|
+
components: { AIAvatar: te, HumanAvatar: ke, Bubble: rs, Typing: ls, ActionResult: Qt, AttachmentPreview: Xn, ArtifactRenderer: Un },
|
|
1891
1891
|
props: {
|
|
1892
1892
|
messages: { type: Array, default: () => [] },
|
|
1893
1893
|
streamingActive: { type: Boolean, default: !1 },
|
|
@@ -1903,7 +1903,12 @@ const cs = {
|
|
|
1903
1903
|
// current thread. Drives the "Non lus" separator: rendered before the
|
|
1904
1904
|
// first non-user group whose first message is newer than this anchor.
|
|
1905
1905
|
// Empty string disables the separator (fresh thread or no prior read).
|
|
1906
|
-
unreadAnchorTs: { type: String, default: "" }
|
|
1906
|
+
unreadAnchorTs: { type: String, default: "" },
|
|
1907
|
+
// Borne haute (instant ISO d'ouverture du thread). Les messages dont
|
|
1908
|
+
// `created_at` la dépasse sont arrivés EN DIRECT pendant que
|
|
1909
|
+
// l'utilisateur regardait — ils n'entrent pas dans le batch "Non lus".
|
|
1910
|
+
// Vide ⇒ pas de borne haute (rétrocompatible).
|
|
1911
|
+
unreadBoundaryTs: { type: String, default: "" }
|
|
1907
1912
|
},
|
|
1908
1913
|
emits: ["load-more"],
|
|
1909
1914
|
data() {
|
|
@@ -1980,7 +1985,7 @@ const cs = {
|
|
|
1980
1985
|
for (const t of this.groups) {
|
|
1981
1986
|
if (t.role === "user" || t.role === "system") continue;
|
|
1982
1987
|
const e = t.messages[0];
|
|
1983
|
-
if (e != null && e.created_at && e.created_at
|
|
1988
|
+
if (e != null && e.created_at && !(e.created_at <= this.unreadAnchorTs) && !(this.unreadBoundaryTs && e.created_at > this.unreadBoundaryTs))
|
|
1984
1989
|
return t.key;
|
|
1985
1990
|
}
|
|
1986
1991
|
return null;
|
|
@@ -2189,8 +2194,8 @@ const cs = {
|
|
|
2189
2194
|
cornersFor(t, e) {
|
|
2190
2195
|
var Y, H, J;
|
|
2191
2196
|
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) && (
|
|
2197
|
+
let U = c, F = c, N = c, V = c;
|
|
2198
|
+
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
2199
|
},
|
|
2195
2200
|
// Inline style emitting the four corner CSS variables. Set on
|
|
2196
2201
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -2329,7 +2334,7 @@ function Ts(t, e, n, a, r, s) {
|
|
|
2329
2334
|
const o = I("AIAvatar"), c = I("HumanAvatar"), v = I("ActionResult"), k = I("ArtifactRenderer"), g = I("Bubble"), S = I("AttachmentPreview"), R = I("Typing");
|
|
2330
2335
|
return l(), d("div", {
|
|
2331
2336
|
ref: "scrollEl",
|
|
2332
|
-
class:
|
|
2337
|
+
class: B(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
2333
2338
|
onScrollPassive: e[0] || (e[0] = (...A) => s.onScroll && s.onScroll(...A))
|
|
2334
2339
|
}, [
|
|
2335
2340
|
n.loadingMore ? (l(), d("div", ms, [...e[1] || (e[1] = [
|
|
@@ -2353,21 +2358,21 @@ function Ts(t, e, n, a, r, s) {
|
|
|
2353
2358
|
i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)
|
|
2354
2359
|
])])) : w("", !0),
|
|
2355
2360
|
i("div", {
|
|
2356
|
-
class:
|
|
2361
|
+
class: B(["wm-list__group", "wm-list__group--" + A.role])
|
|
2357
2362
|
}, [
|
|
2358
2363
|
A.role === "system" ? (l(), d("div", ys, [
|
|
2359
2364
|
e[5] || (e[5] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
2360
2365
|
i("span", gs, b(A.systemLabel), 1),
|
|
2361
2366
|
e[6] || (e[6] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
2362
2367
|
])) : (l(), d(M, { key: 1 }, [
|
|
2363
|
-
(l(!0), d(M, null, j(A.items, (x,
|
|
2368
|
+
(l(!0), d(M, null, j(A.items, (x, U) => (l(), d("div", {
|
|
2364
2369
|
key: `${s.messageKey(x.message)}-${x.partKey}`,
|
|
2365
2370
|
"data-row-key": `${s.messageKey(x.message)}-${x.partKey}`,
|
|
2366
|
-
class:
|
|
2367
|
-
style: G(s.cornersStyle(A,
|
|
2371
|
+
class: B(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x.message._pending, "is-failed": x.message._failed }]]),
|
|
2372
|
+
style: G(s.cornersStyle(A, U))
|
|
2368
2373
|
}, [
|
|
2369
2374
|
A.role !== "user" ? (l(), d("div", bs, [
|
|
2370
|
-
|
|
2375
|
+
U === A.items.length - 1 ? (l(), d(M, { key: 0 }, [
|
|
2371
2376
|
A.role === "ai" ? (l(), $(o, {
|
|
2372
2377
|
key: 0,
|
|
2373
2378
|
size: 26,
|
|
@@ -2404,7 +2409,7 @@ function Ts(t, e, n, a, r, s) {
|
|
|
2404
2409
|
}, null, 8, ["role", "text"])) : w("", !0),
|
|
2405
2410
|
s.attachmentsOf(x.message).length ? (l(), d("div", {
|
|
2406
2411
|
key: 1,
|
|
2407
|
-
class:
|
|
2412
|
+
class: B(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
|
|
2408
2413
|
}, [
|
|
2409
2414
|
(l(!0), d(M, null, j(s.attachmentsOf(x.message), (F, N) => (l(), $(S, {
|
|
2410
2415
|
key: `${s.messageKey(x.message)}-att-${N}`,
|
|
@@ -2415,7 +2420,7 @@ function Ts(t, e, n, a, r, s) {
|
|
|
2415
2420
|
], 14, ws))), 128)),
|
|
2416
2421
|
A.role !== "user" || s.lastTimeOf(A) ? (l(), d("div", {
|
|
2417
2422
|
key: 0,
|
|
2418
|
-
class:
|
|
2423
|
+
class: B(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
2419
2424
|
}, [
|
|
2420
2425
|
A.role !== "user" ? (l(), d("span", Cs, b(s.roleLabel(A)), 1)) : w("", !0),
|
|
2421
2426
|
A.role !== "user" && s.lastTimeOf(A) ? (l(), d("span", As, "·")) : w("", !0),
|
|
@@ -2435,7 +2440,7 @@ function Ts(t, e, n, a, r, s) {
|
|
|
2435
2440
|
])) : w("", !0)
|
|
2436
2441
|
], 34);
|
|
2437
2442
|
}
|
|
2438
|
-
const Os = /* @__PURE__ */
|
|
2443
|
+
const Os = /* @__PURE__ */ E(hs, [["render", Ts], ["__scopeId", "data-v-63002c7f"]]), ie = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
2439
2444
|
function Is() {
|
|
2440
2445
|
return he && [
|
|
2441
2446
|
"video/webm;codecs=vp9,opus",
|
|
@@ -2459,7 +2464,7 @@ function Ce({ audio: t }) {
|
|
|
2459
2464
|
function Hi(t) {
|
|
2460
2465
|
return t ? t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : "file" : "file";
|
|
2461
2466
|
}
|
|
2462
|
-
async function
|
|
2467
|
+
async function Bs() {
|
|
2463
2468
|
if (!ie) return null;
|
|
2464
2469
|
let t;
|
|
2465
2470
|
try {
|
|
@@ -2468,7 +2473,7 @@ async function Es() {
|
|
|
2468
2473
|
return (e == null ? void 0 : e.name) !== "NotAllowedError" && console.error("[media] screenshot picker", e), null;
|
|
2469
2474
|
}
|
|
2470
2475
|
try {
|
|
2471
|
-
return await
|
|
2476
|
+
return await Es(t);
|
|
2472
2477
|
} catch (e) {
|
|
2473
2478
|
return console.error("[media] screenshot capture", e), null;
|
|
2474
2479
|
} finally {
|
|
@@ -2477,7 +2482,7 @@ async function Es() {
|
|
|
2477
2482
|
});
|
|
2478
2483
|
}
|
|
2479
2484
|
}
|
|
2480
|
-
async function
|
|
2485
|
+
async function Es(t) {
|
|
2481
2486
|
const e = document.createElement("video");
|
|
2482
2487
|
e.muted = !0, e.playsInline = !0, e.srcObject = t, await e.play(), await new Promise((c) => requestAnimationFrame(c));
|
|
2483
2488
|
const n = e.videoWidth || 1280, a = e.videoHeight || 720, r = document.createElement("canvas");
|
|
@@ -2514,8 +2519,8 @@ async function Ls(t = {}) {
|
|
|
2514
2519
|
if (s && clearInterval(s), e.getTracks().forEach((R) => {
|
|
2515
2520
|
R.stop();
|
|
2516
2521
|
}), 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,
|
|
2522
|
+
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 });
|
|
2523
|
+
(g = t.onfinalize) == null || g.call(t, U);
|
|
2519
2524
|
} else
|
|
2520
2525
|
(S = t.oncancel) == null || S.call(t);
|
|
2521
2526
|
}), e.getVideoTracks().forEach((g) => {
|
|
@@ -2659,7 +2664,7 @@ const $s = [
|
|
|
2659
2664
|
},
|
|
2660
2665
|
async captureScreenshot() {
|
|
2661
2666
|
if (this.disabled) return;
|
|
2662
|
-
const t = await
|
|
2667
|
+
const t = await Bs();
|
|
2663
2668
|
t && this.$emit("attach", t);
|
|
2664
2669
|
},
|
|
2665
2670
|
async startRecording() {
|
|
@@ -2693,7 +2698,7 @@ const $s = [
|
|
|
2693
2698
|
}, Fs = { class: "wm-compose-wrap" }, js = {
|
|
2694
2699
|
key: 0,
|
|
2695
2700
|
class: "wm-rec"
|
|
2696
|
-
},
|
|
2701
|
+
}, Ds = { class: "wm-rec__lbl" }, Us = {
|
|
2697
2702
|
key: 1,
|
|
2698
2703
|
class: "wm-compose__menu",
|
|
2699
2704
|
role: "menu"
|
|
@@ -2710,7 +2715,7 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2710
2715
|
class: "wm-rec__dot",
|
|
2711
2716
|
"aria-hidden": "true"
|
|
2712
2717
|
}, null, -1)),
|
|
2713
|
-
i("span",
|
|
2718
|
+
i("span", Ds, "Enregistrement · " + b(s.recordingElapsedLabel), 1),
|
|
2714
2719
|
i("button", {
|
|
2715
2720
|
type: "button",
|
|
2716
2721
|
class: "wm-rec__stop",
|
|
@@ -2718,7 +2723,7 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2718
2723
|
}, "Arrêter")
|
|
2719
2724
|
])) : w("", !0),
|
|
2720
2725
|
i("form", {
|
|
2721
|
-
class:
|
|
2726
|
+
class: B(["wm-compose", { "has-attach": r.attachOpen }]),
|
|
2722
2727
|
onSubmit: e[7] || (e[7] = ee((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
|
|
2723
2728
|
}, [
|
|
2724
2729
|
i("input", {
|
|
@@ -2733,7 +2738,7 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2733
2738
|
class: "wm-compose__overlay",
|
|
2734
2739
|
onClick: e[2] || (e[2] = (o) => r.attachOpen = !1)
|
|
2735
2740
|
})) : w("", !0),
|
|
2736
|
-
r.attachOpen ? (l(), d("div",
|
|
2741
|
+
r.attachOpen ? (l(), d("div", Us, [
|
|
2737
2742
|
(l(!0), d(M, null, j(s.attachItems, (o) => (l(), d("button", {
|
|
2738
2743
|
key: o.action,
|
|
2739
2744
|
type: "button",
|
|
@@ -2771,7 +2776,7 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2771
2776
|
i("div", qs, [
|
|
2772
2777
|
i("button", {
|
|
2773
2778
|
type: "button",
|
|
2774
|
-
class:
|
|
2779
|
+
class: B(["wm-compose__icon", { "is-open": r.attachOpen }]),
|
|
2775
2780
|
title: n.attachLabel,
|
|
2776
2781
|
"aria-label": n.attachLabel,
|
|
2777
2782
|
disabled: r.recording,
|
|
@@ -2793,7 +2798,7 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2793
2798
|
])], 10, Ws),
|
|
2794
2799
|
i("button", {
|
|
2795
2800
|
type: "submit",
|
|
2796
|
-
class:
|
|
2801
|
+
class: B(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
2797
2802
|
disabled: !s.canSend,
|
|
2798
2803
|
"aria-label": "Envoyer"
|
|
2799
2804
|
}, [...e[10] || (e[10] = [
|
|
@@ -2815,7 +2820,7 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2815
2820
|
], 34)
|
|
2816
2821
|
]);
|
|
2817
2822
|
}
|
|
2818
|
-
const Ys = /* @__PURE__ */
|
|
2823
|
+
const Ys = /* @__PURE__ */ E(Rs, [["render", Gs], ["__scopeId", "data-v-14fa9ec0"]]), Js = {
|
|
2819
2824
|
name: "WmSuggestionChips",
|
|
2820
2825
|
props: {
|
|
2821
2826
|
items: { type: Array, default: () => [] },
|
|
@@ -2847,7 +2852,7 @@ function Qs(t, e, n, a, r, s) {
|
|
|
2847
2852
|
}, b(o.label), 13, Xs))), 128))
|
|
2848
2853
|
])) : w("", !0);
|
|
2849
2854
|
}
|
|
2850
|
-
const Zs = /* @__PURE__ */
|
|
2855
|
+
const Zs = /* @__PURE__ */ E(Js, [["render", Qs], ["__scopeId", "data-v-55aa529d"]]), er = {
|
|
2851
2856
|
name: "WmApprovalCard",
|
|
2852
2857
|
components: { AIAvatar: te },
|
|
2853
2858
|
props: {
|
|
@@ -2912,7 +2917,7 @@ function lr(t, e, n, a, r, s) {
|
|
|
2912
2917
|
])
|
|
2913
2918
|
]);
|
|
2914
2919
|
}
|
|
2915
|
-
const cr = /* @__PURE__ */
|
|
2920
|
+
const cr = /* @__PURE__ */ E(er, [["render", lr], ["__scopeId", "data-v-b1be139c"]]);
|
|
2916
2921
|
let ve = 0;
|
|
2917
2922
|
const dr = /* @__PURE__ */ new Set([
|
|
2918
2923
|
"text",
|
|
@@ -3012,10 +3017,10 @@ const dr = /* @__PURE__ */ new Set([
|
|
|
3012
3017
|
}, Tr = ["value"], Or = {
|
|
3013
3018
|
key: 6,
|
|
3014
3019
|
class: "wm-form__multi"
|
|
3015
|
-
}, Ir = ["value", "checked", "disabled", "onChange"],
|
|
3020
|
+
}, Ir = ["value", "checked", "disabled", "onChange"], Br = {
|
|
3016
3021
|
key: 0,
|
|
3017
3022
|
class: "wm-form__err"
|
|
3018
|
-
},
|
|
3023
|
+
}, Er = ["disabled"], Lr = {
|
|
3019
3024
|
key: 0,
|
|
3020
3025
|
class: "wm-form__spinner",
|
|
3021
3026
|
"aria-hidden": "true"
|
|
@@ -3139,7 +3144,7 @@ function Rr(t, e, n, a, r, s) {
|
|
|
3139
3144
|
]))), 128))
|
|
3140
3145
|
])) : w("", !0)
|
|
3141
3146
|
]))), 128)),
|
|
3142
|
-
r.error ? (l(), d("div",
|
|
3147
|
+
r.error ? (l(), d("div", Br, b(r.error), 1)) : w("", !0),
|
|
3143
3148
|
n.readOnly ? (l(), d("div", $r, "Réponse envoyée")) : (l(), d("button", {
|
|
3144
3149
|
key: 1,
|
|
3145
3150
|
type: "submit",
|
|
@@ -3148,11 +3153,11 @@ function Rr(t, e, n, a, r, s) {
|
|
|
3148
3153
|
}, [
|
|
3149
3154
|
r.busy ? (l(), d("span", Lr)) : w("", !0),
|
|
3150
3155
|
i("span", null, b(r.busy ? "Envoi…" : n.form.submit_label || "Envoyer"), 1)
|
|
3151
|
-
], 8,
|
|
3156
|
+
], 8, Er))
|
|
3152
3157
|
], 32)
|
|
3153
3158
|
]);
|
|
3154
3159
|
}
|
|
3155
|
-
const Fr = /* @__PURE__ */
|
|
3160
|
+
const Fr = /* @__PURE__ */ E(ur, [["render", Rr], ["__scopeId", "data-v-64b40f76"]]), jr = {
|
|
3156
3161
|
name: "WmFeedback",
|
|
3157
3162
|
props: {
|
|
3158
3163
|
busy: { type: Boolean, default: !1 },
|
|
@@ -3176,22 +3181,22 @@ const Fr = /* @__PURE__ */ B(ur, [["render", Rr], ["__scopeId", "data-v-64b40f76
|
|
|
3176
3181
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
3177
3182
|
}
|
|
3178
3183
|
}
|
|
3179
|
-
},
|
|
3184
|
+
}, Dr = { class: "wm-fb" }, Ur = { class: "wm-fb__row" }, Nr = ["onClick"], Pr = { class: "wm-fb__emoji" }, Hr = { class: "wm-fb__label" }, zr = ["disabled"], Vr = {
|
|
3180
3185
|
key: 1,
|
|
3181
3186
|
class: "wm-fb__done"
|
|
3182
3187
|
};
|
|
3183
3188
|
function qr(t, e, n, a, r, s) {
|
|
3184
|
-
return l(), d("div",
|
|
3189
|
+
return l(), d("div", Dr, [
|
|
3185
3190
|
n.done ? (l(), d("div", Vr, [...e[3] || (e[3] = [
|
|
3186
3191
|
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
3192
|
])])) : (l(), d(M, { key: 0 }, [
|
|
3188
3193
|
e[1] || (e[1] = i("div", { class: "wm-fb__title" }, "Comment s'est passée cette conversation ?", -1)),
|
|
3189
3194
|
e[2] || (e[2] = i("div", { class: "wm-fb__sub" }, "Votre avis nous aide à améliorer l'assistant.", -1)),
|
|
3190
|
-
i("div",
|
|
3195
|
+
i("div", Ur, [
|
|
3191
3196
|
(l(!0), d(M, null, j(r.options, (o) => (l(), d("button", {
|
|
3192
3197
|
key: o.v,
|
|
3193
3198
|
type: "button",
|
|
3194
|
-
class:
|
|
3199
|
+
class: B(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
|
|
3195
3200
|
onClick: (c) => r.sel = o.v
|
|
3196
3201
|
}, [
|
|
3197
3202
|
i("span", Pr, b(o.e), 1),
|
|
@@ -3207,7 +3212,7 @@ function qr(t, e, n, a, r, s) {
|
|
|
3207
3212
|
], 64))
|
|
3208
3213
|
]);
|
|
3209
3214
|
}
|
|
3210
|
-
const Wr = /* @__PURE__ */
|
|
3215
|
+
const Wr = /* @__PURE__ */ E(jr, [["render", qr], ["__scopeId", "data-v-6f45ff3b"]]);
|
|
3211
3216
|
function Kr(t) {
|
|
3212
3217
|
const e = new Date(t);
|
|
3213
3218
|
return e.setHours(0, 0, 0, 0), e;
|
|
@@ -3371,7 +3376,7 @@ function hi(t, e, n, a, r, s) {
|
|
|
3371
3376
|
(l(!0), d(M, null, j(o.items, (c) => (l(), d("button", {
|
|
3372
3377
|
key: c.id,
|
|
3373
3378
|
type: "button",
|
|
3374
|
-
class:
|
|
3379
|
+
class: B(["wm-hd__row", {
|
|
3375
3380
|
"wm-hd__row--active": c.id === n.activeId,
|
|
3376
3381
|
"wm-hd__row--unread": c.unread
|
|
3377
3382
|
}]),
|
|
@@ -3408,7 +3413,7 @@ function hi(t, e, n, a, r, s) {
|
|
|
3408
3413
|
])
|
|
3409
3414
|
]);
|
|
3410
3415
|
}
|
|
3411
|
-
const mi = /* @__PURE__ */
|
|
3416
|
+
const mi = /* @__PURE__ */ E(Gr, [["render", hi], ["__scopeId", "data-v-1259e822"]]), fi = {
|
|
3412
3417
|
name: "WmMoreMenu",
|
|
3413
3418
|
props: {
|
|
3414
3419
|
canRename: { type: Boolean, default: !0 },
|
|
@@ -3533,7 +3538,7 @@ function wi(t, e, n, a, r, s) {
|
|
|
3533
3538
|
], -1)),
|
|
3534
3539
|
e[14] || (e[14] = i("span", { class: "wm-mm__label" }, "Notifications", -1)),
|
|
3535
3540
|
i("span", {
|
|
3536
|
-
class:
|
|
3541
|
+
class: B(["wm-mm__toggle", { "wm-mm__toggle--on": r.notifOn }])
|
|
3537
3542
|
}, [...e[12] || (e[12] = [
|
|
3538
3543
|
i("span", { class: "wm-mm__knob" }, null, -1)
|
|
3539
3544
|
])], 2)
|
|
@@ -3591,7 +3596,7 @@ function wi(t, e, n, a, r, s) {
|
|
|
3591
3596
|
])
|
|
3592
3597
|
]);
|
|
3593
3598
|
}
|
|
3594
|
-
const bi = /* @__PURE__ */
|
|
3599
|
+
const bi = /* @__PURE__ */ E(fi, [["render", wi], ["__scopeId", "data-v-c1bb81d2"]]), ye = "ww-messenger-tokens";
|
|
3595
3600
|
function de(t) {
|
|
3596
3601
|
var n;
|
|
3597
3602
|
const e = (n = t == null ? void 0 : t.author) == null ? void 0 : n.type;
|
|
@@ -3739,6 +3744,12 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
3739
3744
|
// as the messages render — we need to remember what was read
|
|
3740
3745
|
// BEFORE this viewing session so the separator stays put.
|
|
3741
3746
|
unreadAnchorTs: "",
|
|
3747
|
+
// Borne haute du batch "Non lus" — instant ISO capturé à
|
|
3748
|
+
// l'ouverture du thread. Les messages arrivant APRÈS (created_at
|
|
3749
|
+
// > borne) ne déclenchent pas le séparateur : l'utilisateur est
|
|
3750
|
+
// déjà sur le ticket, il les voit arriver en direct. Vide ⇒ pas
|
|
3751
|
+
// de borne (séparateur classique).
|
|
3752
|
+
unreadBoundaryTs: "",
|
|
3742
3753
|
// Live-measured height of the floating overlay (chips / approval
|
|
3743
3754
|
// / feedback). Reserved as bottom padding on the MessageList so
|
|
3744
3755
|
// the latest message scrolls above the overlay instead of
|
|
@@ -4085,7 +4096,7 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
4085
4096
|
// we're about to load count as history and bypass pacing.
|
|
4086
4097
|
"currentConv.id": {
|
|
4087
4098
|
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] || "");
|
|
4099
|
+
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
4100
|
},
|
|
4090
4101
|
immediate: !0
|
|
4091
4102
|
},
|
|
@@ -4097,8 +4108,8 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
4097
4108
|
var n;
|
|
4098
4109
|
if (t && !e) {
|
|
4099
4110
|
const a = (n = this.currentConv) == null ? void 0 : n.id;
|
|
4100
|
-
this.unreadAnchorTs = a && this.readState[a] || "";
|
|
4101
|
-
} else t || (this.unreadAnchorTs = "");
|
|
4111
|
+
this.unreadAnchorTs = a && this.readState[a] || "", this.unreadBoundaryTs = a ? (/* @__PURE__ */ new Date()).toISOString() : "";
|
|
4112
|
+
} else t || (this.unreadAnchorTs = "", this.unreadBoundaryTs = "");
|
|
4102
4113
|
},
|
|
4103
4114
|
// Fresh `pendingApproval` arrival : kick off the settle debounce so
|
|
4104
4115
|
// the card waits for the conversation to go quiet. Historical
|
|
@@ -4367,7 +4378,7 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
4367
4378
|
widgetId: this.widgetId,
|
|
4368
4379
|
userId: this.userId,
|
|
4369
4380
|
userHash: this.userHash
|
|
4370
|
-
})), this.store = fe(
|
|
4381
|
+
})), 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
4382
|
ready: this.store.state.ready,
|
|
4372
4383
|
error: this.store.state.error
|
|
4373
4384
|
});
|
|
@@ -4525,7 +4536,7 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
4525
4536
|
if (!e && (await this.startConv(), !this.currentConv))
|
|
4526
4537
|
return;
|
|
4527
4538
|
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 });
|
|
4539
|
+
this.pendingAttachments = [], this.unreadAnchorTs = "", this.unreadBoundaryTs = "", await this.store.send(n, t, { attachments: a.length ? a : void 0 });
|
|
4529
4540
|
},
|
|
4530
4541
|
async onSuggestion(t) {
|
|
4531
4542
|
const e = t == null ? void 0 : t.label;
|
|
@@ -4597,10 +4608,10 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
4597
4608
|
class: "wm-loading",
|
|
4598
4609
|
"aria-busy": "true",
|
|
4599
4610
|
"aria-live": "polite"
|
|
4600
|
-
},
|
|
4611
|
+
}, Bi = {
|
|
4601
4612
|
key: 0,
|
|
4602
4613
|
class: "wm-state"
|
|
4603
|
-
},
|
|
4614
|
+
}, Ei = { class: "wm-state__err" }, Li = { class: "wm-state__errSub" }, $i = { class: "wm-bottom" }, Ri = {
|
|
4604
4615
|
key: 0,
|
|
4605
4616
|
ref: "floatEl",
|
|
4606
4617
|
class: "wm-float"
|
|
@@ -4609,14 +4620,14 @@ const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
|
4609
4620
|
class: "wm-actionWait",
|
|
4610
4621
|
role: "status",
|
|
4611
4622
|
"aria-live": "polite"
|
|
4612
|
-
}, ji = { class: "wm-actionWait__lbl" },
|
|
4623
|
+
}, ji = { class: "wm-actionWait__lbl" }, Di = {
|
|
4613
4624
|
key: 1,
|
|
4614
4625
|
class: "wm-attached"
|
|
4615
|
-
},
|
|
4626
|
+
}, Ui = ["onClick"];
|
|
4616
4627
|
function Ni(t, e, n, a, r, s) {
|
|
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
|
+
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
4629
|
return l(), d("div", {
|
|
4619
|
-
class:
|
|
4630
|
+
class: B(["wm-root", `wm-root--${n.displayMode}`])
|
|
4620
4631
|
}, [
|
|
4621
4632
|
!r.isOpen && !s.isEmbedded ? (l(), $(o, {
|
|
4622
4633
|
key: 0,
|
|
@@ -4627,7 +4638,7 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4627
4638
|
}, null, 8, ["unread-count", "peek", "onOpen"])) : w("", !0),
|
|
4628
4639
|
r.isOpen || s.isEmbedded ? (l(), d("section", {
|
|
4629
4640
|
key: 1,
|
|
4630
|
-
class:
|
|
4641
|
+
class: B(["wm-panel", `wm-panel--${n.displayMode}`]),
|
|
4631
4642
|
style: G(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
|
|
4632
4643
|
role: "dialog",
|
|
4633
4644
|
"aria-label": "Messenger"
|
|
@@ -4674,8 +4685,8 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4674
4685
|
onMore: s.toggleMore,
|
|
4675
4686
|
onClose: s.close
|
|
4676
4687
|
}, 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
|
-
s.error ? (l(), d("div",
|
|
4678
|
-
i("div",
|
|
4688
|
+
s.error ? (l(), d("div", Bi, [
|
|
4689
|
+
i("div", Ei, [
|
|
4679
4690
|
e[9] || (e[9] = i("div", { class: "wm-state__errIcon" }, [
|
|
4680
4691
|
i("svg", {
|
|
4681
4692
|
width: "14",
|
|
@@ -4706,8 +4717,9 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4706
4717
|
"loading-more": s.paginationState.loading,
|
|
4707
4718
|
"has-more": s.paginationState.hasMore,
|
|
4708
4719
|
"unread-anchor-ts": r.unreadAnchorTs,
|
|
4720
|
+
"unread-boundary-ts": r.unreadBoundaryTs,
|
|
4709
4721
|
onLoadMore: s.onLoadMore
|
|
4710
|
-
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "onLoadMore"]),
|
|
4722
|
+
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "unread-boundary-ts", "onLoadMore"]),
|
|
4711
4723
|
i("div", $i, [
|
|
4712
4724
|
s.floatVisible ? (l(), d("div", Ri, [
|
|
4713
4725
|
s.approvalReady ? (l(), $(g, {
|
|
@@ -4761,7 +4773,7 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4761
4773
|
onNotifToggle: s.onNotifToggle,
|
|
4762
4774
|
onAction: s.onMoreAction
|
|
4763
4775
|
}, null, 8, ["can-rename", "can-clear", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : w("", !0),
|
|
4764
|
-
r.pendingAttachments.length ? (l(), d("div",
|
|
4776
|
+
r.pendingAttachments.length ? (l(), d("div", Di, [
|
|
4765
4777
|
(l(!0), d(M, null, j(r.pendingAttachments, (F, N) => (l(), d("div", {
|
|
4766
4778
|
key: N,
|
|
4767
4779
|
class: "wm-attached__chip"
|
|
@@ -4798,7 +4810,7 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4798
4810
|
}, [
|
|
4799
4811
|
i("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
4800
4812
|
], -1)
|
|
4801
|
-
])], 8,
|
|
4813
|
+
])], 8, Ui)
|
|
4802
4814
|
]))), 128))
|
|
4803
4815
|
])) : w("", !0)
|
|
4804
4816
|
], 64)) : (l(), $(v, {
|
|
@@ -4812,7 +4824,7 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4812
4824
|
onSelect: s.onQuickLink,
|
|
4813
4825
|
onResume: s.onDrawerPick
|
|
4814
4826
|
}, null, 8, ["welcome-message", "agent-name", "quick-links", "unread-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
4815
|
-
r.historyOpen ? (l(), $(
|
|
4827
|
+
r.historyOpen ? (l(), $(U, {
|
|
4816
4828
|
key: 3,
|
|
4817
4829
|
conversations: s.drawerConversations,
|
|
4818
4830
|
"active-id": s.currentConv ? s.currentConv.id : null,
|
|
@@ -4836,7 +4848,7 @@ function Ni(t, e, n, a, r, s) {
|
|
|
4836
4848
|
], 6)) : w("", !0)
|
|
4837
4849
|
], 2);
|
|
4838
4850
|
}
|
|
4839
|
-
const zi = /* @__PURE__ */
|
|
4851
|
+
const zi = /* @__PURE__ */ E(Oi, [["render", Ni], ["__scopeId", "data-v-29568eac"]]), Vi = "0.2.28";
|
|
4840
4852
|
export {
|
|
4841
4853
|
te as AIAvatar,
|
|
4842
4854
|
ce as AVATAR_COLORS,
|
|
@@ -4844,7 +4856,7 @@ export {
|
|
|
4844
4856
|
cr as ApprovalCard,
|
|
4845
4857
|
on as ArtifactFormResponse,
|
|
4846
4858
|
wn as ArtifactInfoCard,
|
|
4847
|
-
|
|
4859
|
+
Un as ArtifactRenderer,
|
|
4848
4860
|
Rn as ArtifactTicket,
|
|
4849
4861
|
Xn as AttachmentPreview,
|
|
4850
4862
|
rs as Bubble,
|
|
@@ -4868,9 +4880,9 @@ export {
|
|
|
4868
4880
|
Vi as VERSION,
|
|
4869
4881
|
ge as avatarColor,
|
|
4870
4882
|
we as avatarInitials,
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4883
|
+
Bs as captureScreenshotFile,
|
|
4884
|
+
D as colors,
|
|
4885
|
+
Ue as createStore,
|
|
4874
4886
|
Re as createTransport,
|
|
4875
4887
|
zi as default,
|
|
4876
4888
|
be as formatTime,
|
|
@@ -4879,6 +4891,6 @@ export {
|
|
|
4879
4891
|
es as renderMarkdown,
|
|
4880
4892
|
Ls as startScreenRecording,
|
|
4881
4893
|
Ne as tokensCss,
|
|
4882
|
-
|
|
4883
|
-
|
|
4894
|
+
De as uuid,
|
|
4895
|
+
De as v4
|
|
4884
4896
|
};
|