@_solaris/messenger-widget 0.5.17 → 0.5.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iframe/iframe.css +1 -1
- package/dist/iframe/iframe.js +6 -6
- package/dist/messenger.cjs +4 -4
- package/dist/messenger.js +148 -144
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as E, createVNode as V, Transition as Ue, withCtx as Pe, Fragment as R, renderList as j, withKeys as ue, withModifiers as
|
|
1
|
+
import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as E, createVNode as V, Transition as Ue, withCtx as Pe, Fragment as R, renderList as j, withKeys as ue, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as U, withDirectives as K, vModelText as X, createTextVNode as pe, resolveDynamicComponent as je, renderSlot as De, vModelCheckbox as ze, vModelSelect as He, markRaw as ke } from "vue";
|
|
2
2
|
const qe = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -134,7 +134,7 @@ function We(e) {
|
|
|
134
134
|
console.error("[transport] initial /conversations failed", d);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
async function
|
|
137
|
+
async function w() {
|
|
138
138
|
const d = await a("GET", "/customers/me");
|
|
139
139
|
return (d == null ? void 0 : d.customer) ?? null;
|
|
140
140
|
}
|
|
@@ -193,7 +193,7 @@ function We(e) {
|
|
|
193
193
|
_
|
|
194
194
|
);
|
|
195
195
|
}
|
|
196
|
-
async function
|
|
196
|
+
async function G(d, f, _) {
|
|
197
197
|
return se(), a(
|
|
198
198
|
"POST",
|
|
199
199
|
`/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
|
|
@@ -251,12 +251,12 @@ function We(e) {
|
|
|
251
251
|
console.error("[transport] bad SSE payload", d, _);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function Y() {
|
|
255
255
|
t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
|
|
256
256
|
}
|
|
257
257
|
function se() {
|
|
258
258
|
clearTimeout(t.burstTimer), $(), t.panelOpen || (t.burstTimer = setTimeout(() => {
|
|
259
|
-
t.panelOpen ||
|
|
259
|
+
t.panelOpen || Y();
|
|
260
260
|
}, Ve));
|
|
261
261
|
}
|
|
262
262
|
function ce(d) {
|
|
@@ -282,7 +282,7 @@ function We(e) {
|
|
|
282
282
|
function m() {
|
|
283
283
|
if (document.hidden)
|
|
284
284
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
|
|
285
|
-
t.hiddenGraceTimer = null, document.hidden && (h(),
|
|
285
|
+
t.hiddenGraceTimer = null, document.hidden && (h(), Y(), r("paused"));
|
|
286
286
|
}, Ke);
|
|
287
287
|
else {
|
|
288
288
|
if (t.hiddenGraceTimer) {
|
|
@@ -293,7 +293,7 @@ function We(e) {
|
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
function g() {
|
|
296
|
-
h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null,
|
|
296
|
+
h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, Y(), t.visibilityHandler && (document.removeEventListener(
|
|
297
297
|
"visibilitychange",
|
|
298
298
|
t.visibilityHandler
|
|
299
299
|
), t.visibilityHandler = null), t.started = !1;
|
|
@@ -304,7 +304,7 @@ function We(e) {
|
|
|
304
304
|
stop: g,
|
|
305
305
|
setPanelOpen: ce,
|
|
306
306
|
// REST
|
|
307
|
-
getCustomer:
|
|
307
|
+
getCustomer: w,
|
|
308
308
|
patchCustomer: T,
|
|
309
309
|
listConversations: I,
|
|
310
310
|
createConversation: A,
|
|
@@ -313,7 +313,7 @@ function We(e) {
|
|
|
313
313
|
markConversationRead: F,
|
|
314
314
|
listMessages: N,
|
|
315
315
|
postMessage: P,
|
|
316
|
-
postCallback:
|
|
316
|
+
postCallback: G,
|
|
317
317
|
uploadAttachment: Z,
|
|
318
318
|
signAttachment: ee,
|
|
319
319
|
// Read-only state
|
|
@@ -462,7 +462,7 @@ function Qe(e) {
|
|
|
462
462
|
async function p(h) {
|
|
463
463
|
const m = t.paginationByConv[h];
|
|
464
464
|
if (!(m != null && m.loaded || m != null && m.loading)) {
|
|
465
|
-
|
|
465
|
+
w(h, { nextCursor: null, loading: !0, loaded: !1 });
|
|
466
466
|
try {
|
|
467
467
|
const g = await e.listMessages(h, {
|
|
468
468
|
limit: l
|
|
@@ -472,13 +472,13 @@ function Qe(e) {
|
|
|
472
472
|
const y = f.filter((C) => !((C == null ? void 0 : C.id) != null && _.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && _.has(`c:${C.client_msg_id}`)));
|
|
473
473
|
t.messagesByConv[h] = [...d, ...y].sort(
|
|
474
474
|
ce
|
|
475
|
-
),
|
|
475
|
+
), w(h, {
|
|
476
476
|
nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
|
|
477
477
|
loading: !1,
|
|
478
478
|
loaded: !0
|
|
479
479
|
});
|
|
480
480
|
} catch (g) {
|
|
481
|
-
console.error("[store] openConversation failed", g),
|
|
481
|
+
console.error("[store] openConversation failed", g), w(h, {
|
|
482
482
|
nextCursor: null,
|
|
483
483
|
loading: !1,
|
|
484
484
|
loaded: !1
|
|
@@ -492,7 +492,7 @@ function Qe(e) {
|
|
|
492
492
|
if (!m || m.loading || !m.nextCursor) return;
|
|
493
493
|
const d = (f = (t.messagesByConv[h] || []).find((_) => _ == null ? void 0 : _.created_at)) == null ? void 0 : f.created_at;
|
|
494
494
|
if (d) {
|
|
495
|
-
|
|
495
|
+
w(h, { ...m, loading: !0 });
|
|
496
496
|
try {
|
|
497
497
|
const _ = await e.listMessages(h, {
|
|
498
498
|
before: d,
|
|
@@ -501,17 +501,17 @@ function Qe(e) {
|
|
|
501
501
|
for (const x of C)
|
|
502
502
|
(x == null ? void 0 : x.id) != null && S.add(`id:${String(x.id)}`), x != null && x.client_msg_id && S.add(`c:${x.client_msg_id}`);
|
|
503
503
|
const L = y.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
|
|
504
|
-
t.messagesByConv[h] = [...L, ...C],
|
|
504
|
+
t.messagesByConv[h] = [...L, ...C], w(h, {
|
|
505
505
|
nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
|
|
506
506
|
loading: !1,
|
|
507
507
|
loaded: !0
|
|
508
508
|
});
|
|
509
509
|
} catch (_) {
|
|
510
|
-
console.error("[store] loadMore failed", _),
|
|
510
|
+
console.error("[store] loadMore failed", _), w(h, { ...m, loading: !1 });
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function w(h, m) {
|
|
515
515
|
t.paginationByConv = { ...t.paginationByConv, [h]: m };
|
|
516
516
|
}
|
|
517
517
|
async function T(h, m) {
|
|
@@ -585,7 +585,7 @@ function Qe(e) {
|
|
|
585
585
|
...d && typeof d == "object" ? { metadata: d } : {}
|
|
586
586
|
});
|
|
587
587
|
} catch (x) {
|
|
588
|
-
console.error("[store] send failed", x),
|
|
588
|
+
console.error("[store] send failed", x), Y(h, y, {
|
|
589
589
|
_failed: !0,
|
|
590
590
|
_pending: !1
|
|
591
591
|
});
|
|
@@ -630,7 +630,7 @@ function Qe(e) {
|
|
|
630
630
|
};
|
|
631
631
|
await T(h, { metadata: _ });
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function G(h) {
|
|
634
634
|
var g, d;
|
|
635
635
|
const m = t.messagesByConv[h] || [];
|
|
636
636
|
for (let f = m.length - 1; f >= 0; f--) {
|
|
@@ -705,7 +705,7 @@ function Qe(e) {
|
|
|
705
705
|
function ne(h, m) {
|
|
706
706
|
return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function Y(h, m, g) {
|
|
709
709
|
const d = t.messagesByConv[h];
|
|
710
710
|
if (!d) return;
|
|
711
711
|
const f = d.findIndex((y) => y.id === m);
|
|
@@ -757,7 +757,7 @@ function Qe(e) {
|
|
|
757
757
|
clickCallback: M,
|
|
758
758
|
signAttachment: N,
|
|
759
759
|
submitFeedback: P,
|
|
760
|
-
getPendingApproval:
|
|
760
|
+
getPendingApproval: G,
|
|
761
761
|
getActionInFlight: ee,
|
|
762
762
|
getLatestSuggestions: te,
|
|
763
763
|
getLatestForm: Z,
|
|
@@ -1152,7 +1152,7 @@ function ae(e) {
|
|
|
1152
1152
|
const t = (n = e == null ? void 0 : e.author) == null ? void 0 : n.type;
|
|
1153
1153
|
return t === "agent_ia" || t === "agent_human";
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function W(e) {
|
|
1156
1156
|
if (e == null) return null;
|
|
1157
1157
|
const t = typeof e == "number" ? e : Number(e);
|
|
1158
1158
|
return Number.isFinite(t) ? t : null;
|
|
@@ -1482,7 +1482,7 @@ const ot = {
|
|
|
1482
1482
|
) + r;
|
|
1483
1483
|
this.nextRevealAt = a;
|
|
1484
1484
|
const l = Math.max(0, a - n), p = e.id, k = setTimeout(() => {
|
|
1485
|
-
this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((
|
|
1485
|
+
this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
|
|
1486
1486
|
}, l);
|
|
1487
1487
|
this.revealTimers.push(k);
|
|
1488
1488
|
},
|
|
@@ -1603,7 +1603,7 @@ const ot = {
|
|
|
1603
1603
|
if (!(e != null && e.id) || e._draft || !this.store) return;
|
|
1604
1604
|
const t = ((a = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : a[e.id]) || [], n = pt(t);
|
|
1605
1605
|
if (n == null) return;
|
|
1606
|
-
const i =
|
|
1606
|
+
const i = W(e.last_read_message_id), r = W(n);
|
|
1607
1607
|
r != null && (i != null && r <= i || (this._readMarkerPending = { convId: e.id, messageId: n }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
|
|
1608
1608
|
const l = this._readMarkerPending;
|
|
1609
1609
|
this._readMarkerPending = null, this._readMarkerTimer = null, l && this.store && this.store.markConversationRead(
|
|
@@ -1617,7 +1617,7 @@ const ot = {
|
|
|
1617
1617
|
function pt(e) {
|
|
1618
1618
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
1619
1619
|
const n = e[t];
|
|
1620
|
-
if (!(!n || n._pending) &&
|
|
1620
|
+
if (!(!n || n._pending) && W(n.id) != null)
|
|
1621
1621
|
return n.id;
|
|
1622
1622
|
}
|
|
1623
1623
|
return null;
|
|
@@ -1724,15 +1724,15 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1724
1724
|
}),
|
|
1725
1725
|
onClick: (k) => e.$emit("open", l.convId),
|
|
1726
1726
|
onKeydown: [
|
|
1727
|
-
ue(
|
|
1728
|
-
ue(
|
|
1727
|
+
ue(J((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
|
|
1728
|
+
ue(J((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
|
|
1729
1729
|
]
|
|
1730
1730
|
}, [
|
|
1731
1731
|
o("button", {
|
|
1732
1732
|
type: "button",
|
|
1733
1733
|
class: "wm-peek__close",
|
|
1734
1734
|
"aria-label": s.t("launcher.dismiss"),
|
|
1735
|
-
onClick:
|
|
1735
|
+
onClick: J((k) => e.$emit("dismiss", l.convId), ["stop"])
|
|
1736
1736
|
}, [...t[5] || (t[5] = [
|
|
1737
1737
|
o("svg", {
|
|
1738
1738
|
width: "9",
|
|
@@ -1758,7 +1758,7 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1758
1758
|
key: 0,
|
|
1759
1759
|
class: "wm-peek__avatarBadge",
|
|
1760
1760
|
"aria-label": s.t("launcher.unreadMessages", { count: l.count })
|
|
1761
|
-
}, v(l.count > 9 ? "9+" : l.count), 9, Mt)) :
|
|
1761
|
+
}, v(l.count > 9 ? "9+" : l.count), 9, Mt)) : b("", !0)
|
|
1762
1762
|
]),
|
|
1763
1763
|
o("div", Tt, [
|
|
1764
1764
|
o("div", xt, [
|
|
@@ -1770,10 +1770,10 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1770
1770
|
o("button", {
|
|
1771
1771
|
type: "button",
|
|
1772
1772
|
class: "wm-peek__open",
|
|
1773
|
-
onClick:
|
|
1773
|
+
onClick: J((k) => e.$emit("open", l.convId), ["stop"])
|
|
1774
1774
|
}, v(s.t("common.open")), 9, Rt)
|
|
1775
1775
|
], 44, Ct))), 128))
|
|
1776
|
-
], 2)) :
|
|
1776
|
+
], 2)) : b("", !0)
|
|
1777
1777
|
]),
|
|
1778
1778
|
_: 1
|
|
1779
1779
|
}),
|
|
@@ -1804,7 +1804,7 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1804
1804
|
}) : s.t("launcher.unreadConversationsOne", {
|
|
1805
1805
|
count: n.unreadCount
|
|
1806
1806
|
})
|
|
1807
|
-
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Bt)) :
|
|
1807
|
+
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Bt)) : b("", !0)
|
|
1808
1808
|
], 8, Et)
|
|
1809
1809
|
], 32);
|
|
1810
1810
|
}
|
|
@@ -1850,7 +1850,7 @@ function zt(e, t, n, i, r, s) {
|
|
|
1850
1850
|
"--wm-avr": n.size * 0.32 + "px"
|
|
1851
1851
|
})
|
|
1852
1852
|
}, [
|
|
1853
|
-
n.pulse ? (c(), u("div", Pt)) :
|
|
1853
|
+
n.pulse ? (c(), u("div", Pt)) : b("", !0),
|
|
1854
1854
|
o("div", {
|
|
1855
1855
|
class: O(["wm-aiav__inner", {
|
|
1856
1856
|
"wm-aiav__inner--glow": n.pulse,
|
|
@@ -1950,8 +1950,8 @@ function Wt(e, t, n, i, r, s) {
|
|
|
1950
1950
|
}, null, 8, $t)) : (c(), u("span", Vt, v(s.initialsFor(a)), 1))
|
|
1951
1951
|
], 4))), 128))
|
|
1952
1952
|
], 4),
|
|
1953
|
-
n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) :
|
|
1954
|
-
])) :
|
|
1953
|
+
n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) : b("", !0)
|
|
1954
|
+
])) : b("", !0);
|
|
1955
1955
|
}
|
|
1956
1956
|
const Gt = /* @__PURE__ */ B(Ht, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
|
|
1957
1957
|
name: "WmHeader",
|
|
@@ -2038,7 +2038,7 @@ function on(e, t, n, i, r, s) {
|
|
|
2038
2038
|
key: 0,
|
|
2039
2039
|
members: s.displayedTeamMembers,
|
|
2040
2040
|
"response-label": ""
|
|
2041
|
-
}, null, 8, ["members"])) :
|
|
2041
|
+
}, null, 8, ["members"])) : b("", !0)
|
|
2042
2042
|
], 64)) : (c(), u("div", nn)),
|
|
2043
2043
|
o("div", sn, [
|
|
2044
2044
|
n.showMore ? (c(), u("button", {
|
|
@@ -2072,7 +2072,7 @@ function on(e, t, n, i, r, s) {
|
|
|
2072
2072
|
r: "1.6"
|
|
2073
2073
|
})
|
|
2074
2074
|
], -1)
|
|
2075
|
-
])], 10, rn)) :
|
|
2075
|
+
])], 10, rn)) : b("", !0),
|
|
2076
2076
|
n.showClose ? (c(), u("button", {
|
|
2077
2077
|
key: 1,
|
|
2078
2078
|
type: "button",
|
|
@@ -2094,7 +2094,7 @@ function on(e, t, n, i, r, s) {
|
|
|
2094
2094
|
}, [
|
|
2095
2095
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2096
2096
|
], -1)
|
|
2097
|
-
])], 8, an)) :
|
|
2097
|
+
])], 8, an)) : b("", !0)
|
|
2098
2098
|
])
|
|
2099
2099
|
]);
|
|
2100
2100
|
}
|
|
@@ -2145,22 +2145,22 @@ function un(e) {
|
|
|
2145
2145
|
if (!T) break;
|
|
2146
2146
|
k.push(T[1]), i++;
|
|
2147
2147
|
}
|
|
2148
|
-
const
|
|
2148
|
+
const w = k.map((T) => `<li>${re(T)}</li>`).join("");
|
|
2149
2149
|
n.push({
|
|
2150
2150
|
type: "block",
|
|
2151
|
-
html: `<ul class="wm-md-ul">${
|
|
2151
|
+
html: `<ul class="wm-md-ul">${w}</ul>`
|
|
2152
2152
|
});
|
|
2153
2153
|
continue;
|
|
2154
2154
|
}
|
|
2155
2155
|
const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
|
|
2156
2156
|
if (l) {
|
|
2157
|
-
const k = parseInt(l[1], 10),
|
|
2157
|
+
const k = parseInt(l[1], 10), w = [l[2]];
|
|
2158
2158
|
for (i++; i < t.length; ) {
|
|
2159
2159
|
const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
|
|
2160
2160
|
if (!A) break;
|
|
2161
|
-
|
|
2161
|
+
w.push(A[1]), i++;
|
|
2162
2162
|
}
|
|
2163
|
-
const T =
|
|
2163
|
+
const T = w.map((A) => `<li>${re(A)}</li>`).join(""), I = k !== 1 ? ` start="${k}"` : "";
|
|
2164
2164
|
n.push({
|
|
2165
2165
|
type: "block",
|
|
2166
2166
|
html: `<ol class="wm-md-ol"${I}>${T}</ol>`
|
|
@@ -2381,11 +2381,11 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2381
2381
|
]),
|
|
2382
2382
|
o("span", Mn, [
|
|
2383
2383
|
o("span", Tn, v(l.label), 1),
|
|
2384
|
-
l.description ? (c(), u("span", xn, v(l.description), 1)) :
|
|
2384
|
+
l.description ? (c(), u("span", xn, v(l.description), 1)) : b("", !0)
|
|
2385
2385
|
])
|
|
2386
2386
|
], 10, kn))), 128))
|
|
2387
2387
|
], 2)
|
|
2388
|
-
])) :
|
|
2388
|
+
])) : b("", !0),
|
|
2389
2389
|
n.openThreads.length ? (c(), u("div", On, [
|
|
2390
2390
|
o("div", Ln, v(s.t("onboarding.recentConversations")), 1),
|
|
2391
2391
|
o("div", In, [
|
|
@@ -2440,7 +2440,7 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2440
2440
|
key: 0,
|
|
2441
2441
|
class: "wm-onb__thread-dot",
|
|
2442
2442
|
"aria-label": s.t("onboarding.unread")
|
|
2443
|
-
}, null, 8, Nn)) :
|
|
2443
|
+
}, null, 8, Nn)) : b("", !0)
|
|
2444
2444
|
], 2),
|
|
2445
2445
|
o("span", Fn, [
|
|
2446
2446
|
o("span", Un, v(l.title), 1),
|
|
@@ -2450,7 +2450,7 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2450
2450
|
}, null, 8, Pn)
|
|
2451
2451
|
]),
|
|
2452
2452
|
o("span", jn, [
|
|
2453
|
-
s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) :
|
|
2453
|
+
s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) : b("", !0),
|
|
2454
2454
|
t[6] || (t[6] = o("svg", {
|
|
2455
2455
|
width: "14",
|
|
2456
2456
|
height: "14",
|
|
@@ -2467,9 +2467,9 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2467
2467
|
], -1))
|
|
2468
2468
|
])
|
|
2469
2469
|
], 8, Bn))), 128)),
|
|
2470
|
-
s.filteredThreads.length ?
|
|
2470
|
+
s.filteredThreads.length ? b("", !0) : (c(), u("div", zn, v(s.t("onboarding.noResults", { query: r.query })), 1))
|
|
2471
2471
|
])
|
|
2472
|
-
])) :
|
|
2472
|
+
])) : b("", !0)
|
|
2473
2473
|
]);
|
|
2474
2474
|
}
|
|
2475
2475
|
const qn = /* @__PURE__ */ B(hn, [["render", Hn], ["__scopeId", "data-v-28c0780b"]]);
|
|
@@ -2573,7 +2573,7 @@ function es(e, t, n, i, r, s) {
|
|
|
2573
2573
|
"aria-hidden": "true"
|
|
2574
2574
|
}, " · ", -1)),
|
|
2575
2575
|
o("span", Zn, v(s.detailText), 1)
|
|
2576
|
-
], 64)) :
|
|
2576
|
+
], 64)) : b("", !0)
|
|
2577
2577
|
])
|
|
2578
2578
|
], 2);
|
|
2579
2579
|
}
|
|
@@ -2667,11 +2667,11 @@ function ks(e, t, n, i, r, s) {
|
|
|
2667
2667
|
alt: n.data.title || "",
|
|
2668
2668
|
loading: "lazy"
|
|
2669
2669
|
}, null, 8, fs)
|
|
2670
|
-
])) :
|
|
2670
|
+
])) : b("", !0),
|
|
2671
2671
|
o("div", gs, [
|
|
2672
2672
|
o("div", _s, [
|
|
2673
2673
|
o("div", ps, v(n.data.title), 1),
|
|
2674
|
-
n.data.subtitle ? (c(), u("div", vs, v(n.data.subtitle), 1)) :
|
|
2674
|
+
n.data.subtitle ? (c(), u("div", vs, v(n.data.subtitle), 1)) : b("", !0)
|
|
2675
2675
|
]),
|
|
2676
2676
|
n.data.badge && n.data.badge.label ? (c(), u("span", {
|
|
2677
2677
|
key: 0,
|
|
@@ -2679,10 +2679,10 @@ function ks(e, t, n, i, r, s) {
|
|
|
2679
2679
|
"wm-art__badge",
|
|
2680
2680
|
`wm-art__badge--${n.data.badge.tone || "neutral"}`
|
|
2681
2681
|
])
|
|
2682
|
-
}, v(n.data.badge.label), 3)) :
|
|
2682
|
+
}, v(n.data.badge.label), 3)) : b("", !0)
|
|
2683
2683
|
]),
|
|
2684
2684
|
s.hasBody ? (c(), u("div", ys, [
|
|
2685
|
-
n.data.body ? (c(), u("div", ws, v(n.data.body), 1)) :
|
|
2685
|
+
n.data.body ? (c(), u("div", ws, v(n.data.body), 1)) : b("", !0),
|
|
2686
2686
|
s.fields.length ? (c(!0), u(R, { key: 1 }, j(s.fields, (a, l) => (c(), u("div", {
|
|
2687
2687
|
key: l,
|
|
2688
2688
|
class: "wm-art__field"
|
|
@@ -2694,8 +2694,8 @@ function ks(e, t, n, i, r, s) {
|
|
|
2694
2694
|
{ "wm-art__fieldValue--multi": a.multiline }
|
|
2695
2695
|
])
|
|
2696
2696
|
}, v(a.value), 3)
|
|
2697
|
-
]))), 128)) :
|
|
2698
|
-
])) :
|
|
2697
|
+
]))), 128)) : b("", !0)
|
|
2698
|
+
])) : b("", !0)
|
|
2699
2699
|
]);
|
|
2700
2700
|
}
|
|
2701
2701
|
const Cs = /* @__PURE__ */ B(us, [["render", ks], ["__scopeId", "data-v-7eae0e4a"]]);
|
|
@@ -2817,7 +2817,7 @@ function Us(e, t, n, i, r, s) {
|
|
|
2817
2817
|
pe(" " + v(n.data.status.label), 1)
|
|
2818
2818
|
], 2)
|
|
2819
2819
|
]),
|
|
2820
|
-
n.data.body ? (c(), u("div", Is, v(n.data.body), 1)) :
|
|
2820
|
+
n.data.body ? (c(), u("div", Is, v(n.data.body), 1)) : b("", !0)
|
|
2821
2821
|
]),
|
|
2822
2822
|
s.fields.length ? (c(), u("div", Rs, [
|
|
2823
2823
|
(c(!0), u(R, null, j(s.fields, (a, l) => (c(), u("div", {
|
|
@@ -2870,11 +2870,11 @@ function Us(e, t, n, i, r, s) {
|
|
|
2870
2870
|
rx: "2"
|
|
2871
2871
|
}, null, -1),
|
|
2872
2872
|
o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
|
|
2873
|
-
])])) :
|
|
2873
|
+
])])) : b("", !0),
|
|
2874
2874
|
o("span", null, v(a.value), 1)
|
|
2875
2875
|
], 2)
|
|
2876
2876
|
]))), 128))
|
|
2877
|
-
])) :
|
|
2877
|
+
])) : b("", !0),
|
|
2878
2878
|
n.data.created_at ? (c(), u("div", Fs, [
|
|
2879
2879
|
t[4] || (t[4] = o("svg", {
|
|
2880
2880
|
width: "11",
|
|
@@ -2897,7 +2897,7 @@ function Us(e, t, n, i, r, s) {
|
|
|
2897
2897
|
o("path", { d: "M16 2v4M8 2v4M3 10h18" })
|
|
2898
2898
|
], -1)),
|
|
2899
2899
|
o("span", null, v(s.formattedDate), 1)
|
|
2900
|
-
])) :
|
|
2900
|
+
])) : b("", !0)
|
|
2901
2901
|
]);
|
|
2902
2902
|
}
|
|
2903
2903
|
const Ps = /* @__PURE__ */ B(Ss, [["render", Us], ["__scopeId", "data-v-5f30c914"]]), js = {
|
|
@@ -2923,7 +2923,7 @@ function zs(e, t, n, i, r, s) {
|
|
|
2923
2923
|
return s.component ? (c(), U(je(s.component), {
|
|
2924
2924
|
key: 0,
|
|
2925
2925
|
data: n.artifact.data
|
|
2926
|
-
}, null, 8, ["data"])) :
|
|
2926
|
+
}, null, 8, ["data"])) : b("", !0);
|
|
2927
2927
|
}
|
|
2928
2928
|
const Hs = /* @__PURE__ */ B(Ds, [["render", zs]]), qs = {
|
|
2929
2929
|
name: "WmAttachmentPreview",
|
|
@@ -3054,9 +3054,9 @@ function Zs(e, t, n, i, r, s) {
|
|
|
3054
3054
|
], -1)),
|
|
3055
3055
|
o("span", Ys, [
|
|
3056
3056
|
o("span", Js, v(s.displayName), 1),
|
|
3057
|
-
s.sizeLabel ? (c(), u("span", Qs, v(s.sizeLabel), 1)) :
|
|
3057
|
+
s.sizeLabel ? (c(), u("span", Qs, v(s.sizeLabel), 1)) : b("", !0)
|
|
3058
3058
|
]),
|
|
3059
|
-
r.loading ? (c(), u("span", Xs)) :
|
|
3059
|
+
r.loading ? (c(), u("span", Xs)) : b("", !0)
|
|
3060
3060
|
], 8, Gs))
|
|
3061
3061
|
], 2);
|
|
3062
3062
|
}
|
|
@@ -3175,8 +3175,8 @@ const cr = {
|
|
|
3175
3175
|
const l = this.roleOf(a);
|
|
3176
3176
|
if (l === "system") {
|
|
3177
3177
|
if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
|
|
3178
|
-
const
|
|
3179
|
-
|
|
3178
|
+
const w = e[e.length - 1];
|
|
3179
|
+
w && w.role === "ai" ? w.messages.push(a) : e.push({
|
|
3180
3180
|
key: `g-${Q(a)}`,
|
|
3181
3181
|
role: "ai",
|
|
3182
3182
|
agentName: "",
|
|
@@ -3236,7 +3236,7 @@ const cr = {
|
|
|
3236
3236
|
if (n.role === "user" || n.role === "system" || !n.items.length) continue;
|
|
3237
3237
|
const i = n.messages[0];
|
|
3238
3238
|
if (!i) continue;
|
|
3239
|
-
const r =
|
|
3239
|
+
const r = W(i.id);
|
|
3240
3240
|
if (r != null && !(r <= e) && !(t && i.created_at && i.created_at > t))
|
|
3241
3241
|
return n.key;
|
|
3242
3242
|
}
|
|
@@ -3495,9 +3495,9 @@ const cr = {
|
|
|
3495
3495
|
// doit garder son arrondi.
|
|
3496
3496
|
cornersFor(e, t) {
|
|
3497
3497
|
var Z, ee, te;
|
|
3498
|
-
const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom,
|
|
3499
|
-
let F = l, N = l, P = l,
|
|
3500
|
-
return a ? (k && (N = p), (
|
|
3498
|
+
const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], I = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, M = ($, ne, Y) => $ != null && T != null ? $ + z >= T : ne === Y || ne === "card" && Y === "bubble";
|
|
3499
|
+
let F = l, N = l, P = l, G = l;
|
|
3500
|
+
return a ? (k && (N = p), (w || !s) && (P = p), k && M(I, k, i == null ? void 0 : i.top) && (F = p), w && M(A, w, i == null ? void 0 : i.bottom) && (G = p)) : (k && (F = p), (w || !s) && (G = p), k && M(I, k, i == null ? void 0 : i.top) && (N = p), w && M(A, w, i == null ? void 0 : i.bottom) && (P = p)), { tl: F, tr: N, br: P, bl: G };
|
|
3501
3501
|
},
|
|
3502
3502
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3503
3503
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3649,7 +3649,7 @@ const cr = {
|
|
|
3649
3649
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
3650
3650
|
}, Or = { class: "wm-list__avatarSlot" };
|
|
3651
3651
|
function Lr(e, t, n, i, r, s) {
|
|
3652
|
-
const a = E("AIAvatar"), l = E("HumanAvatar"), p = E("ActionResult"), k = E("ArtifactRenderer"),
|
|
3652
|
+
const a = E("AIAvatar"), l = E("HumanAvatar"), p = E("ActionResult"), k = E("ArtifactRenderer"), w = E("Bubble"), T = E("AttachmentPreview"), I = E("Typing");
|
|
3653
3653
|
return c(), u("div", {
|
|
3654
3654
|
ref: "scrollEl",
|
|
3655
3655
|
class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
@@ -3661,12 +3661,12 @@ function Lr(e, t, n, i, r, s) {
|
|
|
3661
3661
|
"aria-hidden": "true"
|
|
3662
3662
|
}, null, -1)),
|
|
3663
3663
|
o("span", fr, v(s.t("messageList.loadingHistory")), 1)
|
|
3664
|
-
])) : s.historyExhausted ? (c(), u("div", gr, v(s.t("messageList.conversationStart")), 1)) :
|
|
3664
|
+
])) : s.historyExhausted ? (c(), u("div", gr, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
|
|
3665
3665
|
n.dateLabel ? (c(), u("div", _r, [
|
|
3666
3666
|
t[2] || (t[2] = o("div", { class: "wm-list__line" }, null, -1)),
|
|
3667
3667
|
o("span", pr, v(n.dateLabel), 1),
|
|
3668
3668
|
t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1))
|
|
3669
|
-
])) :
|
|
3669
|
+
])) : b("", !0),
|
|
3670
3670
|
(c(!0), u(R, null, j(s.groups, (A, z) => (c(), u(R, {
|
|
3671
3671
|
key: A.key
|
|
3672
3672
|
}, [
|
|
@@ -3674,7 +3674,7 @@ function Lr(e, t, n, i, r, s) {
|
|
|
3674
3674
|
t[4] || (t[4] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
|
|
3675
3675
|
o("span", yr, v(s.t("messageList.unread")), 1),
|
|
3676
3676
|
t[5] || (t[5] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
|
|
3677
|
-
])) :
|
|
3677
|
+
])) : b("", !0),
|
|
3678
3678
|
A.role === "system" || A.items.length ? (c(), u("div", {
|
|
3679
3679
|
key: 1,
|
|
3680
3680
|
class: O(["wm-list__group", "wm-list__group--" + A.role])
|
|
@@ -3711,8 +3711,8 @@ function Lr(e, t, n, i, r, s) {
|
|
|
3711
3711
|
size: 26,
|
|
3712
3712
|
tail: !0
|
|
3713
3713
|
}, null, 8, ["name", "avatar-url"]))
|
|
3714
|
-
], 64)) :
|
|
3715
|
-
])) :
|
|
3714
|
+
], 64)) : b("", !0)
|
|
3715
|
+
])) : b("", !0),
|
|
3716
3716
|
M.renderAs === "action" ? (c(), U(p, {
|
|
3717
3717
|
key: 1,
|
|
3718
3718
|
state: M.message.payload.state,
|
|
@@ -3730,11 +3730,11 @@ function Lr(e, t, n, i, r, s) {
|
|
|
3730
3730
|
key: 4,
|
|
3731
3731
|
artifact: s.artifactOf(M.message)
|
|
3732
3732
|
}, null, 8, ["artifact"])) : (c(), u("div", Ar, [
|
|
3733
|
-
M.message.text_md ? (c(), U(
|
|
3733
|
+
M.message.text_md ? (c(), U(w, {
|
|
3734
3734
|
key: 0,
|
|
3735
3735
|
role: A.role,
|
|
3736
3736
|
text: M.message.text_md
|
|
3737
|
-
}, null, 8, ["role", "text"])) :
|
|
3737
|
+
}, null, 8, ["role", "text"])) : b("", !0),
|
|
3738
3738
|
s.attachmentsOf(M.message).length ? (c(), u("div", {
|
|
3739
3739
|
key: 1,
|
|
3740
3740
|
class: O(["wm-list__atts", {
|
|
@@ -3747,19 +3747,19 @@ function Lr(e, t, n, i, r, s) {
|
|
|
3747
3747
|
key: `${s.messageKey(M.message)}-att-${P}`,
|
|
3748
3748
|
attachment: N
|
|
3749
3749
|
}, null, 8, ["attachment"]))), 128))
|
|
3750
|
-
], 2)) :
|
|
3750
|
+
], 2)) : b("", !0)
|
|
3751
3751
|
]))
|
|
3752
3752
|
], 14, kr))), 128)),
|
|
3753
3753
|
(A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
|
|
3754
3754
|
key: 0,
|
|
3755
3755
|
class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
3756
3756
|
}, [
|
|
3757
|
-
A.role !== "user" ? (c(), u("span", Sr, v(s.roleLabel(A)), 1)) :
|
|
3758
|
-
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Mr, "·")) :
|
|
3759
|
-
s.lastTimeOf(A) ? (c(), u("span", Tr, v(s.lastTimeOf(A)), 1)) :
|
|
3760
|
-
], 2)) :
|
|
3757
|
+
A.role !== "user" ? (c(), u("span", Sr, v(s.roleLabel(A)), 1)) : b("", !0),
|
|
3758
|
+
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Mr, "·")) : b("", !0),
|
|
3759
|
+
s.lastTimeOf(A) ? (c(), u("span", Tr, v(s.lastTimeOf(A)), 1)) : b("", !0)
|
|
3760
|
+
], 2)) : b("", !0)
|
|
3761
3761
|
], 64))
|
|
3762
|
-
], 2)) :
|
|
3762
|
+
], 2)) : b("", !0)
|
|
3763
3763
|
], 64))), 128)),
|
|
3764
3764
|
n.streamingActive ? (c(), u("div", xr, [
|
|
3765
3765
|
o("div", Or, [
|
|
@@ -3771,7 +3771,7 @@ function Lr(e, t, n, i, r, s) {
|
|
|
3771
3771
|
}, null, 8, ["name", "image-url"])
|
|
3772
3772
|
]),
|
|
3773
3773
|
V(I)
|
|
3774
|
-
])) :
|
|
3774
|
+
])) : b("", !0)
|
|
3775
3775
|
], 34);
|
|
3776
3776
|
}
|
|
3777
3777
|
const Ir = /* @__PURE__ */ B(hr, [["render", Lr], ["__scopeId", "data-v-d769b193"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", be = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
@@ -3839,56 +3839,56 @@ async function Nr(e = {}) {
|
|
|
3839
3839
|
t = await navigator.mediaDevices.getDisplayMedia(
|
|
3840
3840
|
Be({ audio: !0 })
|
|
3841
3841
|
);
|
|
3842
|
-
} catch (
|
|
3843
|
-
return (
|
|
3842
|
+
} catch (w) {
|
|
3843
|
+
return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
|
|
3844
3844
|
}
|
|
3845
3845
|
const n = Rr();
|
|
3846
3846
|
let i;
|
|
3847
3847
|
try {
|
|
3848
3848
|
i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
|
|
3849
|
-
} catch (
|
|
3850
|
-
return console.error("[media] recorder init",
|
|
3849
|
+
} catch (w) {
|
|
3850
|
+
return console.error("[media] recorder init", w), t.getTracks().forEach((T) => {
|
|
3851
3851
|
T.stop();
|
|
3852
3852
|
}), null;
|
|
3853
3853
|
}
|
|
3854
3854
|
const r = [];
|
|
3855
3855
|
let s = null, a = !1;
|
|
3856
|
-
i.addEventListener("dataavailable", (
|
|
3857
|
-
|
|
3856
|
+
i.addEventListener("dataavailable", (w) => {
|
|
3857
|
+
w.data && w.data.size > 0 && r.push(w.data);
|
|
3858
3858
|
}), i.addEventListener("stop", () => {
|
|
3859
|
-
var
|
|
3859
|
+
var w, T;
|
|
3860
3860
|
if (s && clearInterval(s), t.getTracks().forEach((I) => {
|
|
3861
3861
|
I.stop();
|
|
3862
3862
|
}), r.length) {
|
|
3863
3863
|
const I = i.mimeType || n || "video/webm", A = new Blob(r, { type: I }), z = /mp4/.test(I) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), F = new File([A], `ecran-${M}.${z}`, {
|
|
3864
3864
|
type: I
|
|
3865
3865
|
});
|
|
3866
|
-
(
|
|
3866
|
+
(w = e.onfinalize) == null || w.call(e, F);
|
|
3867
3867
|
} else
|
|
3868
3868
|
(T = e.oncancel) == null || T.call(e);
|
|
3869
|
-
}), t.getVideoTracks().forEach((
|
|
3870
|
-
|
|
3869
|
+
}), t.getVideoTracks().forEach((w) => {
|
|
3870
|
+
w.addEventListener("ended", () => l(), { once: !0 });
|
|
3871
3871
|
});
|
|
3872
3872
|
function l() {
|
|
3873
3873
|
if (!a && (a = !0, i.state !== "inactive"))
|
|
3874
3874
|
try {
|
|
3875
3875
|
i.stop();
|
|
3876
|
-
} catch (
|
|
3877
|
-
console.error("[media] recorder stop",
|
|
3876
|
+
} catch (w) {
|
|
3877
|
+
console.error("[media] recorder stop", w);
|
|
3878
3878
|
}
|
|
3879
3879
|
}
|
|
3880
3880
|
try {
|
|
3881
3881
|
i.start(1e3);
|
|
3882
|
-
} catch (
|
|
3883
|
-
return console.error("[media] recorder start",
|
|
3882
|
+
} catch (w) {
|
|
3883
|
+
return console.error("[media] recorder start", w), t.getTracks().forEach((T) => {
|
|
3884
3884
|
T.stop();
|
|
3885
3885
|
}), null;
|
|
3886
3886
|
}
|
|
3887
3887
|
(k = e.onstart) == null || k.call(e);
|
|
3888
3888
|
const p = Date.now();
|
|
3889
3889
|
return s = setInterval(() => {
|
|
3890
|
-
var
|
|
3891
|
-
(
|
|
3890
|
+
var w;
|
|
3891
|
+
(w = e.ontick) == null || w.call(e, Date.now() - p);
|
|
3892
3892
|
}, 500), {
|
|
3893
3893
|
stop: l,
|
|
3894
3894
|
get state() {
|
|
@@ -4070,10 +4070,10 @@ function Jr(e, t, n, i, r, s) {
|
|
|
4070
4070
|
class: "wm-rec__stop",
|
|
4071
4071
|
onClick: t[0] || (t[0] = (...a) => s.stopRecording && s.stopRecording(...a))
|
|
4072
4072
|
}, v(s.t("composer.stop")), 1)
|
|
4073
|
-
])) :
|
|
4073
|
+
])) : b("", !0),
|
|
4074
4074
|
o("form", {
|
|
4075
4075
|
class: O(["wm-compose", { "has-attach": r.attachOpen }]),
|
|
4076
|
-
onSubmit: t[7] || (t[7] =
|
|
4076
|
+
onSubmit: t[7] || (t[7] = J((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
|
|
4077
4077
|
}, [
|
|
4078
4078
|
o("input", {
|
|
4079
4079
|
ref: "fileEl",
|
|
@@ -4086,7 +4086,7 @@ function Jr(e, t, n, i, r, s) {
|
|
|
4086
4086
|
key: 0,
|
|
4087
4087
|
class: "wm-compose__overlay",
|
|
4088
4088
|
onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
|
|
4089
|
-
})) :
|
|
4089
|
+
})) : b("", !0),
|
|
4090
4090
|
r.attachOpen ? (c(), u("div", zr, [
|
|
4091
4091
|
(c(!0), u(R, null, j(s.attachItems, (a) => (c(), u("button", {
|
|
4092
4092
|
key: a.action,
|
|
@@ -4109,7 +4109,7 @@ function Jr(e, t, n, i, r, s) {
|
|
|
4109
4109
|
]),
|
|
4110
4110
|
o("span", null, v(a.label), 1)
|
|
4111
4111
|
], 8, Hr))), 128))
|
|
4112
|
-
])) :
|
|
4112
|
+
])) : b("", !0),
|
|
4113
4113
|
K(o("textarea", {
|
|
4114
4114
|
ref: "inputEl",
|
|
4115
4115
|
"onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
|
|
@@ -4199,7 +4199,7 @@ function ei(e, t, n, i, r, s) {
|
|
|
4199
4199
|
style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
|
|
4200
4200
|
onClick: (p) => e.$emit("select", a)
|
|
4201
4201
|
}, v(a.label), 13, Zr))), 128))
|
|
4202
|
-
])) :
|
|
4202
|
+
])) : b("", !0);
|
|
4203
4203
|
}
|
|
4204
4204
|
const ti = /* @__PURE__ */ B(Xr, [["render", ei], ["__scopeId", "data-v-47ad8085"]]), ni = {
|
|
4205
4205
|
name: "WmApprovalCard",
|
|
@@ -4262,7 +4262,7 @@ function di(e, t, n, i, r, s) {
|
|
|
4262
4262
|
]),
|
|
4263
4263
|
o("div", ai, [
|
|
4264
4264
|
o("div", oi, v(n.action), 1),
|
|
4265
|
-
n.detail ? (c(), u("div", li, v(n.detail), 1)) :
|
|
4265
|
+
n.detail ? (c(), u("div", li, v(n.detail), 1)) : b("", !0)
|
|
4266
4266
|
])
|
|
4267
4267
|
]),
|
|
4268
4268
|
o("div", ci, [
|
|
@@ -4271,13 +4271,13 @@ function di(e, t, n, i, r, s) {
|
|
|
4271
4271
|
type: "button",
|
|
4272
4272
|
class: "wm-approval__btn wm-approval__btn--neutral",
|
|
4273
4273
|
onClick: t[0] || (t[0] = (l) => e.$emit("callback", s.rejectId))
|
|
4274
|
-
}, v(s.rejectLabel), 1)) :
|
|
4274
|
+
}, v(s.rejectLabel), 1)) : b("", !0),
|
|
4275
4275
|
s.approveId ? (c(), u("button", {
|
|
4276
4276
|
key: 1,
|
|
4277
4277
|
type: "button",
|
|
4278
4278
|
class: "wm-approval__btn wm-approval__btn--primary",
|
|
4279
4279
|
onClick: t[1] || (t[1] = (l) => e.$emit("callback", s.approveId))
|
|
4280
|
-
}, v(s.approveLabel), 1)) :
|
|
4280
|
+
}, v(s.approveLabel), 1)) : b("", !0)
|
|
4281
4281
|
])
|
|
4282
4282
|
]);
|
|
4283
4283
|
}
|
|
@@ -4414,12 +4414,12 @@ function Ui(e, t, n, i, r, s) {
|
|
|
4414
4414
|
]),
|
|
4415
4415
|
o("div", pi, [
|
|
4416
4416
|
o("div", vi, v(n.form.title || s.t("form.title")), 1),
|
|
4417
|
-
n.form.description ? (c(), u("div", yi, v(n.form.description), 1)) :
|
|
4417
|
+
n.form.description ? (c(), u("div", yi, v(n.form.description), 1)) : b("", !0)
|
|
4418
4418
|
])
|
|
4419
4419
|
]),
|
|
4420
4420
|
o("form", {
|
|
4421
4421
|
class: "wm-form__body",
|
|
4422
|
-
onSubmit: t[0] || (t[0] =
|
|
4422
|
+
onSubmit: t[0] || (t[0] = J((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
|
|
4423
4423
|
}, [
|
|
4424
4424
|
(c(!0), u(R, null, j(s.normalizedFields, (l) => (c(), u("div", {
|
|
4425
4425
|
key: l.key,
|
|
@@ -4430,7 +4430,7 @@ function Ui(e, t, n, i, r, s) {
|
|
|
4430
4430
|
class: "wm-form__label"
|
|
4431
4431
|
}, [
|
|
4432
4432
|
pe(v(l.label), 1),
|
|
4433
|
-
l.required ? (c(), u("span", bi, "*")) :
|
|
4433
|
+
l.required ? (c(), u("span", bi, "*")) : b("", !0)
|
|
4434
4434
|
], 8, wi),
|
|
4435
4435
|
l.type === "text" ? K((c(), u("input", {
|
|
4436
4436
|
key: 0,
|
|
@@ -4523,16 +4523,16 @@ function Ui(e, t, n, i, r, s) {
|
|
|
4523
4523
|
}, null, 40, Ri),
|
|
4524
4524
|
o("span", null, v(p.label), 1)
|
|
4525
4525
|
]))), 128))
|
|
4526
|
-
])) :
|
|
4526
|
+
])) : b("", !0)
|
|
4527
4527
|
]))), 128)),
|
|
4528
|
-
r.error ? (c(), u("div", Ei, v(r.error), 1)) :
|
|
4528
|
+
r.error ? (c(), u("div", Ei, v(r.error), 1)) : b("", !0),
|
|
4529
4529
|
n.readOnly ? (c(), u("div", Fi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
|
|
4530
4530
|
key: 1,
|
|
4531
4531
|
type: "submit",
|
|
4532
4532
|
class: "wm-form__submit",
|
|
4533
4533
|
disabled: r.busy
|
|
4534
4534
|
}, [
|
|
4535
|
-
r.busy ? (c(), u("span", Ni)) :
|
|
4535
|
+
r.busy ? (c(), u("span", Ni)) : b("", !0),
|
|
4536
4536
|
o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
|
|
4537
4537
|
], 8, Bi))
|
|
4538
4538
|
], 32)
|
|
@@ -4703,7 +4703,7 @@ function ha(e, t, n, i, r, s) {
|
|
|
4703
4703
|
])
|
|
4704
4704
|
], -1)),
|
|
4705
4705
|
o("span", sa, v(s.t("moreMenu.editTitle")), 1)
|
|
4706
|
-
])) :
|
|
4706
|
+
])) : b("", !0),
|
|
4707
4707
|
n.canExport ? (c(), u("button", {
|
|
4708
4708
|
key: 1,
|
|
4709
4709
|
type: "button",
|
|
@@ -4727,9 +4727,9 @@ function ha(e, t, n, i, r, s) {
|
|
|
4727
4727
|
], -1)),
|
|
4728
4728
|
o("span", ra, v(s.t("moreMenu.exportTranscript")), 1),
|
|
4729
4729
|
t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
4730
|
-
])) :
|
|
4731
|
-
])) :
|
|
4732
|
-
n.canRename || n.canExport ? (c(), u("div", ia)) :
|
|
4730
|
+
])) : b("", !0)
|
|
4731
|
+
])) : b("", !0),
|
|
4732
|
+
n.canRename || n.canExport ? (c(), u("div", ia)) : b("", !0),
|
|
4733
4733
|
o("div", aa, [
|
|
4734
4734
|
o("button", {
|
|
4735
4735
|
type: "button",
|
|
@@ -4811,7 +4811,7 @@ function ha(e, t, n, i, r, s) {
|
|
|
4811
4811
|
])
|
|
4812
4812
|
], -1)),
|
|
4813
4813
|
o("span", da, v(s.t("moreMenu.serviceStatus")), 1)
|
|
4814
|
-
])) :
|
|
4814
|
+
])) : b("", !0),
|
|
4815
4815
|
n.helpUrl ? (c(), u("button", {
|
|
4816
4816
|
key: 1,
|
|
4817
4817
|
type: "button",
|
|
@@ -4834,7 +4834,7 @@ function ha(e, t, n, i, r, s) {
|
|
|
4834
4834
|
])
|
|
4835
4835
|
], -1)),
|
|
4836
4836
|
o("span", ua, v(s.t("moreMenu.helpCenter")), 1)
|
|
4837
|
-
])) :
|
|
4837
|
+
])) : b("", !0)
|
|
4838
4838
|
])
|
|
4839
4839
|
])
|
|
4840
4840
|
]);
|
|
@@ -4925,8 +4925,8 @@ function Aa(e, t, n, i, r, s) {
|
|
|
4925
4925
|
placeholder: n.placeholder || s.t("rename.placeholder"),
|
|
4926
4926
|
maxlength: 120,
|
|
4927
4927
|
onKeydown: [
|
|
4928
|
-
t[3] || (t[3] = ue(
|
|
4929
|
-
t[4] || (t[4] = ue(
|
|
4928
|
+
t[3] || (t[3] = ue(J((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
|
|
4929
|
+
t[4] || (t[4] = ue(J((a) => e.$emit("close"), ["prevent"]), ["esc"]))
|
|
4930
4930
|
]
|
|
4931
4931
|
}, null, 40, ba), [
|
|
4932
4932
|
[X, r.value]
|
|
@@ -5144,20 +5144,24 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5144
5144
|
const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = this.revealedAt;
|
|
5145
5145
|
return this.allConversations.map((i) => {
|
|
5146
5146
|
var k;
|
|
5147
|
-
const r = e[i.id] || [], s =
|
|
5147
|
+
const r = e[i.id] || [], s = W(i.last_read_message_id);
|
|
5148
5148
|
let a = 0, l = null;
|
|
5149
|
-
for (let
|
|
5150
|
-
const T = r[
|
|
5149
|
+
for (let w = r.length - 1; w >= 0; w--) {
|
|
5150
|
+
const T = r[w];
|
|
5151
5151
|
if (!T) continue;
|
|
5152
5152
|
if (((k = T.author) == null ? void 0 : k.type) === "user") break;
|
|
5153
|
-
const I =
|
|
5153
|
+
const I = W(T.id);
|
|
5154
5154
|
if (I != null) {
|
|
5155
5155
|
if (s != null && I <= s) break;
|
|
5156
5156
|
t[T.id] !== 0 && (!l && T.author && (l = T.author), a++);
|
|
5157
5157
|
}
|
|
5158
5158
|
}
|
|
5159
|
+
if (!r.length) {
|
|
5160
|
+
const w = W(i.last_message_id);
|
|
5161
|
+
w != null && (s == null || w > s) && (a = 1);
|
|
5162
|
+
}
|
|
5159
5163
|
const p = r.filter(
|
|
5160
|
-
(
|
|
5164
|
+
(w) => !((w == null ? void 0 : w.id) != null && t[w.id] === 0)
|
|
5161
5165
|
);
|
|
5162
5166
|
return {
|
|
5163
5167
|
...i,
|
|
@@ -5385,7 +5389,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5385
5389
|
const t = (p = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
|
|
5386
5390
|
if (!t || typeof t != "object") return "";
|
|
5387
5391
|
const n = Object.entries(t);
|
|
5388
|
-
return n.length ? n.slice(0, 2).map(([k,
|
|
5392
|
+
return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
|
|
5389
5393
|
},
|
|
5390
5394
|
actionInFlight() {
|
|
5391
5395
|
var e, t;
|
|
@@ -5468,7 +5472,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5468
5472
|
"currentConv.id": {
|
|
5469
5473
|
handler(e) {
|
|
5470
5474
|
var t;
|
|
5471
|
-
this.resetRevealQueue(), this.convOpenedAt = Date.now(), this.moreOpen = !1, this.renameDialogOpen = !1, this.resetApprovalPacing(), this.isViewingThread && (this.unreadAnchorId =
|
|
5475
|
+
this.resetRevealQueue(), this.convOpenedAt = Date.now(), this.moreOpen = !1, this.renameDialogOpen = !1, this.resetApprovalPacing(), this.isViewingThread && (this.unreadAnchorId = W(
|
|
5472
5476
|
(t = this.currentConv) == null ? void 0 : t.last_read_message_id
|
|
5473
5477
|
), this.unreadBoundaryTs = e ? (/* @__PURE__ */ new Date()).toISOString() : "");
|
|
5474
5478
|
},
|
|
@@ -5480,7 +5484,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5480
5484
|
// render.
|
|
5481
5485
|
isViewingThread(e, t) {
|
|
5482
5486
|
var n;
|
|
5483
|
-
e && !t ? (this.unreadAnchorId =
|
|
5487
|
+
e && !t ? (this.unreadAnchorId = W(
|
|
5484
5488
|
(n = this.currentConv) == null ? void 0 : n.last_read_message_id
|
|
5485
5489
|
), this.unreadBoundaryTs = (/* @__PURE__ */ new Date()).toISOString()) : e || (this.unreadAnchorId = null, this.unreadBoundaryTs = "");
|
|
5486
5490
|
},
|
|
@@ -5690,10 +5694,10 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5690
5694
|
const t = e.getBoundingClientRect();
|
|
5691
5695
|
if (!t.width || !t.height) return;
|
|
5692
5696
|
const n = (((A = this.launcherPeeks) == null ? void 0 : A.length) ?? 0) > 0, i = this.launcherHovered ? 28 : 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (M = (z = this.$el) == null ? void 0 : z.querySelector) == null ? void 0 : M.call(z, ".wm-launcher"), l = a == null ? void 0 : a.getBoundingClientRect(), p = (N = (F = this.$el) == null ? void 0 : F.querySelectorAll) == null ? void 0 : N.call(F, ".wm-peek"), k = p && p.length ? p[p.length - 1] : null;
|
|
5693
|
-
let
|
|
5697
|
+
let w = null;
|
|
5694
5698
|
if (k) {
|
|
5695
5699
|
const P = k.getBoundingClientRect();
|
|
5696
|
-
|
|
5700
|
+
w = {
|
|
5697
5701
|
width: Math.ceil(P.width),
|
|
5698
5702
|
height: Math.ceil(P.height),
|
|
5699
5703
|
rightOffset: Math.max(0, Math.ceil(t.right - P.right)),
|
|
@@ -5706,7 +5710,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5706
5710
|
launcherWidth: l ? Math.ceil(l.width) : null,
|
|
5707
5711
|
launcherHeight: l ? Math.ceil(l.height) : null,
|
|
5708
5712
|
launcherHovered: this.launcherHovered,
|
|
5709
|
-
peek:
|
|
5713
|
+
peek: w,
|
|
5710
5714
|
peekHovered: this.launcherHovered && n
|
|
5711
5715
|
});
|
|
5712
5716
|
},
|
|
@@ -5942,7 +5946,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5942
5946
|
class: "wm-attached"
|
|
5943
5947
|
}, Pa = ["aria-label", "onClick"];
|
|
5944
5948
|
function ja(e, t, n, i, r, s) {
|
|
5945
|
-
const a = E("Launcher"), l = E("Header"), p = E("Onboarding"), k = E("MessageList"),
|
|
5949
|
+
const a = E("Launcher"), l = E("Header"), p = E("Onboarding"), k = E("MessageList"), w = E("ApprovalCard"), T = E("FormCard"), I = E("Feedback"), A = E("SuggestionChips"), z = E("Composer"), M = E("MoreMenu"), F = E("RenameDialog");
|
|
5946
5950
|
return c(), u("div", {
|
|
5947
5951
|
class: O(["wm-root", `wm-root--${n.displayMode}`])
|
|
5948
5952
|
}, [
|
|
@@ -5953,7 +5957,7 @@ function ja(e, t, n, i, r, s) {
|
|
|
5953
5957
|
onOpen: s.openFromPeek,
|
|
5954
5958
|
onDismiss: s.dismissPeek,
|
|
5955
5959
|
onHover: s.onLauncherHover
|
|
5956
|
-
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) :
|
|
5960
|
+
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
|
|
5957
5961
|
r.isOpen || s.isEmbedded ? (c(), u("section", {
|
|
5958
5962
|
key: 1,
|
|
5959
5963
|
class: O([
|
|
@@ -5966,7 +5970,7 @@ function ja(e, t, n, i, r, s) {
|
|
|
5966
5970
|
"aria-label": "Messenger"
|
|
5967
5971
|
}, [
|
|
5968
5972
|
!s.ready && !s.error ? (c(), u("div", Ta, [
|
|
5969
|
-
s.isEmbedded ?
|
|
5973
|
+
s.isEmbedded ? b("", !0) : (c(), u("button", {
|
|
5970
5974
|
key: 0,
|
|
5971
5975
|
type: "button",
|
|
5972
5976
|
class: "wm-loading__close",
|
|
@@ -6045,7 +6049,7 @@ function ja(e, t, n, i, r, s) {
|
|
|
6045
6049
|
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-id", "unread-boundary-ts", "ai-agent-name", "ai-agent-avatar-url", "onLoadMore"]),
|
|
6046
6050
|
o("div", Ea, [
|
|
6047
6051
|
s.floatVisible ? (c(), u("div", Ba, [
|
|
6048
|
-
s.approvalReady ? (c(), U(
|
|
6052
|
+
s.approvalReady ? (c(), U(w, {
|
|
6049
6053
|
key: 0,
|
|
6050
6054
|
action: s.approvalTitle,
|
|
6051
6055
|
detail: s.approvalDetail,
|
|
@@ -6069,7 +6073,7 @@ function ja(e, t, n, i, r, s) {
|
|
|
6069
6073
|
items: s.suggestions,
|
|
6070
6074
|
onSelect: s.onSuggestion
|
|
6071
6075
|
}, null, 8, ["items", "onSelect"]))
|
|
6072
|
-
], 512)) :
|
|
6076
|
+
], 512)) : b("", !0),
|
|
6073
6077
|
s.actionInFlight ? (c(), u("div", Na, [
|
|
6074
6078
|
t[8] || (t[8] = o("span", {
|
|
6075
6079
|
class: "wm-actionWait__spinner",
|
|
@@ -6102,14 +6106,14 @@ function ja(e, t, n, i, r, s) {
|
|
|
6102
6106
|
onSoundToggle: e.onSoundToggle,
|
|
6103
6107
|
onBrowserNotifToggle: e.onBrowserNotifToggle,
|
|
6104
6108
|
onAction: s.onMoreAction
|
|
6105
|
-
}, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) :
|
|
6109
|
+
}, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0),
|
|
6106
6110
|
r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), U(F, {
|
|
6107
6111
|
key: 1,
|
|
6108
6112
|
"initial-value": s.currentConv.name || "",
|
|
6109
6113
|
title: s.t("rename.dialogTitle"),
|
|
6110
6114
|
onClose: t[3] || (t[3] = (N) => r.renameDialogOpen = !1),
|
|
6111
6115
|
onSubmit: s.onRenameSubmit
|
|
6112
|
-
}, null, 8, ["initial-value", "title", "onSubmit"])) :
|
|
6116
|
+
}, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0),
|
|
6113
6117
|
r.pendingAttachments.length ? (c(), u("div", Ua, [
|
|
6114
6118
|
(c(!0), u(R, null, j(r.pendingAttachments, (N, P) => (c(), u("div", {
|
|
6115
6119
|
key: P,
|
|
@@ -6132,7 +6136,7 @@ function ja(e, t, n, i, r, s) {
|
|
|
6132
6136
|
o("button", {
|
|
6133
6137
|
type: "button",
|
|
6134
6138
|
"aria-label": s.t("attachment.remove"),
|
|
6135
|
-
onClick: (
|
|
6139
|
+
onClick: (G) => r.pendingAttachments.splice(P, 1)
|
|
6136
6140
|
}, [...t[9] || (t[9] = [
|
|
6137
6141
|
o("svg", {
|
|
6138
6142
|
width: "10",
|
|
@@ -6149,7 +6153,7 @@ function ja(e, t, n, i, r, s) {
|
|
|
6149
6153
|
], -1)
|
|
6150
6154
|
])], 8, Pa)
|
|
6151
6155
|
]))), 128))
|
|
6152
|
-
])) :
|
|
6156
|
+
])) : b("", !0)
|
|
6153
6157
|
], 64)) : (c(), U(p, {
|
|
6154
6158
|
key: 1,
|
|
6155
6159
|
"welcome-message": s.widgetWelcomeMessage,
|
|
@@ -6175,12 +6179,12 @@ function ja(e, t, n, i, r, s) {
|
|
|
6175
6179
|
onSoundToggle: e.onSoundToggle,
|
|
6176
6180
|
onBrowserNotifToggle: e.onBrowserNotifToggle,
|
|
6177
6181
|
onAction: s.onMoreAction
|
|
6178
|
-
}, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) :
|
|
6182
|
+
}, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0)
|
|
6179
6183
|
], 64))
|
|
6180
|
-
], 6)) :
|
|
6184
|
+
], 6)) : b("", !0)
|
|
6181
6185
|
], 2);
|
|
6182
6186
|
}
|
|
6183
|
-
const Ha = /* @__PURE__ */ B(Ma, [["render", ja], ["__scopeId", "data-v-
|
|
6187
|
+
const Ha = /* @__PURE__ */ B(Ma, [["render", ja], ["__scopeId", "data-v-ef45d9af"]]), qa = "0.5.18";
|
|
6184
6188
|
export {
|
|
6185
6189
|
le as AIAvatar,
|
|
6186
6190
|
ge as AVATAR_COLORS,
|