@_solaris/messenger-widget 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/messenger.cjs +8 -8
- package/dist/messenger.embed.js +13 -13
- package/dist/messenger.js +941 -905
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
const
|
|
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 X, createElementVNode as i, toDisplayString as b, createCommentVNode as y, normalizeStyle as V, normalizeClass as E, Fragment as M, renderList as j, resolveComponent as O, createBlock as $, createTextVNode as re, resolveDynamicComponent as Me, renderSlot as Te, withDirectives as H, vModelText as K, vModelCheckbox as Ie, vModelSelect as Oe, createStaticVNode as ue, markRaw as fe } from "vue";
|
|
2
|
+
const Ee = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
5
5
|
"message_stream",
|
|
6
6
|
"conversation_updated",
|
|
7
7
|
"config_updated",
|
|
8
8
|
"action_status"
|
|
9
|
-
],
|
|
10
|
-
function
|
|
9
|
+
], Be = 5 * 60 * 1e3, Le = 10 * 60 * 1e3, Re = 5 * 60 * 1e3;
|
|
10
|
+
function $e(t) {
|
|
11
11
|
const e = {
|
|
12
|
-
baseUrl:
|
|
12
|
+
baseUrl: Fe(t.baseUrl || ""),
|
|
13
13
|
widgetId: t.widgetId || "",
|
|
14
14
|
userId: t.userId || "",
|
|
15
15
|
userHash: t.userHash || "",
|
|
@@ -35,12 +35,12 @@ function Fe(t) {
|
|
|
35
35
|
return e.listeners.has(h) || e.listeners.set(h, /* @__PURE__ */ new Set()), e.listeners.get(h).add(f), () => e.listeners.get(h).delete(f);
|
|
36
36
|
}
|
|
37
37
|
function a(h, f) {
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const _ = e.listeners.get(h);
|
|
39
|
+
_ && _.forEach((k) => {
|
|
40
40
|
try {
|
|
41
41
|
k(f);
|
|
42
|
-
} catch (
|
|
43
|
-
console.error("[transport] listener", h,
|
|
42
|
+
} catch (I) {
|
|
43
|
+
console.error("[transport] listener", h, I);
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
}
|
|
@@ -54,21 +54,21 @@ function Fe(t) {
|
|
|
54
54
|
"X-Widget-Id": e.widgetId
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
async function o(h, f,
|
|
57
|
+
async function o(h, f, _) {
|
|
58
58
|
const k = await fetch(`${e.baseUrl}${f}`, {
|
|
59
59
|
method: h,
|
|
60
60
|
headers: { "Content-Type": "application/json", ...s() },
|
|
61
|
-
body:
|
|
61
|
+
body: _ !== void 0 ? JSON.stringify(_) : void 0
|
|
62
62
|
});
|
|
63
63
|
if (!k.ok) {
|
|
64
|
-
const
|
|
65
|
-
`HTTP ${k.status} ${h} ${f} :: ${(
|
|
64
|
+
const I = await c(k), T = new Error(
|
|
65
|
+
`HTTP ${k.status} ${h} ${f} :: ${(I == null ? void 0 : I.error) || k.statusText}`
|
|
66
66
|
);
|
|
67
|
-
throw T.status = k.status, T.body =
|
|
67
|
+
throw T.status = k.status, T.body = I, T;
|
|
68
68
|
}
|
|
69
69
|
return k.status === 204 ? null : k.json();
|
|
70
70
|
}
|
|
71
|
-
async function
|
|
71
|
+
async function c(h) {
|
|
72
72
|
try {
|
|
73
73
|
return await h.json();
|
|
74
74
|
} catch {
|
|
@@ -78,12 +78,12 @@ function Fe(t) {
|
|
|
78
78
|
async function v() {
|
|
79
79
|
const [h, f] = await Promise.all([
|
|
80
80
|
// Public — no HMAC required.
|
|
81
|
-
fetch(`${e.baseUrl}/widgets/${encodeURIComponent(e.widgetId)}/config`).then(async (
|
|
82
|
-
if (!
|
|
83
|
-
const k = await
|
|
84
|
-
throw new Error(`HTTP ${
|
|
81
|
+
fetch(`${e.baseUrl}/widgets/${encodeURIComponent(e.widgetId)}/config`).then(async (_) => {
|
|
82
|
+
if (!_.ok) {
|
|
83
|
+
const k = await c(_);
|
|
84
|
+
throw new Error(`HTTP ${_.status} GET /widgets/:id/config :: ${(k == null ? void 0 : k.error) || _.statusText}`);
|
|
85
85
|
}
|
|
86
|
-
return
|
|
86
|
+
return _.json();
|
|
87
87
|
}),
|
|
88
88
|
// HMAC-protected.
|
|
89
89
|
o("GET", "/customers/me")
|
|
@@ -118,68 +118,68 @@ function Fe(t) {
|
|
|
118
118
|
return (await o("PATCH", `/conversations/${encodeURIComponent(h)}`, f)).conversation;
|
|
119
119
|
}
|
|
120
120
|
async function x(h, f = {}) {
|
|
121
|
-
const
|
|
122
|
-
f.before &&
|
|
123
|
-
const k =
|
|
121
|
+
const _ = new URLSearchParams();
|
|
122
|
+
f.before && _.set("before", f.before), f.since && _.set("since", f.since), f.limit && _.set("limit", String(f.limit));
|
|
123
|
+
const k = _.toString() ? `?${_.toString()}` : "";
|
|
124
124
|
return o(
|
|
125
125
|
"GET",
|
|
126
126
|
`/conversations/${encodeURIComponent(h)}/messages${k}`
|
|
127
127
|
);
|
|
128
128
|
}
|
|
129
129
|
async function N(h, f) {
|
|
130
|
-
|
|
131
|
-
const
|
|
130
|
+
G();
|
|
131
|
+
const _ = {
|
|
132
132
|
client_msg_id: f.client_msg_id,
|
|
133
133
|
type: "content",
|
|
134
134
|
text_md: f.text_md,
|
|
135
135
|
author: { id: e.userId, type: "user" },
|
|
136
136
|
created_at: f.created_at || (/* @__PURE__ */ new Date()).toISOString()
|
|
137
137
|
};
|
|
138
|
-
return Array.isArray(f.attachments) && f.attachments.length && (
|
|
138
|
+
return Array.isArray(f.attachments) && f.attachments.length && (_.payload = { type: "content", attachments: f.attachments }), f.metadata && typeof f.metadata == "object" && (_.metadata = f.metadata), o(
|
|
139
139
|
"POST",
|
|
140
140
|
`/conversations/${encodeURIComponent(h)}/messages`,
|
|
141
|
-
|
|
141
|
+
_
|
|
142
142
|
);
|
|
143
143
|
}
|
|
144
|
-
async function
|
|
145
|
-
return
|
|
144
|
+
async function F(h, f, _) {
|
|
145
|
+
return G(), o(
|
|
146
146
|
"POST",
|
|
147
147
|
`/messages/${encodeURIComponent(h)}/callbacks/${encodeURIComponent(f)}`,
|
|
148
|
-
|
|
148
|
+
_ ? { inputs: _ } : {}
|
|
149
149
|
);
|
|
150
150
|
}
|
|
151
|
-
async function
|
|
151
|
+
async function P(h) {
|
|
152
152
|
const f = (
|
|
153
153
|
/** @type {File} */
|
|
154
154
|
h.name || "attachment"
|
|
155
|
-
),
|
|
155
|
+
), _ = h.type || "application/octet-stream", k = h.size || 0, I = (
|
|
156
156
|
/** @type {import('./types.js').AttachmentUploadTicket} */
|
|
157
157
|
await o("POST", "/attachments", {
|
|
158
|
-
mime_type:
|
|
158
|
+
mime_type: _,
|
|
159
159
|
size_bytes: k,
|
|
160
160
|
name: f
|
|
161
161
|
})
|
|
162
|
-
), T = await fetch(
|
|
162
|
+
), T = await fetch(I.upload_url, {
|
|
163
163
|
method: "PUT",
|
|
164
|
-
headers: { "Content-Type":
|
|
164
|
+
headers: { "Content-Type": _ },
|
|
165
165
|
body: h
|
|
166
166
|
});
|
|
167
167
|
if (!T.ok)
|
|
168
168
|
throw new Error(`HTTP ${T.status} PUT signed upload`);
|
|
169
169
|
return {
|
|
170
|
-
type:
|
|
171
|
-
path:
|
|
172
|
-
mime_type:
|
|
170
|
+
type: je(_),
|
|
171
|
+
path: I.path,
|
|
172
|
+
mime_type: _,
|
|
173
173
|
size_bytes: k
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
async function
|
|
176
|
+
async function q(h) {
|
|
177
177
|
return o(
|
|
178
178
|
"GET",
|
|
179
179
|
`/attachments/sign?path=${encodeURIComponent(h)}`
|
|
180
180
|
);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function Y() {
|
|
183
183
|
const h = new URLSearchParams({
|
|
184
184
|
userId: e.userId,
|
|
185
185
|
userHash: e.userHash,
|
|
@@ -187,12 +187,12 @@ function Fe(t) {
|
|
|
187
187
|
}).toString();
|
|
188
188
|
return `${e.baseUrl}/stream?${h}`;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function W() {
|
|
191
191
|
if (!e.eventSource && !(typeof document < "u" && document.hidden))
|
|
192
192
|
try {
|
|
193
|
-
const h = new EventSource(
|
|
194
|
-
for (const f of
|
|
195
|
-
h.addEventListener(f, (
|
|
193
|
+
const h = new EventSource(Y());
|
|
194
|
+
for (const f of Ee)
|
|
195
|
+
h.addEventListener(f, (_) => ie(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);
|
|
@@ -200,36 +200,36 @@ function Fe(t) {
|
|
|
200
200
|
}
|
|
201
201
|
function ie(h, f) {
|
|
202
202
|
try {
|
|
203
|
-
const
|
|
203
|
+
const _ = JSON.parse(f), k = _ && typeof _ == "object" && "data" in _ ? _.data : _;
|
|
204
204
|
a(h, k);
|
|
205
|
-
} catch (
|
|
206
|
-
console.error("[transport] bad SSE payload", h,
|
|
205
|
+
} catch (_) {
|
|
206
|
+
console.error("[transport] bad SSE payload", h, _);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function J() {
|
|
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 ||
|
|
215
|
-
},
|
|
212
|
+
function G() {
|
|
213
|
+
clearTimeout(e.burstTimer), W(), e.panelOpen || (e.burstTimer = setTimeout(() => {
|
|
214
|
+
e.panelOpen || J();
|
|
215
|
+
}, Le));
|
|
216
216
|
}
|
|
217
217
|
function ae(h) {
|
|
218
|
-
e.panelOpen = !!h, e.panelOpen ? (clearTimeout(e.burstTimer),
|
|
218
|
+
e.panelOpen = !!h, e.panelOpen ? (clearTimeout(e.burstTimer), W()) : G();
|
|
219
219
|
}
|
|
220
220
|
async function oe() {
|
|
221
221
|
try {
|
|
222
|
-
const h = await S(), f = h.reduce((k,
|
|
223
|
-
const T =
|
|
222
|
+
const h = await S(), f = h.reduce((k, I) => {
|
|
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 }), G());
|
|
227
227
|
} catch (h) {
|
|
228
228
|
console.error("[transport] poll failed", h);
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
function
|
|
232
|
-
u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(oe,
|
|
231
|
+
function Z() {
|
|
232
|
+
u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(oe, Be));
|
|
233
233
|
}
|
|
234
234
|
function u() {
|
|
235
235
|
e.pollTimer && (clearInterval(e.pollTimer), e.pollTimer = null);
|
|
@@ -237,38 +237,38 @@ function Fe(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(),
|
|
241
|
-
},
|
|
240
|
+
e.hiddenGraceTimer = null, document.hidden && (u(), J(), r("paused"));
|
|
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"), Z(), e.panelOpen && W();
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
async function
|
|
250
|
+
async function p() {
|
|
251
251
|
if (e.started) return e.lastBootstrap;
|
|
252
252
|
e.started = !0;
|
|
253
253
|
const h = await v();
|
|
254
254
|
e.lastBootstrap = h;
|
|
255
255
|
try {
|
|
256
256
|
const f = await S();
|
|
257
|
-
e.lastActivityAt = f.reduce((
|
|
258
|
-
const
|
|
259
|
-
return
|
|
257
|
+
e.lastActivityAt = f.reduce((_, k) => {
|
|
258
|
+
const I = k == null ? void 0 : k.last_message_at;
|
|
259
|
+
return I && (!_ || I > _) ? I : _;
|
|
260
260
|
}, null);
|
|
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)), Z(), 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, J(), e.visibilityHandler && (document.removeEventListener("visibilitychange", e.visibilityHandler), e.visibilityHandler = null), e.started = !1;
|
|
268
268
|
}
|
|
269
269
|
return {
|
|
270
270
|
on: n,
|
|
271
|
-
start:
|
|
271
|
+
start: p,
|
|
272
272
|
stop: g,
|
|
273
273
|
setPanelOpen: ae,
|
|
274
274
|
// REST
|
|
@@ -281,22 +281,22 @@ function Fe(t) {
|
|
|
281
281
|
patchConversation: D,
|
|
282
282
|
listMessages: x,
|
|
283
283
|
postMessage: N,
|
|
284
|
-
postCallback:
|
|
285
|
-
uploadAttachment:
|
|
286
|
-
signAttachment:
|
|
284
|
+
postCallback: F,
|
|
285
|
+
uploadAttachment: P,
|
|
286
|
+
signAttachment: q,
|
|
287
287
|
// Read-only state
|
|
288
288
|
get connection() {
|
|
289
289
|
return e.connection;
|
|
290
290
|
}
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Fe(t) {
|
|
294
294
|
return t.endsWith("/") ? t.slice(0, -1) : t;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function je(t) {
|
|
297
297
|
return t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : t.startsWith("audio/") ? "audio" : "file";
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Ue() {
|
|
300
300
|
if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
|
|
301
301
|
return crypto.randomUUID();
|
|
302
302
|
const t = new Uint8Array(16);
|
|
@@ -308,8 +308,8 @@ function De() {
|
|
|
308
308
|
const e = [...t].map((n) => n.toString(16).padStart(2, "0"));
|
|
309
309
|
return e.slice(0, 4).join("") + "-" + e.slice(4, 6).join("") + "-" + e.slice(6, 8).join("") + "-" + e.slice(8, 10).join("") + "-" + e.slice(10, 16).join("");
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
const e =
|
|
311
|
+
function De(t) {
|
|
312
|
+
const e = Ae({
|
|
313
313
|
ready: !1,
|
|
314
314
|
error: null,
|
|
315
315
|
config: null,
|
|
@@ -343,30 +343,30 @@ function Ne(t) {
|
|
|
343
343
|
n.push(t.on("connection", (u) => {
|
|
344
344
|
e.connection = u;
|
|
345
345
|
})), n.push(t.on("message", (u) => {
|
|
346
|
-
const m = u == null ? void 0 : u.conversation_id,
|
|
347
|
-
!m || !(
|
|
346
|
+
const m = u == null ? void 0 : u.conversation_id, p = u == null ? void 0 : u.message;
|
|
347
|
+
!m || !(p != null && p.id) || (W(m, p), p.client_msg_id && delete e.streamingByMsgId[p.client_msg_id], G(m, p.created_at));
|
|
348
348
|
})), n.push(t.on("message_stream", (u) => {
|
|
349
|
-
const m = u == null ? void 0 : u.message_id,
|
|
350
|
-
!m || typeof
|
|
349
|
+
const m = u == null ? void 0 : u.message_id, p = u == null ? void 0 : u.token;
|
|
350
|
+
!m || typeof p != "string" || (e.streamingByMsgId[m] = (e.streamingByMsgId[m] || "") + p);
|
|
351
351
|
})), n.push(t.on("conversation_updated", (u) => {
|
|
352
|
-
const m = u == null ? void 0 : u.conversation_id,
|
|
353
|
-
if (!m || !
|
|
352
|
+
const m = u == null ? void 0 : u.conversation_id, p = u == null ? void 0 : u.changes;
|
|
353
|
+
if (!m || !p) return;
|
|
354
354
|
const g = e.conversations.findIndex((h) => h.id === m);
|
|
355
|
-
g !== -1 && (e.conversations[g] = { ...e.conversations[g], ...
|
|
355
|
+
g !== -1 && (e.conversations[g] = { ...e.conversations[g], ...p });
|
|
356
356
|
})), n.push(t.on("config_updated", (u) => {
|
|
357
357
|
u != null && u.config && (e.config = u.config);
|
|
358
358
|
})), n.push(t.on("action_status", (u) => {
|
|
359
|
-
const m = u == null ? void 0 : u.conversation_id,
|
|
360
|
-
if (!m || !
|
|
359
|
+
const m = u == null ? void 0 : u.conversation_id, p = u == null ? void 0 : u.action_id, g = u == null ? void 0 : u.action_name;
|
|
360
|
+
if (!m || !p) return;
|
|
361
361
|
const h = e.runningActionsByConv[m] || {};
|
|
362
|
-
u.state === "running" ? (h[
|
|
362
|
+
u.state === "running" ? (h[p] = g || p, e.runningActionsByConv[m] = { ...h }) : u.state === "done" && (delete h[p], e.runningActionsByConv[m] = { ...h });
|
|
363
363
|
})), n.push(t.on("activity", (u) => {
|
|
364
364
|
Array.isArray(u == null ? void 0 : u.conversations) && (e.conversations = u.conversations);
|
|
365
365
|
}));
|
|
366
366
|
async function a() {
|
|
367
367
|
try {
|
|
368
368
|
const u = new Promise(
|
|
369
|
-
(
|
|
369
|
+
(p, g) => setTimeout(() => g(new Error("bootstrap timeout (15s) — check baseUrl, CORS, and network")), 15e3)
|
|
370
370
|
), m = await Promise.race([t.start(), u]);
|
|
371
371
|
e.config = m.config, e.customer = m.customer, e.conversations = await Promise.race([t.listConversations(), u]), e.ready = !0;
|
|
372
372
|
} catch (u) {
|
|
@@ -385,21 +385,21 @@ function Ne(t) {
|
|
|
385
385
|
const m = oe(u);
|
|
386
386
|
if (!m) return e.customer;
|
|
387
387
|
try {
|
|
388
|
-
const
|
|
389
|
-
|
|
390
|
-
} catch (
|
|
391
|
-
console.error("[store] applyCustomer failed",
|
|
388
|
+
const p = await t.patchCustomer(m);
|
|
389
|
+
p && (e.customer = p);
|
|
390
|
+
} catch (p) {
|
|
391
|
+
console.error("[store] applyCustomer failed", p);
|
|
392
392
|
}
|
|
393
393
|
return e.customer;
|
|
394
394
|
}
|
|
395
395
|
async function o(u = {}) {
|
|
396
|
-
const m = await t.createConversation(u),
|
|
397
|
-
return
|
|
396
|
+
const m = await t.createConversation(u), p = e.conversations.findIndex((g) => g.id === m.id);
|
|
397
|
+
return p === -1 ? e.conversations = [m, ...e.conversations] : e.conversations[p] = m, m;
|
|
398
398
|
}
|
|
399
|
-
const
|
|
399
|
+
const c = 50;
|
|
400
400
|
async function v(u) {
|
|
401
401
|
if (e.messagesByConv[u]) return;
|
|
402
|
-
const m = await t.listMessages(u, { limit:
|
|
402
|
+
const m = await t.listMessages(u, { limit: c });
|
|
403
403
|
e.messagesByConv[u] = (m == null ? void 0 : m.messages) ?? [], w(u, {
|
|
404
404
|
nextCursor: (m == null ? void 0 : m.next_cursor) ?? null,
|
|
405
405
|
loading: !1,
|
|
@@ -411,22 +411,22 @@ function Ne(t) {
|
|
|
411
411
|
if (!(!m || m.loading || !m.nextCursor)) {
|
|
412
412
|
w(u, { ...m, loading: !0 });
|
|
413
413
|
try {
|
|
414
|
-
let h = m.nextCursor, f = [],
|
|
415
|
-
for (;
|
|
414
|
+
let h = m.nextCursor, f = [], _ = 0;
|
|
415
|
+
for (; _ < 6 && h; _++) {
|
|
416
416
|
const L = await t.listMessages(u, {
|
|
417
417
|
before: h,
|
|
418
|
-
limit:
|
|
419
|
-
}),
|
|
420
|
-
if (f = [...
|
|
418
|
+
limit: c
|
|
419
|
+
}), ee = (L == null ? void 0 : L.messages) ?? [];
|
|
420
|
+
if (f = [...ee, ...f], h = (L == null ? void 0 : L.next_cursor) ?? null, !ee.length || f.length >= 60) break;
|
|
421
421
|
}
|
|
422
|
-
const k = e.messagesByConv[u] || [],
|
|
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,
|
|
426
426
|
loaded: !0
|
|
427
427
|
});
|
|
428
|
-
} catch (
|
|
429
|
-
console.error("[store] loadMore failed",
|
|
428
|
+
} catch (p) {
|
|
429
|
+
console.error("[store] loadMore failed", p), w(u, { ...m, loading: !1 });
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
}
|
|
@@ -434,16 +434,16 @@ function Ne(t) {
|
|
|
434
434
|
e.paginationByConv = { ...e.paginationByConv, [u]: m };
|
|
435
435
|
}
|
|
436
436
|
async function S(u, m) {
|
|
437
|
-
const
|
|
438
|
-
g !== -1 && (e.conversations[g] =
|
|
437
|
+
const p = await t.patchConversation(u, m), g = e.conversations.findIndex((h) => h.id === u);
|
|
438
|
+
g !== -1 && (e.conversations[g] = p);
|
|
439
439
|
}
|
|
440
|
-
async function R(u, m, { attachments:
|
|
440
|
+
async function R(u, m, { attachments: p, metadata: g } = {}) {
|
|
441
441
|
var T;
|
|
442
|
-
const h = (m || "").trim(), f = Array.isArray(
|
|
442
|
+
const h = (m || "").trim(), f = Array.isArray(p) && p.length > 0;
|
|
443
443
|
if (!u || !h && !f) return;
|
|
444
|
-
const
|
|
445
|
-
id:
|
|
446
|
-
client_msg_id:
|
|
444
|
+
const _ = Ue(), k = Z(u), I = {
|
|
445
|
+
id: _,
|
|
446
|
+
client_msg_id: _,
|
|
447
447
|
conversation_id: u,
|
|
448
448
|
type: "content",
|
|
449
449
|
text_md: h,
|
|
@@ -454,26 +454,26 @@ function Ne(t) {
|
|
|
454
454
|
created_at: k,
|
|
455
455
|
// Local-only flag — UI may render dimmed until the SSE echo lands.
|
|
456
456
|
_pending: !0,
|
|
457
|
-
...f ? { payload: { type: "content", attachments:
|
|
457
|
+
...f ? { payload: { type: "content", attachments: p } } : {},
|
|
458
458
|
...g && typeof g == "object" ? { metadata: g } : {}
|
|
459
459
|
};
|
|
460
|
-
|
|
460
|
+
W(u, I);
|
|
461
461
|
try {
|
|
462
462
|
await t.postMessage(u, {
|
|
463
|
-
client_msg_id:
|
|
463
|
+
client_msg_id: _,
|
|
464
464
|
text_md: h,
|
|
465
465
|
created_at: k,
|
|
466
|
-
...f ? { attachments:
|
|
466
|
+
...f ? { attachments: p } : {},
|
|
467
467
|
...g && typeof g == "object" ? { metadata: g } : {}
|
|
468
468
|
});
|
|
469
469
|
} catch (L) {
|
|
470
|
-
console.error("[store] send failed", L),
|
|
470
|
+
console.error("[store] send failed", L), J(u, _, { _failed: !0, _pending: !1 });
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
async function A(u, m,
|
|
473
|
+
async function A(u, m, p) {
|
|
474
474
|
u != null && (e.awaitingCallback[u] = !0);
|
|
475
475
|
try {
|
|
476
|
-
await t.postCallback(u, m,
|
|
476
|
+
await t.postCallback(u, m, p);
|
|
477
477
|
} catch (g) {
|
|
478
478
|
console.error("[store] callback failed", g), u != null && delete e.awaitingCallback[u];
|
|
479
479
|
}
|
|
@@ -483,69 +483,69 @@ function Ne(t) {
|
|
|
483
483
|
if (!u) return null;
|
|
484
484
|
const m = D.get(u);
|
|
485
485
|
if (m != null && m.url) {
|
|
486
|
-
const
|
|
487
|
-
if (!
|
|
486
|
+
const p = m.expires_at ? Date.parse(m.expires_at) : 0;
|
|
487
|
+
if (!p || p - Date.now() > 6e4) return m.url;
|
|
488
488
|
}
|
|
489
489
|
try {
|
|
490
|
-
const
|
|
491
|
-
if (
|
|
492
|
-
return D.set(u, { url:
|
|
493
|
-
} catch (
|
|
494
|
-
console.error("[store] sign attachment failed",
|
|
490
|
+
const p = await t.signAttachment(u);
|
|
491
|
+
if (p != null && p.signed_url)
|
|
492
|
+
return D.set(u, { url: p.signed_url, expires_at: p.expires_at }), p.signed_url;
|
|
493
|
+
} catch (p) {
|
|
494
|
+
console.error("[store] sign attachment failed", p);
|
|
495
495
|
}
|
|
496
496
|
return null;
|
|
497
497
|
}
|
|
498
|
-
async function N(u, { rating: m, comment:
|
|
499
|
-
const g = e.conversations.find((
|
|
498
|
+
async function N(u, { rating: m, comment: p } = {}) {
|
|
499
|
+
const g = e.conversations.find((_) => _.id === u), f = {
|
|
500
500
|
...(g == null ? void 0 : g.metadata) || {},
|
|
501
501
|
feedback: {
|
|
502
502
|
rating: m,
|
|
503
|
-
comment:
|
|
503
|
+
comment: p || null,
|
|
504
504
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
505
505
|
}
|
|
506
506
|
};
|
|
507
507
|
await S(u, { metadata: f });
|
|
508
508
|
}
|
|
509
|
-
function
|
|
510
|
-
var
|
|
509
|
+
function F(u) {
|
|
510
|
+
var p, g;
|
|
511
511
|
const m = e.messagesByConv[u] || [];
|
|
512
512
|
for (let h = m.length - 1; h >= 0; h--) {
|
|
513
513
|
const f = m[h];
|
|
514
|
-
if ((f == null ? void 0 : f.type) === "action" && ((
|
|
514
|
+
if ((f == null ? void 0 : f.type) === "action" && ((p = f == null ? void 0 : f.payload) == null ? void 0 : p.type) === "action" && ((g = f == null ? void 0 : f.payload) == null ? void 0 : g.state) === "pending" && Array.isArray(f == null ? void 0 : f.callbacks) && f.callbacks.length > 0 && !e.awaitingCallback[f.id])
|
|
515
515
|
return f;
|
|
516
516
|
}
|
|
517
517
|
return null;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
520
|
-
var
|
|
519
|
+
function P(u) {
|
|
520
|
+
var p, g, h;
|
|
521
521
|
const m = e.messagesByConv[u] || [];
|
|
522
522
|
for (let f = m.length - 1; f >= 0; f--) {
|
|
523
|
-
const
|
|
524
|
-
if (((
|
|
525
|
-
const k = (h =
|
|
523
|
+
const _ = m[f];
|
|
524
|
+
if (((p = _ == null ? void 0 : _.author) == null ? void 0 : p.type) === "user" || (_ == null ? void 0 : _.type) === "action" && ((g = _ == null ? void 0 : _.payload) == null ? void 0 : g.state) === "pending") return null;
|
|
525
|
+
const k = (h = _ == null ? void 0 : _.metadata) == null ? void 0 : h.form;
|
|
526
526
|
if (k && Array.isArray(k.fields) && k.fields.length > 0)
|
|
527
|
-
return { message:
|
|
527
|
+
return { message: _, form: k };
|
|
528
528
|
}
|
|
529
529
|
return null;
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function q(u) {
|
|
532
532
|
const m = e.runningActionsByConv[u];
|
|
533
533
|
if (!m) return null;
|
|
534
|
-
const
|
|
535
|
-
if (
|
|
536
|
-
const g =
|
|
534
|
+
const p = Object.keys(m);
|
|
535
|
+
if (p.length === 0) return null;
|
|
536
|
+
const g = p[0];
|
|
537
537
|
return { id: g, payload: { name: m[g] } };
|
|
538
538
|
}
|
|
539
|
-
function
|
|
540
|
-
var
|
|
539
|
+
function Y(u) {
|
|
540
|
+
var p, g, h, f;
|
|
541
541
|
const m = e.messagesByConv[u] || [];
|
|
542
|
-
for (let
|
|
543
|
-
const k = m[
|
|
544
|
-
if (((
|
|
542
|
+
for (let _ = m.length - 1; _ >= 0; _--) {
|
|
543
|
+
const k = m[_];
|
|
544
|
+
if (((p = k == null ? void 0 : k.author) == null ? void 0 : p.type) === "user") return [];
|
|
545
545
|
if ((k == null ? void 0 : k.type) === "action" && ((g = k == null ? void 0 : k.payload) == null ? void 0 : g.state) === "pending") return [];
|
|
546
546
|
if (((h = k == null ? void 0 : k.author) == null ? void 0 : h.type) !== "agent_ia") continue;
|
|
547
|
-
const
|
|
548
|
-
return Array.isArray(
|
|
547
|
+
const I = (f = k == null ? void 0 : k.metadata) == null ? void 0 : f.suggested_replies;
|
|
548
|
+
return Array.isArray(I) && I.length ? I.map((T) => {
|
|
549
549
|
if (typeof T == "string") {
|
|
550
550
|
const L = T.trim();
|
|
551
551
|
return L ? { label: L, kind: null } : null;
|
|
@@ -553,43 +553,43 @@ function Ne(t) {
|
|
|
553
553
|
if (T && typeof T == "object" && typeof T.label == "string") {
|
|
554
554
|
const L = T.label.trim();
|
|
555
555
|
if (!L) return null;
|
|
556
|
-
const
|
|
557
|
-
return { label: L, kind:
|
|
556
|
+
const ee = T.kind === "cta" || T.kind === "choice" || T.kind === "followup" ? T.kind : null;
|
|
557
|
+
return { label: L, kind: ee };
|
|
558
558
|
}
|
|
559
559
|
return null;
|
|
560
560
|
}).filter(Boolean).slice(0, 4) : [];
|
|
561
561
|
}
|
|
562
562
|
return [];
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function W(u, m) {
|
|
565
565
|
var f;
|
|
566
|
-
const
|
|
566
|
+
const p = e.messagesByConv[u] || [];
|
|
567
567
|
let g = -1;
|
|
568
|
-
m != null && m.client_msg_id && (g =
|
|
569
|
-
(
|
|
570
|
-
)), g === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (g =
|
|
568
|
+
m != null && m.client_msg_id && (g = p.findIndex(
|
|
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((_) => ie(_ == null ? void 0 : _.id, m.id)));
|
|
571
571
|
let h;
|
|
572
|
-
g === -1 ? h = [...
|
|
572
|
+
g === -1 ? h = [...p, m].sort(ae) : (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
574
|
function ie(u, m) {
|
|
575
575
|
return u === m ? !0 : u == null || m == null ? !1 : String(u) === String(m);
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function J(u, m, p) {
|
|
578
578
|
const g = e.messagesByConv[u];
|
|
579
579
|
if (!g) return;
|
|
580
|
-
const h = g.findIndex((
|
|
580
|
+
const h = g.findIndex((_) => _.id === m);
|
|
581
581
|
if (h === -1) return;
|
|
582
582
|
const f = g.slice();
|
|
583
|
-
f[h] = { ...g[h], ...
|
|
583
|
+
f[h] = { ...g[h], ...p }, e.messagesByConv[u] = f;
|
|
584
584
|
}
|
|
585
|
-
function
|
|
586
|
-
const
|
|
587
|
-
if (
|
|
588
|
-
const g = e.conversations[
|
|
585
|
+
function G(u, m) {
|
|
586
|
+
const p = e.conversations.findIndex((h) => h.id === u);
|
|
587
|
+
if (p === -1) return;
|
|
588
|
+
const g = e.conversations[p];
|
|
589
589
|
if (m && (!g.last_message_at || m > g.last_message_at)) {
|
|
590
590
|
const h = e.conversations.slice();
|
|
591
|
-
h[
|
|
592
|
-
(f,
|
|
591
|
+
h[p] = { ...g, last_message_at: m }, h.sort(
|
|
592
|
+
(f, _) => (_.last_message_at || "").localeCompare(f.last_message_at || "")
|
|
593
593
|
), e.conversations = h;
|
|
594
594
|
}
|
|
595
595
|
}
|
|
@@ -598,18 +598,18 @@ function Ne(t) {
|
|
|
598
598
|
}
|
|
599
599
|
function oe(u) {
|
|
600
600
|
if (!u || typeof u != "object") return null;
|
|
601
|
-
const m = {},
|
|
601
|
+
const m = {}, p = {};
|
|
602
602
|
for (const [g, h] of Object.entries(u))
|
|
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(
|
|
604
|
-
return Object.keys(
|
|
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
|
+
return Object.keys(p).length && (m.values = p), Object.keys(m).length ? m : null;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function Z(u) {
|
|
607
607
|
const m = e.messagesByConv[u] || [];
|
|
608
|
-
let
|
|
608
|
+
let p = "";
|
|
609
609
|
for (const f of m)
|
|
610
|
-
f != null && f.created_at && f.created_at >
|
|
610
|
+
f != null && f.created_at && f.created_at > p && (p = f.created_at);
|
|
611
611
|
const g = (/* @__PURE__ */ new Date()).toISOString();
|
|
612
|
-
return !
|
|
612
|
+
return !p || g > p ? g : new Date(Date.parse(p) + 1).toISOString();
|
|
613
613
|
}
|
|
614
614
|
return {
|
|
615
615
|
state: e,
|
|
@@ -624,10 +624,10 @@ function Ne(t) {
|
|
|
624
624
|
clickCallback: A,
|
|
625
625
|
signAttachment: x,
|
|
626
626
|
submitFeedback: N,
|
|
627
|
-
getPendingApproval:
|
|
628
|
-
getActionInFlight:
|
|
629
|
-
getLatestSuggestions:
|
|
630
|
-
getLatestForm:
|
|
627
|
+
getPendingApproval: F,
|
|
628
|
+
getActionInFlight: q,
|
|
629
|
+
getLatestSuggestions: Y,
|
|
630
|
+
getLatestForm: P,
|
|
631
631
|
// Pass-through for panel open/close (controls SSE burst).
|
|
632
632
|
setPanelOpen: t.setPanelOpen
|
|
633
633
|
};
|
|
@@ -658,7 +658,7 @@ function we(t = "") {
|
|
|
658
658
|
function be(t = /* @__PURE__ */ new Date()) {
|
|
659
659
|
return t.toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
|
|
660
660
|
}
|
|
661
|
-
const
|
|
661
|
+
const Ne = `
|
|
662
662
|
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
|
|
663
663
|
|
|
664
664
|
.wm-root {
|
|
@@ -704,12 +704,12 @@ const Pe = `
|
|
|
704
704
|
0% { transform: translateX(110%); opacity: 0; }
|
|
705
705
|
100% { transform: translateX(0); opacity: 1; }
|
|
706
706
|
}
|
|
707
|
-
`,
|
|
707
|
+
`, Pe = "https://api.messenger.victorc.fr", B = (t, e) => {
|
|
708
708
|
const n = t.__vccOpts || t;
|
|
709
709
|
for (const [a, r] of e)
|
|
710
710
|
n[a] = r;
|
|
711
711
|
return n;
|
|
712
|
-
},
|
|
712
|
+
}, He = {
|
|
713
713
|
name: "WmLauncher",
|
|
714
714
|
props: {
|
|
715
715
|
// Nombre de conversations non lues — pilote la pastille.
|
|
@@ -719,12 +719,12 @@ const Pe = `
|
|
|
719
719
|
peek: { type: String, default: "" }
|
|
720
720
|
},
|
|
721
721
|
emits: ["open", "dismiss"]
|
|
722
|
-
},
|
|
723
|
-
function
|
|
724
|
-
return l(),
|
|
725
|
-
|
|
726
|
-
default:
|
|
727
|
-
n.peek ? (l(),
|
|
722
|
+
}, ze = { class: "wm-launcherWrap" }, Ve = { class: "wm-peek__text" }, qe = ["aria-label"];
|
|
723
|
+
function We(t, e, n, a, r, s) {
|
|
724
|
+
return l(), d("div", ze, [
|
|
725
|
+
z(Se, { name: "wm-peek" }, {
|
|
726
|
+
default: xe(() => [
|
|
727
|
+
n.peek ? (l(), d("div", {
|
|
728
728
|
key: 0,
|
|
729
729
|
class: "wm-peek",
|
|
730
730
|
role: "button",
|
|
@@ -732,16 +732,16 @@ function Ge(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(X((o) => t.$emit("open"), ["prevent"]), ["enter"])),
|
|
736
|
+
e[3] || (e[3] = me(X((o) => t.$emit("open"), ["prevent"]), ["space"]))
|
|
737
737
|
]
|
|
738
738
|
}, [
|
|
739
|
-
i("p",
|
|
739
|
+
i("p", Ve, b(n.peek), 1),
|
|
740
740
|
i("button", {
|
|
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] = X((o) => t.$emit("dismiss"), ["stop"]))
|
|
745
745
|
}, [...e[5] || (e[5] = [
|
|
746
746
|
i("svg", {
|
|
747
747
|
width: "11",
|
|
@@ -780,34 +780,40 @@ function Ge(t, e, n, a, r, s) {
|
|
|
780
780
|
}, [
|
|
781
781
|
i("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
782
782
|
], -1)),
|
|
783
|
-
n.unreadCount > 0 ? (l(),
|
|
783
|
+
n.unreadCount > 0 ? (l(), d("span", {
|
|
784
784
|
key: 0,
|
|
785
785
|
class: "wm-launcher__badge",
|
|
786
786
|
"aria-label": `${n.unreadCount} conversation${n.unreadCount > 1 ? "s" : ""} non lue${n.unreadCount > 1 ? "s" : ""}`
|
|
787
|
-
}, b(n.unreadCount > 9 ? "9+" : n.unreadCount), 9,
|
|
787
|
+
}, b(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, qe)) : y("", !0)
|
|
788
788
|
])
|
|
789
789
|
]);
|
|
790
790
|
}
|
|
791
|
-
const
|
|
791
|
+
const Ge = /* @__PURE__ */ B(He, [["render", We], ["__scopeId", "data-v-fabef371"]]), Ke = {
|
|
792
792
|
name: "WmAIAvatar",
|
|
793
793
|
props: {
|
|
794
794
|
size: { type: Number, default: 26 },
|
|
795
|
-
pulse: { type: Boolean, default: !1 }
|
|
795
|
+
pulse: { type: Boolean, default: !1 },
|
|
796
|
+
// `tail` : applique la petite queue (4px) en bas-droite qui mirror
|
|
797
|
+
// le tail des bulles AI adjacentes. À activer uniquement quand
|
|
798
|
+
// l'avatar est posé à côté de messages dans le fil. Ailleurs
|
|
799
|
+
// (Header, Onboarding, ApprovalCard, FormCard…) → laissé à false
|
|
800
|
+
// pour garder l'avatar pleinement arrondi.
|
|
801
|
+
tail: { type: Boolean, default: !1 }
|
|
796
802
|
}
|
|
797
|
-
},
|
|
803
|
+
}, Ye = {
|
|
798
804
|
key: 0,
|
|
799
805
|
class: "wm-aiav__pulse"
|
|
800
|
-
},
|
|
801
|
-
function
|
|
802
|
-
return l(),
|
|
803
|
-
class: "wm-aiav",
|
|
806
|
+
}, Je = ["width", "height"];
|
|
807
|
+
function Xe(t, e, n, a, r, s) {
|
|
808
|
+
return l(), d("div", {
|
|
809
|
+
class: E(["wm-aiav", { "wm-aiav--tail": n.tail }]),
|
|
804
810
|
style: V({ width: n.size + "px", height: n.size + "px", "--wm-avr": n.size * 0.32 + "px" })
|
|
805
811
|
}, [
|
|
806
|
-
n.pulse ? (l(),
|
|
812
|
+
n.pulse ? (l(), d("div", Ye)) : y("", !0),
|
|
807
813
|
i("div", {
|
|
808
814
|
class: E(["wm-aiav__inner", { "wm-aiav__inner--glow": n.pulse }])
|
|
809
815
|
}, [
|
|
810
|
-
(l(),
|
|
816
|
+
(l(), d("svg", {
|
|
811
817
|
width: n.size * 0.5,
|
|
812
818
|
height: n.size * 0.5,
|
|
813
819
|
viewBox: "0 0 24 24",
|
|
@@ -833,11 +839,11 @@ function Qe(t, e, n, a, r, s) {
|
|
|
833
839
|
fill: "white",
|
|
834
840
|
opacity: "0.38"
|
|
835
841
|
}, null, -1)
|
|
836
|
-
])], 8,
|
|
842
|
+
])], 8, Je))
|
|
837
843
|
], 2)
|
|
838
|
-
],
|
|
844
|
+
], 6);
|
|
839
845
|
}
|
|
840
|
-
const
|
|
846
|
+
const Q = /* @__PURE__ */ B(Ke, [["render", Xe], ["__scopeId", "data-v-8c924688"]]), Qe = {
|
|
841
847
|
name: "WmHumanAvatar",
|
|
842
848
|
props: {
|
|
843
849
|
name: { type: String, default: "" },
|
|
@@ -852,9 +858,9 @@ const J = /* @__PURE__ */ B(Ye, [["render", Qe], ["__scopeId", "data-v-5ce9c382"
|
|
|
852
858
|
return we(this.name);
|
|
853
859
|
}
|
|
854
860
|
}
|
|
855
|
-
},
|
|
856
|
-
function
|
|
857
|
-
return l(),
|
|
861
|
+
}, Ze = ["src", "alt"];
|
|
862
|
+
function et(t, e, n, a, r, s) {
|
|
863
|
+
return l(), d("div", {
|
|
858
864
|
class: "wm-huav",
|
|
859
865
|
style: V({
|
|
860
866
|
width: n.size + "px",
|
|
@@ -863,17 +869,17 @@ function tt(t, e, n, a, r, s) {
|
|
|
863
869
|
background: s.bg
|
|
864
870
|
})
|
|
865
871
|
}, [
|
|
866
|
-
n.avatarUrl ? (l(),
|
|
872
|
+
n.avatarUrl ? (l(), d("img", {
|
|
867
873
|
key: 0,
|
|
868
874
|
src: n.avatarUrl,
|
|
869
875
|
alt: n.name || ""
|
|
870
|
-
}, null, 8,
|
|
876
|
+
}, null, 8, Ze)) : (l(), d("span", {
|
|
871
877
|
key: 1,
|
|
872
878
|
style: V({ fontSize: n.size * 0.36 + "px" })
|
|
873
879
|
}, b(s.initials), 5))
|
|
874
880
|
], 4);
|
|
875
881
|
}
|
|
876
|
-
const ke = /* @__PURE__ */ B(
|
|
882
|
+
const ke = /* @__PURE__ */ B(Qe, [["render", et], ["__scopeId", "data-v-a772b179"]]), tt = {
|
|
877
883
|
name: "WmTeamAvatars",
|
|
878
884
|
props: {
|
|
879
885
|
members: { type: Array, default: () => [] },
|
|
@@ -895,37 +901,37 @@ const ke = /* @__PURE__ */ B(Ze, [["render", tt], ["__scopeId", "data-v-a772b179
|
|
|
895
901
|
return we(t.name || "");
|
|
896
902
|
}
|
|
897
903
|
}
|
|
898
|
-
},
|
|
904
|
+
}, nt = {
|
|
899
905
|
key: 0,
|
|
900
906
|
class: "wm-team"
|
|
901
|
-
},
|
|
907
|
+
}, st = ["src", "alt"], rt = { key: 1 }, it = {
|
|
902
908
|
key: 0,
|
|
903
909
|
class: "wm-team__label"
|
|
904
910
|
};
|
|
905
|
-
function
|
|
906
|
-
return s.visible ? (l(),
|
|
911
|
+
function at(t, e, n, a, r, s) {
|
|
912
|
+
return s.visible ? (l(), d("div", nt, [
|
|
907
913
|
i("div", {
|
|
908
914
|
class: "wm-team__stack",
|
|
909
915
|
style: V({ width: s.stackWidth + "px" })
|
|
910
916
|
}, [
|
|
911
|
-
(l(!0),
|
|
912
|
-
key:
|
|
917
|
+
(l(!0), d(M, null, j(n.members.slice(0, 3), (o, c) => (l(), d("div", {
|
|
918
|
+
key: c,
|
|
913
919
|
class: "wm-team__pill",
|
|
914
|
-
style: V({ left:
|
|
920
|
+
style: V({ left: c * 13 + "px", zIndex: 3 - c, background: s.colorFor(o) })
|
|
915
921
|
}, [
|
|
916
|
-
o.avatar_url ? (l(),
|
|
922
|
+
o.avatar_url ? (l(), d("img", {
|
|
917
923
|
key: 0,
|
|
918
924
|
src: o.avatar_url,
|
|
919
925
|
alt: o.name || ""
|
|
920
|
-
}, null, 8,
|
|
926
|
+
}, null, 8, st)) : (l(), d("span", rt, b(s.initialsFor(o)), 1))
|
|
921
927
|
], 4))), 128))
|
|
922
928
|
], 4),
|
|
923
|
-
n.responseLabel ? (l(),
|
|
929
|
+
n.responseLabel ? (l(), d("span", it, b(n.responseLabel), 1)) : y("", !0)
|
|
924
930
|
])) : y("", !0);
|
|
925
931
|
}
|
|
926
|
-
const
|
|
932
|
+
const ot = /* @__PURE__ */ B(tt, [["render", at], ["__scopeId", "data-v-3659b9c1"]]), lt = {
|
|
927
933
|
name: "WmHeader",
|
|
928
|
-
components: { AIAvatar:
|
|
934
|
+
components: { AIAvatar: Q, HumanAvatar: ke, TeamAvatars: ot },
|
|
929
935
|
props: {
|
|
930
936
|
title: { type: String, default: "Nouvelle conversation" },
|
|
931
937
|
escalated: { type: Boolean, default: !1 },
|
|
@@ -956,20 +962,20 @@ const lt = /* @__PURE__ */ B(nt, [["render", ot], ["__scopeId", "data-v-3659b9c1
|
|
|
956
962
|
return this.escalated && this.agentName ? this.agentName : "En ligne";
|
|
957
963
|
}
|
|
958
964
|
}
|
|
959
|
-
},
|
|
965
|
+
}, ct = { class: "wm-header" }, dt = {
|
|
960
966
|
key: 1,
|
|
961
967
|
style: { width: "30px", height: "30px", "flex-shrink": "0" }
|
|
962
|
-
},
|
|
968
|
+
}, ut = { class: "wm-header__avatar" }, ht = { class: "wm-header__main" }, mt = { class: "wm-header__title" }, ft = {
|
|
963
969
|
key: 0,
|
|
964
970
|
class: "wm-header__sub"
|
|
965
|
-
}, pt = { class: "wm-header__status" },
|
|
971
|
+
}, pt = { class: "wm-header__status" }, _t = {
|
|
966
972
|
key: 3,
|
|
967
973
|
class: "wm-header__fill"
|
|
968
|
-
},
|
|
969
|
-
function
|
|
970
|
-
const o =
|
|
971
|
-
return l(),
|
|
972
|
-
n.showBack ? (l(),
|
|
974
|
+
}, vt = { class: "wm-header__actions" };
|
|
975
|
+
function gt(t, e, n, a, r, s) {
|
|
976
|
+
const o = O("HumanAvatar"), c = O("AIAvatar"), v = O("TeamAvatars");
|
|
977
|
+
return l(), d("div", ct, [
|
|
978
|
+
n.showBack ? (l(), d("button", {
|
|
973
979
|
key: 0,
|
|
974
980
|
type: "button",
|
|
975
981
|
class: "wm-header__icon",
|
|
@@ -989,22 +995,22 @@ function yt(t, e, n, a, r, s) {
|
|
|
989
995
|
}, [
|
|
990
996
|
i("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
991
997
|
], -1)
|
|
992
|
-
])])) : (l(),
|
|
993
|
-
n.showIdentity ? (l(),
|
|
994
|
-
i("div",
|
|
998
|
+
])])) : (l(), d("div", dt)),
|
|
999
|
+
n.showIdentity ? (l(), d(M, { key: 2 }, [
|
|
1000
|
+
i("div", ut, [
|
|
995
1001
|
n.escalated ? (l(), $(o, {
|
|
996
1002
|
key: 0,
|
|
997
1003
|
name: n.agentName,
|
|
998
1004
|
"avatar-url": n.agentAvatarUrl,
|
|
999
1005
|
size: 34
|
|
1000
|
-
}, null, 8, ["name", "avatar-url"])) : (l(), $(
|
|
1006
|
+
}, null, 8, ["name", "avatar-url"])) : (l(), $(c, {
|
|
1001
1007
|
key: 1,
|
|
1002
1008
|
size: 34
|
|
1003
1009
|
}))
|
|
1004
1010
|
]),
|
|
1005
|
-
i("div",
|
|
1006
|
-
i("div",
|
|
1007
|
-
s.showPresence ? (l(),
|
|
1011
|
+
i("div", ht, [
|
|
1012
|
+
i("div", mt, b(n.title), 1),
|
|
1013
|
+
s.showPresence ? (l(), d("div", ft, [
|
|
1008
1014
|
s.hasTeam ? (l(), $(v, {
|
|
1009
1015
|
key: 0,
|
|
1010
1016
|
members: n.teamMembers,
|
|
@@ -1012,13 +1018,13 @@ function yt(t, e, n, a, r, s) {
|
|
|
1012
1018
|
}, null, 8, ["members", "response-label"])) : y("", !0),
|
|
1013
1019
|
i("span", pt, [
|
|
1014
1020
|
e[4] || (e[4] = i("span", { class: "wm-header__dot" }, null, -1)),
|
|
1015
|
-
|
|
1021
|
+
re(" " + b(s.statusText), 1)
|
|
1016
1022
|
])
|
|
1017
1023
|
])) : y("", !0)
|
|
1018
1024
|
])
|
|
1019
|
-
], 64)) : (l(),
|
|
1020
|
-
i("div",
|
|
1021
|
-
n.showMore ? (l(),
|
|
1025
|
+
], 64)) : (l(), d("div", _t)),
|
|
1026
|
+
i("div", vt, [
|
|
1027
|
+
n.showMore ? (l(), d("button", {
|
|
1022
1028
|
key: 0,
|
|
1023
1029
|
type: "button",
|
|
1024
1030
|
class: E(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
|
|
@@ -1050,7 +1056,7 @@ function yt(t, e, n, a, r, s) {
|
|
|
1050
1056
|
})
|
|
1051
1057
|
], -1)
|
|
1052
1058
|
])], 2)) : y("", !0),
|
|
1053
|
-
n.showClose ? (l(),
|
|
1059
|
+
n.showClose ? (l(), d("button", {
|
|
1054
1060
|
key: 1,
|
|
1055
1061
|
type: "button",
|
|
1056
1062
|
class: "wm-header__icon",
|
|
@@ -1075,15 +1081,15 @@ function yt(t, e, n, a, r, s) {
|
|
|
1075
1081
|
])
|
|
1076
1082
|
]);
|
|
1077
1083
|
}
|
|
1078
|
-
const
|
|
1084
|
+
const yt = /* @__PURE__ */ B(lt, [["render", gt], ["__scopeId", "data-v-b5f5f6a9"]]), pe = {
|
|
1079
1085
|
book: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253",
|
|
1080
1086
|
changelog: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",
|
|
1081
1087
|
status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
1082
1088
|
chat: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",
|
|
1083
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"
|
|
1084
|
-
},
|
|
1090
|
+
}, wt = {
|
|
1085
1091
|
name: "WmOnboarding",
|
|
1086
|
-
components: { AIAvatar:
|
|
1092
|
+
components: { AIAvatar: Q },
|
|
1087
1093
|
props: {
|
|
1088
1094
|
welcomeMessage: { type: String, default: "" },
|
|
1089
1095
|
agentName: { type: String, default: "" },
|
|
@@ -1103,16 +1109,16 @@ Je réponds en quelques secondes.`;
|
|
|
1103
1109
|
},
|
|
1104
1110
|
methods: {
|
|
1105
1111
|
iconPath(t) {
|
|
1106
|
-
return
|
|
1112
|
+
return pe[t] || pe.link;
|
|
1107
1113
|
}
|
|
1108
1114
|
}
|
|
1109
|
-
},
|
|
1115
|
+
}, bt = { class: "wm-onb" }, kt = { class: "wm-onb__hero" }, Ct = { class: "wm-onb__title" }, At = { class: "wm-onb__sub" }, St = {
|
|
1110
1116
|
key: 0,
|
|
1111
1117
|
class: "wm-onb__section"
|
|
1112
|
-
},
|
|
1118
|
+
}, xt = { class: "wm-onb__links" }, Mt = ["onClick"], Tt = { class: "wm-onb__resume-body" }, It = { class: "wm-onb__resume-title" }, Ot = { class: "wm-onb__resume-preview" }, Et = {
|
|
1113
1119
|
key: 1,
|
|
1114
1120
|
class: "wm-onb__section"
|
|
1115
|
-
},
|
|
1121
|
+
}, Bt = { class: "wm-onb__links" }, Lt = ["onClick"], Rt = { class: "wm-onb__link-icon" }, $t = {
|
|
1116
1122
|
width: "14",
|
|
1117
1123
|
height: "14",
|
|
1118
1124
|
viewBox: "0 0 24 24",
|
|
@@ -1122,26 +1128,26 @@ Je réponds en quelques secondes.`;
|
|
|
1122
1128
|
"stroke-linecap": "round",
|
|
1123
1129
|
"stroke-linejoin": "round",
|
|
1124
1130
|
"aria-hidden": "true"
|
|
1125
|
-
},
|
|
1126
|
-
function
|
|
1127
|
-
const o =
|
|
1128
|
-
return l(),
|
|
1129
|
-
i("div",
|
|
1130
|
-
|
|
1131
|
+
}, Ft = ["d"], jt = { class: "wm-onb__link-label" }, Ut = { class: "wm-onb__cta" }, Dt = ["disabled"];
|
|
1132
|
+
function Nt(t, e, n, a, r, s) {
|
|
1133
|
+
const o = O("AIAvatar");
|
|
1134
|
+
return l(), d("div", bt, [
|
|
1135
|
+
i("div", kt, [
|
|
1136
|
+
z(o, {
|
|
1131
1137
|
size: 56,
|
|
1132
1138
|
pulse: !0
|
|
1133
1139
|
}),
|
|
1134
|
-
i("div",
|
|
1135
|
-
i("div",
|
|
1140
|
+
i("div", Ct, b(s.heroTitle), 1),
|
|
1141
|
+
i("div", At, b(s.heroSub), 1)
|
|
1136
1142
|
]),
|
|
1137
|
-
n.unreadThreads.length ? (l(),
|
|
1143
|
+
n.unreadThreads.length ? (l(), d("div", St, [
|
|
1138
1144
|
e[3] || (e[3] = i("div", { class: "wm-onb__section-title" }, "Messages non lus", -1)),
|
|
1139
|
-
i("div",
|
|
1140
|
-
(l(!0),
|
|
1141
|
-
key:
|
|
1145
|
+
i("div", xt, [
|
|
1146
|
+
(l(!0), d(M, null, j(n.unreadThreads, (c) => (l(), d("button", {
|
|
1147
|
+
key: c.id,
|
|
1142
1148
|
type: "button",
|
|
1143
1149
|
class: "wm-onb__link wm-onb__resume",
|
|
1144
|
-
onClick: (v) => t.$emit("resume",
|
|
1150
|
+
onClick: (v) => t.$emit("resume", c)
|
|
1145
1151
|
}, [
|
|
1146
1152
|
e[1] || (e[1] = i("span", { class: "wm-onb__link-icon wm-onb__resume-icon" }, [
|
|
1147
1153
|
i("svg", {
|
|
@@ -1162,9 +1168,9 @@ function Pt(t, e, n, a, r, s) {
|
|
|
1162
1168
|
"aria-label": "Non lu"
|
|
1163
1169
|
})
|
|
1164
1170
|
], -1)),
|
|
1165
|
-
i("span",
|
|
1166
|
-
i("span", It, b(
|
|
1167
|
-
i("span",
|
|
1171
|
+
i("span", Tt, [
|
|
1172
|
+
i("span", It, b(c.title), 1),
|
|
1173
|
+
i("span", Ot, b(c.preview), 1)
|
|
1168
1174
|
]),
|
|
1169
1175
|
e[2] || (e[2] = i("svg", {
|
|
1170
1176
|
width: "13",
|
|
@@ -1180,26 +1186,26 @@ function Pt(t, e, n, a, r, s) {
|
|
|
1180
1186
|
}, [
|
|
1181
1187
|
i("path", { d: "M9 18l6-6-6-6" })
|
|
1182
1188
|
], -1))
|
|
1183
|
-
], 8,
|
|
1189
|
+
], 8, Mt))), 128))
|
|
1184
1190
|
])
|
|
1185
1191
|
])) : y("", !0),
|
|
1186
|
-
n.quickLinks.length ? (l(),
|
|
1192
|
+
n.quickLinks.length ? (l(), d("div", Et, [
|
|
1187
1193
|
e[5] || (e[5] = i("div", { class: "wm-onb__section-title" }, "Accès rapide", -1)),
|
|
1188
|
-
i("div",
|
|
1189
|
-
(l(!0),
|
|
1194
|
+
i("div", Bt, [
|
|
1195
|
+
(l(!0), d(M, null, j(n.quickLinks, (c, v) => (l(), d("button", {
|
|
1190
1196
|
key: v,
|
|
1191
1197
|
type: "button",
|
|
1192
1198
|
class: "wm-onb__link",
|
|
1193
|
-
onClick: (C) => t.$emit("select",
|
|
1199
|
+
onClick: (C) => t.$emit("select", c)
|
|
1194
1200
|
}, [
|
|
1195
|
-
i("span",
|
|
1196
|
-
(l(),
|
|
1201
|
+
i("span", Rt, [
|
|
1202
|
+
(l(), d("svg", $t, [
|
|
1197
1203
|
i("path", {
|
|
1198
|
-
d: s.iconPath(
|
|
1199
|
-
}, null, 8,
|
|
1204
|
+
d: s.iconPath(c.icon)
|
|
1205
|
+
}, null, 8, Ft)
|
|
1200
1206
|
]))
|
|
1201
1207
|
]),
|
|
1202
|
-
i("span",
|
|
1208
|
+
i("span", jt, b(c.label), 1),
|
|
1203
1209
|
e[4] || (e[4] = i("svg", {
|
|
1204
1210
|
width: "13",
|
|
1205
1211
|
height: "13",
|
|
@@ -1214,20 +1220,106 @@ function Pt(t, e, n, a, r, s) {
|
|
|
1214
1220
|
}, [
|
|
1215
1221
|
i("path", { d: "M9 18l6-6-6-6" })
|
|
1216
1222
|
], -1))
|
|
1217
|
-
], 8,
|
|
1223
|
+
], 8, Lt))), 128))
|
|
1218
1224
|
])
|
|
1219
1225
|
])) : y("", !0),
|
|
1220
|
-
i("div",
|
|
1226
|
+
i("div", Ut, [
|
|
1221
1227
|
i("button", {
|
|
1222
1228
|
type: "button",
|
|
1223
1229
|
class: "wm-onb__startBtn",
|
|
1224
1230
|
disabled: n.busy,
|
|
1225
|
-
onClick: e[0] || (e[0] = (
|
|
1226
|
-
}, b(n.busy ? "…" : "Commencer une conversation"), 9,
|
|
1231
|
+
onClick: e[0] || (e[0] = (c) => t.$emit("start"))
|
|
1232
|
+
}, b(n.busy ? "…" : "Commencer une conversation"), 9, Dt)
|
|
1227
1233
|
])
|
|
1228
1234
|
]);
|
|
1229
1235
|
}
|
|
1230
|
-
const
|
|
1236
|
+
const Pt = /* @__PURE__ */ B(wt, [["render", Nt], ["__scopeId", "data-v-bd89bc8f"]]);
|
|
1237
|
+
function Ht(t) {
|
|
1238
|
+
return typeof t != "string" ? "" : t.replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)", "g"), "$1").replace(/__([^_]+)__/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\s+/g, " ").trim();
|
|
1239
|
+
}
|
|
1240
|
+
const zt = {
|
|
1241
|
+
name: "WmActionResult",
|
|
1242
|
+
props: {
|
|
1243
|
+
state: { type: String, default: "success" },
|
|
1244
|
+
// 'success' | 'failure' | 'rejected'
|
|
1245
|
+
label: { type: String, required: !0 },
|
|
1246
|
+
detail: { type: String, default: "" }
|
|
1247
|
+
},
|
|
1248
|
+
computed: {
|
|
1249
|
+
detailText() {
|
|
1250
|
+
return Ht(this.detail);
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
}, Vt = {
|
|
1254
|
+
class: "wm-result__icon",
|
|
1255
|
+
"aria-hidden": "true"
|
|
1256
|
+
}, qt = {
|
|
1257
|
+
key: 0,
|
|
1258
|
+
width: "11",
|
|
1259
|
+
height: "11",
|
|
1260
|
+
viewBox: "0 0 24 24",
|
|
1261
|
+
fill: "none",
|
|
1262
|
+
stroke: "currentColor",
|
|
1263
|
+
"stroke-width": "2.8",
|
|
1264
|
+
"stroke-linecap": "round",
|
|
1265
|
+
"stroke-linejoin": "round"
|
|
1266
|
+
}, Wt = {
|
|
1267
|
+
key: 1,
|
|
1268
|
+
width: "11",
|
|
1269
|
+
height: "11",
|
|
1270
|
+
viewBox: "0 0 24 24",
|
|
1271
|
+
fill: "none",
|
|
1272
|
+
stroke: "currentColor",
|
|
1273
|
+
"stroke-width": "2.6",
|
|
1274
|
+
"stroke-linecap": "round",
|
|
1275
|
+
"stroke-linejoin": "round"
|
|
1276
|
+
}, Gt = {
|
|
1277
|
+
key: 2,
|
|
1278
|
+
width: "12",
|
|
1279
|
+
height: "12",
|
|
1280
|
+
viewBox: "0 0 24 24",
|
|
1281
|
+
fill: "none",
|
|
1282
|
+
stroke: "currentColor",
|
|
1283
|
+
"stroke-width": "2.2",
|
|
1284
|
+
"stroke-linecap": "round",
|
|
1285
|
+
"stroke-linejoin": "round"
|
|
1286
|
+
}, Kt = { class: "wm-result__label" }, Yt = { class: "wm-result__detail" };
|
|
1287
|
+
function Jt(t, e, n, a, r, s) {
|
|
1288
|
+
return l(), d("div", {
|
|
1289
|
+
class: E(["wm-result", `wm-result--${n.state}`])
|
|
1290
|
+
}, [
|
|
1291
|
+
i("span", Vt, [
|
|
1292
|
+
n.state === "success" ? (l(), d("svg", qt, [...e[0] || (e[0] = [
|
|
1293
|
+
i("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
1294
|
+
])])) : n.state === "rejected" ? (l(), d("svg", Wt, [...e[1] || (e[1] = [
|
|
1295
|
+
i("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
1296
|
+
])])) : (l(), d("svg", Gt, [...e[2] || (e[2] = [
|
|
1297
|
+
i("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
|
|
1298
|
+
i("line", {
|
|
1299
|
+
x1: "12",
|
|
1300
|
+
y1: "9",
|
|
1301
|
+
x2: "12",
|
|
1302
|
+
y2: "13"
|
|
1303
|
+
}, null, -1),
|
|
1304
|
+
i("line", {
|
|
1305
|
+
x1: "12",
|
|
1306
|
+
y1: "17",
|
|
1307
|
+
x2: "12.01",
|
|
1308
|
+
y2: "17"
|
|
1309
|
+
}, null, -1)
|
|
1310
|
+
])]))
|
|
1311
|
+
]),
|
|
1312
|
+
i("span", Kt, b(n.label), 1),
|
|
1313
|
+
s.detailText ? (l(), d(M, { key: 0 }, [
|
|
1314
|
+
e[3] || (e[3] = i("span", {
|
|
1315
|
+
class: "wm-result__sep",
|
|
1316
|
+
"aria-hidden": "true"
|
|
1317
|
+
}, "·", -1)),
|
|
1318
|
+
i("span", Yt, b(s.detailText), 1)
|
|
1319
|
+
], 64)) : y("", !0)
|
|
1320
|
+
], 2);
|
|
1321
|
+
}
|
|
1322
|
+
const Xt = /* @__PURE__ */ B(zt, [["render", Jt], ["__scopeId", "data-v-c922734d"]]), Qt = {
|
|
1231
1323
|
name: "WmArtifactFormResponse",
|
|
1232
1324
|
props: {
|
|
1233
1325
|
data: { type: Object, required: !0 }
|
|
@@ -1238,11 +1330,11 @@ const Ht = /* @__PURE__ */ B(bt, [["render", Pt], ["__scopeId", "data-v-bd89bc8f
|
|
|
1238
1330
|
return Array.isArray((t = this.data) == null ? void 0 : t.fields) ? this.data.fields : [];
|
|
1239
1331
|
}
|
|
1240
1332
|
}
|
|
1241
|
-
},
|
|
1242
|
-
function
|
|
1243
|
-
return l(),
|
|
1244
|
-
i("div",
|
|
1245
|
-
i("div",
|
|
1333
|
+
}, Zt = { class: "wm-art wm-art--formResponse" }, en = { class: "wm-art__head" }, tn = { class: "wm-art__title" }, nn = { class: "wm-art__body" }, sn = { class: "wm-art__fieldLabel" };
|
|
1334
|
+
function rn(t, e, n, a, r, s) {
|
|
1335
|
+
return l(), d("div", Zt, [
|
|
1336
|
+
i("div", en, [
|
|
1337
|
+
i("div", tn, b(n.data.title || "Formulaire"), 1),
|
|
1246
1338
|
e[0] || (e[0] = i("span", { class: "wm-art__badge wm-art__badge--success" }, [
|
|
1247
1339
|
i("svg", {
|
|
1248
1340
|
width: "11",
|
|
@@ -1257,15 +1349,15 @@ function Yt(t, e, n, a, r, s) {
|
|
|
1257
1349
|
}, [
|
|
1258
1350
|
i("polyline", { points: "20 6 9 17 4 12" })
|
|
1259
1351
|
]),
|
|
1260
|
-
|
|
1352
|
+
re(" Envoyé ")
|
|
1261
1353
|
], -1))
|
|
1262
1354
|
]),
|
|
1263
|
-
i("div",
|
|
1264
|
-
(l(!0),
|
|
1265
|
-
key:
|
|
1355
|
+
i("div", nn, [
|
|
1356
|
+
(l(!0), d(M, null, j(s.fields, (o, c) => (l(), d("div", {
|
|
1357
|
+
key: c,
|
|
1266
1358
|
class: "wm-art__field"
|
|
1267
1359
|
}, [
|
|
1268
|
-
i("div",
|
|
1360
|
+
i("div", sn, b(o.label), 1),
|
|
1269
1361
|
i("div", {
|
|
1270
1362
|
class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1271
1363
|
}, b(o.value), 3)
|
|
@@ -1273,7 +1365,7 @@ function Yt(t, e, n, a, r, s) {
|
|
|
1273
1365
|
])
|
|
1274
1366
|
]);
|
|
1275
1367
|
}
|
|
1276
|
-
const
|
|
1368
|
+
const an = /* @__PURE__ */ B(Qt, [["render", rn], ["__scopeId", "data-v-812bda8b"]]), on = {
|
|
1277
1369
|
name: "WmArtifactInfoCard",
|
|
1278
1370
|
props: {
|
|
1279
1371
|
data: { type: Object, required: !0 }
|
|
@@ -1288,45 +1380,45 @@ const Jt = /* @__PURE__ */ B(zt, [["render", Yt], ["__scopeId", "data-v-812bda8b
|
|
|
1288
1380
|
return !!((t = this.data) != null && t.body) || this.fields.length > 0;
|
|
1289
1381
|
}
|
|
1290
1382
|
}
|
|
1291
|
-
},
|
|
1383
|
+
}, ln = { class: "wm-art wm-art--infoCard" }, cn = {
|
|
1292
1384
|
key: 0,
|
|
1293
1385
|
class: "wm-art__image"
|
|
1294
|
-
},
|
|
1386
|
+
}, dn = ["src", "alt"], un = { class: "wm-art__head" }, hn = { class: "wm-art__headMain" }, mn = { class: "wm-art__title" }, fn = {
|
|
1295
1387
|
key: 0,
|
|
1296
1388
|
class: "wm-art__subtitle"
|
|
1297
|
-
},
|
|
1389
|
+
}, pn = {
|
|
1298
1390
|
key: 1,
|
|
1299
1391
|
class: "wm-art__body"
|
|
1300
|
-
},
|
|
1392
|
+
}, _n = {
|
|
1301
1393
|
key: 0,
|
|
1302
1394
|
class: "wm-art__text"
|
|
1303
|
-
},
|
|
1304
|
-
function
|
|
1305
|
-
return l(),
|
|
1306
|
-
n.data.image_url ? (l(),
|
|
1395
|
+
}, vn = { class: "wm-art__fieldLabel" };
|
|
1396
|
+
function gn(t, e, n, a, r, s) {
|
|
1397
|
+
return l(), d("div", ln, [
|
|
1398
|
+
n.data.image_url ? (l(), d("figure", cn, [
|
|
1307
1399
|
i("img", {
|
|
1308
1400
|
src: n.data.image_url,
|
|
1309
1401
|
alt: n.data.title || "",
|
|
1310
1402
|
loading: "lazy"
|
|
1311
|
-
}, null, 8,
|
|
1403
|
+
}, null, 8, dn)
|
|
1312
1404
|
])) : y("", !0),
|
|
1313
|
-
i("div",
|
|
1314
|
-
i("div",
|
|
1315
|
-
i("div",
|
|
1316
|
-
n.data.subtitle ? (l(),
|
|
1405
|
+
i("div", un, [
|
|
1406
|
+
i("div", hn, [
|
|
1407
|
+
i("div", mn, b(n.data.title), 1),
|
|
1408
|
+
n.data.subtitle ? (l(), d("div", fn, b(n.data.subtitle), 1)) : y("", !0)
|
|
1317
1409
|
]),
|
|
1318
|
-
n.data.badge && n.data.badge.label ? (l(),
|
|
1410
|
+
n.data.badge && n.data.badge.label ? (l(), d("span", {
|
|
1319
1411
|
key: 0,
|
|
1320
1412
|
class: E(["wm-art__badge", `wm-art__badge--${n.data.badge.tone || "neutral"}`])
|
|
1321
1413
|
}, b(n.data.badge.label), 3)) : y("", !0)
|
|
1322
1414
|
]),
|
|
1323
|
-
s.hasBody ? (l(),
|
|
1324
|
-
n.data.body ? (l(),
|
|
1325
|
-
s.fields.length ? (l(!0),
|
|
1326
|
-
key:
|
|
1415
|
+
s.hasBody ? (l(), d("div", pn, [
|
|
1416
|
+
n.data.body ? (l(), d("div", _n, b(n.data.body), 1)) : y("", !0),
|
|
1417
|
+
s.fields.length ? (l(!0), d(M, { key: 1 }, j(s.fields, (o, c) => (l(), d("div", {
|
|
1418
|
+
key: c,
|
|
1327
1419
|
class: "wm-art__field"
|
|
1328
1420
|
}, [
|
|
1329
|
-
i("div",
|
|
1421
|
+
i("div", vn, b(o.label), 1),
|
|
1330
1422
|
i("div", {
|
|
1331
1423
|
class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1332
1424
|
}, b(o.value), 3)
|
|
@@ -1334,15 +1426,15 @@ function cn(t, e, n, a, r, s) {
|
|
|
1334
1426
|
])) : y("", !0)
|
|
1335
1427
|
]);
|
|
1336
1428
|
}
|
|
1337
|
-
const
|
|
1338
|
-
function
|
|
1429
|
+
const yn = /* @__PURE__ */ B(on, [["render", gn], ["__scopeId", "data-v-d7369333"]]);
|
|
1430
|
+
function wn(t) {
|
|
1339
1431
|
if (!t) return "";
|
|
1340
1432
|
const e = new Date(t);
|
|
1341
1433
|
if (Number.isNaN(e.getTime())) return t;
|
|
1342
1434
|
const n = e.toLocaleDateString("fr-FR", { day: "numeric", month: "long", year: "numeric" }), a = e.toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
|
|
1343
1435
|
return `${n} à ${a}`;
|
|
1344
1436
|
}
|
|
1345
|
-
const
|
|
1437
|
+
const bn = {
|
|
1346
1438
|
name: "WmArtifactTicket",
|
|
1347
1439
|
props: {
|
|
1348
1440
|
data: { type: Object, required: !0 }
|
|
@@ -1354,7 +1446,7 @@ const hn = {
|
|
|
1354
1446
|
},
|
|
1355
1447
|
formattedDate() {
|
|
1356
1448
|
var t;
|
|
1357
|
-
return
|
|
1449
|
+
return wn((t = this.data) == null ? void 0 : t.created_at);
|
|
1358
1450
|
}
|
|
1359
1451
|
},
|
|
1360
1452
|
methods: {
|
|
@@ -1371,22 +1463,22 @@ const hn = {
|
|
|
1371
1463
|
return /high|haute|élev|elev|critic|critiq|urgent/.test(e) ? 3 : /low|basse|faible|minor/.test(e) ? 1 : 2;
|
|
1372
1464
|
}
|
|
1373
1465
|
}
|
|
1374
|
-
},
|
|
1466
|
+
}, kn = { class: "wm-art wm-art--ticket" }, Cn = { class: "wm-art__head wm-tk__head" }, An = { class: "wm-art__title wm-tk__title" }, Sn = { class: "wm-tk__sub" }, xn = { class: "wm-tk__ref" }, Mn = {
|
|
1375
1467
|
key: 0,
|
|
1376
1468
|
class: "wm-tk__text"
|
|
1377
|
-
},
|
|
1469
|
+
}, Tn = {
|
|
1378
1470
|
key: 0,
|
|
1379
1471
|
class: "wm-art__body"
|
|
1380
|
-
},
|
|
1472
|
+
}, In = { class: "wm-art__fieldLabel" }, On = ["data-level"], En = {
|
|
1381
1473
|
key: 1,
|
|
1382
1474
|
class: "wm-art__footer wm-tk__footer"
|
|
1383
1475
|
};
|
|
1384
|
-
function
|
|
1385
|
-
return l(),
|
|
1386
|
-
i("div",
|
|
1387
|
-
i("div",
|
|
1388
|
-
i("div",
|
|
1389
|
-
i("div",
|
|
1476
|
+
function Bn(t, e, n, a, r, s) {
|
|
1477
|
+
return l(), d("div", kn, [
|
|
1478
|
+
i("div", Cn, [
|
|
1479
|
+
i("div", An, b(n.data.title), 1),
|
|
1480
|
+
i("div", Sn, [
|
|
1481
|
+
i("div", xn, [
|
|
1390
1482
|
e[0] || (e[0] = i("svg", {
|
|
1391
1483
|
width: "11",
|
|
1392
1484
|
height: "11",
|
|
@@ -1410,21 +1502,21 @@ function Cn(t, e, n, a, r, s) {
|
|
|
1410
1502
|
class: "wm-tk__dot",
|
|
1411
1503
|
"aria-hidden": "true"
|
|
1412
1504
|
}, null, -1)),
|
|
1413
|
-
|
|
1505
|
+
re(" " + b(n.data.status.label), 1)
|
|
1414
1506
|
], 2)
|
|
1415
1507
|
]),
|
|
1416
|
-
n.data.body ? (l(),
|
|
1508
|
+
n.data.body ? (l(), d("div", Mn, b(n.data.body), 1)) : y("", !0)
|
|
1417
1509
|
]),
|
|
1418
|
-
s.fields.length ? (l(),
|
|
1419
|
-
(l(!0),
|
|
1420
|
-
key:
|
|
1510
|
+
s.fields.length ? (l(), d("div", Tn, [
|
|
1511
|
+
(l(!0), d(M, null, j(s.fields, (o, c) => (l(), d("div", {
|
|
1512
|
+
key: c,
|
|
1421
1513
|
class: "wm-art__field"
|
|
1422
1514
|
}, [
|
|
1423
|
-
i("div",
|
|
1515
|
+
i("div", In, b(o.label), 1),
|
|
1424
1516
|
i("div", {
|
|
1425
1517
|
class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1426
1518
|
}, [
|
|
1427
|
-
s.isPriority(o.label) ? (l(),
|
|
1519
|
+
s.isPriority(o.label) ? (l(), d("svg", {
|
|
1428
1520
|
key: 0,
|
|
1429
1521
|
class: "wm-tk__prio",
|
|
1430
1522
|
"data-level": s.priorityLevel(o.value),
|
|
@@ -1454,12 +1546,12 @@ function Cn(t, e, n, a, r, s) {
|
|
|
1454
1546
|
height: "9",
|
|
1455
1547
|
rx: "0.5"
|
|
1456
1548
|
}, null, -1)
|
|
1457
|
-
])], 8,
|
|
1549
|
+
])], 8, On)) : y("", !0),
|
|
1458
1550
|
i("span", null, b(o.value), 1)
|
|
1459
1551
|
], 2)
|
|
1460
1552
|
]))), 128))
|
|
1461
1553
|
])) : y("", !0),
|
|
1462
|
-
n.data.created_at ? (l(),
|
|
1554
|
+
n.data.created_at ? (l(), d("div", En, [
|
|
1463
1555
|
e[3] || (e[3] = i("svg", {
|
|
1464
1556
|
width: "11",
|
|
1465
1557
|
height: "11",
|
|
@@ -1484,11 +1576,11 @@ function Cn(t, e, n, a, r, s) {
|
|
|
1484
1576
|
])) : y("", !0)
|
|
1485
1577
|
]);
|
|
1486
1578
|
}
|
|
1487
|
-
const
|
|
1488
|
-
form_response:
|
|
1489
|
-
info_card:
|
|
1490
|
-
ticket:
|
|
1491
|
-
},
|
|
1579
|
+
const Ln = /* @__PURE__ */ B(bn, [["render", Bn], ["__scopeId", "data-v-e0935e32"]]), Rn = {
|
|
1580
|
+
form_response: an,
|
|
1581
|
+
info_card: yn,
|
|
1582
|
+
ticket: Ln
|
|
1583
|
+
}, $n = {
|
|
1492
1584
|
name: "WmArtifactRenderer",
|
|
1493
1585
|
props: {
|
|
1494
1586
|
// Forme : { kind: string, data: any } (le `data` est validé
|
|
@@ -1499,114 +1591,17 @@ const An = /* @__PURE__ */ B(hn, [["render", Cn], ["__scopeId", "data-v-e0935e32
|
|
|
1499
1591
|
component() {
|
|
1500
1592
|
var e;
|
|
1501
1593
|
const t = (e = this.artifact) == null ? void 0 : e.kind;
|
|
1502
|
-
return t &&
|
|
1594
|
+
return t && Rn[t] || null;
|
|
1503
1595
|
}
|
|
1504
1596
|
}
|
|
1505
1597
|
};
|
|
1506
|
-
function
|
|
1507
|
-
return s.component ? (l(), $(
|
|
1598
|
+
function Fn(t, e, n, a, r, s) {
|
|
1599
|
+
return s.component ? (l(), $(Me(s.component), {
|
|
1508
1600
|
key: 0,
|
|
1509
1601
|
data: n.artifact.data
|
|
1510
1602
|
}, null, 8, ["data"])) : y("", !0);
|
|
1511
1603
|
}
|
|
1512
|
-
const
|
|
1513
|
-
function Tn(t) {
|
|
1514
|
-
return typeof t != "string" ? "" : t.replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)", "g"), "$1").replace(/__([^_]+)__/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\s+/g, " ").trim();
|
|
1515
|
-
}
|
|
1516
|
-
const On = {
|
|
1517
|
-
name: "WmActionResult",
|
|
1518
|
-
components: { ArtifactRenderer: Ce },
|
|
1519
|
-
props: {
|
|
1520
|
-
state: { type: String, default: "success" },
|
|
1521
|
-
// 'success' | 'failure' | 'rejected'
|
|
1522
|
-
label: { type: String, required: !0 },
|
|
1523
|
-
detail: { type: String, default: "" },
|
|
1524
|
-
artifact: { type: Object, default: null }
|
|
1525
|
-
},
|
|
1526
|
-
computed: {
|
|
1527
|
-
detailText() {
|
|
1528
|
-
return Tn(this.detail);
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
}, In = { class: "wm-result-wrap" }, En = {
|
|
1532
|
-
class: "wm-result__icon",
|
|
1533
|
-
"aria-hidden": "true"
|
|
1534
|
-
}, Bn = {
|
|
1535
|
-
key: 0,
|
|
1536
|
-
width: "11",
|
|
1537
|
-
height: "11",
|
|
1538
|
-
viewBox: "0 0 24 24",
|
|
1539
|
-
fill: "none",
|
|
1540
|
-
stroke: "currentColor",
|
|
1541
|
-
"stroke-width": "2.8",
|
|
1542
|
-
"stroke-linecap": "round",
|
|
1543
|
-
"stroke-linejoin": "round"
|
|
1544
|
-
}, Ln = {
|
|
1545
|
-
key: 1,
|
|
1546
|
-
width: "11",
|
|
1547
|
-
height: "11",
|
|
1548
|
-
viewBox: "0 0 24 24",
|
|
1549
|
-
fill: "none",
|
|
1550
|
-
stroke: "currentColor",
|
|
1551
|
-
"stroke-width": "2.6",
|
|
1552
|
-
"stroke-linecap": "round",
|
|
1553
|
-
"stroke-linejoin": "round"
|
|
1554
|
-
}, Rn = {
|
|
1555
|
-
key: 2,
|
|
1556
|
-
width: "12",
|
|
1557
|
-
height: "12",
|
|
1558
|
-
viewBox: "0 0 24 24",
|
|
1559
|
-
fill: "none",
|
|
1560
|
-
stroke: "currentColor",
|
|
1561
|
-
"stroke-width": "2.2",
|
|
1562
|
-
"stroke-linecap": "round",
|
|
1563
|
-
"stroke-linejoin": "round"
|
|
1564
|
-
}, $n = { class: "wm-result__label" }, Fn = { class: "wm-result__detail" }, jn = {
|
|
1565
|
-
key: 0,
|
|
1566
|
-
class: "wm-result-art"
|
|
1567
|
-
};
|
|
1568
|
-
function Un(t, e, n, a, r, s) {
|
|
1569
|
-
const o = I("ArtifactRenderer");
|
|
1570
|
-
return l(), c("div", In, [
|
|
1571
|
-
i("div", {
|
|
1572
|
-
class: E(["wm-result", `wm-result--${n.state}`])
|
|
1573
|
-
}, [
|
|
1574
|
-
i("span", En, [
|
|
1575
|
-
n.state === "success" ? (l(), c("svg", Bn, [...e[0] || (e[0] = [
|
|
1576
|
-
i("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
1577
|
-
])])) : n.state === "rejected" ? (l(), c("svg", Ln, [...e[1] || (e[1] = [
|
|
1578
|
-
i("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
1579
|
-
])])) : (l(), c("svg", Rn, [...e[2] || (e[2] = [
|
|
1580
|
-
i("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
|
|
1581
|
-
i("line", {
|
|
1582
|
-
x1: "12",
|
|
1583
|
-
y1: "9",
|
|
1584
|
-
x2: "12",
|
|
1585
|
-
y2: "13"
|
|
1586
|
-
}, null, -1),
|
|
1587
|
-
i("line", {
|
|
1588
|
-
x1: "12",
|
|
1589
|
-
y1: "17",
|
|
1590
|
-
x2: "12.01",
|
|
1591
|
-
y2: "17"
|
|
1592
|
-
}, null, -1)
|
|
1593
|
-
])]))
|
|
1594
|
-
]),
|
|
1595
|
-
i("span", $n, b(n.label), 1),
|
|
1596
|
-
s.detailText ? (l(), c(M, { key: 0 }, [
|
|
1597
|
-
e[3] || (e[3] = i("span", {
|
|
1598
|
-
class: "wm-result__sep",
|
|
1599
|
-
"aria-hidden": "true"
|
|
1600
|
-
}, "·", -1)),
|
|
1601
|
-
i("span", Fn, b(s.detailText), 1)
|
|
1602
|
-
], 64)) : y("", !0)
|
|
1603
|
-
], 2),
|
|
1604
|
-
n.artifact ? (l(), c("div", jn, [
|
|
1605
|
-
P(o, { artifact: n.artifact }, null, 8, ["artifact"])
|
|
1606
|
-
])) : y("", !0)
|
|
1607
|
-
]);
|
|
1608
|
-
}
|
|
1609
|
-
const Dn = /* @__PURE__ */ B(On, [["render", Un], ["__scopeId", "data-v-afa6b4f0"]]), Nn = {
|
|
1604
|
+
const jn = /* @__PURE__ */ B($n, [["render", Fn]]), Un = {
|
|
1610
1605
|
name: "WmAttachmentPreview",
|
|
1611
1606
|
inject: {
|
|
1612
1607
|
signAttachmentFn: { default: null }
|
|
@@ -1660,19 +1655,19 @@ const Dn = /* @__PURE__ */ B(On, [["render", Un], ["__scopeId", "data-v-afa6b4f0
|
|
|
1660
1655
|
this.url || t.preventDefault();
|
|
1661
1656
|
}
|
|
1662
1657
|
}
|
|
1663
|
-
},
|
|
1658
|
+
}, Dn = ["href"], Nn = ["src", "alt"], Pn = ["src"], Hn = ["src"], zn = ["href", "download"], Vn = { class: "wm-att__main" }, qn = { class: "wm-att__name" }, Wn = {
|
|
1664
1659
|
key: 0,
|
|
1665
1660
|
class: "wm-att__meta"
|
|
1666
|
-
},
|
|
1661
|
+
}, Gn = {
|
|
1667
1662
|
key: 0,
|
|
1668
1663
|
class: "wm-att__spin",
|
|
1669
1664
|
"aria-hidden": "true"
|
|
1670
1665
|
};
|
|
1671
|
-
function
|
|
1672
|
-
return l(),
|
|
1666
|
+
function Kn(t, e, n, a, r, s) {
|
|
1667
|
+
return l(), d("div", {
|
|
1673
1668
|
class: E(["wm-att", ["wm-att--" + (s.kind || "file")]])
|
|
1674
1669
|
}, [
|
|
1675
|
-
s.kind === "image" && r.url ? (l(),
|
|
1670
|
+
s.kind === "image" && r.url ? (l(), d("a", {
|
|
1676
1671
|
key: 0,
|
|
1677
1672
|
href: r.url,
|
|
1678
1673
|
target: "_blank",
|
|
@@ -1683,18 +1678,18 @@ function Jn(t, e, n, a, r, s) {
|
|
|
1683
1678
|
src: r.url,
|
|
1684
1679
|
alt: s.displayName,
|
|
1685
1680
|
loading: "lazy"
|
|
1686
|
-
}, null, 8,
|
|
1687
|
-
], 8,
|
|
1681
|
+
}, null, 8, Nn)
|
|
1682
|
+
], 8, Dn)) : s.kind === "audio" && r.url ? (l(), d("audio", {
|
|
1688
1683
|
key: 1,
|
|
1689
1684
|
src: r.url,
|
|
1690
1685
|
controls: "",
|
|
1691
1686
|
preload: "metadata"
|
|
1692
|
-
}, null, 8,
|
|
1687
|
+
}, null, 8, Pn)) : s.kind === "video" && r.url ? (l(), d("video", {
|
|
1693
1688
|
key: 2,
|
|
1694
1689
|
src: r.url,
|
|
1695
1690
|
controls: "",
|
|
1696
1691
|
preload: "metadata"
|
|
1697
|
-
}, null, 8,
|
|
1692
|
+
}, null, 8, Hn)) : (l(), d("a", {
|
|
1698
1693
|
key: 3,
|
|
1699
1694
|
class: "wm-att__file",
|
|
1700
1695
|
href: r.url || "#",
|
|
@@ -1719,33 +1714,33 @@ function Jn(t, e, n, a, r, s) {
|
|
|
1719
1714
|
i("path", { d: "M14 2v6h6" })
|
|
1720
1715
|
])
|
|
1721
1716
|
], -1)),
|
|
1722
|
-
i("span",
|
|
1723
|
-
i("span",
|
|
1724
|
-
s.sizeLabel ? (l(),
|
|
1717
|
+
i("span", Vn, [
|
|
1718
|
+
i("span", qn, b(s.displayName), 1),
|
|
1719
|
+
s.sizeLabel ? (l(), d("span", Wn, b(s.sizeLabel), 1)) : y("", !0)
|
|
1725
1720
|
]),
|
|
1726
|
-
r.loading ? (l(),
|
|
1727
|
-
], 8,
|
|
1721
|
+
r.loading ? (l(), d("span", Gn)) : y("", !0)
|
|
1722
|
+
], 8, zn))
|
|
1728
1723
|
], 2);
|
|
1729
1724
|
}
|
|
1730
|
-
const
|
|
1731
|
-
function
|
|
1725
|
+
const Yn = /* @__PURE__ */ B(Un, [["render", Kn], ["__scopeId", "data-v-1cd1267b"]]);
|
|
1726
|
+
function Jn(t) {
|
|
1732
1727
|
return String(t).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1733
1728
|
}
|
|
1734
|
-
function
|
|
1729
|
+
function Xn(t) {
|
|
1735
1730
|
return /^(https?:\/\/|mailto:|tel:)/i.test(String(t).trim());
|
|
1736
1731
|
}
|
|
1737
|
-
const
|
|
1738
|
-
function
|
|
1732
|
+
const _e = "";
|
|
1733
|
+
function te(t) {
|
|
1739
1734
|
let e = t;
|
|
1740
1735
|
const n = [];
|
|
1741
1736
|
return e = e.replace(/`([^`\n]+)`/g, (a, r) => {
|
|
1742
1737
|
const s = n.length;
|
|
1743
|
-
return n.push(r), `${
|
|
1744
|
-
}), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) =>
|
|
1738
|
+
return n.push(r), `${_e}CODE${s}${_e}`;
|
|
1739
|
+
}), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) => Xn(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), e = e.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), e = e.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), e = e.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), e = e.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), e = e.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), e = e.replace(/CODE(\d+)/g, (a, r) => `<code class="wm-md-code">${n[+r]}</code>`), e;
|
|
1745
1740
|
}
|
|
1746
|
-
function
|
|
1741
|
+
function Qn(t) {
|
|
1747
1742
|
if (!t) return "";
|
|
1748
|
-
const e =
|
|
1743
|
+
const e = Jn(t).split(`
|
|
1749
1744
|
`), n = [];
|
|
1750
1745
|
let a = 0;
|
|
1751
1746
|
for (; a < e.length; ) {
|
|
@@ -1769,19 +1764,19 @@ function es(t) {
|
|
|
1769
1764
|
if (!S) break;
|
|
1770
1765
|
C.push(S[1]), a++;
|
|
1771
1766
|
}
|
|
1772
|
-
const w = C.map((S) => `<li>${
|
|
1767
|
+
const w = C.map((S) => `<li>${te(S)}</li>`).join("");
|
|
1773
1768
|
n.push({ type: "block", html: `<ul class="wm-md-ul">${w}</ul>` });
|
|
1774
1769
|
continue;
|
|
1775
1770
|
}
|
|
1776
|
-
const
|
|
1777
|
-
if (
|
|
1778
|
-
const C = parseInt(
|
|
1771
|
+
const c = /^\s*(\d+)\.\s+(.*)$/.exec(s);
|
|
1772
|
+
if (c) {
|
|
1773
|
+
const C = parseInt(c[1], 10), w = [c[2]];
|
|
1779
1774
|
for (a++; a < e.length; ) {
|
|
1780
1775
|
const A = /^\s*\d+\.\s+(.*)$/.exec(e[a]);
|
|
1781
1776
|
if (!A) break;
|
|
1782
1777
|
w.push(A[1]), a++;
|
|
1783
1778
|
}
|
|
1784
|
-
const S = w.map((A) => `<li>${
|
|
1779
|
+
const S = w.map((A) => `<li>${te(A)}</li>`).join(""), R = C !== 1 ? ` start="${C}"` : "";
|
|
1785
1780
|
n.push({ type: "block", html: `<ol class="wm-md-ol"${R}>${S}</ol>` });
|
|
1786
1781
|
continue;
|
|
1787
1782
|
}
|
|
@@ -1790,23 +1785,23 @@ function es(t) {
|
|
|
1790
1785
|
const C = v[1].length;
|
|
1791
1786
|
n.push({
|
|
1792
1787
|
type: "block",
|
|
1793
|
-
html: `<h${C} class="wm-md-h wm-md-h${C}">${
|
|
1788
|
+
html: `<h${C} class="wm-md-h wm-md-h${C}">${te(v[2])}</h${C}>`
|
|
1794
1789
|
}), a++;
|
|
1795
1790
|
continue;
|
|
1796
1791
|
}
|
|
1797
|
-
n.push({ type: "text", html:
|
|
1792
|
+
n.push({ type: "text", html: te(s) }), a++;
|
|
1798
1793
|
}
|
|
1799
1794
|
let r = "";
|
|
1800
1795
|
for (let s = 0; s < n.length; s++) {
|
|
1801
1796
|
const o = n[s];
|
|
1802
1797
|
r += o.html;
|
|
1803
|
-
const
|
|
1804
|
-
|
|
1798
|
+
const c = n[s + 1];
|
|
1799
|
+
c && o.type !== "block" && c.type !== "block" && (r += `
|
|
1805
1800
|
`);
|
|
1806
1801
|
}
|
|
1807
1802
|
return r;
|
|
1808
1803
|
}
|
|
1809
|
-
const
|
|
1804
|
+
const Zn = {
|
|
1810
1805
|
name: "WmBubble",
|
|
1811
1806
|
props: {
|
|
1812
1807
|
role: { type: String, default: "ai" },
|
|
@@ -1815,41 +1810,41 @@ const ts = {
|
|
|
1815
1810
|
},
|
|
1816
1811
|
computed: {
|
|
1817
1812
|
rendered() {
|
|
1818
|
-
return
|
|
1813
|
+
return Qn(this.text);
|
|
1819
1814
|
}
|
|
1820
1815
|
}
|
|
1821
|
-
},
|
|
1822
|
-
function
|
|
1823
|
-
return l(),
|
|
1816
|
+
}, es = ["innerHTML"];
|
|
1817
|
+
function ts(t, e, n, a, r, s) {
|
|
1818
|
+
return l(), d("div", {
|
|
1824
1819
|
class: E(["wm-bubble", "wm-bubble--" + n.role])
|
|
1825
1820
|
}, [
|
|
1826
|
-
|
|
1827
|
-
i("span", { innerHTML: s.rendered }, null, 8,
|
|
1821
|
+
Te(t.$slots, "default", {}, () => [
|
|
1822
|
+
i("span", { innerHTML: s.rendered }, null, 8, es)
|
|
1828
1823
|
], !0)
|
|
1829
1824
|
], 2);
|
|
1830
1825
|
}
|
|
1831
|
-
const
|
|
1832
|
-
function
|
|
1833
|
-
return l(),
|
|
1826
|
+
const ns = /* @__PURE__ */ B(Zn, [["render", ts], ["__scopeId", "data-v-5c9e9f2b"]]), ss = { name: "WmTyping" }, rs = { class: "wm-typing" };
|
|
1827
|
+
function is(t, e, n, a, r, s) {
|
|
1828
|
+
return l(), d("div", rs, [...e[0] || (e[0] = [
|
|
1834
1829
|
i("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
1835
1830
|
i("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
1836
1831
|
i("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
1837
1832
|
])]);
|
|
1838
1833
|
}
|
|
1839
|
-
const
|
|
1834
|
+
const as = /* @__PURE__ */ B(ss, [["render", is], ["__scopeId", "data-v-df2447fd"]]);
|
|
1840
1835
|
function ce(t) {
|
|
1841
1836
|
return t ? t.client_msg_id || t.id : "";
|
|
1842
1837
|
}
|
|
1843
|
-
const
|
|
1838
|
+
const os = {
|
|
1844
1839
|
transferred_to_human: "Conversation transférée à un humain",
|
|
1845
1840
|
assigned: "{name} a rejoint la conversation",
|
|
1846
1841
|
unassigned: "L'agent a quitté la conversation",
|
|
1847
1842
|
resolved: "Conversation résolue",
|
|
1848
1843
|
reopened: "Conversation rouverte",
|
|
1849
1844
|
idle: "Conversation en pause"
|
|
1850
|
-
},
|
|
1845
|
+
}, ls = 80, cs = 200, ds = {
|
|
1851
1846
|
name: "WmMessageList",
|
|
1852
|
-
components: { AIAvatar:
|
|
1847
|
+
components: { AIAvatar: Q, HumanAvatar: ke, Bubble: ns, Typing: as, ActionResult: Xt, AttachmentPreview: Yn, ArtifactRenderer: jn },
|
|
1853
1848
|
props: {
|
|
1854
1849
|
messages: { type: Array, default: () => [] },
|
|
1855
1850
|
streamingActive: { type: Boolean, default: !1 },
|
|
@@ -1891,6 +1886,7 @@ const cs = {
|
|
|
1891
1886
|
key: `sys-${ce(r)}`,
|
|
1892
1887
|
role: s,
|
|
1893
1888
|
messages: [r],
|
|
1889
|
+
items: [],
|
|
1894
1890
|
systemLabel: this.systemLabel(r)
|
|
1895
1891
|
});
|
|
1896
1892
|
continue;
|
|
@@ -1901,9 +1897,17 @@ const cs = {
|
|
|
1901
1897
|
role: s,
|
|
1902
1898
|
agentName: ((n = r == null ? void 0 : r.author) == null ? void 0 : n.name) || "",
|
|
1903
1899
|
agentAvatarUrl: ((a = r == null ? void 0 : r.author) == null ? void 0 : a.avatar_url) || null,
|
|
1904
|
-
messages: [r]
|
|
1900
|
+
messages: [r],
|
|
1901
|
+
items: []
|
|
1905
1902
|
});
|
|
1906
1903
|
}
|
|
1904
|
+
for (const r of t) {
|
|
1905
|
+
if (r.role === "system") continue;
|
|
1906
|
+
const s = [];
|
|
1907
|
+
for (const o of r.messages)
|
|
1908
|
+
for (const c of this.itemsOf(o)) s.push(c);
|
|
1909
|
+
r.items = s;
|
|
1910
|
+
}
|
|
1907
1911
|
return t;
|
|
1908
1912
|
},
|
|
1909
1913
|
// Key of the first non-user group that starts after the unread anchor.
|
|
@@ -1935,11 +1939,11 @@ const cs = {
|
|
|
1935
1939
|
methods: {
|
|
1936
1940
|
messageKey: ce,
|
|
1937
1941
|
isAtBottom(t) {
|
|
1938
|
-
return t.scrollHeight - t.scrollTop - t.clientHeight <=
|
|
1942
|
+
return t.scrollHeight - t.scrollTop - t.clientHeight <= ls;
|
|
1939
1943
|
},
|
|
1940
1944
|
onScroll() {
|
|
1941
1945
|
const t = this.$refs.scrollEl;
|
|
1942
|
-
t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <=
|
|
1946
|
+
t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <= cs && (this._pendingLoadMore = !0, this.$emit("load-more")));
|
|
1943
1947
|
},
|
|
1944
1948
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
1945
1949
|
//
|
|
@@ -2033,17 +2037,48 @@ const cs = {
|
|
|
2033
2037
|
roleLabel(t) {
|
|
2034
2038
|
return t.role === "human" ? t.agentName || "Agent" : "Assistant IA";
|
|
2035
2039
|
},
|
|
2036
|
-
//
|
|
2037
|
-
//
|
|
2038
|
-
//
|
|
2039
|
-
//
|
|
2040
|
-
//
|
|
2041
|
-
//
|
|
2042
|
-
//
|
|
2043
|
-
//
|
|
2044
|
-
//
|
|
2045
|
-
|
|
2046
|
-
|
|
2040
|
+
// Expand a message into atomic visual items, each one a row in
|
|
2041
|
+
// the smart-corner cluster. Most messages = 1 item. An
|
|
2042
|
+
// `action+artifact` message produces 2 items (pill + artifact)
|
|
2043
|
+
// so the cluster geometry handles their joint naturally —
|
|
2044
|
+
// neighbours below see the artifact (card), neighbours above
|
|
2045
|
+
// see the pill (bubble), and the pill ↔ artifact joint itself
|
|
2046
|
+
// follows the same rules as any two adjacent cluster items.
|
|
2047
|
+
//
|
|
2048
|
+
// Each item carries :
|
|
2049
|
+
// - `message` : the source message
|
|
2050
|
+
// - `partKey` : disambiguator when one message produces
|
|
2051
|
+
// several items ('main' | 'artifact')
|
|
2052
|
+
// - `renderAs` : which renderer the template should pick
|
|
2053
|
+
// - `kind` : `{ top, bottom }` for the smart-corner
|
|
2054
|
+
// logic — 'bubble' (narrow) | 'card' (wide)
|
|
2055
|
+
itemsOf(t) {
|
|
2056
|
+
if (!t) return [];
|
|
2057
|
+
if (t.type === "action" && t.payload && t.payload.state !== "pending") {
|
|
2058
|
+
const e = [{
|
|
2059
|
+
message: t,
|
|
2060
|
+
partKey: "main",
|
|
2061
|
+
renderAs: "action",
|
|
2062
|
+
kind: { top: "bubble", bottom: "bubble" }
|
|
2063
|
+
}];
|
|
2064
|
+
return this.actionArtifact(t) && e.push({
|
|
2065
|
+
message: t,
|
|
2066
|
+
partKey: "artifact",
|
|
2067
|
+
renderAs: "artifact-of-action",
|
|
2068
|
+
kind: { top: "card", bottom: "card" }
|
|
2069
|
+
}), e;
|
|
2070
|
+
}
|
|
2071
|
+
return this.artifactOf(t) ? [{
|
|
2072
|
+
message: t,
|
|
2073
|
+
partKey: "main",
|
|
2074
|
+
renderAs: "artifact",
|
|
2075
|
+
kind: { top: "card", bottom: "card" }
|
|
2076
|
+
}] : t.text_md || this.attachmentsOf(t).length ? [{
|
|
2077
|
+
message: t,
|
|
2078
|
+
partKey: "main",
|
|
2079
|
+
renderAs: "bubble",
|
|
2080
|
+
kind: { top: "bubble", bottom: "bubble" }
|
|
2081
|
+
}] : [];
|
|
2047
2082
|
},
|
|
2048
2083
|
// Per-corner border radius for an item inside a multi-item
|
|
2049
2084
|
// cluster. Geometric model :
|
|
@@ -2056,16 +2091,14 @@ const cs = {
|
|
|
2056
2091
|
// them.
|
|
2057
2092
|
// We compare *halves* : my top corners vs `prev.bottom` (what
|
|
2058
2093
|
// touches me from above), my bottom corners vs `next.top` (what
|
|
2059
|
-
// touches me from below).
|
|
2060
|
-
// + artifact rows behave correctly — the pill above doesn't pull
|
|
2061
|
-
// the previous row's bottom corners in, but the artifact below
|
|
2062
|
-
// does pull the next row's top corners in.
|
|
2094
|
+
// touches me from below).
|
|
2063
2095
|
// Bubbles get a small "tail" on their bottom lateral corner when
|
|
2064
2096
|
// they're the last item of the cluster — BL for ai/human, BR for
|
|
2065
2097
|
// user.
|
|
2066
2098
|
cornersFor(t, e) {
|
|
2067
|
-
|
|
2068
|
-
|
|
2099
|
+
var N, F, P;
|
|
2100
|
+
const n = t.items, a = (N = n[e]) == null ? void 0 : N.kind, r = (F = n[e - 1]) == null ? void 0 : F.kind, s = (P = n[e + 1]) == null ? void 0 : P.kind, o = t.role === "user", c = 14, v = 4, C = (q, Y) => q === "card" && Y === "bubble", w = r ? r.bottom : null, S = s ? s.top : null;
|
|
2101
|
+
let R = c, A = c, D = c, x = c;
|
|
2069
2102
|
return o ? (w && (A = v, C(w, a.top) && (R = v)), S && (D = v, C(S, a.bottom) && (x = v)), !S && a.bottom === "bubble" && (D = v)) : (w && (R = v, C(w, a.top) && (A = v)), S && (x = v, C(S, a.bottom) && (D = v)), !S && a.bottom === "bubble" && (x = v)), { tl: R, tr: A, br: D, bl: x };
|
|
2070
2103
|
},
|
|
2071
2104
|
// Inline style emitting the four corner CSS variables. Set on
|
|
@@ -2073,16 +2106,13 @@ const cs = {
|
|
|
2073
2106
|
// ArtifactRenderer. Returns null for single-item clusters so
|
|
2074
2107
|
// those components fall back to their native border-radius.
|
|
2075
2108
|
cornersStyle(t, e) {
|
|
2076
|
-
if (t.
|
|
2077
|
-
|
|
2078
|
-
0
|
|
2079
|
-
) < 2) return null;
|
|
2080
|
-
const a = this.cornersFor(t, e);
|
|
2109
|
+
if (t.items.length < 2) return null;
|
|
2110
|
+
const n = this.cornersFor(t, e);
|
|
2081
2111
|
return {
|
|
2082
|
-
"--wm-r-tl": `${
|
|
2083
|
-
"--wm-r-tr": `${
|
|
2084
|
-
"--wm-r-br": `${
|
|
2085
|
-
"--wm-r-bl": `${
|
|
2112
|
+
"--wm-r-tl": `${n.tl}px`,
|
|
2113
|
+
"--wm-r-tr": `${n.tr}px`,
|
|
2114
|
+
"--wm-r-br": `${n.br}px`,
|
|
2115
|
+
"--wm-r-bl": `${n.bl}px`
|
|
2086
2116
|
};
|
|
2087
2117
|
},
|
|
2088
2118
|
lastTimeOf(t) {
|
|
@@ -2113,9 +2143,9 @@ const cs = {
|
|
|
2113
2143
|
return ((e = t == null ? void 0 : t.payload) == null ? void 0 : e.name) || (t == null ? void 0 : t.text_md) || "Action";
|
|
2114
2144
|
},
|
|
2115
2145
|
actionDetail(t) {
|
|
2116
|
-
var n, a, r, s, o,
|
|
2146
|
+
var n, a, r, s, o, c;
|
|
2117
2147
|
const e = t == null ? void 0 : t.payload;
|
|
2118
|
-
return e ? e.state === "success" ? ((n = e.success) == null ? void 0 : n.summary) || ((r = (a = e.success) == null ? void 0 : a.metadata) == null ? void 0 : r.description) || "" : e.state === "rejected" ? ((s = e.rejected) == null ? void 0 : s.reason) || "Action annulée par l'utilisateur." : e.state === "failure" && (((o = e.failure) == null ? void 0 : o.summary) || ((
|
|
2148
|
+
return e ? e.state === "success" ? ((n = e.success) == null ? void 0 : n.summary) || ((r = (a = e.success) == null ? void 0 : a.metadata) == null ? void 0 : r.description) || "" : e.state === "rejected" ? ((s = e.rejected) == null ? void 0 : s.reason) || "Action annulée par l'utilisateur." : e.state === "failure" && (((o = e.failure) == null ? void 0 : o.summary) || ((c = e.failure) == null ? void 0 : c.error)) || "" : "";
|
|
2119
2149
|
},
|
|
2120
2150
|
actionArtifact(t) {
|
|
2121
2151
|
var n, a;
|
|
@@ -2124,7 +2154,7 @@ const cs = {
|
|
|
2124
2154
|
},
|
|
2125
2155
|
systemLabel(t) {
|
|
2126
2156
|
var r, s, o;
|
|
2127
|
-
const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n =
|
|
2157
|
+
const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n = os[e] || (t == null ? void 0 : t.text_md) || "Mise à jour de la conversation", a = ((s = t == null ? void 0 : t.metadata) == null ? void 0 : s.agent_name) || ((o = t == null ? void 0 : t.author) == null ? void 0 : o.name) || "";
|
|
2128
2158
|
return n.replace("{name}", a || "Un agent");
|
|
2129
2159
|
},
|
|
2130
2160
|
scrollToBottom() {
|
|
@@ -2132,59 +2162,59 @@ const cs = {
|
|
|
2132
2162
|
t && (t.scrollTop = t.scrollHeight);
|
|
2133
2163
|
}
|
|
2134
2164
|
}
|
|
2135
|
-
},
|
|
2165
|
+
}, us = {
|
|
2136
2166
|
key: 0,
|
|
2137
2167
|
class: "wm-list__loadMore",
|
|
2138
2168
|
role: "status",
|
|
2139
2169
|
"aria-live": "polite"
|
|
2140
|
-
},
|
|
2170
|
+
}, hs = {
|
|
2141
2171
|
key: 1,
|
|
2142
2172
|
class: "wm-list__historyEnd"
|
|
2143
|
-
},
|
|
2173
|
+
}, ms = {
|
|
2144
2174
|
key: 2,
|
|
2145
2175
|
class: "wm-list__sep"
|
|
2146
|
-
},
|
|
2176
|
+
}, fs = { class: "wm-list__sep-label" }, ps = {
|
|
2147
2177
|
key: 0,
|
|
2148
2178
|
class: "wm-list__sep wm-list__sep--unread"
|
|
2149
|
-
},
|
|
2179
|
+
}, _s = {
|
|
2150
2180
|
key: 0,
|
|
2151
2181
|
class: "wm-list__sysep"
|
|
2152
|
-
},
|
|
2182
|
+
}, vs = { class: "wm-list__sysep-label" }, gs = {
|
|
2153
2183
|
key: 0,
|
|
2154
2184
|
class: "wm-list__avatarSlot"
|
|
2155
|
-
},
|
|
2156
|
-
key:
|
|
2185
|
+
}, ys = {
|
|
2186
|
+
key: 4,
|
|
2157
2187
|
class: "wm-list__body"
|
|
2158
|
-
},
|
|
2188
|
+
}, ws = { key: 0 }, bs = {
|
|
2159
2189
|
key: 1,
|
|
2160
2190
|
"aria-hidden": "true"
|
|
2161
|
-
},
|
|
2191
|
+
}, ks = { key: 2 }, Cs = {
|
|
2162
2192
|
key: 3,
|
|
2163
2193
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
2164
|
-
},
|
|
2165
|
-
function
|
|
2166
|
-
const o =
|
|
2167
|
-
return l(),
|
|
2194
|
+
}, As = { class: "wm-list__avatarSlot" };
|
|
2195
|
+
function Ss(t, e, n, a, r, s) {
|
|
2196
|
+
const o = O("AIAvatar"), c = O("HumanAvatar"), v = O("ActionResult"), C = O("ArtifactRenderer"), w = O("Bubble"), S = O("AttachmentPreview"), R = O("Typing");
|
|
2197
|
+
return l(), d("div", {
|
|
2168
2198
|
ref: "scrollEl",
|
|
2169
2199
|
class: E(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
2170
2200
|
onScrollPassive: e[0] || (e[0] = (...A) => s.onScroll && s.onScroll(...A))
|
|
2171
2201
|
}, [
|
|
2172
|
-
n.loadingMore ? (l(),
|
|
2202
|
+
n.loadingMore ? (l(), d("div", us, [...e[1] || (e[1] = [
|
|
2173
2203
|
i("span", {
|
|
2174
2204
|
class: "wm-list__loadMore-spinner",
|
|
2175
2205
|
"aria-hidden": "true"
|
|
2176
2206
|
}, null, -1),
|
|
2177
2207
|
i("span", { class: "wm-list__loadMore-lbl" }, "Chargement de l'historique…", -1)
|
|
2178
|
-
])])) : s.historyExhausted ? (l(),
|
|
2179
|
-
n.dateLabel ? (l(),
|
|
2208
|
+
])])) : s.historyExhausted ? (l(), d("div", hs, "Début de la conversation")) : y("", !0),
|
|
2209
|
+
n.dateLabel ? (l(), d("div", ms, [
|
|
2180
2210
|
e[2] || (e[2] = i("div", { class: "wm-list__line" }, null, -1)),
|
|
2181
|
-
i("span",
|
|
2211
|
+
i("span", fs, b(n.dateLabel), 1),
|
|
2182
2212
|
e[3] || (e[3] = i("div", { class: "wm-list__line" }, null, -1))
|
|
2183
2213
|
])) : y("", !0),
|
|
2184
|
-
(l(!0),
|
|
2214
|
+
(l(!0), d(M, null, j(s.groups, (A, D) => (l(), d(M, {
|
|
2185
2215
|
key: A.key
|
|
2186
2216
|
}, [
|
|
2187
|
-
A.key === s.unreadGroupKey ? (l(),
|
|
2217
|
+
A.key === s.unreadGroupKey ? (l(), d("div", ps, [...e[4] || (e[4] = [
|
|
2188
2218
|
i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1),
|
|
2189
2219
|
i("span", { class: "wm-list__sep-label wm-list__sep-label--unread" }, "Non lus", -1),
|
|
2190
2220
|
i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)
|
|
@@ -2192,22 +2222,23 @@ function Ms(t, e, n, a, r, s) {
|
|
|
2192
2222
|
i("div", {
|
|
2193
2223
|
class: E(["wm-list__group", "wm-list__group--" + A.role])
|
|
2194
2224
|
}, [
|
|
2195
|
-
A.role === "system" ? (l(),
|
|
2225
|
+
A.role === "system" ? (l(), d("div", _s, [
|
|
2196
2226
|
e[5] || (e[5] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
2197
|
-
i("span",
|
|
2227
|
+
i("span", vs, b(A.systemLabel), 1),
|
|
2198
2228
|
e[6] || (e[6] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
2199
|
-
])) : (l(),
|
|
2200
|
-
(l(!0),
|
|
2201
|
-
key: s.messageKey(x)
|
|
2202
|
-
class: E(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x._pending, "is-failed": x._failed }]]),
|
|
2229
|
+
])) : (l(), d(M, { key: 1 }, [
|
|
2230
|
+
(l(!0), d(M, null, j(A.items, (x, N) => (l(), d("div", {
|
|
2231
|
+
key: `${s.messageKey(x.message)}-${x.partKey}`,
|
|
2232
|
+
class: E(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x.message._pending, "is-failed": x.message._failed }]]),
|
|
2203
2233
|
style: V(s.cornersStyle(A, N))
|
|
2204
2234
|
}, [
|
|
2205
|
-
A.role !== "user" ? (l(),
|
|
2206
|
-
N === A.
|
|
2235
|
+
A.role !== "user" ? (l(), d("div", gs, [
|
|
2236
|
+
N === A.items.length - 1 ? (l(), d(M, { key: 0 }, [
|
|
2207
2237
|
A.role === "ai" ? (l(), $(o, {
|
|
2208
2238
|
key: 0,
|
|
2209
|
-
size: 26
|
|
2210
|
-
|
|
2239
|
+
size: 26,
|
|
2240
|
+
tail: !0
|
|
2241
|
+
})) : (l(), $(c, {
|
|
2211
2242
|
key: 1,
|
|
2212
2243
|
name: A.agentName,
|
|
2213
2244
|
"avatar-url": A.agentAvatarUrl,
|
|
@@ -2215,53 +2246,58 @@ function Ms(t, e, n, a, r, s) {
|
|
|
2215
2246
|
}, null, 8, ["name", "avatar-url"]))
|
|
2216
2247
|
], 64)) : y("", !0)
|
|
2217
2248
|
])) : y("", !0),
|
|
2218
|
-
x.
|
|
2249
|
+
x.renderAs === "action" ? (l(), $(v, {
|
|
2219
2250
|
key: 1,
|
|
2220
|
-
state: x.payload.state,
|
|
2221
|
-
label: s.actionLabel(x),
|
|
2222
|
-
detail: s.actionDetail(x)
|
|
2223
|
-
|
|
2224
|
-
}, null, 8, ["state", "label", "detail", "artifact"])) : s.artifactOf(x) ? (l(), $(C, {
|
|
2251
|
+
state: x.message.payload.state,
|
|
2252
|
+
label: s.actionLabel(x.message),
|
|
2253
|
+
detail: s.actionDetail(x.message)
|
|
2254
|
+
}, null, 8, ["state", "label", "detail"])) : x.renderAs === "artifact-of-action" ? (l(), $(C, {
|
|
2225
2255
|
key: 2,
|
|
2226
|
-
artifact: s.
|
|
2227
|
-
}, null, 8, ["artifact"])) : (l(),
|
|
2228
|
-
|
|
2256
|
+
artifact: s.actionArtifact(x.message)
|
|
2257
|
+
}, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(), $(C, {
|
|
2258
|
+
key: 3,
|
|
2259
|
+
artifact: s.artifactOf(x.message)
|
|
2260
|
+
}, null, 8, ["artifact"])) : (l(), d("div", ys, [
|
|
2261
|
+
x.message.text_md ? (l(), $(w, {
|
|
2229
2262
|
key: 0,
|
|
2230
2263
|
role: A.role,
|
|
2231
|
-
text: x.text_md
|
|
2264
|
+
text: x.message.text_md
|
|
2232
2265
|
}, null, 8, ["role", "text"])) : y("", !0),
|
|
2233
|
-
s.attachmentsOf(x).length ? (l(),
|
|
2266
|
+
s.attachmentsOf(x.message).length ? (l(), d("div", {
|
|
2234
2267
|
key: 1,
|
|
2235
2268
|
class: E(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
|
|
2236
2269
|
}, [
|
|
2237
|
-
(l(!0),
|
|
2238
|
-
key: `${s.messageKey(x)}-att-${
|
|
2239
|
-
attachment:
|
|
2270
|
+
(l(!0), d(M, null, j(s.attachmentsOf(x.message), (F, P) => (l(), $(S, {
|
|
2271
|
+
key: `${s.messageKey(x.message)}-att-${P}`,
|
|
2272
|
+
attachment: F
|
|
2240
2273
|
}, null, 8, ["attachment"]))), 128))
|
|
2241
2274
|
], 2)) : y("", !0)
|
|
2242
2275
|
]))
|
|
2243
2276
|
], 6))), 128)),
|
|
2244
|
-
A.role !== "user" || s.lastTimeOf(A) ? (l(),
|
|
2277
|
+
A.role !== "user" || s.lastTimeOf(A) ? (l(), d("div", {
|
|
2245
2278
|
key: 0,
|
|
2246
2279
|
class: E(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
2247
2280
|
}, [
|
|
2248
|
-
A.role !== "user" ? (l(),
|
|
2249
|
-
A.role !== "user" && s.lastTimeOf(A) ? (l(),
|
|
2250
|
-
s.lastTimeOf(A) ? (l(),
|
|
2281
|
+
A.role !== "user" ? (l(), d("span", ws, b(s.roleLabel(A)), 1)) : y("", !0),
|
|
2282
|
+
A.role !== "user" && s.lastTimeOf(A) ? (l(), d("span", bs, "·")) : y("", !0),
|
|
2283
|
+
s.lastTimeOf(A) ? (l(), d("span", ks, b(s.lastTimeOf(A)), 1)) : y("", !0)
|
|
2251
2284
|
], 2)) : y("", !0)
|
|
2252
2285
|
], 64))
|
|
2253
2286
|
], 2)
|
|
2254
2287
|
], 64))), 128)),
|
|
2255
|
-
n.streamingActive ? (l(),
|
|
2256
|
-
i("div",
|
|
2257
|
-
|
|
2288
|
+
n.streamingActive ? (l(), d("div", Cs, [
|
|
2289
|
+
i("div", As, [
|
|
2290
|
+
z(o, {
|
|
2291
|
+
size: 26,
|
|
2292
|
+
tail: !0
|
|
2293
|
+
})
|
|
2258
2294
|
]),
|
|
2259
|
-
|
|
2295
|
+
z(R)
|
|
2260
2296
|
])) : y("", !0)
|
|
2261
2297
|
], 34);
|
|
2262
2298
|
}
|
|
2263
|
-
const
|
|
2264
|
-
function
|
|
2299
|
+
const xs = /* @__PURE__ */ B(ds, [["render", Ss], ["__scopeId", "data-v-fa41ec02"]]), ne = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
2300
|
+
function Ms() {
|
|
2265
2301
|
return he && [
|
|
2266
2302
|
"video/webm;codecs=vp9,opus",
|
|
2267
2303
|
"video/webm;codecs=vp8,opus",
|
|
@@ -2272,7 +2308,7 @@ function Os() {
|
|
|
2272
2308
|
return (a = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : a.call(n, e);
|
|
2273
2309
|
}) || "";
|
|
2274
2310
|
}
|
|
2275
|
-
function
|
|
2311
|
+
function Ce({ audio: t }) {
|
|
2276
2312
|
return {
|
|
2277
2313
|
video: !0,
|
|
2278
2314
|
audio: !!t,
|
|
@@ -2281,19 +2317,19 @@ function Ae({ audio: t }) {
|
|
|
2281
2317
|
systemAudio: t ? "include" : "exclude"
|
|
2282
2318
|
};
|
|
2283
2319
|
}
|
|
2284
|
-
function
|
|
2320
|
+
function Di(t) {
|
|
2285
2321
|
return t ? t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : "file" : "file";
|
|
2286
2322
|
}
|
|
2287
|
-
async function
|
|
2288
|
-
if (!
|
|
2323
|
+
async function Ts() {
|
|
2324
|
+
if (!ne) return null;
|
|
2289
2325
|
let t;
|
|
2290
2326
|
try {
|
|
2291
|
-
t = await navigator.mediaDevices.getDisplayMedia(
|
|
2327
|
+
t = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !1 }));
|
|
2292
2328
|
} catch (e) {
|
|
2293
2329
|
return (e == null ? void 0 : e.name) !== "NotAllowedError" && console.error("[media] screenshot picker", e), null;
|
|
2294
2330
|
}
|
|
2295
2331
|
try {
|
|
2296
|
-
return await
|
|
2332
|
+
return await Is(t);
|
|
2297
2333
|
} catch (e) {
|
|
2298
2334
|
return console.error("[media] screenshot capture", e), null;
|
|
2299
2335
|
} finally {
|
|
@@ -2302,26 +2338,26 @@ async function Is() {
|
|
|
2302
2338
|
});
|
|
2303
2339
|
}
|
|
2304
2340
|
}
|
|
2305
|
-
async function
|
|
2341
|
+
async function Is(t) {
|
|
2306
2342
|
const e = document.createElement("video");
|
|
2307
|
-
e.muted = !0, e.playsInline = !0, e.srcObject = t, await e.play(), await new Promise((
|
|
2343
|
+
e.muted = !0, e.playsInline = !0, e.srcObject = t, await e.play(), await new Promise((c) => requestAnimationFrame(c));
|
|
2308
2344
|
const n = e.videoWidth || 1280, a = e.videoHeight || 720, r = document.createElement("canvas");
|
|
2309
2345
|
r.width = n, r.height = a, r.getContext("2d").drawImage(e, 0, 0, n, a);
|
|
2310
|
-
const s = await new Promise((
|
|
2311
|
-
r.toBlob((C) => C ?
|
|
2346
|
+
const s = await new Promise((c, v) => {
|
|
2347
|
+
r.toBlob((C) => C ? c(C) : v(new Error("toBlob failed")), "image/png");
|
|
2312
2348
|
}), o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
2313
2349
|
return new File([s], `capture-${o}.png`, { type: "image/png" });
|
|
2314
2350
|
}
|
|
2315
|
-
async function
|
|
2351
|
+
async function Os(t = {}) {
|
|
2316
2352
|
var C;
|
|
2317
|
-
if (!
|
|
2353
|
+
if (!ne || !he) return null;
|
|
2318
2354
|
let e;
|
|
2319
2355
|
try {
|
|
2320
|
-
e = await navigator.mediaDevices.getDisplayMedia(
|
|
2356
|
+
e = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !0 }));
|
|
2321
2357
|
} catch (w) {
|
|
2322
2358
|
return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
|
|
2323
2359
|
}
|
|
2324
|
-
const n =
|
|
2360
|
+
const n = Ms();
|
|
2325
2361
|
let a;
|
|
2326
2362
|
try {
|
|
2327
2363
|
a = n ? new window.MediaRecorder(e, { mimeType: n }) : new window.MediaRecorder(e);
|
|
@@ -2344,9 +2380,9 @@ async function Bs(t = {}) {
|
|
|
2344
2380
|
} else
|
|
2345
2381
|
(S = t.oncancel) == null || S.call(t);
|
|
2346
2382
|
}), e.getVideoTracks().forEach((w) => {
|
|
2347
|
-
w.addEventListener("ended", () =>
|
|
2383
|
+
w.addEventListener("ended", () => c(), { once: !0 });
|
|
2348
2384
|
});
|
|
2349
|
-
function
|
|
2385
|
+
function c() {
|
|
2350
2386
|
if (!o && (o = !0, a.state !== "inactive"))
|
|
2351
2387
|
try {
|
|
2352
2388
|
a.stop();
|
|
@@ -2367,13 +2403,13 @@ async function Bs(t = {}) {
|
|
|
2367
2403
|
var w;
|
|
2368
2404
|
(w = t.ontick) == null || w.call(t, Date.now() - v);
|
|
2369
2405
|
}, 500), {
|
|
2370
|
-
stop:
|
|
2406
|
+
stop: c,
|
|
2371
2407
|
get state() {
|
|
2372
2408
|
return a.state;
|
|
2373
2409
|
}
|
|
2374
2410
|
};
|
|
2375
2411
|
}
|
|
2376
|
-
const
|
|
2412
|
+
const Es = [
|
|
2377
2413
|
{
|
|
2378
2414
|
action: "file",
|
|
2379
2415
|
label: "Joindre un fichier",
|
|
@@ -2389,7 +2425,7 @@ const Ls = [
|
|
|
2389
2425
|
label: "Enregistrer l'écran",
|
|
2390
2426
|
path: "M23 7l-7 5 7 5V7z M1 5a2 2 0 012-2h12a2 2 0 012 2v14a2 2 0 01-2 2H3a2 2 0 01-2-2V5z"
|
|
2391
2427
|
}
|
|
2392
|
-
],
|
|
2428
|
+
], Bs = {
|
|
2393
2429
|
name: "WmComposer",
|
|
2394
2430
|
props: {
|
|
2395
2431
|
modelValue: { type: String, default: "" },
|
|
@@ -2412,9 +2448,9 @@ const Ls = [
|
|
|
2412
2448
|
return !this.disabled && !!this.local.trim();
|
|
2413
2449
|
},
|
|
2414
2450
|
attachItems() {
|
|
2415
|
-
return
|
|
2451
|
+
return Es.map((t) => ({
|
|
2416
2452
|
...t,
|
|
2417
|
-
disabled: t.action === "screenshot" && !
|
|
2453
|
+
disabled: t.action === "screenshot" && !ne || t.action === "record" && (!ne || !he)
|
|
2418
2454
|
}));
|
|
2419
2455
|
},
|
|
2420
2456
|
recordingElapsedLabel() {
|
|
@@ -2484,13 +2520,13 @@ const Ls = [
|
|
|
2484
2520
|
},
|
|
2485
2521
|
async captureScreenshot() {
|
|
2486
2522
|
if (this.disabled) return;
|
|
2487
|
-
const t = await
|
|
2523
|
+
const t = await Ts();
|
|
2488
2524
|
t && this.$emit("attach", t);
|
|
2489
2525
|
},
|
|
2490
2526
|
async startRecording() {
|
|
2491
2527
|
if (this.recording || this.disabled) return;
|
|
2492
2528
|
this.recordingElapsed = 0;
|
|
2493
|
-
const t = await
|
|
2529
|
+
const t = await Os({
|
|
2494
2530
|
onstart: () => {
|
|
2495
2531
|
this.recording = !0;
|
|
2496
2532
|
},
|
|
@@ -2515,27 +2551,27 @@ const Ls = [
|
|
|
2515
2551
|
}
|
|
2516
2552
|
}
|
|
2517
2553
|
}
|
|
2518
|
-
},
|
|
2554
|
+
}, Ls = { class: "wm-compose-wrap" }, Rs = {
|
|
2519
2555
|
key: 0,
|
|
2520
2556
|
class: "wm-rec"
|
|
2521
|
-
},
|
|
2557
|
+
}, $s = { class: "wm-rec__lbl" }, Fs = {
|
|
2522
2558
|
key: 1,
|
|
2523
2559
|
class: "wm-compose__menu",
|
|
2524
2560
|
role: "menu"
|
|
2525
|
-
},
|
|
2561
|
+
}, js = ["disabled", "onClick"], Us = { class: "wm-compose__menuIcon" }, Ds = {
|
|
2526
2562
|
viewBox: "0 0 24 24",
|
|
2527
2563
|
width: "14",
|
|
2528
2564
|
height: "14",
|
|
2529
2565
|
"aria-hidden": "true"
|
|
2530
|
-
},
|
|
2531
|
-
function
|
|
2532
|
-
return l(),
|
|
2533
|
-
r.recording ? (l(),
|
|
2566
|
+
}, Ns = ["d"], Ps = ["placeholder", "disabled"], Hs = { class: "wm-compose__actions" }, zs = ["title", "aria-label", "disabled"], Vs = ["disabled"];
|
|
2567
|
+
function qs(t, e, n, a, r, s) {
|
|
2568
|
+
return l(), d("div", Ls, [
|
|
2569
|
+
r.recording ? (l(), d("div", Rs, [
|
|
2534
2570
|
e[8] || (e[8] = i("span", {
|
|
2535
2571
|
class: "wm-rec__dot",
|
|
2536
2572
|
"aria-hidden": "true"
|
|
2537
2573
|
}, null, -1)),
|
|
2538
|
-
i("span",
|
|
2574
|
+
i("span", $s, "Enregistrement · " + b(s.recordingElapsedLabel), 1),
|
|
2539
2575
|
i("button", {
|
|
2540
2576
|
type: "button",
|
|
2541
2577
|
class: "wm-rec__stop",
|
|
@@ -2544,7 +2580,7 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2544
2580
|
])) : y("", !0),
|
|
2545
2581
|
i("form", {
|
|
2546
2582
|
class: E(["wm-compose", { "has-attach": r.attachOpen }]),
|
|
2547
|
-
onSubmit: e[7] || (e[7] =
|
|
2583
|
+
onSubmit: e[7] || (e[7] = X((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
|
|
2548
2584
|
}, [
|
|
2549
2585
|
i("input", {
|
|
2550
2586
|
ref: "fileEl",
|
|
@@ -2553,21 +2589,21 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2553
2589
|
multiple: "",
|
|
2554
2590
|
onChange: e[1] || (e[1] = (...o) => s.onFile && s.onFile(...o))
|
|
2555
2591
|
}, null, 544),
|
|
2556
|
-
r.attachOpen ? (l(),
|
|
2592
|
+
r.attachOpen ? (l(), d("div", {
|
|
2557
2593
|
key: 0,
|
|
2558
2594
|
class: "wm-compose__overlay",
|
|
2559
2595
|
onClick: e[2] || (e[2] = (o) => r.attachOpen = !1)
|
|
2560
2596
|
})) : y("", !0),
|
|
2561
|
-
r.attachOpen ? (l(),
|
|
2562
|
-
(l(!0),
|
|
2597
|
+
r.attachOpen ? (l(), d("div", Fs, [
|
|
2598
|
+
(l(!0), d(M, null, j(s.attachItems, (o) => (l(), d("button", {
|
|
2563
2599
|
key: o.action,
|
|
2564
2600
|
type: "button",
|
|
2565
2601
|
class: "wm-compose__menuItem",
|
|
2566
2602
|
disabled: o.disabled,
|
|
2567
|
-
onClick: (
|
|
2603
|
+
onClick: (c) => s.onAttachAction(o.action)
|
|
2568
2604
|
}, [
|
|
2569
|
-
i("span",
|
|
2570
|
-
(l(),
|
|
2605
|
+
i("span", Us, [
|
|
2606
|
+
(l(), d("svg", Ds, [
|
|
2571
2607
|
i("path", {
|
|
2572
2608
|
d: o.path,
|
|
2573
2609
|
stroke: "currentColor",
|
|
@@ -2575,13 +2611,13 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2575
2611
|
"stroke-linecap": "round",
|
|
2576
2612
|
"stroke-linejoin": "round",
|
|
2577
2613
|
fill: "none"
|
|
2578
|
-
}, null, 8,
|
|
2614
|
+
}, null, 8, Ns)
|
|
2579
2615
|
]))
|
|
2580
2616
|
]),
|
|
2581
2617
|
i("span", null, b(o.label), 1)
|
|
2582
|
-
], 8,
|
|
2618
|
+
], 8, js))), 128))
|
|
2583
2619
|
])) : y("", !0),
|
|
2584
|
-
|
|
2620
|
+
H(i("textarea", {
|
|
2585
2621
|
ref: "inputEl",
|
|
2586
2622
|
"onUpdate:modelValue": e[3] || (e[3] = (o) => r.local = o),
|
|
2587
2623
|
class: "wm-compose__input",
|
|
@@ -2590,10 +2626,10 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2590
2626
|
disabled: n.disabled,
|
|
2591
2627
|
onKeydown: e[4] || (e[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
|
|
2592
2628
|
onInput: e[5] || (e[5] = (...o) => s.autosize && s.autosize(...o))
|
|
2593
|
-
}, null, 40,
|
|
2594
|
-
[
|
|
2629
|
+
}, null, 40, Ps), [
|
|
2630
|
+
[K, r.local]
|
|
2595
2631
|
]),
|
|
2596
|
-
i("div",
|
|
2632
|
+
i("div", Hs, [
|
|
2597
2633
|
i("button", {
|
|
2598
2634
|
type: "button",
|
|
2599
2635
|
class: E(["wm-compose__icon", { "is-open": r.attachOpen }]),
|
|
@@ -2615,7 +2651,7 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2615
2651
|
}, [
|
|
2616
2652
|
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" })
|
|
2617
2653
|
], -1)
|
|
2618
|
-
])], 10,
|
|
2654
|
+
])], 10, zs),
|
|
2619
2655
|
i("button", {
|
|
2620
2656
|
type: "submit",
|
|
2621
2657
|
class: E(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
@@ -2635,12 +2671,12 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2635
2671
|
}, [
|
|
2636
2672
|
i("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
2637
2673
|
], -1)
|
|
2638
|
-
])], 10,
|
|
2674
|
+
])], 10, Vs)
|
|
2639
2675
|
])
|
|
2640
2676
|
], 34)
|
|
2641
2677
|
]);
|
|
2642
2678
|
}
|
|
2643
|
-
const
|
|
2679
|
+
const Ws = /* @__PURE__ */ B(Bs, [["render", qs], ["__scopeId", "data-v-14fa9ec0"]]), Gs = {
|
|
2644
2680
|
name: "WmSuggestionChips",
|
|
2645
2681
|
props: {
|
|
2646
2682
|
items: { type: Array, default: () => [] },
|
|
@@ -2657,24 +2693,24 @@ const Ks = /* @__PURE__ */ B(Rs, [["render", Gs], ["__scopeId", "data-v-14fa9ec0
|
|
|
2657
2693
|
return this.items.map((t) => (t == null ? void 0 : t.label) || (t == null ? void 0 : t.text) || "").join("§");
|
|
2658
2694
|
}
|
|
2659
2695
|
}
|
|
2660
|
-
},
|
|
2661
|
-
function
|
|
2662
|
-
return n.items.length ? (l(),
|
|
2696
|
+
}, Ks = ["onClick"];
|
|
2697
|
+
function Ys(t, e, n, a, r, s) {
|
|
2698
|
+
return n.items.length ? (l(), d("div", {
|
|
2663
2699
|
key: s.batchKey,
|
|
2664
2700
|
class: "wm-chips"
|
|
2665
2701
|
}, [
|
|
2666
|
-
(l(!0),
|
|
2667
|
-
key:
|
|
2702
|
+
(l(!0), d(M, null, j(n.items, (o, c) => (l(), d("button", {
|
|
2703
|
+
key: c,
|
|
2668
2704
|
type: "button",
|
|
2669
2705
|
class: "wm-chip",
|
|
2670
|
-
style: V({ animationDelay: n.baseDelay +
|
|
2706
|
+
style: V({ animationDelay: n.baseDelay + c * n.stepDelay + "ms" }),
|
|
2671
2707
|
onClick: (v) => t.$emit("select", o)
|
|
2672
|
-
}, b(o.label), 13,
|
|
2708
|
+
}, b(o.label), 13, Ks))), 128))
|
|
2673
2709
|
])) : y("", !0);
|
|
2674
2710
|
}
|
|
2675
|
-
const
|
|
2711
|
+
const Js = /* @__PURE__ */ B(Gs, [["render", Ys], ["__scopeId", "data-v-55aa529d"]]), Xs = {
|
|
2676
2712
|
name: "WmApprovalCard",
|
|
2677
|
-
components: { AIAvatar:
|
|
2713
|
+
components: { AIAvatar: Q },
|
|
2678
2714
|
props: {
|
|
2679
2715
|
action: { type: String, required: !0 },
|
|
2680
2716
|
detail: { type: String, default: "" },
|
|
@@ -2705,41 +2741,41 @@ const Qs = /* @__PURE__ */ B(Ys, [["render", Xs], ["__scopeId", "data-v-55aa529d
|
|
|
2705
2741
|
return ((t = this.rejectCallback) == null ? void 0 : t.label) || "Refuser";
|
|
2706
2742
|
}
|
|
2707
2743
|
}
|
|
2708
|
-
},
|
|
2744
|
+
}, Qs = { class: "wm-approval" }, Zs = { class: "wm-approval__head" }, er = { class: "wm-approval__icon" }, tr = { class: "wm-approval__main" }, nr = { class: "wm-approval__title" }, sr = {
|
|
2709
2745
|
key: 0,
|
|
2710
2746
|
class: "wm-approval__detail"
|
|
2711
|
-
},
|
|
2712
|
-
function
|
|
2713
|
-
const o =
|
|
2714
|
-
return l(),
|
|
2715
|
-
i("div",
|
|
2716
|
-
i("div",
|
|
2717
|
-
|
|
2747
|
+
}, rr = { class: "wm-approval__actions" };
|
|
2748
|
+
function ir(t, e, n, a, r, s) {
|
|
2749
|
+
const o = O("AIAvatar");
|
|
2750
|
+
return l(), d("div", Qs, [
|
|
2751
|
+
i("div", Zs, [
|
|
2752
|
+
i("div", er, [
|
|
2753
|
+
z(o, { size: 24 })
|
|
2718
2754
|
]),
|
|
2719
|
-
i("div",
|
|
2720
|
-
i("div",
|
|
2721
|
-
n.detail ? (l(),
|
|
2755
|
+
i("div", tr, [
|
|
2756
|
+
i("div", nr, b(n.action), 1),
|
|
2757
|
+
n.detail ? (l(), d("div", sr, b(n.detail), 1)) : y("", !0)
|
|
2722
2758
|
])
|
|
2723
2759
|
]),
|
|
2724
|
-
i("div",
|
|
2725
|
-
s.rejectId ? (l(),
|
|
2760
|
+
i("div", rr, [
|
|
2761
|
+
s.rejectId ? (l(), d("button", {
|
|
2726
2762
|
key: 0,
|
|
2727
2763
|
type: "button",
|
|
2728
2764
|
class: "wm-approval__btn wm-approval__btn--neutral",
|
|
2729
|
-
onClick: e[0] || (e[0] = (
|
|
2765
|
+
onClick: e[0] || (e[0] = (c) => t.$emit("callback", s.rejectId))
|
|
2730
2766
|
}, b(s.rejectLabel), 1)) : y("", !0),
|
|
2731
|
-
s.approveId ? (l(),
|
|
2767
|
+
s.approveId ? (l(), d("button", {
|
|
2732
2768
|
key: 1,
|
|
2733
2769
|
type: "button",
|
|
2734
2770
|
class: "wm-approval__btn wm-approval__btn--primary",
|
|
2735
|
-
onClick: e[1] || (e[1] = (
|
|
2771
|
+
onClick: e[1] || (e[1] = (c) => t.$emit("callback", s.approveId))
|
|
2736
2772
|
}, b(s.approveLabel), 1)) : y("", !0)
|
|
2737
2773
|
])
|
|
2738
2774
|
]);
|
|
2739
2775
|
}
|
|
2740
|
-
const
|
|
2776
|
+
const ar = /* @__PURE__ */ B(Xs, [["render", ir], ["__scopeId", "data-v-b1be139c"]]);
|
|
2741
2777
|
let ve = 0;
|
|
2742
|
-
const
|
|
2778
|
+
const or = /* @__PURE__ */ new Set([
|
|
2743
2779
|
"text",
|
|
2744
2780
|
"textarea",
|
|
2745
2781
|
"number",
|
|
@@ -2747,9 +2783,9 @@ const cr = /* @__PURE__ */ new Set([
|
|
|
2747
2783
|
"select",
|
|
2748
2784
|
"multiselect",
|
|
2749
2785
|
"date"
|
|
2750
|
-
]),
|
|
2786
|
+
]), lr = {
|
|
2751
2787
|
name: "WmFormCard",
|
|
2752
|
-
components: { AIAvatar:
|
|
2788
|
+
components: { AIAvatar: Q },
|
|
2753
2789
|
props: {
|
|
2754
2790
|
form: { type: Object, required: !0 },
|
|
2755
2791
|
readOnly: { type: Boolean, default: !1 },
|
|
@@ -2770,7 +2806,7 @@ const cr = /* @__PURE__ */ new Set([
|
|
|
2770
2806
|
// douteux.
|
|
2771
2807
|
normalizedFields() {
|
|
2772
2808
|
var e;
|
|
2773
|
-
return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !
|
|
2809
|
+
return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !or.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
|
|
2774
2810
|
}
|
|
2775
2811
|
},
|
|
2776
2812
|
created() {
|
|
@@ -2821,163 +2857,163 @@ const cr = /* @__PURE__ */ new Set([
|
|
|
2821
2857
|
}
|
|
2822
2858
|
}
|
|
2823
2859
|
}
|
|
2824
|
-
},
|
|
2860
|
+
}, cr = { class: "wm-form" }, dr = { class: "wm-form__head" }, ur = { class: "wm-form__icon" }, hr = { class: "wm-form__main" }, mr = { class: "wm-form__title" }, fr = {
|
|
2825
2861
|
key: 0,
|
|
2826
2862
|
class: "wm-form__detail"
|
|
2827
|
-
},
|
|
2863
|
+
}, pr = ["for"], _r = {
|
|
2828
2864
|
key: 0,
|
|
2829
2865
|
class: "wm-form__req",
|
|
2830
2866
|
"aria-hidden": "true"
|
|
2831
|
-
},
|
|
2867
|
+
}, vr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], gr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], yr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], wr = ["id", "onUpdate:modelValue", "required", "disabled"], br = {
|
|
2832
2868
|
key: 4,
|
|
2833
2869
|
class: "wm-form__bool"
|
|
2834
|
-
},
|
|
2870
|
+
}, kr = ["id", "onUpdate:modelValue", "disabled"], Cr = ["id", "onUpdate:modelValue", "required", "disabled"], Ar = {
|
|
2835
2871
|
value: "",
|
|
2836
2872
|
disabled: ""
|
|
2837
|
-
},
|
|
2873
|
+
}, Sr = ["value"], xr = {
|
|
2838
2874
|
key: 6,
|
|
2839
2875
|
class: "wm-form__multi"
|
|
2840
|
-
},
|
|
2876
|
+
}, Mr = ["value", "checked", "disabled", "onChange"], Tr = {
|
|
2841
2877
|
key: 0,
|
|
2842
2878
|
class: "wm-form__err"
|
|
2843
|
-
},
|
|
2879
|
+
}, Ir = ["disabled"], Or = {
|
|
2844
2880
|
key: 0,
|
|
2845
2881
|
class: "wm-form__spinner",
|
|
2846
2882
|
"aria-hidden": "true"
|
|
2847
|
-
},
|
|
2883
|
+
}, Er = {
|
|
2848
2884
|
key: 2,
|
|
2849
2885
|
class: "wm-form__doneLbl"
|
|
2850
2886
|
};
|
|
2851
|
-
function
|
|
2852
|
-
const o =
|
|
2853
|
-
return l(),
|
|
2854
|
-
i("div",
|
|
2855
|
-
i("div",
|
|
2856
|
-
|
|
2887
|
+
function Br(t, e, n, a, r, s) {
|
|
2888
|
+
const o = O("AIAvatar");
|
|
2889
|
+
return l(), d("div", cr, [
|
|
2890
|
+
i("div", dr, [
|
|
2891
|
+
i("div", ur, [
|
|
2892
|
+
z(o, { size: 24 })
|
|
2857
2893
|
]),
|
|
2858
|
-
i("div",
|
|
2859
|
-
i("div",
|
|
2860
|
-
n.form.description ? (l(),
|
|
2894
|
+
i("div", hr, [
|
|
2895
|
+
i("div", mr, b(n.form.title || "Formulaire"), 1),
|
|
2896
|
+
n.form.description ? (l(), d("div", fr, b(n.form.description), 1)) : y("", !0)
|
|
2861
2897
|
])
|
|
2862
2898
|
]),
|
|
2863
2899
|
i("form", {
|
|
2864
2900
|
class: "wm-form__body",
|
|
2865
|
-
onSubmit: e[0] || (e[0] =
|
|
2901
|
+
onSubmit: e[0] || (e[0] = X((...c) => s.onSubmit && s.onSubmit(...c), ["prevent"]))
|
|
2866
2902
|
}, [
|
|
2867
|
-
(l(!0),
|
|
2868
|
-
key:
|
|
2903
|
+
(l(!0), d(M, null, j(s.normalizedFields, (c) => (l(), d("div", {
|
|
2904
|
+
key: c.key,
|
|
2869
2905
|
class: "wm-form__field"
|
|
2870
2906
|
}, [
|
|
2871
2907
|
i("label", {
|
|
2872
|
-
for: `wm-f-${r._uid}-${
|
|
2908
|
+
for: `wm-f-${r._uid}-${c.key}`,
|
|
2873
2909
|
class: "wm-form__label"
|
|
2874
2910
|
}, [
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
], 8,
|
|
2878
|
-
|
|
2911
|
+
re(b(c.label), 1),
|
|
2912
|
+
c.required ? (l(), d("span", _r, "*")) : y("", !0)
|
|
2913
|
+
], 8, pr),
|
|
2914
|
+
c.type === "text" ? H((l(), d("input", {
|
|
2879
2915
|
key: 0,
|
|
2880
|
-
id: `wm-f-${r._uid}-${
|
|
2881
|
-
"onUpdate:modelValue": (v) => r.values[
|
|
2916
|
+
id: `wm-f-${r._uid}-${c.key}`,
|
|
2917
|
+
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
2882
2918
|
type: "text",
|
|
2883
2919
|
class: "wm-form__input",
|
|
2884
|
-
placeholder:
|
|
2885
|
-
required:
|
|
2920
|
+
placeholder: c.placeholder || "",
|
|
2921
|
+
required: c.required,
|
|
2886
2922
|
disabled: n.readOnly || r.busy
|
|
2887
|
-
}, null, 8,
|
|
2888
|
-
[
|
|
2889
|
-
]) :
|
|
2923
|
+
}, null, 8, vr)), [
|
|
2924
|
+
[K, r.values[c.key]]
|
|
2925
|
+
]) : c.type === "textarea" ? H((l(), d("textarea", {
|
|
2890
2926
|
key: 1,
|
|
2891
|
-
id: `wm-f-${r._uid}-${
|
|
2892
|
-
"onUpdate:modelValue": (v) => r.values[
|
|
2927
|
+
id: `wm-f-${r._uid}-${c.key}`,
|
|
2928
|
+
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
2893
2929
|
class: "wm-form__textarea",
|
|
2894
2930
|
rows: "3",
|
|
2895
|
-
placeholder:
|
|
2896
|
-
required:
|
|
2931
|
+
placeholder: c.placeholder || "",
|
|
2932
|
+
required: c.required,
|
|
2897
2933
|
disabled: n.readOnly || r.busy
|
|
2898
|
-
}, null, 8,
|
|
2899
|
-
[
|
|
2900
|
-
]) :
|
|
2934
|
+
}, null, 8, gr)), [
|
|
2935
|
+
[K, r.values[c.key]]
|
|
2936
|
+
]) : c.type === "number" ? H((l(), d("input", {
|
|
2901
2937
|
key: 2,
|
|
2902
|
-
id: `wm-f-${r._uid}-${
|
|
2903
|
-
"onUpdate:modelValue": (v) => r.values[
|
|
2938
|
+
id: `wm-f-${r._uid}-${c.key}`,
|
|
2939
|
+
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
2904
2940
|
type: "number",
|
|
2905
2941
|
class: "wm-form__input",
|
|
2906
|
-
placeholder:
|
|
2907
|
-
required:
|
|
2942
|
+
placeholder: c.placeholder || "",
|
|
2943
|
+
required: c.required,
|
|
2908
2944
|
disabled: n.readOnly || r.busy
|
|
2909
|
-
}, null, 8,
|
|
2945
|
+
}, null, 8, yr)), [
|
|
2910
2946
|
[
|
|
2911
|
-
|
|
2912
|
-
r.values[
|
|
2947
|
+
K,
|
|
2948
|
+
r.values[c.key],
|
|
2913
2949
|
void 0,
|
|
2914
2950
|
{ number: !0 }
|
|
2915
2951
|
]
|
|
2916
|
-
]) :
|
|
2952
|
+
]) : c.type === "date" ? H((l(), d("input", {
|
|
2917
2953
|
key: 3,
|
|
2918
|
-
id: `wm-f-${r._uid}-${
|
|
2919
|
-
"onUpdate:modelValue": (v) => r.values[
|
|
2954
|
+
id: `wm-f-${r._uid}-${c.key}`,
|
|
2955
|
+
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
2920
2956
|
type: "date",
|
|
2921
2957
|
class: "wm-form__input",
|
|
2922
|
-
required:
|
|
2958
|
+
required: c.required,
|
|
2923
2959
|
disabled: n.readOnly || r.busy
|
|
2924
|
-
}, null, 8,
|
|
2925
|
-
[
|
|
2926
|
-
]) :
|
|
2927
|
-
|
|
2928
|
-
id: `wm-f-${r._uid}-${
|
|
2929
|
-
"onUpdate:modelValue": (v) => r.values[
|
|
2960
|
+
}, null, 8, wr)), [
|
|
2961
|
+
[K, r.values[c.key]]
|
|
2962
|
+
]) : c.type === "boolean" ? (l(), d("label", br, [
|
|
2963
|
+
H(i("input", {
|
|
2964
|
+
id: `wm-f-${r._uid}-${c.key}`,
|
|
2965
|
+
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
2930
2966
|
type: "checkbox",
|
|
2931
2967
|
disabled: n.readOnly || r.busy
|
|
2932
|
-
}, null, 8,
|
|
2933
|
-
[Ie, r.values[
|
|
2968
|
+
}, null, 8, kr), [
|
|
2969
|
+
[Ie, r.values[c.key]]
|
|
2934
2970
|
]),
|
|
2935
|
-
i("span", null, b(
|
|
2936
|
-
])) :
|
|
2971
|
+
i("span", null, b(c.placeholder || "Oui"), 1)
|
|
2972
|
+
])) : c.type === "select" ? H((l(), d("select", {
|
|
2937
2973
|
key: 5,
|
|
2938
|
-
id: `wm-f-${r._uid}-${
|
|
2939
|
-
"onUpdate:modelValue": (v) => r.values[
|
|
2974
|
+
id: `wm-f-${r._uid}-${c.key}`,
|
|
2975
|
+
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
2940
2976
|
class: "wm-form__select",
|
|
2941
|
-
required:
|
|
2977
|
+
required: c.required,
|
|
2942
2978
|
disabled: n.readOnly || r.busy
|
|
2943
2979
|
}, [
|
|
2944
|
-
i("option",
|
|
2945
|
-
(l(!0),
|
|
2980
|
+
i("option", Ar, b(c.placeholder || "Choisir…"), 1),
|
|
2981
|
+
(l(!0), d(M, null, j(c.options, (v) => (l(), d("option", {
|
|
2946
2982
|
key: v.value,
|
|
2947
2983
|
value: v.value
|
|
2948
|
-
}, b(v.label), 9,
|
|
2949
|
-
], 8,
|
|
2950
|
-
[
|
|
2951
|
-
]) :
|
|
2952
|
-
(l(!0),
|
|
2984
|
+
}, b(v.label), 9, Sr))), 128))
|
|
2985
|
+
], 8, Cr)), [
|
|
2986
|
+
[Oe, r.values[c.key]]
|
|
2987
|
+
]) : c.type === "multiselect" ? (l(), d("div", xr, [
|
|
2988
|
+
(l(!0), d(M, null, j(c.options, (v) => (l(), d("label", {
|
|
2953
2989
|
key: v.value,
|
|
2954
2990
|
class: "wm-form__multiItem"
|
|
2955
2991
|
}, [
|
|
2956
2992
|
i("input", {
|
|
2957
2993
|
type: "checkbox",
|
|
2958
2994
|
value: v.value,
|
|
2959
|
-
checked: Array.isArray(r.values[
|
|
2995
|
+
checked: Array.isArray(r.values[c.key]) && r.values[c.key].includes(v.value),
|
|
2960
2996
|
disabled: n.readOnly || r.busy,
|
|
2961
|
-
onChange: (C) => s.toggleMulti(
|
|
2962
|
-
}, null, 40,
|
|
2997
|
+
onChange: (C) => s.toggleMulti(c.key, v.value, C.target.checked)
|
|
2998
|
+
}, null, 40, Mr),
|
|
2963
2999
|
i("span", null, b(v.label), 1)
|
|
2964
3000
|
]))), 128))
|
|
2965
3001
|
])) : y("", !0)
|
|
2966
3002
|
]))), 128)),
|
|
2967
|
-
r.error ? (l(),
|
|
2968
|
-
n.readOnly ? (l(),
|
|
3003
|
+
r.error ? (l(), d("div", Tr, b(r.error), 1)) : y("", !0),
|
|
3004
|
+
n.readOnly ? (l(), d("div", Er, "Réponse envoyée")) : (l(), d("button", {
|
|
2969
3005
|
key: 1,
|
|
2970
3006
|
type: "submit",
|
|
2971
3007
|
class: "wm-form__submit",
|
|
2972
3008
|
disabled: r.busy
|
|
2973
3009
|
}, [
|
|
2974
|
-
r.busy ? (l(),
|
|
3010
|
+
r.busy ? (l(), d("span", Or)) : y("", !0),
|
|
2975
3011
|
i("span", null, b(r.busy ? "Envoi…" : n.form.submit_label || "Envoyer"), 1)
|
|
2976
|
-
], 8,
|
|
3012
|
+
], 8, Ir))
|
|
2977
3013
|
], 32)
|
|
2978
3014
|
]);
|
|
2979
3015
|
}
|
|
2980
|
-
const
|
|
3016
|
+
const Lr = /* @__PURE__ */ B(lr, [["render", Br], ["__scopeId", "data-v-64b40f76"]]), Rr = {
|
|
2981
3017
|
name: "WmFeedback",
|
|
2982
3018
|
props: {
|
|
2983
3019
|
busy: { type: Boolean, default: !1 },
|
|
@@ -3001,43 +3037,43 @@ const $r = /* @__PURE__ */ B(dr, [["render", Rr], ["__scopeId", "data-v-64b40f76
|
|
|
3001
3037
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
3002
3038
|
}
|
|
3003
3039
|
}
|
|
3004
|
-
},
|
|
3040
|
+
}, $r = { class: "wm-fb" }, Fr = { class: "wm-fb__row" }, jr = ["onClick"], Ur = { class: "wm-fb__emoji" }, Dr = { class: "wm-fb__label" }, Nr = ["disabled"], Pr = {
|
|
3005
3041
|
key: 1,
|
|
3006
3042
|
class: "wm-fb__done"
|
|
3007
3043
|
};
|
|
3008
|
-
function
|
|
3009
|
-
return l(),
|
|
3010
|
-
n.done ? (l(),
|
|
3044
|
+
function Hr(t, e, n, a, r, s) {
|
|
3045
|
+
return l(), d("div", $r, [
|
|
3046
|
+
n.done ? (l(), d("div", Pr, [...e[3] || (e[3] = [
|
|
3011
3047
|
ue('<div class="wm-fb__check" data-v-6f45ff3b><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-6f45ff3b><path d="M20 6L9 17l-5-5" data-v-6f45ff3b></path></svg></div><div class="wm-fb__doneTitle" data-v-6f45ff3b>Merci pour votre retour !</div><div class="wm-fb__doneSub" data-v-6f45ff3b>Votre avis a bien été pris en compte.</div>', 3)
|
|
3012
|
-
])])) : (l(),
|
|
3048
|
+
])])) : (l(), d(M, { key: 0 }, [
|
|
3013
3049
|
e[1] || (e[1] = i("div", { class: "wm-fb__title" }, "Comment s'est passée cette conversation ?", -1)),
|
|
3014
3050
|
e[2] || (e[2] = i("div", { class: "wm-fb__sub" }, "Votre avis nous aide à améliorer l'assistant.", -1)),
|
|
3015
|
-
i("div",
|
|
3016
|
-
(l(!0),
|
|
3051
|
+
i("div", Fr, [
|
|
3052
|
+
(l(!0), d(M, null, j(r.options, (o) => (l(), d("button", {
|
|
3017
3053
|
key: o.v,
|
|
3018
3054
|
type: "button",
|
|
3019
3055
|
class: E(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
|
|
3020
|
-
onClick: (
|
|
3056
|
+
onClick: (c) => r.sel = o.v
|
|
3021
3057
|
}, [
|
|
3022
|
-
i("span",
|
|
3023
|
-
i("span",
|
|
3024
|
-
], 10,
|
|
3058
|
+
i("span", Ur, b(o.e), 1),
|
|
3059
|
+
i("span", Dr, b(o.l), 1)
|
|
3060
|
+
], 10, jr))), 128))
|
|
3025
3061
|
]),
|
|
3026
3062
|
i("button", {
|
|
3027
3063
|
type: "button",
|
|
3028
3064
|
class: "wm-fb__send",
|
|
3029
3065
|
disabled: !r.sel || n.busy,
|
|
3030
3066
|
onClick: e[0] || (e[0] = (...o) => s.onSend && s.onSend(...o))
|
|
3031
|
-
}, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9,
|
|
3067
|
+
}, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9, Nr)
|
|
3032
3068
|
], 64))
|
|
3033
3069
|
]);
|
|
3034
3070
|
}
|
|
3035
|
-
const
|
|
3036
|
-
function
|
|
3071
|
+
const zr = /* @__PURE__ */ B(Rr, [["render", Hr], ["__scopeId", "data-v-6f45ff3b"]]);
|
|
3072
|
+
function Vr(t) {
|
|
3037
3073
|
const e = new Date(t);
|
|
3038
3074
|
return e.setHours(0, 0, 0, 0), e;
|
|
3039
3075
|
}
|
|
3040
|
-
const
|
|
3076
|
+
const qr = {
|
|
3041
3077
|
name: "WmHistoryDrawer",
|
|
3042
3078
|
props: {
|
|
3043
3079
|
conversations: { type: Array, default: () => [] },
|
|
@@ -3071,7 +3107,7 @@ const Gr = {
|
|
|
3071
3107
|
) : this.normalized;
|
|
3072
3108
|
},
|
|
3073
3109
|
groups() {
|
|
3074
|
-
const e =
|
|
3110
|
+
const e = Vr(/* @__PURE__ */ new Date()).getTime(), n = e - 6 * 864e5, a = [], r = [], s = [];
|
|
3075
3111
|
for (const o of this.filtered) {
|
|
3076
3112
|
if (!o.stamp) {
|
|
3077
3113
|
s.push(o);
|
|
@@ -3089,29 +3125,29 @@ const Gr = {
|
|
|
3089
3125
|
return this.filtered.length > 0;
|
|
3090
3126
|
}
|
|
3091
3127
|
}
|
|
3092
|
-
},
|
|
3128
|
+
}, Wr = { class: "wm-hd" }, Gr = {
|
|
3093
3129
|
class: "wm-hd__panel",
|
|
3094
3130
|
role: "dialog",
|
|
3095
3131
|
"aria-label": "Vos discussions"
|
|
3096
|
-
},
|
|
3132
|
+
}, Kr = { class: "wm-hd__head" }, Yr = { class: "wm-hd__top" }, Jr = { class: "wm-hd__search" }, Xr = { class: "wm-hd__list" }, Qr = {
|
|
3097
3133
|
key: 0,
|
|
3098
3134
|
class: "wm-hd__group"
|
|
3099
|
-
},
|
|
3135
|
+
}, Zr = { class: "wm-hd__groupLabel" }, ei = { class: "wm-hd__rows" }, ti = ["onClick"], ni = { class: "wm-hd__rowIcon" }, si = {
|
|
3100
3136
|
key: 0,
|
|
3101
3137
|
class: "wm-hd__rowDot",
|
|
3102
3138
|
"aria-label": "Message non lu"
|
|
3103
|
-
},
|
|
3139
|
+
}, ri = { class: "wm-hd__rowBody" }, ii = { class: "wm-hd__rowTop" }, ai = { class: "wm-hd__rowTitle" }, oi = { class: "wm-hd__rowPreview" }, li = {
|
|
3104
3140
|
key: 0,
|
|
3105
3141
|
class: "wm-hd__empty"
|
|
3106
3142
|
};
|
|
3107
|
-
function
|
|
3108
|
-
return l(),
|
|
3143
|
+
function ci(t, e, n, a, r, s) {
|
|
3144
|
+
return l(), d("div", Wr, [
|
|
3109
3145
|
i("div", {
|
|
3110
3146
|
class: "wm-hd__scrim",
|
|
3111
3147
|
onClick: e[0] || (e[0] = (o) => t.$emit("close"))
|
|
3112
3148
|
}),
|
|
3113
|
-
i("aside",
|
|
3114
|
-
i("div",
|
|
3149
|
+
i("aside", Gr, [
|
|
3150
|
+
i("div", Kr, [
|
|
3115
3151
|
e[5] || (e[5] = i("div", { class: "wm-hd__heading" }, [
|
|
3116
3152
|
i("div", { class: "wm-hd__title" }, "Vos discussions"),
|
|
3117
3153
|
i("div", { class: "wm-hd__sub" }, "Reprenez là où vous en étiez.")
|
|
@@ -3137,7 +3173,7 @@ function ui(t, e, n, a, r, s) {
|
|
|
3137
3173
|
], -1)
|
|
3138
3174
|
])])
|
|
3139
3175
|
]),
|
|
3140
|
-
i("div",
|
|
3176
|
+
i("div", Yr, [
|
|
3141
3177
|
i("button", {
|
|
3142
3178
|
type: "button",
|
|
3143
3179
|
class: "wm-hd__new",
|
|
@@ -3160,7 +3196,7 @@ function ui(t, e, n, a, r, s) {
|
|
|
3160
3196
|
], -1),
|
|
3161
3197
|
i("span", null, "Démarrer un nouveau fil", -1)
|
|
3162
3198
|
])]),
|
|
3163
|
-
i("div",
|
|
3199
|
+
i("div", Jr, [
|
|
3164
3200
|
e[7] || (e[7] = i("span", { class: "wm-hd__searchIcon" }, [
|
|
3165
3201
|
i("svg", {
|
|
3166
3202
|
width: "12",
|
|
@@ -3176,33 +3212,33 @@ function ui(t, e, n, a, r, s) {
|
|
|
3176
3212
|
i("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
|
|
3177
3213
|
])
|
|
3178
3214
|
], -1)),
|
|
3179
|
-
|
|
3215
|
+
H(i("input", {
|
|
3180
3216
|
"onUpdate:modelValue": e[3] || (e[3] = (o) => r.query = o),
|
|
3181
3217
|
type: "text",
|
|
3182
3218
|
placeholder: "Rechercher dans vos messages",
|
|
3183
3219
|
"aria-label": "Rechercher dans vos messages"
|
|
3184
3220
|
}, null, 512), [
|
|
3185
|
-
[
|
|
3221
|
+
[K, r.query]
|
|
3186
3222
|
])
|
|
3187
3223
|
])
|
|
3188
3224
|
]),
|
|
3189
|
-
i("div",
|
|
3190
|
-
(l(!0),
|
|
3225
|
+
i("div", Xr, [
|
|
3226
|
+
(l(!0), d(M, null, j(s.groups, (o) => (l(), d(M, {
|
|
3191
3227
|
key: o.key
|
|
3192
3228
|
}, [
|
|
3193
|
-
o.items.length ? (l(),
|
|
3194
|
-
i("div",
|
|
3195
|
-
i("div",
|
|
3196
|
-
(l(!0),
|
|
3197
|
-
key:
|
|
3229
|
+
o.items.length ? (l(), d("div", Qr, [
|
|
3230
|
+
i("div", Zr, b(o.label), 1),
|
|
3231
|
+
i("div", ei, [
|
|
3232
|
+
(l(!0), d(M, null, j(o.items, (c) => (l(), d("button", {
|
|
3233
|
+
key: c.id,
|
|
3198
3234
|
type: "button",
|
|
3199
3235
|
class: E(["wm-hd__row", {
|
|
3200
|
-
"wm-hd__row--active":
|
|
3201
|
-
"wm-hd__row--unread":
|
|
3236
|
+
"wm-hd__row--active": c.id === n.activeId,
|
|
3237
|
+
"wm-hd__row--unread": c.unread
|
|
3202
3238
|
}]),
|
|
3203
|
-
onClick: (v) => t.$emit("pick",
|
|
3239
|
+
onClick: (v) => t.$emit("pick", c)
|
|
3204
3240
|
}, [
|
|
3205
|
-
i("div",
|
|
3241
|
+
i("div", ni, [
|
|
3206
3242
|
e[8] || (e[8] = i("svg", {
|
|
3207
3243
|
width: "11",
|
|
3208
3244
|
height: "11",
|
|
@@ -3216,24 +3252,24 @@ function ui(t, e, n, a, r, s) {
|
|
|
3216
3252
|
opacity: "0.92"
|
|
3217
3253
|
})
|
|
3218
3254
|
], -1)),
|
|
3219
|
-
|
|
3255
|
+
c.unread ? (l(), d("span", si)) : y("", !0)
|
|
3220
3256
|
]),
|
|
3221
|
-
i("div",
|
|
3222
|
-
i("div",
|
|
3223
|
-
i("span",
|
|
3257
|
+
i("div", ri, [
|
|
3258
|
+
i("div", ii, [
|
|
3259
|
+
i("span", ai, b(c.title), 1)
|
|
3224
3260
|
]),
|
|
3225
|
-
i("div",
|
|
3261
|
+
i("div", oi, b(c.preview || "Aucun message"), 1)
|
|
3226
3262
|
])
|
|
3227
|
-
], 10,
|
|
3263
|
+
], 10, ti))), 128))
|
|
3228
3264
|
])
|
|
3229
3265
|
])) : y("", !0)
|
|
3230
3266
|
], 64))), 128)),
|
|
3231
|
-
s.hasAny ? y("", !0) : (l(),
|
|
3267
|
+
s.hasAny ? y("", !0) : (l(), d("div", li, " Aucun fil pour le moment. "))
|
|
3232
3268
|
])
|
|
3233
3269
|
])
|
|
3234
3270
|
]);
|
|
3235
3271
|
}
|
|
3236
|
-
const
|
|
3272
|
+
const di = /* @__PURE__ */ B(qr, [["render", ci], ["__scopeId", "data-v-1259e822"]]), ui = {
|
|
3237
3273
|
name: "WmMoreMenu",
|
|
3238
3274
|
props: {
|
|
3239
3275
|
canRename: { type: Boolean, default: !0 },
|
|
@@ -3260,18 +3296,18 @@ const hi = /* @__PURE__ */ B(Gr, [["render", ui], ["__scopeId", "data-v-1259e822
|
|
|
3260
3296
|
this.notifOn = !this.notifOn, this.$emit("notif-toggle", this.notifOn);
|
|
3261
3297
|
}
|
|
3262
3298
|
}
|
|
3263
|
-
},
|
|
3299
|
+
}, hi = { class: "wm-mm" }, mi = {
|
|
3264
3300
|
class: "wm-mm__pop",
|
|
3265
3301
|
role: "menu"
|
|
3266
|
-
},
|
|
3267
|
-
function
|
|
3268
|
-
return l(),
|
|
3302
|
+
}, fi = { class: "wm-mm__section" }, pi = { class: "wm-mm__section" }, _i = { class: "wm-mm__section" };
|
|
3303
|
+
function vi(t, e, n, a, r, s) {
|
|
3304
|
+
return l(), d("div", hi, [
|
|
3269
3305
|
i("div", {
|
|
3270
3306
|
class: "wm-mm__scrim",
|
|
3271
3307
|
onClick: e[0] || (e[0] = (o) => t.$emit("close"))
|
|
3272
3308
|
}),
|
|
3273
|
-
i("div",
|
|
3274
|
-
i("div",
|
|
3309
|
+
i("div", mi, [
|
|
3310
|
+
i("div", fi, [
|
|
3275
3311
|
i("button", {
|
|
3276
3312
|
type: "button",
|
|
3277
3313
|
class: "wm-mm__item",
|
|
@@ -3294,7 +3330,7 @@ function yi(t, e, n, a, r, s) {
|
|
|
3294
3330
|
], -1),
|
|
3295
3331
|
i("span", { class: "wm-mm__label" }, "Historique des discussions", -1)
|
|
3296
3332
|
])]),
|
|
3297
|
-
n.canRename ? (l(),
|
|
3333
|
+
n.canRename ? (l(), d("button", {
|
|
3298
3334
|
key: 0,
|
|
3299
3335
|
type: "button",
|
|
3300
3336
|
class: "wm-mm__item",
|
|
@@ -3302,7 +3338,7 @@ function yi(t, e, n, a, r, s) {
|
|
|
3302
3338
|
}, [...e[9] || (e[9] = [
|
|
3303
3339
|
ue('<span class="wm-mm__icon" data-v-c1bb81d2><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-c1bb81d2><path d="M12 20h9" data-v-c1bb81d2></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" data-v-c1bb81d2></path></svg></span><span class="wm-mm__label" data-v-c1bb81d2>Renommer le fil</span>', 2)
|
|
3304
3340
|
])])) : y("", !0),
|
|
3305
|
-
n.canClear ? (l(),
|
|
3341
|
+
n.canClear ? (l(), d("button", {
|
|
3306
3342
|
key: 1,
|
|
3307
3343
|
type: "button",
|
|
3308
3344
|
class: "wm-mm__item",
|
|
@@ -3325,7 +3361,7 @@ function yi(t, e, n, a, r, s) {
|
|
|
3325
3361
|
], -1),
|
|
3326
3362
|
i("span", { class: "wm-mm__label" }, "Effacer ce fil", -1)
|
|
3327
3363
|
])])) : y("", !0),
|
|
3328
|
-
n.canExport ? (l(),
|
|
3364
|
+
n.canExport ? (l(), d("button", {
|
|
3329
3365
|
key: 2,
|
|
3330
3366
|
type: "button",
|
|
3331
3367
|
class: "wm-mm__item",
|
|
@@ -3335,7 +3371,7 @@ function yi(t, e, n, a, r, s) {
|
|
|
3335
3371
|
])])) : y("", !0)
|
|
3336
3372
|
]),
|
|
3337
3373
|
e[17] || (e[17] = i("div", { class: "wm-mm__sep" }, null, -1)),
|
|
3338
|
-
i("div",
|
|
3374
|
+
i("div", pi, [
|
|
3339
3375
|
i("button", {
|
|
3340
3376
|
type: "button",
|
|
3341
3377
|
class: "wm-mm__item",
|
|
@@ -3365,8 +3401,8 @@ function yi(t, e, n, a, r, s) {
|
|
|
3365
3401
|
])
|
|
3366
3402
|
]),
|
|
3367
3403
|
e[18] || (e[18] = i("div", { class: "wm-mm__sep" }, null, -1)),
|
|
3368
|
-
i("div",
|
|
3369
|
-
n.statusUrl ? (l(),
|
|
3404
|
+
i("div", _i, [
|
|
3405
|
+
n.statusUrl ? (l(), d("button", {
|
|
3370
3406
|
key: 0,
|
|
3371
3407
|
type: "button",
|
|
3372
3408
|
class: "wm-mm__item",
|
|
@@ -3389,7 +3425,7 @@ function yi(t, e, n, a, r, s) {
|
|
|
3389
3425
|
], -1),
|
|
3390
3426
|
i("span", { class: "wm-mm__label" }, "Statut des services", -1)
|
|
3391
3427
|
])])) : y("", !0),
|
|
3392
|
-
n.helpUrl ? (l(),
|
|
3428
|
+
n.helpUrl ? (l(), d("button", {
|
|
3393
3429
|
key: 1,
|
|
3394
3430
|
type: "button",
|
|
3395
3431
|
class: "wm-mm__item",
|
|
@@ -3416,13 +3452,13 @@ function yi(t, e, n, a, r, s) {
|
|
|
3416
3452
|
])
|
|
3417
3453
|
]);
|
|
3418
3454
|
}
|
|
3419
|
-
const
|
|
3455
|
+
const gi = /* @__PURE__ */ B(ui, [["render", vi], ["__scopeId", "data-v-c1bb81d2"]]), ge = "ww-messenger-tokens";
|
|
3420
3456
|
function de(t) {
|
|
3421
3457
|
var n;
|
|
3422
3458
|
const e = (n = t == null ? void 0 : t.author) == null ? void 0 : n.type;
|
|
3423
3459
|
return e === "agent_ia" || e === "agent_human";
|
|
3424
3460
|
}
|
|
3425
|
-
function
|
|
3461
|
+
function yi(t, e) {
|
|
3426
3462
|
if (!t || !e) return "";
|
|
3427
3463
|
const n = Array.isArray(t.fields) ? t.fields : [], a = [];
|
|
3428
3464
|
for (const r of n) {
|
|
@@ -3431,8 +3467,8 @@ function bi(t, e) {
|
|
|
3431
3467
|
if (s == null || s === "") continue;
|
|
3432
3468
|
let o;
|
|
3433
3469
|
if (Array.isArray(s)) {
|
|
3434
|
-
if (o = s.map((
|
|
3435
|
-
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o =
|
|
3470
|
+
if (o = s.map((c) => se(r, String(c))).join(", "), !o) continue;
|
|
3471
|
+
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = se(r, String(s));
|
|
3436
3472
|
a.push(`${r.label} :
|
|
3437
3473
|
${o}`);
|
|
3438
3474
|
}
|
|
@@ -3440,12 +3476,12 @@ ${o}`);
|
|
|
3440
3476
|
|
|
3441
3477
|
`);
|
|
3442
3478
|
}
|
|
3443
|
-
function
|
|
3479
|
+
function se(t, e) {
|
|
3444
3480
|
if (!Array.isArray(t == null ? void 0 : t.options)) return e;
|
|
3445
3481
|
const n = t.options.find((a) => (a == null ? void 0 : a.value) === e);
|
|
3446
3482
|
return (n == null ? void 0 : n.label) || e;
|
|
3447
3483
|
}
|
|
3448
|
-
function
|
|
3484
|
+
function wi(t, e) {
|
|
3449
3485
|
const n = [], a = Array.isArray(t == null ? void 0 : t.fields) ? t.fields : [];
|
|
3450
3486
|
for (const r of a) {
|
|
3451
3487
|
if (!(r != null && r.key) || !(r != null && r.label)) continue;
|
|
@@ -3453,11 +3489,11 @@ function ki(t, e) {
|
|
|
3453
3489
|
if (s == null || s === "") continue;
|
|
3454
3490
|
let o;
|
|
3455
3491
|
if (Array.isArray(s)) {
|
|
3456
|
-
if (o = s.map((v) =>
|
|
3457
|
-
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o =
|
|
3458
|
-
const
|
|
3492
|
+
if (o = s.map((v) => se(r, String(v))).join(", "), !o) continue;
|
|
3493
|
+
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = se(r, String(s));
|
|
3494
|
+
const c = r.type === "textarea" || typeof o == "string" && (o.length > 60 || o.includes(`
|
|
3459
3495
|
`));
|
|
3460
|
-
n.push({ label: r.label, value: o, multiline:
|
|
3496
|
+
n.push({ label: r.label, value: o, multiline: c });
|
|
3461
3497
|
}
|
|
3462
3498
|
return {
|
|
3463
3499
|
kind: "form_response",
|
|
@@ -3467,20 +3503,20 @@ function ki(t, e) {
|
|
|
3467
3503
|
}
|
|
3468
3504
|
};
|
|
3469
3505
|
}
|
|
3470
|
-
const
|
|
3506
|
+
const bi = 450, ki = 50, Ci = 900, Ai = 12e3, Si = 300, xi = {
|
|
3471
3507
|
name: "Messenger",
|
|
3472
3508
|
components: {
|
|
3473
|
-
Launcher:
|
|
3474
|
-
Header:
|
|
3475
|
-
Onboarding:
|
|
3476
|
-
MessageList:
|
|
3477
|
-
Composer:
|
|
3478
|
-
SuggestionChips:
|
|
3479
|
-
ApprovalCard:
|
|
3480
|
-
FormCard:
|
|
3481
|
-
Feedback:
|
|
3482
|
-
HistoryDrawer:
|
|
3483
|
-
MoreMenu:
|
|
3509
|
+
Launcher: Ge,
|
|
3510
|
+
Header: yt,
|
|
3511
|
+
Onboarding: Pt,
|
|
3512
|
+
MessageList: xs,
|
|
3513
|
+
Composer: Ws,
|
|
3514
|
+
SuggestionChips: Js,
|
|
3515
|
+
ApprovalCard: ar,
|
|
3516
|
+
FormCard: Lr,
|
|
3517
|
+
Feedback: zr,
|
|
3518
|
+
HistoryDrawer: di,
|
|
3519
|
+
MoreMenu: gi
|
|
3484
3520
|
},
|
|
3485
3521
|
// Make signAttachment available to deep children (AttachmentPreview)
|
|
3486
3522
|
// without prop drilling. The store may not exist yet at provide-time
|
|
@@ -3496,7 +3532,7 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
3496
3532
|
},
|
|
3497
3533
|
props: {
|
|
3498
3534
|
// Hardcoded server default (overridable for staging/dev).
|
|
3499
|
-
baseUrl: { type: String, default:
|
|
3535
|
+
baseUrl: { type: String, default: Pe },
|
|
3500
3536
|
widgetId: { type: String, default: "" },
|
|
3501
3537
|
userId: { type: String, default: "" },
|
|
3502
3538
|
userHash: { type: String, default: "" },
|
|
@@ -3635,7 +3671,7 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
3635
3671
|
var n;
|
|
3636
3672
|
const t = this.readState, e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {};
|
|
3637
3673
|
return this.allConversations.map((a) => {
|
|
3638
|
-
const r = e[a.id] || [], s = this.convLastActivity(a, r), o = t[a.id] || "",
|
|
3674
|
+
const r = e[a.id] || [], s = this.convLastActivity(a, r), o = t[a.id] || "", c = this.lastMessageAuthorType(r), v = !!s && c !== "user" && (!o || s > o);
|
|
3639
3675
|
return { ...a, _preview: this.convPreview(a, r), _unread: v };
|
|
3640
3676
|
});
|
|
3641
3677
|
},
|
|
@@ -3779,8 +3815,8 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
3779
3815
|
const t = this.currentConv;
|
|
3780
3816
|
if (!t) return [];
|
|
3781
3817
|
const e = (r) => {
|
|
3782
|
-
var s, o,
|
|
3783
|
-
return (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.type) === "system" || Array.isArray((o = r == null ? void 0 : r.payload) == null ? void 0 : o.attachments) && r.payload.attachments.length || (
|
|
3818
|
+
var s, o, c, v;
|
|
3819
|
+
return (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.type) === "system" || Array.isArray((o = r == null ? void 0 : r.payload) == null ? void 0 : o.attachments) && r.payload.attachments.length || (c = r == null ? void 0 : r.metadata) != null && c.artifact || (v = r == null ? void 0 : r.metadata) != null && v.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
|
|
3784
3820
|
}, n = (r) => {
|
|
3785
3821
|
var s;
|
|
3786
3822
|
return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending";
|
|
@@ -3826,11 +3862,11 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
3826
3862
|
return ((e = (t = this.pendingApproval) == null ? void 0 : t.payload) == null ? void 0 : e.name) || ((n = this.pendingApproval) == null ? void 0 : n.text_md) || "Confirmer l'action";
|
|
3827
3863
|
},
|
|
3828
3864
|
approvalDetail() {
|
|
3829
|
-
var a, r, s, o,
|
|
3865
|
+
var a, r, s, o, c, v;
|
|
3830
3866
|
const t = (s = (r = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : r.pending) == null ? void 0 : s.user_explanation;
|
|
3831
3867
|
if (typeof t == "string" && t.trim())
|
|
3832
3868
|
return t.trim();
|
|
3833
|
-
const e = (v = (
|
|
3869
|
+
const e = (v = (c = (o = this.pendingApproval) == null ? void 0 : o.payload) == null ? void 0 : c.pending) == null ? void 0 : v.prepared_params;
|
|
3834
3870
|
if (!e || typeof e != "object") return "";
|
|
3835
3871
|
const n = Object.entries(e);
|
|
3836
3872
|
return n.length ? n.slice(0, 2).map(([C, w]) => `${C}: ${w}`).join(" · ") : "";
|
|
@@ -3869,10 +3905,10 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
3869
3905
|
const t = this.currentConv;
|
|
3870
3906
|
let e = /* @__PURE__ */ new Date();
|
|
3871
3907
|
if (t) {
|
|
3872
|
-
const o = ((r = (((a = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : a[t.id]) || []).find((
|
|
3908
|
+
const o = ((r = (((a = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : a[t.id]) || []).find((c) => c == null ? void 0 : c.created_at)) == null ? void 0 : r.created_at) || t.created_at;
|
|
3873
3909
|
if (o) {
|
|
3874
|
-
const
|
|
3875
|
-
Number.isNaN(
|
|
3910
|
+
const c = new Date(o);
|
|
3911
|
+
Number.isNaN(c.getTime()) || (e = c);
|
|
3876
3912
|
}
|
|
3877
3913
|
}
|
|
3878
3914
|
return `Aujourd'hui · ${be(e)}`;
|
|
@@ -3985,8 +4021,8 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
3985
4021
|
n[r.id] = e;
|
|
3986
4022
|
continue;
|
|
3987
4023
|
}
|
|
3988
|
-
const o = typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0,
|
|
3989
|
-
if (!o && !
|
|
4024
|
+
const o = typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0, c = Array.isArray((a = r == null ? void 0 : r.payload) == null ? void 0 : a.attachments) && r.payload.attachments.length > 0;
|
|
4025
|
+
if (!o && !c) {
|
|
3990
4026
|
n[r.id] = e;
|
|
3991
4027
|
continue;
|
|
3992
4028
|
}
|
|
@@ -4005,7 +4041,7 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4005
4041
|
hasUserHash: !!this.userHash
|
|
4006
4042
|
}), typeof document < "u" && !document.getElementById(ge)) {
|
|
4007
4043
|
const t = document.createElement("style");
|
|
4008
|
-
t.id = ge, t.textContent =
|
|
4044
|
+
t.id = ge, t.textContent = Ne, document.head.appendChild(t);
|
|
4009
4045
|
}
|
|
4010
4046
|
this.hydrateReadState(), await this.boot(), this.isEmbedded && this.store && await this.open();
|
|
4011
4047
|
},
|
|
@@ -4071,9 +4107,9 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4071
4107
|
for (let s = e.length - 1; s >= 0; s--) {
|
|
4072
4108
|
const o = e[s];
|
|
4073
4109
|
if (!o) continue;
|
|
4074
|
-
const
|
|
4075
|
-
if (
|
|
4076
|
-
return (((n = o.author) == null ? void 0 : n.type) === "user" ? "Vous : " : "") +
|
|
4110
|
+
const c = typeof o.text_md == "string" ? o.text_md.trim() : "";
|
|
4111
|
+
if (c)
|
|
4112
|
+
return (((n = o.author) == null ? void 0 : n.type) === "user" ? "Vous : " : "") + c.replace(/\s+/g, " ");
|
|
4077
4113
|
const v = (a = o.payload) == null ? void 0 : a.attachments;
|
|
4078
4114
|
if (Array.isArray(v) && v.length) return "📎 Pièce jointe";
|
|
4079
4115
|
}
|
|
@@ -4156,19 +4192,19 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4156
4192
|
// bounded by MIN/MAX_BETWEEN_MS.
|
|
4157
4193
|
scheduleReveal(t) {
|
|
4158
4194
|
const e = Date.now(), n = ((t == null ? void 0 : t.text_md) || "").length, a = Math.min(
|
|
4159
|
-
|
|
4160
|
-
Math.max(
|
|
4195
|
+
Ai,
|
|
4196
|
+
Math.max(Ci, n * ki)
|
|
4161
4197
|
), s = Math.max(
|
|
4162
|
-
e +
|
|
4163
|
-
this.nextRevealAt +
|
|
4198
|
+
e + bi,
|
|
4199
|
+
this.nextRevealAt + Si
|
|
4164
4200
|
) + a;
|
|
4165
4201
|
this.nextRevealAt = s;
|
|
4166
|
-
const o = Math.max(0, s - e),
|
|
4167
|
-
this.revealedAt = { ...this.revealedAt, [
|
|
4202
|
+
const o = Math.max(0, s - e), c = t.id, v = setTimeout(() => {
|
|
4203
|
+
this.revealedAt = { ...this.revealedAt, [c]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== v);
|
|
4168
4204
|
}, o);
|
|
4169
4205
|
this.revealTimers.push(v);
|
|
4170
4206
|
const C = setTimeout(() => {
|
|
4171
|
-
this.revealedAt[
|
|
4207
|
+
this.revealedAt[c] > 0 || (this.revealedAt = { ...this.revealedAt, [c]: Date.now() }), this.revealTimers = this.revealTimers.filter((w) => w !== C);
|
|
4172
4208
|
}, o + 4e3);
|
|
4173
4209
|
this.revealTimers.push(C);
|
|
4174
4210
|
},
|
|
@@ -4187,12 +4223,12 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4187
4223
|
baseUrl: this.baseUrl,
|
|
4188
4224
|
widgetId: this.widgetId,
|
|
4189
4225
|
userId: this.userId
|
|
4190
|
-
}), this.transport = fe(
|
|
4226
|
+
}), this.transport = fe($e({
|
|
4191
4227
|
baseUrl: this.baseUrl,
|
|
4192
4228
|
widgetId: this.widgetId,
|
|
4193
4229
|
userId: this.userId,
|
|
4194
4230
|
userHash: this.userHash
|
|
4195
|
-
})), this.store = fe(
|
|
4231
|
+
})), this.store = fe(De(this.transport)), await this.store.start(), this.customer && typeof this.customer == "object" && await this.store.applyCustomer(this.customer), console.log("[ww-messenger] boot done", {
|
|
4196
4232
|
ready: this.store.state.ready,
|
|
4197
4233
|
error: this.store.state.error
|
|
4198
4234
|
});
|
|
@@ -4323,7 +4359,7 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4323
4359
|
!t || !this.store || !(!(typeof window < "u" && typeof window.confirm == "function") || window.confirm("Effacer ce fil de votre côté ? Cette action ne supprime pas les messages côté agent.")) || ((n = this.s) != null && n.messagesByConv && (this.s.messagesByConv[t.id] = []), this.activeConvId = null, this.showOnboarding = !0);
|
|
4324
4360
|
},
|
|
4325
4361
|
exportCurrentConv() {
|
|
4326
|
-
var r, s, o,
|
|
4362
|
+
var r, s, o, c, v, C;
|
|
4327
4363
|
const t = this.currentConv;
|
|
4328
4364
|
if (!t) return;
|
|
4329
4365
|
const e = (((s = (r = this.s) == null ? void 0 : r.messagesByConv) == null ? void 0 : s[t.id]) || []).slice(), n = [
|
|
@@ -4333,7 +4369,7 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4333
4369
|
];
|
|
4334
4370
|
for (const w of e) {
|
|
4335
4371
|
if (!w) continue;
|
|
4336
|
-
const S = ((o = w.author) == null ? void 0 : o.name) || (((
|
|
4372
|
+
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"), R = w.created_at ? new Date(w.created_at).toLocaleString("fr-FR") : "", A = (w.text_md || "").trim();
|
|
4337
4373
|
A && (n.push(`[${R}] ${S} :`), n.push(A), n.push(""));
|
|
4338
4374
|
}
|
|
4339
4375
|
const a = new Blob([n.join(`
|
|
@@ -4368,12 +4404,12 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4368
4404
|
async onFormSubmit({ values: t }) {
|
|
4369
4405
|
const e = this.pendingForm;
|
|
4370
4406
|
if (!(e != null && e.form)) return;
|
|
4371
|
-
const n =
|
|
4407
|
+
const n = yi(e.form, t);
|
|
4372
4408
|
if (!n) return;
|
|
4373
4409
|
const a = this.currentConv;
|
|
4374
4410
|
a && await this.store.send(a.id, n, {
|
|
4375
4411
|
metadata: {
|
|
4376
|
-
artifact:
|
|
4412
|
+
artifact: wi(e.form, t)
|
|
4377
4413
|
}
|
|
4378
4414
|
});
|
|
4379
4415
|
},
|
|
@@ -4417,30 +4453,30 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4417
4453
|
}
|
|
4418
4454
|
}
|
|
4419
4455
|
}
|
|
4420
|
-
},
|
|
4456
|
+
}, Mi = {
|
|
4421
4457
|
key: 0,
|
|
4422
4458
|
class: "wm-loading",
|
|
4423
4459
|
"aria-busy": "true",
|
|
4424
4460
|
"aria-live": "polite"
|
|
4425
|
-
},
|
|
4461
|
+
}, Ti = {
|
|
4426
4462
|
key: 0,
|
|
4427
4463
|
class: "wm-state"
|
|
4428
|
-
},
|
|
4464
|
+
}, Ii = { class: "wm-state__err" }, Oi = { class: "wm-state__errSub" }, Ei = { class: "wm-bottom" }, Bi = {
|
|
4429
4465
|
key: 0,
|
|
4430
4466
|
ref: "floatEl",
|
|
4431
4467
|
class: "wm-float"
|
|
4432
|
-
},
|
|
4468
|
+
}, Li = {
|
|
4433
4469
|
key: 1,
|
|
4434
4470
|
class: "wm-actionWait",
|
|
4435
4471
|
role: "status",
|
|
4436
4472
|
"aria-live": "polite"
|
|
4437
|
-
},
|
|
4473
|
+
}, Ri = { class: "wm-actionWait__lbl" }, $i = {
|
|
4438
4474
|
key: 1,
|
|
4439
4475
|
class: "wm-attached"
|
|
4440
|
-
},
|
|
4441
|
-
function
|
|
4442
|
-
const o =
|
|
4443
|
-
return l(),
|
|
4476
|
+
}, Fi = ["onClick"];
|
|
4477
|
+
function ji(t, e, n, a, r, s) {
|
|
4478
|
+
const o = O("Launcher"), c = O("Header"), v = O("Onboarding"), C = O("MessageList"), w = O("ApprovalCard"), S = O("FormCard"), R = O("Feedback"), A = O("SuggestionChips"), D = O("Composer"), x = O("MoreMenu"), N = O("HistoryDrawer");
|
|
4479
|
+
return l(), d("div", {
|
|
4444
4480
|
class: E(["wm-root", `wm-root--${n.displayMode}`])
|
|
4445
4481
|
}, [
|
|
4446
4482
|
!r.isOpen && !s.isEmbedded ? (l(), $(o, {
|
|
@@ -4448,22 +4484,22 @@ function Di(t, e, n, a, r, s) {
|
|
|
4448
4484
|
"unread-count": s.unreadCount,
|
|
4449
4485
|
peek: s.launcherPeek,
|
|
4450
4486
|
onOpen: s.openFromPeek,
|
|
4451
|
-
onDismiss: e[0] || (e[0] = (
|
|
4487
|
+
onDismiss: e[0] || (e[0] = (F) => r.labelDismissed = !0)
|
|
4452
4488
|
}, null, 8, ["unread-count", "peek", "onOpen"])) : y("", !0),
|
|
4453
|
-
r.isOpen || s.isEmbedded ? (l(),
|
|
4489
|
+
r.isOpen || s.isEmbedded ? (l(), d("section", {
|
|
4454
4490
|
key: 1,
|
|
4455
4491
|
class: E(["wm-panel", `wm-panel--${n.displayMode}`]),
|
|
4456
4492
|
style: V(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
|
|
4457
4493
|
role: "dialog",
|
|
4458
4494
|
"aria-label": "Messenger"
|
|
4459
4495
|
}, [
|
|
4460
|
-
!s.ready && !s.error ? (l(),
|
|
4461
|
-
s.isEmbedded ? y("", !0) : (l(),
|
|
4496
|
+
!s.ready && !s.error ? (l(), d("div", Mi, [
|
|
4497
|
+
s.isEmbedded ? y("", !0) : (l(), d("button", {
|
|
4462
4498
|
key: 0,
|
|
4463
4499
|
type: "button",
|
|
4464
4500
|
class: "wm-loading__close",
|
|
4465
4501
|
"aria-label": "Réduire",
|
|
4466
|
-
onClick: e[1] || (e[1] = (...
|
|
4502
|
+
onClick: e[1] || (e[1] = (...F) => s.close && s.close(...F))
|
|
4467
4503
|
}, [...e[6] || (e[6] = [
|
|
4468
4504
|
i("svg", {
|
|
4469
4505
|
width: "13",
|
|
@@ -4483,8 +4519,8 @@ function Di(t, e, n, a, r, s) {
|
|
|
4483
4519
|
class: "wm-loading__spinner",
|
|
4484
4520
|
"aria-hidden": "true"
|
|
4485
4521
|
}, null, -1))
|
|
4486
|
-
])) : (l(),
|
|
4487
|
-
|
|
4522
|
+
])) : (l(), d(M, { key: 1 }, [
|
|
4523
|
+
z(c, {
|
|
4488
4524
|
title: s.headerTitle,
|
|
4489
4525
|
escalated: s.isEscalated,
|
|
4490
4526
|
"agent-name": s.humanAgentName,
|
|
@@ -4499,8 +4535,8 @@ function Di(t, e, n, a, r, s) {
|
|
|
4499
4535
|
onMore: s.toggleMore,
|
|
4500
4536
|
onClose: s.close
|
|
4501
4537
|
}, null, 8, ["title", "escalated", "agent-name", "agent-avatar-url", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "onBack", "onMore", "onClose"]),
|
|
4502
|
-
s.error ? (l(),
|
|
4503
|
-
i("div",
|
|
4538
|
+
s.error ? (l(), d("div", Ti, [
|
|
4539
|
+
i("div", Ii, [
|
|
4504
4540
|
e[9] || (e[9] = i("div", { class: "wm-state__errIcon" }, [
|
|
4505
4541
|
i("svg", {
|
|
4506
4542
|
width: "14",
|
|
@@ -4518,11 +4554,11 @@ function Di(t, e, n, a, r, s) {
|
|
|
4518
4554
|
], -1)),
|
|
4519
4555
|
i("div", null, [
|
|
4520
4556
|
e[8] || (e[8] = i("div", { class: "wm-state__errTitle" }, "Connexion impossible", -1)),
|
|
4521
|
-
i("div",
|
|
4557
|
+
i("div", Oi, b(s.error), 1)
|
|
4522
4558
|
])
|
|
4523
4559
|
])
|
|
4524
|
-
])) : s.currentConv ? (l(),
|
|
4525
|
-
|
|
4560
|
+
])) : s.currentConv ? (l(), d(M, { key: 2 }, [
|
|
4561
|
+
z(C, {
|
|
4526
4562
|
ref: "messageList",
|
|
4527
4563
|
messages: s.displayedMessages,
|
|
4528
4564
|
"streaming-active": s.streamingActive,
|
|
@@ -4533,8 +4569,8 @@ function Di(t, e, n, a, r, s) {
|
|
|
4533
4569
|
"unread-anchor-ts": r.unreadAnchorTs,
|
|
4534
4570
|
onLoadMore: s.onLoadMore
|
|
4535
4571
|
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "onLoadMore"]),
|
|
4536
|
-
i("div",
|
|
4537
|
-
s.floatVisible ? (l(),
|
|
4572
|
+
i("div", Ei, [
|
|
4573
|
+
s.floatVisible ? (l(), d("div", Bi, [
|
|
4538
4574
|
s.approvalReady ? (l(), $(w, {
|
|
4539
4575
|
key: 0,
|
|
4540
4576
|
action: s.approvalTitle,
|
|
@@ -4556,17 +4592,17 @@ function Di(t, e, n, a, r, s) {
|
|
|
4556
4592
|
onSelect: s.onSuggestion
|
|
4557
4593
|
}, null, 8, ["items", "onSelect"]))
|
|
4558
4594
|
], 512)) : y("", !0),
|
|
4559
|
-
s.actionInFlight ? (l(),
|
|
4595
|
+
s.actionInFlight ? (l(), d("div", Li, [
|
|
4560
4596
|
e[10] || (e[10] = i("span", {
|
|
4561
4597
|
class: "wm-actionWait__spinner",
|
|
4562
4598
|
"aria-hidden": "true"
|
|
4563
4599
|
}, null, -1)),
|
|
4564
|
-
i("span",
|
|
4600
|
+
i("span", Ri, b(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
|
|
4565
4601
|
])) : (l(), $(D, {
|
|
4566
4602
|
key: 2,
|
|
4567
4603
|
ref: "composer",
|
|
4568
4604
|
modelValue: r.draft,
|
|
4569
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
4605
|
+
"onUpdate:modelValue": e[2] || (e[2] = (F) => r.draft = F),
|
|
4570
4606
|
placeholder: s.composerPlaceholder,
|
|
4571
4607
|
disabled: !!s.pendingApproval,
|
|
4572
4608
|
"attach-label": "Joindre un fichier",
|
|
@@ -4582,13 +4618,13 @@ function Di(t, e, n, a, r, s) {
|
|
|
4582
4618
|
"notif-enabled": r.notifEnabled,
|
|
4583
4619
|
"status-url": s.statusUrl,
|
|
4584
4620
|
"help-url": s.helpUrl,
|
|
4585
|
-
onClose: e[3] || (e[3] = (
|
|
4621
|
+
onClose: e[3] || (e[3] = (F) => r.moreOpen = !1),
|
|
4586
4622
|
onNotifToggle: s.onNotifToggle,
|
|
4587
4623
|
onAction: s.onMoreAction
|
|
4588
4624
|
}, null, 8, ["can-rename", "can-clear", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0),
|
|
4589
|
-
r.pendingAttachments.length ? (l(),
|
|
4590
|
-
(l(!0),
|
|
4591
|
-
key:
|
|
4625
|
+
r.pendingAttachments.length ? (l(), d("div", $i, [
|
|
4626
|
+
(l(!0), d(M, null, j(r.pendingAttachments, (F, P) => (l(), d("div", {
|
|
4627
|
+
key: P,
|
|
4592
4628
|
class: "wm-attached__chip"
|
|
4593
4629
|
}, [
|
|
4594
4630
|
e[12] || (e[12] = i("svg", {
|
|
@@ -4604,11 +4640,11 @@ function Di(t, e, n, a, r, s) {
|
|
|
4604
4640
|
}, [
|
|
4605
4641
|
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" })
|
|
4606
4642
|
], -1)),
|
|
4607
|
-
i("span", null, b(
|
|
4643
|
+
i("span", null, b(F.name), 1),
|
|
4608
4644
|
i("button", {
|
|
4609
4645
|
type: "button",
|
|
4610
4646
|
"aria-label": "Retirer",
|
|
4611
|
-
onClick: (
|
|
4647
|
+
onClick: (q) => r.pendingAttachments.splice(P, 1)
|
|
4612
4648
|
}, [...e[11] || (e[11] = [
|
|
4613
4649
|
i("svg", {
|
|
4614
4650
|
width: "10",
|
|
@@ -4623,7 +4659,7 @@ function Di(t, e, n, a, r, s) {
|
|
|
4623
4659
|
}, [
|
|
4624
4660
|
i("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
4625
4661
|
], -1)
|
|
4626
|
-
])], 8,
|
|
4662
|
+
])], 8, Fi)
|
|
4627
4663
|
]))), 128))
|
|
4628
4664
|
])) : y("", !0)
|
|
4629
4665
|
], 64)) : (l(), $(v, {
|
|
@@ -4641,7 +4677,7 @@ function Di(t, e, n, a, r, s) {
|
|
|
4641
4677
|
key: 3,
|
|
4642
4678
|
conversations: s.drawerConversations,
|
|
4643
4679
|
"active-id": s.currentConv ? s.currentConv.id : null,
|
|
4644
|
-
onClose: e[4] || (e[4] = (
|
|
4680
|
+
onClose: e[4] || (e[4] = (F) => r.historyOpen = !1),
|
|
4645
4681
|
onNew: s.onDrawerNew,
|
|
4646
4682
|
onPick: s.onDrawerPick
|
|
4647
4683
|
}, null, 8, ["conversations", "active-id", "onNew", "onPick"])) : y("", !0),
|
|
@@ -4653,7 +4689,7 @@ function Di(t, e, n, a, r, s) {
|
|
|
4653
4689
|
"notif-enabled": r.notifEnabled,
|
|
4654
4690
|
"status-url": s.statusUrl,
|
|
4655
4691
|
"help-url": s.helpUrl,
|
|
4656
|
-
onClose: e[5] || (e[5] = (
|
|
4692
|
+
onClose: e[5] || (e[5] = (F) => r.moreOpen = !1),
|
|
4657
4693
|
onNotifToggle: s.onNotifToggle,
|
|
4658
4694
|
onAction: s.onMoreAction
|
|
4659
4695
|
}, null, 8, ["notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0)
|
|
@@ -4661,49 +4697,49 @@ function Di(t, e, n, a, r, s) {
|
|
|
4661
4697
|
], 6)) : y("", !0)
|
|
4662
4698
|
], 2);
|
|
4663
4699
|
}
|
|
4664
|
-
const
|
|
4700
|
+
const Ni = /* @__PURE__ */ B(xi, [["render", ji], ["__scopeId", "data-v-8264e504"]]), Pi = "0.2.6";
|
|
4665
4701
|
export {
|
|
4666
|
-
|
|
4702
|
+
Q as AIAvatar,
|
|
4667
4703
|
le as AVATAR_COLORS,
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4704
|
+
Xt as ActionResult,
|
|
4705
|
+
ar as ApprovalCard,
|
|
4706
|
+
an as ArtifactFormResponse,
|
|
4707
|
+
yn as ArtifactInfoCard,
|
|
4708
|
+
jn as ArtifactRenderer,
|
|
4709
|
+
Ln as ArtifactTicket,
|
|
4710
|
+
Yn as AttachmentPreview,
|
|
4711
|
+
ns as Bubble,
|
|
4712
|
+
Ws as Composer,
|
|
4713
|
+
Pe as DEFAULT_BASE_URL,
|
|
4714
|
+
zr as Feedback,
|
|
4715
|
+
Lr as FormCard,
|
|
4716
|
+
yt as Header,
|
|
4717
|
+
di as HistoryDrawer,
|
|
4682
4718
|
ke as HumanAvatar,
|
|
4683
|
-
|
|
4719
|
+
Ge as Launcher,
|
|
4684
4720
|
he as MEDIA_RECORDER_SUPPORTED,
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4721
|
+
xs as MessageList,
|
|
4722
|
+
Ni as Messenger,
|
|
4723
|
+
gi as MoreMenu,
|
|
4724
|
+
Pt as Onboarding,
|
|
4725
|
+
ne as SCREEN_CAPTURE_SUPPORTED,
|
|
4726
|
+
Js as SuggestionChips,
|
|
4727
|
+
ot as TeamAvatars,
|
|
4728
|
+
as as Typing,
|
|
4729
|
+
Pi as VERSION,
|
|
4694
4730
|
ye as avatarColor,
|
|
4695
4731
|
we as avatarInitials,
|
|
4696
|
-
|
|
4732
|
+
Ts as captureScreenshotFile,
|
|
4697
4733
|
U as colors,
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4734
|
+
De as createStore,
|
|
4735
|
+
$e as createTransport,
|
|
4736
|
+
Ni as default,
|
|
4701
4737
|
be as formatTime,
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4738
|
+
Di as guessAttachmentKind,
|
|
4739
|
+
Ms as pickRecorderMime,
|
|
4740
|
+
Qn as renderMarkdown,
|
|
4741
|
+
Os as startScreenRecording,
|
|
4742
|
+
Ne as tokensCss,
|
|
4743
|
+
Ue as uuid,
|
|
4744
|
+
Ue as v4
|
|
4709
4745
|
};
|