@squadico/chatbot 1.3.0 → 1.5.0
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/README.md +110 -20
- package/dist/answer-CDGrP8YE.js +1193 -0
- package/dist/answer-CDGrP8YE.js.map +1 -0
- package/dist/answer-DRaV2dVt.cjs +8 -0
- package/dist/answer-DRaV2dVt.cjs.map +1 -0
- package/dist/chatbot-widgets.global.js +4 -0
- package/dist/chatbot-widgets.global.js.map +1 -0
- package/dist/chatbot.global.js +12 -7
- package/dist/chatbot.global.js.map +1 -1
- package/dist/components/ChatbotWidget.d.ts.map +1 -1
- package/dist/components/MessageList.d.ts +4 -1
- package/dist/components/MessageList.d.ts.map +1 -1
- package/dist/components/RichText.d.ts +6 -4
- package/dist/components/RichText.d.ts.map +1 -1
- package/dist/element.d.ts.map +1 -1
- package/dist/extras-ClIRRLqo.js +604 -0
- package/dist/extras-ClIRRLqo.js.map +1 -0
- package/dist/extras-lsCe4xgN.cjs +4 -0
- package/dist/extras-lsCe4xgN.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/jsx.d.ts +41 -0
- package/dist/jsx.d.ts.map +1 -1
- package/dist/lib/client.d.ts +8 -4
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/conversation.d.ts +5 -1
- package/dist/lib/conversation.d.ts.map +1 -1
- package/dist/lib/i18n.d.ts +20 -0
- package/dist/lib/i18n.d.ts.map +1 -1
- package/dist/lib/useChat.d.ts +6 -0
- package/dist/lib/useChat.d.ts.map +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +2 -2
- package/dist/react.js.map +1 -1
- package/dist/src-BWDC0W4O.js +2005 -0
- package/dist/src-BWDC0W4O.js.map +1 -0
- package/dist/src-DvrmRR89.cjs +7 -0
- package/dist/src-DvrmRR89.cjs.map +1 -0
- package/dist/types.d.ts +16 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/widgets/approval/SqcApproval.d.ts +17 -0
- package/dist/widgets/approval/SqcApproval.d.ts.map +1 -0
- package/dist/widgets/approval/name.d.ts +3 -0
- package/dist/widgets/approval/name.d.ts.map +1 -0
- package/dist/widgets/chart/SqcChart.d.ts +19 -0
- package/dist/widgets/chart/SqcChart.d.ts.map +1 -0
- package/dist/widgets/chart/draw.d.ts +31 -0
- package/dist/widgets/chart/draw.d.ts.map +1 -0
- package/dist/widgets/chart/png.d.ts +10 -0
- package/dist/widgets/chart/png.d.ts.map +1 -0
- package/dist/widgets/chart/read.d.ts +11 -0
- package/dist/widgets/chart/read.d.ts.map +1 -0
- package/dist/widgets/chart/strings.d.ts +32 -0
- package/dist/widgets/chart/strings.d.ts.map +1 -0
- package/dist/widgets/choices/SqcChoices.d.ts +17 -0
- package/dist/widgets/choices/SqcChoices.d.ts.map +1 -0
- package/dist/widgets/confirm/SqcConfirm.d.ts +12 -0
- package/dist/widgets/confirm/SqcConfirm.d.ts.map +1 -0
- package/dist/widgets/define.d.ts +8 -0
- package/dist/widgets/define.d.ts.map +1 -0
- package/dist/widgets/element.d.ts +26 -0
- package/dist/widgets/element.d.ts.map +1 -0
- package/dist/widgets/extras-loader.d.ts +21 -0
- package/dist/widgets/extras-loader.d.ts.map +1 -0
- package/dist/widgets/extras.d.ts +3 -0
- package/dist/widgets/extras.d.ts.map +1 -0
- package/dist/widgets/extras.global.d.ts +2 -0
- package/dist/widgets/extras.global.d.ts.map +1 -0
- package/dist/widgets/form/SqcForm.d.ts +14 -0
- package/dist/widgets/form/SqcForm.d.ts.map +1 -0
- package/dist/widgets/form/reply.d.ts +7 -0
- package/dist/widgets/form/reply.d.ts.map +1 -0
- package/dist/widgets/i18n.d.ts +4 -0
- package/dist/widgets/i18n.d.ts.map +1 -0
- package/dist/widgets/index.d.ts +10 -0
- package/dist/widgets/index.d.ts.map +1 -0
- package/dist/widgets/inline.d.ts +11 -0
- package/dist/widgets/inline.d.ts.map +1 -0
- package/dist/widgets/live.d.ts +12 -0
- package/dist/widgets/live.d.ts.map +1 -0
- package/dist/widgets/names.d.ts +10 -0
- package/dist/widgets/names.d.ts.map +1 -0
- package/dist/widgets/parse/answer.d.ts +11 -0
- package/dist/widgets/parse/answer.d.ts.map +1 -0
- package/dist/widgets/parse/confirm.d.ts +19 -0
- package/dist/widgets/parse/confirm.d.ts.map +1 -0
- package/dist/widgets/parse/form.d.ts +6 -0
- package/dist/widgets/parse/form.d.ts.map +1 -0
- package/dist/widgets/styles.d.ts +3 -0
- package/dist/widgets/styles.d.ts.map +1 -0
- package/dist/widgets/table/SqcTable.d.ts +16 -0
- package/dist/widgets/table/SqcTable.d.ts.map +1 -0
- package/dist/widgets/types.d.ts +68 -0
- package/dist/widgets/types.d.ts.map +1 -0
- package/dist/widgets.cjs +1 -0
- package/dist/widgets.js +3 -0
- package/package.json +7 -2
- package/dist/components/Approval.d.ts +0 -37
- package/dist/components/Approval.d.ts.map +0 -1
- package/dist/components/Choices.d.ts +0 -27
- package/dist/components/Choices.d.ts.map +0 -1
- package/dist/components/Confirm.d.ts +0 -16
- package/dist/components/Confirm.d.ts.map +0 -1
- package/dist/lib/confirm.d.ts +0 -17
- package/dist/lib/confirm.d.ts.map +0 -1
- package/dist/src-DcJyi601.cjs +0 -8
- package/dist/src-DcJyi601.cjs.map +0 -1
- package/dist/src-Nh5rZvti.js +0 -2710
- package/dist/src-Nh5rZvti.js.map +0 -1
|
@@ -0,0 +1,1193 @@
|
|
|
1
|
+
//#region node_modules/preact/dist/preact.module.js
|
|
2
|
+
var e, t, n, r, i, a, o, s, c, l, u, d, f, p, m = {}, h = [], g = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, _ = Array.isArray;
|
|
3
|
+
function v(e, t) {
|
|
4
|
+
for (var n in t) e[n] = t[n];
|
|
5
|
+
return e;
|
|
6
|
+
}
|
|
7
|
+
function y(e) {
|
|
8
|
+
e && e.parentNode && e.parentNode.removeChild(e);
|
|
9
|
+
}
|
|
10
|
+
function b(t, n, r) {
|
|
11
|
+
var i, a, o, s = {};
|
|
12
|
+
for (o in n) o == "key" ? i = n[o] : o == "ref" ? a = n[o] : s[o] = n[o];
|
|
13
|
+
if (arguments.length > 2 && (s.children = arguments.length > 3 ? e.call(arguments, 2) : r), typeof t == "function" && t.defaultProps != null) for (o in t.defaultProps) s[o] === void 0 && (s[o] = t.defaultProps[o]);
|
|
14
|
+
return x(t, s, i, a, null);
|
|
15
|
+
}
|
|
16
|
+
function x(e, r, i, a, o) {
|
|
17
|
+
var s = {
|
|
18
|
+
type: e,
|
|
19
|
+
props: r,
|
|
20
|
+
key: i,
|
|
21
|
+
ref: a,
|
|
22
|
+
__k: null,
|
|
23
|
+
__: null,
|
|
24
|
+
__b: 0,
|
|
25
|
+
__e: null,
|
|
26
|
+
__c: null,
|
|
27
|
+
constructor: void 0,
|
|
28
|
+
__v: o ?? ++n,
|
|
29
|
+
__i: -1,
|
|
30
|
+
__u: 0
|
|
31
|
+
};
|
|
32
|
+
return o == null && t.vnode != null && t.vnode(s), s;
|
|
33
|
+
}
|
|
34
|
+
function S(e) {
|
|
35
|
+
return e.children;
|
|
36
|
+
}
|
|
37
|
+
function C(e, t) {
|
|
38
|
+
this.props = e, this.context = t;
|
|
39
|
+
}
|
|
40
|
+
function w(e, t) {
|
|
41
|
+
if (t == null) return e.__ ? w(e.__, e.__i + 1) : null;
|
|
42
|
+
for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
|
|
43
|
+
return typeof e.type == "function" ? w(e) : null;
|
|
44
|
+
}
|
|
45
|
+
function ee(e) {
|
|
46
|
+
if (e.__P && e.__d) {
|
|
47
|
+
var n = e.__v, r = n.__e, i = [], a = [], o = v({}, n);
|
|
48
|
+
o.__v = n.__v + 1, t.vnode && t.vnode(o), ne(e.__P, o, n, e.__n, e.__P.namespaceURI, 32 & n.__u ? [r] : null, i, r ?? w(n), !!(32 & n.__u), a), o.__v = n.__v, o.__.__k[o.__i] = o, ie(i, o, a), n.__e = n.__ = null, o.__e != r && T(o);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function T(e) {
|
|
52
|
+
if ((e = e.__) != null && e.__c != null) return e.__e = e.__c.base = null, e.__k.some(function(t) {
|
|
53
|
+
if (t != null && t.__e != null) return e.__e = e.__c.base = t.__e;
|
|
54
|
+
}), T(e);
|
|
55
|
+
}
|
|
56
|
+
function E(e) {
|
|
57
|
+
(!e.__d && (e.__d = !0) && r.push(e) && !D.__r++ || i != t.debounceRendering) && ((i = t.debounceRendering) || a)(D);
|
|
58
|
+
}
|
|
59
|
+
function D() {
|
|
60
|
+
try {
|
|
61
|
+
for (var e, t = 1; r.length;) r.length > t && r.sort(o), e = r.shift(), t = r.length, ee(e);
|
|
62
|
+
} finally {
|
|
63
|
+
r.length = D.__r = 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function te(e, t, n, r, i, a, o, s, c, l, u) {
|
|
67
|
+
var d, f, p, g, _, v, y = r && r.__k || h, b = t.length;
|
|
68
|
+
for (c = O(n, t, y, c, b), d = 0; d < b; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && y[p.__i] || m, p.__i = d, v = ne(e, p, f, i, a, o, s, c, l, u), g = p.__e, p.ref && f.ref != p.ref && (f.ref && se(f.ref, null, p), u.push(p.ref, p.__c || g, p)), _ == null && g != null && (_ = g), 4 & p.__u ? (c = k(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && v !== void 0 ? c = v : g && (c = g.nextSibling), p.__u &= -7);
|
|
69
|
+
return n.__e = _, c;
|
|
70
|
+
}
|
|
71
|
+
function O(e, t, n, r, i) {
|
|
72
|
+
var a, o, s, c, l, u = n.length, d = u, f = 0;
|
|
73
|
+
for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = x(null, o, null, null, null) : _(o) ? o = e.__k[a] = x(S, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = x(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = A(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
|
|
74
|
+
if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = w(s)), ce(s, s));
|
|
75
|
+
return r;
|
|
76
|
+
}
|
|
77
|
+
function k(e, t, n) {
|
|
78
|
+
var r, i;
|
|
79
|
+
if (typeof e.type == "function") {
|
|
80
|
+
for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = k(r[i], t, n));
|
|
81
|
+
return t;
|
|
82
|
+
}
|
|
83
|
+
e.__e != t && (t && e.type && !t.parentNode && (t = w(e)), t = n.insertBefore(e.__e, t || null));
|
|
84
|
+
do
|
|
85
|
+
t = t && t.nextSibling;
|
|
86
|
+
while (t != null && t.nodeType == 8);
|
|
87
|
+
return t;
|
|
88
|
+
}
|
|
89
|
+
function A(e, t, n, r) {
|
|
90
|
+
var i, a, o, s = e.key, c = e.type, l = t[n], u = l != null && !(2 & l.__u);
|
|
91
|
+
if (l === null && s == null || u && s == l.key && c == l.type) return n;
|
|
92
|
+
if (r > +!!u) {
|
|
93
|
+
for (i = n - 1, a = n + 1; i >= 0 || a < t.length;) if ((l = t[o = i >= 0 ? i-- : a++]) != null && !(2 & l.__u) && s == l.key && c == l.type) return o;
|
|
94
|
+
}
|
|
95
|
+
return -1;
|
|
96
|
+
}
|
|
97
|
+
function j(e, t, n) {
|
|
98
|
+
t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || g.test(t) ? n : n + "px";
|
|
99
|
+
}
|
|
100
|
+
function M(e, t, n, r, i) {
|
|
101
|
+
var a, o;
|
|
102
|
+
n: if (t == "style") {
|
|
103
|
+
if (typeof n == "string") e.style.cssText = n;
|
|
104
|
+
else {
|
|
105
|
+
if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || j(e.style, t, "");
|
|
106
|
+
if (n) for (t in n) r && n[t] == r[t] || j(e.style, t, n[t]);
|
|
107
|
+
}
|
|
108
|
+
} else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(u, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + a] = n, n ? r ? n[l] = r[l] : (n[l] = d, e.addEventListener(t, a ? p : f, a)) : e.removeEventListener(t, a ? p : f, a);
|
|
109
|
+
else {
|
|
110
|
+
if (i == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
111
|
+
else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
|
|
112
|
+
e[t] = n ?? "";
|
|
113
|
+
break n;
|
|
114
|
+
} catch {}
|
|
115
|
+
typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
function N(e) {
|
|
119
|
+
return function(n) {
|
|
120
|
+
if (this.l) {
|
|
121
|
+
var r = this.l[n.type + e];
|
|
122
|
+
if (n[c] == null) n[c] = d++;
|
|
123
|
+
else if (n[c] < r[l]) return;
|
|
124
|
+
return r(t.event ? t.event(n) : n);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function ne(e, n, r, i, a, o, s, c, l, u) {
|
|
129
|
+
var d, f, p, m, g, b, x, ee, T, E, D, O, k, A, j, M, N = n.type;
|
|
130
|
+
if (n.constructor !== void 0) return null;
|
|
131
|
+
128 & r.__u && (l = !!(32 & r.__u), o = [c = n.__e = r.__e]), (d = t.__b) && d(n);
|
|
132
|
+
n: if (typeof N == "function") {
|
|
133
|
+
f = s.length;
|
|
134
|
+
try {
|
|
135
|
+
if (T = n.props, E = N.prototype && N.prototype.render, D = (d = N.contextType) && i[d.__c], O = d ? D ? D.props.value : d.__ : i, r.__c ? ee = (p = n.__c = r.__c).__ = p.__E : (E ? n.__c = p = new N(T, O) : (n.__c = p = new C(T, O), p.constructor = N, p.render = le), D && D.sub(p), p.state || (p.state = {}), p.__n = i, m = p.__d = !0, p.__h = [], p._sb = []), E && p.__s == null && (p.__s = p.state), E && N.getDerivedStateFromProps != null && (p.__s == p.state && (p.__s = v({}, p.__s)), v(p.__s, N.getDerivedStateFromProps(T, p.__s))), g = p.props, b = p.state, p.__v = n, m) E && N.getDerivedStateFromProps == null && p.componentWillMount != null && p.componentWillMount(), E && p.componentDidMount != null && p.__h.push(p.componentDidMount);
|
|
136
|
+
else {
|
|
137
|
+
if (E && N.getDerivedStateFromProps == null && T !== g && p.componentWillReceiveProps != null && p.componentWillReceiveProps(T, O), n.__v == r.__v || !p.__e && p.shouldComponentUpdate != null && !1 === p.shouldComponentUpdate(T, p.__s, O)) {
|
|
138
|
+
n.__v != r.__v && (p.props = T, p.state = p.__s, p.__d = !1), n.__e = r.__e, n.__k = r.__k, n.__k.some(function(e) {
|
|
139
|
+
e && (e.__ = n);
|
|
140
|
+
}), h.push.apply(p.__h, p._sb), p._sb = [], p.__h.length && s.push(p), c = w(r);
|
|
141
|
+
break n;
|
|
142
|
+
}
|
|
143
|
+
p.componentWillUpdate != null && p.componentWillUpdate(T, p.__s, O), E && p.componentDidUpdate != null && p.__h.push(function() {
|
|
144
|
+
p.componentDidUpdate(g, b, x);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
if (p.context = O, p.props = T, p.__P = e, p.__e = !1, k = t.__r, A = 0, E) p.state = p.__s, p.__d = !1, k && k(n), d = p.render(p.props, p.state, p.context), h.push.apply(p.__h, p._sb), p._sb = [];
|
|
148
|
+
else do
|
|
149
|
+
p.__d = !1, k && k(n), d = p.render(p.props, p.state, p.context), p.state = p.__s;
|
|
150
|
+
while (p.__d && ++A < 25);
|
|
151
|
+
p.state = p.__s, p.getChildContext != null && (i = v(v({}, i), p.getChildContext())), E && !m && p.getSnapshotBeforeUpdate != null && (x = p.getSnapshotBeforeUpdate(g, b)), j = d != null && d.type === S && d.key == null ? ae(d.props.children) : d, c = te(e, _(j) ? j : [j], n, r, i, a, o, s, c, l, u), p.base = n.__e, n.__u &= -161, p.__h.length && s.push(p), ee && (p.__E = p.__ = null);
|
|
152
|
+
} catch (e) {
|
|
153
|
+
if (s.length = f, n.__v = null, l || o != null) {
|
|
154
|
+
if (e.then) {
|
|
155
|
+
for (n.__u |= l ? 160 : 128; c && c.nodeType == 8 && c.nextSibling;) c = c.nextSibling;
|
|
156
|
+
o != null && (o[o.indexOf(c)] = null), n.__e = c;
|
|
157
|
+
} else if (o != null) for (M = o.length; M--;) y(o[M]);
|
|
158
|
+
} else n.__e = r.__e;
|
|
159
|
+
n.__k ?? (n.__k = r.__k || []), e.then || re(n), t.__e(e, n, r);
|
|
160
|
+
}
|
|
161
|
+
} else o == null && n.__v == r.__v ? (n.__k = r.__k, n.__e = r.__e) : c = n.__e = oe(r.__e, n, r, i, a, o, s, l, u);
|
|
162
|
+
return (d = t.diffed) && d(n), 128 & n.__u ? void 0 : c;
|
|
163
|
+
}
|
|
164
|
+
function re(e) {
|
|
165
|
+
e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(re));
|
|
166
|
+
}
|
|
167
|
+
function ie(e, n, r) {
|
|
168
|
+
for (var i = 0; i < r.length; i++) se(r[i], r[++i], r[++i]);
|
|
169
|
+
t.__c && t.__c(n, e), e.some(function(n) {
|
|
170
|
+
try {
|
|
171
|
+
e = n.__h, n.__h = [], e.some(function(e) {
|
|
172
|
+
e.call(n);
|
|
173
|
+
});
|
|
174
|
+
} catch (e) {
|
|
175
|
+
t.__e(e, n.__v);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
function ae(e) {
|
|
180
|
+
return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(ae) : e.constructor === void 0 ? v({}, e) : null;
|
|
181
|
+
}
|
|
182
|
+
function oe(n, r, i, a, o, s, c, l, u) {
|
|
183
|
+
var d, f, p, h, g, v, b, x = i.props || m, S = r.props, C = r.type;
|
|
184
|
+
if (C == "svg" ? o = "http://www.w3.org/2000/svg" : C == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o || (o = "http://www.w3.org/1999/xhtml"), s != null) {
|
|
185
|
+
for (d = 0; d < s.length; d++) if ((g = s[d]) && "setAttribute" in g == !!C && (C ? g.localName == C : g.nodeType == 3)) {
|
|
186
|
+
n = g, s[d] = null;
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
if (n == null) {
|
|
191
|
+
if (C == null) return document.createTextNode(S);
|
|
192
|
+
n = document.createElementNS(o, C, S.is && S), l && (t.__m && t.__m(r, s), l = !1), s = null;
|
|
193
|
+
}
|
|
194
|
+
if (C == null) x === S || l && n.data == S || (n.data = S);
|
|
195
|
+
else {
|
|
196
|
+
if (s = C == "textarea" && S.defaultValue != null ? null : s && e.call(n.childNodes), !l && s != null) for (x = {}, d = 0; d < n.attributes.length; d++) x[(g = n.attributes[d]).name] = g.value;
|
|
197
|
+
for (d in x) g = x[d], d == "dangerouslySetInnerHTML" ? p = g : d == "children" || d in S || d == "value" && "defaultValue" in S || d == "checked" && "defaultChecked" in S || M(n, d, null, g, o);
|
|
198
|
+
for (d in S) g = S[d], d == "children" ? h = g : d == "dangerouslySetInnerHTML" ? f = g : d == "value" ? v = g : d == "checked" ? b = g : l && typeof g != "function" || x[d] === g || M(n, d, g, x[d], o);
|
|
199
|
+
if (f) l || p && (f.__html == p.__html || f.__html == n.innerHTML) || (n.innerHTML = f.__html), r.__k = [];
|
|
200
|
+
else if (p && (n.innerHTML = ""), te(r.type == "template" ? n.content : n, _(h) ? h : [h], r, i, a, C == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, s, c, s ? s[0] : i.__k && w(i, 0), l, u), s != null) for (d = s.length; d--;) y(s[d]);
|
|
201
|
+
l && C != "textarea" || (d = "value", C == "progress" && v == null ? n.removeAttribute("value") : v != null && (v !== n[d] || C == "progress" && !v || C == "option" && v != x[d]) && M(n, d, v, x[d], o), d = "checked", b != null && b != n[d] && M(n, d, b, x[d], o));
|
|
202
|
+
}
|
|
203
|
+
return n;
|
|
204
|
+
}
|
|
205
|
+
function se(e, n, r) {
|
|
206
|
+
try {
|
|
207
|
+
if (typeof e == "function") {
|
|
208
|
+
var i = typeof e.__u == "function";
|
|
209
|
+
i && e.__u(), i && n == null || (e.__u = e(n));
|
|
210
|
+
} else e.current = n;
|
|
211
|
+
} catch (e) {
|
|
212
|
+
t.__e(e, r);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function ce(e, n, r) {
|
|
216
|
+
var i, a;
|
|
217
|
+
if (t.unmount && t.unmount(e), (i = e.ref) && (i.current && i.current != e.__e || se(i, null, n)), (i = e.__c) != null) {
|
|
218
|
+
if (i.componentWillUnmount) try {
|
|
219
|
+
i.componentWillUnmount();
|
|
220
|
+
} catch (e) {
|
|
221
|
+
t.__e(e, n);
|
|
222
|
+
}
|
|
223
|
+
i.base = i.__P = i.__n = null;
|
|
224
|
+
}
|
|
225
|
+
if (i = e.__k) for (a = 0; a < i.length; a++) i[a] && ce(i[a], n, r || typeof e.type != "function");
|
|
226
|
+
r || y(e.__e), e.__c = e.__ = e.__e = void 0;
|
|
227
|
+
}
|
|
228
|
+
function le(e, t, n) {
|
|
229
|
+
return this.constructor(e, n);
|
|
230
|
+
}
|
|
231
|
+
function P(n, r, i) {
|
|
232
|
+
var a, o, s, c;
|
|
233
|
+
r == document && (r = document.documentElement), t.__ && t.__(n, r), o = (a = typeof i == "function") ? null : i && i.__k || r.__k, s = [], c = [], ne(r, n = (!a && i || r).__k = b(S, null, [n]), o || m, m, r.namespaceURI, !a && i ? [i] : o ? null : r.firstChild ? e.call(r.childNodes) : null, s, !a && i ? i : o ? o.__e : r.firstChild, a, c), ie(s, n, c), n.props.children = null;
|
|
234
|
+
}
|
|
235
|
+
e = h.slice, t = { __e: function(e, t, n, r) {
|
|
236
|
+
for (var i, a, o; t = t.__;) if ((i = t.__c) && !i.__) try {
|
|
237
|
+
if ((a = i.constructor) && a.getDerivedStateFromError != null && (i.setState(a.getDerivedStateFromError(e)), o = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, r || {}), o = i.__d), o) return i.__E = i;
|
|
238
|
+
} catch (t) {
|
|
239
|
+
e = t;
|
|
240
|
+
}
|
|
241
|
+
throw e;
|
|
242
|
+
} }, n = 0, C.prototype.setState = function(e, t) {
|
|
243
|
+
var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = v({}, this.state);
|
|
244
|
+
typeof e == "function" && (e = e(v({}, n), this.props)), e && v(n, e), e != null && this.__v && (t && this._sb.push(t), E(this));
|
|
245
|
+
}, C.prototype.forceUpdate = function(e) {
|
|
246
|
+
this.__v && (this.__e = !0, e && this.__h.push(e), E(this));
|
|
247
|
+
}, C.prototype.render = S, r = [], a = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, o = function(e, t) {
|
|
248
|
+
return e.__v.__b - t.__v.__b;
|
|
249
|
+
}, D.__r = 0, s = Math.random().toString(8), c = "__d" + s, l = "__a" + s, u = /(PointerCapture)$|Capture$/i, d = 0, f = N(!1), p = N(!0);
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region node_modules/preact/hooks/dist/hooks.module.js
|
|
252
|
+
var F, I, L, ue, R = 0, de = [], z = t, fe = z.__b, pe = z.__r, me = z.diffed, he = z.__c, ge = z.unmount, _e = z.__;
|
|
253
|
+
function B(e, t) {
|
|
254
|
+
z.__h && z.__h(I, e, R || t), R = 0;
|
|
255
|
+
var n = I.__H || (I.__H = {
|
|
256
|
+
__: [],
|
|
257
|
+
__h: []
|
|
258
|
+
});
|
|
259
|
+
return e >= n.__.length && n.__.push({}), n.__[e];
|
|
260
|
+
}
|
|
261
|
+
function V(e) {
|
|
262
|
+
return R = 1, ve(Oe, e);
|
|
263
|
+
}
|
|
264
|
+
function ve(e, t, n) {
|
|
265
|
+
var r = B(F++, 2);
|
|
266
|
+
if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Oe(void 0, t), function(e) {
|
|
267
|
+
var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
|
|
268
|
+
t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
|
|
269
|
+
}], r.__c = I, !I.__f)) {
|
|
270
|
+
var i = function(e, t, n) {
|
|
271
|
+
if (!r.__c.__H) return !0;
|
|
272
|
+
var i = !1, o = r.__c.props !== e;
|
|
273
|
+
if (r.__c.__H.__.some(function(e) {
|
|
274
|
+
if (e.__N) {
|
|
275
|
+
i = !0;
|
|
276
|
+
var t = e.__[0];
|
|
277
|
+
e.__ = e.__N, e.__N = void 0, t !== e.__[0] && (o = !0);
|
|
278
|
+
}
|
|
279
|
+
}), a) {
|
|
280
|
+
var s = a.call(this, e, t, n);
|
|
281
|
+
return i ? s || o : s;
|
|
282
|
+
}
|
|
283
|
+
return !i || o;
|
|
284
|
+
};
|
|
285
|
+
I.__f = !0;
|
|
286
|
+
var a = I.shouldComponentUpdate, o = I.componentWillUpdate;
|
|
287
|
+
I.componentWillUpdate = function(e, t, n) {
|
|
288
|
+
if (this.__e) {
|
|
289
|
+
var r = a;
|
|
290
|
+
a = void 0, i(e, t, n), a = r;
|
|
291
|
+
}
|
|
292
|
+
o && o.call(this, e, t, n);
|
|
293
|
+
}, I.shouldComponentUpdate = i;
|
|
294
|
+
}
|
|
295
|
+
return r.__N || r.__;
|
|
296
|
+
}
|
|
297
|
+
function ye(e, t) {
|
|
298
|
+
var n = B(F++, 3);
|
|
299
|
+
!z.__s && De(n.__H, t) && (n.__ = e, n.u = t, I.__H.__h.push(n));
|
|
300
|
+
}
|
|
301
|
+
function be(e, t) {
|
|
302
|
+
var n = B(F++, 4);
|
|
303
|
+
!z.__s && De(n.__H, t) && (n.__ = e, n.u = t, I.__h.push(n));
|
|
304
|
+
}
|
|
305
|
+
function xe(e) {
|
|
306
|
+
return R = 5, H(function() {
|
|
307
|
+
return { current: e };
|
|
308
|
+
}, []);
|
|
309
|
+
}
|
|
310
|
+
function H(e, t) {
|
|
311
|
+
var n = B(F++, 7);
|
|
312
|
+
return De(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
|
|
313
|
+
}
|
|
314
|
+
function Se(e, t) {
|
|
315
|
+
return R = 8, H(function() {
|
|
316
|
+
return e;
|
|
317
|
+
}, t);
|
|
318
|
+
}
|
|
319
|
+
function Ce() {
|
|
320
|
+
for (var e; e = de.shift();) {
|
|
321
|
+
var t = e.__H;
|
|
322
|
+
if (e.__P && t) try {
|
|
323
|
+
t.__h.some(U), t.__h.some(Ee), t.__h = [];
|
|
324
|
+
} catch (n) {
|
|
325
|
+
t.__h = [], z.__e(n, e.__v);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
z.__b = function(e) {
|
|
330
|
+
I = null, fe && fe(e);
|
|
331
|
+
}, z.__ = function(e, t) {
|
|
332
|
+
e && t.__k && t.__k.__m && (e.__m = t.__k.__m), _e && _e(e, t);
|
|
333
|
+
}, z.__r = function(e) {
|
|
334
|
+
pe && pe(e), F = 0;
|
|
335
|
+
var t = (I = e.__c).__H;
|
|
336
|
+
t && (L === I ? (t.__h = [], I.__h = [], t.__.some(function(e) {
|
|
337
|
+
e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
|
|
338
|
+
})) : (t.__h.some(U), t.__h.some(Ee), t.__h = [], F = 0)), L = I;
|
|
339
|
+
}, z.diffed = function(e) {
|
|
340
|
+
me && me(e);
|
|
341
|
+
var t = e.__c;
|
|
342
|
+
t && t.__H && (t.__H.__h.length && (de.push(t) !== 1 && ue === z.requestAnimationFrame || ((ue = z.requestAnimationFrame) || Te)(Ce)), t.__H.__.some(function(e) {
|
|
343
|
+
e.u && (e.__H = e.u, e.u = void 0);
|
|
344
|
+
})), L = I = null;
|
|
345
|
+
}, z.__c = function(e, t) {
|
|
346
|
+
t.some(function(e) {
|
|
347
|
+
try {
|
|
348
|
+
e.__h.some(U), e.__h = e.__h.filter(function(e) {
|
|
349
|
+
return !e.__ || Ee(e);
|
|
350
|
+
});
|
|
351
|
+
} catch (n) {
|
|
352
|
+
t.some(function(e) {
|
|
353
|
+
e.__h && (e.__h = []);
|
|
354
|
+
}), t = [], z.__e(n, e.__v);
|
|
355
|
+
}
|
|
356
|
+
}), he && he(e, t);
|
|
357
|
+
}, z.unmount = function(e) {
|
|
358
|
+
ge && ge(e);
|
|
359
|
+
var t, n = e.__c;
|
|
360
|
+
n && n.__H && (n.__H.__.some(function(e) {
|
|
361
|
+
try {
|
|
362
|
+
U(e);
|
|
363
|
+
} catch (e) {
|
|
364
|
+
t = e;
|
|
365
|
+
}
|
|
366
|
+
}), n.__H = void 0, t && z.__e(t, n.__v));
|
|
367
|
+
};
|
|
368
|
+
var we = typeof requestAnimationFrame == "function";
|
|
369
|
+
function Te(e) {
|
|
370
|
+
var t, n = function() {
|
|
371
|
+
clearTimeout(r), we && cancelAnimationFrame(t), setTimeout(e);
|
|
372
|
+
}, r = setTimeout(n, 35);
|
|
373
|
+
we && (t = requestAnimationFrame(n));
|
|
374
|
+
}
|
|
375
|
+
function U(e) {
|
|
376
|
+
var t = I, n = e.__c;
|
|
377
|
+
typeof n == "function" && (e.__c = void 0, n()), I = t;
|
|
378
|
+
}
|
|
379
|
+
function Ee(e) {
|
|
380
|
+
var t = I;
|
|
381
|
+
e.__c = e.__(), I = t;
|
|
382
|
+
}
|
|
383
|
+
function De(e, t) {
|
|
384
|
+
return !e || e.length !== t.length || t.some(function(t, n) {
|
|
385
|
+
return t !== e[n];
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
function Oe(e, t) {
|
|
389
|
+
return typeof t == "function" ? t(e) : t;
|
|
390
|
+
}
|
|
391
|
+
//#endregion
|
|
392
|
+
//#region src/lib/i18n.ts
|
|
393
|
+
var ke = "en", Ae = [
|
|
394
|
+
"en",
|
|
395
|
+
"fr",
|
|
396
|
+
"es"
|
|
397
|
+
], je = {
|
|
398
|
+
en: {
|
|
399
|
+
heading: "Assistant",
|
|
400
|
+
subheading: "Squadico",
|
|
401
|
+
placeholder: "Ask your question…",
|
|
402
|
+
greeting: "Hello! I am your assistant. What would you like to do?",
|
|
403
|
+
hint: "The assistant proposes an action; nothing is applied without your confirmation.",
|
|
404
|
+
assistant: "Assistant",
|
|
405
|
+
typing: "The assistant is writing its answer",
|
|
406
|
+
activity: {
|
|
407
|
+
knowledge: "Searching the knowledge base…",
|
|
408
|
+
skill: "Following a procedure…",
|
|
409
|
+
delegation: "Asking a colleague…",
|
|
410
|
+
tool: "Looking it up…"
|
|
411
|
+
},
|
|
412
|
+
newConversation: "New conversation",
|
|
413
|
+
close: "Close the assistant",
|
|
414
|
+
closeTitle: "Close",
|
|
415
|
+
history: {
|
|
416
|
+
open: "Conversation history",
|
|
417
|
+
menu: "Previous conversations",
|
|
418
|
+
loading: "Loading…",
|
|
419
|
+
empty: "No previous conversation.",
|
|
420
|
+
untitled: "Conversation"
|
|
421
|
+
},
|
|
422
|
+
context: { region: "Context sent to the assistant" },
|
|
423
|
+
approval: {
|
|
424
|
+
group: "Write confirmation",
|
|
425
|
+
approve: "Yes, apply",
|
|
426
|
+
reject: "No, cancel",
|
|
427
|
+
request: "The agent wants to use {tool}.",
|
|
428
|
+
arguments: "With",
|
|
429
|
+
edit: "Change…",
|
|
430
|
+
correction: "What to change — e.g. “the due date is next Monday”",
|
|
431
|
+
correctionLabel: "Correction to make before approving",
|
|
432
|
+
send: "Send"
|
|
433
|
+
},
|
|
434
|
+
confirm: {
|
|
435
|
+
group: "Confirmation",
|
|
436
|
+
yes: "Yes",
|
|
437
|
+
no: "No",
|
|
438
|
+
yesValue: "yes",
|
|
439
|
+
noValue: "no",
|
|
440
|
+
other: "Propose something else"
|
|
441
|
+
},
|
|
442
|
+
choices: "Suggested options",
|
|
443
|
+
table: {
|
|
444
|
+
copy: "Copy",
|
|
445
|
+
copied: "Copied",
|
|
446
|
+
more: "{count} more rows"
|
|
447
|
+
},
|
|
448
|
+
form: {
|
|
449
|
+
submit: "Send",
|
|
450
|
+
required: "Required",
|
|
451
|
+
email: "Enter a valid email address",
|
|
452
|
+
number: "Enter a number"
|
|
453
|
+
},
|
|
454
|
+
poweredBy: "Powered by Squadico",
|
|
455
|
+
handles: {
|
|
456
|
+
picker: "Agents you can address",
|
|
457
|
+
unknown: "Nobody answers to that name here:",
|
|
458
|
+
instead: "You can address:",
|
|
459
|
+
rail: "Agents"
|
|
460
|
+
},
|
|
461
|
+
selection: {
|
|
462
|
+
group: "Suggested choice",
|
|
463
|
+
single: "Pick one option.",
|
|
464
|
+
multiple: "Pick one or more options, then validate.",
|
|
465
|
+
validate: "Validate"
|
|
466
|
+
},
|
|
467
|
+
composer: {
|
|
468
|
+
label: "Your message",
|
|
469
|
+
send: "Send the message",
|
|
470
|
+
sendTitle: "Send",
|
|
471
|
+
stop: "Stop the answer",
|
|
472
|
+
stopTitle: "Stop",
|
|
473
|
+
attach: "Attach a file",
|
|
474
|
+
attachTitle: "Attach",
|
|
475
|
+
remove: "Remove {name}"
|
|
476
|
+
},
|
|
477
|
+
attachments: {
|
|
478
|
+
unsupported: "This kind of file cannot be attached to a message.",
|
|
479
|
+
tooLarge: "This file is too large.",
|
|
480
|
+
tooMany: "This message already carries as many files as it may.",
|
|
481
|
+
unreadable: "This file could not be read.",
|
|
482
|
+
failed: "This file could not be attached."
|
|
483
|
+
},
|
|
484
|
+
error: "Something went wrong, the assistant could not answer. Try again in a moment.",
|
|
485
|
+
withHuman: "A member of the team will reply to you here."
|
|
486
|
+
},
|
|
487
|
+
fr: {
|
|
488
|
+
heading: "Assistant",
|
|
489
|
+
subheading: "Squadico",
|
|
490
|
+
placeholder: "Posez votre question…",
|
|
491
|
+
greeting: "Bonjour ! Je suis votre assistant. Que souhaitez-vous faire ?",
|
|
492
|
+
hint: "L'assistant propose une action ; rien n'est appliqué sans votre confirmation.",
|
|
493
|
+
assistant: "Assistant",
|
|
494
|
+
typing: "L'assistant rédige sa réponse",
|
|
495
|
+
activity: {
|
|
496
|
+
knowledge: "Recherche dans la base de connaissances…",
|
|
497
|
+
skill: "Application d'une procédure…",
|
|
498
|
+
delegation: "Consultation d'un collègue…",
|
|
499
|
+
tool: "Recherche en cours…"
|
|
500
|
+
},
|
|
501
|
+
newConversation: "Nouvelle conversation",
|
|
502
|
+
close: "Fermer l'assistant",
|
|
503
|
+
closeTitle: "Fermer",
|
|
504
|
+
history: {
|
|
505
|
+
open: "Historique des conversations",
|
|
506
|
+
menu: "Conversations précédentes",
|
|
507
|
+
loading: "Chargement…",
|
|
508
|
+
empty: "Aucune conversation précédente.",
|
|
509
|
+
untitled: "Conversation"
|
|
510
|
+
},
|
|
511
|
+
context: { region: "Contexte transmis à l'assistant" },
|
|
512
|
+
approval: {
|
|
513
|
+
group: "Validation de l'écriture",
|
|
514
|
+
approve: "Oui, appliquer",
|
|
515
|
+
reject: "Non, annuler",
|
|
516
|
+
request: "L'agent souhaite utiliser {tool}.",
|
|
517
|
+
arguments: "Avec",
|
|
518
|
+
edit: "Modifier…",
|
|
519
|
+
correction: "Ce qu'il faut changer — ex. « l'échéance est lundi prochain »",
|
|
520
|
+
correctionLabel: "Correction à apporter avant validation",
|
|
521
|
+
send: "Envoyer"
|
|
522
|
+
},
|
|
523
|
+
confirm: {
|
|
524
|
+
group: "Confirmation",
|
|
525
|
+
yes: "Oui",
|
|
526
|
+
no: "Non",
|
|
527
|
+
yesValue: "oui",
|
|
528
|
+
noValue: "non",
|
|
529
|
+
other: "Proposer autre chose"
|
|
530
|
+
},
|
|
531
|
+
choices: "Options proposées",
|
|
532
|
+
table: {
|
|
533
|
+
copy: "Copier",
|
|
534
|
+
copied: "Copié",
|
|
535
|
+
more: "{count} lignes de plus"
|
|
536
|
+
},
|
|
537
|
+
form: {
|
|
538
|
+
submit: "Envoyer",
|
|
539
|
+
required: "Obligatoire",
|
|
540
|
+
email: "Saisissez une adresse e-mail valide",
|
|
541
|
+
number: "Saisissez un nombre"
|
|
542
|
+
},
|
|
543
|
+
poweredBy: "Propulsé par Squadico",
|
|
544
|
+
handles: {
|
|
545
|
+
picker: "Agents que vous pouvez adresser",
|
|
546
|
+
unknown: "Personne ne répond à ce nom ici :",
|
|
547
|
+
instead: "Vous pouvez adresser :",
|
|
548
|
+
rail: "Agents"
|
|
549
|
+
},
|
|
550
|
+
selection: {
|
|
551
|
+
group: "Choix proposé",
|
|
552
|
+
single: "Sélectionnez une option.",
|
|
553
|
+
multiple: "Sélectionnez une ou plusieurs options, puis validez.",
|
|
554
|
+
validate: "Valider"
|
|
555
|
+
},
|
|
556
|
+
composer: {
|
|
557
|
+
label: "Votre message",
|
|
558
|
+
send: "Envoyer le message",
|
|
559
|
+
sendTitle: "Envoyer",
|
|
560
|
+
stop: "Interrompre la réponse",
|
|
561
|
+
stopTitle: "Interrompre",
|
|
562
|
+
attach: "Joindre un fichier",
|
|
563
|
+
attachTitle: "Joindre",
|
|
564
|
+
remove: "Retirer {name}"
|
|
565
|
+
},
|
|
566
|
+
attachments: {
|
|
567
|
+
unsupported: "Ce format de fichier ne peut pas être joint à un message.",
|
|
568
|
+
tooLarge: "Ce fichier est trop volumineux.",
|
|
569
|
+
tooMany: "Ce message porte déjà autant de fichiers qu'il le peut.",
|
|
570
|
+
unreadable: "Ce fichier n'a pas pu être lu.",
|
|
571
|
+
failed: "Impossible de joindre ce fichier."
|
|
572
|
+
},
|
|
573
|
+
error: "Une erreur est survenue, l'assistant n'a pas pu répondre. Réessayez dans un instant.",
|
|
574
|
+
withHuman: "Un membre de l'équipe va vous répondre ici."
|
|
575
|
+
},
|
|
576
|
+
es: {
|
|
577
|
+
heading: "Asistente",
|
|
578
|
+
subheading: "Squadico",
|
|
579
|
+
placeholder: "Haga su pregunta…",
|
|
580
|
+
greeting: "¡Hola! Soy su asistente. ¿Qué desea hacer?",
|
|
581
|
+
hint: "El asistente propone una acción; no se aplica nada sin su confirmación.",
|
|
582
|
+
assistant: "Asistente",
|
|
583
|
+
typing: "El asistente está redactando su respuesta",
|
|
584
|
+
activity: {
|
|
585
|
+
knowledge: "Buscando en la base de conocimientos…",
|
|
586
|
+
skill: "Siguiendo un procedimiento…",
|
|
587
|
+
delegation: "Consultando a un compañero…",
|
|
588
|
+
tool: "Consultando…"
|
|
589
|
+
},
|
|
590
|
+
newConversation: "Nueva conversación",
|
|
591
|
+
close: "Cerrar el asistente",
|
|
592
|
+
closeTitle: "Cerrar",
|
|
593
|
+
history: {
|
|
594
|
+
open: "Historial de conversaciones",
|
|
595
|
+
menu: "Conversaciones anteriores",
|
|
596
|
+
loading: "Cargando…",
|
|
597
|
+
empty: "Ninguna conversación anterior.",
|
|
598
|
+
untitled: "Conversación"
|
|
599
|
+
},
|
|
600
|
+
context: { region: "Contexto enviado al asistente" },
|
|
601
|
+
approval: {
|
|
602
|
+
group: "Validación de la escritura",
|
|
603
|
+
approve: "Sí, aplicar",
|
|
604
|
+
reject: "No, cancelar",
|
|
605
|
+
request: "El agente quiere usar {tool}.",
|
|
606
|
+
arguments: "Con",
|
|
607
|
+
edit: "Modificar…",
|
|
608
|
+
correction: "Lo que hay que cambiar — p. ej. «el vencimiento es el lunes»",
|
|
609
|
+
correctionLabel: "Corrección antes de validar",
|
|
610
|
+
send: "Enviar"
|
|
611
|
+
},
|
|
612
|
+
confirm: {
|
|
613
|
+
group: "Confirmación",
|
|
614
|
+
yes: "Sí",
|
|
615
|
+
no: "No",
|
|
616
|
+
yesValue: "sí",
|
|
617
|
+
noValue: "no",
|
|
618
|
+
other: "Proponer otra cosa"
|
|
619
|
+
},
|
|
620
|
+
choices: "Opciones propuestas",
|
|
621
|
+
table: {
|
|
622
|
+
copy: "Copiar",
|
|
623
|
+
copied: "Copiado",
|
|
624
|
+
more: "{count} filas más"
|
|
625
|
+
},
|
|
626
|
+
form: {
|
|
627
|
+
submit: "Enviar",
|
|
628
|
+
required: "Obligatorio",
|
|
629
|
+
email: "Introduzca un correo electrónico válido",
|
|
630
|
+
number: "Introduzca un número"
|
|
631
|
+
},
|
|
632
|
+
poweredBy: "Con la tecnología de Squadico",
|
|
633
|
+
handles: {
|
|
634
|
+
picker: "Agentes a los que puedes dirigirte",
|
|
635
|
+
unknown: "Nadie responde a ese nombre aquí:",
|
|
636
|
+
instead: "Puedes dirigirte a:",
|
|
637
|
+
rail: "Agentes"
|
|
638
|
+
},
|
|
639
|
+
selection: {
|
|
640
|
+
group: "Opción propuesta",
|
|
641
|
+
single: "Seleccione una opción.",
|
|
642
|
+
multiple: "Seleccione una o varias opciones y valide.",
|
|
643
|
+
validate: "Validar"
|
|
644
|
+
},
|
|
645
|
+
composer: {
|
|
646
|
+
label: "Su mensaje",
|
|
647
|
+
send: "Enviar el mensaje",
|
|
648
|
+
sendTitle: "Enviar",
|
|
649
|
+
stop: "Interrumpir la respuesta",
|
|
650
|
+
stopTitle: "Interrumpir",
|
|
651
|
+
attach: "Adjuntar un archivo",
|
|
652
|
+
attachTitle: "Adjuntar",
|
|
653
|
+
remove: "Quitar {name}"
|
|
654
|
+
},
|
|
655
|
+
attachments: {
|
|
656
|
+
unsupported: "Este tipo de archivo no se puede adjuntar a un mensaje.",
|
|
657
|
+
tooLarge: "Este archivo es demasiado grande.",
|
|
658
|
+
tooMany: "Este mensaje ya lleva todos los archivos que puede llevar.",
|
|
659
|
+
unreadable: "No se ha podido leer este archivo.",
|
|
660
|
+
failed: "No se ha podido adjuntar este archivo."
|
|
661
|
+
},
|
|
662
|
+
error: "Se ha producido un error, el asistente no ha podido responder. Inténtelo de nuevo.",
|
|
663
|
+
withHuman: "Un miembro del equipo le responderá aquí."
|
|
664
|
+
}
|
|
665
|
+
}, Me = {
|
|
666
|
+
en: "en-GB",
|
|
667
|
+
fr: "fr-FR",
|
|
668
|
+
es: "es-ES"
|
|
669
|
+
};
|
|
670
|
+
function Ne(e) {
|
|
671
|
+
let t = e?.trim().toLowerCase().split(/[-_]/)[0];
|
|
672
|
+
return t && t in je ? t : void 0;
|
|
673
|
+
}
|
|
674
|
+
function Pe() {
|
|
675
|
+
return typeof navigator > "u" ? [] : navigator.languages?.length ? navigator.languages : [navigator.language];
|
|
676
|
+
}
|
|
677
|
+
function Fe(e) {
|
|
678
|
+
let t = e?.trim(), n = (t ? [t] : Pe()).find(Ne), r = Ne(n) ?? "en";
|
|
679
|
+
return {
|
|
680
|
+
code: r,
|
|
681
|
+
tag: n?.includes("-") ? n : Me[r],
|
|
682
|
+
t: je[r]
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
//#endregion
|
|
686
|
+
//#region node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
|
|
687
|
+
var Ie = 0;
|
|
688
|
+
Array.isArray;
|
|
689
|
+
function W(e, n, r, i, a, o) {
|
|
690
|
+
n || (n = {});
|
|
691
|
+
var s, c, l = n;
|
|
692
|
+
if ("ref" in l) for (c in l = {}, n) c == "ref" ? s = n[c] : l[c] = n[c];
|
|
693
|
+
var u = {
|
|
694
|
+
type: e,
|
|
695
|
+
props: l,
|
|
696
|
+
key: r,
|
|
697
|
+
ref: s,
|
|
698
|
+
__k: null,
|
|
699
|
+
__: null,
|
|
700
|
+
__b: 0,
|
|
701
|
+
__e: null,
|
|
702
|
+
__c: null,
|
|
703
|
+
constructor: void 0,
|
|
704
|
+
__v: --Ie,
|
|
705
|
+
__i: -1,
|
|
706
|
+
__u: 0,
|
|
707
|
+
__source: a,
|
|
708
|
+
__self: o
|
|
709
|
+
};
|
|
710
|
+
if (typeof e == "function" && (s = e.defaultProps)) for (c in s) l[c] === void 0 && (l[c] = s[c]);
|
|
711
|
+
return t.vnode && t.vnode(u), u;
|
|
712
|
+
}
|
|
713
|
+
//#endregion
|
|
714
|
+
//#region \0@oxc-project+runtime@0.147.0/helpers/esm/checkPrivateRedeclaration.js
|
|
715
|
+
function Le(e, t) {
|
|
716
|
+
if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
|
|
717
|
+
}
|
|
718
|
+
//#endregion
|
|
719
|
+
//#region \0@oxc-project+runtime@0.147.0/helpers/esm/classPrivateMethodInitSpec.js
|
|
720
|
+
function Re(e, t) {
|
|
721
|
+
Le(e, t), t.add(e);
|
|
722
|
+
}
|
|
723
|
+
//#endregion
|
|
724
|
+
//#region \0@oxc-project+runtime@0.147.0/helpers/esm/classPrivateFieldInitSpec.js
|
|
725
|
+
function G(e, t, n) {
|
|
726
|
+
Le(e, t), t.set(e, n);
|
|
727
|
+
}
|
|
728
|
+
//#endregion
|
|
729
|
+
//#region \0@oxc-project+runtime@0.147.0/helpers/esm/assertClassBrand.js
|
|
730
|
+
function K(e, t, n) {
|
|
731
|
+
if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
732
|
+
throw TypeError("Private element is not present on this object");
|
|
733
|
+
}
|
|
734
|
+
//#endregion
|
|
735
|
+
//#region \0@oxc-project+runtime@0.147.0/helpers/esm/classPrivateFieldGet2.js
|
|
736
|
+
function q(e, t) {
|
|
737
|
+
return e.get(K(e, t));
|
|
738
|
+
}
|
|
739
|
+
//#endregion
|
|
740
|
+
//#region \0@oxc-project+runtime@0.147.0/helpers/esm/classPrivateFieldSet2.js
|
|
741
|
+
function J(e, t, n) {
|
|
742
|
+
return e.set(K(e, t), n), n;
|
|
743
|
+
}
|
|
744
|
+
//#endregion
|
|
745
|
+
//#region src/widgets/element.ts
|
|
746
|
+
var ze = /* @__PURE__ */ new Map();
|
|
747
|
+
function Be(e) {
|
|
748
|
+
if (ze.has(e)) return ze.get(e) ?? null;
|
|
749
|
+
let t;
|
|
750
|
+
try {
|
|
751
|
+
t = new CSSStyleSheet(), t.replaceSync(e);
|
|
752
|
+
} catch {
|
|
753
|
+
t = null;
|
|
754
|
+
}
|
|
755
|
+
return ze.set(e, t), t;
|
|
756
|
+
}
|
|
757
|
+
function Y(e, t, n) {
|
|
758
|
+
let r = [
|
|
759
|
+
...t,
|
|
760
|
+
"locked",
|
|
761
|
+
"language"
|
|
762
|
+
];
|
|
763
|
+
var i = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakSet();
|
|
764
|
+
class l extends HTMLElement {
|
|
765
|
+
constructor() {
|
|
766
|
+
super(), Re(this, c), G(this, i, {
|
|
767
|
+
locked: !1,
|
|
768
|
+
language: "en"
|
|
769
|
+
}), G(this, a, void 0), G(this, o, !1), G(this, s, (e) => {
|
|
770
|
+
q(i, this).locked || (this.set("locked", !0), this.dispatchEvent(new CustomEvent("sqc-reply", {
|
|
771
|
+
detail: { text: e },
|
|
772
|
+
bubbles: !0,
|
|
773
|
+
composed: !0
|
|
774
|
+
})));
|
|
775
|
+
});
|
|
776
|
+
let e = this.attachShadow({ mode: "open" }), t = Be(n);
|
|
777
|
+
if (t) e.adoptedStyleSheets = [t];
|
|
778
|
+
else {
|
|
779
|
+
let t = document.createElement("style");
|
|
780
|
+
t.textContent = n, e.append(t);
|
|
781
|
+
}
|
|
782
|
+
J(a, this, document.createElement("div")), e.append(q(a, this));
|
|
783
|
+
for (let e of r) {
|
|
784
|
+
if (!Object.hasOwn(this, e)) continue;
|
|
785
|
+
let t = this[e];
|
|
786
|
+
delete this[e], this[e] = t;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
connectedCallback() {
|
|
790
|
+
J(o, this, !0), K(c, this, u).call(this);
|
|
791
|
+
}
|
|
792
|
+
disconnectedCallback() {
|
|
793
|
+
J(o, this, !1), P(null, q(a, this));
|
|
794
|
+
}
|
|
795
|
+
set(e, t) {
|
|
796
|
+
q(i, this)[e] = t, K(c, this, u).call(this);
|
|
797
|
+
}
|
|
798
|
+
get(e) {
|
|
799
|
+
return q(i, this)[e];
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
function u() {
|
|
803
|
+
q(o, this) && P(b(e, {
|
|
804
|
+
...q(i, this),
|
|
805
|
+
reply: q(s, this)
|
|
806
|
+
}), q(a, this));
|
|
807
|
+
}
|
|
808
|
+
for (let e of r) Object.defineProperty(l.prototype, e, {
|
|
809
|
+
get() {
|
|
810
|
+
return this.get(e);
|
|
811
|
+
},
|
|
812
|
+
set(t) {
|
|
813
|
+
this.set(e, t);
|
|
814
|
+
},
|
|
815
|
+
configurable: !0
|
|
816
|
+
});
|
|
817
|
+
return l;
|
|
818
|
+
}
|
|
819
|
+
//#endregion
|
|
820
|
+
//#region src/widgets/names.ts
|
|
821
|
+
var X = {
|
|
822
|
+
table: "sqc-table",
|
|
823
|
+
choices: "sqc-choices",
|
|
824
|
+
confirm: "sqc-confirm",
|
|
825
|
+
form: "sqc-form",
|
|
826
|
+
chart: "sqc-chart",
|
|
827
|
+
approval: "sqc-approval"
|
|
828
|
+
};
|
|
829
|
+
//#endregion
|
|
830
|
+
//#region src/widgets/i18n.ts
|
|
831
|
+
function Z(e) {
|
|
832
|
+
return Fe(e).t;
|
|
833
|
+
}
|
|
834
|
+
//#endregion
|
|
835
|
+
//#region src/widgets/inline.tsx
|
|
836
|
+
var Ve = /(\*\*[^*\n]+\*\*|`[^`\n]+`|~~[^~\n]+~~|\[[^\]\n]+\]\([^)\s]+\)|\*[^*\n]+\*|https?:\/\/[^\s<>()]+)/g, He = /^\[([^\]\n]+)\]\(([^)\s]+)\)$/, Ue = /^(https?:|mailto:)/i;
|
|
837
|
+
function We(e, t, n) {
|
|
838
|
+
return Ue.test(e) ? /* @__PURE__ */ W("a", {
|
|
839
|
+
href: e,
|
|
840
|
+
target: "_blank",
|
|
841
|
+
rel: "noopener noreferrer",
|
|
842
|
+
children: t
|
|
843
|
+
}, n) : t;
|
|
844
|
+
}
|
|
845
|
+
function Q(e, t) {
|
|
846
|
+
let n = e.split(Ve), r = [];
|
|
847
|
+
return n.forEach((e, n) => {
|
|
848
|
+
if (!e) return;
|
|
849
|
+
let i = `${t}-${n}`, a = He.exec(e);
|
|
850
|
+
e.startsWith("**") && e.endsWith("**") && e.length > 4 ? r.push(/* @__PURE__ */ W("strong", { children: e.slice(2, -2) }, i)) : e.startsWith("`") && e.endsWith("`") && e.length > 2 ? r.push(/* @__PURE__ */ W("code", { children: e.slice(1, -1) }, i)) : e.startsWith("~~") && e.endsWith("~~") && e.length > 4 ? r.push(/* @__PURE__ */ W("del", { children: e.slice(2, -2) }, i)) : a ? r.push(We(a[2], a[1], i)) : e.startsWith("*") && e.endsWith("*") && e.length > 2 ? r.push(/* @__PURE__ */ W("em", { children: e.slice(1, -1) }, i)) : /^https?:\/\//.test(e) ? r.push(We(e, e, i)) : r.push(e);
|
|
851
|
+
}), r;
|
|
852
|
+
}
|
|
853
|
+
function Ge(e) {
|
|
854
|
+
return e.replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1").replace(/\*\*|~~|`|\*/g, "").trim();
|
|
855
|
+
}
|
|
856
|
+
//#endregion
|
|
857
|
+
//#region src/widgets/choices/SqcChoices.tsx
|
|
858
|
+
function Ke() {
|
|
859
|
+
return /* @__PURE__ */ W("svg", {
|
|
860
|
+
viewBox: "0 0 16 16",
|
|
861
|
+
fill: "none",
|
|
862
|
+
stroke: "currentColor",
|
|
863
|
+
"stroke-width": "2.2",
|
|
864
|
+
"aria-hidden": "true",
|
|
865
|
+
children: /* @__PURE__ */ W("path", {
|
|
866
|
+
d: "M3.5 8.5l3 3 6-7",
|
|
867
|
+
"stroke-linecap": "round",
|
|
868
|
+
"stroke-linejoin": "round"
|
|
869
|
+
})
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
function qe({ options: e = [], multiple: t, checked: n, locked: r, language: i, reply: a }) {
|
|
873
|
+
let o = Z(i), s = e.map(Ge), [c, l] = V(null), u = e.flatMap((e, t) => n?.includes(e) ? [t] : []), d = c ?? (t ? u : u.slice(0, 1)), f = (e) => {
|
|
874
|
+
if (!r) {
|
|
875
|
+
if (!t) {
|
|
876
|
+
l([e]), a(s[e]);
|
|
877
|
+
return;
|
|
878
|
+
}
|
|
879
|
+
l(d.includes(e) ? d.filter((t) => t !== e) : [...d, e]);
|
|
880
|
+
}
|
|
881
|
+
};
|
|
882
|
+
return /* @__PURE__ */ W("div", {
|
|
883
|
+
class: "choices",
|
|
884
|
+
role: "group",
|
|
885
|
+
"aria-label": o.choices,
|
|
886
|
+
children: [e.map((e, t) => /* @__PURE__ */ W("button", {
|
|
887
|
+
type: "button",
|
|
888
|
+
class: "choice",
|
|
889
|
+
"aria-pressed": d.includes(t),
|
|
890
|
+
disabled: r,
|
|
891
|
+
onClick: () => f(t),
|
|
892
|
+
children: [/* @__PURE__ */ W("span", {
|
|
893
|
+
class: `box${d.includes(t) ? " on" : ""}`,
|
|
894
|
+
"aria-hidden": "true",
|
|
895
|
+
children: d.includes(t) && /* @__PURE__ */ W(Ke, {})
|
|
896
|
+
}), /* @__PURE__ */ W("span", {
|
|
897
|
+
class: "label",
|
|
898
|
+
children: Q(e, `o${t}`)
|
|
899
|
+
})]
|
|
900
|
+
}, `${t}-${s[t]}`)), t && /* @__PURE__ */ W("button", {
|
|
901
|
+
type: "button",
|
|
902
|
+
class: "send",
|
|
903
|
+
disabled: r || d.length === 0,
|
|
904
|
+
onClick: () => {
|
|
905
|
+
l(d), a([...d].sort((e, t) => e - t).map((e) => s[e]).join(", "));
|
|
906
|
+
},
|
|
907
|
+
children: o.selection.validate
|
|
908
|
+
})]
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
//#endregion
|
|
912
|
+
//#region src/widgets/confirm/SqcConfirm.tsx
|
|
913
|
+
function Je({ locked: e, language: t, reply: n }) {
|
|
914
|
+
let [r, i] = V(null), { confirm: a } = Z(t), o = [{
|
|
915
|
+
value: a.yesValue,
|
|
916
|
+
label: a.yes,
|
|
917
|
+
kind: "yes"
|
|
918
|
+
}, {
|
|
919
|
+
value: a.noValue,
|
|
920
|
+
label: a.no,
|
|
921
|
+
kind: "no"
|
|
922
|
+
}];
|
|
923
|
+
return /* @__PURE__ */ W("div", {
|
|
924
|
+
class: "confirm",
|
|
925
|
+
role: "group",
|
|
926
|
+
"aria-label": a.group,
|
|
927
|
+
children: [o.map((t) => /* @__PURE__ */ W("button", {
|
|
928
|
+
type: "button",
|
|
929
|
+
class: t.kind,
|
|
930
|
+
"aria-pressed": r === t.value,
|
|
931
|
+
disabled: e,
|
|
932
|
+
onClick: () => {
|
|
933
|
+
i(t.value), n(t.value);
|
|
934
|
+
},
|
|
935
|
+
children: t.label
|
|
936
|
+
}, t.kind)), /* @__PURE__ */ W("button", {
|
|
937
|
+
type: "button",
|
|
938
|
+
class: "other",
|
|
939
|
+
disabled: e,
|
|
940
|
+
onClick: (e) => e.currentTarget.dispatchEvent(new CustomEvent("sqc-compose", {
|
|
941
|
+
bubbles: !0,
|
|
942
|
+
composed: !0
|
|
943
|
+
})),
|
|
944
|
+
children: a.other
|
|
945
|
+
})]
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
//#endregion
|
|
949
|
+
//#region src/widgets/table/SqcTable.tsx
|
|
950
|
+
var Ye = 200, Xe = new Intl.Collator(void 0, {
|
|
951
|
+
numeric: !0,
|
|
952
|
+
sensitivity: "base"
|
|
953
|
+
}), Ze = (e) => Ge(e ?? "").replace(/[\t\r\n]+/g, " ");
|
|
954
|
+
function Qe({ table: e, language: t }) {
|
|
955
|
+
let n = Z(t), { header: r = [], rows: i = [] } = e ?? {}, [a, o] = V(null), [s, c] = V(!1), l = H(() => {
|
|
956
|
+
if (!a) return i;
|
|
957
|
+
let e = a.descending ? -1 : 1;
|
|
958
|
+
return [...i].sort((t, n) => e * Xe.compare(Ze(t[a.column]), Ze(n[a.column])));
|
|
959
|
+
}, [i, a]), u = () => {
|
|
960
|
+
let e = [r, ...l].map((e) => r.map((t, n) => Ze(e[n])).join(" "));
|
|
961
|
+
navigator.clipboard?.writeText(e.join("\n")).then(() => {
|
|
962
|
+
c(!0), setTimeout(() => c(!1), 2e3);
|
|
963
|
+
}, () => void 0);
|
|
964
|
+
}, d = l.length - Ye;
|
|
965
|
+
return /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ W("div", {
|
|
966
|
+
class: "table",
|
|
967
|
+
children: /* @__PURE__ */ W("table", { children: [/* @__PURE__ */ W("thead", { children: /* @__PURE__ */ W("tr", { children: r.map((e, t) => /* @__PURE__ */ W("th", {
|
|
968
|
+
"aria-sort": a?.column === t ? a.descending ? "descending" : "ascending" : "none",
|
|
969
|
+
children: /* @__PURE__ */ W("button", {
|
|
970
|
+
type: "button",
|
|
971
|
+
onClick: () => o({
|
|
972
|
+
column: t,
|
|
973
|
+
descending: a?.column === t && !a.descending
|
|
974
|
+
}),
|
|
975
|
+
children: Q(e, `h${t}`)
|
|
976
|
+
})
|
|
977
|
+
}, t)) }) }), /* @__PURE__ */ W("tbody", { children: l.slice(0, Ye).map((e, t) => /* @__PURE__ */ W("tr", { children: r.map((n, r) => /* @__PURE__ */ W("td", { children: Q(e[r] ?? "", `r${t}c${r}`) }, r)) }, t)) })] })
|
|
978
|
+
}), /* @__PURE__ */ W("div", {
|
|
979
|
+
class: "foot",
|
|
980
|
+
children: [d > 0 && /* @__PURE__ */ W("span", { children: n.table.more.replace("{count}", String(d)) }), /* @__PURE__ */ W("button", {
|
|
981
|
+
type: "button",
|
|
982
|
+
class: "copy",
|
|
983
|
+
onClick: u,
|
|
984
|
+
children: s ? n.table.copied : n.table.copy
|
|
985
|
+
})]
|
|
986
|
+
})] });
|
|
987
|
+
}
|
|
988
|
+
//#endregion
|
|
989
|
+
//#region src/widgets/choices/choices.css?inline
|
|
990
|
+
var $e = ".choices{flex-direction:column;gap:7px;margin:10px 0 2px;display:flex}.choice{text-align:left;width:100%;color:var(--w-text);background:var(--w-bg);border:1px solid var(--w-border);cursor:pointer;border-radius:12px;align-items:center;gap:8px;padding:8px 11px;font-size:12.5px;display:flex}.choice:hover:not(:disabled){border-color:var(--w-border-strong);background:var(--w-surface)}.choice:disabled{cursor:default}.choice:disabled[aria-pressed=false]{opacity:.55}.choice[aria-pressed=true]{border-color:var(--w-border-strong);background:var(--w-selected)}.box{border:1.5px solid var(--w-border-strong);border-radius:4px;flex:none;justify-content:center;align-items:center;width:15px;height:15px;display:inline-flex}.choices:not(:has(.send)) .box{border-radius:50%}.box.on{color:var(--w-on-accent);background:var(--w-accent);border-color:var(--w-accent)}.box svg{width:11px;height:11px}.label{overflow-wrap:anywhere}.send{background:var(--w-accent);height:32px;color:var(--w-on-accent);cursor:pointer;border:0;border-radius:12px;align-self:flex-end;padding:0 14px;font-size:13px;font-weight:600}.send:disabled{opacity:.4;cursor:default}", et = ".confirm{flex-wrap:wrap;gap:8px;margin:11px 0 2px;display:flex}.confirm button{border:1px solid var(--w-border);background:var(--w-bg);height:32px;color:var(--w-text);cursor:pointer;border-radius:12px;flex:1 1 0;padding:0 12px;font-size:13px;font-weight:500}.confirm .other{flex-basis:100%}.confirm .yes:not(:disabled){background:var(--w-accent);color:var(--w-on-accent);border-color:#0000;font-weight:600}.confirm button:hover:not(:disabled){border-color:var(--w-border-strong);background:var(--w-surface)}.confirm .yes:hover:not(:disabled){background:var(--w-accent-hover);border-color:#0000}.confirm button:disabled{cursor:default}.confirm button:disabled:not([aria-pressed=true]){opacity:.45}.confirm button[aria-pressed=true]{border-color:var(--w-border-strong);background:var(--w-selected);color:var(--w-text);font-weight:600}", tt = ".table{scrollbar-width:thin;margin:0 0 8px;overflow-x:auto}table{border-collapse:collapse;white-space:nowrap;min-width:100%;font-size:12.5px}th,td{text-align:left;vertical-align:top;border-bottom:1px solid color-mix(in srgb, currentColor 18%, transparent);padding:6px 10px 6px 0}thead th{text-transform:uppercase;letter-spacing:.05em;font-size:10.5px;font-weight:600}thead button{font:inherit;text-transform:inherit;letter-spacing:inherit;opacity:.7;cursor:pointer;background:0 0;border:0;padding:0}thead button:hover{opacity:1}tbody tr:last-child td{border-bottom:0}.foot{opacity:.8;align-items:center;gap:10px;font-size:11.5px;display:flex}.copy{border:1px solid var(--w-border);cursor:pointer;background:0 0;border-radius:8px;padding:2px 8px;font-size:11.5px}", nt = ":host{--w-bg:var(--sqc-bg,#fff);--w-surface:var(--sqc-surface,#f8fafc);--w-selected:var(--sqc-selected,#f1f5f9);--w-border:var(--sqc-border,#e2e8f0);--w-border-strong:var(--sqc-border-strong,#cbd5e1);--w-text:var(--sqc-text,#0f172a);--w-muted:var(--sqc-text-muted,#64748b);--w-accent:var(--sqc-accent-color,var(--sqc-accent,#000));--w-on-accent:var(--sqc-on-accent,#fff);--w-accent-hover:var(--sqc-accent-hover,color-mix(in oklab, var(--w-accent) 84%, var(--w-on-accent)));--w-focus:var(--sqc-focus,0 0 0 2px #fff, 0 0 0 4px #0f172a4d);--w-font:var(--sqc-font-family,system-ui, sans-serif);font-family:var(--w-font);display:block}:host([hidden]){display:none}button{color:inherit;font-family:inherit}button:focus-visible{box-shadow:var(--w-focus);outline:none}", rt = [
|
|
991
|
+
nt,
|
|
992
|
+
tt,
|
|
993
|
+
$e,
|
|
994
|
+
et
|
|
995
|
+
].join("\n");
|
|
996
|
+
//#endregion
|
|
997
|
+
//#region src/widgets/define.ts
|
|
998
|
+
function it() {
|
|
999
|
+
if (typeof customElements > "u") return;
|
|
1000
|
+
let e = [
|
|
1001
|
+
[X.table, () => Y(Qe, ["table"], rt)],
|
|
1002
|
+
[X.choices, () => Y(qe, [
|
|
1003
|
+
"options",
|
|
1004
|
+
"multiple",
|
|
1005
|
+
"checked"
|
|
1006
|
+
], rt)],
|
|
1007
|
+
[X.confirm, () => Y(Je, [], rt)]
|
|
1008
|
+
];
|
|
1009
|
+
for (let [t, n] of e) customElements.get(t) || customElements.define(t, n());
|
|
1010
|
+
}
|
|
1011
|
+
//#endregion
|
|
1012
|
+
//#region src/widgets/approval/name.ts
|
|
1013
|
+
var at = /^(?:mcp|custom|a2a)_[0-9a-f]{8}_/;
|
|
1014
|
+
function ot(e) {
|
|
1015
|
+
let t = e.replace(at, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
|
|
1016
|
+
return t ? t.charAt(0).toUpperCase() + t.slice(1) : e;
|
|
1017
|
+
}
|
|
1018
|
+
//#endregion
|
|
1019
|
+
//#region src/widgets/extras-loader.ts
|
|
1020
|
+
function st(e) {
|
|
1021
|
+
let t;
|
|
1022
|
+
return () => t ?? (t = e().catch((e) => {
|
|
1023
|
+
t = void 0, console.warn(e instanceof Error ? e.message : e);
|
|
1024
|
+
}));
|
|
1025
|
+
}
|
|
1026
|
+
var ct = st(() => import("./extras-ClIRRLqo.js").then((e) => e.n).then(({ defineWidgetExtras: e }) => e()));
|
|
1027
|
+
//#endregion
|
|
1028
|
+
//#region src/widgets/live.ts
|
|
1029
|
+
function lt(e, t) {
|
|
1030
|
+
let n = t[e];
|
|
1031
|
+
return e === t.length - 1 && n?.role === "assistant" && !n.streaming;
|
|
1032
|
+
}
|
|
1033
|
+
//#endregion
|
|
1034
|
+
//#region src/widgets/parse/confirm.ts
|
|
1035
|
+
var $ = {
|
|
1036
|
+
fr: /\br[ée]ponde?z? +«?\s*oui\b/i,
|
|
1037
|
+
en: /\b(?:reply|answer|respond) +[“"']?\s*yes\b/i,
|
|
1038
|
+
es: /\bresponda?e?d? +«?\s*s[íi](?!\p{L})/iu
|
|
1039
|
+
}, ut = {
|
|
1040
|
+
fr: [
|
|
1041
|
+
/\b(?:confirmes?[- ]tu|confirmez[- ]vous)\b/i,
|
|
1042
|
+
/\b(?:valides?[- ]tu|validez[- ]vous)\b/i,
|
|
1043
|
+
/(?<!\p{L})(?:es[- ]tu s[ûu]re?|[êe]tes[- ]vous s[ûu]re?s?)(?!\p{L})/iu,
|
|
1044
|
+
/\b(?:dois[- ]je|puis[- ]je)\b/i,
|
|
1045
|
+
/\b(?:je continue|on continue|on y va|je lance)\b/i,
|
|
1046
|
+
$.fr
|
|
1047
|
+
],
|
|
1048
|
+
en: [
|
|
1049
|
+
/\bdo you confirm\b/i,
|
|
1050
|
+
/\bdo you (?:want|wish) me to\b/i,
|
|
1051
|
+
/\b(?:shall|should) I\b/i,
|
|
1052
|
+
/\bare you sure\b/i,
|
|
1053
|
+
/\b(?:shall we|should I) (?:proceed|continue|go ahead)\b/i,
|
|
1054
|
+
$.en
|
|
1055
|
+
],
|
|
1056
|
+
es: [
|
|
1057
|
+
/\b(?:confirmas|confirma|confirm[áa]is)\b/i,
|
|
1058
|
+
/\b(?:validas|valida|valid[áa]is)\b/i,
|
|
1059
|
+
/\best[áa]s? seguro\b/i,
|
|
1060
|
+
/\b(?:contin[úu]o|procedo|lo lanzo|lo hago)\b/i,
|
|
1061
|
+
/\bquieres? que\b/i,
|
|
1062
|
+
$.es
|
|
1063
|
+
]
|
|
1064
|
+
}, dt = /^\s*(?:[-*•]\s+)?(?:\[[ xX]\]|\([ xX]\))\s+/m, ft = /[ \t]*\(\s*(?:yes|oui|s[íi])\s*\/\s*non?\s*\)\s*$/i;
|
|
1065
|
+
function pt(e) {
|
|
1066
|
+
return e.replace(ft, "");
|
|
1067
|
+
}
|
|
1068
|
+
function mt(e, t = "en") {
|
|
1069
|
+
if (dt.test(e)) return !1;
|
|
1070
|
+
let n = e.split("\n").map((e) => e.trim()).filter(Boolean), r = n[n.length - 1];
|
|
1071
|
+
return r ? ft.test(r) ? !0 : !r.includes("?") && !$[t].test(r) ? !1 : ut[t].some((e) => e.test(r)) : !1;
|
|
1072
|
+
}
|
|
1073
|
+
var ht = [
|
|
1074
|
+
"text",
|
|
1075
|
+
"number",
|
|
1076
|
+
"date",
|
|
1077
|
+
"email",
|
|
1078
|
+
"select"
|
|
1079
|
+
];
|
|
1080
|
+
function gt(e) {
|
|
1081
|
+
try {
|
|
1082
|
+
return JSON.parse(e);
|
|
1083
|
+
} catch {
|
|
1084
|
+
return null;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
function _t(e) {
|
|
1088
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1089
|
+
}
|
|
1090
|
+
function vt(e) {
|
|
1091
|
+
return !Array.isArray(e) || e.length === 0 || e.length > 20 || !e.every((e) => typeof e == "string" && e.trim()) ? null : e;
|
|
1092
|
+
}
|
|
1093
|
+
function yt(e) {
|
|
1094
|
+
if (!_t(e)) return null;
|
|
1095
|
+
let { name: t, label: n, type: r } = e;
|
|
1096
|
+
if (typeof t != "string" || !t.trim() || typeof n != "string" || !n.trim() || typeof r != "string" || !ht.includes(r)) return null;
|
|
1097
|
+
let i = {
|
|
1098
|
+
name: t,
|
|
1099
|
+
label: n,
|
|
1100
|
+
type: r,
|
|
1101
|
+
required: e.required === !0
|
|
1102
|
+
};
|
|
1103
|
+
if (r === "select") {
|
|
1104
|
+
let t = vt(e.options);
|
|
1105
|
+
if (!t) return null;
|
|
1106
|
+
i.options = t;
|
|
1107
|
+
}
|
|
1108
|
+
return i;
|
|
1109
|
+
}
|
|
1110
|
+
function bt(e) {
|
|
1111
|
+
let t = gt(e);
|
|
1112
|
+
if (!_t(t) || !Array.isArray(t.fields) || t.fields.length === 0 || t.fields.length > 12) return null;
|
|
1113
|
+
let n = [];
|
|
1114
|
+
for (let e of t.fields) {
|
|
1115
|
+
let t = yt(e);
|
|
1116
|
+
if (!t || n.some((e) => e.name === t.name)) return null;
|
|
1117
|
+
n.push(t);
|
|
1118
|
+
}
|
|
1119
|
+
let r = { fields: n };
|
|
1120
|
+
return typeof t.title == "string" && (r.title = t.title), typeof t.submit == "string" && (r.submit = t.submit), r;
|
|
1121
|
+
}
|
|
1122
|
+
//#endregion
|
|
1123
|
+
//#region src/widgets/parse/answer.ts
|
|
1124
|
+
var xt = /^\s*(?:[-*•]\s+)?(?:\[([ xX])\]|\(([ xX])\))\s+(.+)$/, St = /^\s*\|.*\|\s*$/, Ct = /^\s*\|(?:\s*:?-{1,}:?\s*\|)+\s*$/, wt = /^\s*```/;
|
|
1125
|
+
function Tt(e) {
|
|
1126
|
+
return e.replace(/^\s*\|/, "").replace(/\|\s*$/, "").split("|").map((e) => e.trim());
|
|
1127
|
+
}
|
|
1128
|
+
function Et(e, t, n = !0) {
|
|
1129
|
+
let r = n && mt(e, t), i = (r ? pt(e) : e).split("\n"), a = [], o = [], s = () => {
|
|
1130
|
+
let e = o.join("\n").replace(/^\n+|\n+$/g, "");
|
|
1131
|
+
e.trim() && a.push({
|
|
1132
|
+
kind: "markdown",
|
|
1133
|
+
text: e
|
|
1134
|
+
}), o = [];
|
|
1135
|
+
};
|
|
1136
|
+
for (let e = 0; e < i.length; e += 1) {
|
|
1137
|
+
let t = i[e];
|
|
1138
|
+
if (wt.test(t)) {
|
|
1139
|
+
let n = e + 1;
|
|
1140
|
+
for (; n < i.length && !wt.test(i[n]);) n += 1;
|
|
1141
|
+
let r = n < i.length, c = t.replace(/^\s*```/, "").trim().toLowerCase(), l = i.slice(e + 1, n).join("\n"), u = null;
|
|
1142
|
+
if (r && c === "form") {
|
|
1143
|
+
let e = bt(l);
|
|
1144
|
+
e && (u = {
|
|
1145
|
+
kind: "form",
|
|
1146
|
+
form: e
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1149
|
+
u ? (s(), a.push(u)) : o.push(...i.slice(e, r ? n + 1 : n)), e = r ? n : n - 1;
|
|
1150
|
+
continue;
|
|
1151
|
+
}
|
|
1152
|
+
if (St.test(t) && e + 1 < i.length && Ct.test(i[e + 1])) {
|
|
1153
|
+
s();
|
|
1154
|
+
let n = Tt(t), r = [];
|
|
1155
|
+
for (e += 2; e < i.length && St.test(i[e]);) r.push(Tt(i[e])), e += 1;
|
|
1156
|
+
--e, a.push({
|
|
1157
|
+
kind: "table",
|
|
1158
|
+
header: n,
|
|
1159
|
+
rows: r
|
|
1160
|
+
});
|
|
1161
|
+
continue;
|
|
1162
|
+
}
|
|
1163
|
+
let n = xt.exec(t);
|
|
1164
|
+
if (n) {
|
|
1165
|
+
let t = n[1] !== void 0, r = [], c = [], l = e, u = n;
|
|
1166
|
+
for (; u && u[1] !== void 0 === t;) {
|
|
1167
|
+
let e = u[3].trim();
|
|
1168
|
+
r.push(e), (u[1] ?? u[2]) !== " " && (t || !c.length) && c.push(e), l += 1, u = l < i.length ? xt.exec(i[l]) : null;
|
|
1169
|
+
}
|
|
1170
|
+
if (r.length > 20) o.push(...i.slice(e, l));
|
|
1171
|
+
else {
|
|
1172
|
+
s();
|
|
1173
|
+
let e = {
|
|
1174
|
+
kind: "choices",
|
|
1175
|
+
options: r,
|
|
1176
|
+
multiple: t
|
|
1177
|
+
};
|
|
1178
|
+
c.length && (e.checked = c), a.push(e);
|
|
1179
|
+
}
|
|
1180
|
+
e = l - 1;
|
|
1181
|
+
continue;
|
|
1182
|
+
}
|
|
1183
|
+
o.push(t);
|
|
1184
|
+
}
|
|
1185
|
+
return s(), {
|
|
1186
|
+
blocks: a,
|
|
1187
|
+
confirm: r
|
|
1188
|
+
};
|
|
1189
|
+
}
|
|
1190
|
+
//#endregion
|
|
1191
|
+
export { V as C, S as D, P as E, be as S, Se as T, ke as _, it as a, xe as b, Z as c, J as d, q as f, W as g, Re as h, ot as i, X as l, G as m, lt as n, nt as o, K as p, ct as r, Q as s, Et as t, Y as u, Ae as v, ye as w, H as x, Fe as y };
|
|
1192
|
+
|
|
1193
|
+
//# sourceMappingURL=answer-CDGrP8YE.js.map
|