@ibiz-template-plugin/ai-chat 0.0.34 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1123 -1076
- package/dist/index.legacy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/chat-container/chat-container.d.ts +8 -1
- package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +5 -1
- package/dist/types/icons/agent.d.ts +1 -0
- package/dist/types/icons/arrow-down.d.ts +1 -0
- package/dist/types/icons/index.d.ts +2 -0
- package/dist/types/interface/i-chat-container/i-chat-container.d.ts +40 -0
- package/dist/types/interface/i-chat-options/i-chat-options.d.ts +9 -35
- package/dist/types/interface/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import './style.css';
|
|
2
2
|
var Pn = Object.defineProperty;
|
|
3
3
|
var Rn = (n, e, t) => e in n ? Pn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
4
|
-
var
|
|
4
|
+
var T = (n, e, t) => (Rn(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
5
5
|
import Ue from "interactjs";
|
|
6
|
-
import
|
|
6
|
+
import Qt from "cherry-markdown";
|
|
7
7
|
import { QXEvent as Fn } from "qx-util";
|
|
8
|
-
var Oe, C,
|
|
8
|
+
var Oe, C, en, tn, se, vt, nn, sn, an, ot, Ke, Ge, on, xe = {}, rn = [], Un = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Se = Array.isArray;
|
|
9
9
|
function Y(n, e) {
|
|
10
10
|
for (var t in e)
|
|
11
11
|
n[t] = e[t];
|
|
12
12
|
return n;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function rt(n) {
|
|
15
15
|
n && n.parentNode && n.parentNode.removeChild(n);
|
|
16
16
|
}
|
|
17
17
|
function X(n, e, t) {
|
|
18
|
-
var i, s,
|
|
19
|
-
for (
|
|
20
|
-
|
|
21
|
-
if (arguments.length > 2 && (
|
|
22
|
-
for (
|
|
23
|
-
o
|
|
24
|
-
return
|
|
18
|
+
var i, s, o, a = {};
|
|
19
|
+
for (o in e)
|
|
20
|
+
o == "key" ? i = e[o] : o == "ref" ? s = e[o] : a[o] = e[o];
|
|
21
|
+
if (arguments.length > 2 && (a.children = arguments.length > 3 ? Oe.call(arguments, 2) : t), typeof n == "function" && n.defaultProps != null)
|
|
22
|
+
for (o in n.defaultProps)
|
|
23
|
+
a[o] === void 0 && (a[o] = n.defaultProps[o]);
|
|
24
|
+
return $e(n, a, i, s, null);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
var
|
|
28
|
-
return s == null && C.vnode != null && C.vnode(
|
|
26
|
+
function $e(n, e, t, i, s) {
|
|
27
|
+
var o = { type: n, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: s == null ? ++en : s, __i: -1, __u: 0 };
|
|
28
|
+
return s == null && C.vnode != null && C.vnode(o), o;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function mt() {
|
|
31
31
|
return { current: null };
|
|
32
32
|
}
|
|
33
33
|
function Z(n) {
|
|
34
34
|
return n.children;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function U(n, e) {
|
|
37
37
|
this.props = n, this.context = e;
|
|
38
38
|
}
|
|
39
39
|
function pe(n, e) {
|
|
@@ -44,7 +44,7 @@ function pe(n, e) {
|
|
|
44
44
|
return t.__e;
|
|
45
45
|
return typeof n.type == "function" ? pe(n) : null;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function cn(n) {
|
|
48
48
|
var e, t;
|
|
49
49
|
if ((n = n.__) != null && n.__c != null) {
|
|
50
50
|
for (n.__e = n.__c.base = null, e = 0; e < n.__k.length; e++)
|
|
@@ -52,37 +52,37 @@ function rn(n) {
|
|
|
52
52
|
n.__e = n.__c.base = t.__e;
|
|
53
53
|
break;
|
|
54
54
|
}
|
|
55
|
-
return
|
|
55
|
+
return cn(n);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
function Qe(n) {
|
|
59
|
-
(!n.__d && (n.__d = !0) &&
|
|
59
|
+
(!n.__d && (n.__d = !0) && se.push(n) && !De.__r++ || vt != C.debounceRendering) && ((vt = C.debounceRendering) || nn)(De);
|
|
60
60
|
}
|
|
61
61
|
function De() {
|
|
62
|
-
for (var n, e, t, i, s,
|
|
63
|
-
|
|
62
|
+
for (var n, e, t, i, s, o, a, r = 1; se.length; )
|
|
63
|
+
se.length > r && se.sort(sn), n = se.shift(), r = se.length, n.__d && (t = void 0, i = void 0, s = (i = (e = n).__v).__e, o = [], a = [], e.__P && ((t = Y({}, i)).__v = i.__v + 1, C.vnode && C.vnode(t), ct(e.__P, t, i, e.__n, e.__P.namespaceURI, 32 & i.__u ? [s] : null, o, s == null ? pe(i) : s, !!(32 & i.__u), a), t.__v = i.__v, t.__.__k[t.__i] = t, hn(o, t, a), i.__e = i.__ = null, t.__e != s && cn(t)));
|
|
64
64
|
De.__r = 0;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
var l, f, _, p, m, w, g, v = i && i.__k ||
|
|
68
|
-
for (u = Wn(t, e, v, u,
|
|
69
|
-
(_ = t.__k[l]) != null && (f = _.__i == -1 ? xe : v[_.__i] || xe, _.__i = l, w =
|
|
66
|
+
function ln(n, e, t, i, s, o, a, r, u, h, d) {
|
|
67
|
+
var l, f, _, p, m, w, g, v = i && i.__k || rn, y = e.length;
|
|
68
|
+
for (u = Wn(t, e, v, u, y), l = 0; l < y; l++)
|
|
69
|
+
(_ = t.__k[l]) != null && (f = _.__i == -1 ? xe : v[_.__i] || xe, _.__i = l, w = ct(n, _, f, s, o, a, r, u, h, d), p = _.__e, _.ref && f.ref != _.ref && (f.ref && lt(f.ref, null, _), d.push(_.ref, _.__c || p, _)), m == null && p != null && (m = p), (g = !!(4 & _.__u)) || f.__k === _.__k ? u = un(_, u, n, g) : typeof _.type == "function" && w !== void 0 ? u = w : p && (u = p.nextSibling), _.__u &= -7);
|
|
70
70
|
return t.__e = m, u;
|
|
71
71
|
}
|
|
72
72
|
function Wn(n, e, t, i, s) {
|
|
73
|
-
var
|
|
74
|
-
for (n.__k = new Array(s),
|
|
75
|
-
(
|
|
73
|
+
var o, a, r, u, h, d = t.length, l = d, f = 0;
|
|
74
|
+
for (n.__k = new Array(s), o = 0; o < s; o++)
|
|
75
|
+
(a = e[o]) != null && typeof a != "boolean" && typeof a != "function" ? (u = o + f, (a = n.__k[o] = typeof a == "string" || typeof a == "number" || typeof a == "bigint" || a.constructor == String ? $e(null, a, null, null, null) : Se(a) ? $e(Z, { children: a }, null, null, null) : a.constructor == null && a.__b > 0 ? $e(a.type, a.props, a.key, a.ref ? a.ref : null, a.__v) : a).__ = n, a.__b = n.__b + 1, r = null, (h = a.__i = jn(a, t, u, l)) != -1 && (l--, (r = t[h]) && (r.__u |= 2)), r == null || r.__v == null ? (h == -1 && (s > d ? f-- : s < d && f++), typeof a.type != "function" && (a.__u |= 4)) : h != u && (h == u - 1 ? f-- : h == u + 1 ? f++ : (h > u ? f-- : f++, a.__u |= 4))) : n.__k[o] = null;
|
|
76
76
|
if (l)
|
|
77
|
-
for (
|
|
78
|
-
(r = t[
|
|
77
|
+
for (o = 0; o < d; o++)
|
|
78
|
+
(r = t[o]) != null && !(2 & r.__u) && (r.__e == i && (i = pe(r)), pn(r, r));
|
|
79
79
|
return i;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
var s,
|
|
81
|
+
function un(n, e, t, i) {
|
|
82
|
+
var s, o;
|
|
83
83
|
if (typeof n.type == "function") {
|
|
84
|
-
for (s = n.__k,
|
|
85
|
-
s[
|
|
84
|
+
for (s = n.__k, o = 0; s && o < s.length; o++)
|
|
85
|
+
s[o] && (s[o].__ = n, e = un(s[o], e, t, i));
|
|
86
86
|
return e;
|
|
87
87
|
}
|
|
88
88
|
n.__e != e && (i && (e && n.type && !e.parentNode && (e = pe(n)), t.insertBefore(n.__e, e || null)), e = n.__e);
|
|
@@ -92,26 +92,26 @@ function ln(n, e, t, i) {
|
|
|
92
92
|
return e;
|
|
93
93
|
}
|
|
94
94
|
function Le(n, e) {
|
|
95
|
-
return e = e || [], n == null || typeof n == "boolean" || (
|
|
95
|
+
return e = e || [], n == null || typeof n == "boolean" || (Se(n) ? n.some(function(t) {
|
|
96
96
|
Le(t, e);
|
|
97
97
|
}) : e.push(n)), e;
|
|
98
98
|
}
|
|
99
99
|
function jn(n, e, t, i) {
|
|
100
|
-
var s,
|
|
100
|
+
var s, o, a, r = n.key, u = n.type, h = e[t], d = h != null && (2 & h.__u) == 0;
|
|
101
101
|
if (h === null && n.key == null || d && r == h.key && u == h.type)
|
|
102
102
|
return t;
|
|
103
103
|
if (i > (d ? 1 : 0)) {
|
|
104
|
-
for (s = t - 1,
|
|
105
|
-
if ((h = e[
|
|
106
|
-
return
|
|
104
|
+
for (s = t - 1, o = t + 1; s >= 0 || o < e.length; )
|
|
105
|
+
if ((h = e[a = s >= 0 ? s-- : o++]) != null && !(2 & h.__u) && r == h.key && u == h.type)
|
|
106
|
+
return a;
|
|
107
107
|
}
|
|
108
108
|
return -1;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function _t(n, e, t) {
|
|
111
111
|
e[0] == "-" ? n.setProperty(e, t == null ? "" : t) : n[e] = t == null ? "" : typeof t != "number" || Un.test(e) ? t : t + "px";
|
|
112
112
|
}
|
|
113
113
|
function ke(n, e, t, i, s) {
|
|
114
|
-
var
|
|
114
|
+
var o, a;
|
|
115
115
|
e:
|
|
116
116
|
if (e == "style")
|
|
117
117
|
if (typeof t == "string")
|
|
@@ -119,13 +119,13 @@ function ke(n, e, t, i, s) {
|
|
|
119
119
|
else {
|
|
120
120
|
if (typeof i == "string" && (n.style.cssText = i = ""), i)
|
|
121
121
|
for (e in i)
|
|
122
|
-
t && e in t ||
|
|
122
|
+
t && e in t || _t(n.style, e, "");
|
|
123
123
|
if (t)
|
|
124
124
|
for (e in t)
|
|
125
|
-
i && t[e] == i[e] ||
|
|
125
|
+
i && t[e] == i[e] || _t(n.style, e, t[e]);
|
|
126
126
|
}
|
|
127
127
|
else if (e[0] == "o" && e[1] == "n")
|
|
128
|
-
|
|
128
|
+
o = e != (e = e.replace(an, "$1")), a = e.toLowerCase(), e = a in n || e == "onFocusOut" || e == "onFocusIn" ? a.slice(2) : e.slice(2), n.l || (n.l = {}), n.l[e + o] = t, t ? i ? t.u = i.u : (t.u = ot, n.addEventListener(e, o ? Ge : Ke, o)) : n.removeEventListener(e, o ? Ge : Ke, o);
|
|
129
129
|
else {
|
|
130
130
|
if (s == "http://www.w3.org/2000/svg")
|
|
131
131
|
e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
@@ -138,7 +138,7 @@ function ke(n, e, t, i, s) {
|
|
|
138
138
|
typeof t == "function" || (t == null || t === !1 && e[4] != "-" ? n.removeAttribute(e) : n.setAttribute(e, e == "popover" && t == 1 ? "" : t));
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function gt(n) {
|
|
142
142
|
return function(e) {
|
|
143
143
|
if (this.l) {
|
|
144
144
|
var t = this.l[e.type + n];
|
|
@@ -150,30 +150,30 @@ function _t(n) {
|
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
var d, l, f, _, p, m, w, g, v,
|
|
153
|
+
function ct(n, e, t, i, s, o, a, r, u, h) {
|
|
154
|
+
var d, l, f, _, p, m, w, g, v, y, x, A, L, K, G, ee, Fe, W = e.type;
|
|
155
155
|
if (e.constructor != null)
|
|
156
156
|
return null;
|
|
157
|
-
128 & t.__u && (u = !!(32 & t.__u),
|
|
157
|
+
128 & t.__u && (u = !!(32 & t.__u), o = [r = e.__e = t.__e]), (d = C.__b) && d(e);
|
|
158
158
|
e:
|
|
159
|
-
if (typeof
|
|
159
|
+
if (typeof W == "function")
|
|
160
160
|
try {
|
|
161
|
-
if (g = e.props, v = "prototype" in
|
|
162
|
-
v &&
|
|
161
|
+
if (g = e.props, v = "prototype" in W && W.prototype.render, y = (d = W.contextType) && i[d.__c], x = d ? y ? y.props.value : d.__ : i, t.__c ? w = (l = e.__c = t.__c).__ = l.__E : (v ? e.__c = l = new W(g, x) : (e.__c = l = new U(g, x), l.constructor = W, l.render = qn), y && y.sub(l), l.props = g, l.state || (l.state = {}), l.context = x, l.__n = i, f = l.__d = !0, l.__h = [], l._sb = []), v && l.__s == null && (l.__s = l.state), v && W.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = Y({}, l.__s)), Y(l.__s, W.getDerivedStateFromProps(g, l.__s))), _ = l.props, p = l.state, l.__v = e, f)
|
|
162
|
+
v && W.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), v && l.componentDidMount != null && l.__h.push(l.componentDidMount);
|
|
163
163
|
else {
|
|
164
|
-
if (v &&
|
|
165
|
-
for (e.__v != t.__v && (l.props = g, l.state = l.__s, l.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.some(function(
|
|
166
|
-
|
|
167
|
-
}),
|
|
168
|
-
l.__h.push(l._sb[
|
|
169
|
-
l._sb = [], l.__h.length &&
|
|
164
|
+
if (v && W.getDerivedStateFromProps == null && g !== _ && l.componentWillReceiveProps != null && l.componentWillReceiveProps(g, x), !l.__e && l.shouldComponentUpdate != null && l.shouldComponentUpdate(g, l.__s, x) === !1 || e.__v == t.__v) {
|
|
165
|
+
for (e.__v != t.__v && (l.props = g, l.state = l.__s, l.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.some(function(re) {
|
|
166
|
+
re && (re.__ = e);
|
|
167
|
+
}), A = 0; A < l._sb.length; A++)
|
|
168
|
+
l.__h.push(l._sb[A]);
|
|
169
|
+
l._sb = [], l.__h.length && a.push(l);
|
|
170
170
|
break e;
|
|
171
171
|
}
|
|
172
|
-
l.componentWillUpdate != null && l.componentWillUpdate(g, l.__s,
|
|
172
|
+
l.componentWillUpdate != null && l.componentWillUpdate(g, l.__s, x), v && l.componentDidUpdate != null && l.__h.push(function() {
|
|
173
173
|
l.componentDidUpdate(_, p, m);
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
if (l.context =
|
|
176
|
+
if (l.context = x, l.props = g, l.__P = n, l.__e = !1, L = C.__r, K = 0, v) {
|
|
177
177
|
for (l.state = l.__s, l.__d = !1, L && L(e), d = l.render(l.props, l.state, l.context), G = 0; G < l._sb.length; G++)
|
|
178
178
|
l.__h.push(l._sb[G]);
|
|
179
179
|
l._sb = [];
|
|
@@ -181,63 +181,63 @@ function rt(n, e, t, i, s, a, o, r, u, h) {
|
|
|
181
181
|
do
|
|
182
182
|
l.__d = !1, L && L(e), d = l.render(l.props, l.state, l.context), l.state = l.__s;
|
|
183
183
|
while (l.__d && ++K < 25);
|
|
184
|
-
l.state = l.__s, l.getChildContext != null && (i = Y(Y({}, i), l.getChildContext())), v && !f && l.getSnapshotBeforeUpdate != null && (m = l.getSnapshotBeforeUpdate(_, p)), ee = d, d != null && d.type === Z && d.key == null && (ee =
|
|
185
|
-
} catch (
|
|
186
|
-
if (e.__v = null, u ||
|
|
187
|
-
if (
|
|
184
|
+
l.state = l.__s, l.getChildContext != null && (i = Y(Y({}, i), l.getChildContext())), v && !f && l.getSnapshotBeforeUpdate != null && (m = l.getSnapshotBeforeUpdate(_, p)), ee = d, d != null && d.type === Z && d.key == null && (ee = dn(d.props.children)), r = ln(n, Se(ee) ? ee : [ee], e, t, i, s, o, a, r, u, h), l.base = e.__e, e.__u &= -161, l.__h.length && a.push(l), w && (l.__E = l.__ = null);
|
|
185
|
+
} catch (re) {
|
|
186
|
+
if (e.__v = null, u || o != null)
|
|
187
|
+
if (re.then) {
|
|
188
188
|
for (e.__u |= u ? 160 : 128; r && r.nodeType == 8 && r.nextSibling; )
|
|
189
189
|
r = r.nextSibling;
|
|
190
|
-
|
|
190
|
+
o[o.indexOf(r)] = null, e.__e = r;
|
|
191
191
|
} else {
|
|
192
|
-
for (Fe =
|
|
193
|
-
|
|
192
|
+
for (Fe = o.length; Fe--; )
|
|
193
|
+
rt(o[Fe]);
|
|
194
194
|
et(e);
|
|
195
195
|
}
|
|
196
196
|
else
|
|
197
|
-
e.__e = t.__e, e.__k = t.__k,
|
|
198
|
-
C.__e(
|
|
197
|
+
e.__e = t.__e, e.__k = t.__k, re.then || et(e);
|
|
198
|
+
C.__e(re, e, t);
|
|
199
199
|
}
|
|
200
200
|
else
|
|
201
|
-
|
|
201
|
+
o == null && e.__v == t.__v ? (e.__k = t.__k, e.__e = t.__e) : r = e.__e = Vn(t.__e, e, t, i, s, o, a, u, h);
|
|
202
202
|
return (d = C.diffed) && d(e), 128 & e.__u ? void 0 : r;
|
|
203
203
|
}
|
|
204
204
|
function et(n) {
|
|
205
205
|
n && n.__c && (n.__c.__e = !0), n && n.__k && n.__k.forEach(et);
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function hn(n, e, t) {
|
|
208
208
|
for (var i = 0; i < t.length; i++)
|
|
209
|
-
|
|
209
|
+
lt(t[i], t[++i], t[++i]);
|
|
210
210
|
C.__c && C.__c(e, n), n.some(function(s) {
|
|
211
211
|
try {
|
|
212
|
-
n = s.__h, s.__h = [], n.some(function(
|
|
213
|
-
|
|
212
|
+
n = s.__h, s.__h = [], n.some(function(o) {
|
|
213
|
+
o.call(s);
|
|
214
214
|
});
|
|
215
|
-
} catch (
|
|
216
|
-
C.__e(
|
|
215
|
+
} catch (o) {
|
|
216
|
+
C.__e(o, s.__v);
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return typeof n != "object" || n == null || n.__b && n.__b > 0 ? n :
|
|
220
|
+
function dn(n) {
|
|
221
|
+
return typeof n != "object" || n == null || n.__b && n.__b > 0 ? n : Se(n) ? n.map(dn) : Y({}, n);
|
|
222
222
|
}
|
|
223
|
-
function Vn(n, e, t, i, s,
|
|
223
|
+
function Vn(n, e, t, i, s, o, a, r, u) {
|
|
224
224
|
var h, d, l, f, _, p, m, w = t.props, g = e.props, v = e.type;
|
|
225
|
-
if (v == "svg" ? s = "http://www.w3.org/2000/svg" : v == "math" ? s = "http://www.w3.org/1998/Math/MathML" : s || (s = "http://www.w3.org/1999/xhtml"),
|
|
226
|
-
for (h = 0; h <
|
|
227
|
-
if ((_ =
|
|
228
|
-
n = _,
|
|
225
|
+
if (v == "svg" ? s = "http://www.w3.org/2000/svg" : v == "math" ? s = "http://www.w3.org/1998/Math/MathML" : s || (s = "http://www.w3.org/1999/xhtml"), o != null) {
|
|
226
|
+
for (h = 0; h < o.length; h++)
|
|
227
|
+
if ((_ = o[h]) && "setAttribute" in _ == !!v && (v ? _.localName == v : _.nodeType == 3)) {
|
|
228
|
+
n = _, o[h] = null;
|
|
229
229
|
break;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
if (n == null) {
|
|
233
233
|
if (v == null)
|
|
234
234
|
return document.createTextNode(g);
|
|
235
|
-
n = document.createElementNS(s, v, g.is && g), r && (C.__m && C.__m(e,
|
|
235
|
+
n = document.createElementNS(s, v, g.is && g), r && (C.__m && C.__m(e, o), r = !1), o = null;
|
|
236
236
|
}
|
|
237
237
|
if (v == null)
|
|
238
238
|
w === g || r && n.data == g || (n.data = g);
|
|
239
239
|
else {
|
|
240
|
-
if (
|
|
240
|
+
if (o = o && Oe.call(n.childNodes), w = t.props || xe, !r && o != null)
|
|
241
241
|
for (w = {}, h = 0; h < n.attributes.length; h++)
|
|
242
242
|
w[(_ = n.attributes[h]).name] = _.value;
|
|
243
243
|
for (h in w)
|
|
@@ -254,14 +254,14 @@ function Vn(n, e, t, i, s, a, o, r, u) {
|
|
|
254
254
|
_ = g[h], h == "children" ? f = _ : h == "dangerouslySetInnerHTML" ? d = _ : h == "value" ? p = _ : h == "checked" ? m = _ : r && typeof _ != "function" || w[h] === _ || ke(n, h, _, w[h], s);
|
|
255
255
|
if (d)
|
|
256
256
|
r || l && (d.__html == l.__html || d.__html == n.innerHTML) || (n.innerHTML = d.__html), e.__k = [];
|
|
257
|
-
else if (l && (n.innerHTML = ""),
|
|
258
|
-
for (h =
|
|
259
|
-
|
|
257
|
+
else if (l && (n.innerHTML = ""), ln(e.type == "template" ? n.content : n, Se(f) ? f : [f], e, t, i, v == "foreignObject" ? "http://www.w3.org/1999/xhtml" : s, o, a, o ? o[0] : t.__k && pe(t, 0), r, u), o != null)
|
|
258
|
+
for (h = o.length; h--; )
|
|
259
|
+
rt(o[h]);
|
|
260
260
|
r || (h = "value", v == "progress" && p == null ? n.removeAttribute("value") : p != null && (p !== n[h] || v == "progress" && !p || v == "option" && p != w[h]) && ke(n, h, p, w[h], s), h = "checked", m != null && m != n[h] && ke(n, h, m, w[h], s));
|
|
261
261
|
}
|
|
262
262
|
return n;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function lt(n, e, t) {
|
|
265
265
|
try {
|
|
266
266
|
if (typeof n == "function") {
|
|
267
267
|
var i = typeof n.__u == "function";
|
|
@@ -272,28 +272,28 @@ function ct(n, e, t) {
|
|
|
272
272
|
C.__e(s, t);
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function pn(n, e, t) {
|
|
276
276
|
var i, s;
|
|
277
|
-
if (C.unmount && C.unmount(n), (i = n.ref) && (i.current && i.current != n.__e ||
|
|
277
|
+
if (C.unmount && C.unmount(n), (i = n.ref) && (i.current && i.current != n.__e || lt(i, null, e)), (i = n.__c) != null) {
|
|
278
278
|
if (i.componentWillUnmount)
|
|
279
279
|
try {
|
|
280
280
|
i.componentWillUnmount();
|
|
281
|
-
} catch (
|
|
282
|
-
C.__e(
|
|
281
|
+
} catch (o) {
|
|
282
|
+
C.__e(o, e);
|
|
283
283
|
}
|
|
284
284
|
i.base = i.__P = null;
|
|
285
285
|
}
|
|
286
286
|
if (i = n.__k)
|
|
287
287
|
for (s = 0; s < i.length; s++)
|
|
288
|
-
i[s] &&
|
|
289
|
-
t ||
|
|
288
|
+
i[s] && pn(i[s], e, t || typeof n.type != "function");
|
|
289
|
+
t || rt(n.__e), n.__c = n.__ = n.__e = void 0;
|
|
290
290
|
}
|
|
291
291
|
function qn(n, e, t) {
|
|
292
292
|
return this.constructor(n, t);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
var i, s,
|
|
296
|
-
e == document && (e = document.documentElement), C.__ && C.__(n, e), s = (i = typeof t == "function") ? null : t && t.__k || e.__k,
|
|
294
|
+
function he(n, e, t) {
|
|
295
|
+
var i, s, o, a;
|
|
296
|
+
e == document && (e = document.documentElement), C.__ && C.__(n, e), s = (i = typeof t == "function") ? null : t && t.__k || e.__k, o = [], a = [], ct(e, n = (!i && t || e).__k = X(Z, null, [n]), s || xe, xe, e.namespaceURI, !i && t ? [t] : s ? null : e.firstChild ? Oe.call(e.childNodes) : null, o, !i && t ? t : s ? s.__e : e.firstChild, i, a), hn(o, n, a);
|
|
297
297
|
}
|
|
298
298
|
function Yn(n) {
|
|
299
299
|
function e(t) {
|
|
@@ -302,15 +302,15 @@ function Yn(n) {
|
|
|
302
302
|
return s;
|
|
303
303
|
}, this.componentWillUnmount = function() {
|
|
304
304
|
i = null;
|
|
305
|
-
}, this.shouldComponentUpdate = function(
|
|
306
|
-
this.props.value !=
|
|
307
|
-
|
|
305
|
+
}, this.shouldComponentUpdate = function(o) {
|
|
306
|
+
this.props.value != o.value && i.forEach(function(a) {
|
|
307
|
+
a.__e = !0, Qe(a);
|
|
308
308
|
});
|
|
309
|
-
}, this.sub = function(
|
|
310
|
-
i.add(
|
|
311
|
-
var
|
|
312
|
-
|
|
313
|
-
i && i.delete(
|
|
309
|
+
}, this.sub = function(o) {
|
|
310
|
+
i.add(o);
|
|
311
|
+
var a = o.componentWillUnmount;
|
|
312
|
+
o.componentWillUnmount = function() {
|
|
313
|
+
i && i.delete(o), a && a.call(o);
|
|
314
314
|
};
|
|
315
315
|
}), t.children;
|
|
316
316
|
}
|
|
@@ -318,43 +318,43 @@ function Yn(n) {
|
|
|
318
318
|
return t.children(i);
|
|
319
319
|
}).contextType = e, e;
|
|
320
320
|
}
|
|
321
|
-
Oe =
|
|
322
|
-
for (var s,
|
|
321
|
+
Oe = rn.slice, C = { __e: function(n, e, t, i) {
|
|
322
|
+
for (var s, o, a; e = e.__; )
|
|
323
323
|
if ((s = e.__c) && !s.__)
|
|
324
324
|
try {
|
|
325
|
-
if ((
|
|
325
|
+
if ((o = s.constructor) && o.getDerivedStateFromError != null && (s.setState(o.getDerivedStateFromError(n)), a = s.__d), s.componentDidCatch != null && (s.componentDidCatch(n, i || {}), a = s.__d), a)
|
|
326
326
|
return s.__E = s;
|
|
327
327
|
} catch (r) {
|
|
328
328
|
n = r;
|
|
329
329
|
}
|
|
330
330
|
throw n;
|
|
331
|
-
} },
|
|
331
|
+
} }, en = 0, tn = function(n) {
|
|
332
332
|
return n != null && n.constructor == null;
|
|
333
|
-
},
|
|
333
|
+
}, U.prototype.setState = function(n, e) {
|
|
334
334
|
var t;
|
|
335
335
|
t = this.__s != null && this.__s != this.state ? this.__s : this.__s = Y({}, this.state), typeof n == "function" && (n = n(Y({}, t), this.props)), n && Y(t, n), n != null && this.__v && (e && this._sb.push(e), Qe(this));
|
|
336
|
-
},
|
|
336
|
+
}, U.prototype.forceUpdate = function(n) {
|
|
337
337
|
this.__v && (this.__e = !0, n && this.__h.push(n), Qe(this));
|
|
338
|
-
},
|
|
338
|
+
}, U.prototype.render = Z, se = [], nn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, sn = function(n, e) {
|
|
339
339
|
return n.__v.__b - e.__v.__b;
|
|
340
|
-
}, De.__r = 0,
|
|
340
|
+
}, De.__r = 0, an = /(PointerCapture)$|Capture$/i, ot = 0, Ke = gt(!1), Ge = gt(!0), on = 0;
|
|
341
341
|
var Xn = 0;
|
|
342
|
-
function c(n, e, t, i, s,
|
|
342
|
+
function c(n, e, t, i, s, o) {
|
|
343
343
|
e || (e = {});
|
|
344
|
-
var
|
|
344
|
+
var a, r, u = e;
|
|
345
345
|
if ("ref" in u)
|
|
346
346
|
for (r in u = {}, e)
|
|
347
|
-
r == "ref" ?
|
|
348
|
-
var h = { type: n, props: u, key: t, ref:
|
|
349
|
-
if (typeof n == "function" && (
|
|
350
|
-
for (r in
|
|
351
|
-
u[r] === void 0 && (u[r] =
|
|
347
|
+
r == "ref" ? a = e[r] : u[r] = e[r];
|
|
348
|
+
var h = { type: n, props: u, key: t, ref: a, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --Xn, __i: -1, __u: 0, __source: s, __self: o };
|
|
349
|
+
if (typeof n == "function" && (a = n.defaultProps))
|
|
350
|
+
for (r in a)
|
|
351
|
+
u[r] === void 0 && (u[r] = a[r]);
|
|
352
352
|
return C.vnode && C.vnode(h), h;
|
|
353
353
|
}
|
|
354
354
|
const Zn = "ibiz", Jn = "is-";
|
|
355
355
|
function te(n, e, t, i, s) {
|
|
356
|
-
let
|
|
357
|
-
return t && (
|
|
356
|
+
let o = "".concat(n, "-").concat(e);
|
|
357
|
+
return t && (o += "-".concat(t)), i && (o += "__".concat(i)), s && (o += "--".concat(s)), o;
|
|
358
358
|
}
|
|
359
359
|
class k {
|
|
360
360
|
/**
|
|
@@ -373,7 +373,7 @@ class k {
|
|
|
373
373
|
* @date 2023-11-03 10:11:31
|
|
374
374
|
* @type {string}
|
|
375
375
|
*/
|
|
376
|
-
|
|
376
|
+
T(this, "namespace");
|
|
377
377
|
this.block = e, this.namespace = t || Zn;
|
|
378
378
|
}
|
|
379
379
|
/**
|
|
@@ -525,40 +525,40 @@ class k {
|
|
|
525
525
|
return "--".concat(this.namespace, "-").concat(this.block, "-").concat(e);
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function j(n) {
|
|
529
529
|
if (typeof n != "string")
|
|
530
530
|
throw new TypeError("Path must be a string. Received " + JSON.stringify(n));
|
|
531
531
|
}
|
|
532
|
-
function
|
|
533
|
-
for (var t = "", i = 0, s = -1,
|
|
532
|
+
function wt(n, e) {
|
|
533
|
+
for (var t = "", i = 0, s = -1, o = 0, a, r = 0; r <= n.length; ++r) {
|
|
534
534
|
if (r < n.length)
|
|
535
|
-
|
|
535
|
+
a = n.charCodeAt(r);
|
|
536
536
|
else {
|
|
537
|
-
if (
|
|
537
|
+
if (a === 47)
|
|
538
538
|
break;
|
|
539
|
-
|
|
539
|
+
a = 47;
|
|
540
540
|
}
|
|
541
|
-
if (
|
|
542
|
-
if (!(s === r - 1 ||
|
|
543
|
-
if (s !== r - 1 &&
|
|
541
|
+
if (a === 47) {
|
|
542
|
+
if (!(s === r - 1 || o === 1))
|
|
543
|
+
if (s !== r - 1 && o === 2) {
|
|
544
544
|
if (t.length < 2 || i !== 2 || t.charCodeAt(t.length - 1) !== 46 || t.charCodeAt(t.length - 2) !== 46) {
|
|
545
545
|
if (t.length > 2) {
|
|
546
546
|
var u = t.lastIndexOf("/");
|
|
547
547
|
if (u !== t.length - 1) {
|
|
548
|
-
u === -1 ? (t = "", i = 0) : (t = t.slice(0, u), i = t.length - 1 - t.lastIndexOf("/")), s = r,
|
|
548
|
+
u === -1 ? (t = "", i = 0) : (t = t.slice(0, u), i = t.length - 1 - t.lastIndexOf("/")), s = r, o = 0;
|
|
549
549
|
continue;
|
|
550
550
|
}
|
|
551
551
|
} else if (t.length === 2 || t.length === 1) {
|
|
552
|
-
t = "", i = 0, s = r,
|
|
552
|
+
t = "", i = 0, s = r, o = 0;
|
|
553
553
|
continue;
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
e && (t.length > 0 ? t += "/.." : t = "..", i = 2);
|
|
557
557
|
} else
|
|
558
558
|
t.length > 0 ? t += "/" + n.slice(s + 1, r) : t = n.slice(s + 1, r), i = r - s - 1;
|
|
559
|
-
s = r,
|
|
559
|
+
s = r, o = 0;
|
|
560
560
|
} else
|
|
561
|
-
|
|
561
|
+
a === 46 && o !== -1 ? ++o : o = -1;
|
|
562
562
|
}
|
|
563
563
|
return t;
|
|
564
564
|
}
|
|
@@ -566,52 +566,52 @@ function Kn(n, e) {
|
|
|
566
566
|
var t = e.dir || e.root, i = e.base || (e.name || "") + (e.ext || "");
|
|
567
567
|
return t ? t === e.root ? t + i : t + n + i : i;
|
|
568
568
|
}
|
|
569
|
-
var
|
|
569
|
+
var ye = {
|
|
570
570
|
// path.resolve([from ...], to)
|
|
571
571
|
resolve: function() {
|
|
572
572
|
for (var e = "", t = !1, i, s = arguments.length - 1; s >= -1 && !t; s--) {
|
|
573
|
-
var
|
|
574
|
-
s >= 0 ?
|
|
573
|
+
var o;
|
|
574
|
+
s >= 0 ? o = arguments[s] : (i === void 0 && (i = process.cwd()), o = i), j(o), o.length !== 0 && (e = o + "/" + e, t = o.charCodeAt(0) === 47);
|
|
575
575
|
}
|
|
576
|
-
return e =
|
|
576
|
+
return e = wt(e, !t), t ? e.length > 0 ? "/" + e : "/" : e.length > 0 ? e : ".";
|
|
577
577
|
},
|
|
578
578
|
normalize: function(e) {
|
|
579
|
-
if (
|
|
579
|
+
if (j(e), e.length === 0)
|
|
580
580
|
return ".";
|
|
581
581
|
var t = e.charCodeAt(0) === 47, i = e.charCodeAt(e.length - 1) === 47;
|
|
582
|
-
return e =
|
|
582
|
+
return e = wt(e, !t), e.length === 0 && !t && (e = "."), e.length > 0 && i && (e += "/"), t ? "/" + e : e;
|
|
583
583
|
},
|
|
584
584
|
isAbsolute: function(e) {
|
|
585
|
-
return
|
|
585
|
+
return j(e), e.length > 0 && e.charCodeAt(0) === 47;
|
|
586
586
|
},
|
|
587
587
|
join: function() {
|
|
588
588
|
if (arguments.length === 0)
|
|
589
589
|
return ".";
|
|
590
590
|
for (var e, t = 0; t < arguments.length; ++t) {
|
|
591
591
|
var i = arguments[t];
|
|
592
|
-
|
|
592
|
+
j(i), i.length > 0 && (e === void 0 ? e = i : e += "/" + i);
|
|
593
593
|
}
|
|
594
|
-
return e === void 0 ? "." :
|
|
594
|
+
return e === void 0 ? "." : ye.normalize(e);
|
|
595
595
|
},
|
|
596
596
|
relative: function(e, t) {
|
|
597
|
-
if (
|
|
597
|
+
if (j(e), j(t), e === t || (e = ye.resolve(e), t = ye.resolve(t), e === t))
|
|
598
598
|
return "";
|
|
599
599
|
for (var i = 1; i < e.length && e.charCodeAt(i) === 47; ++i)
|
|
600
600
|
;
|
|
601
|
-
for (var s = e.length,
|
|
601
|
+
for (var s = e.length, o = s - i, a = 1; a < t.length && t.charCodeAt(a) === 47; ++a)
|
|
602
602
|
;
|
|
603
|
-
for (var r = t.length, u = r -
|
|
603
|
+
for (var r = t.length, u = r - a, h = o < u ? o : u, d = -1, l = 0; l <= h; ++l) {
|
|
604
604
|
if (l === h) {
|
|
605
605
|
if (u > h) {
|
|
606
|
-
if (t.charCodeAt(
|
|
607
|
-
return t.slice(
|
|
606
|
+
if (t.charCodeAt(a + l) === 47)
|
|
607
|
+
return t.slice(a + l + 1);
|
|
608
608
|
if (l === 0)
|
|
609
|
-
return t.slice(
|
|
609
|
+
return t.slice(a + l);
|
|
610
610
|
} else
|
|
611
|
-
|
|
611
|
+
o > h && (e.charCodeAt(i + l) === 47 ? d = l : l === 0 && (d = 0));
|
|
612
612
|
break;
|
|
613
613
|
}
|
|
614
|
-
var f = e.charCodeAt(i + l), _ = t.charCodeAt(
|
|
614
|
+
var f = e.charCodeAt(i + l), _ = t.charCodeAt(a + l);
|
|
615
615
|
if (f !== _)
|
|
616
616
|
break;
|
|
617
617
|
f === 47 && (d = l);
|
|
@@ -619,72 +619,72 @@ var be = {
|
|
|
619
619
|
var p = "";
|
|
620
620
|
for (l = i + d + 1; l <= s; ++l)
|
|
621
621
|
(l === s || e.charCodeAt(l) === 47) && (p.length === 0 ? p += ".." : p += "/..");
|
|
622
|
-
return p.length > 0 ? p + t.slice(
|
|
622
|
+
return p.length > 0 ? p + t.slice(a + d) : (a += d, t.charCodeAt(a) === 47 && ++a, t.slice(a));
|
|
623
623
|
},
|
|
624
624
|
_makeLong: function(e) {
|
|
625
625
|
return e;
|
|
626
626
|
},
|
|
627
627
|
dirname: function(e) {
|
|
628
|
-
if (
|
|
628
|
+
if (j(e), e.length === 0)
|
|
629
629
|
return ".";
|
|
630
|
-
for (var t = e.charCodeAt(0), i = t === 47, s = -1,
|
|
631
|
-
if (t = e.charCodeAt(
|
|
632
|
-
if (!
|
|
633
|
-
s =
|
|
630
|
+
for (var t = e.charCodeAt(0), i = t === 47, s = -1, o = !0, a = e.length - 1; a >= 1; --a)
|
|
631
|
+
if (t = e.charCodeAt(a), t === 47) {
|
|
632
|
+
if (!o) {
|
|
633
|
+
s = a;
|
|
634
634
|
break;
|
|
635
635
|
}
|
|
636
636
|
} else
|
|
637
|
-
|
|
637
|
+
o = !1;
|
|
638
638
|
return s === -1 ? i ? "/" : "." : i && s === 1 ? "//" : e.slice(0, s);
|
|
639
639
|
},
|
|
640
640
|
basename: function(e, t) {
|
|
641
641
|
if (t !== void 0 && typeof t != "string")
|
|
642
642
|
throw new TypeError('"ext" argument must be a string');
|
|
643
|
-
|
|
644
|
-
var i = 0, s = -1,
|
|
643
|
+
j(e);
|
|
644
|
+
var i = 0, s = -1, o = !0, a;
|
|
645
645
|
if (t !== void 0 && t.length > 0 && t.length <= e.length) {
|
|
646
646
|
if (t.length === e.length && t === e)
|
|
647
647
|
return "";
|
|
648
648
|
var r = t.length - 1, u = -1;
|
|
649
|
-
for (
|
|
650
|
-
var h = e.charCodeAt(
|
|
649
|
+
for (a = e.length - 1; a >= 0; --a) {
|
|
650
|
+
var h = e.charCodeAt(a);
|
|
651
651
|
if (h === 47) {
|
|
652
|
-
if (!
|
|
653
|
-
i =
|
|
652
|
+
if (!o) {
|
|
653
|
+
i = a + 1;
|
|
654
654
|
break;
|
|
655
655
|
}
|
|
656
656
|
} else
|
|
657
|
-
u === -1 && (
|
|
657
|
+
u === -1 && (o = !1, u = a + 1), r >= 0 && (h === t.charCodeAt(r) ? --r === -1 && (s = a) : (r = -1, s = u));
|
|
658
658
|
}
|
|
659
659
|
return i === s ? s = u : s === -1 && (s = e.length), e.slice(i, s);
|
|
660
660
|
} else {
|
|
661
|
-
for (
|
|
662
|
-
if (e.charCodeAt(
|
|
663
|
-
if (!
|
|
664
|
-
i =
|
|
661
|
+
for (a = e.length - 1; a >= 0; --a)
|
|
662
|
+
if (e.charCodeAt(a) === 47) {
|
|
663
|
+
if (!o) {
|
|
664
|
+
i = a + 1;
|
|
665
665
|
break;
|
|
666
666
|
}
|
|
667
667
|
} else
|
|
668
|
-
s === -1 && (
|
|
668
|
+
s === -1 && (o = !1, s = a + 1);
|
|
669
669
|
return s === -1 ? "" : e.slice(i, s);
|
|
670
670
|
}
|
|
671
671
|
},
|
|
672
672
|
extname: function(e) {
|
|
673
|
-
|
|
674
|
-
for (var t = -1, i = 0, s = -1,
|
|
673
|
+
j(e);
|
|
674
|
+
for (var t = -1, i = 0, s = -1, o = !0, a = 0, r = e.length - 1; r >= 0; --r) {
|
|
675
675
|
var u = e.charCodeAt(r);
|
|
676
676
|
if (u === 47) {
|
|
677
|
-
if (!
|
|
677
|
+
if (!o) {
|
|
678
678
|
i = r + 1;
|
|
679
679
|
break;
|
|
680
680
|
}
|
|
681
681
|
continue;
|
|
682
682
|
}
|
|
683
|
-
s === -1 && (
|
|
683
|
+
s === -1 && (o = !1, s = r + 1), u === 46 ? t === -1 ? t = r : a !== 1 && (a = 1) : t !== -1 && (a = -1);
|
|
684
684
|
}
|
|
685
685
|
return t === -1 || s === -1 || // We saw a non-dot character immediately before the dot
|
|
686
|
-
|
|
687
|
-
|
|
686
|
+
a === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
687
|
+
a === 1 && t === s - 1 && t === i + 1 ? "" : e.slice(t, s);
|
|
688
688
|
},
|
|
689
689
|
format: function(e) {
|
|
690
690
|
if (e === null || typeof e != "object")
|
|
@@ -692,13 +692,13 @@ var be = {
|
|
|
692
692
|
return Kn("/", e);
|
|
693
693
|
},
|
|
694
694
|
parse: function(e) {
|
|
695
|
-
|
|
695
|
+
j(e);
|
|
696
696
|
var t = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
697
697
|
if (e.length === 0)
|
|
698
698
|
return t;
|
|
699
|
-
var i = e.charCodeAt(0), s = i === 47,
|
|
700
|
-
s ? (t.root = "/",
|
|
701
|
-
for (var
|
|
699
|
+
var i = e.charCodeAt(0), s = i === 47, o;
|
|
700
|
+
s ? (t.root = "/", o = 1) : o = 0;
|
|
701
|
+
for (var a = -1, r = 0, u = -1, h = !0, d = e.length - 1, l = 0; d >= o; --d) {
|
|
702
702
|
if (i = e.charCodeAt(d), i === 47) {
|
|
703
703
|
if (!h) {
|
|
704
704
|
r = d + 1;
|
|
@@ -706,29 +706,29 @@ var be = {
|
|
|
706
706
|
}
|
|
707
707
|
continue;
|
|
708
708
|
}
|
|
709
|
-
u === -1 && (h = !1, u = d + 1), i === 46 ?
|
|
709
|
+
u === -1 && (h = !1, u = d + 1), i === 46 ? a === -1 ? a = d : l !== 1 && (l = 1) : a !== -1 && (l = -1);
|
|
710
710
|
}
|
|
711
|
-
return
|
|
711
|
+
return a === -1 || u === -1 || // We saw a non-dot character immediately before the dot
|
|
712
712
|
l === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
713
|
-
l === 1 &&
|
|
713
|
+
l === 1 && a === u - 1 && a === r + 1 ? u !== -1 && (r === 0 && s ? t.base = t.name = e.slice(1, u) : t.base = t.name = e.slice(r, u)) : (r === 0 && s ? (t.name = e.slice(1, a), t.base = e.slice(1, u)) : (t.name = e.slice(r, a), t.base = e.slice(r, u)), t.ext = e.slice(a, u)), r > 0 ? t.dir = e.slice(0, r - 1) : s && (t.dir = "/"), t;
|
|
714
714
|
},
|
|
715
715
|
sep: "/",
|
|
716
716
|
delimiter: ":",
|
|
717
717
|
win32: null,
|
|
718
718
|
posix: null
|
|
719
719
|
};
|
|
720
|
-
|
|
720
|
+
ye.posix = ye;
|
|
721
721
|
function Q() {
|
|
722
722
|
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function ae() {
|
|
725
725
|
return "".concat(Q() + Q(), "-").concat(Q(), "-").concat(Q(), "-").concat(Q(), "-").concat(Q()).concat(Q()).concat(Q());
|
|
726
726
|
}
|
|
727
727
|
const Gn = /<svg\b[^>]*>[\s\S]*?<\/svg>/;
|
|
728
|
-
function
|
|
728
|
+
function ut(n) {
|
|
729
729
|
return Gn.test(n);
|
|
730
730
|
}
|
|
731
|
-
class
|
|
731
|
+
class fn {
|
|
732
732
|
/**
|
|
733
733
|
* 拷贝文本
|
|
734
734
|
*
|
|
@@ -749,8 +749,8 @@ class pn {
|
|
|
749
749
|
* @private
|
|
750
750
|
* @type {(HTMLInputElement | null)}
|
|
751
751
|
*/
|
|
752
|
-
|
|
753
|
-
const
|
|
752
|
+
T(fn, "inputElement", null);
|
|
753
|
+
const b = class b {
|
|
754
754
|
/**
|
|
755
755
|
* 检查数据库是否存在
|
|
756
756
|
*
|
|
@@ -773,16 +773,16 @@ const y = class y {
|
|
|
773
773
|
*/
|
|
774
774
|
static async deleteDatabase(e) {
|
|
775
775
|
var t, i;
|
|
776
|
-
return
|
|
777
|
-
const
|
|
778
|
-
|
|
776
|
+
return b.lastLink && ((i = (t = b.lastLink).close) == null || i.call(t)), new Promise((s, o) => {
|
|
777
|
+
const a = indexedDB.deleteDatabase(e);
|
|
778
|
+
a.onsuccess = () => {
|
|
779
779
|
s(!0);
|
|
780
|
-
},
|
|
780
|
+
}, a.onerror = () => {
|
|
781
781
|
s(!1);
|
|
782
|
-
},
|
|
782
|
+
}, a.onblocked = () => {
|
|
783
783
|
console.warn(
|
|
784
784
|
"删除数据库 ".concat(e, " 被阻塞,可能有其他连接正在使用该数据库。")
|
|
785
|
-
),
|
|
785
|
+
), o(new Error("删除数据库 ".concat(e, " 被阻塞")));
|
|
786
786
|
};
|
|
787
787
|
});
|
|
788
788
|
}
|
|
@@ -795,16 +795,16 @@ const y = class y {
|
|
|
795
795
|
* @memberof IndexedDBUtil
|
|
796
796
|
*/
|
|
797
797
|
static async checkTableExists(e, t) {
|
|
798
|
-
return await
|
|
799
|
-
const
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
},
|
|
803
|
-
|
|
804
|
-
const u =
|
|
805
|
-
|
|
806
|
-
},
|
|
807
|
-
|
|
798
|
+
return await b.checkDataBaseExists(e) ? new Promise((s, o) => {
|
|
799
|
+
const a = indexedDB.open(e);
|
|
800
|
+
a.onupgradeneeded = (r) => {
|
|
801
|
+
b.db = r.target.result, b.version = b.db.version;
|
|
802
|
+
}, a.onsuccess = (r) => {
|
|
803
|
+
b.db = r.target.result, b.lastLink = a.result;
|
|
804
|
+
const u = b.db.objectStoreNames.contains(t);
|
|
805
|
+
a.result.close(), s(u);
|
|
806
|
+
}, a.onerror = (r) => {
|
|
807
|
+
o(r.target.error);
|
|
808
808
|
};
|
|
809
809
|
}) : !1;
|
|
810
810
|
}
|
|
@@ -818,19 +818,19 @@ const y = class y {
|
|
|
818
818
|
* @memberof IndexedDBUtil
|
|
819
819
|
*/
|
|
820
820
|
static async createTable(e, t, i, s = !1) {
|
|
821
|
-
return new Promise((
|
|
821
|
+
return new Promise((o) => {
|
|
822
822
|
var r, u;
|
|
823
|
-
|
|
824
|
-
const
|
|
825
|
-
|
|
826
|
-
if (
|
|
823
|
+
b.version += 1, b.lastLink && ((u = (r = b.lastLink).close) == null || u.call(r));
|
|
824
|
+
const a = indexedDB.open(e, b.version);
|
|
825
|
+
a.onupgradeneeded = (h) => {
|
|
826
|
+
if (b.db = h.target.result, !b.db.objectStoreNames.contains(t)) {
|
|
827
827
|
const d = {};
|
|
828
|
-
i ? d.keyPath = i : s && (d.autoIncrement = !0),
|
|
828
|
+
i ? d.keyPath = i : s && (d.autoIncrement = !0), b.db.createObjectStore(t, d);
|
|
829
829
|
}
|
|
830
|
-
},
|
|
831
|
-
|
|
832
|
-
},
|
|
833
|
-
|
|
830
|
+
}, a.onsuccess = () => {
|
|
831
|
+
b.lastLink = a.result, a.result.close(), o(!0);
|
|
832
|
+
}, a.onerror = () => {
|
|
833
|
+
o(!1);
|
|
834
834
|
};
|
|
835
835
|
});
|
|
836
836
|
}
|
|
@@ -843,13 +843,13 @@ const y = class y {
|
|
|
843
843
|
*/
|
|
844
844
|
static async deleteTable(e, t) {
|
|
845
845
|
return new Promise((i) => {
|
|
846
|
-
var
|
|
847
|
-
|
|
848
|
-
const s = indexedDB.open(e,
|
|
846
|
+
var o, a;
|
|
847
|
+
b.version += 1, b.lastLink && ((a = (o = b.lastLink).close) == null || a.call(o));
|
|
848
|
+
const s = indexedDB.open(e, b.version);
|
|
849
849
|
s.onupgradeneeded = (r) => {
|
|
850
|
-
|
|
850
|
+
b.db = r.target.result, b.lastLink = s.result, b.db.objectStoreNames.contains(t) && b.db.deleteObjectStore(t);
|
|
851
851
|
}, s.onsuccess = (r) => {
|
|
852
|
-
|
|
852
|
+
b.db = r.target.result, b.lastLink = s.result, s.result.close(), i(!0);
|
|
853
853
|
}, s.onerror = () => {
|
|
854
854
|
s.result.close(), i(!1);
|
|
855
855
|
};
|
|
@@ -864,11 +864,11 @@ const y = class y {
|
|
|
864
864
|
* @memberof IndexedDBUtil
|
|
865
865
|
*/
|
|
866
866
|
static async addData(e, t, i) {
|
|
867
|
-
return new Promise((s,
|
|
868
|
-
const
|
|
869
|
-
|
|
870
|
-
if (
|
|
871
|
-
const d =
|
|
867
|
+
return new Promise((s, o) => {
|
|
868
|
+
const a = indexedDB.open(e);
|
|
869
|
+
a.onsuccess = (r) => {
|
|
870
|
+
if (b.db = r.target.result, b.lastLink = a.result, b.db.objectStoreNames.contains(t)) {
|
|
871
|
+
const d = b.db.transaction(
|
|
872
872
|
[t],
|
|
873
873
|
"readwrite"
|
|
874
874
|
).objectStore(t).add(i);
|
|
@@ -878,9 +878,9 @@ const y = class y {
|
|
|
878
878
|
s(null);
|
|
879
879
|
};
|
|
880
880
|
}
|
|
881
|
-
|
|
882
|
-
},
|
|
883
|
-
|
|
881
|
+
a.result.close();
|
|
882
|
+
}, a.onerror = () => {
|
|
883
|
+
a.result.close(), o();
|
|
884
884
|
};
|
|
885
885
|
});
|
|
886
886
|
}
|
|
@@ -893,11 +893,11 @@ const y = class y {
|
|
|
893
893
|
* @memberof IndexedDBUtil
|
|
894
894
|
*/
|
|
895
895
|
static async deleteData(e, t, i) {
|
|
896
|
-
return new Promise((s,
|
|
897
|
-
const
|
|
898
|
-
|
|
899
|
-
if (
|
|
900
|
-
const d =
|
|
896
|
+
return new Promise((s, o) => {
|
|
897
|
+
const a = indexedDB.open(e);
|
|
898
|
+
a.onsuccess = (r) => {
|
|
899
|
+
if (b.db = r.target.result, b.lastLink = a.result, b.db.objectStoreNames.contains(t)) {
|
|
900
|
+
const d = b.db.transaction(
|
|
901
901
|
[t],
|
|
902
902
|
"readwrite"
|
|
903
903
|
).objectStore(t).delete(i);
|
|
@@ -907,9 +907,9 @@ const y = class y {
|
|
|
907
907
|
s(!1);
|
|
908
908
|
};
|
|
909
909
|
}
|
|
910
|
-
|
|
911
|
-
},
|
|
912
|
-
|
|
910
|
+
a.result.close();
|
|
911
|
+
}, a.onerror = () => {
|
|
912
|
+
a.result.close(), o();
|
|
913
913
|
};
|
|
914
914
|
});
|
|
915
915
|
}
|
|
@@ -922,11 +922,11 @@ const y = class y {
|
|
|
922
922
|
* @memberof IndexedDBUtil
|
|
923
923
|
*/
|
|
924
924
|
static async updateData(e, t, i) {
|
|
925
|
-
return new Promise((s,
|
|
926
|
-
const
|
|
927
|
-
|
|
928
|
-
if (
|
|
929
|
-
const d =
|
|
925
|
+
return new Promise((s, o) => {
|
|
926
|
+
const a = indexedDB.open(e);
|
|
927
|
+
a.onsuccess = (r) => {
|
|
928
|
+
if (b.db = r.target.result, b.lastLink = a.result, b.db.objectStoreNames.contains(t)) {
|
|
929
|
+
const d = b.db.transaction(
|
|
930
930
|
[t],
|
|
931
931
|
"readwrite"
|
|
932
932
|
).objectStore(t).put(i);
|
|
@@ -936,9 +936,9 @@ const y = class y {
|
|
|
936
936
|
s(i);
|
|
937
937
|
};
|
|
938
938
|
}
|
|
939
|
-
|
|
940
|
-
},
|
|
941
|
-
|
|
939
|
+
a.result.close();
|
|
940
|
+
}, a.onerror = () => {
|
|
941
|
+
a.result.close(), o();
|
|
942
942
|
};
|
|
943
943
|
});
|
|
944
944
|
}
|
|
@@ -951,23 +951,23 @@ const y = class y {
|
|
|
951
951
|
* @memberof IndexedDBUtil
|
|
952
952
|
*/
|
|
953
953
|
static async getData(e, t, i) {
|
|
954
|
-
return new Promise((s,
|
|
955
|
-
const
|
|
956
|
-
|
|
957
|
-
if (
|
|
958
|
-
const d =
|
|
954
|
+
return new Promise((s, o) => {
|
|
955
|
+
const a = indexedDB.open(e);
|
|
956
|
+
a.onsuccess = (r) => {
|
|
957
|
+
if (b.db = r.target.result, b.lastLink = a.result, b.db.objectStoreNames.contains(t)) {
|
|
958
|
+
const d = b.db.transaction(
|
|
959
959
|
[t],
|
|
960
960
|
"readonly"
|
|
961
961
|
).objectStore(t).get(i);
|
|
962
962
|
d.onsuccess = (l) => {
|
|
963
963
|
s(d.result);
|
|
964
964
|
}, d.onerror = () => {
|
|
965
|
-
|
|
965
|
+
o(new Error("未找到数据".concat(i)));
|
|
966
966
|
};
|
|
967
967
|
}
|
|
968
|
-
|
|
969
|
-
},
|
|
970
|
-
|
|
968
|
+
a.result.close();
|
|
969
|
+
}, a.onerror = () => {
|
|
970
|
+
a.result.close(), o();
|
|
971
971
|
};
|
|
972
972
|
});
|
|
973
973
|
}
|
|
@@ -980,10 +980,10 @@ const y = class y {
|
|
|
980
980
|
*/
|
|
981
981
|
static async getAllData(e, t) {
|
|
982
982
|
return new Promise((i, s) => {
|
|
983
|
-
const
|
|
984
|
-
|
|
985
|
-
if (
|
|
986
|
-
const h =
|
|
983
|
+
const o = indexedDB.open(e);
|
|
984
|
+
o.onsuccess = (a) => {
|
|
985
|
+
if (b.db = a.target.result, b.lastLink = o.result, b.db.objectStoreNames.contains(t)) {
|
|
986
|
+
const h = b.db.transaction(
|
|
987
987
|
[t],
|
|
988
988
|
"readonly"
|
|
989
989
|
).objectStore(t).getAll();
|
|
@@ -993,18 +993,18 @@ const y = class y {
|
|
|
993
993
|
i([]);
|
|
994
994
|
};
|
|
995
995
|
}
|
|
996
|
-
|
|
997
|
-
},
|
|
998
|
-
|
|
996
|
+
o.result.close();
|
|
997
|
+
}, o.onerror = () => {
|
|
998
|
+
o.result.close(), s();
|
|
999
999
|
};
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
1002
|
};
|
|
1003
1003
|
// 数据库版本
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
let
|
|
1004
|
+
T(b, "version", 1), // 数据库连接句柄
|
|
1005
|
+
T(b, "db", null), // 上一个连接
|
|
1006
|
+
T(b, "lastLink");
|
|
1007
|
+
let F = b;
|
|
1008
1008
|
class Qn {
|
|
1009
1009
|
/**
|
|
1010
1010
|
* Creates an instance of FileUploader.
|
|
@@ -1013,7 +1013,7 @@ class Qn {
|
|
|
1013
1013
|
* @param {FileUploaderOptions<T>} options
|
|
1014
1014
|
*/
|
|
1015
1015
|
constructor(e) {
|
|
1016
|
-
|
|
1016
|
+
T(this, "options");
|
|
1017
1017
|
this.options = {
|
|
1018
1018
|
multiple: !0,
|
|
1019
1019
|
accept: "*/*",
|
|
@@ -1038,34 +1038,34 @@ class Qn {
|
|
|
1038
1038
|
var i, s;
|
|
1039
1039
|
if (e.length === 0)
|
|
1040
1040
|
return;
|
|
1041
|
-
const t = e.filter((
|
|
1042
|
-
var
|
|
1043
|
-
return this.options.maxSize &&
|
|
1044
|
-
|
|
1041
|
+
const t = e.filter((o) => {
|
|
1042
|
+
var a, r;
|
|
1043
|
+
return this.options.maxSize && o.size > this.options.maxSize ? ((r = (a = this.options).onError) == null || r.call(
|
|
1044
|
+
a,
|
|
1045
1045
|
new Error(
|
|
1046
1046
|
"文件大小超过限制 (".concat(this.formatSize(
|
|
1047
|
-
|
|
1047
|
+
o.size
|
|
1048
1048
|
), " > ").concat(this.formatSize(this.options.maxSize), ")")
|
|
1049
1049
|
),
|
|
1050
|
-
|
|
1050
|
+
o
|
|
1051
1051
|
), !1) : !0;
|
|
1052
1052
|
});
|
|
1053
|
-
(s = (i = this.options).onSelect) == null || s.call(i, t), await Promise.all(t.map((
|
|
1053
|
+
(s = (i = this.options).onSelect) == null || s.call(i, t), await Promise.all(t.map((o) => this.processFile(o)));
|
|
1054
1054
|
}
|
|
1055
1055
|
/**
|
|
1056
1056
|
* 处理单个文件上传
|
|
1057
1057
|
*/
|
|
1058
1058
|
async processFile(e) {
|
|
1059
|
-
var t, i, s,
|
|
1059
|
+
var t, i, s, o, a, r;
|
|
1060
1060
|
try {
|
|
1061
1061
|
const u = (d) => {
|
|
1062
1062
|
var l, f;
|
|
1063
1063
|
(f = (l = this.options).onProgress) == null || f.call(l, e, d);
|
|
1064
1064
|
}, h = await this.options.onUpload(e, u);
|
|
1065
|
-
(i = (t = this.options).onProgress) == null || i.call(t, e, 100), (
|
|
1065
|
+
(i = (t = this.options).onProgress) == null || i.call(t, e, 100), (o = (s = this.options).onSuccess) == null || o.call(s, h, e);
|
|
1066
1066
|
} catch (u) {
|
|
1067
|
-
(r = (
|
|
1068
|
-
|
|
1067
|
+
(r = (a = this.options).onError) == null || r.call(
|
|
1068
|
+
a,
|
|
1069
1069
|
u instanceof Error ? u : new Error("上传失败"),
|
|
1070
1070
|
e
|
|
1071
1071
|
);
|
|
@@ -1081,7 +1081,7 @@ class Qn {
|
|
|
1081
1081
|
return "".concat((e / 1024 ** i).toFixed(2), " ").concat(t[i]);
|
|
1082
1082
|
}
|
|
1083
1083
|
}
|
|
1084
|
-
class
|
|
1084
|
+
class tt {
|
|
1085
1085
|
/**
|
|
1086
1086
|
* 从XML元素中提取CDATA内容
|
|
1087
1087
|
*
|
|
@@ -1111,11 +1111,11 @@ class fn {
|
|
|
1111
1111
|
*/
|
|
1112
1112
|
static parse(e) {
|
|
1113
1113
|
const i = new DOMParser().parseFromString(e, "text/xml");
|
|
1114
|
-
return Array.from(i.querySelectorAll("resource")).map((
|
|
1115
|
-
const
|
|
1114
|
+
return Array.from(i.querySelectorAll("resource")).map((o) => {
|
|
1115
|
+
const a = o.getAttribute("type") || "", r = o.querySelector("data"), u = o.querySelector("metadata");
|
|
1116
1116
|
try {
|
|
1117
1117
|
const h = this.getCdataContent(r), d = this.getCdataContent(u), l = h ? JSON.parse(h) : {}, f = d ? JSON.parse(d) : {};
|
|
1118
|
-
return { id: l.id, type:
|
|
1118
|
+
return { id: l.id, type: a, data: l, metadata: f };
|
|
1119
1119
|
} catch (h) {
|
|
1120
1120
|
throw new Error("XML 解析错误: ".concat(h.message));
|
|
1121
1121
|
}
|
|
@@ -1143,7 +1143,7 @@ class fn {
|
|
|
1143
1143
|
remainingText: e,
|
|
1144
1144
|
hasResources: !1
|
|
1145
1145
|
};
|
|
1146
|
-
const [s] = i,
|
|
1146
|
+
const [s] = i, o = i.index, a = o + s.length, r = (e.slice(0, o) + e.slice(a)).replace(/\n/g, "");
|
|
1147
1147
|
try {
|
|
1148
1148
|
return {
|
|
1149
1149
|
resources: this.parse(s),
|
|
@@ -1171,22 +1171,22 @@ class fn {
|
|
|
1171
1171
|
static stringify(e) {
|
|
1172
1172
|
const t = document.implementation.createDocument(null, null, null), i = t.createElement("resources");
|
|
1173
1173
|
i.setAttribute("version", "1.0");
|
|
1174
|
-
const s = (
|
|
1175
|
-
return e.forEach((
|
|
1176
|
-
i.appendChild(t.createTextNode(s(
|
|
1174
|
+
const s = (a) => "\n".concat(" ".repeat(a)), o = 1;
|
|
1175
|
+
return e.forEach((a) => {
|
|
1176
|
+
i.appendChild(t.createTextNode(s(o)));
|
|
1177
1177
|
const r = t.createElement("resource");
|
|
1178
|
-
r.setAttribute("type",
|
|
1178
|
+
r.setAttribute("type", a.type), r.setAttribute("version", "1.0");
|
|
1179
1179
|
const u = (h, d) => {
|
|
1180
1180
|
const l = t.createElement(h);
|
|
1181
|
-
l.appendChild(t.createTextNode(s(
|
|
1181
|
+
l.appendChild(t.createTextNode(s(o + 1)));
|
|
1182
1182
|
const f = t.createCDATASection(JSON.stringify(d));
|
|
1183
|
-
return l.appendChild(f), l.appendChild(t.createTextNode(s(
|
|
1183
|
+
return l.appendChild(f), l.appendChild(t.createTextNode(s(o))), l;
|
|
1184
1184
|
};
|
|
1185
1185
|
r.appendChild(
|
|
1186
|
-
t.createTextNode(s(
|
|
1187
|
-
), r.appendChild(u("data",
|
|
1188
|
-
t.createTextNode(s(
|
|
1189
|
-
), r.appendChild(u("metadata",
|
|
1186
|
+
t.createTextNode(s(o + 1))
|
|
1187
|
+
), r.appendChild(u("data", a.data)), r.appendChild(
|
|
1188
|
+
t.createTextNode(s(o + 1))
|
|
1189
|
+
), r.appendChild(u("metadata", a.metadata)), r.appendChild(t.createTextNode(s(o))), i.appendChild(r);
|
|
1190
1190
|
}), i.appendChild(t.createTextNode("\n")), t.appendChild(i), new XMLSerializer().serializeToString(t).replace(/></g, ">\n<");
|
|
1191
1191
|
}
|
|
1192
1192
|
}
|
|
@@ -1220,11 +1220,11 @@ class ei {
|
|
|
1220
1220
|
*/
|
|
1221
1221
|
static parse(e) {
|
|
1222
1222
|
const i = new DOMParser().parseFromString(e, "text/xml");
|
|
1223
|
-
return Array.from(i.querySelectorAll("suggestion")).map((
|
|
1224
|
-
const
|
|
1223
|
+
return Array.from(i.querySelectorAll("suggestion")).map((o) => {
|
|
1224
|
+
const a = o.getAttribute("type") || "", r = o.querySelector("data"), u = o.querySelector("metadata");
|
|
1225
1225
|
try {
|
|
1226
1226
|
const h = this.getCdataContent(r), d = this.getCdataContent(u), l = h ? JSON.parse(h) : {}, f = d ? JSON.parse(d) : {};
|
|
1227
|
-
return { type:
|
|
1227
|
+
return { type: a, data: l, metadata: f };
|
|
1228
1228
|
} catch (h) {
|
|
1229
1229
|
throw new Error("XML 解析错误: ".concat(h.message));
|
|
1230
1230
|
}
|
|
@@ -1252,7 +1252,7 @@ class ei {
|
|
|
1252
1252
|
remainingText: e,
|
|
1253
1253
|
hasSuggestions: !1
|
|
1254
1254
|
};
|
|
1255
|
-
const [s] = i,
|
|
1255
|
+
const [s] = i, o = i.index, a = o + s.length, r = (e.slice(0, o) + e.slice(a)).replace(/\n/g, "");
|
|
1256
1256
|
try {
|
|
1257
1257
|
return {
|
|
1258
1258
|
suggestions: this.parse(s),
|
|
@@ -1280,33 +1280,33 @@ class ei {
|
|
|
1280
1280
|
static stringify(e) {
|
|
1281
1281
|
const t = document.implementation.createDocument(null, null, null), i = t.createElement("suggestions");
|
|
1282
1282
|
i.setAttribute("version", "1.0");
|
|
1283
|
-
const s = (
|
|
1284
|
-
return e.forEach((
|
|
1285
|
-
i.appendChild(t.createTextNode(s(
|
|
1283
|
+
const s = (a) => "\n".concat(" ".repeat(a)), o = 1;
|
|
1284
|
+
return e.forEach((a) => {
|
|
1285
|
+
i.appendChild(t.createTextNode(s(o)));
|
|
1286
1286
|
const r = t.createElement("suggestion");
|
|
1287
|
-
r.setAttribute("type",
|
|
1287
|
+
r.setAttribute("type", a.type), r.setAttribute("version", "1.0");
|
|
1288
1288
|
const u = (h, d) => {
|
|
1289
1289
|
const l = t.createElement(h);
|
|
1290
|
-
l.appendChild(t.createTextNode(s(
|
|
1290
|
+
l.appendChild(t.createTextNode(s(o + 1)));
|
|
1291
1291
|
const f = t.createCDATASection(JSON.stringify(d));
|
|
1292
|
-
return l.appendChild(f), l.appendChild(t.createTextNode(s(
|
|
1292
|
+
return l.appendChild(f), l.appendChild(t.createTextNode(s(o))), l;
|
|
1293
1293
|
};
|
|
1294
1294
|
r.appendChild(
|
|
1295
|
-
t.createTextNode(s(
|
|
1296
|
-
), r.appendChild(u("data",
|
|
1297
|
-
t.createTextNode(s(
|
|
1295
|
+
t.createTextNode(s(o + 1))
|
|
1296
|
+
), r.appendChild(u("data", a.data)), r.appendChild(
|
|
1297
|
+
t.createTextNode(s(o + 1))
|
|
1298
1298
|
), r.appendChild(
|
|
1299
|
-
u("metadata",
|
|
1300
|
-
), r.appendChild(t.createTextNode(s(
|
|
1299
|
+
u("metadata", a.metadata)
|
|
1300
|
+
), r.appendChild(t.createTextNode(s(o))), i.appendChild(r);
|
|
1301
1301
|
}), i.appendChild(t.createTextNode("\n")), t.appendChild(i), new XMLSerializer().serializeToString(t).replace(/></g, ">\n<");
|
|
1302
1302
|
}
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function nt(n) {
|
|
1305
1305
|
return n.x >= 0 && n.x <= 1 && n.y >= 0 && n.y <= 1;
|
|
1306
1306
|
}
|
|
1307
1307
|
function vn(n, e, t, i) {
|
|
1308
|
-
const s = n / window.innerWidth,
|
|
1309
|
-
return { x:
|
|
1308
|
+
const s = n / window.innerWidth, o = e / window.innerHeight, a = Math.max(0, Math.min(s, 1 - t)), r = Math.max(0, Math.min(o, 1 - i));
|
|
1309
|
+
return { x: a, y: r };
|
|
1310
1310
|
}
|
|
1311
1311
|
function mn(n) {
|
|
1312
1312
|
let e = 0;
|
|
@@ -1330,14 +1330,14 @@ function gn(n) {
|
|
|
1330
1330
|
}
|
|
1331
1331
|
function ti(n) {
|
|
1332
1332
|
const e = mn(n), t = _n(n), i = gn(n), s = e + t + i;
|
|
1333
|
-
let
|
|
1334
|
-
for (let
|
|
1335
|
-
const r =
|
|
1336
|
-
|
|
1333
|
+
let o = "";
|
|
1334
|
+
for (let a = 0; a < n.length % 10 + 10; a++) {
|
|
1335
|
+
const r = a * 7 % s.length;
|
|
1336
|
+
o += s.charAt(r);
|
|
1337
1337
|
}
|
|
1338
|
-
return
|
|
1338
|
+
return o.toUpperCase();
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function bt(n) {
|
|
1341
1341
|
return n.replace(/[^A-Z0-9]/g, "");
|
|
1342
1342
|
}
|
|
1343
1343
|
function wn(n, e) {
|
|
@@ -1354,12 +1354,12 @@ function wn(n, e) {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
1356
1356
|
function ni(n, e = 36) {
|
|
1357
|
-
const t =
|
|
1357
|
+
const t = bt(n);
|
|
1358
1358
|
if (t.length >= e)
|
|
1359
1359
|
return t.substring(0, e);
|
|
1360
1360
|
let i = t;
|
|
1361
1361
|
for (; i.length < e; )
|
|
1362
|
-
i +=
|
|
1362
|
+
i += bt(
|
|
1363
1363
|
wn(i, "combined")
|
|
1364
1364
|
);
|
|
1365
1365
|
return i.substring(0, e);
|
|
@@ -1381,37 +1381,37 @@ class ii {
|
|
|
1381
1381
|
"<tool_call>\\s*({[\\s\\S]*?})\\s*</tool_call>",
|
|
1382
1382
|
"g"
|
|
1383
1383
|
), i = e.matchAll(t), s = [];
|
|
1384
|
-
for (const
|
|
1384
|
+
for (const o of i)
|
|
1385
1385
|
try {
|
|
1386
|
-
const
|
|
1387
|
-
name:
|
|
1388
|
-
parameters:
|
|
1389
|
-
error:
|
|
1386
|
+
const a = JSON.parse(o[1]), r = {
|
|
1387
|
+
name: a.name,
|
|
1388
|
+
parameters: a.parameters,
|
|
1389
|
+
error: a.error || !1
|
|
1390
1390
|
};
|
|
1391
|
-
|
|
1392
|
-
result:
|
|
1391
|
+
a.result && Object.assign(r, {
|
|
1392
|
+
result: a.result
|
|
1393
1393
|
}), s.push(r);
|
|
1394
|
-
} catch (
|
|
1395
|
-
console.error("解析工具调用失败:",
|
|
1394
|
+
} catch (a) {
|
|
1395
|
+
console.error("解析工具调用失败:", a);
|
|
1396
1396
|
}
|
|
1397
1397
|
return s;
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
var fe,
|
|
1400
|
+
var fe, M, We, Ct, Ae = 0, bn = [], E = C, Tt = E.__b, xt = E.__r, At = E.diffed, St = E.__c, kt = E.unmount, It = E.__;
|
|
1401
1401
|
function Be(n, e) {
|
|
1402
|
-
|
|
1403
|
-
var t =
|
|
1402
|
+
E.__h && E.__h(M, n, Ae || e), Ae = 0;
|
|
1403
|
+
var t = M.__H || (M.__H = { __: [], __h: [] });
|
|
1404
1404
|
return n >= t.__.length && t.__.push({}), t.__[n];
|
|
1405
1405
|
}
|
|
1406
1406
|
function V(n) {
|
|
1407
|
-
return
|
|
1407
|
+
return Ae = 1, si(Cn, n);
|
|
1408
1408
|
}
|
|
1409
1409
|
function si(n, e, t) {
|
|
1410
1410
|
var i = Be(fe++, 2);
|
|
1411
1411
|
if (i.t = n, !i.__c && (i.__ = [t ? t(e) : Cn(void 0, e), function(r) {
|
|
1412
1412
|
var u = i.__N ? i.__N[0] : i.__[0], h = i.t(u, r);
|
|
1413
1413
|
u !== h && (i.__N = [h, i.__[1]], i.__c.setState({}));
|
|
1414
|
-
}], i.__c =
|
|
1414
|
+
}], i.__c = M, !M.__f)) {
|
|
1415
1415
|
var s = function(r, u, h) {
|
|
1416
1416
|
if (!i.__c.__H)
|
|
1417
1417
|
return !0;
|
|
@@ -1421,113 +1421,113 @@ function si(n, e, t) {
|
|
|
1421
1421
|
if (d.every(function(f) {
|
|
1422
1422
|
return !f.__N;
|
|
1423
1423
|
}))
|
|
1424
|
-
return !
|
|
1424
|
+
return !o || o.call(this, r, u, h);
|
|
1425
1425
|
var l = i.__c.props !== r;
|
|
1426
1426
|
return d.forEach(function(f) {
|
|
1427
1427
|
if (f.__N) {
|
|
1428
1428
|
var _ = f.__[0];
|
|
1429
1429
|
f.__ = f.__N, f.__N = void 0, _ !== f.__[0] && (l = !0);
|
|
1430
1430
|
}
|
|
1431
|
-
}),
|
|
1431
|
+
}), o && o.call(this, r, u, h) || l;
|
|
1432
1432
|
};
|
|
1433
|
-
|
|
1434
|
-
var
|
|
1435
|
-
|
|
1433
|
+
M.__f = !0;
|
|
1434
|
+
var o = M.shouldComponentUpdate, a = M.componentWillUpdate;
|
|
1435
|
+
M.componentWillUpdate = function(r, u, h) {
|
|
1436
1436
|
if (this.__e) {
|
|
1437
|
-
var d =
|
|
1438
|
-
|
|
1437
|
+
var d = o;
|
|
1438
|
+
o = void 0, s(r, u, h), o = d;
|
|
1439
1439
|
}
|
|
1440
|
-
|
|
1441
|
-
},
|
|
1440
|
+
a && a.call(this, r, u, h);
|
|
1441
|
+
}, M.shouldComponentUpdate = s;
|
|
1442
1442
|
}
|
|
1443
1443
|
return i.__N || i.__;
|
|
1444
1444
|
}
|
|
1445
1445
|
function D(n, e) {
|
|
1446
1446
|
var t = Be(fe++, 3);
|
|
1447
|
-
!
|
|
1447
|
+
!E.__s && yn(t.__H, e) && (t.__ = n, t.u = e, M.__H.__h.push(t));
|
|
1448
1448
|
}
|
|
1449
1449
|
function O(n) {
|
|
1450
|
-
return
|
|
1450
|
+
return Ae = 5, J(function() {
|
|
1451
1451
|
return { current: n };
|
|
1452
1452
|
}, []);
|
|
1453
1453
|
}
|
|
1454
1454
|
function J(n, e) {
|
|
1455
1455
|
var t = Be(fe++, 7);
|
|
1456
|
-
return
|
|
1456
|
+
return yn(t.__H, e) && (t.__ = n(), t.__H = e, t.__h = n), t.__;
|
|
1457
1457
|
}
|
|
1458
1458
|
function je(n, e) {
|
|
1459
|
-
return
|
|
1459
|
+
return Ae = 8, J(function() {
|
|
1460
1460
|
return n;
|
|
1461
1461
|
}, e);
|
|
1462
1462
|
}
|
|
1463
|
-
function
|
|
1464
|
-
var e =
|
|
1465
|
-
return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(
|
|
1463
|
+
function ht(n) {
|
|
1464
|
+
var e = M.context[n.__c], t = Be(fe++, 9);
|
|
1465
|
+
return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(M)), e.props.value) : n.__;
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1468
|
-
for (var n; n =
|
|
1467
|
+
function ai() {
|
|
1468
|
+
for (var n; n = bn.shift(); )
|
|
1469
1469
|
if (n.__P && n.__H)
|
|
1470
1470
|
try {
|
|
1471
|
-
n.__H.__h.forEach(
|
|
1471
|
+
n.__H.__h.forEach(Ee), n.__H.__h.forEach(it), n.__H.__h = [];
|
|
1472
1472
|
} catch (e) {
|
|
1473
|
-
n.__H.__h = [],
|
|
1473
|
+
n.__H.__h = [], E.__e(e, n.__v);
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
},
|
|
1479
|
-
n && e.__k && e.__k.__m && (n.__m = e.__k.__m),
|
|
1480
|
-
},
|
|
1481
|
-
|
|
1482
|
-
var e = (
|
|
1483
|
-
e && (We ===
|
|
1476
|
+
E.__b = function(n) {
|
|
1477
|
+
M = null, Tt && Tt(n);
|
|
1478
|
+
}, E.__ = function(n, e) {
|
|
1479
|
+
n && e.__k && e.__k.__m && (n.__m = e.__k.__m), It && It(n, e);
|
|
1480
|
+
}, E.__r = function(n) {
|
|
1481
|
+
xt && xt(n), fe = 0;
|
|
1482
|
+
var e = (M = n.__c).__H;
|
|
1483
|
+
e && (We === M ? (e.__h = [], M.__h = [], e.__.forEach(function(t) {
|
|
1484
1484
|
t.__N && (t.__ = t.__N), t.u = t.__N = void 0;
|
|
1485
|
-
})) : (e.__h.forEach(
|
|
1486
|
-
},
|
|
1487
|
-
|
|
1485
|
+
})) : (e.__h.forEach(Ee), e.__h.forEach(it), e.__h = [], fe = 0)), We = M;
|
|
1486
|
+
}, E.diffed = function(n) {
|
|
1487
|
+
At && At(n);
|
|
1488
1488
|
var e = n.__c;
|
|
1489
|
-
e && e.__H && (e.__H.__h.length && (
|
|
1489
|
+
e && e.__H && (e.__H.__h.length && (bn.push(e) !== 1 && Ct === E.requestAnimationFrame || ((Ct = E.requestAnimationFrame) || oi)(ai)), e.__H.__.forEach(function(t) {
|
|
1490
1490
|
t.u && (t.__H = t.u), t.u = void 0;
|
|
1491
|
-
})), We =
|
|
1492
|
-
},
|
|
1491
|
+
})), We = M = null;
|
|
1492
|
+
}, E.__c = function(n, e) {
|
|
1493
1493
|
e.some(function(t) {
|
|
1494
1494
|
try {
|
|
1495
|
-
t.__h.forEach(
|
|
1496
|
-
return !i.__ ||
|
|
1495
|
+
t.__h.forEach(Ee), t.__h = t.__h.filter(function(i) {
|
|
1496
|
+
return !i.__ || it(i);
|
|
1497
1497
|
});
|
|
1498
1498
|
} catch (i) {
|
|
1499
1499
|
e.some(function(s) {
|
|
1500
1500
|
s.__h && (s.__h = []);
|
|
1501
|
-
}), e = [],
|
|
1501
|
+
}), e = [], E.__e(i, t.__v);
|
|
1502
1502
|
}
|
|
1503
1503
|
}), St && St(n, e);
|
|
1504
|
-
},
|
|
1505
|
-
|
|
1504
|
+
}, E.unmount = function(n) {
|
|
1505
|
+
kt && kt(n);
|
|
1506
1506
|
var e, t = n.__c;
|
|
1507
1507
|
t && t.__H && (t.__H.__.forEach(function(i) {
|
|
1508
1508
|
try {
|
|
1509
|
-
|
|
1509
|
+
Ee(i);
|
|
1510
1510
|
} catch (s) {
|
|
1511
1511
|
e = s;
|
|
1512
1512
|
}
|
|
1513
|
-
}), t.__H = void 0, e &&
|
|
1513
|
+
}), t.__H = void 0, e && E.__e(e, t.__v));
|
|
1514
1514
|
};
|
|
1515
|
-
var
|
|
1516
|
-
function
|
|
1515
|
+
var Mt = typeof requestAnimationFrame == "function";
|
|
1516
|
+
function oi(n) {
|
|
1517
1517
|
var e, t = function() {
|
|
1518
|
-
clearTimeout(i),
|
|
1518
|
+
clearTimeout(i), Mt && cancelAnimationFrame(e), setTimeout(n);
|
|
1519
1519
|
}, i = setTimeout(t, 35);
|
|
1520
|
-
|
|
1520
|
+
Mt && (e = requestAnimationFrame(t));
|
|
1521
1521
|
}
|
|
1522
|
-
function
|
|
1523
|
-
var e =
|
|
1524
|
-
typeof t == "function" && (n.__c = void 0, t()),
|
|
1522
|
+
function Ee(n) {
|
|
1523
|
+
var e = M, t = n.__c;
|
|
1524
|
+
typeof t == "function" && (n.__c = void 0, t()), M = e;
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1527
|
-
var e =
|
|
1528
|
-
n.__c = n.__(),
|
|
1526
|
+
function it(n) {
|
|
1527
|
+
var e = M;
|
|
1528
|
+
n.__c = n.__(), M = e;
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1530
|
+
function yn(n, e) {
|
|
1531
1531
|
return !n || n.length !== e.length || e.some(function(t, i) {
|
|
1532
1532
|
return t !== n[i];
|
|
1533
1533
|
});
|
|
@@ -1536,15 +1536,15 @@ function Cn(n, e) {
|
|
|
1536
1536
|
return typeof e == "function" ? e(n) : e;
|
|
1537
1537
|
}
|
|
1538
1538
|
var ri = Symbol.for("preact-signals");
|
|
1539
|
-
function
|
|
1539
|
+
function dt() {
|
|
1540
1540
|
if (de > 1)
|
|
1541
1541
|
de--;
|
|
1542
1542
|
else {
|
|
1543
1543
|
for (var n, e = !1; Ce !== void 0; ) {
|
|
1544
1544
|
var t = Ce;
|
|
1545
|
-
for (Ce = void 0,
|
|
1545
|
+
for (Ce = void 0, st++; t !== void 0; ) {
|
|
1546
1546
|
var i = t.o;
|
|
1547
|
-
if (t.o = void 0, t.f &= -3, !(8 & t.f) &&
|
|
1547
|
+
if (t.o = void 0, t.f &= -3, !(8 & t.f) && An(t))
|
|
1548
1548
|
try {
|
|
1549
1549
|
t.c();
|
|
1550
1550
|
} catch (s) {
|
|
@@ -1553,45 +1553,45 @@ function ht() {
|
|
|
1553
1553
|
t = i;
|
|
1554
1554
|
}
|
|
1555
1555
|
}
|
|
1556
|
-
if (
|
|
1556
|
+
if (st = 0, de--, e)
|
|
1557
1557
|
throw n;
|
|
1558
1558
|
}
|
|
1559
1559
|
}
|
|
1560
|
-
var
|
|
1560
|
+
var S = void 0;
|
|
1561
1561
|
function Tn(n) {
|
|
1562
|
-
var e =
|
|
1563
|
-
|
|
1562
|
+
var e = S;
|
|
1563
|
+
S = void 0;
|
|
1564
1564
|
try {
|
|
1565
1565
|
return n();
|
|
1566
1566
|
} finally {
|
|
1567
|
-
|
|
1567
|
+
S = e;
|
|
1568
1568
|
}
|
|
1569
1569
|
}
|
|
1570
|
-
var Ce = void 0, de = 0,
|
|
1570
|
+
var Ce = void 0, de = 0, st = 0, ze = 0;
|
|
1571
1571
|
function xn(n) {
|
|
1572
|
-
if (
|
|
1572
|
+
if (S !== void 0) {
|
|
1573
1573
|
var e = n.n;
|
|
1574
|
-
if (e === void 0 || e.t !==
|
|
1575
|
-
return e = { i: 0, S: n, p:
|
|
1574
|
+
if (e === void 0 || e.t !== S)
|
|
1575
|
+
return e = { i: 0, S: n, p: S.s, n: void 0, t: S, e: void 0, x: void 0, r: e }, S.s !== void 0 && (S.s.n = e), S.s = e, n.n = e, 32 & S.f && n.S(e), e;
|
|
1576
1576
|
if (e.i === -1)
|
|
1577
|
-
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p =
|
|
1577
|
+
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = S.s, e.n = void 0, S.s.n = e, S.s = e), e;
|
|
1578
1578
|
}
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1580
|
+
function z(n, e) {
|
|
1581
1581
|
this.v = n, this.i = 0, this.n = void 0, this.t = void 0, this.W = e == null ? void 0 : e.watched, this.Z = e == null ? void 0 : e.unwatched, this.name = e == null ? void 0 : e.name;
|
|
1582
1582
|
}
|
|
1583
|
-
|
|
1584
|
-
|
|
1583
|
+
z.prototype.brand = ri;
|
|
1584
|
+
z.prototype.h = function() {
|
|
1585
1585
|
return !0;
|
|
1586
1586
|
};
|
|
1587
|
-
|
|
1587
|
+
z.prototype.S = function(n) {
|
|
1588
1588
|
var e = this, t = this.t;
|
|
1589
1589
|
t !== n && n.e === void 0 && (n.x = t, this.t = n, t !== void 0 ? t.e = n : Tn(function() {
|
|
1590
1590
|
var i;
|
|
1591
1591
|
(i = e.W) == null || i.call(e);
|
|
1592
1592
|
}));
|
|
1593
1593
|
};
|
|
1594
|
-
|
|
1594
|
+
z.prototype.U = function(n) {
|
|
1595
1595
|
var e = this;
|
|
1596
1596
|
if (this.t !== void 0) {
|
|
1597
1597
|
var t = n.e, i = n.x;
|
|
@@ -1601,62 +1601,62 @@ H.prototype.U = function(n) {
|
|
|
1601
1601
|
}));
|
|
1602
1602
|
}
|
|
1603
1603
|
};
|
|
1604
|
-
|
|
1604
|
+
z.prototype.subscribe = function(n) {
|
|
1605
1605
|
var e = this;
|
|
1606
|
-
return
|
|
1607
|
-
var t = e.value, i =
|
|
1608
|
-
|
|
1606
|
+
return ft(function() {
|
|
1607
|
+
var t = e.value, i = S;
|
|
1608
|
+
S = void 0;
|
|
1609
1609
|
try {
|
|
1610
1610
|
n(t);
|
|
1611
1611
|
} finally {
|
|
1612
|
-
|
|
1612
|
+
S = i;
|
|
1613
1613
|
}
|
|
1614
1614
|
}, { name: "sub" });
|
|
1615
1615
|
};
|
|
1616
|
-
|
|
1616
|
+
z.prototype.valueOf = function() {
|
|
1617
1617
|
return this.value;
|
|
1618
1618
|
};
|
|
1619
|
-
|
|
1619
|
+
z.prototype.toString = function() {
|
|
1620
1620
|
return this.value + "";
|
|
1621
1621
|
};
|
|
1622
|
-
|
|
1622
|
+
z.prototype.toJSON = function() {
|
|
1623
1623
|
return this.value;
|
|
1624
1624
|
};
|
|
1625
|
-
|
|
1626
|
-
var n =
|
|
1627
|
-
|
|
1625
|
+
z.prototype.peek = function() {
|
|
1626
|
+
var n = S;
|
|
1627
|
+
S = void 0;
|
|
1628
1628
|
try {
|
|
1629
1629
|
return this.value;
|
|
1630
1630
|
} finally {
|
|
1631
|
-
|
|
1631
|
+
S = n;
|
|
1632
1632
|
}
|
|
1633
1633
|
};
|
|
1634
|
-
Object.defineProperty(
|
|
1634
|
+
Object.defineProperty(z.prototype, "value", { get: function() {
|
|
1635
1635
|
var n = xn(this);
|
|
1636
1636
|
return n !== void 0 && (n.i = this.i), this.v;
|
|
1637
1637
|
}, set: function(n) {
|
|
1638
1638
|
if (n !== this.v) {
|
|
1639
|
-
if (
|
|
1639
|
+
if (st > 100)
|
|
1640
1640
|
throw new Error("Cycle detected");
|
|
1641
|
-
this.v = n, this.i++,
|
|
1641
|
+
this.v = n, this.i++, ze++, de++;
|
|
1642
1642
|
try {
|
|
1643
1643
|
for (var e = this.t; e !== void 0; e = e.x)
|
|
1644
1644
|
e.t.N();
|
|
1645
1645
|
} finally {
|
|
1646
|
-
|
|
1646
|
+
dt();
|
|
1647
1647
|
}
|
|
1648
1648
|
}
|
|
1649
1649
|
} });
|
|
1650
1650
|
function q(n, e) {
|
|
1651
|
-
return new
|
|
1651
|
+
return new z(n, e);
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1653
|
+
function An(n) {
|
|
1654
1654
|
for (var e = n.s; e !== void 0; e = e.n)
|
|
1655
1655
|
if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i)
|
|
1656
1656
|
return !0;
|
|
1657
1657
|
return !1;
|
|
1658
1658
|
}
|
|
1659
|
-
function
|
|
1659
|
+
function Sn(n) {
|
|
1660
1660
|
for (var e = n.s; e !== void 0; e = e.n) {
|
|
1661
1661
|
var t = e.S.n;
|
|
1662
1662
|
if (t !== void 0 && (e.r = t), e.S.n = e, e.i = -1, e.n === void 0) {
|
|
@@ -1672,50 +1672,50 @@ function kn(n) {
|
|
|
1672
1672
|
}
|
|
1673
1673
|
n.s = t;
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1676
|
-
|
|
1675
|
+
function oe(n, e) {
|
|
1676
|
+
z.call(this, void 0), this.x = n, this.s = void 0, this.g = ze - 1, this.f = 4, this.W = e == null ? void 0 : e.watched, this.Z = e == null ? void 0 : e.unwatched, this.name = e == null ? void 0 : e.name;
|
|
1677
1677
|
}
|
|
1678
|
-
|
|
1679
|
-
|
|
1678
|
+
oe.prototype = new z();
|
|
1679
|
+
oe.prototype.h = function() {
|
|
1680
1680
|
if (this.f &= -3, 1 & this.f)
|
|
1681
1681
|
return !1;
|
|
1682
|
-
if ((36 & this.f) == 32 || (this.f &= -5, this.g ===
|
|
1682
|
+
if ((36 & this.f) == 32 || (this.f &= -5, this.g === ze))
|
|
1683
1683
|
return !0;
|
|
1684
|
-
if (this.g =
|
|
1684
|
+
if (this.g = ze, this.f |= 1, this.i > 0 && !An(this))
|
|
1685
1685
|
return this.f &= -2, !0;
|
|
1686
|
-
var n =
|
|
1686
|
+
var n = S;
|
|
1687
1687
|
try {
|
|
1688
|
-
|
|
1688
|
+
Sn(this), S = this;
|
|
1689
1689
|
var e = this.x();
|
|
1690
1690
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
|
1691
1691
|
} catch (t) {
|
|
1692
1692
|
this.v = t, this.f |= 16, this.i++;
|
|
1693
1693
|
}
|
|
1694
|
-
return
|
|
1694
|
+
return S = n, kn(this), this.f &= -2, !0;
|
|
1695
1695
|
};
|
|
1696
|
-
|
|
1696
|
+
oe.prototype.S = function(n) {
|
|
1697
1697
|
if (this.t === void 0) {
|
|
1698
1698
|
this.f |= 36;
|
|
1699
1699
|
for (var e = this.s; e !== void 0; e = e.n)
|
|
1700
1700
|
e.S.S(e);
|
|
1701
1701
|
}
|
|
1702
|
-
|
|
1702
|
+
z.prototype.S.call(this, n);
|
|
1703
1703
|
};
|
|
1704
|
-
|
|
1705
|
-
if (this.t !== void 0 && (
|
|
1704
|
+
oe.prototype.U = function(n) {
|
|
1705
|
+
if (this.t !== void 0 && (z.prototype.U.call(this, n), this.t === void 0)) {
|
|
1706
1706
|
this.f &= -33;
|
|
1707
1707
|
for (var e = this.s; e !== void 0; e = e.n)
|
|
1708
1708
|
e.S.U(e);
|
|
1709
1709
|
}
|
|
1710
1710
|
};
|
|
1711
|
-
|
|
1711
|
+
oe.prototype.N = function() {
|
|
1712
1712
|
if (!(2 & this.f)) {
|
|
1713
1713
|
this.f |= 6;
|
|
1714
1714
|
for (var n = this.t; n !== void 0; n = n.x)
|
|
1715
1715
|
n.t.N();
|
|
1716
1716
|
}
|
|
1717
1717
|
};
|
|
1718
|
-
Object.defineProperty(
|
|
1718
|
+
Object.defineProperty(oe.prototype, "value", { get: function() {
|
|
1719
1719
|
if (1 & this.f)
|
|
1720
1720
|
throw new Error("Cycle detected");
|
|
1721
1721
|
var n = xn(this);
|
|
@@ -1724,32 +1724,32 @@ Object.defineProperty(se.prototype, "value", { get: function() {
|
|
|
1724
1724
|
return this.v;
|
|
1725
1725
|
} });
|
|
1726
1726
|
function In(n, e) {
|
|
1727
|
-
return new
|
|
1727
|
+
return new oe(n, e);
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function Mn(n) {
|
|
1730
1730
|
var e = n.u;
|
|
1731
1731
|
if (n.u = void 0, typeof e == "function") {
|
|
1732
1732
|
de++;
|
|
1733
|
-
var t =
|
|
1734
|
-
|
|
1733
|
+
var t = S;
|
|
1734
|
+
S = void 0;
|
|
1735
1735
|
try {
|
|
1736
1736
|
e();
|
|
1737
1737
|
} catch (i) {
|
|
1738
|
-
throw n.f &= -2, n.f |= 8,
|
|
1738
|
+
throw n.f &= -2, n.f |= 8, pt(n), i;
|
|
1739
1739
|
} finally {
|
|
1740
|
-
|
|
1740
|
+
S = t, dt();
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function pt(n) {
|
|
1745
1745
|
for (var e = n.s; e !== void 0; e = e.n)
|
|
1746
1746
|
e.S.U(e);
|
|
1747
|
-
n.x = void 0, n.s = void 0,
|
|
1747
|
+
n.x = void 0, n.s = void 0, Mn(n);
|
|
1748
1748
|
}
|
|
1749
1749
|
function ci(n) {
|
|
1750
|
-
if (
|
|
1750
|
+
if (S !== this)
|
|
1751
1751
|
throw new Error("Out-of-order effect");
|
|
1752
|
-
kn(this),
|
|
1752
|
+
kn(this), S = n, this.f &= -2, 8 & this.f && pt(this), dt();
|
|
1753
1753
|
}
|
|
1754
1754
|
function ve(n, e) {
|
|
1755
1755
|
this.x = n, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = e == null ? void 0 : e.name;
|
|
@@ -1768,20 +1768,20 @@ ve.prototype.c = function() {
|
|
|
1768
1768
|
ve.prototype.S = function() {
|
|
1769
1769
|
if (1 & this.f)
|
|
1770
1770
|
throw new Error("Cycle detected");
|
|
1771
|
-
this.f |= 1, this.f &= -9,
|
|
1772
|
-
var n =
|
|
1773
|
-
return
|
|
1771
|
+
this.f |= 1, this.f &= -9, Mn(this), Sn(this), de++;
|
|
1772
|
+
var n = S;
|
|
1773
|
+
return S = this, ci.bind(this, n);
|
|
1774
1774
|
};
|
|
1775
1775
|
ve.prototype.N = function() {
|
|
1776
1776
|
2 & this.f || (this.f |= 2, this.o = Ce, Ce = this);
|
|
1777
1777
|
};
|
|
1778
1778
|
ve.prototype.d = function() {
|
|
1779
|
-
this.f |= 8, 1 & this.f ||
|
|
1779
|
+
this.f |= 8, 1 & this.f || pt(this);
|
|
1780
1780
|
};
|
|
1781
1781
|
ve.prototype.dispose = function() {
|
|
1782
1782
|
this.d();
|
|
1783
1783
|
};
|
|
1784
|
-
function
|
|
1784
|
+
function ft(n, e) {
|
|
1785
1785
|
var t = new ve(n, e);
|
|
1786
1786
|
try {
|
|
1787
1787
|
t.c();
|
|
@@ -1796,30 +1796,30 @@ function me(n, e) {
|
|
|
1796
1796
|
C[n] = e.bind(null, C[n] || function() {
|
|
1797
1797
|
});
|
|
1798
1798
|
}
|
|
1799
|
-
function
|
|
1799
|
+
function He(n) {
|
|
1800
1800
|
Ve && Ve(), Ve = n && n.S();
|
|
1801
1801
|
}
|
|
1802
|
-
function
|
|
1803
|
-
var e = this, t = n.data, i =
|
|
1802
|
+
function Nn(n) {
|
|
1803
|
+
var e = this, t = n.data, i = $(t);
|
|
1804
1804
|
i.value = t;
|
|
1805
1805
|
var s = J(function() {
|
|
1806
|
-
for (var
|
|
1807
|
-
if (
|
|
1808
|
-
|
|
1806
|
+
for (var o = e.__v; o = o.__; )
|
|
1807
|
+
if (o.__c) {
|
|
1808
|
+
o.__c.__$f |= 4;
|
|
1809
1809
|
break;
|
|
1810
1810
|
}
|
|
1811
1811
|
return e.__$u.c = function() {
|
|
1812
|
-
var
|
|
1813
|
-
r(),
|
|
1812
|
+
var a, r = e.__$u.S(), u = s.value;
|
|
1813
|
+
r(), tn(u) || ((a = e.base) == null ? void 0 : a.nodeType) !== 3 ? (e.__$f |= 1, e.setState({})) : e.base.data = u;
|
|
1814
1814
|
}, In(function() {
|
|
1815
|
-
var
|
|
1816
|
-
return
|
|
1815
|
+
var a = i.value.value;
|
|
1816
|
+
return a === 0 ? 0 : a === !0 ? "" : a || "";
|
|
1817
1817
|
});
|
|
1818
1818
|
}, []);
|
|
1819
1819
|
return s.value;
|
|
1820
1820
|
}
|
|
1821
|
-
|
|
1822
|
-
Object.defineProperties(
|
|
1821
|
+
Nn.displayName = "_st";
|
|
1822
|
+
Object.defineProperties(z.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Nn }, props: { configurable: !0, get: function() {
|
|
1823
1823
|
return { data: this };
|
|
1824
1824
|
} }, __b: { configurable: !0, value: 1 } });
|
|
1825
1825
|
me("__b", function(n, e) {
|
|
@@ -1827,56 +1827,56 @@ me("__b", function(n, e) {
|
|
|
1827
1827
|
var t, i = e.props;
|
|
1828
1828
|
for (var s in i)
|
|
1829
1829
|
if (s !== "children") {
|
|
1830
|
-
var
|
|
1831
|
-
|
|
1830
|
+
var o = i[s];
|
|
1831
|
+
o instanceof z && (t || (e.__np = t = {}), t[s] = o, i[s] = o.peek());
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
1834
|
n(e);
|
|
1835
1835
|
});
|
|
1836
1836
|
me("__r", function(n, e) {
|
|
1837
|
-
|
|
1837
|
+
He();
|
|
1838
1838
|
var t, i = e.__c;
|
|
1839
1839
|
i && (i.__$f &= -2, (t = i.__$u) === void 0 && (i.__$u = t = function(s) {
|
|
1840
|
-
var
|
|
1841
|
-
return
|
|
1842
|
-
|
|
1843
|
-
}),
|
|
1840
|
+
var o;
|
|
1841
|
+
return ft(function() {
|
|
1842
|
+
o = this;
|
|
1843
|
+
}), o.c = function() {
|
|
1844
1844
|
i.__$f |= 1, i.setState({});
|
|
1845
|
-
},
|
|
1846
|
-
}())), Pe = i,
|
|
1845
|
+
}, o;
|
|
1846
|
+
}())), Pe = i, He(t), n(e);
|
|
1847
1847
|
});
|
|
1848
1848
|
me("__e", function(n, e, t, i) {
|
|
1849
|
-
|
|
1849
|
+
He(), Pe = void 0, n(e, t, i);
|
|
1850
1850
|
});
|
|
1851
1851
|
me("diffed", function(n, e) {
|
|
1852
|
-
|
|
1852
|
+
He(), Pe = void 0;
|
|
1853
1853
|
var t;
|
|
1854
1854
|
if (typeof e.type == "string" && (t = e.__e)) {
|
|
1855
1855
|
var i = e.__np, s = e.props;
|
|
1856
1856
|
if (i) {
|
|
1857
|
-
var
|
|
1858
|
-
if (
|
|
1859
|
-
for (var
|
|
1860
|
-
var r = a
|
|
1861
|
-
r !== void 0 && !(
|
|
1857
|
+
var o = t.U;
|
|
1858
|
+
if (o)
|
|
1859
|
+
for (var a in o) {
|
|
1860
|
+
var r = o[a];
|
|
1861
|
+
r !== void 0 && !(a in i) && (r.d(), o[a] = void 0);
|
|
1862
1862
|
}
|
|
1863
1863
|
else
|
|
1864
|
-
t.U =
|
|
1864
|
+
t.U = o = {};
|
|
1865
1865
|
for (var u in i) {
|
|
1866
|
-
var h =
|
|
1867
|
-
h === void 0 ? (h = li(t, u, d, s),
|
|
1866
|
+
var h = o[u], d = i[u];
|
|
1867
|
+
h === void 0 ? (h = li(t, u, d, s), o[u] = h) : h.o(d, s);
|
|
1868
1868
|
}
|
|
1869
1869
|
}
|
|
1870
1870
|
}
|
|
1871
1871
|
n(e);
|
|
1872
1872
|
});
|
|
1873
1873
|
function li(n, e, t, i) {
|
|
1874
|
-
var s = e in n && n.ownerSVGElement === void 0,
|
|
1875
|
-
return { o: function(
|
|
1876
|
-
|
|
1877
|
-
}, d:
|
|
1878
|
-
var
|
|
1879
|
-
i[e] !==
|
|
1874
|
+
var s = e in n && n.ownerSVGElement === void 0, o = q(t);
|
|
1875
|
+
return { o: function(a, r) {
|
|
1876
|
+
o.value = a, i = r;
|
|
1877
|
+
}, d: ft(function() {
|
|
1878
|
+
var a = o.value.value;
|
|
1879
|
+
i[e] !== a && (i[e] = a, s ? n[e] = a : a ? n.setAttribute(e, a) : n.removeAttribute(e));
|
|
1880
1880
|
}) };
|
|
1881
1881
|
}
|
|
1882
1882
|
me("unmount", function(n, e) {
|
|
@@ -1887,16 +1887,16 @@ me("unmount", function(n, e) {
|
|
|
1887
1887
|
if (i) {
|
|
1888
1888
|
t.U = void 0;
|
|
1889
1889
|
for (var s in i) {
|
|
1890
|
-
var
|
|
1891
|
-
|
|
1890
|
+
var o = i[s];
|
|
1891
|
+
o && o.d();
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
} else {
|
|
1896
|
-
var
|
|
1897
|
-
if (
|
|
1898
|
-
var r =
|
|
1899
|
-
r && (
|
|
1896
|
+
var a = e.__c;
|
|
1897
|
+
if (a) {
|
|
1898
|
+
var r = a.__$u;
|
|
1899
|
+
r && (a.__$u = void 0, r.d());
|
|
1900
1900
|
}
|
|
1901
1901
|
}
|
|
1902
1902
|
n(e);
|
|
@@ -1904,7 +1904,7 @@ me("unmount", function(n, e) {
|
|
|
1904
1904
|
me("__h", function(n, e, t, i) {
|
|
1905
1905
|
(i < 3 || i === 9) && (e.__$f |= 2), n(e, t, i);
|
|
1906
1906
|
});
|
|
1907
|
-
|
|
1907
|
+
U.prototype.shouldComponentUpdate = function(n, e) {
|
|
1908
1908
|
var t = this.__$u, i = t && t.s !== void 0;
|
|
1909
1909
|
for (var s in e)
|
|
1910
1910
|
return !0;
|
|
@@ -1913,15 +1913,15 @@ F.prototype.shouldComponentUpdate = function(n, e) {
|
|
|
1913
1913
|
return !0;
|
|
1914
1914
|
} else if (!(i || 4 & this.__$f) || 3 & this.__$f)
|
|
1915
1915
|
return !0;
|
|
1916
|
-
for (var
|
|
1917
|
-
if (
|
|
1916
|
+
for (var o in n)
|
|
1917
|
+
if (o !== "__source" && n[o] !== this.props[o])
|
|
1918
1918
|
return !0;
|
|
1919
|
-
for (var
|
|
1920
|
-
if (!(
|
|
1919
|
+
for (var a in this.props)
|
|
1920
|
+
if (!(a in n))
|
|
1921
1921
|
return !0;
|
|
1922
1922
|
return !1;
|
|
1923
1923
|
};
|
|
1924
|
-
function
|
|
1924
|
+
function $(n) {
|
|
1925
1925
|
return J(function() {
|
|
1926
1926
|
return q(n);
|
|
1927
1927
|
}, []);
|
|
@@ -1982,7 +1982,7 @@ const ui = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
1982
1982
|
fill: "currentColor"
|
|
1983
1983
|
}
|
|
1984
1984
|
)
|
|
1985
|
-
] }),
|
|
1985
|
+
] }), bi = () => /* @__PURE__ */ c(
|
|
1986
1986
|
"svg",
|
|
1987
1987
|
{
|
|
1988
1988
|
viewBox: "64 64 896 896",
|
|
@@ -1993,7 +1993,7 @@ const ui = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
1993
1993
|
"aria-hidden": "true",
|
|
1994
1994
|
children: /* @__PURE__ */ c("path", { d: "M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z" })
|
|
1995
1995
|
}
|
|
1996
|
-
),
|
|
1996
|
+
), yi = () => /* @__PURE__ */ c(
|
|
1997
1997
|
"svg",
|
|
1998
1998
|
{
|
|
1999
1999
|
fill: "currentColor",
|
|
@@ -2060,7 +2060,7 @@ const ui = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2060
2060
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2061
2061
|
children: /* @__PURE__ */ c("path", { d: "M498.33984 607.8464c-10.99776-32.9728-50.09408-73.5232-82.6368-85.74976L150.9376 422.8096c-38.54336-14.4384-36.98688-69.46816 2.27328-81.73568L844.92288 124.90752c33.30048-10.40384 64.57344 20.8896 54.1696 54.1696L682.92608 870.78912a43.2128 43.2128 0 0 1-81.36704 3.25632 121682.5344 121682.5344 0 0 1-103.2192-266.19904z" })
|
|
2062
2062
|
}
|
|
2063
|
-
),
|
|
2063
|
+
), $n = () => /* @__PURE__ */ c(
|
|
2064
2064
|
"svg",
|
|
2065
2065
|
{
|
|
2066
2066
|
className: "icon",
|
|
@@ -2128,7 +2128,7 @@ const ui = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2128
2128
|
}
|
|
2129
2129
|
)
|
|
2130
2130
|
}
|
|
2131
|
-
),
|
|
2131
|
+
), Ai = () => /* @__PURE__ */ c(
|
|
2132
2132
|
"svg",
|
|
2133
2133
|
{
|
|
2134
2134
|
className: "icon",
|
|
@@ -2139,7 +2139,7 @@ const ui = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2139
2139
|
height: "18",
|
|
2140
2140
|
children: /* @__PURE__ */ c("path", { d: "M704 256v490.666667a170.666667 170.666667 0 0 1-170.666667 170.666666 170.666667 170.666667 0 0 1-170.666666-170.666666V213.333333A106.666667 106.666667 0 0 1 469.333333 106.666667 106.666667 106.666667 0 0 1 576 213.333333v448a42.666667 42.666667 0 0 1-42.666667 42.666667 42.666667 42.666667 0 0 1-42.666666-42.666667V256H426.666667v405.333333a106.666667 106.666667 0 0 0 106.666666 106.666667 106.666667 106.666667 0 0 0 106.666667-106.666667V213.333333a170.666667 170.666667 0 0 0-170.666667-170.666666 170.666667 170.666667 0 0 0-170.666666 170.666666v533.333334a234.666667 234.666667 0 0 0 234.666666 234.666666 234.666667 234.666667 0 0 0 234.666667-234.666666V256h-64z" })
|
|
2141
2141
|
}
|
|
2142
|
-
),
|
|
2142
|
+
), En = () => /* @__PURE__ */ c(
|
|
2143
2143
|
"svg",
|
|
2144
2144
|
{
|
|
2145
2145
|
className: "icon",
|
|
@@ -2165,7 +2165,7 @@ const ui = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2165
2165
|
)
|
|
2166
2166
|
]
|
|
2167
2167
|
}
|
|
2168
|
-
),
|
|
2168
|
+
), Si = () => /* @__PURE__ */ c(
|
|
2169
2169
|
"svg",
|
|
2170
2170
|
{
|
|
2171
2171
|
className: "icon",
|
|
@@ -2220,7 +2220,7 @@ const ui = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2220
2220
|
)
|
|
2221
2221
|
]
|
|
2222
2222
|
}
|
|
2223
|
-
),
|
|
2223
|
+
), Mi = (n) => /* @__PURE__ */ c(
|
|
2224
2224
|
"svg",
|
|
2225
2225
|
{
|
|
2226
2226
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2238,7 +2238,7 @@ const ui = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2238
2238
|
}
|
|
2239
2239
|
)
|
|
2240
2240
|
}
|
|
2241
|
-
),
|
|
2241
|
+
), Ni = () => /* @__PURE__ */ c(
|
|
2242
2242
|
"svg",
|
|
2243
2243
|
{
|
|
2244
2244
|
viewBox: "0 0 1024 1024",
|
|
@@ -2252,7 +2252,7 @@ const ui = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2252
2252
|
/* @__PURE__ */ c("path", { d: "M341.376 691.52a32 32 0 0 1 32 32V851.2a32 32 0 1 1-64 0v-127.68a32 32 0 0 1 32-32zM512 691.2a32 32 0 0 1 32 32v128a32 32 0 0 1-64 0v-128a32 32 0 0 1 32-32zM682.688 691.52a32 32 0 0 1 32 32V851.2a32 32 0 1 1-64 0v-127.68a32 32 0 0 1 32-32z" })
|
|
2253
2253
|
]
|
|
2254
2254
|
}
|
|
2255
|
-
),
|
|
2255
|
+
), $i = () => /* @__PURE__ */ c(
|
|
2256
2256
|
"svg",
|
|
2257
2257
|
{
|
|
2258
2258
|
viewBox: "0 0 1024 1024",
|
|
@@ -2262,7 +2262,7 @@ const ui = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2262
2262
|
height: "18",
|
|
2263
2263
|
children: /* @__PURE__ */ c("path", { d: "M843.251 424.407l43.828-74.898c10.194-17.946 32.596-22.158 48.956-11.598 16.298 10.499 23.44 32.658 14.223 49.566l-113.11 195.212-61.164-40.044-126.418-82.285c-16.115-11.598-20.632-34.428-10.194-51.702 9.705-17.397 31.009-23.501 47.857-13.734l89.67 59.028C748.576 295.547 615.81 180.667 461.008 180.667c-177.387 0-320.042 148.758-320.042 331.335 0 183.613 143.692 331.334 319.981 331.334 107.861 0.184 208.58-56.158 268.034-149.858 1.099-1.038 1.099-2.075 2.075-2.075 6.348-9.949 17.092-15.871 28.568-15.81 19.35 0 35.648 16.848 35.648 36.93 0 7.508-2.137 14.833-6.104 21.059-72.823 114.698-196.066 183.675-328.099 183.614-216.088 0-391.4-181.478-391.4-405.195 0-223.718 175.312-405.195 391.339-405.195 183.125-0.427 342.016 131.606 382.243 317.601z" })
|
|
2264
2264
|
}
|
|
2265
|
-
),
|
|
2265
|
+
), Ei = () => /* @__PURE__ */ c(
|
|
2266
2266
|
"svg",
|
|
2267
2267
|
{
|
|
2268
2268
|
version: "1.1",
|
|
@@ -2298,21 +2298,53 @@ const ui = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2298
2298
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2299
2299
|
children: /* @__PURE__ */ c("path", { d: "M896 870.4l-128-128c55.467-68.267 89.6-149.333 89.6-238.933 0-98.134-38.4-192-110.933-264.534-149.334-149.333-384-149.333-533.334-4.266-145.066 145.066-145.066 384 0 529.066 72.534 72.534 166.4 110.934 264.534 110.934 89.6 0 174.933-29.867 238.933-89.6l128 128c4.267 4.266 12.8 8.533 21.333 8.533s17.067-4.267 21.334-8.533c17.066-8.534 17.066-29.867 8.533-42.667zM260.267 721.067c-119.467-123.734-119.467-320 0-439.467 59.733-59.733 140.8-89.6 217.6-89.6 81.066 0 157.866 29.867 217.6 89.6 59.733 59.733 89.6 136.533 89.6 217.6 0 81.067-34.134 162.133-89.6 217.6-55.467 59.733-132.267 93.867-217.6 93.867-81.067 0-157.867-34.134-217.6-89.6z" })
|
|
2300
2300
|
}
|
|
2301
|
+
), zi = () => /* @__PURE__ */ c(
|
|
2302
|
+
"svg",
|
|
2303
|
+
{
|
|
2304
|
+
className: "icon",
|
|
2305
|
+
viewBox: "0 0 1024 1024",
|
|
2306
|
+
version: "1.1",
|
|
2307
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2308
|
+
stroke: "currentColor",
|
|
2309
|
+
width: "1em",
|
|
2310
|
+
height: "1em",
|
|
2311
|
+
children: /* @__PURE__ */ c("path", { d: "M497.0496 55.7056a38.4 38.4 0 0 1 38.912 0l362.7008 213.2992c11.776 6.912 18.944 19.456 18.944 33.1264v426.6496a38.4 38.4 0 0 1-18.944 33.0752l-362.6496 213.3504a38.4 38.4 0 0 1-38.912 0L134.3488 761.856a38.4 38.4 0 0 1-18.944-33.0752V302.1312a38.4 38.4 0 0 1 18.944-33.1264z m19.456 77.6192L192.3072 324.096v382.72l324.3008 190.7712 324.2496-190.7712V324.096l-324.2496-190.7712zM345.9584 370.3296c7.68 0 14.848 2.2528 20.8384 6.144l149.6576 93.696 149.8624-93.696a38.4512 38.4512 0 0 1 49.1008 58.2656l-1.792 1.792a38.6048 38.6048 0 0 1-6.656 5.12l-152.0128 94.976v170.4448a38.4 38.4 0 0 1-0.1536 3.7376l-0.512 3.7376a38.0928 38.0928 0 0 1-23.04 27.9552 38.0928 38.0928 0 0 1-35.9936-3.5328 38.1952 38.1952 0 0 1-17.0496-31.8976v-170.2912l-152.064-95.1296a38.4 38.4 0 0 1 19.7632-71.3216z" })
|
|
2312
|
+
}
|
|
2313
|
+
), Hi = () => /* @__PURE__ */ c(
|
|
2314
|
+
"svg",
|
|
2315
|
+
{
|
|
2316
|
+
className: "icon",
|
|
2317
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2318
|
+
fill: "none",
|
|
2319
|
+
viewBox: "0 0 24 24",
|
|
2320
|
+
stroke: "currentColor",
|
|
2321
|
+
width: "1em",
|
|
2322
|
+
height: "1em",
|
|
2323
|
+
children: /* @__PURE__ */ c(
|
|
2324
|
+
"path",
|
|
2325
|
+
{
|
|
2326
|
+
strokeLinecap: "round",
|
|
2327
|
+
strokeLinejoin: "round",
|
|
2328
|
+
strokeWidth: "2",
|
|
2329
|
+
d: "M19 9l-7 7-7-7"
|
|
2330
|
+
}
|
|
2331
|
+
)
|
|
2332
|
+
}
|
|
2301
2333
|
);
|
|
2302
|
-
const
|
|
2303
|
-
const { items: e } = n, t =
|
|
2334
|
+
const Oi = (n) => {
|
|
2335
|
+
const { items: e } = n, t = $([]), i = new k("chat-thought-chain"), s = $([]);
|
|
2304
2336
|
D(() => {
|
|
2305
|
-
s.value = e.filter((
|
|
2306
|
-
|
|
2337
|
+
s.value = e.filter((a) => a.description), s.value.length > 0 && s.value.forEach((a, r) => {
|
|
2338
|
+
a.done && (t.value = [...t.value, r]);
|
|
2307
2339
|
});
|
|
2308
2340
|
}, [e]);
|
|
2309
|
-
const
|
|
2310
|
-
t.value.includes(
|
|
2311
|
-
(r) => r !==
|
|
2312
|
-
) : t.value = [...t.value,
|
|
2341
|
+
const o = (a) => {
|
|
2342
|
+
t.value.includes(a) ? t.value = t.value.filter(
|
|
2343
|
+
(r) => r !== a
|
|
2344
|
+
) : t.value = [...t.value, a];
|
|
2313
2345
|
};
|
|
2314
|
-
return s.value.length === 0 ? null : /* @__PURE__ */ c("div", { className: "".concat(i.b(), " ").concat(i.is("single", s.value.length === 1)), children: s.value.map((
|
|
2315
|
-
if (!
|
|
2346
|
+
return s.value.length === 0 ? null : /* @__PURE__ */ c("div", { className: "".concat(i.b(), " ").concat(i.is("single", s.value.length === 1)), children: s.value.map((a, r) => {
|
|
2347
|
+
if (!a.description)
|
|
2316
2348
|
return;
|
|
2317
2349
|
const u = t.value.includes(r);
|
|
2318
2350
|
return /* @__PURE__ */ c(
|
|
@@ -2320,20 +2352,20 @@ const Hi = (n) => {
|
|
|
2320
2352
|
{
|
|
2321
2353
|
className: "".concat(i.e("item"), " ").concat(i.is("collapsed", u)),
|
|
2322
2354
|
children: [
|
|
2323
|
-
/* @__PURE__ */ c("div", { className: i.e("item-icon"), children:
|
|
2355
|
+
/* @__PURE__ */ c("div", { className: i.e("item-icon"), children: a.icon || /* @__PURE__ */ c("span", { children: r }) }),
|
|
2324
2356
|
/* @__PURE__ */ c("div", { className: i.e("item-content"), children: [
|
|
2325
2357
|
/* @__PURE__ */ c(
|
|
2326
2358
|
"div",
|
|
2327
2359
|
{
|
|
2328
2360
|
className: i.e("item-title"),
|
|
2329
|
-
onClick: () =>
|
|
2361
|
+
onClick: () => o(r),
|
|
2330
2362
|
children: [
|
|
2331
|
-
|
|
2363
|
+
a.title,
|
|
2332
2364
|
/* @__PURE__ */ c(xi, { className: i.e("icon") })
|
|
2333
2365
|
]
|
|
2334
2366
|
}
|
|
2335
2367
|
),
|
|
2336
|
-
/* @__PURE__ */ c("div", { className: i.e("item-description"), children:
|
|
2368
|
+
/* @__PURE__ */ c("div", { className: i.e("item-description"), children: a.description })
|
|
2337
2369
|
] })
|
|
2338
2370
|
]
|
|
2339
2371
|
},
|
|
@@ -2341,32 +2373,32 @@ const Hi = (n) => {
|
|
|
2341
2373
|
);
|
|
2342
2374
|
}) });
|
|
2343
2375
|
};
|
|
2344
|
-
const
|
|
2345
|
-
const { items: e, onItemClick: t } = n, i = (
|
|
2346
|
-
t == null || t(
|
|
2376
|
+
const Bi = (n) => {
|
|
2377
|
+
const { items: e, onItemClick: t } = n, i = (o, a) => {
|
|
2378
|
+
t == null || t(o, a);
|
|
2347
2379
|
}, s = new k("chat-suggestions");
|
|
2348
|
-
return /* @__PURE__ */ c("div", { className: "".concat(s.b()), children: e.map((
|
|
2380
|
+
return /* @__PURE__ */ c("div", { className: "".concat(s.b()), children: e.map((o, a) => /* @__PURE__ */ c(
|
|
2349
2381
|
"div",
|
|
2350
2382
|
{
|
|
2351
2383
|
className: "".concat(s.e("item"), " ").concat(s.is(
|
|
2352
2384
|
"action",
|
|
2353
|
-
|
|
2385
|
+
o.type === "action"
|
|
2354
2386
|
)),
|
|
2355
|
-
onClick: (r) => i(
|
|
2356
|
-
title:
|
|
2387
|
+
onClick: (r) => i(o, r),
|
|
2388
|
+
title: o.metadata.content_name,
|
|
2357
2389
|
children: [
|
|
2358
|
-
|
|
2390
|
+
o.metadata.content_name,
|
|
2359
2391
|
/* @__PURE__ */ c(Di, { className: "".concat(s.e("item-icon")) })
|
|
2360
2392
|
]
|
|
2361
2393
|
},
|
|
2362
|
-
|
|
2394
|
+
a
|
|
2363
2395
|
)) });
|
|
2364
2396
|
};
|
|
2365
|
-
const
|
|
2366
|
-
const e = new k("chat-tool-call-item"), t =
|
|
2397
|
+
const Pi = (n) => {
|
|
2398
|
+
const e = new k("chat-tool-call-item"), t = $(!1), i = $(!1);
|
|
2367
2399
|
let s;
|
|
2368
|
-
const
|
|
2369
|
-
t.value = !t.value, u("code-block-".concat(
|
|
2400
|
+
const o = ae(), a = () => {
|
|
2401
|
+
t.value = !t.value, u("code-block-".concat(o), n.item);
|
|
2370
2402
|
}, r = (l) => {
|
|
2371
2403
|
l.stopPropagation(), s && clearTimeout(s), i.value = !0, navigator.clipboard.writeText(JSON.stringify(n.item, void 0, 2)), window.ibiz.message.success("已复制"), s = setTimeout(() => {
|
|
2372
2404
|
i.value = !1;
|
|
@@ -2382,8 +2414,8 @@ const Oi = (n) => {
|
|
|
2382
2414
|
h(f, _).forEach((w, g) => {
|
|
2383
2415
|
const v = document.createElement("div");
|
|
2384
2416
|
v.className = "code-line";
|
|
2385
|
-
const
|
|
2386
|
-
|
|
2417
|
+
const y = document.createElement("span");
|
|
2418
|
+
y && (y.className = "line-number", y.textContent = (g + 1).toString(), v.appendChild(y), v.innerHTML += w, p.appendChild(v));
|
|
2387
2419
|
});
|
|
2388
2420
|
}, h = (l, f = 0) => {
|
|
2389
2421
|
const _ = " ".repeat(f), p = [];
|
|
@@ -2399,13 +2431,13 @@ const Oi = (n) => {
|
|
|
2399
2431
|
if (m.length === 0)
|
|
2400
2432
|
return ["".concat(_, '<span class="property">{}</span>')];
|
|
2401
2433
|
p.push("".concat(_, '<span class="property">{</span>')), m.forEach((w, g) => {
|
|
2402
|
-
const v = l[w],
|
|
2434
|
+
const v = l[w], y = g < m.length - 1 ? "," : "", x = '<span class="json-key">"'.concat(w, '":</span>');
|
|
2403
2435
|
if (typeof v == "object" && v !== null) {
|
|
2404
|
-
const
|
|
2405
|
-
p.push("".concat(_, " ").concat(
|
|
2436
|
+
const A = h(v, f + 1);
|
|
2437
|
+
p.push("".concat(_, " ").concat(x, " ").concat(A[0].trim())), A.length > 1 && (p.push(...A.slice(1, -1)), p.push("".concat(A[A.length - 1]).concat(y)));
|
|
2406
2438
|
} else {
|
|
2407
|
-
const
|
|
2408
|
-
p.push("".concat(_, " ").concat(
|
|
2439
|
+
const A = d(v);
|
|
2440
|
+
p.push("".concat(_, " ").concat(x, " ").concat(A).concat(y));
|
|
2409
2441
|
}
|
|
2410
2442
|
}), p.push("".concat(_, '<span class="property">}</span>'));
|
|
2411
2443
|
} else
|
|
@@ -2413,7 +2445,7 @@ const Oi = (n) => {
|
|
|
2413
2445
|
return p;
|
|
2414
2446
|
}, d = (l) => typeof l == "string" ? l.includes("Failed") || l.includes("Error") || l.includes("ERR_") ? '<span class="error">"'.concat(l, '"</span>') : '<span class="string">"'.concat(l, '"</span>') : typeof l == "number" ? '<span class="number">'.concat(l, "</span>") : typeof l == "boolean" ? '<span class="boolean">'.concat(l, "</span>") : l === null ? '<span class="null">null</span>' : "";
|
|
2415
2447
|
return /* @__PURE__ */ c("div", { className: "".concat(e.b()), children: [
|
|
2416
|
-
/* @__PURE__ */ c("div", { className: e.e("header"), onClick: () =>
|
|
2448
|
+
/* @__PURE__ */ c("div", { className: e.e("header"), onClick: () => a(), children: [
|
|
2417
2449
|
/* @__PURE__ */ c("div", { className: e.e("header-left"), children: [
|
|
2418
2450
|
/* @__PURE__ */ c("div", { className: e.em("header-left", "caption"), children: n.item.name }),
|
|
2419
2451
|
/* @__PURE__ */ c("div", { className: e.em("header-left", "desc"), children: n.item.parameters.desc })
|
|
@@ -2502,28 +2534,28 @@ const Oi = (n) => {
|
|
|
2502
2534
|
)
|
|
2503
2535
|
] })
|
|
2504
2536
|
] }),
|
|
2505
|
-
/* @__PURE__ */ c("div", { className: e.e("content"), id: "code-block-".concat(
|
|
2537
|
+
/* @__PURE__ */ c("div", { className: e.e("content"), id: "code-block-".concat(o) })
|
|
2506
2538
|
] });
|
|
2507
2539
|
};
|
|
2508
|
-
const
|
|
2509
|
-
const { items: e } = n, t = new k("chat-tool-call"), i =
|
|
2540
|
+
const Ri = (n) => {
|
|
2541
|
+
const { items: e } = n, t = new k("chat-tool-call"), i = $([]), s = $(!1), o = $(!1);
|
|
2510
2542
|
D(() => {
|
|
2511
|
-
i.value = e.filter((u) => u),
|
|
2543
|
+
i.value = e.filter((u) => u), o.value = e.length > 4;
|
|
2512
2544
|
}, [e]);
|
|
2513
|
-
const
|
|
2545
|
+
const a = B(() => o.value && !s.value ? i.value.slice(0, 4) : i.value), r = () => {
|
|
2514
2546
|
s.value = !s.value;
|
|
2515
2547
|
};
|
|
2516
2548
|
return /* @__PURE__ */ c("div", { className: "".concat(t.b()), children: [
|
|
2517
|
-
|
|
2518
|
-
|
|
2549
|
+
a.value.map((u, h) => /* @__PURE__ */ c(Pi, { item: u }, h)),
|
|
2550
|
+
o.value && /* @__PURE__ */ c("div", { className: t.e("toggle"), onClick: r, children: s.value ? "收起工具调用" : "展开全部 ".concat(i.value.length, " 个工具调用") })
|
|
2519
2551
|
] });
|
|
2520
2552
|
};
|
|
2521
|
-
const ne = new k("markdown-message"),
|
|
2522
|
-
const { message: e, size: t } = n, i =
|
|
2553
|
+
const ne = new k("markdown-message"), Fi = (n) => {
|
|
2554
|
+
const { message: e, size: t } = n, i = $(ae()), s = $(null), o = J(() => e.state === 20 && e.completed !== !0, [e.state, e.completed]), a = J(() => e.state === 20 && e.completed === !0, [e.state, e.completed]), r = $({
|
|
2523
2555
|
title: "",
|
|
2524
2556
|
description: "",
|
|
2525
2557
|
icon: /* @__PURE__ */ c(Ye, {})
|
|
2526
|
-
}), u =
|
|
2558
|
+
}), u = $({ hasSuggestions: !1, suggestions: [] }), h = (f) => {
|
|
2527
2559
|
f && f.length > 0 ? u.value = {
|
|
2528
2560
|
hasSuggestions: !0,
|
|
2529
2561
|
suggestions: f
|
|
@@ -2558,7 +2590,7 @@ const ne = new k("markdown-message"), Pi = (n) => {
|
|
|
2558
2590
|
}, m && (f = m);
|
|
2559
2591
|
} else
|
|
2560
2592
|
e.content.indexOf("<tool_call>") !== -1 ? f = e.content.replace(new RegExp("\\<tool_call\\>[^]*?\\<\\/tool_call\\>", "gs"), "").trim() : f = e.content;
|
|
2561
|
-
h(e.suggestions), s.value = new
|
|
2593
|
+
h(e.suggestions), s.value = new Qt({
|
|
2562
2594
|
// @ts-ignore
|
|
2563
2595
|
id: i,
|
|
2564
2596
|
value: f || "",
|
|
@@ -2585,19 +2617,19 @@ const ne = new k("markdown-message"), Pi = (n) => {
|
|
|
2585
2617
|
}
|
|
2586
2618
|
}
|
|
2587
2619
|
});
|
|
2588
|
-
}, []), /* @__PURE__ */ c("div", { className: "".concat(ne.b(), " ").concat(ne.is("loading",
|
|
2620
|
+
}, []), /* @__PURE__ */ c("div", { className: "".concat(ne.b(), " ").concat(ne.is("loading", o)), children: [
|
|
2589
2621
|
/* @__PURE__ */ c("div", { className: ne.b("header"), children: [
|
|
2590
2622
|
/* @__PURE__ */ c("div", { className: ne.be("header", "caption"), children: "AI " }),
|
|
2591
2623
|
n.children,
|
|
2592
|
-
|
|
2624
|
+
a ? /* @__PURE__ */ c("div", { className: ne.be("header", "timeout"), children: "请求超时" }) : null
|
|
2593
2625
|
] }),
|
|
2594
2626
|
/* @__PURE__ */ c("div", { className: "".concat(ne.b("content"), " pre-wrap-container"), children: [
|
|
2595
|
-
/* @__PURE__ */ c(
|
|
2596
|
-
e.toolcalls && e.toolcalls.length > 0 ? /* @__PURE__ */ c(
|
|
2627
|
+
/* @__PURE__ */ c(Oi, { items: [r.value] }),
|
|
2628
|
+
e.toolcalls && e.toolcalls.length > 0 ? /* @__PURE__ */ c(Ri, { items: e.toolcalls || [] }) : null,
|
|
2597
2629
|
/* @__PURE__ */ c("div", { id: i })
|
|
2598
2630
|
] }),
|
|
2599
2631
|
/* @__PURE__ */ c("div", { className: ne.b("footer"), children: u.value.hasSuggestions ? /* @__PURE__ */ c(
|
|
2600
|
-
|
|
2632
|
+
Bi,
|
|
2601
2633
|
{
|
|
2602
2634
|
items: u.value.suggestions,
|
|
2603
2635
|
onItemClick: (f, _) => {
|
|
@@ -2607,10 +2639,10 @@ const ne = new k("markdown-message"), Pi = (n) => {
|
|
|
2607
2639
|
) : null })
|
|
2608
2640
|
] });
|
|
2609
2641
|
};
|
|
2610
|
-
const _e = new k("ossfile-material"),
|
|
2642
|
+
const _e = new k("ossfile-material"), Ui = (n) => {
|
|
2611
2643
|
const e = B(() => n.material.data.name), t = B(() => n.material.metadata.size), i = B(() => {
|
|
2612
|
-
const
|
|
2613
|
-
return
|
|
2644
|
+
const o = n.material.metadata.state;
|
|
2645
|
+
return o === "successed" ? "上传成功" : o === "uploading" ? "上传中" : o === "failed" ? "上传失败" : "未知状态";
|
|
2614
2646
|
}), s = B(() => {
|
|
2615
2647
|
switch (n.material.metadata.state) {
|
|
2616
2648
|
case "successed":
|
|
@@ -2624,7 +2656,7 @@ const _e = new k("ossfile-material"), Ri = (n) => {
|
|
|
2624
2656
|
}
|
|
2625
2657
|
});
|
|
2626
2658
|
return /* @__PURE__ */ c("div", { className: _e.b(), children: [
|
|
2627
|
-
/* @__PURE__ */ c("div", { className: _e.b("left"), children: /* @__PURE__ */ c(
|
|
2659
|
+
/* @__PURE__ */ c("div", { className: _e.b("left"), children: /* @__PURE__ */ c(En, {}) }),
|
|
2628
2660
|
/* @__PURE__ */ c("div", { className: _e.b("right"), children: [
|
|
2629
2661
|
/* @__PURE__ */ c("div", { className: _e.e("name"), title: e, children: e }),
|
|
2630
2662
|
/* @__PURE__ */ c("div", { className: _e.e("metadata"), children: [
|
|
@@ -2637,13 +2669,13 @@ const _e = new k("ossfile-material"), Ri = (n) => {
|
|
|
2637
2669
|
] })
|
|
2638
2670
|
] });
|
|
2639
2671
|
};
|
|
2640
|
-
const ge = new k("common-material"),
|
|
2641
|
-
var i, s,
|
|
2672
|
+
const ge = new k("common-material"), Wi = (n) => {
|
|
2673
|
+
var i, s, o, a;
|
|
2642
2674
|
const e = (i = n.controller.opts.questionToolbarItems) == null ? void 0 : i.find(
|
|
2643
2675
|
(r) => r.id === n.material.metadata.actionId
|
|
2644
2676
|
), t = B(() => n.material.metadata.name);
|
|
2645
2677
|
return /* @__PURE__ */ c("div", { className: ge.b(), children: [
|
|
2646
|
-
/* @__PURE__ */ c("div", { className: ge.b("left"), children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((s = e.icon) == null ? void 0 : s.showIcon) && /* @__PURE__ */ c(Z, { children: (
|
|
2678
|
+
/* @__PURE__ */ c("div", { className: ge.b("left"), children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((s = e.icon) == null ? void 0 : s.showIcon) && /* @__PURE__ */ c(Z, { children: (o = e.icon) != null && o.cssClass ? /* @__PURE__ */ c("i", { className: e.icon.cssClass }) : (a = e.icon) != null && a.imagePath ? ut(e.icon.imagePath) ? /* @__PURE__ */ c(
|
|
2647
2679
|
"div",
|
|
2648
2680
|
{
|
|
2649
2681
|
dangerouslySetInnerHTML: {
|
|
@@ -2662,26 +2694,26 @@ const Xe = new k("chat-input-material-item"), Dn = (n) => {
|
|
|
2662
2694
|
let t = null;
|
|
2663
2695
|
switch (e.type) {
|
|
2664
2696
|
case "ossfile":
|
|
2665
|
-
t =
|
|
2697
|
+
t = Ui;
|
|
2666
2698
|
break;
|
|
2667
2699
|
default:
|
|
2668
|
-
t =
|
|
2700
|
+
t = Wi;
|
|
2669
2701
|
}
|
|
2670
2702
|
const i = () => {
|
|
2671
2703
|
n.controller.deleteMaterial(e);
|
|
2672
2704
|
};
|
|
2673
2705
|
return /* @__PURE__ */ c("div", { className: "".concat(Xe.b(), " ").concat(Xe.is("disabled", n.disabled)), children: [
|
|
2674
|
-
/* @__PURE__ */ c("div", { className: Xe.e("icon"), onClick: i, children: /* @__PURE__ */ c(
|
|
2706
|
+
/* @__PURE__ */ c("div", { className: Xe.e("icon"), onClick: i, children: /* @__PURE__ */ c(Si, {}) }),
|
|
2675
2707
|
X(t, {
|
|
2676
2708
|
material: e,
|
|
2677
2709
|
controller: n.controller
|
|
2678
2710
|
})
|
|
2679
2711
|
] });
|
|
2680
2712
|
};
|
|
2681
|
-
const
|
|
2682
|
-
const e =
|
|
2713
|
+
const ce = new k("user-message-question"), ji = (n) => {
|
|
2714
|
+
const e = $(ae()), t = $(null), i = B(() => n.message.content), s = B(() => tt.parseMixedContent(i.value));
|
|
2683
2715
|
return D(() => {
|
|
2684
|
-
t.value = new
|
|
2716
|
+
t.value = new Qt({
|
|
2685
2717
|
id: e,
|
|
2686
2718
|
value: s.value.remainingText || "",
|
|
2687
2719
|
editor: {
|
|
@@ -2705,26 +2737,26 @@ const ae = new k("user-message-question"), Ui = (n) => {
|
|
|
2705
2737
|
}
|
|
2706
2738
|
}
|
|
2707
2739
|
});
|
|
2708
|
-
}, [s.value.remainingText]), /* @__PURE__ */ c("div", { className:
|
|
2709
|
-
/* @__PURE__ */ c("div", { className:
|
|
2740
|
+
}, [s.value.remainingText]), /* @__PURE__ */ c("div", { className: ce.b(), children: [
|
|
2741
|
+
/* @__PURE__ */ c("div", { className: ce.e("user-header"), children: [
|
|
2710
2742
|
n.children,
|
|
2711
|
-
/* @__PURE__ */ c("div", { className:
|
|
2743
|
+
/* @__PURE__ */ c("div", { className: ce.e("user"), children: "我" })
|
|
2712
2744
|
] }),
|
|
2713
|
-
/* @__PURE__ */ c("div", { className:
|
|
2714
|
-
s.value.hasResources && /* @__PURE__ */ c("div", { className:
|
|
2745
|
+
/* @__PURE__ */ c("div", { className: ce.e("content"), children: /* @__PURE__ */ c("div", { className: ce.em("content", "body"), children: [
|
|
2746
|
+
s.value.hasResources && /* @__PURE__ */ c("div", { className: ce.em("content", "material"), children: s.value.resources.map((o) => /* @__PURE__ */ c(
|
|
2715
2747
|
Dn,
|
|
2716
2748
|
{
|
|
2717
|
-
material:
|
|
2749
|
+
material: o,
|
|
2718
2750
|
disabled: !0,
|
|
2719
2751
|
controller: n.controller
|
|
2720
2752
|
},
|
|
2721
|
-
|
|
2753
|
+
o.id
|
|
2722
2754
|
)) }),
|
|
2723
2755
|
/* @__PURE__ */ c("div", { className: "pre-wrap-container", children: /* @__PURE__ */ c("div", { id: e }) })
|
|
2724
2756
|
] }) })
|
|
2725
2757
|
] });
|
|
2726
2758
|
};
|
|
2727
|
-
const Ie = new k("error-message"),
|
|
2759
|
+
const Ie = new k("error-message"), Vi = (n) => {
|
|
2728
2760
|
const e = B(() => n.message.content);
|
|
2729
2761
|
return /* @__PURE__ */ c("div", { className: Ie.b(), children: [
|
|
2730
2762
|
/* @__PURE__ */ c("div", { className: Ie.b("header"), children: [
|
|
@@ -2734,40 +2766,40 @@ const Ie = new k("error-message"), Wi = (n) => {
|
|
|
2734
2766
|
/* @__PURE__ */ c("div", { className: "".concat(Ie.e("content"), " pre-wrap-container"), children: /* @__PURE__ */ c("span", { children: e }) })
|
|
2735
2767
|
] });
|
|
2736
2768
|
};
|
|
2737
|
-
const $t = new k("unknown-message"),
|
|
2769
|
+
const $t = new k("unknown-message"), qi = (n) => /* @__PURE__ */ c("div", { className: $t.b(), children: /* @__PURE__ */ c("div", { className: "".concat($t.e("content"), " pre-wrap-container"), children: [
|
|
2738
2770
|
"暂未支持的消息类型: ",
|
|
2739
2771
|
n.message.type
|
|
2740
2772
|
] }) });
|
|
2741
|
-
const
|
|
2773
|
+
const Yi = new k("chat-message-item"), Xi = (n) => {
|
|
2742
2774
|
const { message: e, size: t } = n;
|
|
2743
2775
|
let i = null;
|
|
2744
2776
|
switch (e.type) {
|
|
2745
2777
|
case "DEFAULT":
|
|
2746
|
-
i = e.role === "ASSISTANT" ?
|
|
2778
|
+
i = e.role === "ASSISTANT" ? Fi : ji;
|
|
2747
2779
|
break;
|
|
2748
2780
|
case "ERROR":
|
|
2749
|
-
i =
|
|
2781
|
+
i = Vi;
|
|
2750
2782
|
break;
|
|
2751
2783
|
default:
|
|
2752
|
-
i =
|
|
2784
|
+
i = qi;
|
|
2753
2785
|
}
|
|
2754
|
-
return /* @__PURE__ */ c("div", { className:
|
|
2786
|
+
return /* @__PURE__ */ c("div", { className: Yi.b(), children: X(i, {
|
|
2755
2787
|
size: t,
|
|
2756
2788
|
message: e,
|
|
2757
2789
|
controller: n.controller,
|
|
2758
2790
|
children: n.children
|
|
2759
2791
|
}) });
|
|
2760
2792
|
};
|
|
2761
|
-
class
|
|
2793
|
+
class ie {
|
|
2762
2794
|
constructor(e) {
|
|
2763
|
-
|
|
2795
|
+
T(this, "toolcalls", []);
|
|
2764
2796
|
/**
|
|
2765
2797
|
* @description 消息的所有原始内容
|
|
2766
2798
|
* - 用于维护工具调用消息数据
|
|
2767
2799
|
* @type {string}
|
|
2768
2800
|
* @memberof ChatMessage
|
|
2769
2801
|
*/
|
|
2770
|
-
|
|
2802
|
+
T(this, "allcontent", "");
|
|
2771
2803
|
this.msg = e, this.toolcalls = e.toolcalls || [], this.allcontent = e.content;
|
|
2772
2804
|
}
|
|
2773
2805
|
get messageid() {
|
|
@@ -2881,7 +2913,7 @@ class Ze {
|
|
|
2881
2913
|
return this.material.data;
|
|
2882
2914
|
}
|
|
2883
2915
|
}
|
|
2884
|
-
class
|
|
2916
|
+
class Zi {
|
|
2885
2917
|
constructor(e) {
|
|
2886
2918
|
this.agent = e;
|
|
2887
2919
|
}
|
|
@@ -2904,26 +2936,26 @@ class Yi {
|
|
|
2904
2936
|
return this.agent.caption;
|
|
2905
2937
|
}
|
|
2906
2938
|
}
|
|
2907
|
-
const
|
|
2939
|
+
const H = new k("chat-toolbar-item"), Ji = (n) => {
|
|
2908
2940
|
var m, w, g;
|
|
2909
2941
|
const {
|
|
2910
2942
|
model: e,
|
|
2911
2943
|
data: t,
|
|
2912
2944
|
className: i,
|
|
2913
2945
|
disabled: s = !1,
|
|
2914
|
-
buttonType:
|
|
2915
|
-
onClick:
|
|
2946
|
+
buttonType: o = "default",
|
|
2947
|
+
onClick: a
|
|
2916
2948
|
} = n, [r, u] = V(!1), h = O(null), d = (v) => typeof v.hidden == "function" ? v.hidden(t) : v.hidden === !0;
|
|
2917
2949
|
if (d(e))
|
|
2918
2950
|
return /* @__PURE__ */ c(Z, {});
|
|
2919
2951
|
const l = (v) => s ? !0 : typeof v.disabled == "function" ? v.disabled(t) : v.disabled === !0, f = (v) => {
|
|
2920
|
-
var
|
|
2952
|
+
var y, x, A, L;
|
|
2921
2953
|
if (typeof v.icon == "function")
|
|
2922
2954
|
return v.icon();
|
|
2923
|
-
if ((
|
|
2955
|
+
if ((y = v.icon) != null && y.showIcon && ((x = v.icon) != null && x.cssClass))
|
|
2924
2956
|
return /* @__PURE__ */ c("i", { className: v.icon.cssClass });
|
|
2925
|
-
if ((
|
|
2926
|
-
return
|
|
2957
|
+
if ((A = v.icon) != null && A.showIcon && ((L = v.icon) != null && L.imagePath))
|
|
2958
|
+
return ut(v.icon.imagePath) ? /* @__PURE__ */ c(
|
|
2927
2959
|
"div",
|
|
2928
2960
|
{
|
|
2929
2961
|
dangerouslySetInnerHTML: {
|
|
@@ -2933,12 +2965,12 @@ const z = new k("chat-toolbar-item"), Xi = (n) => {
|
|
|
2933
2965
|
) : /* @__PURE__ */ c("img", { src: v.icon.imagePath });
|
|
2934
2966
|
}, _ = (v) => {
|
|
2935
2967
|
l(e) || u(!0);
|
|
2936
|
-
}, p = (v,
|
|
2937
|
-
l(
|
|
2968
|
+
}, p = (v, y) => {
|
|
2969
|
+
l(y) || (u(!1), a(v, y));
|
|
2938
2970
|
};
|
|
2939
2971
|
return D(() => {
|
|
2940
|
-
const v = (
|
|
2941
|
-
h.current && h.current.contains(
|
|
2972
|
+
const v = (y) => {
|
|
2973
|
+
h.current && h.current.contains(y.target) || u(!1);
|
|
2942
2974
|
};
|
|
2943
2975
|
return r && document.addEventListener("mousedown", v), () => {
|
|
2944
2976
|
document.removeEventListener("mousedown", v);
|
|
@@ -2946,7 +2978,7 @@ const z = new k("chat-toolbar-item"), Xi = (n) => {
|
|
|
2946
2978
|
}, [r]), /* @__PURE__ */ c(
|
|
2947
2979
|
"div",
|
|
2948
2980
|
{
|
|
2949
|
-
className: "".concat(
|
|
2981
|
+
className: "".concat(H.b(), " ").concat(H.b(o), " ").concat(e.customClass || "", " ").concat(i || "", " ").concat(H.is("disabled", l(e)), " ").concat(H.is(
|
|
2950
2982
|
"more",
|
|
2951
2983
|
!!((m = e.children) != null && m.length)
|
|
2952
2984
|
)),
|
|
@@ -2955,49 +2987,49 @@ const z = new k("chat-toolbar-item"), Xi = (n) => {
|
|
|
2955
2987
|
"div",
|
|
2956
2988
|
{
|
|
2957
2989
|
title: e.title,
|
|
2958
|
-
className:
|
|
2990
|
+
className: H.e("content"),
|
|
2959
2991
|
onClick: (v) => p(v, e),
|
|
2960
2992
|
children: [
|
|
2961
|
-
/* @__PURE__ */ c("div", { className:
|
|
2962
|
-
/* @__PURE__ */ c("div", { className:
|
|
2993
|
+
/* @__PURE__ */ c("div", { className: H.em("content", "icon"), children: f(e) }),
|
|
2994
|
+
/* @__PURE__ */ c("div", { className: H.em("content", "label"), children: e.label })
|
|
2963
2995
|
]
|
|
2964
2996
|
}
|
|
2965
2997
|
),
|
|
2966
|
-
((w = e.children) == null ? void 0 : w.length) && /* @__PURE__ */ c("div", { title: "更多", className:
|
|
2998
|
+
((w = e.children) == null ? void 0 : w.length) && /* @__PURE__ */ c("div", { title: "更多", className: H.e("more"), onClick: _, children: /* @__PURE__ */ c(
|
|
2967
2999
|
"i",
|
|
2968
3000
|
{
|
|
2969
3001
|
"aria-hidden": "true",
|
|
2970
|
-
className: "fa fa-angle-down ".concat(
|
|
3002
|
+
className: "fa fa-angle-down ".concat(H.em("more", "icon"))
|
|
2971
3003
|
}
|
|
2972
3004
|
) }),
|
|
2973
|
-
r && /* @__PURE__ */ c("div", { ref: h, className:
|
|
3005
|
+
r && /* @__PURE__ */ c("div", { ref: h, className: H.b("dropdown"), children: (g = e.children) == null ? void 0 : g.map((v, y) => {
|
|
2974
3006
|
if (!d(v))
|
|
2975
3007
|
return /* @__PURE__ */ c(
|
|
2976
3008
|
"div",
|
|
2977
3009
|
{
|
|
2978
3010
|
title: v.title,
|
|
2979
|
-
onClick: (
|
|
2980
|
-
className: "".concat(
|
|
3011
|
+
onClick: (x) => p(x, v),
|
|
3012
|
+
className: "".concat(H.be("dropdown", "item"), " ").concat(v.customClass || "", " ").concat(H.is("disabled", l(v))),
|
|
2981
3013
|
children: [
|
|
2982
|
-
/* @__PURE__ */ c("div", { className:
|
|
2983
|
-
/* @__PURE__ */ c("div", { className:
|
|
3014
|
+
/* @__PURE__ */ c("div", { className: H.bem("dropdown", "item", "icon"), children: f(v) }),
|
|
3015
|
+
/* @__PURE__ */ c("div", { className: H.bem("dropdown", "item", "label"), children: v.label })
|
|
2984
3016
|
]
|
|
2985
3017
|
},
|
|
2986
|
-
|
|
3018
|
+
y
|
|
2987
3019
|
);
|
|
2988
3020
|
}) })
|
|
2989
3021
|
]
|
|
2990
3022
|
}
|
|
2991
3023
|
);
|
|
2992
3024
|
};
|
|
2993
|
-
const
|
|
2994
|
-
const { controller: e, items: t = [], data: i, type: s, className:
|
|
3025
|
+
const Ki = new k("chat-toolbar"), at = (n) => {
|
|
3026
|
+
const { controller: e, items: t = [], data: i, type: s, className: o, mode: a } = n, r = ht(Re);
|
|
2995
3027
|
let u = [];
|
|
2996
3028
|
const h = [
|
|
2997
3029
|
{
|
|
2998
3030
|
label: "重置对话",
|
|
2999
3031
|
title: "重置对话",
|
|
3000
|
-
icon: () => /* @__PURE__ */ c(
|
|
3032
|
+
icon: () => /* @__PURE__ */ c($i, {}),
|
|
3001
3033
|
onClick: () => {
|
|
3002
3034
|
e.resetTopic();
|
|
3003
3035
|
},
|
|
@@ -3005,7 +3037,7 @@ const Zi = new k("chat-toolbar"), st = (n) => {
|
|
|
3005
3037
|
{
|
|
3006
3038
|
label: "清空对话",
|
|
3007
3039
|
title: "清空对话",
|
|
3008
|
-
icon: () => /* @__PURE__ */ c(
|
|
3040
|
+
icon: () => /* @__PURE__ */ c(Ni, {}),
|
|
3009
3041
|
onClick: () => {
|
|
3010
3042
|
e.clearTopic();
|
|
3011
3043
|
}
|
|
@@ -3013,7 +3045,7 @@ const Zi = new k("chat-toolbar"), st = (n) => {
|
|
|
3013
3045
|
{
|
|
3014
3046
|
label: "新建对话",
|
|
3015
3047
|
title: "新建对话",
|
|
3016
|
-
hidden:
|
|
3048
|
+
hidden: a !== "TOPIC",
|
|
3017
3049
|
icon: () => /* @__PURE__ */ c(wi, {}),
|
|
3018
3050
|
onClick: () => {
|
|
3019
3051
|
r.newTopic && r.newTopic(e.topicId, {
|
|
@@ -3084,7 +3116,7 @@ const Zi = new k("chat-toolbar"), st = (n) => {
|
|
|
3084
3116
|
const w = {
|
|
3085
3117
|
...i
|
|
3086
3118
|
};
|
|
3087
|
-
if (i instanceof
|
|
3119
|
+
if (i instanceof ie ? (Object.assign(w, { topic: e.topic }), w.msg.realcontent = i.realcontent) : (w.data || (w.data = {}), Object.assign(w.data, { messages: e.messages.value })), m.onClick && typeof m.onClick == "function")
|
|
3088
3120
|
m.onClick(p, m, e.context, e.params, w);
|
|
3089
3121
|
else {
|
|
3090
3122
|
const g = n.controller.opts.extendToolbarClick;
|
|
@@ -3097,8 +3129,8 @@ const Zi = new k("chat-toolbar"), st = (n) => {
|
|
|
3097
3129
|
);
|
|
3098
3130
|
}
|
|
3099
3131
|
}, _ = J(() => s === "content" && (i == null ? void 0 : i.state) === 20 && (i == null ? void 0 : i.completed) !== !0, [i == null ? void 0 : i.state, i == null ? void 0 : i.completed]);
|
|
3100
|
-
return /* @__PURE__ */ c("div", { className: "".concat(
|
|
3101
|
-
|
|
3132
|
+
return /* @__PURE__ */ c("div", { className: "".concat(Ki.b(), " ").concat(o || ""), children: u.map((p, m) => /* @__PURE__ */ c(
|
|
3133
|
+
Ji,
|
|
3102
3134
|
{
|
|
3103
3135
|
data: i,
|
|
3104
3136
|
model: p,
|
|
@@ -3109,7 +3141,7 @@ const Zi = new k("chat-toolbar"), st = (n) => {
|
|
|
3109
3141
|
m
|
|
3110
3142
|
)) });
|
|
3111
3143
|
};
|
|
3112
|
-
function
|
|
3144
|
+
function Gi(n, e) {
|
|
3113
3145
|
let t = null;
|
|
3114
3146
|
return function(...i) {
|
|
3115
3147
|
t || (t = setTimeout(() => {
|
|
@@ -3117,19 +3149,19 @@ function Ji(n, e) {
|
|
|
3117
3149
|
}, e));
|
|
3118
3150
|
};
|
|
3119
3151
|
}
|
|
3120
|
-
const
|
|
3121
|
-
const e =
|
|
3152
|
+
const Qi = (n) => {
|
|
3153
|
+
const e = $(!1), t = $({}), i = new k("chat-back-bottom"), s = $(null), o = () => {
|
|
3122
3154
|
if (s.value) {
|
|
3123
3155
|
const u = n.visibilityHeight || 200, h = s.value.scrollHeight - s.value.scrollTop - s.value.offsetHeight;
|
|
3124
3156
|
e.value = h >= u;
|
|
3125
3157
|
}
|
|
3126
|
-
},
|
|
3158
|
+
}, a = () => {
|
|
3127
3159
|
var u;
|
|
3128
3160
|
s.value && (s.value.scrollTo({
|
|
3129
3161
|
top: s.value.scrollHeight,
|
|
3130
3162
|
behavior: "smooth"
|
|
3131
3163
|
}), (u = n.onClick) == null || u.call(n));
|
|
3132
|
-
}, r =
|
|
3164
|
+
}, r = Gi(o, 300);
|
|
3133
3165
|
return J(() => {
|
|
3134
3166
|
t.value = {
|
|
3135
3167
|
right: "".concat(n.right, "px"),
|
|
@@ -3139,20 +3171,20 @@ const Ki = (n) => {
|
|
|
3139
3171
|
var u;
|
|
3140
3172
|
if (n.target) {
|
|
3141
3173
|
const h = (u = document.querySelector(n.target)) != null ? u : void 0;
|
|
3142
|
-
h && (s.value = h, h.addEventListener("scroll", r),
|
|
3174
|
+
h && (s.value = h, h.addEventListener("scroll", r), o());
|
|
3143
3175
|
}
|
|
3144
3176
|
}, []), /* @__PURE__ */ c(
|
|
3145
3177
|
"div",
|
|
3146
3178
|
{
|
|
3147
3179
|
className: "".concat(i.b(), " ").concat(i.is("visible", e.value)),
|
|
3148
3180
|
style: t.value,
|
|
3149
|
-
onClick:
|
|
3150
|
-
children: /* @__PURE__ */ c(
|
|
3181
|
+
onClick: a,
|
|
3182
|
+
children: /* @__PURE__ */ c(Mi, { className: i.e("icon") })
|
|
3151
3183
|
}
|
|
3152
3184
|
);
|
|
3153
3185
|
};
|
|
3154
|
-
const Et = new k("chat-messages"),
|
|
3155
|
-
const e = O(null), [t, i] = V(!0), s = O(!1),
|
|
3186
|
+
const Et = new k("chat-messages"), Dt = (n) => {
|
|
3187
|
+
const e = O(null), [t, i] = V(!0), s = O(!1), o = n.controller.messages, a = () => {
|
|
3156
3188
|
const h = e.current;
|
|
3157
3189
|
h && (s.current = !0, h.scrollTo({
|
|
3158
3190
|
top: h.scrollHeight,
|
|
@@ -3162,8 +3194,8 @@ const Et = new k("chat-messages"), Mt = (n) => {
|
|
|
3162
3194
|
}, 500));
|
|
3163
3195
|
};
|
|
3164
3196
|
D(() => {
|
|
3165
|
-
t &&
|
|
3166
|
-
}, [
|
|
3197
|
+
t && a();
|
|
3198
|
+
}, [o.value]);
|
|
3167
3199
|
const r = () => {
|
|
3168
3200
|
if (!s.current && e.current) {
|
|
3169
3201
|
const { scrollTop: h, scrollHeight: d, clientHeight: l } = e.current, f = d - (h + l) < 50;
|
|
@@ -3173,17 +3205,17 @@ const Et = new k("chat-messages"), Mt = (n) => {
|
|
|
3173
3205
|
s.current = !0, i(!0);
|
|
3174
3206
|
};
|
|
3175
3207
|
return /* @__PURE__ */ c("div", { ref: e, className: Et.b(), onScroll: r, children: [
|
|
3176
|
-
|
|
3208
|
+
o.value.map((h) => {
|
|
3177
3209
|
var l;
|
|
3178
3210
|
const d = ((l = h.content) == null ? void 0 : l.length) || 0;
|
|
3179
3211
|
return h.role !== "SYSTEM" ? /* @__PURE__ */ c(
|
|
3180
|
-
|
|
3212
|
+
Xi,
|
|
3181
3213
|
{
|
|
3182
3214
|
size: d,
|
|
3183
3215
|
message: h,
|
|
3184
3216
|
controller: n.controller,
|
|
3185
3217
|
children: /* @__PURE__ */ c(
|
|
3186
|
-
|
|
3218
|
+
at,
|
|
3187
3219
|
{
|
|
3188
3220
|
type: "content",
|
|
3189
3221
|
mode: "DEFAULT",
|
|
@@ -3197,7 +3229,7 @@ const Et = new k("chat-messages"), Mt = (n) => {
|
|
|
3197
3229
|
) : null;
|
|
3198
3230
|
}),
|
|
3199
3231
|
/* @__PURE__ */ c(
|
|
3200
|
-
|
|
3232
|
+
Qi,
|
|
3201
3233
|
{
|
|
3202
3234
|
right: 20,
|
|
3203
3235
|
bottom: 14,
|
|
@@ -3207,12 +3239,12 @@ const Et = new k("chat-messages"), Mt = (n) => {
|
|
|
3207
3239
|
)
|
|
3208
3240
|
] });
|
|
3209
3241
|
};
|
|
3210
|
-
function
|
|
3242
|
+
function es(n, e) {
|
|
3211
3243
|
for (var t in e)
|
|
3212
3244
|
n[t] = e[t];
|
|
3213
3245
|
return n;
|
|
3214
3246
|
}
|
|
3215
|
-
function
|
|
3247
|
+
function Lt(n, e) {
|
|
3216
3248
|
for (var t in n)
|
|
3217
3249
|
if (t !== "__source" && !(t in e))
|
|
3218
3250
|
return !0;
|
|
@@ -3221,70 +3253,70 @@ function Dt(n, e) {
|
|
|
3221
3253
|
return !0;
|
|
3222
3254
|
return !1;
|
|
3223
3255
|
}
|
|
3224
|
-
function
|
|
3256
|
+
function zt(n, e) {
|
|
3225
3257
|
this.props = n, this.context = e;
|
|
3226
3258
|
}
|
|
3227
|
-
(
|
|
3228
|
-
return
|
|
3259
|
+
(zt.prototype = new U()).isPureReactComponent = !0, zt.prototype.shouldComponentUpdate = function(n, e) {
|
|
3260
|
+
return Lt(this.props, n) || Lt(this.state, e);
|
|
3229
3261
|
};
|
|
3230
3262
|
var Ht = C.__b;
|
|
3231
3263
|
C.__b = function(n) {
|
|
3232
3264
|
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), Ht && Ht(n);
|
|
3233
3265
|
};
|
|
3234
|
-
var
|
|
3266
|
+
var ts = C.__e;
|
|
3235
3267
|
C.__e = function(n, e, t, i) {
|
|
3236
3268
|
if (n.then) {
|
|
3237
|
-
for (var s,
|
|
3238
|
-
if ((s =
|
|
3269
|
+
for (var s, o = e; o = o.__; )
|
|
3270
|
+
if ((s = o.__c) && s.__c)
|
|
3239
3271
|
return e.__e == null && (e.__e = t.__e, e.__k = t.__k), s.__c(n, e);
|
|
3240
3272
|
}
|
|
3241
|
-
|
|
3273
|
+
ts(n, e, t, i);
|
|
3242
3274
|
};
|
|
3243
|
-
var
|
|
3275
|
+
var Ot = C.unmount;
|
|
3244
3276
|
function Ln(n, e, t) {
|
|
3245
3277
|
return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(i) {
|
|
3246
3278
|
typeof i.__c == "function" && i.__c();
|
|
3247
|
-
}), n.__c.__H = null), (n =
|
|
3279
|
+
}), n.__c.__H = null), (n = es({}, n)).__c != null && (n.__c.__P === t && (n.__c.__P = e), n.__c.__e = !0, n.__c = null), n.__k = n.__k && n.__k.map(function(i) {
|
|
3248
3280
|
return Ln(i, e, t);
|
|
3249
3281
|
})), n;
|
|
3250
3282
|
}
|
|
3251
|
-
function
|
|
3283
|
+
function zn(n, e, t) {
|
|
3252
3284
|
return n && t && (n.__v = null, n.__k = n.__k && n.__k.map(function(i) {
|
|
3253
|
-
return
|
|
3285
|
+
return zn(i, e, t);
|
|
3254
3286
|
}), n.__c && n.__c.__P === e && (n.__e && t.appendChild(n.__e), n.__c.__e = !0, n.__c.__P = t)), n;
|
|
3255
3287
|
}
|
|
3256
3288
|
function Je() {
|
|
3257
3289
|
this.__u = 0, this.o = null, this.__b = null;
|
|
3258
3290
|
}
|
|
3259
|
-
function
|
|
3291
|
+
function Hn(n) {
|
|
3260
3292
|
var e = n.__.__c;
|
|
3261
3293
|
return e && e.__a && e.__a(n);
|
|
3262
3294
|
}
|
|
3263
|
-
function
|
|
3295
|
+
function Me() {
|
|
3264
3296
|
this.i = null, this.l = null;
|
|
3265
3297
|
}
|
|
3266
3298
|
C.unmount = function(n) {
|
|
3267
3299
|
var e = n.__c;
|
|
3268
|
-
e && e.__R && e.__R(), e && 32 & n.__u && (n.type = null),
|
|
3269
|
-
}, (Je.prototype = new
|
|
3300
|
+
e && e.__R && e.__R(), e && 32 & n.__u && (n.type = null), Ot && Ot(n);
|
|
3301
|
+
}, (Je.prototype = new U()).__c = function(n, e) {
|
|
3270
3302
|
var t = e.__c, i = this;
|
|
3271
3303
|
i.o == null && (i.o = []), i.o.push(t);
|
|
3272
|
-
var s =
|
|
3273
|
-
|
|
3304
|
+
var s = Hn(i.__v), o = !1, a = function() {
|
|
3305
|
+
o || (o = !0, t.__R = null, s ? s(r) : r());
|
|
3274
3306
|
};
|
|
3275
|
-
t.__R =
|
|
3307
|
+
t.__R = a;
|
|
3276
3308
|
var r = function() {
|
|
3277
3309
|
if (!--i.__u) {
|
|
3278
3310
|
if (i.state.__a) {
|
|
3279
3311
|
var u = i.state.__a;
|
|
3280
|
-
i.__v.__k[0] =
|
|
3312
|
+
i.__v.__k[0] = zn(u, u.__c.__P, u.__c.__O);
|
|
3281
3313
|
}
|
|
3282
3314
|
var h;
|
|
3283
3315
|
for (i.setState({ __a: i.__b = null }); h = i.o.pop(); )
|
|
3284
3316
|
h.forceUpdate();
|
|
3285
3317
|
}
|
|
3286
3318
|
};
|
|
3287
|
-
i.__u++ || 32 & e.__u || i.setState({ __a: i.__b = i.__v.__k[0] }), n.then(
|
|
3319
|
+
i.__u++ || 32 & e.__u || i.setState({ __a: i.__b = i.__v.__k[0] }), n.then(a, a);
|
|
3288
3320
|
}, Je.prototype.componentWillUnmount = function() {
|
|
3289
3321
|
this.o = [];
|
|
3290
3322
|
}, Je.prototype.render = function(n, e) {
|
|
@@ -3298,7 +3330,7 @@ C.unmount = function(n) {
|
|
|
3298
3330
|
var s = e.__a && X(Z, null, n.fallback);
|
|
3299
3331
|
return s && (s.__u &= -33), [X(Z, null, e.__a ? null : n.children), s];
|
|
3300
3332
|
};
|
|
3301
|
-
var
|
|
3333
|
+
var Bt = function(n, e, t) {
|
|
3302
3334
|
if (++t[1] === t[0] && n.l.delete(e), n.props.revealOrder && (n.props.revealOrder[0] !== "t" || !n.l.size))
|
|
3303
3335
|
for (t = n.i; t; ) {
|
|
3304
3336
|
for (; t.length > 3; )
|
|
@@ -3308,126 +3340,126 @@ var Ot = function(n, e, t) {
|
|
|
3308
3340
|
n.i = t = t[2];
|
|
3309
3341
|
}
|
|
3310
3342
|
};
|
|
3311
|
-
function
|
|
3343
|
+
function ns(n) {
|
|
3312
3344
|
return this.getChildContext = function() {
|
|
3313
3345
|
return n.context;
|
|
3314
3346
|
}, n.children;
|
|
3315
3347
|
}
|
|
3316
|
-
function
|
|
3348
|
+
function is(n) {
|
|
3317
3349
|
var e = this, t = n.h;
|
|
3318
3350
|
if (e.componentWillUnmount = function() {
|
|
3319
|
-
|
|
3351
|
+
he(null, e.v), e.v = null, e.h = null;
|
|
3320
3352
|
}, e.h && e.h !== t && e.componentWillUnmount(), !e.v) {
|
|
3321
3353
|
for (var i = e.__v; i !== null && !i.__m && i.__ !== null; )
|
|
3322
3354
|
i = i.__;
|
|
3323
3355
|
e.h = t, e.v = { nodeType: 1, parentNode: t, childNodes: [], __k: { __m: i.__m }, contains: function() {
|
|
3324
3356
|
return !0;
|
|
3325
|
-
}, insertBefore: function(s,
|
|
3326
|
-
this.childNodes.push(s), e.h.insertBefore(s,
|
|
3357
|
+
}, insertBefore: function(s, o) {
|
|
3358
|
+
this.childNodes.push(s), e.h.insertBefore(s, o);
|
|
3327
3359
|
}, removeChild: function(s) {
|
|
3328
3360
|
this.childNodes.splice(this.childNodes.indexOf(s) >>> 1, 1), e.h.removeChild(s);
|
|
3329
3361
|
} };
|
|
3330
3362
|
}
|
|
3331
|
-
|
|
3363
|
+
he(X(ns, { context: e.context }, n.__v), e.v);
|
|
3332
3364
|
}
|
|
3333
|
-
function
|
|
3334
|
-
var t = X(
|
|
3365
|
+
function ss(n, e) {
|
|
3366
|
+
var t = X(is, { __v: n, h: e });
|
|
3335
3367
|
return t.containerInfo = e, t;
|
|
3336
3368
|
}
|
|
3337
|
-
(
|
|
3338
|
-
var e = this, t =
|
|
3369
|
+
(Me.prototype = new U()).__a = function(n) {
|
|
3370
|
+
var e = this, t = Hn(e.__v), i = e.l.get(n);
|
|
3339
3371
|
return i[0]++, function(s) {
|
|
3340
|
-
var
|
|
3341
|
-
e.props.revealOrder ? (i.push(s),
|
|
3372
|
+
var o = function() {
|
|
3373
|
+
e.props.revealOrder ? (i.push(s), Bt(e, n, i)) : s();
|
|
3342
3374
|
};
|
|
3343
|
-
t ? t(
|
|
3375
|
+
t ? t(o) : o();
|
|
3344
3376
|
};
|
|
3345
|
-
},
|
|
3377
|
+
}, Me.prototype.render = function(n) {
|
|
3346
3378
|
this.i = null, this.l = /* @__PURE__ */ new Map();
|
|
3347
3379
|
var e = Le(n.children);
|
|
3348
3380
|
n.revealOrder && n.revealOrder[0] === "b" && e.reverse();
|
|
3349
3381
|
for (var t = e.length; t--; )
|
|
3350
3382
|
this.l.set(e[t], this.i = [1, 0, this.i]);
|
|
3351
3383
|
return n.children;
|
|
3352
|
-
},
|
|
3384
|
+
}, Me.prototype.componentDidUpdate = Me.prototype.componentDidMount = function() {
|
|
3353
3385
|
var n = this;
|
|
3354
3386
|
this.l.forEach(function(e, t) {
|
|
3355
|
-
|
|
3387
|
+
Bt(n, t, e);
|
|
3356
3388
|
});
|
|
3357
3389
|
};
|
|
3358
|
-
var
|
|
3390
|
+
var as = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, os = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, rs = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, cs = /[A-Z0-9]/g, ls = typeof document < "u", us = function(n) {
|
|
3359
3391
|
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(n);
|
|
3360
3392
|
};
|
|
3361
|
-
|
|
3362
|
-
Object.defineProperty(
|
|
3393
|
+
U.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(n) {
|
|
3394
|
+
Object.defineProperty(U.prototype, n, { configurable: !0, get: function() {
|
|
3363
3395
|
return this["UNSAFE_" + n];
|
|
3364
3396
|
}, set: function(e) {
|
|
3365
3397
|
Object.defineProperty(this, n, { configurable: !0, writable: !0, value: e });
|
|
3366
3398
|
} });
|
|
3367
3399
|
});
|
|
3368
|
-
var
|
|
3369
|
-
function
|
|
3400
|
+
var Pt = C.event;
|
|
3401
|
+
function hs() {
|
|
3370
3402
|
}
|
|
3371
|
-
function
|
|
3403
|
+
function ds() {
|
|
3372
3404
|
return this.cancelBubble;
|
|
3373
3405
|
}
|
|
3374
|
-
function
|
|
3406
|
+
function ps() {
|
|
3375
3407
|
return this.defaultPrevented;
|
|
3376
3408
|
}
|
|
3377
3409
|
C.event = function(n) {
|
|
3378
|
-
return
|
|
3410
|
+
return Pt && (n = Pt(n)), n.persist = hs, n.isPropagationStopped = ds, n.isDefaultPrevented = ps, n.nativeEvent = n;
|
|
3379
3411
|
};
|
|
3380
|
-
var
|
|
3412
|
+
var fs = { enumerable: !1, configurable: !0, get: function() {
|
|
3381
3413
|
return this.class;
|
|
3382
|
-
} },
|
|
3414
|
+
} }, Rt = C.vnode;
|
|
3383
3415
|
C.vnode = function(n) {
|
|
3384
3416
|
typeof n.type == "string" && function(e) {
|
|
3385
|
-
var t = e.props, i = e.type, s = {},
|
|
3386
|
-
for (var
|
|
3387
|
-
var r = t[
|
|
3388
|
-
if (!(
|
|
3389
|
-
var u =
|
|
3390
|
-
|
|
3417
|
+
var t = e.props, i = e.type, s = {}, o = i.indexOf("-") === -1;
|
|
3418
|
+
for (var a in t) {
|
|
3419
|
+
var r = t[a];
|
|
3420
|
+
if (!(a === "value" && "defaultValue" in t && r == null || ls && a === "children" && i === "noscript" || a === "class" || a === "className")) {
|
|
3421
|
+
var u = a.toLowerCase();
|
|
3422
|
+
a === "defaultValue" && "value" in t && t.value == null ? a = "value" : a === "download" && r === !0 ? r = "" : u === "translate" && r === "no" ? r = !1 : u[0] === "o" && u[1] === "n" ? u === "ondoubleclick" ? a = "ondblclick" : u !== "onchange" || i !== "input" && i !== "textarea" || us(t.type) ? u === "onfocus" ? a = "onfocusin" : u === "onblur" ? a = "onfocusout" : rs.test(a) && (a = u) : u = a = "oninput" : o && os.test(a) ? a = a.replace(cs, "-$&").toLowerCase() : r === null && (r = void 0), u === "oninput" && s[a = u] && (a = "oninputCapture"), s[a] = r;
|
|
3391
3423
|
}
|
|
3392
3424
|
}
|
|
3393
3425
|
i == "select" && s.multiple && Array.isArray(s.value) && (s.value = Le(t.children).forEach(function(h) {
|
|
3394
3426
|
h.props.selected = s.value.indexOf(h.props.value) != -1;
|
|
3395
3427
|
})), i == "select" && s.defaultValue != null && (s.value = Le(t.children).forEach(function(h) {
|
|
3396
3428
|
h.props.selected = s.multiple ? s.defaultValue.indexOf(h.props.value) != -1 : s.defaultValue == h.props.value;
|
|
3397
|
-
})), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className",
|
|
3398
|
-
}(n), n.$$typeof =
|
|
3429
|
+
})), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className", fs)) : (t.className && !t.class || t.class && t.className) && (s.class = s.className = t.className), e.props = s;
|
|
3430
|
+
}(n), n.$$typeof = as, Rt && Rt(n);
|
|
3399
3431
|
};
|
|
3400
|
-
var
|
|
3432
|
+
var Ft = C.__r;
|
|
3401
3433
|
C.__r = function(n) {
|
|
3402
|
-
|
|
3434
|
+
Ft && Ft(n), n.__c;
|
|
3403
3435
|
};
|
|
3404
|
-
var
|
|
3436
|
+
var Ut = C.diffed;
|
|
3405
3437
|
C.diffed = function(n) {
|
|
3406
|
-
|
|
3438
|
+
Ut && Ut(n);
|
|
3407
3439
|
var e = n.props, t = n.__e;
|
|
3408
3440
|
t != null && n.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value);
|
|
3409
3441
|
};
|
|
3410
3442
|
var Te = /* @__PURE__ */ new Map();
|
|
3411
|
-
function
|
|
3443
|
+
function vs(n) {
|
|
3412
3444
|
var e = Te.get(n);
|
|
3413
3445
|
e && e.destroy();
|
|
3414
3446
|
}
|
|
3415
|
-
function
|
|
3447
|
+
function ms(n) {
|
|
3416
3448
|
var e = Te.get(n);
|
|
3417
3449
|
e && e.update();
|
|
3418
3450
|
}
|
|
3419
|
-
var
|
|
3420
|
-
typeof window > "u" ? ((
|
|
3451
|
+
var be = null;
|
|
3452
|
+
typeof window > "u" ? ((be = function(n) {
|
|
3421
3453
|
return n;
|
|
3422
3454
|
}).destroy = function(n) {
|
|
3423
3455
|
return n;
|
|
3424
|
-
},
|
|
3456
|
+
}, be.update = function(n) {
|
|
3425
3457
|
return n;
|
|
3426
|
-
}) : ((
|
|
3458
|
+
}) : ((be = function(n, e) {
|
|
3427
3459
|
return n && Array.prototype.forEach.call(n.length ? n : [n], function(t) {
|
|
3428
3460
|
return function(i) {
|
|
3429
3461
|
if (i && i.nodeName && i.nodeName === "TEXTAREA" && !Te.has(i)) {
|
|
3430
|
-
var s,
|
|
3462
|
+
var s, o = null, a = window.getComputedStyle(i), r = (s = i.value, function() {
|
|
3431
3463
|
h({ testForHeightReduction: s === "" || !i.value.startsWith(s), restoreTextAlign: null }), s = i.value;
|
|
3432
3464
|
}), u = (function(l) {
|
|
3433
3465
|
i.removeEventListener("autosize:destroy", u), i.removeEventListener("autosize:update", d), i.removeEventListener("input", r), window.removeEventListener("resize", d), Object.keys(l).forEach(function(f) {
|
|
@@ -3437,19 +3469,19 @@ typeof window > "u" ? ((ye = function(n) {
|
|
|
3437
3469
|
i.addEventListener("autosize:destroy", u), i.addEventListener("autosize:update", d), i.addEventListener("input", r), window.addEventListener("resize", d), i.style.overflowX = "hidden", i.style.wordWrap = "break-word", Te.set(i, { destroy: u, update: d }), d();
|
|
3438
3470
|
}
|
|
3439
3471
|
function h(l) {
|
|
3440
|
-
var f, _, p = l.restoreTextAlign, m = p === void 0 ? null : p, w = l.testForHeightReduction, g = w === void 0 || w, v =
|
|
3441
|
-
if (i.scrollHeight !== 0 && (
|
|
3442
|
-
for (var
|
|
3443
|
-
|
|
3472
|
+
var f, _, p = l.restoreTextAlign, m = p === void 0 ? null : p, w = l.testForHeightReduction, g = w === void 0 || w, v = a.overflowY;
|
|
3473
|
+
if (i.scrollHeight !== 0 && (a.resize === "vertical" ? i.style.resize = "none" : a.resize === "both" && (i.style.resize = "horizontal"), g && (f = function(x) {
|
|
3474
|
+
for (var A = []; x && x.parentNode && x.parentNode instanceof Element; )
|
|
3475
|
+
x.parentNode.scrollTop && A.push([x.parentNode, x.parentNode.scrollTop]), x = x.parentNode;
|
|
3444
3476
|
return function() {
|
|
3445
|
-
return
|
|
3477
|
+
return A.forEach(function(L) {
|
|
3446
3478
|
var K = L[0], G = L[1];
|
|
3447
3479
|
K.style.scrollBehavior = "auto", K.scrollTop = G, K.style.scrollBehavior = null;
|
|
3448
3480
|
});
|
|
3449
3481
|
};
|
|
3450
|
-
}(i), i.style.height = ""), _ =
|
|
3451
|
-
var
|
|
3452
|
-
|
|
3482
|
+
}(i), i.style.height = ""), _ = a.boxSizing === "content-box" ? i.scrollHeight - (parseFloat(a.paddingTop) + parseFloat(a.paddingBottom)) : i.scrollHeight + parseFloat(a.borderTopWidth) + parseFloat(a.borderBottomWidth), a.maxHeight !== "none" && _ > parseFloat(a.maxHeight) ? (a.overflowY === "hidden" && (i.style.overflow = "scroll"), _ = parseFloat(a.maxHeight)) : a.overflowY !== "hidden" && (i.style.overflow = "hidden"), i.style.height = _ + "px", m && (i.style.textAlign = m), f && f(), o !== _ && (i.dispatchEvent(new Event("autosize:resized", { bubbles: !0 })), o = _), v !== a.overflow && !m)) {
|
|
3483
|
+
var y = a.textAlign;
|
|
3484
|
+
a.overflow === "hidden" && (i.style.textAlign = y === "start" ? "end" : "start"), h({ restoreTextAlign: y, testForHeightReduction: !0 });
|
|
3453
3485
|
}
|
|
3454
3486
|
}
|
|
3455
3487
|
function d() {
|
|
@@ -3458,12 +3490,12 @@ typeof window > "u" ? ((ye = function(n) {
|
|
|
3458
3490
|
}(t);
|
|
3459
3491
|
}), n;
|
|
3460
3492
|
}).destroy = function(n) {
|
|
3461
|
-
return n && Array.prototype.forEach.call(n.length ? n : [n],
|
|
3462
|
-
},
|
|
3463
|
-
return n && Array.prototype.forEach.call(n.length ? n : [n],
|
|
3493
|
+
return n && Array.prototype.forEach.call(n.length ? n : [n], vs), n;
|
|
3494
|
+
}, be.update = function(n) {
|
|
3495
|
+
return n && Array.prototype.forEach.call(n.length ? n : [n], ms), n;
|
|
3464
3496
|
});
|
|
3465
|
-
var
|
|
3466
|
-
class
|
|
3497
|
+
var Wt = be, I = /* @__PURE__ */ ((n) => (n.STYLE_CACHE = "ai-chat-style-cache", n.MINIMIZE_STYLY_CHCHE = "ai-chat-minimize-style-cache", n.DATA_BASE_NAME = "ibiz-chat", n.DATA_TABLE_NAME = "history-message", n.DATA_TABLE_KEY_NAME = "id", n))(I || {});
|
|
3498
|
+
class jt {
|
|
3467
3499
|
/**
|
|
3468
3500
|
* Creates an instance of AiChatController.
|
|
3469
3501
|
*
|
|
@@ -3476,7 +3508,7 @@ class Wt {
|
|
|
3476
3508
|
* 事件触发器
|
|
3477
3509
|
* @type {EventBase}
|
|
3478
3510
|
*/
|
|
3479
|
-
|
|
3511
|
+
T(this, "evt", new Fn());
|
|
3480
3512
|
/**
|
|
3481
3513
|
* 聊天记录
|
|
3482
3514
|
*
|
|
@@ -3484,7 +3516,7 @@ class Wt {
|
|
|
3484
3516
|
* @date 2023-10-16 16:10:29
|
|
3485
3517
|
* @type {Signal<ChatMessage[]>}
|
|
3486
3518
|
*/
|
|
3487
|
-
|
|
3519
|
+
T(this, "messages", q([]));
|
|
3488
3520
|
/**
|
|
3489
3521
|
* 素材列表
|
|
3490
3522
|
*
|
|
@@ -3492,7 +3524,7 @@ class Wt {
|
|
|
3492
3524
|
* @date 2025-02-27 18:02:46
|
|
3493
3525
|
* @type {Signal<IMaterial[]>}
|
|
3494
3526
|
*/
|
|
3495
|
-
|
|
3527
|
+
T(this, "materials", q([]));
|
|
3496
3528
|
/**
|
|
3497
3529
|
* 聊天框输入值
|
|
3498
3530
|
*
|
|
@@ -3500,7 +3532,7 @@ class Wt {
|
|
|
3500
3532
|
* @date 2023-10-16 15:10:43
|
|
3501
3533
|
* @type {Signal<string>}
|
|
3502
3534
|
*/
|
|
3503
|
-
|
|
3535
|
+
T(this, "input", q(""));
|
|
3504
3536
|
/**
|
|
3505
3537
|
* 是否加载中
|
|
3506
3538
|
*
|
|
@@ -3508,19 +3540,19 @@ class Wt {
|
|
|
3508
3540
|
* @date 2025-03-10 18:03:42
|
|
3509
3541
|
* @type {Signal<boolean>}
|
|
3510
3542
|
*/
|
|
3511
|
-
|
|
3543
|
+
T(this, "isLoading", q(!1));
|
|
3512
3544
|
/**
|
|
3513
3545
|
* 激活AI代理标识
|
|
3514
3546
|
*
|
|
3515
3547
|
* @type {(string | undefined)}
|
|
3516
3548
|
*/
|
|
3517
|
-
|
|
3549
|
+
T(this, "activeAIAgentID");
|
|
3518
3550
|
/**
|
|
3519
3551
|
* AI代理列表
|
|
3520
3552
|
*
|
|
3521
3553
|
* @type {Signal<AIAgent[]>}
|
|
3522
3554
|
*/
|
|
3523
|
-
|
|
3555
|
+
T(this, "agentList", q([]));
|
|
3524
3556
|
/**
|
|
3525
3557
|
* 视图参数
|
|
3526
3558
|
*
|
|
@@ -3528,7 +3560,7 @@ class Wt {
|
|
|
3528
3560
|
* @date 2025-02-24 14:02:23
|
|
3529
3561
|
* @type {object}
|
|
3530
3562
|
*/
|
|
3531
|
-
|
|
3563
|
+
T(this, "context");
|
|
3532
3564
|
/**
|
|
3533
3565
|
* 视图参数
|
|
3534
3566
|
*
|
|
@@ -3536,7 +3568,7 @@ class Wt {
|
|
|
3536
3568
|
* @date 2025-02-24 14:02:32
|
|
3537
3569
|
* @type {object}
|
|
3538
3570
|
*/
|
|
3539
|
-
|
|
3571
|
+
T(this, "params");
|
|
3540
3572
|
/**
|
|
3541
3573
|
* 应用实体标记
|
|
3542
3574
|
*
|
|
@@ -3544,7 +3576,7 @@ class Wt {
|
|
|
3544
3576
|
* @date 2025-02-24 14:02:10
|
|
3545
3577
|
* @type {string}
|
|
3546
3578
|
*/
|
|
3547
|
-
|
|
3579
|
+
T(this, "appDataEntityId");
|
|
3548
3580
|
/**
|
|
3549
3581
|
* 话题标识
|
|
3550
3582
|
*
|
|
@@ -3552,7 +3584,7 @@ class Wt {
|
|
|
3552
3584
|
* @date 2025-02-24 18:02:02
|
|
3553
3585
|
* @type {(string | undefined)}
|
|
3554
3586
|
*/
|
|
3555
|
-
|
|
3587
|
+
T(this, "topicId");
|
|
3556
3588
|
/**
|
|
3557
3589
|
* 话题数据
|
|
3558
3590
|
*
|
|
@@ -3560,20 +3592,24 @@ class Wt {
|
|
|
3560
3592
|
* @date 2025-03-10 16:03:26
|
|
3561
3593
|
* @type {(ITopic | undefined)}
|
|
3562
3594
|
*/
|
|
3563
|
-
|
|
3595
|
+
T(this, "topic");
|
|
3564
3596
|
/**
|
|
3565
3597
|
* @description 聊天sessionid
|
|
3566
3598
|
* @type {string}
|
|
3567
3599
|
* @memberof AiChatController
|
|
3568
3600
|
*/
|
|
3569
|
-
|
|
3570
|
-
|
|
3601
|
+
T(this, "chatSessionid", "");
|
|
3602
|
+
/**
|
|
3603
|
+
* 模式参数,用于业务区分
|
|
3604
|
+
*/
|
|
3605
|
+
T(this, "chatMode");
|
|
3606
|
+
this.opts = e, this.context = e.context, this.params = e.params, this.appDataEntityId = e.appDataEntityId, this.topicId = e.topicId, this.topic = e.topic, this.activeAIAgentID = e.activeAIAgentID, this.chatMode = e.srfMode, this.initAIChat();
|
|
3571
3607
|
}
|
|
3572
3608
|
/**
|
|
3573
3609
|
* 重置聊天
|
|
3574
3610
|
*/
|
|
3575
3611
|
reSetAIChat() {
|
|
3576
|
-
this.messages.value = [], this.topicId ? this.chatSessionid = yt(this.topicId) : this.chatSessionid = yt(
|
|
3612
|
+
this.messages.value = [], this.topicId ? this.chatSessionid = yt(this.topicId) : this.chatSessionid = yt(ae());
|
|
3577
3613
|
}
|
|
3578
3614
|
/**
|
|
3579
3615
|
* 初始化
|
|
@@ -3586,7 +3622,7 @@ class Wt {
|
|
|
3586
3622
|
*/
|
|
3587
3623
|
async initAIChatAgent() {
|
|
3588
3624
|
this.opts.aiAgentlist && this.opts.aiAgentlist.length > 0 && this.opts.aiAgentlist.forEach((e) => {
|
|
3589
|
-
this.agentList.value = [...this.agentList.value, new
|
|
3625
|
+
this.agentList.value = [...this.agentList.value, new Zi(e)];
|
|
3590
3626
|
});
|
|
3591
3627
|
}
|
|
3592
3628
|
/**
|
|
@@ -3606,7 +3642,7 @@ class Wt {
|
|
|
3606
3642
|
*/
|
|
3607
3643
|
async fecthHistory() {
|
|
3608
3644
|
if (this.topicId) {
|
|
3609
|
-
const t = await
|
|
3645
|
+
const t = await F.getData(
|
|
3610
3646
|
I.DATA_BASE_NAME,
|
|
3611
3647
|
I.DATA_TABLE_NAME,
|
|
3612
3648
|
this.getHistoryStoreKey(this.topicId)
|
|
@@ -3630,7 +3666,8 @@ class Wt {
|
|
|
3630
3666
|
appDataEntityId: this.appDataEntityId,
|
|
3631
3667
|
appendCurData: this.opts.appendCurData,
|
|
3632
3668
|
sessionid: this.chatSessionid,
|
|
3633
|
-
srfaiagent: this.activeAIAgentID
|
|
3669
|
+
srfaiagent: this.activeAIAgentID,
|
|
3670
|
+
srfmode: this.chatMode
|
|
3634
3671
|
}) && await this.afterFecthHistory(), !0;
|
|
3635
3672
|
}
|
|
3636
3673
|
/**
|
|
@@ -3639,22 +3676,40 @@ class Wt {
|
|
|
3639
3676
|
async afterFecthHistory() {
|
|
3640
3677
|
if (this.opts.appendCurContent && this.addMessage({
|
|
3641
3678
|
state: 30,
|
|
3642
|
-
messageid:
|
|
3679
|
+
messageid: ae(),
|
|
3643
3680
|
role: "USER",
|
|
3644
3681
|
type: "DEFAULT",
|
|
3645
3682
|
content: this.opts.appendCurContent,
|
|
3646
3683
|
completed: !0
|
|
3647
|
-
}), this.opts.
|
|
3648
|
-
const e =
|
|
3649
|
-
e &&
|
|
3650
|
-
this,
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
this.
|
|
3657
|
-
|
|
3684
|
+
}), this.opts.appendCurResource) {
|
|
3685
|
+
const { hasResources: e, resources: t } = tt.parseMixedContent(this.opts.appendCurResource);
|
|
3686
|
+
e && t && t.length > 0 && t.forEach((i) => {
|
|
3687
|
+
this.replaceMaterial(i.id, i);
|
|
3688
|
+
});
|
|
3689
|
+
}
|
|
3690
|
+
if (this.opts.autoQuestion !== !1) {
|
|
3691
|
+
const e = this.messages.value.length - 1, t = this.messages.value[e];
|
|
3692
|
+
if (t && t.role === "USER") {
|
|
3693
|
+
const i = this.stringlyMaterialResource(!1);
|
|
3694
|
+
if (i) {
|
|
3695
|
+
const s = i + t.content, o = {
|
|
3696
|
+
...t._origin,
|
|
3697
|
+
messageid: ae(),
|
|
3698
|
+
content: s
|
|
3699
|
+
};
|
|
3700
|
+
this.messages.value[e] = new ie(o), this.messages.value = [...this.messages.value];
|
|
3701
|
+
}
|
|
3702
|
+
await this.opts.question(
|
|
3703
|
+
this,
|
|
3704
|
+
this.context,
|
|
3705
|
+
this.params,
|
|
3706
|
+
{ appDataEntityId: this.appDataEntityId },
|
|
3707
|
+
this.getMessages(),
|
|
3708
|
+
this.chatSessionid,
|
|
3709
|
+
this.activeAIAgentID,
|
|
3710
|
+
this.chatMode
|
|
3711
|
+
), this.opts.action && await this.opts.action("question", t.content);
|
|
3712
|
+
}
|
|
3658
3713
|
}
|
|
3659
3714
|
}
|
|
3660
3715
|
/**
|
|
@@ -3672,7 +3727,7 @@ class Wt {
|
|
|
3672
3727
|
data: this.messages.value.map((t) => ({ ...t._origin, toolcalls: t.toolcalls })),
|
|
3673
3728
|
timestamp: (/* @__PURE__ */ new Date()).getTime()
|
|
3674
3729
|
};
|
|
3675
|
-
await
|
|
3730
|
+
await F.updateData(
|
|
3676
3731
|
I.DATA_BASE_NAME,
|
|
3677
3732
|
I.DATA_TABLE_NAME,
|
|
3678
3733
|
e
|
|
@@ -3699,7 +3754,7 @@ class Wt {
|
|
|
3699
3754
|
const t = this.messages.value.find(
|
|
3700
3755
|
(i) => i.messageid === e.messageid
|
|
3701
3756
|
);
|
|
3702
|
-
t ? (t.update(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new
|
|
3757
|
+
t ? (t.update(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new ie(e)], this.asyncToIndexDB();
|
|
3703
3758
|
}
|
|
3704
3759
|
/**
|
|
3705
3760
|
* 更新消息完成状态
|
|
@@ -3731,7 +3786,7 @@ class Wt {
|
|
|
3731
3786
|
const t = this.messages.value.findIndex(
|
|
3732
3787
|
(i) => i.messageid === e.messageid
|
|
3733
3788
|
);
|
|
3734
|
-
t !== -1 ? (this.messages.value[t].replace(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new
|
|
3789
|
+
t !== -1 ? (this.messages.value[t].replace(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new ie(e)], this.asyncToIndexDB(), e.type === "DEFAULT" && this.opts.recommendPrompt && this.opts.recommendPrompt(this.context, this.params, {
|
|
3735
3790
|
appDataEntityId: this.appDataEntityId,
|
|
3736
3791
|
message: { messages: [e], sessionid: this.chatSessionid }
|
|
3737
3792
|
}).then((i) => {
|
|
@@ -3753,7 +3808,7 @@ class Wt {
|
|
|
3753
3808
|
const i = this.messages.value[t];
|
|
3754
3809
|
e.content = i.content, this.messages.value[t].replace(e), this.messages.value = [...this.messages.value];
|
|
3755
3810
|
} else
|
|
3756
|
-
this.messages.value = [...this.messages.value, new
|
|
3811
|
+
this.messages.value = [...this.messages.value, new ie(e)];
|
|
3757
3812
|
await this.asyncToIndexDB();
|
|
3758
3813
|
}
|
|
3759
3814
|
/**
|
|
@@ -3763,16 +3818,16 @@ class Wt {
|
|
|
3763
3818
|
* @date 2025-03-03 11:03:55
|
|
3764
3819
|
* @return {*} {string}
|
|
3765
3820
|
*/
|
|
3766
|
-
stringlyMaterialResource() {
|
|
3767
|
-
let
|
|
3768
|
-
const
|
|
3769
|
-
return this.materials.value && this.materials.value.length > 0 && (this.materials.value.forEach((
|
|
3770
|
-
if (
|
|
3771
|
-
const
|
|
3772
|
-
|
|
3821
|
+
stringlyMaterialResource(e = !0) {
|
|
3822
|
+
let t = "";
|
|
3823
|
+
const i = [];
|
|
3824
|
+
return this.materials.value && this.materials.value.length > 0 && (this.materials.value.forEach((s) => {
|
|
3825
|
+
if (s.type === "ossfile") {
|
|
3826
|
+
const o = s.metadata;
|
|
3827
|
+
o.state && o.state === "successed" && i.push(s);
|
|
3773
3828
|
} else
|
|
3774
|
-
|
|
3775
|
-
}), this.materials.value = []),
|
|
3829
|
+
i.push(s);
|
|
3830
|
+
}), e && (this.materials.value = [])), i && i.length > 0 && (t = tt.stringify(i)), t;
|
|
3776
3831
|
}
|
|
3777
3832
|
/**
|
|
3778
3833
|
* @description 获取当前会话的消息集合
|
|
@@ -3796,13 +3851,13 @@ class Wt {
|
|
|
3796
3851
|
async question(e) {
|
|
3797
3852
|
try {
|
|
3798
3853
|
this.isLoading.value = !0, this.messages.value.forEach((i, s) => {
|
|
3799
|
-
const
|
|
3800
|
-
|
|
3854
|
+
const o = i._origin;
|
|
3855
|
+
o.suggestions && (o.suggestions = void 0, this.messages.value[s].replace(o));
|
|
3801
3856
|
}), this.messages.value = [...this.messages.value], this.asyncToIndexDB();
|
|
3802
|
-
let t = this.stringlyMaterialResource();
|
|
3857
|
+
let t = this.stringlyMaterialResource(!1);
|
|
3803
3858
|
t ? t += "\n".concat(e) : t = e, this.addMessage({
|
|
3804
3859
|
state: 30,
|
|
3805
|
-
messageid:
|
|
3860
|
+
messageid: ae(),
|
|
3806
3861
|
role: "USER",
|
|
3807
3862
|
type: "DEFAULT",
|
|
3808
3863
|
content: t
|
|
@@ -3813,7 +3868,8 @@ class Wt {
|
|
|
3813
3868
|
{ appDataEntityId: this.appDataEntityId },
|
|
3814
3869
|
this.getMessages(),
|
|
3815
3870
|
this.chatSessionid,
|
|
3816
|
-
this.activeAIAgentID
|
|
3871
|
+
this.activeAIAgentID,
|
|
3872
|
+
this.chatMode
|
|
3817
3873
|
), this.opts.action && this.opts.action("question", e), this.isLoading.value = !1;
|
|
3818
3874
|
} finally {
|
|
3819
3875
|
this.isLoading.value = !1;
|
|
@@ -3874,7 +3930,8 @@ class Wt {
|
|
|
3874
3930
|
{ appDataEntityId: this.appDataEntityId },
|
|
3875
3931
|
this.getMessages(),
|
|
3876
3932
|
this.chatSessionid,
|
|
3877
|
-
this.activeAIAgentID
|
|
3933
|
+
this.activeAIAgentID,
|
|
3934
|
+
this.chatMode
|
|
3878
3935
|
);
|
|
3879
3936
|
else if (i === this.messages.value.length - 1)
|
|
3880
3937
|
this.messages.value.pop(), this.messages.value = [...this.messages.value], await this.opts.question(
|
|
@@ -3884,7 +3941,8 @@ class Wt {
|
|
|
3884
3941
|
{ appDataEntityId: this.appDataEntityId },
|
|
3885
3942
|
this.getMessages(),
|
|
3886
3943
|
this.chatSessionid,
|
|
3887
|
-
this.activeAIAgentID
|
|
3944
|
+
this.activeAIAgentID,
|
|
3945
|
+
this.chatMode
|
|
3888
3946
|
);
|
|
3889
3947
|
else {
|
|
3890
3948
|
const s = this.messages.value[i - 1].content;
|
|
@@ -3903,7 +3961,7 @@ class Wt {
|
|
|
3903
3961
|
*/
|
|
3904
3962
|
copyMessage(e) {
|
|
3905
3963
|
const t = e.realcontent;
|
|
3906
|
-
|
|
3964
|
+
fn.copy(t), this.opts.action && this.opts.action("copymsg", e);
|
|
3907
3965
|
}
|
|
3908
3966
|
/**
|
|
3909
3967
|
* 重置对话
|
|
@@ -3911,7 +3969,7 @@ class Wt {
|
|
|
3911
3969
|
* @memberof AiChatController
|
|
3912
3970
|
*/
|
|
3913
3971
|
async resetTopic() {
|
|
3914
|
-
await this.abortQuestion(), this.topicId && await
|
|
3972
|
+
await this.abortQuestion(), this.topicId && await F.deleteData(
|
|
3915
3973
|
I.DATA_BASE_NAME,
|
|
3916
3974
|
I.DATA_TABLE_NAME,
|
|
3917
3975
|
this.getHistoryStoreKey(this.topicId)
|
|
@@ -3924,7 +3982,7 @@ class Wt {
|
|
|
3924
3982
|
* @date 2025-03-18 17:03:57
|
|
3925
3983
|
*/
|
|
3926
3984
|
async clearTopic() {
|
|
3927
|
-
await this.abortQuestion(), this.topicId && await
|
|
3985
|
+
await this.abortQuestion(), this.topicId && await F.deleteData(
|
|
3928
3986
|
I.DATA_BASE_NAME,
|
|
3929
3987
|
I.DATA_TABLE_NAME,
|
|
3930
3988
|
this.getHistoryStoreKey(this.topicId)
|
|
@@ -3975,9 +4033,9 @@ class Wt {
|
|
|
3975
4033
|
if (!t)
|
|
3976
4034
|
return;
|
|
3977
4035
|
const i = this.messages.value.findIndex(
|
|
3978
|
-
(
|
|
4036
|
+
(o) => o.messageid === e.messageid
|
|
3979
4037
|
), { suggestions: s } = ei.parseMixedContent(t);
|
|
3980
|
-
s && s.length > 0 && (e.suggestions = s, i !== -1 ? (this.messages.value[i] = new
|
|
4038
|
+
s && s.length > 0 && (e.suggestions = s, i !== -1 ? (this.messages.value[i] = new ie(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new ie(e)], this.asyncToIndexDB());
|
|
3981
4039
|
}
|
|
3982
4040
|
/**
|
|
3983
4041
|
* 处理建议点击
|
|
@@ -3991,24 +4049,24 @@ class Wt {
|
|
|
3991
4049
|
*/
|
|
3992
4050
|
async handleSuggestionClick(e, t, i) {
|
|
3993
4051
|
const s = this.messages.value.findIndex(
|
|
3994
|
-
(
|
|
4052
|
+
(a) => a.messageid === e.messageid
|
|
3995
4053
|
);
|
|
3996
4054
|
if (s !== -1) {
|
|
3997
|
-
const
|
|
3998
|
-
|
|
4055
|
+
const a = this.messages.value[s]._origin;
|
|
4056
|
+
a.suggestions = void 0, this.messages.value[s].replace(a), this.messages.value = [...this.messages.value];
|
|
3999
4057
|
}
|
|
4000
4058
|
this.asyncToIndexDB();
|
|
4001
|
-
const { type:
|
|
4002
|
-
switch (
|
|
4059
|
+
const { type: o } = t;
|
|
4060
|
+
switch (o) {
|
|
4003
4061
|
case "action":
|
|
4004
4062
|
if (this.opts.extendToolbarClick) {
|
|
4005
|
-
const
|
|
4006
|
-
if (!
|
|
4063
|
+
const a = t.data.actionid;
|
|
4064
|
+
if (!a)
|
|
4007
4065
|
throw new Error("actionid不能为空");
|
|
4008
4066
|
const r = { ...e };
|
|
4009
4067
|
Object.assign(r, { topic: this.topic }), r.msg.realcontent = e.realcontent, await this.opts.extendToolbarClick(
|
|
4010
4068
|
i,
|
|
4011
|
-
{ id:
|
|
4069
|
+
{ id: a, appId: this.context.srfappid },
|
|
4012
4070
|
this.context,
|
|
4013
4071
|
this.params,
|
|
4014
4072
|
r
|
|
@@ -4019,7 +4077,7 @@ class Wt {
|
|
|
4019
4077
|
await this.question(t.data.content);
|
|
4020
4078
|
break;
|
|
4021
4079
|
default:
|
|
4022
|
-
throw new Error("不支持".concat(
|
|
4080
|
+
throw new Error("不支持".concat(o, "推荐类型"));
|
|
4023
4081
|
}
|
|
4024
4082
|
}
|
|
4025
4083
|
/**
|
|
@@ -4027,7 +4085,7 @@ class Wt {
|
|
|
4027
4085
|
* @param agentID
|
|
4028
4086
|
*/
|
|
4029
4087
|
async setActiveAIAgentID(e) {
|
|
4030
|
-
this.activeAIAgentID = e, this.reSetAIChat(), this.topicId && await
|
|
4088
|
+
this.activeAIAgentID = e, this.reSetAIChat(), this.topicId && await F.deleteData(
|
|
4031
4089
|
I.DATA_BASE_NAME,
|
|
4032
4090
|
I.DATA_TABLE_NAME,
|
|
4033
4091
|
this.getHistoryStoreKey(this.topicId)
|
|
@@ -4043,7 +4101,7 @@ class Wt {
|
|
|
4043
4101
|
this.evt.reset();
|
|
4044
4102
|
}
|
|
4045
4103
|
}
|
|
4046
|
-
class
|
|
4104
|
+
class _s {
|
|
4047
4105
|
/**
|
|
4048
4106
|
* Creates an instance of AiTopicController.
|
|
4049
4107
|
* @author tony001
|
|
@@ -4058,7 +4116,7 @@ class vs {
|
|
|
4058
4116
|
* @date 2025-02-20 16:02:38
|
|
4059
4117
|
* @type {Signal<ChatTopic[]>}
|
|
4060
4118
|
*/
|
|
4061
|
-
|
|
4119
|
+
T(this, "topics", q([]));
|
|
4062
4120
|
/**
|
|
4063
4121
|
* 激活话题
|
|
4064
4122
|
*
|
|
@@ -4066,7 +4124,7 @@ class vs {
|
|
|
4066
4124
|
* @date 2025-02-24 16:02:44
|
|
4067
4125
|
* @type {(Signal<ITopic | undefined>)}
|
|
4068
4126
|
*/
|
|
4069
|
-
|
|
4127
|
+
T(this, "activedTopic", q(void 0));
|
|
4070
4128
|
/**
|
|
4071
4129
|
* 当前话题配置备份
|
|
4072
4130
|
*
|
|
@@ -4075,7 +4133,7 @@ class vs {
|
|
|
4075
4133
|
* @public
|
|
4076
4134
|
* @type {(ITopicOptions | undefined)}
|
|
4077
4135
|
*/
|
|
4078
|
-
|
|
4136
|
+
T(this, "currentTopicOptions");
|
|
4079
4137
|
this.chat = e;
|
|
4080
4138
|
}
|
|
4081
4139
|
/**
|
|
@@ -4112,7 +4170,7 @@ class vs {
|
|
|
4112
4170
|
if (!e || !t || t && !t.activeAIAgentID || !this.currentTopicOptions)
|
|
4113
4171
|
return;
|
|
4114
4172
|
const i = this.topics.value.findIndex(
|
|
4115
|
-
(
|
|
4173
|
+
(a) => a.id === e
|
|
4116
4174
|
);
|
|
4117
4175
|
if (i === -1 || !this.topics.value[i].data.aiChat)
|
|
4118
4176
|
return;
|
|
@@ -4120,20 +4178,20 @@ class vs {
|
|
|
4120
4178
|
...this.topics.value[i].data.aiChat,
|
|
4121
4179
|
activeAIAgentID: t.activeAIAgentID
|
|
4122
4180
|
};
|
|
4123
|
-
const s = this.topics.value.map((
|
|
4124
|
-
appid:
|
|
4125
|
-
id:
|
|
4126
|
-
type:
|
|
4127
|
-
caption:
|
|
4128
|
-
sourceCaption:
|
|
4129
|
-
url:
|
|
4130
|
-
aiChat:
|
|
4131
|
-
})),
|
|
4181
|
+
const s = this.topics.value.map((a) => ({
|
|
4182
|
+
appid: a.appid,
|
|
4183
|
+
id: a.id,
|
|
4184
|
+
type: a.type,
|
|
4185
|
+
caption: a.caption,
|
|
4186
|
+
sourceCaption: a.sourceCaption,
|
|
4187
|
+
url: a.url,
|
|
4188
|
+
aiChat: a.aiChat
|
|
4189
|
+
})), o = this.currentTopicOptions.configService(
|
|
4132
4190
|
this.currentTopicOptions.appid,
|
|
4133
4191
|
"aitopics",
|
|
4134
4192
|
this.currentTopicOptions.type
|
|
4135
4193
|
);
|
|
4136
|
-
await (
|
|
4194
|
+
await (o == null ? void 0 : o.save(s));
|
|
4137
4195
|
}
|
|
4138
4196
|
/**
|
|
4139
4197
|
* 更新当前话题
|
|
@@ -4146,23 +4204,23 @@ class vs {
|
|
|
4146
4204
|
async updateCurrentTopic(e) {
|
|
4147
4205
|
this.currentTopicOptions = e;
|
|
4148
4206
|
const t = this.topics.value.findIndex(
|
|
4149
|
-
(
|
|
4207
|
+
(a) => a.id === e.id
|
|
4150
4208
|
), i = new we(e);
|
|
4151
4209
|
t !== -1 ? this.topics.value.splice(t, 1, new we(e)) : this.topics.value = [...this.topics.value, new we(e)];
|
|
4152
|
-
const s = this.topics.value.map((
|
|
4153
|
-
appid:
|
|
4154
|
-
id:
|
|
4155
|
-
type:
|
|
4156
|
-
caption:
|
|
4157
|
-
sourceCaption:
|
|
4158
|
-
url:
|
|
4159
|
-
aiChat:
|
|
4160
|
-
})),
|
|
4210
|
+
const s = this.topics.value.map((a) => ({
|
|
4211
|
+
appid: a.appid,
|
|
4212
|
+
id: a.id,
|
|
4213
|
+
type: a.type,
|
|
4214
|
+
caption: a.caption,
|
|
4215
|
+
sourceCaption: a.sourceCaption,
|
|
4216
|
+
url: a.url,
|
|
4217
|
+
aiChat: a.aiChat
|
|
4218
|
+
})), o = e.configService(
|
|
4161
4219
|
e.appid,
|
|
4162
4220
|
"aitopics",
|
|
4163
4221
|
e.type
|
|
4164
4222
|
);
|
|
4165
|
-
await (
|
|
4223
|
+
await (o == null ? void 0 : o.save(s)), this.activedTopic.value = i;
|
|
4166
4224
|
}
|
|
4167
4225
|
/**
|
|
4168
4226
|
* 删除话题
|
|
@@ -4176,10 +4234,10 @@ class vs {
|
|
|
4176
4234
|
* @param {MouseEvent} event
|
|
4177
4235
|
* @return {*} {Promise<void>}
|
|
4178
4236
|
*/
|
|
4179
|
-
async removeTopic(e, t, i, s,
|
|
4237
|
+
async removeTopic(e, t, i, s, o) {
|
|
4180
4238
|
var d;
|
|
4181
|
-
let
|
|
4182
|
-
if (e.beforeDelete && (
|
|
4239
|
+
let a = !0;
|
|
4240
|
+
if (e.beforeDelete && (a = await e.beforeDelete(t, i, s, o)), !a)
|
|
4183
4241
|
return;
|
|
4184
4242
|
const r = this.topics.value.findIndex(
|
|
4185
4243
|
(l) => l.id === s.id
|
|
@@ -4198,7 +4256,7 @@ class vs {
|
|
|
4198
4256
|
"aitopics",
|
|
4199
4257
|
e.type
|
|
4200
4258
|
);
|
|
4201
|
-
await (h == null ? void 0 : h.save(u)), await
|
|
4259
|
+
await (h == null ? void 0 : h.save(u)), await F.deleteData(
|
|
4202
4260
|
I.DATA_BASE_NAME,
|
|
4203
4261
|
I.DATA_TABLE_NAME,
|
|
4204
4262
|
s.id
|
|
@@ -4213,14 +4271,14 @@ class vs {
|
|
|
4213
4271
|
* @memberof AiTopicController
|
|
4214
4272
|
*/
|
|
4215
4273
|
async updateTopic(e, t) {
|
|
4216
|
-
const i = this.topics.value.map((
|
|
4217
|
-
appid:
|
|
4218
|
-
id:
|
|
4219
|
-
type:
|
|
4220
|
-
caption:
|
|
4221
|
-
sourceCaption:
|
|
4222
|
-
url:
|
|
4223
|
-
aiChat:
|
|
4274
|
+
const i = this.topics.value.map((o) => ({
|
|
4275
|
+
appid: o.appid,
|
|
4276
|
+
id: o.id,
|
|
4277
|
+
type: o.type,
|
|
4278
|
+
caption: o.caption,
|
|
4279
|
+
sourceCaption: o.sourceCaption,
|
|
4280
|
+
url: o.url,
|
|
4281
|
+
aiChat: o.aiChat
|
|
4224
4282
|
})), s = e.configService(
|
|
4225
4283
|
e.appid,
|
|
4226
4284
|
"aitopics",
|
|
@@ -4250,7 +4308,7 @@ class vs {
|
|
|
4250
4308
|
* @return {*} {Promise<void>}
|
|
4251
4309
|
*/
|
|
4252
4310
|
async handleTopicAction(e, t, i) {
|
|
4253
|
-
var
|
|
4311
|
+
var o, a;
|
|
4254
4312
|
const s = this.topics.value.find((r) => r.id === t.id);
|
|
4255
4313
|
if (this.currentTopicOptions && s && s.aiChat) {
|
|
4256
4314
|
const { context: r, params: u } = s.aiChat;
|
|
@@ -4260,7 +4318,7 @@ class vs {
|
|
|
4260
4318
|
u,
|
|
4261
4319
|
s,
|
|
4262
4320
|
i
|
|
4263
|
-
) : e === "RENAME" && await this.updateTopic(this.currentTopicOptions, t), (
|
|
4321
|
+
) : e === "RENAME" && await this.updateTopic(this.currentTopicOptions, t), (a = (o = this.currentTopicOptions).action) == null || a.call(o, e, r, u, t, i);
|
|
4264
4322
|
}
|
|
4265
4323
|
}
|
|
4266
4324
|
/**
|
|
@@ -4277,22 +4335,22 @@ class vs {
|
|
|
4277
4335
|
const i = this.topics.value.find((f) => f.id === e);
|
|
4278
4336
|
if (!i)
|
|
4279
4337
|
return;
|
|
4280
|
-
const s = i.id.split("@")[0],
|
|
4338
|
+
const s = i.id.split("@")[0], o = this.topics.value.filter((f) => f.id.startsWith(s));
|
|
4281
4339
|
t.activeAIAgentID && i.aiChat && (i.data.aiChat = {
|
|
4282
4340
|
...i.aiChat,
|
|
4283
4341
|
activeAIAgentID: t.activeAIAgentID
|
|
4284
4342
|
});
|
|
4285
|
-
const
|
|
4343
|
+
const a = {
|
|
4286
4344
|
appid: i.appid,
|
|
4287
4345
|
// 源头数据id@当前时间戳
|
|
4288
4346
|
id: "".concat(s, "@").concat(Date.now()),
|
|
4289
4347
|
type: i.type,
|
|
4290
4348
|
// 源头数据标题_当前话题数量(这儿源头数据可能已经被删除)
|
|
4291
|
-
caption: "".concat((d = i.sourceCaption) == null ? void 0 : d.split("_")[0], "_").concat(
|
|
4349
|
+
caption: "".concat((d = i.sourceCaption) == null ? void 0 : d.split("_")[0], "_").concat(o.length),
|
|
4292
4350
|
sourceCaption: i.sourceCaption,
|
|
4293
4351
|
url: i.url,
|
|
4294
4352
|
aiChat: i.aiChat
|
|
4295
|
-
}, r = new we(
|
|
4353
|
+
}, r = new we(a);
|
|
4296
4354
|
this.topics.value = [...this.topics.value, r];
|
|
4297
4355
|
const u = this.topics.value.map((f) => ({
|
|
4298
4356
|
appid: f.appid,
|
|
@@ -4303,9 +4361,9 @@ class vs {
|
|
|
4303
4361
|
url: f.url,
|
|
4304
4362
|
aiChat: f.aiChat
|
|
4305
4363
|
})), h = (l = this.currentTopicOptions) == null ? void 0 : l.configService(
|
|
4306
|
-
|
|
4364
|
+
a.appid,
|
|
4307
4365
|
"aitopics",
|
|
4308
|
-
|
|
4366
|
+
a.type
|
|
4309
4367
|
);
|
|
4310
4368
|
await (h == null ? void 0 : h.save(u)), this.handleTopicChange(r);
|
|
4311
4369
|
}
|
|
@@ -4316,11 +4374,11 @@ class vs {
|
|
|
4316
4374
|
* @memberof AiTopicController
|
|
4317
4375
|
*/
|
|
4318
4376
|
async clearTopic() {
|
|
4319
|
-
var
|
|
4377
|
+
var o;
|
|
4320
4378
|
const e = this.topics.value.find(
|
|
4321
|
-
(
|
|
4379
|
+
(a) => {
|
|
4322
4380
|
var r;
|
|
4323
|
-
return
|
|
4381
|
+
return a.id === ((r = this.activedTopic.value) == null ? void 0 : r.id);
|
|
4324
4382
|
}
|
|
4325
4383
|
);
|
|
4326
4384
|
if (!this.currentTopicOptions || !e)
|
|
@@ -4335,27 +4393,27 @@ class vs {
|
|
|
4335
4393
|
)), !t)
|
|
4336
4394
|
return;
|
|
4337
4395
|
await Promise.all(
|
|
4338
|
-
this.topics.value.map((
|
|
4339
|
-
if (
|
|
4340
|
-
return
|
|
4396
|
+
this.topics.value.map((a) => {
|
|
4397
|
+
if (a.id !== (e == null ? void 0 : e.id))
|
|
4398
|
+
return F.deleteData(
|
|
4341
4399
|
I.DATA_BASE_NAME,
|
|
4342
4400
|
I.DATA_TABLE_NAME,
|
|
4343
|
-
|
|
4401
|
+
a.id
|
|
4344
4402
|
);
|
|
4345
4403
|
})
|
|
4346
4404
|
), this.topics.value = e ? [e] : [];
|
|
4347
|
-
const i = (
|
|
4405
|
+
const i = (o = this.currentTopicOptions) == null ? void 0 : o.configService(
|
|
4348
4406
|
this.currentTopicOptions.appid,
|
|
4349
4407
|
"aitopics",
|
|
4350
4408
|
this.currentTopicOptions.type
|
|
4351
|
-
), s = this.topics.value.map((
|
|
4352
|
-
appid:
|
|
4353
|
-
id:
|
|
4354
|
-
type:
|
|
4355
|
-
caption:
|
|
4356
|
-
sourceCaption:
|
|
4357
|
-
url:
|
|
4358
|
-
aiChat:
|
|
4409
|
+
), s = this.topics.value.map((a) => ({
|
|
4410
|
+
appid: a.appid,
|
|
4411
|
+
id: a.id,
|
|
4412
|
+
type: a.type,
|
|
4413
|
+
caption: a.caption,
|
|
4414
|
+
sourceCaption: a.sourceCaption,
|
|
4415
|
+
url: a.url,
|
|
4416
|
+
aiChat: a.aiChat
|
|
4359
4417
|
}));
|
|
4360
4418
|
await (i == null ? void 0 : i.save(s));
|
|
4361
4419
|
}
|
|
@@ -4365,7 +4423,7 @@ class On {
|
|
|
4365
4423
|
this.aiChat = e;
|
|
4366
4424
|
}
|
|
4367
4425
|
}
|
|
4368
|
-
class
|
|
4426
|
+
class gs extends On {
|
|
4369
4427
|
/**
|
|
4370
4428
|
* 执行操作
|
|
4371
4429
|
*
|
|
@@ -4393,17 +4451,17 @@ class ms extends On {
|
|
|
4393
4451
|
) : console.error("未找到扩展工具栏点击事件");
|
|
4394
4452
|
}
|
|
4395
4453
|
if (i && i.data && i.data.length > 0) {
|
|
4396
|
-
const s = i.data[0],
|
|
4454
|
+
const s = i.data[0], o = {
|
|
4397
4455
|
id: s.id,
|
|
4398
4456
|
type: s.type,
|
|
4399
4457
|
data: s.data || {},
|
|
4400
4458
|
metadata: s.metadata || {}
|
|
4401
4459
|
};
|
|
4402
|
-
t.id && Object.assign(
|
|
4460
|
+
t.id && Object.assign(o.metadata, { actionId: t.id }), this.aiChat.addMaterial(o);
|
|
4403
4461
|
}
|
|
4404
4462
|
}
|
|
4405
4463
|
}
|
|
4406
|
-
class
|
|
4464
|
+
class ws extends On {
|
|
4407
4465
|
/**
|
|
4408
4466
|
* 执行操作
|
|
4409
4467
|
*
|
|
@@ -4414,8 +4472,8 @@ class _s extends On {
|
|
|
4414
4472
|
async excuteAction(e, t) {
|
|
4415
4473
|
const i = this.aiChat.opts.uploader, {
|
|
4416
4474
|
multiple: s,
|
|
4417
|
-
accept:
|
|
4418
|
-
maxSize:
|
|
4475
|
+
accept: o,
|
|
4476
|
+
maxSize: a,
|
|
4419
4477
|
onSelect: r,
|
|
4420
4478
|
onUpload: u,
|
|
4421
4479
|
onSuccess: h,
|
|
@@ -4423,8 +4481,8 @@ class _s extends On {
|
|
|
4423
4481
|
onProgress: l
|
|
4424
4482
|
} = i, f = {
|
|
4425
4483
|
multiple: s || !0,
|
|
4426
|
-
accept:
|
|
4427
|
-
maxSize:
|
|
4484
|
+
accept: o || "*/*",
|
|
4485
|
+
maxSize: a || 5 * 1024 * 1024,
|
|
4428
4486
|
onSelect: (p) => {
|
|
4429
4487
|
r == null || r(p), p.length > 0 && p.forEach((m) => {
|
|
4430
4488
|
const w = this.buildMaterialObject(m);
|
|
@@ -4490,17 +4548,17 @@ class _s extends On {
|
|
|
4490
4548
|
};
|
|
4491
4549
|
}
|
|
4492
4550
|
}
|
|
4493
|
-
class
|
|
4551
|
+
class Vt {
|
|
4494
4552
|
static getMaterialHelper(e, t) {
|
|
4495
4553
|
switch (e) {
|
|
4496
4554
|
case "ossfile":
|
|
4497
|
-
return new
|
|
4555
|
+
return new ws(t);
|
|
4498
4556
|
default:
|
|
4499
|
-
return new
|
|
4557
|
+
return new gs(t);
|
|
4500
4558
|
}
|
|
4501
4559
|
}
|
|
4502
4560
|
}
|
|
4503
|
-
class
|
|
4561
|
+
class bs {
|
|
4504
4562
|
/**
|
|
4505
4563
|
* Creates an instance of ChatController.
|
|
4506
4564
|
* @author tony001
|
|
@@ -4515,7 +4573,7 @@ class gs {
|
|
|
4515
4573
|
* @protected
|
|
4516
4574
|
* @type {HTMLDivElement}
|
|
4517
4575
|
*/
|
|
4518
|
-
|
|
4576
|
+
T(this, "container");
|
|
4519
4577
|
/**
|
|
4520
4578
|
* 默认模式(聊天框)和话题模式(支持多话题切换),聊天框为默认模式
|
|
4521
4579
|
*
|
|
@@ -4524,7 +4582,7 @@ class gs {
|
|
|
4524
4582
|
* @protected
|
|
4525
4583
|
* @type {('DEFAULT' | 'TOPIC')}
|
|
4526
4584
|
*/
|
|
4527
|
-
|
|
4585
|
+
T(this, "mode", "DEFAULT");
|
|
4528
4586
|
/**
|
|
4529
4587
|
* 是否挂载ai话题
|
|
4530
4588
|
*
|
|
@@ -4533,7 +4591,7 @@ class gs {
|
|
|
4533
4591
|
* @protected
|
|
4534
4592
|
* @type {boolean}
|
|
4535
4593
|
*/
|
|
4536
|
-
|
|
4594
|
+
T(this, "isMountedAiTopic", !1);
|
|
4537
4595
|
/**
|
|
4538
4596
|
* 容器配置备份
|
|
4539
4597
|
*
|
|
@@ -4542,7 +4600,7 @@ class gs {
|
|
|
4542
4600
|
* @protected
|
|
4543
4601
|
* @type {(IContainerOptions | undefined)}
|
|
4544
4602
|
*/
|
|
4545
|
-
|
|
4603
|
+
T(this, "backupChatOptions");
|
|
4546
4604
|
/**
|
|
4547
4605
|
* 话题控制器
|
|
4548
4606
|
*
|
|
@@ -4551,7 +4609,7 @@ class gs {
|
|
|
4551
4609
|
* @public
|
|
4552
4610
|
* @type {AiTopicController}
|
|
4553
4611
|
*/
|
|
4554
|
-
|
|
4612
|
+
T(this, "aiTopic");
|
|
4555
4613
|
/**
|
|
4556
4614
|
* 话题map
|
|
4557
4615
|
*
|
|
@@ -4559,8 +4617,8 @@ class gs {
|
|
|
4559
4617
|
* @type {Map<string, AiChatController>}
|
|
4560
4618
|
* @memberof ChatController
|
|
4561
4619
|
*/
|
|
4562
|
-
|
|
4563
|
-
this.aiTopic = new
|
|
4620
|
+
T(this, "aiTopicMap", /* @__PURE__ */ new Map());
|
|
4621
|
+
this.aiTopic = new _s(this);
|
|
4564
4622
|
}
|
|
4565
4623
|
/**
|
|
4566
4624
|
* 聊天控制器
|
|
@@ -4581,10 +4639,10 @@ class gs {
|
|
|
4581
4639
|
* @return {*} {Promise<void>}
|
|
4582
4640
|
*/
|
|
4583
4641
|
async initIndexDB() {
|
|
4584
|
-
await
|
|
4642
|
+
await F.checkTableExists(
|
|
4585
4643
|
I.DATA_BASE_NAME,
|
|
4586
4644
|
I.DATA_TABLE_NAME
|
|
4587
|
-
) || await
|
|
4645
|
+
) || await F.createTable(
|
|
4588
4646
|
I.DATA_BASE_NAME,
|
|
4589
4647
|
I.DATA_TABLE_NAME,
|
|
4590
4648
|
I.DATA_TABLE_KEY_NAME,
|
|
@@ -4600,7 +4658,7 @@ class gs {
|
|
|
4600
4658
|
* @return {*} {Promise<AiChatController>}
|
|
4601
4659
|
*/
|
|
4602
4660
|
async create(e) {
|
|
4603
|
-
var a;
|
|
4661
|
+
var o, a, r;
|
|
4604
4662
|
await this.initIndexDB(), this.backupChatOptions = e, this.close(), this.container = document.createElement("div"), this.container.classList.add("ibiz-ai-chat"), document.body.appendChild(this.container);
|
|
4605
4663
|
const t = e.chatOptions;
|
|
4606
4664
|
let i;
|
|
@@ -4617,19 +4675,21 @@ class gs {
|
|
|
4617
4675
|
otherToolbarItems: t.otherToolbarItems,
|
|
4618
4676
|
appendCurData: t.appendCurData,
|
|
4619
4677
|
appendCurContent: t.appendCurContent,
|
|
4620
|
-
aiAgentlist: t.aiAgentlist
|
|
4678
|
+
aiAgentlist: t.aiAgentlist,
|
|
4679
|
+
srfMode: t.srfMode,
|
|
4680
|
+
appendCurResource: t.appendCurResource
|
|
4621
4681
|
}
|
|
4622
4682
|
});
|
|
4623
|
-
const
|
|
4683
|
+
const u = this.aiTopic.getCurrentTopicByID(
|
|
4624
4684
|
i.id
|
|
4625
4685
|
);
|
|
4626
|
-
if (
|
|
4627
|
-
t.activeAIAgentID =
|
|
4686
|
+
if (u && u.aiChat && u.aiChat.activeAIAgentID)
|
|
4687
|
+
t.activeAIAgentID = u.aiChat.activeAIAgentID, i.aiChat.activeAIAgentID = u.aiChat.activeAIAgentID;
|
|
4628
4688
|
else if (t.aiAgentlist && t.aiAgentlist.length > 0) {
|
|
4629
|
-
const
|
|
4630
|
-
(
|
|
4689
|
+
const h = t.aiAgentlist.find(
|
|
4690
|
+
(d) => d.default === 1
|
|
4631
4691
|
);
|
|
4632
|
-
|
|
4692
|
+
h ? (t.activeAIAgentID = h.id, i.aiChat.activeAIAgentID = h.id) : (t.activeAIAgentID = t.aiAgentlist[0].id, i.aiChat.activeAIAgentID = t.aiAgentlist[0].id);
|
|
4633
4693
|
}
|
|
4634
4694
|
await this.aiTopic.updateCurrentTopic(i);
|
|
4635
4695
|
} else
|
|
@@ -4638,33 +4698,33 @@ class gs {
|
|
|
4638
4698
|
topicId: i == null ? void 0 : i.id,
|
|
4639
4699
|
topic: i
|
|
4640
4700
|
});
|
|
4641
|
-
const s = new
|
|
4642
|
-
return this.aiTopicMap.set("".concat(i == null ? void 0 : i.id), s),
|
|
4643
|
-
X(
|
|
4701
|
+
const s = new jt(t);
|
|
4702
|
+
return this.aiTopicMap.set("".concat(i == null ? void 0 : i.id), s), he(
|
|
4703
|
+
X(Xt, {
|
|
4644
4704
|
aiChat: s,
|
|
4645
4705
|
aiTopic: this.aiTopic,
|
|
4646
4706
|
mode: e.mode ? e.mode : "DEFAULT",
|
|
4647
4707
|
containerOptions: e.containerOptions,
|
|
4648
4708
|
caption: e.mode && e.mode === "TOPIC" ? "AI助手" : t.caption,
|
|
4649
|
-
enableBackFill: (
|
|
4709
|
+
enableBackFill: (o = e.containerOptions) == null ? void 0 : o.enableBackFill,
|
|
4650
4710
|
contentToolbarItems: t.contentToolbarItems,
|
|
4651
4711
|
footerToolbarItems: t.footerToolbarItems,
|
|
4652
4712
|
questionToolbarItems: t.questionToolbarItems,
|
|
4653
|
-
autoClose:
|
|
4654
|
-
openMode:
|
|
4713
|
+
autoClose: (a = e.containerOptions) == null ? void 0 : a.autoClose,
|
|
4714
|
+
openMode: (r = e.containerOptions) == null ? void 0 : r.openMode,
|
|
4655
4715
|
close: () => {
|
|
4656
4716
|
this.close(), t.closed && t.closed(t.context, t.params);
|
|
4657
4717
|
},
|
|
4658
|
-
fullscreen: (
|
|
4718
|
+
fullscreen: (u) => {
|
|
4659
4719
|
t.fullscreen && t.fullscreen(
|
|
4660
|
-
|
|
4720
|
+
u,
|
|
4661
4721
|
t.context,
|
|
4662
4722
|
t.params
|
|
4663
4723
|
);
|
|
4664
4724
|
},
|
|
4665
|
-
minimize: (
|
|
4725
|
+
minimize: (u) => {
|
|
4666
4726
|
t.minimize && t.minimize(
|
|
4667
|
-
|
|
4727
|
+
u,
|
|
4668
4728
|
t.context,
|
|
4669
4729
|
t.params
|
|
4670
4730
|
);
|
|
@@ -4681,7 +4741,7 @@ class gs {
|
|
|
4681
4741
|
* @param {ChatTopic} topic
|
|
4682
4742
|
*/
|
|
4683
4743
|
switchAiChatController(e) {
|
|
4684
|
-
var s,
|
|
4744
|
+
var s, o, a, r, u, h, d, l, f;
|
|
4685
4745
|
const t = {
|
|
4686
4746
|
...this.backupChatOptions.chatOptions
|
|
4687
4747
|
};
|
|
@@ -4697,6 +4757,8 @@ class gs {
|
|
|
4697
4757
|
appendCurContent: e.aiChat.appendCurContent,
|
|
4698
4758
|
aiAgentlist: e.aiChat.aiAgentlist,
|
|
4699
4759
|
activeAIAgentID: e.aiChat.activeAIAgentID,
|
|
4760
|
+
srfMode: e.aiChat.srfMode,
|
|
4761
|
+
appendCurResource: e.aiChat.appendCurResource,
|
|
4700
4762
|
appDataEntityId: e.aiChat.appDataEntityId,
|
|
4701
4763
|
topicId: e.id,
|
|
4702
4764
|
topic: e,
|
|
@@ -4704,25 +4766,27 @@ class gs {
|
|
|
4704
4766
|
recommendPrompt: this.backupChatOptions.chatOptions.recommendPrompt
|
|
4705
4767
|
});
|
|
4706
4768
|
let i;
|
|
4707
|
-
this.aiTopicMap.has("".concat(e.id)) ? i = this.aiTopicMap.get("".concat(e.id)) : (i = new
|
|
4708
|
-
X(
|
|
4769
|
+
this.aiTopicMap.has("".concat(e.id)) ? i = this.aiTopicMap.get("".concat(e.id)) : (i = new jt(t), this.aiTopicMap.set("".concat(e.id), i)), this.container && (he(null, this.container), he(
|
|
4770
|
+
X(Xt, {
|
|
4709
4771
|
aiChat: i,
|
|
4710
4772
|
aiTopic: this.aiTopic,
|
|
4711
4773
|
mode: (s = this.backupChatOptions) != null && s.mode ? this.backupChatOptions.mode : "DEFAULT",
|
|
4712
|
-
containerOptions: (
|
|
4713
|
-
caption: (
|
|
4774
|
+
containerOptions: (o = this.backupChatOptions) == null ? void 0 : o.containerOptions,
|
|
4775
|
+
caption: (a = this.backupChatOptions) != null && a.mode && this.backupChatOptions.mode === "TOPIC" ? "AI助手" : t.caption,
|
|
4714
4776
|
enableBackFill: (u = (r = this.backupChatOptions) == null ? void 0 : r.containerOptions) == null ? void 0 : u.enableBackFill,
|
|
4715
4777
|
contentToolbarItems: t.contentToolbarItems,
|
|
4716
4778
|
footerToolbarItems: t.footerToolbarItems,
|
|
4717
4779
|
questionToolbarItems: t.questionToolbarItems,
|
|
4780
|
+
autoClose: (d = (h = this.backupChatOptions) == null ? void 0 : h.containerOptions) == null ? void 0 : d.autoClose,
|
|
4781
|
+
openMode: (f = (l = this.backupChatOptions) == null ? void 0 : l.containerOptions) == null ? void 0 : f.openMode,
|
|
4718
4782
|
close: () => {
|
|
4719
4783
|
this.close(), t.closed && t.closed(t.context, t.params);
|
|
4720
4784
|
},
|
|
4721
|
-
fullscreen: (
|
|
4722
|
-
t.fullscreen && t.fullscreen(
|
|
4785
|
+
fullscreen: (_) => {
|
|
4786
|
+
t.fullscreen && t.fullscreen(_, t.context, t.params);
|
|
4723
4787
|
},
|
|
4724
|
-
minimize: (
|
|
4725
|
-
t.minimize && t.minimize(
|
|
4788
|
+
minimize: (_) => {
|
|
4789
|
+
t.minimize && t.minimize(_, t.context, t.params);
|
|
4726
4790
|
}
|
|
4727
4791
|
}),
|
|
4728
4792
|
this.container
|
|
@@ -4753,15 +4817,15 @@ class gs {
|
|
|
4753
4817
|
* @date 2023-10-13 17:10:10
|
|
4754
4818
|
*/
|
|
4755
4819
|
close() {
|
|
4756
|
-
this.container && (
|
|
4820
|
+
this.container && (he(null, this.container), this.container.remove(), this.container = void 0), this.aiTopicMap.forEach((e) => {
|
|
4757
4821
|
e.destroyed();
|
|
4758
4822
|
});
|
|
4759
4823
|
}
|
|
4760
4824
|
}
|
|
4761
|
-
const
|
|
4762
|
-
const
|
|
4825
|
+
const Es = new bs();
|
|
4826
|
+
const ys = new k("chat-input-material"), Cs = (n) => {
|
|
4763
4827
|
const e = n.controller.materials;
|
|
4764
|
-
return /* @__PURE__ */ c("div", { className:
|
|
4828
|
+
return /* @__PURE__ */ c("div", { className: ys.b(), children: e.value.map((t) => /* @__PURE__ */ c(
|
|
4765
4829
|
Dn,
|
|
4766
4830
|
{
|
|
4767
4831
|
material: t,
|
|
@@ -4778,23 +4842,23 @@ const Bn = ({
|
|
|
4778
4842
|
content: t,
|
|
4779
4843
|
position: i = "bottom",
|
|
4780
4844
|
isOpen: s,
|
|
4781
|
-
onToggleOpen:
|
|
4782
|
-
onAction:
|
|
4845
|
+
onToggleOpen: o,
|
|
4846
|
+
onAction: a
|
|
4783
4847
|
// 接收行为事件回调
|
|
4784
4848
|
}) => {
|
|
4785
|
-
const r = new k("pop"), u =
|
|
4849
|
+
const r = new k("pop"), u = ht(Re), [h, d] = V(s || !1), l = O(null), f = O(null);
|
|
4786
4850
|
D(() => {
|
|
4787
4851
|
s !== void 0 && d(s);
|
|
4788
4852
|
}, [s]), D(() => (f.current || (f.current = document.createElement("div"), f.current.className = r.b("content-container"), document.body.appendChild(f.current)), () => {
|
|
4789
4853
|
f.current && document.body.removeChild(f.current);
|
|
4790
4854
|
}), []), D(() => {
|
|
4791
4855
|
const p = (m) => {
|
|
4792
|
-
l.current && !l.current.contains(m.target) && !m.target.closest(".".concat(r.b())) && !m.target.closest(".ibiz-quick-edit") && !m.target.closest(".ibiz-picker__transfer") && (d(!1),
|
|
4856
|
+
l.current && !l.current.contains(m.target) && !m.target.closest(".".concat(r.b())) && !m.target.closest(".ibiz-quick-edit") && !m.target.closest(".ibiz-picker__transfer") && (d(!1), o == null || o(!1));
|
|
4793
4857
|
};
|
|
4794
4858
|
return h && document.addEventListener("mousedown", p), () => {
|
|
4795
4859
|
document.removeEventListener("mousedown", p);
|
|
4796
4860
|
};
|
|
4797
|
-
}, [h,
|
|
4861
|
+
}, [h, o]);
|
|
4798
4862
|
const _ = () => {
|
|
4799
4863
|
if (!l.current)
|
|
4800
4864
|
return {};
|
|
@@ -4834,12 +4898,12 @@ const Bn = ({
|
|
|
4834
4898
|
onClick: (p) => {
|
|
4835
4899
|
p.stopPropagation();
|
|
4836
4900
|
const m = !h;
|
|
4837
|
-
d(m),
|
|
4901
|
+
d(m), o == null || o(m);
|
|
4838
4902
|
},
|
|
4839
4903
|
children: n
|
|
4840
4904
|
}
|
|
4841
4905
|
),
|
|
4842
|
-
h && f.current &&
|
|
4906
|
+
h && f.current && ss(
|
|
4843
4907
|
/* @__PURE__ */ c(
|
|
4844
4908
|
"div",
|
|
4845
4909
|
{
|
|
@@ -4851,7 +4915,7 @@ const Bn = ({
|
|
|
4851
4915
|
title: p.caption,
|
|
4852
4916
|
className: r.e("item"),
|
|
4853
4917
|
onMouseDown: (m) => {
|
|
4854
|
-
m.stopPropagation(),
|
|
4918
|
+
m.stopPropagation(), a == null || a(p.id, m);
|
|
4855
4919
|
},
|
|
4856
4920
|
children: [
|
|
4857
4921
|
p.icon,
|
|
@@ -4866,15 +4930,15 @@ const Bn = ({
|
|
|
4866
4930
|
)
|
|
4867
4931
|
] });
|
|
4868
4932
|
};
|
|
4869
|
-
const
|
|
4933
|
+
const P = new k("chat-select"), Ts = (n) => {
|
|
4870
4934
|
var w;
|
|
4871
4935
|
const {
|
|
4872
4936
|
options: e,
|
|
4873
4937
|
value: t,
|
|
4874
4938
|
defaultValue: i,
|
|
4875
4939
|
className: s,
|
|
4876
|
-
placeholder:
|
|
4877
|
-
onChange:
|
|
4940
|
+
placeholder: o = "请选择",
|
|
4941
|
+
onChange: a,
|
|
4878
4942
|
disabled: r = !1
|
|
4879
4943
|
} = n, u = O(null), h = O(null), [d, l] = V(
|
|
4880
4944
|
t || i || ""
|
|
@@ -4883,51 +4947,32 @@ const j = new k("chat-select"), bs = (n) => {
|
|
|
4883
4947
|
t !== void 0 && l(t);
|
|
4884
4948
|
}, [t]);
|
|
4885
4949
|
const p = (g) => {
|
|
4886
|
-
l(g.value),
|
|
4950
|
+
l(g.value), a == null || a(g.value), _(!1);
|
|
4887
4951
|
};
|
|
4888
4952
|
D(() => {
|
|
4889
4953
|
const g = (v) => {
|
|
4890
|
-
var
|
|
4891
|
-
r || (
|
|
4954
|
+
var y, x;
|
|
4955
|
+
r || (y = h.current) != null && y.contains(v.target) || ((x = u.current) != null && x.contains(v.target) ? _((A) => !A) : _(!1));
|
|
4892
4956
|
};
|
|
4893
4957
|
return document.addEventListener("mousedown", g), () => {
|
|
4894
4958
|
document.removeEventListener("mousedown", g);
|
|
4895
4959
|
};
|
|
4896
4960
|
}, []);
|
|
4897
|
-
const m = ((w = e == null ? void 0 : e.find((g) => g.value === d)) == null ? void 0 : w.label) ||
|
|
4961
|
+
const m = ((w = e == null ? void 0 : e.find((g) => g.value === d)) == null ? void 0 : w.label) || o;
|
|
4898
4962
|
return /* @__PURE__ */ c(
|
|
4899
4963
|
"div",
|
|
4900
4964
|
{
|
|
4901
|
-
className: "".concat(
|
|
4965
|
+
className: "".concat(P.b(), " ").concat(s || "", " ").concat(P.is("visble", f), " ").concat(P.is("disabled", r)),
|
|
4902
4966
|
children: [
|
|
4903
|
-
/* @__PURE__ */ c("div", { className:
|
|
4904
|
-
/* @__PURE__ */ c("span", { className:
|
|
4905
|
-
/* @__PURE__ */ c(
|
|
4906
|
-
|
|
4907
|
-
{
|
|
4908
|
-
className: j.e("icon"),
|
|
4909
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4910
|
-
fill: "none",
|
|
4911
|
-
viewBox: "0 0 24 24",
|
|
4912
|
-
stroke: "currentColor",
|
|
4913
|
-
width: "1em",
|
|
4914
|
-
height: "1em",
|
|
4915
|
-
children: /* @__PURE__ */ c(
|
|
4916
|
-
"path",
|
|
4917
|
-
{
|
|
4918
|
-
strokeLinecap: "round",
|
|
4919
|
-
strokeLinejoin: "round",
|
|
4920
|
-
strokeWidth: "2",
|
|
4921
|
-
d: "M19 9l-7 7-7-7"
|
|
4922
|
-
}
|
|
4923
|
-
)
|
|
4924
|
-
}
|
|
4925
|
-
)
|
|
4967
|
+
/* @__PURE__ */ c("div", { className: P.e("header"), ref: u, children: [
|
|
4968
|
+
/* @__PURE__ */ c("span", { className: P.em("header", "prefix"), title: "智能体", children: zi() }),
|
|
4969
|
+
/* @__PURE__ */ c("span", { className: P.em("header", "display-value"), title: m, children: m }),
|
|
4970
|
+
/* @__PURE__ */ c("span", { className: P.em("header", "suffix"), children: Hi() })
|
|
4926
4971
|
] }),
|
|
4927
|
-
/* @__PURE__ */ c("div", { className:
|
|
4972
|
+
/* @__PURE__ */ c("div", { className: P.e("dropdown"), ref: h, children: /* @__PURE__ */ c("ul", { className: P.em("dropdown", "list"), children: e == null ? void 0 : e.map((g) => /* @__PURE__ */ c(
|
|
4928
4973
|
"li",
|
|
4929
4974
|
{
|
|
4930
|
-
className: "".concat(
|
|
4975
|
+
className: "".concat(P.em("dropdown", "item"), " ").concat(P.is("active", g.value === d)),
|
|
4931
4976
|
title: g.label,
|
|
4932
4977
|
onClick: () => p(g),
|
|
4933
4978
|
children: g.label
|
|
@@ -4938,84 +4983,84 @@ const j = new k("chat-select"), bs = (n) => {
|
|
|
4938
4983
|
}
|
|
4939
4984
|
);
|
|
4940
4985
|
};
|
|
4941
|
-
const
|
|
4986
|
+
const N = new k("chat-input"), qt = window.SpeechRecognition || window.webkitSpeechRecognition, Yt = (n) => {
|
|
4942
4987
|
var g;
|
|
4943
|
-
const [e, t] = V(!1), i = O(null), s =
|
|
4944
|
-
|
|
4945
|
-
|
|
4988
|
+
const [e, t] = V(!1), i = O(null), s = ht(Re), o = n.controller.input, a = $(!1), r = O();
|
|
4989
|
+
qt && !r.current && (r.current = new qt(), r.current.onstart = () => {
|
|
4990
|
+
a.value = !0;
|
|
4946
4991
|
}, r.current.onend = () => {
|
|
4947
|
-
|
|
4992
|
+
a.value = !1;
|
|
4948
4993
|
}, r.current.onresult = (v) => {
|
|
4949
|
-
var
|
|
4950
|
-
const
|
|
4951
|
-
|
|
4994
|
+
var x, A, L;
|
|
4995
|
+
const y = (L = (A = (x = v.results) == null ? void 0 : x[0]) == null ? void 0 : A[0]) == null ? void 0 : L.transcript;
|
|
4996
|
+
y && (o.value = "".concat(o.value).concat(y));
|
|
4952
4997
|
});
|
|
4953
4998
|
const u = () => {
|
|
4954
|
-
r.current && !
|
|
4999
|
+
r.current && !a.value && r.current.start();
|
|
4955
5000
|
}, h = je(
|
|
4956
5001
|
(v) => {
|
|
4957
|
-
|
|
5002
|
+
o.value = v.target.value;
|
|
4958
5003
|
},
|
|
4959
|
-
[
|
|
4960
|
-
), d = B(() =>
|
|
4961
|
-
D(() => (i.current &&
|
|
4962
|
-
i.current &&
|
|
5004
|
+
[o]
|
|
5005
|
+
), d = B(() => o.value.length <= 0);
|
|
5006
|
+
D(() => (i.current && Wt(i.current), () => {
|
|
5007
|
+
i.current && Wt.destroy(i.current);
|
|
4963
5008
|
}), [i]);
|
|
4964
5009
|
const l = je(async () => {
|
|
4965
5010
|
var v;
|
|
4966
5011
|
try {
|
|
4967
|
-
const
|
|
4968
|
-
|
|
4969
|
-
} catch (
|
|
4970
|
-
console.error(
|
|
5012
|
+
const y = o.value;
|
|
5013
|
+
o.value = "", await n.controller.question(y);
|
|
5014
|
+
} catch (y) {
|
|
5015
|
+
console.error(y);
|
|
4971
5016
|
} finally {
|
|
4972
5017
|
(v = i.current) == null || v.focus();
|
|
4973
5018
|
}
|
|
4974
|
-
}, [
|
|
5019
|
+
}, [o]), f = je(async () => {
|
|
4975
5020
|
try {
|
|
4976
5021
|
n.controller.abortQuestion();
|
|
4977
5022
|
} catch (v) {
|
|
4978
5023
|
console.error(v);
|
|
4979
5024
|
}
|
|
4980
|
-
}, [
|
|
5025
|
+
}, [o]), _ = (v) => {
|
|
4981
5026
|
v.code === "Enter" && !v.isComposing && (v.stopPropagation(), v.shiftKey === !1 && l());
|
|
4982
5027
|
}, p = async (v) => {
|
|
4983
|
-
await
|
|
5028
|
+
await Vt.getMaterialHelper(
|
|
4984
5029
|
"ossfile",
|
|
4985
5030
|
n.controller
|
|
4986
5031
|
).excuteAction(v), t(!1);
|
|
4987
|
-
}, m = async (v,
|
|
4988
|
-
await
|
|
5032
|
+
}, m = async (v, y) => {
|
|
5033
|
+
await Vt.getMaterialHelper(
|
|
4989
5034
|
"common",
|
|
4990
5035
|
n.controller
|
|
4991
|
-
).excuteAction(v,
|
|
5036
|
+
).excuteAction(v, y), t(!1);
|
|
4992
5037
|
}, w = (v) => {
|
|
4993
5038
|
n.controller.setActiveAIAgentID(v), n.controller.topicId && s.updateTopic(n.controller.topicId, {
|
|
4994
5039
|
activeAIAgentID: v
|
|
4995
5040
|
});
|
|
4996
5041
|
};
|
|
4997
|
-
return /* @__PURE__ */ c("div", { className:
|
|
4998
|
-
/* @__PURE__ */ c("div", { className:
|
|
4999
|
-
/* @__PURE__ */ c("div", { className:
|
|
5042
|
+
return /* @__PURE__ */ c("div", { className: N.b("wrapper"), children: [
|
|
5043
|
+
/* @__PURE__ */ c("div", { className: N.b("material-wrapper"), children: /* @__PURE__ */ c(Cs, { controller: n.controller }) }),
|
|
5044
|
+
/* @__PURE__ */ c("div", { className: N.b("main-wrapper"), children: [
|
|
5000
5045
|
/* @__PURE__ */ c(
|
|
5001
5046
|
"textarea",
|
|
5002
5047
|
{
|
|
5003
|
-
className:
|
|
5048
|
+
className: N.b("textarea-wrapper"),
|
|
5004
5049
|
type: "text",
|
|
5005
5050
|
rows: 6,
|
|
5006
5051
|
autoCorrect: "off",
|
|
5007
5052
|
autoCapitalize: "off",
|
|
5008
5053
|
autoComplete: "off",
|
|
5009
|
-
value:
|
|
5054
|
+
value: o,
|
|
5010
5055
|
onInput: h,
|
|
5011
5056
|
onKeyDown: _,
|
|
5012
5057
|
ref: i,
|
|
5013
5058
|
disabled: n.controller.isLoading.value
|
|
5014
5059
|
}
|
|
5015
5060
|
),
|
|
5016
|
-
/* @__PURE__ */ c("div", { className:
|
|
5017
|
-
/* @__PURE__ */ c("div", { className:
|
|
5018
|
-
|
|
5061
|
+
/* @__PURE__ */ c("div", { className: N.b("action-wrapper"), children: [
|
|
5062
|
+
/* @__PURE__ */ c("div", { className: N.b("left-action-wrapper"), children: n.controller.agentList.value.length > 0 ? /* @__PURE__ */ c(
|
|
5063
|
+
Ts,
|
|
5019
5064
|
{
|
|
5020
5065
|
options: n.controller.agentList.value,
|
|
5021
5066
|
defaultValue: n.controller.activeAIAgentID,
|
|
@@ -5024,11 +5069,11 @@ const $ = new k("chat-input"), Vt = window.SpeechRecognition || window.webkitSpe
|
|
|
5024
5069
|
}
|
|
5025
5070
|
}
|
|
5026
5071
|
) : /* @__PURE__ */ c("div", { children: "Auto" }) }),
|
|
5027
|
-
/* @__PURE__ */ c("div", { className:
|
|
5072
|
+
/* @__PURE__ */ c("div", { className: N.b("right-action-wrapper"), children: [
|
|
5028
5073
|
/* @__PURE__ */ c(
|
|
5029
5074
|
"div",
|
|
5030
5075
|
{
|
|
5031
|
-
className: "".concat(
|
|
5076
|
+
className: "".concat(N.be("right-action-wrapper", "action-item"), " ").concat(N.is(
|
|
5032
5077
|
"disabled",
|
|
5033
5078
|
n.controller.isLoading.value
|
|
5034
5079
|
)),
|
|
@@ -5036,31 +5081,31 @@ const $ = new k("chat-input"), Vt = window.SpeechRecognition || window.webkitSpe
|
|
|
5036
5081
|
children: /* @__PURE__ */ c(
|
|
5037
5082
|
Bn,
|
|
5038
5083
|
{
|
|
5039
|
-
content: /* @__PURE__ */ c("div", { className:
|
|
5084
|
+
content: /* @__PURE__ */ c("div", { className: N.b("pop-actions"), children: [
|
|
5040
5085
|
/* @__PURE__ */ c(
|
|
5041
5086
|
"div",
|
|
5042
5087
|
{
|
|
5043
|
-
className:
|
|
5088
|
+
className: N.b("pop-action-item"),
|
|
5044
5089
|
onClick: (v) => {
|
|
5045
5090
|
p(v);
|
|
5046
5091
|
},
|
|
5047
5092
|
children: [
|
|
5048
|
-
/* @__PURE__ */ c("span", { className:
|
|
5049
|
-
/* @__PURE__ */ c("span", { className:
|
|
5093
|
+
/* @__PURE__ */ c("span", { className: N.b("pop-action-item-icon"), children: /* @__PURE__ */ c(En, {}) }),
|
|
5094
|
+
/* @__PURE__ */ c("span", { className: N.b("pop-action-item-title"), children: "文件资料" })
|
|
5050
5095
|
]
|
|
5051
5096
|
}
|
|
5052
5097
|
),
|
|
5053
5098
|
(g = n.questionToolbarItems) == null ? void 0 : g.map((v) => {
|
|
5054
|
-
var
|
|
5099
|
+
var y, x, A;
|
|
5055
5100
|
return /* @__PURE__ */ c(
|
|
5056
5101
|
"div",
|
|
5057
5102
|
{
|
|
5058
|
-
className:
|
|
5103
|
+
className: N.b("pop-action-item"),
|
|
5059
5104
|
onClick: (L) => {
|
|
5060
5105
|
m(L, v);
|
|
5061
5106
|
},
|
|
5062
5107
|
children: [
|
|
5063
|
-
/* @__PURE__ */ c("span", { className:
|
|
5108
|
+
/* @__PURE__ */ c("span", { className: N.b("pop-action-item-icon"), children: typeof v.icon == "function" ? v.icon() : ((y = v.icon) == null ? void 0 : y.showIcon) && /* @__PURE__ */ c(Z, { children: (x = v.icon) != null && x.cssClass ? /* @__PURE__ */ c("i", { className: v.icon.cssClass }) : (A = v.icon) != null && A.imagePath ? ut(v.icon.imagePath) ? /* @__PURE__ */ c(
|
|
5064
5109
|
"div",
|
|
5065
5110
|
{
|
|
5066
5111
|
dangerouslySetInnerHTML: {
|
|
@@ -5068,7 +5113,7 @@ const $ = new k("chat-input"), Vt = window.SpeechRecognition || window.webkitSpe
|
|
|
5068
5113
|
}
|
|
5069
5114
|
}
|
|
5070
5115
|
) : /* @__PURE__ */ c("img", { src: v.icon.imagePath }) : null }) }),
|
|
5071
|
-
/* @__PURE__ */ c("span", { className:
|
|
5116
|
+
/* @__PURE__ */ c("span", { className: N.b("pop-action-item-title"), children: v.label })
|
|
5072
5117
|
]
|
|
5073
5118
|
},
|
|
5074
5119
|
v.id
|
|
@@ -5078,7 +5123,7 @@ const $ = new k("chat-input"), Vt = window.SpeechRecognition || window.webkitSpe
|
|
|
5078
5123
|
position: "top-left",
|
|
5079
5124
|
isOpen: e,
|
|
5080
5125
|
onToggleOpen: t,
|
|
5081
|
-
children: /* @__PURE__ */ c(
|
|
5126
|
+
children: /* @__PURE__ */ c(Ai, {})
|
|
5082
5127
|
}
|
|
5083
5128
|
)
|
|
5084
5129
|
}
|
|
@@ -5086,20 +5131,20 @@ const $ = new k("chat-input"), Vt = window.SpeechRecognition || window.webkitSpe
|
|
|
5086
5131
|
/* @__PURE__ */ c(
|
|
5087
5132
|
"div",
|
|
5088
5133
|
{
|
|
5089
|
-
title:
|
|
5090
|
-
className: "".concat(
|
|
5134
|
+
title: a.value ? "语音输入中..." : "语音输入",
|
|
5135
|
+
className: "".concat(N.be("right-action-wrapper", "action-item"), " ").concat(N.is(
|
|
5091
5136
|
"disabled",
|
|
5092
5137
|
n.controller.isLoading.value
|
|
5093
5138
|
)),
|
|
5094
5139
|
onClick: u,
|
|
5095
|
-
children:
|
|
5140
|
+
children: a.value ? /* @__PURE__ */ c(yi, {}) : /* @__PURE__ */ c(bi, {})
|
|
5096
5141
|
}
|
|
5097
5142
|
),
|
|
5098
5143
|
n.controller.isLoading.value ? /* @__PURE__ */ c(
|
|
5099
5144
|
"div",
|
|
5100
5145
|
{
|
|
5101
5146
|
title: "停止生成",
|
|
5102
|
-
className: "".concat(
|
|
5147
|
+
className: "".concat(N.be("right-action-wrapper", "action-item")),
|
|
5103
5148
|
onClick: f,
|
|
5104
5149
|
children: /* @__PURE__ */ c(Ii, {})
|
|
5105
5150
|
}
|
|
@@ -5107,7 +5152,7 @@ const $ = new k("chat-input"), Vt = window.SpeechRecognition || window.webkitSpe
|
|
|
5107
5152
|
"div",
|
|
5108
5153
|
{
|
|
5109
5154
|
title: "发送消息",
|
|
5110
|
-
className: "".concat(
|
|
5155
|
+
className: "".concat(N.be("right-action-wrapper", "action-item"), " ").concat(N.is(
|
|
5111
5156
|
"disabled",
|
|
5112
5157
|
d.value
|
|
5113
5158
|
)),
|
|
@@ -5120,16 +5165,16 @@ const $ = new k("chat-input"), Vt = window.SpeechRecognition || window.webkitSpe
|
|
|
5120
5165
|
] })
|
|
5121
5166
|
] });
|
|
5122
5167
|
};
|
|
5123
|
-
const
|
|
5124
|
-
const { controller: e, topic: t, onClick: i, onAction: s } = n,
|
|
5168
|
+
const R = new k("chat-topic-item"), xs = (n) => {
|
|
5169
|
+
const { controller: e, topic: t, onClick: i, onAction: s } = n, o = O(null), a = B(() => {
|
|
5125
5170
|
var w;
|
|
5126
5171
|
return ((w = e.activedTopic.value) == null ? void 0 : w.id) === t.id;
|
|
5127
|
-
}), [r, u] = V(!1), h =
|
|
5172
|
+
}), [r, u] = V(!1), h = $(!1), d = (m) => {
|
|
5128
5173
|
m.stopPropagation(), s("LINK", m);
|
|
5129
5174
|
}, l = (m, w) => {
|
|
5130
5175
|
m === "DELETE" ? s("DELETE", w) : m === "RENAME" && (h.value = !0, setTimeout(() => {
|
|
5131
5176
|
var g;
|
|
5132
|
-
(g =
|
|
5177
|
+
(g = o.current) == null || g.focus();
|
|
5133
5178
|
}, 100)), u(!1);
|
|
5134
5179
|
}, f = (m) => {
|
|
5135
5180
|
var w;
|
|
@@ -5142,46 +5187,46 @@ const P = new k("chat-topic-item"), Cs = (n) => {
|
|
|
5142
5187
|
return /* @__PURE__ */ c(
|
|
5143
5188
|
"div",
|
|
5144
5189
|
{
|
|
5145
|
-
className: "".concat(
|
|
5190
|
+
className: "".concat(R.b(), " ").concat(R.is("active", a.value), " ").concat(R.is(
|
|
5146
5191
|
"edit",
|
|
5147
5192
|
h.value
|
|
5148
5193
|
)),
|
|
5149
5194
|
onClick: i.bind(void 0),
|
|
5150
5195
|
children: [
|
|
5151
|
-
/* @__PURE__ */ c("div", { className:
|
|
5196
|
+
/* @__PURE__ */ c("div", { className: R.e("caption"), title: t.caption, children: h.value ? /* @__PURE__ */ c(
|
|
5152
5197
|
"input",
|
|
5153
5198
|
{
|
|
5154
|
-
ref:
|
|
5199
|
+
ref: o,
|
|
5155
5200
|
value: t.caption,
|
|
5156
5201
|
onBlur: _,
|
|
5157
5202
|
onKeyDown: p,
|
|
5158
5203
|
onClick: (m) => m.stopPropagation(),
|
|
5159
5204
|
onChange: (m) => f(m),
|
|
5160
|
-
className:
|
|
5205
|
+
className: R.em("caption", "editor")
|
|
5161
5206
|
}
|
|
5162
|
-
) : /* @__PURE__ */ c("span", { className:
|
|
5163
|
-
!h.value && /* @__PURE__ */ c("div", { className:
|
|
5207
|
+
) : /* @__PURE__ */ c("span", { className: R.em("caption", "text"), children: t.caption }) }),
|
|
5208
|
+
!h.value && /* @__PURE__ */ c("div", { className: R.e("icon"), children: [
|
|
5164
5209
|
/* @__PURE__ */ c(
|
|
5165
5210
|
"span",
|
|
5166
5211
|
{
|
|
5167
5212
|
title: "跳转主视图",
|
|
5168
|
-
className:
|
|
5213
|
+
className: R.em("icon", "item"),
|
|
5169
5214
|
onClick: d.bind(void 0),
|
|
5170
|
-
children: /* @__PURE__ */ c(Ti, { className:
|
|
5215
|
+
children: /* @__PURE__ */ c(Ti, { className: R.b("link-icon") })
|
|
5171
5216
|
}
|
|
5172
5217
|
),
|
|
5173
|
-
|
|
5218
|
+
a.value ? null : /* @__PURE__ */ c(
|
|
5174
5219
|
Bn,
|
|
5175
5220
|
{
|
|
5176
5221
|
actions: [
|
|
5177
|
-
{ id: "RENAME", caption: "重命名", icon: /* @__PURE__ */ c(
|
|
5178
|
-
{ id: "DELETE", caption: "删除话题", icon: /* @__PURE__ */ c(
|
|
5222
|
+
{ id: "RENAME", caption: "重命名", icon: /* @__PURE__ */ c(Ei, {}) },
|
|
5223
|
+
{ id: "DELETE", caption: "删除话题", icon: /* @__PURE__ */ c($n, {}) }
|
|
5179
5224
|
],
|
|
5180
5225
|
position: "bottom",
|
|
5181
5226
|
isOpen: r,
|
|
5182
5227
|
onToggleOpen: u,
|
|
5183
5228
|
onAction: l.bind(void 0),
|
|
5184
|
-
children: /* @__PURE__ */ c("span", { className:
|
|
5229
|
+
children: /* @__PURE__ */ c("span", { className: R.em("icon", "item"), title: "更多", children: /* @__PURE__ */ c(Ci, { className: R.e("more-icon") }) })
|
|
5185
5230
|
}
|
|
5186
5231
|
)
|
|
5187
5232
|
] })
|
|
@@ -5189,25 +5234,25 @@ const P = new k("chat-topic-item"), Cs = (n) => {
|
|
|
5189
5234
|
}
|
|
5190
5235
|
);
|
|
5191
5236
|
};
|
|
5192
|
-
const
|
|
5193
|
-
const { className: e, value: t, placeholder: i, onChange: s } = n, [
|
|
5237
|
+
const Ne = new k("chat-search"), As = (n) => {
|
|
5238
|
+
const { className: e, value: t, placeholder: i, onChange: s } = n, [o, a] = V(!1), r = (u) => {
|
|
5194
5239
|
var h;
|
|
5195
5240
|
u.stopPropagation(), s == null || s((h = u.target) == null ? void 0 : h.value);
|
|
5196
5241
|
};
|
|
5197
5242
|
return /* @__PURE__ */ c(
|
|
5198
5243
|
"div",
|
|
5199
5244
|
{
|
|
5200
|
-
className: "".concat(
|
|
5245
|
+
className: "".concat(Ne.b(), " ").concat(Ne.is("focus", o), " ").concat(e || ""),
|
|
5201
5246
|
children: [
|
|
5202
|
-
/* @__PURE__ */ c("div", { className:
|
|
5247
|
+
/* @__PURE__ */ c("div", { className: Ne.e("prefix"), children: /* @__PURE__ */ c(Li, {}) }),
|
|
5203
5248
|
/* @__PURE__ */ c(
|
|
5204
5249
|
"input",
|
|
5205
5250
|
{
|
|
5206
5251
|
value: t,
|
|
5207
|
-
className:
|
|
5252
|
+
className: Ne.e("inner"),
|
|
5208
5253
|
placeholder: i,
|
|
5209
|
-
onFocus: () =>
|
|
5210
|
-
onBlur: () =>
|
|
5254
|
+
onFocus: () => a(!0),
|
|
5255
|
+
onBlur: () => a(!1),
|
|
5211
5256
|
onChange: (u) => r(u)
|
|
5212
5257
|
}
|
|
5213
5258
|
)
|
|
@@ -5215,8 +5260,8 @@ const $e = new k("chat-search"), Ts = (n) => {
|
|
|
5215
5260
|
}
|
|
5216
5261
|
);
|
|
5217
5262
|
};
|
|
5218
|
-
const
|
|
5219
|
-
const e = O(null), t =
|
|
5263
|
+
const le = new k("chat-topics"), Ss = (n) => {
|
|
5264
|
+
const e = O(null), t = $(void 0), i = $([]);
|
|
5220
5265
|
D(() => {
|
|
5221
5266
|
i.value = n.controller.topics.value.filter(
|
|
5222
5267
|
(r) => {
|
|
@@ -5227,9 +5272,9 @@ const re = new k("chat-topics"), xs = (n) => {
|
|
|
5227
5272
|
}, [n.controller.topics.value]);
|
|
5228
5273
|
const s = (r) => {
|
|
5229
5274
|
n.controller.handleTopicChange(r);
|
|
5230
|
-
},
|
|
5275
|
+
}, o = (r, u, h) => {
|
|
5231
5276
|
n.controller.handleTopicAction(r, u, h);
|
|
5232
|
-
},
|
|
5277
|
+
}, a = (r) => {
|
|
5233
5278
|
t.value = r, i.value = n.controller.topics.value.filter(
|
|
5234
5279
|
(u) => {
|
|
5235
5280
|
var h, d;
|
|
@@ -5245,41 +5290,41 @@ const re = new k("chat-topics"), xs = (n) => {
|
|
|
5245
5290
|
".ibiz-chat-topic-item.is-active"
|
|
5246
5291
|
);
|
|
5247
5292
|
u == null || u.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
5248
|
-
}, [n.controller.activedTopic.value]), /* @__PURE__ */ c("div", { className:
|
|
5249
|
-
/* @__PURE__ */ c("div", { className:
|
|
5250
|
-
|
|
5293
|
+
}, [n.controller.activedTopic.value]), /* @__PURE__ */ c("div", { className: le.b(), children: [
|
|
5294
|
+
/* @__PURE__ */ c("div", { className: le.e("header"), children: /* @__PURE__ */ c(
|
|
5295
|
+
As,
|
|
5251
5296
|
{
|
|
5252
5297
|
value: t.value,
|
|
5253
5298
|
placeholder: "搜索话题",
|
|
5254
|
-
onChange:
|
|
5299
|
+
onChange: a.bind(void 0)
|
|
5255
5300
|
}
|
|
5256
5301
|
) }),
|
|
5257
|
-
/* @__PURE__ */ c("div", { ref: e, className:
|
|
5258
|
-
|
|
5302
|
+
/* @__PURE__ */ c("div", { ref: e, className: le.e("main"), children: i.value && i.value.length > 0 ? i.value.map((r) => /* @__PURE__ */ c(
|
|
5303
|
+
xs,
|
|
5259
5304
|
{
|
|
5260
5305
|
topic: r,
|
|
5261
5306
|
controller: n.controller,
|
|
5262
5307
|
onClick: () => s(r),
|
|
5263
|
-
onAction: (u, h) =>
|
|
5308
|
+
onAction: (u, h) => o(u, r, h)
|
|
5264
5309
|
},
|
|
5265
5310
|
r.id
|
|
5266
|
-
)) : /* @__PURE__ */ c("div", { className:
|
|
5267
|
-
/* @__PURE__ */ c("div", { className:
|
|
5311
|
+
)) : /* @__PURE__ */ c("div", { className: le.e("empty"), children: "暂无话题" }) }),
|
|
5312
|
+
/* @__PURE__ */ c("div", { className: le.e("footer"), children: /* @__PURE__ */ c(
|
|
5268
5313
|
"div",
|
|
5269
5314
|
{
|
|
5270
5315
|
title: "清空会话",
|
|
5271
|
-
className:
|
|
5316
|
+
className: le.e("action"),
|
|
5272
5317
|
onClick: () => n.controller.clearTopic(),
|
|
5273
5318
|
children: [
|
|
5274
|
-
/* @__PURE__ */ c(
|
|
5319
|
+
/* @__PURE__ */ c($n, {}),
|
|
5275
5320
|
/* @__PURE__ */ c("span", { children: "清空会话" })
|
|
5276
5321
|
]
|
|
5277
5322
|
}
|
|
5278
5323
|
) })
|
|
5279
5324
|
] });
|
|
5280
5325
|
};
|
|
5281
|
-
const
|
|
5282
|
-
const e = O(null), [t, i] = V(""), [s,
|
|
5326
|
+
const ue = new k("chat-minimize"), ks = (n) => {
|
|
5327
|
+
const e = O(null), [t, i] = V(""), [s, o] = V(0), a = O(!1), r = {
|
|
5283
5328
|
x: (window.innerWidth - 86) / window.innerWidth,
|
|
5284
5329
|
y: (window.innerHeight - 86) / window.innerHeight
|
|
5285
5330
|
}, u = B(() => {
|
|
@@ -5292,7 +5337,7 @@ const ce = new k("chat-minimize"), Ss = (n) => {
|
|
|
5292
5337
|
}, d = B(() => {
|
|
5293
5338
|
let p = "";
|
|
5294
5339
|
if (!u.value)
|
|
5295
|
-
return i(""),
|
|
5340
|
+
return i(""), o(0), p;
|
|
5296
5341
|
const m = n.controller.messages.value[n.controller.messages.value.length - 1];
|
|
5297
5342
|
if (p = m.content, m.content.indexOf("<think>") !== -1) {
|
|
5298
5343
|
const { thoughtContent: w, answerContent: g } = h(
|
|
@@ -5313,36 +5358,36 @@ const ce = new k("chat-minimize"), Ss = (n) => {
|
|
|
5313
5358
|
const p = e.current;
|
|
5314
5359
|
p && (p.onmousedown = (m) => {
|
|
5315
5360
|
document.body.style.userSelect = "none";
|
|
5316
|
-
const w = m.clientX - p.offsetLeft, g = m.clientY - p.offsetTop, v = Date.now(),
|
|
5361
|
+
const w = m.clientX - p.offsetLeft, g = m.clientY - p.offsetTop, v = Date.now(), y = (A) => {
|
|
5317
5362
|
const L = 56 / window.innerWidth, K = 56 / window.innerHeight, { x: G, y: ee } = vn(
|
|
5318
|
-
|
|
5319
|
-
|
|
5363
|
+
A.clientX - w,
|
|
5364
|
+
A.clientY - g,
|
|
5320
5365
|
L,
|
|
5321
5366
|
K
|
|
5322
5367
|
);
|
|
5323
5368
|
Object.assign(r, { x: G, y: ee }), requestAnimationFrame(() => {
|
|
5324
5369
|
l();
|
|
5325
5370
|
});
|
|
5326
|
-
},
|
|
5327
|
-
const
|
|
5328
|
-
|
|
5371
|
+
}, x = () => {
|
|
5372
|
+
const A = Date.now();
|
|
5373
|
+
a.current = A - v > 300, document.body.style.userSelect = "", document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", x);
|
|
5329
5374
|
};
|
|
5330
|
-
document.addEventListener("mousemove",
|
|
5375
|
+
document.addEventListener("mousemove", y), document.addEventListener("mouseup", x);
|
|
5331
5376
|
});
|
|
5332
5377
|
}, _ = () => {
|
|
5333
|
-
|
|
5378
|
+
a.current || n.onClick();
|
|
5334
5379
|
};
|
|
5335
5380
|
return D(() => {
|
|
5336
5381
|
const p = localStorage.getItem(I.MINIMIZE_STYLY_CHCHE);
|
|
5337
5382
|
if (p) {
|
|
5338
5383
|
const m = JSON.parse(p);
|
|
5339
|
-
|
|
5384
|
+
nt(m) && Object.assign(r, m);
|
|
5340
5385
|
}
|
|
5341
5386
|
l(), f();
|
|
5342
5387
|
}, []), D(() => {
|
|
5343
5388
|
if (s < d.value.length) {
|
|
5344
5389
|
const p = setTimeout(() => {
|
|
5345
|
-
i((m) => m + d.value[s]),
|
|
5390
|
+
i((m) => m + d.value[s]), o((m) => m + 1);
|
|
5346
5391
|
}, 100);
|
|
5347
5392
|
return () => clearTimeout(p);
|
|
5348
5393
|
}
|
|
@@ -5351,7 +5396,7 @@ const ce = new k("chat-minimize"), Ss = (n) => {
|
|
|
5351
5396
|
{
|
|
5352
5397
|
ref: e,
|
|
5353
5398
|
title: n.title,
|
|
5354
|
-
className: "".concat(
|
|
5399
|
+
className: "".concat(ue.b(), " ").concat(ue.is("hidden", !n.isMinimize), " ").concat(ue.is(
|
|
5355
5400
|
"show-halo",
|
|
5356
5401
|
u.value
|
|
5357
5402
|
)),
|
|
@@ -5359,12 +5404,12 @@ const ce = new k("chat-minimize"), Ss = (n) => {
|
|
|
5359
5404
|
children: /* @__PURE__ */ c(
|
|
5360
5405
|
"div",
|
|
5361
5406
|
{
|
|
5362
|
-
className: "".concat(
|
|
5407
|
+
className: "".concat(ue.e("content"), " ").concat(ue.is(
|
|
5363
5408
|
"show-border",
|
|
5364
5409
|
!u.value
|
|
5365
5410
|
)),
|
|
5366
5411
|
children: [
|
|
5367
|
-
t && /* @__PURE__ */ c("div", { className: "".concat(
|
|
5412
|
+
t && /* @__PURE__ */ c("div", { className: "".concat(ue.em("content", "popover")), children: /* @__PURE__ */ c("div", { className: "typewriter", children: t }) }),
|
|
5368
5413
|
/* @__PURE__ */ c(gi, {})
|
|
5369
5414
|
]
|
|
5370
5415
|
}
|
|
@@ -5380,19 +5425,20 @@ const Re = Yn({
|
|
|
5380
5425
|
updateTopic: (n, e) => {
|
|
5381
5426
|
}
|
|
5382
5427
|
});
|
|
5383
|
-
var
|
|
5384
|
-
class
|
|
5428
|
+
var Zt, Jt, Kt, Gt;
|
|
5429
|
+
class Xt extends U {
|
|
5385
5430
|
constructor(t) {
|
|
5431
|
+
var i;
|
|
5386
5432
|
super(t);
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5433
|
+
T(this, "ns", new k("chat-container"));
|
|
5434
|
+
T(this, "containerRef", mt());
|
|
5435
|
+
T(this, "dragHandle", mt());
|
|
5390
5436
|
/**
|
|
5391
5437
|
* 窗口样式数据
|
|
5392
5438
|
*
|
|
5393
5439
|
* @memberof ChatContainer
|
|
5394
5440
|
*/
|
|
5395
|
-
|
|
5441
|
+
T(this, "data", {
|
|
5396
5442
|
side: {
|
|
5397
5443
|
y: 0,
|
|
5398
5444
|
height: 1,
|
|
@@ -5415,14 +5461,14 @@ class Yt extends F {
|
|
|
5415
5461
|
* @type {boolean}
|
|
5416
5462
|
* @memberof ChatContainer
|
|
5417
5463
|
*/
|
|
5418
|
-
|
|
5464
|
+
T(this, "disabled", !1);
|
|
5419
5465
|
/**
|
|
5420
5466
|
* 最小化是否在拖拽中
|
|
5421
5467
|
* - 在拖拽时不应触发点击事件
|
|
5422
5468
|
* @type {boolean}
|
|
5423
5469
|
* @memberof ChatContainer
|
|
5424
5470
|
*/
|
|
5425
|
-
|
|
5471
|
+
T(this, "isDragging", !1);
|
|
5426
5472
|
/**
|
|
5427
5473
|
* 容器上下文
|
|
5428
5474
|
*
|
|
@@ -5430,9 +5476,9 @@ class Yt extends F {
|
|
|
5430
5476
|
* @date 2025-03-03 16:03:44
|
|
5431
5477
|
* @type {ContainerContext}
|
|
5432
5478
|
*/
|
|
5433
|
-
|
|
5434
|
-
zIndex: ((
|
|
5435
|
-
enableBackFill: ((
|
|
5479
|
+
T(this, "containerContext", {
|
|
5480
|
+
zIndex: ((Zt = this.props.containerOptions) == null ? void 0 : Zt.zIndex) || 10,
|
|
5481
|
+
enableBackFill: ((Jt = this.props) == null ? void 0 : Jt.enableBackFill) !== void 0 && ((Kt = this.props) == null ? void 0 : Kt.enableBackFill) !== null ? (Gt = this.props) == null ? void 0 : Gt.enableBackFill : !0,
|
|
5436
5482
|
newTopic: (t, i) => {
|
|
5437
5483
|
this.props.aiTopic.newTopic(t, i);
|
|
5438
5484
|
},
|
|
@@ -5442,11 +5488,12 @@ class Yt extends F {
|
|
|
5442
5488
|
});
|
|
5443
5489
|
this.state = {
|
|
5444
5490
|
isFullScreen: !1,
|
|
5445
|
-
isMinimize: (t == null ? void 0 : t.openMode) === "minimize" || (t == null ? void 0 : t.openMode) === "autoexpand"
|
|
5491
|
+
isMinimize: (t == null ? void 0 : t.openMode) === "minimize" || (t == null ? void 0 : t.openMode) === "autoexpand",
|
|
5492
|
+
enableAIMinimize: ((i = t == null ? void 0 : t.containerOptions) == null ? void 0 : i.enableAIMinimize) === !0
|
|
5446
5493
|
}, t == null || t.aiChat.evt.on("onCompleteMessage", () => {
|
|
5447
5494
|
if (t.autoClose) {
|
|
5448
|
-
const { mode:
|
|
5449
|
-
switch (
|
|
5495
|
+
const { mode: s, duration: o = 3 } = t.autoClose;
|
|
5496
|
+
switch (s) {
|
|
5450
5497
|
case "minimize":
|
|
5451
5498
|
this.minimize();
|
|
5452
5499
|
break;
|
|
@@ -5456,7 +5503,7 @@ class Yt extends F {
|
|
|
5456
5503
|
case "closetime":
|
|
5457
5504
|
setTimeout(() => {
|
|
5458
5505
|
this.close();
|
|
5459
|
-
},
|
|
5506
|
+
}, o * 1e3);
|
|
5460
5507
|
break;
|
|
5461
5508
|
}
|
|
5462
5509
|
}
|
|
@@ -5514,8 +5561,8 @@ class Yt extends F {
|
|
|
5514
5561
|
* @memberof ChatContainer
|
|
5515
5562
|
*/
|
|
5516
5563
|
snapToEdge() {
|
|
5517
|
-
const t = 20 / window.innerWidth, i = 20 / window.innerHeight, { x: s, y:
|
|
5518
|
-
s < t || s +
|
|
5564
|
+
const t = 20 / window.innerWidth, i = 20 / window.innerHeight, { x: s, y: o, width: a, height: r } = this.data.window;
|
|
5565
|
+
s < t || s + a > 1 - t ? this.calcSideModeStyle(s < t ? "left" : "right") : (o < i && (this.data.window.y = 0), o + r > 1 - i && (this.data.window.y = 1 - r)), this.setStyle();
|
|
5519
5566
|
}
|
|
5520
5567
|
/**
|
|
5521
5568
|
* 注册对话框拖拽
|
|
@@ -5527,7 +5574,7 @@ class Yt extends F {
|
|
|
5527
5574
|
if (this.state.isFullScreen)
|
|
5528
5575
|
return;
|
|
5529
5576
|
document.body.style.userSelect = "none";
|
|
5530
|
-
const i = t.clientX - this.containerRef.current.offsetLeft, s = t.clientY - this.containerRef.current.offsetTop,
|
|
5577
|
+
const i = t.clientX - this.containerRef.current.offsetLeft, s = t.clientY - this.containerRef.current.offsetTop, o = (r) => {
|
|
5531
5578
|
if (this.disabled)
|
|
5532
5579
|
return;
|
|
5533
5580
|
this.data.showMode = "window";
|
|
@@ -5538,10 +5585,10 @@ class Yt extends F {
|
|
|
5538
5585
|
this.data.window.height
|
|
5539
5586
|
);
|
|
5540
5587
|
Object.assign(this.data.window, { x: u, y: h }), this.setStyle();
|
|
5541
|
-
},
|
|
5542
|
-
document.body.style.userSelect = "", document.removeEventListener("mousemove",
|
|
5588
|
+
}, a = () => {
|
|
5589
|
+
document.body.style.userSelect = "", document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", a), !this.disabled && this.snapToEdge();
|
|
5543
5590
|
};
|
|
5544
|
-
document.addEventListener("mousemove",
|
|
5591
|
+
document.addEventListener("mousemove", o), document.addEventListener("mouseup", a);
|
|
5545
5592
|
};
|
|
5546
5593
|
}
|
|
5547
5594
|
/**
|
|
@@ -5597,7 +5644,7 @@ class Yt extends F {
|
|
|
5597
5644
|
const t = localStorage.getItem(I.STYLE_CACHE);
|
|
5598
5645
|
if (t) {
|
|
5599
5646
|
const i = JSON.parse(t);
|
|
5600
|
-
i.side &&
|
|
5647
|
+
i.side && nt(i.side) && i.window && nt(i.window) && Object.assign(this.data, i);
|
|
5601
5648
|
}
|
|
5602
5649
|
this.setStyle(), this.registerDragDialog(), this.registerDragDialogBorder(), document.addEventListener("fullscreenchange", this.handleFullScreenChange);
|
|
5603
5650
|
}
|
|
@@ -5674,7 +5721,7 @@ class Yt extends F {
|
|
|
5674
5721
|
/* @__PURE__ */ c("div", { ref: this.dragHandle, className: this.ns.b("header"), children: [
|
|
5675
5722
|
/* @__PURE__ */ c("div", { className: this.ns.b("header-caption"), children: this.props.caption || "AI助手" }),
|
|
5676
5723
|
/* @__PURE__ */ c("div", { className: this.ns.b("header-action-wrapper"), children: [
|
|
5677
|
-
/* @__PURE__ */ c(
|
|
5724
|
+
this.state.enableAIMinimize && /* @__PURE__ */ c(
|
|
5678
5725
|
"div",
|
|
5679
5726
|
{
|
|
5680
5727
|
title: "最小化",
|
|
@@ -5731,17 +5778,17 @@ class Yt extends F {
|
|
|
5731
5778
|
] })
|
|
5732
5779
|
] }),
|
|
5733
5780
|
this.props.mode === "TOPIC" ? /* @__PURE__ */ c("div", { className: "".concat(this.ns.b("main")), children: [
|
|
5734
|
-
/* @__PURE__ */ c("div", { className: "".concat(this.ns.be("main", "left")), children: /* @__PURE__ */ c(
|
|
5781
|
+
/* @__PURE__ */ c("div", { className: "".concat(this.ns.be("main", "left")), children: /* @__PURE__ */ c(Ss, { controller: this.props.aiTopic }) }),
|
|
5735
5782
|
/* @__PURE__ */ c("div", { className: "".concat(this.ns.be("main", "right")), children: [
|
|
5736
5783
|
/* @__PURE__ */ c("div", { className: this.ns.b("content"), children: /* @__PURE__ */ c(
|
|
5737
|
-
|
|
5784
|
+
Dt,
|
|
5738
5785
|
{
|
|
5739
5786
|
controller: this.props.aiChat,
|
|
5740
5787
|
toolbarItems: this.props.contentToolbarItems
|
|
5741
5788
|
}
|
|
5742
5789
|
) }),
|
|
5743
5790
|
/* @__PURE__ */ c(
|
|
5744
|
-
|
|
5791
|
+
at,
|
|
5745
5792
|
{
|
|
5746
5793
|
type: "footer",
|
|
5747
5794
|
mode: this.props.mode,
|
|
@@ -5755,7 +5802,7 @@ class Yt extends F {
|
|
|
5755
5802
|
}
|
|
5756
5803
|
),
|
|
5757
5804
|
/* @__PURE__ */ c("div", { className: this.ns.b("footer"), children: /* @__PURE__ */ c(
|
|
5758
|
-
|
|
5805
|
+
Yt,
|
|
5759
5806
|
{
|
|
5760
5807
|
controller: this.props.aiChat,
|
|
5761
5808
|
questionToolbarItems: this.props.questionToolbarItems
|
|
@@ -5764,14 +5811,14 @@ class Yt extends F {
|
|
|
5764
5811
|
] })
|
|
5765
5812
|
] }) : /* @__PURE__ */ c("div", { className: "".concat(this.ns.be("main", "default")), children: [
|
|
5766
5813
|
/* @__PURE__ */ c("div", { className: this.ns.b("content"), children: /* @__PURE__ */ c(
|
|
5767
|
-
|
|
5814
|
+
Dt,
|
|
5768
5815
|
{
|
|
5769
5816
|
controller: this.props.aiChat,
|
|
5770
5817
|
toolbarItems: this.props.contentToolbarItems
|
|
5771
5818
|
}
|
|
5772
5819
|
) }),
|
|
5773
5820
|
/* @__PURE__ */ c(
|
|
5774
|
-
|
|
5821
|
+
at,
|
|
5775
5822
|
{
|
|
5776
5823
|
type: "footer",
|
|
5777
5824
|
mode: this.props.mode,
|
|
@@ -5785,7 +5832,7 @@ class Yt extends F {
|
|
|
5785
5832
|
}
|
|
5786
5833
|
),
|
|
5787
5834
|
/* @__PURE__ */ c("div", { className: this.ns.b("footer"), children: /* @__PURE__ */ c(
|
|
5788
|
-
|
|
5835
|
+
Yt,
|
|
5789
5836
|
{
|
|
5790
5837
|
controller: this.props.aiChat,
|
|
5791
5838
|
questionToolbarItems: this.props.questionToolbarItems
|
|
@@ -5796,7 +5843,7 @@ class Yt extends F {
|
|
|
5796
5843
|
}
|
|
5797
5844
|
),
|
|
5798
5845
|
/* @__PURE__ */ c(
|
|
5799
|
-
|
|
5846
|
+
ks,
|
|
5800
5847
|
{
|
|
5801
5848
|
title: this.props.caption || "AI助手",
|
|
5802
5849
|
controller: this.props.aiChat,
|
|
@@ -5808,6 +5855,6 @@ class Yt extends F {
|
|
|
5808
5855
|
}
|
|
5809
5856
|
}
|
|
5810
5857
|
export {
|
|
5811
|
-
|
|
5812
|
-
|
|
5858
|
+
Xt as ChatContainer,
|
|
5859
|
+
Es as chat
|
|
5813
5860
|
};
|