vite-plugin-opencode-assistant 1.0.40 → 1.0.42
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/es/client/App.vue.js +28 -8
- package/es/client/components/ChromeWarmupError-sfc.css +1 -1
- package/es/client/components/ChromeWarmupError.vue.js +1 -1
- package/es/client/composables/useHotkey.js +1 -1
- package/es/core/api.js +1 -1
- package/es/core/proxy-server.js +16 -0
- package/es/core/service.js +3 -3
- package/es/endpoints/sse.js +5 -3
- package/lib/client/App.vue.js +28 -8
- package/lib/client/components/ChromeWarmupError-sfc.css +1 -1
- package/lib/client/components/ChromeWarmupError.vue.js +1 -1
- package/lib/client/composables/useHotkey.js +1 -1
- package/lib/client.js +1009 -999
- package/lib/core/api.js +1 -1
- package/lib/core/proxy-server.js +16 -0
- package/lib/core/service.js +3 -3
- package/lib/endpoints/sse.js +5 -3
- package/lib/style.css +1 -1
- package/package.json +4 -4
package/lib/client.js
CHANGED
|
@@ -9,12 +9,12 @@ function Ps(e) {
|
|
|
9
9
|
for (const n of e.split(",")) t[n] = 1;
|
|
10
10
|
return (n) => n in t;
|
|
11
11
|
}
|
|
12
|
-
const ae = {},
|
|
13
|
-
},
|
|
14
|
-
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97),
|
|
12
|
+
const ae = {}, Kt = [], At = () => {
|
|
13
|
+
}, Uo = () => !1, Kn = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
|
|
14
|
+
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), Un = (e) => e.startsWith("onUpdate:"), tt = Object.assign, Yo = (e, t) => {
|
|
15
15
|
const n = e.indexOf(t);
|
|
16
16
|
n > -1 && e.splice(n, 1);
|
|
17
|
-
}, Rl = Object.prototype.hasOwnProperty, ne = (e, t) => Rl.call(e, t), U = Array.isArray,
|
|
17
|
+
}, Rl = Object.prototype.hasOwnProperty, ne = (e, t) => Rl.call(e, t), U = Array.isArray, Ut = (e) => Tn(e) === "[object Map]", Xo = (e) => Tn(e) === "[object Set]", Qs = (e) => Tn(e) === "[object Date]", te = (e) => typeof e == "function", ve = (e) => typeof e == "string", He = (e) => typeof e == "symbol", ie = (e) => e !== null && typeof e == "object", Go = (e) => (ie(e) || te(e)) && te(e.then) && te(e.catch), Jo = Object.prototype.toString, Tn = (e) => Jo.call(e), Il = (e) => Tn(e).slice(8, -1), Zo = (e) => Tn(e) === "[object Object]", Yn = (e) => ve(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, fn = /* @__PURE__ */ Ps(
|
|
18
18
|
// the leading comma is intentional so empty string "" is also included
|
|
19
19
|
",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
|
|
20
20
|
), Xn = (e) => {
|
|
@@ -113,7 +113,7 @@ function ks(e, t) {
|
|
|
113
113
|
}
|
|
114
114
|
return String(e) === String(t);
|
|
115
115
|
}
|
|
116
|
-
const ni = (e) => !!(e && e.__v_isRef === !0), Se = (e) => ve(e) ? e : e == null ? "" : U(e) || ie(e) && (e.toString === Jo || !te(e.toString)) ? ni(e) ? Se(e.value) : JSON.stringify(e, si, 2) : String(e), si = (e, t) => ni(t) ? si(e, t.value) :
|
|
116
|
+
const ni = (e) => !!(e && e.__v_isRef === !0), Se = (e) => ve(e) ? e : e == null ? "" : U(e) || ie(e) && (e.toString === Jo || !te(e.toString)) ? ni(e) ? Se(e.value) : JSON.stringify(e, si, 2) : String(e), si = (e, t) => ni(t) ? si(e, t.value) : Ut(t) ? {
|
|
117
117
|
[`Map(${t.size})`]: [...t.entries()].reduce(
|
|
118
118
|
(n, [s, o], i) => (n[is(s, i) + " =>"] = o, n),
|
|
119
119
|
{}
|
|
@@ -137,7 +137,7 @@ function ql(e) {
|
|
|
137
137
|
* @license MIT
|
|
138
138
|
**/
|
|
139
139
|
let Ne;
|
|
140
|
-
class
|
|
140
|
+
class Kl {
|
|
141
141
|
// TODO isolatedDeclarations "__v_skip"
|
|
142
142
|
constructor(t = !1) {
|
|
143
143
|
this.detached = t, this._active = !0, this._on = 0, this.effects = [], this.cleanups = [], this._isPaused = !1, this.__v_skip = !0, this.parent = Ne, !t && Ne && (this.index = (Ne.scopes || (Ne.scopes = [])).push(
|
|
@@ -217,7 +217,7 @@ class Ul {
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function Ul() {
|
|
221
221
|
return Ne;
|
|
222
222
|
}
|
|
223
223
|
let oe;
|
|
@@ -459,13 +459,13 @@ function _t(e, t, n, s, o, i) {
|
|
|
459
459
|
} else
|
|
460
460
|
switch ((n !== void 0 || l.has(void 0)) && r(l.get(n)), f && r(l.get(yn)), t) {
|
|
461
461
|
case "add":
|
|
462
|
-
a ? f && r(l.get("length")) : (r(l.get(jt)),
|
|
462
|
+
a ? f && r(l.get("length")) : (r(l.get(jt)), Ut(e) && r(l.get(_s)));
|
|
463
463
|
break;
|
|
464
464
|
case "delete":
|
|
465
|
-
a || (r(l.get(jt)),
|
|
465
|
+
a || (r(l.get(jt)), Ut(e) && r(l.get(_s)));
|
|
466
466
|
break;
|
|
467
467
|
case "set":
|
|
468
|
-
|
|
468
|
+
Ut(e) && r(l.get(jt));
|
|
469
469
|
break;
|
|
470
470
|
}
|
|
471
471
|
}
|
|
@@ -743,7 +743,7 @@ const nr = /* @__PURE__ */ new pi(), sr = /* @__PURE__ */ new tr(), or = /* @__P
|
|
|
743
743
|
const ys = (e) => e, An = (e) => Reflect.getPrototypeOf(e);
|
|
744
744
|
function ir(e, t, n) {
|
|
745
745
|
return function(...s) {
|
|
746
|
-
const o = this.__v_raw, i = /* @__PURE__ */ Q(o), l =
|
|
746
|
+
const o = this.__v_raw, i = /* @__PURE__ */ Q(o), l = Ut(i), r = e === "entries" || e === Symbol.iterator && l, a = e === "keys" && l, f = o[e](...s), c = n ? ys : t ? Jt : et;
|
|
747
747
|
return !t && Ce(
|
|
748
748
|
i,
|
|
749
749
|
"iterate",
|
|
@@ -1057,8 +1057,8 @@ function Er(e, t = !1, n = Bt) {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
function Tr(e, t, n = ae) {
|
|
1059
1059
|
const { immediate: s, deep: o, once: i, scheduler: l, augmentJob: r, call: a } = n, f = (y) => o ? y : /* @__PURE__ */ We(y) || o === !1 || o === 0 ? yt(y, 1) : yt(y);
|
|
1060
|
-
let c, d, p, m,
|
|
1061
|
-
if (/* @__PURE__ */ Ee(e) ? (d = () => e.value,
|
|
1060
|
+
let c, d, p, m, T = !1, _ = !1;
|
|
1061
|
+
if (/* @__PURE__ */ Ee(e) ? (d = () => e.value, T = /* @__PURE__ */ We(e)) : /* @__PURE__ */ Wt(e) ? (d = () => f(e), T = !0) : U(e) ? (_ = !0, T = e.some((y) => /* @__PURE__ */ Wt(y) || /* @__PURE__ */ We(y)), d = () => e.map((y) => {
|
|
1062
1062
|
if (/* @__PURE__ */ Ee(y))
|
|
1063
1063
|
return y.value;
|
|
1064
1064
|
if (/* @__PURE__ */ Wt(y))
|
|
@@ -1082,55 +1082,55 @@ function Tr(e, t, n = ae) {
|
|
|
1082
1082
|
Bt = y;
|
|
1083
1083
|
}
|
|
1084
1084
|
} : d = At, t && o) {
|
|
1085
|
-
const y = d,
|
|
1086
|
-
d = () => yt(y(),
|
|
1085
|
+
const y = d, B = o === !0 ? 1 / 0 : o;
|
|
1086
|
+
d = () => yt(y(), B);
|
|
1087
1087
|
}
|
|
1088
|
-
const
|
|
1089
|
-
c.stop(),
|
|
1088
|
+
const A = Ul(), D = () => {
|
|
1089
|
+
c.stop(), A && A.active && Yo(A.effects, c);
|
|
1090
1090
|
};
|
|
1091
1091
|
if (i && t) {
|
|
1092
1092
|
const y = t;
|
|
1093
|
-
t = (
|
|
1094
|
-
y(
|
|
1093
|
+
t = (...B) => {
|
|
1094
|
+
y(...B), D();
|
|
1095
1095
|
};
|
|
1096
1096
|
}
|
|
1097
|
-
let
|
|
1098
|
-
const
|
|
1097
|
+
let x = _ ? new Array(e.length).fill(Pn) : Pn;
|
|
1098
|
+
const F = (y) => {
|
|
1099
1099
|
if (!(!(c.flags & 1) || !c.dirty && !y))
|
|
1100
1100
|
if (t) {
|
|
1101
|
-
const
|
|
1102
|
-
if (o ||
|
|
1101
|
+
const B = c.run();
|
|
1102
|
+
if (o || T || (_ ? B.some((I, j) => ut(I, x[j])) : ut(B, x))) {
|
|
1103
1103
|
p && p();
|
|
1104
|
-
const
|
|
1104
|
+
const I = Bt;
|
|
1105
1105
|
Bt = c;
|
|
1106
1106
|
try {
|
|
1107
1107
|
const j = [
|
|
1108
|
-
|
|
1108
|
+
B,
|
|
1109
1109
|
// pass undefined as the old value when it's changed for the first time
|
|
1110
|
-
|
|
1110
|
+
x === Pn ? void 0 : _ && x[0] === Pn ? [] : x,
|
|
1111
1111
|
m
|
|
1112
1112
|
];
|
|
1113
|
-
|
|
1113
|
+
x = B, a ? a(t, 3, j) : (
|
|
1114
1114
|
// @ts-expect-error
|
|
1115
1115
|
t(...j)
|
|
1116
1116
|
);
|
|
1117
1117
|
} finally {
|
|
1118
|
-
Bt =
|
|
1118
|
+
Bt = I;
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
|
1121
1121
|
} else
|
|
1122
1122
|
c.run();
|
|
1123
1123
|
};
|
|
1124
|
-
return r && r(
|
|
1124
|
+
return r && r(F), c = new oi(d), c.scheduler = l ? () => l(F, !1) : F, m = (y) => Er(y, !1, c), p = c.onStop = () => {
|
|
1125
1125
|
const y = Ln.get(c);
|
|
1126
1126
|
if (y) {
|
|
1127
1127
|
if (a)
|
|
1128
1128
|
a(y, 4);
|
|
1129
1129
|
else
|
|
1130
|
-
for (const
|
|
1130
|
+
for (const B of y) B();
|
|
1131
1131
|
Ln.delete(c);
|
|
1132
1132
|
}
|
|
1133
|
-
}, t ? s ?
|
|
1133
|
+
}, t ? s ? F(!0) : x = c.run() : l ? l(F.bind(null, !0), !0) : c.run(), D.pause = c.pause.bind(c), D.resume = c.resume.bind(c), D.stop = D, D;
|
|
1134
1134
|
}
|
|
1135
1135
|
function yt(e, t = 1 / 0, n) {
|
|
1136
1136
|
if (t <= 0 || !ie(e) || e.__v_skip || (n = n || /* @__PURE__ */ new Map(), (n.get(e) || 0) >= t))
|
|
@@ -1140,7 +1140,7 @@ function yt(e, t = 1 / 0, n) {
|
|
|
1140
1140
|
else if (U(e))
|
|
1141
1141
|
for (let s = 0; s < e.length; s++)
|
|
1142
1142
|
yt(e[s], t, n);
|
|
1143
|
-
else if (Xo(e) ||
|
|
1143
|
+
else if (Xo(e) || Ut(e))
|
|
1144
1144
|
e.forEach((s) => {
|
|
1145
1145
|
yt(s, t, n);
|
|
1146
1146
|
});
|
|
@@ -1347,7 +1347,7 @@ function Or(e, t) {
|
|
|
1347
1347
|
}
|
|
1348
1348
|
}
|
|
1349
1349
|
function Oi(e, t, n = !1) {
|
|
1350
|
-
const s =
|
|
1350
|
+
const s = Us();
|
|
1351
1351
|
if (s || Gt) {
|
|
1352
1352
|
let o = Gt ? Gt._context.provides : s ? s.parent == null || s.ce ? s.vnode.appContext && s.vnode.appContext.provides : s.parent.provides : void 0;
|
|
1353
1353
|
if (o && e in o)
|
|
@@ -1374,12 +1374,12 @@ function Pr(e, t, n = ae) {
|
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
1376
|
const c = $e;
|
|
1377
|
-
r.call = (m,
|
|
1377
|
+
r.call = (m, T, _) => St(m, c, T, _);
|
|
1378
1378
|
let d = !1;
|
|
1379
1379
|
i === "post" ? r.scheduler = (m) => {
|
|
1380
1380
|
ke(m, c && c.suspense);
|
|
1381
|
-
} : i !== "sync" && (d = !0, r.scheduler = (m,
|
|
1382
|
-
|
|
1381
|
+
} : i !== "sync" && (d = !0, r.scheduler = (m, T) => {
|
|
1382
|
+
T ? m() : Bs(m);
|
|
1383
1383
|
}), r.augmentJob = (m) => {
|
|
1384
1384
|
t && (m.flags |= 4), d && (m.flags |= 2, c && (m.id = c.uid, m.i = c));
|
|
1385
1385
|
};
|
|
@@ -1397,48 +1397,48 @@ const Lt = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ Symbol("_vte"), k
|
|
|
1397
1397
|
mc: c,
|
|
1398
1398
|
pc: d,
|
|
1399
1399
|
pbc: p,
|
|
1400
|
-
o: { insert: m, querySelector:
|
|
1401
|
-
} = f,
|
|
1402
|
-
let { dynamicChildren:
|
|
1403
|
-
const
|
|
1404
|
-
|
|
1405
|
-
|
|
1400
|
+
o: { insert: m, querySelector: T, createText: _, createComment: A }
|
|
1401
|
+
} = f, D = $t(t.props);
|
|
1402
|
+
let { dynamicChildren: x } = t;
|
|
1403
|
+
const F = (I, j, V) => {
|
|
1404
|
+
I.shapeFlag & 16 && c(
|
|
1405
|
+
I.children,
|
|
1406
1406
|
j,
|
|
1407
|
-
|
|
1407
|
+
V,
|
|
1408
1408
|
o,
|
|
1409
1409
|
i,
|
|
1410
1410
|
l,
|
|
1411
1411
|
r,
|
|
1412
1412
|
a
|
|
1413
1413
|
);
|
|
1414
|
-
}, y = (
|
|
1415
|
-
const j = $t(
|
|
1416
|
-
|
|
1417
|
-
},
|
|
1414
|
+
}, y = (I = t) => {
|
|
1415
|
+
const j = $t(I.props), V = I.target = Ss(I.props, T), ce = ws(V, I, _, m);
|
|
1416
|
+
V && (l !== "svg" && io(V) ? l = "svg" : l !== "mathml" && lo(V) && (l = "mathml"), o && o.isCE && (o.ce._teleportTargets || (o.ce._teleportTargets = /* @__PURE__ */ new Set())).add(V), j || (F(I, V, ce), un(I, !1)));
|
|
1417
|
+
}, B = (I) => {
|
|
1418
1418
|
const j = () => {
|
|
1419
|
-
Lt.get(
|
|
1419
|
+
Lt.get(I) === j && (Lt.delete(I), $t(I.props) && (F(I, n, I.anchor), un(I, !0)), y(I));
|
|
1420
1420
|
};
|
|
1421
|
-
Lt.set(
|
|
1421
|
+
Lt.set(I, j), ke(j, i);
|
|
1422
1422
|
};
|
|
1423
1423
|
if (e == null) {
|
|
1424
|
-
const
|
|
1425
|
-
if (m(
|
|
1426
|
-
|
|
1424
|
+
const I = t.el = _(""), j = t.anchor = _("");
|
|
1425
|
+
if (m(I, n, s), m(j, n, s), Dr(t.props) || i && i.pendingBranch) {
|
|
1426
|
+
B(t);
|
|
1427
1427
|
return;
|
|
1428
1428
|
}
|
|
1429
|
-
|
|
1429
|
+
D && (F(t, n, j), un(t, !0)), y();
|
|
1430
1430
|
} else {
|
|
1431
1431
|
t.el = e.el;
|
|
1432
|
-
const
|
|
1432
|
+
const I = t.anchor = e.anchor, j = Lt.get(e);
|
|
1433
1433
|
if (j) {
|
|
1434
|
-
j.flags |= 8, Lt.delete(e),
|
|
1434
|
+
j.flags |= 8, Lt.delete(e), B(t);
|
|
1435
1435
|
return;
|
|
1436
1436
|
}
|
|
1437
1437
|
t.targetStart = e.targetStart;
|
|
1438
|
-
const
|
|
1439
|
-
if (l === "svg" || io(
|
|
1438
|
+
const V = t.target = e.target, ce = t.targetAnchor = e.targetAnchor, fe = $t(e.props), _e = fe ? n : V, Re = fe ? I : ce;
|
|
1439
|
+
if (l === "svg" || io(V) ? l = "svg" : (l === "mathml" || lo(V)) && (l = "mathml"), x ? (p(
|
|
1440
1440
|
e.dynamicChildren,
|
|
1441
|
-
|
|
1441
|
+
x,
|
|
1442
1442
|
_e,
|
|
1443
1443
|
o,
|
|
1444
1444
|
i,
|
|
@@ -1454,34 +1454,34 @@ const Lt = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ Symbol("_vte"), k
|
|
|
1454
1454
|
l,
|
|
1455
1455
|
r,
|
|
1456
1456
|
!1
|
|
1457
|
-
),
|
|
1457
|
+
), D)
|
|
1458
1458
|
fe ? t.props && e.props && t.props.to !== e.props.to && (t.props.to = e.props.to) : kn(
|
|
1459
1459
|
t,
|
|
1460
1460
|
n,
|
|
1461
|
-
|
|
1461
|
+
I,
|
|
1462
1462
|
f,
|
|
1463
1463
|
1
|
|
1464
1464
|
);
|
|
1465
1465
|
else if ((t.props && t.props.to) !== (e.props && e.props.to)) {
|
|
1466
|
-
const
|
|
1466
|
+
const N = t.target = Ss(
|
|
1467
1467
|
t.props,
|
|
1468
|
-
|
|
1468
|
+
T
|
|
1469
1469
|
);
|
|
1470
|
-
|
|
1470
|
+
N && kn(
|
|
1471
1471
|
t,
|
|
1472
|
-
|
|
1472
|
+
N,
|
|
1473
1473
|
null,
|
|
1474
1474
|
f,
|
|
1475
1475
|
0
|
|
1476
1476
|
);
|
|
1477
1477
|
} else fe && kn(
|
|
1478
1478
|
t,
|
|
1479
|
-
|
|
1479
|
+
V,
|
|
1480
1480
|
ce,
|
|
1481
1481
|
f,
|
|
1482
1482
|
1
|
|
1483
1483
|
);
|
|
1484
|
-
un(t,
|
|
1484
|
+
un(t, D);
|
|
1485
1485
|
}
|
|
1486
1486
|
},
|
|
1487
1487
|
remove(e, t, n, { um: s, o: { remove: o } }, i) {
|
|
@@ -1495,16 +1495,16 @@ const Lt = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ Symbol("_vte"), k
|
|
|
1495
1495
|
props: p
|
|
1496
1496
|
} = e;
|
|
1497
1497
|
let m = i || !$t(p);
|
|
1498
|
-
const
|
|
1499
|
-
if (
|
|
1498
|
+
const T = Lt.get(e);
|
|
1499
|
+
if (T && (T.flags |= 8, Lt.delete(e), m = !1), d && (o(f), o(c)), i && o(a), l & 16)
|
|
1500
1500
|
for (let _ = 0; _ < r.length; _++) {
|
|
1501
|
-
const
|
|
1501
|
+
const A = r[_];
|
|
1502
1502
|
s(
|
|
1503
|
-
|
|
1503
|
+
A,
|
|
1504
1504
|
t,
|
|
1505
1505
|
n,
|
|
1506
1506
|
m,
|
|
1507
|
-
!!
|
|
1507
|
+
!!A.dynamicChildren
|
|
1508
1508
|
);
|
|
1509
1509
|
}
|
|
1510
1510
|
},
|
|
@@ -1527,49 +1527,49 @@ function kn(e, t, n, { o: { insert: s }, m: o }, i = 2) {
|
|
|
1527
1527
|
function Ir(e, t, n, s, o, i, {
|
|
1528
1528
|
o: { nextSibling: l, parentNode: r, querySelector: a, insert: f, createText: c }
|
|
1529
1529
|
}, d) {
|
|
1530
|
-
function p(
|
|
1531
|
-
let
|
|
1532
|
-
for (;
|
|
1533
|
-
if (
|
|
1534
|
-
if (
|
|
1535
|
-
t.targetStart =
|
|
1536
|
-
else if (
|
|
1537
|
-
t.targetAnchor =
|
|
1530
|
+
function p(A, D) {
|
|
1531
|
+
let x = D;
|
|
1532
|
+
for (; x; ) {
|
|
1533
|
+
if (x && x.nodeType === 8) {
|
|
1534
|
+
if (x.data === "teleport start anchor")
|
|
1535
|
+
t.targetStart = x;
|
|
1536
|
+
else if (x.data === "teleport anchor") {
|
|
1537
|
+
t.targetAnchor = x, A._lpa = t.targetAnchor && l(t.targetAnchor);
|
|
1538
1538
|
break;
|
|
1539
1539
|
}
|
|
1540
1540
|
}
|
|
1541
|
-
|
|
1541
|
+
x = l(x);
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
|
-
function m(
|
|
1545
|
-
|
|
1546
|
-
l(
|
|
1547
|
-
|
|
1548
|
-
r(
|
|
1544
|
+
function m(A, D) {
|
|
1545
|
+
D.anchor = d(
|
|
1546
|
+
l(A),
|
|
1547
|
+
D,
|
|
1548
|
+
r(A),
|
|
1549
1549
|
n,
|
|
1550
1550
|
s,
|
|
1551
1551
|
o,
|
|
1552
1552
|
i
|
|
1553
1553
|
);
|
|
1554
1554
|
}
|
|
1555
|
-
const
|
|
1555
|
+
const T = t.target = Ss(
|
|
1556
1556
|
t.props,
|
|
1557
1557
|
a
|
|
1558
1558
|
), _ = $t(t.props);
|
|
1559
|
-
if (
|
|
1560
|
-
const
|
|
1561
|
-
t.shapeFlag & 16 && (_ ? (m(e, t), p(
|
|
1562
|
-
|
|
1559
|
+
if (T) {
|
|
1560
|
+
const A = T._lpa || T.firstChild;
|
|
1561
|
+
t.shapeFlag & 16 && (_ ? (m(e, t), p(T, A), t.targetAnchor || ws(
|
|
1562
|
+
T,
|
|
1563
1563
|
t,
|
|
1564
1564
|
c,
|
|
1565
1565
|
f,
|
|
1566
1566
|
// if target is the same as the main view, insert anchors before current node
|
|
1567
1567
|
// to avoid hydrating mismatch
|
|
1568
|
-
r(e) ===
|
|
1569
|
-
)) : (t.anchor = l(e), p(
|
|
1570
|
-
|
|
1568
|
+
r(e) === T ? e : null
|
|
1569
|
+
)) : (t.anchor = l(e), p(T, A), t.targetAnchor || ws(T, t, c, f), d(
|
|
1570
|
+
A && l(A),
|
|
1571
1571
|
t,
|
|
1572
|
-
|
|
1572
|
+
T,
|
|
1573
1573
|
n,
|
|
1574
1574
|
s,
|
|
1575
1575
|
o,
|
|
@@ -1615,9 +1615,9 @@ const $n = /* @__PURE__ */ new WeakMap();
|
|
|
1615
1615
|
function pn(e, t, n, s, o = !1) {
|
|
1616
1616
|
if (U(e)) {
|
|
1617
1617
|
e.forEach(
|
|
1618
|
-
(_,
|
|
1618
|
+
(_, A) => pn(
|
|
1619
1619
|
_,
|
|
1620
|
-
t && (U(t) ? t[
|
|
1620
|
+
t && (U(t) ? t[A] : t),
|
|
1621
1621
|
n,
|
|
1622
1622
|
s,
|
|
1623
1623
|
o
|
|
@@ -1629,42 +1629,42 @@ function pn(e, t, n, s, o = !1) {
|
|
|
1629
1629
|
s.shapeFlag & 512 && s.type.__asyncResolved && s.component.subTree.component && pn(e, t, n, s.component.subTree);
|
|
1630
1630
|
return;
|
|
1631
1631
|
}
|
|
1632
|
-
const i = s.shapeFlag & 4 ? ns(s.component) : s.el, l = o ? null : i, { i: r, r: a } = e, f = t && t.r, c = r.refs === ae ? r.refs = {} : r.refs, d = r.setupState, p = /* @__PURE__ */ Q(d), m = d === ae ?
|
|
1632
|
+
const i = s.shapeFlag & 4 ? ns(s.component) : s.el, l = o ? null : i, { i: r, r: a } = e, f = t && t.r, c = r.refs === ae ? r.refs = {} : r.refs, d = r.setupState, p = /* @__PURE__ */ Q(d), m = d === ae ? Uo : (_) => ro(c, _) ? !1 : ne(p, _), T = (_, A) => !(A && ro(c, A));
|
|
1633
1633
|
if (f != null && f !== a) {
|
|
1634
1634
|
if (ao(t), ve(f))
|
|
1635
1635
|
c[f] = null, m(f) && (d[f] = null);
|
|
1636
1636
|
else if (/* @__PURE__ */ Ee(f)) {
|
|
1637
1637
|
const _ = t;
|
|
1638
|
-
|
|
1638
|
+
T(f, _.k) && (f.value = null), _.k && (c[_.k] = null);
|
|
1639
1639
|
}
|
|
1640
1640
|
}
|
|
1641
1641
|
if (te(a))
|
|
1642
1642
|
Cn(a, r, 12, [l, c]);
|
|
1643
1643
|
else {
|
|
1644
|
-
const _ = ve(a),
|
|
1645
|
-
if (_ ||
|
|
1646
|
-
const
|
|
1644
|
+
const _ = ve(a), A = /* @__PURE__ */ Ee(a);
|
|
1645
|
+
if (_ || A) {
|
|
1646
|
+
const D = () => {
|
|
1647
1647
|
if (e.f) {
|
|
1648
|
-
const
|
|
1648
|
+
const x = _ ? m(a) ? d[a] : c[a] : T() || !e.k ? a.value : c[e.k];
|
|
1649
1649
|
if (o)
|
|
1650
|
-
U(
|
|
1651
|
-
else if (U(
|
|
1652
|
-
|
|
1650
|
+
U(x) && Yo(x, i);
|
|
1651
|
+
else if (U(x))
|
|
1652
|
+
x.includes(i) || x.push(i);
|
|
1653
1653
|
else if (_)
|
|
1654
1654
|
c[a] = [i], m(a) && (d[a] = c[a]);
|
|
1655
1655
|
else {
|
|
1656
|
-
const
|
|
1657
|
-
|
|
1656
|
+
const F = [i];
|
|
1657
|
+
T(a, e.k) && (a.value = F), e.k && (c[e.k] = F);
|
|
1658
1658
|
}
|
|
1659
|
-
} else _ ? (c[a] = l, m(a) && (d[a] = l)) :
|
|
1659
|
+
} else _ ? (c[a] = l, m(a) && (d[a] = l)) : A && (T(a, e.k) && (a.value = l), e.k && (c[e.k] = l));
|
|
1660
1660
|
};
|
|
1661
1661
|
if (l) {
|
|
1662
|
-
const
|
|
1663
|
-
|
|
1662
|
+
const x = () => {
|
|
1663
|
+
D(), $n.delete(e);
|
|
1664
1664
|
};
|
|
1665
|
-
|
|
1665
|
+
x.id = -1, $n.set(e, x), ke(x, n);
|
|
1666
1666
|
} else
|
|
1667
|
-
ao(e),
|
|
1667
|
+
ao(e), D();
|
|
1668
1668
|
}
|
|
1669
1669
|
}
|
|
1670
1670
|
}
|
|
@@ -1742,7 +1742,7 @@ function jn(e, t) {
|
|
|
1742
1742
|
function ee(e, t, n = {}, s, o) {
|
|
1743
1743
|
if (xe.ce || xe.parent && Xt(xe.parent) && xe.parent.ce) {
|
|
1744
1744
|
const f = Object.keys(n).length > 0;
|
|
1745
|
-
return t !== "default" && (n.name = t),
|
|
1745
|
+
return t !== "default" && (n.name = t), z(), ft(
|
|
1746
1746
|
ue,
|
|
1747
1747
|
null,
|
|
1748
1748
|
[we("slot", n, s && s())],
|
|
@@ -1750,7 +1750,7 @@ function ee(e, t, n = {}, s, o) {
|
|
|
1750
1750
|
);
|
|
1751
1751
|
}
|
|
1752
1752
|
let i = e[t];
|
|
1753
|
-
i && i._c && (i._d = !1),
|
|
1753
|
+
i && i._c && (i._d = !1), z();
|
|
1754
1754
|
const l = i && Pi(i(n)), r = n.key || // slot content array of a dynamic conditional slot may have a branch
|
|
1755
1755
|
// key attached in the `createSlots` helper, respect that
|
|
1756
1756
|
l && l.key, a = ft(
|
|
@@ -1767,7 +1767,7 @@ function ee(e, t, n = {}, s, o) {
|
|
|
1767
1767
|
function Pi(e) {
|
|
1768
1768
|
return e.some((t) => Vs(t) ? !(t.type === wt || t.type === ue && !Pi(t.children)) : !0) ? e : null;
|
|
1769
1769
|
}
|
|
1770
|
-
const Ts = (e) => e ?
|
|
1770
|
+
const Ts = (e) => e ? Ki(e) ? ns(e) : Ts(e.parent) : null, gn = (
|
|
1771
1771
|
// Move PURE marker to new line to workaround compiler discarding it
|
|
1772
1772
|
// due to type annotation
|
|
1773
1773
|
/* @__PURE__ */ tt(/* @__PURE__ */ Object.create(null), {
|
|
@@ -1852,14 +1852,14 @@ function ki() {
|
|
|
1852
1852
|
return Hr().slots;
|
|
1853
1853
|
}
|
|
1854
1854
|
function Hr(e) {
|
|
1855
|
-
const t =
|
|
1855
|
+
const t = Us();
|
|
1856
1856
|
return t.setupContext || (t.setupContext = Yi(t));
|
|
1857
1857
|
}
|
|
1858
1858
|
function Di() {
|
|
1859
1859
|
return {
|
|
1860
1860
|
app: null,
|
|
1861
1861
|
config: {
|
|
1862
|
-
isNativeTag:
|
|
1862
|
+
isNativeTag: Uo,
|
|
1863
1863
|
performance: !1,
|
|
1864
1864
|
globalProperties: {},
|
|
1865
1865
|
optionMergeStrategies: {},
|
|
@@ -1941,7 +1941,7 @@ function Vr(e, t) {
|
|
|
1941
1941
|
}
|
|
1942
1942
|
let Gt = null;
|
|
1943
1943
|
const qr = (e, t) => t === "modelValue" || t === "model-value" ? e.modelModifiers : e[`${t}Modifiers`] || e[`${Ze(t)}Modifiers`] || e[`${zt(t)}Modifiers`];
|
|
1944
|
-
function
|
|
1944
|
+
function Kr(e, t, ...n) {
|
|
1945
1945
|
if (e.isUnmounted) return;
|
|
1946
1946
|
const s = e.vnode.props || ae;
|
|
1947
1947
|
let o = n;
|
|
@@ -1969,7 +1969,7 @@ function Ur(e, t, ...n) {
|
|
|
1969
1969
|
);
|
|
1970
1970
|
}
|
|
1971
1971
|
}
|
|
1972
|
-
function
|
|
1972
|
+
function Ur(e, t, n = !1) {
|
|
1973
1973
|
const s = t.emitsCache, o = s.get(e);
|
|
1974
1974
|
if (o !== void 0)
|
|
1975
1975
|
return o;
|
|
@@ -1978,7 +1978,7 @@ function Kr(e, t, n = !1) {
|
|
|
1978
1978
|
return i ? (U(i) ? i.forEach((r) => l[r] = null) : tt(l, i), ie(e) && s.set(e, l), l) : (ie(e) && s.set(e, null), null);
|
|
1979
1979
|
}
|
|
1980
1980
|
function es(e, t) {
|
|
1981
|
-
return !e || !
|
|
1981
|
+
return !e || !Kn(t) ? !1 : (t = t.slice(2).replace(/Once$/, ""), ne(e, t[0].toLowerCase() + t.slice(1)) || ne(e, zt(t)) || ne(e, t));
|
|
1982
1982
|
}
|
|
1983
1983
|
function co(e) {
|
|
1984
1984
|
const {
|
|
@@ -1995,27 +1995,27 @@ function co(e) {
|
|
|
1995
1995
|
props: d,
|
|
1996
1996
|
data: p,
|
|
1997
1997
|
setupState: m,
|
|
1998
|
-
ctx:
|
|
1998
|
+
ctx: T,
|
|
1999
1999
|
inheritAttrs: _
|
|
2000
|
-
} = e,
|
|
2001
|
-
let
|
|
2000
|
+
} = e, A = Bn(e);
|
|
2001
|
+
let D, x;
|
|
2002
2002
|
try {
|
|
2003
2003
|
if (n.shapeFlag & 4) {
|
|
2004
|
-
const y = o || s,
|
|
2005
|
-
|
|
2004
|
+
const y = o || s, B = y;
|
|
2005
|
+
D = ct(
|
|
2006
2006
|
f.call(
|
|
2007
|
-
|
|
2007
|
+
B,
|
|
2008
2008
|
y,
|
|
2009
2009
|
c,
|
|
2010
2010
|
d,
|
|
2011
2011
|
m,
|
|
2012
2012
|
p,
|
|
2013
|
-
|
|
2013
|
+
T
|
|
2014
2014
|
)
|
|
2015
|
-
),
|
|
2015
|
+
), x = r;
|
|
2016
2016
|
} else {
|
|
2017
2017
|
const y = t;
|
|
2018
|
-
|
|
2018
|
+
D = ct(
|
|
2019
2019
|
y.length > 1 ? y(
|
|
2020
2020
|
d,
|
|
2021
2021
|
{ attrs: r, slots: l, emit: a }
|
|
@@ -2023,30 +2023,30 @@ function co(e) {
|
|
|
2023
2023
|
d,
|
|
2024
2024
|
null
|
|
2025
2025
|
)
|
|
2026
|
-
),
|
|
2026
|
+
), x = t.props ? r : Yr(r);
|
|
2027
2027
|
}
|
|
2028
2028
|
} catch (y) {
|
|
2029
|
-
vn.length = 0, Qn(y, e, 1),
|
|
2029
|
+
vn.length = 0, Qn(y, e, 1), D = we(wt);
|
|
2030
2030
|
}
|
|
2031
|
-
let
|
|
2032
|
-
if (
|
|
2033
|
-
const y = Object.keys(
|
|
2034
|
-
y.length &&
|
|
2035
|
-
|
|
2031
|
+
let F = D;
|
|
2032
|
+
if (x && _ !== !1) {
|
|
2033
|
+
const y = Object.keys(x), { shapeFlag: B } = F;
|
|
2034
|
+
y.length && B & 7 && (i && y.some(Un) && (x = Xr(
|
|
2035
|
+
x,
|
|
2036
2036
|
i
|
|
2037
|
-
)),
|
|
2037
|
+
)), F = Zt(F, x, !1, !0));
|
|
2038
2038
|
}
|
|
2039
|
-
return n.dirs && (
|
|
2039
|
+
return n.dirs && (F = Zt(F, null, !1, !0), F.dirs = F.dirs ? F.dirs.concat(n.dirs) : n.dirs), n.transition && $s(F, n.transition), D = F, Bn(A), D;
|
|
2040
2040
|
}
|
|
2041
2041
|
const Yr = (e) => {
|
|
2042
2042
|
let t;
|
|
2043
2043
|
for (const n in e)
|
|
2044
|
-
(n === "class" || n === "style" ||
|
|
2044
|
+
(n === "class" || n === "style" || Kn(n)) && ((t || (t = {}))[n] = e[n]);
|
|
2045
2045
|
return t;
|
|
2046
2046
|
}, Xr = (e, t) => {
|
|
2047
2047
|
const n = {};
|
|
2048
2048
|
for (const s in e)
|
|
2049
|
-
(!
|
|
2049
|
+
(!Un(s) || !(s.slice(9) in t)) && (n[s] = e[s]);
|
|
2050
2050
|
return n;
|
|
2051
2051
|
};
|
|
2052
2052
|
function Gr(e, t, n) {
|
|
@@ -2127,11 +2127,11 @@ function Qr(e, t, n, s) {
|
|
|
2127
2127
|
if (ne(i, p))
|
|
2128
2128
|
m !== i[p] && (i[p] = m, f = !0);
|
|
2129
2129
|
else {
|
|
2130
|
-
const
|
|
2131
|
-
o[
|
|
2130
|
+
const T = Ze(p);
|
|
2131
|
+
o[T] = Cs(
|
|
2132
2132
|
a,
|
|
2133
2133
|
r,
|
|
2134
|
-
|
|
2134
|
+
T,
|
|
2135
2135
|
m,
|
|
2136
2136
|
e,
|
|
2137
2137
|
!1
|
|
@@ -2228,7 +2228,7 @@ function ea(e, t, n = !1) {
|
|
|
2228
2228
|
return o;
|
|
2229
2229
|
const i = e.props, l = {}, r = [];
|
|
2230
2230
|
if (!i)
|
|
2231
|
-
return ie(e) && s.set(e,
|
|
2231
|
+
return ie(e) && s.set(e, Kt), Kt;
|
|
2232
2232
|
if (U(i))
|
|
2233
2233
|
for (let f = 0; f < i.length; f++) {
|
|
2234
2234
|
const c = Ze(i[f]);
|
|
@@ -2239,24 +2239,24 @@ function ea(e, t, n = !1) {
|
|
|
2239
2239
|
const c = Ze(f);
|
|
2240
2240
|
if (fo(c)) {
|
|
2241
2241
|
const d = i[f], p = l[c] = U(d) || te(d) ? { type: d } : tt({}, d), m = p.type;
|
|
2242
|
-
let
|
|
2242
|
+
let T = !1, _ = !0;
|
|
2243
2243
|
if (U(m))
|
|
2244
|
-
for (let
|
|
2245
|
-
const
|
|
2246
|
-
if (
|
|
2247
|
-
|
|
2244
|
+
for (let A = 0; A < m.length; ++A) {
|
|
2245
|
+
const D = m[A], x = te(D) && D.name;
|
|
2246
|
+
if (x === "Boolean") {
|
|
2247
|
+
T = !0;
|
|
2248
2248
|
break;
|
|
2249
|
-
} else
|
|
2249
|
+
} else x === "String" && (_ = !1);
|
|
2250
2250
|
}
|
|
2251
2251
|
else
|
|
2252
|
-
|
|
2252
|
+
T = te(m) && m.name === "Boolean";
|
|
2253
2253
|
p[
|
|
2254
2254
|
0
|
|
2255
2255
|
/* shouldCast */
|
|
2256
|
-
] =
|
|
2256
|
+
] = T, p[
|
|
2257
2257
|
1
|
|
2258
2258
|
/* shouldCastTrue */
|
|
2259
|
-
] = _, (
|
|
2259
|
+
] = _, (T || ne(p, "default")) && r.push(c);
|
|
2260
2260
|
}
|
|
2261
2261
|
}
|
|
2262
2262
|
const a = [l, r];
|
|
@@ -2323,245 +2323,245 @@ function ia(e, t) {
|
|
|
2323
2323
|
parentNode: d,
|
|
2324
2324
|
nextSibling: p,
|
|
2325
2325
|
setScopeId: m = At,
|
|
2326
|
-
insertStaticContent:
|
|
2327
|
-
} = e, _ = (u, h, g,
|
|
2326
|
+
insertStaticContent: T
|
|
2327
|
+
} = e, _ = (u, h, g, E = null, b = null, w = null, k = void 0, P = null, M = !!h.dynamicChildren) => {
|
|
2328
2328
|
if (u === h)
|
|
2329
2329
|
return;
|
|
2330
|
-
u && !rn(u, h) && (
|
|
2331
|
-
const { type:
|
|
2332
|
-
switch (
|
|
2330
|
+
u && !rn(u, h) && (E = Ke(u), me(u, b, w, !0), u = null), h.patchFlag === -2 && (M = !1, h.dynamicChildren = null);
|
|
2331
|
+
const { type: S, ref: H, shapeFlag: R } = h;
|
|
2332
|
+
switch (S) {
|
|
2333
2333
|
case ts:
|
|
2334
|
-
|
|
2334
|
+
A(u, h, g, E);
|
|
2335
2335
|
break;
|
|
2336
2336
|
case wt:
|
|
2337
|
-
|
|
2337
|
+
D(u, h, g, E);
|
|
2338
2338
|
break;
|
|
2339
2339
|
case mn:
|
|
2340
|
-
u == null &&
|
|
2340
|
+
u == null && x(h, g, E, k);
|
|
2341
2341
|
break;
|
|
2342
2342
|
case ue:
|
|
2343
2343
|
Re(
|
|
2344
2344
|
u,
|
|
2345
2345
|
h,
|
|
2346
2346
|
g,
|
|
2347
|
-
|
|
2347
|
+
E,
|
|
2348
2348
|
b,
|
|
2349
|
-
|
|
2350
|
-
P,
|
|
2349
|
+
w,
|
|
2351
2350
|
k,
|
|
2351
|
+
P,
|
|
2352
2352
|
M
|
|
2353
2353
|
);
|
|
2354
2354
|
break;
|
|
2355
2355
|
default:
|
|
2356
|
-
|
|
2356
|
+
R & 1 ? B(
|
|
2357
2357
|
u,
|
|
2358
2358
|
h,
|
|
2359
2359
|
g,
|
|
2360
|
-
|
|
2360
|
+
E,
|
|
2361
2361
|
b,
|
|
2362
|
-
|
|
2363
|
-
P,
|
|
2362
|
+
w,
|
|
2364
2363
|
k,
|
|
2364
|
+
P,
|
|
2365
2365
|
M
|
|
2366
|
-
) :
|
|
2366
|
+
) : R & 6 ? N(
|
|
2367
2367
|
u,
|
|
2368
2368
|
h,
|
|
2369
2369
|
g,
|
|
2370
|
-
|
|
2370
|
+
E,
|
|
2371
2371
|
b,
|
|
2372
|
-
|
|
2373
|
-
P,
|
|
2372
|
+
w,
|
|
2374
2373
|
k,
|
|
2374
|
+
P,
|
|
2375
2375
|
M
|
|
2376
|
-
) : (
|
|
2376
|
+
) : (R & 64 || R & 128) && S.process(
|
|
2377
2377
|
u,
|
|
2378
2378
|
h,
|
|
2379
2379
|
g,
|
|
2380
|
-
|
|
2380
|
+
E,
|
|
2381
2381
|
b,
|
|
2382
|
-
|
|
2383
|
-
P,
|
|
2382
|
+
w,
|
|
2384
2383
|
k,
|
|
2384
|
+
P,
|
|
2385
2385
|
M,
|
|
2386
2386
|
ot
|
|
2387
2387
|
);
|
|
2388
2388
|
}
|
|
2389
|
-
|
|
2390
|
-
},
|
|
2389
|
+
H != null && b ? pn(H, u && u.ref, w, h || u, !h) : H == null && u && u.ref != null && pn(u.ref, null, w, u, !0);
|
|
2390
|
+
}, A = (u, h, g, E) => {
|
|
2391
2391
|
if (u == null)
|
|
2392
2392
|
s(
|
|
2393
2393
|
h.el = r(h.children),
|
|
2394
2394
|
g,
|
|
2395
|
-
|
|
2395
|
+
E
|
|
2396
2396
|
);
|
|
2397
2397
|
else {
|
|
2398
2398
|
const b = h.el = u.el;
|
|
2399
2399
|
h.children !== u.children && f(b, h.children);
|
|
2400
2400
|
}
|
|
2401
|
-
},
|
|
2401
|
+
}, D = (u, h, g, E) => {
|
|
2402
2402
|
u == null ? s(
|
|
2403
2403
|
h.el = a(h.children || ""),
|
|
2404
2404
|
g,
|
|
2405
|
-
|
|
2405
|
+
E
|
|
2406
2406
|
) : h.el = u.el;
|
|
2407
|
-
},
|
|
2408
|
-
[u.el, u.anchor] =
|
|
2407
|
+
}, x = (u, h, g, E) => {
|
|
2408
|
+
[u.el, u.anchor] = T(
|
|
2409
2409
|
u.children,
|
|
2410
2410
|
h,
|
|
2411
2411
|
g,
|
|
2412
|
-
|
|
2412
|
+
E,
|
|
2413
2413
|
u.el,
|
|
2414
2414
|
u.anchor
|
|
2415
2415
|
);
|
|
2416
|
-
},
|
|
2416
|
+
}, F = ({ el: u, anchor: h }, g, E) => {
|
|
2417
2417
|
let b;
|
|
2418
2418
|
for (; u && u !== h; )
|
|
2419
|
-
b = p(u), s(u, g,
|
|
2420
|
-
s(h, g,
|
|
2419
|
+
b = p(u), s(u, g, E), u = b;
|
|
2420
|
+
s(h, g, E);
|
|
2421
2421
|
}, y = ({ el: u, anchor: h }) => {
|
|
2422
2422
|
let g;
|
|
2423
2423
|
for (; u && u !== h; )
|
|
2424
2424
|
g = p(u), o(u), u = g;
|
|
2425
2425
|
o(h);
|
|
2426
|
-
},
|
|
2427
|
-
if (h.type === "svg" ?
|
|
2428
|
-
|
|
2426
|
+
}, B = (u, h, g, E, b, w, k, P, M) => {
|
|
2427
|
+
if (h.type === "svg" ? k = "svg" : h.type === "math" && (k = "mathml"), u == null)
|
|
2428
|
+
I(
|
|
2429
2429
|
h,
|
|
2430
2430
|
g,
|
|
2431
|
-
|
|
2431
|
+
E,
|
|
2432
2432
|
b,
|
|
2433
|
-
|
|
2434
|
-
P,
|
|
2433
|
+
w,
|
|
2435
2434
|
k,
|
|
2435
|
+
P,
|
|
2436
2436
|
M
|
|
2437
2437
|
);
|
|
2438
2438
|
else {
|
|
2439
|
-
const
|
|
2439
|
+
const S = u.el && u.el._isVueCE ? u.el : null;
|
|
2440
2440
|
try {
|
|
2441
|
-
|
|
2441
|
+
S && S._beginPatch(), ce(
|
|
2442
2442
|
u,
|
|
2443
2443
|
h,
|
|
2444
2444
|
b,
|
|
2445
|
-
|
|
2446
|
-
P,
|
|
2445
|
+
w,
|
|
2447
2446
|
k,
|
|
2447
|
+
P,
|
|
2448
2448
|
M
|
|
2449
2449
|
);
|
|
2450
2450
|
} finally {
|
|
2451
|
-
|
|
2451
|
+
S && S._endPatch();
|
|
2452
2452
|
}
|
|
2453
2453
|
}
|
|
2454
|
-
},
|
|
2455
|
-
let M,
|
|
2456
|
-
const { props:
|
|
2454
|
+
}, I = (u, h, g, E, b, w, k, P) => {
|
|
2455
|
+
let M, S;
|
|
2456
|
+
const { props: H, shapeFlag: R, transition: W, dirs: C } = u;
|
|
2457
2457
|
if (M = u.el = l(
|
|
2458
2458
|
u.type,
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
),
|
|
2459
|
+
w,
|
|
2460
|
+
H && H.is,
|
|
2461
|
+
H
|
|
2462
|
+
), R & 8 ? c(M, u.children) : R & 16 && V(
|
|
2463
2463
|
u.children,
|
|
2464
2464
|
M,
|
|
2465
2465
|
null,
|
|
2466
|
-
|
|
2466
|
+
E,
|
|
2467
2467
|
b,
|
|
2468
|
-
us(u,
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
),
|
|
2472
|
-
for (const
|
|
2473
|
-
|
|
2474
|
-
"value" in
|
|
2468
|
+
us(u, w),
|
|
2469
|
+
k,
|
|
2470
|
+
P
|
|
2471
|
+
), C && Nt(u, null, E, "created"), j(M, u, u.scopeId, k, E), H) {
|
|
2472
|
+
for (const Y in H)
|
|
2473
|
+
Y !== "value" && !fn(Y) && i(M, Y, null, H[Y], w, E);
|
|
2474
|
+
"value" in H && i(M, "value", null, H.value, w), (S = H.onVnodeBeforeMount) && lt(S, E, u);
|
|
2475
2475
|
}
|
|
2476
|
-
|
|
2477
|
-
const
|
|
2478
|
-
|
|
2476
|
+
C && Nt(u, null, E, "beforeMount");
|
|
2477
|
+
const $ = la(b, W);
|
|
2478
|
+
$ && W.beforeEnter(M), s(M, h, g), ((S = H && H.onVnodeMounted) || $ || C) && ke(() => {
|
|
2479
2479
|
try {
|
|
2480
|
-
|
|
2480
|
+
S && lt(S, E, u), $ && W.enter(M), C && Nt(u, null, E, "mounted");
|
|
2481
2481
|
} finally {
|
|
2482
2482
|
}
|
|
2483
2483
|
}, b);
|
|
2484
|
-
}, j = (u, h, g,
|
|
2485
|
-
if (g && m(u, g),
|
|
2486
|
-
for (let
|
|
2487
|
-
m(u,
|
|
2484
|
+
}, j = (u, h, g, E, b) => {
|
|
2485
|
+
if (g && m(u, g), E)
|
|
2486
|
+
for (let w = 0; w < E.length; w++)
|
|
2487
|
+
m(u, E[w]);
|
|
2488
2488
|
if (b) {
|
|
2489
|
-
let
|
|
2490
|
-
if (h ===
|
|
2491
|
-
const
|
|
2489
|
+
let w = b.subTree;
|
|
2490
|
+
if (h === w || zi(w.type) && (w.ssContent === h || w.ssFallback === h)) {
|
|
2491
|
+
const k = b.vnode;
|
|
2492
2492
|
j(
|
|
2493
2493
|
u,
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2494
|
+
k,
|
|
2495
|
+
k.scopeId,
|
|
2496
|
+
k.slotScopeIds,
|
|
2497
2497
|
b.parent
|
|
2498
2498
|
);
|
|
2499
2499
|
}
|
|
2500
2500
|
}
|
|
2501
|
-
},
|
|
2502
|
-
for (let
|
|
2503
|
-
const
|
|
2501
|
+
}, V = (u, h, g, E, b, w, k, P, M = 0) => {
|
|
2502
|
+
for (let S = M; S < u.length; S++) {
|
|
2503
|
+
const H = u[S] = P ? vt(u[S]) : ct(u[S]);
|
|
2504
2504
|
_(
|
|
2505
2505
|
null,
|
|
2506
|
-
|
|
2506
|
+
H,
|
|
2507
2507
|
h,
|
|
2508
2508
|
g,
|
|
2509
|
-
|
|
2509
|
+
E,
|
|
2510
2510
|
b,
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2511
|
+
w,
|
|
2512
|
+
k,
|
|
2513
|
+
P
|
|
2514
2514
|
);
|
|
2515
2515
|
}
|
|
2516
|
-
}, ce = (u, h, g,
|
|
2517
|
-
const
|
|
2518
|
-
let { patchFlag: M, dynamicChildren:
|
|
2516
|
+
}, ce = (u, h, g, E, b, w, k) => {
|
|
2517
|
+
const P = h.el = u.el;
|
|
2518
|
+
let { patchFlag: M, dynamicChildren: S, dirs: H } = h;
|
|
2519
2519
|
M |= u.patchFlag & 16;
|
|
2520
|
-
const
|
|
2521
|
-
let
|
|
2522
|
-
if (g && Ft(g, !1), (
|
|
2520
|
+
const R = u.props || ae, W = h.props || ae;
|
|
2521
|
+
let C;
|
|
2522
|
+
if (g && Ft(g, !1), (C = W.onVnodeBeforeUpdate) && lt(C, g, h, u), H && Nt(h, u, g, "beforeUpdate"), g && Ft(g, !0), (R.innerHTML && W.innerHTML == null || R.textContent && W.textContent == null) && c(P, ""), S ? fe(
|
|
2523
2523
|
u.dynamicChildren,
|
|
2524
|
-
|
|
2525
|
-
|
|
2524
|
+
S,
|
|
2525
|
+
P,
|
|
2526
2526
|
g,
|
|
2527
|
-
|
|
2527
|
+
E,
|
|
2528
2528
|
us(h, b),
|
|
2529
|
-
|
|
2530
|
-
) :
|
|
2529
|
+
w
|
|
2530
|
+
) : k || Ae(
|
|
2531
2531
|
u,
|
|
2532
2532
|
h,
|
|
2533
|
-
|
|
2533
|
+
P,
|
|
2534
2534
|
null,
|
|
2535
2535
|
g,
|
|
2536
|
-
|
|
2536
|
+
E,
|
|
2537
2537
|
us(h, b),
|
|
2538
|
-
|
|
2538
|
+
w,
|
|
2539
2539
|
!1
|
|
2540
2540
|
), M > 0) {
|
|
2541
2541
|
if (M & 16)
|
|
2542
|
-
_e(
|
|
2543
|
-
else if (M & 2 &&
|
|
2544
|
-
const
|
|
2545
|
-
for (let
|
|
2546
|
-
const
|
|
2547
|
-
(de !== le ||
|
|
2542
|
+
_e(P, R, W, g, b);
|
|
2543
|
+
else if (M & 2 && R.class !== W.class && i(P, "class", null, W.class, b), M & 4 && i(P, "style", R.style, W.style, b), M & 8) {
|
|
2544
|
+
const $ = h.dynamicProps;
|
|
2545
|
+
for (let Y = 0; Y < $.length; Y++) {
|
|
2546
|
+
const X = $[Y], le = R[X], de = W[X];
|
|
2547
|
+
(de !== le || X === "value") && i(P, X, le, de, b, g);
|
|
2548
2548
|
}
|
|
2549
2549
|
}
|
|
2550
|
-
M & 1 && u.children !== h.children && c(
|
|
2551
|
-
} else !
|
|
2552
|
-
((
|
|
2553
|
-
|
|
2554
|
-
},
|
|
2555
|
-
}, fe = (u, h, g,
|
|
2556
|
-
for (let
|
|
2557
|
-
const M = u[
|
|
2550
|
+
M & 1 && u.children !== h.children && c(P, h.children);
|
|
2551
|
+
} else !k && S == null && _e(P, R, W, g, b);
|
|
2552
|
+
((C = W.onVnodeUpdated) || H) && ke(() => {
|
|
2553
|
+
C && lt(C, g, h, u), H && Nt(h, u, g, "updated");
|
|
2554
|
+
}, E);
|
|
2555
|
+
}, fe = (u, h, g, E, b, w, k) => {
|
|
2556
|
+
for (let P = 0; P < h.length; P++) {
|
|
2557
|
+
const M = u[P], S = h[P], H = (
|
|
2558
2558
|
// oldVNode may be an errored async setup() component inside Suspense
|
|
2559
2559
|
// which will not have a mounted element
|
|
2560
2560
|
M.el && // - In the case of a Fragment, we need to provide the actual parent
|
|
2561
2561
|
// of the Fragment itself so it can move its children.
|
|
2562
2562
|
(M.type === ue || // - In the case of different nodes, there is going to be a replacement
|
|
2563
2563
|
// which also requires the correct parent container
|
|
2564
|
-
!rn(M,
|
|
2564
|
+
!rn(M, S) || // - In the case of a component, it could contain anything.
|
|
2565
2565
|
M.shapeFlag & 198) ? d(M.el) : (
|
|
2566
2566
|
// In other cases, the parent container is not actually used so we
|
|
2567
2567
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
@@ -2570,61 +2570,61 @@ function ia(e, t) {
|
|
|
2570
2570
|
);
|
|
2571
2571
|
_(
|
|
2572
2572
|
M,
|
|
2573
|
-
|
|
2574
|
-
|
|
2573
|
+
S,
|
|
2574
|
+
H,
|
|
2575
2575
|
null,
|
|
2576
|
-
|
|
2576
|
+
E,
|
|
2577
2577
|
b,
|
|
2578
|
-
|
|
2579
|
-
|
|
2578
|
+
w,
|
|
2579
|
+
k,
|
|
2580
2580
|
!0
|
|
2581
2581
|
);
|
|
2582
2582
|
}
|
|
2583
|
-
}, _e = (u, h, g,
|
|
2583
|
+
}, _e = (u, h, g, E, b) => {
|
|
2584
2584
|
if (h !== g) {
|
|
2585
2585
|
if (h !== ae)
|
|
2586
|
-
for (const
|
|
2587
|
-
!fn(
|
|
2586
|
+
for (const w in h)
|
|
2587
|
+
!fn(w) && !(w in g) && i(
|
|
2588
2588
|
u,
|
|
2589
|
-
|
|
2590
|
-
h[
|
|
2589
|
+
w,
|
|
2590
|
+
h[w],
|
|
2591
2591
|
null,
|
|
2592
2592
|
b,
|
|
2593
|
-
|
|
2593
|
+
E
|
|
2594
2594
|
);
|
|
2595
|
-
for (const
|
|
2596
|
-
if (fn(
|
|
2597
|
-
const
|
|
2598
|
-
|
|
2595
|
+
for (const w in g) {
|
|
2596
|
+
if (fn(w)) continue;
|
|
2597
|
+
const k = g[w], P = h[w];
|
|
2598
|
+
k !== P && w !== "value" && i(u, w, P, k, b, E);
|
|
2599
2599
|
}
|
|
2600
2600
|
"value" in g && i(u, "value", h.value, g.value, b);
|
|
2601
2601
|
}
|
|
2602
|
-
}, Re = (u, h, g,
|
|
2603
|
-
const
|
|
2604
|
-
let { patchFlag:
|
|
2605
|
-
|
|
2602
|
+
}, Re = (u, h, g, E, b, w, k, P, M) => {
|
|
2603
|
+
const S = h.el = u ? u.el : r(""), H = h.anchor = u ? u.anchor : r("");
|
|
2604
|
+
let { patchFlag: R, dynamicChildren: W, slotScopeIds: C } = h;
|
|
2605
|
+
C && (P = P ? P.concat(C) : C), u == null ? (s(S, g, E), s(H, g, E), V(
|
|
2606
2606
|
// #10007
|
|
2607
2607
|
// such fragment like `<></>` will be compiled into
|
|
2608
2608
|
// a fragment which doesn't have a children.
|
|
2609
2609
|
// In this case fallback to an empty array
|
|
2610
2610
|
h.children || [],
|
|
2611
2611
|
g,
|
|
2612
|
-
|
|
2612
|
+
H,
|
|
2613
2613
|
b,
|
|
2614
|
-
|
|
2615
|
-
P,
|
|
2614
|
+
w,
|
|
2616
2615
|
k,
|
|
2616
|
+
P,
|
|
2617
2617
|
M
|
|
2618
|
-
)) :
|
|
2618
|
+
)) : R > 0 && R & 64 && W && // #2715 the previous fragment could've been a BAILed one as a result
|
|
2619
2619
|
// of renderSlot() with no valid children
|
|
2620
|
-
u.dynamicChildren && u.dynamicChildren.length ===
|
|
2620
|
+
u.dynamicChildren && u.dynamicChildren.length === W.length ? (fe(
|
|
2621
2621
|
u.dynamicChildren,
|
|
2622
|
-
|
|
2622
|
+
W,
|
|
2623
2623
|
g,
|
|
2624
2624
|
b,
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2625
|
+
w,
|
|
2626
|
+
k,
|
|
2627
|
+
P
|
|
2628
2628
|
), // #2080 if the stable fragment has a key, it's a <template v-for> that may
|
|
2629
2629
|
// get moved around. Make sure all root level vnodes inherit el.
|
|
2630
2630
|
// #2134 or if it's a component root, it may also get moved around
|
|
@@ -2638,77 +2638,77 @@ function ia(e, t) {
|
|
|
2638
2638
|
u,
|
|
2639
2639
|
h,
|
|
2640
2640
|
g,
|
|
2641
|
-
|
|
2641
|
+
H,
|
|
2642
2642
|
b,
|
|
2643
|
-
|
|
2644
|
-
P,
|
|
2643
|
+
w,
|
|
2645
2644
|
k,
|
|
2645
|
+
P,
|
|
2646
2646
|
M
|
|
2647
2647
|
);
|
|
2648
|
-
},
|
|
2649
|
-
h.slotScopeIds =
|
|
2648
|
+
}, N = (u, h, g, E, b, w, k, P, M) => {
|
|
2649
|
+
h.slotScopeIds = P, u == null ? h.shapeFlag & 512 ? b.ctx.activate(
|
|
2650
2650
|
h,
|
|
2651
2651
|
g,
|
|
2652
|
-
|
|
2653
|
-
|
|
2652
|
+
E,
|
|
2653
|
+
k,
|
|
2654
2654
|
M
|
|
2655
2655
|
) : J(
|
|
2656
2656
|
h,
|
|
2657
2657
|
g,
|
|
2658
|
-
|
|
2658
|
+
E,
|
|
2659
2659
|
b,
|
|
2660
|
-
|
|
2661
|
-
|
|
2660
|
+
w,
|
|
2661
|
+
k,
|
|
2662
2662
|
M
|
|
2663
2663
|
) : se(u, h, M);
|
|
2664
|
-
}, J = (u, h, g,
|
|
2665
|
-
const
|
|
2664
|
+
}, J = (u, h, g, E, b, w, k) => {
|
|
2665
|
+
const P = u.component = ga(
|
|
2666
2666
|
u,
|
|
2667
|
-
|
|
2667
|
+
E,
|
|
2668
2668
|
b
|
|
2669
2669
|
);
|
|
2670
|
-
if (Fr(u) && (
|
|
2671
|
-
if (b && b.registerDep(
|
|
2672
|
-
const M =
|
|
2673
|
-
|
|
2670
|
+
if (Fr(u) && (P.ctx.renderer = ot), ma(P, !1, k), P.asyncDep) {
|
|
2671
|
+
if (b && b.registerDep(P, G, k), !u.el) {
|
|
2672
|
+
const M = P.subTree = we(wt);
|
|
2673
|
+
D(null, M, h, g), u.placeholder = M.el;
|
|
2674
2674
|
}
|
|
2675
2675
|
} else
|
|
2676
2676
|
G(
|
|
2677
|
-
|
|
2677
|
+
P,
|
|
2678
2678
|
u,
|
|
2679
2679
|
h,
|
|
2680
2680
|
g,
|
|
2681
2681
|
b,
|
|
2682
|
-
|
|
2683
|
-
|
|
2682
|
+
w,
|
|
2683
|
+
k
|
|
2684
2684
|
);
|
|
2685
2685
|
}, se = (u, h, g) => {
|
|
2686
|
-
const
|
|
2686
|
+
const E = h.component = u.component;
|
|
2687
2687
|
if (Gr(u, h, g))
|
|
2688
|
-
if (
|
|
2689
|
-
Oe(
|
|
2688
|
+
if (E.asyncDep && !E.asyncResolved) {
|
|
2689
|
+
Oe(E, h, g);
|
|
2690
2690
|
return;
|
|
2691
2691
|
} else
|
|
2692
|
-
|
|
2692
|
+
E.next = h, E.update();
|
|
2693
2693
|
else
|
|
2694
|
-
h.el = u.el,
|
|
2695
|
-
}, G = (u, h, g,
|
|
2696
|
-
const
|
|
2694
|
+
h.el = u.el, E.vnode = h;
|
|
2695
|
+
}, G = (u, h, g, E, b, w, k) => {
|
|
2696
|
+
const P = () => {
|
|
2697
2697
|
if (u.isMounted) {
|
|
2698
|
-
let { next:
|
|
2698
|
+
let { next: R, bu: W, u: C, parent: $, vnode: Y } = u;
|
|
2699
2699
|
{
|
|
2700
|
-
const
|
|
2701
|
-
if (
|
|
2702
|
-
|
|
2700
|
+
const Ue = Wi(u);
|
|
2701
|
+
if (Ue) {
|
|
2702
|
+
R && (R.el = Y.el, Oe(u, R, k)), Ue.asyncDep.then(() => {
|
|
2703
2703
|
ke(() => {
|
|
2704
|
-
u.isUnmounted ||
|
|
2704
|
+
u.isUnmounted || S();
|
|
2705
2705
|
}, b);
|
|
2706
2706
|
});
|
|
2707
2707
|
return;
|
|
2708
2708
|
}
|
|
2709
2709
|
}
|
|
2710
|
-
let
|
|
2711
|
-
Ft(u, !1),
|
|
2710
|
+
let X = R, le;
|
|
2711
|
+
Ft(u, !1), R ? (R.el = Y.el, Oe(u, R, k)) : R = Y, W && os(W), (le = R.props && R.props.onVnodeBeforeUpdate) && lt(le, $, R, Y), Ft(u, !0);
|
|
2712
2712
|
const de = co(u), Be = u.subTree;
|
|
2713
2713
|
u.subTree = de, _(
|
|
2714
2714
|
Be,
|
|
@@ -2716,383 +2716,383 @@ function ia(e, t) {
|
|
|
2716
2716
|
// parent may have changed if it's in a teleport
|
|
2717
2717
|
d(Be.el),
|
|
2718
2718
|
// anchor may have changed if it's in a fragment
|
|
2719
|
-
|
|
2719
|
+
Ke(Be),
|
|
2720
2720
|
u,
|
|
2721
2721
|
b,
|
|
2722
|
-
|
|
2723
|
-
),
|
|
2724
|
-
() => lt(le,
|
|
2722
|
+
w
|
|
2723
|
+
), R.el = de.el, X === null && Jr(u, de.el), C && ke(C, b), (le = R.props && R.props.onVnodeUpdated) && ke(
|
|
2724
|
+
() => lt(le, $, R, Y),
|
|
2725
2725
|
b
|
|
2726
2726
|
);
|
|
2727
2727
|
} else {
|
|
2728
|
-
let
|
|
2729
|
-
const { el:
|
|
2730
|
-
Ft(u, !1),
|
|
2728
|
+
let R;
|
|
2729
|
+
const { el: W, props: C } = h, { bm: $, m: Y, parent: X, root: le, type: de } = u, Be = Xt(h);
|
|
2730
|
+
Ft(u, !1), $ && os($), !Be && (R = C && C.onVnodeBeforeMount) && lt(R, X, h), Ft(u, !0);
|
|
2731
2731
|
{
|
|
2732
2732
|
le.ce && le.ce._hasShadowRoot() && le.ce._injectChildStyle(
|
|
2733
2733
|
de,
|
|
2734
2734
|
u.parent ? u.parent.type : void 0
|
|
2735
2735
|
);
|
|
2736
|
-
const
|
|
2736
|
+
const Ue = u.subTree = co(u);
|
|
2737
2737
|
_(
|
|
2738
2738
|
null,
|
|
2739
|
-
|
|
2739
|
+
Ue,
|
|
2740
2740
|
g,
|
|
2741
|
-
|
|
2741
|
+
E,
|
|
2742
2742
|
u,
|
|
2743
2743
|
b,
|
|
2744
|
-
|
|
2745
|
-
), h.el =
|
|
2744
|
+
w
|
|
2745
|
+
), h.el = Ue.el;
|
|
2746
2746
|
}
|
|
2747
|
-
if (
|
|
2748
|
-
const
|
|
2747
|
+
if (Y && ke(Y, b), !Be && (R = C && C.onVnodeMounted)) {
|
|
2748
|
+
const Ue = h;
|
|
2749
2749
|
ke(
|
|
2750
|
-
() => lt(
|
|
2750
|
+
() => lt(R, X, Ue),
|
|
2751
2751
|
b
|
|
2752
2752
|
);
|
|
2753
2753
|
}
|
|
2754
|
-
(h.shapeFlag & 256 ||
|
|
2754
|
+
(h.shapeFlag & 256 || X && Xt(X.vnode) && X.vnode.shapeFlag & 256) && u.a && ke(u.a, b), u.isMounted = !0, h = g = E = null;
|
|
2755
2755
|
}
|
|
2756
2756
|
};
|
|
2757
2757
|
u.scope.on();
|
|
2758
|
-
const M = u.effect = new oi(
|
|
2758
|
+
const M = u.effect = new oi(P);
|
|
2759
2759
|
u.scope.off();
|
|
2760
|
-
const
|
|
2761
|
-
|
|
2760
|
+
const S = u.update = M.run.bind(M), H = u.job = M.runIfDirty.bind(M);
|
|
2761
|
+
H.i = u, H.id = u.uid, M.scheduler = () => Bs(H), Ft(u, !0), S();
|
|
2762
2762
|
}, Oe = (u, h, g) => {
|
|
2763
2763
|
h.component = u;
|
|
2764
|
-
const
|
|
2765
|
-
u.vnode = h, u.next = null, Qr(u, h.props,
|
|
2766
|
-
}, Ae = (u, h, g,
|
|
2767
|
-
const
|
|
2768
|
-
if (
|
|
2769
|
-
if (
|
|
2764
|
+
const E = u.vnode.props;
|
|
2765
|
+
u.vnode = h, u.next = null, Qr(u, h.props, E, g), sa(u, h.children, g), Mt(), so(u), Pt();
|
|
2766
|
+
}, Ae = (u, h, g, E, b, w, k, P, M = !1) => {
|
|
2767
|
+
const S = u && u.children, H = u ? u.shapeFlag : 0, R = h.children, { patchFlag: W, shapeFlag: C } = h;
|
|
2768
|
+
if (W > 0) {
|
|
2769
|
+
if (W & 128) {
|
|
2770
2770
|
ye(
|
|
2771
|
-
|
|
2772
|
-
|
|
2771
|
+
S,
|
|
2772
|
+
R,
|
|
2773
2773
|
g,
|
|
2774
|
-
|
|
2774
|
+
E,
|
|
2775
2775
|
b,
|
|
2776
|
-
|
|
2777
|
-
P,
|
|
2776
|
+
w,
|
|
2778
2777
|
k,
|
|
2778
|
+
P,
|
|
2779
2779
|
M
|
|
2780
2780
|
);
|
|
2781
2781
|
return;
|
|
2782
|
-
} else if (
|
|
2782
|
+
} else if (W & 256) {
|
|
2783
2783
|
Le(
|
|
2784
|
-
|
|
2785
|
-
|
|
2784
|
+
S,
|
|
2785
|
+
R,
|
|
2786
2786
|
g,
|
|
2787
|
-
|
|
2787
|
+
E,
|
|
2788
2788
|
b,
|
|
2789
|
-
|
|
2790
|
-
P,
|
|
2789
|
+
w,
|
|
2791
2790
|
k,
|
|
2791
|
+
P,
|
|
2792
2792
|
M
|
|
2793
2793
|
);
|
|
2794
2794
|
return;
|
|
2795
2795
|
}
|
|
2796
2796
|
}
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2797
|
+
C & 8 ? (H & 16 && qe(S, b, w), R !== S && c(g, R)) : H & 16 ? C & 16 ? ye(
|
|
2798
|
+
S,
|
|
2799
|
+
R,
|
|
2800
2800
|
g,
|
|
2801
|
-
|
|
2801
|
+
E,
|
|
2802
2802
|
b,
|
|
2803
|
-
|
|
2804
|
-
P,
|
|
2803
|
+
w,
|
|
2805
2804
|
k,
|
|
2805
|
+
P,
|
|
2806
2806
|
M
|
|
2807
|
-
) : qe(
|
|
2808
|
-
|
|
2807
|
+
) : qe(S, b, w, !0) : (H & 8 && c(g, ""), C & 16 && V(
|
|
2808
|
+
R,
|
|
2809
2809
|
g,
|
|
2810
|
-
|
|
2810
|
+
E,
|
|
2811
2811
|
b,
|
|
2812
|
-
|
|
2813
|
-
P,
|
|
2812
|
+
w,
|
|
2814
2813
|
k,
|
|
2814
|
+
P,
|
|
2815
2815
|
M
|
|
2816
2816
|
));
|
|
2817
|
-
}, Le = (u, h, g,
|
|
2818
|
-
u = u ||
|
|
2819
|
-
const
|
|
2820
|
-
let
|
|
2821
|
-
for (
|
|
2822
|
-
const
|
|
2817
|
+
}, Le = (u, h, g, E, b, w, k, P, M) => {
|
|
2818
|
+
u = u || Kt, h = h || Kt;
|
|
2819
|
+
const S = u.length, H = h.length, R = Math.min(S, H);
|
|
2820
|
+
let W;
|
|
2821
|
+
for (W = 0; W < R; W++) {
|
|
2822
|
+
const C = h[W] = M ? vt(h[W]) : ct(h[W]);
|
|
2823
2823
|
_(
|
|
2824
|
-
u[
|
|
2825
|
-
|
|
2824
|
+
u[W],
|
|
2825
|
+
C,
|
|
2826
2826
|
g,
|
|
2827
2827
|
null,
|
|
2828
2828
|
b,
|
|
2829
|
-
|
|
2830
|
-
P,
|
|
2829
|
+
w,
|
|
2831
2830
|
k,
|
|
2831
|
+
P,
|
|
2832
2832
|
M
|
|
2833
2833
|
);
|
|
2834
2834
|
}
|
|
2835
|
-
|
|
2835
|
+
S > H ? qe(
|
|
2836
2836
|
u,
|
|
2837
2837
|
b,
|
|
2838
|
-
|
|
2838
|
+
w,
|
|
2839
2839
|
!0,
|
|
2840
2840
|
!1,
|
|
2841
|
-
|
|
2842
|
-
) :
|
|
2841
|
+
R
|
|
2842
|
+
) : V(
|
|
2843
2843
|
h,
|
|
2844
2844
|
g,
|
|
2845
|
-
|
|
2845
|
+
E,
|
|
2846
2846
|
b,
|
|
2847
|
-
|
|
2848
|
-
P,
|
|
2847
|
+
w,
|
|
2849
2848
|
k,
|
|
2849
|
+
P,
|
|
2850
2850
|
M,
|
|
2851
|
-
|
|
2851
|
+
R
|
|
2852
2852
|
);
|
|
2853
|
-
}, ye = (u, h, g,
|
|
2854
|
-
let
|
|
2855
|
-
const
|
|
2856
|
-
let
|
|
2857
|
-
for (;
|
|
2858
|
-
const
|
|
2859
|
-
if (rn(
|
|
2853
|
+
}, ye = (u, h, g, E, b, w, k, P, M) => {
|
|
2854
|
+
let S = 0;
|
|
2855
|
+
const H = h.length;
|
|
2856
|
+
let R = u.length - 1, W = H - 1;
|
|
2857
|
+
for (; S <= R && S <= W; ) {
|
|
2858
|
+
const C = u[S], $ = h[S] = M ? vt(h[S]) : ct(h[S]);
|
|
2859
|
+
if (rn(C, $))
|
|
2860
2860
|
_(
|
|
2861
|
-
|
|
2862
|
-
|
|
2861
|
+
C,
|
|
2862
|
+
$,
|
|
2863
2863
|
g,
|
|
2864
2864
|
null,
|
|
2865
2865
|
b,
|
|
2866
|
-
|
|
2867
|
-
P,
|
|
2866
|
+
w,
|
|
2868
2867
|
k,
|
|
2868
|
+
P,
|
|
2869
2869
|
M
|
|
2870
2870
|
);
|
|
2871
2871
|
else
|
|
2872
2872
|
break;
|
|
2873
|
-
|
|
2873
|
+
S++;
|
|
2874
2874
|
}
|
|
2875
|
-
for (;
|
|
2876
|
-
const
|
|
2877
|
-
if (rn(
|
|
2875
|
+
for (; S <= R && S <= W; ) {
|
|
2876
|
+
const C = u[R], $ = h[W] = M ? vt(h[W]) : ct(h[W]);
|
|
2877
|
+
if (rn(C, $))
|
|
2878
2878
|
_(
|
|
2879
|
-
|
|
2880
|
-
|
|
2879
|
+
C,
|
|
2880
|
+
$,
|
|
2881
2881
|
g,
|
|
2882
2882
|
null,
|
|
2883
2883
|
b,
|
|
2884
|
-
|
|
2885
|
-
P,
|
|
2884
|
+
w,
|
|
2886
2885
|
k,
|
|
2886
|
+
P,
|
|
2887
2887
|
M
|
|
2888
2888
|
);
|
|
2889
2889
|
else
|
|
2890
2890
|
break;
|
|
2891
|
-
|
|
2891
|
+
R--, W--;
|
|
2892
2892
|
}
|
|
2893
|
-
if (
|
|
2894
|
-
if (
|
|
2895
|
-
const
|
|
2896
|
-
for (;
|
|
2893
|
+
if (S > R) {
|
|
2894
|
+
if (S <= W) {
|
|
2895
|
+
const C = W + 1, $ = C < H ? h[C].el : E;
|
|
2896
|
+
for (; S <= W; )
|
|
2897
2897
|
_(
|
|
2898
2898
|
null,
|
|
2899
|
-
h[
|
|
2899
|
+
h[S] = M ? vt(h[S]) : ct(h[S]),
|
|
2900
2900
|
g,
|
|
2901
|
-
|
|
2901
|
+
$,
|
|
2902
2902
|
b,
|
|
2903
|
-
|
|
2904
|
-
P,
|
|
2903
|
+
w,
|
|
2905
2904
|
k,
|
|
2905
|
+
P,
|
|
2906
2906
|
M
|
|
2907
|
-
),
|
|
2907
|
+
), S++;
|
|
2908
2908
|
}
|
|
2909
|
-
} else if (
|
|
2910
|
-
for (;
|
|
2911
|
-
me(u[
|
|
2909
|
+
} else if (S > W)
|
|
2910
|
+
for (; S <= R; )
|
|
2911
|
+
me(u[S], b, w, !0), S++;
|
|
2912
2912
|
else {
|
|
2913
|
-
const
|
|
2914
|
-
for (
|
|
2915
|
-
const Me = h[
|
|
2916
|
-
Me.key != null &&
|
|
2913
|
+
const C = S, $ = S, Y = /* @__PURE__ */ new Map();
|
|
2914
|
+
for (S = $; S <= W; S++) {
|
|
2915
|
+
const Me = h[S] = M ? vt(h[S]) : ct(h[S]);
|
|
2916
|
+
Me.key != null && Y.set(Me.key, S);
|
|
2917
2917
|
}
|
|
2918
|
-
let
|
|
2919
|
-
const de =
|
|
2920
|
-
let Be = !1,
|
|
2918
|
+
let X, le = 0;
|
|
2919
|
+
const de = W - $ + 1;
|
|
2920
|
+
let Be = !1, Ue = 0;
|
|
2921
2921
|
const Tt = new Array(de);
|
|
2922
|
-
for (
|
|
2923
|
-
for (
|
|
2924
|
-
const Me = u[
|
|
2922
|
+
for (S = 0; S < de; S++) Tt[S] = 0;
|
|
2923
|
+
for (S = C; S <= R; S++) {
|
|
2924
|
+
const Me = u[S];
|
|
2925
2925
|
if (le >= de) {
|
|
2926
|
-
me(Me, b,
|
|
2926
|
+
me(Me, b, w, !0);
|
|
2927
2927
|
continue;
|
|
2928
2928
|
}
|
|
2929
2929
|
let Ie;
|
|
2930
2930
|
if (Me.key != null)
|
|
2931
|
-
Ie =
|
|
2931
|
+
Ie = Y.get(Me.key);
|
|
2932
2932
|
else
|
|
2933
|
-
for (
|
|
2934
|
-
if (Tt[
|
|
2935
|
-
Ie =
|
|
2933
|
+
for (X = $; X <= W; X++)
|
|
2934
|
+
if (Tt[X - $] === 0 && rn(Me, h[X])) {
|
|
2935
|
+
Ie = X;
|
|
2936
2936
|
break;
|
|
2937
2937
|
}
|
|
2938
|
-
Ie === void 0 ? me(Me, b,
|
|
2938
|
+
Ie === void 0 ? me(Me, b, w, !0) : (Tt[Ie - $] = S + 1, Ie >= Ue ? Ue = Ie : Be = !0, _(
|
|
2939
2939
|
Me,
|
|
2940
2940
|
h[Ie],
|
|
2941
2941
|
g,
|
|
2942
2942
|
null,
|
|
2943
2943
|
b,
|
|
2944
|
-
|
|
2945
|
-
P,
|
|
2944
|
+
w,
|
|
2946
2945
|
k,
|
|
2946
|
+
P,
|
|
2947
2947
|
M
|
|
2948
2948
|
), le++);
|
|
2949
2949
|
}
|
|
2950
|
-
const On = Be ? ra(Tt) :
|
|
2951
|
-
for (
|
|
2952
|
-
const Me =
|
|
2950
|
+
const On = Be ? ra(Tt) : Kt;
|
|
2951
|
+
for (X = On.length - 1, S = de - 1; S >= 0; S--) {
|
|
2952
|
+
const Me = $ + S, Ie = h[Me], Ct = h[Me + 1], Dt = Me + 1 < H ? (
|
|
2953
2953
|
// #13559, #14173 fallback to el placeholder for unresolved async component
|
|
2954
2954
|
Ct.el || Hi(Ct)
|
|
2955
|
-
) :
|
|
2956
|
-
Tt[
|
|
2955
|
+
) : E;
|
|
2956
|
+
Tt[S] === 0 ? _(
|
|
2957
2957
|
null,
|
|
2958
2958
|
Ie,
|
|
2959
2959
|
g,
|
|
2960
2960
|
Dt,
|
|
2961
2961
|
b,
|
|
2962
|
-
|
|
2963
|
-
P,
|
|
2962
|
+
w,
|
|
2964
2963
|
k,
|
|
2964
|
+
P,
|
|
2965
2965
|
M
|
|
2966
|
-
) : Be && (
|
|
2966
|
+
) : Be && (X < 0 || S !== On[X] ? ge(Ie, g, Dt, 2) : X--);
|
|
2967
2967
|
}
|
|
2968
2968
|
}
|
|
2969
|
-
}, ge = (u, h, g,
|
|
2970
|
-
const { el:
|
|
2971
|
-
if (
|
|
2972
|
-
ge(u.component.subTree, h, g,
|
|
2969
|
+
}, ge = (u, h, g, E, b = null) => {
|
|
2970
|
+
const { el: w, type: k, transition: P, children: M, shapeFlag: S } = u;
|
|
2971
|
+
if (S & 6) {
|
|
2972
|
+
ge(u.component.subTree, h, g, E);
|
|
2973
2973
|
return;
|
|
2974
2974
|
}
|
|
2975
|
-
if (
|
|
2976
|
-
u.suspense.move(h, g,
|
|
2975
|
+
if (S & 128) {
|
|
2976
|
+
u.suspense.move(h, g, E);
|
|
2977
2977
|
return;
|
|
2978
2978
|
}
|
|
2979
|
-
if (
|
|
2980
|
-
|
|
2979
|
+
if (S & 64) {
|
|
2980
|
+
k.move(u, h, g, ot);
|
|
2981
2981
|
return;
|
|
2982
2982
|
}
|
|
2983
|
-
if (
|
|
2984
|
-
s(
|
|
2985
|
-
for (let
|
|
2986
|
-
ge(M[
|
|
2983
|
+
if (k === ue) {
|
|
2984
|
+
s(w, h, g);
|
|
2985
|
+
for (let R = 0; R < M.length; R++)
|
|
2986
|
+
ge(M[R], h, g, E);
|
|
2987
2987
|
s(u.anchor, h, g);
|
|
2988
2988
|
return;
|
|
2989
2989
|
}
|
|
2990
|
-
if (
|
|
2991
|
-
|
|
2990
|
+
if (k === mn) {
|
|
2991
|
+
F(u, h, g);
|
|
2992
2992
|
return;
|
|
2993
2993
|
}
|
|
2994
|
-
if (
|
|
2995
|
-
if (
|
|
2996
|
-
|
|
2994
|
+
if (E !== 2 && S & 1 && P)
|
|
2995
|
+
if (E === 0)
|
|
2996
|
+
P.beforeEnter(w), s(w, h, g), ke(() => P.enter(w), b);
|
|
2997
2997
|
else {
|
|
2998
|
-
const { leave:
|
|
2999
|
-
u.ctx.isUnmounted ? o(
|
|
3000
|
-
},
|
|
3001
|
-
|
|
2998
|
+
const { leave: R, delayLeave: W, afterLeave: C } = P, $ = () => {
|
|
2999
|
+
u.ctx.isUnmounted ? o(w) : s(w, h, g);
|
|
3000
|
+
}, Y = () => {
|
|
3001
|
+
w._isLeaving && w[Nr](
|
|
3002
3002
|
!0
|
|
3003
3003
|
/* cancelled */
|
|
3004
|
-
),
|
|
3005
|
-
|
|
3004
|
+
), R(w, () => {
|
|
3005
|
+
$(), C && C();
|
|
3006
3006
|
});
|
|
3007
3007
|
};
|
|
3008
|
-
|
|
3008
|
+
W ? W(w, $, Y) : Y();
|
|
3009
3009
|
}
|
|
3010
3010
|
else
|
|
3011
|
-
s(
|
|
3012
|
-
}, me = (u, h, g,
|
|
3011
|
+
s(w, h, g);
|
|
3012
|
+
}, me = (u, h, g, E = !1, b = !1) => {
|
|
3013
3013
|
const {
|
|
3014
|
-
type:
|
|
3015
|
-
props:
|
|
3016
|
-
ref:
|
|
3014
|
+
type: w,
|
|
3015
|
+
props: k,
|
|
3016
|
+
ref: P,
|
|
3017
3017
|
children: M,
|
|
3018
|
-
dynamicChildren:
|
|
3019
|
-
shapeFlag:
|
|
3020
|
-
patchFlag:
|
|
3021
|
-
dirs:
|
|
3022
|
-
cacheIndex:
|
|
3023
|
-
memo:
|
|
3018
|
+
dynamicChildren: S,
|
|
3019
|
+
shapeFlag: H,
|
|
3020
|
+
patchFlag: R,
|
|
3021
|
+
dirs: W,
|
|
3022
|
+
cacheIndex: C,
|
|
3023
|
+
memo: $
|
|
3024
3024
|
} = u;
|
|
3025
|
-
if (
|
|
3025
|
+
if (R === -2 && (b = !1), P != null && (Mt(), pn(P, null, g, u, !0), Pt()), C != null && (h.renderCache[C] = void 0), H & 256) {
|
|
3026
3026
|
h.ctx.deactivate(u);
|
|
3027
3027
|
return;
|
|
3028
3028
|
}
|
|
3029
|
-
const
|
|
3029
|
+
const Y = H & 1 && W, X = !Xt(u);
|
|
3030
3030
|
let le;
|
|
3031
|
-
if (
|
|
3032
|
-
Fe(u.component, g,
|
|
3031
|
+
if (X && (le = k && k.onVnodeBeforeUnmount) && lt(le, h, u), H & 6)
|
|
3032
|
+
Fe(u.component, g, E);
|
|
3033
3033
|
else {
|
|
3034
|
-
if (
|
|
3035
|
-
u.suspense.unmount(g,
|
|
3034
|
+
if (H & 128) {
|
|
3035
|
+
u.suspense.unmount(g, E);
|
|
3036
3036
|
return;
|
|
3037
3037
|
}
|
|
3038
|
-
|
|
3038
|
+
Y && Nt(u, null, h, "beforeUnmount"), H & 64 ? u.type.remove(
|
|
3039
3039
|
u,
|
|
3040
3040
|
h,
|
|
3041
3041
|
g,
|
|
3042
3042
|
ot,
|
|
3043
|
-
|
|
3044
|
-
) :
|
|
3043
|
+
E
|
|
3044
|
+
) : S && // #5154
|
|
3045
3045
|
// when v-once is used inside a block, setBlockTracking(-1) marks the
|
|
3046
3046
|
// parent block with hasOnce: true
|
|
3047
3047
|
// so that it doesn't take the fast path during unmount - otherwise
|
|
3048
3048
|
// components nested in v-once are never unmounted.
|
|
3049
|
-
!
|
|
3050
|
-
(
|
|
3051
|
-
|
|
3049
|
+
!S.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
|
|
3050
|
+
(w !== ue || R > 0 && R & 64) ? qe(
|
|
3051
|
+
S,
|
|
3052
3052
|
h,
|
|
3053
3053
|
g,
|
|
3054
3054
|
!1,
|
|
3055
3055
|
!0
|
|
3056
|
-
) : (
|
|
3056
|
+
) : (w === ue && R & 384 || !b && H & 16) && qe(M, h, g), E && st(u);
|
|
3057
3057
|
}
|
|
3058
|
-
const de =
|
|
3059
|
-
(
|
|
3060
|
-
le && lt(le, h, u),
|
|
3058
|
+
const de = $ != null && C == null;
|
|
3059
|
+
(X && (le = k && k.onVnodeUnmounted) || Y || de) && ke(() => {
|
|
3060
|
+
le && lt(le, h, u), Y && Nt(u, null, h, "unmounted"), de && (u.el = null);
|
|
3061
3061
|
}, g);
|
|
3062
3062
|
}, st = (u) => {
|
|
3063
|
-
const { type: h, el: g, anchor:
|
|
3063
|
+
const { type: h, el: g, anchor: E, transition: b } = u;
|
|
3064
3064
|
if (h === ue) {
|
|
3065
|
-
dt(g,
|
|
3065
|
+
dt(g, E);
|
|
3066
3066
|
return;
|
|
3067
3067
|
}
|
|
3068
3068
|
if (h === mn) {
|
|
3069
3069
|
y(u);
|
|
3070
3070
|
return;
|
|
3071
3071
|
}
|
|
3072
|
-
const
|
|
3072
|
+
const w = () => {
|
|
3073
3073
|
o(g), b && !b.persisted && b.afterLeave && b.afterLeave();
|
|
3074
3074
|
};
|
|
3075
3075
|
if (u.shapeFlag & 1 && b && !b.persisted) {
|
|
3076
|
-
const { leave:
|
|
3077
|
-
|
|
3076
|
+
const { leave: k, delayLeave: P } = b, M = () => k(g, w);
|
|
3077
|
+
P ? P(u.el, w, M) : M();
|
|
3078
3078
|
} else
|
|
3079
|
-
|
|
3079
|
+
w();
|
|
3080
3080
|
}, dt = (u, h) => {
|
|
3081
3081
|
let g;
|
|
3082
3082
|
for (; u !== h; )
|
|
3083
3083
|
g = p(u), o(u), u = g;
|
|
3084
3084
|
o(h);
|
|
3085
3085
|
}, Fe = (u, h, g) => {
|
|
3086
|
-
const { bum:
|
|
3087
|
-
ho(M), ho(
|
|
3086
|
+
const { bum: E, scope: b, job: w, subTree: k, um: P, m: M, a: S } = u;
|
|
3087
|
+
ho(M), ho(S), E && os(E), b.stop(), w && (w.flags |= 8, me(k, u, h, g)), P && ke(P, h), ke(() => {
|
|
3088
3088
|
u.isUnmounted = !0;
|
|
3089
3089
|
}, h);
|
|
3090
|
-
}, qe = (u, h, g,
|
|
3091
|
-
for (let
|
|
3092
|
-
me(u[
|
|
3093
|
-
},
|
|
3090
|
+
}, qe = (u, h, g, E = !1, b = !1, w = 0) => {
|
|
3091
|
+
for (let k = w; k < u.length; k++)
|
|
3092
|
+
me(u[k], h, g, E, b);
|
|
3093
|
+
}, Ke = (u) => {
|
|
3094
3094
|
if (u.shapeFlag & 6)
|
|
3095
|
-
return
|
|
3095
|
+
return Ke(u.component.subTree);
|
|
3096
3096
|
if (u.shapeFlag & 128)
|
|
3097
3097
|
return u.suspense.next();
|
|
3098
3098
|
const h = p(u.anchor || u.el), g = h && h[Ai];
|
|
@@ -3100,8 +3100,8 @@ function ia(e, t) {
|
|
|
3100
3100
|
};
|
|
3101
3101
|
let Et = !1;
|
|
3102
3102
|
const kt = (u, h, g) => {
|
|
3103
|
-
let
|
|
3104
|
-
u == null ? h._vnode && (me(h._vnode, null, null, !0),
|
|
3103
|
+
let E;
|
|
3104
|
+
u == null ? h._vnode && (me(h._vnode, null, null, !0), E = h._vnode.component) : _(
|
|
3105
3105
|
h._vnode || null,
|
|
3106
3106
|
u,
|
|
3107
3107
|
h,
|
|
@@ -3109,17 +3109,17 @@ function ia(e, t) {
|
|
|
3109
3109
|
null,
|
|
3110
3110
|
null,
|
|
3111
3111
|
g
|
|
3112
|
-
), h._vnode = u, Et || (Et = !0, so(
|
|
3112
|
+
), h._vnode = u, Et || (Et = !0, so(E), Ti(), Et = !1);
|
|
3113
3113
|
}, ot = {
|
|
3114
3114
|
p: _,
|
|
3115
3115
|
um: me,
|
|
3116
3116
|
m: ge,
|
|
3117
3117
|
r: st,
|
|
3118
3118
|
mt: J,
|
|
3119
|
-
mc:
|
|
3119
|
+
mc: V,
|
|
3120
3120
|
pc: Ae,
|
|
3121
3121
|
pbc: fe,
|
|
3122
|
-
n:
|
|
3122
|
+
n: Ke,
|
|
3123
3123
|
o: e
|
|
3124
3124
|
};
|
|
3125
3125
|
return {
|
|
@@ -3188,7 +3188,7 @@ function aa(e, t) {
|
|
|
3188
3188
|
}
|
|
3189
3189
|
const ue = /* @__PURE__ */ Symbol.for("v-fgt"), ts = /* @__PURE__ */ Symbol.for("v-txt"), wt = /* @__PURE__ */ Symbol.for("v-cmt"), mn = /* @__PURE__ */ Symbol.for("v-stc"), vn = [];
|
|
3190
3190
|
let je = null;
|
|
3191
|
-
function
|
|
3191
|
+
function z(e = !1) {
|
|
3192
3192
|
vn.push(je = e ? null : []);
|
|
3193
3193
|
}
|
|
3194
3194
|
function ca() {
|
|
@@ -3199,9 +3199,9 @@ function po(e, t = !1) {
|
|
|
3199
3199
|
Sn += e, e < 0 && je && t && (je.hasOnce = !0);
|
|
3200
3200
|
}
|
|
3201
3201
|
function Vi(e) {
|
|
3202
|
-
return e.dynamicChildren = Sn > 0 ? je ||
|
|
3202
|
+
return e.dynamicChildren = Sn > 0 ? je || Kt : null, ca(), Sn > 0 && je && je.push(e), e;
|
|
3203
3203
|
}
|
|
3204
|
-
function
|
|
3204
|
+
function q(e, t, n, s, o, i) {
|
|
3205
3205
|
return Vi(
|
|
3206
3206
|
v(
|
|
3207
3207
|
e,
|
|
@@ -3267,7 +3267,7 @@ function v(e, t = null, n = null, s = 0, o = null, i = e === ue ? 0 : 1, l = !1,
|
|
|
3267
3267
|
appContext: null,
|
|
3268
3268
|
ctx: xe
|
|
3269
3269
|
};
|
|
3270
|
-
return r ? (
|
|
3270
|
+
return r ? (Ks(a, n), i & 128 && e.normalize(a)) : n && (a.shapeFlag |= ve(n) ? 8 : 16), Sn > 0 && // avoid a block node from tracking itself
|
|
3271
3271
|
!l && // has current parent block
|
|
3272
3272
|
je && // presence of a patch flag indicates this node needs patching on updates.
|
|
3273
3273
|
// component nodes also should always be patched, because even if the
|
|
@@ -3286,7 +3286,7 @@ function ua(e, t = null, n = null, s = 0, o = null, i = !1) {
|
|
|
3286
3286
|
!0
|
|
3287
3287
|
/* mergeRef: true */
|
|
3288
3288
|
);
|
|
3289
|
-
return n &&
|
|
3289
|
+
return n && Ks(r, n), Sn > 0 && !i && je && (r.shapeFlag & 6 ? je[je.indexOf(e)] = r : je.push(r)), r.patchFlag = -2, r;
|
|
3290
3290
|
}
|
|
3291
3291
|
if (ya(e) && (e = e.__vccOpts), t) {
|
|
3292
3292
|
t = fa(t);
|
|
@@ -3366,7 +3366,7 @@ function go(e, t) {
|
|
|
3366
3366
|
return n.staticCount = t, n;
|
|
3367
3367
|
}
|
|
3368
3368
|
function be(e = "", t = !1) {
|
|
3369
|
-
return t ? (
|
|
3369
|
+
return t ? (z(), ft(wt, null, e)) : we(wt, null, e);
|
|
3370
3370
|
}
|
|
3371
3371
|
function ct(e) {
|
|
3372
3372
|
return e == null || typeof e == "boolean" ? we(wt) : U(e) ? we(
|
|
@@ -3379,7 +3379,7 @@ function ct(e) {
|
|
|
3379
3379
|
function vt(e) {
|
|
3380
3380
|
return e.el === null && e.patchFlag !== -1 || e.memo ? e : Zt(e);
|
|
3381
3381
|
}
|
|
3382
|
-
function
|
|
3382
|
+
function Ks(e, t) {
|
|
3383
3383
|
let n = 0;
|
|
3384
3384
|
const { shapeFlag: s } = e;
|
|
3385
3385
|
if (t == null)
|
|
@@ -3389,7 +3389,7 @@ function Us(e, t) {
|
|
|
3389
3389
|
else if (typeof t == "object")
|
|
3390
3390
|
if (s & 65) {
|
|
3391
3391
|
const o = t.default;
|
|
3392
|
-
o && (o._c && (o._d = !1),
|
|
3392
|
+
o && (o._c && (o._d = !1), Ks(e, o()), o._c && (o._d = !0));
|
|
3393
3393
|
return;
|
|
3394
3394
|
} else {
|
|
3395
3395
|
n = 32;
|
|
@@ -3408,11 +3408,11 @@ function da(...e) {
|
|
|
3408
3408
|
t.class !== s.class && (t.class = Te([t.class, s.class]));
|
|
3409
3409
|
else if (o === "style")
|
|
3410
3410
|
t.style = Ht([t.style, s.style]);
|
|
3411
|
-
else if (
|
|
3411
|
+
else if (Kn(o)) {
|
|
3412
3412
|
const i = t[o], l = s[o];
|
|
3413
3413
|
l && i !== l && !(U(i) && i.includes(l)) ? t[o] = i ? [].concat(i, l) : l : l == null && i == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
3414
3414
|
// the model listener.
|
|
3415
|
-
!
|
|
3415
|
+
!Un(o) && (t[o] = l);
|
|
3416
3416
|
} else o !== "" && (t[o] = s[o]);
|
|
3417
3417
|
}
|
|
3418
3418
|
return t;
|
|
@@ -3441,7 +3441,7 @@ function ga(e, t, n) {
|
|
|
3441
3441
|
update: null,
|
|
3442
3442
|
// will be set synchronously right after creation
|
|
3443
3443
|
job: null,
|
|
3444
|
-
scope: new
|
|
3444
|
+
scope: new Kl(
|
|
3445
3445
|
!0
|
|
3446
3446
|
/* detached */
|
|
3447
3447
|
),
|
|
@@ -3459,7 +3459,7 @@ function ga(e, t, n) {
|
|
|
3459
3459
|
directives: null,
|
|
3460
3460
|
// resolved props and emits options
|
|
3461
3461
|
propsOptions: ea(s, o),
|
|
3462
|
-
emitsOptions:
|
|
3462
|
+
emitsOptions: Ur(s, o),
|
|
3463
3463
|
// emit
|
|
3464
3464
|
emit: null,
|
|
3465
3465
|
// to be set immediately
|
|
@@ -3502,10 +3502,10 @@ function ga(e, t, n) {
|
|
|
3502
3502
|
ec: null,
|
|
3503
3503
|
sp: null
|
|
3504
3504
|
};
|
|
3505
|
-
return i.ctx = { _: i }, i.root = t ? t.root : i, i.emit =
|
|
3505
|
+
return i.ctx = { _: i }, i.root = t ? t.root : i, i.emit = Kr.bind(null, i), e.ce && e.ce(i), i;
|
|
3506
3506
|
}
|
|
3507
3507
|
let $e = null;
|
|
3508
|
-
const
|
|
3508
|
+
const Us = () => $e || xe;
|
|
3509
3509
|
let Wn, xs;
|
|
3510
3510
|
{
|
|
3511
3511
|
const e = Gn(), t = (n, s) => {
|
|
@@ -3530,13 +3530,13 @@ const Ys = (e) => {
|
|
|
3530
3530
|
}, mo = () => {
|
|
3531
3531
|
$e && $e.scope.off(), Wn(null);
|
|
3532
3532
|
};
|
|
3533
|
-
function
|
|
3533
|
+
function Ki(e) {
|
|
3534
3534
|
return e.vnode.shapeFlag & 4;
|
|
3535
3535
|
}
|
|
3536
3536
|
let wn = !1;
|
|
3537
3537
|
function ma(e, t = !1, n = !1) {
|
|
3538
3538
|
t && xs(t);
|
|
3539
|
-
const { props: s, children: o } = e.vnode, i =
|
|
3539
|
+
const { props: s, children: o } = e.vnode, i = Ki(e);
|
|
3540
3540
|
Zr(e, s, i, t), na(e, o, n || t);
|
|
3541
3541
|
const l = i ? va(e, t) : void 0;
|
|
3542
3542
|
return t && xs(!1), l;
|
|
@@ -3567,12 +3567,12 @@ function va(e, t) {
|
|
|
3567
3567
|
} else
|
|
3568
3568
|
vo(e, l);
|
|
3569
3569
|
} else
|
|
3570
|
-
|
|
3570
|
+
Ui(e);
|
|
3571
3571
|
}
|
|
3572
3572
|
function vo(e, t, n) {
|
|
3573
|
-
te(t) ? e.type.__ssrInlineRender ? e.ssrRender = t : e.render = t : ie(t) && (e.setupState = yi(t)),
|
|
3573
|
+
te(t) ? e.type.__ssrInlineRender ? e.ssrRender = t : e.render = t : ie(t) && (e.setupState = yi(t)), Ui(e);
|
|
3574
3574
|
}
|
|
3575
|
-
function
|
|
3575
|
+
function Ui(e, t, n) {
|
|
3576
3576
|
const s = e.type;
|
|
3577
3577
|
e.render || (e.render = s.render || At);
|
|
3578
3578
|
}
|
|
@@ -3608,7 +3608,7 @@ function ns(e) {
|
|
|
3608
3608
|
function ya(e) {
|
|
3609
3609
|
return te(e) && "__vccOpts" in e;
|
|
3610
3610
|
}
|
|
3611
|
-
const
|
|
3611
|
+
const K = (e, t) => /* @__PURE__ */ wr(e, t, wn), ba = "3.5.32";
|
|
3612
3612
|
/**
|
|
3613
3613
|
* @vue/runtime-dom v3.5.32
|
|
3614
3614
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
@@ -3706,7 +3706,7 @@ function an(e, t) {
|
|
|
3706
3706
|
}
|
|
3707
3707
|
const Ji = /* @__PURE__ */ Symbol("");
|
|
3708
3708
|
function Zi(e) {
|
|
3709
|
-
const t =
|
|
3709
|
+
const t = Us();
|
|
3710
3710
|
if (!t)
|
|
3711
3711
|
return;
|
|
3712
3712
|
const n = t.ut = (o = e(t.proxy)) => {
|
|
@@ -3908,7 +3908,7 @@ function La(e, t) {
|
|
|
3908
3908
|
const Ao = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // lowercase letter
|
|
3909
3909
|
e.charCodeAt(2) > 96 && e.charCodeAt(2) < 123, Fa = (e, t, n, s, o, i) => {
|
|
3910
3910
|
const l = o === "svg";
|
|
3911
|
-
t === "class" ? Ca(e, s, l) : t === "style" ? Oa(e, n, s) :
|
|
3911
|
+
t === "class" ? Ca(e, s, l) : t === "style" ? Oa(e, n, s) : Kn(t) ? Un(t) || ka(e, t, n, s, i) : (t[0] === "." ? (t = t.slice(1), !0) : t[0] === "^" ? (t = t.slice(1), !1) : Ba(e, t, s, l)) ? (Co(e, t, s), !e.tagName.includes("-") && (t === "value" || t === "checked" || t === "selected") && To(e, t, s, l, i, t !== "value")) : /* #11081 force set props for possible async custom element */ e._isVueCE && // #12408 check if it's declared prop or it's async custom element
|
|
3912
3912
|
($a(e, t) || // @ts-expect-error _def is private
|
|
3913
3913
|
e._def.__asyncLoader && (/[A-Z]/.test(t) || !ve(s))) ? Co(e, Ze(t), s, i, t) : (t === "true-value" ? e._trueValue = s : t === "false-value" && (e._falseValue = s), To(e, t, s, l));
|
|
3914
3914
|
};
|
|
@@ -3964,7 +3964,7 @@ function za() {
|
|
|
3964
3964
|
const Va = (...e) => {
|
|
3965
3965
|
const t = za().createApp(...e), { mount: n } = t;
|
|
3966
3966
|
return t.mount = (s) => {
|
|
3967
|
-
const o =
|
|
3967
|
+
const o = Ka(s);
|
|
3968
3968
|
if (!o) return;
|
|
3969
3969
|
const i = t._component;
|
|
3970
3970
|
!te(i) && !i.render && !i.template && (i.template = o.innerHTML), o.nodeType === 1 && (o.textContent = "");
|
|
@@ -3978,10 +3978,10 @@ function qa(e) {
|
|
|
3978
3978
|
if (typeof MathMLElement == "function" && e instanceof MathMLElement)
|
|
3979
3979
|
return "mathml";
|
|
3980
3980
|
}
|
|
3981
|
-
function
|
|
3981
|
+
function Ka(e) {
|
|
3982
3982
|
return ve(e) ? document.querySelector(e) : e;
|
|
3983
3983
|
}
|
|
3984
|
-
const el = "data-opencode-config", hs = "/__opencode_sessions__",
|
|
3984
|
+
const el = "data-opencode-config", hs = "/__opencode_sessions__", Ua = {
|
|
3985
3985
|
checking_opencode: "检查 OpenCode 安装",
|
|
3986
3986
|
allocating_port: "分配服务端口",
|
|
3987
3987
|
preparing_runtime: "准备运行环境",
|
|
@@ -4031,9 +4031,9 @@ const sl = /* @__PURE__ */ Ve({
|
|
|
4031
4031
|
handleEmptyAction: f,
|
|
4032
4032
|
handleFrameLoaded: c
|
|
4033
4033
|
} = en();
|
|
4034
|
-
function d(m,
|
|
4034
|
+
function d(m, T) {
|
|
4035
4035
|
var _;
|
|
4036
|
-
(_ = n.value) != null && _.contentWindow && n.value.contentWindow.postMessage(Za({ type: m },
|
|
4036
|
+
(_ = n.value) != null && _.contentWindow && n.value.contentWindow.postMessage(Za({ type: m }, T), "*");
|
|
4037
4037
|
}
|
|
4038
4038
|
Xe(() => {
|
|
4039
4039
|
n.value && n.value.addEventListener("load", () => {
|
|
@@ -4047,7 +4047,7 @@ const sl = /* @__PURE__ */ Ve({
|
|
|
4047
4047
|
}
|
|
4048
4048
|
}), Qa = { class: "opencode-iframe-container" }, ec = { class: "opencode-empty-state-text" }, tc = ["src"];
|
|
4049
4049
|
function nc(e, t, n, s, o, i) {
|
|
4050
|
-
return
|
|
4050
|
+
return z(), q("div", Qa, [
|
|
4051
4051
|
v(
|
|
4052
4052
|
"div",
|
|
4053
4053
|
{
|
|
@@ -4168,20 +4168,20 @@ const ol = /* @__PURE__ */ Ve({
|
|
|
4168
4168
|
mode: d,
|
|
4169
4169
|
handleToggleSessionList: p,
|
|
4170
4170
|
handleToggleSelectMode: m,
|
|
4171
|
-
handleToggleTheme:
|
|
4171
|
+
handleToggleTheme: T,
|
|
4172
4172
|
handleClose: _,
|
|
4173
|
-
handleToggleMinimize:
|
|
4174
|
-
handleTogglePromptDock:
|
|
4175
|
-
} = en(),
|
|
4173
|
+
handleToggleMinimize: A,
|
|
4174
|
+
handleTogglePromptDock: D
|
|
4175
|
+
} = en(), x = K(() => d.value === "split"), F = K(() => `主题: ${{
|
|
4176
4176
|
auto: "自动",
|
|
4177
4177
|
light: "亮色",
|
|
4178
4178
|
dark: "暗色"
|
|
4179
|
-
}[r.value]} (${a.value})`), y =
|
|
4179
|
+
}[r.value]} (${a.value})`), y = K(() => `切换主题 - 当前: ${{
|
|
4180
4180
|
auto: "自动跟随系统",
|
|
4181
4181
|
light: "亮色主题",
|
|
4182
4182
|
dark: "暗色主题"
|
|
4183
|
-
}[r.value]}`),
|
|
4184
|
-
return Object.defineProperty(
|
|
4183
|
+
}[r.value]}`), B = { title: n, sessionListTitle: s, sessionListCollapsed: o, selectMode: i, selectEnabled: l, theme: r, resolvedTheme: a, minimized: f, promptDockVisible: c, mode: d, handleToggleSessionList: p, handleToggleSelectMode: m, handleToggleTheme: T, handleClose: _, handleToggleMinimize: A, handleTogglePromptDock: D, isSplitMode: x, themeIconTitle: F, themeIconLabel: y };
|
|
4184
|
+
return Object.defineProperty(B, "__isScriptSetup", { enumerable: !1, value: !0 }), B;
|
|
4185
4185
|
}
|
|
4186
4186
|
}), oc = { class: "opencode-chat-header" }, ic = { class: "opencode-chat-header-left" }, lc = ["title", "aria-label", "aria-expanded"], rc = ["aria-pressed", "disabled"], ac = ["title", "aria-label"], cc = {
|
|
4187
4187
|
key: 0,
|
|
@@ -4230,7 +4230,7 @@ const ol = /* @__PURE__ */ Ve({
|
|
|
4230
4230
|
"aria-hidden": "true"
|
|
4231
4231
|
};
|
|
4232
4232
|
function _c(e, t, n, s, o, i) {
|
|
4233
|
-
return
|
|
4233
|
+
return z(), q("div", oc, [
|
|
4234
4234
|
v("div", ic, [
|
|
4235
4235
|
v("button", {
|
|
4236
4236
|
class: Te(["opencode-header-btn session-toggle", { active: !s.sessionListCollapsed }]),
|
|
@@ -4304,9 +4304,9 @@ function _c(e, t, n, s, o, i) {
|
|
|
4304
4304
|
onClick: t[2] || (t[2] = (...l) => s.handleToggleTheme && s.handleToggleTheme(...l))
|
|
4305
4305
|
}, [
|
|
4306
4306
|
ee(e.$slots, "theme-icon", {}, () => [
|
|
4307
|
-
s.theme === "light" ? (
|
|
4307
|
+
s.theme === "light" ? (z(), q("svg", cc, [...t[8] || (t[8] = [
|
|
4308
4308
|
go('<circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>', 9)
|
|
4309
|
-
])])) : s.theme === "dark" ? (
|
|
4309
|
+
])])) : s.theme === "dark" ? (z(), q("svg", uc, [...t[9] || (t[9] = [
|
|
4310
4310
|
v(
|
|
4311
4311
|
"path",
|
|
4312
4312
|
{ d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" },
|
|
@@ -4314,7 +4314,7 @@ function _c(e, t, n, s, o, i) {
|
|
|
4314
4314
|
-1
|
|
4315
4315
|
/* CACHED */
|
|
4316
4316
|
)
|
|
4317
|
-
])])) : (
|
|
4317
|
+
])])) : (z(), q("svg", fc, [...t[10] || (t[10] = [
|
|
4318
4318
|
go('<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line><circle cx="12" cy="10" r="3"></circle><path d="M7 7l2 2M17 7l-2 2M7 13l2-2M17 13l-2-2"></path>', 5)
|
|
4319
4319
|
])]))
|
|
4320
4320
|
])
|
|
@@ -4328,7 +4328,7 @@ function _c(e, t, n, s, o, i) {
|
|
|
4328
4328
|
/* TEXT */
|
|
4329
4329
|
),
|
|
4330
4330
|
v("div", hc, [
|
|
4331
|
-
s.isSplitMode ? be("v-if", !0) : (
|
|
4331
|
+
s.isSplitMode ? be("v-if", !0) : (z(), q("button", {
|
|
4332
4332
|
key: 0,
|
|
4333
4333
|
class: "opencode-header-btn prompt-dock",
|
|
4334
4334
|
type: "button",
|
|
@@ -4357,7 +4357,7 @@ function _c(e, t, n, s, o, i) {
|
|
|
4357
4357
|
))
|
|
4358
4358
|
])
|
|
4359
4359
|
], 8, pc)),
|
|
4360
|
-
s.isSplitMode ? be("v-if", !0) : (
|
|
4360
|
+
s.isSplitMode ? be("v-if", !0) : (z(), q("button", {
|
|
4361
4361
|
key: 1,
|
|
4362
4362
|
class: "opencode-header-btn minimize",
|
|
4363
4363
|
type: "button",
|
|
@@ -4367,7 +4367,7 @@ function _c(e, t, n, s, o, i) {
|
|
|
4367
4367
|
onClick: t[4] || (t[4] = (...l) => s.handleToggleMinimize && s.handleToggleMinimize(...l))
|
|
4368
4368
|
}, [
|
|
4369
4369
|
ee(e.$slots, "minimize-icon", {}, () => [
|
|
4370
|
-
s.minimized ? (
|
|
4370
|
+
s.minimized ? (z(), q("svg", mc, [...t[12] || (t[12] = [
|
|
4371
4371
|
v(
|
|
4372
4372
|
"path",
|
|
4373
4373
|
{ d: "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" },
|
|
@@ -4375,7 +4375,7 @@ function _c(e, t, n, s, o, i) {
|
|
|
4375
4375
|
-1
|
|
4376
4376
|
/* CACHED */
|
|
4377
4377
|
)
|
|
4378
|
-
])])) : (
|
|
4378
|
+
])])) : (z(), q("svg", vc, [...t[13] || (t[13] = [
|
|
4379
4379
|
v(
|
|
4380
4380
|
"path",
|
|
4381
4381
|
{ d: "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" },
|
|
@@ -4386,7 +4386,7 @@ function _c(e, t, n, s, o, i) {
|
|
|
4386
4386
|
])]))
|
|
4387
4387
|
])
|
|
4388
4388
|
], 8, gc)),
|
|
4389
|
-
s.isSplitMode ? be("v-if", !0) : (
|
|
4389
|
+
s.isSplitMode ? be("v-if", !0) : (z(), q("button", {
|
|
4390
4390
|
key: 2,
|
|
4391
4391
|
class: "opencode-header-btn close",
|
|
4392
4392
|
type: "button",
|
|
@@ -4440,16 +4440,16 @@ const il = /* @__PURE__ */ Ve({
|
|
|
4440
4440
|
d.value = !1;
|
|
4441
4441
|
}, 200);
|
|
4442
4442
|
});
|
|
4443
|
-
const m =
|
|
4444
|
-
function
|
|
4445
|
-
var
|
|
4446
|
-
return !c?.value || !
|
|
4443
|
+
const m = K(() => !!(d.value || i.value));
|
|
4444
|
+
function T(A) {
|
|
4445
|
+
var D, x;
|
|
4446
|
+
return !c?.value || !A ? !1 : (x = (D = c.value[A]) == null ? void 0 : D.thinking) != null ? x : !1;
|
|
4447
4447
|
}
|
|
4448
4448
|
const _ = { collapsed: n, sessions: s, loadingSessionList: o, showSessionListSkeleton: i, handleCreateSession: l, handleSelectSession: r, handleDeleteSession: a, sessionKey: f, sessionStates: c, isAnimating: d, get animTimer() {
|
|
4449
4449
|
return p;
|
|
4450
|
-
}, set animTimer(
|
|
4451
|
-
p =
|
|
4452
|
-
}, showSkeleton: m, isSessionThinking:
|
|
4450
|
+
}, set animTimer(A) {
|
|
4451
|
+
p = A;
|
|
4452
|
+
}, showSkeleton: m, isSessionThinking: T };
|
|
4453
4453
|
return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
|
|
4454
4454
|
}
|
|
4455
4455
|
}), bc = {
|
|
@@ -4470,14 +4470,14 @@ const il = /* @__PURE__ */ Ve({
|
|
|
4470
4470
|
class: "opencode-thinking-loading"
|
|
4471
4471
|
}, Ac = ["aria-label", "onClick"], Mc = { class: "opencode-session-meta" };
|
|
4472
4472
|
function Pc(e, t, n, s, o, i) {
|
|
4473
|
-
return
|
|
4473
|
+
return z(), q(
|
|
4474
4474
|
"div",
|
|
4475
4475
|
{
|
|
4476
4476
|
class: Te(["opencode-session-list", { collapsed: s.collapsed }])
|
|
4477
4477
|
},
|
|
4478
4478
|
[
|
|
4479
4479
|
be(" Header "),
|
|
4480
|
-
s.showSkeleton ? (
|
|
4480
|
+
s.showSkeleton ? (z(), q(
|
|
4481
4481
|
ue,
|
|
4482
4482
|
{ key: 1 },
|
|
4483
4483
|
[
|
|
@@ -4495,7 +4495,7 @@ function Pc(e, t, n, s, o, i) {
|
|
|
4495
4495
|
],
|
|
4496
4496
|
2112
|
|
4497
4497
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
4498
|
-
)) : (
|
|
4498
|
+
)) : (z(), q("div", bc, [
|
|
4499
4499
|
t[1] || (t[1] = v(
|
|
4500
4500
|
"span",
|
|
4501
4501
|
{ id: "opencode-session-list-title" },
|
|
@@ -4512,8 +4512,8 @@ function Pc(e, t, n, s, o, i) {
|
|
|
4512
4512
|
}, " + ")
|
|
4513
4513
|
])),
|
|
4514
4514
|
be(" Content Skeleton "),
|
|
4515
|
-
s.showSkeleton ? (
|
|
4516
|
-
(
|
|
4515
|
+
s.showSkeleton ? (z(), q("div", Sc, [
|
|
4516
|
+
(z(), q(
|
|
4517
4517
|
ue,
|
|
4518
4518
|
null,
|
|
4519
4519
|
Es(5, (l) => v("div", {
|
|
@@ -4538,13 +4538,13 @@ function Pc(e, t, n, s, o, i) {
|
|
|
4538
4538
|
64
|
|
4539
4539
|
/* STABLE_FRAGMENT */
|
|
4540
4540
|
))
|
|
4541
|
-
])) : (
|
|
4541
|
+
])) : (z(), q(
|
|
4542
4542
|
ue,
|
|
4543
4543
|
{ key: 3 },
|
|
4544
4544
|
[
|
|
4545
4545
|
be(" Content "),
|
|
4546
4546
|
v("div", wc, [
|
|
4547
|
-
s.loadingSessionList ? (
|
|
4547
|
+
s.loadingSessionList ? (z(), q("div", Ec, [...t[4] || (t[4] = [
|
|
4548
4548
|
v(
|
|
4549
4549
|
"div",
|
|
4550
4550
|
{ class: "opencode-loading-spinner small" },
|
|
@@ -4553,10 +4553,10 @@ function Pc(e, t, n, s, o, i) {
|
|
|
4553
4553
|
/* CACHED */
|
|
4554
4554
|
)
|
|
4555
4555
|
])])) : be("v-if", !0),
|
|
4556
|
-
s.sessions.length > 0 ? (
|
|
4556
|
+
s.sessions.length > 0 ? (z(!0), q(
|
|
4557
4557
|
ue,
|
|
4558
4558
|
{ key: 1 },
|
|
4559
|
-
Es(s.sessions, (l) => (
|
|
4559
|
+
Es(s.sessions, (l) => (z(), q("div", {
|
|
4560
4560
|
key: l[s.sessionKey],
|
|
4561
4561
|
class: Te(["opencode-session-item", { active: l.active, thinking: s.isSessionThinking(l.id) }]),
|
|
4562
4562
|
role: "option",
|
|
@@ -4565,7 +4565,7 @@ function Pc(e, t, n, s, o, i) {
|
|
|
4565
4565
|
}, [
|
|
4566
4566
|
v("div", Cc, [
|
|
4567
4567
|
v("div", xc, [
|
|
4568
|
-
s.isSessionThinking(l.id) ? (
|
|
4568
|
+
s.isSessionThinking(l.id) ? (z(), q("span", Oc)) : be("v-if", !0),
|
|
4569
4569
|
qs(
|
|
4570
4570
|
" " + Se(l.title),
|
|
4571
4571
|
1
|
|
@@ -4589,7 +4589,7 @@ function Pc(e, t, n, s, o, i) {
|
|
|
4589
4589
|
], 10, Tc))),
|
|
4590
4590
|
128
|
|
4591
4591
|
/* KEYED_FRAGMENT */
|
|
4592
|
-
)) : (
|
|
4592
|
+
)) : (z(), q(
|
|
4593
4593
|
ue,
|
|
4594
4594
|
{ key: 2 },
|
|
4595
4595
|
[
|
|
@@ -4630,7 +4630,7 @@ const ll = /* @__PURE__ */ Ve({
|
|
|
4630
4630
|
"aria-label": "已选元素列表"
|
|
4631
4631
|
}, Rc = ["onClick"], Ic = { class: "opencode-node-content" }, Nc = { class: "opencode-node-text" }, Lc = { class: "opencode-node-file" }, Fc = ["aria-label", "onClick"];
|
|
4632
4632
|
function Bc(e, t, n, s, o, i) {
|
|
4633
|
-
return
|
|
4633
|
+
return z(), q(
|
|
4634
4634
|
"div",
|
|
4635
4635
|
{
|
|
4636
4636
|
class: Te(["opencode-right-toolbar", { collapsed: s.items.length === 0 }])
|
|
@@ -4647,10 +4647,10 @@ function Bc(e, t, n, s, o, i) {
|
|
|
4647
4647
|
/* CACHED */
|
|
4648
4648
|
)),
|
|
4649
4649
|
v("div", Dc, [
|
|
4650
|
-
(
|
|
4650
|
+
(z(!0), q(
|
|
4651
4651
|
ue,
|
|
4652
4652
|
null,
|
|
4653
|
-
Es(s.items, (l, r) => (
|
|
4653
|
+
Es(s.items, (l, r) => (z(), q("div", {
|
|
4654
4654
|
key: l.key,
|
|
4655
4655
|
class: "opencode-selected-node",
|
|
4656
4656
|
role: "listitem",
|
|
@@ -4683,7 +4683,7 @@ function Bc(e, t, n, s, o, i) {
|
|
|
4683
4683
|
/* KEYED_FRAGMENT */
|
|
4684
4684
|
))
|
|
4685
4685
|
]),
|
|
4686
|
-
s.showClearAll && s.items.length > 0 ? (
|
|
4686
|
+
s.showClearAll && s.items.length > 0 ? (z(), q("button", {
|
|
4687
4687
|
key: 0,
|
|
4688
4688
|
class: "opencode-clear-all-btn",
|
|
4689
4689
|
type: "button",
|
|
@@ -4703,8 +4703,8 @@ var $c = ll, jc = Object.defineProperty, Wc = Object.defineProperties, Hc = Obje
|
|
|
4703
4703
|
for (var n of Do(t))
|
|
4704
4704
|
Vc.call(t, n) && Ro(e, n, t[n]);
|
|
4705
4705
|
return e;
|
|
4706
|
-
},
|
|
4707
|
-
const rl = /* @__PURE__ */ Ve(
|
|
4706
|
+
}, Kc = (e, t) => Wc(e, Hc(t));
|
|
4707
|
+
const rl = /* @__PURE__ */ Ve(Kc(qc({}, {
|
|
4708
4708
|
name: "ResizeHandle"
|
|
4709
4709
|
}), {
|
|
4710
4710
|
__name: "ResizeHandle",
|
|
@@ -4720,7 +4720,7 @@ const rl = /* @__PURE__ */ Ve(Uc(qc({}, {
|
|
|
4720
4720
|
m.preventDefault(), i.value = !0, l.value = m.clientX, r.value = s.width, o("resize-start"), document.addEventListener("mousemove", f), document.addEventListener("mouseup", c);
|
|
4721
4721
|
}, f = (m) => {
|
|
4722
4722
|
if (!i.value) return;
|
|
4723
|
-
const
|
|
4723
|
+
const T = l.value - m.clientX, _ = Math.max(s.minWidth, Math.min(s.maxWidth, r.value + T));
|
|
4724
4724
|
o("resize", _);
|
|
4725
4725
|
}, c = () => {
|
|
4726
4726
|
i.value = !1, o("resize-end"), document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", c);
|
|
@@ -4734,8 +4734,8 @@ const rl = /* @__PURE__ */ Ve(Uc(qc({}, {
|
|
|
4734
4734
|
return Object.defineProperty(p, "__isScriptSetup", { enumerable: !1, value: !0 }), p;
|
|
4735
4735
|
}
|
|
4736
4736
|
}));
|
|
4737
|
-
function
|
|
4738
|
-
return
|
|
4737
|
+
function Uc(e, t, n, s, o, i) {
|
|
4738
|
+
return z(), q(
|
|
4739
4739
|
"div",
|
|
4740
4740
|
{
|
|
4741
4741
|
class: Te(["opencode-resize-handle", { resizing: s.isResizing }]),
|
|
@@ -4747,7 +4747,7 @@ function Kc(e, t, n, s, o, i) {
|
|
|
4747
4747
|
/* CLASS, NEED_HYDRATION */
|
|
4748
4748
|
);
|
|
4749
4749
|
}
|
|
4750
|
-
rl.render =
|
|
4750
|
+
rl.render = Uc;
|
|
4751
4751
|
var Yc = rl, Xc = Object.defineProperty, Gc = Object.defineProperties, Jc = Object.getOwnPropertyDescriptors, Io = Object.getOwnPropertySymbols, Zc = Object.prototype.hasOwnProperty, Qc = Object.prototype.propertyIsEnumerable, No = (e, t, n) => t in e ? Xc(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, eu = (e, t) => {
|
|
4752
4752
|
for (var n in t || (t = {}))
|
|
4753
4753
|
Zc.call(t, n) && No(e, n, t[n]);
|
|
@@ -4784,9 +4784,9 @@ const al = /* @__PURE__ */ Ve(tu(eu({}, {
|
|
|
4784
4784
|
"-animationOrigin.x": _.animationOrigin.x,
|
|
4785
4785
|
"-animationOrigin.y": _.animationOrigin.y
|
|
4786
4786
|
}));
|
|
4787
|
-
const s = e, o = n, i = ki(), l = /* @__PURE__ */ L(null), r = (_,
|
|
4788
|
-
var
|
|
4789
|
-
(
|
|
4787
|
+
const s = e, o = n, i = ki(), l = /* @__PURE__ */ L(null), r = (_, A) => {
|
|
4788
|
+
var D;
|
|
4789
|
+
(D = l.value) == null || D.sendMessageToIframe(_, A);
|
|
4790
4790
|
};
|
|
4791
4791
|
t({
|
|
4792
4792
|
sendMessageToIframe: r,
|
|
@@ -4800,9 +4800,9 @@ const al = /* @__PURE__ */ Ve(tu(eu({}, {
|
|
|
4800
4800
|
o("resize-end");
|
|
4801
4801
|
}, d = () => {
|
|
4802
4802
|
o("toggle");
|
|
4803
|
-
}, p =
|
|
4803
|
+
}, p = K(() => s.mode === "split" ? {
|
|
4804
4804
|
width: `${s.panelWidth}px`
|
|
4805
|
-
} : s.positionStyle), m =
|
|
4805
|
+
} : s.positionStyle), m = K(() => [
|
|
4806
4806
|
"opencode-chat",
|
|
4807
4807
|
{
|
|
4808
4808
|
open: s.open,
|
|
@@ -4811,8 +4811,8 @@ const al = /* @__PURE__ */ Ve(tu(eu({}, {
|
|
|
4811
4811
|
"no-transition": s.noTransition,
|
|
4812
4812
|
"split-mode": s.mode === "split"
|
|
4813
4813
|
}
|
|
4814
|
-
]),
|
|
4815
|
-
return Object.defineProperty(
|
|
4814
|
+
]), T = { props: s, emit: o, slots: i, frameRef: l, sendMessageToIframe: r, handleResizeStart: a, handleResize: f, handleResizeEnd: c, handleToggle: d, panelStyle: p, panelClasses: m, Frame: sc, Header: yc, SessionList: kc, SelectedNodes: $c, ResizeHandle: Yc };
|
|
4815
|
+
return Object.defineProperty(T, "__isScriptSetup", { enumerable: !1, value: !0 }), T;
|
|
4816
4816
|
}
|
|
4817
4817
|
})), nu = ["aria-expanded"], su = { class: "opencode-split-toggle-icon" }, ou = {
|
|
4818
4818
|
key: 0,
|
|
@@ -4836,14 +4836,14 @@ const al = /* @__PURE__ */ Ve(tu(eu({}, {
|
|
|
4836
4836
|
role: "alert"
|
|
4837
4837
|
}, ru = { class: "opencode-chat-content" };
|
|
4838
4838
|
function au(e, t, n, s, o, i) {
|
|
4839
|
-
return
|
|
4839
|
+
return z(), q(
|
|
4840
4840
|
"div",
|
|
4841
4841
|
{
|
|
4842
4842
|
class: Te(s.panelClasses),
|
|
4843
4843
|
style: Ht(s.panelStyle)
|
|
4844
4844
|
},
|
|
4845
4845
|
[
|
|
4846
|
-
n.mode === "split" && n.resizable && n.open ? (
|
|
4846
|
+
n.mode === "split" && n.resizable && n.open ? (z(), ft(s.ResizeHandle, {
|
|
4847
4847
|
key: 0,
|
|
4848
4848
|
width: n.panelWidth,
|
|
4849
4849
|
"min-width": n.minWidth,
|
|
@@ -4852,7 +4852,7 @@ function au(e, t, n, s, o, i) {
|
|
|
4852
4852
|
onResizeStart: s.handleResizeStart,
|
|
4853
4853
|
onResizeEnd: s.handleResizeEnd
|
|
4854
4854
|
}, null, 8, ["width", "min-width", "max-width"])) : be("v-if", !0),
|
|
4855
|
-
n.mode === "split" ? (
|
|
4855
|
+
n.mode === "split" ? (z(), q("button", {
|
|
4856
4856
|
key: 1,
|
|
4857
4857
|
type: "button",
|
|
4858
4858
|
class: Te(["opencode-split-toggle-btn", { open: s.props.open, thinking: s.props.thinking, "opencode-theme-dark": n.resolvedTheme === "dark" }]),
|
|
@@ -4861,7 +4861,7 @@ function au(e, t, n, s, o, i) {
|
|
|
4861
4861
|
onClick: s.handleToggle
|
|
4862
4862
|
}, [
|
|
4863
4863
|
v("span", su, [
|
|
4864
|
-
n.open ? (
|
|
4864
|
+
n.open ? (z(), q("svg", ou, [...t[0] || (t[0] = [
|
|
4865
4865
|
v(
|
|
4866
4866
|
"path",
|
|
4867
4867
|
{
|
|
@@ -4873,7 +4873,7 @@ function au(e, t, n, s, o, i) {
|
|
|
4873
4873
|
-1
|
|
4874
4874
|
/* CACHED */
|
|
4875
4875
|
)
|
|
4876
|
-
])])) : (
|
|
4876
|
+
])])) : (z(), q("svg", iu, [...t[1] || (t[1] = [
|
|
4877
4877
|
v(
|
|
4878
4878
|
"path",
|
|
4879
4879
|
{
|
|
@@ -4920,7 +4920,7 @@ function au(e, t, n, s, o, i) {
|
|
|
4920
4920
|
1024
|
|
4921
4921
|
/* DYNAMIC_SLOTS */
|
|
4922
4922
|
),
|
|
4923
|
-
n.notificationVisible && n.notificationMode === "widget" ? (
|
|
4923
|
+
n.notificationVisible && n.notificationMode === "widget" ? (z(), q(
|
|
4924
4924
|
"div",
|
|
4925
4925
|
lu,
|
|
4926
4926
|
Se(n.notificationMessage),
|
|
@@ -5000,7 +5000,7 @@ const cl = /* @__PURE__ */ Ve({
|
|
|
5000
5000
|
}
|
|
5001
5001
|
}), uu = { class: "opencode-hint-shortcut" };
|
|
5002
5002
|
function fu(e, t, n, s, o, i) {
|
|
5003
|
-
return
|
|
5003
|
+
return z(), q(
|
|
5004
5004
|
"div",
|
|
5005
5005
|
{
|
|
5006
5006
|
class: Te(["opencode-select-mode-hint", { visible: s.visible }])
|
|
@@ -5052,53 +5052,53 @@ const ul = /* @__PURE__ */ Ve(yu(_u({}, {
|
|
|
5052
5052
|
y: 0,
|
|
5053
5053
|
width: 0,
|
|
5054
5054
|
height: 0
|
|
5055
|
-
}), r = (
|
|
5055
|
+
}), r = (N) => N !== null && typeof N == "object", a = K(
|
|
5056
5056
|
() => r(s.gap) ? s.gap.x : s.gap
|
|
5057
|
-
), f =
|
|
5057
|
+
), f = K(
|
|
5058
5058
|
() => r(s.gap) ? s.gap.y : s.gap
|
|
5059
|
-
), c = /* @__PURE__ */ L(typeof window < "u" ? window.innerWidth : 0), d = /* @__PURE__ */ L(typeof window < "u" ? window.innerHeight : 0), p =
|
|
5059
|
+
), c = /* @__PURE__ */ L(typeof window < "u" ? window.innerWidth : 0), d = /* @__PURE__ */ L(typeof window < "u" ? window.innerHeight : 0), p = K(() => ({
|
|
5060
5060
|
top: f.value,
|
|
5061
5061
|
right: c.value - l.value.width - a.value,
|
|
5062
5062
|
bottom: d.value - l.value.height - f.value,
|
|
5063
5063
|
left: a.value
|
|
5064
|
-
})), m = (
|
|
5064
|
+
})), m = (N, J) => N.reduce(
|
|
5065
5065
|
(se, G) => Math.abs(se - J) < Math.abs(G - J) ? se : G
|
|
5066
|
-
),
|
|
5066
|
+
), T = () => {
|
|
5067
5067
|
if (s.magnetic === "x")
|
|
5068
|
-
if (
|
|
5068
|
+
if (D.value === "left")
|
|
5069
5069
|
l.value.x = p.value.left;
|
|
5070
|
-
else if (
|
|
5070
|
+
else if (D.value === "right")
|
|
5071
5071
|
l.value.x = p.value.right;
|
|
5072
5072
|
else {
|
|
5073
|
-
const
|
|
5073
|
+
const N = m(
|
|
5074
5074
|
[p.value.left, p.value.right],
|
|
5075
5075
|
l.value.x
|
|
5076
5076
|
);
|
|
5077
|
-
l.value.x =
|
|
5077
|
+
l.value.x = N, D.value = N === p.value.left ? "left" : "right";
|
|
5078
5078
|
}
|
|
5079
5079
|
if (s.magnetic === "y") {
|
|
5080
|
-
const
|
|
5080
|
+
const N = m(
|
|
5081
5081
|
[p.value.top, p.value.bottom],
|
|
5082
5082
|
l.value.y
|
|
5083
5083
|
);
|
|
5084
|
-
l.value.y =
|
|
5084
|
+
l.value.y = N;
|
|
5085
5085
|
}
|
|
5086
|
-
}, _ = /* @__PURE__ */ L(!1),
|
|
5087
|
-
const
|
|
5088
|
-
return
|
|
5089
|
-
}),
|
|
5086
|
+
}, _ = /* @__PURE__ */ L(!1), A = /* @__PURE__ */ L(!1), D = /* @__PURE__ */ L(null), x = K(() => {
|
|
5087
|
+
const N = {}, J = `${l.value.x}px`, se = `${l.value.y}px`;
|
|
5088
|
+
return N.transform = `translate3d(${J}, ${se}, 0)`, _.value || !A.value ? N.transition = "none" : N.transition = "transform 0.3s ease", N;
|
|
5089
|
+
}), F = () => {
|
|
5090
5090
|
if (!i.value || typeof window > "u") return;
|
|
5091
|
-
const
|
|
5092
|
-
let se = J ? J.x : c.value -
|
|
5093
|
-
const Oe = c.value -
|
|
5091
|
+
const N = i.value.getBoundingClientRect(), { offset: J } = s;
|
|
5092
|
+
let se = J ? J.x : c.value - N.width - a.value, G = J ? J.y : d.value - N.height - f.value;
|
|
5093
|
+
const Oe = c.value - N.width - a.value, Ae = d.value - N.height - f.value;
|
|
5094
5094
|
se < a.value && (se = a.value), se > Oe && (se = Oe), G < f.value && (G = f.value), G > Ae && (G = Ae);
|
|
5095
5095
|
const Le = l.value.x, ye = l.value.y;
|
|
5096
5096
|
if (l.value = {
|
|
5097
5097
|
x: se,
|
|
5098
5098
|
y: G,
|
|
5099
|
-
width:
|
|
5100
|
-
height:
|
|
5101
|
-
}, !_.value && (s.magnetic === "x" &&
|
|
5099
|
+
width: N.width,
|
|
5100
|
+
height: N.height
|
|
5101
|
+
}, !_.value && (s.magnetic === "x" && D.value ? D.value === "left" ? l.value.x = p.value.left : l.value.x = p.value.right : T(), l.value.x !== Le || l.value.y !== ye)) {
|
|
5102
5102
|
const ge = { x: l.value.x, y: l.value.y };
|
|
5103
5103
|
o("update:offset", ge), o("offset-change", ge);
|
|
5104
5104
|
}
|
|
@@ -5110,80 +5110,80 @@ const ul = /* @__PURE__ */ Ve(yu(_u({}, {
|
|
|
5110
5110
|
offsetX: /* @__PURE__ */ L(0),
|
|
5111
5111
|
offsetY: /* @__PURE__ */ L(0),
|
|
5112
5112
|
isTap: /* @__PURE__ */ L(!0),
|
|
5113
|
-
start(
|
|
5114
|
-
this.startX.value = "touches" in
|
|
5113
|
+
start(N) {
|
|
5114
|
+
this.startX.value = "touches" in N ? N.touches[0].clientX : N.clientX, this.startY.value = "touches" in N ? N.touches[0].clientY : N.clientY, this.deltaX.value = 0, this.deltaY.value = 0, this.offsetX.value = 0, this.offsetY.value = 0, this.isTap.value = !0;
|
|
5115
5115
|
},
|
|
5116
|
-
move(
|
|
5117
|
-
const J = "touches" in
|
|
5116
|
+
move(N) {
|
|
5117
|
+
const J = "touches" in N ? N.touches[0].clientX : N.clientX, se = "touches" in N ? N.touches[0].clientY : N.clientY;
|
|
5118
5118
|
this.deltaX.value = J - this.startX.value, this.deltaY.value = se - this.startY.value, this.offsetX.value = Math.abs(this.deltaX.value), this.offsetY.value = Math.abs(this.deltaY.value);
|
|
5119
5119
|
const G = 5;
|
|
5120
5120
|
this.isTap.value && (this.offsetX.value > G || this.offsetY.value > G) && (this.isTap.value = !1);
|
|
5121
5121
|
}
|
|
5122
5122
|
};
|
|
5123
|
-
let
|
|
5124
|
-
const j = (
|
|
5125
|
-
y.start(
|
|
5126
|
-
},
|
|
5127
|
-
|
|
5123
|
+
let B = 0, I = 0;
|
|
5124
|
+
const j = (N) => {
|
|
5125
|
+
y.start(N), _.value = !0, B = l.value.x, I = l.value.y, document.body.classList.add("floating-bubble-dragging"), "touches" in N || (window.addEventListener("mousemove", V, { passive: !1 }), window.addEventListener("mouseup", ce));
|
|
5126
|
+
}, V = (N) => {
|
|
5127
|
+
N.cancelable && N.preventDefault();
|
|
5128
5128
|
const J = y.isTap.value;
|
|
5129
|
-
if (y.move(
|
|
5129
|
+
if (y.move(N), J && !y.isTap.value && o("drag-start"), s.axis !== "lock" && !y.isTap.value) {
|
|
5130
5130
|
if (s.axis === "x" || s.axis === "xy") {
|
|
5131
|
-
let G =
|
|
5131
|
+
let G = B + y.deltaX.value;
|
|
5132
5132
|
G < p.value.left && (G = p.value.left), G > p.value.right && (G = p.value.right), l.value.x = G;
|
|
5133
5133
|
}
|
|
5134
5134
|
if (s.axis === "y" || s.axis === "xy") {
|
|
5135
|
-
let G =
|
|
5135
|
+
let G = I + y.deltaY.value;
|
|
5136
5136
|
G < p.value.top && (G = p.value.top), G > p.value.bottom && (G = p.value.bottom), l.value.y = G;
|
|
5137
5137
|
}
|
|
5138
5138
|
const se = { x: l.value.x, y: l.value.y };
|
|
5139
5139
|
o("update:offset", se);
|
|
5140
5140
|
}
|
|
5141
|
-
}, ce = (
|
|
5142
|
-
_.value = !1, document.body.classList.remove("floating-bubble-dragging"),
|
|
5141
|
+
}, ce = (N) => {
|
|
5142
|
+
_.value = !1, document.body.classList.remove("floating-bubble-dragging"), N && !("touches" in N) && N.type === "mouseup" && (window.removeEventListener("mousemove", V), window.removeEventListener("mouseup", ce)), requestAnimationFrame(() => {
|
|
5143
5143
|
if (s.magnetic === "x" && !y.isTap.value) {
|
|
5144
5144
|
const J = l.value.x + l.value.width / 2, se = c.value / 2;
|
|
5145
|
-
|
|
5145
|
+
D.value = J < se ? "left" : "right";
|
|
5146
5146
|
}
|
|
5147
|
-
if (
|
|
5147
|
+
if (T(), !y.isTap.value) {
|
|
5148
5148
|
o("drag-end");
|
|
5149
5149
|
const J = { x: l.value.x, y: l.value.y };
|
|
5150
|
-
o("update:offset", J), (
|
|
5150
|
+
o("update:offset", J), (B !== J.x || I !== J.y) && o("offset-change", J);
|
|
5151
5151
|
}
|
|
5152
5152
|
});
|
|
5153
|
-
}, fe = (
|
|
5154
|
-
y.isTap.value ? o("click",
|
|
5153
|
+
}, fe = (N) => {
|
|
5154
|
+
y.isTap.value ? o("click", N) : N.stopPropagation();
|
|
5155
5155
|
}, _e = () => {
|
|
5156
5156
|
typeof window < "u" && (c.value = window.innerWidth, d.value = window.innerHeight);
|
|
5157
5157
|
};
|
|
5158
5158
|
Xe(() => {
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
}), typeof window < "u" && window.addEventListener("resize", _e), i.value && i.value.addEventListener("touchmove",
|
|
5159
|
+
F(), requestAnimationFrame(() => {
|
|
5160
|
+
A.value = !0;
|
|
5161
|
+
}), typeof window < "u" && window.addEventListener("resize", _e), i.value && i.value.addEventListener("touchmove", V, {
|
|
5162
5162
|
passive: !1
|
|
5163
5163
|
});
|
|
5164
5164
|
}), nt(() => {
|
|
5165
|
-
document.body.classList.remove("floating-bubble-dragging"), typeof window < "u" && (window.removeEventListener("resize", _e), window.removeEventListener("mousemove",
|
|
5165
|
+
document.body.classList.remove("floating-bubble-dragging"), typeof window < "u" && (window.removeEventListener("resize", _e), window.removeEventListener("mousemove", V), window.removeEventListener("mouseup", ce)), i.value && i.value.removeEventListener("touchmove", V);
|
|
5166
5166
|
}), ze(
|
|
5167
5167
|
[c, d, a, f, () => s.offset],
|
|
5168
|
-
|
|
5168
|
+
F,
|
|
5169
5169
|
{ deep: !0 }
|
|
5170
5170
|
), t({
|
|
5171
|
-
offset:
|
|
5171
|
+
offset: K(() => ({ x: l.value.x, y: l.value.y }))
|
|
5172
5172
|
});
|
|
5173
|
-
const Re = { props: s, emit: o, rootRef: i, state: l, isObject: r, gapX: a, gapY: f, windowWidth: c, windowHeight: d, boundary: p, closest: m, applyMagnetic:
|
|
5174
|
-
return
|
|
5175
|
-
}, set prevX(
|
|
5176
|
-
|
|
5173
|
+
const Re = { props: s, emit: o, rootRef: i, state: l, isObject: r, gapX: a, gapY: f, windowWidth: c, windowHeight: d, boundary: p, closest: m, applyMagnetic: T, dragging: _, initialized: A, magneticSide: D, rootStyle: x, updateState: F, touch: y, get prevX() {
|
|
5174
|
+
return B;
|
|
5175
|
+
}, set prevX(N) {
|
|
5176
|
+
B = N;
|
|
5177
5177
|
}, get prevY() {
|
|
5178
|
-
return
|
|
5179
|
-
}, set prevY(
|
|
5180
|
-
|
|
5181
|
-
}, onTouchStart: j, onTouchMove:
|
|
5178
|
+
return I;
|
|
5179
|
+
}, set prevY(N) {
|
|
5180
|
+
I = N;
|
|
5181
|
+
}, onTouchStart: j, onTouchMove: V, onTouchEnd: ce, onClick: fe, handleResize: _e };
|
|
5182
5182
|
return Object.defineProperty(Re, "__isScriptSetup", { enumerable: !1, value: !0 }), Re;
|
|
5183
5183
|
}
|
|
5184
5184
|
}));
|
|
5185
5185
|
function bu(e, t, n, s, o, i) {
|
|
5186
|
-
return
|
|
5186
|
+
return z(), ft(Mi, { to: n.teleport }, [
|
|
5187
5187
|
v(
|
|
5188
5188
|
"div",
|
|
5189
5189
|
{
|
|
@@ -5227,12 +5227,12 @@ const fl = /* @__PURE__ */ Ve({
|
|
|
5227
5227
|
}), t({
|
|
5228
5228
|
offset: d
|
|
5229
5229
|
});
|
|
5230
|
-
const
|
|
5231
|
-
return Object.defineProperty(
|
|
5230
|
+
const T = { active: s, open: o, hotkeyLabel: i, thinking: l, resolvedTheme: r, handleToggle: a, bubbleOffset: f, handleBubbleOffsetChange: c, offset: d, emit: p, handleOffsetChange: m, FloatingBubble: Su };
|
|
5231
|
+
return Object.defineProperty(T, "__isScriptSetup", { enumerable: !1, value: !0 }), T;
|
|
5232
5232
|
}
|
|
5233
5233
|
}), wu = ["aria-expanded", "title"];
|
|
5234
5234
|
function Eu(e, t, n, s, o, i) {
|
|
5235
|
-
return
|
|
5235
|
+
return z(), ft(s.FloatingBubble, {
|
|
5236
5236
|
ref: "bubbleRef",
|
|
5237
5237
|
offset: s.offset,
|
|
5238
5238
|
"onUpdate:offset": t[0] || (t[0] = (l) => s.offset = l),
|
|
@@ -5343,7 +5343,7 @@ function Au(e) {
|
|
|
5343
5343
|
return `${(n = e.innerText) != null && n.trim() ? `${tl(e.innerText.trim(), 30)} · ` : ""}${s}${o}`;
|
|
5344
5344
|
}
|
|
5345
5345
|
function Mu(e) {
|
|
5346
|
-
const t =
|
|
5346
|
+
const t = K(() => e.selectMode.value), n = K(
|
|
5347
5347
|
() => (e.selectedElements.value || []).map(
|
|
5348
5348
|
(a, f) => ({
|
|
5349
5349
|
key: xu(a, f),
|
|
@@ -5353,7 +5353,7 @@ function Mu(e) {
|
|
|
5353
5353
|
element: a
|
|
5354
5354
|
})
|
|
5355
5355
|
)
|
|
5356
|
-
), s =
|
|
5356
|
+
), s = K(() => n.value.length > 0);
|
|
5357
5357
|
function o() {
|
|
5358
5358
|
e.onToggleSelectMode(!e.selectMode.value);
|
|
5359
5359
|
}
|
|
@@ -5368,8 +5368,8 @@ function Mu(e) {
|
|
|
5368
5368
|
if (!c && f.includes(".")) {
|
|
5369
5369
|
const d = f.match(/^([a-z]+)\.([^[\s]+)/i);
|
|
5370
5370
|
if (d) {
|
|
5371
|
-
const p = d[1], m = d[2].split(".").filter(Boolean),
|
|
5372
|
-
c = document.querySelector(
|
|
5371
|
+
const p = d[1], m = d[2].split(".").filter(Boolean), T = `${p}.${m.join(".")}`;
|
|
5372
|
+
c = document.querySelector(T);
|
|
5373
5373
|
}
|
|
5374
5374
|
}
|
|
5375
5375
|
if (!c && f.match(/^([a-z]+)/i)) {
|
|
@@ -5381,12 +5381,12 @@ function Mu(e) {
|
|
|
5381
5381
|
const d = document.createElement("div");
|
|
5382
5382
|
d.className = "opencode-element-highlight-temp";
|
|
5383
5383
|
const p = document.querySelector(".opencode-widget");
|
|
5384
|
-
let m = "#3b82f6",
|
|
5384
|
+
let m = "#3b82f6", T = "rgba(59, 130, 246, 0.1)";
|
|
5385
5385
|
if (p) {
|
|
5386
|
-
const
|
|
5387
|
-
m =
|
|
5386
|
+
const A = getComputedStyle(p);
|
|
5387
|
+
m = A.getPropertyValue("--oc-primary").trim() || m, T = A.getPropertyValue("--oc-primary-bg").trim() || T;
|
|
5388
5388
|
}
|
|
5389
|
-
d.style.border = `2px solid ${m}`, d.style.background =
|
|
5389
|
+
d.style.border = `2px solid ${m}`, d.style.background = T;
|
|
5390
5390
|
const _ = c.getBoundingClientRect();
|
|
5391
5391
|
d.style.top = `${_.top + window.scrollY}px`, d.style.left = `${_.left + window.scrollX}px`, d.style.width = `${_.width}px`, d.style.height = `${_.height}px`, document.body.appendChild(d), setTimeout(() => {
|
|
5392
5392
|
d.remove();
|
|
@@ -5439,7 +5439,7 @@ function ku(e) {
|
|
|
5439
5439
|
return Number.isNaN(t.getTime()) ? "" : `${t.toLocaleDateString()} ${t.toLocaleTimeString()}`;
|
|
5440
5440
|
}
|
|
5441
5441
|
function Du(e) {
|
|
5442
|
-
const t =
|
|
5442
|
+
const t = K(
|
|
5443
5443
|
() => (e.sessions.value || []).map((i) => ({
|
|
5444
5444
|
key: i.id,
|
|
5445
5445
|
id: i.id,
|
|
@@ -5481,10 +5481,10 @@ function Ru(e) {
|
|
|
5481
5481
|
}), nt(() => {
|
|
5482
5482
|
s && o && s.removeEventListener("change", o);
|
|
5483
5483
|
});
|
|
5484
|
-
const i =
|
|
5484
|
+
const i = K(() => e.theme.value === "auto" ? t.value : e.theme.value), l = K(() => [
|
|
5485
5485
|
"opencode-widget",
|
|
5486
5486
|
`opencode-theme-${i.value}`
|
|
5487
|
-
]), r =
|
|
5487
|
+
]), r = K(() => !!(e.open.value || e.selectMode.value)), a = K(() => e.iframeSrc.value || "about:blank"), f = K(
|
|
5488
5488
|
() => e.sessionListCollapsed.value ? "展开会话列表" : "折叠会话列表"
|
|
5489
5489
|
);
|
|
5490
5490
|
function c() {
|
|
@@ -5493,8 +5493,8 @@ function Ru(e) {
|
|
|
5493
5493
|
(_ = e.onToggleSelectMode) == null || _.call(e, !1);
|
|
5494
5494
|
return;
|
|
5495
5495
|
}
|
|
5496
|
-
const
|
|
5497
|
-
e.onToggle(
|
|
5496
|
+
const A = !e.open.value;
|
|
5497
|
+
e.onToggle(A);
|
|
5498
5498
|
}
|
|
5499
5499
|
function d() {
|
|
5500
5500
|
e.onClose();
|
|
@@ -5505,10 +5505,10 @@ function Ru(e) {
|
|
|
5505
5505
|
function m() {
|
|
5506
5506
|
e.onEmptyAction();
|
|
5507
5507
|
}
|
|
5508
|
-
function
|
|
5508
|
+
function T() {
|
|
5509
5509
|
var _;
|
|
5510
|
-
const
|
|
5511
|
-
(_ = e.onToggleTheme) == null || _.call(e,
|
|
5510
|
+
const D = (ps.indexOf(e.theme.value) + 1) % ps.length, x = ps[D];
|
|
5511
|
+
(_ = e.onToggleTheme) == null || _.call(e, x);
|
|
5512
5512
|
}
|
|
5513
5513
|
return {
|
|
5514
5514
|
buttonActive: r,
|
|
@@ -5520,7 +5520,7 @@ function Ru(e) {
|
|
|
5520
5520
|
handleEmptyAction: m,
|
|
5521
5521
|
handleToggle: c,
|
|
5522
5522
|
handleToggleSessionList: p,
|
|
5523
|
-
handleToggleTheme:
|
|
5523
|
+
handleToggleTheme: T
|
|
5524
5524
|
};
|
|
5525
5525
|
}
|
|
5526
5526
|
function dl(e) {
|
|
@@ -5677,13 +5677,13 @@ const ml = ", ", Vu = new RegExp([
|
|
|
5677
5677
|
pe.class,
|
|
5678
5678
|
pe.attribute,
|
|
5679
5679
|
pe.nthchild
|
|
5680
|
-
],
|
|
5680
|
+
], Ku = qn([
|
|
5681
5681
|
"class",
|
|
5682
5682
|
"id",
|
|
5683
5683
|
// Angular attributes
|
|
5684
5684
|
"ng-*"
|
|
5685
5685
|
]);
|
|
5686
|
-
function
|
|
5686
|
+
function Uu({ name: e }) {
|
|
5687
5687
|
return `[${e}]`;
|
|
5688
5688
|
}
|
|
5689
5689
|
function Yu({ name: e, value: t }) {
|
|
@@ -5691,7 +5691,7 @@ function Yu({ name: e, value: t }) {
|
|
|
5691
5691
|
}
|
|
5692
5692
|
function Xu({ nodeName: e, nodeValue: t }, n) {
|
|
5693
5693
|
const s = n.tagName.toLowerCase();
|
|
5694
|
-
return ["input", "option"].includes(s) && e === "value" || e === "src" && t?.startsWith("data:") ? !1 : !
|
|
5694
|
+
return ["input", "option"].includes(s) && e === "value" || e === "src" && t?.startsWith("data:") ? !1 : !Ku(e);
|
|
5695
5695
|
}
|
|
5696
5696
|
function Gu({ nodeName: e, nodeValue: t }) {
|
|
5697
5697
|
return {
|
|
@@ -5702,7 +5702,7 @@ function Gu({ nodeName: e, nodeValue: t }) {
|
|
|
5702
5702
|
function _l(e, t) {
|
|
5703
5703
|
const n = Array.from(e.attributes).filter((s) => Xu(s, e)).map(Gu);
|
|
5704
5704
|
return [
|
|
5705
|
-
...n.map(
|
|
5705
|
+
...n.map(Uu),
|
|
5706
5706
|
...n.map(Yu)
|
|
5707
5707
|
];
|
|
5708
5708
|
}
|
|
@@ -5879,7 +5879,7 @@ function* _f(e, t) {
|
|
|
5879
5879
|
function yf(e, t) {
|
|
5880
5880
|
const { blacklist: n, whitelist: s, combineWithinSelector: o, maxCombinations: i } = t, l = qn(n), r = qn(s), a = (f, c) => {
|
|
5881
5881
|
const d = gf(e, c, t), p = mf(d, l, r), m = vf(p, r);
|
|
5882
|
-
return f[c] = o ? Array.from(Cl(m, { maxResults: i })) : m.map((
|
|
5882
|
+
return f[c] = o ? Array.from(Cl(m, { maxResults: i })) : m.map((T) => [T]), f;
|
|
5883
5883
|
};
|
|
5884
5884
|
return bf(t).reduce(a, {});
|
|
5885
5885
|
}
|
|
@@ -6049,8 +6049,8 @@ function zf(e) {
|
|
|
6049
6049
|
}
|
|
6050
6050
|
return t.trim();
|
|
6051
6051
|
}
|
|
6052
|
-
const Vf = /^(?:el-|:r[0-9]+:|radix-|uid-|ts-|uuid-|id-[a-f0-9]{4,}|.*[0-9]{4,}.*|.*-[a-f0-9]{6,}$)/i, qf = /^(?:hover|active|focus|focus-visible|focus-within|disabled|enabled|checked|selected|open|closed|loading|error|success|warning|hidden|visible|show|hide|current|expanded|collapsed|pressed|dragging|droppable|sortable|placeholder|transition|enter|leave|appear|move)$/i,
|
|
6053
|
-
function
|
|
6052
|
+
const Vf = /^(?:el-|:r[0-9]+:|radix-|uid-|ts-|uuid-|id-[a-f0-9]{4,}|.*[0-9]{4,}.*|.*-[a-f0-9]{6,}$)/i, qf = /^(?:hover|active|focus|focus-visible|focus-within|disabled|enabled|checked|selected|open|closed|loading|error|success|warning|hidden|visible|show|hide|current|expanded|collapsed|pressed|dragging|droppable|sortable|placeholder|transition|enter|leave|appear|move)$/i, Kf = /^(?:is-|has-|was-|are-|can-|should-|will-|did-|does-|on-|off-|in-|out-|at-|to-|from-)/i;
|
|
6053
|
+
function Uf(e) {
|
|
6054
6054
|
if (!e) return !1;
|
|
6055
6055
|
if (Vf.test(e))
|
|
6056
6056
|
return !0;
|
|
@@ -6066,7 +6066,7 @@ function Kf(e) {
|
|
|
6066
6066
|
return !1;
|
|
6067
6067
|
}
|
|
6068
6068
|
function Yf(e) {
|
|
6069
|
-
return e ? !!(qf.test(e) ||
|
|
6069
|
+
return e ? !!(qf.test(e) || Kf.test(e) || e.includes("-active") || e.includes("-hover") || e.includes("-focus") || /^(?:router-link|nuxt-link)/.test(e)) : !1;
|
|
6070
6070
|
}
|
|
6071
6071
|
function jo(e) {
|
|
6072
6072
|
return xl(e, {
|
|
@@ -6079,7 +6079,7 @@ function jo(e) {
|
|
|
6079
6079
|
(t) => {
|
|
6080
6080
|
const n = t.match(/^#(.+)$/);
|
|
6081
6081
|
if (n)
|
|
6082
|
-
return
|
|
6082
|
+
return Uf(n[1]);
|
|
6083
6083
|
const s = t.match(/^\.([a-zA-Z_-][\w-]*)$/);
|
|
6084
6084
|
return s ? Yf(s[1]) : !1;
|
|
6085
6085
|
}
|
|
@@ -6175,28 +6175,28 @@ function ed(e) {
|
|
|
6175
6175
|
height: "0px"
|
|
6176
6176
|
}), s = /* @__PURE__ */ L(!1), o = /* @__PURE__ */ L({ top: "0px", left: "0px" }), i = /* @__PURE__ */ L({ description: "", fileInfo: "" }), l = 500;
|
|
6177
6177
|
let r = null, a = "#3b82f6", f = "rgba(59, 130, 246, 0.1)";
|
|
6178
|
-
function c(
|
|
6179
|
-
|
|
6180
|
-
|
|
6178
|
+
function c(A) {
|
|
6179
|
+
A.forEach((D) => {
|
|
6180
|
+
D && (D.style.pointerEvents = "none");
|
|
6181
6181
|
});
|
|
6182
6182
|
}
|
|
6183
|
-
function d(
|
|
6184
|
-
|
|
6185
|
-
|
|
6183
|
+
function d(A) {
|
|
6184
|
+
A.forEach((D) => {
|
|
6185
|
+
D && (D.style.pointerEvents = "");
|
|
6186
6186
|
});
|
|
6187
6187
|
}
|
|
6188
|
-
function p(
|
|
6188
|
+
function p(A) {
|
|
6189
6189
|
if (!e.selectMode.value) return;
|
|
6190
|
-
const
|
|
6191
|
-
c(
|
|
6192
|
-
const
|
|
6193
|
-
if (d(
|
|
6194
|
-
const
|
|
6195
|
-
if (
|
|
6196
|
-
const Fe = getComputedStyle(
|
|
6190
|
+
const D = document.querySelector(".opencode-element-highlight"), x = document.querySelector(".opencode-element-tooltip"), F = document.querySelector(".opencode-select-mode-hint"), y = document.querySelector(".floating-bubble"), B = [D, x, F, y];
|
|
6191
|
+
c(B);
|
|
6192
|
+
const I = Wo(A), j = Ho(A, I);
|
|
6193
|
+
if (d(B), I) {
|
|
6194
|
+
const V = document.querySelector(".opencode-widget");
|
|
6195
|
+
if (V) {
|
|
6196
|
+
const Fe = getComputedStyle(V);
|
|
6197
6197
|
a = Fe.getPropertyValue("--oc-primary").trim() || a, f = Fe.getPropertyValue("--oc-primary-bg").trim() || f;
|
|
6198
6198
|
}
|
|
6199
|
-
const ce = jo(
|
|
6199
|
+
const ce = jo(I), fe = j.file ? j.file.split("/").pop() : "";
|
|
6200
6200
|
let _e = "";
|
|
6201
6201
|
j.line && (_e = `:${j.line}`, j.column && (_e += `:${j.column}`));
|
|
6202
6202
|
const Re = fe ? `${fe}${_e}` : "";
|
|
@@ -6204,7 +6204,7 @@ function ed(e) {
|
|
|
6204
6204
|
description: ce,
|
|
6205
6205
|
fileInfo: Re
|
|
6206
6206
|
};
|
|
6207
|
-
const
|
|
6207
|
+
const N = I.getBoundingClientRect(), J = `${N.top}px`, se = `${N.left}px`, G = `${N.width}px`, Oe = `${N.height}px`;
|
|
6208
6208
|
(n.value.top !== J || n.value.left !== se || n.value.width !== G || n.value.height !== Oe) && (n.value = {
|
|
6209
6209
|
top: J,
|
|
6210
6210
|
left: se,
|
|
@@ -6214,8 +6214,8 @@ function ed(e) {
|
|
|
6214
6214
|
background: f
|
|
6215
6215
|
});
|
|
6216
6216
|
const Ae = 50, Le = 200, ye = 10;
|
|
6217
|
-
let ge =
|
|
6218
|
-
ge < ye && (ge =
|
|
6217
|
+
let ge = N.top - Ae - 8, me = N.left;
|
|
6218
|
+
ge < ye && (ge = N.bottom + 8), ge + Ae > window.innerHeight - ye && (ge = Math.max(ye, N.top - Ae - 8)), me < ye && (me = ye), me + Le > window.innerWidth - ye && (me = window.innerWidth - Le - ye);
|
|
6219
6219
|
const st = `${ge}px`, dt = `${me}px`;
|
|
6220
6220
|
(o.value.top !== st || o.value.left !== dt) && (o.value = {
|
|
6221
6221
|
top: st,
|
|
@@ -6225,38 +6225,41 @@ function ed(e) {
|
|
|
6225
6225
|
t.value = !1, s.value = !1;
|
|
6226
6226
|
}
|
|
6227
6227
|
const m = p;
|
|
6228
|
-
function
|
|
6229
|
-
const
|
|
6230
|
-
if (!
|
|
6231
|
-
const
|
|
6232
|
-
|
|
6228
|
+
function T() {
|
|
6229
|
+
const A = window.__VUE_INSPECTOR__;
|
|
6230
|
+
if (!A || A.__opencode_hooked) return;
|
|
6231
|
+
const D = A.handleClick.bind(A);
|
|
6232
|
+
A.handleClick = function(x) {
|
|
6233
6233
|
if (e.selectMode.value) {
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6234
|
+
const F = x.target instanceof Element ? x.target : null;
|
|
6235
|
+
if (F && F.closest(".opencode-widget"))
|
|
6236
|
+
return D.call(A, x);
|
|
6237
|
+
x.preventDefault(), x.stopPropagation();
|
|
6238
|
+
const y = Wo(x), B = Ho(x, y);
|
|
6239
|
+
if (y) {
|
|
6240
|
+
const I = zf(y), j = jo(y), V = {
|
|
6241
|
+
filePath: B.file,
|
|
6242
|
+
line: B.line,
|
|
6243
|
+
column: B.column,
|
|
6244
|
+
innerText: tl(I, 200),
|
|
6245
|
+
description: j
|
|
6243
6246
|
};
|
|
6244
|
-
e.onAddSelectedNode(
|
|
6247
|
+
e.onAddSelectedNode(V);
|
|
6245
6248
|
}
|
|
6246
6249
|
return;
|
|
6247
6250
|
}
|
|
6248
|
-
return
|
|
6249
|
-
},
|
|
6251
|
+
return D.call(A, x);
|
|
6252
|
+
}, A.__opencode_hooked = !0;
|
|
6250
6253
|
}
|
|
6251
|
-
function _(
|
|
6252
|
-
|
|
6254
|
+
function _(A) {
|
|
6255
|
+
A.key === "Escape" && e.selectMode.value && (A.preventDefault(), A.stopPropagation(), e.onExitSelectMode());
|
|
6253
6256
|
}
|
|
6254
|
-
return ze(e.selectMode, (
|
|
6255
|
-
const
|
|
6256
|
-
|
|
6257
|
+
return ze(e.selectMode, (A) => {
|
|
6258
|
+
const D = window.__VUE_INSPECTOR__;
|
|
6259
|
+
A ? (D && D.enable(), document.addEventListener("mousemove", m), document.addEventListener("keydown", _, !0)) : (D && D.disable(), document.removeEventListener("mousemove", m), document.removeEventListener("keydown", _, !0), t.value = !1, s.value = !1);
|
|
6257
6260
|
}), Xe(() => {
|
|
6258
|
-
window.__VUE_INSPECTOR__ ?
|
|
6259
|
-
window.__VUE_INSPECTOR__ && (
|
|
6261
|
+
window.__VUE_INSPECTOR__ ? T() : r = window.setInterval(() => {
|
|
6262
|
+
window.__VUE_INSPECTOR__ && (T(), r && (window.clearInterval(r), r = null));
|
|
6260
6263
|
}, l);
|
|
6261
6264
|
}), nt(() => {
|
|
6262
6265
|
r && window.clearInterval(r), document.removeEventListener("mousemove", m), document.removeEventListener("keydown", _, !0);
|
|
@@ -6328,18 +6331,18 @@ function sd(e) {
|
|
|
6328
6331
|
}
|
|
6329
6332
|
const od = 1440;
|
|
6330
6333
|
function id(e) {
|
|
6331
|
-
const t = /* @__PURE__ */ L(typeof window < "u" ? window.innerWidth : 0), n =
|
|
6332
|
-
var c, d, p, m,
|
|
6333
|
-
const
|
|
6334
|
+
const t = /* @__PURE__ */ L(typeof window < "u" ? window.innerWidth : 0), n = K(() => {
|
|
6335
|
+
var c, d, p, m, T, _;
|
|
6336
|
+
const A = e.splitMode.value || {};
|
|
6334
6337
|
return {
|
|
6335
|
-
width: (c =
|
|
6336
|
-
minWidth: (d =
|
|
6337
|
-
maxWidth: (p =
|
|
6338
|
-
resizable: (m =
|
|
6339
|
-
shrinkPage: (
|
|
6340
|
-
defaultOpen: (_ =
|
|
6338
|
+
width: (c = A.width) != null ? c : 500,
|
|
6339
|
+
minWidth: (d = A.minWidth) != null ? d : 400,
|
|
6340
|
+
maxWidth: (p = A.maxWidth) != null ? p : 800,
|
|
6341
|
+
resizable: (m = A.resizable) != null ? m : !0,
|
|
6342
|
+
shrinkPage: (T = A.shrinkPage) != null ? T : !0,
|
|
6343
|
+
defaultOpen: (_ = A.defaultOpen) != null ? _ : !0
|
|
6341
6344
|
};
|
|
6342
|
-
}), s = /* @__PURE__ */ L(n.value.width), o =
|
|
6345
|
+
}), s = /* @__PURE__ */ L(n.value.width), o = K(() => e.displayMode.value === "bubble" ? "bubble" : e.displayMode.value === "split" || t.value >= od ? "split" : "bubble"), i = K(() => o.value === "split"), l = (c) => {
|
|
6343
6346
|
var d;
|
|
6344
6347
|
s.value = c, (d = e.onWidthChange) == null || d.call(e, c);
|
|
6345
6348
|
}, r = () => {
|
|
@@ -6410,51 +6413,47 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
|
|
|
6410
6413
|
},
|
|
6411
6414
|
emits: ["update:open", "update:selectMode", "update:sessionListCollapsed", "update:currentSessionId", "update:selectedElements", "update:theme", "update:thinking", "update:splitPanelWidth", "toggle", "close", "toggle-session-list", "toggle-select-mode", "toggle-theme", "create-session", "select-session", "delete-session", "click-selected-node", "remove-selected-node", "clear-selected-nodes", "empty-action", "frame-loaded", "thinking-change", "split-panel-width-change"],
|
|
6412
6415
|
setup(e, { expose: t, emit: n }) {
|
|
6413
|
-
Zi((
|
|
6416
|
+
Zi((O) => ({
|
|
6414
6417
|
"-chatAnimationOrigin.x": Ie.value.x,
|
|
6415
6418
|
"-chatAnimationOrigin.y": Ie.value.y
|
|
6416
6419
|
}));
|
|
6417
6420
|
const s = e, o = n, i = ki(), l = /* @__PURE__ */ L(""), r = /* @__PURE__ */ L(!1), a = /* @__PURE__ */ L("widget");
|
|
6418
6421
|
let f = null;
|
|
6419
|
-
const c = (
|
|
6422
|
+
const c = (O, Pe) => {
|
|
6420
6423
|
const { duration: Ge = 3e3, mode: ht = "widget" } = Pe || {};
|
|
6421
|
-
l.value =
|
|
6424
|
+
l.value = O, r.value = !0, a.value = ht, f && clearTimeout(f), f = setTimeout(() => {
|
|
6422
6425
|
r.value = !1;
|
|
6423
6426
|
}, Ge);
|
|
6424
6427
|
}, d = /* @__PURE__ */ L(!1), p = /* @__PURE__ */ L("");
|
|
6425
6428
|
let m = null;
|
|
6426
|
-
const
|
|
6429
|
+
const T = (O) => (p.value = O, d.value = !0, new Promise((Pe) => {
|
|
6427
6430
|
m = Pe;
|
|
6428
6431
|
})), _ = () => {
|
|
6429
6432
|
d.value = !1, m && m(!0);
|
|
6430
|
-
},
|
|
6433
|
+
}, A = () => {
|
|
6431
6434
|
d.value = !1, m && m(!1);
|
|
6432
|
-
},
|
|
6435
|
+
}, D = /* @__PURE__ */ L(null), x = /* @__PURE__ */ L(null), F = (O, Pe) => {
|
|
6433
6436
|
var Ge;
|
|
6434
|
-
(Ge =
|
|
6435
|
-
}, y = /* @__PURE__ */ L(s.sessionListCollapsed),
|
|
6436
|
-
|
|
6437
|
+
(Ge = D.value) == null || Ge.sendMessageToIframe(O, Pe);
|
|
6438
|
+
}, y = /* @__PURE__ */ L(s.sessionListCollapsed), B = /* @__PURE__ */ L(!1), I = /* @__PURE__ */ L(!0), j = /* @__PURE__ */ L(!0), V = /* @__PURE__ */ L(!1), ce = /* @__PURE__ */ L(s.splitPanelWidth), fe = () => {
|
|
6439
|
+
V.value && (F("prompt-dock-visibility-change", { visible: I.value }), F("minimize-state-change", { minimized: B.value }));
|
|
6437
6440
|
}, _e = () => {
|
|
6438
|
-
o("frame-loaded"),
|
|
6441
|
+
o("frame-loaded"), V.value = !0, fe();
|
|
6439
6442
|
};
|
|
6440
|
-
|
|
6441
|
-
showNotification: c,
|
|
6442
|
-
showConfirmDialog: C,
|
|
6443
|
-
sendMessageToIframe: B
|
|
6444
|
-
}), ze(
|
|
6443
|
+
ze(
|
|
6445
6444
|
() => s.sessionListCollapsed,
|
|
6446
|
-
(
|
|
6447
|
-
y.value =
|
|
6445
|
+
(O) => {
|
|
6446
|
+
y.value = O;
|
|
6448
6447
|
}
|
|
6449
6448
|
), ze(
|
|
6450
6449
|
() => s.splitPanelWidth,
|
|
6451
|
-
(
|
|
6452
|
-
ce.value =
|
|
6450
|
+
(O) => {
|
|
6451
|
+
ce.value = O;
|
|
6453
6452
|
}
|
|
6454
6453
|
);
|
|
6455
6454
|
const {
|
|
6456
6455
|
buttonActive: Re,
|
|
6457
|
-
containerClasses:
|
|
6456
|
+
containerClasses: N,
|
|
6458
6457
|
iframeSource: J,
|
|
6459
6458
|
sessionListTitle: se,
|
|
6460
6459
|
resolvedTheme: G,
|
|
@@ -6469,36 +6468,36 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
|
|
|
6469
6468
|
selectMode: /* @__PURE__ */ Z(s, "selectMode"),
|
|
6470
6469
|
iframeSrc: /* @__PURE__ */ Z(s, "iframeSrc"),
|
|
6471
6470
|
sessionListCollapsed: y,
|
|
6472
|
-
onToggle: (
|
|
6473
|
-
o("update:open",
|
|
6471
|
+
onToggle: (O) => {
|
|
6472
|
+
o("update:open", O), o("toggle", O);
|
|
6474
6473
|
},
|
|
6475
|
-
onToggleSelectMode: (
|
|
6476
|
-
o("update:selectMode",
|
|
6474
|
+
onToggleSelectMode: (O) => {
|
|
6475
|
+
o("update:selectMode", O), o("toggle-select-mode", O);
|
|
6477
6476
|
},
|
|
6478
6477
|
onClose: () => {
|
|
6479
6478
|
o("update:open", !1), o("close");
|
|
6480
6479
|
},
|
|
6481
|
-
onToggleSessionList: (
|
|
6482
|
-
y.value =
|
|
6480
|
+
onToggleSessionList: (O) => {
|
|
6481
|
+
y.value = O, o("update:sessionListCollapsed", O), o("toggle-session-list", O);
|
|
6483
6482
|
},
|
|
6484
6483
|
onEmptyAction: () => {
|
|
6485
6484
|
o("empty-action");
|
|
6486
6485
|
},
|
|
6487
|
-
onToggleTheme: (
|
|
6488
|
-
o("update:theme",
|
|
6486
|
+
onToggleTheme: (O) => {
|
|
6487
|
+
o("update:theme", O), o("toggle-theme", O);
|
|
6489
6488
|
}
|
|
6490
6489
|
}), { sessionItems: me, handleCreateSession: st, handleDeleteSession: dt, handleSelectSession: Fe } = Du({
|
|
6491
6490
|
sessions: /* @__PURE__ */ Z(s, "sessions"),
|
|
6492
6491
|
currentSessionId: /* @__PURE__ */ Z(s, "currentSessionId"),
|
|
6493
6492
|
onCreateSession: () => o("create-session"),
|
|
6494
|
-
onSelectSession: (
|
|
6495
|
-
o("update:currentSessionId",
|
|
6493
|
+
onSelectSession: (O) => {
|
|
6494
|
+
o("update:currentSessionId", O.id), o("select-session", O);
|
|
6496
6495
|
},
|
|
6497
|
-
onDeleteSession: (
|
|
6498
|
-
showConfirmDialog:
|
|
6496
|
+
onDeleteSession: (O) => o("delete-session", O),
|
|
6497
|
+
showConfirmDialog: T
|
|
6499
6498
|
}), {
|
|
6500
6499
|
bubbleVisible: qe,
|
|
6501
|
-
hasSelectedElements:
|
|
6500
|
+
hasSelectedElements: Ke,
|
|
6502
6501
|
selectedElementItems: Et,
|
|
6503
6502
|
handleClearSelectedNodes: kt,
|
|
6504
6503
|
handleClickSelectedNode: ot,
|
|
@@ -6507,110 +6506,110 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
|
|
|
6507
6506
|
} = Mu({
|
|
6508
6507
|
selectMode: /* @__PURE__ */ Z(s, "selectMode"),
|
|
6509
6508
|
selectedElements: /* @__PURE__ */ Z(s, "selectedElements"),
|
|
6510
|
-
onToggleSelectMode: (
|
|
6511
|
-
o("update:selectMode",
|
|
6509
|
+
onToggleSelectMode: (O) => {
|
|
6510
|
+
o("update:selectMode", O), o("toggle-select-mode", O);
|
|
6512
6511
|
},
|
|
6513
|
-
onRemoveSelectedNode: (
|
|
6514
|
-
o("remove-selected-node",
|
|
6512
|
+
onRemoveSelectedNode: (O) => {
|
|
6513
|
+
o("remove-selected-node", O);
|
|
6515
6514
|
const Pe = [...s.selectedElements];
|
|
6516
|
-
Pe.splice(
|
|
6515
|
+
Pe.splice(O.index, 1), o("update:selectedElements", Pe);
|
|
6517
6516
|
},
|
|
6518
6517
|
onClearSelectedNodes: () => {
|
|
6519
6518
|
o("clear-selected-nodes"), o("update:selectedElements", []);
|
|
6520
6519
|
},
|
|
6521
|
-
showConfirmDialog:
|
|
6522
|
-
}), { highlightVisible: h, highlightStyle: g, tooltipVisible:
|
|
6520
|
+
showConfirmDialog: T
|
|
6521
|
+
}), { highlightVisible: h, highlightStyle: g, tooltipVisible: E, tooltipStyle: b, tooltipContent: w } = ed({
|
|
6523
6522
|
selectMode: /* @__PURE__ */ Z(s, "selectMode"),
|
|
6524
|
-
onAddSelectedNode: (
|
|
6525
|
-
o("click-selected-node",
|
|
6523
|
+
onAddSelectedNode: (O) => {
|
|
6524
|
+
o("click-selected-node", O);
|
|
6526
6525
|
},
|
|
6527
6526
|
onExitSelectMode: () => {
|
|
6528
6527
|
o("update:selectMode", !1), o("toggle-select-mode", !1);
|
|
6529
6528
|
}
|
|
6530
|
-
}),
|
|
6531
|
-
effectiveMode:
|
|
6529
|
+
}), k = /* @__PURE__ */ L(void 0), {
|
|
6530
|
+
effectiveMode: P,
|
|
6532
6531
|
isSplitMode: M,
|
|
6533
|
-
panelWidth:
|
|
6534
|
-
splitConfig:
|
|
6535
|
-
handleResize:
|
|
6536
|
-
handleToggle:
|
|
6532
|
+
panelWidth: S,
|
|
6533
|
+
splitConfig: H,
|
|
6534
|
+
handleResize: R,
|
|
6535
|
+
handleToggle: W
|
|
6537
6536
|
} = id({
|
|
6538
6537
|
displayMode: /* @__PURE__ */ Z(s, "displayMode"),
|
|
6539
6538
|
splitMode: /* @__PURE__ */ Z(s, "splitMode"),
|
|
6540
6539
|
open: /* @__PURE__ */ Z(s, "open"),
|
|
6541
|
-
onOpenChange: (
|
|
6542
|
-
o("update:open",
|
|
6540
|
+
onOpenChange: (O) => {
|
|
6541
|
+
o("update:open", O), o("toggle", O);
|
|
6543
6542
|
},
|
|
6544
|
-
onWidthChange: (
|
|
6545
|
-
ce.value =
|
|
6543
|
+
onWidthChange: (O) => {
|
|
6544
|
+
ce.value = O, o("update:splitPanelWidth", O), o("split-panel-width-change", O);
|
|
6546
6545
|
}
|
|
6547
6546
|
});
|
|
6548
6547
|
sd({
|
|
6549
6548
|
open: /* @__PURE__ */ Z(s, "open"),
|
|
6550
|
-
minimized:
|
|
6551
|
-
promptDockVisible:
|
|
6552
|
-
bubbleOffset:
|
|
6549
|
+
minimized: B,
|
|
6550
|
+
promptDockVisible: I,
|
|
6551
|
+
bubbleOffset: k,
|
|
6553
6552
|
theme: /* @__PURE__ */ Z(s, "theme"),
|
|
6554
6553
|
sessionListCollapsed: y,
|
|
6555
6554
|
splitPanelWidth: ce,
|
|
6556
|
-
onRestore: (
|
|
6557
|
-
if (
|
|
6555
|
+
onRestore: (O) => {
|
|
6556
|
+
if (O.open !== void 0 && O.open !== s.open && (o("update:open", O.open), o("toggle", O.open)), O.minimized !== void 0 && (B.value = O.minimized), O.bubbleOffset !== void 0) {
|
|
6558
6557
|
const ht = window.innerWidth - 44 - 10, Rt = window.innerHeight - 44 - 10;
|
|
6559
|
-
|
|
6560
|
-
x: Math.max(10, Math.min(
|
|
6561
|
-
y: Math.max(10, Math.min(
|
|
6558
|
+
k.value = {
|
|
6559
|
+
x: Math.max(10, Math.min(O.bubbleOffset.x, ht)),
|
|
6560
|
+
y: Math.max(10, Math.min(O.bubbleOffset.y, Rt))
|
|
6562
6561
|
};
|
|
6563
6562
|
}
|
|
6564
|
-
|
|
6563
|
+
O.theme !== void 0 && O.theme !== s.theme && (o("update:theme", O.theme), o("toggle-theme", O.theme)), O.sessionListCollapsed !== void 0 && O.sessionListCollapsed !== s.sessionListCollapsed && (y.value = O.sessionListCollapsed, o("update:sessionListCollapsed", O.sessionListCollapsed)), O.promptDockVisible !== void 0 ? I.value = O.promptDockVisible : B.value && (I.value = !1), O.splitPanelWidth !== void 0 && O.splitPanelWidth !== s.splitPanelWidth && R(O.splitPanelWidth), Si(() => {
|
|
6565
6564
|
fe(), setTimeout(() => {
|
|
6566
6565
|
j.value = !1;
|
|
6567
6566
|
}, 50);
|
|
6568
6567
|
});
|
|
6569
6568
|
}
|
|
6570
6569
|
});
|
|
6571
|
-
const
|
|
6572
|
-
|
|
6573
|
-
},
|
|
6574
|
-
|
|
6575
|
-
},
|
|
6576
|
-
typeof window < "u" && (
|
|
6570
|
+
const C = () => {
|
|
6571
|
+
B.value = !B.value, I.value = !B.value, F("prompt-dock-visibility-change", { visible: I.value }), F("minimize-state-change", { minimized: B.value });
|
|
6572
|
+
}, $ = () => {
|
|
6573
|
+
I.value = !I.value, F("prompt-dock-visibility-change", { visible: I.value });
|
|
6574
|
+
}, Y = /* @__PURE__ */ L(typeof window < "u" ? window.innerWidth : 0), X = /* @__PURE__ */ L(typeof window < "u" ? window.innerHeight : 0), le = () => {
|
|
6575
|
+
typeof window < "u" && (Y.value = window.innerWidth, X.value = window.innerHeight);
|
|
6577
6576
|
};
|
|
6578
6577
|
Xe(() => {
|
|
6579
6578
|
typeof window < "u" && window.addEventListener("resize", le);
|
|
6580
6579
|
}), nt(() => {
|
|
6581
6580
|
typeof window < "u" && window.removeEventListener("resize", le);
|
|
6582
6581
|
});
|
|
6583
|
-
const de =
|
|
6584
|
-
var
|
|
6582
|
+
const de = K(() => {
|
|
6583
|
+
var O, Pe, Ge, ht;
|
|
6585
6584
|
if (typeof window > "u") return "bottom-right";
|
|
6586
|
-
const Rt =
|
|
6585
|
+
const Rt = Y.value / 2, xt = X.value / 2, pt = 44, Ye = (Pe = (O = x.value) == null ? void 0 : O.offset) != null ? Pe : k.value, It = ((Ge = Ye?.x) != null ? Ge : Y.value - pt - 24) + pt / 2, it = ((ht = Ye?.y) != null ? ht : X.value - pt - 24) + pt / 2;
|
|
6587
6586
|
return It >= Rt && it >= xt ? "bottom-right" : It < Rt && it >= xt ? "bottom-left" : It >= Rt && it < xt ? "top-right" : "top-left";
|
|
6588
|
-
}), Be =
|
|
6589
|
-
const
|
|
6590
|
-
return
|
|
6591
|
-
}),
|
|
6592
|
-
var
|
|
6587
|
+
}), Be = K(() => {
|
|
6588
|
+
const O = de.value;
|
|
6589
|
+
return O === "top-right" || O === "bottom-right";
|
|
6590
|
+
}), Ue = K(() => {
|
|
6591
|
+
var O, Pe, Ge;
|
|
6593
6592
|
if (typeof window > "u") return {};
|
|
6594
|
-
const ht =
|
|
6593
|
+
const ht = B.value ? 300 : 700, Rt = B.value ? 300 : Math.min(X.value * 0.86, X.value - 40), xt = 24, pt = 44, Ye = 20, It = (Ge = (Pe = (O = x.value) == null ? void 0 : O.offset) != null ? Pe : k.value) != null ? Ge : { x: Y.value - pt - xt, y: X.value - pt - xt }, it = {};
|
|
6595
6594
|
if (Be.value) {
|
|
6596
|
-
let Je =
|
|
6597
|
-
const sn = Ye, on =
|
|
6595
|
+
let Je = Y.value - It.x + xt;
|
|
6596
|
+
const sn = Ye, on = Y.value - ht - Ye;
|
|
6598
6597
|
Je > on && (Je = on), Je < sn && (Je = sn), it.right = `${Je}px`, it.left = "auto";
|
|
6599
6598
|
} else {
|
|
6600
6599
|
let Je = It.x + pt + xt;
|
|
6601
|
-
const sn = Ye, on =
|
|
6600
|
+
const sn = Ye, on = Y.value - ht - Ye;
|
|
6602
6601
|
Je > on && (Je = on), Je < sn && (Je = sn), it.left = `${Je}px`, it.right = "auto";
|
|
6603
6602
|
}
|
|
6604
|
-
let nn =
|
|
6605
|
-
const Zs =
|
|
6603
|
+
let nn = X.value - It.y - pt;
|
|
6604
|
+
const Zs = X.value - Rt - Ye;
|
|
6606
6605
|
return nn > Zs && (nn = Zs), nn < Ye && (nn = Ye), it.bottom = `${nn}px`, it;
|
|
6607
|
-
}), Tt = (
|
|
6608
|
-
|
|
6606
|
+
}), Tt = (O) => {
|
|
6607
|
+
k.value = O;
|
|
6609
6608
|
}, On = () => {
|
|
6610
6609
|
Ct.value = !0;
|
|
6611
6610
|
}, Me = () => {
|
|
6612
6611
|
Ct.value = !1;
|
|
6613
|
-
}, Ie =
|
|
6612
|
+
}, Ie = K(() => {
|
|
6614
6613
|
switch (de.value) {
|
|
6615
6614
|
case "top-left":
|
|
6616
6615
|
return { x: "-20px", y: "-20px" };
|
|
@@ -6649,25 +6648,25 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
|
|
|
6649
6648
|
showClearAll: /* @__PURE__ */ Z(s, "showClearAll"),
|
|
6650
6649
|
open: /* @__PURE__ */ Z(s, "open"),
|
|
6651
6650
|
thinking: /* @__PURE__ */ Z(s, "thinking"),
|
|
6652
|
-
minimized:
|
|
6653
|
-
promptDockVisible:
|
|
6654
|
-
bubbleOffset:
|
|
6655
|
-
mode:
|
|
6656
|
-
sessionStates:
|
|
6657
|
-
var
|
|
6658
|
-
return (
|
|
6651
|
+
minimized: B,
|
|
6652
|
+
promptDockVisible: I,
|
|
6653
|
+
bubbleOffset: k,
|
|
6654
|
+
mode: P,
|
|
6655
|
+
sessionStates: K(() => {
|
|
6656
|
+
var O;
|
|
6657
|
+
return (O = s.sessionStates) != null ? O : {};
|
|
6659
6658
|
}),
|
|
6660
6659
|
iframeSource: J,
|
|
6661
6660
|
buttonActive: Re,
|
|
6662
6661
|
sessionListTitle: se,
|
|
6663
6662
|
bubbleVisible: qe,
|
|
6664
|
-
hasSelectedElements:
|
|
6663
|
+
hasSelectedElements: Ke,
|
|
6665
6664
|
sessionItems: me,
|
|
6666
6665
|
selectedElementItems: Et,
|
|
6667
6666
|
handleToggle: Le,
|
|
6668
6667
|
handleClose: Oe,
|
|
6669
|
-
handleToggleMinimize:
|
|
6670
|
-
handleTogglePromptDock:
|
|
6668
|
+
handleToggleMinimize: C,
|
|
6669
|
+
handleTogglePromptDock: $,
|
|
6671
6670
|
handleToggleSessionList: ye,
|
|
6672
6671
|
handleToggleTheme: ge,
|
|
6673
6672
|
handleEmptyAction: Ae,
|
|
@@ -6676,23 +6675,28 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
|
|
|
6676
6675
|
handleDeleteSession: dt,
|
|
6677
6676
|
handleToggleSelectMode: u,
|
|
6678
6677
|
handleClickSelectedNode: ot,
|
|
6679
|
-
handleRemoveSelectedNode: (
|
|
6678
|
+
handleRemoveSelectedNode: (O) => tn(O.item, O.index, O.source),
|
|
6680
6679
|
handleClearSelectedNodes: kt,
|
|
6681
6680
|
handleFrameLoaded: _e,
|
|
6682
6681
|
handleBubbleOffsetChange: Tt
|
|
6682
|
+
}), t({
|
|
6683
|
+
showNotification: c,
|
|
6684
|
+
showConfirmDialog: T,
|
|
6685
|
+
sendMessageToIframe: F,
|
|
6686
|
+
isSplitMode: M
|
|
6683
6687
|
});
|
|
6684
6688
|
const Js = { props: s, emit: o, slots: i, notificationMessage: l, notificationVisible: r, notificationMode: a, get notificationTimer() {
|
|
6685
6689
|
return f;
|
|
6686
|
-
}, set notificationTimer(
|
|
6687
|
-
f =
|
|
6690
|
+
}, set notificationTimer(O) {
|
|
6691
|
+
f = O;
|
|
6688
6692
|
}, showNotification: c, dialogVisible: d, dialogMessage: p, get dialogResolve() {
|
|
6689
6693
|
return m;
|
|
6690
|
-
}, set dialogResolve(
|
|
6691
|
-
m =
|
|
6692
|
-
}, showConfirmDialog:
|
|
6694
|
+
}, set dialogResolve(O) {
|
|
6695
|
+
m = O;
|
|
6696
|
+
}, showConfirmDialog: T, handleDialogConfirm: _, handleDialogCancel: A, frameRef: D, triggerRef: x, sendMessageToIframe: F, localSessionListCollapsed: y, minimized: B, promptDockVisible: I, isRestoring: j, iframeLoaded: V, splitPanelWidth: ce, syncStateToIframe: fe, handleFrameLoaded: _e, buttonActive: Re, containerClasses: N, iframeSource: J, sessionListTitle: se, resolvedTheme: G, handleClose: Oe, handleEmptyAction: Ae, handleToggle: Le, handleToggleSessionList: ye, handleToggleTheme: ge, sessionItems: me, handleCreateSession: st, handleDeleteSession: dt, handleSelectSession: Fe, bubbleVisible: qe, hasSelectedElements: Ke, selectedElementItems: Et, handleClearSelectedNodes: kt, handleClickSelectedNode: ot, handleRemoveSelectedNode: tn, handleToggleSelectMode: u, highlightVisible: h, highlightStyle: g, tooltipVisible: E, tooltipStyle: b, tooltipContent: w, bubbleOffset: k, effectiveMode: P, isSplitMode: M, panelWidth: S, splitConfig: H, handleResize: R, handleSplitToggle: W, handleToggleMinimize: C, handleTogglePromptDock: $, windowWidth: Y, windowHeight: X, handleWindowResize: le, bubbleQuadrant: de, isBubbleOnRightSide: Be, chatPositionStyle: Ue, handleBubbleOffsetChange: Tt, handleResizeStart: On, handleResizeEnd: Me, chatAnimationOrigin: Ie, isDragging: Ct, get wasOpenBeforeDrag() {
|
|
6693
6697
|
return Dt;
|
|
6694
|
-
}, set wasOpenBeforeDrag(
|
|
6695
|
-
Dt =
|
|
6698
|
+
}, set wasOpenBeforeDrag(O) {
|
|
6699
|
+
Dt = O;
|
|
6696
6700
|
}, handleDragStart: kl, handleDragEnd: Dl, ChatPanel: cu, SelectHint: du, Trigger: Tu };
|
|
6697
6701
|
return Object.defineProperty(Js, "__isScriptSetup", { enumerable: !1, value: !0 }), Js;
|
|
6698
6702
|
}
|
|
@@ -6709,13 +6713,13 @@ const Al = /* @__PURE__ */ Ve(dd(fd({}, {
|
|
|
6709
6713
|
role: "alert"
|
|
6710
6714
|
};
|
|
6711
6715
|
function bd(e, t, n, s, o, i) {
|
|
6712
|
-
return
|
|
6716
|
+
return z(), q(
|
|
6713
6717
|
"div",
|
|
6714
6718
|
{
|
|
6715
6719
|
class: Te(s.containerClasses)
|
|
6716
6720
|
},
|
|
6717
6721
|
[
|
|
6718
|
-
s.isSplitMode ? be("v-if", !0) : (
|
|
6722
|
+
s.isSplitMode ? be("v-if", !0) : (z(), ft(
|
|
6719
6723
|
s.Trigger,
|
|
6720
6724
|
{
|
|
6721
6725
|
key: 0,
|
|
@@ -6865,7 +6869,7 @@ function bd(e, t, n, s, o, i) {
|
|
|
6865
6869
|
), [
|
|
6866
6870
|
[bo, s.tooltipVisible]
|
|
6867
6871
|
]),
|
|
6868
|
-
s.dialogVisible ? (
|
|
6872
|
+
s.dialogVisible ? (z(), q("div", gd, [
|
|
6869
6873
|
v("div", md, [
|
|
6870
6874
|
v("div", vd, [
|
|
6871
6875
|
v(
|
|
@@ -6888,8 +6892,8 @@ function bd(e, t, n, s, o, i) {
|
|
|
6888
6892
|
])
|
|
6889
6893
|
])
|
|
6890
6894
|
])) : be("v-if", !0),
|
|
6891
|
-
(
|
|
6892
|
-
s.notificationVisible && s.notificationMode === "page" ? (
|
|
6895
|
+
(z(), ft(Mi, { to: "body" }, [
|
|
6896
|
+
s.notificationVisible && s.notificationMode === "page" ? (z(), q(
|
|
6893
6897
|
"div",
|
|
6894
6898
|
yd,
|
|
6895
6899
|
Se(s.notificationMessage),
|
|
@@ -6908,7 +6912,7 @@ function Ed(e) {
|
|
|
6908
6912
|
if (!e) return { ctrl: !0, shift: !1, alt: !1, key: "k" };
|
|
6909
6913
|
const t = e.toLowerCase().split("+"), n = t.pop();
|
|
6910
6914
|
return {
|
|
6911
|
-
ctrl: t.includes("ctrl") || t.includes("
|
|
6915
|
+
ctrl: t.includes("ctrl") || t.includes("meta"),
|
|
6912
6916
|
shift: t.includes("shift"),
|
|
6913
6917
|
alt: t.includes("alt"),
|
|
6914
6918
|
key: n || "k"
|
|
@@ -6943,15 +6947,15 @@ function Ml(e) {
|
|
|
6943
6947
|
onError: a,
|
|
6944
6948
|
onMessage: f
|
|
6945
6949
|
} = e, c = /* @__PURE__ */ L(null), d = /* @__PURE__ */ L("idle"), p = /* @__PURE__ */ L(0);
|
|
6946
|
-
function m(
|
|
6950
|
+
function m(x) {
|
|
6947
6951
|
try {
|
|
6948
|
-
const
|
|
6949
|
-
f?.(
|
|
6952
|
+
const F = JSON.parse(x.data);
|
|
6953
|
+
f?.(F);
|
|
6950
6954
|
} catch {
|
|
6951
|
-
f?.(
|
|
6955
|
+
f?.(x.data);
|
|
6952
6956
|
}
|
|
6953
6957
|
}
|
|
6954
|
-
function
|
|
6958
|
+
function T() {
|
|
6955
6959
|
if (!(c.value || d.value === "connecting")) {
|
|
6956
6960
|
if (s?.value === !1) {
|
|
6957
6961
|
d.value = "idle";
|
|
@@ -6962,25 +6966,25 @@ function Ml(e) {
|
|
|
6962
6966
|
c.value = new EventSource(t), c.value.onopen = () => {
|
|
6963
6967
|
d.value = "connected", p.value = 0, l?.();
|
|
6964
6968
|
}, c.value.onmessage = m, c.value.onerror = () => {
|
|
6965
|
-
const
|
|
6969
|
+
const x = d.value === "connected";
|
|
6966
6970
|
d.value = "error", c.value?.close(), c.value = null;
|
|
6967
|
-
const
|
|
6968
|
-
if (a?.(
|
|
6971
|
+
const F = new Error(`SSE connection error: ${t}`);
|
|
6972
|
+
if (a?.(F), p.value < o) {
|
|
6969
6973
|
p.value++;
|
|
6970
6974
|
const y = i * p.value;
|
|
6971
6975
|
setTimeout(() => {
|
|
6972
|
-
s?.value !== !1 && !c.value &&
|
|
6976
|
+
s?.value !== !1 && !c.value && T();
|
|
6973
6977
|
}, y);
|
|
6974
|
-
} else
|
|
6978
|
+
} else x && r?.();
|
|
6975
6979
|
};
|
|
6976
|
-
} catch (
|
|
6980
|
+
} catch (x) {
|
|
6977
6981
|
d.value = "error";
|
|
6978
|
-
const
|
|
6979
|
-
if (a?.(
|
|
6982
|
+
const F = x instanceof Error ? x : new Error(String(x));
|
|
6983
|
+
if (a?.(F), p.value < o) {
|
|
6980
6984
|
p.value++;
|
|
6981
6985
|
const y = i * p.value;
|
|
6982
6986
|
setTimeout(() => {
|
|
6983
|
-
c.value ||
|
|
6987
|
+
c.value || T();
|
|
6984
6988
|
}, y);
|
|
6985
6989
|
}
|
|
6986
6990
|
}
|
|
@@ -6989,26 +6993,26 @@ function Ml(e) {
|
|
|
6989
6993
|
function _() {
|
|
6990
6994
|
c.value && (c.value.close(), c.value = null, d.value = "disconnected", p.value = 0, r?.());
|
|
6991
6995
|
}
|
|
6992
|
-
function
|
|
6993
|
-
_(),
|
|
6996
|
+
function A() {
|
|
6997
|
+
_(), T();
|
|
6994
6998
|
}
|
|
6995
|
-
function
|
|
6999
|
+
function D() {
|
|
6996
7000
|
p.value = 0;
|
|
6997
7001
|
}
|
|
6998
|
-
return n && s?.value !== !1 &&
|
|
7002
|
+
return n && s?.value !== !1 && T(), nt(() => {
|
|
6999
7003
|
_();
|
|
7000
7004
|
}), {
|
|
7001
7005
|
// 状态
|
|
7002
7006
|
connection: c,
|
|
7003
7007
|
status: d,
|
|
7004
7008
|
retryCount: p,
|
|
7005
|
-
isConnected:
|
|
7006
|
-
isConnecting:
|
|
7009
|
+
isConnected: K(() => d.value === "connected"),
|
|
7010
|
+
isConnecting: K(() => d.value === "connecting"),
|
|
7007
7011
|
// 方法
|
|
7008
|
-
connect:
|
|
7012
|
+
connect: T,
|
|
7009
7013
|
disconnect: _,
|
|
7010
|
-
reconnect:
|
|
7011
|
-
resetRetryCount:
|
|
7014
|
+
reconnect: A,
|
|
7015
|
+
resetRetryCount: D
|
|
7012
7016
|
};
|
|
7013
7017
|
}
|
|
7014
7018
|
function Od(e = {}) {
|
|
@@ -7069,18 +7073,18 @@ function Md(e) {
|
|
|
7069
7073
|
return y?.role === "assistant" && typeof y?.time?.completed != "number";
|
|
7070
7074
|
}
|
|
7071
7075
|
function a(y) {
|
|
7072
|
-
const
|
|
7076
|
+
const B = l.value[y], I = B?.hasPending || B?.statusType !== "idle";
|
|
7073
7077
|
l.value[y] = {
|
|
7074
|
-
thinking:
|
|
7075
|
-
statusType:
|
|
7076
|
-
hasPending:
|
|
7078
|
+
thinking: I,
|
|
7079
|
+
statusType: B?.statusType || "idle",
|
|
7080
|
+
hasPending: B?.hasPending || !1
|
|
7077
7081
|
};
|
|
7078
7082
|
}
|
|
7079
7083
|
function f(y) {
|
|
7080
|
-
const
|
|
7081
|
-
switch (
|
|
7084
|
+
const B = y.type, I = y.properties;
|
|
7085
|
+
switch (B) {
|
|
7082
7086
|
case "session.updated": {
|
|
7083
|
-
const j =
|
|
7087
|
+
const j = I.info;
|
|
7084
7088
|
if (!j?.id) return;
|
|
7085
7089
|
i?.({
|
|
7086
7090
|
id: j.id,
|
|
@@ -7091,40 +7095,40 @@ function Md(e) {
|
|
|
7091
7095
|
break;
|
|
7092
7096
|
}
|
|
7093
7097
|
case "session.status": {
|
|
7094
|
-
const j =
|
|
7098
|
+
const j = I.sessionID;
|
|
7095
7099
|
if (!j) return;
|
|
7096
|
-
const
|
|
7100
|
+
const V = I.status?.type || "idle";
|
|
7097
7101
|
l.value[j] = {
|
|
7098
|
-
thinking:
|
|
7099
|
-
statusType:
|
|
7102
|
+
thinking: V !== "idle",
|
|
7103
|
+
statusType: V,
|
|
7100
7104
|
hasPending: !1
|
|
7101
7105
|
}, a(j);
|
|
7102
7106
|
break;
|
|
7103
7107
|
}
|
|
7104
7108
|
case "message.updated": {
|
|
7105
|
-
const j =
|
|
7109
|
+
const j = I.info;
|
|
7106
7110
|
if (!j?.sessionID) return;
|
|
7107
|
-
const
|
|
7111
|
+
const V = j.sessionID;
|
|
7108
7112
|
if (j.role === "assistant") {
|
|
7109
|
-
const ce = r(j), fe = l.value[
|
|
7113
|
+
const ce = r(j), fe = l.value[V] || {
|
|
7110
7114
|
thinking: !1,
|
|
7111
7115
|
statusType: "idle",
|
|
7112
7116
|
hasPending: !1
|
|
7113
7117
|
};
|
|
7114
|
-
l.value[
|
|
7118
|
+
l.value[V] = {
|
|
7115
7119
|
...fe,
|
|
7116
7120
|
hasPending: ce
|
|
7117
|
-
}, a(
|
|
7121
|
+
}, a(V);
|
|
7118
7122
|
}
|
|
7119
7123
|
break;
|
|
7120
7124
|
}
|
|
7121
7125
|
case "message.part.delta": {
|
|
7122
|
-
const j =
|
|
7126
|
+
const j = I.sessionID;
|
|
7123
7127
|
if (!j) return;
|
|
7124
|
-
const
|
|
7125
|
-
|
|
7128
|
+
const V = l.value[j];
|
|
7129
|
+
V?.hasPending || (l.value[j] = {
|
|
7126
7130
|
thinking: !0,
|
|
7127
|
-
statusType:
|
|
7131
|
+
statusType: V?.statusType || "idle",
|
|
7128
7132
|
hasPending: !0
|
|
7129
7133
|
});
|
|
7130
7134
|
break;
|
|
@@ -7136,28 +7140,28 @@ function Md(e) {
|
|
|
7136
7140
|
enabled: s,
|
|
7137
7141
|
onEvent: f,
|
|
7138
7142
|
onConnected: o
|
|
7139
|
-
}), d =
|
|
7143
|
+
}), d = K(() => {
|
|
7140
7144
|
const y = n.value;
|
|
7141
7145
|
return y ? l.value[y]?.thinking ?? !1 : !1;
|
|
7142
|
-
}), p =
|
|
7146
|
+
}), p = K(() => {
|
|
7143
7147
|
const y = n.value;
|
|
7144
7148
|
return y && l.value[y] || null;
|
|
7145
|
-
}), m =
|
|
7149
|
+
}), m = K(() => Object.values(l.value).some((y) => y.thinking)), T = K(() => Object.values(l.value).filter((y) => y.thinking).length);
|
|
7146
7150
|
function _(y) {
|
|
7147
7151
|
delete l.value[y];
|
|
7148
7152
|
}
|
|
7149
|
-
function
|
|
7153
|
+
function A() {
|
|
7150
7154
|
l.value = {};
|
|
7151
7155
|
}
|
|
7152
|
-
function
|
|
7156
|
+
function D(y) {
|
|
7153
7157
|
return l.value[y];
|
|
7154
7158
|
}
|
|
7155
|
-
function
|
|
7159
|
+
function x(y) {
|
|
7156
7160
|
return l.value[y]?.thinking ?? !1;
|
|
7157
7161
|
}
|
|
7158
|
-
function
|
|
7162
|
+
function F(y) {
|
|
7159
7163
|
return y.reduce(
|
|
7160
|
-
(
|
|
7164
|
+
(B, I) => (B[I] = x(I), B),
|
|
7161
7165
|
{}
|
|
7162
7166
|
);
|
|
7163
7167
|
}
|
|
@@ -7170,25 +7174,25 @@ function Md(e) {
|
|
|
7170
7174
|
currentThinking: d,
|
|
7171
7175
|
currentSessionState: p,
|
|
7172
7176
|
hasAnyThinking: m,
|
|
7173
|
-
thinkingSessionCount:
|
|
7177
|
+
thinkingSessionCount: T,
|
|
7174
7178
|
// 方法
|
|
7175
7179
|
connect: c.connect,
|
|
7176
7180
|
disconnect: c.disconnect,
|
|
7177
7181
|
clearSessionState: _,
|
|
7178
|
-
clearAllSessionStates:
|
|
7179
|
-
getSessionState:
|
|
7180
|
-
isSessionThinking:
|
|
7181
|
-
getSessionsThinking:
|
|
7182
|
+
clearAllSessionStates: A,
|
|
7183
|
+
getSessionState: D,
|
|
7184
|
+
isSessionThinking: x,
|
|
7185
|
+
getSessionsThinking: F
|
|
7182
7186
|
};
|
|
7183
7187
|
}
|
|
7184
7188
|
function Pd(e) {
|
|
7185
|
-
const { showNotification: t } = e, n = /* @__PURE__ */ L([]), s = /* @__PURE__ */ L(void 0), o = /* @__PURE__ */ L(null), i = /* @__PURE__ */ L(!1), l =
|
|
7189
|
+
const { showNotification: t } = e, n = /* @__PURE__ */ L([]), s = /* @__PURE__ */ L(void 0), o = /* @__PURE__ */ L(null), i = /* @__PURE__ */ L(!1), l = K(() => o.value && n.value.find((p) => p.id === o.value)?.url || ""), r = async () => {
|
|
7186
7190
|
s.value = !0;
|
|
7187
7191
|
try {
|
|
7188
7192
|
const m = await (await fetch(hs)).json();
|
|
7189
|
-
n.value = m.filter((
|
|
7190
|
-
...
|
|
7191
|
-
updatedAt:
|
|
7193
|
+
n.value = m.filter((T) => T.title !== "__chrome_mcp_warmup__").map((T) => ({
|
|
7194
|
+
...T,
|
|
7195
|
+
updatedAt: T.time?.updated || Date.now()
|
|
7192
7196
|
})), n.value.length || f(), o.value = n.value[0]?.id || null;
|
|
7193
7197
|
} catch (p) {
|
|
7194
7198
|
console.error("[OpenCode] Failed to load sessions:", p);
|
|
@@ -7198,9 +7202,9 @@ function Pd(e) {
|
|
|
7198
7202
|
}, a = (p) => {
|
|
7199
7203
|
const m = n.value.findIndex((_) => _.id === p.id);
|
|
7200
7204
|
if (m === -1) return;
|
|
7201
|
-
const
|
|
7202
|
-
p.title && p.title !==
|
|
7203
|
-
...
|
|
7205
|
+
const T = n.value[m];
|
|
7206
|
+
p.title && p.title !== T.title && (n.value[m] = {
|
|
7207
|
+
...T,
|
|
7204
7208
|
title: p.title,
|
|
7205
7209
|
updatedAt: p.time?.updated || Date.now()
|
|
7206
7210
|
});
|
|
@@ -7244,7 +7248,7 @@ function Pd(e) {
|
|
|
7244
7248
|
};
|
|
7245
7249
|
}
|
|
7246
7250
|
function kd(e, t) {
|
|
7247
|
-
const n = /* @__PURE__ */ L(e), s =
|
|
7251
|
+
const n = /* @__PURE__ */ L(e), s = K(() => n.value === "auto" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : n.value), o = () => {
|
|
7248
7252
|
t.value?.sendMessageToIframe("OPENCODE_SET_THEME", {
|
|
7249
7253
|
theme: s.value
|
|
7250
7254
|
});
|
|
@@ -7292,7 +7296,7 @@ function Dd() {
|
|
|
7292
7296
|
};
|
|
7293
7297
|
}
|
|
7294
7298
|
function Rd() {
|
|
7295
|
-
const e = /* @__PURE__ */ L(""), t = /* @__PURE__ */ L("idle"), n = /* @__PURE__ */ L(!1), s = /* @__PURE__ */ L(void 0), o = /* @__PURE__ */ L(void 0), i =
|
|
7299
|
+
const e = /* @__PURE__ */ L(""), t = /* @__PURE__ */ L("idle"), n = /* @__PURE__ */ L(!1), s = /* @__PURE__ */ L(void 0), o = /* @__PURE__ */ L(void 0), i = K(() => e.value && Ua[e.value] || "加载中...");
|
|
7296
7300
|
return {
|
|
7297
7301
|
currentTask: e,
|
|
7298
7302
|
serviceStatus: t,
|
|
@@ -7348,12 +7352,12 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
|
|
|
7348
7352
|
loadingText: {}
|
|
7349
7353
|
},
|
|
7350
7354
|
setup(e) {
|
|
7351
|
-
return (t, n) => (
|
|
7355
|
+
return (t, n) => (z(), q("div", Nd, [
|
|
7352
7356
|
n[0] || (n[0] = v("div", { class: "opencode-loading-spinner" }, null, -1)),
|
|
7353
7357
|
v("div", Ld, Se(e.loadingText), 1)
|
|
7354
7358
|
]));
|
|
7355
7359
|
}
|
|
7356
|
-
}), Bd = { class: "opencode-chrome-warmup-failed" }, $d = { class: "opencode-chrome-warmup-failed-text" }, jd = { class: "opencode-chrome-warmup-error-details" }, Wd = { class: "opencode-chrome-warmup-failed-text" }, Hd = { key: 0 }, zd = { key: 1 }, Vd = { class: "opencode-chrome-warmup-failed-actions" }, qd = ["disabled"],
|
|
7360
|
+
}), Bd = { class: "opencode-chrome-warmup-failed" }, $d = { class: "opencode-chrome-warmup-failed-text" }, jd = { class: "opencode-chrome-warmup-error-details" }, Wd = { class: "opencode-chrome-warmup-failed-text" }, Hd = { key: 0 }, zd = { key: 1 }, Vd = { class: "opencode-chrome-warmup-failed-actions" }, qd = ["disabled"], Kd = /* @__PURE__ */ Ve({
|
|
7357
7361
|
__name: "ChromeWarmupError",
|
|
7358
7362
|
props: {
|
|
7359
7363
|
retrying: { type: Boolean },
|
|
@@ -7363,7 +7367,7 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
|
|
|
7363
7367
|
emits: ["retry"],
|
|
7364
7368
|
setup(e, { emit: t }) {
|
|
7365
7369
|
const n = t;
|
|
7366
|
-
return (s, o) => (
|
|
7370
|
+
return (s, o) => (z(), q("div", Bd, [
|
|
7367
7371
|
o[9] || (o[9] = v("div", { class: "opencode-chrome-warmup-failed-icon" }, [
|
|
7368
7372
|
v("svg", {
|
|
7369
7373
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7381,7 +7385,7 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
|
|
|
7381
7385
|
})
|
|
7382
7386
|
])
|
|
7383
7387
|
], -1)),
|
|
7384
|
-
e.errorType === re(In).CHROME_NOT_CONNECTED ? (
|
|
7388
|
+
e.errorType === re(In).CHROME_NOT_CONNECTED ? (z(), q(ue, { key: 0 }, [
|
|
7385
7389
|
o[1] || (o[1] = v("div", { class: "opencode-chrome-warmup-failed-title" }, "Chrome DevTools MCP 连接失败", -1)),
|
|
7386
7390
|
o[2] || (o[2] = v("div", { class: "opencode-chrome-warmup-failed-text" }, [
|
|
7387
7391
|
v("p", null, "请按以下步骤开启 Chrome 远程调试:"),
|
|
@@ -7395,7 +7399,7 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
|
|
|
7395
7399
|
v("li", null, "完成后点击下方按钮重试")
|
|
7396
7400
|
])
|
|
7397
7401
|
], -1))
|
|
7398
|
-
], 64)) : e.errorType === re(In).AI_TIMEOUT ? (
|
|
7402
|
+
], 64)) : e.errorType === re(In).AI_TIMEOUT ? (z(), q(ue, { key: 1 }, [
|
|
7399
7403
|
o[3] || (o[3] = v("div", { class: "opencode-chrome-warmup-failed-title" }, "AI 响应超时", -1)),
|
|
7400
7404
|
o[4] || (o[4] = v("div", { class: "opencode-chrome-warmup-failed-text" }, [
|
|
7401
7405
|
v("p", null, "AI 模型响应超时,可能的原因:"),
|
|
@@ -7406,17 +7410,17 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
|
|
|
7406
7410
|
]),
|
|
7407
7411
|
v("p", { style: { "margin-top": "12px", "font-weight": "500" } }, "请检查 OpenCode 配置文件中的 AI 模型设置")
|
|
7408
7412
|
], -1))
|
|
7409
|
-
], 64)) : e.errorType === re(In).AI_RESPONSE_ERROR ? (
|
|
7413
|
+
], 64)) : e.errorType === re(In).AI_RESPONSE_ERROR ? (z(), q(ue, { key: 2 }, [
|
|
7410
7414
|
o[7] || (o[7] = v("div", { class: "opencode-chrome-warmup-failed-title" }, "AI 响应错误", -1)),
|
|
7411
7415
|
v("div", $d, [
|
|
7412
7416
|
o[5] || (o[5] = v("p", null, "AI 模型返回了意外的响应:", -1)),
|
|
7413
7417
|
v("div", jd, Se(e.errorMessage || "未知错误"), 1),
|
|
7414
7418
|
o[6] || (o[6] = v("p", { style: { "margin-top": "12px" } }, "请检查 OpenCode AI 模型配置是否正确", -1))
|
|
7415
7419
|
])
|
|
7416
|
-
], 64)) : (
|
|
7420
|
+
], 64)) : (z(), q(ue, { key: 3 }, [
|
|
7417
7421
|
o[8] || (o[8] = v("div", { class: "opencode-chrome-warmup-failed-title" }, "Chrome DevTools MCP 连接失败", -1)),
|
|
7418
7422
|
v("div", Wd, [
|
|
7419
|
-
e.errorMessage ? (
|
|
7423
|
+
e.errorMessage ? (z(), q("p", Hd, Se(e.errorMessage), 1)) : (z(), q("p", zd, "连接失败,请重试"))
|
|
7420
7424
|
])
|
|
7421
7425
|
], 64)),
|
|
7422
7426
|
v("div", Vd, [
|
|
@@ -7428,12 +7432,12 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
|
|
|
7428
7432
|
])
|
|
7429
7433
|
]));
|
|
7430
7434
|
}
|
|
7431
|
-
}),
|
|
7435
|
+
}), Ud = (e, t) => {
|
|
7432
7436
|
const n = e.__vccOpts || e;
|
|
7433
7437
|
for (const [s, o] of t)
|
|
7434
7438
|
n[s] = o;
|
|
7435
7439
|
return n;
|
|
7436
|
-
}, Yd = /* @__PURE__ */ Kd
|
|
7440
|
+
}, Yd = /* @__PURE__ */ Ud(Kd, [["__scopeId", "data-v-762c7194"]]), Xd = /* @__PURE__ */ Ve({
|
|
7437
7441
|
__name: "App",
|
|
7438
7442
|
props: {
|
|
7439
7443
|
config: {}
|
|
@@ -7446,18 +7450,18 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
|
|
|
7446
7450
|
proxyPort: d = 4098,
|
|
7447
7451
|
proxyHost: p = "localhost",
|
|
7448
7452
|
displayMode: m = "bubble",
|
|
7449
|
-
splitMode:
|
|
7450
|
-
} = t.config, _ = a,
|
|
7451
|
-
l.value?.showNotification?.(
|
|
7453
|
+
splitMode: T
|
|
7454
|
+
} = t.config, _ = a, A = /* @__PURE__ */ L(T?.width ?? 500), D = K(() => `http://${p}:${d}`), x = (C, $) => {
|
|
7455
|
+
l.value?.showNotification?.(C, $);
|
|
7452
7456
|
}, {
|
|
7453
|
-
serviceStatus:
|
|
7457
|
+
serviceStatus: F,
|
|
7454
7458
|
chromeMcpFailed: y,
|
|
7455
|
-
chromeMcpErrorType:
|
|
7456
|
-
chromeMcpErrorMessage:
|
|
7459
|
+
chromeMcpErrorType: B,
|
|
7460
|
+
chromeMcpErrorMessage: I,
|
|
7457
7461
|
loadingText: j,
|
|
7458
|
-
updateStatusFromTask:
|
|
7462
|
+
updateStatusFromTask: V,
|
|
7459
7463
|
setStarting: ce
|
|
7460
|
-
} = Rd(), { selectedElements: fe, removeElement: _e, clearElements: Re } = Dd(), { theme:
|
|
7464
|
+
} = Rd(), { selectedElements: fe, removeElement: _e, clearElements: Re } = Dd(), { theme: N, sendThemeToIframe: J } = kd(_, l), {
|
|
7461
7465
|
sessions: se,
|
|
7462
7466
|
loadingSessionList: G,
|
|
7463
7467
|
currentSessionId: Oe,
|
|
@@ -7468,36 +7472,36 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
|
|
|
7468
7472
|
deleteSession: me,
|
|
7469
7473
|
selectSession: st,
|
|
7470
7474
|
updateSessionInfo: dt
|
|
7471
|
-
} = Pd({ showNotification:
|
|
7472
|
-
onStatusSync: (
|
|
7473
|
-
|
|
7475
|
+
} = Pd({ showNotification: x }), { updateContext: Fe } = Id(F, fe), qe = Od({
|
|
7476
|
+
onStatusSync: (C) => {
|
|
7477
|
+
C.isStarted !== void 0 && C.isStarted && F.value === "idle" && ce(), C.task && V(C.task, C.errorType, C.errorMessage);
|
|
7474
7478
|
},
|
|
7475
|
-
onTaskUpdate: (
|
|
7476
|
-
|
|
7479
|
+
onTaskUpdate: (C) => {
|
|
7480
|
+
V(C.task, C.errorType, C.errorMessage);
|
|
7477
7481
|
},
|
|
7478
7482
|
onClearElements: () => Re(),
|
|
7479
7483
|
onConnected: () => Fe(!0)
|
|
7480
|
-
}),
|
|
7481
|
-
proxyBaseUrl:
|
|
7484
|
+
}), Ke = Md({
|
|
7485
|
+
proxyBaseUrl: D.value,
|
|
7482
7486
|
currentSessionId: Oe,
|
|
7483
7487
|
onConnected: () => {
|
|
7484
7488
|
console.log("[OpenCode] Session SSE connected");
|
|
7485
7489
|
},
|
|
7486
|
-
onSessionUpdate: (
|
|
7487
|
-
dt(
|
|
7490
|
+
onSessionUpdate: (C) => {
|
|
7491
|
+
dt(C);
|
|
7488
7492
|
}
|
|
7489
|
-
}), Et =
|
|
7493
|
+
}), Et = Ke.hasAnyThinking, kt = Ke.sessionStates, ot = K(() => F.value === "starting"), tn = K(() => F.value === "starting" || Le.value), u = K(() => F.value === "starting" ? j.value : "加载会话..."), h = async () => {
|
|
7490
7494
|
r.value = !0;
|
|
7491
7495
|
try {
|
|
7492
|
-
const
|
|
7493
|
-
|
|
7494
|
-
} catch (
|
|
7495
|
-
console.error("[OpenCode] Retry warmup failed:",
|
|
7496
|
+
const $ = await (await fetch("/__opencode_warmup__", { method: "POST" })).json();
|
|
7497
|
+
$.success ? (y.value = !1, B.value = void 0, I.value = void 0, F.value = "ready", x("Chrome DevTools MCP 连接成功")) : (B.value = $.errorType, I.value = $.error, $.errorType === "AI_TIMEOUT" ? x("AI 响应超时,请检查 OpenCode AI 模型配置") : $.errorType === "AI_RESPONSE_ERROR" ? x("AI 响应错误,请检查 OpenCode AI 模型配置") : $.errorType === "CHROME_NOT_CONNECTED" ? x("Chrome 远程调试未开启,请按照提示操作") : x($.error || "重试失败,请确认 Chrome 远程调试已开启"));
|
|
7498
|
+
} catch (C) {
|
|
7499
|
+
console.error("[OpenCode] Retry warmup failed:", C), x("重试失败,请稍后再试");
|
|
7496
7500
|
} finally {
|
|
7497
7501
|
r.value = !1;
|
|
7498
7502
|
}
|
|
7499
7503
|
}, g = async () => {
|
|
7500
|
-
if (
|
|
7504
|
+
if (F.value !== "idle") return !0;
|
|
7501
7505
|
try {
|
|
7502
7506
|
if ((await (await fetch("/__opencode_start__")).json()).success)
|
|
7503
7507
|
return ce(), qe.connect(), !0;
|
|
@@ -7505,59 +7509,65 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
|
|
|
7505
7509
|
}
|
|
7506
7510
|
return !1;
|
|
7507
7511
|
};
|
|
7508
|
-
qo(c, (
|
|
7509
|
-
|
|
7510
|
-
})
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7512
|
+
qo(c, (C) => {
|
|
7513
|
+
C.preventDefault(), b(!n.value);
|
|
7514
|
+
});
|
|
7515
|
+
const E = () => {
|
|
7516
|
+
window.__VUE_INSPECTOR__ ? P(!s.value) : x("Vue Inspector 未加载,无法使用元素选择功能");
|
|
7517
|
+
};
|
|
7518
|
+
qo("ctrl+p", (C) => {
|
|
7519
|
+
C.preventDefault(), E();
|
|
7520
|
+
}), ze(F, (C, $) => {
|
|
7521
|
+
C !== "idle" && $ === "idle" && (qe.connect(), Ke.connect()), C === "ready" && $ !== "ready" && ye();
|
|
7514
7522
|
}), Xe(() => {
|
|
7515
|
-
|
|
7523
|
+
F.value === "ready" && (ye(), qe.connect(), Ke.connect(), Fe(!0)), f && F.value === "ready" && setTimeout(() => {
|
|
7516
7524
|
n.value = !0;
|
|
7517
7525
|
}, 1e3);
|
|
7518
|
-
const
|
|
7519
|
-
|
|
7526
|
+
const C = ($) => {
|
|
7527
|
+
$.data?.type === "OPENCODE_READY" && J(), $.data?.type === "OPENCODE_KEYDOWN" && ($.data.key === "Escape" && s.value && P(!1), $.data.ctrlKey && $.data.key.toLowerCase() === "p" && E());
|
|
7520
7528
|
};
|
|
7521
|
-
window.addEventListener("message",
|
|
7529
|
+
window.addEventListener("message", C);
|
|
7522
7530
|
});
|
|
7523
|
-
const
|
|
7524
|
-
if (
|
|
7531
|
+
const b = async (C) => {
|
|
7532
|
+
if (F.value === "idle" && C) {
|
|
7525
7533
|
i.value = !0;
|
|
7526
|
-
const
|
|
7527
|
-
if (i.value = !1,
|
|
7528
|
-
|
|
7534
|
+
const $ = await g();
|
|
7535
|
+
if (i.value = !1, !$) {
|
|
7536
|
+
x("服务启动失败");
|
|
7529
7537
|
return;
|
|
7530
7538
|
}
|
|
7531
7539
|
}
|
|
7532
|
-
n.value =
|
|
7533
|
-
},
|
|
7534
|
-
const
|
|
7535
|
-
...
|
|
7540
|
+
n.value = C, C && Fe(), C && (Le.value = !1);
|
|
7541
|
+
}, w = (C) => {
|
|
7542
|
+
const $ = {
|
|
7543
|
+
...C,
|
|
7536
7544
|
previewPageUrl: window.location.href,
|
|
7537
7545
|
previewPageTitle: document.title
|
|
7538
7546
|
};
|
|
7539
7547
|
l.value?.sendMessageToIframe("OPENCODE_INSERT_FILE_PART", {
|
|
7540
|
-
element:
|
|
7541
|
-
}),
|
|
7542
|
-
},
|
|
7543
|
-
Re(), Fe(!0),
|
|
7544
|
-
}, P = (
|
|
7545
|
-
s.value =
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
}, M = (
|
|
7549
|
-
|
|
7550
|
-
},
|
|
7551
|
-
|
|
7552
|
-
},
|
|
7553
|
-
|
|
7554
|
-
},
|
|
7548
|
+
element: $
|
|
7549
|
+
}), x("节点已添加到对话框", { mode: "page" });
|
|
7550
|
+
}, k = () => {
|
|
7551
|
+
Re(), Fe(!0), x("已清除所有选中元素");
|
|
7552
|
+
}, P = (C) => {
|
|
7553
|
+
s.value = C;
|
|
7554
|
+
const $ = l.value?.isSplitMode;
|
|
7555
|
+
C && !$ && n.value && (n.value = !1), !C && !n.value && (n.value = !0);
|
|
7556
|
+
}, M = (C) => {
|
|
7557
|
+
o.value = C;
|
|
7558
|
+
}, S = (C) => {
|
|
7559
|
+
N.value = C;
|
|
7560
|
+
}, H = (C) => {
|
|
7561
|
+
A.value = C;
|
|
7562
|
+
}, R = ({ index: C }) => {
|
|
7563
|
+
_e(C), Fe(!0);
|
|
7564
|
+
}, W = () => {
|
|
7555
7565
|
Le.value = !1;
|
|
7556
7566
|
};
|
|
7557
|
-
return (
|
|
7567
|
+
return (C, $) => (z(), ft(re(wd), {
|
|
7558
7568
|
ref_key: "widgetRef",
|
|
7559
7569
|
ref: l,
|
|
7560
|
-
theme: re(
|
|
7570
|
+
theme: re(N),
|
|
7561
7571
|
open: n.value,
|
|
7562
7572
|
"select-mode": s.value,
|
|
7563
7573
|
"session-list-collapsed": o.value,
|
|
@@ -7573,32 +7583,32 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
|
|
|
7573
7583
|
"hotkey-label": re(c),
|
|
7574
7584
|
thinking: re(Et),
|
|
7575
7585
|
"display-mode": re(m),
|
|
7576
|
-
"split-mode": re(
|
|
7577
|
-
"split-panel-width":
|
|
7578
|
-
"onUpdate:open":
|
|
7586
|
+
"split-mode": re(T),
|
|
7587
|
+
"split-panel-width": A.value,
|
|
7588
|
+
"onUpdate:open": b,
|
|
7579
7589
|
"onUpdate:selectMode": P,
|
|
7580
|
-
"onUpdate:sessionListCollapsed":
|
|
7581
|
-
"onUpdate:theme":
|
|
7582
|
-
"onUpdate:splitPanelWidth":
|
|
7583
|
-
onToggleTheme:
|
|
7590
|
+
"onUpdate:sessionListCollapsed": M,
|
|
7591
|
+
"onUpdate:theme": S,
|
|
7592
|
+
"onUpdate:splitPanelWidth": H,
|
|
7593
|
+
onToggleTheme: S,
|
|
7584
7594
|
onCreateSession: re(ge),
|
|
7585
7595
|
onDeleteSession: re(me),
|
|
7586
7596
|
onSelectSession: re(st),
|
|
7587
|
-
onClickSelectedNode:
|
|
7588
|
-
onClearSelectedNodes:
|
|
7589
|
-
onRemoveSelectedNode:
|
|
7597
|
+
onClickSelectedNode: w,
|
|
7598
|
+
onClearSelectedNodes: k,
|
|
7599
|
+
onRemoveSelectedNode: R,
|
|
7590
7600
|
onEmptyAction: re(ge),
|
|
7591
|
-
onFrameLoaded:
|
|
7601
|
+
onFrameLoaded: W
|
|
7592
7602
|
}, {
|
|
7593
7603
|
loading: he(() => [
|
|
7594
7604
|
we(Fd, { "loading-text": u.value }, null, 8, ["loading-text"])
|
|
7595
7605
|
]),
|
|
7596
7606
|
error: he(() => [
|
|
7597
|
-
re(y) ? (
|
|
7607
|
+
re(y) ? (z(), ft(Yd, {
|
|
7598
7608
|
key: 0,
|
|
7599
7609
|
retrying: r.value,
|
|
7600
|
-
"error-type": re(
|
|
7601
|
-
"error-message": re(
|
|
7610
|
+
"error-type": re(B),
|
|
7611
|
+
"error-message": re(I),
|
|
7602
7612
|
onRetry: h
|
|
7603
7613
|
}, null, 8, ["retrying", "error-type", "error-message"])) : be("", !0)
|
|
7604
7614
|
]),
|
|
@@ -7607,9 +7617,9 @@ const Nd = { class: "opencode-custom-loading" }, Ld = { class: "opencode-loading
|
|
|
7607
7617
|
}
|
|
7608
7618
|
});
|
|
7609
7619
|
let Pl = {};
|
|
7610
|
-
const
|
|
7611
|
-
if (
|
|
7612
|
-
const e =
|
|
7620
|
+
const Ko = document.querySelector(`script[${el}]`);
|
|
7621
|
+
if (Ko) {
|
|
7622
|
+
const e = Ko.getAttribute(el);
|
|
7613
7623
|
if (e)
|
|
7614
7624
|
try {
|
|
7615
7625
|
const t = new TextDecoder().decode(
|