@_solaris/messenger-widget 0.5.34 → 0.5.35
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/iframe/iframe.css +1 -1
- package/dist/iframe/iframe.js +7 -7
- package/dist/messenger.cjs +19 -19
- package/dist/messenger.js +226 -226
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as Ue, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as $, Transition as Ie, withCtx as Ee, Fragment as B, renderList as
|
|
1
|
+
import { reactive as Ue, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as $, Transition as Ie, withCtx as Ee, Fragment as B, renderList as U, withKeys as ue, withModifiers as G, createElementVNode as o, createCommentVNode as y, createBlock as P, withDirectives as V, vModelText as X, createTextVNode as ve, resolveDynamicComponent as De, renderSlot as je, vModelCheckbox as He, vModelSelect as ze, markRaw as Ce } from "vue";
|
|
2
2
|
const qe = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -36,9 +36,9 @@ function We(e) {
|
|
|
36
36
|
}
|
|
37
37
|
function i(d, f) {
|
|
38
38
|
const _ = t.listeners.get(d);
|
|
39
|
-
_ && _.forEach((
|
|
39
|
+
_ && _.forEach((b) => {
|
|
40
40
|
try {
|
|
41
|
-
|
|
41
|
+
b(f);
|
|
42
42
|
} catch (C) {
|
|
43
43
|
console.error("[transport] listener", d, C);
|
|
44
44
|
}
|
|
@@ -61,19 +61,19 @@ function We(e) {
|
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
async function a(d, f, _) {
|
|
64
|
-
const
|
|
64
|
+
const b = await fetch(`${t.baseUrl}${fe}${f}`, {
|
|
65
65
|
method: d,
|
|
66
66
|
credentials: "include",
|
|
67
67
|
headers: s(),
|
|
68
68
|
body: _ !== void 0 ? JSON.stringify(_) : void 0
|
|
69
69
|
});
|
|
70
|
-
if (!
|
|
71
|
-
const C = await l(
|
|
72
|
-
`HTTP ${
|
|
70
|
+
if (!b.ok) {
|
|
71
|
+
const C = await l(b), M = new Error(
|
|
72
|
+
`HTTP ${b.status} ${d} ${f} :: ${(C == null ? void 0 : C.error) || b.statusText}`
|
|
73
73
|
);
|
|
74
|
-
throw M.status =
|
|
74
|
+
throw M.status = b.status, M.body = C, M;
|
|
75
75
|
}
|
|
76
|
-
return
|
|
76
|
+
return b.status === 204 ? null : b.json();
|
|
77
77
|
}
|
|
78
78
|
async function l(d) {
|
|
79
79
|
try {
|
|
@@ -109,28 +109,28 @@ function We(e) {
|
|
|
109
109
|
}
|
|
110
110
|
);
|
|
111
111
|
if (!f.ok) {
|
|
112
|
-
const
|
|
113
|
-
`Session bootstrap failed: HTTP ${f.status} :: ${(
|
|
112
|
+
const I = await l(f), x = new Error(
|
|
113
|
+
`Session bootstrap failed: HTTP ${f.status} :: ${(I == null ? void 0 : I.error) || f.statusText}`
|
|
114
114
|
);
|
|
115
|
-
throw x.status = f.status, x.body =
|
|
115
|
+
throw x.status = f.status, x.body = I, x;
|
|
116
116
|
}
|
|
117
117
|
const _ = await f.json();
|
|
118
118
|
t.userId = _.external_id;
|
|
119
|
-
const [
|
|
119
|
+
const [b, C] = await Promise.all([
|
|
120
120
|
fetch(
|
|
121
121
|
`${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
|
|
122
122
|
{ credentials: "include" }
|
|
123
|
-
).then(async (
|
|
124
|
-
if (!
|
|
125
|
-
const x = await l(
|
|
123
|
+
).then(async (I) => {
|
|
124
|
+
if (!I.ok) {
|
|
125
|
+
const x = await l(I);
|
|
126
126
|
throw new Error(
|
|
127
|
-
`HTTP ${
|
|
127
|
+
`HTTP ${I.status} GET /widgets/:id/config :: ${(x == null ? void 0 : x.error) || I.statusText}`
|
|
128
128
|
);
|
|
129
129
|
}
|
|
130
|
-
return
|
|
130
|
+
return I.json();
|
|
131
131
|
}),
|
|
132
132
|
a("GET", "/customers/me")
|
|
133
|
-
]), M = { config:
|
|
133
|
+
]), M = { config: b, customer: (C == null ? void 0 : C.customer) ?? null };
|
|
134
134
|
return t.lastBootstrap = M, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
|
|
135
135
|
"visibilitychange",
|
|
136
136
|
t.visibilityHandler
|
|
@@ -140,14 +140,14 @@ function We(e) {
|
|
|
140
140
|
try {
|
|
141
141
|
const d = await E();
|
|
142
142
|
t.lastActivityAt = d.reduce((f, _) => {
|
|
143
|
-
const
|
|
144
|
-
return
|
|
143
|
+
const b = _ == null ? void 0 : _.last_message_at;
|
|
144
|
+
return b && (!f || b > f) ? b : f;
|
|
145
145
|
}, null);
|
|
146
146
|
} catch (d) {
|
|
147
147
|
console.error("[transport] initial /conversations failed", d);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
async function
|
|
150
|
+
async function w() {
|
|
151
151
|
const d = await a("GET", "/customers/me");
|
|
152
152
|
return (d == null ? void 0 : d.customer) ?? null;
|
|
153
153
|
}
|
|
@@ -175,23 +175,23 @@ function We(e) {
|
|
|
175
175
|
f
|
|
176
176
|
)).conversation;
|
|
177
177
|
}
|
|
178
|
-
async function
|
|
178
|
+
async function F(d, f) {
|
|
179
179
|
return a(
|
|
180
180
|
"PATCH",
|
|
181
181
|
`/conversations/${encodeURIComponent(d)}/read`,
|
|
182
182
|
{ message_id: f }
|
|
183
183
|
);
|
|
184
184
|
}
|
|
185
|
-
async function
|
|
185
|
+
async function L(d, f = {}) {
|
|
186
186
|
const _ = new URLSearchParams();
|
|
187
187
|
f.before && _.set("before", f.before), f.since && _.set("since", f.since), f.limit && _.set("limit", String(f.limit));
|
|
188
|
-
const
|
|
188
|
+
const b = _.toString() ? `?${_.toString()}` : "";
|
|
189
189
|
return a(
|
|
190
190
|
"GET",
|
|
191
|
-
`/conversations/${encodeURIComponent(d)}/messages${
|
|
191
|
+
`/conversations/${encodeURIComponent(d)}/messages${b}`
|
|
192
192
|
);
|
|
193
193
|
}
|
|
194
|
-
async function
|
|
194
|
+
async function z(d, f) {
|
|
195
195
|
se();
|
|
196
196
|
const _ = {
|
|
197
197
|
client_msg_id: f.client_msg_id,
|
|
@@ -214,9 +214,9 @@ function We(e) {
|
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
216
|
async function Z(d) {
|
|
217
|
-
const f = d.name || "attachment", _ = d.type || "application/octet-stream",
|
|
217
|
+
const f = d.name || "attachment", _ = d.type || "application/octet-stream", b = d.size || 0, C = await a("POST", "/attachments", {
|
|
218
218
|
mime_type: _,
|
|
219
|
-
size_bytes:
|
|
219
|
+
size_bytes: b,
|
|
220
220
|
name: f
|
|
221
221
|
}), M = await fetch(C.upload_url, {
|
|
222
222
|
method: "PUT",
|
|
@@ -229,7 +229,7 @@ function We(e) {
|
|
|
229
229
|
type: Ye(_),
|
|
230
230
|
path: C.path,
|
|
231
231
|
mime_type: _,
|
|
232
|
-
size_bytes:
|
|
232
|
+
size_bytes: b
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
235
|
async function ee(d) {
|
|
@@ -258,8 +258,8 @@ function We(e) {
|
|
|
258
258
|
}
|
|
259
259
|
function ne(d, f) {
|
|
260
260
|
try {
|
|
261
|
-
const _ = JSON.parse(f),
|
|
262
|
-
i(d,
|
|
261
|
+
const _ = JSON.parse(f), b = _ && typeof _ == "object" && "data" in _ ? _.data : _;
|
|
262
|
+
i(d, b);
|
|
263
263
|
} catch (_) {
|
|
264
264
|
console.error("[transport] bad SSE payload", d, _);
|
|
265
265
|
}
|
|
@@ -277,9 +277,9 @@ function We(e) {
|
|
|
277
277
|
}
|
|
278
278
|
async function me() {
|
|
279
279
|
try {
|
|
280
|
-
const d = await E(), f = d.reduce((
|
|
280
|
+
const d = await E(), f = d.reduce((b, C) => {
|
|
281
281
|
const M = C == null ? void 0 : C.last_message_at;
|
|
282
|
-
return M && (!
|
|
282
|
+
return M && (!b || M > b) ? M : b;
|
|
283
283
|
}, null);
|
|
284
284
|
f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), se());
|
|
285
285
|
} catch (d) {
|
|
@@ -317,15 +317,15 @@ function We(e) {
|
|
|
317
317
|
stop: g,
|
|
318
318
|
setPanelOpen: ce,
|
|
319
319
|
// REST
|
|
320
|
-
getCustomer:
|
|
320
|
+
getCustomer: w,
|
|
321
321
|
patchCustomer: T,
|
|
322
322
|
listConversations: E,
|
|
323
323
|
createConversation: A,
|
|
324
324
|
getConversation: H,
|
|
325
325
|
patchConversation: S,
|
|
326
|
-
markConversationRead:
|
|
327
|
-
listMessages:
|
|
328
|
-
postMessage:
|
|
326
|
+
markConversationRead: F,
|
|
327
|
+
listMessages: L,
|
|
328
|
+
postMessage: z,
|
|
329
329
|
postCallback: Y,
|
|
330
330
|
uploadAttachment: Z,
|
|
331
331
|
signAttachment: ee,
|
|
@@ -475,23 +475,23 @@ function Qe(e) {
|
|
|
475
475
|
async function p(h) {
|
|
476
476
|
const m = t.paginationByConv[h];
|
|
477
477
|
if (!(m != null && m.loaded || m != null && m.loading)) {
|
|
478
|
-
|
|
478
|
+
w(h, { nextCursor: null, loading: !0, loaded: !1 });
|
|
479
479
|
try {
|
|
480
480
|
const g = await e.listMessages(h, {
|
|
481
481
|
limit: l
|
|
482
482
|
}), d = (g == null ? void 0 : g.messages) ?? [], f = t.messagesByConv[h] || [], _ = /* @__PURE__ */ new Set();
|
|
483
483
|
for (const C of d)
|
|
484
484
|
(C == null ? void 0 : C.id) != null && _.add(`id:${String(C.id)}`), C != null && C.client_msg_id && _.add(`c:${C.client_msg_id}`);
|
|
485
|
-
const
|
|
486
|
-
t.messagesByConv[h] = [...d, ...
|
|
485
|
+
const b = f.filter((C) => !((C == null ? void 0 : C.id) != null && _.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && _.has(`c:${C.client_msg_id}`)));
|
|
486
|
+
t.messagesByConv[h] = [...d, ...b].sort(
|
|
487
487
|
ce
|
|
488
|
-
),
|
|
488
|
+
), w(h, {
|
|
489
489
|
nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
|
|
490
490
|
loading: !1,
|
|
491
491
|
loaded: !0
|
|
492
492
|
});
|
|
493
493
|
} catch (g) {
|
|
494
|
-
console.error("[store] openConversation failed", g),
|
|
494
|
+
console.error("[store] openConversation failed", g), w(h, {
|
|
495
495
|
nextCursor: null,
|
|
496
496
|
loading: !1,
|
|
497
497
|
loaded: !1
|
|
@@ -505,26 +505,26 @@ function Qe(e) {
|
|
|
505
505
|
if (!m || m.loading || !m.nextCursor) return;
|
|
506
506
|
const d = (f = (t.messagesByConv[h] || []).find((_) => _ == null ? void 0 : _.created_at)) == null ? void 0 : f.created_at;
|
|
507
507
|
if (d) {
|
|
508
|
-
|
|
508
|
+
w(h, { ...m, loading: !0 });
|
|
509
509
|
try {
|
|
510
510
|
const _ = await e.listMessages(h, {
|
|
511
511
|
before: d,
|
|
512
512
|
limit: l
|
|
513
|
-
}),
|
|
513
|
+
}), b = (_ == null ? void 0 : _.messages) ?? [], C = t.messagesByConv[h] || [], M = /* @__PURE__ */ new Set();
|
|
514
514
|
for (const x of C)
|
|
515
515
|
(x == null ? void 0 : x.id) != null && M.add(`id:${String(x.id)}`), x != null && x.client_msg_id && M.add(`c:${x.client_msg_id}`);
|
|
516
|
-
const
|
|
517
|
-
t.messagesByConv[h] = [...
|
|
516
|
+
const I = b.filter((x) => !((x == null ? void 0 : x.id) != null && M.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && M.has(`c:${x.client_msg_id}`)));
|
|
517
|
+
t.messagesByConv[h] = [...I, ...C], w(h, {
|
|
518
518
|
nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
|
|
519
519
|
loading: !1,
|
|
520
520
|
loaded: !0
|
|
521
521
|
});
|
|
522
522
|
} catch (_) {
|
|
523
|
-
console.error("[store] loadMore failed", _),
|
|
523
|
+
console.error("[store] loadMore failed", _), w(h, { ...m, loading: !1 });
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
-
function
|
|
527
|
+
function w(h, m) {
|
|
528
528
|
t.paginationByConv = { ...t.paginationByConv, [h]: m };
|
|
529
529
|
}
|
|
530
530
|
async function T(h, m) {
|
|
@@ -543,13 +543,13 @@ function Qe(e) {
|
|
|
543
543
|
g ? { since: g } : {}
|
|
544
544
|
), f = (d == null ? void 0 : d.messages) || [];
|
|
545
545
|
if (!f.length) return [];
|
|
546
|
-
const _ = /* @__PURE__ */ new Set(),
|
|
546
|
+
const _ = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set();
|
|
547
547
|
for (const M of m)
|
|
548
|
-
(M == null ? void 0 : M.id) != null && _.add(String(M.id)), M != null && M.client_msg_id &&
|
|
548
|
+
(M == null ? void 0 : M.id) != null && _.add(String(M.id)), M != null && M.client_msg_id && b.add(M.client_msg_id);
|
|
549
549
|
const C = [];
|
|
550
550
|
for (const M of f) {
|
|
551
|
-
const
|
|
552
|
-
K(h, M),
|
|
551
|
+
const I = (M == null ? void 0 : M.id) != null && _.has(String(M.id)) || (M == null ? void 0 : M.client_msg_id) && b.has(M.client_msg_id);
|
|
552
|
+
K(h, M), I || C.push(M);
|
|
553
553
|
}
|
|
554
554
|
return C;
|
|
555
555
|
} catch (d) {
|
|
@@ -569,18 +569,18 @@ function Qe(e) {
|
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
async function H(h, m, { attachments: g, metadata: d } = {}) {
|
|
572
|
-
var
|
|
572
|
+
var I;
|
|
573
573
|
const f = (m || "").trim(), _ = Array.isArray(g) && g.length > 0;
|
|
574
574
|
if (!h || !f && !_) return;
|
|
575
|
-
const
|
|
576
|
-
id:
|
|
577
|
-
client_msg_id:
|
|
575
|
+
const b = Je(), C = de(h), M = {
|
|
576
|
+
id: b,
|
|
577
|
+
client_msg_id: b,
|
|
578
578
|
conversation_id: h,
|
|
579
579
|
type: "content",
|
|
580
580
|
text_md: f,
|
|
581
581
|
author: {
|
|
582
582
|
type: "user",
|
|
583
|
-
id: ((
|
|
583
|
+
id: ((I = t.customer) == null ? void 0 : I.external_id) || null
|
|
584
584
|
},
|
|
585
585
|
created_at: C,
|
|
586
586
|
// Local-only flag — UI may render dimmed until the SSE echo lands.
|
|
@@ -591,14 +591,14 @@ function Qe(e) {
|
|
|
591
591
|
K(h, M);
|
|
592
592
|
try {
|
|
593
593
|
await e.postMessage(h, {
|
|
594
|
-
client_msg_id:
|
|
594
|
+
client_msg_id: b,
|
|
595
595
|
text_md: f,
|
|
596
596
|
created_at: C,
|
|
597
597
|
..._ ? { attachments: g } : {},
|
|
598
598
|
...d && typeof d == "object" ? { metadata: d } : {}
|
|
599
599
|
});
|
|
600
600
|
} catch (x) {
|
|
601
|
-
console.error("[store] send failed", x), J(h,
|
|
601
|
+
console.error("[store] send failed", x), J(h, b, {
|
|
602
602
|
_failed: !0,
|
|
603
603
|
_pending: !1
|
|
604
604
|
});
|
|
@@ -612,10 +612,10 @@ function Qe(e) {
|
|
|
612
612
|
console.error("[store] callback failed", d), h != null && delete t.awaitingCallback[h];
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
const
|
|
616
|
-
async function
|
|
615
|
+
const F = /* @__PURE__ */ new Map();
|
|
616
|
+
async function L(h) {
|
|
617
617
|
if (!h) return null;
|
|
618
|
-
const m =
|
|
618
|
+
const m = F.get(h);
|
|
619
619
|
if (m != null && m.url) {
|
|
620
620
|
const g = m.expires_at ? Date.parse(m.expires_at) : 0;
|
|
621
621
|
if (!g || g - Date.now() > 6e4) return m.url;
|
|
@@ -623,7 +623,7 @@ function Qe(e) {
|
|
|
623
623
|
try {
|
|
624
624
|
const g = await e.signAttachment(h);
|
|
625
625
|
if (g != null && g.signed_url)
|
|
626
|
-
return
|
|
626
|
+
return F.set(h, {
|
|
627
627
|
url: g.signed_url,
|
|
628
628
|
expires_at: g.expires_at
|
|
629
629
|
}), g.signed_url;
|
|
@@ -632,8 +632,8 @@ function Qe(e) {
|
|
|
632
632
|
}
|
|
633
633
|
return null;
|
|
634
634
|
}
|
|
635
|
-
async function
|
|
636
|
-
const d = t.conversations.find((
|
|
635
|
+
async function z(h, { rating: m, comment: g } = {}) {
|
|
636
|
+
const d = t.conversations.find((b) => b.id === h), _ = {
|
|
637
637
|
...(d == null ? void 0 : d.metadata) || {},
|
|
638
638
|
feedback: {
|
|
639
639
|
rating: m,
|
|
@@ -657,12 +657,12 @@ function Qe(e) {
|
|
|
657
657
|
var g, d, f;
|
|
658
658
|
const m = t.messagesByConv[h] || [];
|
|
659
659
|
for (let _ = m.length - 1; _ >= 0; _--) {
|
|
660
|
-
const
|
|
661
|
-
if (((g =
|
|
660
|
+
const b = m[_];
|
|
661
|
+
if (((g = b == null ? void 0 : b.author) == null ? void 0 : g.type) === "user" || (b == null ? void 0 : b.type) === "action" && ((d = b == null ? void 0 : b.payload) == null ? void 0 : d.state) === "pending")
|
|
662
662
|
return null;
|
|
663
|
-
const C = (f =
|
|
663
|
+
const C = (f = b == null ? void 0 : b.metadata) == null ? void 0 : f.form;
|
|
664
664
|
if (C && Array.isArray(C.fields) && C.fields.length > 0)
|
|
665
|
-
return { message:
|
|
665
|
+
return { message: b, form: C };
|
|
666
666
|
}
|
|
667
667
|
return null;
|
|
668
668
|
}
|
|
@@ -677,22 +677,22 @@ function Qe(e) {
|
|
|
677
677
|
function te(h) {
|
|
678
678
|
var g, d, f, _;
|
|
679
679
|
const m = t.messagesByConv[h] || [];
|
|
680
|
-
for (let
|
|
681
|
-
const C = m[
|
|
680
|
+
for (let b = m.length - 1; b >= 0; b--) {
|
|
681
|
+
const C = m[b];
|
|
682
682
|
if (((g = C == null ? void 0 : C.author) == null ? void 0 : g.type) === "user") return [];
|
|
683
683
|
if ((C == null ? void 0 : C.type) === "action" && ((d = C == null ? void 0 : C.payload) == null ? void 0 : d.state) === "pending")
|
|
684
684
|
return [];
|
|
685
685
|
if (((f = C == null ? void 0 : C.author) == null ? void 0 : f.type) !== "agent_ia") continue;
|
|
686
686
|
const M = (_ = C == null ? void 0 : C.metadata) == null ? void 0 : _.suggested_replies;
|
|
687
|
-
return Array.isArray(M) && M.length ? M.map((
|
|
688
|
-
if (typeof
|
|
689
|
-
const x =
|
|
687
|
+
return Array.isArray(M) && M.length ? M.map((I) => {
|
|
688
|
+
if (typeof I == "string") {
|
|
689
|
+
const x = I.trim();
|
|
690
690
|
return x ? { label: x, kind: null } : null;
|
|
691
691
|
}
|
|
692
|
-
if (
|
|
693
|
-
const x =
|
|
692
|
+
if (I && typeof I == "object" && typeof I.label == "string") {
|
|
693
|
+
const x = I.label.trim();
|
|
694
694
|
if (!x) return null;
|
|
695
|
-
const Fe =
|
|
695
|
+
const Fe = I.kind === "cta" || I.kind === "choice" || I.kind === "followup" ? I.kind : null;
|
|
696
696
|
return { label: x, kind: Fe };
|
|
697
697
|
}
|
|
698
698
|
return null;
|
|
@@ -705,8 +705,8 @@ function Qe(e) {
|
|
|
705
705
|
const g = t.messagesByConv[h] || [];
|
|
706
706
|
let d = -1;
|
|
707
707
|
m != null && m.client_msg_id && (d = g.findIndex(
|
|
708
|
-
(
|
|
709
|
-
)), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d = g.findIndex((
|
|
708
|
+
(b) => (b == null ? void 0 : b.client_msg_id) && b.client_msg_id === m.client_msg_id
|
|
709
|
+
)), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d = g.findIndex((b) => ne(b == null ? void 0 : b.id, m.id)));
|
|
710
710
|
let f;
|
|
711
711
|
d === -1 ? f = [...g, m].sort(ce) : (f = g.slice(), f[d] = {
|
|
712
712
|
...g[d],
|
|
@@ -721,7 +721,7 @@ function Qe(e) {
|
|
|
721
721
|
function J(h, m, g) {
|
|
722
722
|
const d = t.messagesByConv[h];
|
|
723
723
|
if (!d) return;
|
|
724
|
-
const f = d.findIndex((
|
|
724
|
+
const f = d.findIndex((b) => b.id === m);
|
|
725
725
|
if (f === -1) return;
|
|
726
726
|
const _ = d.slice();
|
|
727
727
|
_[f] = { ...d[f], ...g }, t.messagesByConv[h] = _;
|
|
@@ -733,7 +733,7 @@ function Qe(e) {
|
|
|
733
733
|
if (m && (!d.last_message_at || m > d.last_message_at)) {
|
|
734
734
|
const f = t.conversations.slice();
|
|
735
735
|
f[g] = { ...d, last_message_at: m }, f.sort(
|
|
736
|
-
(_,
|
|
736
|
+
(_, b) => (b.last_message_at || "").localeCompare(_.last_message_at || "")
|
|
737
737
|
), t.conversations = f;
|
|
738
738
|
}
|
|
739
739
|
}
|
|
@@ -768,8 +768,8 @@ function Qe(e) {
|
|
|
768
768
|
markConversationRead: A,
|
|
769
769
|
send: H,
|
|
770
770
|
clickCallback: S,
|
|
771
|
-
signAttachment:
|
|
772
|
-
submitFeedback:
|
|
771
|
+
signAttachment: L,
|
|
772
|
+
submitFeedback: z,
|
|
773
773
|
getPendingApproval: Y,
|
|
774
774
|
getActionInFlight: ee,
|
|
775
775
|
getLatestSuggestions: te,
|
|
@@ -778,7 +778,7 @@ function Qe(e) {
|
|
|
778
778
|
setPanelOpen: e.setPanelOpen
|
|
779
779
|
};
|
|
780
780
|
}
|
|
781
|
-
const
|
|
781
|
+
const j = {
|
|
782
782
|
w: "#ffffff",
|
|
783
783
|
g50: "#F9F9F7",
|
|
784
784
|
g100: "#F2F1EE",
|
|
@@ -817,21 +817,21 @@ const Xe = `
|
|
|
817
817
|
.wm-root {
|
|
818
818
|
--wm-f: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
819
819
|
--wm-fm: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
820
|
-
--wm-w: ${
|
|
821
|
-
--wm-g50: ${
|
|
822
|
-
--wm-g100: ${
|
|
823
|
-
--wm-g150: ${
|
|
824
|
-
--wm-g200: ${
|
|
825
|
-
--wm-g300: ${
|
|
826
|
-
--wm-g400: ${
|
|
827
|
-
--wm-g500: ${
|
|
828
|
-
--wm-g700: ${
|
|
829
|
-
--wm-g900: ${
|
|
830
|
-
--wm-a: ${
|
|
831
|
-
--wm-al: ${
|
|
832
|
-
--wm-green: ${
|
|
833
|
-
--wm-red: ${
|
|
834
|
-
--wm-redBg: ${
|
|
820
|
+
--wm-w: ${j.w};
|
|
821
|
+
--wm-g50: ${j.g50};
|
|
822
|
+
--wm-g100: ${j.g100};
|
|
823
|
+
--wm-g150: ${j.g150};
|
|
824
|
+
--wm-g200: ${j.g200};
|
|
825
|
+
--wm-g300: ${j.g300};
|
|
826
|
+
--wm-g400: ${j.g400};
|
|
827
|
+
--wm-g500: ${j.g500};
|
|
828
|
+
--wm-g700: ${j.g700};
|
|
829
|
+
--wm-g900: ${j.g900};
|
|
830
|
+
--wm-a: ${j.accent};
|
|
831
|
+
--wm-al: ${j.accentLight};
|
|
832
|
+
--wm-green: ${j.green};
|
|
833
|
+
--wm-red: ${j.red};
|
|
834
|
+
--wm-redBg: ${j.redBg};
|
|
835
835
|
--wm-sh1: 0 1px 3px rgba(0,0,0,.06);
|
|
836
836
|
--wm-sh2: 0 4px 24px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);
|
|
837
837
|
--wm-shPanel: 0 12px 40px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
|
|
@@ -1113,7 +1113,7 @@ function be(e) {
|
|
|
1113
1113
|
function re(e) {
|
|
1114
1114
|
return Ae[be(e)] || Ae[ae];
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1116
|
+
function D(e) {
|
|
1117
1117
|
const t = be(e), n = _e[t] || _e[ae], i = _e[ae];
|
|
1118
1118
|
return function(s, a) {
|
|
1119
1119
|
let l = n[s];
|
|
@@ -1131,7 +1131,7 @@ function Se(e, t) {
|
|
|
1131
1131
|
function Be(e, t, n) {
|
|
1132
1132
|
return Array.isArray(t) ? t.map((i) => Se(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Se(e, String(t));
|
|
1133
1133
|
}
|
|
1134
|
-
function tt(e, t, n =
|
|
1134
|
+
function tt(e, t, n = D()) {
|
|
1135
1135
|
if (!e || !t) return "";
|
|
1136
1136
|
const i = Array.isArray(e.fields) ? e.fields : [], r = [];
|
|
1137
1137
|
for (const s of i) {
|
|
@@ -1146,7 +1146,7 @@ ${l}`);
|
|
|
1146
1146
|
|
|
1147
1147
|
`);
|
|
1148
1148
|
}
|
|
1149
|
-
function nt(e, t, n =
|
|
1149
|
+
function nt(e, t, n = D()) {
|
|
1150
1150
|
const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
|
|
1151
1151
|
for (const s of r) {
|
|
1152
1152
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
@@ -1216,7 +1216,7 @@ function it(e, t, n, i) {
|
|
|
1216
1216
|
return r.join(`
|
|
1217
1217
|
`);
|
|
1218
1218
|
}
|
|
1219
|
-
function at(e, t, n =
|
|
1219
|
+
function at(e, t, n = D(), i) {
|
|
1220
1220
|
if (!e) return;
|
|
1221
1221
|
const r = it(e, t || [], n, re(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
|
|
1222
1222
|
try {
|
|
@@ -1501,7 +1501,7 @@ const ot = {
|
|
|
1501
1501
|
) + r;
|
|
1502
1502
|
this.nextRevealAt = a;
|
|
1503
1503
|
const l = Math.max(0, a - n), p = e.id, k = setTimeout(() => {
|
|
1504
|
-
this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((
|
|
1504
|
+
this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
|
|
1505
1505
|
}, l);
|
|
1506
1506
|
this.revealTimers.push(k);
|
|
1507
1507
|
},
|
|
@@ -1693,7 +1693,7 @@ const Re = /* @__PURE__ */ N(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d
|
|
|
1693
1693
|
inject: {
|
|
1694
1694
|
// Translator shared by the Messenger shell; French fallback when
|
|
1695
1695
|
// the component is used standalone.
|
|
1696
|
-
t: { default: () =>
|
|
1696
|
+
t: { default: () => D() }
|
|
1697
1697
|
},
|
|
1698
1698
|
props: {
|
|
1699
1699
|
// Nombre de conversations non lues — pilote la pastille.
|
|
@@ -1729,7 +1729,7 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1729
1729
|
key: 0,
|
|
1730
1730
|
class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
|
|
1731
1731
|
}, [
|
|
1732
|
-
(c(!0), u(B, null,
|
|
1732
|
+
(c(!0), u(B, null, U(s.visiblePeeks, (l, p) => (c(), u("div", {
|
|
1733
1733
|
key: l.convId,
|
|
1734
1734
|
class: "wm-peek",
|
|
1735
1735
|
style: q({
|
|
@@ -1953,7 +1953,7 @@ function Wt(e, t, n, i, r, s) {
|
|
|
1953
1953
|
class: "wm-team__stack",
|
|
1954
1954
|
style: q({ width: s.stackWidth + "px" })
|
|
1955
1955
|
}, [
|
|
1956
|
-
(c(!0), u(B, null,
|
|
1956
|
+
(c(!0), u(B, null, U(n.members.slice(0, 3), (a, l) => (c(), u("div", {
|
|
1957
1957
|
key: l,
|
|
1958
1958
|
class: "wm-team__pill",
|
|
1959
1959
|
style: q({
|
|
@@ -1978,7 +1978,7 @@ const Gt = /* @__PURE__ */ N(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063
|
|
|
1978
1978
|
inject: {
|
|
1979
1979
|
// Translator shared by the Messenger shell. Falls back to a French
|
|
1980
1980
|
// translator when the component is used standalone (no provider).
|
|
1981
|
-
t: { default: () =>
|
|
1981
|
+
t: { default: () => D() }
|
|
1982
1982
|
},
|
|
1983
1983
|
props: {
|
|
1984
1984
|
title: { type: String, default: "Nouvelle conversation" },
|
|
@@ -2053,7 +2053,7 @@ function on(e, t, n, i, r, s) {
|
|
|
2053
2053
|
o("div", en, [
|
|
2054
2054
|
o("div", tn, v(n.title), 1)
|
|
2055
2055
|
]),
|
|
2056
|
-
s.hasTeam ? (c(),
|
|
2056
|
+
s.hasTeam ? (c(), P(l, {
|
|
2057
2057
|
key: 0,
|
|
2058
2058
|
members: s.displayedTeamMembers,
|
|
2059
2059
|
"response-label": ""
|
|
@@ -2164,22 +2164,22 @@ function un(e) {
|
|
|
2164
2164
|
if (!T) break;
|
|
2165
2165
|
k.push(T[1]), i++;
|
|
2166
2166
|
}
|
|
2167
|
-
const
|
|
2167
|
+
const w = k.map((T) => `<li>${ie(T)}</li>`).join("");
|
|
2168
2168
|
n.push({
|
|
2169
2169
|
type: "block",
|
|
2170
|
-
html: `<ul class="wm-md-ul">${
|
|
2170
|
+
html: `<ul class="wm-md-ul">${w}</ul>`
|
|
2171
2171
|
});
|
|
2172
2172
|
continue;
|
|
2173
2173
|
}
|
|
2174
2174
|
const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
|
|
2175
2175
|
if (l) {
|
|
2176
|
-
const k = parseInt(l[1], 10),
|
|
2176
|
+
const k = parseInt(l[1], 10), w = [l[2]];
|
|
2177
2177
|
for (i++; i < t.length; ) {
|
|
2178
2178
|
const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
|
|
2179
2179
|
if (!A) break;
|
|
2180
|
-
|
|
2180
|
+
w.push(A[1]), i++;
|
|
2181
2181
|
}
|
|
2182
|
-
const T =
|
|
2182
|
+
const T = w.map((A) => `<li>${ie(A)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
|
|
2183
2183
|
n.push({
|
|
2184
2184
|
type: "block",
|
|
2185
2185
|
html: `<ol class="wm-md-ol"${E}>${T}</ol>`
|
|
@@ -2219,7 +2219,7 @@ const xe = {
|
|
|
2219
2219
|
inject: {
|
|
2220
2220
|
// Translator + resolved-language getter shared by the Messenger
|
|
2221
2221
|
// shell. Fall back to French wording when used standalone.
|
|
2222
|
-
t: { default: () =>
|
|
2222
|
+
t: { default: () => D() },
|
|
2223
2223
|
wmLocale: { default: () => () => "fr" }
|
|
2224
2224
|
},
|
|
2225
2225
|
props: {
|
|
@@ -2388,7 +2388,7 @@ function qn(e, t, n, i, r, s) {
|
|
|
2388
2388
|
o("div", {
|
|
2389
2389
|
class: O(s.quickLinksLayout)
|
|
2390
2390
|
}, [
|
|
2391
|
-
(c(!0), u(B, null,
|
|
2391
|
+
(c(!0), u(B, null, U(n.quickLinks, (l, p) => (c(), u("button", {
|
|
2392
2392
|
key: p,
|
|
2393
2393
|
type: "button",
|
|
2394
2394
|
class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
|
|
@@ -2436,7 +2436,7 @@ function qn(e, t, n, i, r, s) {
|
|
|
2436
2436
|
])
|
|
2437
2437
|
]),
|
|
2438
2438
|
o("div", Bn, [
|
|
2439
|
-
(c(!0), u(B, null,
|
|
2439
|
+
(c(!0), u(B, null, U(s.filteredThreads, (l) => (c(), u("div", {
|
|
2440
2440
|
key: l.id,
|
|
2441
2441
|
class: "wm-onb__thread"
|
|
2442
2442
|
}, [
|
|
@@ -2588,7 +2588,7 @@ const ns = /* @__PURE__ */ N(Vn, [["render", ts], ["__scopeId", "data-v-7284acd0
|
|
|
2588
2588
|
inject: {
|
|
2589
2589
|
// Translator shared by the Messenger shell; French fallback when
|
|
2590
2590
|
// the component is used standalone.
|
|
2591
|
-
t: { default: () =>
|
|
2591
|
+
t: { default: () => D() }
|
|
2592
2592
|
},
|
|
2593
2593
|
props: {
|
|
2594
2594
|
data: { type: Object, required: !0 }
|
|
@@ -2622,7 +2622,7 @@ function ds(e, t, n, i, r, s) {
|
|
|
2622
2622
|
])
|
|
2623
2623
|
]),
|
|
2624
2624
|
o("div", ls, [
|
|
2625
|
-
(c(!0), u(B, null,
|
|
2625
|
+
(c(!0), u(B, null, U(s.fields, (a, l) => (c(), u("div", {
|
|
2626
2626
|
key: l,
|
|
2627
2627
|
class: "wm-art__field"
|
|
2628
2628
|
}, [
|
|
@@ -2689,7 +2689,7 @@ function Cs(e, t, n, i, r, s) {
|
|
|
2689
2689
|
]),
|
|
2690
2690
|
s.hasBody ? (c(), u("div", ws, [
|
|
2691
2691
|
n.data.body ? (c(), u("div", bs, v(n.data.body), 1)) : y("", !0),
|
|
2692
|
-
s.fields.length ? (c(!0), u(B, { key: 1 },
|
|
2692
|
+
s.fields.length ? (c(!0), u(B, { key: 1 }, U(s.fields, (a, l) => (c(), u("div", {
|
|
2693
2693
|
key: l,
|
|
2694
2694
|
class: "wm-art__field"
|
|
2695
2695
|
}, [
|
|
@@ -2724,7 +2724,7 @@ const Ms = {
|
|
|
2724
2724
|
inject: {
|
|
2725
2725
|
// Translator + resolved-language getter shared by the Messenger
|
|
2726
2726
|
// shell. Fall back to French wording when used standalone.
|
|
2727
|
-
t: { default: () =>
|
|
2727
|
+
t: { default: () => D() },
|
|
2728
2728
|
wmLocale: { default: () => () => "fr" }
|
|
2729
2729
|
},
|
|
2730
2730
|
props: {
|
|
@@ -2826,7 +2826,7 @@ function Us(e, t, n, i, r, s) {
|
|
|
2826
2826
|
n.data.body ? (c(), u("div", Es, v(n.data.body), 1)) : y("", !0)
|
|
2827
2827
|
]),
|
|
2828
2828
|
s.fields.length ? (c(), u("div", Bs, [
|
|
2829
|
-
(c(!0), u(B, null,
|
|
2829
|
+
(c(!0), u(B, null, U(s.fields, (a, l) => (c(), u("div", {
|
|
2830
2830
|
key: l,
|
|
2831
2831
|
class: "wm-art__field"
|
|
2832
2832
|
}, [
|
|
@@ -2926,7 +2926,7 @@ const Ds = /* @__PURE__ */ N(Ms, [["render", Us], ["__scopeId", "data-v-5f30c914
|
|
|
2926
2926
|
}
|
|
2927
2927
|
};
|
|
2928
2928
|
function zs(e, t, n, i, r, s) {
|
|
2929
|
-
return s.component ? (c(),
|
|
2929
|
+
return s.component ? (c(), P(De(s.component), {
|
|
2930
2930
|
key: 0,
|
|
2931
2931
|
data: n.artifact.data
|
|
2932
2932
|
}, null, 8, ["data"])) : y("", !0);
|
|
@@ -2937,7 +2937,7 @@ const qs = /* @__PURE__ */ N(Hs, [["render", zs]]), $s = {
|
|
|
2937
2937
|
signAttachmentFn: { default: null },
|
|
2938
2938
|
// Translator shared by the Messenger shell; French fallback when
|
|
2939
2939
|
// the component is used standalone.
|
|
2940
|
-
t: { default: () =>
|
|
2940
|
+
t: { default: () => D() }
|
|
2941
2941
|
},
|
|
2942
2942
|
props: {
|
|
2943
2943
|
attachment: { type: Object, required: !0 }
|
|
@@ -3121,7 +3121,7 @@ const dr = {
|
|
|
3121
3121
|
inject: {
|
|
3122
3122
|
// Translator + resolved-language getter shared by the Messenger
|
|
3123
3123
|
// shell. Fall back to French wording when used standalone.
|
|
3124
|
-
t: { default: () =>
|
|
3124
|
+
t: { default: () => D() },
|
|
3125
3125
|
wmLocale: { default: () => () => "fr" }
|
|
3126
3126
|
},
|
|
3127
3127
|
props: {
|
|
@@ -3191,8 +3191,8 @@ const dr = {
|
|
|
3191
3191
|
const l = this.roleOf(a);
|
|
3192
3192
|
if (l === "system") {
|
|
3193
3193
|
if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
|
|
3194
|
-
const
|
|
3195
|
-
|
|
3194
|
+
const w = e[e.length - 1];
|
|
3195
|
+
w && w.role === "ai" ? w.messages.push(a) : e.push({
|
|
3196
3196
|
key: `g-${Q(a)}`,
|
|
3197
3197
|
role: "ai",
|
|
3198
3198
|
agentName: "",
|
|
@@ -3511,9 +3511,9 @@ const dr = {
|
|
|
3511
3511
|
// doit garder son arrondi.
|
|
3512
3512
|
cornersFor(e, t) {
|
|
3513
3513
|
var Z, ee, te;
|
|
3514
|
-
const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom,
|
|
3515
|
-
let
|
|
3516
|
-
return a ? (k && (
|
|
3514
|
+
const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, S = (K, ne, J) => K != null && T != null ? K + H >= T : ne === J || ne === "card" && J === "bubble";
|
|
3515
|
+
let F = l, L = l, z = l, Y = l;
|
|
3516
|
+
return a ? (k && (L = p), (w || !s) && (z = p), k && S(E, k, i == null ? void 0 : i.top) && (F = p), w && S(A, w, i == null ? void 0 : i.bottom) && (Y = p)) : (k && (F = p), (w || !s) && (Y = p), k && S(E, k, i == null ? void 0 : i.top) && (L = p), w && S(A, w, i == null ? void 0 : i.bottom) && (z = p)), { tl: F, tr: L, br: z, bl: Y };
|
|
3517
3517
|
},
|
|
3518
3518
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3519
3519
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3697,7 +3697,7 @@ const dr = {
|
|
|
3697
3697
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
3698
3698
|
}, Rr = { class: "wm-list__avatarSlot" }, Nr = ["aria-label", "title"];
|
|
3699
3699
|
function Pr(e, t, n, i, r, s) {
|
|
3700
|
-
const a = R("AIAvatar"), l = R("HumanAvatar"), p = R("ActionResult"), k = R("ArtifactRenderer"),
|
|
3700
|
+
const a = R("AIAvatar"), l = R("HumanAvatar"), p = R("ActionResult"), k = R("ArtifactRenderer"), w = R("Bubble"), T = R("AttachmentPreview"), E = R("Typing");
|
|
3701
3701
|
return c(), u("div", fr, [
|
|
3702
3702
|
o("div", {
|
|
3703
3703
|
ref: "scrollEl",
|
|
@@ -3716,7 +3716,7 @@ function Pr(e, t, n, i, r, s) {
|
|
|
3716
3716
|
o("span", yr, v(n.dateLabel), 1),
|
|
3717
3717
|
t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
|
|
3718
3718
|
])) : y("", !0),
|
|
3719
|
-
(c(!0), u(B, null,
|
|
3719
|
+
(c(!0), u(B, null, U(s.groups, (A, H) => (c(), u(B, {
|
|
3720
3720
|
key: A.key
|
|
3721
3721
|
}, [
|
|
3722
3722
|
A.key === s.unreadGroupKey ? (c(), u("div", wr, [
|
|
@@ -3733,7 +3733,7 @@ function Pr(e, t, n, i, r, s) {
|
|
|
3733
3733
|
o("span", Cr, v(A.systemLabel), 1),
|
|
3734
3734
|
t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
3735
3735
|
])) : (c(), u(B, { key: 1 }, [
|
|
3736
|
-
(c(!0), u(B, null,
|
|
3736
|
+
(c(!0), u(B, null, U(A.items, (S, F) => (c(), u(B, {
|
|
3737
3737
|
key: `${s.messageKey(S.message)}-${S.partKey}`
|
|
3738
3738
|
}, [
|
|
3739
3739
|
o("div", {
|
|
@@ -3745,23 +3745,23 @@ function Pr(e, t, n, i, r, s) {
|
|
|
3745
3745
|
"is-failed": S.message._failed
|
|
3746
3746
|
}
|
|
3747
3747
|
]]),
|
|
3748
|
-
style: q(s.cornersStyle(A,
|
|
3749
|
-
onPointerdown: (
|
|
3750
|
-
onPointerup: t[0] || (t[0] = (
|
|
3751
|
-
onPointercancel: t[1] || (t[1] = (
|
|
3752
|
-
onPointerleave: t[2] || (t[2] = (
|
|
3748
|
+
style: q(s.cornersStyle(A, F)),
|
|
3749
|
+
onPointerdown: (L) => s.onPressStart(`${s.messageKey(S.message)}-${S.partKey}`),
|
|
3750
|
+
onPointerup: t[0] || (t[0] = (L) => s.onPressEnd()),
|
|
3751
|
+
onPointercancel: t[1] || (t[1] = (L) => s.onPressEnd()),
|
|
3752
|
+
onPointerleave: t[2] || (t[2] = (L) => s.onPressEnd()),
|
|
3753
3753
|
onContextmenu: t[3] || (t[3] = G(() => {
|
|
3754
3754
|
}, ["prevent"]))
|
|
3755
3755
|
}, [
|
|
3756
3756
|
A.role !== "user" ? (c(), u("div", Sr, [
|
|
3757
|
-
|
|
3758
|
-
A.role === "ai" ? (c(),
|
|
3757
|
+
F === A.items.length - 1 ? (c(), u(B, { key: 0 }, [
|
|
3758
|
+
A.role === "ai" ? (c(), P(a, {
|
|
3759
3759
|
key: 0,
|
|
3760
3760
|
size: 26,
|
|
3761
3761
|
tail: !0,
|
|
3762
3762
|
name: n.aiAgentName,
|
|
3763
3763
|
"image-url": n.aiAgentAvatarUrl
|
|
3764
|
-
}, null, 8, ["name", "image-url"])) : (c(),
|
|
3764
|
+
}, null, 8, ["name", "image-url"])) : (c(), P(l, {
|
|
3765
3765
|
key: 1,
|
|
3766
3766
|
name: A.agentName,
|
|
3767
3767
|
"avatar-url": A.agentAvatarUrl,
|
|
@@ -3770,24 +3770,24 @@ function Pr(e, t, n, i, r, s) {
|
|
|
3770
3770
|
}, null, 8, ["name", "avatar-url"]))
|
|
3771
3771
|
], 64)) : y("", !0)
|
|
3772
3772
|
])) : y("", !0),
|
|
3773
|
-
S.renderAs === "action" ? (c(),
|
|
3773
|
+
S.renderAs === "action" ? (c(), P(p, {
|
|
3774
3774
|
key: 1,
|
|
3775
3775
|
state: S.message.payload.state,
|
|
3776
3776
|
label: s.actionLabel(S.message),
|
|
3777
3777
|
detail: s.actionDetail(S.message)
|
|
3778
|
-
}, null, 8, ["state", "label", "detail"])) : S.renderAs === "admin-pending" ? (c(),
|
|
3778
|
+
}, null, 8, ["state", "label", "detail"])) : S.renderAs === "admin-pending" ? (c(), P(p, {
|
|
3779
3779
|
key: 2,
|
|
3780
3780
|
state: "awaiting",
|
|
3781
3781
|
label: s.t("messageList.approvalRequestSent"),
|
|
3782
3782
|
detail: S.message.text_md || ""
|
|
3783
|
-
}, null, 8, ["label", "detail"])) : S.renderAs === "artifact-of-action" ? (c(),
|
|
3783
|
+
}, null, 8, ["label", "detail"])) : S.renderAs === "artifact-of-action" ? (c(), P(k, {
|
|
3784
3784
|
key: 3,
|
|
3785
3785
|
artifact: s.actionArtifact(S.message)
|
|
3786
|
-
}, null, 8, ["artifact"])) : S.renderAs === "artifact" ? (c(),
|
|
3786
|
+
}, null, 8, ["artifact"])) : S.renderAs === "artifact" ? (c(), P(k, {
|
|
3787
3787
|
key: 4,
|
|
3788
3788
|
artifact: s.artifactOf(S.message)
|
|
3789
3789
|
}, null, 8, ["artifact"])) : (c(), u("div", Mr, [
|
|
3790
|
-
S.message.text_md ? (c(),
|
|
3790
|
+
S.message.text_md ? (c(), P(w, {
|
|
3791
3791
|
key: 0,
|
|
3792
3792
|
role: A.role,
|
|
3793
3793
|
text: S.message.text_md
|
|
@@ -3798,16 +3798,16 @@ function Pr(e, t, n, i, r, s) {
|
|
|
3798
3798
|
"wm-list__atts--align-end": A.role === "user"
|
|
3799
3799
|
}])
|
|
3800
3800
|
}, [
|
|
3801
|
-
(c(!0), u(B, null,
|
|
3801
|
+
(c(!0), u(B, null, U(s.attachmentsOf(
|
|
3802
3802
|
S.message
|
|
3803
|
-
), (
|
|
3804
|
-
key: `${s.messageKey(S.message)}-att-${
|
|
3805
|
-
attachment:
|
|
3803
|
+
), (L, z) => (c(), P(T, {
|
|
3804
|
+
key: `${s.messageKey(S.message)}-att-${z}`,
|
|
3805
|
+
attachment: L
|
|
3806
3806
|
}, null, 8, ["attachment"]))), 128))
|
|
3807
3807
|
], 2)) : y("", !0)
|
|
3808
3808
|
]))
|
|
3809
3809
|
], 46, Ar),
|
|
3810
|
-
|
|
3810
|
+
F < A.items.length - 1 && r.pressedItemKey === `${s.messageKey(S.message)}-${S.partKey}` && (A.role !== "user" || s.timeOf(S.message)) ? (c(), u("div", {
|
|
3811
3811
|
key: 0,
|
|
3812
3812
|
class: O(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
|
|
3813
3813
|
}, [
|
|
@@ -3933,56 +3933,56 @@ async function Hr(e = {}) {
|
|
|
3933
3933
|
t = await navigator.mediaDevices.getDisplayMedia(
|
|
3934
3934
|
Pe({ audio: !0 })
|
|
3935
3935
|
);
|
|
3936
|
-
} catch (
|
|
3937
|
-
return (
|
|
3936
|
+
} catch (w) {
|
|
3937
|
+
return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
|
|
3938
3938
|
}
|
|
3939
3939
|
const n = Ur();
|
|
3940
3940
|
let i;
|
|
3941
3941
|
try {
|
|
3942
3942
|
i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
|
|
3943
|
-
} catch (
|
|
3944
|
-
return console.error("[media] recorder init",
|
|
3943
|
+
} catch (w) {
|
|
3944
|
+
return console.error("[media] recorder init", w), t.getTracks().forEach((T) => {
|
|
3945
3945
|
T.stop();
|
|
3946
3946
|
}), null;
|
|
3947
3947
|
}
|
|
3948
3948
|
const r = [];
|
|
3949
3949
|
let s = null, a = !1;
|
|
3950
|
-
i.addEventListener("dataavailable", (
|
|
3951
|
-
|
|
3950
|
+
i.addEventListener("dataavailable", (w) => {
|
|
3951
|
+
w.data && w.data.size > 0 && r.push(w.data);
|
|
3952
3952
|
}), i.addEventListener("stop", () => {
|
|
3953
|
-
var
|
|
3953
|
+
var w, T;
|
|
3954
3954
|
if (s && clearInterval(s), t.getTracks().forEach((E) => {
|
|
3955
3955
|
E.stop();
|
|
3956
3956
|
}), r.length) {
|
|
3957
|
-
const E = i.mimeType || n || "video/webm", A = new Blob(r, { type: E }), H = /mp4/.test(E) ? "mp4" : "webm", S = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19),
|
|
3957
|
+
const E = i.mimeType || n || "video/webm", A = new Blob(r, { type: E }), H = /mp4/.test(E) ? "mp4" : "webm", S = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), F = new File([A], `ecran-${S}.${H}`, {
|
|
3958
3958
|
type: E
|
|
3959
3959
|
});
|
|
3960
|
-
(
|
|
3960
|
+
(w = e.onfinalize) == null || w.call(e, F);
|
|
3961
3961
|
} else
|
|
3962
3962
|
(T = e.oncancel) == null || T.call(e);
|
|
3963
|
-
}), t.getVideoTracks().forEach((
|
|
3964
|
-
|
|
3963
|
+
}), t.getVideoTracks().forEach((w) => {
|
|
3964
|
+
w.addEventListener("ended", () => l(), { once: !0 });
|
|
3965
3965
|
});
|
|
3966
3966
|
function l() {
|
|
3967
3967
|
if (!a && (a = !0, i.state !== "inactive"))
|
|
3968
3968
|
try {
|
|
3969
3969
|
i.stop();
|
|
3970
|
-
} catch (
|
|
3971
|
-
console.error("[media] recorder stop",
|
|
3970
|
+
} catch (w) {
|
|
3971
|
+
console.error("[media] recorder stop", w);
|
|
3972
3972
|
}
|
|
3973
3973
|
}
|
|
3974
3974
|
try {
|
|
3975
3975
|
i.start(1e3);
|
|
3976
|
-
} catch (
|
|
3977
|
-
return console.error("[media] recorder start",
|
|
3976
|
+
} catch (w) {
|
|
3977
|
+
return console.error("[media] recorder start", w), t.getTracks().forEach((T) => {
|
|
3978
3978
|
T.stop();
|
|
3979
3979
|
}), null;
|
|
3980
3980
|
}
|
|
3981
3981
|
(k = e.onstart) == null || k.call(e);
|
|
3982
3982
|
const p = Date.now();
|
|
3983
3983
|
return s = setInterval(() => {
|
|
3984
|
-
var
|
|
3985
|
-
(
|
|
3984
|
+
var w;
|
|
3985
|
+
(w = e.ontick) == null || w.call(e, Date.now() - p);
|
|
3986
3986
|
}, 500), {
|
|
3987
3987
|
stop: l,
|
|
3988
3988
|
get state() {
|
|
@@ -4011,7 +4011,7 @@ const zr = [
|
|
|
4011
4011
|
inject: {
|
|
4012
4012
|
// Translator shared by the Messenger shell; French fallback when
|
|
4013
4013
|
// the component is used standalone.
|
|
4014
|
-
t: { default: () =>
|
|
4014
|
+
t: { default: () => D() }
|
|
4015
4015
|
},
|
|
4016
4016
|
props: {
|
|
4017
4017
|
modelValue: { type: String, default: "" },
|
|
@@ -4209,7 +4209,7 @@ function ti(e, t, n, i, r, s) {
|
|
|
4209
4209
|
onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
|
|
4210
4210
|
})) : y("", !0),
|
|
4211
4211
|
r.attachOpen ? (c(), u("div", Vr, [
|
|
4212
|
-
(c(!0), u(B, null,
|
|
4212
|
+
(c(!0), u(B, null, U(s.attachItems, (a) => (c(), u("button", {
|
|
4213
4213
|
key: a.action,
|
|
4214
4214
|
type: "button",
|
|
4215
4215
|
class: "wm-compose__menuItem",
|
|
@@ -4313,7 +4313,7 @@ function ii(e, t, n, i, r, s) {
|
|
|
4313
4313
|
key: s.batchKey,
|
|
4314
4314
|
class: "wm-chips"
|
|
4315
4315
|
}, [
|
|
4316
|
-
(c(!0), u(B, null,
|
|
4316
|
+
(c(!0), u(B, null, U(n.items, (a, l) => (c(), u("button", {
|
|
4317
4317
|
key: l,
|
|
4318
4318
|
type: "button",
|
|
4319
4319
|
class: "wm-chip",
|
|
@@ -4328,7 +4328,7 @@ const ai = /* @__PURE__ */ N(si, [["render", ii], ["__scopeId", "data-v-47ad8085
|
|
|
4328
4328
|
inject: {
|
|
4329
4329
|
// Translator shared by the Messenger shell; French fallback when
|
|
4330
4330
|
// the component is used standalone.
|
|
4331
|
-
t: { default: () =>
|
|
4331
|
+
t: { default: () => D() }
|
|
4332
4332
|
},
|
|
4333
4333
|
props: {
|
|
4334
4334
|
action: { type: String, required: !0 },
|
|
@@ -4418,7 +4418,7 @@ const pi = /* @__PURE__ */ new Set([
|
|
|
4418
4418
|
inject: {
|
|
4419
4419
|
// Translator shared by the Messenger shell; French fallback when
|
|
4420
4420
|
// the component is used standalone.
|
|
4421
|
-
t: { default: () =>
|
|
4421
|
+
t: { default: () => D() }
|
|
4422
4422
|
},
|
|
4423
4423
|
props: {
|
|
4424
4424
|
form: { type: Object, required: !0 },
|
|
@@ -4542,7 +4542,7 @@ function zi(e, t, n, i, r, s) {
|
|
|
4542
4542
|
class: "wm-form__body",
|
|
4543
4543
|
onSubmit: t[0] || (t[0] = G((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
|
|
4544
4544
|
}, [
|
|
4545
|
-
(c(!0), u(B, null,
|
|
4545
|
+
(c(!0), u(B, null, U(s.normalizedFields, (l) => (c(), u("div", {
|
|
4546
4546
|
key: l.key,
|
|
4547
4547
|
class: "wm-form__field"
|
|
4548
4548
|
}, [
|
|
@@ -4620,14 +4620,14 @@ function zi(e, t, n, i, r, s) {
|
|
|
4620
4620
|
disabled: n.readOnly || r.busy
|
|
4621
4621
|
}, [
|
|
4622
4622
|
o("option", Ri, v(l.placeholder || s.t("form.choose")), 1),
|
|
4623
|
-
(c(!0), u(B, null,
|
|
4623
|
+
(c(!0), u(B, null, U(l.options, (p) => (c(), u("option", {
|
|
4624
4624
|
key: p.value,
|
|
4625
4625
|
value: p.value
|
|
4626
4626
|
}, v(p.label), 9, Ni))), 128))
|
|
4627
4627
|
], 8, Bi)), [
|
|
4628
4628
|
[ze, r.values[l.key]]
|
|
4629
4629
|
]) : l.type === "multiselect" ? (c(), u("div", Pi, [
|
|
4630
|
-
(c(!0), u(B, null,
|
|
4630
|
+
(c(!0), u(B, null, U(l.options, (p) => (c(), u("label", {
|
|
4631
4631
|
key: p.value,
|
|
4632
4632
|
class: "wm-form__multiItem"
|
|
4633
4633
|
}, [
|
|
@@ -4664,7 +4664,7 @@ const qi = /* @__PURE__ */ N(vi, [["render", zi], ["__scopeId", "data-v-fe65cc56
|
|
|
4664
4664
|
inject: {
|
|
4665
4665
|
// Translator shared by the Messenger shell; French fallback when
|
|
4666
4666
|
// the component is used standalone.
|
|
4667
|
-
t: { default: () =>
|
|
4667
|
+
t: { default: () => D() }
|
|
4668
4668
|
},
|
|
4669
4669
|
props: {
|
|
4670
4670
|
busy: { type: Boolean, default: !1 },
|
|
@@ -4721,7 +4721,7 @@ function na(e, t, n, i, r, s) {
|
|
|
4721
4721
|
o("div", Vi, v(s.t("feedback.question")), 1),
|
|
4722
4722
|
o("div", Wi, v(s.t("feedback.subtitle")), 1),
|
|
4723
4723
|
o("div", Gi, [
|
|
4724
|
-
(c(!0), u(B, null,
|
|
4724
|
+
(c(!0), u(B, null, U(s.options, (a) => (c(), u("button", {
|
|
4725
4725
|
key: a.v,
|
|
4726
4726
|
type: "button",
|
|
4727
4727
|
class: O(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
|
|
@@ -4745,7 +4745,7 @@ const sa = /* @__PURE__ */ N($i, [["render", na], ["__scopeId", "data-v-9b630564
|
|
|
4745
4745
|
inject: {
|
|
4746
4746
|
// Translator shared by the Messenger shell; French fallback when
|
|
4747
4747
|
// the component is used standalone.
|
|
4748
|
-
t: { default: () =>
|
|
4748
|
+
t: { default: () => D() }
|
|
4749
4749
|
},
|
|
4750
4750
|
props: {
|
|
4751
4751
|
canRename: { type: Boolean, default: !0 },
|
|
@@ -4965,7 +4965,7 @@ const va = /* @__PURE__ */ N(ra, [["render", pa], ["__scopeId", "data-v-76281e95
|
|
|
4965
4965
|
inject: {
|
|
4966
4966
|
// Translator shared by the Messenger shell; French fallback when
|
|
4967
4967
|
// the component is used standalone.
|
|
4968
|
-
t: { default: () =>
|
|
4968
|
+
t: { default: () => D() }
|
|
4969
4969
|
},
|
|
4970
4970
|
props: {
|
|
4971
4971
|
// Empty defaults: the resolved fallback comes from the translator
|
|
@@ -5233,7 +5233,7 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5233
5233
|
// `locale` changes. `t()` below (and the provided closure) delegate
|
|
5234
5234
|
// to it so every string resolves against the current language.
|
|
5235
5235
|
translator() {
|
|
5236
|
-
return
|
|
5236
|
+
return D(this.locale);
|
|
5237
5237
|
},
|
|
5238
5238
|
error() {
|
|
5239
5239
|
var e;
|
|
@@ -5267,8 +5267,8 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5267
5267
|
var k;
|
|
5268
5268
|
const r = e[i.id] || [], s = W(i.last_read_message_id);
|
|
5269
5269
|
let a = 0, l = null;
|
|
5270
|
-
for (let
|
|
5271
|
-
const T = r[
|
|
5270
|
+
for (let w = r.length - 1; w >= 0; w--) {
|
|
5271
|
+
const T = r[w];
|
|
5272
5272
|
if (!T) continue;
|
|
5273
5273
|
if (((k = T.author) == null ? void 0 : k.type) === "user") break;
|
|
5274
5274
|
const E = W(T.id);
|
|
@@ -5278,11 +5278,11 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5278
5278
|
}
|
|
5279
5279
|
}
|
|
5280
5280
|
if (!r.length) {
|
|
5281
|
-
const
|
|
5282
|
-
|
|
5281
|
+
const w = W(i.last_message_id);
|
|
5282
|
+
w != null && (s == null || w > s) && (a = 1, l = i.last_message_author || null);
|
|
5283
5283
|
}
|
|
5284
5284
|
const p = r.filter(
|
|
5285
|
-
(
|
|
5285
|
+
(w) => !((w == null ? void 0 : w.id) != null && t[w.id] === 0)
|
|
5286
5286
|
);
|
|
5287
5287
|
return {
|
|
5288
5288
|
...i,
|
|
@@ -5510,7 +5510,7 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5510
5510
|
const t = (p = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
|
|
5511
5511
|
if (!t || typeof t != "object") return "";
|
|
5512
5512
|
const n = Object.entries(t);
|
|
5513
|
-
return n.length ? n.slice(0, 2).map(([k,
|
|
5513
|
+
return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
|
|
5514
5514
|
},
|
|
5515
5515
|
actionInFlight() {
|
|
5516
5516
|
var e, t;
|
|
@@ -5809,30 +5809,30 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5809
5809
|
this.launcherHovered = e, this.sendCurrentLauncherSize();
|
|
5810
5810
|
},
|
|
5811
5811
|
sendCurrentLauncherSize() {
|
|
5812
|
-
var T, E, A, H, S,
|
|
5812
|
+
var w, T, E, A, H, S, F;
|
|
5813
5813
|
if (this.isOpen) return;
|
|
5814
|
-
const e = (
|
|
5814
|
+
const e = (T = (w = this.$el) == null ? void 0 : w.querySelector) == null ? void 0 : T.call(w, ".wm-launcherWrap");
|
|
5815
5815
|
if (!e) return;
|
|
5816
5816
|
const t = e.getBoundingClientRect();
|
|
5817
5817
|
if (!t.width || !t.height) return;
|
|
5818
|
-
const n = (((
|
|
5819
|
-
let
|
|
5820
|
-
if (
|
|
5821
|
-
const
|
|
5822
|
-
|
|
5823
|
-
width: Math.ceil(
|
|
5824
|
-
height: Math.ceil(
|
|
5825
|
-
rightOffset: Math.max(0, Math.ceil(t.right -
|
|
5826
|
-
bottomOffset: Math.max(0, Math.ceil(t.bottom -
|
|
5818
|
+
const n = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, i = 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (H = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : H.call(A, ".wm-launcher"), l = (F = (S = this.$el) == null ? void 0 : S.querySelectorAll) == null ? void 0 : F.call(S, ".wm-peek"), p = l && l.length ? l[l.length - 1] : null;
|
|
5819
|
+
let k = null;
|
|
5820
|
+
if (p) {
|
|
5821
|
+
const L = p.getBoundingClientRect();
|
|
5822
|
+
k = {
|
|
5823
|
+
width: Math.ceil(L.width),
|
|
5824
|
+
height: Math.ceil(L.height),
|
|
5825
|
+
rightOffset: Math.max(0, Math.ceil(t.right - L.right)),
|
|
5826
|
+
bottomOffset: Math.max(0, Math.ceil(t.bottom - L.bottom))
|
|
5827
5827
|
};
|
|
5828
5828
|
}
|
|
5829
5829
|
this.notifyParentResize("closed", {
|
|
5830
5830
|
width: r + i,
|
|
5831
5831
|
height: s + i,
|
|
5832
|
-
launcherWidth:
|
|
5833
|
-
launcherHeight:
|
|
5832
|
+
launcherWidth: (a == null ? void 0 : a.offsetWidth) || null,
|
|
5833
|
+
launcherHeight: (a == null ? void 0 : a.offsetHeight) || null,
|
|
5834
5834
|
launcherHovered: this.launcherHovered,
|
|
5835
|
-
peek:
|
|
5835
|
+
peek: k,
|
|
5836
5836
|
peekHovered: this.launcherHovered && n
|
|
5837
5837
|
});
|
|
5838
5838
|
},
|
|
@@ -6093,11 +6093,11 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
6093
6093
|
class: "wm-attached"
|
|
6094
6094
|
}, qa = ["aria-label", "onClick"];
|
|
6095
6095
|
function $a(e, t, n, i, r, s) {
|
|
6096
|
-
const a = R("Launcher"), l = R("Header"), p = R("Onboarding"), k = R("MessageList"),
|
|
6096
|
+
const a = R("Launcher"), l = R("Header"), p = R("Onboarding"), k = R("MessageList"), w = R("ApprovalCard"), T = R("FormCard"), E = R("Feedback"), A = R("SuggestionChips"), H = R("Composer"), S = R("MoreMenu"), F = R("RenameDialog");
|
|
6097
6097
|
return c(), u("div", {
|
|
6098
6098
|
class: O(["wm-root", `wm-root--${n.displayMode}`])
|
|
6099
6099
|
}, [
|
|
6100
|
-
!r.isOpen && !s.isEmbedded ? (c(),
|
|
6100
|
+
!r.isOpen && !s.isEmbedded ? (c(), P(a, {
|
|
6101
6101
|
key: 0,
|
|
6102
6102
|
"unread-count": s.unreadCount,
|
|
6103
6103
|
peeks: s.launcherPeeks,
|
|
@@ -6115,7 +6115,7 @@ function $a(e, t, n, i, r, s) {
|
|
|
6115
6115
|
style: q(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
|
|
6116
6116
|
role: "dialog",
|
|
6117
6117
|
"aria-label": "Messenger",
|
|
6118
|
-
onClick: t[5] || (t[5] = (...
|
|
6118
|
+
onClick: t[5] || (t[5] = (...L) => s.onPanelClick && s.onPanelClick(...L))
|
|
6119
6119
|
}, [
|
|
6120
6120
|
!s.ready && !s.error ? (c(), u("div", Ea, [
|
|
6121
6121
|
s.isEmbedded ? y("", !0) : (c(), u("button", {
|
|
@@ -6123,7 +6123,7 @@ function $a(e, t, n, i, r, s) {
|
|
|
6123
6123
|
type: "button",
|
|
6124
6124
|
class: "wm-loading__close",
|
|
6125
6125
|
"aria-label": s.t("loading.minimize"),
|
|
6126
|
-
onClick: t[0] || (t[0] = (...
|
|
6126
|
+
onClick: t[0] || (t[0] = (...L) => s.close && s.close(...L))
|
|
6127
6127
|
}, [...t[6] || (t[6] = [
|
|
6128
6128
|
o("svg", {
|
|
6129
6129
|
width: "13",
|
|
@@ -6197,7 +6197,7 @@ function $a(e, t, n, i, r, s) {
|
|
|
6197
6197
|
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-id", "unread-boundary-ts", "ai-agent-name", "ai-agent-avatar-url", "onLoadMore"]),
|
|
6198
6198
|
o("div", Ua, [
|
|
6199
6199
|
s.floatVisible ? (c(), u("div", Da, [
|
|
6200
|
-
s.approvalReady ? (c(),
|
|
6200
|
+
s.approvalReady ? (c(), P(w, {
|
|
6201
6201
|
key: 0,
|
|
6202
6202
|
action: s.approvalTitle,
|
|
6203
6203
|
detail: s.approvalDetail,
|
|
@@ -6205,18 +6205,18 @@ function $a(e, t, n, i, r, s) {
|
|
|
6205
6205
|
"agent-name": s.agentName,
|
|
6206
6206
|
"agent-avatar-url": s.agentAvatarUrl,
|
|
6207
6207
|
onCallback: s.onApprovalCallback
|
|
6208
|
-
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(),
|
|
6208
|
+
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), P(T, {
|
|
6209
6209
|
key: s.pendingForm.message && s.pendingForm.message.id,
|
|
6210
6210
|
form: s.pendingForm.form,
|
|
6211
6211
|
"agent-name": s.agentName,
|
|
6212
6212
|
"agent-avatar-url": s.agentAvatarUrl,
|
|
6213
6213
|
onSubmit: s.onFormSubmit
|
|
6214
|
-
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(),
|
|
6214
|
+
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), P(E, {
|
|
6215
6215
|
key: 2,
|
|
6216
6216
|
busy: r.feedbackBusy,
|
|
6217
6217
|
done: r.feedbackDone,
|
|
6218
6218
|
onSubmit: s.onFeedback
|
|
6219
|
-
}, null, 8, ["busy", "done", "onSubmit"])) : (c(),
|
|
6219
|
+
}, null, 8, ["busy", "done", "onSubmit"])) : (c(), P(A, {
|
|
6220
6220
|
key: 3,
|
|
6221
6221
|
items: s.suggestions,
|
|
6222
6222
|
onSelect: s.onSuggestion
|
|
@@ -6230,11 +6230,11 @@ function $a(e, t, n, i, r, s) {
|
|
|
6230
6230
|
o("span", Ha, v(s.t("action.inProgress", {
|
|
6231
6231
|
name: s.actionInFlightName
|
|
6232
6232
|
})), 1)
|
|
6233
|
-
])) : (c(),
|
|
6233
|
+
])) : (c(), P(H, {
|
|
6234
6234
|
key: 2,
|
|
6235
6235
|
ref: "composer",
|
|
6236
6236
|
modelValue: r.draft,
|
|
6237
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
6237
|
+
"onUpdate:modelValue": t[1] || (t[1] = (L) => r.draft = L),
|
|
6238
6238
|
placeholder: s.composerPlaceholder,
|
|
6239
6239
|
disabled: !!s.pendingApproval,
|
|
6240
6240
|
"attach-label": s.t("composer.attachFile"),
|
|
@@ -6243,7 +6243,7 @@ function $a(e, t, n, i, r, s) {
|
|
|
6243
6243
|
onAttach: s.onAttach
|
|
6244
6244
|
}, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "display-mode", "onSend", "onAttach"]))
|
|
6245
6245
|
]),
|
|
6246
|
-
r.moreOpen ? (c(),
|
|
6246
|
+
r.moreOpen ? (c(), P(S, {
|
|
6247
6247
|
key: 0,
|
|
6248
6248
|
"can-rename": !!s.currentConv && !s.currentConv._draft,
|
|
6249
6249
|
"can-export": !!s.currentConv && !s.currentConv._draft,
|
|
@@ -6251,21 +6251,21 @@ function $a(e, t, n, i, r, s) {
|
|
|
6251
6251
|
"browser-notif-enabled": e.browserNotifEnabled,
|
|
6252
6252
|
"status-url": s.statusUrl,
|
|
6253
6253
|
"help-url": s.helpUrl,
|
|
6254
|
-
onClose: t[2] || (t[2] = (
|
|
6254
|
+
onClose: t[2] || (t[2] = (L) => r.moreOpen = !1),
|
|
6255
6255
|
onSoundToggle: e.onSoundToggle,
|
|
6256
6256
|
onBrowserNotifToggle: e.onBrowserNotifToggle,
|
|
6257
6257
|
onAction: s.onMoreAction
|
|
6258
6258
|
}, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : y("", !0),
|
|
6259
|
-
r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), F
|
|
6259
|
+
r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), P(F, {
|
|
6260
6260
|
key: 1,
|
|
6261
6261
|
"initial-value": s.currentConv.name || "",
|
|
6262
6262
|
title: s.t("rename.dialogTitle"),
|
|
6263
|
-
onClose: t[3] || (t[3] = (
|
|
6263
|
+
onClose: t[3] || (t[3] = (L) => r.renameDialogOpen = !1),
|
|
6264
6264
|
onSubmit: s.onRenameSubmit
|
|
6265
6265
|
}, null, 8, ["initial-value", "title", "onSubmit"])) : y("", !0),
|
|
6266
6266
|
r.pendingAttachments.length ? (c(), u("div", za, [
|
|
6267
|
-
(c(!0), u(B, null,
|
|
6268
|
-
key:
|
|
6267
|
+
(c(!0), u(B, null, U(r.pendingAttachments, (L, z) => (c(), u("div", {
|
|
6268
|
+
key: z,
|
|
6269
6269
|
class: "wm-attached__chip"
|
|
6270
6270
|
}, [
|
|
6271
6271
|
t[11] || (t[11] = o("svg", {
|
|
@@ -6281,11 +6281,11 @@ function $a(e, t, n, i, r, s) {
|
|
|
6281
6281
|
}, [
|
|
6282
6282
|
o("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" })
|
|
6283
6283
|
], -1)),
|
|
6284
|
-
o("span", null, v(
|
|
6284
|
+
o("span", null, v(L.name), 1),
|
|
6285
6285
|
o("button", {
|
|
6286
6286
|
type: "button",
|
|
6287
6287
|
"aria-label": s.t("attachment.remove"),
|
|
6288
|
-
onClick: (Y) => r.pendingAttachments.splice(
|
|
6288
|
+
onClick: (Y) => r.pendingAttachments.splice(z, 1)
|
|
6289
6289
|
}, [...t[10] || (t[10] = [
|
|
6290
6290
|
o("svg", {
|
|
6291
6291
|
width: "10",
|
|
@@ -6303,7 +6303,7 @@ function $a(e, t, n, i, r, s) {
|
|
|
6303
6303
|
])], 8, qa)
|
|
6304
6304
|
]))), 128))
|
|
6305
6305
|
])) : y("", !0)
|
|
6306
|
-
], 64)) : (c(),
|
|
6306
|
+
], 64)) : (c(), P(p, {
|
|
6307
6307
|
key: 1,
|
|
6308
6308
|
"welcome-message": s.widgetWelcomeMessage,
|
|
6309
6309
|
subtitle: s.widgetSubtitle,
|
|
@@ -6316,7 +6316,7 @@ function $a(e, t, n, i, r, s) {
|
|
|
6316
6316
|
onSelect: s.onQuickLink,
|
|
6317
6317
|
onResume: s.onDrawerPick
|
|
6318
6318
|
}, null, 8, ["welcome-message", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
6319
|
-
r.moreOpen && !s.currentConv ? (c(),
|
|
6319
|
+
r.moreOpen && !s.currentConv ? (c(), P(S, {
|
|
6320
6320
|
key: 3,
|
|
6321
6321
|
"can-rename": !1,
|
|
6322
6322
|
"can-export": !1,
|
|
@@ -6324,7 +6324,7 @@ function $a(e, t, n, i, r, s) {
|
|
|
6324
6324
|
"browser-notif-enabled": e.browserNotifEnabled,
|
|
6325
6325
|
"status-url": s.statusUrl,
|
|
6326
6326
|
"help-url": s.helpUrl,
|
|
6327
|
-
onClose: t[4] || (t[4] = (
|
|
6327
|
+
onClose: t[4] || (t[4] = (L) => r.moreOpen = !1),
|
|
6328
6328
|
onSoundToggle: e.onSoundToggle,
|
|
6329
6329
|
onBrowserNotifToggle: e.onBrowserNotifToggle,
|
|
6330
6330
|
onAction: s.onMoreAction
|
|
@@ -6333,7 +6333,7 @@ function $a(e, t, n, i, r, s) {
|
|
|
6333
6333
|
], 6)) : y("", !0)
|
|
6334
6334
|
], 2);
|
|
6335
6335
|
}
|
|
6336
|
-
const Wa = /* @__PURE__ */ N(Ia, [["render", $a], ["__scopeId", "data-v-
|
|
6336
|
+
const Wa = /* @__PURE__ */ N(Ia, [["render", $a], ["__scopeId", "data-v-3c8435c2"]]), Ga = "0.5.35";
|
|
6337
6337
|
export {
|
|
6338
6338
|
le as AIAvatar,
|
|
6339
6339
|
ge as AVATAR_COLORS,
|
|
@@ -6367,9 +6367,9 @@ export {
|
|
|
6367
6367
|
ye as avatarColor,
|
|
6368
6368
|
we as avatarInitials,
|
|
6369
6369
|
Dr as captureScreenshotFile,
|
|
6370
|
-
|
|
6370
|
+
j as colors,
|
|
6371
6371
|
Qe as createStore,
|
|
6372
|
-
|
|
6372
|
+
D as createTranslator,
|
|
6373
6373
|
We as createTransport,
|
|
6374
6374
|
re as dateLocale,
|
|
6375
6375
|
Wa as default,
|