@_solaris/messenger-widget 0.2.22 → 0.2.23
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 +5 -5
- package/dist/messenger.embed.js +14 -14
- package/dist/messenger.js +278 -252
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1472,6 +1472,11 @@ const kn = {
|
|
|
1472
1472
|
isPriority(t) {
|
|
1473
1473
|
return /priorit|^prio$/i.test(String(t || "").trim());
|
|
1474
1474
|
},
|
|
1475
|
+
// Idem pour les libellés évoquant une date / échéance : déclenche
|
|
1476
|
+
// l'icône calendrier (date, échéance, deadline, due, créé/créée le…).
|
|
1477
|
+
isDate(t) {
|
|
1478
|
+
return /date|échéanc|echeanc|deadline|due|créé|cree/i.test(String(t || "").trim());
|
|
1479
|
+
},
|
|
1475
1480
|
// 3 niveaux dérivés librement de la valeur ("Moyenne (Medium)",
|
|
1476
1481
|
// "Élevée", "Critical"…). Défaut : niveau moyen — non-reconnu vaut
|
|
1477
1482
|
// mieux que muet.
|
|
@@ -1487,10 +1492,22 @@ const kn = {
|
|
|
1487
1492
|
key: 0,
|
|
1488
1493
|
class: "wm-art__body"
|
|
1489
1494
|
}, In = { class: "wm-art__fieldLabel" }, En = ["data-level"], Bn = {
|
|
1495
|
+
key: 1,
|
|
1496
|
+
class: "wm-tk__date",
|
|
1497
|
+
width: "12",
|
|
1498
|
+
height: "12",
|
|
1499
|
+
viewBox: "0 0 24 24",
|
|
1500
|
+
fill: "none",
|
|
1501
|
+
stroke: "currentColor",
|
|
1502
|
+
"stroke-width": "2",
|
|
1503
|
+
"stroke-linecap": "round",
|
|
1504
|
+
"stroke-linejoin": "round",
|
|
1505
|
+
"aria-hidden": "true"
|
|
1506
|
+
}, Ln = {
|
|
1490
1507
|
key: 1,
|
|
1491
1508
|
class: "wm-art__footer wm-tk__footer"
|
|
1492
1509
|
};
|
|
1493
|
-
function
|
|
1510
|
+
function $n(t, e, n, a, r, s) {
|
|
1494
1511
|
return l(), d("div", Cn, [
|
|
1495
1512
|
i("div", An, [
|
|
1496
1513
|
i("div", Sn, b(n.data.title), 1),
|
|
@@ -1563,13 +1580,22 @@ function Ln(t, e, n, a, r, s) {
|
|
|
1563
1580
|
height: "9",
|
|
1564
1581
|
rx: "0.5"
|
|
1565
1582
|
}, null, -1)
|
|
1566
|
-
])], 8, En)) :
|
|
1583
|
+
])], 8, En)) : s.isDate(o.label) ? (l(), d("svg", Bn, [...e[3] || (e[3] = [
|
|
1584
|
+
i("rect", {
|
|
1585
|
+
x: "3",
|
|
1586
|
+
y: "4",
|
|
1587
|
+
width: "18",
|
|
1588
|
+
height: "18",
|
|
1589
|
+
rx: "2"
|
|
1590
|
+
}, null, -1),
|
|
1591
|
+
i("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
|
|
1592
|
+
])])) : w("", !0),
|
|
1567
1593
|
i("span", null, b(o.value), 1)
|
|
1568
1594
|
], 2)
|
|
1569
1595
|
]))), 128))
|
|
1570
1596
|
])) : w("", !0),
|
|
1571
|
-
n.data.created_at ? (l(), d("div",
|
|
1572
|
-
e[
|
|
1597
|
+
n.data.created_at ? (l(), d("div", Ln, [
|
|
1598
|
+
e[4] || (e[4] = i("svg", {
|
|
1573
1599
|
width: "11",
|
|
1574
1600
|
height: "11",
|
|
1575
1601
|
viewBox: "0 0 24 24",
|
|
@@ -1593,11 +1619,11 @@ function Ln(t, e, n, a, r, s) {
|
|
|
1593
1619
|
])) : w("", !0)
|
|
1594
1620
|
]);
|
|
1595
1621
|
}
|
|
1596
|
-
const
|
|
1622
|
+
const Rn = /* @__PURE__ */ B(kn, [["render", $n], ["__scopeId", "data-v-c82d1f53"]]), Fn = {
|
|
1597
1623
|
form_response: on,
|
|
1598
1624
|
info_card: wn,
|
|
1599
|
-
ticket:
|
|
1600
|
-
},
|
|
1625
|
+
ticket: Rn
|
|
1626
|
+
}, jn = {
|
|
1601
1627
|
name: "WmArtifactRenderer",
|
|
1602
1628
|
props: {
|
|
1603
1629
|
// Forme : { kind: string, data: any } (le `data` est validé
|
|
@@ -1608,17 +1634,17 @@ const $n = /* @__PURE__ */ B(kn, [["render", Ln], ["__scopeId", "data-v-97001af0
|
|
|
1608
1634
|
component() {
|
|
1609
1635
|
var e;
|
|
1610
1636
|
const t = (e = this.artifact) == null ? void 0 : e.kind;
|
|
1611
|
-
return t &&
|
|
1637
|
+
return t && Fn[t] || null;
|
|
1612
1638
|
}
|
|
1613
1639
|
}
|
|
1614
1640
|
};
|
|
1615
|
-
function
|
|
1641
|
+
function Un(t, e, n, a, r, s) {
|
|
1616
1642
|
return s.component ? (l(), $(Me(s.component), {
|
|
1617
1643
|
key: 0,
|
|
1618
1644
|
data: n.artifact.data
|
|
1619
1645
|
}, null, 8, ["data"])) : w("", !0);
|
|
1620
1646
|
}
|
|
1621
|
-
const
|
|
1647
|
+
const Dn = /* @__PURE__ */ B(jn, [["render", Un]]), Nn = {
|
|
1622
1648
|
name: "WmAttachmentPreview",
|
|
1623
1649
|
inject: {
|
|
1624
1650
|
signAttachmentFn: { default: null }
|
|
@@ -1672,15 +1698,15 @@ const Un = /* @__PURE__ */ B(Fn, [["render", jn]]), Dn = {
|
|
|
1672
1698
|
this.url || t.preventDefault();
|
|
1673
1699
|
}
|
|
1674
1700
|
}
|
|
1675
|
-
},
|
|
1701
|
+
}, Pn = ["href"], Hn = ["src", "alt"], zn = ["src"], Vn = ["src"], qn = ["href", "download"], Wn = { class: "wm-att__main" }, Kn = { class: "wm-att__name" }, Gn = {
|
|
1676
1702
|
key: 0,
|
|
1677
1703
|
class: "wm-att__meta"
|
|
1678
|
-
},
|
|
1704
|
+
}, Yn = {
|
|
1679
1705
|
key: 0,
|
|
1680
1706
|
class: "wm-att__spin",
|
|
1681
1707
|
"aria-hidden": "true"
|
|
1682
1708
|
};
|
|
1683
|
-
function
|
|
1709
|
+
function Jn(t, e, n, a, r, s) {
|
|
1684
1710
|
return l(), d("div", {
|
|
1685
1711
|
class: E(["wm-att", ["wm-att--" + (s.kind || "file")]])
|
|
1686
1712
|
}, [
|
|
@@ -1695,18 +1721,18 @@ function Yn(t, e, n, a, r, s) {
|
|
|
1695
1721
|
src: r.url,
|
|
1696
1722
|
alt: s.displayName,
|
|
1697
1723
|
loading: "lazy"
|
|
1698
|
-
}, null, 8,
|
|
1699
|
-
], 8,
|
|
1724
|
+
}, null, 8, Hn)
|
|
1725
|
+
], 8, Pn)) : s.kind === "audio" && r.url ? (l(), d("audio", {
|
|
1700
1726
|
key: 1,
|
|
1701
1727
|
src: r.url,
|
|
1702
1728
|
controls: "",
|
|
1703
1729
|
preload: "metadata"
|
|
1704
|
-
}, null, 8,
|
|
1730
|
+
}, null, 8, zn)) : s.kind === "video" && r.url ? (l(), d("video", {
|
|
1705
1731
|
key: 2,
|
|
1706
1732
|
src: r.url,
|
|
1707
1733
|
controls: "",
|
|
1708
1734
|
preload: "metadata"
|
|
1709
|
-
}, null, 8,
|
|
1735
|
+
}, null, 8, Vn)) : (l(), d("a", {
|
|
1710
1736
|
key: 3,
|
|
1711
1737
|
class: "wm-att__file",
|
|
1712
1738
|
href: r.url || "#",
|
|
@@ -1731,19 +1757,19 @@ function Yn(t, e, n, a, r, s) {
|
|
|
1731
1757
|
i("path", { d: "M14 2v6h6" })
|
|
1732
1758
|
])
|
|
1733
1759
|
], -1)),
|
|
1734
|
-
i("span",
|
|
1735
|
-
i("span",
|
|
1736
|
-
s.sizeLabel ? (l(), d("span",
|
|
1760
|
+
i("span", Wn, [
|
|
1761
|
+
i("span", Kn, b(s.displayName), 1),
|
|
1762
|
+
s.sizeLabel ? (l(), d("span", Gn, b(s.sizeLabel), 1)) : w("", !0)
|
|
1737
1763
|
]),
|
|
1738
|
-
r.loading ? (l(), d("span",
|
|
1739
|
-
], 8,
|
|
1764
|
+
r.loading ? (l(), d("span", Yn)) : w("", !0)
|
|
1765
|
+
], 8, qn))
|
|
1740
1766
|
], 2);
|
|
1741
1767
|
}
|
|
1742
|
-
const
|
|
1743
|
-
function
|
|
1768
|
+
const Xn = /* @__PURE__ */ B(Nn, [["render", Jn], ["__scopeId", "data-v-1cd1267b"]]);
|
|
1769
|
+
function Qn(t) {
|
|
1744
1770
|
return String(t).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1745
1771
|
}
|
|
1746
|
-
function
|
|
1772
|
+
function Zn(t) {
|
|
1747
1773
|
return /^(https?:\/\/|mailto:|tel:)/i.test(String(t).trim());
|
|
1748
1774
|
}
|
|
1749
1775
|
const pe = "";
|
|
@@ -1753,11 +1779,11 @@ function re(t) {
|
|
|
1753
1779
|
return e = e.replace(/`([^`\n]+)`/g, (a, r) => {
|
|
1754
1780
|
const s = n.length;
|
|
1755
1781
|
return n.push(r), `${pe}CODE${s}${pe}`;
|
|
1756
|
-
}), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) =>
|
|
1782
|
+
}), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) => Zn(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;
|
|
1757
1783
|
}
|
|
1758
|
-
function
|
|
1784
|
+
function es(t) {
|
|
1759
1785
|
if (!t) return "";
|
|
1760
|
-
const e =
|
|
1786
|
+
const e = Qn(t).split(`
|
|
1761
1787
|
`), n = [];
|
|
1762
1788
|
let a = 0;
|
|
1763
1789
|
for (; a < e.length; ) {
|
|
@@ -1818,7 +1844,7 @@ function Zn(t) {
|
|
|
1818
1844
|
}
|
|
1819
1845
|
return r;
|
|
1820
1846
|
}
|
|
1821
|
-
const
|
|
1847
|
+
const ts = {
|
|
1822
1848
|
name: "WmBubble",
|
|
1823
1849
|
props: {
|
|
1824
1850
|
role: { type: String, default: "ai" },
|
|
@@ -1827,41 +1853,41 @@ const es = {
|
|
|
1827
1853
|
},
|
|
1828
1854
|
computed: {
|
|
1829
1855
|
rendered() {
|
|
1830
|
-
return
|
|
1856
|
+
return es(this.text);
|
|
1831
1857
|
}
|
|
1832
1858
|
}
|
|
1833
|
-
},
|
|
1834
|
-
function
|
|
1859
|
+
}, ns = ["innerHTML"];
|
|
1860
|
+
function ss(t, e, n, a, r, s) {
|
|
1835
1861
|
return l(), d("div", {
|
|
1836
1862
|
class: E(["wm-bubble", "wm-bubble--" + n.role])
|
|
1837
1863
|
}, [
|
|
1838
1864
|
Te(t.$slots, "default", {}, () => [
|
|
1839
|
-
i("span", { innerHTML: s.rendered }, null, 8,
|
|
1865
|
+
i("span", { innerHTML: s.rendered }, null, 8, ns)
|
|
1840
1866
|
], !0)
|
|
1841
1867
|
], 2);
|
|
1842
1868
|
}
|
|
1843
|
-
const
|
|
1844
|
-
function
|
|
1845
|
-
return l(), d("div",
|
|
1869
|
+
const rs = /* @__PURE__ */ B(ts, [["render", ss], ["__scopeId", "data-v-5c9e9f2b"]]), is = { name: "WmTyping" }, as = { class: "wm-typing" };
|
|
1870
|
+
function os(t, e, n, a, r, s) {
|
|
1871
|
+
return l(), d("div", as, [...e[0] || (e[0] = [
|
|
1846
1872
|
i("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
1847
1873
|
i("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
1848
1874
|
i("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
1849
1875
|
])]);
|
|
1850
1876
|
}
|
|
1851
|
-
const
|
|
1877
|
+
const ls = /* @__PURE__ */ B(is, [["render", os], ["__scopeId", "data-v-df2447fd"]]);
|
|
1852
1878
|
function Z(t) {
|
|
1853
1879
|
return t ? t.client_msg_id || t.id : "";
|
|
1854
1880
|
}
|
|
1855
|
-
const
|
|
1881
|
+
const cs = {
|
|
1856
1882
|
transferred_to_human: "Conversation transférée à un humain",
|
|
1857
1883
|
assigned: "{name} a rejoint la conversation",
|
|
1858
1884
|
unassigned: "L'agent a quitté la conversation",
|
|
1859
1885
|
resolved: "Conversation résolue",
|
|
1860
1886
|
reopened: "Conversation rouverte",
|
|
1861
1887
|
idle: "Conversation en pause"
|
|
1862
|
-
},
|
|
1888
|
+
}, ds = 80, us = 200, hs = {
|
|
1863
1889
|
name: "WmMessageList",
|
|
1864
|
-
components: { AIAvatar: te, HumanAvatar: ke, Bubble:
|
|
1890
|
+
components: { AIAvatar: te, HumanAvatar: ke, Bubble: rs, Typing: ls, ActionResult: Qt, AttachmentPreview: Xn, ArtifactRenderer: Dn },
|
|
1865
1891
|
props: {
|
|
1866
1892
|
messages: { type: Array, default: () => [] },
|
|
1867
1893
|
streamingActive: { type: Boolean, default: !1 },
|
|
@@ -1982,11 +2008,11 @@ const ls = {
|
|
|
1982
2008
|
methods: {
|
|
1983
2009
|
messageKey: Z,
|
|
1984
2010
|
isAtBottom(t) {
|
|
1985
|
-
return t.scrollHeight - t.scrollTop - t.clientHeight <=
|
|
2011
|
+
return t.scrollHeight - t.scrollTop - t.clientHeight <= ds;
|
|
1986
2012
|
},
|
|
1987
2013
|
onScroll() {
|
|
1988
2014
|
const t = this.$refs.scrollEl;
|
|
1989
|
-
t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <=
|
|
2015
|
+
t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <= us && (this._pendingLoadMore = !0, this.$emit("load-more")));
|
|
1990
2016
|
},
|
|
1991
2017
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
1992
2018
|
//
|
|
@@ -2261,7 +2287,7 @@ const ls = {
|
|
|
2261
2287
|
},
|
|
2262
2288
|
systemLabel(t) {
|
|
2263
2289
|
var r, s, o;
|
|
2264
|
-
const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n =
|
|
2290
|
+
const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n = cs[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) || "";
|
|
2265
2291
|
return n.replace("{name}", a || "Un agent");
|
|
2266
2292
|
},
|
|
2267
2293
|
scrollToBottom() {
|
|
@@ -2269,59 +2295,59 @@ const ls = {
|
|
|
2269
2295
|
t && (t.scrollTop = t.scrollHeight);
|
|
2270
2296
|
}
|
|
2271
2297
|
}
|
|
2272
|
-
},
|
|
2298
|
+
}, ms = {
|
|
2273
2299
|
key: 0,
|
|
2274
2300
|
class: "wm-list__loadMore",
|
|
2275
2301
|
role: "status",
|
|
2276
2302
|
"aria-live": "polite"
|
|
2277
|
-
},
|
|
2303
|
+
}, fs = {
|
|
2278
2304
|
key: 1,
|
|
2279
2305
|
class: "wm-list__historyEnd"
|
|
2280
|
-
},
|
|
2306
|
+
}, _s = {
|
|
2281
2307
|
key: 2,
|
|
2282
2308
|
class: "wm-list__sep"
|
|
2283
|
-
},
|
|
2309
|
+
}, ps = { class: "wm-list__sep-label" }, vs = {
|
|
2284
2310
|
key: 0,
|
|
2285
2311
|
class: "wm-list__sep wm-list__sep--unread"
|
|
2286
|
-
},
|
|
2312
|
+
}, ys = {
|
|
2287
2313
|
key: 0,
|
|
2288
2314
|
class: "wm-list__sysep"
|
|
2289
|
-
},
|
|
2315
|
+
}, gs = { class: "wm-list__sysep-label" }, ws = ["data-row-key"], bs = {
|
|
2290
2316
|
key: 0,
|
|
2291
2317
|
class: "wm-list__avatarSlot"
|
|
2292
|
-
},
|
|
2318
|
+
}, ks = {
|
|
2293
2319
|
key: 5,
|
|
2294
2320
|
class: "wm-list__body"
|
|
2295
|
-
},
|
|
2321
|
+
}, Cs = { key: 0 }, As = {
|
|
2296
2322
|
key: 1,
|
|
2297
2323
|
"aria-hidden": "true"
|
|
2298
|
-
},
|
|
2324
|
+
}, Ss = { key: 2 }, xs = {
|
|
2299
2325
|
key: 3,
|
|
2300
2326
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
2301
|
-
},
|
|
2302
|
-
function
|
|
2327
|
+
}, Ms = { class: "wm-list__avatarSlot" };
|
|
2328
|
+
function Ts(t, e, n, a, r, s) {
|
|
2303
2329
|
const o = I("AIAvatar"), c = I("HumanAvatar"), v = I("ActionResult"), k = I("ArtifactRenderer"), g = I("Bubble"), S = I("AttachmentPreview"), R = I("Typing");
|
|
2304
2330
|
return l(), d("div", {
|
|
2305
2331
|
ref: "scrollEl",
|
|
2306
2332
|
class: E(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
2307
2333
|
onScrollPassive: e[0] || (e[0] = (...A) => s.onScroll && s.onScroll(...A))
|
|
2308
2334
|
}, [
|
|
2309
|
-
n.loadingMore ? (l(), d("div",
|
|
2335
|
+
n.loadingMore ? (l(), d("div", ms, [...e[1] || (e[1] = [
|
|
2310
2336
|
i("span", {
|
|
2311
2337
|
class: "wm-list__loadMore-spinner",
|
|
2312
2338
|
"aria-hidden": "true"
|
|
2313
2339
|
}, null, -1),
|
|
2314
2340
|
i("span", { class: "wm-list__loadMore-lbl" }, "Chargement de l'historique…", -1)
|
|
2315
|
-
])])) : s.historyExhausted ? (l(), d("div",
|
|
2316
|
-
n.dateLabel ? (l(), d("div",
|
|
2341
|
+
])])) : s.historyExhausted ? (l(), d("div", fs, "Début de la conversation")) : w("", !0),
|
|
2342
|
+
n.dateLabel ? (l(), d("div", _s, [
|
|
2317
2343
|
e[2] || (e[2] = i("div", { class: "wm-list__line" }, null, -1)),
|
|
2318
|
-
i("span",
|
|
2344
|
+
i("span", ps, b(n.dateLabel), 1),
|
|
2319
2345
|
e[3] || (e[3] = i("div", { class: "wm-list__line" }, null, -1))
|
|
2320
2346
|
])) : w("", !0),
|
|
2321
2347
|
(l(!0), d(M, null, j(s.groups, (A, P) => (l(), d(M, {
|
|
2322
2348
|
key: A.key
|
|
2323
2349
|
}, [
|
|
2324
|
-
A.key === s.unreadGroupKey ? (l(), d("div",
|
|
2350
|
+
A.key === s.unreadGroupKey ? (l(), d("div", vs, [...e[4] || (e[4] = [
|
|
2325
2351
|
i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1),
|
|
2326
2352
|
i("span", { class: "wm-list__sep-label wm-list__sep-label--unread" }, "Non lus", -1),
|
|
2327
2353
|
i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)
|
|
@@ -2329,9 +2355,9 @@ function Ms(t, e, n, a, r, s) {
|
|
|
2329
2355
|
i("div", {
|
|
2330
2356
|
class: E(["wm-list__group", "wm-list__group--" + A.role])
|
|
2331
2357
|
}, [
|
|
2332
|
-
A.role === "system" ? (l(), d("div",
|
|
2358
|
+
A.role === "system" ? (l(), d("div", ys, [
|
|
2333
2359
|
e[5] || (e[5] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
2334
|
-
i("span",
|
|
2360
|
+
i("span", gs, b(A.systemLabel), 1),
|
|
2335
2361
|
e[6] || (e[6] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
2336
2362
|
])) : (l(), d(M, { key: 1 }, [
|
|
2337
2363
|
(l(!0), d(M, null, j(A.items, (x, D) => (l(), d("div", {
|
|
@@ -2340,7 +2366,7 @@ function Ms(t, e, n, a, r, s) {
|
|
|
2340
2366
|
class: E(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x.message._pending, "is-failed": x.message._failed }]]),
|
|
2341
2367
|
style: G(s.cornersStyle(A, D))
|
|
2342
2368
|
}, [
|
|
2343
|
-
A.role !== "user" ? (l(), d("div",
|
|
2369
|
+
A.role !== "user" ? (l(), d("div", bs, [
|
|
2344
2370
|
D === A.items.length - 1 ? (l(), d(M, { key: 0 }, [
|
|
2345
2371
|
A.role === "ai" ? (l(), $(o, {
|
|
2346
2372
|
key: 0,
|
|
@@ -2370,7 +2396,7 @@ function Ms(t, e, n, a, r, s) {
|
|
|
2370
2396
|
}, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(), $(k, {
|
|
2371
2397
|
key: 4,
|
|
2372
2398
|
artifact: s.artifactOf(x.message)
|
|
2373
|
-
}, null, 8, ["artifact"])) : (l(), d("div",
|
|
2399
|
+
}, null, 8, ["artifact"])) : (l(), d("div", ks, [
|
|
2374
2400
|
x.message.text_md ? (l(), $(g, {
|
|
2375
2401
|
key: 0,
|
|
2376
2402
|
role: A.role,
|
|
@@ -2386,20 +2412,20 @@ function Ms(t, e, n, a, r, s) {
|
|
|
2386
2412
|
}, null, 8, ["attachment"]))), 128))
|
|
2387
2413
|
], 2)) : w("", !0)
|
|
2388
2414
|
]))
|
|
2389
|
-
], 14,
|
|
2415
|
+
], 14, ws))), 128)),
|
|
2390
2416
|
A.role !== "user" || s.lastTimeOf(A) ? (l(), d("div", {
|
|
2391
2417
|
key: 0,
|
|
2392
2418
|
class: E(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
2393
2419
|
}, [
|
|
2394
|
-
A.role !== "user" ? (l(), d("span",
|
|
2395
|
-
A.role !== "user" && s.lastTimeOf(A) ? (l(), d("span",
|
|
2396
|
-
s.lastTimeOf(A) ? (l(), d("span",
|
|
2420
|
+
A.role !== "user" ? (l(), d("span", Cs, b(s.roleLabel(A)), 1)) : w("", !0),
|
|
2421
|
+
A.role !== "user" && s.lastTimeOf(A) ? (l(), d("span", As, "·")) : w("", !0),
|
|
2422
|
+
s.lastTimeOf(A) ? (l(), d("span", Ss, b(s.lastTimeOf(A)), 1)) : w("", !0)
|
|
2397
2423
|
], 2)) : w("", !0)
|
|
2398
2424
|
], 64))
|
|
2399
2425
|
], 2)
|
|
2400
2426
|
], 64))), 128)),
|
|
2401
|
-
n.streamingActive ? (l(), d("div",
|
|
2402
|
-
i("div",
|
|
2427
|
+
n.streamingActive ? (l(), d("div", xs, [
|
|
2428
|
+
i("div", Ms, [
|
|
2403
2429
|
K(o, {
|
|
2404
2430
|
size: 26,
|
|
2405
2431
|
tail: !0
|
|
@@ -2409,8 +2435,8 @@ function Ms(t, e, n, a, r, s) {
|
|
|
2409
2435
|
])) : w("", !0)
|
|
2410
2436
|
], 34);
|
|
2411
2437
|
}
|
|
2412
|
-
const
|
|
2413
|
-
function
|
|
2438
|
+
const Os = /* @__PURE__ */ B(hs, [["render", Ts], ["__scopeId", "data-v-3955655c"]]), ie = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
2439
|
+
function Is() {
|
|
2414
2440
|
return he && [
|
|
2415
2441
|
"video/webm;codecs=vp9,opus",
|
|
2416
2442
|
"video/webm;codecs=vp8,opus",
|
|
@@ -2430,10 +2456,10 @@ function Ce({ audio: t }) {
|
|
|
2430
2456
|
systemAudio: t ? "include" : "exclude"
|
|
2431
2457
|
};
|
|
2432
2458
|
}
|
|
2433
|
-
function
|
|
2459
|
+
function Hi(t) {
|
|
2434
2460
|
return t ? t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : "file" : "file";
|
|
2435
2461
|
}
|
|
2436
|
-
async function
|
|
2462
|
+
async function Es() {
|
|
2437
2463
|
if (!ie) return null;
|
|
2438
2464
|
let t;
|
|
2439
2465
|
try {
|
|
@@ -2442,7 +2468,7 @@ async function Is() {
|
|
|
2442
2468
|
return (e == null ? void 0 : e.name) !== "NotAllowedError" && console.error("[media] screenshot picker", e), null;
|
|
2443
2469
|
}
|
|
2444
2470
|
try {
|
|
2445
|
-
return await
|
|
2471
|
+
return await Bs(t);
|
|
2446
2472
|
} catch (e) {
|
|
2447
2473
|
return console.error("[media] screenshot capture", e), null;
|
|
2448
2474
|
} finally {
|
|
@@ -2451,7 +2477,7 @@ async function Is() {
|
|
|
2451
2477
|
});
|
|
2452
2478
|
}
|
|
2453
2479
|
}
|
|
2454
|
-
async function
|
|
2480
|
+
async function Bs(t) {
|
|
2455
2481
|
const e = document.createElement("video");
|
|
2456
2482
|
e.muted = !0, e.playsInline = !0, e.srcObject = t, await e.play(), await new Promise((c) => requestAnimationFrame(c));
|
|
2457
2483
|
const n = e.videoWidth || 1280, a = e.videoHeight || 720, r = document.createElement("canvas");
|
|
@@ -2461,7 +2487,7 @@ async function Es(t) {
|
|
|
2461
2487
|
}), o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
2462
2488
|
return new File([s], `capture-${o}.png`, { type: "image/png" });
|
|
2463
2489
|
}
|
|
2464
|
-
async function
|
|
2490
|
+
async function Ls(t = {}) {
|
|
2465
2491
|
var k;
|
|
2466
2492
|
if (!ie || !he) return null;
|
|
2467
2493
|
let e;
|
|
@@ -2470,7 +2496,7 @@ async function Bs(t = {}) {
|
|
|
2470
2496
|
} catch (g) {
|
|
2471
2497
|
return (g == null ? void 0 : g.name) !== "NotAllowedError" && console.error("[media] record picker", g), null;
|
|
2472
2498
|
}
|
|
2473
|
-
const n =
|
|
2499
|
+
const n = Is();
|
|
2474
2500
|
let a;
|
|
2475
2501
|
try {
|
|
2476
2502
|
a = n ? new window.MediaRecorder(e, { mimeType: n }) : new window.MediaRecorder(e);
|
|
@@ -2522,7 +2548,7 @@ async function Bs(t = {}) {
|
|
|
2522
2548
|
}
|
|
2523
2549
|
};
|
|
2524
2550
|
}
|
|
2525
|
-
const
|
|
2551
|
+
const $s = [
|
|
2526
2552
|
{
|
|
2527
2553
|
action: "file",
|
|
2528
2554
|
label: "Joindre un fichier",
|
|
@@ -2538,7 +2564,7 @@ const Ls = [
|
|
|
2538
2564
|
label: "Enregistrer l'écran",
|
|
2539
2565
|
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"
|
|
2540
2566
|
}
|
|
2541
|
-
],
|
|
2567
|
+
], Rs = {
|
|
2542
2568
|
name: "WmComposer",
|
|
2543
2569
|
props: {
|
|
2544
2570
|
modelValue: { type: String, default: "" },
|
|
@@ -2561,7 +2587,7 @@ const Ls = [
|
|
|
2561
2587
|
return !this.disabled && !!this.local.trim();
|
|
2562
2588
|
},
|
|
2563
2589
|
attachItems() {
|
|
2564
|
-
return
|
|
2590
|
+
return $s.map((t) => ({
|
|
2565
2591
|
...t,
|
|
2566
2592
|
disabled: t.action === "screenshot" && !ie || t.action === "record" && (!ie || !he)
|
|
2567
2593
|
}));
|
|
@@ -2633,13 +2659,13 @@ const Ls = [
|
|
|
2633
2659
|
},
|
|
2634
2660
|
async captureScreenshot() {
|
|
2635
2661
|
if (this.disabled) return;
|
|
2636
|
-
const t = await
|
|
2662
|
+
const t = await Es();
|
|
2637
2663
|
t && this.$emit("attach", t);
|
|
2638
2664
|
},
|
|
2639
2665
|
async startRecording() {
|
|
2640
2666
|
if (this.recording || this.disabled) return;
|
|
2641
2667
|
this.recordingElapsed = 0;
|
|
2642
|
-
const t = await
|
|
2668
|
+
const t = await Ls({
|
|
2643
2669
|
onstart: () => {
|
|
2644
2670
|
this.recording = !0;
|
|
2645
2671
|
},
|
|
@@ -2664,27 +2690,27 @@ const Ls = [
|
|
|
2664
2690
|
}
|
|
2665
2691
|
}
|
|
2666
2692
|
}
|
|
2667
|
-
},
|
|
2693
|
+
}, Fs = { class: "wm-compose-wrap" }, js = {
|
|
2668
2694
|
key: 0,
|
|
2669
2695
|
class: "wm-rec"
|
|
2670
|
-
},
|
|
2696
|
+
}, Us = { class: "wm-rec__lbl" }, Ds = {
|
|
2671
2697
|
key: 1,
|
|
2672
2698
|
class: "wm-compose__menu",
|
|
2673
2699
|
role: "menu"
|
|
2674
|
-
},
|
|
2700
|
+
}, Ns = ["disabled", "onClick"], Ps = { class: "wm-compose__menuIcon" }, Hs = {
|
|
2675
2701
|
viewBox: "0 0 24 24",
|
|
2676
2702
|
width: "14",
|
|
2677
2703
|
height: "14",
|
|
2678
2704
|
"aria-hidden": "true"
|
|
2679
|
-
},
|
|
2680
|
-
function
|
|
2681
|
-
return l(), d("div",
|
|
2682
|
-
r.recording ? (l(), d("div",
|
|
2705
|
+
}, zs = ["d"], Vs = ["placeholder", "disabled"], qs = { class: "wm-compose__actions" }, Ws = ["title", "aria-label", "disabled"], Ks = ["disabled"];
|
|
2706
|
+
function Gs(t, e, n, a, r, s) {
|
|
2707
|
+
return l(), d("div", Fs, [
|
|
2708
|
+
r.recording ? (l(), d("div", js, [
|
|
2683
2709
|
e[8] || (e[8] = i("span", {
|
|
2684
2710
|
class: "wm-rec__dot",
|
|
2685
2711
|
"aria-hidden": "true"
|
|
2686
2712
|
}, null, -1)),
|
|
2687
|
-
i("span",
|
|
2713
|
+
i("span", Us, "Enregistrement · " + b(s.recordingElapsedLabel), 1),
|
|
2688
2714
|
i("button", {
|
|
2689
2715
|
type: "button",
|
|
2690
2716
|
class: "wm-rec__stop",
|
|
@@ -2707,7 +2733,7 @@ function Ks(t, e, n, a, r, s) {
|
|
|
2707
2733
|
class: "wm-compose__overlay",
|
|
2708
2734
|
onClick: e[2] || (e[2] = (o) => r.attachOpen = !1)
|
|
2709
2735
|
})) : w("", !0),
|
|
2710
|
-
r.attachOpen ? (l(), d("div",
|
|
2736
|
+
r.attachOpen ? (l(), d("div", Ds, [
|
|
2711
2737
|
(l(!0), d(M, null, j(s.attachItems, (o) => (l(), d("button", {
|
|
2712
2738
|
key: o.action,
|
|
2713
2739
|
type: "button",
|
|
@@ -2715,8 +2741,8 @@ function Ks(t, e, n, a, r, s) {
|
|
|
2715
2741
|
disabled: o.disabled,
|
|
2716
2742
|
onClick: (c) => s.onAttachAction(o.action)
|
|
2717
2743
|
}, [
|
|
2718
|
-
i("span",
|
|
2719
|
-
(l(), d("svg",
|
|
2744
|
+
i("span", Ps, [
|
|
2745
|
+
(l(), d("svg", Hs, [
|
|
2720
2746
|
i("path", {
|
|
2721
2747
|
d: o.path,
|
|
2722
2748
|
stroke: "currentColor",
|
|
@@ -2724,11 +2750,11 @@ function Ks(t, e, n, a, r, s) {
|
|
|
2724
2750
|
"stroke-linecap": "round",
|
|
2725
2751
|
"stroke-linejoin": "round",
|
|
2726
2752
|
fill: "none"
|
|
2727
|
-
}, null, 8,
|
|
2753
|
+
}, null, 8, zs)
|
|
2728
2754
|
]))
|
|
2729
2755
|
]),
|
|
2730
2756
|
i("span", null, b(o.label), 1)
|
|
2731
|
-
], 8,
|
|
2757
|
+
], 8, Ns))), 128))
|
|
2732
2758
|
])) : w("", !0),
|
|
2733
2759
|
W(i("textarea", {
|
|
2734
2760
|
ref: "inputEl",
|
|
@@ -2739,10 +2765,10 @@ function Ks(t, e, n, a, r, s) {
|
|
|
2739
2765
|
disabled: n.disabled,
|
|
2740
2766
|
onKeydown: e[4] || (e[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
|
|
2741
2767
|
onInput: e[5] || (e[5] = (...o) => s.autosize && s.autosize(...o))
|
|
2742
|
-
}, null, 40,
|
|
2768
|
+
}, null, 40, Vs), [
|
|
2743
2769
|
[Q, r.local]
|
|
2744
2770
|
]),
|
|
2745
|
-
i("div",
|
|
2771
|
+
i("div", qs, [
|
|
2746
2772
|
i("button", {
|
|
2747
2773
|
type: "button",
|
|
2748
2774
|
class: E(["wm-compose__icon", { "is-open": r.attachOpen }]),
|
|
@@ -2764,7 +2790,7 @@ function Ks(t, e, n, a, r, s) {
|
|
|
2764
2790
|
}, [
|
|
2765
2791
|
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" })
|
|
2766
2792
|
], -1)
|
|
2767
|
-
])], 10,
|
|
2793
|
+
])], 10, Ws),
|
|
2768
2794
|
i("button", {
|
|
2769
2795
|
type: "submit",
|
|
2770
2796
|
class: E(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
@@ -2784,12 +2810,12 @@ function Ks(t, e, n, a, r, s) {
|
|
|
2784
2810
|
}, [
|
|
2785
2811
|
i("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
2786
2812
|
], -1)
|
|
2787
|
-
])], 10,
|
|
2813
|
+
])], 10, Ks)
|
|
2788
2814
|
])
|
|
2789
2815
|
], 34)
|
|
2790
2816
|
]);
|
|
2791
2817
|
}
|
|
2792
|
-
const
|
|
2818
|
+
const Ys = /* @__PURE__ */ B(Rs, [["render", Gs], ["__scopeId", "data-v-14fa9ec0"]]), Js = {
|
|
2793
2819
|
name: "WmSuggestionChips",
|
|
2794
2820
|
props: {
|
|
2795
2821
|
items: { type: Array, default: () => [] },
|
|
@@ -2806,8 +2832,8 @@ const Gs = /* @__PURE__ */ B($s, [["render", Ks], ["__scopeId", "data-v-14fa9ec0
|
|
|
2806
2832
|
return this.items.map((t) => (t == null ? void 0 : t.label) || (t == null ? void 0 : t.text) || "").join("§");
|
|
2807
2833
|
}
|
|
2808
2834
|
}
|
|
2809
|
-
},
|
|
2810
|
-
function
|
|
2835
|
+
}, Xs = ["onClick"];
|
|
2836
|
+
function Qs(t, e, n, a, r, s) {
|
|
2811
2837
|
return n.items.length ? (l(), d("div", {
|
|
2812
2838
|
key: s.batchKey,
|
|
2813
2839
|
class: "wm-chips"
|
|
@@ -2818,10 +2844,10 @@ function Xs(t, e, n, a, r, s) {
|
|
|
2818
2844
|
class: "wm-chip",
|
|
2819
2845
|
style: G({ animationDelay: n.baseDelay + c * n.stepDelay + "ms" }),
|
|
2820
2846
|
onClick: (v) => t.$emit("select", o)
|
|
2821
|
-
}, b(o.label), 13,
|
|
2847
|
+
}, b(o.label), 13, Xs))), 128))
|
|
2822
2848
|
])) : w("", !0);
|
|
2823
2849
|
}
|
|
2824
|
-
const
|
|
2850
|
+
const Zs = /* @__PURE__ */ B(Js, [["render", Qs], ["__scopeId", "data-v-55aa529d"]]), er = {
|
|
2825
2851
|
name: "WmApprovalCard",
|
|
2826
2852
|
components: { AIAvatar: te },
|
|
2827
2853
|
props: {
|
|
@@ -2854,23 +2880,23 @@ const Qs = /* @__PURE__ */ B(Ys, [["render", Xs], ["__scopeId", "data-v-55aa529d
|
|
|
2854
2880
|
return ((t = this.rejectCallback) == null ? void 0 : t.label) || "Refuser";
|
|
2855
2881
|
}
|
|
2856
2882
|
}
|
|
2857
|
-
},
|
|
2883
|
+
}, tr = { class: "wm-approval" }, nr = { class: "wm-approval__head" }, sr = { class: "wm-approval__icon" }, rr = { class: "wm-approval__main" }, ir = { class: "wm-approval__title" }, ar = {
|
|
2858
2884
|
key: 0,
|
|
2859
2885
|
class: "wm-approval__detail"
|
|
2860
|
-
},
|
|
2861
|
-
function
|
|
2886
|
+
}, or = { class: "wm-approval__actions" };
|
|
2887
|
+
function lr(t, e, n, a, r, s) {
|
|
2862
2888
|
const o = I("AIAvatar");
|
|
2863
|
-
return l(), d("div",
|
|
2864
|
-
i("div",
|
|
2865
|
-
i("div",
|
|
2889
|
+
return l(), d("div", tr, [
|
|
2890
|
+
i("div", nr, [
|
|
2891
|
+
i("div", sr, [
|
|
2866
2892
|
K(o, { size: 24 })
|
|
2867
2893
|
]),
|
|
2868
|
-
i("div",
|
|
2869
|
-
i("div",
|
|
2870
|
-
n.detail ? (l(), d("div",
|
|
2894
|
+
i("div", rr, [
|
|
2895
|
+
i("div", ir, b(n.action), 1),
|
|
2896
|
+
n.detail ? (l(), d("div", ar, b(n.detail), 1)) : w("", !0)
|
|
2871
2897
|
])
|
|
2872
2898
|
]),
|
|
2873
|
-
i("div",
|
|
2899
|
+
i("div", or, [
|
|
2874
2900
|
s.rejectId ? (l(), d("button", {
|
|
2875
2901
|
key: 0,
|
|
2876
2902
|
type: "button",
|
|
@@ -2886,9 +2912,9 @@ function or(t, e, n, a, r, s) {
|
|
|
2886
2912
|
])
|
|
2887
2913
|
]);
|
|
2888
2914
|
}
|
|
2889
|
-
const
|
|
2915
|
+
const cr = /* @__PURE__ */ B(er, [["render", lr], ["__scopeId", "data-v-b1be139c"]]);
|
|
2890
2916
|
let ve = 0;
|
|
2891
|
-
const
|
|
2917
|
+
const dr = /* @__PURE__ */ new Set([
|
|
2892
2918
|
"text",
|
|
2893
2919
|
"textarea",
|
|
2894
2920
|
"number",
|
|
@@ -2896,7 +2922,7 @@ const cr = /* @__PURE__ */ new Set([
|
|
|
2896
2922
|
"select",
|
|
2897
2923
|
"multiselect",
|
|
2898
2924
|
"date"
|
|
2899
|
-
]),
|
|
2925
|
+
]), ur = {
|
|
2900
2926
|
name: "WmFormCard",
|
|
2901
2927
|
components: { AIAvatar: te },
|
|
2902
2928
|
props: {
|
|
@@ -2919,7 +2945,7 @@ const cr = /* @__PURE__ */ new Set([
|
|
|
2919
2945
|
// douteux.
|
|
2920
2946
|
normalizedFields() {
|
|
2921
2947
|
var e;
|
|
2922
|
-
return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !
|
|
2948
|
+
return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !dr.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
|
|
2923
2949
|
}
|
|
2924
2950
|
},
|
|
2925
2951
|
created() {
|
|
@@ -2970,43 +2996,43 @@ const cr = /* @__PURE__ */ new Set([
|
|
|
2970
2996
|
}
|
|
2971
2997
|
}
|
|
2972
2998
|
}
|
|
2973
|
-
},
|
|
2999
|
+
}, hr = { class: "wm-form" }, mr = { class: "wm-form__head" }, fr = { class: "wm-form__icon" }, _r = { class: "wm-form__main" }, pr = { class: "wm-form__title" }, vr = {
|
|
2974
3000
|
key: 0,
|
|
2975
3001
|
class: "wm-form__detail"
|
|
2976
|
-
},
|
|
3002
|
+
}, yr = ["for"], gr = {
|
|
2977
3003
|
key: 0,
|
|
2978
3004
|
class: "wm-form__req",
|
|
2979
3005
|
"aria-hidden": "true"
|
|
2980
|
-
},
|
|
3006
|
+
}, wr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], br = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], kr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Cr = ["id", "onUpdate:modelValue", "required", "disabled"], Ar = {
|
|
2981
3007
|
key: 4,
|
|
2982
3008
|
class: "wm-form__bool"
|
|
2983
|
-
},
|
|
3009
|
+
}, Sr = ["id", "onUpdate:modelValue", "disabled"], xr = ["id", "onUpdate:modelValue", "required", "disabled"], Mr = {
|
|
2984
3010
|
value: "",
|
|
2985
3011
|
disabled: ""
|
|
2986
|
-
},
|
|
3012
|
+
}, Tr = ["value"], Or = {
|
|
2987
3013
|
key: 6,
|
|
2988
3014
|
class: "wm-form__multi"
|
|
2989
|
-
},
|
|
3015
|
+
}, Ir = ["value", "checked", "disabled", "onChange"], Er = {
|
|
2990
3016
|
key: 0,
|
|
2991
3017
|
class: "wm-form__err"
|
|
2992
|
-
},
|
|
3018
|
+
}, Br = ["disabled"], Lr = {
|
|
2993
3019
|
key: 0,
|
|
2994
3020
|
class: "wm-form__spinner",
|
|
2995
3021
|
"aria-hidden": "true"
|
|
2996
|
-
},
|
|
3022
|
+
}, $r = {
|
|
2997
3023
|
key: 2,
|
|
2998
3024
|
class: "wm-form__doneLbl"
|
|
2999
3025
|
};
|
|
3000
|
-
function
|
|
3026
|
+
function Rr(t, e, n, a, r, s) {
|
|
3001
3027
|
const o = I("AIAvatar");
|
|
3002
|
-
return l(), d("div",
|
|
3003
|
-
i("div",
|
|
3004
|
-
i("div",
|
|
3028
|
+
return l(), d("div", hr, [
|
|
3029
|
+
i("div", mr, [
|
|
3030
|
+
i("div", fr, [
|
|
3005
3031
|
K(o, { size: 24 })
|
|
3006
3032
|
]),
|
|
3007
|
-
i("div",
|
|
3008
|
-
i("div",
|
|
3009
|
-
n.form.description ? (l(), d("div",
|
|
3033
|
+
i("div", _r, [
|
|
3034
|
+
i("div", pr, b(n.form.title || "Formulaire"), 1),
|
|
3035
|
+
n.form.description ? (l(), d("div", vr, b(n.form.description), 1)) : w("", !0)
|
|
3010
3036
|
])
|
|
3011
3037
|
]),
|
|
3012
3038
|
i("form", {
|
|
@@ -3022,8 +3048,8 @@ function $r(t, e, n, a, r, s) {
|
|
|
3022
3048
|
class: "wm-form__label"
|
|
3023
3049
|
}, [
|
|
3024
3050
|
oe(b(c.label), 1),
|
|
3025
|
-
c.required ? (l(), d("span",
|
|
3026
|
-
], 8,
|
|
3051
|
+
c.required ? (l(), d("span", gr, "*")) : w("", !0)
|
|
3052
|
+
], 8, yr),
|
|
3027
3053
|
c.type === "text" ? W((l(), d("input", {
|
|
3028
3054
|
key: 0,
|
|
3029
3055
|
id: `wm-f-${r._uid}-${c.key}`,
|
|
@@ -3033,7 +3059,7 @@ function $r(t, e, n, a, r, s) {
|
|
|
3033
3059
|
placeholder: c.placeholder || "",
|
|
3034
3060
|
required: c.required,
|
|
3035
3061
|
disabled: n.readOnly || r.busy
|
|
3036
|
-
}, null, 8,
|
|
3062
|
+
}, null, 8, wr)), [
|
|
3037
3063
|
[Q, r.values[c.key]]
|
|
3038
3064
|
]) : c.type === "textarea" ? W((l(), d("textarea", {
|
|
3039
3065
|
key: 1,
|
|
@@ -3044,7 +3070,7 @@ function $r(t, e, n, a, r, s) {
|
|
|
3044
3070
|
placeholder: c.placeholder || "",
|
|
3045
3071
|
required: c.required,
|
|
3046
3072
|
disabled: n.readOnly || r.busy
|
|
3047
|
-
}, null, 8,
|
|
3073
|
+
}, null, 8, br)), [
|
|
3048
3074
|
[Q, r.values[c.key]]
|
|
3049
3075
|
]) : c.type === "number" ? W((l(), d("input", {
|
|
3050
3076
|
key: 2,
|
|
@@ -3055,7 +3081,7 @@ function $r(t, e, n, a, r, s) {
|
|
|
3055
3081
|
placeholder: c.placeholder || "",
|
|
3056
3082
|
required: c.required,
|
|
3057
3083
|
disabled: n.readOnly || r.busy
|
|
3058
|
-
}, null, 8,
|
|
3084
|
+
}, null, 8, kr)), [
|
|
3059
3085
|
[
|
|
3060
3086
|
Q,
|
|
3061
3087
|
r.values[c.key],
|
|
@@ -3070,15 +3096,15 @@ function $r(t, e, n, a, r, s) {
|
|
|
3070
3096
|
class: "wm-form__input",
|
|
3071
3097
|
required: c.required,
|
|
3072
3098
|
disabled: n.readOnly || r.busy
|
|
3073
|
-
}, null, 8,
|
|
3099
|
+
}, null, 8, Cr)), [
|
|
3074
3100
|
[Q, r.values[c.key]]
|
|
3075
|
-
]) : c.type === "boolean" ? (l(), d("label",
|
|
3101
|
+
]) : c.type === "boolean" ? (l(), d("label", Ar, [
|
|
3076
3102
|
W(i("input", {
|
|
3077
3103
|
id: `wm-f-${r._uid}-${c.key}`,
|
|
3078
3104
|
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
3079
3105
|
type: "checkbox",
|
|
3080
3106
|
disabled: n.readOnly || r.busy
|
|
3081
|
-
}, null, 8,
|
|
3107
|
+
}, null, 8, Sr), [
|
|
3082
3108
|
[Oe, r.values[c.key]]
|
|
3083
3109
|
]),
|
|
3084
3110
|
i("span", null, b(c.placeholder || "Oui"), 1)
|
|
@@ -3090,14 +3116,14 @@ function $r(t, e, n, a, r, s) {
|
|
|
3090
3116
|
required: c.required,
|
|
3091
3117
|
disabled: n.readOnly || r.busy
|
|
3092
3118
|
}, [
|
|
3093
|
-
i("option",
|
|
3119
|
+
i("option", Mr, b(c.placeholder || "Choisir…"), 1),
|
|
3094
3120
|
(l(!0), d(M, null, j(c.options, (v) => (l(), d("option", {
|
|
3095
3121
|
key: v.value,
|
|
3096
3122
|
value: v.value
|
|
3097
|
-
}, b(v.label), 9,
|
|
3098
|
-
], 8,
|
|
3123
|
+
}, b(v.label), 9, Tr))), 128))
|
|
3124
|
+
], 8, xr)), [
|
|
3099
3125
|
[Ie, r.values[c.key]]
|
|
3100
|
-
]) : c.type === "multiselect" ? (l(), d("div",
|
|
3126
|
+
]) : c.type === "multiselect" ? (l(), d("div", Or, [
|
|
3101
3127
|
(l(!0), d(M, null, j(c.options, (v) => (l(), d("label", {
|
|
3102
3128
|
key: v.value,
|
|
3103
3129
|
class: "wm-form__multiItem"
|
|
@@ -3108,25 +3134,25 @@ function $r(t, e, n, a, r, s) {
|
|
|
3108
3134
|
checked: Array.isArray(r.values[c.key]) && r.values[c.key].includes(v.value),
|
|
3109
3135
|
disabled: n.readOnly || r.busy,
|
|
3110
3136
|
onChange: (k) => s.toggleMulti(c.key, v.value, k.target.checked)
|
|
3111
|
-
}, null, 40,
|
|
3137
|
+
}, null, 40, Ir),
|
|
3112
3138
|
i("span", null, b(v.label), 1)
|
|
3113
3139
|
]))), 128))
|
|
3114
3140
|
])) : w("", !0)
|
|
3115
3141
|
]))), 128)),
|
|
3116
|
-
r.error ? (l(), d("div",
|
|
3117
|
-
n.readOnly ? (l(), d("div",
|
|
3142
|
+
r.error ? (l(), d("div", Er, b(r.error), 1)) : w("", !0),
|
|
3143
|
+
n.readOnly ? (l(), d("div", $r, "Réponse envoyée")) : (l(), d("button", {
|
|
3118
3144
|
key: 1,
|
|
3119
3145
|
type: "submit",
|
|
3120
3146
|
class: "wm-form__submit",
|
|
3121
3147
|
disabled: r.busy
|
|
3122
3148
|
}, [
|
|
3123
|
-
r.busy ? (l(), d("span",
|
|
3149
|
+
r.busy ? (l(), d("span", Lr)) : w("", !0),
|
|
3124
3150
|
i("span", null, b(r.busy ? "Envoi…" : n.form.submit_label || "Envoyer"), 1)
|
|
3125
|
-
], 8,
|
|
3151
|
+
], 8, Br))
|
|
3126
3152
|
], 32)
|
|
3127
3153
|
]);
|
|
3128
3154
|
}
|
|
3129
|
-
const
|
|
3155
|
+
const Fr = /* @__PURE__ */ B(ur, [["render", Rr], ["__scopeId", "data-v-64b40f76"]]), jr = {
|
|
3130
3156
|
name: "WmFeedback",
|
|
3131
3157
|
props: {
|
|
3132
3158
|
busy: { type: Boolean, default: !1 },
|
|
@@ -3150,43 +3176,43 @@ const Rr = /* @__PURE__ */ B(dr, [["render", $r], ["__scopeId", "data-v-64b40f76
|
|
|
3150
3176
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
3151
3177
|
}
|
|
3152
3178
|
}
|
|
3153
|
-
},
|
|
3179
|
+
}, Ur = { class: "wm-fb" }, Dr = { class: "wm-fb__row" }, Nr = ["onClick"], Pr = { class: "wm-fb__emoji" }, Hr = { class: "wm-fb__label" }, zr = ["disabled"], Vr = {
|
|
3154
3180
|
key: 1,
|
|
3155
3181
|
class: "wm-fb__done"
|
|
3156
3182
|
};
|
|
3157
|
-
function
|
|
3158
|
-
return l(), d("div",
|
|
3159
|
-
n.done ? (l(), d("div",
|
|
3183
|
+
function qr(t, e, n, a, r, s) {
|
|
3184
|
+
return l(), d("div", Ur, [
|
|
3185
|
+
n.done ? (l(), d("div", Vr, [...e[3] || (e[3] = [
|
|
3160
3186
|
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)
|
|
3161
3187
|
])])) : (l(), d(M, { key: 0 }, [
|
|
3162
3188
|
e[1] || (e[1] = i("div", { class: "wm-fb__title" }, "Comment s'est passée cette conversation ?", -1)),
|
|
3163
3189
|
e[2] || (e[2] = i("div", { class: "wm-fb__sub" }, "Votre avis nous aide à améliorer l'assistant.", -1)),
|
|
3164
|
-
i("div",
|
|
3190
|
+
i("div", Dr, [
|
|
3165
3191
|
(l(!0), d(M, null, j(r.options, (o) => (l(), d("button", {
|
|
3166
3192
|
key: o.v,
|
|
3167
3193
|
type: "button",
|
|
3168
3194
|
class: E(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
|
|
3169
3195
|
onClick: (c) => r.sel = o.v
|
|
3170
3196
|
}, [
|
|
3171
|
-
i("span",
|
|
3172
|
-
i("span",
|
|
3173
|
-
], 10,
|
|
3197
|
+
i("span", Pr, b(o.e), 1),
|
|
3198
|
+
i("span", Hr, b(o.l), 1)
|
|
3199
|
+
], 10, Nr))), 128))
|
|
3174
3200
|
]),
|
|
3175
3201
|
i("button", {
|
|
3176
3202
|
type: "button",
|
|
3177
3203
|
class: "wm-fb__send",
|
|
3178
3204
|
disabled: !r.sel || n.busy,
|
|
3179
3205
|
onClick: e[0] || (e[0] = (...o) => s.onSend && s.onSend(...o))
|
|
3180
|
-
}, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9,
|
|
3206
|
+
}, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9, zr)
|
|
3181
3207
|
], 64))
|
|
3182
3208
|
]);
|
|
3183
3209
|
}
|
|
3184
|
-
const
|
|
3185
|
-
function
|
|
3210
|
+
const Wr = /* @__PURE__ */ B(jr, [["render", qr], ["__scopeId", "data-v-6f45ff3b"]]);
|
|
3211
|
+
function Kr(t) {
|
|
3186
3212
|
const e = new Date(t);
|
|
3187
3213
|
return e.setHours(0, 0, 0, 0), e;
|
|
3188
3214
|
}
|
|
3189
|
-
const
|
|
3215
|
+
const Gr = {
|
|
3190
3216
|
name: "WmHistoryDrawer",
|
|
3191
3217
|
props: {
|
|
3192
3218
|
conversations: { type: Array, default: () => [] },
|
|
@@ -3220,7 +3246,7 @@ const Kr = {
|
|
|
3220
3246
|
) : this.normalized;
|
|
3221
3247
|
},
|
|
3222
3248
|
groups() {
|
|
3223
|
-
const e =
|
|
3249
|
+
const e = Kr(/* @__PURE__ */ new Date()).getTime(), n = e - 6 * 864e5, a = [], r = [], s = [];
|
|
3224
3250
|
for (const o of this.filtered) {
|
|
3225
3251
|
if (!o.stamp) {
|
|
3226
3252
|
s.push(o);
|
|
@@ -3238,29 +3264,29 @@ const Kr = {
|
|
|
3238
3264
|
return this.filtered.length > 0;
|
|
3239
3265
|
}
|
|
3240
3266
|
}
|
|
3241
|
-
},
|
|
3267
|
+
}, Yr = { class: "wm-hd" }, Jr = {
|
|
3242
3268
|
class: "wm-hd__panel",
|
|
3243
3269
|
role: "dialog",
|
|
3244
3270
|
"aria-label": "Vos discussions"
|
|
3245
|
-
},
|
|
3271
|
+
}, Xr = { class: "wm-hd__head" }, Qr = { class: "wm-hd__top" }, Zr = { class: "wm-hd__search" }, ei = { class: "wm-hd__list" }, ti = {
|
|
3246
3272
|
key: 0,
|
|
3247
3273
|
class: "wm-hd__group"
|
|
3248
|
-
},
|
|
3274
|
+
}, ni = { class: "wm-hd__groupLabel" }, si = { class: "wm-hd__rows" }, ri = ["onClick"], ii = { class: "wm-hd__rowIcon" }, ai = {
|
|
3249
3275
|
key: 0,
|
|
3250
3276
|
class: "wm-hd__rowDot",
|
|
3251
3277
|
"aria-label": "Message non lu"
|
|
3252
|
-
},
|
|
3278
|
+
}, oi = { class: "wm-hd__rowBody" }, li = { class: "wm-hd__rowTop" }, ci = { class: "wm-hd__rowTitle" }, di = { class: "wm-hd__rowPreview" }, ui = {
|
|
3253
3279
|
key: 0,
|
|
3254
3280
|
class: "wm-hd__empty"
|
|
3255
3281
|
};
|
|
3256
|
-
function
|
|
3257
|
-
return l(), d("div",
|
|
3282
|
+
function hi(t, e, n, a, r, s) {
|
|
3283
|
+
return l(), d("div", Yr, [
|
|
3258
3284
|
i("div", {
|
|
3259
3285
|
class: "wm-hd__scrim",
|
|
3260
3286
|
onClick: e[0] || (e[0] = (o) => t.$emit("close"))
|
|
3261
3287
|
}),
|
|
3262
|
-
i("aside",
|
|
3263
|
-
i("div",
|
|
3288
|
+
i("aside", Jr, [
|
|
3289
|
+
i("div", Xr, [
|
|
3264
3290
|
e[5] || (e[5] = i("div", { class: "wm-hd__heading" }, [
|
|
3265
3291
|
i("div", { class: "wm-hd__title" }, "Vos discussions"),
|
|
3266
3292
|
i("div", { class: "wm-hd__sub" }, "Reprenez là où vous en étiez.")
|
|
@@ -3286,7 +3312,7 @@ function ui(t, e, n, a, r, s) {
|
|
|
3286
3312
|
], -1)
|
|
3287
3313
|
])])
|
|
3288
3314
|
]),
|
|
3289
|
-
i("div",
|
|
3315
|
+
i("div", Qr, [
|
|
3290
3316
|
i("button", {
|
|
3291
3317
|
type: "button",
|
|
3292
3318
|
class: "wm-hd__new",
|
|
@@ -3309,7 +3335,7 @@ function ui(t, e, n, a, r, s) {
|
|
|
3309
3335
|
], -1),
|
|
3310
3336
|
i("span", null, "Démarrer un nouveau fil", -1)
|
|
3311
3337
|
])]),
|
|
3312
|
-
i("div",
|
|
3338
|
+
i("div", Zr, [
|
|
3313
3339
|
e[7] || (e[7] = i("span", { class: "wm-hd__searchIcon" }, [
|
|
3314
3340
|
i("svg", {
|
|
3315
3341
|
width: "12",
|
|
@@ -3335,13 +3361,13 @@ function ui(t, e, n, a, r, s) {
|
|
|
3335
3361
|
])
|
|
3336
3362
|
])
|
|
3337
3363
|
]),
|
|
3338
|
-
i("div",
|
|
3364
|
+
i("div", ei, [
|
|
3339
3365
|
(l(!0), d(M, null, j(s.groups, (o) => (l(), d(M, {
|
|
3340
3366
|
key: o.key
|
|
3341
3367
|
}, [
|
|
3342
|
-
o.items.length ? (l(), d("div",
|
|
3343
|
-
i("div",
|
|
3344
|
-
i("div",
|
|
3368
|
+
o.items.length ? (l(), d("div", ti, [
|
|
3369
|
+
i("div", ni, b(o.label), 1),
|
|
3370
|
+
i("div", si, [
|
|
3345
3371
|
(l(!0), d(M, null, j(o.items, (c) => (l(), d("button", {
|
|
3346
3372
|
key: c.id,
|
|
3347
3373
|
type: "button",
|
|
@@ -3351,7 +3377,7 @@ function ui(t, e, n, a, r, s) {
|
|
|
3351
3377
|
}]),
|
|
3352
3378
|
onClick: (v) => t.$emit("pick", c)
|
|
3353
3379
|
}, [
|
|
3354
|
-
i("div",
|
|
3380
|
+
i("div", ii, [
|
|
3355
3381
|
e[8] || (e[8] = i("svg", {
|
|
3356
3382
|
width: "11",
|
|
3357
3383
|
height: "11",
|
|
@@ -3365,24 +3391,24 @@ function ui(t, e, n, a, r, s) {
|
|
|
3365
3391
|
opacity: "0.92"
|
|
3366
3392
|
})
|
|
3367
3393
|
], -1)),
|
|
3368
|
-
c.unread ? (l(), d("span",
|
|
3394
|
+
c.unread ? (l(), d("span", ai)) : w("", !0)
|
|
3369
3395
|
]),
|
|
3370
|
-
i("div",
|
|
3371
|
-
i("div",
|
|
3372
|
-
i("span",
|
|
3396
|
+
i("div", oi, [
|
|
3397
|
+
i("div", li, [
|
|
3398
|
+
i("span", ci, b(c.title), 1)
|
|
3373
3399
|
]),
|
|
3374
|
-
i("div",
|
|
3400
|
+
i("div", di, b(c.preview || "Aucun message"), 1)
|
|
3375
3401
|
])
|
|
3376
|
-
], 10,
|
|
3402
|
+
], 10, ri))), 128))
|
|
3377
3403
|
])
|
|
3378
3404
|
])) : w("", !0)
|
|
3379
3405
|
], 64))), 128)),
|
|
3380
|
-
s.hasAny ? w("", !0) : (l(), d("div",
|
|
3406
|
+
s.hasAny ? w("", !0) : (l(), d("div", ui, " Aucun fil pour le moment. "))
|
|
3381
3407
|
])
|
|
3382
3408
|
])
|
|
3383
3409
|
]);
|
|
3384
3410
|
}
|
|
3385
|
-
const
|
|
3411
|
+
const mi = /* @__PURE__ */ B(Gr, [["render", hi], ["__scopeId", "data-v-1259e822"]]), fi = {
|
|
3386
3412
|
name: "WmMoreMenu",
|
|
3387
3413
|
props: {
|
|
3388
3414
|
canRename: { type: Boolean, default: !0 },
|
|
@@ -3409,18 +3435,18 @@ const hi = /* @__PURE__ */ B(Kr, [["render", ui], ["__scopeId", "data-v-1259e822
|
|
|
3409
3435
|
this.notifOn = !this.notifOn, this.$emit("notif-toggle", this.notifOn);
|
|
3410
3436
|
}
|
|
3411
3437
|
}
|
|
3412
|
-
},
|
|
3438
|
+
}, _i = { class: "wm-mm" }, pi = {
|
|
3413
3439
|
class: "wm-mm__pop",
|
|
3414
3440
|
role: "menu"
|
|
3415
|
-
},
|
|
3416
|
-
function
|
|
3417
|
-
return l(), d("div",
|
|
3441
|
+
}, vi = { class: "wm-mm__section" }, yi = { class: "wm-mm__section" }, gi = { class: "wm-mm__section" };
|
|
3442
|
+
function wi(t, e, n, a, r, s) {
|
|
3443
|
+
return l(), d("div", _i, [
|
|
3418
3444
|
i("div", {
|
|
3419
3445
|
class: "wm-mm__scrim",
|
|
3420
3446
|
onClick: e[0] || (e[0] = (o) => t.$emit("close"))
|
|
3421
3447
|
}),
|
|
3422
|
-
i("div",
|
|
3423
|
-
i("div",
|
|
3448
|
+
i("div", pi, [
|
|
3449
|
+
i("div", vi, [
|
|
3424
3450
|
i("button", {
|
|
3425
3451
|
type: "button",
|
|
3426
3452
|
class: "wm-mm__item",
|
|
@@ -3484,7 +3510,7 @@ function gi(t, e, n, a, r, s) {
|
|
|
3484
3510
|
])])) : w("", !0)
|
|
3485
3511
|
]),
|
|
3486
3512
|
e[17] || (e[17] = i("div", { class: "wm-mm__sep" }, null, -1)),
|
|
3487
|
-
i("div",
|
|
3513
|
+
i("div", yi, [
|
|
3488
3514
|
i("button", {
|
|
3489
3515
|
type: "button",
|
|
3490
3516
|
class: "wm-mm__item",
|
|
@@ -3514,7 +3540,7 @@ function gi(t, e, n, a, r, s) {
|
|
|
3514
3540
|
])
|
|
3515
3541
|
]),
|
|
3516
3542
|
e[18] || (e[18] = i("div", { class: "wm-mm__sep" }, null, -1)),
|
|
3517
|
-
i("div",
|
|
3543
|
+
i("div", gi, [
|
|
3518
3544
|
n.statusUrl ? (l(), d("button", {
|
|
3519
3545
|
key: 0,
|
|
3520
3546
|
type: "button",
|
|
@@ -3565,13 +3591,13 @@ function gi(t, e, n, a, r, s) {
|
|
|
3565
3591
|
])
|
|
3566
3592
|
]);
|
|
3567
3593
|
}
|
|
3568
|
-
const
|
|
3594
|
+
const bi = /* @__PURE__ */ B(fi, [["render", wi], ["__scopeId", "data-v-c1bb81d2"]]), ye = "ww-messenger-tokens";
|
|
3569
3595
|
function de(t) {
|
|
3570
3596
|
var n;
|
|
3571
3597
|
const e = (n = t == null ? void 0 : t.author) == null ? void 0 : n.type;
|
|
3572
3598
|
return e === "agent_ia" || e === "agent_human";
|
|
3573
3599
|
}
|
|
3574
|
-
function
|
|
3600
|
+
function ki(t, e) {
|
|
3575
3601
|
if (!t || !e) return "";
|
|
3576
3602
|
const n = Array.isArray(t.fields) ? t.fields : [], a = [];
|
|
3577
3603
|
for (const r of n) {
|
|
@@ -3594,7 +3620,7 @@ function ae(t, e) {
|
|
|
3594
3620
|
const n = t.options.find((a) => (a == null ? void 0 : a.value) === e);
|
|
3595
3621
|
return (n == null ? void 0 : n.label) || e;
|
|
3596
3622
|
}
|
|
3597
|
-
function
|
|
3623
|
+
function Ci(t, e) {
|
|
3598
3624
|
const n = [], a = Array.isArray(t == null ? void 0 : t.fields) ? t.fields : [];
|
|
3599
3625
|
for (const r of a) {
|
|
3600
3626
|
if (!(r != null && r.key) || !(r != null && r.label)) continue;
|
|
@@ -3616,20 +3642,20 @@ function ki(t, e) {
|
|
|
3616
3642
|
}
|
|
3617
3643
|
};
|
|
3618
3644
|
}
|
|
3619
|
-
const
|
|
3645
|
+
const Ai = 450, Si = 50, xi = 900, Mi = 12e3, Ti = 300, Oi = {
|
|
3620
3646
|
name: "Messenger",
|
|
3621
3647
|
components: {
|
|
3622
3648
|
Launcher: Ke,
|
|
3623
3649
|
Header: gt,
|
|
3624
3650
|
Onboarding: Pt,
|
|
3625
|
-
MessageList:
|
|
3626
|
-
Composer:
|
|
3627
|
-
SuggestionChips:
|
|
3628
|
-
ApprovalCard:
|
|
3629
|
-
FormCard:
|
|
3630
|
-
Feedback:
|
|
3631
|
-
HistoryDrawer:
|
|
3632
|
-
MoreMenu:
|
|
3651
|
+
MessageList: Os,
|
|
3652
|
+
Composer: Ys,
|
|
3653
|
+
SuggestionChips: Zs,
|
|
3654
|
+
ApprovalCard: cr,
|
|
3655
|
+
FormCard: Fr,
|
|
3656
|
+
Feedback: Wr,
|
|
3657
|
+
HistoryDrawer: mi,
|
|
3658
|
+
MoreMenu: bi
|
|
3633
3659
|
},
|
|
3634
3660
|
// Make signAttachment available to deep children (AttachmentPreview)
|
|
3635
3661
|
// without prop drilling. The store may not exist yet at provide-time
|
|
@@ -4305,11 +4331,11 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4305
4331
|
// bounded by MIN/MAX_BETWEEN_MS.
|
|
4306
4332
|
scheduleReveal(t) {
|
|
4307
4333
|
const e = Date.now(), n = ((t == null ? void 0 : t.text_md) || "").length, a = Math.min(
|
|
4308
|
-
|
|
4309
|
-
Math.max(
|
|
4334
|
+
Mi,
|
|
4335
|
+
Math.max(xi, n * Si)
|
|
4310
4336
|
), s = Math.max(
|
|
4311
|
-
e +
|
|
4312
|
-
this.nextRevealAt +
|
|
4337
|
+
e + Ai,
|
|
4338
|
+
this.nextRevealAt + Ti
|
|
4313
4339
|
) + a;
|
|
4314
4340
|
this.nextRevealAt = s;
|
|
4315
4341
|
const o = Math.max(0, s - e), c = t.id, v = setTimeout(() => {
|
|
@@ -4517,12 +4543,12 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4517
4543
|
async onFormSubmit({ values: t }) {
|
|
4518
4544
|
const e = this.pendingForm;
|
|
4519
4545
|
if (!(e != null && e.form)) return;
|
|
4520
|
-
const n =
|
|
4546
|
+
const n = ki(e.form, t);
|
|
4521
4547
|
if (!n) return;
|
|
4522
4548
|
const a = this.currentConv;
|
|
4523
4549
|
a && await this.store.send(a.id, n, {
|
|
4524
4550
|
metadata: {
|
|
4525
|
-
artifact:
|
|
4551
|
+
artifact: Ci(e.form, t)
|
|
4526
4552
|
}
|
|
4527
4553
|
});
|
|
4528
4554
|
},
|
|
@@ -4566,28 +4592,28 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4566
4592
|
}
|
|
4567
4593
|
}
|
|
4568
4594
|
}
|
|
4569
|
-
},
|
|
4595
|
+
}, Ii = {
|
|
4570
4596
|
key: 0,
|
|
4571
4597
|
class: "wm-loading",
|
|
4572
4598
|
"aria-busy": "true",
|
|
4573
4599
|
"aria-live": "polite"
|
|
4574
|
-
},
|
|
4600
|
+
}, Ei = {
|
|
4575
4601
|
key: 0,
|
|
4576
4602
|
class: "wm-state"
|
|
4577
|
-
},
|
|
4603
|
+
}, Bi = { class: "wm-state__err" }, Li = { class: "wm-state__errSub" }, $i = { class: "wm-bottom" }, Ri = {
|
|
4578
4604
|
key: 0,
|
|
4579
4605
|
ref: "floatEl",
|
|
4580
4606
|
class: "wm-float"
|
|
4581
|
-
},
|
|
4607
|
+
}, Fi = {
|
|
4582
4608
|
key: 1,
|
|
4583
4609
|
class: "wm-actionWait",
|
|
4584
4610
|
role: "status",
|
|
4585
4611
|
"aria-live": "polite"
|
|
4586
|
-
},
|
|
4612
|
+
}, ji = { class: "wm-actionWait__lbl" }, Ui = {
|
|
4587
4613
|
key: 1,
|
|
4588
4614
|
class: "wm-attached"
|
|
4589
|
-
},
|
|
4590
|
-
function
|
|
4615
|
+
}, Di = ["onClick"];
|
|
4616
|
+
function Ni(t, e, n, a, r, s) {
|
|
4591
4617
|
const o = I("Launcher"), c = I("Header"), v = I("Onboarding"), k = I("MessageList"), g = I("ApprovalCard"), S = I("FormCard"), R = I("Feedback"), A = I("SuggestionChips"), P = I("Composer"), x = I("MoreMenu"), D = I("HistoryDrawer");
|
|
4592
4618
|
return l(), d("div", {
|
|
4593
4619
|
class: E(["wm-root", `wm-root--${n.displayMode}`])
|
|
@@ -4606,7 +4632,7 @@ function Di(t, e, n, a, r, s) {
|
|
|
4606
4632
|
role: "dialog",
|
|
4607
4633
|
"aria-label": "Messenger"
|
|
4608
4634
|
}, [
|
|
4609
|
-
!s.ready && !s.error ? (l(), d("div",
|
|
4635
|
+
!s.ready && !s.error ? (l(), d("div", Ii, [
|
|
4610
4636
|
s.isEmbedded ? w("", !0) : (l(), d("button", {
|
|
4611
4637
|
key: 0,
|
|
4612
4638
|
type: "button",
|
|
@@ -4648,8 +4674,8 @@ function Di(t, e, n, a, r, s) {
|
|
|
4648
4674
|
onMore: s.toggleMore,
|
|
4649
4675
|
onClose: s.close
|
|
4650
4676
|
}, null, 8, ["title", "escalated", "agent-name", "agent-avatar-url", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "onBack", "onMore", "onClose"]),
|
|
4651
|
-
s.error ? (l(), d("div",
|
|
4652
|
-
i("div",
|
|
4677
|
+
s.error ? (l(), d("div", Ei, [
|
|
4678
|
+
i("div", Bi, [
|
|
4653
4679
|
e[9] || (e[9] = i("div", { class: "wm-state__errIcon" }, [
|
|
4654
4680
|
i("svg", {
|
|
4655
4681
|
width: "14",
|
|
@@ -4667,7 +4693,7 @@ function Di(t, e, n, a, r, s) {
|
|
|
4667
4693
|
], -1)),
|
|
4668
4694
|
i("div", null, [
|
|
4669
4695
|
e[8] || (e[8] = i("div", { class: "wm-state__errTitle" }, "Connexion impossible", -1)),
|
|
4670
|
-
i("div",
|
|
4696
|
+
i("div", Li, b(s.error), 1)
|
|
4671
4697
|
])
|
|
4672
4698
|
])
|
|
4673
4699
|
])) : s.currentConv ? (l(), d(M, { key: 2 }, [
|
|
@@ -4682,8 +4708,8 @@ function Di(t, e, n, a, r, s) {
|
|
|
4682
4708
|
"unread-anchor-ts": r.unreadAnchorTs,
|
|
4683
4709
|
onLoadMore: s.onLoadMore
|
|
4684
4710
|
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "onLoadMore"]),
|
|
4685
|
-
i("div",
|
|
4686
|
-
s.floatVisible ? (l(), d("div",
|
|
4711
|
+
i("div", $i, [
|
|
4712
|
+
s.floatVisible ? (l(), d("div", Ri, [
|
|
4687
4713
|
s.approvalReady ? (l(), $(g, {
|
|
4688
4714
|
key: 0,
|
|
4689
4715
|
action: s.approvalTitle,
|
|
@@ -4705,12 +4731,12 @@ function Di(t, e, n, a, r, s) {
|
|
|
4705
4731
|
onSelect: s.onSuggestion
|
|
4706
4732
|
}, null, 8, ["items", "onSelect"]))
|
|
4707
4733
|
], 512)) : w("", !0),
|
|
4708
|
-
s.actionInFlight ? (l(), d("div",
|
|
4734
|
+
s.actionInFlight ? (l(), d("div", Fi, [
|
|
4709
4735
|
e[10] || (e[10] = i("span", {
|
|
4710
4736
|
class: "wm-actionWait__spinner",
|
|
4711
4737
|
"aria-hidden": "true"
|
|
4712
4738
|
}, null, -1)),
|
|
4713
|
-
i("span",
|
|
4739
|
+
i("span", ji, b(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
|
|
4714
4740
|
])) : (l(), $(P, {
|
|
4715
4741
|
key: 2,
|
|
4716
4742
|
ref: "composer",
|
|
@@ -4735,7 +4761,7 @@ function Di(t, e, n, a, r, s) {
|
|
|
4735
4761
|
onNotifToggle: s.onNotifToggle,
|
|
4736
4762
|
onAction: s.onMoreAction
|
|
4737
4763
|
}, null, 8, ["can-rename", "can-clear", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : w("", !0),
|
|
4738
|
-
r.pendingAttachments.length ? (l(), d("div",
|
|
4764
|
+
r.pendingAttachments.length ? (l(), d("div", Ui, [
|
|
4739
4765
|
(l(!0), d(M, null, j(r.pendingAttachments, (F, N) => (l(), d("div", {
|
|
4740
4766
|
key: N,
|
|
4741
4767
|
class: "wm-attached__chip"
|
|
@@ -4772,7 +4798,7 @@ function Di(t, e, n, a, r, s) {
|
|
|
4772
4798
|
}, [
|
|
4773
4799
|
i("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
4774
4800
|
], -1)
|
|
4775
|
-
])], 8,
|
|
4801
|
+
])], 8, Di)
|
|
4776
4802
|
]))), 128))
|
|
4777
4803
|
])) : w("", !0)
|
|
4778
4804
|
], 64)) : (l(), $(v, {
|
|
@@ -4810,48 +4836,48 @@ function Di(t, e, n, a, r, s) {
|
|
|
4810
4836
|
], 6)) : w("", !0)
|
|
4811
4837
|
], 2);
|
|
4812
4838
|
}
|
|
4813
|
-
const
|
|
4839
|
+
const zi = /* @__PURE__ */ B(Oi, [["render", Ni], ["__scopeId", "data-v-8264e504"]]), Vi = "0.2.23";
|
|
4814
4840
|
export {
|
|
4815
4841
|
te as AIAvatar,
|
|
4816
4842
|
ce as AVATAR_COLORS,
|
|
4817
4843
|
Qt as ActionResult,
|
|
4818
|
-
|
|
4844
|
+
cr as ApprovalCard,
|
|
4819
4845
|
on as ArtifactFormResponse,
|
|
4820
4846
|
wn as ArtifactInfoCard,
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4847
|
+
Dn as ArtifactRenderer,
|
|
4848
|
+
Rn as ArtifactTicket,
|
|
4849
|
+
Xn as AttachmentPreview,
|
|
4850
|
+
rs as Bubble,
|
|
4851
|
+
Ys as Composer,
|
|
4826
4852
|
Pe as DEFAULT_BASE_URL,
|
|
4827
|
-
|
|
4828
|
-
|
|
4853
|
+
Wr as Feedback,
|
|
4854
|
+
Fr as FormCard,
|
|
4829
4855
|
gt as Header,
|
|
4830
|
-
|
|
4856
|
+
mi as HistoryDrawer,
|
|
4831
4857
|
ke as HumanAvatar,
|
|
4832
4858
|
Ke as Launcher,
|
|
4833
4859
|
he as MEDIA_RECORDER_SUPPORTED,
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4860
|
+
Os as MessageList,
|
|
4861
|
+
zi as Messenger,
|
|
4862
|
+
bi as MoreMenu,
|
|
4837
4863
|
Pt as Onboarding,
|
|
4838
4864
|
ie as SCREEN_CAPTURE_SUPPORTED,
|
|
4839
|
-
|
|
4865
|
+
Zs as SuggestionChips,
|
|
4840
4866
|
ot as TeamAvatars,
|
|
4841
|
-
|
|
4842
|
-
|
|
4867
|
+
ls as Typing,
|
|
4868
|
+
Vi as VERSION,
|
|
4843
4869
|
ge as avatarColor,
|
|
4844
4870
|
we as avatarInitials,
|
|
4845
|
-
|
|
4871
|
+
Es as captureScreenshotFile,
|
|
4846
4872
|
U as colors,
|
|
4847
4873
|
De as createStore,
|
|
4848
4874
|
Re as createTransport,
|
|
4849
|
-
|
|
4875
|
+
zi as default,
|
|
4850
4876
|
be as formatTime,
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4877
|
+
Hi as guessAttachmentKind,
|
|
4878
|
+
Is as pickRecorderMime,
|
|
4879
|
+
es as renderMarkdown,
|
|
4880
|
+
Ls as startScreenRecording,
|
|
4855
4881
|
Ne as tokensCss,
|
|
4856
4882
|
Ue as uuid,
|
|
4857
4883
|
Ue as v4
|