@sy-design/svelte 1.0.27 → 1.0.28
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 +124 -125
- package/dist/index.umd.js +10 -10
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -337,11 +337,11 @@ function wi(t, e, n, s, i, o, l, r, c, a, f, g) {
|
|
|
337
337
|
let m = t.length, h = o.length, d = m;
|
|
338
338
|
const w = {};
|
|
339
339
|
for (; d--; ) w[t[d].key] = d;
|
|
340
|
-
const T = [],
|
|
340
|
+
const T = [], E = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), S = [];
|
|
341
341
|
for (d = h; d--; ) {
|
|
342
342
|
const v = g(i, o, d), L = n(v);
|
|
343
343
|
let I = l.get(L);
|
|
344
|
-
I ?
|
|
344
|
+
I ? S.push(() => I.p(v, e)) : (I = a(L, v), I.c()), E.set(L, T[d] = I), L in w && y.set(L, Math.abs(d - w[L]));
|
|
345
345
|
}
|
|
346
346
|
const _ = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Set();
|
|
347
347
|
function R(v) {
|
|
@@ -349,14 +349,14 @@ function wi(t, e, n, s, i, o, l, r, c, a, f, g) {
|
|
|
349
349
|
}
|
|
350
350
|
for (; m && h; ) {
|
|
351
351
|
const v = T[h - 1], L = t[m - 1], I = v.key, V = L.key;
|
|
352
|
-
v === L ? (f = v.first, m--, h--) :
|
|
352
|
+
v === L ? (f = v.first, m--, h--) : E.has(V) ? !l.has(I) || _.has(I) ? R(v) : M.has(V) ? m-- : y.get(I) > y.get(V) ? (M.add(I), R(v)) : (_.add(V), m--) : (c(L, l), m--);
|
|
353
353
|
}
|
|
354
354
|
for (; m--; ) {
|
|
355
355
|
const v = t[m];
|
|
356
|
-
|
|
356
|
+
E.has(v.key) || c(v, l);
|
|
357
357
|
}
|
|
358
358
|
for (; h; ) R(T[h - 1]);
|
|
359
|
-
return Me(
|
|
359
|
+
return Me(S), T;
|
|
360
360
|
}
|
|
361
361
|
function Qn(t) {
|
|
362
362
|
t && t.c();
|
|
@@ -513,10 +513,10 @@ function Hn(t, e, n, s) {
|
|
|
513
513
|
function so(t, e = {}) {
|
|
514
514
|
const n = no(t), { stiffness: s = 0.15, damping: i = 0.8, precision: o = 0.01 } = e;
|
|
515
515
|
let l, r, c, a = t, f = t, g = 1, m = 0, h = !1;
|
|
516
|
-
function d(T,
|
|
516
|
+
function d(T, E = {}) {
|
|
517
517
|
f = T;
|
|
518
518
|
const y = c = {};
|
|
519
|
-
return t == null ||
|
|
519
|
+
return t == null || E.hard || w.stiffness >= 1 && w.damping >= 1 ? (h = !0, l = ds(), a = T, n.set(t = f), Promise.resolve()) : (E.soft && (m = 1 / ((E.soft === !0 ? 0.5 : +E.soft) * 60), g = 0), r || (l = ds(), h = !1, r = Ui((S) => {
|
|
520
520
|
if (h)
|
|
521
521
|
return h = !1, r = null, !1;
|
|
522
522
|
g = Math.min(g + m, 1);
|
|
@@ -524,18 +524,18 @@ function so(t, e = {}) {
|
|
|
524
524
|
inv_mass: g,
|
|
525
525
|
opts: w,
|
|
526
526
|
settled: !0,
|
|
527
|
-
dt: (
|
|
527
|
+
dt: (S - l) * 60 / 1e3
|
|
528
528
|
}, M = Hn(_, a, t, f);
|
|
529
|
-
return l =
|
|
530
|
-
})), new Promise((
|
|
529
|
+
return l = S, a = t, n.set(t = M), _.settled && (r = null), !_.settled;
|
|
530
|
+
})), new Promise((S) => {
|
|
531
531
|
r.promise.then(() => {
|
|
532
|
-
y === c &&
|
|
532
|
+
y === c && S();
|
|
533
533
|
});
|
|
534
534
|
}));
|
|
535
535
|
}
|
|
536
536
|
const w = {
|
|
537
537
|
set: d,
|
|
538
|
-
update: (T,
|
|
538
|
+
update: (T, E) => d(T(f, t), E),
|
|
539
539
|
subscribe: n.subscribe,
|
|
540
540
|
stiffness: s,
|
|
541
541
|
damping: i,
|
|
@@ -636,20 +636,20 @@ function uo(t, e) {
|
|
|
636
636
|
d.abort(), document.hidden || M();
|
|
637
637
|
}
|
|
638
638
|
c || document.addEventListener("visibilitychange", w);
|
|
639
|
-
let T = co,
|
|
639
|
+
let T = co, E = 0;
|
|
640
640
|
function y() {
|
|
641
|
-
document.removeEventListener("visibilitychange", w), window.clearTimeout(
|
|
641
|
+
document.removeEventListener("visibilitychange", w), window.clearTimeout(E), d.abort();
|
|
642
642
|
}
|
|
643
643
|
n == null || n.addEventListener("abort", () => {
|
|
644
644
|
y(), g();
|
|
645
645
|
});
|
|
646
|
-
const
|
|
646
|
+
const S = a != null ? a : window.fetch, _ = i != null ? i : fo;
|
|
647
647
|
function M() {
|
|
648
648
|
return Se(this, null, function* () {
|
|
649
649
|
var R;
|
|
650
650
|
d = new AbortController();
|
|
651
651
|
try {
|
|
652
|
-
const v = yield
|
|
652
|
+
const v = yield S(t, Object.assign(Object.assign({}, f), { headers: h, signal: d.signal }));
|
|
653
653
|
yield _(v), yield io(v.body, oo(ro((L) => {
|
|
654
654
|
L ? h[ks] = L : delete h[ks];
|
|
655
655
|
}, (L) => {
|
|
@@ -659,7 +659,7 @@ function uo(t, e) {
|
|
|
659
659
|
if (!d.signal.aborted)
|
|
660
660
|
try {
|
|
661
661
|
const L = (R = r == null ? void 0 : r(v)) !== null && R !== void 0 ? R : T;
|
|
662
|
-
window.clearTimeout(
|
|
662
|
+
window.clearTimeout(E), E = window.setTimeout(M, L);
|
|
663
663
|
} catch (L) {
|
|
664
664
|
y(), m(L);
|
|
665
665
|
}
|
|
@@ -845,19 +845,19 @@ ${f}` : f;
|
|
|
845
845
|
if (!(e = o.exec(t)) || this.rules.block.hr.test(t)) break;
|
|
846
846
|
a = e[0], t = t.substring(a.length);
|
|
847
847
|
let g = e[2].split(`
|
|
848
|
-
`, 1)[0].replace(this.rules.other.listReplaceTabs, (
|
|
848
|
+
`, 1)[0].replace(this.rules.other.listReplaceTabs, (E) => " ".repeat(3 * E.length)), m = t.split(`
|
|
849
849
|
`, 1)[0], h = !g.trim(), d = 0;
|
|
850
850
|
if (this.options.pedantic ? (d = 2, f = g.trimStart()) : h ? d = e[1].length + 1 : (d = e[2].search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, f = g.slice(d), d += e[1].length), h && this.rules.other.blankLine.test(m) && (a += m + `
|
|
851
851
|
`, t = t.substring(m.length + 1), c = !0), !c) {
|
|
852
|
-
let
|
|
852
|
+
let E = this.rules.other.nextBulletRegex(d), y = this.rules.other.hrRegex(d), S = this.rules.other.fencesBeginRegex(d), _ = this.rules.other.headingBeginRegex(d), M = this.rules.other.htmlBeginRegex(d);
|
|
853
853
|
for (; t; ) {
|
|
854
854
|
let R = t.split(`
|
|
855
855
|
`, 1)[0], v;
|
|
856
|
-
if (m = R, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), v = m) : v = m.replace(this.rules.other.tabCharGlobal, " "),
|
|
856
|
+
if (m = R, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), v = m) : v = m.replace(this.rules.other.tabCharGlobal, " "), S.test(m) || _.test(m) || M.test(m) || E.test(m) || y.test(m)) break;
|
|
857
857
|
if (v.search(this.rules.other.nonSpaceChar) >= d || !m.trim()) f += `
|
|
858
858
|
` + v.slice(d);
|
|
859
859
|
else {
|
|
860
|
-
if (h || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 ||
|
|
860
|
+
if (h || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || S.test(g) || _.test(g) || y.test(g)) break;
|
|
861
861
|
f += `
|
|
862
862
|
` + m;
|
|
863
863
|
}
|
|
@@ -1221,9 +1221,9 @@ ${f}` : f;
|
|
|
1221
1221
|
}
|
|
1222
1222
|
let d = e;
|
|
1223
1223
|
if ((m = this.options.extensions) != null && m.startInline) {
|
|
1224
|
-
let w = 1 / 0, T = e.slice(1),
|
|
1224
|
+
let w = 1 / 0, T = e.slice(1), E;
|
|
1225
1225
|
this.options.extensions.startInline.forEach((y) => {
|
|
1226
|
-
|
|
1226
|
+
E = y.call({ lexer: this }, T), typeof E == "number" && E >= 0 && (w = Math.min(w, E));
|
|
1227
1227
|
}), w < 1 / 0 && w >= 0 && (d = e.substring(0, w + 1));
|
|
1228
1228
|
}
|
|
1229
1229
|
if (h = this.tokenizer.inlineText(d)) {
|
|
@@ -1925,7 +1925,7 @@ function zi() {
|
|
|
1925
1925
|
HTMLFormElement: g,
|
|
1926
1926
|
DOMParser: m,
|
|
1927
1927
|
trustedTypes: h
|
|
1928
|
-
} = t, d = c.prototype, w = Zt(d, "cloneNode"), T = Zt(d, "remove"),
|
|
1928
|
+
} = t, d = c.prototype, w = Zt(d, "cloneNode"), T = Zt(d, "remove"), E = Zt(d, "nextSibling"), y = Zt(d, "childNodes"), S = Zt(d, "parentNode");
|
|
1929
1929
|
if (typeof l == "function") {
|
|
1930
1930
|
const N = n.createElement("template");
|
|
1931
1931
|
N.content && N.content.ownerDocument && (n = N.content.ownerDocument);
|
|
@@ -1940,7 +1940,7 @@ function zi() {
|
|
|
1940
1940
|
importNode: V
|
|
1941
1941
|
} = s;
|
|
1942
1942
|
let H = zs();
|
|
1943
|
-
e.isSupported = typeof Ii == "function" && typeof
|
|
1943
|
+
e.isSupported = typeof Ii == "function" && typeof S == "function" && R && R.createHTMLDocument !== void 0;
|
|
1944
1944
|
const {
|
|
1945
1945
|
MUSTACHE_EXPR: D,
|
|
1946
1946
|
ERB_EXPR: G,
|
|
@@ -2008,7 +2008,7 @@ function zi() {
|
|
|
2008
2008
|
Ue && Ue(p), bt = p;
|
|
2009
2009
|
}
|
|
2010
2010
|
}, en = J({}, [...zn, ...Dn, ...ir]), tn = J({}, [...On, ...or]), xn = function(p) {
|
|
2011
|
-
let A =
|
|
2011
|
+
let A = S(p);
|
|
2012
2012
|
(!A || !A.tagName) && (A = {
|
|
2013
2013
|
namespaceURI: Ke,
|
|
2014
2014
|
tagName: "template"
|
|
@@ -2020,7 +2020,7 @@ function zi() {
|
|
|
2020
2020
|
element: p
|
|
2021
2021
|
});
|
|
2022
2022
|
try {
|
|
2023
|
-
|
|
2023
|
+
S(p).removeChild(p);
|
|
2024
2024
|
} catch (A) {
|
|
2025
2025
|
T(p);
|
|
2026
2026
|
}
|
|
@@ -2103,12 +2103,12 @@ function zi() {
|
|
|
2103
2103
|
if (!xe[P] && ut(P) && (ue.tagNameCheck instanceof RegExp && Be(ue.tagNameCheck, P) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(P)))
|
|
2104
2104
|
return !1;
|
|
2105
2105
|
if (pt && !ct[P]) {
|
|
2106
|
-
const me =
|
|
2106
|
+
const me = S(p) || p.parentNode, Fe = y(p) || p.childNodes;
|
|
2107
2107
|
if (Fe && me) {
|
|
2108
2108
|
const ve = Fe.length;
|
|
2109
2109
|
for (let Ye = ve - 1; Ye >= 0; --Ye) {
|
|
2110
2110
|
const gt = w(Fe[Ye], !0);
|
|
2111
|
-
gt.__removalCount = (p.__removalCount || 0) + 1, me.insertBefore(gt,
|
|
2111
|
+
gt.__removalCount = (p.__removalCount || 0) + 1, me.insertBefore(gt, E(p));
|
|
2112
2112
|
}
|
|
2113
2113
|
}
|
|
2114
2114
|
}
|
|
@@ -2450,7 +2450,7 @@ function Fs(t, e) {
|
|
|
2450
2450
|
), r, c, a, f = Ws(
|
|
2451
2451
|
/*session*/
|
|
2452
2452
|
e[25].timestamp
|
|
2453
|
-
) + "", g, m, h, d, w, T,
|
|
2453
|
+
) + "", g, m, h, d, w, T, E, y, S, _, M;
|
|
2454
2454
|
function R() {
|
|
2455
2455
|
return (
|
|
2456
2456
|
/*click_handler*/
|
|
@@ -2474,9 +2474,9 @@ function Fs(t, e) {
|
|
|
2474
2474
|
key: t,
|
|
2475
2475
|
first: null,
|
|
2476
2476
|
c() {
|
|
2477
|
-
n = x("div"), s = x("button"), i = x("div"), o = x("div"), r = De(l), c = q(), a = x("div"), g = De(f), m = q(), h = x("button"), d = Y("svg"), w = Y("path"), T = Y("path"),
|
|
2477
|
+
n = x("div"), s = x("button"), i = x("div"), o = x("div"), r = De(l), c = q(), a = x("div"), g = De(f), m = q(), h = x("button"), d = Y("svg"), w = Y("path"), T = Y("path"), E = Y("path"), u(o, "class", "sy-session-title svelte-1g6fj9a"), u(a, "class", "sy-session-time svelte-1g6fj9a"), u(i, "class", "sy-session-info svelte-1g6fj9a"), u(s, "class", "sy-session-select svelte-1g6fj9a"), u(w, "d", "M3 6h18"), u(T, "d", "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"), u(E, "d", "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"), u(d, "xmlns", "http://www.w3.org/2000/svg"), u(d, "width", "16"), u(d, "height", "16"), u(d, "viewBox", "0 0 24 24"), u(d, "fill", "none"), u(d, "stroke", "currentColor"), u(d, "stroke-width", "2"), u(d, "stroke-linecap", "round"), u(d, "stroke-linejoin", "round"), u(h, "class", "sy-session-delete svelte-1g6fj9a"), h.disabled = y = /*deletingSessionId*/
|
|
2478
2478
|
e[6] === /*session*/
|
|
2479
|
-
e[25].sessionId, u(h, "aria-label", "删除会话"), u(n, "class", "sy-session-item svelte-1g6fj9a"), u(n, "data-session-id",
|
|
2479
|
+
e[25].sessionId, u(h, "aria-label", "删除会话"), u(n, "class", "sy-session-item svelte-1g6fj9a"), u(n, "data-session-id", S = /*session*/
|
|
2480
2480
|
e[25].sessionId), z(
|
|
2481
2481
|
n,
|
|
2482
2482
|
"deleting",
|
|
@@ -2485,7 +2485,7 @@ function Fs(t, e) {
|
|
|
2485
2485
|
), this.first = n;
|
|
2486
2486
|
},
|
|
2487
2487
|
m(L, I) {
|
|
2488
|
-
W(L, n, I), b(n, s), b(s, i), b(i, o), b(o, r), b(i, c), b(i, a), b(a, g), b(n, m), b(n, h), b(h, d), b(d, w), b(d, T), b(d,
|
|
2488
|
+
W(L, n, I), b(n, s), b(s, i), b(i, o), b(o, r), b(i, c), b(i, a), b(a, g), b(n, m), b(n, h), b(h, d), b(d, w), b(d, T), b(d, E), _ || (M = [
|
|
2489
2489
|
j(s, "click", R),
|
|
2490
2490
|
j(h, "click", v)
|
|
2491
2491
|
], _ = !0);
|
|
@@ -2501,8 +2501,8 @@ function Fs(t, e) {
|
|
|
2501
2501
|
65 && y !== (y = /*deletingSessionId*/
|
|
2502
2502
|
e[6] === /*session*/
|
|
2503
2503
|
e[25].sessionId) && (h.disabled = y), I & /*sessions*/
|
|
2504
|
-
1 &&
|
|
2505
|
-
e[25].sessionId) && u(n, "data-session-id",
|
|
2504
|
+
1 && S !== (S = /*session*/
|
|
2505
|
+
e[25].sessionId) && u(n, "data-session-id", S), I & /*sessions*/
|
|
2506
2506
|
1 && z(
|
|
2507
2507
|
n,
|
|
2508
2508
|
"deleting",
|
|
@@ -2593,7 +2593,7 @@ function Bs(t) {
|
|
|
2593
2593
|
};
|
|
2594
2594
|
}
|
|
2595
2595
|
function br(t) {
|
|
2596
|
-
let e, n, s, i, o, l, r, c, a, f, g, m, h, d, w, T,
|
|
2596
|
+
let e, n, s, i, o, l, r, c, a, f, g, m, h, d, w, T, E, y, S, _ = (
|
|
2597
2597
|
/*buttonTooltip*/
|
|
2598
2598
|
t[9] && Ns(t)
|
|
2599
2599
|
);
|
|
@@ -2609,7 +2609,7 @@ function br(t) {
|
|
|
2609
2609
|
);
|
|
2610
2610
|
return {
|
|
2611
2611
|
c() {
|
|
2612
|
-
e = x("div"), n = x("div"), s = x("h2"), s.textContent = "历史会话", i = q(), o = x("button"), o.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>', l = q(), r = x("div"), c = x("input"), a = q(), f = Y("svg"), g = Y("circle"), m = Y("line"), h = q(), _ && _.c(), d = q(), w = x("div"), v.c(), T = q(), L && L.c(),
|
|
2612
|
+
e = x("div"), n = x("div"), s = x("h2"), s.textContent = "历史会话", i = q(), o = x("button"), o.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>', l = q(), r = x("div"), c = x("input"), a = q(), f = Y("svg"), g = Y("circle"), m = Y("line"), h = q(), _ && _.c(), d = q(), w = x("div"), v.c(), T = q(), L && L.c(), E = Ft(), u(s, "class", "svelte-1g6fj9a"), u(o, "class", "sy-session-close svelte-1g6fj9a"), u(o, "aria-label", "关闭历史会话"), u(n, "class", "sy-session-header svelte-1g6fj9a"), u(c, "type", "text"), u(c, "class", "sy-session-search-input svelte-1g6fj9a"), u(c, "placeholder", "搜索历史会话..."), u(g, "cx", "11"), u(g, "cy", "11"), u(g, "r", "8"), u(m, "x1", "21"), u(m, "y1", "21"), u(m, "x2", "16.65"), u(m, "y2", "16.65"), u(f, "class", "sy-session-search-icon svelte-1g6fj9a"), u(f, "xmlns", "http://www.w3.org/2000/svg"), u(f, "width", "16"), u(f, "height", "16"), u(f, "viewBox", "0 0 24 24"), u(f, "fill", "none"), u(f, "stroke", "currentColor"), u(f, "stroke-width", "2"), u(f, "stroke-linecap", "round"), u(f, "stroke-linejoin", "round"), u(r, "class", "sy-session-search svelte-1g6fj9a"), u(w, "class", "sy-session-list svelte-1g6fj9a"), u(e, "class", "sy-session-history svelte-1g6fj9a"), F(
|
|
2613
2613
|
e,
|
|
2614
2614
|
"z-index",
|
|
2615
2615
|
/*zIndex*/
|
|
@@ -2621,7 +2621,7 @@ function br(t) {
|
|
|
2621
2621
|
c,
|
|
2622
2622
|
/*searchQuery*/
|
|
2623
2623
|
t[4]
|
|
2624
|
-
), b(r, a), b(r, f), b(f, g), b(f, m), b(e, h), _ && _.m(e, null), b(e, d), b(e, w), v.m(w, null), W(I, T, V), L && L.m(I, V), W(I,
|
|
2624
|
+
), b(r, a), b(r, f), b(f, g), b(f, m), b(e, h), _ && _.m(e, null), b(e, d), b(e, w), v.m(w, null), W(I, T, V), L && L.m(I, V), W(I, E, V), y || (S = [
|
|
2625
2625
|
j(o, "click", function() {
|
|
2626
2626
|
Zn(
|
|
2627
2627
|
/*onClose*/
|
|
@@ -2669,12 +2669,12 @@ function br(t) {
|
|
|
2669
2669
|
/*zIndex*/
|
|
2670
2670
|
t[3] + 2
|
|
2671
2671
|
), /*confirmDeleteId*/
|
|
2672
|
-
t[7] ? L ? L.p(t, V) : (L = Bs(t), L.c(), L.m(
|
|
2672
|
+
t[7] ? L ? L.p(t, V) : (L = Bs(t), L.c(), L.m(E.parentNode, E)) : L && (L.d(1), L = null);
|
|
2673
2673
|
},
|
|
2674
2674
|
i: je,
|
|
2675
2675
|
o: je,
|
|
2676
2676
|
d(I) {
|
|
2677
|
-
I && (B(e), B(T), B(
|
|
2677
|
+
I && (B(e), B(T), B(E)), _ && _.d(), v.d(), L && L.d(I), y = !1, Me(S);
|
|
2678
2678
|
}
|
|
2679
2679
|
};
|
|
2680
2680
|
}
|
|
@@ -2724,17 +2724,17 @@ function kr(t, e, n) {
|
|
|
2724
2724
|
Yn(() => {
|
|
2725
2725
|
w();
|
|
2726
2726
|
});
|
|
2727
|
-
let
|
|
2727
|
+
let E = null;
|
|
2728
2728
|
function y(D, G) {
|
|
2729
2729
|
const ne = D.currentTarget.getBoundingClientRect();
|
|
2730
|
-
n(9,
|
|
2730
|
+
n(9, E = {
|
|
2731
2731
|
text: G,
|
|
2732
2732
|
x: ne.left + ne.width / 2,
|
|
2733
2733
|
y: ne.bottom + 8
|
|
2734
2734
|
});
|
|
2735
2735
|
}
|
|
2736
|
-
function
|
|
2737
|
-
n(9,
|
|
2736
|
+
function S() {
|
|
2737
|
+
n(9, E = null);
|
|
2738
2738
|
}
|
|
2739
2739
|
function _(D, G) {
|
|
2740
2740
|
const ne = D.currentTarget.getBoundingClientRect();
|
|
@@ -2806,10 +2806,10 @@ function kr(t, e, n) {
|
|
|
2806
2806
|
m,
|
|
2807
2807
|
h,
|
|
2808
2808
|
d,
|
|
2809
|
-
|
|
2809
|
+
E,
|
|
2810
2810
|
T,
|
|
2811
2811
|
y,
|
|
2812
|
-
|
|
2812
|
+
S,
|
|
2813
2813
|
_,
|
|
2814
2814
|
R,
|
|
2815
2815
|
r,
|
|
@@ -3226,7 +3226,7 @@ function Xs(t) {
|
|
|
3226
3226
|
).name + "", g, m, h, d = an(
|
|
3227
3227
|
/*attachment*/
|
|
3228
3228
|
t[94].content_title
|
|
3229
|
-
).ext + "", w, T,
|
|
3229
|
+
).ext + "", w, T, E, y, S, _, M, R, v, L, I = (
|
|
3230
3230
|
/*attachment*/
|
|
3231
3231
|
t[94].tips && Zs(t)
|
|
3232
3232
|
);
|
|
@@ -3245,11 +3245,11 @@ function Xs(t) {
|
|
|
3245
3245
|
);
|
|
3246
3246
|
return {
|
|
3247
3247
|
c() {
|
|
3248
|
-
e = x("div"), n = x("div"), s = x("div"), i = Y("svg"), o = Y("path"), l = Y("polyline"), r = q(), c = x("div"), a = x("span"), g = De(f), m = q(), h = x("span"), w = De(d),
|
|
3248
|
+
e = x("div"), n = x("div"), s = x("div"), i = Y("svg"), o = Y("path"), l = Y("polyline"), r = q(), c = x("div"), a = x("span"), g = De(f), m = q(), h = x("span"), w = De(d), E = q(), y = x("div"), I && I.c(), S = q(), _ = x("button"), _.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1r23oau"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>', M = q(), H && H.c(), R = q(), u(o, "d", "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"), u(l, "points", "13 2 13 9 20 9"), u(i, "xmlns", "http://www.w3.org/2000/svg"), u(i, "width", "16"), u(i, "height", "16"), u(i, "viewBox", "0 0 24 24"), u(i, "fill", "none"), u(i, "stroke", "currentColor"), u(i, "stroke-width", "2"), u(i, "stroke-linecap", "round"), u(i, "stroke-linejoin", "round"), u(a, "class", "sy-assistant-filename svelte-1r23oau"), u(h, "class", "sy-assistant-attachment-ext svelte-1r23oau"), u(c, "class", "sy-assistant-attachment-name svelte-1r23oau"), u(c, "title", T = /*attachment*/
|
|
3249
3249
|
t[94].content_title), u(s, "class", "sy-assistant-attachment-title svelte-1r23oau"), u(_, "class", "sy-assistant-attachment-toggle svelte-1r23oau"), u(_, "aria-label", "下载文件"), u(y, "class", "sy-assistant-attachment-actions svelte-1r23oau"), u(n, "class", "sy-assistant-attachment-header svelte-1r23oau"), u(e, "class", "sy-assistant-attachment svelte-1r23oau");
|
|
3250
3250
|
},
|
|
3251
3251
|
m(D, G) {
|
|
3252
|
-
W(D, e, G), b(e, n), b(n, s), b(s, i), b(i, o), b(i, l), b(s, r), b(s, c), b(c, a), b(a, g), b(c, m), b(c, h), b(h, w), b(n,
|
|
3252
|
+
W(D, e, G), b(e, n), b(n, s), b(s, i), b(i, o), b(i, l), b(s, r), b(s, c), b(c, a), b(a, g), b(c, m), b(c, h), b(h, w), b(n, E), b(n, y), I && I.m(y, null), b(y, S), b(y, _), b(e, M), H && H.m(e, null), b(e, R), v || (L = j(_, "click", V), v = !0);
|
|
3253
3253
|
},
|
|
3254
3254
|
p(D, G) {
|
|
3255
3255
|
t = D, G[0] & /*messages*/
|
|
@@ -3263,7 +3263,7 @@ function Xs(t) {
|
|
|
3263
3263
|
).ext + "") && Xe(w, d), G[0] & /*messages*/
|
|
3264
3264
|
8192 && T !== (T = /*attachment*/
|
|
3265
3265
|
t[94].content_title) && u(c, "title", T), /*attachment*/
|
|
3266
|
-
t[94].tips ? I ? I.p(t, G) : (I = Zs(t), I.c(), I.m(y,
|
|
3266
|
+
t[94].tips ? I ? I.p(t, G) : (I = Zs(t), I.c(), I.m(y, S)) : I && (I.d(1), I = null), /*tooltipContent*/
|
|
3267
3267
|
t[14] ? H ? H.p(t, G) : (H = Ys(t), H.c(), H.m(e, R)) : H && (H.d(1), H = null);
|
|
3268
3268
|
},
|
|
3269
3269
|
d(D) {
|
|
@@ -3302,7 +3302,7 @@ function Vs(t) {
|
|
|
3302
3302
|
)
|
|
3303
3303
|
);
|
|
3304
3304
|
}
|
|
3305
|
-
function
|
|
3305
|
+
function E() {
|
|
3306
3306
|
return (
|
|
3307
3307
|
/*click_handler_2*/
|
|
3308
3308
|
t[60](
|
|
@@ -3321,7 +3321,7 @@ function Vs(t) {
|
|
|
3321
3321
|
)
|
|
3322
3322
|
);
|
|
3323
3323
|
}
|
|
3324
|
-
function
|
|
3324
|
+
function S(...R) {
|
|
3325
3325
|
return (
|
|
3326
3326
|
/*click_handler_3*/
|
|
3327
3327
|
t[62](
|
|
@@ -3391,7 +3391,7 @@ function Vs(t) {
|
|
|
3391
3391
|
/*hideButtonTooltip*/
|
|
3392
3392
|
t[44]
|
|
3393
3393
|
),
|
|
3394
|
-
j(o, "click",
|
|
3394
|
+
j(o, "click", E),
|
|
3395
3395
|
j(o, "mouseenter", y),
|
|
3396
3396
|
j(
|
|
3397
3397
|
o,
|
|
@@ -3399,7 +3399,7 @@ function Vs(t) {
|
|
|
3399
3399
|
/*hideButtonTooltip*/
|
|
3400
3400
|
t[44]
|
|
3401
3401
|
),
|
|
3402
|
-
j(r, "click",
|
|
3402
|
+
j(r, "click", S),
|
|
3403
3403
|
j(r, "mouseenter", _),
|
|
3404
3404
|
j(
|
|
3405
3405
|
r,
|
|
@@ -3601,7 +3601,7 @@ function Js(t, e) {
|
|
|
3601
3601
|
M[91].content ? Er : Sr
|
|
3602
3602
|
);
|
|
3603
3603
|
}
|
|
3604
|
-
let
|
|
3604
|
+
let E = T(e), y = E(e), S = (
|
|
3605
3605
|
/*msg*/
|
|
3606
3606
|
e[91].attachments && Gs(e)
|
|
3607
3607
|
), _ = (
|
|
@@ -3615,7 +3615,7 @@ function Js(t, e) {
|
|
|
3615
3615
|
key: t,
|
|
3616
3616
|
first: null,
|
|
3617
3617
|
c() {
|
|
3618
|
-
n = x("div"), w.c(), s = q(), i = x("div"), o = x("div"), y.c(), l = q(),
|
|
3618
|
+
n = x("div"), w.c(), s = q(), i = x("div"), o = x("div"), y.c(), l = q(), S && S.c(), r = q(), _ && _.c(), c = q(), a = x("div"), g = De(f), m = q(), u(o, "class", "sy-assistant-message-content svelte-1r23oau"), z(
|
|
3619
3619
|
o,
|
|
3620
3620
|
"screen-theme",
|
|
3621
3621
|
/*theme*/
|
|
@@ -3638,11 +3638,11 @@ function Js(t, e) {
|
|
|
3638
3638
|
), this.first = n;
|
|
3639
3639
|
},
|
|
3640
3640
|
m(M, R) {
|
|
3641
|
-
W(M, n, R), w.m(n, null), b(n, s), b(n, i), b(i, o), y.m(o, null), b(o, l),
|
|
3641
|
+
W(M, n, R), w.m(n, null), b(n, s), b(n, i), b(i, o), y.m(o, null), b(o, l), S && S.m(o, null), b(o, r), _ && _.m(o, null), b(i, c), b(i, a), b(a, g), b(n, m);
|
|
3642
3642
|
},
|
|
3643
3643
|
p(M, R) {
|
|
3644
|
-
e = M, d === (d = h(e)) && w ? w.p(e, R) : (w.d(1), w = d(e), w && (w.c(), w.m(n, s))),
|
|
3645
|
-
e[91].attachments ?
|
|
3644
|
+
e = M, d === (d = h(e)) && w ? w.p(e, R) : (w.d(1), w = d(e), w && (w.c(), w.m(n, s))), E === (E = T(e)) && y ? y.p(e, R) : (y.d(1), y = E(e), y && (y.c(), y.m(o, l))), /*msg*/
|
|
3645
|
+
e[91].attachments ? S ? S.p(e, R) : (S = Gs(e), S.c(), S.m(o, r)) : S && (S.d(1), S = null), /*msg*/
|
|
3646
3646
|
e[91].id !== "-1" && /*msg*/
|
|
3647
3647
|
e[91].type === "assistant" && !/*isLoading*/
|
|
3648
3648
|
e[17] && /*showActions*/
|
|
@@ -3677,7 +3677,7 @@ function Js(t, e) {
|
|
|
3677
3677
|
);
|
|
3678
3678
|
},
|
|
3679
3679
|
d(M) {
|
|
3680
|
-
M && B(n), w.d(), y.d(),
|
|
3680
|
+
M && B(n), w.d(), y.d(), S && S.d(), _ && _.d();
|
|
3681
3681
|
}
|
|
3682
3682
|
};
|
|
3683
3683
|
}
|
|
@@ -3686,7 +3686,7 @@ function Ks(t) {
|
|
|
3686
3686
|
/*sendIcon*/
|
|
3687
3687
|
t[6],
|
|
3688
3688
|
'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>'
|
|
3689
|
-
) + "", w, T,
|
|
3689
|
+
) + "", w, T, E, y = (
|
|
3690
3690
|
/*showActions*/
|
|
3691
3691
|
t[5] && $s(t)
|
|
3692
3692
|
);
|
|
@@ -3733,12 +3733,12 @@ function Ks(t) {
|
|
|
3733
3733
|
t[3] === "screen"
|
|
3734
3734
|
);
|
|
3735
3735
|
},
|
|
3736
|
-
m(
|
|
3737
|
-
y && y.m(
|
|
3736
|
+
m(S, _) {
|
|
3737
|
+
y && y.m(S, _), W(S, e, _), W(S, n, _), b(n, s), b(s, i), b(i, o), t[71](o), kt(
|
|
3738
3738
|
o,
|
|
3739
3739
|
/*message*/
|
|
3740
3740
|
t[10]
|
|
3741
|
-
), b(s, l), b(s, r), b(r, c), b(c, a), b(c, f), b(c, g), b(r, m), b(r, h), h.innerHTML = d, T || (
|
|
3741
|
+
), b(s, l), b(s, r), b(r, c), b(c, a), b(c, f), b(c, g), b(r, m), b(r, h), h.innerHTML = d, T || (E = [
|
|
3742
3742
|
j(
|
|
3743
3743
|
o,
|
|
3744
3744
|
"input",
|
|
@@ -3789,72 +3789,72 @@ function Ks(t) {
|
|
|
3789
3789
|
)
|
|
3790
3790
|
], T = !0);
|
|
3791
3791
|
},
|
|
3792
|
-
p(
|
|
3792
|
+
p(S, _) {
|
|
3793
3793
|
/*showActions*/
|
|
3794
|
-
|
|
3794
|
+
S[5] ? y ? y.p(S, _) : (y = $s(S), y.c(), y.m(e.parentNode, e)) : y && (y.d(1), y = null), _[0] & /*maxLength*/
|
|
3795
3795
|
2048 && u(
|
|
3796
3796
|
o,
|
|
3797
3797
|
"maxlength",
|
|
3798
3798
|
/*maxLength*/
|
|
3799
|
-
|
|
3799
|
+
S[11]
|
|
3800
3800
|
), _[0] & /*message*/
|
|
3801
3801
|
1024 && kt(
|
|
3802
3802
|
o,
|
|
3803
3803
|
/*message*/
|
|
3804
|
-
|
|
3804
|
+
S[10]
|
|
3805
3805
|
), _[0] & /*theme*/
|
|
3806
3806
|
8 && z(
|
|
3807
3807
|
o,
|
|
3808
3808
|
"screen-theme",
|
|
3809
3809
|
/*theme*/
|
|
3810
|
-
|
|
3810
|
+
S[3] === "screen"
|
|
3811
3811
|
), _[0] & /*autoExpandTextarea, isFocused*/
|
|
3812
3812
|
524800 && z(
|
|
3813
3813
|
o,
|
|
3814
3814
|
"auto-expand",
|
|
3815
3815
|
/*autoExpandTextarea*/
|
|
3816
|
-
|
|
3817
|
-
|
|
3816
|
+
S[9] && /*isFocused*/
|
|
3817
|
+
S[19]
|
|
3818
3818
|
), _[0] & /*messageLength*/
|
|
3819
3819
|
4096 && Xe(
|
|
3820
3820
|
a,
|
|
3821
3821
|
/*messageLength*/
|
|
3822
|
-
|
|
3822
|
+
S[12]
|
|
3823
3823
|
), _[0] & /*maxLength*/
|
|
3824
3824
|
2048 && Xe(
|
|
3825
3825
|
g,
|
|
3826
3826
|
/*maxLength*/
|
|
3827
|
-
|
|
3827
|
+
S[11]
|
|
3828
3828
|
), _[0] & /*isOverLimit*/
|
|
3829
3829
|
1073741824 && z(
|
|
3830
3830
|
c,
|
|
3831
3831
|
"over-limit",
|
|
3832
3832
|
/*isOverLimit*/
|
|
3833
|
-
|
|
3833
|
+
S[30]
|
|
3834
3834
|
), _[0] & /*sendIcon*/
|
|
3835
3835
|
64 && d !== (d = Nt(
|
|
3836
3836
|
/*sendIcon*/
|
|
3837
|
-
|
|
3837
|
+
S[6],
|
|
3838
3838
|
'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>'
|
|
3839
3839
|
) + "") && (h.innerHTML = d), _[0] & /*message, isOverLimit*/
|
|
3840
3840
|
1073742848 && w !== (w = !/*message*/
|
|
3841
|
-
|
|
3842
|
-
|
|
3841
|
+
S[10].trim() || /*isOverLimit*/
|
|
3842
|
+
S[30]) && (h.disabled = w), _[0] & /*theme*/
|
|
3843
3843
|
8 && z(
|
|
3844
3844
|
s,
|
|
3845
3845
|
"screen-theme",
|
|
3846
3846
|
/*theme*/
|
|
3847
|
-
|
|
3847
|
+
S[3] === "screen"
|
|
3848
3848
|
), _[0] & /*theme*/
|
|
3849
3849
|
8 && z(
|
|
3850
3850
|
n,
|
|
3851
3851
|
"screen-theme",
|
|
3852
3852
|
/*theme*/
|
|
3853
|
-
|
|
3853
|
+
S[3] === "screen"
|
|
3854
3854
|
);
|
|
3855
3855
|
},
|
|
3856
|
-
d(
|
|
3857
|
-
|
|
3856
|
+
d(S) {
|
|
3857
|
+
S && (B(e), B(n)), y && y.d(S), t[71](null), T = !1, Me(E);
|
|
3858
3858
|
}
|
|
3859
3859
|
};
|
|
3860
3860
|
}
|
|
@@ -4184,14 +4184,14 @@ function Mr(t, e, n) {
|
|
|
4184
4184
|
content: "您好!我是您的AI助手,有什么可以帮您的吗?",
|
|
4185
4185
|
timestamp: Date.now()
|
|
4186
4186
|
}
|
|
4187
|
-
], a = "", f = null, g = null, m = { x: 0, y: 0, alignRight: !1 }, h = null, d = !1, w = !1, T = null,
|
|
4187
|
+
], a = "", f = null, g = null, m = { x: 0, y: 0, alignRight: !1 }, h = null, d = !1, w = !1, T = null, E = 0, y = null;
|
|
4188
4188
|
ce.setOptions({
|
|
4189
4189
|
breaks: !0,
|
|
4190
4190
|
// 支持换行
|
|
4191
4191
|
gfm: !0
|
|
4192
4192
|
// 支持 GitHub 风格 Markdown
|
|
4193
4193
|
});
|
|
4194
|
-
function
|
|
4194
|
+
function S(k) {
|
|
4195
4195
|
try {
|
|
4196
4196
|
const O = ce(k);
|
|
4197
4197
|
return Ds.sanitize(O);
|
|
@@ -4262,7 +4262,6 @@ function Mr(t, e, n) {
|
|
|
4262
4262
|
const O = c[c.length - 1];
|
|
4263
4263
|
O.type === "assistant" && O.content === a && (a = "", n(13, c = c.map((X) => X.id === O.id ? ke(oe({}, X), { content: "" }) : X)), console.log("Cleared assistant message content due to page visibility change"));
|
|
4264
4264
|
}
|
|
4265
|
-
f && (f.abort(), f = null, n(17, d = !1), y = null, S = 0, console.log("Aborted SSE request due to page visibility change"));
|
|
4266
4265
|
} else !document.hidden && d && console.log("Page visible again during SSE streaming.");
|
|
4267
4266
|
};
|
|
4268
4267
|
return document.addEventListener("visibilitychange", k), () => {
|
|
@@ -4288,7 +4287,7 @@ function Mr(t, e, n) {
|
|
|
4288
4287
|
const ae = r.trim();
|
|
4289
4288
|
n(10, r = ""), le && Z && n(20, Z.style.height = "", Z);
|
|
4290
4289
|
const be = (Date.now() + 1).toString();
|
|
4291
|
-
|
|
4290
|
+
E = 0, y = {
|
|
4292
4291
|
sessionId: v,
|
|
4293
4292
|
requestId: O,
|
|
4294
4293
|
keyword: ae,
|
|
@@ -4308,9 +4307,9 @@ function Mr(t, e, n) {
|
|
|
4308
4307
|
}
|
|
4309
4308
|
function nt(k, O, X, ae, be = !1) {
|
|
4310
4309
|
return Se(this, null, function* () {
|
|
4311
|
-
n(17, d = !0), w = !1, be && (console.log(`Retrying request (attempt ${
|
|
4310
|
+
n(17, d = !0), w = !1, be && (console.log(`Retrying request (attempt ${E + 1}/${ln})...`), a = "", n(13, c = c.map((se) => se.id === ae ? ke(oe({}, se), { content: "" }) : se))), f && f.abort(), T && (clearTimeout(T), T = null), f = new AbortController(), ie > 0 && (T = setTimeout(
|
|
4312
4311
|
() => {
|
|
4313
|
-
d && f && (console.warn("SSE request timeout, aborting..."), f.abort(),
|
|
4312
|
+
d && f && (console.warn("SSE request timeout, aborting..."), f.abort(), E < ln && y ? (E++, setTimeout(
|
|
4314
4313
|
() => {
|
|
4315
4314
|
y && nt(y.sessionId, y.requestId, y.keyword, y.assistantMessageId, !0);
|
|
4316
4315
|
},
|
|
@@ -4361,16 +4360,16 @@ function Mr(t, e, n) {
|
|
|
4361
4360
|
throw a = "请求异常,请重试", n(13, c = c.map((de) => de.id === ae ? ke(oe({}, de), { content: a }) : de)), M(!1), console.error("SSE error:", se), f = null, n(17, d = !1), se;
|
|
4362
4361
|
},
|
|
4363
4362
|
onclose() {
|
|
4364
|
-
T && (clearTimeout(T), T = null), f = null, n(17, d = !1), y = null,
|
|
4363
|
+
T && (clearTimeout(T), T = null), f = null, n(17, d = !1), y = null, E = 0;
|
|
4365
4364
|
}
|
|
4366
4365
|
});
|
|
4367
4366
|
} catch (se) {
|
|
4368
|
-
console.error("Failed to send message:", se), T && (clearTimeout(T), T = null),
|
|
4367
|
+
console.error("Failed to send message:", se), T && (clearTimeout(T), T = null), E < ln && y && !String(se).includes("abort") ? (E++, console.log(`Request failed, retrying (attempt ${E}/${ln})...`), setTimeout(
|
|
4369
4368
|
() => {
|
|
4370
4369
|
y && nt(y.sessionId, y.requestId, y.keyword, y.assistantMessageId, !0);
|
|
4371
4370
|
},
|
|
4372
4371
|
1e3
|
|
4373
|
-
)) : (String(se).includes("abort") || (a = a || "请求失败,请稍后重试", n(13, c = c.map((de) => de.id === ae ? ke(oe({}, de), { content: a }) : de))), n(17, d = !1), y = null,
|
|
4372
|
+
)) : (String(se).includes("abort") || (a = a || "请求失败,请稍后重试", n(13, c = c.map((de) => de.id === ae ? ke(oe({}, de), { content: a }) : de))), n(17, d = !1), y = null, E = 0);
|
|
4374
4373
|
}
|
|
4375
4374
|
});
|
|
4376
4375
|
}
|
|
@@ -4681,7 +4680,7 @@ function Mr(t, e, n) {
|
|
|
4681
4680
|
pt,
|
|
4682
4681
|
C,
|
|
4683
4682
|
o,
|
|
4684
|
-
|
|
4683
|
+
S,
|
|
4685
4684
|
Qe,
|
|
4686
4685
|
he,
|
|
4687
4686
|
ue,
|
|
@@ -4763,7 +4762,7 @@ function ri(t) {
|
|
|
4763
4762
|
), l, r, c, a, f, g, m, h, d, w = (
|
|
4764
4763
|
/*isFullscreen*/
|
|
4765
4764
|
t[2] ? "退出全屏" : "全屏显示"
|
|
4766
|
-
), T,
|
|
4765
|
+
), T, E, y, S, _, M, R, v, L = (
|
|
4767
4766
|
/*isSnapped*/
|
|
4768
4767
|
t[8] ? "取消吸附" : "吸附到边缘"
|
|
4769
4768
|
), I, V, H, D, G, te, ne, K, le, Ge = `${/*mergedOptions*/
|
|
@@ -4792,7 +4791,7 @@ function ri(t) {
|
|
|
4792
4791
|
return K = nt(t), le = Le[K] = Ve[K](t), {
|
|
4793
4792
|
c() {
|
|
4794
4793
|
var U, Q, Oe;
|
|
4795
|
-
e = x("div"), n = x("div"), s = x("div"), i = x("h3"), l = De(o), r = q(), c = x("div"), a = x("div"), f = x("button"), g = Y("svg"), Ae.c(), h = q(), d = x("span"), T = De(w),
|
|
4794
|
+
e = x("div"), n = x("div"), s = x("div"), i = x("h3"), l = De(o), r = q(), c = x("div"), a = x("div"), f = x("button"), g = Y("svg"), Ae.c(), h = q(), d = x("span"), T = De(w), E = q(), y = x("div"), S = x("button"), _ = Y("svg"), ge.c(), R = q(), v = x("span"), I = De(L), V = q(), H = x("div"), D = x("button"), D.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>', G = q(), te = x("span"), te.textContent = "关闭助手", ne = q(), le.c(), u(i, "class", "svelte-1h7dpbq"), u(g, "xmlns", "http://www.w3.org/2000/svg"), u(g, "width", "18"), u(g, "height", "18"), u(g, "viewBox", "0 0 24 24"), u(g, "fill", "none"), u(g, "stroke", "currentColor"), u(g, "stroke-width", "2"), u(g, "stroke-linecap", "round"), u(g, "stroke-linejoin", "round"), u(f, "class", "sy-assistant-action-button svelte-1h7dpbq"), u(f, "aria-label", m = /*isFullscreen*/
|
|
4796
4795
|
t[2] ? "退出全屏" : "全屏显示"), z(
|
|
4797
4796
|
f,
|
|
4798
4797
|
"active",
|
|
@@ -4803,9 +4802,9 @@ function ri(t) {
|
|
|
4803
4802
|
"z-index",
|
|
4804
4803
|
/*mergedOptions*/
|
|
4805
4804
|
((U = t[3].zIndex) != null ? U : 1e3) + 3
|
|
4806
|
-
), u(a, "class", "sy-assistant-tooltip-wrapper svelte-1h7dpbq"), u(_, "xmlns", "http://www.w3.org/2000/svg"), u(_, "width", "18"), u(_, "height", "18"), u(_, "viewBox", "0 0 24 24"), u(_, "fill", "none"), u(_, "stroke", "currentColor"), u(_, "stroke-width", "2"), u(_, "stroke-linecap", "round"), u(_, "stroke-linejoin", "round"), u(
|
|
4805
|
+
), u(a, "class", "sy-assistant-tooltip-wrapper svelte-1h7dpbq"), u(_, "xmlns", "http://www.w3.org/2000/svg"), u(_, "width", "18"), u(_, "height", "18"), u(_, "viewBox", "0 0 24 24"), u(_, "fill", "none"), u(_, "stroke", "currentColor"), u(_, "stroke-width", "2"), u(_, "stroke-linecap", "round"), u(_, "stroke-linejoin", "round"), u(S, "class", "sy-assistant-action-button svelte-1h7dpbq"), u(S, "aria-label", M = /*isSnapped*/
|
|
4807
4806
|
t[8] ? "取消吸附" : "吸附到边缘"), z(
|
|
4808
|
-
|
|
4807
|
+
S,
|
|
4809
4808
|
"active",
|
|
4810
4809
|
/*isSnapped*/
|
|
4811
4810
|
t[8]
|
|
@@ -4847,7 +4846,7 @@ function ri(t) {
|
|
|
4847
4846
|
), F(e, "height", Ge);
|
|
4848
4847
|
},
|
|
4849
4848
|
m(U, Q) {
|
|
4850
|
-
W(U, e, Q), b(e, n), b(n, s), b(s, i), b(i, l), b(s, r), b(s, c), b(c, a), b(a, f), b(f, g), Ae.m(g, null), b(a, h), b(a, d), b(d, T), b(c,
|
|
4849
|
+
W(U, e, Q), b(e, n), b(n, s), b(s, i), b(i, l), b(s, r), b(s, c), b(c, a), b(a, f), b(f, g), Ae.m(g, null), b(a, h), b(a, d), b(d, T), b(c, E), b(c, y), b(y, S), b(S, _), ge.m(_, null), b(y, R), b(y, v), b(v, I), b(c, V), b(c, H), b(H, D), b(H, G), b(H, te), b(n, ne), Le[K].m(n, null), ie = !0, Ze || (Z = [
|
|
4851
4850
|
j(
|
|
4852
4851
|
f,
|
|
4853
4852
|
"click",
|
|
@@ -4855,7 +4854,7 @@ function ri(t) {
|
|
|
4855
4854
|
t[18]
|
|
4856
4855
|
),
|
|
4857
4856
|
j(
|
|
4858
|
-
|
|
4857
|
+
S,
|
|
4859
4858
|
"click",
|
|
4860
4859
|
/*toggleSnap*/
|
|
4861
4860
|
t[20]
|
|
@@ -4894,9 +4893,9 @@ function ri(t) {
|
|
|
4894
4893
|
((_e = U[3].zIndex) != null ? _e : 1e3) + 3
|
|
4895
4894
|
), xe !== (xe = ue(U)) && (ge.d(1), ge = xe(U), ge && (ge.c(), ge.m(_, null))), (!ie || Q[0] & /*isSnapped*/
|
|
4896
4895
|
256 && M !== (M = /*isSnapped*/
|
|
4897
|
-
U[8] ? "取消吸附" : "吸附到边缘")) && u(
|
|
4896
|
+
U[8] ? "取消吸附" : "吸附到边缘")) && u(S, "aria-label", M), (!ie || Q[0] & /*isSnapped*/
|
|
4898
4897
|
256) && z(
|
|
4899
|
-
|
|
4898
|
+
S,
|
|
4900
4899
|
"active",
|
|
4901
4900
|
/*isSnapped*/
|
|
4902
4901
|
U[8]
|
|
@@ -5093,39 +5092,39 @@ function Pr(t) {
|
|
|
5093
5092
|
c() {
|
|
5094
5093
|
Qn(e.$$.fragment);
|
|
5095
5094
|
},
|
|
5096
|
-
m(T,
|
|
5097
|
-
bn(e, T,
|
|
5095
|
+
m(T, E) {
|
|
5096
|
+
bn(e, T, E), n = !0;
|
|
5098
5097
|
},
|
|
5099
|
-
p(T,
|
|
5100
|
-
var
|
|
5098
|
+
p(T, E) {
|
|
5099
|
+
var S, _, M, R, v, L, I, V, H, D, G, te, ne;
|
|
5101
5100
|
const y = {};
|
|
5102
|
-
|
|
5101
|
+
E[0] & /*mergedOptions*/
|
|
5103
5102
|
8 && (y.zIndex = /*mergedOptions*/
|
|
5104
|
-
(
|
|
5103
|
+
(S = T[3].zIndex) != null ? S : 1e3), E[0] & /*currentSessionId*/
|
|
5105
5104
|
1024 && (y.sessionId = /*currentSessionId*/
|
|
5106
|
-
T[10]),
|
|
5105
|
+
T[10]), E[0] & /*mergedOptions*/
|
|
5107
5106
|
8 && (y.hasScene = /*mergedOptions*/
|
|
5108
|
-
(_ = T[3].hasScene) != null ? _ : !1),
|
|
5107
|
+
(_ = T[3].hasScene) != null ? _ : !1), E[0] & /*mergedOptions*/
|
|
5109
5108
|
8 && (y.apiPrefix = /*mergedOptions*/
|
|
5110
|
-
(M = T[3].apiPrefix) != null ? M : "/aiops/aigc"),
|
|
5109
|
+
(M = T[3].apiPrefix) != null ? M : "/aiops/aigc"), E[0] & /*mergedOptions*/
|
|
5111
5110
|
8 && (y.theme = /*mergedOptions*/
|
|
5112
|
-
(R = T[3].theme) != null ? R : "default"),
|
|
5111
|
+
(R = T[3].theme) != null ? R : "default"), E[0] & /*mergedOptions*/
|
|
5113
5112
|
8 && (y.showHistory = /*mergedOptions*/
|
|
5114
|
-
(v = T[3].showHistory) != null ? v : !0),
|
|
5113
|
+
(v = T[3].showHistory) != null ? v : !0), E[0] & /*mergedOptions*/
|
|
5115
5114
|
8 && (y.showActions = /*mergedOptions*/
|
|
5116
|
-
(L = T[3].showActions) != null ? L : !0),
|
|
5115
|
+
(L = T[3].showActions) != null ? L : !0), E[0] & /*mergedOptions*/
|
|
5117
5116
|
8 && (y.sendIcon = /*mergedOptions*/
|
|
5118
|
-
(I = T[3].sendIcon) != null ? I : ""),
|
|
5117
|
+
(I = T[3].sendIcon) != null ? I : ""), E[0] & /*mergedOptions*/
|
|
5119
5118
|
8 && (y.robotIcon = /*mergedOptions*/
|
|
5120
|
-
(V = T[3].robotIcon) != null ? V : ""),
|
|
5119
|
+
(V = T[3].robotIcon) != null ? V : ""), E[0] & /*mergedOptions*/
|
|
5121
5120
|
8 && (y.userIcon = /*mergedOptions*/
|
|
5122
|
-
(H = T[3].userIcon) != null ? H : ""),
|
|
5121
|
+
(H = T[3].userIcon) != null ? H : ""), E[0] & /*mergedOptions*/
|
|
5123
5122
|
8 && (y.maxInputLength = /*mergedOptions*/
|
|
5124
|
-
(D = T[3].maxInputLength) != null ? D : 500),
|
|
5123
|
+
(D = T[3].maxInputLength) != null ? D : 500), E[0] & /*mergedOptions*/
|
|
5125
5124
|
8 && (y.autoExpandTextarea = /*mergedOptions*/
|
|
5126
|
-
(G = T[3].autoExpandTextarea) != null ? G : !1),
|
|
5125
|
+
(G = T[3].autoExpandTextarea) != null ? G : !1), E[0] & /*mergedOptions*/
|
|
5127
5126
|
8 && (y.maxTextareaRows = /*mergedOptions*/
|
|
5128
|
-
(te = T[3].maxTextareaRows) != null ? te : 6),
|
|
5127
|
+
(te = T[3].maxTextareaRows) != null ? te : 6), E[0] & /*mergedOptions*/
|
|
5129
5128
|
8 && (y.sseTimeout = /*mergedOptions*/
|
|
5130
5129
|
(ne = T[3].sseTimeout) != null ? ne : 0), e.$set(y);
|
|
5131
5130
|
},
|
|
@@ -5479,7 +5478,7 @@ function Ur(t) {
|
|
|
5479
5478
|
], c = !0);
|
|
5480
5479
|
},
|
|
5481
5480
|
p(d, w) {
|
|
5482
|
-
var T,
|
|
5481
|
+
var T, E;
|
|
5483
5482
|
/*$drawerWidth*/
|
|
5484
5483
|
d[13] > 0 ? f ? (f.p(d, w), w[0] & /*$drawerWidth*/
|
|
5485
5484
|
8192 && et(f, 1)) : (f = ri(d), f.c(), et(f, 1), f.m(n, null)) : f && (Xn(), wt(f, 1, 1, () => {
|
|
@@ -5582,7 +5581,7 @@ function Ur(t) {
|
|
|
5582
5581
|
e,
|
|
5583
5582
|
"z-index",
|
|
5584
5583
|
/*mergedOptions*/
|
|
5585
|
-
(
|
|
5584
|
+
(E = d[3].zIndex) != null ? E : 1e3
|
|
5586
5585
|
);
|
|
5587
5586
|
},
|
|
5588
5587
|
i(d) {
|
|
@@ -5637,7 +5636,7 @@ function Gr(t, e, n) {
|
|
|
5637
5636
|
// SSE 超时的默认值(不设置超时)
|
|
5638
5637
|
sseTimeout: 0
|
|
5639
5638
|
};
|
|
5640
|
-
let { target: g = "body" } = e, { options: m = {} } = e, h, d = null, w = !1, T,
|
|
5639
|
+
let { target: g = "body" } = e, { options: m = {} } = e, h, d = null, w = !1, T, E = !1, y = 0, S = 0, _ = we, M = 20, R = _, v = M, L = !1, I = we, V = 50, H = !1, D = !1, G = null, te = null, ne = "", K = {
|
|
5641
5640
|
left: "auto",
|
|
5642
5641
|
right: `${we}px`,
|
|
5643
5642
|
top: "auto",
|
|
@@ -5666,11 +5665,11 @@ function Gr(t, e, n) {
|
|
|
5666
5665
|
});
|
|
5667
5666
|
}
|
|
5668
5667
|
function Ae(C, $ = !1) {
|
|
5669
|
-
$ ? n(27, L = !0) : n(6,
|
|
5668
|
+
$ ? n(27, L = !0) : n(6, E = !0), y = C.clientX, S = C.clientY, _ = $ ? I : R, M = $ ? V : v, C.preventDefault();
|
|
5670
5669
|
}
|
|
5671
5670
|
function ue(C) {
|
|
5672
|
-
if (!
|
|
5673
|
-
const $ = y - C.clientX, pe =
|
|
5671
|
+
if (!E && !L) return;
|
|
5672
|
+
const $ = y - C.clientX, pe = S - C.clientY;
|
|
5674
5673
|
if (L) {
|
|
5675
5674
|
const ye = _ + $, Pe = C.clientY, Re = ht();
|
|
5676
5675
|
n(28, I = Math.max(we, Math.min(window.innerWidth - Re - we, ye)));
|
|
@@ -5690,7 +5689,7 @@ function Gr(t, e, n) {
|
|
|
5690
5689
|
}
|
|
5691
5690
|
function xe() {
|
|
5692
5691
|
const C = L;
|
|
5693
|
-
n(6,
|
|
5692
|
+
n(6, E = !1), n(27, L = !1), C && s.hideEnabled && !w && !H && ge();
|
|
5694
5693
|
}
|
|
5695
5694
|
function ge() {
|
|
5696
5695
|
!s.hideEnabled || w || H || (Ve(), G = setTimeout(
|
|
@@ -5879,7 +5878,7 @@ function Gr(t, e, n) {
|
|
|
5879
5878
|
s,
|
|
5880
5879
|
h,
|
|
5881
5880
|
T,
|
|
5882
|
-
|
|
5881
|
+
E,
|
|
5883
5882
|
te,
|
|
5884
5883
|
ie,
|
|
5885
5884
|
Ze,
|