@ibiz-template-plugin/ai-chat 0.0.28 → 0.0.30

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 CHANGED
@@ -1,30 +1,30 @@
1
1
  import './style.css';
2
- var Sn = Object.defineProperty;
3
- var kn = (n, e, t) => e in n ? Sn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
4
- var x = (n, e, t) => (kn(n, typeof e != "symbol" ? e + "" : e, t), t);
2
+ var An = Object.defineProperty;
3
+ var In = (n, e, t) => e in n ? An(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
4
+ var S = (n, e, t) => (In(n, typeof e != "symbol" ? e + "" : e, t), t);
5
5
  import Pe from "interactjs";
6
- import Vt from "cherry-markdown";
7
- var Le, b, qt, jt, ne, ct, Yt, Xe, Xt, re = {}, Zt = [], Nn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ze = Array.isArray;
8
- function G(n, e) {
6
+ import qt from "cherry-markdown";
7
+ var Le, b, Yt, Xt, ne, ct, Zt, Xe, Jt, re = {}, Gt = [], Dn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ze = Array.isArray;
8
+ function J(n, e) {
9
9
  for (var t in e)
10
10
  n[t] = e[t];
11
11
  return n;
12
12
  }
13
- function Gt(n) {
13
+ function Kt(n) {
14
14
  var e = n.parentNode;
15
15
  e && e.removeChild(n);
16
16
  }
17
- function j(n, e, t) {
17
+ function q(n, e, t) {
18
18
  var i, s, o, a = {};
19
19
  for (o in e)
20
20
  o == "key" ? i = e[o] : o == "ref" ? s = e[o] : a[o] = e[o];
21
21
  if (arguments.length > 2 && (a.children = arguments.length > 3 ? Le.call(arguments, 2) : t), typeof n == "function" && n.defaultProps != null)
22
22
  for (o in n.defaultProps)
23
23
  a[o] === void 0 && (a[o] = n.defaultProps[o]);
24
- return Se(n, a, i, s, null);
24
+ return ke(n, a, i, s, null);
25
25
  }
26
- function Se(n, e, t, i, s) {
27
- var o = { type: n, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: s == null ? ++qt : s };
26
+ function ke(n, e, t, i, s) {
27
+ var o = { type: n, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: s == null ? ++Yt : s };
28
28
  return s == null && b.vnode != null && b.vnode(o), o;
29
29
  }
30
30
  function lt() {
@@ -36,15 +36,15 @@ function Y(n) {
36
36
  function F(n, e) {
37
37
  this.props = n, this.context = e;
38
38
  }
39
- function ge(n, e) {
39
+ function we(n, e) {
40
40
  if (e == null)
41
- return n.__ ? ge(n.__, n.__.__k.indexOf(n) + 1) : null;
41
+ return n.__ ? we(n.__, n.__.__k.indexOf(n) + 1) : null;
42
42
  for (var t; e < n.__k.length; e++)
43
43
  if ((t = n.__k[e]) != null && t.__e != null)
44
44
  return t.__d || t.__e;
45
- return typeof n.type == "function" ? ge(n) : null;
45
+ return typeof n.type == "function" ? we(n) : null;
46
46
  }
47
- function Jt(n) {
47
+ function Qt(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,28 +52,28 @@ function Jt(n) {
52
52
  n.__e = n.__c.base = t.__e;
53
53
  break;
54
54
  }
55
- return Jt(n);
55
+ return Qt(n);
56
56
  }
57
57
  }
58
58
  function Ze(n) {
59
- (!n.__d && (n.__d = !0) && ne.push(n) && !Ee.__r++ || ct !== b.debounceRendering) && ((ct = b.debounceRendering) || Yt)(Ee);
59
+ (!n.__d && (n.__d = !0) && ne.push(n) && !Ee.__r++ || ct !== b.debounceRendering) && ((ct = b.debounceRendering) || Zt)(Ee);
60
60
  }
61
61
  function Ee() {
62
- var n, e, t, i, s, o, a, r, u;
62
+ var n, e, t, i, s, o, a, c, u;
63
63
  for (ne.sort(Xe); n = ne.shift(); )
64
- n.__d && (e = ne.length, i = void 0, s = void 0, o = void 0, r = (a = (t = n).__v).__e, (u = t.__P) && (i = [], s = [], (o = G({}, a)).__v = a.__v + 1, tt(u, a, o, t.__n, u.ownerSVGElement !== void 0, a.__h != null ? [r] : null, i, r == null ? ge(a) : r, a.__h, s), tn(i, a, s), a.__e != r && Jt(a)), ne.length > e && ne.sort(Xe));
64
+ n.__d && (e = ne.length, i = void 0, s = void 0, o = void 0, c = (a = (t = n).__v).__e, (u = t.__P) && (i = [], s = [], (o = J({}, a)).__v = a.__v + 1, tt(u, a, o, t.__n, u.ownerSVGElement !== void 0, a.__h != null ? [c] : null, i, c == null ? we(a) : c, a.__h, s), sn(i, a, s), a.__e != c && Qt(a)), ne.length > e && ne.sort(Xe));
65
65
  Ee.__r = 0;
66
66
  }
67
- function Kt(n, e, t, i, s, o, a, r, u, h, p) {
68
- var l, v, _, d, f, m, w, g, T, C = 0, S = i && i.__k || Zt, O = S.length, L = O, U = e.length;
67
+ function en(n, e, t, i, s, o, a, c, u, h, p) {
68
+ var l, m, _, d, f, v, w, g, C, T = 0, x = i && i.__k || Gt, O = x.length, L = O, U = e.length;
69
69
  for (t.__k = [], l = 0; l < U; l++)
70
- (d = t.__k[l] = (d = e[l]) == null || typeof d == "boolean" || typeof d == "function" ? null : typeof d == "string" || typeof d == "number" || typeof d == "bigint" ? Se(null, d, null, null, d) : ze(d) ? Se(Y, { children: d }, null, null, null) : d.__b > 0 ? Se(d.type, d.props, d.key, d.ref ? d.ref : null, d.__v) : d) != null ? (d.__ = t, d.__b = t.__b + 1, (g = En(d, S, w = l + C, L)) === -1 ? _ = re : (_ = S[g] || re, S[g] = void 0, L--), tt(n, d, _, s, o, a, r, u, h, p), f = d.__e, (v = d.ref) && _.ref != v && (_.ref && nt(_.ref, null, d), p.push(v, d.__c || f, d)), f != null && (m == null && (m = f), (T = _ === re || _.__v === null) ? g == -1 && C-- : g !== w && (g === w + 1 ? C++ : g > w ? L > U - w ? C += g - w : C-- : C = g < w && g == w - 1 ? g - w : 0), w = l + C, typeof d.type != "function" || g === w && _.__k !== d.__k ? typeof d.type == "function" || g === w && !T ? d.__d !== void 0 ? (u = d.__d, d.__d = void 0) : u = f.nextSibling : u = en(n, f, u) : u = Qt(d, u, n), typeof t.type == "function" && (t.__d = u))) : (_ = S[l]) && _.key == null && _.__e && (_.__e == u && (_.__ = i, u = ge(_)), Ge(_, _, !1), S[l] = null);
71
- for (t.__e = m, l = O; l--; )
72
- S[l] != null && (typeof t.type == "function" && S[l].__e != null && S[l].__e == t.__d && (t.__d = S[l].__e.nextSibling), Ge(S[l], S[l]));
70
+ (d = t.__k[l] = (d = e[l]) == null || typeof d == "boolean" || typeof d == "function" ? null : typeof d == "string" || typeof d == "number" || typeof d == "bigint" ? ke(null, d, null, null, d) : ze(d) ? ke(Y, { children: d }, null, null, null) : d.__b > 0 ? ke(d.type, d.props, d.key, d.ref ? d.ref : null, d.__v) : d) != null ? (d.__ = t, d.__b = t.__b + 1, (g = Ln(d, x, w = l + T, L)) === -1 ? _ = re : (_ = x[g] || re, x[g] = void 0, L--), tt(n, d, _, s, o, a, c, u, h, p), f = d.__e, (m = d.ref) && _.ref != m && (_.ref && nt(_.ref, null, d), p.push(m, d.__c || f, d)), f != null && (v == null && (v = f), (C = _ === re || _.__v === null) ? g == -1 && T-- : g !== w && (g === w + 1 ? T++ : g > w ? L > U - w ? T += g - w : T-- : T = g < w && g == w - 1 ? g - w : 0), w = l + T, typeof d.type != "function" || g === w && _.__k !== d.__k ? typeof d.type == "function" || g === w && !C ? d.__d !== void 0 ? (u = d.__d, d.__d = void 0) : u = f.nextSibling : u = nn(n, f, u) : u = tn(d, u, n), typeof t.type == "function" && (t.__d = u))) : (_ = x[l]) && _.key == null && _.__e && (_.__e == u && (_.__ = i, u = we(_)), Je(_, _, !1), x[l] = null);
71
+ for (t.__e = v, l = O; l--; )
72
+ x[l] != null && (typeof t.type == "function" && x[l].__e != null && x[l].__e == t.__d && (t.__d = x[l].__e.nextSibling), Je(x[l], x[l]));
73
73
  }
74
- function Qt(n, e, t) {
74
+ function tn(n, e, t) {
75
75
  for (var i, s = n.__k, o = 0; s && o < s.length; o++)
76
- (i = s[o]) && (i.__ = n, e = typeof i.type == "function" ? Qt(i, e, t) : en(t, i.__e, e));
76
+ (i = s[o]) && (i.__ = n, e = typeof i.type == "function" ? tn(i, e, t) : nn(t, i.__e, e));
77
77
  return e;
78
78
  }
79
79
  function Me(n, e) {
@@ -81,39 +81,39 @@ function Me(n, e) {
81
81
  Me(t, e);
82
82
  }) : e.push(n)), e;
83
83
  }
84
- function en(n, e, t) {
84
+ function nn(n, e, t) {
85
85
  return t == null || t.parentNode !== n ? n.insertBefore(e, null) : e == t && e.parentNode != null || n.insertBefore(e, t), e.nextSibling;
86
86
  }
87
- function En(n, e, t, i) {
88
- var s = n.key, o = n.type, a = t - 1, r = t + 1, u = e[t];
87
+ function Ln(n, e, t, i) {
88
+ var s = n.key, o = n.type, a = t - 1, c = t + 1, u = e[t];
89
89
  if (u === null || u && s == u.key && o === u.type)
90
90
  return t;
91
91
  if (i > (u != null ? 1 : 0))
92
- for (; a >= 0 || r < e.length; ) {
92
+ for (; a >= 0 || c < e.length; ) {
93
93
  if (a >= 0) {
94
94
  if ((u = e[a]) && s == u.key && o === u.type)
95
95
  return a;
96
96
  a--;
97
97
  }
98
- if (r < e.length) {
99
- if ((u = e[r]) && s == u.key && o === u.type)
100
- return r;
101
- r++;
98
+ if (c < e.length) {
99
+ if ((u = e[c]) && s == u.key && o === u.type)
100
+ return c;
101
+ c++;
102
102
  }
103
103
  }
104
104
  return -1;
105
105
  }
106
- function Mn(n, e, t, i, s) {
106
+ function zn(n, e, t, i, s) {
107
107
  var o;
108
108
  for (o in t)
109
- o === "children" || o === "key" || o in e || $e(n, o, null, t[o], i);
109
+ o === "children" || o === "key" || o in e || Ae(n, o, null, t[o], i);
110
110
  for (o in e)
111
- s && typeof e[o] != "function" || o === "children" || o === "key" || o === "value" || o === "checked" || t[o] === e[o] || $e(n, o, e[o], t[o], i);
111
+ s && typeof e[o] != "function" || o === "children" || o === "key" || o === "value" || o === "checked" || t[o] === e[o] || Ae(n, o, e[o], t[o], i);
112
112
  }
113
113
  function ut(n, e, t) {
114
- e[0] === "-" ? n.setProperty(e, t == null ? "" : t) : n[e] = t == null ? "" : typeof t != "number" || Nn.test(e) ? t : t + "px";
114
+ e[0] === "-" ? n.setProperty(e, t == null ? "" : t) : n[e] = t == null ? "" : typeof t != "number" || Dn.test(e) ? t : t + "px";
115
115
  }
116
- function $e(n, e, t, i, s) {
116
+ function Ae(n, e, t, i, s) {
117
117
  var o;
118
118
  e:
119
119
  if (e === "style")
@@ -153,46 +153,46 @@ function dt(n) {
153
153
  function ht(n) {
154
154
  return this.l[n.type + !0](b.event ? b.event(n) : n);
155
155
  }
156
- function tt(n, e, t, i, s, o, a, r, u, h) {
157
- var p, l, v, _, d, f, m, w, g, T, C, S, O, L, U, z = e.type;
156
+ function tt(n, e, t, i, s, o, a, c, u, h) {
157
+ var p, l, m, _, d, f, v, w, g, C, T, x, O, L, U, z = e.type;
158
158
  if (e.constructor !== void 0)
159
159
  return null;
160
- t.__h != null && (u = t.__h, r = e.__e = t.__e, e.__h = null, o = [r]), (p = b.__b) && p(e);
160
+ t.__h != null && (u = t.__h, c = e.__e = t.__e, e.__h = null, o = [c]), (p = b.__b) && p(e);
161
161
  e:
162
162
  if (typeof z == "function")
163
163
  try {
164
- if (w = e.props, g = (p = z.contextType) && i[p.__c], T = p ? g ? g.props.value : p.__ : i, t.__c ? m = (l = e.__c = t.__c).__ = l.__E : ("prototype" in z && z.prototype.render ? e.__c = l = new z(w, T) : (e.__c = l = new F(w, T), l.constructor = z, l.render = An), g && g.sub(l), l.props = w, l.state || (l.state = {}), l.context = T, l.__n = i, v = l.__d = !0, l.__h = [], l._sb = []), l.__s == null && (l.__s = l.state), z.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = G({}, l.__s)), G(l.__s, z.getDerivedStateFromProps(w, l.__s))), _ = l.props, d = l.state, l.__v = e, v)
164
+ if (w = e.props, g = (p = z.contextType) && i[p.__c], C = p ? g ? g.props.value : p.__ : i, t.__c ? v = (l = e.__c = t.__c).__ = l.__E : ("prototype" in z && z.prototype.render ? e.__c = l = new z(w, C) : (e.__c = l = new F(w, C), l.constructor = z, l.render = On), g && g.sub(l), l.props = w, l.state || (l.state = {}), l.context = C, l.__n = i, m = l.__d = !0, l.__h = [], l._sb = []), l.__s == null && (l.__s = l.state), z.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = J({}, l.__s)), J(l.__s, z.getDerivedStateFromProps(w, l.__s))), _ = l.props, d = l.state, l.__v = e, m)
165
165
  z.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), l.componentDidMount != null && l.__h.push(l.componentDidMount);
166
166
  else {
167
- if (z.getDerivedStateFromProps == null && w !== _ && l.componentWillReceiveProps != null && l.componentWillReceiveProps(w, T), !l.__e && (l.shouldComponentUpdate != null && l.shouldComponentUpdate(w, l.__s, T) === !1 || e.__v === t.__v)) {
168
- for (e.__v !== t.__v && (l.props = w, l.state = l.__s, l.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.forEach(function(ye) {
169
- ye && (ye.__ = e);
170
- }), C = 0; C < l._sb.length; C++)
171
- l.__h.push(l._sb[C]);
167
+ if (z.getDerivedStateFromProps == null && w !== _ && l.componentWillReceiveProps != null && l.componentWillReceiveProps(w, C), !l.__e && (l.shouldComponentUpdate != null && l.shouldComponentUpdate(w, l.__s, C) === !1 || e.__v === t.__v)) {
168
+ for (e.__v !== t.__v && (l.props = w, l.state = l.__s, l.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.forEach(function(Ce) {
169
+ Ce && (Ce.__ = e);
170
+ }), T = 0; T < l._sb.length; T++)
171
+ l.__h.push(l._sb[T]);
172
172
  l._sb = [], l.__h.length && a.push(l);
173
173
  break e;
174
174
  }
175
- l.componentWillUpdate != null && l.componentWillUpdate(w, l.__s, T), l.componentDidUpdate != null && l.__h.push(function() {
175
+ l.componentWillUpdate != null && l.componentWillUpdate(w, l.__s, C), l.componentDidUpdate != null && l.__h.push(function() {
176
176
  l.componentDidUpdate(_, d, f);
177
177
  });
178
178
  }
179
- if (l.context = T, l.props = w, l.__P = n, l.__e = !1, S = b.__r, O = 0, "prototype" in z && z.prototype.render) {
180
- for (l.state = l.__s, l.__d = !1, S && S(e), p = l.render(l.props, l.state, l.context), L = 0; L < l._sb.length; L++)
179
+ if (l.context = C, l.props = w, l.__P = n, l.__e = !1, x = b.__r, O = 0, "prototype" in z && z.prototype.render) {
180
+ for (l.state = l.__s, l.__d = !1, x && x(e), p = l.render(l.props, l.state, l.context), L = 0; L < l._sb.length; L++)
181
181
  l.__h.push(l._sb[L]);
182
182
  l._sb = [];
183
183
  } else
184
184
  do
185
- l.__d = !1, S && S(e), p = l.render(l.props, l.state, l.context), l.state = l.__s;
185
+ l.__d = !1, x && x(e), p = l.render(l.props, l.state, l.context), l.state = l.__s;
186
186
  while (l.__d && ++O < 25);
187
- l.state = l.__s, l.getChildContext != null && (i = G(G({}, i), l.getChildContext())), v || l.getSnapshotBeforeUpdate == null || (f = l.getSnapshotBeforeUpdate(_, d)), Kt(n, ze(U = p != null && p.type === Y && p.key == null ? p.props.children : p) ? U : [U], e, t, i, s, o, a, r, u, h), l.base = e.__e, e.__h = null, l.__h.length && a.push(l), m && (l.__E = l.__ = null);
188
- } catch (ye) {
189
- e.__v = null, (u || o != null) && (e.__e = r, e.__h = !!u, o[o.indexOf(r)] = null), b.__e(ye, e, t);
187
+ l.state = l.__s, l.getChildContext != null && (i = J(J({}, i), l.getChildContext())), m || l.getSnapshotBeforeUpdate == null || (f = l.getSnapshotBeforeUpdate(_, d)), en(n, ze(U = p != null && p.type === Y && p.key == null ? p.props.children : p) ? U : [U], e, t, i, s, o, a, c, u, h), l.base = e.__e, e.__h = null, l.__h.length && a.push(l), v && (l.__E = l.__ = null);
188
+ } catch (Ce) {
189
+ e.__v = null, (u || o != null) && (e.__e = c, e.__h = !!u, o[o.indexOf(c)] = null), b.__e(Ce, e, t);
190
190
  }
191
191
  else
192
- o == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e = $n(t.__e, e, t, i, s, o, a, u, h);
192
+ o == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e = Hn(t.__e, e, t, i, s, o, a, u, h);
193
193
  (p = b.diffed) && p(e);
194
194
  }
195
- function tn(n, e, t) {
195
+ function sn(n, e, t) {
196
196
  for (var i = 0; i < t.length; i++)
197
197
  nt(t[i], t[++i], t[++i]);
198
198
  b.__c && b.__c(e, n), n.some(function(s) {
@@ -205,8 +205,8 @@ function tn(n, e, t) {
205
205
  }
206
206
  });
207
207
  }
208
- function $n(n, e, t, i, s, o, a, r, u) {
209
- var h, p, l, v = t.props, _ = e.props, d = e.type, f = 0;
208
+ function Hn(n, e, t, i, s, o, a, c, u) {
209
+ var h, p, l, m = t.props, _ = e.props, d = e.type, f = 0;
210
210
  if (d === "svg" && (s = !0), o != null) {
211
211
  for (; f < o.length; f++)
212
212
  if ((h = o[f]) && "setAttribute" in h == !!d && (d ? h.localName === d : h.nodeType === 3)) {
@@ -217,23 +217,23 @@ function $n(n, e, t, i, s, o, a, r, u) {
217
217
  if (n == null) {
218
218
  if (d === null)
219
219
  return document.createTextNode(_);
220
- n = s ? document.createElementNS("http://www.w3.org/2000/svg", d) : document.createElement(d, _.is && _), o = null, r = !1;
220
+ n = s ? document.createElementNS("http://www.w3.org/2000/svg", d) : document.createElement(d, _.is && _), o = null, c = !1;
221
221
  }
222
222
  if (d === null)
223
- v === _ || r && n.data === _ || (n.data = _);
223
+ m === _ || c && n.data === _ || (n.data = _);
224
224
  else {
225
- if (o = o && Le.call(n.childNodes), p = (v = t.props || re).dangerouslySetInnerHTML, l = _.dangerouslySetInnerHTML, !r) {
225
+ if (o = o && Le.call(n.childNodes), p = (m = t.props || re).dangerouslySetInnerHTML, l = _.dangerouslySetInnerHTML, !c) {
226
226
  if (o != null)
227
- for (v = {}, f = 0; f < n.attributes.length; f++)
228
- v[n.attributes[f].name] = n.attributes[f].value;
227
+ for (m = {}, f = 0; f < n.attributes.length; f++)
228
+ m[n.attributes[f].name] = n.attributes[f].value;
229
229
  (l || p) && (l && (p && l.__html == p.__html || l.__html === n.innerHTML) || (n.innerHTML = l && l.__html || ""));
230
230
  }
231
- if (Mn(n, _, v, s, r), l)
231
+ if (zn(n, _, m, s, c), l)
232
232
  e.__k = [];
233
- else if (Kt(n, ze(f = e.props.children) ? f : [f], e, t, i, s && d !== "foreignObject", o, a, o ? o[0] : t.__k && ge(t, 0), r, u), o != null)
233
+ else if (en(n, ze(f = e.props.children) ? f : [f], e, t, i, s && d !== "foreignObject", o, a, o ? o[0] : t.__k && we(t, 0), c, u), o != null)
234
234
  for (f = o.length; f--; )
235
- o[f] != null && Gt(o[f]);
236
- r || ("value" in _ && (f = _.value) !== void 0 && (f !== n.value || d === "progress" && !f || d === "option" && f !== v.value) && $e(n, "value", f, v.value, !1), "checked" in _ && (f = _.checked) !== void 0 && f !== n.checked && $e(n, "checked", f, v.checked, !1));
235
+ o[f] != null && Kt(o[f]);
236
+ c || ("value" in _ && (f = _.value) !== void 0 && (f !== n.value || d === "progress" && !f || d === "option" && f !== m.value) && Ae(n, "value", f, m.value, !1), "checked" in _ && (f = _.checked) !== void 0 && f !== n.checked && Ae(n, "checked", f, m.checked, !1));
237
237
  }
238
238
  return n;
239
239
  }
@@ -244,7 +244,7 @@ function nt(n, e, t) {
244
244
  b.__e(i, t);
245
245
  }
246
246
  }
247
- function Ge(n, e, t) {
247
+ function Je(n, e, t) {
248
248
  var i, s;
249
249
  if (b.unmount && b.unmount(n), (i = n.ref) && (i.current && i.current !== n.__e || nt(i, null, e)), (i = n.__c) != null) {
250
250
  if (i.componentWillUnmount)
@@ -257,63 +257,63 @@ function Ge(n, e, t) {
257
257
  }
258
258
  if (i = n.__k)
259
259
  for (s = 0; s < i.length; s++)
260
- i[s] && Ge(i[s], e, t || typeof n.type != "function");
261
- t || n.__e == null || Gt(n.__e), n.__ = n.__e = n.__d = void 0;
260
+ i[s] && Je(i[s], e, t || typeof n.type != "function");
261
+ t || n.__e == null || Kt(n.__e), n.__ = n.__e = n.__d = void 0;
262
262
  }
263
- function An(n, e, t) {
263
+ function On(n, e, t) {
264
264
  return this.constructor(n, t);
265
265
  }
266
266
  function ae(n, e, t) {
267
267
  var i, s, o, a;
268
- b.__ && b.__(n, e), s = (i = typeof t == "function") ? null : t && t.__k || e.__k, o = [], a = [], tt(e, n = (!i && t || e).__k = j(Y, null, [n]), s || re, re, e.ownerSVGElement !== void 0, !i && t ? [t] : s ? null : e.firstChild ? Le.call(e.childNodes) : null, o, !i && t ? t : s ? s.__e : e.firstChild, i, a), tn(o, n, a);
268
+ b.__ && b.__(n, e), s = (i = typeof t == "function") ? null : t && t.__k || e.__k, o = [], a = [], tt(e, n = (!i && t || e).__k = q(Y, null, [n]), s || re, re, e.ownerSVGElement !== void 0, !i && t ? [t] : s ? null : e.firstChild ? Le.call(e.childNodes) : null, o, !i && t ? t : s ? s.__e : e.firstChild, i, a), sn(o, n, a);
269
269
  }
270
- function In(n, e) {
271
- var t = { __c: e = "__cC" + Xt++, __: n, Consumer: function(i, s) {
270
+ function Bn(n, e) {
271
+ var t = { __c: e = "__cC" + Jt++, __: n, Consumer: function(i, s) {
272
272
  return i.children(s);
273
273
  }, Provider: function(i) {
274
274
  var s, o;
275
275
  return this.getChildContext || (s = [], (o = {})[e] = this, this.getChildContext = function() {
276
276
  return o;
277
277
  }, this.shouldComponentUpdate = function(a) {
278
- this.props.value !== a.value && s.some(function(r) {
279
- r.__e = !0, Ze(r);
278
+ this.props.value !== a.value && s.some(function(c) {
279
+ c.__e = !0, Ze(c);
280
280
  });
281
281
  }, this.sub = function(a) {
282
282
  s.push(a);
283
- var r = a.componentWillUnmount;
283
+ var c = a.componentWillUnmount;
284
284
  a.componentWillUnmount = function() {
285
- s.splice(s.indexOf(a), 1), r && r.call(a);
285
+ s.splice(s.indexOf(a), 1), c && c.call(a);
286
286
  };
287
287
  }), i.children;
288
288
  } };
289
289
  return t.Provider.__ = t.Consumer.contextType = t;
290
290
  }
291
- Le = Zt.slice, b = { __e: function(n, e, t, i) {
291
+ Le = Gt.slice, b = { __e: function(n, e, t, i) {
292
292
  for (var s, o, a; e = e.__; )
293
293
  if ((s = e.__c) && !s.__)
294
294
  try {
295
295
  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)
296
296
  return s.__E = s;
297
- } catch (r) {
298
- n = r;
297
+ } catch (c) {
298
+ n = c;
299
299
  }
300
300
  throw n;
301
- } }, qt = 0, jt = function(n) {
301
+ } }, Yt = 0, Xt = function(n) {
302
302
  return n != null && n.constructor === void 0;
303
303
  }, F.prototype.setState = function(n, e) {
304
304
  var t;
305
- t = this.__s != null && this.__s !== this.state ? this.__s : this.__s = G({}, this.state), typeof n == "function" && (n = n(G({}, t), this.props)), n && G(t, n), n != null && this.__v && (e && this._sb.push(e), Ze(this));
305
+ t = this.__s != null && this.__s !== this.state ? this.__s : this.__s = J({}, this.state), typeof n == "function" && (n = n(J({}, t), this.props)), n && J(t, n), n != null && this.__v && (e && this._sb.push(e), Ze(this));
306
306
  }, F.prototype.forceUpdate = function(n) {
307
307
  this.__v && (this.__e = !0, n && this.__h.push(n), Ze(this));
308
- }, F.prototype.render = Y, ne = [], Yt = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Xe = function(n, e) {
308
+ }, F.prototype.render = Y, ne = [], Zt = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Xe = function(n, e) {
309
309
  return n.__v.__b - e.__v.__b;
310
- }, Ee.__r = 0, Xt = 0;
311
- const Dn = "ibiz", Ln = "is-";
310
+ }, Ee.__r = 0, Jt = 0;
311
+ const Pn = "ibiz", Rn = "is-";
312
312
  function ee(n, e, t, i, s) {
313
313
  let o = "".concat(n, "-").concat(e);
314
314
  return t && (o += "-".concat(t)), i && (o += "__".concat(i)), s && (o += "--".concat(s)), o;
315
315
  }
316
- class M {
316
+ class k {
317
317
  /**
318
318
  * Creates an instance of Namespace.
319
319
  *
@@ -330,8 +330,8 @@ class M {
330
330
  * @date 2023-11-03 10:11:31
331
331
  * @type {string}
332
332
  */
333
- x(this, "namespace");
334
- this.block = e, this.namespace = t || Dn;
333
+ S(this, "namespace");
334
+ this.block = e, this.namespace = t || Pn;
335
335
  }
336
336
  /**
337
337
  * namespace-block
@@ -429,7 +429,7 @@ class M {
429
429
  * @return {*} {string}
430
430
  */
431
431
  is(e, t) {
432
- return e && t ? "".concat(Ln).concat(e) : "";
432
+ return e && t ? "".concat(Rn).concat(e) : "";
433
433
  }
434
434
  /**
435
435
  * 生成使用到的 css 变量 style 对象
@@ -487,39 +487,39 @@ function W(n) {
487
487
  throw new TypeError("Path must be a string. Received " + JSON.stringify(n));
488
488
  }
489
489
  function pt(n, e) {
490
- for (var t = "", i = 0, s = -1, o = 0, a, r = 0; r <= n.length; ++r) {
491
- if (r < n.length)
492
- a = n.charCodeAt(r);
490
+ for (var t = "", i = 0, s = -1, o = 0, a, c = 0; c <= n.length; ++c) {
491
+ if (c < n.length)
492
+ a = n.charCodeAt(c);
493
493
  else {
494
494
  if (a === 47)
495
495
  break;
496
496
  a = 47;
497
497
  }
498
498
  if (a === 47) {
499
- if (!(s === r - 1 || o === 1))
500
- if (s !== r - 1 && o === 2) {
499
+ if (!(s === c - 1 || o === 1))
500
+ if (s !== c - 1 && o === 2) {
501
501
  if (t.length < 2 || i !== 2 || t.charCodeAt(t.length - 1) !== 46 || t.charCodeAt(t.length - 2) !== 46) {
502
502
  if (t.length > 2) {
503
503
  var u = t.lastIndexOf("/");
504
504
  if (u !== t.length - 1) {
505
- u === -1 ? (t = "", i = 0) : (t = t.slice(0, u), i = t.length - 1 - t.lastIndexOf("/")), s = r, o = 0;
505
+ u === -1 ? (t = "", i = 0) : (t = t.slice(0, u), i = t.length - 1 - t.lastIndexOf("/")), s = c, o = 0;
506
506
  continue;
507
507
  }
508
508
  } else if (t.length === 2 || t.length === 1) {
509
- t = "", i = 0, s = r, o = 0;
509
+ t = "", i = 0, s = c, o = 0;
510
510
  continue;
511
511
  }
512
512
  }
513
513
  e && (t.length > 0 ? t += "/.." : t = "..", i = 2);
514
514
  } else
515
- t.length > 0 ? t += "/" + n.slice(s + 1, r) : t = n.slice(s + 1, r), i = r - s - 1;
516
- s = r, o = 0;
515
+ t.length > 0 ? t += "/" + n.slice(s + 1, c) : t = n.slice(s + 1, c), i = c - s - 1;
516
+ s = c, o = 0;
517
517
  } else
518
518
  a === 46 && o !== -1 ? ++o : o = -1;
519
519
  }
520
520
  return t;
521
521
  }
522
- function zn(n, e) {
522
+ function Fn(n, e) {
523
523
  var t = e.dir || e.root, i = e.base || (e.name || "") + (e.ext || "");
524
524
  return t ? t === e.root ? t + i : t + n + i : i;
525
525
  }
@@ -557,7 +557,7 @@ var ve = {
557
557
  ;
558
558
  for (var s = e.length, o = s - i, a = 1; a < t.length && t.charCodeAt(a) === 47; ++a)
559
559
  ;
560
- for (var r = t.length, u = r - a, h = o < u ? o : u, p = -1, l = 0; l <= h; ++l) {
560
+ for (var c = t.length, u = c - a, h = o < u ? o : u, p = -1, l = 0; l <= h; ++l) {
561
561
  if (l === h) {
562
562
  if (u > h) {
563
563
  if (t.charCodeAt(a + l) === 47)
@@ -568,10 +568,10 @@ var ve = {
568
568
  o > h && (e.charCodeAt(i + l) === 47 ? p = l : l === 0 && (p = 0));
569
569
  break;
570
570
  }
571
- var v = e.charCodeAt(i + l), _ = t.charCodeAt(a + l);
572
- if (v !== _)
571
+ var m = e.charCodeAt(i + l), _ = t.charCodeAt(a + l);
572
+ if (m !== _)
573
573
  break;
574
- v === 47 && (p = l);
574
+ m === 47 && (p = l);
575
575
  }
576
576
  var d = "";
577
577
  for (l = i + p + 1; l <= s; ++l)
@@ -602,7 +602,7 @@ var ve = {
602
602
  if (t !== void 0 && t.length > 0 && t.length <= e.length) {
603
603
  if (t.length === e.length && t === e)
604
604
  return "";
605
- var r = t.length - 1, u = -1;
605
+ var c = t.length - 1, u = -1;
606
606
  for (a = e.length - 1; a >= 0; --a) {
607
607
  var h = e.charCodeAt(a);
608
608
  if (h === 47) {
@@ -611,7 +611,7 @@ var ve = {
611
611
  break;
612
612
  }
613
613
  } else
614
- u === -1 && (o = !1, u = a + 1), r >= 0 && (h === t.charCodeAt(r) ? --r === -1 && (s = a) : (r = -1, s = u));
614
+ u === -1 && (o = !1, u = a + 1), c >= 0 && (h === t.charCodeAt(c) ? --c === -1 && (s = a) : (c = -1, s = u));
615
615
  }
616
616
  return i === s ? s = u : s === -1 && (s = e.length), e.slice(i, s);
617
617
  } else {
@@ -628,16 +628,16 @@ var ve = {
628
628
  },
629
629
  extname: function(e) {
630
630
  W(e);
631
- for (var t = -1, i = 0, s = -1, o = !0, a = 0, r = e.length - 1; r >= 0; --r) {
632
- var u = e.charCodeAt(r);
631
+ for (var t = -1, i = 0, s = -1, o = !0, a = 0, c = e.length - 1; c >= 0; --c) {
632
+ var u = e.charCodeAt(c);
633
633
  if (u === 47) {
634
634
  if (!o) {
635
- i = r + 1;
635
+ i = c + 1;
636
636
  break;
637
637
  }
638
638
  continue;
639
639
  }
640
- s === -1 && (o = !1, s = r + 1), u === 46 ? t === -1 ? t = r : a !== 1 && (a = 1) : t !== -1 && (a = -1);
640
+ s === -1 && (o = !1, s = c + 1), u === 46 ? t === -1 ? t = c : a !== 1 && (a = 1) : t !== -1 && (a = -1);
641
641
  }
642
642
  return t === -1 || s === -1 || // We saw a non-dot character immediately before the dot
643
643
  a === 0 || // The (right-most) trimmed path component is exactly '..'
@@ -646,7 +646,7 @@ var ve = {
646
646
  format: function(e) {
647
647
  if (e === null || typeof e != "object")
648
648
  throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof e);
649
- return zn("/", e);
649
+ return Fn("/", e);
650
650
  },
651
651
  parse: function(e) {
652
652
  W(e);
@@ -655,10 +655,10 @@ var ve = {
655
655
  return t;
656
656
  var i = e.charCodeAt(0), s = i === 47, o;
657
657
  s ? (t.root = "/", o = 1) : o = 0;
658
- for (var a = -1, r = 0, u = -1, h = !0, p = e.length - 1, l = 0; p >= o; --p) {
658
+ for (var a = -1, c = 0, u = -1, h = !0, p = e.length - 1, l = 0; p >= o; --p) {
659
659
  if (i = e.charCodeAt(p), i === 47) {
660
660
  if (!h) {
661
- r = p + 1;
661
+ c = p + 1;
662
662
  break;
663
663
  }
664
664
  continue;
@@ -667,7 +667,7 @@ var ve = {
667
667
  }
668
668
  return a === -1 || u === -1 || // We saw a non-dot character immediately before the dot
669
669
  l === 0 || // The (right-most) trimmed path component is exactly '..'
670
- 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;
670
+ l === 1 && a === u - 1 && a === c + 1 ? u !== -1 && (c === 0 && s ? t.base = t.name = e.slice(1, u) : t.base = t.name = e.slice(c, u)) : (c === 0 && s ? (t.name = e.slice(1, a), t.base = e.slice(1, u)) : (t.name = e.slice(c, a), t.base = e.slice(c, u)), t.ext = e.slice(a, u)), c > 0 ? t.dir = e.slice(0, c - 1) : s && (t.dir = "/"), t;
671
671
  },
672
672
  sep: "/",
673
673
  delimiter: ":",
@@ -678,14 +678,14 @@ ve.posix = ve;
678
678
  function Z() {
679
679
  return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
680
680
  }
681
- function Ae() {
681
+ function ce() {
682
682
  return "".concat(Z() + Z(), "-").concat(Z(), "-").concat(Z(), "-").concat(Z(), "-").concat(Z()).concat(Z()).concat(Z());
683
683
  }
684
- const Hn = /<svg\b[^>]*>[\s\S]*?<\/svg>/;
684
+ const Un = /<svg\b[^>]*>[\s\S]*?<\/svg>/;
685
685
  function it(n) {
686
- return Hn.test(n);
686
+ return Un.test(n);
687
687
  }
688
- class nn {
688
+ class on {
689
689
  /**
690
690
  * 拷贝文本
691
691
  *
@@ -706,7 +706,7 @@ class nn {
706
706
  * @private
707
707
  * @type {(HTMLInputElement | null)}
708
708
  */
709
- x(nn, "inputElement", null);
709
+ S(on, "inputElement", null);
710
710
  const y = class y {
711
711
  /**
712
712
  * 检查数据库是否存在
@@ -752,14 +752,14 @@ const y = class y {
752
752
  static async checkTableExists(e, t) {
753
753
  return await y.checkDataBaseExists(e) ? new Promise((s, o) => {
754
754
  const a = indexedDB.open(e);
755
- a.onupgradeneeded = (r) => {
756
- y.db = r.target.result, y.version = y.db.version;
757
- }, a.onsuccess = (r) => {
758
- y.db = r.target.result, y.lastLink = a.result;
755
+ a.onupgradeneeded = (c) => {
756
+ y.db = c.target.result, y.version = y.db.version;
757
+ }, a.onsuccess = (c) => {
758
+ y.db = c.target.result, y.lastLink = a.result;
759
759
  const u = y.db.objectStoreNames.contains(t);
760
760
  a.result.close(), s(u);
761
- }, a.onerror = (r) => {
762
- o(r.target.error);
761
+ }, a.onerror = (c) => {
762
+ o(c.target.error);
763
763
  };
764
764
  }) : !1;
765
765
  }
@@ -774,8 +774,8 @@ const y = class y {
774
774
  */
775
775
  static async createTable(e, t, i, s = !1) {
776
776
  return new Promise((o) => {
777
- var r, u;
778
- y.version += 1, y.lastLink && ((u = (r = y.lastLink).close) == null || u.call(r));
777
+ var c, u;
778
+ y.version += 1, y.lastLink && ((u = (c = y.lastLink).close) == null || u.call(c));
779
779
  const a = indexedDB.open(e, y.version);
780
780
  a.onupgradeneeded = (h) => {
781
781
  if (y.db = h.target.result, !y.db.objectStoreNames.contains(t)) {
@@ -801,10 +801,10 @@ const y = class y {
801
801
  var o, a;
802
802
  y.version += 1, y.lastLink && ((a = (o = y.lastLink).close) == null || a.call(o));
803
803
  const s = indexedDB.open(e, y.version);
804
- s.onupgradeneeded = (r) => {
805
- y.db = r.target.result, y.lastLink = s.result, y.db.objectStoreNames.contains(t) && y.db.deleteObjectStore(t);
806
- }, s.onsuccess = (r) => {
807
- y.db = r.target.result, y.lastLink = s.result, s.result.close(), i(!0);
804
+ s.onupgradeneeded = (c) => {
805
+ y.db = c.target.result, y.lastLink = s.result, y.db.objectStoreNames.contains(t) && y.db.deleteObjectStore(t);
806
+ }, s.onsuccess = (c) => {
807
+ y.db = c.target.result, y.lastLink = s.result, s.result.close(), i(!0);
808
808
  }, s.onerror = () => {
809
809
  s.result.close(), i(!1);
810
810
  };
@@ -821,8 +821,8 @@ const y = class y {
821
821
  static async addData(e, t, i) {
822
822
  return new Promise((s, o) => {
823
823
  const a = indexedDB.open(e);
824
- a.onsuccess = (r) => {
825
- if (y.db = r.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
824
+ a.onsuccess = (c) => {
825
+ if (y.db = c.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
826
826
  const p = y.db.transaction([t], "readwrite").objectStore(t).add(i);
827
827
  p.onsuccess = (l) => {
828
828
  s(i);
@@ -847,8 +847,8 @@ const y = class y {
847
847
  static async deleteData(e, t, i) {
848
848
  return new Promise((s, o) => {
849
849
  const a = indexedDB.open(e);
850
- a.onsuccess = (r) => {
851
- if (y.db = r.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
850
+ a.onsuccess = (c) => {
851
+ if (y.db = c.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
852
852
  const p = y.db.transaction([t], "readwrite").objectStore(t).delete(i);
853
853
  p.onsuccess = (l) => {
854
854
  s(!0);
@@ -873,8 +873,8 @@ const y = class y {
873
873
  static async updateData(e, t, i) {
874
874
  return new Promise((s, o) => {
875
875
  const a = indexedDB.open(e);
876
- a.onsuccess = (r) => {
877
- if (y.db = r.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
876
+ a.onsuccess = (c) => {
877
+ if (y.db = c.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
878
878
  const p = y.db.transaction([t], "readwrite").objectStore(t).put(i);
879
879
  p.onsuccess = (l) => {
880
880
  s(i);
@@ -899,8 +899,8 @@ const y = class y {
899
899
  static async getData(e, t, i) {
900
900
  return new Promise((s, o) => {
901
901
  const a = indexedDB.open(e);
902
- a.onsuccess = (r) => {
903
- if (y.db = r.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
902
+ a.onsuccess = (c) => {
903
+ if (y.db = c.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
904
904
  const p = y.db.transaction([t], "readonly").objectStore(t).get(i);
905
905
  p.onsuccess = (l) => {
906
906
  s(p.result);
@@ -941,11 +941,11 @@ const y = class y {
941
941
  }
942
942
  };
943
943
  // 数据库版本
944
- x(y, "version", 1), // 数据库连接句柄
945
- x(y, "db", null), // 上一个连接
946
- x(y, "lastLink");
947
- let q = y;
948
- class On {
944
+ S(y, "version", 1), // 数据库连接句柄
945
+ S(y, "db", null), // 上一个连接
946
+ S(y, "lastLink");
947
+ let V = y;
948
+ class Wn {
949
949
  /**
950
950
  * Creates an instance of FileUploader.
951
951
  * @author tony001
@@ -953,7 +953,7 @@ class On {
953
953
  * @param {FileUploaderOptions<T>} options
954
954
  */
955
955
  constructor(e) {
956
- x(this, "options");
956
+ S(this, "options");
957
957
  this.options = {
958
958
  multiple: !0,
959
959
  accept: "*/*",
@@ -979,8 +979,8 @@ class On {
979
979
  if (e.length === 0)
980
980
  return;
981
981
  const t = e.filter((o) => {
982
- var a, r;
983
- return this.options.maxSize && o.size > this.options.maxSize ? ((r = (a = this.options).onError) == null || r.call(a, new Error("文件大小超过限制 (".concat(this.formatSize(o.size), " > ").concat(this.formatSize(this.options.maxSize), ")")), o), !1) : !0;
982
+ var a, c;
983
+ return this.options.maxSize && o.size > this.options.maxSize ? ((c = (a = this.options).onError) == null || c.call(a, new Error("文件大小超过限制 (".concat(this.formatSize(o.size), " > ").concat(this.formatSize(this.options.maxSize), ")")), o), !1) : !0;
984
984
  });
985
985
  (s = (i = this.options).onSelect) == null || s.call(i, t), await Promise.all(t.map((o) => this.processFile(o)));
986
986
  }
@@ -988,15 +988,15 @@ class On {
988
988
  * 处理单个文件上传
989
989
  */
990
990
  async processFile(e) {
991
- var t, i, s, o, a, r;
991
+ var t, i, s, o, a, c;
992
992
  try {
993
993
  const u = (p) => {
994
- var l, v;
995
- (v = (l = this.options).onProgress) == null || v.call(l, e, p);
994
+ var l, m;
995
+ (m = (l = this.options).onProgress) == null || m.call(l, e, p);
996
996
  }, h = await this.options.onUpload(e, u);
997
997
  (i = (t = this.options).onProgress) == null || i.call(t, e, 100), (o = (s = this.options).onSuccess) == null || o.call(s, h, e);
998
998
  } catch (u) {
999
- (r = (a = this.options).onError) == null || r.call(a, u instanceof Error ? u : new Error("上传失败"), e);
999
+ (c = (a = this.options).onError) == null || c.call(a, u instanceof Error ? u : new Error("上传失败"), e);
1000
1000
  }
1001
1001
  }
1002
1002
  /**
@@ -1009,7 +1009,7 @@ class On {
1009
1009
  return "".concat((e / 1024 ** i).toFixed(2), " ").concat(t[i]);
1010
1010
  }
1011
1011
  }
1012
- class sn {
1012
+ class an {
1013
1013
  /**
1014
1014
  * 从XML元素中提取CDATA内容
1015
1015
  *
@@ -1038,14 +1038,14 @@ class sn {
1038
1038
  static parse(e) {
1039
1039
  const i = new DOMParser().parseFromString(e, "text/xml");
1040
1040
  return Array.from(i.querySelectorAll("resource")).map((o) => {
1041
- const a = o.getAttribute("type") || "", r = o.querySelector("data"), u = o.querySelector("metadata");
1041
+ const a = o.getAttribute("type") || "", c = o.querySelector("data"), u = o.querySelector("metadata");
1042
1042
  try {
1043
- const h = this.getCdataContent(r), p = this.getCdataContent(u), l = h ? JSON.parse(h) : {}, v = p ? JSON.parse(p) : {};
1043
+ const h = this.getCdataContent(c), p = this.getCdataContent(u), l = h ? JSON.parse(h) : {}, m = p ? JSON.parse(p) : {};
1044
1044
  return {
1045
1045
  id: l.id,
1046
1046
  type: a,
1047
1047
  data: l,
1048
- metadata: v
1048
+ metadata: m
1049
1049
  };
1050
1050
  } catch (h) {
1051
1051
  throw new Error("XML 解析错误: ".concat(h.message));
@@ -1074,17 +1074,17 @@ class sn {
1074
1074
  remainingText: e,
1075
1075
  hasResources: !1
1076
1076
  };
1077
- const [s] = i, o = i.index, a = o + s.length, r = (e.slice(0, o) + e.slice(a)).replace(/\n/g, "");
1077
+ const [s] = i, o = i.index, a = o + s.length, c = (e.slice(0, o) + e.slice(a)).replace(/\n/g, "");
1078
1078
  try {
1079
1079
  return {
1080
1080
  resources: this.parse(s),
1081
- remainingText: r,
1081
+ remainingText: c,
1082
1082
  hasResources: !0
1083
1083
  };
1084
1084
  } catch (u) {
1085
1085
  return {
1086
1086
  resources: [],
1087
- remainingText: r,
1087
+ remainingText: c,
1088
1088
  hasResources: !0,
1089
1089
  error: "资源解析失败: ".concat(u.message)
1090
1090
  };
@@ -1105,19 +1105,19 @@ class sn {
1105
1105
  const s = (a) => "\n".concat(" ".repeat(a)), o = 1;
1106
1106
  return e.forEach((a) => {
1107
1107
  i.appendChild(t.createTextNode(s(o)));
1108
- const r = t.createElement("resource");
1109
- r.setAttribute("type", a.type), r.setAttribute("version", "1.0");
1108
+ const c = t.createElement("resource");
1109
+ c.setAttribute("type", a.type), c.setAttribute("version", "1.0");
1110
1110
  const u = (h, p) => {
1111
1111
  const l = t.createElement(h);
1112
1112
  l.appendChild(t.createTextNode(s(o + 1)));
1113
- const v = t.createCDATASection(JSON.stringify(p));
1114
- return l.appendChild(v), l.appendChild(t.createTextNode(s(o))), l;
1113
+ const m = t.createCDATASection(JSON.stringify(p));
1114
+ return l.appendChild(m), l.appendChild(t.createTextNode(s(o))), l;
1115
1115
  };
1116
- r.appendChild(t.createTextNode(s(o + 1))), r.appendChild(u("data", a.data)), r.appendChild(t.createTextNode(s(o + 1))), r.appendChild(u("metadata", a.metadata)), r.appendChild(t.createTextNode(s(o))), i.appendChild(r);
1116
+ c.appendChild(t.createTextNode(s(o + 1))), c.appendChild(u("data", a.data)), c.appendChild(t.createTextNode(s(o + 1))), c.appendChild(u("metadata", a.metadata)), c.appendChild(t.createTextNode(s(o))), i.appendChild(c);
1117
1117
  }), i.appendChild(t.createTextNode("\n")), t.appendChild(i), new XMLSerializer().serializeToString(t).replace(/></g, ">\n<");
1118
1118
  }
1119
1119
  }
1120
- class Bn {
1120
+ class jn {
1121
1121
  /**
1122
1122
  * 从XML元素中提取CDATA内容
1123
1123
  *
@@ -1146,13 +1146,13 @@ class Bn {
1146
1146
  static parse(e) {
1147
1147
  const i = new DOMParser().parseFromString(e, "text/xml");
1148
1148
  return Array.from(i.querySelectorAll("suggestion")).map((o) => {
1149
- const a = o.getAttribute("type") || "", r = o.querySelector("data"), u = o.querySelector("metadata");
1149
+ const a = o.getAttribute("type") || "", c = o.querySelector("data"), u = o.querySelector("metadata");
1150
1150
  try {
1151
- const h = this.getCdataContent(r), p = this.getCdataContent(u), l = h ? JSON.parse(h) : {}, v = p ? JSON.parse(p) : {};
1151
+ const h = this.getCdataContent(c), p = this.getCdataContent(u), l = h ? JSON.parse(h) : {}, m = p ? JSON.parse(p) : {};
1152
1152
  return {
1153
1153
  type: a,
1154
1154
  data: l,
1155
- metadata: v
1155
+ metadata: m
1156
1156
  };
1157
1157
  } catch (h) {
1158
1158
  throw new Error("XML 解析错误: ".concat(h.message));
@@ -1181,17 +1181,17 @@ class Bn {
1181
1181
  remainingText: e,
1182
1182
  hasSuggestions: !1
1183
1183
  };
1184
- const [s] = i, o = i.index, a = o + s.length, r = (e.slice(0, o) + e.slice(a)).replace(/\n/g, "");
1184
+ const [s] = i, o = i.index, a = o + s.length, c = (e.slice(0, o) + e.slice(a)).replace(/\n/g, "");
1185
1185
  try {
1186
1186
  return {
1187
1187
  suggestions: this.parse(s),
1188
- remainingText: r,
1188
+ remainingText: c,
1189
1189
  hasSuggestions: !0
1190
1190
  };
1191
1191
  } catch (u) {
1192
1192
  return {
1193
1193
  suggestions: [],
1194
- remainingText: r,
1194
+ remainingText: c,
1195
1195
  hasSuggestions: !0,
1196
1196
  error: "资源解析失败: ".concat(u.message)
1197
1197
  };
@@ -1212,122 +1212,206 @@ class Bn {
1212
1212
  const s = (a) => "\n".concat(" ".repeat(a)), o = 1;
1213
1213
  return e.forEach((a) => {
1214
1214
  i.appendChild(t.createTextNode(s(o)));
1215
- const r = t.createElement("suggestion");
1216
- r.setAttribute("type", a.type), r.setAttribute("version", "1.0");
1215
+ const c = t.createElement("suggestion");
1216
+ c.setAttribute("type", a.type), c.setAttribute("version", "1.0");
1217
1217
  const u = (h, p) => {
1218
1218
  const l = t.createElement(h);
1219
1219
  l.appendChild(t.createTextNode(s(o + 1)));
1220
- const v = t.createCDATASection(JSON.stringify(p));
1221
- return l.appendChild(v), l.appendChild(t.createTextNode(s(o))), l;
1220
+ const m = t.createCDATASection(JSON.stringify(p));
1221
+ return l.appendChild(m), l.appendChild(t.createTextNode(s(o))), l;
1222
1222
  };
1223
- r.appendChild(t.createTextNode(s(o + 1))), r.appendChild(u("data", a.data)), r.appendChild(t.createTextNode(s(o + 1))), r.appendChild(u("metadata", a.metadata)), r.appendChild(t.createTextNode(s(o))), i.appendChild(r);
1223
+ c.appendChild(t.createTextNode(s(o + 1))), c.appendChild(u("data", a.data)), c.appendChild(t.createTextNode(s(o + 1))), c.appendChild(u("metadata", a.metadata)), c.appendChild(t.createTextNode(s(o))), i.appendChild(c);
1224
1224
  }), i.appendChild(t.createTextNode("\n")), t.appendChild(i), new XMLSerializer().serializeToString(t).replace(/></g, ">\n<");
1225
1225
  }
1226
1226
  }
1227
- function Je(n) {
1227
+ function Ge(n) {
1228
1228
  return n.x >= 0 && n.x <= 1 && n.y >= 0 && n.y <= 1;
1229
1229
  }
1230
- function on(n, e, t, i) {
1231
- 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));
1230
+ function rn(n, e, t, i) {
1231
+ const s = n / window.innerWidth, o = e / window.innerHeight, a = Math.max(0, Math.min(s, 1 - t)), c = Math.max(0, Math.min(o, 1 - i));
1232
1232
  return {
1233
1233
  x: a,
1234
- y: r
1234
+ y: c
1235
1235
  };
1236
1236
  }
1237
- var le, k, Re, ft, we = 0, an = [], ke = [], vt = b.__b, mt = b.__r, _t = b.diffed, gt = b.__c, wt = b.unmount;
1237
+ function cn(n) {
1238
+ let e = 0;
1239
+ for (let t = 0; t < n.length; t++) {
1240
+ const i = n.charCodeAt(t);
1241
+ e = (e << 5) - e + i, e |= 0;
1242
+ }
1243
+ return Math.abs(e).toString(36).toUpperCase();
1244
+ }
1245
+ function ln(n) {
1246
+ let e = 2166136261;
1247
+ for (let t = 0; t < n.length; t++)
1248
+ e ^= n.charCodeAt(t), e += (e << 1) + (e << 4) + (e << 7) + (e << 8) + (e << 24);
1249
+ return Math.abs(e).toString(36).toUpperCase();
1250
+ }
1251
+ function un(n) {
1252
+ let e = 5381;
1253
+ for (let t = 0; t < n.length; t++)
1254
+ e = (e << 5) + e + n.charCodeAt(t);
1255
+ return Math.abs(e).toString(36).toUpperCase();
1256
+ }
1257
+ function Vn(n) {
1258
+ const e = cn(n), t = ln(n), i = un(n), s = e + t + i;
1259
+ let o = "";
1260
+ for (let a = 0; a < n.length % 10 + 10; a++) {
1261
+ const c = a * 7 % s.length;
1262
+ o += s.charAt(c);
1263
+ }
1264
+ return o.toUpperCase();
1265
+ }
1266
+ function ft(n) {
1267
+ return n.replace(/[^A-Z0-9]/g, "");
1268
+ }
1269
+ function dn(n, e) {
1270
+ switch (e) {
1271
+ case "fnv1a":
1272
+ return ln(n);
1273
+ case "djb2":
1274
+ return un(n);
1275
+ case "combined":
1276
+ return Vn(n);
1277
+ case "simple":
1278
+ default:
1279
+ return cn(n);
1280
+ }
1281
+ }
1282
+ function qn(n, e = 36) {
1283
+ const t = ft(n);
1284
+ if (t.length >= e)
1285
+ return t.substring(0, e);
1286
+ let i = t;
1287
+ for (; i.length < e; )
1288
+ i += ft(dn(i, "combined"));
1289
+ return i.substring(0, e);
1290
+ }
1291
+ function mt(n, e = 36) {
1292
+ const t = dn(n, "combined");
1293
+ return qn(t, e);
1294
+ }
1295
+ class Yn {
1296
+ /**
1297
+ * @description 解析工具调用
1298
+ * @static
1299
+ * @param {string} toolCallString
1300
+ * @returns {*} {IChatToolCall[]}
1301
+ * @memberof ChatToolCallParser
1302
+ */
1303
+ static parse(e) {
1304
+ const t = new RegExp("<tool_call>\\s*({[\\s\\S]*?})\\s*</tool_call>", "g"), i = e.matchAll(t), s = [];
1305
+ for (const o of i)
1306
+ try {
1307
+ const a = JSON.parse(o[1]), c = {
1308
+ name: a.name,
1309
+ parameters: a.parameters,
1310
+ error: a.error || !1
1311
+ };
1312
+ a.result && Object.assign(c, {
1313
+ result: a.result
1314
+ }), s.push(c);
1315
+ } catch (a) {
1316
+ console.error("解析工具调用失败:", a);
1317
+ }
1318
+ return s;
1319
+ }
1320
+ }
1321
+ var ue, N, Re, vt, be = 0, hn = [], Ne = [], _t = b.__b, gt = b.__r, wt = b.diffed, bt = b.__c, yt = b.unmount;
1238
1322
  function He(n, e) {
1239
- b.__h && b.__h(k, n, we || e), we = 0;
1240
- var t = k.__H || (k.__H = { __: [], __h: [] });
1241
- return n >= t.__.length && t.__.push({ __V: ke }), t.__[n];
1323
+ b.__h && b.__h(N, n, be || e), be = 0;
1324
+ var t = N.__H || (N.__H = { __: [], __h: [] });
1325
+ return n >= t.__.length && t.__.push({ __V: Ne }), t.__[n];
1242
1326
  }
1243
1327
  function K(n) {
1244
- return we = 1, Pn(ln, n);
1328
+ return be = 1, Xn(mn, n);
1245
1329
  }
1246
- function Pn(n, e, t) {
1247
- var i = He(le++, 2);
1248
- if (i.t = n, !i.__c && (i.__ = [t ? t(e) : ln(void 0, e), function(r) {
1249
- var u = i.__N ? i.__N[0] : i.__[0], h = i.t(u, r);
1330
+ function Xn(n, e, t) {
1331
+ var i = He(ue++, 2);
1332
+ if (i.t = n, !i.__c && (i.__ = [t ? t(e) : mn(void 0, e), function(c) {
1333
+ var u = i.__N ? i.__N[0] : i.__[0], h = i.t(u, c);
1250
1334
  u !== h && (i.__N = [h, i.__[1]], i.__c.setState({}));
1251
- }], i.__c = k, !k.u)) {
1252
- var s = function(r, u, h) {
1335
+ }], i.__c = N, !N.u)) {
1336
+ var s = function(c, u, h) {
1253
1337
  if (!i.__c.__H)
1254
1338
  return !0;
1255
- var p = i.__c.__H.__.filter(function(v) {
1256
- return v.__c;
1339
+ var p = i.__c.__H.__.filter(function(m) {
1340
+ return m.__c;
1257
1341
  });
1258
- if (p.every(function(v) {
1259
- return !v.__N;
1342
+ if (p.every(function(m) {
1343
+ return !m.__N;
1260
1344
  }))
1261
- return !o || o.call(this, r, u, h);
1345
+ return !o || o.call(this, c, u, h);
1262
1346
  var l = !1;
1263
- return p.forEach(function(v) {
1264
- if (v.__N) {
1265
- var _ = v.__[0];
1266
- v.__ = v.__N, v.__N = void 0, _ !== v.__[0] && (l = !0);
1347
+ return p.forEach(function(m) {
1348
+ if (m.__N) {
1349
+ var _ = m.__[0];
1350
+ m.__ = m.__N, m.__N = void 0, _ !== m.__[0] && (l = !0);
1267
1351
  }
1268
- }), !(!l && i.__c.props === r) && (!o || o.call(this, r, u, h));
1352
+ }), !(!l && i.__c.props === c) && (!o || o.call(this, c, u, h));
1269
1353
  };
1270
- k.u = !0;
1271
- var o = k.shouldComponentUpdate, a = k.componentWillUpdate;
1272
- k.componentWillUpdate = function(r, u, h) {
1354
+ N.u = !0;
1355
+ var o = N.shouldComponentUpdate, a = N.componentWillUpdate;
1356
+ N.componentWillUpdate = function(c, u, h) {
1273
1357
  if (this.__e) {
1274
1358
  var p = o;
1275
- o = void 0, s(r, u, h), o = p;
1359
+ o = void 0, s(c, u, h), o = p;
1276
1360
  }
1277
- a && a.call(this, r, u, h);
1278
- }, k.shouldComponentUpdate = s;
1361
+ a && a.call(this, c, u, h);
1362
+ }, N.shouldComponentUpdate = s;
1279
1363
  }
1280
1364
  return i.__N || i.__;
1281
1365
  }
1282
- function D(n, e) {
1283
- var t = He(le++, 3);
1284
- !b.__s && cn(t.__H, e) && (t.__ = n, t.i = e, k.__H.__h.push(t));
1366
+ function I(n, e) {
1367
+ var t = He(ue++, 3);
1368
+ !b.__s && fn(t.__H, e) && (t.__ = n, t.i = e, N.__H.__h.push(t));
1285
1369
  }
1286
1370
  function P(n) {
1287
- return we = 5, X(function() {
1371
+ return be = 5, X(function() {
1288
1372
  return { current: n };
1289
1373
  }, []);
1290
1374
  }
1291
1375
  function X(n, e) {
1292
- var t = He(le++, 7);
1293
- return cn(t.__H, e) ? (t.__V = n(), t.i = e, t.__h = n, t.__V) : t.__;
1376
+ var t = He(ue++, 7);
1377
+ return fn(t.__H, e) ? (t.__V = n(), t.i = e, t.__h = n, t.__V) : t.__;
1294
1378
  }
1295
1379
  function Fe(n, e) {
1296
- return we = 8, X(function() {
1380
+ return be = 8, X(function() {
1297
1381
  return n;
1298
1382
  }, e);
1299
1383
  }
1300
- function rn(n) {
1301
- var e = k.context[n.__c], t = He(le++, 9);
1302
- return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(k)), e.props.value) : n.__;
1384
+ function pn(n) {
1385
+ var e = N.context[n.__c], t = He(ue++, 9);
1386
+ return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(N)), e.props.value) : n.__;
1303
1387
  }
1304
- function Rn() {
1305
- for (var n; n = an.shift(); )
1388
+ function Zn() {
1389
+ for (var n; n = hn.shift(); )
1306
1390
  if (n.__P && n.__H)
1307
1391
  try {
1308
- n.__H.__h.forEach(Ne), n.__H.__h.forEach(Ke), n.__H.__h = [];
1392
+ n.__H.__h.forEach($e), n.__H.__h.forEach(Ke), n.__H.__h = [];
1309
1393
  } catch (e) {
1310
1394
  n.__H.__h = [], b.__e(e, n.__v);
1311
1395
  }
1312
1396
  }
1313
1397
  b.__b = function(n) {
1314
- k = null, vt && vt(n);
1398
+ N = null, _t && _t(n);
1315
1399
  }, b.__r = function(n) {
1316
- mt && mt(n), le = 0;
1317
- var e = (k = n.__c).__H;
1318
- e && (Re === k ? (e.__h = [], k.__h = [], e.__.forEach(function(t) {
1319
- t.__N && (t.__ = t.__N), t.__V = ke, t.__N = t.i = void 0;
1320
- })) : (e.__h.forEach(Ne), e.__h.forEach(Ke), e.__h = [], le = 0)), Re = k;
1400
+ gt && gt(n), ue = 0;
1401
+ var e = (N = n.__c).__H;
1402
+ e && (Re === N ? (e.__h = [], N.__h = [], e.__.forEach(function(t) {
1403
+ t.__N && (t.__ = t.__N), t.__V = Ne, t.__N = t.i = void 0;
1404
+ })) : (e.__h.forEach($e), e.__h.forEach(Ke), e.__h = [], ue = 0)), Re = N;
1321
1405
  }, b.diffed = function(n) {
1322
- _t && _t(n);
1406
+ wt && wt(n);
1323
1407
  var e = n.__c;
1324
- e && e.__H && (e.__H.__h.length && (an.push(e) !== 1 && ft === b.requestAnimationFrame || ((ft = b.requestAnimationFrame) || Fn)(Rn)), e.__H.__.forEach(function(t) {
1325
- t.i && (t.__H = t.i), t.__V !== ke && (t.__ = t.__V), t.i = void 0, t.__V = ke;
1326
- })), Re = k = null;
1408
+ e && e.__H && (e.__H.__h.length && (hn.push(e) !== 1 && vt === b.requestAnimationFrame || ((vt = b.requestAnimationFrame) || Jn)(Zn)), e.__H.__.forEach(function(t) {
1409
+ t.i && (t.__H = t.i), t.__V !== Ne && (t.__ = t.__V), t.i = void 0, t.__V = Ne;
1410
+ })), Re = N = null;
1327
1411
  }, b.__c = function(n, e) {
1328
1412
  e.some(function(t) {
1329
1413
  try {
1330
- t.__h.forEach(Ne), t.__h = t.__h.filter(function(i) {
1414
+ t.__h.forEach($e), t.__h = t.__h.filter(function(i) {
1331
1415
  return !i.__ || Ke(i);
1332
1416
  });
1333
1417
  } catch (i) {
@@ -1335,54 +1419,54 @@ b.__b = function(n) {
1335
1419
  s.__h && (s.__h = []);
1336
1420
  }), e = [], b.__e(i, t.__v);
1337
1421
  }
1338
- }), gt && gt(n, e);
1422
+ }), bt && bt(n, e);
1339
1423
  }, b.unmount = function(n) {
1340
- wt && wt(n);
1424
+ yt && yt(n);
1341
1425
  var e, t = n.__c;
1342
1426
  t && t.__H && (t.__H.__.forEach(function(i) {
1343
1427
  try {
1344
- Ne(i);
1428
+ $e(i);
1345
1429
  } catch (s) {
1346
1430
  e = s;
1347
1431
  }
1348
1432
  }), t.__H = void 0, e && b.__e(e, t.__v));
1349
1433
  };
1350
- var bt = typeof requestAnimationFrame == "function";
1351
- function Fn(n) {
1434
+ var Ct = typeof requestAnimationFrame == "function";
1435
+ function Jn(n) {
1352
1436
  var e, t = function() {
1353
- clearTimeout(i), bt && cancelAnimationFrame(e), setTimeout(n);
1437
+ clearTimeout(i), Ct && cancelAnimationFrame(e), setTimeout(n);
1354
1438
  }, i = setTimeout(t, 100);
1355
- bt && (e = requestAnimationFrame(t));
1439
+ Ct && (e = requestAnimationFrame(t));
1356
1440
  }
1357
- function Ne(n) {
1358
- var e = k, t = n.__c;
1359
- typeof t == "function" && (n.__c = void 0, t()), k = e;
1441
+ function $e(n) {
1442
+ var e = N, t = n.__c;
1443
+ typeof t == "function" && (n.__c = void 0, t()), N = e;
1360
1444
  }
1361
1445
  function Ke(n) {
1362
- var e = k;
1363
- n.__c = n.__(), k = e;
1446
+ var e = N;
1447
+ n.__c = n.__(), N = e;
1364
1448
  }
1365
- function cn(n, e) {
1449
+ function fn(n, e) {
1366
1450
  return !n || n.length !== e.length || e.some(function(t, i) {
1367
1451
  return t !== n[i];
1368
1452
  });
1369
1453
  }
1370
- function ln(n, e) {
1454
+ function mn(n, e) {
1371
1455
  return typeof e == "function" ? e(n) : e;
1372
1456
  }
1373
1457
  function Oe() {
1374
1458
  throw new Error("Cycle detected");
1375
1459
  }
1376
- var Un = Symbol.for("preact-signals");
1460
+ var Gn = Symbol.for("preact-signals");
1377
1461
  function st() {
1378
- if (ce > 1)
1379
- ce--;
1462
+ if (le > 1)
1463
+ le--;
1380
1464
  else {
1381
- for (var n, e = !1; me !== void 0; ) {
1382
- var t = me;
1383
- for (me = void 0, Qe++; t !== void 0; ) {
1465
+ for (var n, e = !1; _e !== void 0; ) {
1466
+ var t = _e;
1467
+ for (_e = void 0, Qe++; t !== void 0; ) {
1384
1468
  var i = t.o;
1385
- if (t.o = void 0, t.f &= -3, !(8 & t.f) && dn(t))
1469
+ if (t.o = void 0, t.f &= -3, !(8 & t.f) && _n(t))
1386
1470
  try {
1387
1471
  t.c();
1388
1472
  } catch (s) {
@@ -1391,37 +1475,37 @@ function st() {
1391
1475
  t = i;
1392
1476
  }
1393
1477
  }
1394
- if (Qe = 0, ce--, e)
1478
+ if (Qe = 0, le--, e)
1395
1479
  throw n;
1396
1480
  }
1397
1481
  }
1398
- var N = void 0, me = void 0, ce = 0, Qe = 0, Ie = 0;
1399
- function un(n) {
1400
- if (N !== void 0) {
1482
+ var $ = void 0, _e = void 0, le = 0, Qe = 0, Ie = 0;
1483
+ function vn(n) {
1484
+ if ($ !== void 0) {
1401
1485
  var e = n.n;
1402
- if (e === void 0 || e.t !== N)
1403
- return e = { i: 0, S: n, p: N.s, n: void 0, t: N, e: void 0, x: void 0, r: e }, N.s !== void 0 && (N.s.n = e), N.s = e, n.n = e, 32 & N.f && n.S(e), e;
1486
+ if (e === void 0 || e.t !== $)
1487
+ return e = { i: 0, S: n, p: $.s, n: void 0, t: $, e: void 0, x: void 0, r: e }, $.s !== void 0 && ($.s.n = e), $.s = e, n.n = e, 32 & $.f && n.S(e), e;
1404
1488
  if (e.i === -1)
1405
- return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = N.s, e.n = void 0, N.s.n = e, N.s = e), e;
1489
+ 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, e.n = void 0, $.s.n = e, $.s = e), e;
1406
1490
  }
1407
1491
  }
1408
- function A(n) {
1492
+ function D(n) {
1409
1493
  this.v = n, this.i = 0, this.n = void 0, this.t = void 0;
1410
1494
  }
1411
- A.prototype.brand = Un;
1412
- A.prototype.h = function() {
1495
+ D.prototype.brand = Gn;
1496
+ D.prototype.h = function() {
1413
1497
  return !0;
1414
1498
  };
1415
- A.prototype.S = function(n) {
1499
+ D.prototype.S = function(n) {
1416
1500
  this.t !== n && n.e === void 0 && (n.x = this.t, this.t !== void 0 && (this.t.e = n), this.t = n);
1417
1501
  };
1418
- A.prototype.U = function(n) {
1502
+ D.prototype.U = function(n) {
1419
1503
  if (this.t !== void 0) {
1420
1504
  var e = n.e, t = n.x;
1421
1505
  e !== void 0 && (e.x = t, n.e = void 0), t !== void 0 && (t.e = e, n.x = void 0), n === this.t && (this.t = t);
1422
1506
  }
1423
1507
  };
1424
- A.prototype.subscribe = function(n) {
1508
+ D.prototype.subscribe = function(n) {
1425
1509
  var e = this;
1426
1510
  return at(function() {
1427
1511
  var t = e.value, i = 32 & this.f;
@@ -1433,26 +1517,26 @@ A.prototype.subscribe = function(n) {
1433
1517
  }
1434
1518
  });
1435
1519
  };
1436
- A.prototype.valueOf = function() {
1520
+ D.prototype.valueOf = function() {
1437
1521
  return this.value;
1438
1522
  };
1439
- A.prototype.toString = function() {
1523
+ D.prototype.toString = function() {
1440
1524
  return this.value + "";
1441
1525
  };
1442
- A.prototype.toJSON = function() {
1526
+ D.prototype.toJSON = function() {
1443
1527
  return this.value;
1444
1528
  };
1445
- A.prototype.peek = function() {
1529
+ D.prototype.peek = function() {
1446
1530
  return this.v;
1447
1531
  };
1448
- Object.defineProperty(A.prototype, "value", { get: function() {
1449
- var n = un(this);
1532
+ Object.defineProperty(D.prototype, "value", { get: function() {
1533
+ var n = vn(this);
1450
1534
  return n !== void 0 && (n.i = this.i), this.v;
1451
1535
  }, set: function(n) {
1452
- if (N instanceof Q && function() {
1536
+ if ($ instanceof Q && function() {
1453
1537
  throw new Error("Computed cannot have side-effects");
1454
1538
  }(), n !== this.v) {
1455
- Qe > 100 && Oe(), this.v = n, this.i++, Ie++, ce++;
1539
+ Qe > 100 && Oe(), this.v = n, this.i++, Ie++, le++;
1456
1540
  try {
1457
1541
  for (var e = this.t; e !== void 0; e = e.x)
1458
1542
  e.t.N();
@@ -1461,16 +1545,16 @@ Object.defineProperty(A.prototype, "value", { get: function() {
1461
1545
  }
1462
1546
  }
1463
1547
  } });
1464
- function J(n) {
1465
- return new A(n);
1548
+ function G(n) {
1549
+ return new D(n);
1466
1550
  }
1467
- function dn(n) {
1551
+ function _n(n) {
1468
1552
  for (var e = n.s; e !== void 0; e = e.n)
1469
1553
  if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i)
1470
1554
  return !0;
1471
1555
  return !1;
1472
1556
  }
1473
- function hn(n) {
1557
+ function gn(n) {
1474
1558
  for (var e = n.s; e !== void 0; e = e.n) {
1475
1559
  var t = e.S.n;
1476
1560
  if (t !== void 0 && (e.r = t), e.S.n = e, e.i = -1, e.n === void 0) {
@@ -1479,7 +1563,7 @@ function hn(n) {
1479
1563
  }
1480
1564
  }
1481
1565
  }
1482
- function pn(n) {
1566
+ function wn(n) {
1483
1567
  for (var e = n.s, t = void 0; e !== void 0; ) {
1484
1568
  var i = e.p;
1485
1569
  e.i === -1 ? (e.S.U(e), i !== void 0 && (i.n = e.n), e.n !== void 0 && (e.n.p = i)) : t = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = i;
@@ -1487,24 +1571,24 @@ function pn(n) {
1487
1571
  n.s = t;
1488
1572
  }
1489
1573
  function Q(n) {
1490
- A.call(this, void 0), this.x = n, this.s = void 0, this.g = Ie - 1, this.f = 4;
1574
+ D.call(this, void 0), this.x = n, this.s = void 0, this.g = Ie - 1, this.f = 4;
1491
1575
  }
1492
- (Q.prototype = new A()).h = function() {
1576
+ (Q.prototype = new D()).h = function() {
1493
1577
  if (this.f &= -3, 1 & this.f)
1494
1578
  return !1;
1495
1579
  if ((36 & this.f) == 32 || (this.f &= -5, this.g === Ie))
1496
1580
  return !0;
1497
- if (this.g = Ie, this.f |= 1, this.i > 0 && !dn(this))
1581
+ if (this.g = Ie, this.f |= 1, this.i > 0 && !_n(this))
1498
1582
  return this.f &= -2, !0;
1499
- var n = N;
1583
+ var n = $;
1500
1584
  try {
1501
- hn(this), N = this;
1585
+ gn(this), $ = this;
1502
1586
  var e = this.x();
1503
1587
  (16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
1504
1588
  } catch (t) {
1505
1589
  this.v = t, this.f |= 16, this.i++;
1506
1590
  }
1507
- return N = n, pn(this), this.f &= -2, !0;
1591
+ return $ = n, wn(this), this.f &= -2, !0;
1508
1592
  };
1509
1593
  Q.prototype.S = function(n) {
1510
1594
  if (this.t === void 0) {
@@ -1512,10 +1596,10 @@ Q.prototype.S = function(n) {
1512
1596
  for (var e = this.s; e !== void 0; e = e.n)
1513
1597
  e.S.S(e);
1514
1598
  }
1515
- A.prototype.S.call(this, n);
1599
+ D.prototype.S.call(this, n);
1516
1600
  };
1517
1601
  Q.prototype.U = function(n) {
1518
- if (this.t !== void 0 && (A.prototype.U.call(this, n), this.t === void 0)) {
1602
+ if (this.t !== void 0 && (D.prototype.U.call(this, n), this.t === void 0)) {
1519
1603
  this.f &= -33;
1520
1604
  for (var e = this.s; e !== void 0; e = e.n)
1521
1605
  e.S.U(e);
@@ -1535,43 +1619,43 @@ Q.prototype.peek = function() {
1535
1619
  };
1536
1620
  Object.defineProperty(Q.prototype, "value", { get: function() {
1537
1621
  1 & this.f && Oe();
1538
- var n = un(this);
1622
+ var n = vn(this);
1539
1623
  if (this.h(), n !== void 0 && (n.i = this.i), 16 & this.f)
1540
1624
  throw this.v;
1541
1625
  return this.v;
1542
1626
  } });
1543
- function fn(n) {
1627
+ function bn(n) {
1544
1628
  return new Q(n);
1545
1629
  }
1546
- function vn(n) {
1630
+ function yn(n) {
1547
1631
  var e = n.u;
1548
1632
  if (n.u = void 0, typeof e == "function") {
1549
- ce++;
1550
- var t = N;
1551
- N = void 0;
1633
+ le++;
1634
+ var t = $;
1635
+ $ = void 0;
1552
1636
  try {
1553
1637
  e();
1554
1638
  } catch (i) {
1555
1639
  throw n.f &= -2, n.f |= 8, ot(n), i;
1556
1640
  } finally {
1557
- N = t, st();
1641
+ $ = t, st();
1558
1642
  }
1559
1643
  }
1560
1644
  }
1561
1645
  function ot(n) {
1562
1646
  for (var e = n.s; e !== void 0; e = e.n)
1563
1647
  e.S.U(e);
1564
- n.x = void 0, n.s = void 0, vn(n);
1648
+ n.x = void 0, n.s = void 0, yn(n);
1565
1649
  }
1566
- function Wn(n) {
1567
- if (N !== this)
1650
+ function Kn(n) {
1651
+ if ($ !== this)
1568
1652
  throw new Error("Out-of-order effect");
1569
- pn(this), N = n, this.f &= -2, 8 & this.f && ot(this), st();
1653
+ wn(this), $ = n, this.f &= -2, 8 & this.f && ot(this), st();
1570
1654
  }
1571
- function be(n) {
1655
+ function ye(n) {
1572
1656
  this.x = n, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
1573
1657
  }
1574
- be.prototype.c = function() {
1658
+ ye.prototype.c = function() {
1575
1659
  var n = this.S();
1576
1660
  try {
1577
1661
  if (8 & this.f || this.x === void 0)
@@ -1582,19 +1666,19 @@ be.prototype.c = function() {
1582
1666
  n();
1583
1667
  }
1584
1668
  };
1585
- be.prototype.S = function() {
1586
- 1 & this.f && Oe(), this.f |= 1, this.f &= -9, vn(this), hn(this), ce++;
1587
- var n = N;
1588
- return N = this, Wn.bind(this, n);
1669
+ ye.prototype.S = function() {
1670
+ 1 & this.f && Oe(), this.f |= 1, this.f &= -9, yn(this), gn(this), le++;
1671
+ var n = $;
1672
+ return $ = this, Kn.bind(this, n);
1589
1673
  };
1590
- be.prototype.N = function() {
1591
- 2 & this.f || (this.f |= 2, this.o = me, me = this);
1674
+ ye.prototype.N = function() {
1675
+ 2 & this.f || (this.f |= 2, this.o = _e, _e = this);
1592
1676
  };
1593
- be.prototype.d = function() {
1677
+ ye.prototype.d = function() {
1594
1678
  this.f |= 8, 1 & this.f || ot(this);
1595
1679
  };
1596
1680
  function at(n) {
1597
- var e = new be(n);
1681
+ var e = new ye(n);
1598
1682
  try {
1599
1683
  e.c();
1600
1684
  } catch (t) {
@@ -1603,15 +1687,15 @@ function at(n) {
1603
1687
  return e.d.bind(e);
1604
1688
  }
1605
1689
  var Be, Ue;
1606
- function ue(n, e) {
1690
+ function de(n, e) {
1607
1691
  b[n] = e.bind(null, b[n] || function() {
1608
1692
  });
1609
1693
  }
1610
1694
  function De(n) {
1611
1695
  Ue && Ue(), Ue = n && n.S();
1612
1696
  }
1613
- function mn(n) {
1614
- var e = this, t = n.data, i = I(t);
1697
+ function Cn(n) {
1698
+ var e = this, t = n.data, i = M(t);
1615
1699
  i.value = t;
1616
1700
  var s = X(function() {
1617
1701
  for (var o = e.__v; o = o.__; )
@@ -1621,30 +1705,30 @@ function mn(n) {
1621
1705
  }
1622
1706
  return e.__$u.c = function() {
1623
1707
  var a;
1624
- !jt(s.peek()) && ((a = e.base) == null ? void 0 : a.nodeType) === 3 ? e.base.data = s.peek() : (e.__$f |= 1, e.setState({}));
1625
- }, fn(function() {
1708
+ !Xt(s.peek()) && ((a = e.base) == null ? void 0 : a.nodeType) === 3 ? e.base.data = s.peek() : (e.__$f |= 1, e.setState({}));
1709
+ }, bn(function() {
1626
1710
  var a = i.value.value;
1627
1711
  return a === 0 ? 0 : a === !0 ? "" : a || "";
1628
1712
  });
1629
1713
  }, []);
1630
1714
  return s.value;
1631
1715
  }
1632
- mn.displayName = "_st";
1633
- Object.defineProperties(A.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: mn }, props: { configurable: !0, get: function() {
1716
+ Cn.displayName = "_st";
1717
+ Object.defineProperties(D.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Cn }, props: { configurable: !0, get: function() {
1634
1718
  return { data: this };
1635
1719
  } }, __b: { configurable: !0, value: 1 } });
1636
- ue("__b", function(n, e) {
1720
+ de("__b", function(n, e) {
1637
1721
  if (typeof e.type == "string") {
1638
1722
  var t, i = e.props;
1639
1723
  for (var s in i)
1640
1724
  if (s !== "children") {
1641
1725
  var o = i[s];
1642
- o instanceof A && (t || (e.__np = t = {}), t[s] = o, i[s] = o.peek());
1726
+ o instanceof D && (t || (e.__np = t = {}), t[s] = o, i[s] = o.peek());
1643
1727
  }
1644
1728
  }
1645
1729
  n(e);
1646
1730
  });
1647
- ue("__r", function(n, e) {
1731
+ de("__r", function(n, e) {
1648
1732
  De();
1649
1733
  var t, i = e.__c;
1650
1734
  i && (i.__$f &= -2, (t = i.__$u) === void 0 && (i.__$u = t = function(s) {
@@ -1656,10 +1740,10 @@ ue("__r", function(n, e) {
1656
1740
  }, o;
1657
1741
  }())), Be = i, De(t), n(e);
1658
1742
  });
1659
- ue("__e", function(n, e, t, i) {
1743
+ de("__e", function(n, e, t, i) {
1660
1744
  De(), Be = void 0, n(e, t, i);
1661
1745
  });
1662
- ue("diffed", function(n, e) {
1746
+ de("diffed", function(n, e) {
1663
1747
  De(), Be = void 0;
1664
1748
  var t;
1665
1749
  if (typeof e.type == "string" && (t = e.__e)) {
@@ -1668,29 +1752,29 @@ ue("diffed", function(n, e) {
1668
1752
  var o = t.U;
1669
1753
  if (o)
1670
1754
  for (var a in o) {
1671
- var r = o[a];
1672
- r !== void 0 && !(a in i) && (r.d(), o[a] = void 0);
1755
+ var c = o[a];
1756
+ c !== void 0 && !(a in i) && (c.d(), o[a] = void 0);
1673
1757
  }
1674
1758
  else
1675
1759
  t.U = o = {};
1676
1760
  for (var u in i) {
1677
1761
  var h = o[u], p = i[u];
1678
- h === void 0 ? (h = Vn(t, u, p, s), o[u] = h) : h.o(p, s);
1762
+ h === void 0 ? (h = Qn(t, u, p, s), o[u] = h) : h.o(p, s);
1679
1763
  }
1680
1764
  }
1681
1765
  }
1682
1766
  n(e);
1683
1767
  });
1684
- function Vn(n, e, t, i) {
1685
- var s = e in n && n.ownerSVGElement === void 0, o = J(t);
1686
- return { o: function(a, r) {
1687
- o.value = a, i = r;
1768
+ function Qn(n, e, t, i) {
1769
+ var s = e in n && n.ownerSVGElement === void 0, o = G(t);
1770
+ return { o: function(a, c) {
1771
+ o.value = a, i = c;
1688
1772
  }, d: at(function() {
1689
1773
  var a = o.value.value;
1690
1774
  i[e] !== a && (i[e] = a, s ? n[e] = a : a ? n.setAttribute(e, a) : n.removeAttribute(e));
1691
1775
  }) };
1692
1776
  }
1693
- ue("unmount", function(n, e) {
1777
+ de("unmount", function(n, e) {
1694
1778
  if (typeof e.type == "string") {
1695
1779
  var t = e.__e;
1696
1780
  if (t) {
@@ -1706,13 +1790,13 @@ ue("unmount", function(n, e) {
1706
1790
  } else {
1707
1791
  var a = e.__c;
1708
1792
  if (a) {
1709
- var r = a.__$u;
1710
- r && (a.__$u = void 0, r.d());
1793
+ var c = a.__$u;
1794
+ c && (a.__$u = void 0, c.d());
1711
1795
  }
1712
1796
  }
1713
1797
  n(e);
1714
1798
  });
1715
- ue("__h", function(n, e, t, i) {
1799
+ de("__h", function(n, e, t, i) {
1716
1800
  (i < 3 || i === 9) && (e.__$f |= 2), n(e, t, i);
1717
1801
  });
1718
1802
  F.prototype.shouldComponentUpdate = function(n, e) {
@@ -1729,147 +1813,147 @@ F.prototype.shouldComponentUpdate = function(n, e) {
1729
1813
  return !0;
1730
1814
  return !1;
1731
1815
  };
1732
- function I(n) {
1816
+ function M(n) {
1733
1817
  return X(function() {
1734
- return J(n);
1818
+ return G(n);
1735
1819
  }, []);
1736
1820
  }
1737
1821
  function B(n) {
1738
1822
  var e = P(n);
1739
1823
  return e.current = n, Be.__$f |= 4, X(function() {
1740
- return fn(function() {
1824
+ return bn(function() {
1741
1825
  return e.current();
1742
1826
  });
1743
1827
  }, []);
1744
1828
  }
1745
- var qn = 0;
1746
- function c(n, e, t, i, s, o) {
1747
- var a, r, u = {};
1748
- for (r in e)
1749
- r == "ref" ? a = e[r] : u[r] = e[r];
1750
- var h = { type: n, props: u, key: t, ref: a, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --qn, __source: s, __self: o };
1829
+ var ei = 0;
1830
+ function r(n, e, t, i, s, o) {
1831
+ var a, c, u = {};
1832
+ for (c in e)
1833
+ c == "ref" ? a = e[c] : u[c] = e[c];
1834
+ var h = { type: n, props: u, key: t, ref: a, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --ei, __source: s, __self: o };
1751
1835
  if (typeof n == "function" && (a = n.defaultProps))
1752
- for (r in a)
1753
- u[r] === void 0 && (u[r] = a[r]);
1836
+ for (c in a)
1837
+ u[c] === void 0 && (u[c] = a[c]);
1754
1838
  return b.vnode && b.vnode(h), h;
1755
1839
  }
1756
- const jn = () => c("svg", {
1840
+ const ti = () => r("svg", {
1757
1841
  viewBox: "0 0 1024 1024",
1758
1842
  version: "1.1",
1759
1843
  xmlns: "http://www.w3.org/2000/svg",
1760
- children: c("path", {
1844
+ children: r("path", {
1761
1845
  d: "M843.904 783.573333 783.573333 843.904 512.042667 572.373333 240.512 843.904 180.181333 783.573333 451.712 512.042667 180.181333 240.512 240.512 180.181333 512.042667 451.712 783.573333 180.181333 843.904 240.512 572.373333 512.042667 843.904 783.573333Z"
1762
1846
  })
1763
- }), Yn = () => c("svg", {
1847
+ }), ni = () => r("svg", {
1764
1848
  className: "icon",
1765
1849
  viewBox: "0 0 1024 1024",
1766
1850
  version: "1.1",
1767
1851
  xmlns: "http://www.w3.org/2000/svg",
1768
- children: c("path", {
1852
+ children: r("path", {
1769
1853
  d: "M900.64 379.808l-263.072-256.032c-36.448-35.328-105.76-35.392-142.304 0.096l-327.04 319.904c-56.416 54.72-70.72 76.704-70.72 150.976l0 143.936c0 132.768 26.976 192 186.912 192l131.872 0c81.12 0 128.448-46.656 193.952-111.264l290.016-297.696c18.592-17.984 29.248-43.968 29.248-71.264C929.504 423.36 918.976 397.6 900.64 379.808zM323.008 786.752c-52.928 0-96-43.072-96-96s43.072-96 96-96 96 43.072 96 96S375.936 786.752 323.008 786.752z"
1770
1854
  })
1771
- }), Xn = (n) => c("svg", {
1855
+ }), ii = (n) => r("svg", {
1772
1856
  viewBox: "0 0 1024 1024",
1773
1857
  id: "send",
1774
1858
  className: n.className,
1775
1859
  version: "1.1",
1776
1860
  xmlns: "http://www.w3.org/2000/svg",
1777
- children: c("path", {
1861
+ children: r("path", {
1778
1862
  d: "M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-0.9 3.7-0.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 0.7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-0.8 4.2-2.6 5-5 1.4-4.2-0.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"
1779
1863
  })
1780
- }), Zn = () => c("svg", {
1864
+ }), si = () => r("svg", {
1781
1865
  viewBox: "0 0 1024 1024",
1782
1866
  version: "1.1",
1783
1867
  xmlns: "http://www.w3.org/2000/svg",
1784
- children: c("path", {
1868
+ children: r("path", {
1785
1869
  d: "M962 197.61H747v-60c0-55.14-44.86-100-100-100H377c-55.14 0-100 44.86-100 100v60H62c-11.05 0-20 8.95-20 20s8.95 20 20 20h60v630.57c0 66.17 53.83 120 120 120h540c66.17 0 120-53.83 120-120V237.61h60c11.05 0 20-8.95 20-20s-8.95-20-20-20zM637.34 457.66v260c0 12.01-10.72 21.63-23.06 19.77-9.84-1.48-16.94-10.25-16.94-20.2V458.09c0-9.95 7.1-18.72 16.94-20.2 12.34-1.86 23.06 7.76 23.06 19.77z m-210.68 0v260c0 11-9 20-20 20s-20-9-20-20v-260c0-11 9-20 20-20s20 9 20 20zM317 137.61c0-33.08 26.92-60 60-60h270c33.08 0 60 26.92 60 60v60H317v-60z"
1786
1870
  })
1787
- }), yt = () => c("svg", {
1871
+ }), Tt = () => r("svg", {
1788
1872
  viewBox: "0 0 1024 1024",
1789
1873
  version: "1.1",
1790
1874
  xmlns: "http://www.w3.org/2000/svg",
1791
- children: c("path", {
1875
+ children: r("path", {
1792
1876
  d: "M511.582491 63.413262C265.134543 63.413262 64.62588 263.921925 64.62588 510.369873s200.508663 446.957635 446.957635 446.957635 446.957635-200.508663 446.957635-446.957635S758.031463 63.413262 511.582491 63.413262zM509.001713 751.859903c-98.517781 0-182.467775-62.623269-214.771505-150.056598l0.327458-0.134053c-2.007727-4.036943-3.38305-8.422833-3.38305-13.237489 0-16.647145 13.494339-30.142507 30.142507-30.142507 13.389962 0 24.358781 8.877181 28.2893 20.955264l0.422625-0.172939c23.269983 65.442478 85.645612 112.503307 158.972665 112.503307 93.106538 0 168.845523-75.738985 168.845523-168.845523s-75.738985-168.845523-168.845523-168.845523c-20.432355 0-39.874149 3.980661-58.013275 10.66899l21.248953 40.742936c2.486634 2.677992 4.0175 6.2831 4.0175 10.243295 0 8.417717-8.404414 14.921851-15.365966 15.07023-0.102331 0-0.206708 0-0.309038 0-0.220011 0-0.427742 0-0.647753-0.013303l-150.579507-6.463202c-5.372358-0.234337-10.229992-3.310396-12.716626-8.093329-2.486634-4.76963-2.236947-10.509355 0.647753-15.055904l80.890308-127.179564c2.8847-4.533246 8.006348-7.151887 13.365402-6.960529 5.372358 0.234337 10.227945 3.312442 12.71458 8.095375l18.580171 35.625382c26.629497-10.855232 55.683207-16.963347 86.168522-16.963347 126.338407 0 229.130537 102.791108 229.130537 229.130537S635.340119 751.859903 509.001713 751.859903z"
1793
1877
  })
1794
- }), Gn = () => c("svg", {
1878
+ }), oi = () => r("svg", {
1795
1879
  viewBox: "0 0 1024 1024",
1796
1880
  version: "1.1",
1797
1881
  xmlns: "http://www.w3.org/2000/svg",
1798
- children: c("path", {
1882
+ children: r("path", {
1799
1883
  d: "M891.072 822.144V167.36a34.432 34.432 0 0 0-34.432-34.432H201.856C201.856 94.848 232.704 64 270.784 64h620.288C929.152 64 960 94.848 960 132.928v620.288c0 38.08-30.848 68.928-68.928 68.928z m-68.928-551.36v620.288c0 38.08-30.848 68.928-68.928 68.928H132.928A68.928 68.928 0 0 1 64 891.072V270.784c0-38.08 30.848-68.928 68.928-68.928h620.288c38.08 0 68.928 30.848 68.928 68.928z m-137.856 137.856H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z m0 206.72H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z"
1800
1884
  })
1801
- }), Jn = () => c("svg", {
1885
+ }), ai = () => r("svg", {
1802
1886
  viewBox: "0 0 1024 1024",
1803
1887
  version: "1.1",
1804
1888
  xmlns: "http://www.w3.org/2000/svg",
1805
- children: c("path", {
1889
+ children: r("path", {
1806
1890
  d: "M547.4 197.4v46l200.3 0.1L546.1 444l32.4 32.6 201.9-200.7v200.9h46V197.5zM471.4 584.4l-32.6-32.6L243.6 747V547.9h-46v278.7h279v-46H275z"
1807
1891
  })
1808
- }), Kn = () => c("svg", {
1892
+ }), ri = () => r("svg", {
1809
1893
  viewBox: "0 0 1024 1024",
1810
1894
  version: "1.1",
1811
1895
  xmlns: "http://www.w3.org/2000/svg",
1812
- children: c("path", {
1896
+ children: r("path", {
1813
1897
  d: "M544 480V282.944h52.224l0.064 107.968L763.072 224l36.928 36.928-166.976 166.976 108.032-0.128V480H544zM260.928 800l-36.928-36.928 166.912-166.784-107.968-0.064V544H480v197.056h-52.224l0.064-107.968L260.928 800z"
1814
1898
  })
1815
- }), Qn = () => c("svg", {
1899
+ }), ci = () => r("svg", {
1816
1900
  viewBox: "0 0 1024 1024",
1817
1901
  version: "1.1",
1818
1902
  xmlns: "http://www.w3.org/2000/svg",
1819
- children: c("path", {
1903
+ children: r("path", {
1820
1904
  d: "M960 544H64a32 32 0 1 1 0-64h896a32 32 0 1 1 0 64"
1821
1905
  })
1822
- }), ei = () => c("svg", {
1906
+ }), li = () => r("svg", {
1823
1907
  viewBox: "0 0 1024 1024",
1824
1908
  version: "1.1",
1825
1909
  xmlns: "http://www.w3.org/2000/svg",
1826
- children: [c("path", {
1910
+ children: [r("path", {
1827
1911
  d: "M481.0752 263.3728l50.9952 1.024 1.8432-105.8816-50.9952-0.8192z"
1828
- }), c("path", {
1912
+ }), r("path", {
1829
1913
  d: "M486.441426 180.895362a66.56 66.56 0 1 0 42.091944-126.290153 66.56 66.56 0 1 0-42.091944 126.290153Z"
1830
- }), c("path", {
1914
+ }), r("path", {
1831
1915
  d: "M138.8544 664.3712c-52.8384 0-95.8464-43.008-95.8464-95.8464s43.008-95.8464 95.8464-95.8464M880.0256 472.6784c52.8384 0 95.8464 43.008 95.8464 95.8464s-43.008 95.8464-95.8464 95.8464"
1832
- }), c("path", {
1916
+ }), r("path", {
1833
1917
  d: "M507.4944 220.5696c-220.16 0-398.7456 162.816-398.7456 363.7248s178.5856 363.7248 398.7456 363.7248 398.7456-162.816 398.7456-363.7248-178.5856-363.7248-398.7456-363.7248z m0 559.9232c-166.2976 0-301.2608-100.5568-301.2608-224.4608s134.9632-224.4608 301.2608-224.4608S808.7552 432.128 808.7552 556.032 673.792 780.4928 507.4944 780.4928z"
1834
- }), c("path", {
1918
+ }), r("path", {
1835
1919
  d: "M319.6928 556.032a47.9232 38.912 90 1 0 77.824 0 47.9232 38.912 90 1 0-77.824 0Z"
1836
- }), c("path", {
1920
+ }), r("path", {
1837
1921
  d: "M617.472 556.032a47.9232 38.912 90 1 0 77.824 0 47.9232 38.912 90 1 0-77.824 0Z"
1838
1922
  })]
1839
- }), ti = () => c("svg", {
1923
+ }), ui = () => r("svg", {
1840
1924
  viewBox: "0 0 18 18",
1841
1925
  fill: "none",
1842
1926
  xmlns: "http://www.w3.org/2000/svg",
1843
- children: [c("path", {
1927
+ children: [r("path", {
1844
1928
  d: "M5.856 17.121a.979.979 0 0 1-.327-.06.839.839 0 0 1-.283-.177.739.739 0 0 1-.187-.255.724.724 0 0 1-.07-.303l-.02-1.609a4.663 4.663 0 0 1-1.446-.455 4.252 4.252 0 0 1-.637-.401c-.199-.146-.385-.31-.553-.492a4.442 4.442 0 0 1-.45-.577 4.303 4.303 0 0 1-.327-.637 3.823 3.823 0 0 1-.206-.686 3.729 3.729 0 0 1-.064-.704V6.478c0-.261.025-.516.077-.771a4.43 4.43 0 0 1 .244-.747 4.062 4.062 0 0 1 .932-1.28c.2-.183.418-.347.65-.493.23-.145.482-.267.739-.364a4.21 4.21 0 0 1 .81-.225c.27-.054.553-.078.835-.078H8.55c.103 0 .2.018.29.054a.7.7 0 0 1 .411.376.667.667 0 0 1-.161.766.736.736 0 0 1-.25.151.764.764 0 0 1-.29.055H5.573c-.186 0-.366.012-.54.049-.18.03-.353.079-.52.145-.167.061-.328.14-.482.237-.148.091-.29.2-.418.316a2.897 2.897 0 0 0-.347.388c-.097.14-.187.286-.257.444a2.473 2.473 0 0 0-.206.977v4.287c0 .17.013.333.051.503a2.549 2.549 0 0 0 .772 1.33 2.721 2.721 0 0 0 .913.559c.167.066.347.115.527.152.18.03.36.048.546.048a.904.904 0 0 1 .61.23.848.848 0 0 1 .194.262.84.84 0 0 1 .07.303l.007.99 1.915-1.293a2.877 2.877 0 0 1 1.64-.492h2.372c.186 0 .366-.018.54-.048.18-.03.353-.08.52-.146.168-.067.329-.146.483-.237.148-.091.29-.2.418-.316.128-.121.244-.249.347-.388a2.8 2.8 0 0 0 .257-.444 2.47 2.47 0 0 0 .206-.977V8.585a.646.646 0 0 1 .225-.492.679.679 0 0 1 .244-.152.814.814 0 0 1 .585 0c.09.03.174.085.244.152a.657.657 0 0 1 .225.492V10.8c0 .261-.032.516-.083.771a4.192 4.192 0 0 1-.245.74c-.109.244-.244.468-.398.687a3.735 3.735 0 0 1-.534.6c-.2.183-.418.347-.65.493a4.134 4.134 0 0 1-.738.364 4.7 4.7 0 0 1-.81.225c-.27.054-.553.079-.836.079h-1.877c-.604 0-1.144.164-1.633.491l-2.54 1.713a.913.913 0 0 1-.514.157z",
1845
1929
  fill: "currentColor"
1846
- }), c("path", {
1930
+ }), r("path", {
1847
1931
  d: "M15.866 4.125h-4.174c-.41 0-.741.313-.741.7 0 .387.332.7.741.7h4.174c.41 0 .742-.313.742-.7 0-.387-.332-.7-.742-.7z",
1848
1932
  fill: "currentColor"
1849
- }), c("path", {
1933
+ }), r("path", {
1850
1934
  d: "M14.537 2.932c0-.396-.34-.717-.759-.717s-.758.32-.758.717v3.786c0 .396.34.717.758.717.42 0 .76-.321.76-.717V2.932z",
1851
1935
  fill: "currentColor"
1852
1936
  })]
1853
- }), ni = () => c("svg", {
1937
+ }), di = () => r("svg", {
1854
1938
  viewBox: "64 64 896 896",
1855
1939
  focusable: "false",
1856
1940
  width: "1em",
1857
1941
  height: "1em",
1858
1942
  fill: "currentColor",
1859
1943
  "aria-hidden": "true",
1860
- children: c("path", {
1944
+ children: r("path", {
1861
1945
  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"
1862
1946
  })
1863
- }), ii = () => c("svg", {
1947
+ }), hi = () => r("svg", {
1864
1948
  fill: "currentColor",
1865
1949
  viewBox: "0 0 1000 1000",
1866
1950
  xmlns: "http://www.w3.org/2000/svg",
1867
1951
  xmlnsXlink: "http://www.w3.org/1999/xlink",
1868
1952
  children: Array.from({
1869
1953
  length: 4
1870
- }).map((r, u) => {
1871
- const p = u * (146.66666666666666 + 140), l = 1e3 / 2 - 250 / 2, v = 1e3 / 2 - 500 / 2;
1872
- return c("rect", {
1954
+ }).map((c, u) => {
1955
+ const p = u * (146.66666666666666 + 140), l = 1e3 / 2 - 250 / 2, m = 1e3 / 2 - 500 / 2;
1956
+ return r("rect", {
1873
1957
  fill: "currentColor",
1874
1958
  rx: 70,
1875
1959
  ry: 70,
@@ -1877,16 +1961,16 @@ const jn = () => c("svg", {
1877
1961
  width: 140,
1878
1962
  x: p,
1879
1963
  y: l,
1880
- children: [c("animate", {
1964
+ children: [r("animate", {
1881
1965
  attributeName: "height",
1882
1966
  values: "250; 500; 250",
1883
1967
  keyTimes: "0; 0.5; 1",
1884
1968
  dur: "".concat(0.8, "s"),
1885
1969
  begin: "".concat(0.8 / 4 * u, "s"),
1886
1970
  repeatCount: "indefinite"
1887
- }), c("animate", {
1971
+ }), r("animate", {
1888
1972
  attributeName: "y",
1889
- values: "".concat(l, "; ").concat(v, "; ").concat(l),
1973
+ values: "".concat(l, "; ").concat(m, "; ").concat(l),
1890
1974
  keyTimes: "0; 0.5; 1",
1891
1975
  dur: "".concat(0.8, "s"),
1892
1976
  begin: "".concat(0.8 / 4 * u, "s"),
@@ -1894,36 +1978,36 @@ const jn = () => c("svg", {
1894
1978
  })]
1895
1979
  }, u);
1896
1980
  })
1897
- }), si = (n) => c("svg", {
1981
+ }), pi = (n) => r("svg", {
1898
1982
  className: n.className,
1899
1983
  onClick: n.onClick,
1900
1984
  viewBox: "0 0 1024 1024",
1901
1985
  version: "1.1",
1902
1986
  xmlns: "http://www.w3.org/2000/svg",
1903
- children: c("path", {
1987
+ children: r("path", {
1904
1988
  d: "M128 384a128 128 0 1 1 0 256 128 128 0 0 1 0-256z m768 0a128 128 0 1 1 0 256 128 128 0 0 1 0-256z m-372.4288 0a128 128 0 1 1 0 256 128 128 0 0 1 0-256z"
1905
1989
  })
1906
- }), oi = (n) => c("svg", {
1990
+ }), fi = (n) => r("svg", {
1907
1991
  className: n.className,
1908
1992
  viewBox: "0 0 1024 1024",
1909
1993
  version: "1.1",
1910
1994
  xmlns: "http://www.w3.org/2000/svg",
1911
- children: c("path", {
1995
+ children: r("path", {
1912
1996
  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"
1913
1997
  })
1914
- }), _n = () => c("svg", {
1998
+ }), Tn = () => r("svg", {
1915
1999
  className: "icon",
1916
2000
  viewBox: "0 0 1024 1024",
1917
2001
  version: "1.1",
1918
2002
  xmlns: "http://www.w3.org/2000/svg",
1919
- children: c("path", {
2003
+ children: r("path", {
1920
2004
  d: "M972.657609 209.348408C987.158609 209.36839 998.930114 197.571202 998.949999 182.99865 998.969882 168.426097 987.230618 156.59651 972.729617 156.576528L32.457975 155.280806C17.956974 155.260823 6.18547 167.058012 6.165585 181.630564 6.1457 196.203116 17.884965 208.032703 32.385966 208.052686L972.657609 209.348408ZM180.466902 992.356169 180.466902 1019.014859 206.993296 1018.74074 833.361858 1012.267947 859.348284 1011.999407 859.348284 985.883377 859.348284 289.397297C859.348284 274.824732 847.59289 263.011332 833.091874 263.011332 818.590859 263.011332 806.835465 274.824732 806.835465 289.397297L806.835465 985.883377 832.82189 959.498805 206.453329 965.971599 232.979723 992.356169 232.979723 282.67005C232.979723 268.097483 221.224329 256.284085 206.723313 256.284085 192.222298 256.284085 180.466902 268.097483 180.466902 282.67005L180.466902 992.356169ZM656.410257 847.079027C656.410257 861.651593 668.165651 873.464992 682.666667 873.464992 697.167682 873.464992 708.923076 861.651593 708.923076 847.079027L708.923076 372.131659C708.923076 357.559091 697.167682 345.745694 682.666667 345.745694 668.165651 345.745694 656.410257 357.559091 656.410257 372.131659L656.410257 847.079027ZM341.333333 847.079027C341.333333 861.651593 353.08873 873.464992 367.589743 873.464992 382.090758 873.464992 393.846155 861.651593 393.846155 847.079027L393.846155 372.131659C393.846155 357.559091 382.090758 345.745694 367.589743 345.745694 353.08873 345.745694 341.333333 357.559091 341.333333 372.131659L341.333333 847.079027ZM498.871795 847.079027C498.871795 861.651593 510.627189 873.464992 525.128205 873.464992 539.62922 873.464992 551.384614 861.651593 551.384614 847.079027L551.384614 372.131659C551.384614 357.559091 539.62922 345.745694 525.128205 345.745694 510.627189 345.745694 498.871795 357.559091 498.871795 372.131659L498.871795 847.079027ZM392.147755 116.721777C392.147755 102.063669 403.758665 90.363507 418.40134 90.363507L622.925796 90.363507C637.408947 90.363507 649.179381 102.1619 649.179381 116.549585L649.179381 171.644875 701.692203 171.644875 701.692203 116.549585C701.692203 72.986607 666.38105 37.591577 622.925796 37.591577L418.40134 37.591577C374.724427 37.591577 339.634933 72.950804 339.634933 116.721777L339.634933 165.310801 392.147755 165.310801 392.147755 116.721777Z"
1921
2005
  })
1922
- }), ai = (n) => c("svg", {
2006
+ }), mi = (n) => r("svg", {
1923
2007
  xmlns: "http://www.w3.org/2000/svg",
1924
2008
  className: n.className,
1925
2009
  viewBox: "0 0 512 512",
1926
- children: c("path", {
2010
+ children: r("path", {
1927
2011
  fill: "none",
1928
2012
  stroke: "currentColor",
1929
2013
  strokeLinecap: "round",
@@ -1931,20 +2015,20 @@ const jn = () => c("svg", {
1931
2015
  strokeWidth: "48",
1932
2016
  d: "M112 184l144 144 144-144"
1933
2017
  })
1934
- }), We = (n) => c("svg", {
2018
+ }), We = (n) => r("svg", {
1935
2019
  xmlns: "http://www.w3.org/2000/svg",
1936
2020
  className: "".concat(n.className, " icon"),
1937
2021
  viewBox: "0 0 512 512",
1938
- children: c("path", {
2022
+ children: r("path", {
1939
2023
  d: "M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm108.25 138.29l-134.4 160a16 16 0 01-12 5.71h-.27a16 16 0 01-11.89-5.3l-57.6-64a16 16 0 1123.78-21.4l45.29 50.32 122.59-145.91a16 16 0 0124.5 20.58z"
1940
2024
  })
1941
- }), Ve = (n) => c("svg", {
2025
+ }), je = (n) => r("svg", {
1942
2026
  className: n.className,
1943
2027
  width: "16",
1944
2028
  height: "16",
1945
2029
  viewBox: "0 0 50 50",
1946
2030
  xmlns: "http://www.w3.org/2000/svg",
1947
- children: c("circle", {
2031
+ children: r("circle", {
1948
2032
  cx: "25",
1949
2033
  cy: "25",
1950
2034
  r: "20",
@@ -1953,7 +2037,7 @@ const jn = () => c("svg", {
1953
2037
  fill: "none",
1954
2038
  strokeDasharray: "31.415, 31.415",
1955
2039
  strokeLinecap: "round",
1956
- children: c("animateTransform", {
2040
+ children: r("animateTransform", {
1957
2041
  attributeName: "transform",
1958
2042
  type: "rotate",
1959
2043
  from: "0 25 25",
@@ -1962,52 +2046,52 @@ const jn = () => c("svg", {
1962
2046
  repeatCount: "indefinite"
1963
2047
  })
1964
2048
  })
1965
- }), ri = () => c("svg", {
2049
+ }), vi = () => r("svg", {
1966
2050
  className: "icon",
1967
2051
  viewBox: "0 0 1024 1024",
1968
2052
  version: "1.1",
1969
2053
  xmlns: "http://www.w3.org/2000/svg",
1970
2054
  width: "18",
1971
2055
  height: "18",
1972
- children: c("path", {
2056
+ children: r("path", {
1973
2057
  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"
1974
2058
  })
1975
- }), gn = () => c("svg", {
2059
+ }), xn = () => r("svg", {
1976
2060
  className: "icon",
1977
2061
  viewBox: "0 0 1024 1024",
1978
2062
  version: "1.1",
1979
2063
  xmlns: "http://www.w3.org/2000/svg",
1980
2064
  width: "18",
1981
2065
  height: "18",
1982
- children: [c("path", {
2066
+ children: [r("path", {
1983
2067
  d: "M842.666667 285.866667l-187.733334-187.733334c-14.933333-14.933333-32-21.333333-53.333333-21.333333H234.666667C194.133333 74.666667 160 108.8 160 149.333333v725.333334c0 40.533333 34.133333 74.666667 74.666667 74.666666h554.666666c40.533333 0 74.666667-34.133333 74.666667-74.666666V337.066667c0-19.2-8.533333-38.4-21.333333-51.2z m-44.8 44.8c-2.133333 2.133333-4.266667 0-8.533334 0h-170.666666c-6.4 0-10.666667-4.266667-10.666667-10.666667V149.333333c0-2.133333 0-6.4-2.133333-8.533333 0 0 2.133333 0 2.133333 2.133333l189.866667 187.733334z m-8.533334 554.666666H234.666667c-6.4 0-10.666667-4.266667-10.666667-10.666666V149.333333c0-6.4 4.266667-10.666667 10.666667-10.666666h311.466666c-2.133333 4.266667-2.133333 6.4-2.133333 10.666666v170.666667c0 40.533333 34.133333 74.666667 74.666667 74.666667h170.666666c4.266667 0 6.4 0 10.666667-2.133334V874.666667c0 6.4-4.266667 10.666667-10.666667 10.666666z",
1984
2068
  fill: "currentColor"
1985
- }), c("path", {
2069
+ }), r("path", {
1986
2070
  d: "M640 693.333333H341.333333c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h298.666667c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32zM640 522.666667H341.333333c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h298.666667c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32zM341.333333 416h85.333334c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32h-85.333334c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32z",
1987
2071
  fill: "currentColor"
1988
2072
  })]
1989
- }), ci = () => c("svg", {
2073
+ }), _i = () => r("svg", {
1990
2074
  className: "icon",
1991
2075
  viewBox: "0 0 1024 1024",
1992
2076
  version: "1.1",
1993
2077
  xmlns: "http://www.w3.org/2000/svg",
1994
2078
  width: "18",
1995
2079
  height: "18",
1996
- children: c("path", {
2080
+ children: r("path", {
1997
2081
  d: "M557.248 511.68l135.776-135.744-45.248-45.28L512 466.432l-135.776-135.776-45.248 45.28 135.776 135.744-135.776 135.776 45.248 45.248L512 556.928l135.776 135.776 45.248-45.248-135.776-135.776zM512 64c247.136 0 448 200.864 448 448s-200.864 448-448 448S64 759.136 64 512 264.864 64 512 64z",
1998
2082
  fill: "currentColor"
1999
2083
  })
2000
- }), li = () => c("svg", {
2084
+ }), gi = () => r("svg", {
2001
2085
  className: "icon",
2002
2086
  viewBox: "0 0 1024 1024",
2003
2087
  version: "1.1",
2004
2088
  xmlns: "http://www.w3.org/2000/svg",
2005
2089
  width: "18",
2006
2090
  height: "18",
2007
- children: c("path", {
2091
+ children: r("path", {
2008
2092
  d: "M512.43945313 904.51953125c-6.06445313 0-12.12890625-1.58203125-17.57812501-4.74609375L136.70703125 689.71484375c-10.63476563-6.24023438-17.13867188-17.66601563-17.13867188-29.97070313s6.50390625-23.73046875 17.13867188-29.97070312l76.37695313-44.91210938L136.97070312 540.125c-10.63476563-6.24023438-17.13867188-17.66601563-17.13867187-29.97070313s6.50390625-23.73046875 17.13867188-29.97070312l73.38867187-43.15429688-73.125-42.890625C126.51171875 387.81054687 120.0078125 376.38476562 120.0078125 364.08007812c0-12.3046875 6.50390625-23.73046875 17.13867188-29.97070312L495.828125 122.99609375c10.8984375-6.41601563 24.34570313-6.41601563 35.24414063 0l358.15429687 210.05859375c10.63476563 6.24023438 17.13867188 17.66601563 17.13867188 29.97070313s-6.50390625 23.73046875-17.13867188 29.97070312l-73.38867188 43.15429688 73.12500001 42.890625c10.63476563 6.24023438 17.13867188 17.66601563 17.13867187 29.97070312s-6.50390625 23.73046875-17.13867187 29.97070313L812.5859375 583.89453125l76.11328125 44.6484375c10.63476563 6.24023438 17.13867188 17.66601563 17.13867188 29.97070313s-6.50390625 23.73046875-17.13867188 29.97070312l-358.59375 211.2890625c-5.44921875 3.1640625-11.6015625 4.74609375-17.66601563 4.74609375zM223.015625 659.65625l289.42382813 169.8046875 290.12695312-170.77148438-58.44726563-34.27734374L530.28125 750.18359375a34.67285156 34.67285156 0 0 1-35.24414063 0L281.7265625 625.02734375 223.015625 659.65625z m76.90429688-104.58984375l212.69531249 124.8046875 290.12695313-170.77148438-55.546875-32.60742187-216.65039063 127.6171875a34.67285156 34.67285156 0 0 1-35.24414062 0L279.00195312 477.28320312l-55.81054687 32.78320313 75.49804688 44.296875c0.43945313 0.26367188 0.79101563 0.52734375 1.23046874 0.703125z m-2.81250001-147.83203125l215.68359376 126.5625 216.12304687-127.17773438c0.3515625-0.26367188 0.703125-0.43945313 1.0546875-0.61523437l72.86132813-42.890625-289.33593751-169.8046875-290.12695312 170.68359375 72.59765625 42.62695313c0.43945313 0.17578125 0.79101563 0.43945313 1.14257813 0.61523437z"
2009
2093
  })
2010
- }), ui = (n) => c("svg", {
2094
+ }), wi = (n) => r("svg", {
2011
2095
  className: n.className,
2012
2096
  id: "stop",
2013
2097
  viewBox: "0 0 1025 1024",
@@ -2015,18 +2099,18 @@ const jn = () => c("svg", {
2015
2099
  xmlns: "http://www.w3.org/2000/svg",
2016
2100
  width: "18",
2017
2101
  height: "18",
2018
- children: [c("path", {
2102
+ children: [r("path", {
2019
2103
  d: "M512.268258 1022.835842c-68.658678 0-135.399619-13.564433-198.369591-40.316509-60.752236-25.809077-115.373446-62.712976-162.346233-109.685763-46.971763-46.971763-83.875662-101.592974-109.685763-162.346233C15.115619 647.517366 1.551186 580.777449 1.551186 512.118771S15.115619 376.719151 41.866671 313.74918c25.810101-60.752236 62.714-115.373446 109.685763-162.346233 46.972787-46.971763 101.593997-83.875662 162.346233-109.685763 62.969971-26.751052 129.710912-40.315485 198.369591-40.315485s135.398595 13.564433 198.368567 40.315485c60.752236 25.810101 115.373446 62.714 162.346233 109.685763 46.971763 46.972787 83.875662 101.593997 109.685763 162.346233 26.752076 62.969971 40.316509 129.710912 40.316509 198.369591s-13.564433 135.398595-40.316509 198.368567c-25.809077 60.75326-62.712976 115.37447-109.685763 162.346233-46.971763 46.972787-101.592974 83.876686-162.346233 109.685763C647.666853 1009.27141 580.925912 1022.835842 512.268258 1022.835842zM512.268258 50.548195c-62.018782 0-122.293887 12.247716-179.152287 36.403219-54.923257 23.333323-104.317532 56.709936-146.810821 99.204249s-75.870926 91.888588-99.204249 146.810821c-24.155503 56.8584-36.403219 117.133505-36.403219 179.152287 0 62.017758 12.247716 122.292863 36.403219 179.152287 23.333323 54.923257 56.709936 104.317532 99.204249 146.811845 42.493289 42.493289 91.888588 75.870926 146.810821 99.204249 56.8584 24.155503 117.133505 36.403219 179.152287 36.403219 62.017758 0 122.292863-12.247716 179.152287-36.403219 54.923257-23.333323 104.317532-56.71096 146.811845-99.204249 42.493289-42.494313 75.870926-91.888588 99.204249-146.811845 24.155503-56.8584 36.403219-117.133505 36.403219-179.152287s-12.247716-122.293887-36.403219-179.152287c-23.334347-54.923257-56.71096-104.317532-99.205273-146.810821-42.493289-42.493289-91.887565-75.870926-146.810821-99.204249C634.561121 62.795911 574.286016 50.548195 512.268258 50.548195z",
2020
2104
  fill: "currentColor"
2021
- }), c("path", {
2105
+ }), r("path", {
2022
2106
  d: "M655.434047 694.244421 367.12637 694.244421c-21.046987 0-38.170445-17.123458-38.170445-38.170445L328.955925 367.766298c0-21.046987 17.123458-38.170445 38.170445-38.170445l288.307678 0c21.048011 0 38.170445 17.123458 38.170445 38.170445l0 288.307678C693.604492 677.120962 676.482058 694.244421 655.434047 694.244421zM380.150191 643.050154l262.260035 0L642.410226 380.79012 380.150191 380.79012 380.150191 643.050154z",
2023
2107
  fill: "currentColor"
2024
2108
  })]
2025
- }), di = (n) => c("svg", {
2109
+ }), bi = (n) => r("svg", {
2026
2110
  xmlns: "http://www.w3.org/2000/svg",
2027
2111
  className: n.className,
2028
2112
  viewBox: "0 0 512 512",
2029
- children: c("path", {
2113
+ children: r("path", {
2030
2114
  fill: "none",
2031
2115
  stroke: "currentColor",
2032
2116
  strokeLinecap: "round",
@@ -2034,41 +2118,41 @@ const jn = () => c("svg", {
2034
2118
  strokeWidth: "48",
2035
2119
  d: "M112 268l144 144 144-144M256 392V100"
2036
2120
  })
2037
- }), hi = () => c("svg", {
2121
+ }), yi = () => r("svg", {
2038
2122
  viewBox: "0 0 1024 1024",
2039
2123
  version: "1.1",
2040
2124
  xmlns: "http://www.w3.org/2000/svg",
2041
2125
  width: "18",
2042
2126
  height: "18",
2043
- children: [c("path", {
2127
+ children: [r("path", {
2044
2128
  d: "M394.688 126.208a32 32 0 0 1 32-32h170.688a32 32 0 0 1 32 32v138.624h288a32 32 0 0 1 32 32v170.688a32 32 0 0 1-32 32H106.688a32 32 0 0 1-32-32V296.832a32 32 0 0 1 32-32h288V126.208z m64 32v138.624a32 32 0 0 1-32 32h-288v106.688h746.688V328.832h-288a32 32 0 0 1-32-32V158.208H458.688z"
2045
- }), c("path", {
2129
+ }), r("path", {
2046
2130
  d: "M138.688 469.376a32 32 0 0 1 32-32h682.688a32 32 0 0 1 32 32v384a32 32 0 0 1-32 32H170.688a32 32 0 0 1-32-32v-384z m64 32v320h618.688v-320H202.688z"
2047
- }), c("path", {
2131
+ }), r("path", {
2048
2132
  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"
2049
2133
  })]
2050
- }), pi = () => c("svg", {
2134
+ }), Ci = () => r("svg", {
2051
2135
  viewBox: "0 0 1024 1024",
2052
2136
  version: "1.1",
2053
2137
  xmlns: "http://www.w3.org/2000/svg",
2054
2138
  width: "18",
2055
2139
  height: "18",
2056
- children: c("path", {
2140
+ children: r("path", {
2057
2141
  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"
2058
2142
  })
2059
- }), fi = () => c("svg", {
2143
+ }), Ti = () => r("svg", {
2060
2144
  version: "1.1",
2061
2145
  className: "icon",
2062
2146
  viewBox: "0 0 1024 1024",
2063
2147
  xmlns: "http://www.w3.org/2000/svg",
2064
- children: c("path", {
2148
+ children: r("path", {
2065
2149
  d: "M627.498667 55.168l170.666666 170.666667a42.624 42.624 0 0 1 0 60.330666l-469.333333 469.333334A42.538667 42.538667 0 0 1 298.666667 768H128a42.666667 42.666667 0 0 1-42.666667-42.666667v-170.666666c0-11.306667 4.48-22.186667 12.501334-30.165334l469.333333-469.333333a42.624 42.624 0 0 1 60.330667 0zM896 896a42.666667 42.666667 0 0 1 0 85.333333H128a42.666667 42.666667 0 0 1 0-85.333333h768zM597.333333 145.664l-426.666666 426.666667V682.666667h110.336l426.666666-426.666667L597.333333 145.664z"
2066
2150
  })
2067
- }), vi = (n) => c("svg", {
2151
+ }), xi = (n) => r("svg", {
2068
2152
  xmlns: "http://www.w3.org/2000/svg",
2069
2153
  className: n.className,
2070
2154
  viewBox: "0 0 512 512",
2071
- children: c("path", {
2155
+ children: r("path", {
2072
2156
  fill: "none",
2073
2157
  stroke: "currentColor",
2074
2158
  strokeLinecap: "round",
@@ -2076,137 +2160,311 @@ const jn = () => c("svg", {
2076
2160
  strokeWidth: "48",
2077
2161
  d: "M184 112l144 144-144 144"
2078
2162
  })
2079
- }), mi = () => c("svg", {
2163
+ }), Si = () => r("svg", {
2080
2164
  className: "icon",
2081
2165
  viewBox: "0 0 1024 1024",
2082
2166
  version: "1.1",
2083
2167
  xmlns: "http://www.w3.org/2000/svg",
2084
- children: c("path", {
2168
+ children: r("path", {
2085
2169
  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"
2086
2170
  })
2087
2171
  });
2088
- const _i = (n) => {
2172
+ const ki = (n) => {
2089
2173
  const {
2090
2174
  items: e
2091
- } = n, t = I([]), i = new M("chat-thought-chain"), s = I([]);
2092
- D(() => {
2093
- s.value = e.filter((a) => a.description), s.value.length > 0 && s.value.forEach((a, r) => {
2094
- a.done && (t.value = [...t.value, r]);
2175
+ } = n, t = M([]), i = new k("chat-thought-chain"), s = M([]);
2176
+ I(() => {
2177
+ s.value = e.filter((a) => a.description), s.value.length > 0 && s.value.forEach((a, c) => {
2178
+ a.done && (t.value = [...t.value, c]);
2095
2179
  });
2096
2180
  }, [e]);
2097
2181
  const o = (a) => {
2098
- t.value.includes(a) ? t.value = t.value.filter((r) => r !== a) : t.value = [...t.value, a];
2182
+ t.value.includes(a) ? t.value = t.value.filter((c) => c !== a) : t.value = [...t.value, a];
2099
2183
  };
2100
- return s.value.length === 0 ? null : c("div", {
2184
+ return s.value.length === 0 ? null : r("div", {
2101
2185
  className: "".concat(i.b(), " ").concat(i.is("single", s.value.length === 1)),
2102
- children: s.value.map((a, r) => {
2186
+ children: s.value.map((a, c) => {
2103
2187
  if (!a.description)
2104
2188
  return;
2105
- const u = t.value.includes(r);
2106
- return c("div", {
2189
+ const u = t.value.includes(c);
2190
+ return r("div", {
2107
2191
  className: "".concat(i.e("item"), " ").concat(i.is("collapsed", u)),
2108
- children: [c("div", {
2192
+ children: [r("div", {
2109
2193
  className: i.e("item-icon"),
2110
- children: a.icon || c("span", {
2111
- children: r
2194
+ children: a.icon || r("span", {
2195
+ children: c
2112
2196
  })
2113
- }), c("div", {
2197
+ }), r("div", {
2114
2198
  className: i.e("item-content"),
2115
- children: [c("div", {
2199
+ children: [r("div", {
2116
2200
  className: i.e("item-title"),
2117
- onClick: () => o(r),
2118
- children: [a.title, c(ai, {
2201
+ onClick: () => o(c),
2202
+ children: [a.title, r(mi, {
2119
2203
  className: i.e("icon")
2120
2204
  })]
2121
- }), c("div", {
2205
+ }), r("div", {
2122
2206
  className: i.e("item-description"),
2123
2207
  children: a.description
2124
2208
  })]
2125
2209
  })]
2126
- }, r);
2210
+ }, c);
2127
2211
  })
2128
2212
  });
2129
2213
  };
2130
- const gi = (n) => {
2214
+ const Ni = (n) => {
2131
2215
  const {
2132
2216
  items: e,
2133
2217
  onItemClick: t
2134
2218
  } = n, i = (o, a) => {
2135
2219
  t == null || t(o, a);
2136
- }, s = new M("chat-suggestions");
2137
- return c("div", {
2220
+ }, s = new k("chat-suggestions");
2221
+ return r("div", {
2138
2222
  className: "".concat(s.b()),
2139
- children: e.map((o, a) => c("div", {
2223
+ children: e.map((o, a) => r("div", {
2140
2224
  className: "".concat(s.e("item"), " ").concat(s.is("action", o.type === "action")),
2141
- onClick: (r) => i(o, r),
2225
+ onClick: (c) => i(o, c),
2142
2226
  title: o.metadata.content_name,
2143
- children: [o.metadata.content_name, c(vi, {
2227
+ children: [o.metadata.content_name, r(xi, {
2144
2228
  className: "".concat(s.e("item-icon"))
2145
2229
  })]
2146
2230
  }, a))
2147
2231
  });
2148
2232
  };
2149
- const te = new M("markdown-message"), wi = (n) => {
2233
+ const $i = (n) => {
2234
+ const e = new k("chat-tool-call-item"), t = M(!1), i = M(!1);
2235
+ let s;
2236
+ const o = ce(), a = () => {
2237
+ t.value = !t.value, u("code-block-".concat(o), n.item);
2238
+ }, c = (l) => {
2239
+ l.stopPropagation(), s && clearTimeout(s), i.value = !0, navigator.clipboard.writeText(JSON.stringify(n.item, void 0, 2)), window.ibiz.message.success("已复制"), s = setTimeout(() => {
2240
+ i.value = !1;
2241
+ }, 2e3);
2242
+ };
2243
+ I(() => () => {
2244
+ s && clearTimeout(s);
2245
+ }, []);
2246
+ const u = (l, m, _ = 0) => {
2247
+ const d = document.getElementById(l);
2248
+ if (!d || (d.innerHTML = "", !t.value))
2249
+ return;
2250
+ h(m, _).forEach((v, w) => {
2251
+ const g = document.createElement("div");
2252
+ g.className = "code-line";
2253
+ const C = document.createElement("span");
2254
+ C && (C.className = "line-number", C.textContent = (w + 1).toString(), g.appendChild(C), g.innerHTML += v, d.appendChild(g));
2255
+ });
2256
+ }, h = (l, m = 0) => {
2257
+ const _ = " ".repeat(m), d = [];
2258
+ if (Array.isArray(l)) {
2259
+ if (l.length === 0)
2260
+ return ["".concat(_, '<span class="array">[]</span>')];
2261
+ d.push("".concat(_, '<span class="array">[</span>')), l.forEach((f, v) => {
2262
+ const w = h(f, m + 1), g = v < l.length - 1 ? "," : "";
2263
+ typeof f == "object" && f !== null ? (d.push(...w.slice(0, -1)), d.push("".concat(w[w.length - 1]).concat(g))) : d.push("".concat(w[0]).concat(g));
2264
+ }), d.push("".concat(_, '<span class="array">]</span>'));
2265
+ } else if (typeof l == "object" && l !== null) {
2266
+ const f = Object.keys(l);
2267
+ if (f.length === 0)
2268
+ return ["".concat(_, '<span class="property">{}</span>')];
2269
+ d.push("".concat(_, '<span class="property">{</span>')), f.forEach((v, w) => {
2270
+ const g = l[v], C = w < f.length - 1 ? "," : "", T = '<span class="json-key">"'.concat(v, '":</span>');
2271
+ if (typeof g == "object" && g !== null) {
2272
+ const x = h(g, m + 1);
2273
+ d.push("".concat(_, " ").concat(T, " ").concat(x[0].trim())), x.length > 1 && (d.push(...x.slice(1, -1)), d.push("".concat(x[x.length - 1]).concat(C)));
2274
+ } else {
2275
+ const x = p(g);
2276
+ d.push("".concat(_, " ").concat(T, " ").concat(x).concat(C));
2277
+ }
2278
+ }), d.push("".concat(_, '<span class="property">}</span>'));
2279
+ } else
2280
+ d.push("".concat(_).concat(p(l)));
2281
+ return d;
2282
+ }, p = (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>' : "";
2283
+ return r("div", {
2284
+ className: "".concat(e.b()),
2285
+ children: [r("div", {
2286
+ className: e.e("header"),
2287
+ onClick: () => a(),
2288
+ children: [r("div", {
2289
+ className: e.e("header-left"),
2290
+ children: r("div", {
2291
+ children: n.item.name
2292
+ })
2293
+ }), r("div", {
2294
+ className: e.e("header-right"),
2295
+ children: [n.item.error && r("span", {
2296
+ style: "color: red;",
2297
+ children: "发生错误"
2298
+ }), n.item.error && r("svg", {
2299
+ xmlns: "http://www.w3.org/2000/svg",
2300
+ width: "13",
2301
+ height: "13",
2302
+ viewBox: "0 0 24 24",
2303
+ fill: "none",
2304
+ stroke: "red",
2305
+ strokeWidth: "2",
2306
+ strokeLinecap: "round",
2307
+ strokeLinejoin: "round",
2308
+ "aria-hidden": "true",
2309
+ style: "margin-left: 6px;",
2310
+ children: [r("path", {
2311
+ d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"
2312
+ }), r("path", {
2313
+ d: "M12 9v4"
2314
+ }), r("path", {
2315
+ d: "M12 17h.01"
2316
+ })]
2317
+ }), r("span", {
2318
+ title: "复制",
2319
+ children: i.value ? r("svg", {
2320
+ xmlns: "http://www.w3.org/2000/svg",
2321
+ width: "14",
2322
+ height: "14",
2323
+ viewBox: "0 0 24 24",
2324
+ fill: "none",
2325
+ stroke: "rgb(0, 185, 107)",
2326
+ strokeWidth: "2",
2327
+ strokeLinecap: "round",
2328
+ strokeLinejoin: "round",
2329
+ className: "lucide lucide-check",
2330
+ "aria-hidden": "true",
2331
+ style: "margin-left: 6px;",
2332
+ onClick: (l) => l.stopPropagation(),
2333
+ children: r("path", {
2334
+ d: "M20 6 9 17l-5-5"
2335
+ })
2336
+ }) : r("svg", {
2337
+ xmlns: "http://www.w3.org/2000/svg",
2338
+ width: "14",
2339
+ height: "14",
2340
+ viewBox: "0 0 24 24",
2341
+ fill: "none",
2342
+ stroke: "currentColor",
2343
+ strokeWidth: "2",
2344
+ strokeLinecap: "round",
2345
+ strokeLinejoin: "round",
2346
+ "aria-hidden": "true",
2347
+ style: "margin-left: 6px;",
2348
+ onClick: (l) => c(l),
2349
+ children: [r("rect", {
2350
+ width: "14",
2351
+ height: "14",
2352
+ x: "8",
2353
+ y: "8",
2354
+ rx: "2",
2355
+ ry: "2"
2356
+ }), r("path", {
2357
+ d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"
2358
+ })]
2359
+ })
2360
+ }), r("svg", {
2361
+ xmlns: "http://www.w3.org/2000/svg",
2362
+ width: "18",
2363
+ height: "18",
2364
+ viewBox: "0 0 24 24",
2365
+ fill: "none",
2366
+ stroke: "currentColor",
2367
+ strokeWidth: "1.5",
2368
+ strokeLinecap: "round",
2369
+ strokeLinejoin: "round",
2370
+ "aria-hidden": "true",
2371
+ style: {
2372
+ "margin-left": " 6px",
2373
+ transform: t.value ? "rotate(90deg)" : "rotate(0deg)"
2374
+ },
2375
+ children: r("path", {
2376
+ d: "m9 18 6-6-6-6"
2377
+ })
2378
+ })]
2379
+ })]
2380
+ }), r("div", {
2381
+ className: e.e("content"),
2382
+ id: "code-block-".concat(o)
2383
+ })]
2384
+ });
2385
+ };
2386
+ const Ei = (n) => {
2387
+ const {
2388
+ items: e
2389
+ } = n, t = new k("chat-tool-call"), i = M([]), s = M(!1), o = M(!1);
2390
+ I(() => {
2391
+ i.value = e.filter((u) => u), o.value = e.length > 4;
2392
+ }, [e]);
2393
+ const a = B(() => o.value && !s.value ? i.value.slice(0, 4) : i.value), c = () => {
2394
+ s.value = !s.value;
2395
+ };
2396
+ return r("div", {
2397
+ className: "".concat(t.b()),
2398
+ children: [a.value.map((u, h) => r($i, {
2399
+ item: u
2400
+ }, h)), o.value && r("div", {
2401
+ className: t.e("toggle"),
2402
+ onClick: c,
2403
+ children: s.value ? "收起工具调用" : "展开全部 ".concat(i.value.length, " 个工具调用")
2404
+ })]
2405
+ });
2406
+ };
2407
+ const te = new k("markdown-message"), Mi = (n) => {
2150
2408
  const {
2151
2409
  message: e,
2152
2410
  size: t
2153
- } = n, i = I(Ae()), s = I(null), o = X(() => e.state === 20 && e.completed !== !0, [e.state, e.completed]), a = X(() => e.state === 20 && e.completed === !0, [e.state, e.completed]), r = I({
2411
+ } = n, i = M(ce()), s = M(null), o = X(() => e.state === 20 && e.completed !== !0, [e.state, e.completed]), a = X(() => e.state === 20 && e.completed === !0, [e.state, e.completed]), c = M({
2154
2412
  title: "",
2155
2413
  description: "",
2156
- icon: c(Ve, {})
2157
- }), u = I({
2414
+ icon: r(je, {})
2415
+ }), u = M({
2158
2416
  hasSuggestions: !1,
2159
2417
  suggestions: []
2160
- }), h = (v) => {
2161
- v && v.length > 0 ? u.value = {
2418
+ }), h = (m) => {
2419
+ m && m.length > 0 ? u.value = {
2162
2420
  hasSuggestions: !0,
2163
- suggestions: v
2421
+ suggestions: m
2164
2422
  } : u.value = {
2165
2423
  hasSuggestions: !1,
2166
2424
  suggestions: []
2167
2425
  };
2168
- }, p = (v, _) => {
2169
- n.controller.handleSuggestionClick(n.message, v, _);
2170
- }, l = (v) => {
2171
- const _ = v.indexOf("<think>"), d = v.indexOf("</think>");
2172
- let f = "", m = "", w = !1;
2173
- return d === -1 ? (w = !1, f = v.slice(_ + 7), m = "") : (w = !0, f = v.slice(_ + 7, d), m = v.slice(d + 8)), {
2426
+ }, p = (m, _) => {
2427
+ n.controller.handleSuggestionClick(n.message, m, _);
2428
+ }, l = (m) => {
2429
+ const _ = m.indexOf("<think>"), d = m.indexOf("</think>");
2430
+ let f = "", v = "", w = !1;
2431
+ return d === -1 ? (w = !1, f = m.slice(_ + 7), v = "") : (w = !0, f = m.slice(_ + 7, d), v = m.slice(d + 8)), {
2174
2432
  isThoughtCompleted: w,
2175
2433
  thoughtContent: f,
2176
- answerContent: m
2434
+ answerContent: v
2177
2435
  };
2178
2436
  };
2179
- return D(() => {
2437
+ return I(() => {
2180
2438
  if (t >= 0 && s.value) {
2181
2439
  if (e.content.indexOf("<think>") !== -1) {
2182
2440
  const {
2183
- isThoughtCompleted: v,
2441
+ isThoughtCompleted: m,
2184
2442
  thoughtContent: _,
2185
2443
  answerContent: d
2186
2444
  } = l(e.content);
2187
- v ? (r.value.icon = c(We, {}), r.value.title = "思考完成") : e.completed === !0 ? (r.value.icon = c(We, {}), r.value.title = "思考已停止") : (r.value.icon = c(Ve, {}), r.value.title = "思考中..."), r.value.description = _ || "", s.value.setMarkdown(d || "");
2445
+ m ? (c.value.icon = r(We, {}), c.value.title = "思考完成") : e.completed === !0 ? (c.value.icon = r(We, {}), c.value.title = "思考已停止") : (c.value.icon = r(je, {}), c.value.title = "思考中..."), c.value.description = _ || "", s.value.setMarkdown(d || "");
2188
2446
  } else
2189
- s.value.setMarkdown(e.content || "");
2447
+ e.content.indexOf("<tool_call>") !== -1 ? s.value.setMarkdown("") : s.value.setMarkdown(e.content || "");
2190
2448
  h(e.suggestions);
2191
2449
  }
2192
- }, [e, t]), D(() => {
2193
- let v = "";
2450
+ }, [e, t]), I(() => {
2451
+ let m = "";
2194
2452
  if (e.content.indexOf("<think>") !== -1) {
2195
2453
  const {
2196
2454
  isThoughtCompleted: _,
2197
2455
  thoughtContent: d,
2198
2456
  answerContent: f
2199
2457
  } = l(e.content);
2200
- r.value = {
2458
+ c.value = {
2201
2459
  title: _ ? "思考完成" : e.completed === !0 ? "思考已停止" : "思考中...",
2202
2460
  description: d || "",
2203
- icon: _ || e.completed === !0 ? c(We, {}) : c(Ve, {})
2204
- }, f && (v = f);
2461
+ icon: _ || e.completed === !0 ? r(We, {}) : r(je, {})
2462
+ }, f && (m = f);
2205
2463
  } else
2206
- v = e.content;
2207
- h(e.suggestions), s.value = new Vt({
2464
+ e.content.indexOf("<tool_call>") !== -1 ? m = "" : m = e.content;
2465
+ h(e.suggestions), s.value = new qt({
2208
2466
  id: i,
2209
- value: v || "",
2467
+ value: m || "",
2210
2468
  editor: {
2211
2469
  defaultModel: "previewOnly"
2212
2470
  },
@@ -2228,36 +2486,38 @@ const te = new M("markdown-message"), wi = (n) => {
2228
2486
  }
2229
2487
  }
2230
2488
  });
2231
- }, []), c("div", {
2489
+ }, []), r("div", {
2232
2490
  className: "".concat(te.b(), " ").concat(te.is("loading", o)),
2233
- children: [c("div", {
2491
+ children: [r("div", {
2234
2492
  className: te.b("header"),
2235
- children: [c("div", {
2493
+ children: [r("div", {
2236
2494
  className: te.be("header", "caption"),
2237
2495
  children: "AI "
2238
- }), n.children, a ? c("div", {
2496
+ }), n.children, a ? r("div", {
2239
2497
  className: te.be("header", "timeout"),
2240
2498
  children: "请求超时"
2241
2499
  }) : null]
2242
- }), c("div", {
2500
+ }), r("div", {
2243
2501
  className: "".concat(te.b("content"), " pre-wrap-container"),
2244
- children: [c(_i, {
2245
- items: [r.value]
2246
- }), c("div", {
2502
+ children: [r(ki, {
2503
+ items: [c.value]
2504
+ }), e.toolcalls && e.toolcalls.length > 0 ? r(Ei, {
2505
+ items: e.toolcalls || []
2506
+ }) : null, r("div", {
2247
2507
  id: i
2248
2508
  })]
2249
- }), c("div", {
2509
+ }), r("div", {
2250
2510
  className: te.b("footer"),
2251
- children: u.value.hasSuggestions ? c(gi, {
2511
+ children: u.value.hasSuggestions ? r(Ni, {
2252
2512
  items: u.value.suggestions,
2253
- onItemClick: (v, _) => {
2254
- p(v, _);
2513
+ onItemClick: (m, _) => {
2514
+ p(m, _);
2255
2515
  }
2256
2516
  }) : null
2257
2517
  })]
2258
2518
  });
2259
2519
  };
2260
- const de = new M("ossfile-material"), bi = (n) => {
2520
+ const he = new k("ossfile-material"), Ai = (n) => {
2261
2521
  const e = B(() => n.material.data.name), t = B(() => n.material.metadata.size), i = B(() => {
2262
2522
  const o = n.material.metadata.state;
2263
2523
  return o === "successed" ? "上传成功" : o === "uploading" ? "上传中" : o === "failed" ? "上传失败" : "未知状态";
@@ -2273,22 +2533,22 @@ const de = new M("ossfile-material"), bi = (n) => {
2273
2533
  return "#ff4d4f";
2274
2534
  }
2275
2535
  });
2276
- return c("div", {
2277
- className: de.b(),
2278
- children: [c("div", {
2279
- className: de.b("left"),
2280
- children: c(gn, {})
2281
- }), c("div", {
2282
- className: de.b("right"),
2283
- children: [c("div", {
2284
- className: de.e("name"),
2536
+ return r("div", {
2537
+ className: he.b(),
2538
+ children: [r("div", {
2539
+ className: he.b("left"),
2540
+ children: r(xn, {})
2541
+ }), r("div", {
2542
+ className: he.b("right"),
2543
+ children: [r("div", {
2544
+ className: he.e("name"),
2285
2545
  title: e,
2286
2546
  children: e
2287
- }), c("div", {
2288
- className: de.e("metadata"),
2289
- children: [c("div", {
2547
+ }), r("div", {
2548
+ className: he.e("metadata"),
2549
+ children: [r("div", {
2290
2550
  children: [t, "B"]
2291
- }), c("div", {
2551
+ }), r("div", {
2292
2552
  style: {
2293
2553
  color: s.value
2294
2554
  },
@@ -2298,70 +2558,70 @@ const de = new M("ossfile-material"), bi = (n) => {
2298
2558
  })]
2299
2559
  });
2300
2560
  };
2301
- const he = new M("common-material"), yi = (n) => {
2561
+ const pe = new k("common-material"), Ii = (n) => {
2302
2562
  var i, s, o, a;
2303
- const e = (i = n.controller.opts.questionToolbarItems) == null ? void 0 : i.find((r) => r.id === n.material.metadata.actionId), t = B(() => n.material.metadata.name);
2304
- return c("div", {
2305
- className: he.b(),
2306
- children: [c("div", {
2307
- className: he.b("left"),
2308
- children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((s = e.icon) == null ? void 0 : s.showIcon) && c(Y, {
2309
- children: (o = e.icon) != null && o.cssClass ? c("i", {
2563
+ const e = (i = n.controller.opts.questionToolbarItems) == null ? void 0 : i.find((c) => c.id === n.material.metadata.actionId), t = B(() => n.material.metadata.name);
2564
+ return r("div", {
2565
+ className: pe.b(),
2566
+ children: [r("div", {
2567
+ className: pe.b("left"),
2568
+ children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((s = e.icon) == null ? void 0 : s.showIcon) && r(Y, {
2569
+ children: (o = e.icon) != null && o.cssClass ? r("i", {
2310
2570
  className: e.icon.cssClass
2311
- }) : (a = e.icon) != null && a.imagePath ? it(e.icon.imagePath) ? c("div", {
2571
+ }) : (a = e.icon) != null && a.imagePath ? it(e.icon.imagePath) ? r("div", {
2312
2572
  dangerouslySetInnerHTML: {
2313
2573
  __html: e.icon.imagePath
2314
2574
  }
2315
- }) : c("img", {
2575
+ }) : r("img", {
2316
2576
  src: e.icon.imagePath
2317
2577
  }) : null
2318
- }) : c(li, {})
2319
- }), c("div", {
2320
- className: he.b("right"),
2321
- children: [c("div", {
2322
- className: he.e("name"),
2578
+ }) : r(gi, {})
2579
+ }), r("div", {
2580
+ className: pe.b("right"),
2581
+ children: [r("div", {
2582
+ className: pe.e("name"),
2323
2583
  title: t,
2324
2584
  children: t
2325
- }), c("div", {
2326
- className: he.e("metadata"),
2327
- children: c("div", {
2585
+ }), r("div", {
2586
+ className: pe.e("metadata"),
2587
+ children: r("div", {
2328
2588
  children: (e == null ? void 0 : e.label) || "素材资源"
2329
2589
  })
2330
2590
  })]
2331
2591
  })]
2332
2592
  });
2333
2593
  };
2334
- const qe = new M("chat-input-material-item"), wn = (n) => {
2594
+ const Ve = new k("chat-input-material-item"), Sn = (n) => {
2335
2595
  const {
2336
2596
  material: e
2337
2597
  } = n;
2338
2598
  let t = null;
2339
2599
  switch (e.type) {
2340
2600
  case "ossfile":
2341
- t = bi;
2601
+ t = Ai;
2342
2602
  break;
2343
2603
  default:
2344
- t = yi;
2604
+ t = Ii;
2345
2605
  }
2346
2606
  const i = () => {
2347
2607
  n.controller.deleteMaterial(e);
2348
2608
  };
2349
- return c("div", {
2350
- className: "".concat(qe.b(), " ").concat(qe.is("disabled", n.disabled)),
2351
- children: [c("div", {
2352
- className: qe.e("icon"),
2609
+ return r("div", {
2610
+ className: "".concat(Ve.b(), " ").concat(Ve.is("disabled", n.disabled)),
2611
+ children: [r("div", {
2612
+ className: Ve.e("icon"),
2353
2613
  onClick: i,
2354
- children: c(ci, {})
2355
- }), j(t, {
2614
+ children: r(_i, {})
2615
+ }), q(t, {
2356
2616
  material: e,
2357
2617
  controller: n.controller
2358
2618
  })]
2359
2619
  });
2360
2620
  };
2361
- const ie = new M("user-message-question"), Ci = (n) => {
2362
- const e = I(Ae()), t = I(null), i = B(() => n.message.content), s = B(() => sn.parseMixedContent(i.value));
2363
- return D(() => {
2364
- t.value = new Vt({
2621
+ const ie = new k("user-message-question"), Di = (n) => {
2622
+ const e = M(ce()), t = M(null), i = B(() => n.message.content), s = B(() => an.parseMixedContent(i.value));
2623
+ return I(() => {
2624
+ t.value = new qt({
2365
2625
  id: e,
2366
2626
  value: s.value.remainingText || "",
2367
2627
  editor: {
@@ -2385,28 +2645,28 @@ const ie = new M("user-message-question"), Ci = (n) => {
2385
2645
  }
2386
2646
  }
2387
2647
  });
2388
- }, [s.value.remainingText]), c("div", {
2648
+ }, [s.value.remainingText]), r("div", {
2389
2649
  className: ie.b(),
2390
- children: [c("div", {
2650
+ children: [r("div", {
2391
2651
  className: ie.e("user-header"),
2392
- children: [n.children, c("div", {
2652
+ children: [n.children, r("div", {
2393
2653
  className: ie.e("user"),
2394
2654
  children: "我"
2395
2655
  })]
2396
- }), c("div", {
2656
+ }), r("div", {
2397
2657
  className: ie.e("content"),
2398
- children: c("div", {
2658
+ children: r("div", {
2399
2659
  className: ie.em("content", "body"),
2400
- children: [s.value.hasResources && c("div", {
2660
+ children: [s.value.hasResources && r("div", {
2401
2661
  className: ie.em("content", "material"),
2402
- children: s.value.resources.map((o) => c(wn, {
2662
+ children: s.value.resources.map((o) => r(Sn, {
2403
2663
  material: o,
2404
2664
  disabled: !0,
2405
2665
  controller: n.controller
2406
2666
  }, o.id))
2407
- }), c("div", {
2667
+ }), r("div", {
2408
2668
  className: "pre-wrap-container",
2409
- children: c("div", {
2669
+ children: r("div", {
2410
2670
  id: e
2411
2671
  })
2412
2672
  })]
@@ -2414,32 +2674,32 @@ const ie = new M("user-message-question"), Ci = (n) => {
2414
2674
  })]
2415
2675
  });
2416
2676
  };
2417
- const Ce = new M("error-message"), Ti = (n) => {
2677
+ const Te = new k("error-message"), Li = (n) => {
2418
2678
  const e = B(() => n.message.content);
2419
- return c("div", {
2420
- className: Ce.b(),
2421
- children: [c("div", {
2422
- className: Ce.b("header"),
2423
- children: [c("div", {
2424
- className: Ce.be("header", "caption"),
2679
+ return r("div", {
2680
+ className: Te.b(),
2681
+ children: [r("div", {
2682
+ className: Te.b("header"),
2683
+ children: [r("div", {
2684
+ className: Te.be("header", "caption"),
2425
2685
  children: "AI "
2426
2686
  }), n.children]
2427
- }), c("div", {
2428
- className: "".concat(Ce.e("content"), " pre-wrap-container"),
2429
- children: c("span", {
2687
+ }), r("div", {
2688
+ className: "".concat(Te.e("content"), " pre-wrap-container"),
2689
+ children: r("span", {
2430
2690
  children: e
2431
2691
  })
2432
2692
  })]
2433
2693
  });
2434
2694
  };
2435
- const Ct = new M("unknown-message"), xi = (n) => c("div", {
2436
- className: Ct.b(),
2437
- children: c("div", {
2438
- className: "".concat(Ct.e("content"), " pre-wrap-container"),
2695
+ const xt = new k("unknown-message"), zi = (n) => r("div", {
2696
+ className: xt.b(),
2697
+ children: r("div", {
2698
+ className: "".concat(xt.e("content"), " pre-wrap-container"),
2439
2699
  children: ["暂未支持的消息类型: ", n.message.type]
2440
2700
  })
2441
2701
  });
2442
- const Si = new M("chat-message-item"), ki = (n) => {
2702
+ const Hi = new k("chat-message-item"), Oi = (n) => {
2443
2703
  const {
2444
2704
  message: e,
2445
2705
  size: t
@@ -2447,17 +2707,17 @@ const Si = new M("chat-message-item"), ki = (n) => {
2447
2707
  let i = null;
2448
2708
  switch (e.type) {
2449
2709
  case "DEFAULT":
2450
- i = e.role === "ASSISTANT" ? wi : Ci;
2710
+ i = e.role === "ASSISTANT" ? Mi : Di;
2451
2711
  break;
2452
2712
  case "ERROR":
2453
- i = Ti;
2713
+ i = Li;
2454
2714
  break;
2455
2715
  default:
2456
- i = xi;
2716
+ i = zi;
2457
2717
  }
2458
- return c("div", {
2459
- className: Si.b(),
2460
- children: j(i, {
2718
+ return r("div", {
2719
+ className: Hi.b(),
2720
+ children: q(i, {
2461
2721
  size: t,
2462
2722
  message: e,
2463
2723
  controller: n.controller,
@@ -2465,9 +2725,10 @@ const Si = new M("chat-message-item"), ki = (n) => {
2465
2725
  })
2466
2726
  });
2467
2727
  };
2468
- class V {
2728
+ class j {
2469
2729
  constructor(e) {
2470
- this.msg = e;
2730
+ S(this, "toolcalls", []);
2731
+ this.msg = e, this.computeToolCalls();
2471
2732
  }
2472
2733
  get messageid() {
2473
2734
  return this.msg.messageid;
@@ -2483,7 +2744,7 @@ class V {
2483
2744
  }
2484
2745
  get realcontent() {
2485
2746
  let e = this.msg.content;
2486
- if (e.indexOf("<think>") !== -1 && e.indexOf("</think>") === -1 || (e = e.replace(new RegExp("\\<think\\>[^]*?\\<\\/think\\>", "gs"), "").trim(), e.indexOf("<resources>") !== -1 && e.indexOf("</resources>") === -1))
2747
+ if (e.indexOf("<think>") !== -1 && e.indexOf("</think>") === -1 || (e = e.replace(new RegExp("\\<think\\>[^]*?\\<\\/think\\>", "gs"), "").trim(), e.indexOf("<tool_call>") !== -1 && e.indexOf("</tool_call>") === -1) || (e = e.replace(new RegExp("\\<tool_call\\>[^]*?\\<\\/tool_call\\>", "gs"), "").trim(), e.indexOf("<resources>") !== -1 && e.indexOf("</resources>") === -1))
2487
2748
  return "";
2488
2749
  e = e.replace(new RegExp("\\<resources\\>[^]*?\\<\\/resources\\>", "gs"), "").trim();
2489
2750
  const t = e.indexOf("<suggestions>");
@@ -2509,7 +2770,7 @@ class V {
2509
2770
  * @param {IChatMessage} msg
2510
2771
  */
2511
2772
  update(e) {
2512
- e.content || (e.content = ""), e.content.indexOf("<think>") !== -1 && this.msg.content && (this.msg.content = ""), this.msg.content += e.content;
2773
+ e.content || (e.content = ""), e.content.indexOf("<think>") !== -1 && this.msg.content && (this.msg.content = ""), this.msg.content += e.content, this.computeToolCalls();
2513
2774
  }
2514
2775
  /**
2515
2776
  * 更新消息完成状态
@@ -2519,10 +2780,17 @@ class V {
2519
2780
  * @param {boolean} completed
2520
2781
  */
2521
2782
  updateCompleted(e) {
2522
- this.msg.completed = e;
2783
+ this.msg.completed = e, this.computeToolCalls();
2784
+ }
2785
+ /**
2786
+ * @description 计算工具调用
2787
+ * @memberof ChatMessage
2788
+ */
2789
+ computeToolCalls() {
2790
+ this.toolcalls = Yn.parse(this.msg.content);
2523
2791
  }
2524
2792
  }
2525
- class pe {
2793
+ class fe {
2526
2794
  constructor(e) {
2527
2795
  this.data = e;
2528
2796
  }
@@ -2548,7 +2816,7 @@ class pe {
2548
2816
  return this.data.aiChat;
2549
2817
  }
2550
2818
  }
2551
- class je {
2819
+ class qe {
2552
2820
  constructor(e) {
2553
2821
  this.material = e;
2554
2822
  }
@@ -2565,8 +2833,8 @@ class je {
2565
2833
  return this.material.data;
2566
2834
  }
2567
2835
  }
2568
- const H = new M("chat-toolbar-item"), Ni = (n) => {
2569
- var f, m, w;
2836
+ const H = new k("chat-toolbar-item"), Bi = (n) => {
2837
+ var f, v, w;
2570
2838
  const {
2571
2839
  model: e,
2572
2840
  data: t,
@@ -2574,80 +2842,80 @@ const H = new M("chat-toolbar-item"), Ni = (n) => {
2574
2842
  disabled: s = !1,
2575
2843
  buttonType: o = "default",
2576
2844
  onClick: a
2577
- } = n, [r, u] = K(!1), h = P(null), p = (g) => typeof g.hidden == "function" ? g.hidden(t) : g.hidden === !0;
2845
+ } = n, [c, u] = K(!1), h = P(null), p = (g) => typeof g.hidden == "function" ? g.hidden(t) : g.hidden === !0;
2578
2846
  if (p(e))
2579
- return c(Y, {});
2580
- const l = (g) => s ? !0 : typeof g.disabled == "function" ? g.disabled(t) : g.disabled === !0, v = (g) => {
2581
- var T, C, S, O;
2847
+ return r(Y, {});
2848
+ const l = (g) => s ? !0 : typeof g.disabled == "function" ? g.disabled(t) : g.disabled === !0, m = (g) => {
2849
+ var C, T, x, O;
2582
2850
  if (typeof g.icon == "function")
2583
2851
  return g.icon();
2584
- if ((T = g.icon) != null && T.showIcon && ((C = g.icon) != null && C.cssClass))
2585
- return c("i", {
2852
+ if ((C = g.icon) != null && C.showIcon && ((T = g.icon) != null && T.cssClass))
2853
+ return r("i", {
2586
2854
  className: g.icon.cssClass
2587
2855
  });
2588
- if ((S = g.icon) != null && S.showIcon && ((O = g.icon) != null && O.imagePath))
2589
- return it(g.icon.imagePath) ? c("div", {
2856
+ if ((x = g.icon) != null && x.showIcon && ((O = g.icon) != null && O.imagePath))
2857
+ return it(g.icon.imagePath) ? r("div", {
2590
2858
  dangerouslySetInnerHTML: {
2591
2859
  __html: g.icon.imagePath
2592
2860
  }
2593
- }) : c("img", {
2861
+ }) : r("img", {
2594
2862
  src: g.icon.imagePath
2595
2863
  });
2596
2864
  }, _ = (g) => {
2597
2865
  l(e) || u(!0);
2598
- }, d = (g, T) => {
2599
- l(T) || (u(!1), a(g, T));
2866
+ }, d = (g, C) => {
2867
+ l(C) || (u(!1), a(g, C));
2600
2868
  };
2601
- return D(() => {
2602
- const g = (T) => {
2603
- h.current && h.current.contains(T.target) || u(!1);
2869
+ return I(() => {
2870
+ const g = (C) => {
2871
+ h.current && h.current.contains(C.target) || u(!1);
2604
2872
  };
2605
- return r && document.addEventListener("mousedown", g), () => {
2873
+ return c && document.addEventListener("mousedown", g), () => {
2606
2874
  document.removeEventListener("mousedown", g);
2607
2875
  };
2608
- }, [r]), c("div", {
2876
+ }, [c]), r("div", {
2609
2877
  className: "".concat(H.b(), " ").concat(H.b(o), " ").concat(e.customClass || "", " ").concat(i || "", " ").concat(H.is("disabled", l(e)), " ").concat(H.is("more", !!((f = e.children) != null && f.length))),
2610
- children: [c("div", {
2878
+ children: [r("div", {
2611
2879
  title: e.title,
2612
2880
  className: H.e("content"),
2613
2881
  onClick: (g) => d(g, e),
2614
- children: [c("div", {
2882
+ children: [r("div", {
2615
2883
  className: H.em("content", "icon"),
2616
- children: v(e)
2617
- }), c("div", {
2884
+ children: m(e)
2885
+ }), r("div", {
2618
2886
  className: H.em("content", "label"),
2619
2887
  children: e.label
2620
2888
  })]
2621
- }), ((m = e.children) == null ? void 0 : m.length) && c("div", {
2889
+ }), ((v = e.children) == null ? void 0 : v.length) && r("div", {
2622
2890
  title: "更多",
2623
2891
  className: H.e("more"),
2624
2892
  onClick: _,
2625
- children: c("i", {
2893
+ children: r("i", {
2626
2894
  "aria-hidden": "true",
2627
2895
  className: "fa fa-angle-down ".concat(H.em("more", "icon"))
2628
2896
  })
2629
- }), r && c("div", {
2897
+ }), c && r("div", {
2630
2898
  ref: h,
2631
2899
  className: H.b("dropdown"),
2632
- children: (w = e.children) == null ? void 0 : w.map((g, T) => {
2900
+ children: (w = e.children) == null ? void 0 : w.map((g, C) => {
2633
2901
  if (!p(g))
2634
- return c("div", {
2902
+ return r("div", {
2635
2903
  title: g.title,
2636
- onClick: (C) => d(C, g),
2904
+ onClick: (T) => d(T, g),
2637
2905
  className: "".concat(H.be("dropdown", "item"), " ").concat(g.customClass || "", " ").concat(H.is("disabled", l(g))),
2638
- children: [c("div", {
2906
+ children: [r("div", {
2639
2907
  className: H.bem("dropdown", "item", "icon"),
2640
- children: v(g)
2641
- }), c("div", {
2908
+ children: m(g)
2909
+ }), r("div", {
2642
2910
  className: H.bem("dropdown", "item", "label"),
2643
2911
  children: g.label
2644
2912
  })]
2645
- }, T);
2913
+ }, C);
2646
2914
  })
2647
2915
  })]
2648
2916
  });
2649
2917
  };
2650
- const Ei = new M("chat-toolbar"), et = (n) => {
2918
+ const Pi = new k("chat-toolbar"), et = (n) => {
2651
2919
  const {
2652
2920
  controller: e,
2653
2921
  items: t = [],
@@ -2655,19 +2923,19 @@ const Ei = new M("chat-toolbar"), et = (n) => {
2655
2923
  type: s,
2656
2924
  className: o,
2657
2925
  mode: a
2658
- } = n, r = rn(rt);
2926
+ } = n, c = pn(rt);
2659
2927
  let u = [];
2660
2928
  const h = [{
2661
2929
  label: "重置对话",
2662
2930
  title: "重置对话",
2663
- icon: () => c(pi, {}),
2931
+ icon: () => r(Ci, {}),
2664
2932
  onClick: () => {
2665
2933
  e.resetTopic();
2666
2934
  },
2667
2935
  children: [{
2668
2936
  label: "清空对话",
2669
2937
  title: "清空对话",
2670
- icon: () => c(hi, {}),
2938
+ icon: () => r(yi, {}),
2671
2939
  onClick: () => {
2672
2940
  e.clearTopic();
2673
2941
  }
@@ -2675,37 +2943,37 @@ const Ei = new M("chat-toolbar"), et = (n) => {
2675
2943
  label: "新建对话",
2676
2944
  title: "新建对话",
2677
2945
  hidden: a !== "TOPIC",
2678
- icon: () => c(ti, {}),
2946
+ icon: () => r(ui, {}),
2679
2947
  onClick: () => {
2680
- r.newTopic && r.newTopic();
2948
+ c.newTopic && c.newTopic();
2681
2949
  }
2682
2950
  }]
2683
2951
  }], p = [{
2684
2952
  label: "刷新",
2685
2953
  title: "刷新",
2686
- icon: () => c(yt, {}),
2954
+ icon: () => r(Tt, {}),
2687
2955
  onClick: () => {
2688
2956
  e.refreshMessage(i);
2689
2957
  }
2690
2958
  }, {
2691
2959
  label: "删除",
2692
2960
  title: "删除",
2693
- icon: () => c(Zn, {}),
2961
+ icon: () => r(si, {}),
2694
2962
  onClick: () => {
2695
2963
  e.deleteMessage(i);
2696
2964
  }
2697
2965
  }, {
2698
2966
  label: "复制",
2699
2967
  title: "复制",
2700
- icon: () => c(Gn, {}),
2968
+ icon: () => r(oi, {}),
2701
2969
  onClick: () => {
2702
2970
  e.copyMessage(i);
2703
2971
  }
2704
2972
  }];
2705
- r.enableBackFill && p.unshift({
2973
+ c.enableBackFill && p.unshift({
2706
2974
  label: "回填",
2707
2975
  title: "回填",
2708
- icon: () => c(Yn, {}),
2976
+ icon: () => r(ni, {}),
2709
2977
  onClick: () => {
2710
2978
  e.backfill(i);
2711
2979
  }
@@ -2713,7 +2981,7 @@ const Ei = new M("chat-toolbar"), et = (n) => {
2713
2981
  const l = [{
2714
2982
  label: "刷新",
2715
2983
  title: "刷新",
2716
- icon: () => c(yt, {}),
2984
+ icon: () => r(Tt, {}),
2717
2985
  onClick: () => {
2718
2986
  e.refreshMessage(i, !0);
2719
2987
  }
@@ -2729,33 +2997,33 @@ const Ei = new M("chat-toolbar"), et = (n) => {
2729
2997
  }
2730
2998
  else
2731
2999
  u = [...h, ...t];
2732
- const v = (d, f) => {
2733
- const m = {
3000
+ const m = (d, f) => {
3001
+ const v = {
2734
3002
  ...i
2735
3003
  };
2736
- if (i instanceof V ? (Object.assign(m, {
3004
+ if (i instanceof j ? (Object.assign(v, {
2737
3005
  topic: e.topic
2738
- }), m.msg.realcontent = i.realcontent) : (m.data || (m.data = {}), Object.assign(m.data, {
3006
+ }), v.msg.realcontent = i.realcontent) : (v.data || (v.data = {}), Object.assign(v.data, {
2739
3007
  messages: e.messages.value
2740
3008
  })), f.onClick && typeof f.onClick == "function")
2741
- f.onClick(d, f, e.context, e.params, m);
3009
+ f.onClick(d, f, e.context, e.params, v);
2742
3010
  else {
2743
3011
  const w = n.controller.opts.extendToolbarClick;
2744
- w && typeof w == "function" && w(d, f, e.context, e.params, m);
3012
+ w && typeof w == "function" && w(d, f, e.context, e.params, v);
2745
3013
  }
2746
3014
  }, _ = X(() => 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]);
2747
- return c("div", {
2748
- className: "".concat(Ei.b(), " ").concat(o || ""),
2749
- children: u.map((d, f) => c(Ni, {
3015
+ return r("div", {
3016
+ className: "".concat(Pi.b(), " ").concat(o || ""),
3017
+ children: u.map((d, f) => r(Bi, {
2750
3018
  data: i,
2751
3019
  model: d,
2752
3020
  disabled: _,
2753
3021
  buttonType: s === "content" ? "circle" : "default",
2754
- onClick: v.bind(void 0)
3022
+ onClick: m.bind(void 0)
2755
3023
  }, f))
2756
3024
  });
2757
3025
  };
2758
- function Mi(n, e) {
3026
+ function Ri(n, e) {
2759
3027
  let t = null;
2760
3028
  return function(...i) {
2761
3029
  t || (t = setTimeout(() => {
@@ -2763,8 +3031,8 @@ function Mi(n, e) {
2763
3031
  }, e));
2764
3032
  };
2765
3033
  }
2766
- const $i = (n) => {
2767
- const e = I(!1), t = I({}), i = new M("chat-back-bottom"), s = I(null), o = () => {
3034
+ const Fi = (n) => {
3035
+ const e = M(!1), t = M({}), i = new k("chat-back-bottom"), s = M(null), o = () => {
2768
3036
  if (s.value) {
2769
3037
  const u = n.visibilityHeight || 200, h = s.value.scrollHeight - s.value.scrollTop - s.value.offsetHeight;
2770
3038
  e.value = h >= u;
@@ -2775,28 +3043,28 @@ const $i = (n) => {
2775
3043
  top: s.value.scrollHeight,
2776
3044
  behavior: "smooth"
2777
3045
  }), (u = n.onClick) == null || u.call(n));
2778
- }, r = Mi(o, 300);
3046
+ }, c = Ri(o, 300);
2779
3047
  return X(() => {
2780
3048
  t.value = {
2781
3049
  right: "".concat(n.right, "px"),
2782
3050
  bottom: "".concat(n.bottom, "px")
2783
3051
  };
2784
- }, [n.right, n.bottom]), D(() => {
3052
+ }, [n.right, n.bottom]), I(() => {
2785
3053
  var u;
2786
3054
  if (n.target) {
2787
3055
  const h = (u = document.querySelector(n.target)) != null ? u : void 0;
2788
- h && (s.value = h, h.addEventListener("scroll", r), o());
3056
+ h && (s.value = h, h.addEventListener("scroll", c), o());
2789
3057
  }
2790
- }, []), c("div", {
3058
+ }, []), r("div", {
2791
3059
  className: "".concat(i.b(), " ").concat(i.is("visible", e.value)),
2792
3060
  style: t.value,
2793
3061
  onClick: a,
2794
- children: c(di, {
3062
+ children: r(bi, {
2795
3063
  className: i.e("icon")
2796
3064
  })
2797
3065
  });
2798
3066
  };
2799
- const Tt = new M("chat-messages"), xt = (n) => {
3067
+ const St = new k("chat-messages"), kt = (n) => {
2800
3068
  const e = P(null), [t, i] = K(!0), s = P(!1), o = n.controller.messages, a = () => {
2801
3069
  const h = e.current;
2802
3070
  h && (s.current = !0, h.scrollTo({
@@ -2806,53 +3074,53 @@ const Tt = new M("chat-messages"), xt = (n) => {
2806
3074
  s.current = !1;
2807
3075
  }, 500));
2808
3076
  };
2809
- D(() => {
3077
+ I(() => {
2810
3078
  t && a();
2811
3079
  }, [o.value]);
2812
- const r = () => {
3080
+ const c = () => {
2813
3081
  if (!s.current && e.current) {
2814
3082
  const {
2815
3083
  scrollTop: h,
2816
3084
  scrollHeight: p,
2817
3085
  clientHeight: l
2818
- } = e.current, v = p - (h + l) < 50;
2819
- i(v);
3086
+ } = e.current, m = p - (h + l) < 50;
3087
+ i(m);
2820
3088
  }
2821
3089
  }, u = () => {
2822
3090
  s.current = !0, i(!0);
2823
3091
  };
2824
- return c("div", {
3092
+ return r("div", {
2825
3093
  ref: e,
2826
- className: Tt.b(),
2827
- onScroll: r,
3094
+ className: St.b(),
3095
+ onScroll: c,
2828
3096
  children: [o.value.map((h) => {
2829
3097
  var l;
2830
3098
  const p = ((l = h.content) == null ? void 0 : l.length) || 0;
2831
- return h.role !== "SYSTEM" ? c(ki, {
3099
+ return h.role !== "SYSTEM" ? r(Oi, {
2832
3100
  size: p,
2833
3101
  message: h,
2834
3102
  controller: n.controller,
2835
- children: c(et, {
3103
+ children: r(et, {
2836
3104
  data: h,
2837
3105
  type: "content",
2838
3106
  items: n.toolbarItems,
2839
3107
  controller: n.controller
2840
3108
  })
2841
3109
  }, h.messageid) : null;
2842
- }), c($i, {
3110
+ }), r(Fi, {
2843
3111
  right: 20,
2844
3112
  bottom: 14,
2845
- target: ".".concat(Tt.b()),
3113
+ target: ".".concat(St.b()),
2846
3114
  onClick: u
2847
3115
  })]
2848
3116
  });
2849
3117
  };
2850
- function Ai(n, e) {
3118
+ function Ui(n, e) {
2851
3119
  for (var t in e)
2852
3120
  n[t] = e[t];
2853
3121
  return n;
2854
3122
  }
2855
- function St(n, e) {
3123
+ function Nt(n, e) {
2856
3124
  for (var t in n)
2857
3125
  if (t !== "__source" && !(t in e))
2858
3126
  return !0;
@@ -2861,63 +3129,63 @@ function St(n, e) {
2861
3129
  return !0;
2862
3130
  return !1;
2863
3131
  }
2864
- function kt(n) {
3132
+ function $t(n) {
2865
3133
  this.props = n;
2866
3134
  }
2867
- (kt.prototype = new F()).isPureReactComponent = !0, kt.prototype.shouldComponentUpdate = function(n, e) {
2868
- return St(this.props, n) || St(this.state, e);
3135
+ ($t.prototype = new F()).isPureReactComponent = !0, $t.prototype.shouldComponentUpdate = function(n, e) {
3136
+ return Nt(this.props, n) || Nt(this.state, e);
2869
3137
  };
2870
- var Nt = b.__b;
3138
+ var Et = b.__b;
2871
3139
  b.__b = function(n) {
2872
- n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), Nt && Nt(n);
3140
+ n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), Et && Et(n);
2873
3141
  };
2874
- var Ii = b.__e;
3142
+ var Wi = b.__e;
2875
3143
  b.__e = function(n, e, t, i) {
2876
3144
  if (n.then) {
2877
3145
  for (var s, o = e; o = o.__; )
2878
3146
  if ((s = o.__c) && s.__c)
2879
3147
  return e.__e == null && (e.__e = t.__e, e.__k = t.__k), s.__c(n, e);
2880
3148
  }
2881
- Ii(n, e, t, i);
3149
+ Wi(n, e, t, i);
2882
3150
  };
2883
- var Et = b.unmount;
2884
- function bn(n, e, t) {
3151
+ var Mt = b.unmount;
3152
+ function kn(n, e, t) {
2885
3153
  return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(i) {
2886
3154
  typeof i.__c == "function" && i.__c();
2887
- }), n.__c.__H = null), (n = Ai({}, n)).__c != null && (n.__c.__P === t && (n.__c.__P = e), n.__c = null), n.__k = n.__k && n.__k.map(function(i) {
2888
- return bn(i, e, t);
3155
+ }), n.__c.__H = null), (n = Ui({}, n)).__c != null && (n.__c.__P === t && (n.__c.__P = e), n.__c = null), n.__k = n.__k && n.__k.map(function(i) {
3156
+ return kn(i, e, t);
2889
3157
  })), n;
2890
3158
  }
2891
- function yn(n, e, t) {
3159
+ function Nn(n, e, t) {
2892
3160
  return n && t && (n.__v = null, n.__k = n.__k && n.__k.map(function(i) {
2893
- return yn(i, e, t);
3161
+ return Nn(i, e, t);
2894
3162
  }), n.__c && n.__c.__P === e && (n.__e && t.insertBefore(n.__e, n.__d), n.__c.__e = !0, n.__c.__P = t)), n;
2895
3163
  }
2896
3164
  function Ye() {
2897
3165
  this.__u = 0, this.t = null, this.__b = null;
2898
3166
  }
2899
- function Cn(n) {
3167
+ function $n(n) {
2900
3168
  var e = n.__.__c;
2901
3169
  return e && e.__a && e.__a(n);
2902
3170
  }
2903
- function Te() {
3171
+ function xe() {
2904
3172
  this.u = null, this.o = null;
2905
3173
  }
2906
3174
  b.unmount = function(n) {
2907
3175
  var e = n.__c;
2908
- e && e.__R && e.__R(), e && n.__h === !0 && (n.type = null), Et && Et(n);
3176
+ e && e.__R && e.__R(), e && n.__h === !0 && (n.type = null), Mt && Mt(n);
2909
3177
  }, (Ye.prototype = new F()).__c = function(n, e) {
2910
3178
  var t = e.__c, i = this;
2911
3179
  i.t == null && (i.t = []), i.t.push(t);
2912
- var s = Cn(i.__v), o = !1, a = function() {
2913
- o || (o = !0, t.__R = null, s ? s(r) : r());
3180
+ var s = $n(i.__v), o = !1, a = function() {
3181
+ o || (o = !0, t.__R = null, s ? s(c) : c());
2914
3182
  };
2915
3183
  t.__R = a;
2916
- var r = function() {
3184
+ var c = function() {
2917
3185
  if (!--i.__u) {
2918
3186
  if (i.state.__a) {
2919
3187
  var h = i.state.__a;
2920
- i.__v.__k[0] = yn(h, h.__c.__P, h.__c.__O);
3188
+ i.__v.__k[0] = Nn(h, h.__c.__P, h.__c.__O);
2921
3189
  }
2922
3190
  var p;
2923
3191
  for (i.setState({ __a: i.__b = null }); p = i.t.pop(); )
@@ -2931,14 +3199,14 @@ b.unmount = function(n) {
2931
3199
  if (this.__b) {
2932
3200
  if (this.__v.__k) {
2933
3201
  var t = document.createElement("div"), i = this.__v.__k[0].__c;
2934
- this.__v.__k[0] = bn(this.__b, t, i.__O = i.__P);
3202
+ this.__v.__k[0] = kn(this.__b, t, i.__O = i.__P);
2935
3203
  }
2936
3204
  this.__b = null;
2937
3205
  }
2938
- var s = e.__a && j(Y, null, n.fallback);
2939
- return s && (s.__h = null), [j(Y, null, e.__a ? null : n.children), s];
3206
+ var s = e.__a && q(Y, null, n.fallback);
3207
+ return s && (s.__h = null), [q(Y, null, e.__a ? null : n.children), s];
2940
3208
  };
2941
- var Mt = function(n, e, t) {
3209
+ var At = function(n, e, t) {
2942
3210
  if (++t[1] === t[0] && n.o.delete(e), n.props.revealOrder && (n.props.revealOrder[0] !== "t" || !n.o.size))
2943
3211
  for (t = n.u; t; ) {
2944
3212
  for (; t.length > 3; )
@@ -2948,12 +3216,12 @@ var Mt = function(n, e, t) {
2948
3216
  n.u = t = t[2];
2949
3217
  }
2950
3218
  };
2951
- function Di(n) {
3219
+ function ji(n) {
2952
3220
  return this.getChildContext = function() {
2953
3221
  return n.context;
2954
3222
  }, n.children;
2955
3223
  }
2956
- function Li(n) {
3224
+ function Vi(n) {
2957
3225
  var e = this, t = n.i;
2958
3226
  e.componentWillUnmount = function() {
2959
3227
  ae(null, e.l), e.l = null, e.i = null;
@@ -2963,34 +3231,34 @@ function Li(n) {
2963
3231
  this.childNodes.push(i), e.i.appendChild(i);
2964
3232
  }, removeChild: function(i) {
2965
3233
  this.childNodes.splice(this.childNodes.indexOf(i) >>> 1, 1), e.i.removeChild(i);
2966
- } }), ae(j(Di, { context: e.context }, n.__v), e.l);
3234
+ } }), ae(q(ji, { context: e.context }, n.__v), e.l);
2967
3235
  }
2968
- function zi(n, e) {
2969
- var t = j(Li, { __v: n, i: e });
3236
+ function qi(n, e) {
3237
+ var t = q(Vi, { __v: n, i: e });
2970
3238
  return t.containerInfo = e, t;
2971
3239
  }
2972
- (Te.prototype = new F()).__a = function(n) {
2973
- var e = this, t = Cn(e.__v), i = e.o.get(n);
3240
+ (xe.prototype = new F()).__a = function(n) {
3241
+ var e = this, t = $n(e.__v), i = e.o.get(n);
2974
3242
  return i[0]++, function(s) {
2975
3243
  var o = function() {
2976
- e.props.revealOrder ? (i.push(s), Mt(e, n, i)) : s();
3244
+ e.props.revealOrder ? (i.push(s), At(e, n, i)) : s();
2977
3245
  };
2978
3246
  t ? t(o) : o();
2979
3247
  };
2980
- }, Te.prototype.render = function(n) {
3248
+ }, xe.prototype.render = function(n) {
2981
3249
  this.u = null, this.o = /* @__PURE__ */ new Map();
2982
3250
  var e = Me(n.children);
2983
3251
  n.revealOrder && n.revealOrder[0] === "b" && e.reverse();
2984
3252
  for (var t = e.length; t--; )
2985
3253
  this.o.set(e[t], this.u = [1, 0, this.u]);
2986
3254
  return n.children;
2987
- }, Te.prototype.componentDidUpdate = Te.prototype.componentDidMount = function() {
3255
+ }, xe.prototype.componentDidUpdate = xe.prototype.componentDidMount = function() {
2988
3256
  var n = this;
2989
3257
  this.o.forEach(function(e, t) {
2990
- Mt(n, t, e);
3258
+ At(n, t, e);
2991
3259
  });
2992
3260
  };
2993
- var Hi = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Oi = /^(?: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]/, Bi = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Pi = /[A-Z0-9]/g, Ri = typeof document < "u", Fi = function(n) {
3261
+ var Yi = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Xi = /^(?: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]/, Zi = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Ji = /[A-Z0-9]/g, Gi = typeof document < "u", Ki = function(n) {
2994
3262
  return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(n);
2995
3263
  };
2996
3264
  F.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(n) {
@@ -3000,91 +3268,91 @@ F.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveP
3000
3268
  Object.defineProperty(this, n, { configurable: !0, writable: !0, value: e });
3001
3269
  } });
3002
3270
  });
3003
- var $t = b.event;
3004
- function Ui() {
3271
+ var It = b.event;
3272
+ function Qi() {
3005
3273
  }
3006
- function Wi() {
3274
+ function es() {
3007
3275
  return this.cancelBubble;
3008
3276
  }
3009
- function Vi() {
3277
+ function ts() {
3010
3278
  return this.defaultPrevented;
3011
3279
  }
3012
3280
  b.event = function(n) {
3013
- return $t && (n = $t(n)), n.persist = Ui, n.isPropagationStopped = Wi, n.isDefaultPrevented = Vi, n.nativeEvent = n;
3281
+ return It && (n = It(n)), n.persist = Qi, n.isPropagationStopped = es, n.isDefaultPrevented = ts, n.nativeEvent = n;
3014
3282
  };
3015
- var qi = { enumerable: !1, configurable: !0, get: function() {
3283
+ var ns = { enumerable: !1, configurable: !0, get: function() {
3016
3284
  return this.class;
3017
- } }, At = b.vnode;
3285
+ } }, Dt = b.vnode;
3018
3286
  b.vnode = function(n) {
3019
3287
  typeof n.type == "string" && function(e) {
3020
3288
  var t = e.props, i = e.type, s = {};
3021
3289
  for (var o in t) {
3022
3290
  var a = t[o];
3023
- if (!(o === "value" && "defaultValue" in t && a == null || Ri && o === "children" && i === "noscript" || o === "class" || o === "className")) {
3024
- var r = o.toLowerCase();
3025
- o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && a === !0 ? a = "" : r === "ondoubleclick" ? o = "ondblclick" : r !== "onchange" || i !== "input" && i !== "textarea" || Fi(t.type) ? r === "onfocus" ? o = "onfocusin" : r === "onblur" ? o = "onfocusout" : Bi.test(o) ? o = r : i.indexOf("-") === -1 && Oi.test(o) ? o = o.replace(Pi, "-$&").toLowerCase() : a === null && (a = void 0) : r = o = "oninput", r === "oninput" && s[o = r] && (o = "oninputCapture"), s[o] = a;
3291
+ if (!(o === "value" && "defaultValue" in t && a == null || Gi && o === "children" && i === "noscript" || o === "class" || o === "className")) {
3292
+ var c = o.toLowerCase();
3293
+ o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && a === !0 ? a = "" : c === "ondoubleclick" ? o = "ondblclick" : c !== "onchange" || i !== "input" && i !== "textarea" || Ki(t.type) ? c === "onfocus" ? o = "onfocusin" : c === "onblur" ? o = "onfocusout" : Zi.test(o) ? o = c : i.indexOf("-") === -1 && Xi.test(o) ? o = o.replace(Ji, "-$&").toLowerCase() : a === null && (a = void 0) : c = o = "oninput", c === "oninput" && s[o = c] && (o = "oninputCapture"), s[o] = a;
3026
3294
  }
3027
3295
  }
3028
3296
  i == "select" && s.multiple && Array.isArray(s.value) && (s.value = Me(t.children).forEach(function(u) {
3029
3297
  u.props.selected = s.value.indexOf(u.props.value) != -1;
3030
3298
  })), i == "select" && s.defaultValue != null && (s.value = Me(t.children).forEach(function(u) {
3031
3299
  u.props.selected = s.multiple ? s.defaultValue.indexOf(u.props.value) != -1 : s.defaultValue == u.props.value;
3032
- })), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className", qi)) : (t.className && !t.class || t.class && t.className) && (s.class = s.className = t.className), e.props = s;
3033
- }(n), n.$$typeof = Hi, At && At(n);
3300
+ })), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className", ns)) : (t.className && !t.class || t.class && t.className) && (s.class = s.className = t.className), e.props = s;
3301
+ }(n), n.$$typeof = Yi, Dt && Dt(n);
3034
3302
  };
3035
- var It = b.__r;
3303
+ var Lt = b.__r;
3036
3304
  b.__r = function(n) {
3037
- It && It(n), n.__c;
3305
+ Lt && Lt(n), n.__c;
3038
3306
  };
3039
- var Dt = b.diffed;
3307
+ var zt = b.diffed;
3040
3308
  b.diffed = function(n) {
3041
- Dt && Dt(n);
3309
+ zt && zt(n);
3042
3310
  var e = n.props, t = n.__e;
3043
3311
  t != null && n.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value);
3044
3312
  };
3045
- var _e = /* @__PURE__ */ new Map();
3046
- function ji(n) {
3047
- var e = _e.get(n);
3313
+ var ge = /* @__PURE__ */ new Map();
3314
+ function is(n) {
3315
+ var e = ge.get(n);
3048
3316
  e && e.destroy();
3049
3317
  }
3050
- function Yi(n) {
3051
- var e = _e.get(n);
3318
+ function ss(n) {
3319
+ var e = ge.get(n);
3052
3320
  e && e.update();
3053
3321
  }
3054
- var fe = null;
3055
- typeof window > "u" ? ((fe = function(n) {
3322
+ var me = null;
3323
+ typeof window > "u" ? ((me = function(n) {
3056
3324
  return n;
3057
3325
  }).destroy = function(n) {
3058
3326
  return n;
3059
- }, fe.update = function(n) {
3327
+ }, me.update = function(n) {
3060
3328
  return n;
3061
- }) : ((fe = function(n, e) {
3329
+ }) : ((me = function(n, e) {
3062
3330
  return n && Array.prototype.forEach.call(n.length ? n : [n], function(t) {
3063
3331
  return function(i) {
3064
- if (i && i.nodeName && i.nodeName === "TEXTAREA" && !_e.has(i)) {
3065
- var s, o = null, a = window.getComputedStyle(i), r = (s = i.value, function() {
3332
+ if (i && i.nodeName && i.nodeName === "TEXTAREA" && !ge.has(i)) {
3333
+ var s, o = null, a = window.getComputedStyle(i), c = (s = i.value, function() {
3066
3334
  h({ testForHeightReduction: s === "" || !i.value.startsWith(s), restoreTextAlign: null }), s = i.value;
3067
3335
  }), u = (function(l) {
3068
- i.removeEventListener("autosize:destroy", u), i.removeEventListener("autosize:update", p), i.removeEventListener("input", r), window.removeEventListener("resize", p), Object.keys(l).forEach(function(v) {
3069
- return i.style[v] = l[v];
3070
- }), _e.delete(i);
3336
+ i.removeEventListener("autosize:destroy", u), i.removeEventListener("autosize:update", p), i.removeEventListener("input", c), window.removeEventListener("resize", p), Object.keys(l).forEach(function(m) {
3337
+ return i.style[m] = l[m];
3338
+ }), ge.delete(i);
3071
3339
  }).bind(i, { height: i.style.height, resize: i.style.resize, textAlign: i.style.textAlign, overflowY: i.style.overflowY, overflowX: i.style.overflowX, wordWrap: i.style.wordWrap });
3072
- i.addEventListener("autosize:destroy", u), i.addEventListener("autosize:update", p), i.addEventListener("input", r), window.addEventListener("resize", p), i.style.overflowX = "hidden", i.style.wordWrap = "break-word", _e.set(i, { destroy: u, update: p }), p();
3340
+ i.addEventListener("autosize:destroy", u), i.addEventListener("autosize:update", p), i.addEventListener("input", c), window.addEventListener("resize", p), i.style.overflowX = "hidden", i.style.wordWrap = "break-word", ge.set(i, { destroy: u, update: p }), p();
3073
3341
  }
3074
3342
  function h(l) {
3075
- var v, _, d = l.restoreTextAlign, f = d === void 0 ? null : d, m = l.testForHeightReduction, w = m === void 0 || m, g = a.overflowY;
3076
- if (i.scrollHeight !== 0 && (a.resize === "vertical" ? i.style.resize = "none" : a.resize === "both" && (i.style.resize = "horizontal"), w && (v = function(C) {
3077
- for (var S = []; C && C.parentNode && C.parentNode instanceof Element; )
3078
- C.parentNode.scrollTop && S.push([C.parentNode, C.parentNode.scrollTop]), C = C.parentNode;
3343
+ var m, _, d = l.restoreTextAlign, f = d === void 0 ? null : d, v = l.testForHeightReduction, w = v === void 0 || v, g = a.overflowY;
3344
+ if (i.scrollHeight !== 0 && (a.resize === "vertical" ? i.style.resize = "none" : a.resize === "both" && (i.style.resize = "horizontal"), w && (m = function(T) {
3345
+ for (var x = []; T && T.parentNode && T.parentNode instanceof Element; )
3346
+ T.parentNode.scrollTop && x.push([T.parentNode, T.parentNode.scrollTop]), T = T.parentNode;
3079
3347
  return function() {
3080
- return S.forEach(function(O) {
3348
+ return x.forEach(function(O) {
3081
3349
  var L = O[0], U = O[1];
3082
3350
  L.style.scrollBehavior = "auto", L.scrollTop = U, L.style.scrollBehavior = null;
3083
3351
  });
3084
3352
  };
3085
- }(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", f && (i.style.textAlign = f), v && v(), o !== _ && (i.dispatchEvent(new Event("autosize:resized", { bubbles: !0 })), o = _), g !== a.overflow && !f)) {
3086
- var T = a.textAlign;
3087
- a.overflow === "hidden" && (i.style.textAlign = T === "start" ? "end" : "start"), h({ restoreTextAlign: T, testForHeightReduction: !0 });
3353
+ }(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", f && (i.style.textAlign = f), m && m(), o !== _ && (i.dispatchEvent(new Event("autosize:resized", { bubbles: !0 })), o = _), g !== a.overflow && !f)) {
3354
+ var C = a.textAlign;
3355
+ a.overflow === "hidden" && (i.style.textAlign = C === "start" ? "end" : "start"), h({ restoreTextAlign: C, testForHeightReduction: !0 });
3088
3356
  }
3089
3357
  }
3090
3358
  function p() {
@@ -3093,12 +3361,12 @@ typeof window > "u" ? ((fe = function(n) {
3093
3361
  }(t);
3094
3362
  }), n;
3095
3363
  }).destroy = function(n) {
3096
- return n && Array.prototype.forEach.call(n.length ? n : [n], ji), n;
3097
- }, fe.update = function(n) {
3098
- return n && Array.prototype.forEach.call(n.length ? n : [n], Yi), n;
3364
+ return n && Array.prototype.forEach.call(n.length ? n : [n], is), n;
3365
+ }, me.update = function(n) {
3366
+ return n && Array.prototype.forEach.call(n.length ? n : [n], ss), n;
3099
3367
  });
3100
- var Lt = fe, E = /* @__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))(E || {});
3101
- class zt {
3368
+ var Ht = me, E = /* @__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))(E || {});
3369
+ class Ot {
3102
3370
  /**
3103
3371
  * 聊天窗触发提问回调
3104
3372
  *
@@ -3124,7 +3392,7 @@ class zt {
3124
3392
  * @date 2023-10-16 16:10:29
3125
3393
  * @type {Signal<ChatMessage[]>}
3126
3394
  */
3127
- x(this, "messages", J([]));
3395
+ S(this, "messages", G([]));
3128
3396
  /**
3129
3397
  * 素材列表
3130
3398
  *
@@ -3132,7 +3400,7 @@ class zt {
3132
3400
  * @date 2025-02-27 18:02:46
3133
3401
  * @type {Signal<IMaterial[]>}
3134
3402
  */
3135
- x(this, "materials", J([]));
3403
+ S(this, "materials", G([]));
3136
3404
  /**
3137
3405
  * 聊天框输入值
3138
3406
  *
@@ -3140,7 +3408,7 @@ class zt {
3140
3408
  * @date 2023-10-16 15:10:43
3141
3409
  * @type {Signal<string>}
3142
3410
  */
3143
- x(this, "input", J(""));
3411
+ S(this, "input", G(""));
3144
3412
  /**
3145
3413
  * 是否加载中
3146
3414
  *
@@ -3148,7 +3416,7 @@ class zt {
3148
3416
  * @date 2025-03-10 18:03:42
3149
3417
  * @type {Signal<boolean>}
3150
3418
  */
3151
- x(this, "isLoading", J(!1));
3419
+ S(this, "isLoading", G(!1));
3152
3420
  /**
3153
3421
  * 视图参数
3154
3422
  *
@@ -3156,7 +3424,7 @@ class zt {
3156
3424
  * @date 2025-02-24 14:02:23
3157
3425
  * @type {object}
3158
3426
  */
3159
- x(this, "context");
3427
+ S(this, "context");
3160
3428
  /**
3161
3429
  * 视图参数
3162
3430
  *
@@ -3164,7 +3432,7 @@ class zt {
3164
3432
  * @date 2025-02-24 14:02:32
3165
3433
  * @type {object}
3166
3434
  */
3167
- x(this, "params");
3435
+ S(this, "params");
3168
3436
  /**
3169
3437
  * 应用实体标记
3170
3438
  *
@@ -3172,7 +3440,7 @@ class zt {
3172
3440
  * @date 2025-02-24 14:02:10
3173
3441
  * @type {string}
3174
3442
  */
3175
- x(this, "appDataEntityId");
3443
+ S(this, "appDataEntityId");
3176
3444
  /**
3177
3445
  * 话题标识
3178
3446
  *
@@ -3180,7 +3448,7 @@ class zt {
3180
3448
  * @date 2025-02-24 18:02:02
3181
3449
  * @type {(string | undefined)}
3182
3450
  */
3183
- x(this, "topicId");
3451
+ S(this, "topicId");
3184
3452
  /**
3185
3453
  * 话题数据
3186
3454
  *
@@ -3188,8 +3456,14 @@ class zt {
3188
3456
  * @date 2025-03-10 16:03:26
3189
3457
  * @type {(ITopic | undefined)}
3190
3458
  */
3191
- x(this, "topic");
3192
- this.opts = e, this.context = e.context, this.params = e.params, this.appDataEntityId = e.appDataEntityId, this.topicId = e.topicId, this.topic = e.topic, this.fecthHistory();
3459
+ S(this, "topic");
3460
+ /**
3461
+ * @description 聊天sessionid
3462
+ * @type {string}
3463
+ * @memberof AiChatController
3464
+ */
3465
+ S(this, "chatSessionid", "");
3466
+ this.opts = e, this.context = e.context, this.params = e.params, this.appDataEntityId = e.appDataEntityId, this.topicId = e.topicId, this.topic = e.topic, this.topicId ? this.chatSessionid = mt(this.topicId) : this.chatSessionid = mt(ce()), this.fecthHistory();
3193
3467
  }
3194
3468
  /**
3195
3469
  * 获取历史记录
@@ -3200,7 +3474,7 @@ class zt {
3200
3474
  */
3201
3475
  async fecthHistory() {
3202
3476
  if (this.topicId) {
3203
- const t = await q.getData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId);
3477
+ const t = await V.getData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId);
3204
3478
  if (t && t.data && t.data.length > 0)
3205
3479
  return t.data.forEach((i) => {
3206
3480
  const s = {
@@ -3217,10 +3491,11 @@ class zt {
3217
3491
  }
3218
3492
  return await this.opts.history(this.context, this.params, {
3219
3493
  appDataEntityId: this.appDataEntityId,
3220
- appendCurData: this.opts.appendCurData
3494
+ appendCurData: this.opts.appendCurData,
3495
+ sessionid: this.chatSessionid
3221
3496
  }) && this.opts.appendCurContent && this.addMessage({
3222
3497
  state: 30,
3223
- messageid: Ae(),
3498
+ messageid: ce(),
3224
3499
  role: "USER",
3225
3500
  type: "DEFAULT",
3226
3501
  content: this.opts.appendCurContent,
@@ -3239,10 +3514,13 @@ class zt {
3239
3514
  return;
3240
3515
  const e = {
3241
3516
  id: this.topicId,
3242
- data: this.messages.value.map((t) => t._origin),
3517
+ data: this.messages.value.map((t) => ({
3518
+ ...t._origin,
3519
+ toolcalls: t.toolcalls
3520
+ })),
3243
3521
  timestamp: (/* @__PURE__ */ new Date()).getTime()
3244
3522
  };
3245
- await q.updateData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, e);
3523
+ await V.updateData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, e);
3246
3524
  }
3247
3525
  /**
3248
3526
  * 设置聊天框值
@@ -3263,7 +3541,7 @@ class zt {
3263
3541
  */
3264
3542
  addMessage(e) {
3265
3543
  const t = this.messages.value.find((i) => i.messageid === e.messageid);
3266
- t ? (t.update(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new V(e)], this.asyncToIndexDB();
3544
+ t ? (t.update(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new j(e)], this.asyncToIndexDB();
3267
3545
  }
3268
3546
  /**
3269
3547
  * 更新消息完成状态
@@ -3286,10 +3564,11 @@ class zt {
3286
3564
  */
3287
3565
  replaceMessage(e) {
3288
3566
  const t = this.messages.value.findIndex((i) => i.messageid === e.messageid);
3289
- t !== -1 ? (this.messages.value[t] = new V(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new V(e)], this.asyncToIndexDB(), e.type === "DEFAULT" && this.opts.recommendPrompt && this.opts.recommendPrompt(this.context, this.params, {
3567
+ t !== -1 ? (this.messages.value[t] = new j(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new j(e)], this.asyncToIndexDB(), e.type === "DEFAULT" && this.opts.recommendPrompt && this.opts.recommendPrompt(this.context, this.params, {
3290
3568
  appDataEntityId: this.appDataEntityId,
3291
3569
  message: {
3292
- messages: [e]
3570
+ messages: [e],
3571
+ sessionid: this.chatSessionid
3293
3572
  }
3294
3573
  }).then((i) => {
3295
3574
  i && i.content && this.updateRecommendPrompt(e, i.content);
@@ -3306,9 +3585,9 @@ class zt {
3306
3585
  const t = this.messages.value.findIndex((i) => i.messageid === e.messageid);
3307
3586
  if (t !== -1) {
3308
3587
  const i = this.messages.value[t];
3309
- e.content = i.content, this.messages.value[t] = new V(e), this.messages.value = [...this.messages.value];
3588
+ e.content = i.content, this.messages.value[t] = new j(e), this.messages.value = [...this.messages.value];
3310
3589
  } else
3311
- this.messages.value = [...this.messages.value, new V(e)];
3590
+ this.messages.value = [...this.messages.value, new j(e)];
3312
3591
  await this.asyncToIndexDB();
3313
3592
  }
3314
3593
  /**
@@ -3327,7 +3606,19 @@ class zt {
3327
3606
  s.state && s.state === "successed" && t.push(i);
3328
3607
  } else
3329
3608
  t.push(i);
3330
- }), this.materials.value = []), t && t.length > 0 && (e = sn.stringify(t)), e;
3609
+ }), this.materials.value = []), t && t.length > 0 && (e = an.stringify(t)), e;
3610
+ }
3611
+ /**
3612
+ * @description 获取当前会话的消息集合
3613
+ * @private
3614
+ * @returns {*} {IChatMessage[]}
3615
+ * @memberof AiChatController
3616
+ */
3617
+ getMessages() {
3618
+ const e = this.messages.value.filter((t) => t.type !== "ERROR").map((t) => t._origin);
3619
+ return e.forEach((t) => {
3620
+ t.content = t.content.replace(new RegExp("\\<tool_call\\>[^]*?\\<\\/tool_call\\>", "gs"), "").trim();
3621
+ }), e;
3331
3622
  }
3332
3623
  /**
3333
3624
  * 提问
@@ -3340,18 +3631,18 @@ class zt {
3340
3631
  try {
3341
3632
  this.isLoading.value = !0, this.messages.value.forEach((i, s) => {
3342
3633
  const o = i._origin;
3343
- o.suggestions && (o.suggestions = void 0, this.messages.value[s] = new V(o));
3634
+ o.suggestions && (o.suggestions = void 0, this.messages.value[s] = new j(o));
3344
3635
  }), this.messages.value = [...this.messages.value], this.asyncToIndexDB();
3345
3636
  let t = this.stringlyMaterialResource();
3346
3637
  t ? t += "\n".concat(e) : t = e, this.addMessage({
3347
3638
  state: 30,
3348
- messageid: Ae(),
3639
+ messageid: ce(),
3349
3640
  role: "USER",
3350
3641
  type: "DEFAULT",
3351
3642
  content: t
3352
3643
  }), await this.opts.question(this, this.context, this.params, {
3353
3644
  appDataEntityId: this.appDataEntityId
3354
- }, this.messages.value.filter((i) => i.type !== "ERROR").map((i) => i._origin)), this.opts.action && this.opts.action("question", e), this.isLoading.value = !1;
3645
+ }, this.getMessages(), this.chatSessionid), this.opts.action && this.opts.action("question", e), this.isLoading.value = !1;
3355
3646
  } finally {
3356
3647
  this.isLoading.value = !1;
3357
3648
  }
@@ -3402,11 +3693,11 @@ class zt {
3402
3693
  if (t)
3403
3694
  this.messages.value.splice(i + 1, this.messages.value.length - i - 1), this.messages.value = [...this.messages.value], await this.opts.question(this, this.context, this.params, {
3404
3695
  appDataEntityId: this.appDataEntityId
3405
- }, this.messages.value.filter((s) => s.type !== "ERROR").map((s) => s._origin));
3696
+ }, this.getMessages(), this.chatSessionid);
3406
3697
  else if (i === this.messages.value.length - 1)
3407
3698
  this.messages.value.pop(), this.messages.value = [...this.messages.value], await this.opts.question(this, this.context, this.params, {
3408
3699
  appDataEntityId: this.appDataEntityId
3409
- }, this.messages.value.filter((s) => s.type !== "ERROR").map((s) => s._origin));
3700
+ }, this.getMessages(), this.chatSessionid);
3410
3701
  else {
3411
3702
  const s = this.messages.value[i - 1].content;
3412
3703
  this.messages.value.splice(i - 1, 2), this.question(s);
@@ -3424,7 +3715,7 @@ class zt {
3424
3715
  */
3425
3716
  copyMessage(e) {
3426
3717
  const t = e.realcontent;
3427
- nn.copy(t), this.opts.action && this.opts.action("copymsg", e);
3718
+ on.copy(t), this.opts.action && this.opts.action("copymsg", e);
3428
3719
  }
3429
3720
  /**
3430
3721
  * 重置对话
@@ -3432,9 +3723,10 @@ class zt {
3432
3723
  * @memberof AiChatController
3433
3724
  */
3434
3725
  async resetTopic() {
3435
- await this.abortQuestion(), this.topicId && await q.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId), this.messages.value = [], this.opts.history(this.context, this.params, {
3726
+ await this.abortQuestion(), this.topicId && await V.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId), this.messages.value = [], this.opts.history(this.context, this.params, {
3436
3727
  appDataEntityId: this.appDataEntityId,
3437
- appendCurData: this.opts.appendCurData
3728
+ appendCurData: this.opts.appendCurData,
3729
+ sessionid: this.chatSessionid
3438
3730
  });
3439
3731
  }
3440
3732
  /**
@@ -3444,7 +3736,7 @@ class zt {
3444
3736
  * @date 2025-03-18 17:03:57
3445
3737
  */
3446
3738
  async clearTopic() {
3447
- await this.abortQuestion(), this.topicId && await q.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId), this.messages.value = [];
3739
+ await this.abortQuestion(), this.topicId && await V.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId), this.messages.value = [];
3448
3740
  }
3449
3741
  /**
3450
3742
  * 新增素材资源
@@ -3454,7 +3746,7 @@ class zt {
3454
3746
  * @param {IMaterial} data
3455
3747
  */
3456
3748
  addMaterial(e) {
3457
- this.materials.value.find((i) => i.id === e.id) ? this.materials.value = [...this.materials.value] : this.materials.value = [...this.materials.value, new je(e)];
3749
+ this.materials.value.find((i) => i.id === e.id) ? this.materials.value = [...this.materials.value] : this.materials.value = [...this.materials.value, new qe(e)];
3458
3750
  }
3459
3751
  /**
3460
3752
  * 替换素材资源
@@ -3466,7 +3758,7 @@ class zt {
3466
3758
  */
3467
3759
  replaceMaterial(e, t) {
3468
3760
  const i = this.materials.value.findIndex((s) => s.id === e);
3469
- i !== -1 ? (this.materials.value[i] = new je(t), this.materials.value = [...this.materials.value]) : this.materials.value = [...this.materials.value, new je(t)];
3761
+ i !== -1 ? (this.materials.value[i] = new qe(t), this.materials.value = [...this.materials.value]) : this.materials.value = [...this.materials.value, new qe(t)];
3470
3762
  }
3471
3763
  /**
3472
3764
  * 删除指定素材资源
@@ -3492,8 +3784,8 @@ class zt {
3492
3784
  return;
3493
3785
  const i = this.messages.value.findIndex((o) => o.messageid === e.messageid), {
3494
3786
  suggestions: s
3495
- } = Bn.parseMixedContent(t);
3496
- s && s.length > 0 && (e.suggestions = s, i !== -1 ? (this.messages.value[i] = new V(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new V(e)], this.asyncToIndexDB());
3787
+ } = jn.parseMixedContent(t);
3788
+ s && s.length > 0 && (e.suggestions = s, i !== -1 ? (this.messages.value[i] = new j(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new j(e)], this.asyncToIndexDB());
3497
3789
  }
3498
3790
  /**
3499
3791
  * 处理建议点击
@@ -3509,7 +3801,7 @@ class zt {
3509
3801
  const s = this.messages.value.findIndex((a) => a.messageid === e.messageid);
3510
3802
  if (s !== -1) {
3511
3803
  const a = this.messages.value[s]._origin;
3512
- a.suggestions = void 0, this.messages.value[s] = new V(a), this.messages.value = [...this.messages.value];
3804
+ a.suggestions = void 0, this.messages.value[s] = new j(a), this.messages.value = [...this.messages.value];
3513
3805
  }
3514
3806
  this.asyncToIndexDB();
3515
3807
  const {
@@ -3521,15 +3813,15 @@ class zt {
3521
3813
  const a = t.data.actionid;
3522
3814
  if (!a)
3523
3815
  throw new Error("actionid不能为空");
3524
- const r = {
3816
+ const c = {
3525
3817
  ...e
3526
3818
  };
3527
- Object.assign(r, {
3819
+ Object.assign(c, {
3528
3820
  topic: this.topic
3529
- }), r.msg.realcontent = e.realcontent, await this.opts.extendToolbarClick(i, {
3821
+ }), c.msg.realcontent = e.realcontent, await this.opts.extendToolbarClick(i, {
3530
3822
  id: a,
3531
3823
  appId: this.context.srfappid
3532
- }, this.context, this.params, r);
3824
+ }, this.context, this.params, c);
3533
3825
  }
3534
3826
  break;
3535
3827
  case "raw":
@@ -3540,7 +3832,7 @@ class zt {
3540
3832
  }
3541
3833
  }
3542
3834
  }
3543
- class Xi {
3835
+ class os {
3544
3836
  /**
3545
3837
  * Creates an instance of AiTopicController.
3546
3838
  * @author tony001
@@ -3555,7 +3847,7 @@ class Xi {
3555
3847
  * @date 2025-02-20 16:02:38
3556
3848
  * @type {Signal<ChatTopic[]>}
3557
3849
  */
3558
- x(this, "topics", J([]));
3850
+ S(this, "topics", G([]));
3559
3851
  /**
3560
3852
  * 激活话题
3561
3853
  *
@@ -3563,7 +3855,7 @@ class Xi {
3563
3855
  * @date 2025-02-24 16:02:44
3564
3856
  * @type {(Signal<ITopic | undefined>)}
3565
3857
  */
3566
- x(this, "activedTopic", J(void 0));
3858
+ S(this, "activedTopic", G(void 0));
3567
3859
  /**
3568
3860
  * 当前话题配置备份
3569
3861
  *
@@ -3572,7 +3864,7 @@ class Xi {
3572
3864
  * @public
3573
3865
  * @type {(ITopicOptions | undefined)}
3574
3866
  */
3575
- x(this, "currentTopicOptions");
3867
+ S(this, "currentTopicOptions");
3576
3868
  this.chat = e;
3577
3869
  }
3578
3870
  /**
@@ -3585,7 +3877,7 @@ class Xi {
3585
3877
  async fetchHistory(e) {
3586
3878
  const i = await e.configService(e.appid, "aitopics", e.type).load();
3587
3879
  i && i.length > 0 && i.forEach((s) => {
3588
- this.topics.value = [...this.topics.value, new pe(s)];
3880
+ this.topics.value = [...this.topics.value, new fe(s)];
3589
3881
  });
3590
3882
  }
3591
3883
  /**
@@ -3598,8 +3890,8 @@ class Xi {
3598
3890
  */
3599
3891
  async updateCurrentTopic(e) {
3600
3892
  this.currentTopicOptions = e;
3601
- const t = this.topics.value.findIndex((a) => a.id === e.id), i = new pe(e);
3602
- t !== -1 ? this.topics.value.splice(t, 1, new pe(e)) : this.topics.value = [...this.topics.value, new pe(e)];
3893
+ const t = this.topics.value.findIndex((a) => a.id === e.id), i = new fe(e);
3894
+ t !== -1 ? this.topics.value.splice(t, 1, new fe(e)) : this.topics.value = [...this.topics.value, new fe(e)];
3603
3895
  const s = this.topics.value.map((a) => ({
3604
3896
  appid: a.appid,
3605
3897
  id: a.id,
@@ -3628,8 +3920,8 @@ class Xi {
3628
3920
  let a = !0;
3629
3921
  if (e.beforeDelete && (a = await e.beforeDelete(t, i, s, o)), !a)
3630
3922
  return;
3631
- const r = this.topics.value.findIndex((l) => l.id === s.id);
3632
- r !== -1 && (this.topics.value.splice(r, 1), this.topics.value = [...this.topics.value]);
3923
+ const c = this.topics.value.findIndex((l) => l.id === s.id);
3924
+ c !== -1 && (this.topics.value.splice(c, 1), this.topics.value = [...this.topics.value]);
3633
3925
  const u = this.topics.value.map((l) => ({
3634
3926
  appid: l.appid,
3635
3927
  id: l.id,
@@ -3639,7 +3931,7 @@ class Xi {
3639
3931
  url: l.url,
3640
3932
  aiChat: l.aiChat
3641
3933
  })), h = e.configService(e.appid, "aitopics", e.type);
3642
- await (h == null ? void 0 : h.save(u)), await q.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, s.id), this.topics.value.length > 0 && s.id === ((p = this.activedTopic.value) == null ? void 0 : p.id) && this.handleTopicChange(this.topics.value[0]);
3934
+ await (h == null ? void 0 : h.save(u)), await V.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, s.id), this.topics.value.length > 0 && s.id === ((p = this.activedTopic.value) == null ? void 0 : p.id) && this.handleTopicChange(this.topics.value[0]);
3643
3935
  }
3644
3936
  /**
3645
3937
  * 更新话题数据
@@ -3684,13 +3976,13 @@ class Xi {
3684
3976
  */
3685
3977
  async handleTopicAction(e, t, i) {
3686
3978
  var o, a;
3687
- const s = this.topics.value.find((r) => r.id === t.id);
3979
+ const s = this.topics.value.find((c) => c.id === t.id);
3688
3980
  if (this.currentTopicOptions && s && s.aiChat) {
3689
3981
  const {
3690
- context: r,
3982
+ context: c,
3691
3983
  params: u
3692
3984
  } = s.aiChat;
3693
- e === "DELETE" ? await this.removeTopic(this.currentTopicOptions, r, u, s, i) : e === "RENAME" && await this.updateTopic(this.currentTopicOptions, t), (a = (o = this.currentTopicOptions).action) == null || a.call(o, e, r, u, t, i);
3985
+ e === "DELETE" ? await this.removeTopic(this.currentTopicOptions, c, u, s, i) : e === "RENAME" && await this.updateTopic(this.currentTopicOptions, t), (a = (o = this.currentTopicOptions).action) == null || a.call(o, e, c, u, t, i);
3694
3986
  }
3695
3987
  }
3696
3988
  /**
@@ -3715,7 +4007,7 @@ class Xi {
3715
4007
  sourceCaption: e.sourceCaption,
3716
4008
  url: e.url,
3717
4009
  aiChat: e.aiChat
3718
- }, o = new pe(s);
4010
+ }, o = new fe(s);
3719
4011
  this.topics.value = [...this.topics.value, o];
3720
4012
  const a = this.topics.value.map((p) => ({
3721
4013
  appid: p.appid,
@@ -3725,8 +4017,8 @@ class Xi {
3725
4017
  sourceCaption: p.sourceCaption,
3726
4018
  url: p.url,
3727
4019
  aiChat: p.aiChat
3728
- })), r = (h = this.currentTopicOptions) == null ? void 0 : h.configService(s.appid, "aitopics", s.type);
3729
- await (r == null ? void 0 : r.save(a)), this.handleTopicChange(o);
4020
+ })), c = (h = this.currentTopicOptions) == null ? void 0 : h.configService(s.appid, "aitopics", s.type);
4021
+ await (c == null ? void 0 : c.save(a)), this.handleTopicChange(o);
3730
4022
  }
3731
4023
  /**
3732
4024
  * 清空话题
@@ -3737,8 +4029,8 @@ class Xi {
3737
4029
  async clearTopic() {
3738
4030
  var o;
3739
4031
  const e = this.topics.value.find((a) => {
3740
- var r;
3741
- return a.id === ((r = this.activedTopic.value) == null ? void 0 : r.id);
4032
+ var c;
4033
+ return a.id === ((c = this.activedTopic.value) == null ? void 0 : c.id);
3742
4034
  });
3743
4035
  if (!this.currentTopicOptions || !e)
3744
4036
  return;
@@ -3747,7 +4039,7 @@ class Xi {
3747
4039
  return;
3748
4040
  await Promise.all(this.topics.value.map((a) => {
3749
4041
  if (a.id !== (e == null ? void 0 : e.id))
3750
- return q.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, a.id);
4042
+ return V.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, a.id);
3751
4043
  })), this.topics.value = e ? [e] : [];
3752
4044
  const i = (o = this.currentTopicOptions) == null ? void 0 : o.configService(this.currentTopicOptions.appid, "aitopics", this.currentTopicOptions.type), s = this.topics.value.map((a) => ({
3753
4045
  appid: a.appid,
@@ -3761,12 +4053,12 @@ class Xi {
3761
4053
  await (i == null ? void 0 : i.save(s));
3762
4054
  }
3763
4055
  }
3764
- class Tn {
4056
+ class En {
3765
4057
  constructor(e) {
3766
4058
  this.aiChat = e;
3767
4059
  }
3768
4060
  }
3769
- class Zi extends Tn {
4061
+ class as extends En {
3770
4062
  /**
3771
4063
  * 执行操作
3772
4064
  *
@@ -3795,7 +4087,7 @@ class Zi extends Tn {
3795
4087
  }
3796
4088
  }
3797
4089
  }
3798
- class Gi extends Tn {
4090
+ class rs extends En {
3799
4091
  /**
3800
4092
  * 执行操作
3801
4093
  *
@@ -3808,21 +4100,21 @@ class Gi extends Tn {
3808
4100
  multiple: s,
3809
4101
  accept: o,
3810
4102
  maxSize: a,
3811
- onSelect: r,
4103
+ onSelect: c,
3812
4104
  onUpload: u,
3813
4105
  onSuccess: h,
3814
4106
  onError: p,
3815
4107
  onProgress: l
3816
- } = i, v = {
4108
+ } = i, m = {
3817
4109
  multiple: s || !0,
3818
4110
  accept: o || "*/*",
3819
4111
  maxSize: a || 5 * 1024 * 1024,
3820
4112
  onSelect: (d) => {
3821
- r == null || r(d), d.length > 0 && d.forEach((f) => {
3822
- const m = this.buildMaterialObject(f);
3823
- Object.assign(m.metadata, {
4113
+ c == null || c(d), d.length > 0 && d.forEach((f) => {
4114
+ const v = this.buildMaterialObject(f);
4115
+ Object.assign(v.metadata, {
3824
4116
  state: "uploading"
3825
- }), this.aiChat.addMaterial(m);
4117
+ }), this.aiChat.addMaterial(v);
3826
4118
  });
3827
4119
  },
3828
4120
  onUpload: async (d, f) => u(d, f, {
@@ -3831,7 +4123,7 @@ class Gi extends Tn {
3831
4123
  }),
3832
4124
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3833
4125
  onSuccess: (d, f) => {
3834
- const m = {
4126
+ const v = {
3835
4127
  id: d.id,
3836
4128
  type: "ossfile",
3837
4129
  data: {
@@ -3848,19 +4140,19 @@ class Gi extends Tn {
3848
4140
  state: "successed"
3849
4141
  }
3850
4142
  };
3851
- this.aiChat.replaceMaterial(f.name, m), h == null || h(d, f);
4143
+ this.aiChat.replaceMaterial(f.name, v), h == null || h(d, f);
3852
4144
  },
3853
4145
  onError: (d, f) => {
3854
- const m = this.buildMaterialObject(f);
3855
- Object.assign(m.metadata, {
4146
+ const v = this.buildMaterialObject(f);
4147
+ Object.assign(v.metadata, {
3856
4148
  state: "failed"
3857
- }), this.aiChat.replaceMaterial(f.name, m), p == null || p(d, f);
4149
+ }), this.aiChat.replaceMaterial(f.name, v), p == null || p(d, f);
3858
4150
  },
3859
4151
  onProgress: (d, f) => {
3860
4152
  l == null || l(d, f);
3861
4153
  }
3862
4154
  };
3863
- new On(v).openFilePicker();
4155
+ new Wn(m).openFilePicker();
3864
4156
  }
3865
4157
  /**
3866
4158
  * 构建素材对象
@@ -3886,17 +4178,17 @@ class Gi extends Tn {
3886
4178
  };
3887
4179
  }
3888
4180
  }
3889
- class Ht {
4181
+ class Bt {
3890
4182
  static getMaterialHelper(e, t) {
3891
4183
  switch (e) {
3892
4184
  case "ossfile":
3893
- return new Gi(t);
4185
+ return new rs(t);
3894
4186
  default:
3895
- return new Zi(t);
4187
+ return new as(t);
3896
4188
  }
3897
4189
  }
3898
4190
  }
3899
- class Ji {
4191
+ class cs {
3900
4192
  /**
3901
4193
  * Creates an instance of ChatController.
3902
4194
  * @author tony001
@@ -3911,7 +4203,7 @@ class Ji {
3911
4203
  * @protected
3912
4204
  * @type {HTMLDivElement}
3913
4205
  */
3914
- x(this, "container");
4206
+ S(this, "container");
3915
4207
  /**
3916
4208
  * 默认模式(聊天框)和话题模式(支持多话题切换),聊天框为默认模式
3917
4209
  *
@@ -3920,7 +4212,7 @@ class Ji {
3920
4212
  * @protected
3921
4213
  * @type {('DEFAULT' | 'TOPIC')}
3922
4214
  */
3923
- x(this, "mode", "DEFAULT");
4215
+ S(this, "mode", "DEFAULT");
3924
4216
  /**
3925
4217
  * 是否挂载ai话题
3926
4218
  *
@@ -3929,7 +4221,7 @@ class Ji {
3929
4221
  * @protected
3930
4222
  * @type {boolean}
3931
4223
  */
3932
- x(this, "isMountedAiTopic", !1);
4224
+ S(this, "isMountedAiTopic", !1);
3933
4225
  /**
3934
4226
  * 容器配置备份
3935
4227
  *
@@ -3938,7 +4230,7 @@ class Ji {
3938
4230
  * @protected
3939
4231
  * @type {(IContainerOptions | undefined)}
3940
4232
  */
3941
- x(this, "backupChatOptions");
4233
+ S(this, "backupChatOptions");
3942
4234
  /**
3943
4235
  * 话题控制器
3944
4236
  *
@@ -3947,7 +4239,7 @@ class Ji {
3947
4239
  * @public
3948
4240
  * @type {AiTopicController}
3949
4241
  */
3950
- x(this, "aiTopic");
4242
+ S(this, "aiTopic");
3951
4243
  /**
3952
4244
  * 话题map
3953
4245
  *
@@ -3955,8 +4247,8 @@ class Ji {
3955
4247
  * @type {Map<string, AiChatController>}
3956
4248
  * @memberof ChatController
3957
4249
  */
3958
- x(this, "aiTopicMap", /* @__PURE__ */ new Map());
3959
- this.aiTopic = new Xi(this);
4250
+ S(this, "aiTopicMap", /* @__PURE__ */ new Map());
4251
+ this.aiTopic = new os(this);
3960
4252
  }
3961
4253
  /**
3962
4254
  * 聊天控制器
@@ -3977,7 +4269,7 @@ class Ji {
3977
4269
  * @return {*} {Promise<void>}
3978
4270
  */
3979
4271
  async initIndexDB() {
3980
- await q.checkTableExists(E.DATA_BASE_NAME, E.DATA_TABLE_NAME) || await q.createTable(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, E.DATA_TABLE_KEY_NAME, !1);
4272
+ await V.checkTableExists(E.DATA_BASE_NAME, E.DATA_TABLE_NAME) || await V.createTable(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, E.DATA_TABLE_KEY_NAME, !1);
3981
4273
  }
3982
4274
  /**
3983
4275
  * 创建聊天窗口(会同时显示出来)
@@ -4009,8 +4301,8 @@ class Ji {
4009
4301
  topicId: i == null ? void 0 : i.id,
4010
4302
  topic: i
4011
4303
  });
4012
- const s = new zt(t);
4013
- return this.aiTopicMap.set("".concat(i == null ? void 0 : i.id), s), ae(j(Pt, {
4304
+ const s = new Ot(t);
4305
+ return this.aiTopicMap.set("".concat(i == null ? void 0 : i.id), s), ae(q(Ft, {
4014
4306
  aiChat: s,
4015
4307
  aiTopic: this.aiTopic,
4016
4308
  mode: e.mode ? e.mode : "DEFAULT",
@@ -4039,7 +4331,7 @@ class Ji {
4039
4331
  * @param {ChatTopic} topic
4040
4332
  */
4041
4333
  switchAiChatController(e) {
4042
- var s, o, a, r, u;
4334
+ var s, o, a, c, u;
4043
4335
  const t = {
4044
4336
  ...this.backupChatOptions.chatOptions
4045
4337
  };
@@ -4060,13 +4352,13 @@ class Ji {
4060
4352
  recommendPrompt: this.backupChatOptions.chatOptions.recommendPrompt
4061
4353
  });
4062
4354
  let i;
4063
- this.aiTopicMap.has("".concat(e.id)) ? i = this.aiTopicMap.get("".concat(e.id)) : (i = new zt(t), this.aiTopicMap.set("".concat(e.id), i)), this.container && (ae(null, this.container), ae(j(Pt, {
4355
+ this.aiTopicMap.has("".concat(e.id)) ? i = this.aiTopicMap.get("".concat(e.id)) : (i = new Ot(t), this.aiTopicMap.set("".concat(e.id), i)), this.container && (ae(null, this.container), ae(q(Ft, {
4064
4356
  aiChat: i,
4065
4357
  aiTopic: this.aiTopic,
4066
4358
  mode: (s = this.backupChatOptions) != null && s.mode ? this.backupChatOptions.mode : "DEFAULT",
4067
4359
  containerOptions: (o = this.backupChatOptions) == null ? void 0 : o.containerOptions,
4068
4360
  caption: (a = this.backupChatOptions) != null && a.mode && this.backupChatOptions.mode === "TOPIC" ? "AI助手" : t.caption,
4069
- enableBackFill: (u = (r = this.backupChatOptions) == null ? void 0 : r.containerOptions) == null ? void 0 : u.enableBackFill,
4361
+ enableBackFill: (u = (c = this.backupChatOptions) == null ? void 0 : c.containerOptions) == null ? void 0 : u.enableBackFill,
4070
4362
  contentToolbarItems: t.contentToolbarItems,
4071
4363
  footerToolbarItems: t.footerToolbarItems,
4072
4364
  questionToolbarItems: t.questionToolbarItems,
@@ -4109,19 +4401,19 @@ class Ji {
4109
4401
  this.container && (ae(null, this.container), this.container.remove(), this.container = void 0);
4110
4402
  }
4111
4403
  }
4112
- const rs = new Ji();
4113
- const Ki = new M("chat-input-material"), Qi = (n) => {
4404
+ const gs = new cs();
4405
+ const ls = new k("chat-input-material"), us = (n) => {
4114
4406
  const e = n.controller.materials;
4115
- return c("div", {
4116
- className: Ki.b(),
4117
- children: e.value.map((t) => c(wn, {
4407
+ return r("div", {
4408
+ className: ls.b(),
4409
+ children: e.value.map((t) => r(Sn, {
4118
4410
  material: t,
4119
4411
  disabled: !1,
4120
4412
  controller: n.controller
4121
4413
  }, t.id))
4122
4414
  });
4123
4415
  };
4124
- const xn = ({
4416
+ const Mn = ({
4125
4417
  children: n,
4126
4418
  actions: e,
4127
4419
  // 接收行为数据
@@ -4132,14 +4424,14 @@ const xn = ({
4132
4424
  onAction: a
4133
4425
  // 接收行为事件回调
4134
4426
  }) => {
4135
- const r = new M("pop"), u = rn(rt), [h, p] = K(s || !1), l = P(null), v = P(null);
4136
- D(() => {
4427
+ const c = new k("pop"), u = pn(rt), [h, p] = K(s || !1), l = P(null), m = P(null);
4428
+ I(() => {
4137
4429
  s !== void 0 && p(s);
4138
- }, [s]), D(() => (v.current || (v.current = document.createElement("div"), v.current.className = r.b("content-container"), document.body.appendChild(v.current)), () => {
4139
- v.current && document.body.removeChild(v.current);
4140
- }), []), D(() => {
4430
+ }, [s]), I(() => (m.current || (m.current = document.createElement("div"), m.current.className = c.b("content-container"), document.body.appendChild(m.current)), () => {
4431
+ m.current && document.body.removeChild(m.current);
4432
+ }), []), I(() => {
4141
4433
  const d = (f) => {
4142
- l.current && !l.current.contains(f.target) && !f.target.closest(".".concat(r.b())) && !f.target.closest(".ibiz-quick-edit") && !f.target.closest(".ibiz-picker__transfer") && (p(!1), o == null || o(!1));
4434
+ l.current && !l.current.contains(f.target) && !f.target.closest(".".concat(c.b())) && !f.target.closest(".ibiz-quick-edit") && !f.target.closest(".ibiz-picker__transfer") && (p(!1), o == null || o(!1));
4143
4435
  };
4144
4436
  return h && document.addEventListener("mousedown", d), () => {
4145
4437
  document.removeEventListener("mousedown", d);
@@ -4151,7 +4443,7 @@ const xn = ({
4151
4443
  const d = l.current.getBoundingClientRect(), f = {
4152
4444
  position: "absolute",
4153
4445
  zIndex: u.zIndex + 1
4154
- }, m = {
4446
+ }, v = {
4155
4447
  bottom: {
4156
4448
  top: d.bottom + window.scrollY,
4157
4449
  left: d.left + window.scrollX
@@ -4175,13 +4467,13 @@ const xn = ({
4175
4467
  };
4176
4468
  return {
4177
4469
  ...f,
4178
- ...m[i]
4470
+ ...v[i]
4179
4471
  };
4180
4472
  };
4181
- return c("span", {
4182
- className: "".concat(r.b("trigger-container")),
4183
- children: [c("span", {
4184
- className: "".concat(r.b("trigger-element")),
4473
+ return r("span", {
4474
+ className: "".concat(c.b("trigger-container")),
4475
+ children: [r("span", {
4476
+ className: "".concat(c.b("trigger-element")),
4185
4477
  ref: l,
4186
4478
  onClick: (d) => {
4187
4479
  d.stopPropagation();
@@ -4189,77 +4481,77 @@ const xn = ({
4189
4481
  p(f), o == null || o(f);
4190
4482
  },
4191
4483
  children: n
4192
- }), h && v.current && zi(c("div", {
4193
- className: "".concat(r.b(), " pop-").concat(i),
4484
+ }), h && m.current && qi(r("div", {
4485
+ className: "".concat(c.b(), " pop-").concat(i),
4194
4486
  style: _(),
4195
- children: t || (e == null ? void 0 : e.map((d) => c("div", {
4487
+ children: t || (e == null ? void 0 : e.map((d) => r("div", {
4196
4488
  title: d.caption,
4197
- className: r.e("item"),
4489
+ className: c.e("item"),
4198
4490
  onMouseDown: (f) => {
4199
4491
  f.stopPropagation(), a == null || a(d.id, f);
4200
4492
  },
4201
- children: [d.icon, c("div", {
4202
- className: r.em("item", "caption"),
4493
+ children: [d.icon, r("div", {
4494
+ className: c.em("item", "caption"),
4203
4495
  children: d.caption
4204
4496
  })]
4205
4497
  }, d.id)))
4206
- }), v.current)]
4498
+ }), m.current)]
4207
4499
  });
4208
4500
  };
4209
- const $ = new M("chat-input"), Ot = window.SpeechRecognition || window.webkitSpeechRecognition, Bt = (n) => {
4501
+ const A = new k("chat-input"), Pt = window.SpeechRecognition || window.webkitSpeechRecognition, Rt = (n) => {
4210
4502
  var f;
4211
- const [e, t] = K(!1), i = P(null), s = n.controller.input, o = I(!1), a = P();
4212
- Ot && !a.current && (a.current = new Ot(), a.current.onstart = () => {
4503
+ const [e, t] = K(!1), i = P(null), s = n.controller.input, o = M(!1), a = P();
4504
+ Pt && !a.current && (a.current = new Pt(), a.current.onstart = () => {
4213
4505
  o.value = !0;
4214
4506
  }, a.current.onend = () => {
4215
4507
  o.value = !1;
4216
- }, a.current.onresult = (m) => {
4217
- var g, T, C;
4218
- const w = (C = (T = (g = m.results) == null ? void 0 : g[0]) == null ? void 0 : T[0]) == null ? void 0 : C.transcript;
4508
+ }, a.current.onresult = (v) => {
4509
+ var g, C, T;
4510
+ const w = (T = (C = (g = v.results) == null ? void 0 : g[0]) == null ? void 0 : C[0]) == null ? void 0 : T.transcript;
4219
4511
  w && (s.value = "".concat(s.value).concat(w));
4220
4512
  });
4221
- const r = () => {
4513
+ const c = () => {
4222
4514
  a.current && !o.value && a.current.start();
4223
- }, u = Fe((m) => {
4224
- s.value = m.target.value;
4515
+ }, u = Fe((v) => {
4516
+ s.value = v.target.value;
4225
4517
  }, [s]), h = B(() => s.value.length <= 0);
4226
- D(() => (i.current && Lt(i.current), () => {
4227
- i.current && Lt.destroy(i.current);
4518
+ I(() => (i.current && Ht(i.current), () => {
4519
+ i.current && Ht.destroy(i.current);
4228
4520
  }), [i]);
4229
4521
  const p = Fe(async () => {
4230
- var m;
4522
+ var v;
4231
4523
  try {
4232
4524
  const w = s.value;
4233
4525
  s.value = "", await n.controller.question(w);
4234
4526
  } catch (w) {
4235
4527
  console.error(w);
4236
4528
  } finally {
4237
- (m = i.current) == null || m.focus();
4529
+ (v = i.current) == null || v.focus();
4238
4530
  }
4239
4531
  }, [s]), l = Fe(async () => {
4240
4532
  try {
4241
4533
  n.controller.abortQuestion();
4242
- } catch (m) {
4243
- console.error(m);
4534
+ } catch (v) {
4535
+ console.error(v);
4244
4536
  }
4245
- }, [s]), v = (m) => {
4246
- m.code === "Enter" && !m.isComposing && (m.stopPropagation(), m.shiftKey === !1 && p());
4247
- }, _ = async (m) => {
4248
- await Ht.getMaterialHelper("ossfile", n.controller).excuteAction(m), t(!1);
4249
- }, d = async (m, w) => {
4250
- await Ht.getMaterialHelper("common", n.controller).excuteAction(m, w), t(!1);
4537
+ }, [s]), m = (v) => {
4538
+ v.code === "Enter" && !v.isComposing && (v.stopPropagation(), v.shiftKey === !1 && p());
4539
+ }, _ = async (v) => {
4540
+ await Bt.getMaterialHelper("ossfile", n.controller).excuteAction(v), t(!1);
4541
+ }, d = async (v, w) => {
4542
+ await Bt.getMaterialHelper("common", n.controller).excuteAction(v, w), t(!1);
4251
4543
  };
4252
- return c("div", {
4253
- className: $.b("wrapper"),
4254
- children: [c("div", {
4255
- className: $.b("material-wrapper"),
4256
- children: c(Qi, {
4544
+ return r("div", {
4545
+ className: A.b("wrapper"),
4546
+ children: [r("div", {
4547
+ className: A.b("material-wrapper"),
4548
+ children: r(us, {
4257
4549
  controller: n.controller
4258
4550
  })
4259
- }), c("div", {
4260
- className: $.b("main-wrapper"),
4261
- children: [c("textarea", {
4262
- className: $.e("textarea"),
4551
+ }), r("div", {
4552
+ className: A.b("main-wrapper"),
4553
+ children: [r("textarea", {
4554
+ className: A.e("textarea"),
4263
4555
  type: "text",
4264
4556
  rows: 6,
4265
4557
  autoCorrect: "off",
@@ -4267,150 +4559,150 @@ const $ = new M("chat-input"), Ot = window.SpeechRecognition || window.webkitSpe
4267
4559
  autoComplete: "off",
4268
4560
  value: s,
4269
4561
  onInput: u,
4270
- onKeyDown: v,
4562
+ onKeyDown: m,
4271
4563
  ref: i,
4272
4564
  disabled: n.controller.isLoading.value
4273
- }), c("div", {
4274
- className: $.b("action-wrapper"),
4275
- children: [c("div", {
4276
- className: "".concat($.be("action-wrapper", "action-item"), " ").concat($.is("disabled", n.controller.isLoading.value)),
4565
+ }), r("div", {
4566
+ className: A.b("action-wrapper"),
4567
+ children: [r("div", {
4568
+ className: "".concat(A.be("action-wrapper", "action-item"), " ").concat(A.is("disabled", n.controller.isLoading.value)),
4277
4569
  title: "上传资料",
4278
- children: c(xn, {
4279
- content: c("div", {
4280
- className: $.b("pop-actions"),
4281
- children: [c("div", {
4282
- className: $.b("pop-action-item"),
4283
- onClick: (m) => {
4284
- _(m);
4570
+ children: r(Mn, {
4571
+ content: r("div", {
4572
+ className: A.b("pop-actions"),
4573
+ children: [r("div", {
4574
+ className: A.b("pop-action-item"),
4575
+ onClick: (v) => {
4576
+ _(v);
4285
4577
  },
4286
- children: [c("span", {
4287
- className: $.b("pop-action-item-icon"),
4288
- children: c(gn, {})
4289
- }), c("span", {
4290
- className: $.b("pop-action-item-title"),
4578
+ children: [r("span", {
4579
+ className: A.b("pop-action-item-icon"),
4580
+ children: r(xn, {})
4581
+ }), r("span", {
4582
+ className: A.b("pop-action-item-title"),
4291
4583
  children: "文件资料"
4292
4584
  })]
4293
- }), (f = n.questionToolbarItems) == null ? void 0 : f.map((m) => {
4294
- var w, g, T;
4295
- return c("div", {
4296
- className: $.b("pop-action-item"),
4297
- onClick: (C) => {
4298
- d(C, m);
4585
+ }), (f = n.questionToolbarItems) == null ? void 0 : f.map((v) => {
4586
+ var w, g, C;
4587
+ return r("div", {
4588
+ className: A.b("pop-action-item"),
4589
+ onClick: (T) => {
4590
+ d(T, v);
4299
4591
  },
4300
- children: [c("span", {
4301
- className: $.b("pop-action-item-icon"),
4302
- children: typeof m.icon == "function" ? m.icon() : ((w = m.icon) == null ? void 0 : w.showIcon) && c(Y, {
4303
- children: (g = m.icon) != null && g.cssClass ? c("i", {
4304
- className: m.icon.cssClass
4305
- }) : (T = m.icon) != null && T.imagePath ? it(m.icon.imagePath) ? c("div", {
4592
+ children: [r("span", {
4593
+ className: A.b("pop-action-item-icon"),
4594
+ children: typeof v.icon == "function" ? v.icon() : ((w = v.icon) == null ? void 0 : w.showIcon) && r(Y, {
4595
+ children: (g = v.icon) != null && g.cssClass ? r("i", {
4596
+ className: v.icon.cssClass
4597
+ }) : (C = v.icon) != null && C.imagePath ? it(v.icon.imagePath) ? r("div", {
4306
4598
  dangerouslySetInnerHTML: {
4307
- __html: m.icon.imagePath
4599
+ __html: v.icon.imagePath
4308
4600
  }
4309
- }) : c("img", {
4310
- src: m.icon.imagePath
4601
+ }) : r("img", {
4602
+ src: v.icon.imagePath
4311
4603
  }) : null
4312
4604
  })
4313
- }), c("span", {
4314
- className: $.b("pop-action-item-title"),
4315
- children: m.label
4605
+ }), r("span", {
4606
+ className: A.b("pop-action-item-title"),
4607
+ children: v.label
4316
4608
  })]
4317
- }, m.id);
4609
+ }, v.id);
4318
4610
  })]
4319
4611
  }),
4320
4612
  position: "top-left",
4321
4613
  isOpen: e,
4322
4614
  onToggleOpen: t,
4323
- children: c(ri, {})
4615
+ children: r(vi, {})
4324
4616
  })
4325
- }), c("div", {
4617
+ }), r("div", {
4326
4618
  title: o.value ? "语音输入中..." : "语音输入",
4327
- className: "".concat($.be("action-wrapper", "action-item"), " ").concat($.is("disabled", n.controller.isLoading.value)),
4328
- onClick: r,
4329
- children: o.value ? c(ii, {}) : c(ni, {})
4330
- }), n.controller.isLoading.value ? c("div", {
4619
+ className: "".concat(A.be("action-wrapper", "action-item"), " ").concat(A.is("disabled", n.controller.isLoading.value)),
4620
+ onClick: c,
4621
+ children: o.value ? r(hi, {}) : r(di, {})
4622
+ }), n.controller.isLoading.value ? r("div", {
4331
4623
  title: "停止生成",
4332
- className: "".concat($.be("action-wrapper", "action-item")),
4624
+ className: "".concat(A.be("action-wrapper", "action-item")),
4333
4625
  onClick: l,
4334
- children: c(ui, {})
4335
- }) : c("div", {
4626
+ children: r(wi, {})
4627
+ }) : r("div", {
4336
4628
  title: "发送消息",
4337
- className: "".concat($.be("action-wrapper", "action-item"), " ").concat($.is("disabled", h.value)),
4629
+ className: "".concat(A.be("action-wrapper", "action-item"), " ").concat(A.is("disabled", h.value)),
4338
4630
  onClick: p,
4339
- children: c(Xn, {})
4631
+ children: r(ii, {})
4340
4632
  })]
4341
4633
  })]
4342
4634
  })]
4343
4635
  });
4344
4636
  };
4345
- const R = new M("chat-topic-item"), es = (n) => {
4637
+ const R = new k("chat-topic-item"), ds = (n) => {
4346
4638
  const {
4347
4639
  controller: e,
4348
4640
  topic: t,
4349
4641
  onClick: i,
4350
4642
  onAction: s
4351
4643
  } = n, o = P(null), a = B(() => {
4352
- var m;
4353
- return ((m = e.activedTopic.value) == null ? void 0 : m.id) === t.id;
4354
- }), [r, u] = K(!1), h = I(!1), p = (f) => {
4644
+ var v;
4645
+ return ((v = e.activedTopic.value) == null ? void 0 : v.id) === t.id;
4646
+ }), [c, u] = K(!1), h = M(!1), p = (f) => {
4355
4647
  f.stopPropagation(), s("LINK", f);
4356
- }, l = (f, m) => {
4357
- f === "DELETE" ? s("DELETE", m) : f === "RENAME" && (h.value = !0, setTimeout(() => {
4648
+ }, l = (f, v) => {
4649
+ f === "DELETE" ? s("DELETE", v) : f === "RENAME" && (h.value = !0, setTimeout(() => {
4358
4650
  var w;
4359
4651
  (w = o.current) == null || w.focus();
4360
4652
  }, 100)), u(!1);
4361
- }, v = (f) => {
4362
- var m;
4363
- f.stopPropagation(), t.data.caption = (m = f.target) == null ? void 0 : m.value;
4653
+ }, m = (f) => {
4654
+ var v;
4655
+ f.stopPropagation(), t.data.caption = (v = f.target) == null ? void 0 : v.value;
4364
4656
  }, _ = (f) => {
4365
4657
  f.stopPropagation(), h.value = !1, s("RENAME", f);
4366
4658
  }, d = (f) => {
4367
4659
  f.stopPropagation(), f.key === "Enter" && (h.value = !1);
4368
4660
  };
4369
- return c("div", {
4661
+ return r("div", {
4370
4662
  className: "".concat(R.b(), " ").concat(R.is("active", a.value), " ").concat(R.is("edit", h.value)),
4371
4663
  onClick: i.bind(void 0),
4372
- children: [c("div", {
4664
+ children: [r("div", {
4373
4665
  className: R.e("caption"),
4374
4666
  title: t.caption,
4375
- children: h.value ? c("input", {
4667
+ children: h.value ? r("input", {
4376
4668
  ref: o,
4377
4669
  value: t.caption,
4378
4670
  onBlur: _,
4379
4671
  onKeyDown: d,
4380
4672
  onClick: (f) => f.stopPropagation(),
4381
- onChange: (f) => v(f),
4673
+ onChange: (f) => m(f),
4382
4674
  className: R.em("caption", "editor")
4383
- }) : c("span", {
4675
+ }) : r("span", {
4384
4676
  className: R.em("caption", "text"),
4385
4677
  children: t.caption
4386
4678
  })
4387
- }), !h.value && c("div", {
4679
+ }), !h.value && r("div", {
4388
4680
  className: R.e("icon"),
4389
- children: [c("span", {
4681
+ children: [r("span", {
4390
4682
  title: "跳转主视图",
4391
4683
  className: R.em("icon", "item"),
4392
4684
  onClick: p.bind(void 0),
4393
- children: c(oi, {
4685
+ children: r(fi, {
4394
4686
  className: R.b("link-icon")
4395
4687
  })
4396
- }), a.value ? null : c(xn, {
4688
+ }), a.value ? null : r(Mn, {
4397
4689
  actions: [{
4398
4690
  id: "RENAME",
4399
4691
  caption: "重命名",
4400
- icon: c(fi, {})
4692
+ icon: r(Ti, {})
4401
4693
  }, {
4402
4694
  id: "DELETE",
4403
4695
  caption: "删除话题",
4404
- icon: c(_n, {})
4696
+ icon: r(Tn, {})
4405
4697
  }],
4406
4698
  position: "bottom",
4407
- isOpen: r,
4699
+ isOpen: c,
4408
4700
  onToggleOpen: u,
4409
4701
  onAction: l.bind(void 0),
4410
- children: c("span", {
4702
+ children: r("span", {
4411
4703
  className: R.em("icon", "item"),
4412
4704
  title: "更多",
4413
- children: c(si, {
4705
+ children: r(pi, {
4414
4706
  className: R.e("more-icon")
4415
4707
  })
4416
4708
  })
@@ -4418,103 +4710,103 @@ const R = new M("chat-topic-item"), es = (n) => {
4418
4710
  })]
4419
4711
  });
4420
4712
  };
4421
- const xe = new M("chat-search"), ts = (n) => {
4713
+ const Se = new k("chat-search"), hs = (n) => {
4422
4714
  const {
4423
4715
  className: e,
4424
4716
  value: t,
4425
4717
  placeholder: i,
4426
4718
  onChange: s
4427
- } = n, [o, a] = K(!1), r = (u) => {
4719
+ } = n, [o, a] = K(!1), c = (u) => {
4428
4720
  var h;
4429
4721
  u.stopPropagation(), s == null || s((h = u.target) == null ? void 0 : h.value);
4430
4722
  };
4431
- return c("div", {
4432
- className: "".concat(xe.b(), " ").concat(xe.is("focus", o), " ").concat(e || ""),
4433
- children: [c("div", {
4434
- className: xe.e("prefix"),
4435
- children: c(mi, {})
4436
- }), c("input", {
4723
+ return r("div", {
4724
+ className: "".concat(Se.b(), " ").concat(Se.is("focus", o), " ").concat(e || ""),
4725
+ children: [r("div", {
4726
+ className: Se.e("prefix"),
4727
+ children: r(Si, {})
4728
+ }), r("input", {
4437
4729
  value: t,
4438
- className: xe.e("inner"),
4730
+ className: Se.e("inner"),
4439
4731
  placeholder: i,
4440
4732
  onFocus: () => a(!0),
4441
4733
  onBlur: () => a(!1),
4442
- onChange: (u) => r(u)
4734
+ onChange: (u) => c(u)
4443
4735
  })]
4444
4736
  });
4445
4737
  };
4446
- const se = new M("chat-topics"), ns = (n) => {
4447
- const e = P(null), t = I(void 0), i = I([]);
4448
- D(() => {
4449
- i.value = n.controller.topics.value.filter((r) => {
4738
+ const se = new k("chat-topics"), ps = (n) => {
4739
+ const e = P(null), t = M(void 0), i = M([]);
4740
+ I(() => {
4741
+ i.value = n.controller.topics.value.filter((c) => {
4450
4742
  var u, h;
4451
- return (h = r.caption) == null ? void 0 : h.toLowerCase().includes(((u = t.value) == null ? void 0 : u.trim().toLowerCase()) || "");
4743
+ return (h = c.caption) == null ? void 0 : h.toLowerCase().includes(((u = t.value) == null ? void 0 : u.trim().toLowerCase()) || "");
4452
4744
  });
4453
4745
  }, [n.controller.topics.value]);
4454
- const s = (r) => {
4455
- n.controller.handleTopicChange(r);
4456
- }, o = (r, u, h) => {
4457
- n.controller.handleTopicAction(r, u, h);
4458
- }, a = (r) => {
4459
- t.value = r, i.value = n.controller.topics.value.filter((u) => {
4746
+ const s = (c) => {
4747
+ n.controller.handleTopicChange(c);
4748
+ }, o = (c, u, h) => {
4749
+ n.controller.handleTopicAction(c, u, h);
4750
+ }, a = (c) => {
4751
+ t.value = c, i.value = n.controller.topics.value.filter((u) => {
4460
4752
  var h, p;
4461
4753
  return (p = u.caption) == null ? void 0 : p.toLowerCase().includes(((h = t.value) == null ? void 0 : h.trim().toLowerCase()) || "");
4462
4754
  });
4463
4755
  };
4464
- return D(() => {
4465
- const r = e.current;
4466
- if (!r)
4756
+ return I(() => {
4757
+ const c = e.current;
4758
+ if (!c)
4467
4759
  return;
4468
- const u = r.querySelector(".ibiz-chat-topic-item.is-active");
4760
+ const u = c.querySelector(".ibiz-chat-topic-item.is-active");
4469
4761
  u == null || u.scrollIntoView({
4470
4762
  behavior: "smooth",
4471
4763
  block: "nearest"
4472
4764
  });
4473
- }, [n.controller.activedTopic.value]), c("div", {
4765
+ }, [n.controller.activedTopic.value]), r("div", {
4474
4766
  className: se.b(),
4475
- children: [c("div", {
4767
+ children: [r("div", {
4476
4768
  className: se.e("header"),
4477
- children: c(ts, {
4769
+ children: r(hs, {
4478
4770
  value: t.value,
4479
4771
  placeholder: "搜索话题",
4480
4772
  onChange: a.bind(void 0)
4481
4773
  })
4482
- }), c("div", {
4774
+ }), r("div", {
4483
4775
  ref: e,
4484
4776
  className: se.e("main"),
4485
- children: i.value && i.value.length > 0 ? i.value.map((r) => c(es, {
4486
- topic: r,
4777
+ children: i.value && i.value.length > 0 ? i.value.map((c) => r(ds, {
4778
+ topic: c,
4487
4779
  controller: n.controller,
4488
- onClick: () => s(r),
4489
- onAction: (u, h) => o(u, r, h)
4490
- }, r.id)) : c("div", {
4780
+ onClick: () => s(c),
4781
+ onAction: (u, h) => o(u, c, h)
4782
+ }, c.id)) : r("div", {
4491
4783
  className: se.e("empty"),
4492
4784
  children: "暂无话题"
4493
4785
  })
4494
- }), c("div", {
4786
+ }), r("div", {
4495
4787
  className: se.e("footer"),
4496
- children: c("div", {
4788
+ children: r("div", {
4497
4789
  title: "清空会话",
4498
4790
  className: se.e("action"),
4499
4791
  onClick: () => n.controller.clearTopic(),
4500
- children: [c(_n, {}), c("span", {
4792
+ children: [r(Tn, {}), r("span", {
4501
4793
  children: "清空会话"
4502
4794
  })]
4503
4795
  })
4504
4796
  })]
4505
4797
  });
4506
4798
  };
4507
- const oe = new M("chat-minimize"), is = (n) => {
4508
- const e = P(null), [t, i] = K(""), [s, o] = K(0), a = P(!1), r = {
4799
+ const oe = new k("chat-minimize"), fs = (n) => {
4800
+ const e = P(null), [t, i] = K(""), [s, o] = K(0), a = P(!1), c = {
4509
4801
  x: (window.innerWidth - 86) / window.innerWidth,
4510
4802
  y: (window.innerHeight - 86) / window.innerHeight
4511
4803
  }, u = B(() => {
4512
4804
  const d = n.controller.messages.value[n.controller.messages.value.length - 1];
4513
4805
  return d ? d.role === "ASSISTANT" && d.state === 20 && d.completed !== !0 : !1;
4514
4806
  }), h = (d) => {
4515
- const f = d.indexOf("<think>"), m = d.indexOf("</think>");
4807
+ const f = d.indexOf("<think>"), v = d.indexOf("</think>");
4516
4808
  let w = "", g = "";
4517
- return m === -1 ? (w = d.slice(f + 7), g = "") : (w = d.slice(f + 7, m), g = d.slice(m + 8)), {
4809
+ return v === -1 ? (w = d.slice(f + 7), g = "") : (w = d.slice(f + 7, v), g = d.slice(v + 8)), {
4518
4810
  thoughtContent: w,
4519
4811
  answerContent: g
4520
4812
  };
@@ -4525,91 +4817,91 @@ const oe = new M("chat-minimize"), is = (n) => {
4525
4817
  const f = n.controller.messages.value[n.controller.messages.value.length - 1];
4526
4818
  if (d = f.content, f.content.indexOf("<think>") !== -1) {
4527
4819
  const {
4528
- thoughtContent: m,
4820
+ thoughtContent: v,
4529
4821
  answerContent: w
4530
4822
  } = h(f.content);
4531
- d = m + w;
4823
+ d = v + w;
4532
4824
  }
4533
4825
  return d;
4534
4826
  }), l = () => {
4535
4827
  Object.assign(e.current.style, {
4536
- left: "".concat(r.x * 100, "%"),
4537
- top: "".concat(r.y * 100, "%")
4538
- }), localStorage.setItem(E.MINIMIZE_STYLY_CHCHE, JSON.stringify(r));
4539
- }, v = () => {
4828
+ left: "".concat(c.x * 100, "%"),
4829
+ top: "".concat(c.y * 100, "%")
4830
+ }), localStorage.setItem(E.MINIMIZE_STYLY_CHCHE, JSON.stringify(c));
4831
+ }, m = () => {
4540
4832
  const d = e.current;
4541
4833
  d && (d.onmousedown = (f) => {
4542
4834
  document.body.style.userSelect = "none";
4543
- const m = f.clientX - d.offsetLeft, w = f.clientY - d.offsetTop, g = Date.now(), T = (S) => {
4835
+ const v = f.clientX - d.offsetLeft, w = f.clientY - d.offsetTop, g = Date.now(), C = (x) => {
4544
4836
  const O = 56 / window.innerWidth, L = 56 / window.innerHeight, {
4545
4837
  x: U,
4546
4838
  y: z
4547
- } = on(S.clientX - m, S.clientY - w, O, L);
4548
- Object.assign(r, {
4839
+ } = rn(x.clientX - v, x.clientY - w, O, L);
4840
+ Object.assign(c, {
4549
4841
  x: U,
4550
4842
  y: z
4551
4843
  }), requestAnimationFrame(() => {
4552
4844
  l();
4553
4845
  });
4554
- }, C = () => {
4555
- const S = Date.now();
4556
- a.current = S - g > 300, document.body.style.userSelect = "", document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", C);
4846
+ }, T = () => {
4847
+ const x = Date.now();
4848
+ a.current = x - g > 300, document.body.style.userSelect = "", document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", T);
4557
4849
  };
4558
- document.addEventListener("mousemove", T), document.addEventListener("mouseup", C);
4850
+ document.addEventListener("mousemove", C), document.addEventListener("mouseup", T);
4559
4851
  });
4560
4852
  }, _ = () => {
4561
4853
  a.current || n.onClick();
4562
4854
  };
4563
- return D(() => {
4855
+ return I(() => {
4564
4856
  const d = localStorage.getItem(E.MINIMIZE_STYLY_CHCHE);
4565
4857
  if (d) {
4566
4858
  const f = JSON.parse(d);
4567
- Je(f) && Object.assign(r, f);
4859
+ Ge(f) && Object.assign(c, f);
4568
4860
  }
4569
- l(), v();
4570
- }, []), D(() => {
4861
+ l(), m();
4862
+ }, []), I(() => {
4571
4863
  if (s < p.value.length) {
4572
4864
  const d = setTimeout(() => {
4573
4865
  i((f) => f + p.value[s]), o((f) => f + 1);
4574
4866
  }, 100);
4575
4867
  return () => clearTimeout(d);
4576
4868
  }
4577
- }, [s, p.value]), c("div", {
4869
+ }, [s, p.value]), r("div", {
4578
4870
  ref: e,
4579
4871
  title: n.title,
4580
4872
  className: "".concat(oe.b(), " ").concat(oe.is("hidden", !n.isMinimize), " ").concat(oe.is("show-halo", u.value)),
4581
4873
  onClick: _,
4582
- children: c("div", {
4874
+ children: r("div", {
4583
4875
  className: "".concat(oe.e("content"), " ").concat(oe.is("show-border", !u.value)),
4584
- children: [t && c("div", {
4876
+ children: [t && r("div", {
4585
4877
  className: "".concat(oe.em("content", "popover")),
4586
- children: c("div", {
4878
+ children: r("div", {
4587
4879
  className: "typewriter",
4588
4880
  children: t
4589
4881
  })
4590
- }), c(ei, {})]
4882
+ }), r(li, {})]
4591
4883
  })
4592
4884
  });
4593
4885
  };
4594
- const rt = In({
4886
+ const rt = Bn({
4595
4887
  zIndex: 10,
4596
4888
  enableBackFill: !0,
4597
4889
  newTopic: () => {
4598
4890
  }
4599
4891
  });
4600
- var Rt, Ft, Ut, Wt;
4601
- class Pt extends F {
4892
+ var Ut, Wt, jt, Vt;
4893
+ class Ft extends F {
4602
4894
  constructor(t) {
4603
4895
  super(t);
4604
- x(this, "ns", new M("chat-container"));
4605
- x(this, "containerRef", lt());
4606
- x(this, "dragHandle", lt());
4896
+ S(this, "ns", new k("chat-container"));
4897
+ S(this, "containerRef", lt());
4898
+ S(this, "dragHandle", lt());
4607
4899
  /**
4608
4900
  * 窗口样式数据
4609
4901
  *
4610
4902
  * @memberof ChatContainer
4611
4903
  */
4612
- x(this, "data", {
4904
+ S(this, "data", {
4613
4905
  side: {
4614
4906
  y: 0,
4615
4907
  height: 1,
@@ -4632,14 +4924,14 @@ class Pt extends F {
4632
4924
  * @type {boolean}
4633
4925
  * @memberof ChatContainer
4634
4926
  */
4635
- x(this, "disabled", !1);
4927
+ S(this, "disabled", !1);
4636
4928
  /**
4637
4929
  * 最小化是否在拖拽中
4638
4930
  * - 在拖拽时不应触发点击事件
4639
4931
  * @type {boolean}
4640
4932
  * @memberof ChatContainer
4641
4933
  */
4642
- x(this, "isDragging", !1);
4934
+ S(this, "isDragging", !1);
4643
4935
  /**
4644
4936
  * 容器上下文
4645
4937
  *
@@ -4647,9 +4939,9 @@ class Pt extends F {
4647
4939
  * @date 2025-03-03 16:03:44
4648
4940
  * @type {ContainerContext}
4649
4941
  */
4650
- x(this, "containerContext", {
4651
- zIndex: ((Rt = this.props.containerOptions) == null ? void 0 : Rt.zIndex) || 10,
4652
- enableBackFill: ((Ft = this.props) == null ? void 0 : Ft.enableBackFill) !== void 0 && ((Ut = this.props) == null ? void 0 : Ut.enableBackFill) !== null ? (Wt = this.props) == null ? void 0 : Wt.enableBackFill : !0,
4942
+ S(this, "containerContext", {
4943
+ zIndex: ((Ut = this.props.containerOptions) == null ? void 0 : Ut.zIndex) || 10,
4944
+ enableBackFill: ((Wt = this.props) == null ? void 0 : Wt.enableBackFill) !== void 0 && ((jt = this.props) == null ? void 0 : jt.enableBackFill) !== null ? (Vt = this.props) == null ? void 0 : Vt.enableBackFill : !0,
4653
4945
  newTopic: () => {
4654
4946
  this.props.aiTopic.newTopic();
4655
4947
  }
@@ -4714,9 +5006,9 @@ class Pt extends F {
4714
5006
  x: s,
4715
5007
  y: o,
4716
5008
  width: a,
4717
- height: r
5009
+ height: c
4718
5010
  } = this.data.window;
4719
- 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();
5011
+ s < t || s + a > 1 - t ? this.calcSideModeStyle(s < t ? "left" : "right") : (o < i && (this.data.window.y = 0), o + c > 1 - i && (this.data.window.y = 1 - c)), this.setStyle();
4720
5012
  }
4721
5013
  /**
4722
5014
  * 注册对话框拖拽
@@ -4728,14 +5020,14 @@ class Pt extends F {
4728
5020
  if (this.state.isFullScreen)
4729
5021
  return;
4730
5022
  document.body.style.userSelect = "none";
4731
- const i = t.clientX - this.containerRef.current.offsetLeft, s = t.clientY - this.containerRef.current.offsetTop, o = (r) => {
5023
+ const i = t.clientX - this.containerRef.current.offsetLeft, s = t.clientY - this.containerRef.current.offsetTop, o = (c) => {
4732
5024
  if (this.disabled)
4733
5025
  return;
4734
5026
  this.data.showMode = "window";
4735
5027
  const {
4736
5028
  x: u,
4737
5029
  y: h
4738
- } = on(r.clientX - i, r.clientY - s, this.data.window.width, this.data.window.height);
5030
+ } = rn(c.clientX - i, c.clientY - s, this.data.window.width, this.data.window.height);
4739
5031
  Object.assign(this.data.window, {
4740
5032
  x: u,
4741
5033
  y: h
@@ -4806,7 +5098,7 @@ class Pt extends F {
4806
5098
  const t = localStorage.getItem(E.STYLE_CACHE);
4807
5099
  if (t) {
4808
5100
  const i = JSON.parse(t);
4809
- i.side && Je(i.side) && i.window && Je(i.window) && Object.assign(this.data, i);
5101
+ i.side && Ge(i.side) && i.window && Ge(i.window) && Object.assign(this.data, i);
4810
5102
  }
4811
5103
  this.setStyle(), this.registerDragDialog(), this.registerDragDialogBorder(), document.addEventListener("fullscreenchange", this.handleFullScreenChange);
4812
5104
  }
@@ -4871,101 +5163,101 @@ class Pt extends F {
4871
5163
  t.stopPropagation();
4872
5164
  }
4873
5165
  render() {
4874
- return c(rt.Provider, {
5166
+ return r(rt.Provider, {
4875
5167
  value: this.containerContext,
4876
- children: c("div", {
5168
+ children: r("div", {
4877
5169
  className: "".concat(this.ns.b()),
4878
- children: [c("div", {
5170
+ children: [r("div", {
4879
5171
  className: "".concat(this.ns.e("dialog"), " ").concat(this.ns.is("full-screen", this.state.isFullScreen), " ").concat(this.ns.is("hidden", this.state.isMinimize)),
4880
5172
  ref: this.containerRef,
4881
- children: [c("div", {
5173
+ children: [r("div", {
4882
5174
  ref: this.dragHandle,
4883
5175
  className: this.ns.b("header"),
4884
- children: [c("div", {
5176
+ children: [r("div", {
4885
5177
  className: this.ns.b("header-caption"),
4886
5178
  children: this.props.caption || "AI助手"
4887
- }), c("div", {
5179
+ }), r("div", {
4888
5180
  className: this.ns.b("header-action-wrapper"),
4889
- children: [c("div", {
5181
+ children: [r("div", {
4890
5182
  title: "最小化",
4891
5183
  className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "minimize")),
4892
5184
  onMouseDown: this.stopPropagation.bind(this),
4893
5185
  onClick: this.minimize.bind(this),
4894
- children: c(Qn, {})
4895
- }), this.state.isFullScreen ? c("div", {
5186
+ children: r(ci, {})
5187
+ }), this.state.isFullScreen ? r("div", {
4896
5188
  title: "退出全屏",
4897
5189
  className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "close-full-screen")),
4898
5190
  onMouseDown: this.stopPropagation.bind(this),
4899
5191
  onClick: this.closeFullScreen.bind(this),
4900
- children: c(Kn, {})
4901
- }) : c("div", {
5192
+ children: r(ri, {})
5193
+ }) : r("div", {
4902
5194
  title: "全屏",
4903
5195
  className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "full-screen")),
4904
5196
  onMouseDown: this.stopPropagation.bind(this),
4905
5197
  onClick: this.fullScreen.bind(this),
4906
- children: c(Jn, {})
4907
- }), c("div", {
5198
+ children: r(ai, {})
5199
+ }), r("div", {
4908
5200
  title: "关闭",
4909
5201
  className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "action-close")),
4910
5202
  onMouseDown: this.stopPropagation.bind(this),
4911
5203
  onClick: this.close.bind(this),
4912
- children: c(jn, {})
5204
+ children: r(ti, {})
4913
5205
  })]
4914
5206
  })]
4915
- }), this.props.mode === "TOPIC" ? c("div", {
5207
+ }), this.props.mode === "TOPIC" ? r("div", {
4916
5208
  className: "".concat(this.ns.b("main")),
4917
- children: [c("div", {
5209
+ children: [r("div", {
4918
5210
  className: "".concat(this.ns.be("main", "left")),
4919
- children: c(ns, {
5211
+ children: r(ps, {
4920
5212
  controller: this.props.aiTopic
4921
5213
  })
4922
- }), c("div", {
5214
+ }), r("div", {
4923
5215
  className: "".concat(this.ns.be("main", "right")),
4924
- children: [c("div", {
5216
+ children: [r("div", {
4925
5217
  className: this.ns.b("content"),
4926
- children: c(xt, {
5218
+ children: r(kt, {
4927
5219
  controller: this.props.aiChat,
4928
5220
  toolbarItems: this.props.contentToolbarItems
4929
5221
  })
4930
- }), c(et, {
5222
+ }), r(et, {
4931
5223
  type: "footer",
4932
5224
  mode: this.props.mode,
4933
5225
  data: this.props.aiTopic.activedTopic.value,
4934
5226
  className: "".concat(this.ns.e("toolbar"), " ").concat(this.ns.is("has-materials", this.props.aiChat.materials.value.length > 0)),
4935
5227
  controller: this.props.aiChat,
4936
5228
  items: this.props.footerToolbarItems
4937
- }), c("div", {
5229
+ }), r("div", {
4938
5230
  className: this.ns.b("footer"),
4939
- children: c(Bt, {
5231
+ children: r(Rt, {
4940
5232
  controller: this.props.aiChat,
4941
5233
  questionToolbarItems: this.props.questionToolbarItems
4942
5234
  })
4943
5235
  })]
4944
5236
  })]
4945
- }) : c("div", {
5237
+ }) : r("div", {
4946
5238
  className: "".concat(this.ns.be("main", "default")),
4947
- children: [c("div", {
5239
+ children: [r("div", {
4948
5240
  className: this.ns.b("content"),
4949
- children: c(xt, {
5241
+ children: r(kt, {
4950
5242
  controller: this.props.aiChat,
4951
5243
  toolbarItems: this.props.contentToolbarItems
4952
5244
  })
4953
- }), c(et, {
5245
+ }), r(et, {
4954
5246
  type: "footer",
4955
5247
  mode: this.props.mode,
4956
5248
  data: this.props.aiTopic.activedTopic.value,
4957
5249
  className: "".concat(this.ns.e("toolbar"), " ").concat(this.ns.is("has-materials", this.props.aiChat.materials.value.length > 0)),
4958
5250
  controller: this.props.aiChat,
4959
5251
  items: this.props.footerToolbarItems
4960
- }), c("div", {
5252
+ }), r("div", {
4961
5253
  className: this.ns.b("footer"),
4962
- children: c(Bt, {
5254
+ children: r(Rt, {
4963
5255
  controller: this.props.aiChat,
4964
5256
  questionToolbarItems: this.props.questionToolbarItems
4965
5257
  })
4966
5258
  })]
4967
5259
  })]
4968
- }), c(is, {
5260
+ }), r(fs, {
4969
5261
  title: this.props.caption || "AI助手",
4970
5262
  controller: this.props.aiChat,
4971
5263
  isMinimize: this.state.isMinimize,
@@ -4976,6 +5268,6 @@ class Pt extends F {
4976
5268
  }
4977
5269
  }
4978
5270
  export {
4979
- Pt as ChatContainer,
4980
- rs as chat
5271
+ Ft as ChatContainer,
5272
+ gs as chat
4981
5273
  };