@_solaris/messenger-widget 0.2.17 → 0.2.18
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 +24 -24
- package/dist/messenger.embed.js +17 -17
- package/dist/messenger.js +203 -204
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as Ae, openBlock as l, createElementBlock as d, createVNode as
|
|
1
|
+
import { reactive as Ae, openBlock as l, createElementBlock as d, createVNode as z, Transition as Se, withCtx as xe, withKeys as me, withModifiers as Y, createElementVNode as i, toDisplayString as b, createCommentVNode as y, normalizeStyle as V, normalizeClass as E, Fragment as M, renderList as $, resolveComponent as O, createBlock as R, createTextVNode as re, resolveDynamicComponent as Me, renderSlot as Te, withDirectives as H, vModelText as G, vModelCheckbox as Ie, vModelSelect as Oe, createStaticVNode as ue, markRaw as fe } from "vue";
|
|
2
2
|
const Ee = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -108,7 +108,7 @@ function $e(t) {
|
|
|
108
108
|
const h = await o("GET", "/conversations");
|
|
109
109
|
return (h == null ? void 0 : h.conversations) ?? [];
|
|
110
110
|
}
|
|
111
|
-
async function
|
|
111
|
+
async function F(h = {}) {
|
|
112
112
|
return (await o("POST", "/conversations", h)).conversation;
|
|
113
113
|
}
|
|
114
114
|
async function A(h) {
|
|
@@ -126,8 +126,8 @@ function $e(t) {
|
|
|
126
126
|
`/conversations/${encodeURIComponent(h)}/messages${k}`
|
|
127
127
|
);
|
|
128
128
|
}
|
|
129
|
-
async function
|
|
130
|
-
|
|
129
|
+
async function D(h, f) {
|
|
130
|
+
W();
|
|
131
131
|
const _ = {
|
|
132
132
|
client_msg_id: f.client_msg_id,
|
|
133
133
|
type: "content",
|
|
@@ -141,8 +141,8 @@ function $e(t) {
|
|
|
141
141
|
_
|
|
142
142
|
);
|
|
143
143
|
}
|
|
144
|
-
async function
|
|
145
|
-
return
|
|
144
|
+
async function j(h, f, _) {
|
|
145
|
+
return W(), o(
|
|
146
146
|
"POST",
|
|
147
147
|
`/messages/${encodeURIComponent(h)}/callbacks/${encodeURIComponent(f)}`,
|
|
148
148
|
_ ? { inputs: _ } : {}
|
|
@@ -173,13 +173,13 @@ function $e(t) {
|
|
|
173
173
|
size_bytes: k
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
async function
|
|
176
|
+
async function X(h) {
|
|
177
177
|
return o(
|
|
178
178
|
"GET",
|
|
179
179
|
`/attachments/sign?path=${encodeURIComponent(h)}`
|
|
180
180
|
);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function ie() {
|
|
183
183
|
const h = new URLSearchParams({
|
|
184
184
|
userId: e.userId,
|
|
185
185
|
userHash: e.userHash,
|
|
@@ -187,18 +187,18 @@ function $e(t) {
|
|
|
187
187
|
}).toString();
|
|
188
188
|
return `${e.baseUrl}/stream?${h}`;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function q() {
|
|
191
191
|
if (!e.eventSource && !(typeof document < "u" && document.hidden))
|
|
192
192
|
try {
|
|
193
|
-
const h = new EventSource(
|
|
193
|
+
const h = new EventSource(ie());
|
|
194
194
|
for (const f of Ee)
|
|
195
|
-
h.addEventListener(f, (_) =>
|
|
195
|
+
h.addEventListener(f, (_) => ae(f, _.data));
|
|
196
196
|
h.addEventListener("error", () => a("error", new Error("SSE error"))), e.eventSource = h, r("open");
|
|
197
197
|
} catch (h) {
|
|
198
198
|
console.error("[transport] SSE open failed", h), a("error", h);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function ae(h, f) {
|
|
202
202
|
try {
|
|
203
203
|
const _ = JSON.parse(f), k = _ && typeof _ == "object" && "data" in _ ? _.data : _;
|
|
204
204
|
a(h, k);
|
|
@@ -206,16 +206,16 @@ function $e(t) {
|
|
|
206
206
|
console.error("[transport] bad SSE payload", h, _);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function K() {
|
|
210
210
|
e.eventSource && (e.eventSource.close(), e.eventSource = null), e.connection !== "paused" && r("idle");
|
|
211
211
|
}
|
|
212
|
-
function
|
|
213
|
-
clearTimeout(e.burstTimer),
|
|
214
|
-
e.panelOpen ||
|
|
212
|
+
function W() {
|
|
213
|
+
clearTimeout(e.burstTimer), q(), e.panelOpen || (e.burstTimer = setTimeout(() => {
|
|
214
|
+
e.panelOpen || K();
|
|
215
215
|
}, Le));
|
|
216
216
|
}
|
|
217
217
|
function oe(h) {
|
|
218
|
-
e.panelOpen = !!h, e.panelOpen ? (clearTimeout(e.burstTimer),
|
|
218
|
+
e.panelOpen = !!h, e.panelOpen ? (clearTimeout(e.burstTimer), q()) : W();
|
|
219
219
|
}
|
|
220
220
|
async function le() {
|
|
221
221
|
try {
|
|
@@ -223,12 +223,12 @@ function $e(t) {
|
|
|
223
223
|
const T = I == null ? void 0 : I.last_message_at;
|
|
224
224
|
return T && (!k || T > k) ? T : k;
|
|
225
225
|
}, null);
|
|
226
|
-
f && (!e.lastActivityAt || f > e.lastActivityAt) && (e.lastActivityAt = f, a("activity", { conversations: h, latestAt: f }),
|
|
226
|
+
f && (!e.lastActivityAt || f > e.lastActivityAt) && (e.lastActivityAt = f, a("activity", { conversations: h, latestAt: f }), W());
|
|
227
227
|
} catch (h) {
|
|
228
228
|
console.error("[transport] poll failed", h);
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Q() {
|
|
232
232
|
u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(le, Be));
|
|
233
233
|
}
|
|
234
234
|
function u() {
|
|
@@ -237,14 +237,14 @@ function $e(t) {
|
|
|
237
237
|
function m() {
|
|
238
238
|
if (document.hidden)
|
|
239
239
|
clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = setTimeout(() => {
|
|
240
|
-
e.hiddenGraceTimer = null, document.hidden && (u(),
|
|
240
|
+
e.hiddenGraceTimer = null, document.hidden && (u(), K(), r("paused"));
|
|
241
241
|
}, Re);
|
|
242
242
|
else {
|
|
243
243
|
if (e.hiddenGraceTimer) {
|
|
244
244
|
clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null;
|
|
245
245
|
return;
|
|
246
246
|
}
|
|
247
|
-
r("idle"),
|
|
247
|
+
r("idle"), Q(), e.panelOpen && q();
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
async function p() {
|
|
@@ -261,10 +261,10 @@ function $e(t) {
|
|
|
261
261
|
} catch (f) {
|
|
262
262
|
console.error("[transport] initial /conversations failed", f);
|
|
263
263
|
}
|
|
264
|
-
return typeof document < "u" && (e.visibilityHandler = m, document.addEventListener("visibilitychange", e.visibilityHandler)),
|
|
264
|
+
return typeof document < "u" && (e.visibilityHandler = m, document.addEventListener("visibilitychange", e.visibilityHandler)), Q(), h;
|
|
265
265
|
}
|
|
266
266
|
function g() {
|
|
267
|
-
u(), clearTimeout(e.burstTimer), clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null,
|
|
267
|
+
u(), clearTimeout(e.burstTimer), clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null, K(), e.visibilityHandler && (document.removeEventListener("visibilitychange", e.visibilityHandler), e.visibilityHandler = null), e.started = !1;
|
|
268
268
|
}
|
|
269
269
|
return {
|
|
270
270
|
on: n,
|
|
@@ -276,14 +276,14 @@ function $e(t) {
|
|
|
276
276
|
getCustomer: C,
|
|
277
277
|
patchCustomer: w,
|
|
278
278
|
listConversations: S,
|
|
279
|
-
createConversation:
|
|
279
|
+
createConversation: F,
|
|
280
280
|
getConversation: A,
|
|
281
281
|
patchConversation: N,
|
|
282
282
|
listMessages: x,
|
|
283
|
-
postMessage:
|
|
284
|
-
postCallback:
|
|
283
|
+
postMessage: D,
|
|
284
|
+
postCallback: j,
|
|
285
285
|
uploadAttachment: P,
|
|
286
|
-
signAttachment:
|
|
286
|
+
signAttachment: X,
|
|
287
287
|
// Read-only state
|
|
288
288
|
get connection() {
|
|
289
289
|
return e.connection;
|
|
@@ -344,7 +344,7 @@ function De(t) {
|
|
|
344
344
|
e.connection = u;
|
|
345
345
|
})), n.push(t.on("message", (u) => {
|
|
346
346
|
const m = u == null ? void 0 : u.conversation_id, p = u == null ? void 0 : u.message;
|
|
347
|
-
!m || !(p != null && p.id) || (
|
|
347
|
+
!m || !(p != null && p.id) || (q(m, p), p.client_msg_id && delete e.streamingByMsgId[p.client_msg_id], W(m, p.created_at));
|
|
348
348
|
})), n.push(t.on("message_stream", (u) => {
|
|
349
349
|
const m = u == null ? void 0 : u.message_id, p = u == null ? void 0 : u.token;
|
|
350
350
|
!m || typeof p != "string" || (e.streamingByMsgId[m] = (e.streamingByMsgId[m] || "") + p);
|
|
@@ -413,13 +413,13 @@ function De(t) {
|
|
|
413
413
|
try {
|
|
414
414
|
let h = m.nextCursor, f = [], _ = 0;
|
|
415
415
|
for (; _ < 6 && h; _++) {
|
|
416
|
-
const
|
|
416
|
+
const L = await t.listMessages(u, {
|
|
417
417
|
before: h,
|
|
418
418
|
limit: c
|
|
419
|
-
}),
|
|
420
|
-
if (f = [...
|
|
419
|
+
}), Z = (L == null ? void 0 : L.messages) ?? [];
|
|
420
|
+
if (f = [...Z, ...f], h = (L == null ? void 0 : L.next_cursor) ?? null, !Z.length || f.length >= 60) break;
|
|
421
421
|
}
|
|
422
|
-
const k = e.messagesByConv[u] || [], I = new Set(k.map((
|
|
422
|
+
const k = e.messagesByConv[u] || [], I = new Set(k.map((L) => String(L == null ? void 0 : L.id))), T = [...f.filter((L) => !I.has(String(L == null ? void 0 : L.id))), ...k];
|
|
423
423
|
e.messagesByConv[u] = T, w(u, {
|
|
424
424
|
nextCursor: h,
|
|
425
425
|
loading: !1,
|
|
@@ -437,11 +437,11 @@ function De(t) {
|
|
|
437
437
|
const p = await t.patchConversation(u, m), g = e.conversations.findIndex((h) => h.id === u);
|
|
438
438
|
g !== -1 && (e.conversations[g] = p);
|
|
439
439
|
}
|
|
440
|
-
async function
|
|
440
|
+
async function F(u, m, { attachments: p, metadata: g } = {}) {
|
|
441
441
|
var T;
|
|
442
442
|
const h = (m || "").trim(), f = Array.isArray(p) && p.length > 0;
|
|
443
443
|
if (!u || !h && !f) return;
|
|
444
|
-
const _ = Ue(), k =
|
|
444
|
+
const _ = Ue(), k = Q(u), I = {
|
|
445
445
|
id: _,
|
|
446
446
|
client_msg_id: _,
|
|
447
447
|
conversation_id: u,
|
|
@@ -457,7 +457,7 @@ function De(t) {
|
|
|
457
457
|
...f ? { payload: { type: "content", attachments: p } } : {},
|
|
458
458
|
...g && typeof g == "object" ? { metadata: g } : {}
|
|
459
459
|
};
|
|
460
|
-
|
|
460
|
+
q(u, I);
|
|
461
461
|
try {
|
|
462
462
|
await t.postMessage(u, {
|
|
463
463
|
client_msg_id: _,
|
|
@@ -466,8 +466,8 @@ function De(t) {
|
|
|
466
466
|
...f ? { attachments: p } : {},
|
|
467
467
|
...g && typeof g == "object" ? { metadata: g } : {}
|
|
468
468
|
});
|
|
469
|
-
} catch (
|
|
470
|
-
console.error("[store] send failed",
|
|
469
|
+
} catch (L) {
|
|
470
|
+
console.error("[store] send failed", L), K(u, _, { _failed: !0, _pending: !1 });
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
async function A(u, m, p) {
|
|
@@ -495,7 +495,7 @@ function De(t) {
|
|
|
495
495
|
}
|
|
496
496
|
return null;
|
|
497
497
|
}
|
|
498
|
-
async function
|
|
498
|
+
async function D(u, { rating: m, comment: p } = {}) {
|
|
499
499
|
const g = e.conversations.find((_) => _.id === u), f = {
|
|
500
500
|
...(g == null ? void 0 : g.metadata) || {},
|
|
501
501
|
feedback: {
|
|
@@ -506,7 +506,7 @@ function De(t) {
|
|
|
506
506
|
};
|
|
507
507
|
await S(u, { metadata: f });
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function j(u) {
|
|
510
510
|
var p, g;
|
|
511
511
|
const m = e.messagesByConv[u] || [];
|
|
512
512
|
for (let h = m.length - 1; h >= 0; h--) {
|
|
@@ -528,7 +528,7 @@ function De(t) {
|
|
|
528
528
|
}
|
|
529
529
|
return null;
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function X(u) {
|
|
532
532
|
const m = e.runningActionsByConv[u];
|
|
533
533
|
if (!m) return null;
|
|
534
534
|
const p = Object.keys(m);
|
|
@@ -536,7 +536,7 @@ function De(t) {
|
|
|
536
536
|
const g = p[0];
|
|
537
537
|
return { id: g, payload: { name: m[g] } };
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function ie(u) {
|
|
540
540
|
var p, g, h, f;
|
|
541
541
|
const m = e.messagesByConv[u] || [];
|
|
542
542
|
for (let _ = m.length - 1; _ >= 0; _--) {
|
|
@@ -547,34 +547,34 @@ function De(t) {
|
|
|
547
547
|
const I = (f = k == null ? void 0 : k.metadata) == null ? void 0 : f.suggested_replies;
|
|
548
548
|
return Array.isArray(I) && I.length ? I.map((T) => {
|
|
549
549
|
if (typeof T == "string") {
|
|
550
|
-
const
|
|
551
|
-
return
|
|
550
|
+
const L = T.trim();
|
|
551
|
+
return L ? { label: L, kind: null } : null;
|
|
552
552
|
}
|
|
553
553
|
if (T && typeof T == "object" && typeof T.label == "string") {
|
|
554
|
-
const
|
|
555
|
-
if (!
|
|
556
|
-
const
|
|
557
|
-
return { label:
|
|
554
|
+
const L = T.label.trim();
|
|
555
|
+
if (!L) return null;
|
|
556
|
+
const Z = T.kind === "cta" || T.kind === "choice" || T.kind === "followup" ? T.kind : null;
|
|
557
|
+
return { label: L, kind: Z };
|
|
558
558
|
}
|
|
559
559
|
return null;
|
|
560
560
|
}).filter(Boolean).slice(0, 4) : [];
|
|
561
561
|
}
|
|
562
562
|
return [];
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function q(u, m) {
|
|
565
565
|
var f;
|
|
566
566
|
const p = e.messagesByConv[u] || [];
|
|
567
567
|
let g = -1;
|
|
568
568
|
m != null && m.client_msg_id && (g = p.findIndex(
|
|
569
569
|
(_) => (_ == null ? void 0 : _.client_msg_id) && _.client_msg_id === m.client_msg_id
|
|
570
|
-
)), g === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (g = p.findIndex((_) =>
|
|
570
|
+
)), g === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (g = p.findIndex((_) => ae(_ == null ? void 0 : _.id, m.id)));
|
|
571
571
|
let h;
|
|
572
572
|
g === -1 ? h = [...p, m].sort(oe) : (h = p.slice(), h[g] = { ...p[g], ...m, _pending: !1, _failed: !1 }), e.messagesByConv[u] = h, (m == null ? void 0 : m.type) === "action" && ((f = m == null ? void 0 : m.payload) != null && f.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && e.awaitingCallback[m.id] && delete e.awaitingCallback[m.id];
|
|
573
573
|
}
|
|
574
|
-
function
|
|
574
|
+
function ae(u, m) {
|
|
575
575
|
return u === m ? !0 : u == null || m == null ? !1 : String(u) === String(m);
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function K(u, m, p) {
|
|
578
578
|
const g = e.messagesByConv[u];
|
|
579
579
|
if (!g) return;
|
|
580
580
|
const h = g.findIndex((_) => _.id === m);
|
|
@@ -582,7 +582,7 @@ function De(t) {
|
|
|
582
582
|
const f = g.slice();
|
|
583
583
|
f[h] = { ...g[h], ...p }, e.messagesByConv[u] = f;
|
|
584
584
|
}
|
|
585
|
-
function
|
|
585
|
+
function W(u, m) {
|
|
586
586
|
const p = e.conversations.findIndex((h) => h.id === u);
|
|
587
587
|
if (p === -1) return;
|
|
588
588
|
const g = e.conversations[p];
|
|
@@ -603,7 +603,7 @@ function De(t) {
|
|
|
603
603
|
h !== void 0 && (g === "name" || g === "email" ? h != null && String(h).trim() !== "" && (m[g] = h) : (g === "values" || g === "metadata") && h && typeof h == "object" ? Object.assign(p, h) : p[g] = h);
|
|
604
604
|
return Object.keys(p).length && (m.values = p), Object.keys(m).length ? m : null;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function Q(u) {
|
|
607
607
|
const m = e.messagesByConv[u] || [];
|
|
608
608
|
let p = "";
|
|
609
609
|
for (const f of m)
|
|
@@ -620,19 +620,19 @@ function De(t) {
|
|
|
620
620
|
openConversation: v,
|
|
621
621
|
loadMore: C,
|
|
622
622
|
patchConversation: S,
|
|
623
|
-
send:
|
|
623
|
+
send: F,
|
|
624
624
|
clickCallback: A,
|
|
625
625
|
signAttachment: x,
|
|
626
|
-
submitFeedback:
|
|
627
|
-
getPendingApproval:
|
|
628
|
-
getActionInFlight:
|
|
629
|
-
getLatestSuggestions:
|
|
626
|
+
submitFeedback: D,
|
|
627
|
+
getPendingApproval: j,
|
|
628
|
+
getActionInFlight: X,
|
|
629
|
+
getLatestSuggestions: ie,
|
|
630
630
|
getLatestForm: P,
|
|
631
631
|
// Pass-through for panel open/close (controls SSE burst).
|
|
632
632
|
setPanelOpen: t.setPanelOpen
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
|
-
const
|
|
635
|
+
const U = {
|
|
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: ${U.w};
|
|
668
|
+
--wm-g50: ${U.g50};
|
|
669
|
+
--wm-g100: ${U.g100};
|
|
670
|
+
--wm-g150: ${U.g150};
|
|
671
|
+
--wm-g200: ${U.g200};
|
|
672
|
+
--wm-g300: ${U.g300};
|
|
673
|
+
--wm-g400: ${U.g400};
|
|
674
|
+
--wm-g500: ${U.g500};
|
|
675
|
+
--wm-g700: ${U.g700};
|
|
676
|
+
--wm-g900: ${U.g900};
|
|
677
|
+
--wm-a: ${U.accent};
|
|
678
|
+
--wm-al: ${U.accentLight};
|
|
679
|
+
--wm-green: ${U.green};
|
|
680
|
+
--wm-red: ${U.red};
|
|
681
|
+
--wm-redBg: ${U.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);
|
|
@@ -722,7 +722,7 @@ const Ne = `
|
|
|
722
722
|
}, ze = { class: "wm-launcherWrap" }, Ve = { class: "wm-peek__text" }, qe = ["aria-label"];
|
|
723
723
|
function We(t, e, n, a, r, s) {
|
|
724
724
|
return l(), d("div", ze, [
|
|
725
|
-
|
|
725
|
+
z(Se, { name: "wm-peek" }, {
|
|
726
726
|
default: xe(() => [
|
|
727
727
|
n.peek ? (l(), d("div", {
|
|
728
728
|
key: 0,
|
|
@@ -732,8 +732,8 @@ function We(t, e, n, a, r, s) {
|
|
|
732
732
|
"aria-label": "Ouvrir le messenger sur le dernier message",
|
|
733
733
|
onClick: e[1] || (e[1] = (o) => t.$emit("open")),
|
|
734
734
|
onKeydown: [
|
|
735
|
-
e[2] || (e[2] = me(
|
|
736
|
-
e[3] || (e[3] = me(
|
|
735
|
+
e[2] || (e[2] = me(Y((o) => t.$emit("open"), ["prevent"]), ["enter"])),
|
|
736
|
+
e[3] || (e[3] = me(Y((o) => t.$emit("open"), ["prevent"]), ["space"]))
|
|
737
737
|
]
|
|
738
738
|
}, [
|
|
739
739
|
i("p", Ve, b(n.peek), 1),
|
|
@@ -741,7 +741,7 @@ function We(t, e, n, a, r, s) {
|
|
|
741
741
|
type: "button",
|
|
742
742
|
class: "wm-peek__close",
|
|
743
743
|
"aria-label": "Ignorer",
|
|
744
|
-
onClick: e[0] || (e[0] =
|
|
744
|
+
onClick: e[0] || (e[0] = Y((o) => t.$emit("dismiss"), ["stop"]))
|
|
745
745
|
}, [...e[5] || (e[5] = [
|
|
746
746
|
i("svg", {
|
|
747
747
|
width: "11",
|
|
@@ -807,7 +807,7 @@ const Ge = /* @__PURE__ */ B(He, [["render", We], ["__scopeId", "data-v-fabef371
|
|
|
807
807
|
function Xe(t, e, n, a, r, s) {
|
|
808
808
|
return l(), d("div", {
|
|
809
809
|
class: E(["wm-aiav", { "wm-aiav--tail": n.tail }]),
|
|
810
|
-
style:
|
|
810
|
+
style: V({ 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)) : y("", !0),
|
|
813
813
|
i("div", {
|
|
@@ -843,7 +843,7 @@ function Xe(t, e, n, a, r, s) {
|
|
|
843
843
|
], 2)
|
|
844
844
|
], 6);
|
|
845
845
|
}
|
|
846
|
-
const
|
|
846
|
+
const J = /* @__PURE__ */ B(Ke, [["render", Xe], ["__scopeId", "data-v-8c924688"]]), Qe = {
|
|
847
847
|
name: "WmHumanAvatar",
|
|
848
848
|
props: {
|
|
849
849
|
name: { type: String, default: "" },
|
|
@@ -862,7 +862,7 @@ const Z = /* @__PURE__ */ B(Ke, [["render", Xe], ["__scopeId", "data-v-8c924688"
|
|
|
862
862
|
function et(t, e, n, a, r, s) {
|
|
863
863
|
return l(), d("div", {
|
|
864
864
|
class: "wm-huav",
|
|
865
|
-
style:
|
|
865
|
+
style: V({
|
|
866
866
|
width: n.size + "px",
|
|
867
867
|
height: n.size + "px",
|
|
868
868
|
"--wm-avr": Math.round(n.size * 0.32) + "px",
|
|
@@ -875,7 +875,7 @@ function et(t, e, n, a, r, s) {
|
|
|
875
875
|
alt: n.name || ""
|
|
876
876
|
}, null, 8, Ze)) : (l(), d("span", {
|
|
877
877
|
key: 1,
|
|
878
|
-
style:
|
|
878
|
+
style: V({ fontSize: n.size * 0.36 + "px" })
|
|
879
879
|
}, b(s.initials), 5))
|
|
880
880
|
], 4);
|
|
881
881
|
}
|
|
@@ -912,12 +912,12 @@ function at(t, e, n, a, r, s) {
|
|
|
912
912
|
return s.visible ? (l(), d("div", nt, [
|
|
913
913
|
i("div", {
|
|
914
914
|
class: "wm-team__stack",
|
|
915
|
-
style:
|
|
915
|
+
style: V({ width: s.stackWidth + "px" })
|
|
916
916
|
}, [
|
|
917
|
-
(l(!0), d(M, null,
|
|
917
|
+
(l(!0), d(M, null, $(n.members.slice(0, 3), (o, c) => (l(), d("div", {
|
|
918
918
|
key: c,
|
|
919
919
|
class: "wm-team__pill",
|
|
920
|
-
style:
|
|
920
|
+
style: V({ left: c * 13 + "px", zIndex: 3 - c, background: s.colorFor(o) })
|
|
921
921
|
}, [
|
|
922
922
|
o.avatar_url ? (l(), d("img", {
|
|
923
923
|
key: 0,
|
|
@@ -931,7 +931,7 @@ function at(t, e, n, a, r, s) {
|
|
|
931
931
|
}
|
|
932
932
|
const ot = /* @__PURE__ */ B(tt, [["render", at], ["__scopeId", "data-v-3659b9c1"]]), lt = {
|
|
933
933
|
name: "WmHeader",
|
|
934
|
-
components: { AIAvatar:
|
|
934
|
+
components: { AIAvatar: J, HumanAvatar: ke, TeamAvatars: ot },
|
|
935
935
|
props: {
|
|
936
936
|
title: { type: String, default: "Nouvelle conversation" },
|
|
937
937
|
escalated: { type: Boolean, default: !1 },
|
|
@@ -998,12 +998,12 @@ function gt(t, e, n, a, r, s) {
|
|
|
998
998
|
])])) : (l(), d("div", dt)),
|
|
999
999
|
n.showIdentity ? (l(), d(M, { key: 2 }, [
|
|
1000
1000
|
i("div", ut, [
|
|
1001
|
-
n.escalated ? (l(),
|
|
1001
|
+
n.escalated ? (l(), R(o, {
|
|
1002
1002
|
key: 0,
|
|
1003
1003
|
name: n.agentName,
|
|
1004
1004
|
"avatar-url": n.agentAvatarUrl,
|
|
1005
1005
|
size: 34
|
|
1006
|
-
}, null, 8, ["name", "avatar-url"])) : (l(),
|
|
1006
|
+
}, null, 8, ["name", "avatar-url"])) : (l(), R(c, {
|
|
1007
1007
|
key: 1,
|
|
1008
1008
|
size: 34
|
|
1009
1009
|
}))
|
|
@@ -1011,14 +1011,14 @@ function gt(t, e, n, a, r, s) {
|
|
|
1011
1011
|
i("div", ht, [
|
|
1012
1012
|
i("div", mt, b(n.title), 1),
|
|
1013
1013
|
s.showPresence ? (l(), d("div", ft, [
|
|
1014
|
-
s.hasTeam ? (l(),
|
|
1014
|
+
s.hasTeam ? (l(), R(v, {
|
|
1015
1015
|
key: 0,
|
|
1016
1016
|
members: n.teamMembers,
|
|
1017
1017
|
"response-label": n.responseLabel
|
|
1018
1018
|
}, null, 8, ["members", "response-label"])) : y("", !0),
|
|
1019
1019
|
i("span", pt, [
|
|
1020
1020
|
e[4] || (e[4] = i("span", { class: "wm-header__dot" }, null, -1)),
|
|
1021
|
-
|
|
1021
|
+
re(" " + b(s.statusText), 1)
|
|
1022
1022
|
])
|
|
1023
1023
|
])) : y("", !0)
|
|
1024
1024
|
])
|
|
@@ -1089,7 +1089,7 @@ const yt = /* @__PURE__ */ B(lt, [["render", gt], ["__scopeId", "data-v-b5f5f6a9
|
|
|
1089
1089
|
link: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
|
|
1090
1090
|
}, wt = {
|
|
1091
1091
|
name: "WmOnboarding",
|
|
1092
|
-
components: { AIAvatar:
|
|
1092
|
+
components: { AIAvatar: J },
|
|
1093
1093
|
props: {
|
|
1094
1094
|
welcomeMessage: { type: String, default: "" },
|
|
1095
1095
|
agentName: { type: String, default: "" },
|
|
@@ -1133,7 +1133,7 @@ function Nt(t, e, n, a, r, s) {
|
|
|
1133
1133
|
const o = O("AIAvatar");
|
|
1134
1134
|
return l(), d("div", bt, [
|
|
1135
1135
|
i("div", kt, [
|
|
1136
|
-
|
|
1136
|
+
z(o, {
|
|
1137
1137
|
size: 56,
|
|
1138
1138
|
pulse: !0
|
|
1139
1139
|
}),
|
|
@@ -1143,7 +1143,7 @@ function Nt(t, e, n, a, r, s) {
|
|
|
1143
1143
|
n.unreadThreads.length ? (l(), d("div", St, [
|
|
1144
1144
|
e[3] || (e[3] = i("div", { class: "wm-onb__section-title" }, "Messages non lus", -1)),
|
|
1145
1145
|
i("div", xt, [
|
|
1146
|
-
(l(!0), d(M, null,
|
|
1146
|
+
(l(!0), d(M, null, $(n.unreadThreads, (c) => (l(), d("button", {
|
|
1147
1147
|
key: c.id,
|
|
1148
1148
|
type: "button",
|
|
1149
1149
|
class: "wm-onb__link wm-onb__resume",
|
|
@@ -1192,7 +1192,7 @@ function Nt(t, e, n, a, r, s) {
|
|
|
1192
1192
|
n.quickLinks.length ? (l(), d("div", Et, [
|
|
1193
1193
|
e[5] || (e[5] = i("div", { class: "wm-onb__section-title" }, "Accès rapide", -1)),
|
|
1194
1194
|
i("div", Bt, [
|
|
1195
|
-
(l(!0), d(M, null,
|
|
1195
|
+
(l(!0), d(M, null, $(n.quickLinks, (c, v) => (l(), d("button", {
|
|
1196
1196
|
key: v,
|
|
1197
1197
|
type: "button",
|
|
1198
1198
|
class: "wm-onb__link",
|
|
@@ -1366,11 +1366,11 @@ function an(t, e, n, a, r, s) {
|
|
|
1366
1366
|
}, [
|
|
1367
1367
|
i("polyline", { points: "20 6 9 17 4 12" })
|
|
1368
1368
|
]),
|
|
1369
|
-
|
|
1369
|
+
re(" Envoyé ")
|
|
1370
1370
|
], -1))
|
|
1371
1371
|
]),
|
|
1372
1372
|
i("div", sn, [
|
|
1373
|
-
(l(!0), d(M, null,
|
|
1373
|
+
(l(!0), d(M, null, $(s.fields, (o, c) => (l(), d("div", {
|
|
1374
1374
|
key: c,
|
|
1375
1375
|
class: "wm-art__field"
|
|
1376
1376
|
}, [
|
|
@@ -1431,7 +1431,7 @@ function yn(t, e, n, a, r, s) {
|
|
|
1431
1431
|
]),
|
|
1432
1432
|
s.hasBody ? (l(), d("div", _n, [
|
|
1433
1433
|
n.data.body ? (l(), d("div", vn, b(n.data.body), 1)) : y("", !0),
|
|
1434
|
-
s.fields.length ? (l(!0), d(M, { key: 1 },
|
|
1434
|
+
s.fields.length ? (l(!0), d(M, { key: 1 }, $(s.fields, (o, c) => (l(), d("div", {
|
|
1435
1435
|
key: c,
|
|
1436
1436
|
class: "wm-art__field"
|
|
1437
1437
|
}, [
|
|
@@ -1519,13 +1519,13 @@ function Ln(t, e, n, a, r, s) {
|
|
|
1519
1519
|
class: "wm-tk__dot",
|
|
1520
1520
|
"aria-hidden": "true"
|
|
1521
1521
|
}, null, -1)),
|
|
1522
|
-
|
|
1522
|
+
re(" " + b(n.data.status.label), 1)
|
|
1523
1523
|
], 2)
|
|
1524
1524
|
]),
|
|
1525
1525
|
n.data.body ? (l(), d("div", Tn, b(n.data.body), 1)) : y("", !0)
|
|
1526
1526
|
]),
|
|
1527
1527
|
s.fields.length ? (l(), d("div", In, [
|
|
1528
|
-
(l(!0), d(M, null,
|
|
1528
|
+
(l(!0), d(M, null, $(s.fields, (o, c) => (l(), d("div", {
|
|
1529
1529
|
key: c,
|
|
1530
1530
|
class: "wm-art__field"
|
|
1531
1531
|
}, [
|
|
@@ -1613,7 +1613,7 @@ const Rn = /* @__PURE__ */ B(kn, [["render", Ln], ["__scopeId", "data-v-97001af0
|
|
|
1613
1613
|
}
|
|
1614
1614
|
};
|
|
1615
1615
|
function jn(t, e, n, a, r, s) {
|
|
1616
|
-
return s.component ? (l(),
|
|
1616
|
+
return s.component ? (l(), R(Me(s.component), {
|
|
1617
1617
|
key: 0,
|
|
1618
1618
|
data: n.artifact.data
|
|
1619
1619
|
}, null, 8, ["data"])) : y("", !0);
|
|
@@ -1747,7 +1747,7 @@ function Qn(t) {
|
|
|
1747
1747
|
return /^(https?:\/\/|mailto:|tel:)/i.test(String(t).trim());
|
|
1748
1748
|
}
|
|
1749
1749
|
const _e = "";
|
|
1750
|
-
function
|
|
1750
|
+
function ee(t) {
|
|
1751
1751
|
let e = t;
|
|
1752
1752
|
const n = [];
|
|
1753
1753
|
return e = e.replace(/`([^`\n]+)`/g, (a, r) => {
|
|
@@ -1781,7 +1781,7 @@ function Zn(t) {
|
|
|
1781
1781
|
if (!S) break;
|
|
1782
1782
|
C.push(S[1]), a++;
|
|
1783
1783
|
}
|
|
1784
|
-
const w = C.map((S) => `<li>${
|
|
1784
|
+
const w = C.map((S) => `<li>${ee(S)}</li>`).join("");
|
|
1785
1785
|
n.push({ type: "block", html: `<ul class="wm-md-ul">${w}</ul>` });
|
|
1786
1786
|
continue;
|
|
1787
1787
|
}
|
|
@@ -1793,8 +1793,8 @@ function Zn(t) {
|
|
|
1793
1793
|
if (!A) break;
|
|
1794
1794
|
w.push(A[1]), a++;
|
|
1795
1795
|
}
|
|
1796
|
-
const S = w.map((A) => `<li>${
|
|
1797
|
-
n.push({ type: "block", html: `<ol class="wm-md-ol"${
|
|
1796
|
+
const S = w.map((A) => `<li>${ee(A)}</li>`).join(""), F = C !== 1 ? ` start="${C}"` : "";
|
|
1797
|
+
n.push({ type: "block", html: `<ol class="wm-md-ol"${F}>${S}</ol>` });
|
|
1798
1798
|
continue;
|
|
1799
1799
|
}
|
|
1800
1800
|
const v = /^(#{1,6})\s+(.*)$/.exec(s);
|
|
@@ -1802,11 +1802,11 @@ function Zn(t) {
|
|
|
1802
1802
|
const C = v[1].length;
|
|
1803
1803
|
n.push({
|
|
1804
1804
|
type: "block",
|
|
1805
|
-
html: `<h${C} class="wm-md-h wm-md-h${C}">${
|
|
1805
|
+
html: `<h${C} class="wm-md-h wm-md-h${C}">${ee(v[2])}</h${C}>`
|
|
1806
1806
|
}), a++;
|
|
1807
1807
|
continue;
|
|
1808
1808
|
}
|
|
1809
|
-
n.push({ type: "text", html:
|
|
1809
|
+
n.push({ type: "text", html: ee(s) }), a++;
|
|
1810
1810
|
}
|
|
1811
1811
|
let r = "";
|
|
1812
1812
|
for (let s = 0; s < n.length; s++) {
|
|
@@ -1849,7 +1849,7 @@ function as(t, e, n, a, r, s) {
|
|
|
1849
1849
|
])]);
|
|
1850
1850
|
}
|
|
1851
1851
|
const os = /* @__PURE__ */ B(rs, [["render", as], ["__scopeId", "data-v-df2447fd"]]);
|
|
1852
|
-
function
|
|
1852
|
+
function te(t) {
|
|
1853
1853
|
return t ? t.client_msg_id || t.id : "";
|
|
1854
1854
|
}
|
|
1855
1855
|
const ls = {
|
|
@@ -1861,7 +1861,7 @@ const ls = {
|
|
|
1861
1861
|
idle: "Conversation en pause"
|
|
1862
1862
|
}, cs = 80, ds = 200, us = {
|
|
1863
1863
|
name: "WmMessageList",
|
|
1864
|
-
components: { AIAvatar:
|
|
1864
|
+
components: { AIAvatar: J, HumanAvatar: ke, Bubble: ss, Typing: os, ActionResult: Qt, AttachmentPreview: Jn, ArtifactRenderer: Un },
|
|
1865
1865
|
props: {
|
|
1866
1866
|
messages: { type: Array, default: () => [] },
|
|
1867
1867
|
streamingActive: { type: Boolean, default: !1 },
|
|
@@ -1902,7 +1902,7 @@ const ls = {
|
|
|
1902
1902
|
if (((e = s == null ? void 0 : s.payload) == null ? void 0 : e.event) === "action_admin_pending") {
|
|
1903
1903
|
const C = t[t.length - 1];
|
|
1904
1904
|
C && C.role === "ai" ? C.messages.push(s) : t.push({
|
|
1905
|
-
key: `g-${
|
|
1905
|
+
key: `g-${te(s)}`,
|
|
1906
1906
|
role: "ai",
|
|
1907
1907
|
agentName: "",
|
|
1908
1908
|
agentAvatarUrl: null,
|
|
@@ -1912,7 +1912,7 @@ const ls = {
|
|
|
1912
1912
|
continue;
|
|
1913
1913
|
}
|
|
1914
1914
|
t.push({
|
|
1915
|
-
key: `sys-${
|
|
1915
|
+
key: `sys-${te(s)}`,
|
|
1916
1916
|
role: o,
|
|
1917
1917
|
messages: [s],
|
|
1918
1918
|
items: [],
|
|
@@ -1922,7 +1922,7 @@ const ls = {
|
|
|
1922
1922
|
}
|
|
1923
1923
|
const c = t[t.length - 1];
|
|
1924
1924
|
c && c.role === o && (o === "ai" || c.agentName === (((n = s == null ? void 0 : s.author) == null ? void 0 : n.name) || "")) ? c.messages.push(s) : t.push({
|
|
1925
|
-
key: `g-${
|
|
1925
|
+
key: `g-${te(s)}`,
|
|
1926
1926
|
role: o,
|
|
1927
1927
|
agentName: ((a = s == null ? void 0 : s.author) == null ? void 0 : a.name) || "",
|
|
1928
1928
|
agentAvatarUrl: ((r = s == null ? void 0 : s.author) == null ? void 0 : r.avatar_url) || null,
|
|
@@ -1966,7 +1966,7 @@ const ls = {
|
|
|
1966
1966
|
this._lastSeenConvId = this.conversationId, this.scrollToBottom();
|
|
1967
1967
|
},
|
|
1968
1968
|
methods: {
|
|
1969
|
-
messageKey:
|
|
1969
|
+
messageKey: te,
|
|
1970
1970
|
isAtBottom(t) {
|
|
1971
1971
|
return t.scrollHeight - t.scrollTop - t.clientHeight <= cs;
|
|
1972
1972
|
},
|
|
@@ -2133,10 +2133,9 @@ const ls = {
|
|
|
2133
2133
|
// they're the last item of the cluster — BL for ai/human, BR for
|
|
2134
2134
|
// user.
|
|
2135
2135
|
cornersFor(t, e) {
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
return o ? (w && (x = v, (L || A && a.top === "bubble") && (N = v)), S && (U = v, (A || L && a.bottom === "bubble") && (F = v)), !S && a.bottom === "bubble" && (U = v)) : (w && (N = v, (L || A && a.top === "bubble") && (x = v)), S && (F = v, (A || L && a.bottom === "bubble") && (U = v)), !S && a.bottom === "bubble" && (F = v)), { tl: N, tr: x, br: U, bl: F };
|
|
2136
|
+
const n = t.items, a = t.role === "user", r = 14, s = 4, o = !!n[e - 1], c = !!n[e + 1];
|
|
2137
|
+
let v = r, C = r, w = r, S = r;
|
|
2138
|
+
return a ? (o && (C = s, v = s), c && (w = s, S = s), c || (w = s)) : (o && (v = s, C = s), c && (S = s, w = s), c || (S = s)), { tl: v, tr: C, br: w, bl: S };
|
|
2140
2139
|
},
|
|
2141
2140
|
// Inline style emitting the four corner CSS variables. Set on
|
|
2142
2141
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -2230,7 +2229,7 @@ const ls = {
|
|
|
2230
2229
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
2231
2230
|
}, Ss = { class: "wm-list__avatarSlot" };
|
|
2232
2231
|
function xs(t, e, n, a, r, s) {
|
|
2233
|
-
const o = O("AIAvatar"), c = O("HumanAvatar"), v = O("ActionResult"), C = O("ArtifactRenderer"), w = O("Bubble"), S = O("AttachmentPreview"),
|
|
2232
|
+
const o = O("AIAvatar"), c = O("HumanAvatar"), v = O("ActionResult"), C = O("ArtifactRenderer"), w = O("Bubble"), S = O("AttachmentPreview"), F = O("Typing");
|
|
2234
2233
|
return l(), d("div", {
|
|
2235
2234
|
ref: "scrollEl",
|
|
2236
2235
|
class: E(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
@@ -2248,7 +2247,7 @@ function xs(t, e, n, a, r, s) {
|
|
|
2248
2247
|
i("span", ps, b(n.dateLabel), 1),
|
|
2249
2248
|
e[3] || (e[3] = i("div", { class: "wm-list__line" }, null, -1))
|
|
2250
2249
|
])) : y("", !0),
|
|
2251
|
-
(l(!0), d(M, null,
|
|
2250
|
+
(l(!0), d(M, null, $(s.groups, (A, N) => (l(), d(M, {
|
|
2252
2251
|
key: A.key
|
|
2253
2252
|
}, [
|
|
2254
2253
|
A.key === s.unreadGroupKey ? (l(), d("div", _s, [...e[4] || (e[4] = [
|
|
@@ -2264,18 +2263,18 @@ function xs(t, e, n, a, r, s) {
|
|
|
2264
2263
|
i("span", gs, b(A.systemLabel), 1),
|
|
2265
2264
|
e[6] || (e[6] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
2266
2265
|
])) : (l(), d(M, { key: 1 }, [
|
|
2267
|
-
(l(!0), d(M, null,
|
|
2266
|
+
(l(!0), d(M, null, $(A.items, (x, D) => (l(), d("div", {
|
|
2268
2267
|
key: `${s.messageKey(x.message)}-${x.partKey}`,
|
|
2269
2268
|
class: E(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x.message._pending, "is-failed": x.message._failed }]]),
|
|
2270
|
-
style:
|
|
2269
|
+
style: V(s.cornersStyle(A, D))
|
|
2271
2270
|
}, [
|
|
2272
2271
|
A.role !== "user" ? (l(), d("div", ys, [
|
|
2273
|
-
|
|
2274
|
-
A.role === "ai" ? (l(),
|
|
2272
|
+
D === A.items.length - 1 ? (l(), d(M, { key: 0 }, [
|
|
2273
|
+
A.role === "ai" ? (l(), R(o, {
|
|
2275
2274
|
key: 0,
|
|
2276
2275
|
size: 26,
|
|
2277
2276
|
tail: !0
|
|
2278
|
-
})) : (l(),
|
|
2277
|
+
})) : (l(), R(c, {
|
|
2279
2278
|
key: 1,
|
|
2280
2279
|
name: A.agentName,
|
|
2281
2280
|
"avatar-url": A.agentAvatarUrl,
|
|
@@ -2283,24 +2282,24 @@ function xs(t, e, n, a, r, s) {
|
|
|
2283
2282
|
}, null, 8, ["name", "avatar-url"]))
|
|
2284
2283
|
], 64)) : y("", !0)
|
|
2285
2284
|
])) : y("", !0),
|
|
2286
|
-
x.renderAs === "action" ? (l(),
|
|
2285
|
+
x.renderAs === "action" ? (l(), R(v, {
|
|
2287
2286
|
key: 1,
|
|
2288
2287
|
state: x.message.payload.state,
|
|
2289
2288
|
label: s.actionLabel(x.message),
|
|
2290
2289
|
detail: s.actionDetail(x.message)
|
|
2291
|
-
}, null, 8, ["state", "label", "detail"])) : x.renderAs === "admin-pending" ? (l(),
|
|
2290
|
+
}, null, 8, ["state", "label", "detail"])) : x.renderAs === "admin-pending" ? (l(), R(v, {
|
|
2292
2291
|
key: 2,
|
|
2293
2292
|
state: "awaiting",
|
|
2294
2293
|
label: "Demande d'approbation envoyée",
|
|
2295
2294
|
detail: x.message.text_md || ""
|
|
2296
|
-
}, null, 8, ["detail"])) : x.renderAs === "artifact-of-action" ? (l(),
|
|
2295
|
+
}, null, 8, ["detail"])) : x.renderAs === "artifact-of-action" ? (l(), R(C, {
|
|
2297
2296
|
key: 3,
|
|
2298
2297
|
artifact: s.actionArtifact(x.message)
|
|
2299
|
-
}, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(),
|
|
2298
|
+
}, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(), R(C, {
|
|
2300
2299
|
key: 4,
|
|
2301
2300
|
artifact: s.artifactOf(x.message)
|
|
2302
2301
|
}, null, 8, ["artifact"])) : (l(), d("div", ws, [
|
|
2303
|
-
x.message.text_md ? (l(),
|
|
2302
|
+
x.message.text_md ? (l(), R(w, {
|
|
2304
2303
|
key: 0,
|
|
2305
2304
|
role: A.role,
|
|
2306
2305
|
text: x.message.text_md
|
|
@@ -2309,9 +2308,9 @@ function xs(t, e, n, a, r, s) {
|
|
|
2309
2308
|
key: 1,
|
|
2310
2309
|
class: E(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
|
|
2311
2310
|
}, [
|
|
2312
|
-
(l(!0), d(M, null,
|
|
2311
|
+
(l(!0), d(M, null, $(s.attachmentsOf(x.message), (j, P) => (l(), R(S, {
|
|
2313
2312
|
key: `${s.messageKey(x.message)}-att-${P}`,
|
|
2314
|
-
attachment:
|
|
2313
|
+
attachment: j
|
|
2315
2314
|
}, null, 8, ["attachment"]))), 128))
|
|
2316
2315
|
], 2)) : y("", !0)
|
|
2317
2316
|
]))
|
|
@@ -2329,16 +2328,16 @@ function xs(t, e, n, a, r, s) {
|
|
|
2329
2328
|
], 64))), 128)),
|
|
2330
2329
|
n.streamingActive ? (l(), d("div", As, [
|
|
2331
2330
|
i("div", Ss, [
|
|
2332
|
-
|
|
2331
|
+
z(o, {
|
|
2333
2332
|
size: 26,
|
|
2334
2333
|
tail: !0
|
|
2335
2334
|
})
|
|
2336
2335
|
]),
|
|
2337
|
-
|
|
2336
|
+
z(F)
|
|
2338
2337
|
])) : y("", !0)
|
|
2339
2338
|
], 34);
|
|
2340
2339
|
}
|
|
2341
|
-
const Ms = /* @__PURE__ */ B(us, [["render", xs], ["__scopeId", "data-v-
|
|
2340
|
+
const Ms = /* @__PURE__ */ B(us, [["render", xs], ["__scopeId", "data-v-5374b236"]]), ne = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
2342
2341
|
function Ts() {
|
|
2343
2342
|
return he && [
|
|
2344
2343
|
"video/webm;codecs=vp9,opus",
|
|
@@ -2363,7 +2362,7 @@ function Ni(t) {
|
|
|
2363
2362
|
return t ? t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : "file" : "file";
|
|
2364
2363
|
}
|
|
2365
2364
|
async function Is() {
|
|
2366
|
-
if (!
|
|
2365
|
+
if (!ne) return null;
|
|
2367
2366
|
let t;
|
|
2368
2367
|
try {
|
|
2369
2368
|
t = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !1 }));
|
|
@@ -2392,7 +2391,7 @@ async function Os(t) {
|
|
|
2392
2391
|
}
|
|
2393
2392
|
async function Es(t = {}) {
|
|
2394
2393
|
var C;
|
|
2395
|
-
if (!
|
|
2394
|
+
if (!ne || !he) return null;
|
|
2396
2395
|
let e;
|
|
2397
2396
|
try {
|
|
2398
2397
|
e = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !0 }));
|
|
@@ -2414,11 +2413,11 @@ async function Es(t = {}) {
|
|
|
2414
2413
|
w.data && w.data.size > 0 && r.push(w.data);
|
|
2415
2414
|
}), a.addEventListener("stop", () => {
|
|
2416
2415
|
var w, S;
|
|
2417
|
-
if (s && clearInterval(s), e.getTracks().forEach((
|
|
2418
|
-
|
|
2416
|
+
if (s && clearInterval(s), e.getTracks().forEach((F) => {
|
|
2417
|
+
F.stop();
|
|
2419
2418
|
}), r.length) {
|
|
2420
|
-
const
|
|
2421
|
-
(w = t.onfinalize) == null || w.call(t,
|
|
2419
|
+
const F = a.mimeType || n || "video/webm", A = new Blob(r, { type: F }), N = /mp4/.test(F) ? "mp4" : "webm", x = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), D = new File([A], `ecran-${x}.${N}`, { type: F });
|
|
2420
|
+
(w = t.onfinalize) == null || w.call(t, D);
|
|
2422
2421
|
} else
|
|
2423
2422
|
(S = t.oncancel) == null || S.call(t);
|
|
2424
2423
|
}), e.getVideoTracks().forEach((w) => {
|
|
@@ -2492,7 +2491,7 @@ const Bs = [
|
|
|
2492
2491
|
attachItems() {
|
|
2493
2492
|
return Bs.map((t) => ({
|
|
2494
2493
|
...t,
|
|
2495
|
-
disabled: t.action === "screenshot" && !
|
|
2494
|
+
disabled: t.action === "screenshot" && !ne || t.action === "record" && (!ne || !he)
|
|
2496
2495
|
}));
|
|
2497
2496
|
},
|
|
2498
2497
|
recordingElapsedLabel() {
|
|
@@ -2622,7 +2621,7 @@ function Ws(t, e, n, a, r, s) {
|
|
|
2622
2621
|
])) : y("", !0),
|
|
2623
2622
|
i("form", {
|
|
2624
2623
|
class: E(["wm-compose", { "has-attach": r.attachOpen }]),
|
|
2625
|
-
onSubmit: e[7] || (e[7] =
|
|
2624
|
+
onSubmit: e[7] || (e[7] = Y((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
|
|
2626
2625
|
}, [
|
|
2627
2626
|
i("input", {
|
|
2628
2627
|
ref: "fileEl",
|
|
@@ -2637,7 +2636,7 @@ function Ws(t, e, n, a, r, s) {
|
|
|
2637
2636
|
onClick: e[2] || (e[2] = (o) => r.attachOpen = !1)
|
|
2638
2637
|
})) : y("", !0),
|
|
2639
2638
|
r.attachOpen ? (l(), d("div", js, [
|
|
2640
|
-
(l(!0), d(M, null,
|
|
2639
|
+
(l(!0), d(M, null, $(s.attachItems, (o) => (l(), d("button", {
|
|
2641
2640
|
key: o.action,
|
|
2642
2641
|
type: "button",
|
|
2643
2642
|
class: "wm-compose__menuItem",
|
|
@@ -2659,7 +2658,7 @@ function Ws(t, e, n, a, r, s) {
|
|
|
2659
2658
|
i("span", null, b(o.label), 1)
|
|
2660
2659
|
], 8, Us))), 128))
|
|
2661
2660
|
])) : y("", !0),
|
|
2662
|
-
|
|
2661
|
+
H(i("textarea", {
|
|
2663
2662
|
ref: "inputEl",
|
|
2664
2663
|
"onUpdate:modelValue": e[3] || (e[3] = (o) => r.local = o),
|
|
2665
2664
|
class: "wm-compose__input",
|
|
@@ -2669,7 +2668,7 @@ function Ws(t, e, n, a, r, s) {
|
|
|
2669
2668
|
onKeydown: e[4] || (e[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
|
|
2670
2669
|
onInput: e[5] || (e[5] = (...o) => s.autosize && s.autosize(...o))
|
|
2671
2670
|
}, null, 40, Hs), [
|
|
2672
|
-
[
|
|
2671
|
+
[G, r.local]
|
|
2673
2672
|
]),
|
|
2674
2673
|
i("div", zs, [
|
|
2675
2674
|
i("button", {
|
|
@@ -2741,18 +2740,18 @@ function Js(t, e, n, a, r, s) {
|
|
|
2741
2740
|
key: s.batchKey,
|
|
2742
2741
|
class: "wm-chips"
|
|
2743
2742
|
}, [
|
|
2744
|
-
(l(!0), d(M, null,
|
|
2743
|
+
(l(!0), d(M, null, $(n.items, (o, c) => (l(), d("button", {
|
|
2745
2744
|
key: c,
|
|
2746
2745
|
type: "button",
|
|
2747
2746
|
class: "wm-chip",
|
|
2748
|
-
style:
|
|
2747
|
+
style: V({ animationDelay: n.baseDelay + c * n.stepDelay + "ms" }),
|
|
2749
2748
|
onClick: (v) => t.$emit("select", o)
|
|
2750
2749
|
}, b(o.label), 13, Ys))), 128))
|
|
2751
2750
|
])) : y("", !0);
|
|
2752
2751
|
}
|
|
2753
2752
|
const Xs = /* @__PURE__ */ B(Ks, [["render", Js], ["__scopeId", "data-v-55aa529d"]]), Qs = {
|
|
2754
2753
|
name: "WmApprovalCard",
|
|
2755
|
-
components: { AIAvatar:
|
|
2754
|
+
components: { AIAvatar: J },
|
|
2756
2755
|
props: {
|
|
2757
2756
|
action: { type: String, required: !0 },
|
|
2758
2757
|
detail: { type: String, default: "" },
|
|
@@ -2792,7 +2791,7 @@ function ar(t, e, n, a, r, s) {
|
|
|
2792
2791
|
return l(), d("div", Zs, [
|
|
2793
2792
|
i("div", er, [
|
|
2794
2793
|
i("div", tr, [
|
|
2795
|
-
|
|
2794
|
+
z(o, { size: 24 })
|
|
2796
2795
|
]),
|
|
2797
2796
|
i("div", nr, [
|
|
2798
2797
|
i("div", sr, b(n.action), 1),
|
|
@@ -2827,7 +2826,7 @@ const lr = /* @__PURE__ */ new Set([
|
|
|
2827
2826
|
"date"
|
|
2828
2827
|
]), cr = {
|
|
2829
2828
|
name: "WmFormCard",
|
|
2830
|
-
components: { AIAvatar:
|
|
2829
|
+
components: { AIAvatar: J },
|
|
2831
2830
|
props: {
|
|
2832
2831
|
form: { type: Object, required: !0 },
|
|
2833
2832
|
readOnly: { type: Boolean, default: !1 },
|
|
@@ -2931,7 +2930,7 @@ function Lr(t, e, n, a, r, s) {
|
|
|
2931
2930
|
return l(), d("div", dr, [
|
|
2932
2931
|
i("div", ur, [
|
|
2933
2932
|
i("div", hr, [
|
|
2934
|
-
|
|
2933
|
+
z(o, { size: 24 })
|
|
2935
2934
|
]),
|
|
2936
2935
|
i("div", mr, [
|
|
2937
2936
|
i("div", fr, b(n.form.title || "Formulaire"), 1),
|
|
@@ -2940,9 +2939,9 @@ function Lr(t, e, n, a, r, s) {
|
|
|
2940
2939
|
]),
|
|
2941
2940
|
i("form", {
|
|
2942
2941
|
class: "wm-form__body",
|
|
2943
|
-
onSubmit: e[0] || (e[0] =
|
|
2942
|
+
onSubmit: e[0] || (e[0] = Y((...c) => s.onSubmit && s.onSubmit(...c), ["prevent"]))
|
|
2944
2943
|
}, [
|
|
2945
|
-
(l(!0), d(M, null,
|
|
2944
|
+
(l(!0), d(M, null, $(s.normalizedFields, (c) => (l(), d("div", {
|
|
2946
2945
|
key: c.key,
|
|
2947
2946
|
class: "wm-form__field"
|
|
2948
2947
|
}, [
|
|
@@ -2950,10 +2949,10 @@ function Lr(t, e, n, a, r, s) {
|
|
|
2950
2949
|
for: `wm-f-${r._uid}-${c.key}`,
|
|
2951
2950
|
class: "wm-form__label"
|
|
2952
2951
|
}, [
|
|
2953
|
-
|
|
2952
|
+
re(b(c.label), 1),
|
|
2954
2953
|
c.required ? (l(), d("span", vr, "*")) : y("", !0)
|
|
2955
2954
|
], 8, _r),
|
|
2956
|
-
c.type === "text" ?
|
|
2955
|
+
c.type === "text" ? H((l(), d("input", {
|
|
2957
2956
|
key: 0,
|
|
2958
2957
|
id: `wm-f-${r._uid}-${c.key}`,
|
|
2959
2958
|
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
@@ -2963,8 +2962,8 @@ function Lr(t, e, n, a, r, s) {
|
|
|
2963
2962
|
required: c.required,
|
|
2964
2963
|
disabled: n.readOnly || r.busy
|
|
2965
2964
|
}, null, 8, gr)), [
|
|
2966
|
-
[
|
|
2967
|
-
]) : c.type === "textarea" ?
|
|
2965
|
+
[G, r.values[c.key]]
|
|
2966
|
+
]) : c.type === "textarea" ? H((l(), d("textarea", {
|
|
2968
2967
|
key: 1,
|
|
2969
2968
|
id: `wm-f-${r._uid}-${c.key}`,
|
|
2970
2969
|
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
@@ -2974,8 +2973,8 @@ function Lr(t, e, n, a, r, s) {
|
|
|
2974
2973
|
required: c.required,
|
|
2975
2974
|
disabled: n.readOnly || r.busy
|
|
2976
2975
|
}, null, 8, yr)), [
|
|
2977
|
-
[
|
|
2978
|
-
]) : c.type === "number" ?
|
|
2976
|
+
[G, r.values[c.key]]
|
|
2977
|
+
]) : c.type === "number" ? H((l(), d("input", {
|
|
2979
2978
|
key: 2,
|
|
2980
2979
|
id: `wm-f-${r._uid}-${c.key}`,
|
|
2981
2980
|
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
@@ -2986,12 +2985,12 @@ function Lr(t, e, n, a, r, s) {
|
|
|
2986
2985
|
disabled: n.readOnly || r.busy
|
|
2987
2986
|
}, null, 8, wr)), [
|
|
2988
2987
|
[
|
|
2989
|
-
|
|
2988
|
+
G,
|
|
2990
2989
|
r.values[c.key],
|
|
2991
2990
|
void 0,
|
|
2992
2991
|
{ number: !0 }
|
|
2993
2992
|
]
|
|
2994
|
-
]) : c.type === "date" ?
|
|
2993
|
+
]) : c.type === "date" ? H((l(), d("input", {
|
|
2995
2994
|
key: 3,
|
|
2996
2995
|
id: `wm-f-${r._uid}-${c.key}`,
|
|
2997
2996
|
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
@@ -3000,9 +2999,9 @@ function Lr(t, e, n, a, r, s) {
|
|
|
3000
2999
|
required: c.required,
|
|
3001
3000
|
disabled: n.readOnly || r.busy
|
|
3002
3001
|
}, null, 8, br)), [
|
|
3003
|
-
[
|
|
3002
|
+
[G, r.values[c.key]]
|
|
3004
3003
|
]) : c.type === "boolean" ? (l(), d("label", kr, [
|
|
3005
|
-
|
|
3004
|
+
H(i("input", {
|
|
3006
3005
|
id: `wm-f-${r._uid}-${c.key}`,
|
|
3007
3006
|
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
3008
3007
|
type: "checkbox",
|
|
@@ -3011,7 +3010,7 @@ function Lr(t, e, n, a, r, s) {
|
|
|
3011
3010
|
[Ie, r.values[c.key]]
|
|
3012
3011
|
]),
|
|
3013
3012
|
i("span", null, b(c.placeholder || "Oui"), 1)
|
|
3014
|
-
])) : c.type === "select" ?
|
|
3013
|
+
])) : c.type === "select" ? H((l(), d("select", {
|
|
3015
3014
|
key: 5,
|
|
3016
3015
|
id: `wm-f-${r._uid}-${c.key}`,
|
|
3017
3016
|
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
@@ -3020,14 +3019,14 @@ function Lr(t, e, n, a, r, s) {
|
|
|
3020
3019
|
disabled: n.readOnly || r.busy
|
|
3021
3020
|
}, [
|
|
3022
3021
|
i("option", Sr, b(c.placeholder || "Choisir…"), 1),
|
|
3023
|
-
(l(!0), d(M, null,
|
|
3022
|
+
(l(!0), d(M, null, $(c.options, (v) => (l(), d("option", {
|
|
3024
3023
|
key: v.value,
|
|
3025
3024
|
value: v.value
|
|
3026
3025
|
}, b(v.label), 9, xr))), 128))
|
|
3027
3026
|
], 8, Ar)), [
|
|
3028
3027
|
[Oe, r.values[c.key]]
|
|
3029
3028
|
]) : c.type === "multiselect" ? (l(), d("div", Mr, [
|
|
3030
|
-
(l(!0), d(M, null,
|
|
3029
|
+
(l(!0), d(M, null, $(c.options, (v) => (l(), d("label", {
|
|
3031
3030
|
key: v.value,
|
|
3032
3031
|
class: "wm-form__multiItem"
|
|
3033
3032
|
}, [
|
|
@@ -3091,7 +3090,7 @@ function zr(t, e, n, a, r, s) {
|
|
|
3091
3090
|
e[1] || (e[1] = i("div", { class: "wm-fb__title" }, "Comment s'est passée cette conversation ?", -1)),
|
|
3092
3091
|
e[2] || (e[2] = i("div", { class: "wm-fb__sub" }, "Votre avis nous aide à améliorer l'assistant.", -1)),
|
|
3093
3092
|
i("div", jr, [
|
|
3094
|
-
(l(!0), d(M, null,
|
|
3093
|
+
(l(!0), d(M, null, $(r.options, (o) => (l(), d("button", {
|
|
3095
3094
|
key: o.v,
|
|
3096
3095
|
type: "button",
|
|
3097
3096
|
class: E(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
|
|
@@ -3254,24 +3253,24 @@ function di(t, e, n, a, r, s) {
|
|
|
3254
3253
|
i("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
|
|
3255
3254
|
])
|
|
3256
3255
|
], -1)),
|
|
3257
|
-
|
|
3256
|
+
H(i("input", {
|
|
3258
3257
|
"onUpdate:modelValue": e[3] || (e[3] = (o) => r.query = o),
|
|
3259
3258
|
type: "text",
|
|
3260
3259
|
placeholder: "Rechercher dans vos messages",
|
|
3261
3260
|
"aria-label": "Rechercher dans vos messages"
|
|
3262
3261
|
}, null, 512), [
|
|
3263
|
-
[
|
|
3262
|
+
[G, r.query]
|
|
3264
3263
|
])
|
|
3265
3264
|
])
|
|
3266
3265
|
]),
|
|
3267
3266
|
i("div", Qr, [
|
|
3268
|
-
(l(!0), d(M, null,
|
|
3267
|
+
(l(!0), d(M, null, $(s.groups, (o) => (l(), d(M, {
|
|
3269
3268
|
key: o.key
|
|
3270
3269
|
}, [
|
|
3271
3270
|
o.items.length ? (l(), d("div", Zr, [
|
|
3272
3271
|
i("div", ei, b(o.label), 1),
|
|
3273
3272
|
i("div", ti, [
|
|
3274
|
-
(l(!0), d(M, null,
|
|
3273
|
+
(l(!0), d(M, null, $(o.items, (c) => (l(), d("button", {
|
|
3275
3274
|
key: c.id,
|
|
3276
3275
|
type: "button",
|
|
3277
3276
|
class: E(["wm-hd__row", {
|
|
@@ -3509,8 +3508,8 @@ function wi(t, e) {
|
|
|
3509
3508
|
if (s == null || s === "") continue;
|
|
3510
3509
|
let o;
|
|
3511
3510
|
if (Array.isArray(s)) {
|
|
3512
|
-
if (o = s.map((c) =>
|
|
3513
|
-
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o =
|
|
3511
|
+
if (o = s.map((c) => se(r, String(c))).join(", "), !o) continue;
|
|
3512
|
+
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = se(r, String(s));
|
|
3514
3513
|
a.push(`${r.label} :
|
|
3515
3514
|
${o}`);
|
|
3516
3515
|
}
|
|
@@ -3518,7 +3517,7 @@ ${o}`);
|
|
|
3518
3517
|
|
|
3519
3518
|
`);
|
|
3520
3519
|
}
|
|
3521
|
-
function
|
|
3520
|
+
function se(t, e) {
|
|
3522
3521
|
if (!Array.isArray(t == null ? void 0 : t.options)) return e;
|
|
3523
3522
|
const n = t.options.find((a) => (a == null ? void 0 : a.value) === e);
|
|
3524
3523
|
return (n == null ? void 0 : n.label) || e;
|
|
@@ -3531,8 +3530,8 @@ function bi(t, e) {
|
|
|
3531
3530
|
if (s == null || s === "") continue;
|
|
3532
3531
|
let o;
|
|
3533
3532
|
if (Array.isArray(s)) {
|
|
3534
|
-
if (o = s.map((v) =>
|
|
3535
|
-
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o =
|
|
3533
|
+
if (o = s.map((v) => se(r, String(v))).join(", "), !o) continue;
|
|
3534
|
+
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = se(r, String(s));
|
|
3536
3535
|
const c = r.type === "textarea" || typeof o == "string" && (o.length > 60 || o.includes(`
|
|
3537
3536
|
`));
|
|
3538
3537
|
n.push({ label: r.label, value: o, multiline: c });
|
|
@@ -4411,8 +4410,8 @@ const ki = 450, Ci = 50, Ai = 900, Si = 12e3, xi = 300, Mi = {
|
|
|
4411
4410
|
];
|
|
4412
4411
|
for (const w of e) {
|
|
4413
4412
|
if (!w) continue;
|
|
4414
|
-
const S = ((o = w.author) == null ? void 0 : o.name) || (((c = w.author) == null ? void 0 : c.type) === "user" ? "Vous" : ((v = w.author) == null ? void 0 : v.type) === "agent_human" ? "Agent" : ((C = w.author) == null ? void 0 : C.type) === "agent_ia" ? "Assistant IA" : "Système"),
|
|
4415
|
-
A && (n.push(`[${
|
|
4413
|
+
const S = ((o = w.author) == null ? void 0 : o.name) || (((c = w.author) == null ? void 0 : c.type) === "user" ? "Vous" : ((v = w.author) == null ? void 0 : v.type) === "agent_human" ? "Agent" : ((C = w.author) == null ? void 0 : C.type) === "agent_ia" ? "Assistant IA" : "Système"), F = w.created_at ? new Date(w.created_at).toLocaleString("fr-FR") : "", A = (w.text_md || "").trim();
|
|
4414
|
+
A && (n.push(`[${F}] ${S} :`), n.push(A), n.push(""));
|
|
4416
4415
|
}
|
|
4417
4416
|
const a = new Blob([n.join(`
|
|
4418
4417
|
`)], { type: "text/plain;charset=utf-8" });
|
|
@@ -4517,21 +4516,21 @@ const ki = 450, Ci = 50, Ai = 900, Si = 12e3, xi = 300, Mi = {
|
|
|
4517
4516
|
class: "wm-attached"
|
|
4518
4517
|
}, ji = ["onClick"];
|
|
4519
4518
|
function Ui(t, e, n, a, r, s) {
|
|
4520
|
-
const o = O("Launcher"), c = O("Header"), v = O("Onboarding"), C = O("MessageList"), w = O("ApprovalCard"), S = O("FormCard"),
|
|
4519
|
+
const o = O("Launcher"), c = O("Header"), v = O("Onboarding"), C = O("MessageList"), w = O("ApprovalCard"), S = O("FormCard"), F = O("Feedback"), A = O("SuggestionChips"), N = O("Composer"), x = O("MoreMenu"), D = O("HistoryDrawer");
|
|
4521
4520
|
return l(), d("div", {
|
|
4522
4521
|
class: E(["wm-root", `wm-root--${n.displayMode}`])
|
|
4523
4522
|
}, [
|
|
4524
|
-
!r.isOpen && !s.isEmbedded ? (l(),
|
|
4523
|
+
!r.isOpen && !s.isEmbedded ? (l(), R(o, {
|
|
4525
4524
|
key: 0,
|
|
4526
4525
|
"unread-count": s.unreadCount,
|
|
4527
4526
|
peek: s.launcherPeek,
|
|
4528
4527
|
onOpen: s.openFromPeek,
|
|
4529
|
-
onDismiss: e[0] || (e[0] = (
|
|
4528
|
+
onDismiss: e[0] || (e[0] = (j) => r.labelDismissed = !0)
|
|
4530
4529
|
}, null, 8, ["unread-count", "peek", "onOpen"])) : y("", !0),
|
|
4531
4530
|
r.isOpen || s.isEmbedded ? (l(), d("section", {
|
|
4532
4531
|
key: 1,
|
|
4533
4532
|
class: E(["wm-panel", `wm-panel--${n.displayMode}`]),
|
|
4534
|
-
style:
|
|
4533
|
+
style: V(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
|
|
4535
4534
|
role: "dialog",
|
|
4536
4535
|
"aria-label": "Messenger"
|
|
4537
4536
|
}, [
|
|
@@ -4541,7 +4540,7 @@ function Ui(t, e, n, a, r, s) {
|
|
|
4541
4540
|
type: "button",
|
|
4542
4541
|
class: "wm-loading__close",
|
|
4543
4542
|
"aria-label": "Réduire",
|
|
4544
|
-
onClick: e[1] || (e[1] = (...
|
|
4543
|
+
onClick: e[1] || (e[1] = (...j) => s.close && s.close(...j))
|
|
4545
4544
|
}, [...e[6] || (e[6] = [
|
|
4546
4545
|
i("svg", {
|
|
4547
4546
|
width: "13",
|
|
@@ -4562,7 +4561,7 @@ function Ui(t, e, n, a, r, s) {
|
|
|
4562
4561
|
"aria-hidden": "true"
|
|
4563
4562
|
}, null, -1))
|
|
4564
4563
|
])) : (l(), d(M, { key: 1 }, [
|
|
4565
|
-
|
|
4564
|
+
z(c, {
|
|
4566
4565
|
title: s.headerTitle,
|
|
4567
4566
|
escalated: s.isEscalated,
|
|
4568
4567
|
"agent-name": s.humanAgentName,
|
|
@@ -4600,7 +4599,7 @@ function Ui(t, e, n, a, r, s) {
|
|
|
4600
4599
|
])
|
|
4601
4600
|
])
|
|
4602
4601
|
])) : s.currentConv ? (l(), d(M, { key: 2 }, [
|
|
4603
|
-
|
|
4602
|
+
z(C, {
|
|
4604
4603
|
ref: "messageList",
|
|
4605
4604
|
messages: s.displayedMessages,
|
|
4606
4605
|
"streaming-active": s.streamingActive,
|
|
@@ -4613,22 +4612,22 @@ function Ui(t, e, n, a, r, s) {
|
|
|
4613
4612
|
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "onLoadMore"]),
|
|
4614
4613
|
i("div", Bi, [
|
|
4615
4614
|
s.floatVisible ? (l(), d("div", Li, [
|
|
4616
|
-
s.approvalReady ? (l(),
|
|
4615
|
+
s.approvalReady ? (l(), R(w, {
|
|
4617
4616
|
key: 0,
|
|
4618
4617
|
action: s.approvalTitle,
|
|
4619
4618
|
detail: s.approvalDetail,
|
|
4620
4619
|
callbacks: s.pendingApproval.callbacks,
|
|
4621
4620
|
onCallback: s.onApprovalCallback
|
|
4622
|
-
}, null, 8, ["action", "detail", "callbacks", "onCallback"])) : s.pendingForm ? (l(),
|
|
4621
|
+
}, null, 8, ["action", "detail", "callbacks", "onCallback"])) : s.pendingForm ? (l(), R(S, {
|
|
4623
4622
|
key: s.pendingForm.message && s.pendingForm.message.id,
|
|
4624
4623
|
form: s.pendingForm.form,
|
|
4625
4624
|
onSubmit: s.onFormSubmit
|
|
4626
|
-
}, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (l(),
|
|
4625
|
+
}, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (l(), R(F, {
|
|
4627
4626
|
key: 2,
|
|
4628
4627
|
busy: r.feedbackBusy,
|
|
4629
4628
|
done: r.feedbackDone,
|
|
4630
4629
|
onSubmit: s.onFeedback
|
|
4631
|
-
}, null, 8, ["busy", "done", "onSubmit"])) : (l(),
|
|
4630
|
+
}, null, 8, ["busy", "done", "onSubmit"])) : (l(), R(A, {
|
|
4632
4631
|
key: 3,
|
|
4633
4632
|
items: s.suggestions,
|
|
4634
4633
|
onSelect: s.onSuggestion
|
|
@@ -4640,11 +4639,11 @@ function Ui(t, e, n, a, r, s) {
|
|
|
4640
4639
|
"aria-hidden": "true"
|
|
4641
4640
|
}, null, -1)),
|
|
4642
4641
|
i("span", $i, b(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
|
|
4643
|
-
])) : (l(),
|
|
4642
|
+
])) : (l(), R(N, {
|
|
4644
4643
|
key: 2,
|
|
4645
4644
|
ref: "composer",
|
|
4646
4645
|
modelValue: r.draft,
|
|
4647
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
4646
|
+
"onUpdate:modelValue": e[2] || (e[2] = (j) => r.draft = j),
|
|
4648
4647
|
placeholder: s.composerPlaceholder,
|
|
4649
4648
|
disabled: !!s.pendingApproval,
|
|
4650
4649
|
"attach-label": "Joindre un fichier",
|
|
@@ -4652,7 +4651,7 @@ function Ui(t, e, n, a, r, s) {
|
|
|
4652
4651
|
onAttach: s.onAttach
|
|
4653
4652
|
}, null, 8, ["modelValue", "placeholder", "disabled", "onSend", "onAttach"]))
|
|
4654
4653
|
]),
|
|
4655
|
-
r.moreOpen ? (l(),
|
|
4654
|
+
r.moreOpen ? (l(), R(x, {
|
|
4656
4655
|
key: 0,
|
|
4657
4656
|
"can-rename": !!s.currentConv,
|
|
4658
4657
|
"can-clear": !!s.currentConv,
|
|
@@ -4660,12 +4659,12 @@ function Ui(t, e, n, a, r, s) {
|
|
|
4660
4659
|
"notif-enabled": r.notifEnabled,
|
|
4661
4660
|
"status-url": s.statusUrl,
|
|
4662
4661
|
"help-url": s.helpUrl,
|
|
4663
|
-
onClose: e[3] || (e[3] = (
|
|
4662
|
+
onClose: e[3] || (e[3] = (j) => r.moreOpen = !1),
|
|
4664
4663
|
onNotifToggle: s.onNotifToggle,
|
|
4665
4664
|
onAction: s.onMoreAction
|
|
4666
4665
|
}, null, 8, ["can-rename", "can-clear", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0),
|
|
4667
4666
|
r.pendingAttachments.length ? (l(), d("div", Fi, [
|
|
4668
|
-
(l(!0), d(M, null,
|
|
4667
|
+
(l(!0), d(M, null, $(r.pendingAttachments, (j, P) => (l(), d("div", {
|
|
4669
4668
|
key: P,
|
|
4670
4669
|
class: "wm-attached__chip"
|
|
4671
4670
|
}, [
|
|
@@ -4682,11 +4681,11 @@ function Ui(t, e, n, a, r, s) {
|
|
|
4682
4681
|
}, [
|
|
4683
4682
|
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" })
|
|
4684
4683
|
], -1)),
|
|
4685
|
-
i("span", null, b(
|
|
4684
|
+
i("span", null, b(j.name), 1),
|
|
4686
4685
|
i("button", {
|
|
4687
4686
|
type: "button",
|
|
4688
4687
|
"aria-label": "Retirer",
|
|
4689
|
-
onClick: (
|
|
4688
|
+
onClick: (X) => r.pendingAttachments.splice(P, 1)
|
|
4690
4689
|
}, [...e[11] || (e[11] = [
|
|
4691
4690
|
i("svg", {
|
|
4692
4691
|
width: "10",
|
|
@@ -4704,7 +4703,7 @@ function Ui(t, e, n, a, r, s) {
|
|
|
4704
4703
|
])], 8, ji)
|
|
4705
4704
|
]))), 128))
|
|
4706
4705
|
])) : y("", !0)
|
|
4707
|
-
], 64)) : (l(),
|
|
4706
|
+
], 64)) : (l(), R(v, {
|
|
4708
4707
|
key: 1,
|
|
4709
4708
|
"welcome-message": s.widgetWelcomeMessage,
|
|
4710
4709
|
"agent-name": s.agentName,
|
|
@@ -4715,15 +4714,15 @@ function Ui(t, e, n, a, r, s) {
|
|
|
4715
4714
|
onSelect: s.onQuickLink,
|
|
4716
4715
|
onResume: s.onDrawerPick
|
|
4717
4716
|
}, null, 8, ["welcome-message", "agent-name", "quick-links", "unread-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
4718
|
-
r.historyOpen ? (l(),
|
|
4717
|
+
r.historyOpen ? (l(), R(D, {
|
|
4719
4718
|
key: 3,
|
|
4720
4719
|
conversations: s.drawerConversations,
|
|
4721
4720
|
"active-id": s.currentConv ? s.currentConv.id : null,
|
|
4722
|
-
onClose: e[4] || (e[4] = (
|
|
4721
|
+
onClose: e[4] || (e[4] = (j) => r.historyOpen = !1),
|
|
4723
4722
|
onNew: s.onDrawerNew,
|
|
4724
4723
|
onPick: s.onDrawerPick
|
|
4725
4724
|
}, null, 8, ["conversations", "active-id", "onNew", "onPick"])) : y("", !0),
|
|
4726
|
-
r.moreOpen && !s.currentConv ? (l(),
|
|
4725
|
+
r.moreOpen && !s.currentConv ? (l(), R(x, {
|
|
4727
4726
|
key: 4,
|
|
4728
4727
|
"can-rename": !1,
|
|
4729
4728
|
"can-clear": !1,
|
|
@@ -4731,7 +4730,7 @@ function Ui(t, e, n, a, r, s) {
|
|
|
4731
4730
|
"notif-enabled": r.notifEnabled,
|
|
4732
4731
|
"status-url": s.statusUrl,
|
|
4733
4732
|
"help-url": s.helpUrl,
|
|
4734
|
-
onClose: e[5] || (e[5] = (
|
|
4733
|
+
onClose: e[5] || (e[5] = (j) => r.moreOpen = !1),
|
|
4735
4734
|
onNotifToggle: s.onNotifToggle,
|
|
4736
4735
|
onAction: s.onMoreAction
|
|
4737
4736
|
}, null, 8, ["notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0)
|
|
@@ -4739,9 +4738,9 @@ function Ui(t, e, n, a, r, s) {
|
|
|
4739
4738
|
], 6)) : y("", !0)
|
|
4740
4739
|
], 2);
|
|
4741
4740
|
}
|
|
4742
|
-
const Pi = /* @__PURE__ */ B(Mi, [["render", Ui], ["__scopeId", "data-v-8264e504"]]), Hi = "0.2.
|
|
4741
|
+
const Pi = /* @__PURE__ */ B(Mi, [["render", Ui], ["__scopeId", "data-v-8264e504"]]), Hi = "0.2.18";
|
|
4743
4742
|
export {
|
|
4744
|
-
|
|
4743
|
+
J as AIAvatar,
|
|
4745
4744
|
ce as AVATAR_COLORS,
|
|
4746
4745
|
Qt as ActionResult,
|
|
4747
4746
|
or as ApprovalCard,
|
|
@@ -4764,7 +4763,7 @@ export {
|
|
|
4764
4763
|
Pi as Messenger,
|
|
4765
4764
|
yi as MoreMenu,
|
|
4766
4765
|
Pt as Onboarding,
|
|
4767
|
-
|
|
4766
|
+
ne as SCREEN_CAPTURE_SUPPORTED,
|
|
4768
4767
|
Xs as SuggestionChips,
|
|
4769
4768
|
ot as TeamAvatars,
|
|
4770
4769
|
os as Typing,
|
|
@@ -4772,7 +4771,7 @@ export {
|
|
|
4772
4771
|
ye as avatarColor,
|
|
4773
4772
|
we as avatarInitials,
|
|
4774
4773
|
Is as captureScreenshotFile,
|
|
4775
|
-
|
|
4774
|
+
U as colors,
|
|
4776
4775
|
De as createStore,
|
|
4777
4776
|
$e as createTransport,
|
|
4778
4777
|
Pi as default,
|