@yuku123/z-team-component 0.2.53 → 0.2.55

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.
Files changed (47) hide show
  1. package/dist/{ChangeLogView-Dm7C3S14.js → ChangeLogView-R6boINWk.js} +1 -1
  2. package/dist/{ComponentDoc-y1NfPcHG.js → ComponentDoc-DTJyJAy-.js} +121 -121
  3. package/dist/{InvitationManagementPage-Btw9iVOl.js → InvitationManagementPage-BZOxuoM5.js} +1 -1
  4. package/dist/{OnboardingPage-wF0OrgfD.js → OnboardingPage-Be3MXW9i.js} +2 -2
  5. package/dist/{ScheduledTasks-CzzgG3n8.js → ScheduledTasks-CxDbixJe.js} +806 -809
  6. package/dist/{SystemShell-BSCmnOxf.js → SystemShell-BEKwj3WF.js} +1 -1
  7. package/dist/{admin-logs-vR556ORQ.js → admin-logs-DMF0dtG1.js} +2 -2
  8. package/dist/{api-Jfnj1ybB.js → api-DhuqONeb.js} +210 -227
  9. package/dist/{api-Bs0qYxjL.js → api-DqNgdbLm.js} +1 -1
  10. package/dist/{createWorkspaceWsHandler-obuYWncQ.js → createWorkspaceWsHandler-BKcAIc4B.js} +5359 -5145
  11. package/dist/{index-DqUOCs_a.js → index-8Qtz0IKN.js} +2 -2
  12. package/dist/{index-Pk7OkJrk.js → index-B30K72xQ.js} +517 -320
  13. package/dist/{index-CnEWSsKt.js → index-B7cZdoRq.js} +1 -1
  14. package/dist/{index-DroZE6Bv.js → index-B8eiFO_f.js} +3 -3
  15. package/dist/{index-CYViRXQo.js → index-BKVWW3ba.js} +1 -1
  16. package/dist/{index-JLtVgwZv.js → index-BM6XpIcw.js} +1 -1
  17. package/dist/{index-BbkE7r8M.js → index-BOcKPM37.js} +610 -529
  18. package/dist/{index-gxEdw4X4.js → index-BP97Ev-W.js} +4 -4
  19. package/dist/{index-BtWtVMgY.js → index-C5O0cK8A.js} +6 -6
  20. package/dist/index-C8Wkx3H_.js +8960 -0
  21. package/dist/{index-yS7XIUis.js → index-CZ9xxAL0.js} +3 -3
  22. package/dist/{index-BNShjps9.js → index-CZxihNo5.js} +7 -7
  23. package/dist/{index-DmZdGNnh.js → index-CbUsvCMy.js} +4 -4
  24. package/dist/{index-Ck_D109M.js → index-Ct9MzvZV.js} +2 -2
  25. package/dist/{index-B3LhKHBx.js → index-CzePRAbT.js} +41 -35
  26. package/dist/{index-tADa82Fa.js → index-DQk6Pt6U.js} +3 -3
  27. package/dist/{index-Onqu_VQO.js → index-DQmgOqd1.js} +7 -7
  28. package/dist/{index-Dj5_8ulz.js → index-DV8rmjvN.js} +5 -5
  29. package/dist/{index-Di_vaPxC.js → index-DpNZTqcn.js} +3 -3
  30. package/dist/{index-C5WSr14Z.js → index-Otx98G8z.js} +1 -1
  31. package/dist/{index-BXiuxhgz.js → index-TPTesErt.js} +2 -2
  32. package/dist/{index-CxrBnzg2.js → index-mXMdvUYD.js} +1 -1
  33. package/dist/index.js +1 -1
  34. package/dist/{instance-B0DZJnee.js → instance-Cr4_XM2r.js} +1 -1
  35. package/dist/pages.js +1 -1
  36. package/dist/{schedule-D3jTrI1R.js → schedule-BNLns-p4.js} +1 -1
  37. package/dist/{send-default-agent-team-message-CbqHaohM.js → send-default-agent-team-message-C9VWSWKJ.js} +1 -1
  38. package/dist/{sso-user-Dw_wwYa-.js → sso-user-Cme2tmGq.js} +1 -1
  39. package/dist/{training-CETtJBNQ.js → training-SjRAdtNQ.js} +1 -1
  40. package/dist/{useAppStore-s-CLa-nF.js → useAppStore-C63xiq3-.js} +1 -1
  41. package/dist/{webide-6j4OVoNA.js → webide-DDFxSedU.js} +4 -4
  42. package/dist/z-team-component.css +2 -2
  43. package/package.json +1 -1
  44. package/dist/SmartWorkbench.module-xRRmpTTw.js +0 -85
  45. package/dist/index-DUmgSTQu.js +0 -9179
  46. package/dist/index-DWsfQMp8.js +0 -208
  47. package/dist/index-WIsi8fln.js +0 -339
@@ -1,26 +1,26 @@
1
1
  import { jsxs as n, jsx as e, Fragment as ge } from "react/jsx-runtime";
2
- import { a as Wn, f as qn, B as Vn, u as Jn, ar as Xt, k as Ke, as as Ca, t as Kn, at as wa, au as Sa, av as Ta, V as xa, G as Ia, aw as La, ax as Ba, l as Aa, ay as Ra, az as Da, T as Pa, aA as Ma, F as Ea, aB as $a, A as Oa } from "./api-Jfnj1ybB.js";
2
+ import { a as Wn, f as qn, B as Vn, u as Jn, ar as Xt, k as Ke, as as Ca, t as Kn, at as wa, au as Sa, av as Ta, V as xa, G as Ia, aw as La, ax as Ba, l as Aa, ay as Ra, az as Da, T as Pa, aA as Ma, F as Ea, aB as $a, A as Oa } from "./api-DhuqONeb.js";
3
3
  import { ArrowLeftOutlined as kt, BellOutlined as Ha, CheckOutlined as ja, CloseOutlined as mn, SaveOutlined as Ga, ProfileOutlined as Fa, MessageOutlined as za, SettingOutlined as Ua, FolderOpenOutlined as Mt, ThunderboltOutlined as an, ClockCircleOutlined as Zt, FolderOutlined as Wa, FileTextOutlined as qa, CommentOutlined as Va, SyncOutlined as Ja, CheckCircleOutlined as mt, PercentageOutlined as Ka, FilePptOutlined as Ya, EditOutlined as Yn, ScheduleOutlined as Qa, FileImageOutlined as Xa, MinusOutlined as Za, ArrowUpOutlined as es, ArrowDownOutlined as ts, CodeOutlined as ns, Html5Outlined as hn, OrderedListOutlined as pn, LockOutlined as Ft, LinkOutlined as en, SnippetsOutlined as Qn, SafetyCertificateOutlined as fn, KeyOutlined as as, DiffOutlined as ss, FontSizeOutlined as ls, ScissorOutlined as os, ReloadOutlined as Et, CalendarOutlined as _n, BgColorsOutlined as is, QrcodeOutlined as rs, ApiOutlined as cs, SendOutlined as ds, PlusOutlined as $t, DeleteOutlined as zt, FileSearchOutlined as Xn, PlayCircleOutlined as ht, FileDoneOutlined as tn, CloseCircleOutlined as us, RedoOutlined as ms, GiftOutlined as Zn, CheckCircleFilled as hs, GoldOutlined as ea, EyeOutlined as ps, CrownOutlined as fs, DesktopOutlined as _s, StopOutlined as gs } from "@ant-design/icons";
4
- import { message as oe, Spin as et, Input as fe, Switch as At, Select as ut, InputNumber as ys, Tabs as vs, Card as bs, Tag as J, Table as ks, DatePicker as Ns, Segmented as Cs, Empty as Me, Modal as it, Button as R, Space as ke, Typography as ws, Radio as rt, Row as Ye, Col as we, List as gn, Statistic as Ss, Tooltip as sn, Form as Rt, Progress as Tt } from "antd";
5
- import { useState as i, useRef as Re, useCallback as M, useEffect as ee, useMemo as be, Fragment as Ts } from "react";
4
+ import { message as oe, Spin as et, Input as fe, Switch as At, Select as ut, InputNumber as ys, Tabs as vs, Card as bs, Tag as V, Table as ks, DatePicker as Ns, Segmented as Cs, Empty as Me, Modal as it, Button as R, Space as ke, Typography as ws, Radio as rt, Row as Ye, Col as we, List as gn, Statistic as Ss, Tooltip as sn, Form as Rt, Progress as Tt } from "antd";
5
+ import { useState as i, useRef as Re, useCallback as M, useEffect as Z, useMemo as be, Fragment as Ts } from "react";
6
6
  import ln from "react-markdown";
7
7
  import on from "remark-gfm";
8
- import { f as xs, u as Is, a as Ls, b as Bs, s as As } from "./webide-6j4OVoNA.js";
9
- import { V as ta, X as yn, Y as na, Z as Rs, F as vn, R as rn, L as bn, _ as Ds, D as Ps, $ as aa, a0 as sa, a1 as kn, a2 as Ms, C as Es, a3 as $s } from "./index-DUmgSTQu.js";
10
- import { u as Le, s as Dt } from "./useAppStore-s-CLa-nF.js";
11
- import { a as Os, b as Hs, s as js, c as Gs, d as Fs, u as zs, e as Us, t as Ws, r as qs, m as Vs, g as Js } from "./schedule-D3jTrI1R.js";
8
+ import { f as xs, u as Is, a as Ls, b as Bs, s as As } from "./webide-DDFxSedU.js";
9
+ import { V as ta, X as yn, Y as na, Z as Rs, F as vn, R as rn, L as bn, _ as Ds, D as Ps, $ as aa, a0 as sa, a1 as kn, a2 as Ms, C as Es, a3 as $s } from "./index-C8Wkx3H_.js";
10
+ import { u as Le, s as Dt } from "./useAppStore-C63xiq3-.js";
11
+ import { a as Os, b as Hs, s as js, c as Gs, d as Fs, u as zs, e as Us, t as Ws, r as qs, m as Vs, g as Js } from "./schedule-BNLns-p4.js";
12
12
  import Ks from "rehype-highlight";
13
- import { t as Ys, p as Qs } from "./createWorkspaceWsHandler-obuYWncQ.js";
13
+ import { t as Ys, p as Qs } from "./createWorkspaceWsHandler-BKcAIc4B.js";
14
14
  import St from "dayjs";
15
15
  import * as Ut from "echarts/core";
16
16
  import { BarChart as Xs, LineChart as Zs, PieChart as el } from "echarts/charts";
17
17
  import { GridComponent as tl, LegendComponent as nl, TitleComponent as al, TooltipComponent as sl } from "echarts/components";
18
18
  import { CanvasRenderer as ll } from "echarts/renderers";
19
- import { a as ol } from "./instance-B0DZJnee.js";
19
+ import { a as ol } from "./instance-Cr4_XM2r.js";
20
20
  import { diffLines as il } from "diff";
21
21
  import rl, { DiffMethod as cl } from "react-diff-viewer-continued";
22
22
  import { format as dl } from "sql-formatter";
23
- import { V as la, W as ul, k as ml, h as hl, X as oa, Y as pl, Z as fl, _ as Nn, $ as _l, a0 as gl, a1 as ia, a2 as yl, a3 as vl, a4 as bl, a5 as kl, a6 as Nl, a7 as Cl } from "./training-CETtJBNQ.js";
23
+ import { V as la, W as ul, k as ml, h as hl, X as oa, Y as pl, Z as fl, _ as Nn, $ as _l, a0 as gl, a1 as ia, a2 as yl, a3 as vl, a4 as bl, a5 as kl, a6 as Nl, a7 as Cl } from "./training-SjRAdtNQ.js";
24
24
  async function wl(t = {}, s = "") {
25
25
  const a = new URLSearchParams();
26
26
  t.keyword && a.set("keyword", t.keyword), t.category && a.set("category", t.category), t.status !== void 0 && a.set("status", String(t.status)), s && a.set("token", s);
@@ -168,7 +168,7 @@ function vi({
168
168
  embedded: a = !1,
169
169
  initialSessionId: o
170
170
  }) {
171
- const l = Le((k) => k.token), [d, h] = i([]), [c, u] = i(null), [m, r] = i("empty"), [f, w] = i(!1), [E, j] = i(""), [I, P] = i(""), [F, U] = i(""), [K, Z] = i(""), [W, G] = i(""), [te, N] = i(!1), [g, z] = i(""), [V, ne] = i([]), [_, $] = i(!1), [A, Y] = i(!1), v = Re(null), [y, q] = i([]), [O, ae] = i(1), [ce, _e] = i(0), [ve, he] = i(0), [Ne, Se] = i(!1), [He, qe] = i(!1), [nt, Ve] = i([]), [Ge, je] = i(0), [Qe, ze] = i(!1), [Je, T] = i(null), [pe, me] = i([]), [at, $e] = i(!1), Xe = M(async () => {
171
+ const l = Le((k) => k.token), [d, h] = i([]), [c, u] = i(null), [m, r] = i("empty"), [f, w] = i(!1), [$, G] = i(""), [I, P] = i(""), [z, U] = i(""), [J, X] = i(""), [W, F] = i(""), [ee, N] = i(!1), [g, E] = i(""), [te, se] = i([]), [_, O] = i(!1), [A, K] = i(!1), v = Re(null), [y, q] = i([]), [H, ne] = i(1), [ce, _e] = i(0), [ve, he] = i(0), [Ne, Se] = i(!1), [He, qe] = i(!1), [nt, Ve] = i([]), [Ge, je] = i(0), [Qe, ze] = i(!1), [Je, T] = i(null), [pe, me] = i([]), [at, $e] = i(!1), Xe = M(async () => {
172
172
  w(!0);
173
173
  try {
174
174
  const k = await Os(t.id, l);
@@ -194,67 +194,67 @@ function vi({
194
194
  },
195
195
  [t.id, l]
196
196
  );
197
- ee(() => {
197
+ Z(() => {
198
198
  Xe(), De();
199
- }, [Xe, De]), ee(() => {
199
+ }, [Xe, De]), Z(() => {
200
200
  o && pt(o);
201
201
  }, [o, pt]);
202
202
  const Ze = M(
203
203
  (k) => {
204
- if (z(k), v.current && clearTimeout(v.current), !k.trim()) {
205
- ne([]), Y(!1);
204
+ if (E(k), v.current && clearTimeout(v.current), !k.trim()) {
205
+ se([]), K(!1);
206
206
  return;
207
207
  }
208
- $(!0), Y(!0), v.current = setTimeout(async () => {
208
+ O(!0), K(!0), v.current = setTimeout(async () => {
209
209
  try {
210
210
  const D = await js(t.id, k, l);
211
- ne(D.slice(0, 20));
211
+ se(D.slice(0, 20));
212
212
  } catch {
213
- ne([]);
213
+ se([]);
214
214
  }
215
- $(!1);
215
+ O(!1);
216
216
  }, 300);
217
217
  },
218
218
  [t.id, l]
219
219
  ), ft = (k) => {
220
- Z(k.userId), G(k.name), z(k.name), Y(!1);
220
+ X(k.userId), F(k.name), E(k.name), K(!1);
221
221
  }, st = () => {
222
- Z(""), G(""), z(""), ne([]), Y(!1);
222
+ X(""), F(""), E(""), se([]), K(!1);
223
223
  }, Ue = M(
224
224
  async (k, D) => {
225
225
  Se(!0);
226
226
  try {
227
- const se = await Gs(
227
+ const ae = await Gs(
228
228
  t.id,
229
229
  k,
230
230
  D,
231
231
  10,
232
232
  l
233
233
  );
234
- q(se.items), ae(se.page), _e(se.total), he(se.total_pages);
234
+ q(ae.items), ne(ae.page), _e(ae.total), he(ae.total_pages);
235
235
  } catch {
236
236
  }
237
237
  Se(!1);
238
238
  },
239
239
  [t.id, l]
240
240
  );
241
- ee(() => {
241
+ Z(() => {
242
242
  c && m === "detail" && Ue(c, 1);
243
243
  }, [c, m, Ue]);
244
244
  const _t = (k) => {
245
- u(k.id), r("detail"), j(k.name), P(k.prompt), U(k.cronExpression), Z(k.notifyUserId || ""), G(k.notifyUserName || ""), z(k.notifyUserName || "");
245
+ u(k.id), r("detail"), G(k.name), P(k.prompt), U(k.cronExpression), X(k.notifyUserId || ""), F(k.notifyUserName || ""), E(k.notifyUserName || "");
246
246
  }, ct = () => {
247
- u(null), r("create"), j(""), P(""), U("0 0 9 * * ?"), Z(""), G(""), z("");
247
+ u(null), r("create"), G(""), P(""), U("0 0 9 * * ?"), X(""), F(""), E("");
248
248
  }, gt = async () => {
249
- if (!(!E.trim() || !I.trim() || !F.trim())) {
249
+ if (!(!$.trim() || !I.trim() || !z.trim())) {
250
250
  N(!0);
251
251
  try {
252
252
  await Fs(
253
253
  t.id,
254
- E,
254
+ $,
255
255
  I,
256
- F,
257
- K,
256
+ z,
257
+ J,
258
258
  W,
259
259
  l
260
260
  ), await Xe(), r("empty");
@@ -270,10 +270,10 @@ function vi({
270
270
  t.id,
271
271
  c,
272
272
  {
273
- name: E,
273
+ name: $,
274
274
  prompt: I,
275
- cron_expression: F,
276
- notify_user_id: K,
275
+ cron_expression: z,
276
+ notify_user_id: J,
277
277
  notify_user_name: W
278
278
  },
279
279
  l
@@ -320,12 +320,12 @@ function vi({
320
320
  className: b.formInput,
321
321
  value: g,
322
322
  onChange: (k) => Ze(k.target.value),
323
- onFocus: () => g && Y(!0),
323
+ onFocus: () => g && K(!0),
324
324
  placeholder: "搜索姓名/账号/工号",
325
325
  autoComplete: "off"
326
326
  }
327
327
  ),
328
- K && /* @__PURE__ */ e(
328
+ J && /* @__PURE__ */ e(
329
329
  "button",
330
330
  {
331
331
  type: "button",
@@ -336,7 +336,7 @@ function vi({
336
336
  }
337
337
  )
338
338
  ] }),
339
- A && /* @__PURE__ */ e("div", { className: b.staffResults, children: _ ? /* @__PURE__ */ e("div", { className: b.staffLoading, children: "搜索中..." }) : V.length === 0 ? /* @__PURE__ */ e("div", { className: b.staffEmpty, children: g ? "未找到匹配的员工" : "输入关键词搜索" }) : V.map((k) => /* @__PURE__ */ n(
339
+ A && /* @__PURE__ */ e("div", { className: b.staffResults, children: _ ? /* @__PURE__ */ e("div", { className: b.staffLoading, children: "搜索中..." }) : te.length === 0 ? /* @__PURE__ */ e("div", { className: b.staffEmpty, children: g ? "未找到匹配的员工" : "输入关键词搜索" }) : te.map((k) => /* @__PURE__ */ n(
340
340
  "div",
341
341
  {
342
342
  className: b.staffItem,
@@ -354,8 +354,8 @@ function vi({
354
354
  ] }), Pe = /* @__PURE__ */ n("div", { className: b.formGroup, children: [
355
355
  /* @__PURE__ */ e("label", { className: b.formLabel, children: "触达人(任务完成后发送卡片通知)" }),
356
356
  vt,
357
- K && /* @__PURE__ */ n("div", { className: b.notifySelected, children: [
358
- /* @__PURE__ */ e("span", { className: b.notifySelectedName, children: W || K }),
357
+ J && /* @__PURE__ */ n("div", { className: b.notifySelected, children: [
358
+ /* @__PURE__ */ e("span", { className: b.notifySelectedName, children: W || J }),
359
359
  /* @__PURE__ */ e(
360
360
  "button",
361
361
  {
@@ -528,8 +528,8 @@ function vi({
528
528
  "input",
529
529
  {
530
530
  className: b.formInput,
531
- value: E,
532
- onChange: (k) => j(k.target.value),
531
+ value: $,
532
+ onChange: (k) => G(k.target.value),
533
533
  placeholder: "如:每日晨报"
534
534
  }
535
535
  )
@@ -552,7 +552,7 @@ function vi({
552
552
  "input",
553
553
  {
554
554
  className: b.formInput,
555
- value: F,
555
+ value: z,
556
556
  onChange: (k) => U(k.target.value),
557
557
  placeholder: "秒 分 时 日 月 周(如 0 0 9 * * ?)"
558
558
  }
@@ -577,8 +577,8 @@ function vi({
577
577
  type: "button",
578
578
  className: `${b.btn} ${b.btnPrimary}`,
579
579
  onClick: gt,
580
- disabled: te,
581
- children: te ? "创建中..." : "创建任务"
580
+ disabled: ee,
581
+ children: ee ? "创建中..." : "创建任务"
582
582
  }
583
583
  ),
584
584
  /* @__PURE__ */ e(
@@ -600,8 +600,8 @@ function vi({
600
600
  "input",
601
601
  {
602
602
  className: b.formInput,
603
- value: E,
604
- onChange: (k) => j(k.target.value)
603
+ value: $,
604
+ onChange: (k) => G(k.target.value)
605
605
  }
606
606
  )
607
607
  ] }),
@@ -622,7 +622,7 @@ function vi({
622
622
  "input",
623
623
  {
624
624
  className: b.formInput,
625
- value: F,
625
+ value: z,
626
626
  onChange: (k) => U(k.target.value)
627
627
  }
628
628
  ),
@@ -672,8 +672,8 @@ function vi({
672
672
  type: "button",
673
673
  className: `${b.btn} ${b.btnPrimary}`,
674
674
  onClick: Nt,
675
- disabled: te,
676
- children: te ? "保存中..." : "保存修改"
675
+ disabled: ee,
676
+ children: ee ? "保存中..." : "保存修改"
677
677
  }
678
678
  ),
679
679
  /* @__PURE__ */ e(
@@ -743,13 +743,13 @@ function vi({
743
743
  {
744
744
  type: "button",
745
745
  className: b.pageBtn,
746
- disabled: O <= 1,
747
- onClick: () => Ue(Te.id, O - 1),
746
+ disabled: H <= 1,
747
+ onClick: () => Ue(Te.id, H - 1),
748
748
  children: "上一页"
749
749
  }
750
750
  ),
751
751
  /* @__PURE__ */ n("span", { className: b.pageInfo, children: [
752
- O,
752
+ H,
753
753
  " / ",
754
754
  ve,
755
755
  "(共 ",
@@ -761,8 +761,8 @@ function vi({
761
761
  {
762
762
  type: "button",
763
763
  className: b.pageBtn,
764
- disabled: O >= ve,
765
- onClick: () => Ue(Te.id, O + 1),
764
+ disabled: H >= ve,
765
+ onClick: () => Ue(Te.id, H + 1),
766
766
  children: "下一页"
767
767
  }
768
768
  )
@@ -887,8 +887,8 @@ function ug({
887
887
  }) {
888
888
  const l = Le((D) => D.token), [d, h] = i(!0), [c, u] = i(!1), [m, r] = i(
889
889
  a === "schedule" ? "schedule" : "basic"
890
- ), [f, w] = i(), [E, j] = i([]), [I, P] = i(""), [F, U] = i(""), [K, Z] = i(""), [W, G] = i(""), [te, N] = i(""), [g, z] = i(""), [V, ne] = i(""), [_, $] = i(""), [A, Y] = i(), [v, y] = i(!1), [q, O] = i(!1), [ae, ce] = i(!1), [_e, ve] = i(!0), [he, Ne] = i([]), [Se, He] = i(/* @__PURE__ */ new Set()), [qe, nt] = i({}), [Ve, Ge] = i(null), [je, Qe] = i(""), [ze, Je] = i(!1), [T, pe] = i(!1), [me, at] = i([]), [$e, Xe] = i(1), [De, pt] = i(0), [Ze, ft] = i(0), [st, Ue] = i(!1), [_t, ct] = i(null);
891
- ee(() => {
890
+ ), [f, w] = i(), [$, G] = i([]), [I, P] = i(""), [z, U] = i(""), [J, X] = i(""), [W, F] = i(""), [ee, N] = i(""), [g, E] = i(""), [te, se] = i(""), [_, O] = i(""), [A, K] = i(), [v, y] = i(!1), [q, H] = i(!1), [ne, ce] = i(!1), [_e, ve] = i(!0), [he, Ne] = i([]), [Se, He] = i(/* @__PURE__ */ new Set()), [qe, nt] = i({}), [Ve, Ge] = i(null), [je, Qe] = i(""), [ze, Je] = i(!1), [T, pe] = i(!1), [me, at] = i([]), [$e, Xe] = i(1), [De, pt] = i(0), [Ze, ft] = i(0), [st, Ue] = i(!1), [_t, ct] = i(null);
891
+ Z(() => {
892
892
  let D = !1;
893
893
  return (async () => {
894
894
  h(!0);
@@ -899,19 +899,19 @@ function ug({
899
899
  ]);
900
900
  if (D) return;
901
901
  const xe = ie._agenthub_raw ?? {};
902
- w(Kn(xe.agentHubAgentId) || void 0), P(ie.name ?? String(xe.agentName ?? "")), U(String(xe.avatar ?? ie.avatar ?? "")), Z(String(xe.agentRole ?? "")), G(ie.description ?? ""), N(
902
+ w(Kn(xe.agentHubAgentId) || void 0), P(ie.name ?? String(xe.agentName ?? "")), U(String(xe.avatar ?? ie.avatar ?? "")), X(String(xe.agentRole ?? "")), F(ie.description ?? ""), N(
903
903
  ie.system_prompt ?? String(xe.systemPrompt ?? "")
904
- ), z(String(xe.userPrompt ?? "")), ne(String(xe.openingRemarks ?? ""));
904
+ ), E(String(xe.userPrompt ?? "")), se(String(xe.openingRemarks ?? ""));
905
905
  const We = xe.llm;
906
- $(
906
+ O(
907
907
  String((We == null ? void 0 : We.modelCode) ?? (We == null ? void 0 : We.model) ?? (We == null ? void 0 : We.code) ?? "")
908
- ), Y(
908
+ ), K(
909
909
  xe.temperature != null ? Number(xe.temperature) : void 0
910
910
  );
911
911
  const dt = xe.modelExt;
912
- y(!!((dt == null ? void 0 : dt.enable_thinking) ?? !1)), O(!!((dt == null ? void 0 : dt.send_thinking) ?? !1));
912
+ y(!!((dt == null ? void 0 : dt.enable_thinking) ?? !1)), H(!!((dt == null ? void 0 : dt.send_thinking) ?? !1));
913
913
  const lt = xe.sensitiveFilterConfig;
914
- ce(!!((lt == null ? void 0 : lt.enabled) ?? !1)), ve(Nr(ie, "enable")), j(Array.isArray(Oe) ? Oe : []);
914
+ ce(!!((lt == null ? void 0 : lt.enabled) ?? !1)), ve(Nr(ie, "enable")), G(Array.isArray(Oe) ? Oe : []);
915
915
  } catch (ie) {
916
916
  D || oe.error((ie == null ? void 0 : ie.userMessage) ?? "加载 Agent 配置失败");
917
917
  } finally {
@@ -924,11 +924,11 @@ function ug({
924
924
  const gt = () => ({
925
925
  agentName: I.trim(),
926
926
  description: W.trim(),
927
- avatar: F.trim(),
928
- agentRole: K.trim(),
929
- systemPrompt: te.trim(),
927
+ avatar: z.trim(),
928
+ agentRole: J.trim(),
929
+ systemPrompt: ee.trim(),
930
930
  userPrompt: g.trim(),
931
- openingRemarks: V.trim(),
931
+ openingRemarks: te.trim(),
932
932
  temperature: A ?? 0.7,
933
933
  enable: _e ? 1 : 0,
934
934
  ..._.trim() ? { llm: { modelCode: _.trim() } } : {},
@@ -936,7 +936,7 @@ function ug({
936
936
  enable_thinking: v,
937
937
  send_thinking: q
938
938
  },
939
- sensitiveFilterConfig: { enabled: ae }
939
+ sensitiveFilterConfig: { enabled: ne }
940
940
  }), Nt = async () => {
941
941
  if (!f) {
942
942
  oe.warning("找不到 AgentHub Agent ID,无法保存");
@@ -965,10 +965,10 @@ function ug({
965
965
  Je(!1);
966
966
  }
967
967
  }, Lt = async (D) => {
968
- const se = new Set(Se);
969
- if (se.has(D))
970
- se.delete(D);
971
- else if (se.add(D), !qe[D])
968
+ const ae = new Set(Se);
969
+ if (ae.has(D))
970
+ ae.delete(D);
971
+ else if (ae.add(D), !qe[D])
972
972
  try {
973
973
  const ie = await yn(
974
974
  t.id,
@@ -979,39 +979,39 @@ function ug({
979
979
  } catch (ie) {
980
980
  oe.error((ie == null ? void 0 : ie.userMessage) ?? "加载子目录失败");
981
981
  }
982
- He(se);
982
+ He(ae);
983
983
  }, Bt = async (D) => {
984
984
  Ge(D), pe(!0);
985
985
  try {
986
- const se = await Rs(
986
+ const ae = await Rs(
987
987
  t.id,
988
988
  D,
989
989
  l
990
990
  );
991
- Qe(se.content);
992
- } catch (se) {
993
- Qe(""), oe.error((se == null ? void 0 : se.userMessage) ?? "读取文件失败");
991
+ Qe(ae.content);
992
+ } catch (ae) {
993
+ Qe(""), oe.error((ae == null ? void 0 : ae.userMessage) ?? "读取文件失败");
994
994
  } finally {
995
995
  pe(!1);
996
996
  }
997
997
  };
998
- ee(() => {
998
+ Z(() => {
999
999
  m === "files" && he.length === 0 && !ze && It();
1000
- }, [m]), ee(() => {
1000
+ }, [m]), Z(() => {
1001
1001
  m === "skills" && me.length === 0 && !st && Te(1);
1002
1002
  }, [m]);
1003
1003
  const Ct = (D) => {
1004
1004
  var ie;
1005
- const se = ((ie = D.split(".").pop()) == null ? void 0 : ie.toLowerCase()) || "";
1006
- return se === "md" || se === "markdown";
1007
- }, yt = (D, se) => D.map((ie) => {
1005
+ const ae = ((ie = D.split(".").pop()) == null ? void 0 : ie.toLowerCase()) || "";
1006
+ return ae === "md" || ae === "markdown";
1007
+ }, yt = (D, ae) => D.map((ie) => {
1008
1008
  const Oe = Se.has(ie.path), xe = qe[ie.path];
1009
1009
  return /* @__PURE__ */ n("div", { children: [
1010
1010
  /* @__PURE__ */ e(
1011
1011
  "div",
1012
1012
  {
1013
1013
  className: `${L.fileTreeNode} ${Ve === ie.path ? L.fileTreeNodeActive : ""}`,
1014
- style: { paddingLeft: `${se * 16 + 12}px` },
1014
+ style: { paddingLeft: `${ae * 16 + 12}px` },
1015
1015
  onClick: () => {
1016
1016
  ie.is_dir ? Lt(ie.path) : Bt(ie.path);
1017
1017
  },
@@ -1024,41 +1024,41 @@ function ug({
1024
1024
  ] })
1025
1025
  }
1026
1026
  ),
1027
- ie.is_dir && Oe && xe && /* @__PURE__ */ e("div", { children: yt(xe, se + 1) })
1027
+ ie.is_dir && Oe && xe && /* @__PURE__ */ e("div", { children: yt(xe, ae + 1) })
1028
1028
  ] }, ie.path);
1029
1029
  }), Te = async (D) => {
1030
1030
  Ue(!0);
1031
1031
  try {
1032
- const se = await ta(t.id, D, 20, l);
1033
- at(se.items), Xe(se.page), pt(se.total), ft(se.total_pages);
1034
- } catch (se) {
1035
- oe.error((se == null ? void 0 : se.userMessage) ?? "加载 Skill 列表失败");
1032
+ const ae = await ta(t.id, D, 20, l);
1033
+ at(ae.items), Xe(ae.page), pt(ae.total), ft(ae.total_pages);
1034
+ } catch (ae) {
1035
+ oe.error((ae == null ? void 0 : ae.userMessage) ?? "加载 Skill 列表失败");
1036
1036
  } finally {
1037
1037
  Ue(!1);
1038
1038
  }
1039
- }, vt = async (D, se) => {
1039
+ }, vt = async (D, ae) => {
1040
1040
  ct(D);
1041
1041
  try {
1042
- await na(t.id, D, se, l), at(
1042
+ await na(t.id, D, ae, l), at(
1043
1043
  (ie) => ie.map(
1044
- (Oe) => Oe.skill_code === D ? { ...Oe, enabled: se } : Oe
1044
+ (Oe) => Oe.skill_code === D ? { ...Oe, enabled: ae } : Oe
1045
1045
  )
1046
- ), oe.success(se ? "Skill 已启用" : "Skill 已禁用");
1046
+ ), oe.success(ae ? "Skill 已启用" : "Skill 已禁用");
1047
1047
  } catch (ie) {
1048
1048
  oe.error((ie == null ? void 0 : ie.userMessage) ?? "切换 Skill 失败");
1049
1049
  } finally {
1050
1050
  ct(null);
1051
1051
  }
1052
- }, Pe = (D, se, ie, Oe = !1) => /* @__PURE__ */ n("div", { className: L.field, children: [
1052
+ }, Pe = (D, ae, ie, Oe = !1) => /* @__PURE__ */ n("div", { className: L.field, children: [
1053
1053
  /* @__PURE__ */ n("label", { className: L.fieldLabel, children: [
1054
1054
  Oe && /* @__PURE__ */ e("span", { className: L.required, children: "*" }),
1055
1055
  D
1056
1056
  ] }),
1057
- /* @__PURE__ */ e("div", { className: L.fieldInput, children: se }),
1057
+ /* @__PURE__ */ e("div", { className: L.fieldInput, children: ae }),
1058
1058
  ie && /* @__PURE__ */ e("span", { className: L.fieldHint, children: ie })
1059
- ] }), k = (D, se) => /* @__PURE__ */ n("div", { className: L.sectionHead, children: [
1059
+ ] }), k = (D, ae) => /* @__PURE__ */ n("div", { className: L.sectionHead, children: [
1060
1060
  /* @__PURE__ */ e("span", { className: L.sectionTitle, children: D }),
1061
- se && /* @__PURE__ */ e("span", { className: L.sectionDesc, children: se })
1061
+ ae && /* @__PURE__ */ e("span", { className: L.sectionDesc, children: ae })
1062
1062
  ] });
1063
1063
  return d ? /* @__PURE__ */ e("div", { className: L.container, children: /* @__PURE__ */ n("div", { className: L.loading, children: [
1064
1064
  /* @__PURE__ */ e(et, { size: "small" }),
@@ -1207,7 +1207,7 @@ function ug({
1207
1207
  /* @__PURE__ */ e(
1208
1208
  fe,
1209
1209
  {
1210
- value: F,
1210
+ value: z,
1211
1211
  onChange: (D) => U(D.target.value),
1212
1212
  placeholder: "表情或图片 URL"
1213
1213
  }
@@ -1219,8 +1219,8 @@ function ug({
1219
1219
  /* @__PURE__ */ e(
1220
1220
  fe,
1221
1221
  {
1222
- value: K,
1223
- onChange: (D) => Z(D.target.value),
1222
+ value: J,
1223
+ onChange: (D) => X(D.target.value),
1224
1224
  placeholder: "如 后端开发工程师"
1225
1225
  }
1226
1226
  ),
@@ -1233,7 +1233,7 @@ function ug({
1233
1233
  fe.TextArea,
1234
1234
  {
1235
1235
  value: W,
1236
- onChange: (D) => G(D.target.value),
1236
+ onChange: (D) => F(D.target.value),
1237
1237
  placeholder: "该 Agent 的用途",
1238
1238
  rows: 3
1239
1239
  }
@@ -1256,7 +1256,7 @@ function ug({
1256
1256
  /* @__PURE__ */ e(
1257
1257
  fe.TextArea,
1258
1258
  {
1259
- value: te,
1259
+ value: ee,
1260
1260
  onChange: (D) => N(D.target.value),
1261
1261
  placeholder: "你是一个乐于助人的助手...",
1262
1262
  rows: 12
@@ -1272,7 +1272,7 @@ function ug({
1272
1272
  fe.TextArea,
1273
1273
  {
1274
1274
  value: g,
1275
- onChange: (D) => z(D.target.value),
1275
+ onChange: (D) => E(D.target.value),
1276
1276
  placeholder: "{{user_input}}",
1277
1277
  rows: 6
1278
1278
  }
@@ -1285,8 +1285,8 @@ function ug({
1285
1285
  /* @__PURE__ */ e(
1286
1286
  fe.TextArea,
1287
1287
  {
1288
- value: V,
1289
- onChange: (D) => ne(D.target.value),
1288
+ value: te,
1289
+ onChange: (D) => se(D.target.value),
1290
1290
  placeholder: "你好!有什么可以帮你的?",
1291
1291
  rows: 3
1292
1292
  }
@@ -1304,11 +1304,11 @@ function ug({
1304
1304
  showSearch: !0,
1305
1305
  allowClear: !0,
1306
1306
  value: _ || void 0,
1307
- onChange: (D) => $(D ?? ""),
1307
+ onChange: (D) => O(D ?? ""),
1308
1308
  placeholder: "选择模型",
1309
1309
  style: { width: "100%" },
1310
1310
  optionFilterProp: "label",
1311
- options: E.map((D) => ({
1311
+ options: $.map((D) => ({
1312
1312
  label: `${D.name ?? D.code ?? ""}${D.modelProvider ? ` (${D.modelProvider})` : ""}`,
1313
1313
  value: D.code ?? ""
1314
1314
  }))
@@ -1322,7 +1322,7 @@ function ug({
1322
1322
  ys,
1323
1323
  {
1324
1324
  value: A,
1325
- onChange: (D) => Y(D ?? void 0),
1325
+ onChange: (D) => K(D ?? void 0),
1326
1326
  min: 0,
1327
1327
  max: 2,
1328
1328
  step: 0.1,
@@ -1354,7 +1354,7 @@ function ug({
1354
1354
  At,
1355
1355
  {
1356
1356
  checked: q,
1357
- onChange: O
1357
+ onChange: H
1358
1358
  }
1359
1359
  ),
1360
1360
  /* @__PURE__ */ n("div", { children: [
@@ -1369,7 +1369,7 @@ function ug({
1369
1369
  /* @__PURE__ */ e(
1370
1370
  At,
1371
1371
  {
1372
- checked: ae,
1372
+ checked: ne,
1373
1373
  onChange: ce
1374
1374
  }
1375
1375
  ),
@@ -1416,7 +1416,7 @@ function ug({
1416
1416
  {
1417
1417
  checked: D.enabled,
1418
1418
  loading: _t === D.skill_code,
1419
- onChange: (se) => void vt(D.skill_code, se)
1419
+ onChange: (ae) => void vt(D.skill_code, ae)
1420
1420
  }
1421
1421
  ) })
1422
1422
  ] }, D.skill_code)) }),
@@ -1571,26 +1571,26 @@ function mg({
1571
1571
  var dn, un;
1572
1572
  const c = Le((p) => p.token), u = Le((p) => p.currentUser), [m, r] = i([]), [f, w] = i(
1573
1573
  null
1574
- ), [E, j] = i([]), [I, P] = i(""), [F, U] = i(!1), [K, Z] = i(!1), [W, G] = i(!1), [te, N] = i(""), [g, z] = i(null), [V, ne] = i(""), [_, $] = i(
1574
+ ), [$, G] = i([]), [I, P] = i(""), [z, U] = i(!1), [J, X] = i(!1), [W, F] = i(!1), [ee, N] = i(""), [g, E] = i(null), [te, se] = i(""), [_, O] = i(
1575
1575
  () => localStorage.getItem("ft_personal_session_collapsed") === "true"
1576
- ), [A, Y] = i("chat"), [v, y] = i(
1576
+ ), [A, K] = i("chat"), [v, y] = i(
1577
1577
  /* @__PURE__ */ new Set()
1578
- ), [q, O] = i(!1), [ae, ce] = i({}), [_e, ve] = i(
1578
+ ), [q, H] = i(!1), [ne, ce] = i({}), [_e, ve] = i(
1579
1579
  /* @__PURE__ */ new Set()
1580
1580
  ), [he, Ne] = i([]), [Se, He] = i(!1), [qe, nt] = i(!1), [Ve, Ge] = i(!1), je = Re(null), Qe = Re(null), ze = Re(!1), Je = Re(null), [T, pe] = i(null), [me, at] = i([]), [$e, Xe] = i(
1581
1581
  []
1582
1582
  ), [De, pt] = i(
1583
1583
  () => localStorage.getItem("ft_personal_llm_code") || ""
1584
1584
  ), [Ze, ft] = i(!1), [st, Ue] = i(!1), _t = Re(null), ct = Re(null);
1585
- ee(() => {
1585
+ Z(() => {
1586
1586
  l && wa(c).then((p) => at(p || [])).catch(console.error);
1587
- }, [l, c]), ee(() => {
1587
+ }, [l, c]), Z(() => {
1588
1588
  l && Sa(c).then((p) => Xe(p || [])).catch(console.error);
1589
- }, [l, Ze, c]), ee(() => {
1589
+ }, [l, Ze, c]), Z(() => {
1590
1590
  if (!Ze && !st) return;
1591
- const p = (H) => {
1592
- const Q = H.target;
1593
- _t.current && !_t.current.contains(Q) && ft(!1), ct.current && !ct.current.contains(Q) && Ue(!1);
1591
+ const p = (j) => {
1592
+ const Y = j.target;
1593
+ _t.current && !_t.current.contains(Y) && ft(!1), ct.current && !ct.current.contains(Y) && Ue(!1);
1594
1594
  };
1595
1595
  return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
1596
1596
  }, [Ze, st]);
@@ -1603,25 +1603,25 @@ function mg({
1603
1603
  }
1604
1604
  try {
1605
1605
  const p = await Ta(t.id, c);
1606
- if (r(p.sessions || []), O(p.isOwner || !1), ce(p.userMeta || {}), p.sessions && p.sessions.length > 0 && !f) {
1607
- const H = a != null && p.sessions.some((Q) => Q.id === a) ? a : p.sessions[0].id;
1608
- w(H);
1606
+ if (r(p.sessions || []), H(p.isOwner || !1), ce(p.userMeta || {}), p.sessions && p.sessions.length > 0 && !f) {
1607
+ const j = a != null && p.sessions.some((Y) => Y.id === a) ? a : p.sessions[0].id;
1608
+ w(j);
1609
1609
  } else (!p.sessions || p.sessions.length === 0) && w(null);
1610
1610
  } catch {
1611
1611
  }
1612
1612
  }, [t, f, a]);
1613
- ee(() => {
1613
+ Z(() => {
1614
1614
  Nt();
1615
- }, [Nt]), ee(() => {
1615
+ }, [Nt]), Z(() => {
1616
1616
  if (!t || !f) {
1617
- pe(null), j([]);
1617
+ pe(null), G([]);
1618
1618
  return;
1619
1619
  }
1620
1620
  let p = !1;
1621
- const H = f;
1622
- return pe(null), Z(!0), Xt(t.id, f, c).then((Q) => {
1623
- p || j(
1624
- Q.map((le) => {
1621
+ const j = f;
1622
+ return pe(null), X(!0), Xt(t.id, f, c).then((Y) => {
1623
+ p || G(
1624
+ Y.map((le) => {
1625
1625
  const { text: Be, urls: Ie } = Oe(
1626
1626
  le.content || ""
1627
1627
  );
@@ -1634,117 +1634,117 @@ function mg({
1634
1634
  })
1635
1635
  );
1636
1636
  }).catch(() => {
1637
- p || j([]);
1637
+ p || G([]);
1638
1638
  }).finally(() => {
1639
- p || (pe(H), Z(!1));
1639
+ p || (pe(j), X(!1));
1640
1640
  }), () => {
1641
1641
  p = !0;
1642
1642
  };
1643
- }, [t, f]), ee(() => {
1643
+ }, [t, f]), Z(() => {
1644
1644
  je.current && (je.current.scrollTop = je.current.scrollHeight);
1645
- }, [E]);
1645
+ }, [$]);
1646
1646
  const It = M(() => {
1647
1647
  const p = je.current;
1648
1648
  if (!p) return;
1649
- const H = p.scrollHeight - p.scrollTop - p.clientHeight;
1650
- Ge(H > 120);
1649
+ const j = p.scrollHeight - p.scrollTop - p.clientHeight;
1650
+ Ge(j > 120);
1651
1651
  }, []), Lt = M(() => {
1652
1652
  const p = je.current;
1653
1653
  p && (p.scrollTop = p.scrollHeight), Ge(!1);
1654
1654
  }, []), Bt = () => {
1655
- G(!0), N("");
1655
+ F(!0), N("");
1656
1656
  }, Ct = () => {
1657
- G(!1), N("");
1657
+ F(!1), N("");
1658
1658
  }, yt = async () => {
1659
1659
  if (!t) return;
1660
- const p = te.trim() || "新会话";
1660
+ const p = ee.trim() || "新会话";
1661
1661
  try {
1662
- const H = await Ia(t.id, p, c);
1663
- r((Q) => [H, ...Q]), w(H.id), j([]), G(!1), N("");
1662
+ const j = await Ia(t.id, p, c);
1663
+ r((Y) => [j, ...Y]), w(j.id), G([]), F(!1), N("");
1664
1664
  } catch {
1665
1665
  }
1666
1666
  }, Te = (p) => {
1667
- z(p.id), ne(p.title);
1667
+ E(p.id), se(p.title);
1668
1668
  }, vt = () => {
1669
- z(null), ne("");
1669
+ E(null), se("");
1670
1670
  }, Pe = async () => {
1671
1671
  if (!t || g === null) return;
1672
- const p = V.trim();
1672
+ const p = te.trim();
1673
1673
  if (!p) {
1674
1674
  vt();
1675
1675
  return;
1676
1676
  }
1677
1677
  try {
1678
- const H = await La(
1678
+ const j = await La(
1679
1679
  t.id,
1680
1680
  g,
1681
1681
  p,
1682
1682
  c
1683
1683
  );
1684
1684
  r(
1685
- (Q) => Q.map((le) => le.id === H.id ? H : le)
1686
- ), z(null), ne("");
1685
+ (Y) => Y.map((le) => le.id === j.id ? j : le)
1686
+ ), E(null), se("");
1687
1687
  } catch {
1688
1688
  }
1689
1689
  }, k = async (p) => {
1690
1690
  if (t && window.confirm("确定删除此会话吗?"))
1691
1691
  try {
1692
- await Ba(t.id, p, c), r((H) => H.filter((Q) => !Ke(Q.id, p))), Ke(f, p) && (w(null), j([]));
1692
+ await Ba(t.id, p, c), r((j) => j.filter((Y) => !Ke(Y.id, p))), Ke(f, p) && (w(null), G([]));
1693
1693
  } catch {
1694
1694
  }
1695
1695
  }, D = M(
1696
1696
  (p) => {
1697
- const H = p.target.files;
1698
- if (!H) return;
1699
- const Q = [];
1700
- for (let le = 0; le < H.length; le++) {
1701
- const Be = H[le];
1702
- Be.type.startsWith("image/") && Q.push(Be);
1697
+ const j = p.target.files;
1698
+ if (!j) return;
1699
+ const Y = [];
1700
+ for (let le = 0; le < j.length; le++) {
1701
+ const Be = j[le];
1702
+ Be.type.startsWith("image/") && Y.push(Be);
1703
1703
  }
1704
- Q.length > 0 && Ne((le) => [...le, ...Q]), p.target.value = "";
1704
+ Y.length > 0 && Ne((le) => [...le, ...Y]), p.target.value = "";
1705
1705
  },
1706
1706
  []
1707
- ), se = M((p) => {
1707
+ ), ae = M((p) => {
1708
1708
  var le;
1709
- const H = (le = p.clipboardData) == null ? void 0 : le.items;
1710
- if (!H) return;
1711
- const Q = [];
1712
- for (let Be = 0; Be < H.length; Be++) {
1713
- const Ie = H[Be];
1709
+ const j = (le = p.clipboardData) == null ? void 0 : le.items;
1710
+ if (!j) return;
1711
+ const Y = [];
1712
+ for (let Be = 0; Be < j.length; Be++) {
1713
+ const Ie = j[Be];
1714
1714
  if (Ie.type.startsWith("image/")) {
1715
1715
  const Ce = Ie.getAsFile();
1716
- Ce && Q.push(Ce);
1716
+ Ce && Y.push(Ce);
1717
1717
  }
1718
1718
  }
1719
- Q.length > 0 && (p.preventDefault(), Ne((Be) => [...Be, ...Q]));
1719
+ Y.length > 0 && (p.preventDefault(), Ne((Be) => [...Be, ...Y]));
1720
1720
  }, []), ie = M((p) => {
1721
- Ne((H) => H.filter((Q, le) => le !== p));
1721
+ Ne((j) => j.filter((Y, le) => le !== p));
1722
1722
  }, []);
1723
1723
  function Oe(p) {
1724
- const H = /!\[[^\]]*\]\(([^)]+)\)/g, Q = [];
1724
+ const j = /!\[[^\]]*\]\(([^)]+)\)/g, Y = [];
1725
1725
  let le;
1726
- for (; (le = H.exec(p)) !== null; )
1727
- Q.push(le[1]);
1728
- return { text: p.replace(H, "").trim(), urls: Q };
1726
+ for (; (le = j.exec(p)) !== null; )
1727
+ Y.push(le[1]);
1728
+ return { text: p.replace(j, "").trim(), urls: Y };
1729
1729
  }
1730
1730
  const xe = async (p) => {
1731
1731
  if (!t || !f) return;
1732
- const H = (p ?? I).trim();
1733
- if (!H && he.length === 0 || F) return;
1734
- let Q = [];
1732
+ const j = (p ?? I).trim();
1733
+ if (!j && he.length === 0 || z) return;
1734
+ let Y = [];
1735
1735
  if (he.length > 0) {
1736
1736
  He(!0);
1737
1737
  try {
1738
- Q = await Aa(he);
1738
+ Y = await Aa(he);
1739
1739
  } catch (Ce) {
1740
1740
  console.error("图片上传失败", Ce), Dt("图片上传失败,请重试", "error"), He(!1);
1741
1741
  return;
1742
1742
  }
1743
1743
  He(!1);
1744
1744
  }
1745
- let le = H;
1746
- if (Q.length > 0) {
1747
- const Ce = Q.map((bt) => `![图片](${bt})`).join(`
1745
+ let le = j;
1746
+ if (Y.length > 0) {
1747
+ const Ce = Y.map((bt) => `![图片](${bt})`).join(`
1748
1748
  `);
1749
1749
  le = le ? `${le}
1750
1750
  ${Ce}` : Ce;
@@ -1752,20 +1752,20 @@ ${Ce}` : Ce;
1752
1752
  const Be = {
1753
1753
  id: `local-user-${Date.now()}`,
1754
1754
  role: "user",
1755
- content: H,
1756
- imageUrls: Q.length > 0 ? Q : void 0
1755
+ content: j,
1756
+ imageUrls: Y.length > 0 ? Y : void 0
1757
1757
  }, Ie = {
1758
1758
  id: `local-assistant-${Date.now()}`,
1759
1759
  role: "assistant",
1760
1760
  content: ""
1761
1761
  };
1762
- j((Ce) => [...Ce, Be, Ie]), P(""), Ne([]), U(!0), ze.current = !0, await Ra(
1762
+ G((Ce) => [...Ce, Be, Ie]), P(""), Ne([]), U(!0), ze.current = !0, await Ra(
1763
1763
  t.id,
1764
1764
  f,
1765
1765
  le,
1766
1766
  c,
1767
1767
  (Ce) => {
1768
- j((bt) => {
1768
+ G((bt) => {
1769
1769
  const Ae = [...bt], Fe = Ae[Ae.length - 1];
1770
1770
  return Fe && Fe.id === Ie.id && (Ae[Ae.length - 1] = {
1771
1771
  ...Fe,
@@ -1774,7 +1774,7 @@ ${Ce}` : Ce;
1774
1774
  });
1775
1775
  },
1776
1776
  (Ce) => {
1777
- U(!1), ze.current = !1, j((bt) => {
1777
+ U(!1), ze.current = !1, G((bt) => {
1778
1778
  const Ae = [...bt], Fe = Ae[Ae.length - 1];
1779
1779
  return Fe && Fe.id === Ie.id && (Ae[Ae.length - 1] = {
1780
1780
  ...Fe,
@@ -1786,7 +1786,7 @@ ${Ce}` : Ce;
1786
1786
  U(!1), ze.current = !1;
1787
1787
  },
1788
1788
  (Ce) => {
1789
- j((bt) => {
1789
+ G((bt) => {
1790
1790
  const Ae = [...bt], Fe = Ae[Ae.length - 1];
1791
1791
  return Fe && Fe.id === Ie.id && (Ae[Ae.length - 1] = {
1792
1792
  ...Fe,
@@ -1797,11 +1797,11 @@ ${Ce}` : Ce;
1797
1797
  De || null
1798
1798
  );
1799
1799
  }, We = Re(null);
1800
- ee(() => {
1801
- !o || !t || !f || F || // 等「这个会话的消息已加载完成」——用带值的状态而不是 loadingMessages
1800
+ Z(() => {
1801
+ !o || !t || !f || z || // 等「这个会话的消息已加载完成」——用带值的状态而不是 loadingMessages
1802
1802
  // 布尔量(布尔量会被 React 批处理合并掉翻转,effect 就不重跑了)
1803
1803
  T !== f || We.current !== o && (We.current = o, xe(o));
1804
- }, [o, t, f, F, T]), ee(() => {
1804
+ }, [o, t, f, z, T]), Z(() => {
1805
1805
  localStorage.setItem(
1806
1806
  "ft_personal_session_collapsed",
1807
1807
  _ ? "true" : "false"
@@ -1813,27 +1813,27 @@ ${Ce}` : Ce;
1813
1813
  (p) => p.title.startsWith("[定时] ")
1814
1814
  ), Ht = {};
1815
1815
  for (const p of Ot) {
1816
- const H = p.title.replace("[定时] ", "");
1817
- Ht[H] || (Ht[H] = []), Ht[H].push(p);
1816
+ const j = p.title.replace("[定时] ", "");
1817
+ Ht[j] || (Ht[j] = []), Ht[j].push(p);
1818
1818
  }
1819
1819
  const jt = {};
1820
1820
  if (q)
1821
1821
  for (const p of lt) {
1822
- const H = p.userId || "unknown";
1823
- jt[H] || (jt[H] = []), jt[H].push(p);
1822
+ const j = p.userId || "unknown";
1823
+ jt[j] || (jt[j] = []), jt[j].push(p);
1824
1824
  }
1825
1825
  const va = (p) => {
1826
- ve((H) => {
1827
- const Q = new Set(H);
1828
- return Q.has(p) ? Q.delete(p) : Q.add(p), Q;
1826
+ ve((j) => {
1827
+ const Y = new Set(j);
1828
+ return Y.has(p) ? Y.delete(p) : Y.add(p), Y;
1829
1829
  });
1830
1830
  }, ba = (p) => {
1831
- var H;
1832
- return ((H = ae == null ? void 0 : ae[p]) == null ? void 0 : H.displayName) || `用户${p}`;
1831
+ var j;
1832
+ return ((j = ne == null ? void 0 : ne[p]) == null ? void 0 : j.displayName) || `用户${p}`;
1833
1833
  }, ka = (p) => {
1834
- y((H) => {
1835
- const Q = new Set(H);
1836
- return Q.has(p) ? Q.delete(p) : Q.add(p), Q;
1834
+ y((j) => {
1835
+ const Y = new Set(j);
1836
+ return Y.has(p) ? Y.delete(p) : Y.add(p), Y;
1837
1837
  });
1838
1838
  };
1839
1839
  if (!t)
@@ -1847,7 +1847,7 @@ ${Ce}` : Ce;
1847
1847
  {
1848
1848
  type: "button",
1849
1849
  className: x.sessionExpandBtn,
1850
- onClick: () => $(!1),
1850
+ onClick: () => O(!1),
1851
1851
  title: "展开会话列表",
1852
1852
  children: "›"
1853
1853
  }
@@ -1870,7 +1870,7 @@ ${Ce}` : Ce;
1870
1870
  {
1871
1871
  type: "button",
1872
1872
  className: x.sessionBtnSm,
1873
- onClick: () => $(!0),
1873
+ onClick: () => O(!0),
1874
1874
  title: "收起会话列表",
1875
1875
  children: "‹"
1876
1876
  }
@@ -1883,7 +1883,7 @@ ${Ce}` : Ce;
1883
1883
  {
1884
1884
  type: "button",
1885
1885
  className: `${x.sessionTab} ${A === "chat" ? x.sessionTabActive : ""}`,
1886
- onClick: () => Y("chat"),
1886
+ onClick: () => K("chat"),
1887
1887
  children: [
1888
1888
  "聊天",
1889
1889
  lt.length > 0 ? ` (${lt.length})` : ""
@@ -1895,7 +1895,7 @@ ${Ce}` : Ce;
1895
1895
  {
1896
1896
  type: "button",
1897
1897
  className: `${x.sessionTab} ${A === "schedule" ? x.sessionTabActive : ""}`,
1898
- onClick: () => Y("schedule"),
1898
+ onClick: () => K("schedule"),
1899
1899
  children: [
1900
1900
  "定时任务",
1901
1901
  Ot.length > 0 ? ` (${Ot.length})` : ""
@@ -1911,7 +1911,7 @@ ${Ce}` : Ce;
1911
1911
  className: x.sessionCreateInput,
1912
1912
  type: "text",
1913
1913
  placeholder: "输入会话名称",
1914
- value: te,
1914
+ value: ee,
1915
1915
  autoFocus: !0,
1916
1916
  onChange: (p) => N(p.target.value),
1917
1917
  onKeyDown: (p) => {
@@ -1974,8 +1974,8 @@ ${Ce}` : Ce;
1974
1974
  /* @__PURE__ */ e("span", { children: "点击「新建」开始聊天" })
1975
1975
  ] }) : q ? (
1976
1976
  /* owner 视角:按用户分组展示 */
1977
- Object.entries(jt).map(([p, H]) => {
1978
- const Q = _e.has(p), le = ba(p), Be = qt(p);
1977
+ Object.entries(jt).map(([p, j]) => {
1978
+ const Y = _e.has(p), le = ba(p), Be = qt(p);
1979
1979
  return /* @__PURE__ */ n("div", { className: x.sessionGroup, children: [
1980
1980
  /* @__PURE__ */ n(
1981
1981
  "div",
@@ -1983,7 +1983,7 @@ ${Ce}` : Ce;
1983
1983
  className: x.sessionGroupHeader,
1984
1984
  onClick: () => va(p),
1985
1985
  children: [
1986
- /* @__PURE__ */ e("span", { className: x.sessionGroupArrow, children: Q ? "▸" : "▾" }),
1986
+ /* @__PURE__ */ e("span", { className: x.sessionGroupArrow, children: Y ? "▸" : "▾" }),
1987
1987
  /* @__PURE__ */ e(
1988
1988
  "span",
1989
1989
  {
@@ -1999,11 +1999,11 @@ ${Ce}` : Ce;
1999
1999
  }
2000
2000
  ),
2001
2001
  /* @__PURE__ */ e("span", { className: x.sessionGroupName, children: le }),
2002
- /* @__PURE__ */ e("span", { className: x.sessionGroupCount, children: H.length })
2002
+ /* @__PURE__ */ e("span", { className: x.sessionGroupCount, children: j.length })
2003
2003
  ]
2004
2004
  }
2005
2005
  ),
2006
- !Q && H.map((Ie) => /* @__PURE__ */ n(
2006
+ !Y && j.map((Ie) => /* @__PURE__ */ n(
2007
2007
  "div",
2008
2008
  {
2009
2009
  className: `${x.sessionItem} ${x.sessionItemNested} ${Ke(f, Ie.id) ? x.sessionItemActive : ""}`,
@@ -2109,11 +2109,11 @@ ${Ce}` : Ce;
2109
2109
  {
2110
2110
  className: x.sessionCreateInput,
2111
2111
  type: "text",
2112
- value: V,
2112
+ value: te,
2113
2113
  autoFocus: !0,
2114
- onChange: (H) => ne(H.target.value),
2115
- onKeyDown: (H) => {
2116
- H.key === "Enter" && Pe(), H.key === "Escape" && vt();
2114
+ onChange: (j) => se(j.target.value),
2115
+ onKeyDown: (j) => {
2116
+ j.key === "Enter" && Pe(), j.key === "Escape" && vt();
2117
2117
  }
2118
2118
  }
2119
2119
  ),
@@ -2122,8 +2122,8 @@ ${Ce}` : Ce;
2122
2122
  {
2123
2123
  type: "button",
2124
2124
  className: x.sessionCreateConfirm,
2125
- onClick: (H) => {
2126
- H.stopPropagation(), Pe();
2125
+ onClick: (j) => {
2126
+ j.stopPropagation(), Pe();
2127
2127
  },
2128
2128
  title: "确认",
2129
2129
  children: /* @__PURE__ */ e(
@@ -2147,8 +2147,8 @@ ${Ce}` : Ce;
2147
2147
  {
2148
2148
  type: "button",
2149
2149
  className: x.sessionCreateCancel,
2150
- onClick: (H) => {
2151
- H.stopPropagation(), vt();
2150
+ onClick: (j) => {
2151
+ j.stopPropagation(), vt();
2152
2152
  },
2153
2153
  title: "取消",
2154
2154
  children: /* @__PURE__ */ n(
@@ -2175,8 +2175,8 @@ ${Ce}` : Ce;
2175
2175
  "span",
2176
2176
  {
2177
2177
  className: x.sessionItemTitle,
2178
- onDoubleClick: (H) => {
2179
- H.stopPropagation(), Te(p);
2178
+ onDoubleClick: (j) => {
2179
+ j.stopPropagation(), Te(p);
2180
2180
  },
2181
2181
  title: "双击重命名",
2182
2182
  children: p.title
@@ -2187,8 +2187,8 @@ ${Ce}` : Ce;
2187
2187
  {
2188
2188
  type: "button",
2189
2189
  className: x.sessionRenameBtn,
2190
- onClick: (H) => {
2191
- H.stopPropagation(), Te(p);
2190
+ onClick: (j) => {
2191
+ j.stopPropagation(), Te(p);
2192
2192
  },
2193
2193
  title: "重命名会话",
2194
2194
  children: /* @__PURE__ */ n(
@@ -2225,8 +2225,8 @@ ${Ce}` : Ce;
2225
2225
  {
2226
2226
  type: "button",
2227
2227
  className: x.sessionDeleteBtn,
2228
- onClick: (H) => {
2229
- H.stopPropagation(), k(p.id);
2228
+ onClick: (j) => {
2229
+ j.stopPropagation(), k(p.id);
2230
2230
  },
2231
2231
  title: "删除会话",
2232
2232
  children: /* @__PURE__ */ n(
@@ -2259,8 +2259,8 @@ ${Ce}` : Ce;
2259
2259
  ) : (
2260
2260
  /* 定时任务 Tab */
2261
2261
  Ot.length === 0 ? /* @__PURE__ */ e("div", { className: x.sessionEmpty, children: /* @__PURE__ */ e("span", { children: "暂无定时任务会话" }) }) : Object.entries(Ht).map(
2262
- ([p, H]) => {
2263
- const Q = v.has(p);
2262
+ ([p, j]) => {
2263
+ const Y = v.has(p);
2264
2264
  return /* @__PURE__ */ n("div", { className: x.sessionGroup, children: [
2265
2265
  /* @__PURE__ */ n(
2266
2266
  "div",
@@ -2268,13 +2268,13 @@ ${Ce}` : Ce;
2268
2268
  className: x.sessionGroupHeader,
2269
2269
  onClick: () => ka(p),
2270
2270
  children: [
2271
- /* @__PURE__ */ e("span", { className: x.sessionGroupArrow, children: Q ? "▸" : "▾" }),
2271
+ /* @__PURE__ */ e("span", { className: x.sessionGroupArrow, children: Y ? "▸" : "▾" }),
2272
2272
  /* @__PURE__ */ e("span", { className: x.sessionGroupName, children: p }),
2273
- /* @__PURE__ */ e("span", { className: x.sessionGroupCount, children: H.length })
2273
+ /* @__PURE__ */ e("span", { className: x.sessionGroupCount, children: j.length })
2274
2274
  ]
2275
2275
  }
2276
2276
  ),
2277
- !Q && H.map((le) => /* @__PURE__ */ n(
2277
+ !Y && j.map((le) => /* @__PURE__ */ n(
2278
2278
  "div",
2279
2279
  {
2280
2280
  className: `${x.sessionItem} ${x.sessionItemNested} ${Ke(f, le.id) ? x.sessionItemActive : ""}`,
@@ -2349,7 +2349,7 @@ ${Ce}` : Ce;
2349
2349
  t.displayName,
2350
2350
  f && m.find((p) => Ke(p.id, f)) && ` · ${m.find((p) => Ke(p.id, f)).title}`
2351
2351
  ] }),
2352
- F && /* @__PURE__ */ e("span", { className: x.streamingIndicator, children: "正在回复..." })
2352
+ z && /* @__PURE__ */ e("span", { className: x.streamingIndicator, children: "正在回复..." })
2353
2353
  ] }),
2354
2354
  f ? /* @__PURE__ */ n(ge, { children: [
2355
2355
  /* @__PURE__ */ e(
@@ -2358,11 +2358,11 @@ ${Ce}` : Ce;
2358
2358
  className: x.messageList,
2359
2359
  ref: je,
2360
2360
  onScroll: It,
2361
- children: K && E.length === 0 ? /* @__PURE__ */ e("div", { className: x.chatEmpty, children: "加载中..." }) : E.length === 0 ? /* @__PURE__ */ n("div", { className: x.chatEmpty, children: [
2361
+ children: J && $.length === 0 ? /* @__PURE__ */ e("div", { className: x.chatEmpty, children: "加载中..." }) : $.length === 0 ? /* @__PURE__ */ n("div", { className: x.chatEmpty, children: [
2362
2362
  "开始与 ",
2363
2363
  t.displayName,
2364
2364
  " 聊天吧"
2365
- ] }) : E.map((p) => /* @__PURE__ */ n(
2365
+ ] }) : $.map((p) => /* @__PURE__ */ n(
2366
2366
  "div",
2367
2367
  {
2368
2368
  className: `${x.messageRow} ${p.role === "user" ? x.messageRowUser : ""}`,
@@ -2383,14 +2383,14 @@ ${Ce}` : Ce;
2383
2383
  className: `${x.messageBubble} ${p.role === "user" ? x.messageBubbleUser : x.messageBubbleAssistant}${p.role === "assistant" ? " markdown-body" : ""}`,
2384
2384
  children: [
2385
2385
  p.role === "assistant" ? /* @__PURE__ */ e(xc, { content: p.content || "" }) : p.content || "...",
2386
- p.imageUrls && p.imageUrls.length > 0 && /* @__PURE__ */ e("div", { className: x.msgImages, children: p.imageUrls.map((H, Q) => /* @__PURE__ */ e(
2386
+ p.imageUrls && p.imageUrls.length > 0 && /* @__PURE__ */ e("div", { className: x.msgImages, children: p.imageUrls.map((j, Y) => /* @__PURE__ */ e(
2387
2387
  "img",
2388
2388
  {
2389
- src: H,
2390
- alt: `图片${Q + 1}`,
2389
+ src: j,
2390
+ alt: `图片${Y + 1}`,
2391
2391
  className: x.msgImageThumb
2392
2392
  },
2393
- Q
2393
+ Y
2394
2394
  )) })
2395
2395
  ]
2396
2396
  }
@@ -2517,11 +2517,11 @@ ${Ce}` : Ce;
2517
2517
  t.id,
2518
2518
  f,
2519
2519
  c
2520
- ), H = new Blob(
2520
+ ), j = new Blob(
2521
2521
  [JSON.stringify(p, null, 2)],
2522
2522
  { type: "application/json" }
2523
- ), Q = URL.createObjectURL(H), le = document.createElement("a");
2524
- le.href = Q, le.download = `personal-chat-export-${t.id}-${f}-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.json`, document.body.appendChild(le), le.click(), document.body.removeChild(le), URL.revokeObjectURL(Q), Dt(
2523
+ ), Y = URL.createObjectURL(j), le = document.createElement("a");
2524
+ le.href = Y, le.download = `personal-chat-export-${t.id}-${f}-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.json`, document.body.appendChild(le), le.click(), document.body.removeChild(le), URL.revokeObjectURL(Y), Dt(
2525
2525
  `已导出 ${p.length} 条消息`,
2526
2526
  "success"
2527
2527
  );
@@ -2644,29 +2644,29 @@ ${Ce}` : Ce;
2644
2644
  }
2645
2645
  )
2646
2646
  ] }),
2647
- he.length > 0 && /* @__PURE__ */ e("div", { className: x.imagePreviewBar, children: he.map((p, H) => /* @__PURE__ */ n("div", { className: x.imagePreviewItem, children: [
2647
+ he.length > 0 && /* @__PURE__ */ e("div", { className: x.imagePreviewBar, children: he.map((p, j) => /* @__PURE__ */ n("div", { className: x.imagePreviewItem, children: [
2648
2648
  /* @__PURE__ */ e("img", { src: URL.createObjectURL(p), alt: "preview" }),
2649
2649
  /* @__PURE__ */ e(
2650
2650
  "button",
2651
2651
  {
2652
2652
  type: "button",
2653
2653
  className: x.imagePreviewRemove,
2654
- onClick: () => ie(H),
2654
+ onClick: () => ie(j),
2655
2655
  children: "×"
2656
2656
  }
2657
2657
  )
2658
- ] }, H)) }),
2658
+ ] }, j)) }),
2659
2659
  /* @__PURE__ */ e(
2660
2660
  "textarea",
2661
2661
  {
2662
2662
  ref: Qe,
2663
2663
  className: x.inputBox,
2664
- placeholder: F ? "正在回复中..." : "输入消息,Enter 发送,Shift+Enter 换行",
2664
+ placeholder: z ? "正在回复中..." : "输入消息,Enter 发送,Shift+Enter 换行",
2665
2665
  value: I,
2666
2666
  onChange: (p) => P(p.target.value),
2667
2667
  onKeyDown: dt,
2668
- onPaste: se,
2669
- disabled: F,
2668
+ onPaste: ae,
2669
+ disabled: z,
2670
2670
  rows: 3
2671
2671
  }
2672
2672
  )
@@ -2675,7 +2675,7 @@ ${Ce}` : Ce;
2675
2675
  ] })
2676
2676
  ] });
2677
2677
  }
2678
- const Ic = "_page_snv35_9", Lc = "_pageHeader_snv35_15", Bc = "_headerLeft_snv35_25", Ac = "_pageTitle_snv35_32", Rc = "_headerMeta_snv35_40", Dc = "_headerDot_snv35_52", Pc = "_headerRight_snv35_58", Mc = "_scenarioSelect_snv35_66", Ec = "_kpiGrid_snv35_72", $c = "_kpiCard_snv35_80", Oc = "_kpiCardClickable_snv35_90", Hc = "_kpiTop_snv35_107", jc = "_kpiLabel_snv35_115", Gc = "_kpiIcon_snv35_122", Fc = "_chipBlue_snv35_133", zc = "_chipCyan_snv35_138", Uc = "_chipGreen_snv35_143", Wc = "_chipAmber_snv35_148", qc = "_kpiValue_snv35_154", Vc = "_kpiSuffix_snv35_163", Jc = "_rateTrack_snv35_171", Kc = "_rateFill_snv35_180", Yc = "_kpiFooter_snv35_188", Qc = "_kpiDeltaUp_snv35_195", Xc = "_kpiDeltaDown_snv35_204", Zc = "_kpiDeltaFlat_snv35_213", ed = "_kpiDeltaLabel_snv35_221", td = "_chartCard_snv35_229", nd = "_chartRow_snv35_238", ad = "_chartCardNarrow_snv35_250", sd = "_chartCardWide_snv35_256", ld = "_chartHeader_snv35_262", od = "_chartTitle_snv35_270", id = "_chartBreadcrumb_snv35_277", rd = "_chartBreadcrumbLink_snv35_284", cd = "_chartBreadcrumbSep_snv35_300", dd = "_chartSub_snv35_306", ud = "_chartEmpty_snv35_312", X = {
2678
+ const Ic = "_page_snv35_9", Lc = "_pageHeader_snv35_15", Bc = "_headerLeft_snv35_25", Ac = "_pageTitle_snv35_32", Rc = "_headerMeta_snv35_40", Dc = "_headerDot_snv35_52", Pc = "_headerRight_snv35_58", Mc = "_scenarioSelect_snv35_66", Ec = "_kpiGrid_snv35_72", $c = "_kpiCard_snv35_80", Oc = "_kpiCardClickable_snv35_90", Hc = "_kpiTop_snv35_107", jc = "_kpiLabel_snv35_115", Gc = "_kpiIcon_snv35_122", Fc = "_chipBlue_snv35_133", zc = "_chipCyan_snv35_138", Uc = "_chipGreen_snv35_143", Wc = "_chipAmber_snv35_148", qc = "_kpiValue_snv35_154", Vc = "_kpiSuffix_snv35_163", Jc = "_rateTrack_snv35_171", Kc = "_rateFill_snv35_180", Yc = "_kpiFooter_snv35_188", Qc = "_kpiDeltaUp_snv35_195", Xc = "_kpiDeltaDown_snv35_204", Zc = "_kpiDeltaFlat_snv35_213", ed = "_kpiDeltaLabel_snv35_221", td = "_chartCard_snv35_229", nd = "_chartRow_snv35_238", ad = "_chartCardNarrow_snv35_250", sd = "_chartCardWide_snv35_256", ld = "_chartHeader_snv35_262", od = "_chartTitle_snv35_270", id = "_chartBreadcrumb_snv35_277", rd = "_chartBreadcrumbLink_snv35_284", cd = "_chartBreadcrumbSep_snv35_300", dd = "_chartSub_snv35_306", ud = "_chartEmpty_snv35_312", Q = {
2679
2679
  page: Ic,
2680
2680
  pageHeader: Lc,
2681
2681
  headerLeft: Bc,
@@ -2740,7 +2740,7 @@ function Vt({
2740
2740
  onEvents: a
2741
2741
  }) {
2742
2742
  const o = Re(null), l = Re(null), d = Re(a);
2743
- return d.current = a, ee(() => {
2743
+ return d.current = a, Z(() => {
2744
2744
  if (!o.current) return;
2745
2745
  l.current || (l.current = Ut.init(o.current));
2746
2746
  const h = l.current;
@@ -2754,7 +2754,7 @@ function Vt({
2754
2754
  return window.addEventListener("resize", u), () => {
2755
2755
  window.removeEventListener("resize", u), h.off("click", c);
2756
2756
  };
2757
- }, [t]), ee(
2757
+ }, [t]), Z(
2758
2758
  () => () => {
2759
2759
  var h;
2760
2760
  (h = l.current) == null || h.dispose(), l.current = null;
@@ -2892,16 +2892,16 @@ function Sd({
2892
2892
  }) {
2893
2893
  var f;
2894
2894
  const [o, l] = i(""), [d, h] = i(!1), [c, u] = i(""), m = M(async () => {
2895
- var E, j, I;
2895
+ var $, G, I;
2896
2896
  const w = o.trim();
2897
- if ((E = t.inputConfig) != null && E.required && !w) {
2897
+ if (($ = t.inputConfig) != null && $.required && !w) {
2898
2898
  u(`请填写${t.inputConfig.label}`);
2899
2899
  return;
2900
2900
  }
2901
2901
  u(""), h(!0);
2902
2902
  try {
2903
- const P = !!t.inputConfig, F = ((j = w.split(`
2904
- `)[0]) == null ? void 0 : j.trim()) ?? "", U = F.length > 0 ? F.length > 32 ? `${F.slice(0, 32)}…` : F : `${Date.now()}`, K = `${t.title}-${U}`, W = await (await fetch(`${Pa}/scenario-instances/`, {
2903
+ const P = !!t.inputConfig, z = ((G = w.split(`
2904
+ `)[0]) == null ? void 0 : G.trim()) ?? "", U = z.length > 0 ? z.length > 32 ? `${z.slice(0, 32)}…` : z : `${Date.now()}`, J = `${t.title}-${U}`, W = await (await fetch(`${Pa}/scenario-instances/`, {
2905
2905
  method: "POST",
2906
2906
  credentials: "include",
2907
2907
  headers: {
@@ -2909,9 +2909,9 @@ function Sd({
2909
2909
  "Content-Type": "application/json"
2910
2910
  },
2911
2911
  body: JSON.stringify({
2912
- name: K,
2912
+ name: J,
2913
2913
  description: P ? `${t.title}:${w.length > 120 ? `${w.slice(0, 120)}…` : w}` : t.title,
2914
- workspace_path: K,
2914
+ workspace_path: J,
2915
2915
  scenario_code: t.scenarioCode,
2916
2916
  extend_params: {
2917
2917
  ...t.inputConfig ? { [t.inputConfig.paramKey]: w } : {},
@@ -3024,7 +3024,7 @@ function In({
3024
3024
  /* @__PURE__ */ e("span", { style: { fontSize: 28 }, children: o.icon }),
3025
3025
  /* @__PURE__ */ n("div", { children: [
3026
3026
  /* @__PURE__ */ e("h3", { style: { margin: 0, fontSize: 16 }, children: o.title }),
3027
- /* @__PURE__ */ e("div", { style: { marginTop: 4 }, children: o.tags.map((l) => /* @__PURE__ */ e(J, { style: { marginRight: 4 }, children: l }, l)) })
3027
+ /* @__PURE__ */ e("div", { style: { marginTop: 4 }, children: o.tags.map((l) => /* @__PURE__ */ e(V, { style: { marginRight: 4 }, children: l }, l)) })
3028
3028
  ] })
3029
3029
  ]
3030
3030
  }
@@ -3050,32 +3050,32 @@ function Ln({
3050
3050
  onOpenProject: t,
3051
3051
  filterFromNav: s
3052
3052
  }) {
3053
- const a = Le((_) => _.token) || "", [o, l] = i([]), [d, h] = i(0), [c, u] = i(!1), [m, r] = i(""), [f, w] = i(""), [E, j] = i(""), [I, P] = i(""), [F, U] = i(""), [K, Z] = i(1), [W, G] = i(20), [te, N] = i(
3053
+ const a = Le((_) => _.token) || "", [o, l] = i([]), [d, h] = i(0), [c, u] = i(!1), [m, r] = i(""), [f, w] = i(""), [$, G] = i(""), [I, P] = i(""), [z, U] = i(""), [J, X] = i(1), [W, F] = i(20), [ee, N] = i(
3054
3054
  []
3055
3055
  ), g = Re(null);
3056
- ee(() => {
3056
+ Z(() => {
3057
3057
  Da(a).then((_) => {
3058
- const $ = Array.isArray(_) ? _ : [];
3059
- N($.map((A) => ({ code: A.code, name: A.name })));
3058
+ const O = Array.isArray(_) ? _ : [];
3059
+ N(O.map((A) => ({ code: A.code, name: A.name })));
3060
3060
  }).catch(() => {
3061
3061
  });
3062
- }, [a]), ee(() => {
3063
- s && (P(s), Z(1));
3062
+ }, [a]), Z(() => {
3063
+ s && (P(s), X(1));
3064
3064
  }, [s]);
3065
- const z = M((_) => {
3065
+ const E = M((_) => {
3066
3066
  r(_), g.current && clearTimeout(g.current), g.current = setTimeout(() => {
3067
- w(_.trim()), Z(1);
3067
+ w(_.trim()), X(1);
3068
3068
  }, 400);
3069
- }, []), V = M(async () => {
3069
+ }, []), te = M(async () => {
3070
3070
  u(!0);
3071
3071
  try {
3072
3072
  const _ = await ol(
3073
3073
  {
3074
- scenario_code: E || void 0,
3074
+ scenario_code: $ || void 0,
3075
3075
  status: I || void 0,
3076
3076
  name: f || void 0,
3077
- role: F || void 0,
3078
- page: K,
3077
+ role: z || void 0,
3078
+ page: J,
3079
3079
  size: W
3080
3080
  },
3081
3081
  a
@@ -3088,17 +3088,17 @@ function Ln({
3088
3088
  }
3089
3089
  }, [
3090
3090
  a,
3091
- E,
3091
+ $,
3092
3092
  I,
3093
3093
  f,
3094
- F,
3095
- K,
3094
+ z,
3095
+ J,
3096
3096
  W
3097
3097
  ]);
3098
- ee(() => {
3099
- V();
3100
- }, [V]);
3101
- const ne = be(
3098
+ Z(() => {
3099
+ te();
3100
+ }, [te]);
3101
+ const se = be(
3102
3102
  () => o.map((_) => ({
3103
3103
  key: String(_.id),
3104
3104
  id: String(_.id),
@@ -3135,9 +3135,9 @@ function Ln({
3135
3135
  placeholder: "搜索名称",
3136
3136
  allowClear: !0,
3137
3137
  value: m,
3138
- onChange: (_) => z(_.target.value),
3138
+ onChange: (_) => E(_.target.value),
3139
3139
  onSearch: (_) => {
3140
- w(_.trim()), Z(1);
3140
+ w(_.trim()), X(1);
3141
3141
  },
3142
3142
  className: ot.searchInput
3143
3143
  }
@@ -3145,16 +3145,16 @@ function Ln({
3145
3145
  /* @__PURE__ */ e(
3146
3146
  ut,
3147
3147
  {
3148
- value: E,
3148
+ value: $,
3149
3149
  onChange: (_) => {
3150
- j(_ || ""), Z(1);
3150
+ G(_ || ""), X(1);
3151
3151
  },
3152
3152
  style: { width: 140 },
3153
3153
  allowClear: !0,
3154
3154
  placeholder: "全部场景",
3155
3155
  options: [
3156
3156
  { value: "", label: "全部场景" },
3157
- ...te.map((_) => ({ value: _.code, label: _.name }))
3157
+ ...ee.map((_) => ({ value: _.code, label: _.name }))
3158
3158
  ]
3159
3159
  }
3160
3160
  ),
@@ -3163,7 +3163,7 @@ function Ln({
3163
3163
  {
3164
3164
  value: I,
3165
3165
  onChange: (_) => {
3166
- P(_ || ""), Z(1);
3166
+ P(_ || ""), X(1);
3167
3167
  },
3168
3168
  style: { width: 120 },
3169
3169
  allowClear: !0,
@@ -3179,9 +3179,9 @@ function Ln({
3179
3179
  /* @__PURE__ */ e(
3180
3180
  ut,
3181
3181
  {
3182
- value: F,
3182
+ value: z,
3183
3183
  onChange: (_) => {
3184
- U(_ || ""), Z(1);
3184
+ U(_ || ""), X(1);
3185
3185
  },
3186
3186
  style: { width: 120 },
3187
3187
  allowClear: !0,
@@ -3203,16 +3203,16 @@ function Ln({
3203
3203
  /* @__PURE__ */ e(
3204
3204
  ks,
3205
3205
  {
3206
- dataSource: ne,
3206
+ dataSource: se,
3207
3207
  loading: c,
3208
3208
  pagination: {
3209
- current: K,
3209
+ current: J,
3210
3210
  pageSize: W,
3211
3211
  total: d,
3212
3212
  showSizeChanger: !0,
3213
3213
  showTotal: (_) => `共 ${_} 条`,
3214
- onChange: (_, $) => {
3215
- Z(_), G($);
3214
+ onChange: (_, O) => {
3215
+ X(_), F(O);
3216
3216
  }
3217
3217
  },
3218
3218
  size: "middle",
@@ -3227,9 +3227,9 @@ function Ln({
3227
3227
  title: "名称",
3228
3228
  dataIndex: "name",
3229
3229
  ellipsis: !0,
3230
- render: (_, $) => /* @__PURE__ */ n("div", { children: [
3230
+ render: (_, O) => /* @__PURE__ */ n("div", { children: [
3231
3231
  /* @__PURE__ */ e("span", { style: { fontWeight: 600, color: "#1a1a1a" }, children: _ }),
3232
- $.description ? /* @__PURE__ */ e(
3232
+ O.description ? /* @__PURE__ */ e(
3233
3233
  "div",
3234
3234
  {
3235
3235
  style: {
@@ -3240,7 +3240,7 @@ function Ln({
3240
3240
  whiteSpace: "nowrap",
3241
3241
  maxWidth: 300
3242
3242
  },
3243
- children: $.description
3243
+ children: O.description
3244
3244
  }
3245
3245
  ) : null
3246
3246
  ] })
@@ -3249,14 +3249,14 @@ function Ln({
3249
3249
  title: "场景",
3250
3250
  dataIndex: "scenario",
3251
3251
  width: 120,
3252
- render: (_) => /* @__PURE__ */ e(J, { color: "purple", children: _ })
3252
+ render: (_) => /* @__PURE__ */ e(V, { color: "purple", children: _ })
3253
3253
  },
3254
3254
  {
3255
3255
  title: "状态",
3256
3256
  dataIndex: "status",
3257
3257
  width: 80,
3258
3258
  render: (_) => /* @__PURE__ */ e(
3259
- J,
3259
+ V,
3260
3260
  {
3261
3261
  color: bd[_] || "default",
3262
3262
  style: { borderRadius: 4, minWidth: 48, textAlign: "center" },
@@ -3269,7 +3269,7 @@ function Ln({
3269
3269
  dataIndex: "role",
3270
3270
  width: 80,
3271
3271
  render: (_) => /* @__PURE__ */ e(
3272
- J,
3272
+ V,
3273
3273
  {
3274
3274
  color: _ === "ADMIN" ? "blue" : "default",
3275
3275
  style: { borderRadius: 4 },
@@ -3297,9 +3297,9 @@ function Ln({
3297
3297
  width: 120,
3298
3298
  render: (_) => {
3299
3299
  if (!_ || _.length === 0) return "—";
3300
- const $ = _.slice(0, 2).join(", "), A = _.length > 2 ? ` +${_.length - 2}` : "";
3300
+ const O = _.slice(0, 2).join(", "), A = _.length > 2 ? ` +${_.length - 2}` : "";
3301
3301
  return /* @__PURE__ */ n("span", { style: { fontSize: 12, color: "#999" }, children: [
3302
- $,
3302
+ O,
3303
3303
  A
3304
3304
  ] });
3305
3305
  }
@@ -3330,14 +3330,14 @@ function Bn({
3330
3330
  }
3331
3331
  return Array.from(v.entries()).map(([y, q]) => ({ value: y, label: q })).sort((y, q) => y.label.localeCompare(q.label, "zh-Hans-CN"));
3332
3332
  }, [f]);
3333
- ee(() => {
3333
+ Z(() => {
3334
3334
  if (c.length === 0) return;
3335
3335
  const v = new Set(w.map((q) => q.value)), y = c.filter((q) => v.has(q));
3336
3336
  y.length !== c.length && (u(y), xn(y));
3337
3337
  }, [w, c]);
3338
- const E = M((v) => {
3338
+ const $ = M((v) => {
3339
3339
  u(v), xn(v);
3340
- }, []), j = be(() => {
3340
+ }, []), G = be(() => {
3341
3341
  if (c.length === 0) return f;
3342
3342
  const v = new Set(c);
3343
3343
  return f.filter(
@@ -3346,26 +3346,26 @@ function Bn({
3346
3346
  }, [f, c]), { startDate: I, endDate: P } = be(() => {
3347
3347
  const v = St();
3348
3348
  return o === "7d" ? { startDate: v.subtract(7, "day"), endDate: v } : o === "30d" ? { startDate: v.subtract(30, "day"), endDate: v } : o === "90d" ? { startDate: v.subtract(90, "day"), endDate: v } : o === "custom" && d ? { startDate: d[0], endDate: d[1] } : { startDate: null, endDate: null };
3349
- }, [o, d]), F = be(() => {
3350
- if (!I || !P) return j;
3349
+ }, [o, d]), z = be(() => {
3350
+ if (!I || !P) return G;
3351
3351
  const v = I.startOf("day").valueOf(), y = P.endOf("day").valueOf();
3352
- return j.filter((q) => {
3353
- const O = new Date(q.created_at || 0).getTime();
3354
- return O >= v && O <= y;
3352
+ return G.filter((q) => {
3353
+ const H = new Date(q.created_at || 0).getTime();
3354
+ return H >= v && H <= y;
3355
3355
  });
3356
- }, [j, I, P]), U = be(() => {
3356
+ }, [G, I, P]), U = be(() => {
3357
3357
  if (!I || !P) return null;
3358
- const v = I.startOf("day").valueOf(), y = P.endOf("day").valueOf(), q = v - 1, O = q - (y - v);
3359
- let ae = 0, ce = 0, _e = 0;
3360
- for (const he of j) {
3358
+ const v = I.startOf("day").valueOf(), y = P.endOf("day").valueOf(), q = v - 1, H = q - (y - v);
3359
+ let ne = 0, ce = 0, _e = 0;
3360
+ for (const he of G) {
3361
3361
  const Ne = new Date(he.created_at || 0).getTime();
3362
- Ne >= O && Ne <= q && (ae++, he.status === "ACTIVE" && ce++, he.status === "CLOSED" && _e++);
3362
+ Ne >= H && Ne <= q && (ne++, he.status === "ACTIVE" && ce++, he.status === "CLOSED" && _e++);
3363
3363
  }
3364
- const ve = ae > 0 ? Math.round(_e / ae * 100) : 0;
3365
- return { total: ae, active: ce, closed: _e, closeRate: ve };
3366
- }, [j, I, P]), K = be(() => !I || !P ? "全部时间" : `${I.format("YYYY/MM/DD")} – ${P.format(
3364
+ const ve = ne > 0 ? Math.round(_e / ne * 100) : 0;
3365
+ return { total: ne, active: ce, closed: _e, closeRate: ve };
3366
+ }, [G, I, P]), J = be(() => !I || !P ? "全部时间" : `${I.format("YYYY/MM/DD")} – ${P.format(
3367
3367
  "YYYY/MM/DD"
3368
- )}`, [I, P]), Z = be(() => {
3368
+ )}`, [I, P]), X = be(() => {
3369
3369
  if (c.length === 0) return "全部场景";
3370
3370
  if (c.length === 1) {
3371
3371
  const v = w.find((y) => y.value === c[0]);
@@ -3377,43 +3377,43 @@ function Bn({
3377
3377
  v === "custom" && !d && h([St().subtract(30, "day"), St()]), l(v);
3378
3378
  },
3379
3379
  [d]
3380
- ), G = be(() => {
3381
- const v = F.length, y = {}, q = {};
3382
- let O = 0, ae = 0;
3383
- for (const _e of F) {
3380
+ ), F = be(() => {
3381
+ const v = z.length, y = {}, q = {};
3382
+ let H = 0, ne = 0;
3383
+ for (const _e of z) {
3384
3384
  const ve = _e.status || "UNKNOWN";
3385
- y[ve] = (y[ve] || 0) + 1, ve === "CLOSED" && O++, ve === "ACTIVE" && ae++;
3385
+ y[ve] = (y[ve] || 0) + 1, ve === "CLOSED" && H++, ve === "ACTIVE" && ne++;
3386
3386
  const he = _e.scenario_code || Kt, Ne = _e.scenario_name || _e.scenario_code || "未分类";
3387
3387
  q[he] || (q[he] = { count: 0, name: Ne }), q[he].count++;
3388
3388
  }
3389
- const ce = v > 0 ? Math.round(O / v * 100) : 0;
3389
+ const ce = v > 0 ? Math.round(H / v * 100) : 0;
3390
3390
  return {
3391
3391
  total: v,
3392
3392
  byStatus: y,
3393
3393
  byScenario: q,
3394
- closedCount: O,
3395
- activeCount: ae,
3394
+ closedCount: H,
3395
+ activeCount: ne,
3396
3396
  closeRate: ce
3397
3397
  };
3398
- }, [F]), te = be(() => Object.entries(G.byScenario).map(([v, y]) => ({
3398
+ }, [z]), ee = be(() => Object.entries(F.byScenario).map(([v, y]) => ({
3399
3399
  key: v,
3400
3400
  scenario: y.name,
3401
3401
  count: y.count,
3402
- percent: G.total > 0 ? Math.round(y.count / G.total * 100) : 0
3403
- })).sort((v, y) => y.count - v.count), [G]), N = be(() => Object.entries(G.byStatus).map(([v, y]) => ({
3402
+ percent: F.total > 0 ? Math.round(y.count / F.total * 100) : 0
3403
+ })).sort((v, y) => y.count - v.count), [F]), N = be(() => Object.entries(F.byStatus).map(([v, y]) => ({
3404
3404
  key: v,
3405
3405
  status: v,
3406
3406
  label: ra[v] || v,
3407
3407
  count: y,
3408
- percent: G.total > 0 ? Math.round(y / G.total * 100) : 0
3409
- })).sort((v, y) => y.count - v.count), [G]), g = be(() => {
3408
+ percent: F.total > 0 ? Math.round(y / F.total * 100) : 0
3409
+ })).sort((v, y) => y.count - v.count), [F]), g = be(() => {
3410
3410
  let v = 0, y = 0, q = 0;
3411
- for (const ce of F) {
3411
+ for (const ce of z) {
3412
3412
  if (ce.status !== "CLOSED") continue;
3413
3413
  const _e = Array.isArray(ce.close_tags) ? ce.close_tags : [];
3414
3414
  _e.includes("ai_effective") ? v++ : _e.includes("ai_ineffective") ? y++ : q++;
3415
3415
  }
3416
- const O = v + y + q, ae = [
3416
+ const H = v + y + q, ne = [
3417
3417
  {
3418
3418
  key: "ai_effective",
3419
3419
  label: "AI有效",
@@ -3427,27 +3427,27 @@ function Bn({
3427
3427
  color: Jt.ai_ineffective
3428
3428
  }
3429
3429
  ];
3430
- return q > 0 && ae.push({
3430
+ return q > 0 && ne.push({
3431
3431
  key: "unlabeled",
3432
3432
  label: "未标注",
3433
3433
  count: q,
3434
3434
  color: Jt.unlabeled
3435
3435
  }), {
3436
- closedTotal: O,
3437
- rows: ae.filter((ce) => ce.count > 0)
3436
+ closedTotal: H,
3437
+ rows: ne.filter((ce) => ce.count > 0)
3438
3438
  };
3439
- }, [F]);
3440
- ee(() => {
3441
- m === "closed_ai" && G.closedCount === 0 && r("root");
3442
- }, [m, G.closedCount]);
3443
- const z = be(() => {
3439
+ }, [z]);
3440
+ Z(() => {
3441
+ m === "closed_ai" && F.closedCount === 0 && r("root");
3442
+ }, [m, F.closedCount]);
3443
+ const E = be(() => {
3444
3444
  const v = () => ({
3445
3445
  created: 0,
3446
3446
  closed: 0,
3447
3447
  aiEffective: 0,
3448
3448
  aiIneffective: 0
3449
3449
  }), y = {};
3450
- for (const ve of F) {
3450
+ for (const ve of z) {
3451
3451
  const he = (ve.created_at || "").slice(0, 10);
3452
3452
  he && (y[he] || (y[he] = v()), y[he].created++);
3453
3453
  const Ne = ve.close_time;
@@ -3460,19 +3460,19 @@ function Bn({
3460
3460
  }
3461
3461
  }
3462
3462
  }
3463
- let q = null, O = null;
3463
+ let q = null, H = null;
3464
3464
  if (I && P)
3465
- q = I.startOf("day"), O = P.endOf("day");
3465
+ q = I.startOf("day"), H = P.endOf("day");
3466
3466
  else {
3467
3467
  const ve = Object.keys(y).sort();
3468
- ve.length > 0 && (q = St(ve[0]).startOf("day"), O = St().endOf("day"));
3468
+ ve.length > 0 && (q = St(ve[0]).startOf("day"), H = St().endOf("day"));
3469
3469
  }
3470
- if (!q || !O) return [];
3471
- const ae = [];
3470
+ if (!q || !H) return [];
3471
+ const ne = [];
3472
3472
  let ce = 0, _e = q;
3473
- for (; _e.isBefore(O) || _e.isSame(O, "day"); ) {
3473
+ for (; _e.isBefore(H) || _e.isSame(H, "day"); ) {
3474
3474
  const ve = _e.format("YYYY-MM-DD"), he = y[ve] || v();
3475
- ce += he.created, ae.push({
3475
+ ce += he.created, ne.push({
3476
3476
  date: ve,
3477
3477
  created: he.created,
3478
3478
  closed: he.closed,
@@ -3481,9 +3481,9 @@ function Bn({
3481
3481
  aiIneffective: he.aiIneffective
3482
3482
  }), _e = _e.add(1, "day");
3483
3483
  }
3484
- return ae;
3485
- }, [F, I, P]), V = be(() => {
3486
- const v = z.map((y) => y.date.slice(5));
3484
+ return ne;
3485
+ }, [z, I, P]), te = be(() => {
3486
+ const v = E.map((y) => y.date.slice(5));
3487
3487
  return {
3488
3488
  tooltip: {
3489
3489
  trigger: "axis",
@@ -3533,14 +3533,14 @@ function Bn({
3533
3533
  {
3534
3534
  name: "每日新建",
3535
3535
  type: "bar",
3536
- data: z.map((y) => y.created),
3536
+ data: E.map((y) => y.created),
3537
3537
  itemStyle: { color: "#1973cc", borderRadius: [3, 3, 0, 0] },
3538
3538
  barMaxWidth: 14
3539
3539
  },
3540
3540
  {
3541
3541
  name: "每日关单",
3542
3542
  type: "bar",
3543
- data: z.map((y) => y.closed),
3543
+ data: E.map((y) => y.closed),
3544
3544
  itemStyle: { color: "#52c41a", borderRadius: [3, 3, 0, 0] },
3545
3545
  barMaxWidth: 14
3546
3546
  },
@@ -3549,7 +3549,7 @@ function Bn({
3549
3549
  name: "AI有效",
3550
3550
  type: "bar",
3551
3551
  stack: "ai",
3552
- data: z.map((y) => y.aiEffective),
3552
+ data: E.map((y) => y.aiEffective),
3553
3553
  itemStyle: { color: "#13c2c2" },
3554
3554
  barMaxWidth: 14
3555
3555
  },
@@ -3557,7 +3557,7 @@ function Bn({
3557
3557
  name: "AI无效",
3558
3558
  type: "bar",
3559
3559
  stack: "ai",
3560
- data: z.map((y) => y.aiIneffective),
3560
+ data: E.map((y) => y.aiIneffective),
3561
3561
  itemStyle: { color: "#ff7875", borderRadius: [3, 3, 0, 0] },
3562
3562
  barMaxWidth: 14
3563
3563
  },
@@ -3566,7 +3566,7 @@ function Bn({
3566
3566
  name: "累计总量",
3567
3567
  type: "line",
3568
3568
  yAxisIndex: 1,
3569
- data: z.map((y) => y.cumulative),
3569
+ data: E.map((y) => y.cumulative),
3570
3570
  smooth: !0,
3571
3571
  symbol: "circle",
3572
3572
  symbolSize: 5,
@@ -3581,22 +3581,22 @@ function Bn({
3581
3581
  }
3582
3582
  ]
3583
3583
  };
3584
- }, [z]), ne = be(() => {
3585
- const v = m === "closed_ai", y = v ? g.rows.map((O) => ({
3586
- name: O.label,
3587
- value: O.count,
3588
- color: O.color
3589
- })) : N.map((O) => ({
3590
- name: O.label,
3591
- value: O.count,
3592
- color: kd[O.status] || Nd
3593
- })), q = v ? g.closedTotal : G.total;
3584
+ }, [E]), se = be(() => {
3585
+ const v = m === "closed_ai", y = v ? g.rows.map((H) => ({
3586
+ name: H.label,
3587
+ value: H.count,
3588
+ color: H.color
3589
+ })) : N.map((H) => ({
3590
+ name: H.label,
3591
+ value: H.count,
3592
+ color: kd[H.status] || Nd
3593
+ })), q = v ? g.closedTotal : F.total;
3594
3594
  return {
3595
3595
  tooltip: {
3596
3596
  trigger: "item",
3597
3597
  textStyle: { fontSize: 12 },
3598
- formatter: (O) => `${Tn(O.name)}<br/>数量:${O.value}<br/>占比:${Sn(
3599
- O.value,
3598
+ formatter: (H) => `${Tn(H.name)}<br/>数量:${H.value}<br/>占比:${Sn(
3599
+ H.value,
3600
3600
  q
3601
3601
  )}%`
3602
3602
  },
@@ -3609,9 +3609,9 @@ function Bn({
3609
3609
  itemHeight: 8,
3610
3610
  itemGap: 14,
3611
3611
  textStyle: { fontSize: 12, color: "#595959" },
3612
- formatter: (O) => {
3613
- const ae = y.find((ce) => ce.name === O);
3614
- return ae ? `${O} ${ae.value}` : O;
3612
+ formatter: (H) => {
3613
+ const ne = y.find((ce) => ce.name === H);
3614
+ return ne ? `${H} ${ne.value}` : H;
3615
3615
  }
3616
3616
  },
3617
3617
  series: [
@@ -3624,21 +3624,21 @@ function Bn({
3624
3624
  itemStyle: { borderColor: "#fff", borderWidth: 2, borderRadius: 4 },
3625
3625
  label: { show: !1 },
3626
3626
  emphasis: { scaleSize: 4 },
3627
- data: y.map((O) => ({
3628
- name: O.name,
3629
- value: O.value,
3630
- itemStyle: { color: O.color }
3627
+ data: y.map((H) => ({
3628
+ name: H.name,
3629
+ value: H.value,
3630
+ itemStyle: { color: H.color }
3631
3631
  }))
3632
3632
  }
3633
3633
  ]
3634
3634
  };
3635
- }, [m, N, g, G.total]), _ = M(
3635
+ }, [m, N, g, F.total]), _ = M(
3636
3636
  (v) => {
3637
- m === "root" && (v == null ? void 0 : v.name) === "关单" && G.closedCount > 0 && r("closed_ai");
3637
+ m === "root" && (v == null ? void 0 : v.name) === "关单" && F.closedCount > 0 && r("closed_ai");
3638
3638
  },
3639
- [m, G.closedCount]
3640
- ), $ = be(() => {
3641
- const v = [...te].reverse();
3639
+ [m, F.closedCount]
3640
+ ), O = be(() => {
3641
+ const v = [...ee].reverse();
3642
3642
  return {
3643
3643
  tooltip: {
3644
3644
  trigger: "axis",
@@ -3646,8 +3646,8 @@ function Bn({
3646
3646
  textStyle: { fontSize: 12 },
3647
3647
  // 通过 dataIndex 回查源数组,tooltip 展示完整场景名 + 数量 + 占比(1 位小数)
3648
3648
  formatter: (y) => {
3649
- const q = Array.isArray(y) ? y[0] : y, O = v[q.dataIndex];
3650
- return O ? `${Tn(O.scenario)}<br/>数量:${O.count}<br/>占比:${Sn(O.count, G.total)}%` : "";
3649
+ const q = Array.isArray(y) ? y[0] : y, H = v[q.dataIndex];
3650
+ return H ? `${Tn(H.scenario)}<br/>数量:${H.count}<br/>占比:${Sn(H.count, F.total)}%` : "";
3651
3651
  }
3652
3652
  },
3653
3653
  // containLabel 让长类目标签自动占位,避免被容器裁切
@@ -3703,42 +3703,42 @@ function Bn({
3703
3703
  }
3704
3704
  ]
3705
3705
  };
3706
- }, [te, G.total]), A = (v, y, q) => {
3706
+ }, [ee, F.total]), A = (v, y, q) => {
3707
3707
  if (y === null)
3708
- return /* @__PURE__ */ e("span", { className: X.kpiDeltaFlat, children: "全部时间累计值" });
3709
- const O = v - y;
3710
- if (O === 0)
3711
- return /* @__PURE__ */ n("span", { className: X.kpiDeltaFlat, children: [
3708
+ return /* @__PURE__ */ e("span", { className: Q.kpiDeltaFlat, children: "全部时间累计值" });
3709
+ const H = v - y;
3710
+ if (H === 0)
3711
+ return /* @__PURE__ */ n("span", { className: Q.kpiDeltaFlat, children: [
3712
3712
  /* @__PURE__ */ e(Za, {}),
3713
3713
  " 与上期持平"
3714
3714
  ] });
3715
- const ae = O > 0;
3716
- return /* @__PURE__ */ n("span", { className: ae ? X.kpiDeltaUp : X.kpiDeltaDown, children: [
3717
- ae ? /* @__PURE__ */ e(es, {}) : /* @__PURE__ */ e(ts, {}),
3718
- Math.abs(O),
3715
+ const ne = H > 0;
3716
+ return /* @__PURE__ */ n("span", { className: ne ? Q.kpiDeltaUp : Q.kpiDeltaDown, children: [
3717
+ ne ? /* @__PURE__ */ e(es, {}) : /* @__PURE__ */ e(ts, {}),
3718
+ Math.abs(H),
3719
3719
  q,
3720
- /* @__PURE__ */ e("span", { className: X.kpiDeltaLabel, children: "较上一周期" })
3720
+ /* @__PURE__ */ e("span", { className: Q.kpiDeltaLabel, children: "较上一周期" })
3721
3721
  ] });
3722
- }, Y = [
3722
+ }, K = [
3723
3723
  {
3724
3724
  key: "total",
3725
3725
  label: "参与场景实例",
3726
3726
  icon: /* @__PURE__ */ e(Mt, {}),
3727
- chipClass: X.chipBlue,
3728
- value: G.total,
3727
+ chipClass: Q.chipBlue,
3728
+ value: F.total,
3729
3729
  suffix: "个",
3730
- delta: A(G.total, U ? U.total : null, "个"),
3730
+ delta: A(F.total, U ? U.total : null, "个"),
3731
3731
  drillable: !0
3732
3732
  },
3733
3733
  {
3734
3734
  key: "active",
3735
3735
  label: "活跃中",
3736
3736
  icon: /* @__PURE__ */ e(Ja, {}),
3737
- chipClass: X.chipCyan,
3738
- value: G.activeCount,
3737
+ chipClass: Q.chipCyan,
3738
+ value: F.activeCount,
3739
3739
  suffix: "个",
3740
3740
  delta: A(
3741
- G.activeCount,
3741
+ F.activeCount,
3742
3742
  U ? U.active : null,
3743
3743
  "个"
3744
3744
  ),
@@ -3749,11 +3749,11 @@ function Bn({
3749
3749
  key: "closed",
3750
3750
  label: "已关单",
3751
3751
  icon: /* @__PURE__ */ e(mt, {}),
3752
- chipClass: X.chipGreen,
3753
- value: G.closedCount,
3752
+ chipClass: Q.chipGreen,
3753
+ value: F.closedCount,
3754
3754
  suffix: "个",
3755
3755
  delta: A(
3756
- G.closedCount,
3756
+ F.closedCount,
3757
3757
  U ? U.closed : null,
3758
3758
  "个"
3759
3759
  ),
@@ -3764,46 +3764,46 @@ function Bn({
3764
3764
  key: "rate",
3765
3765
  label: "关单率",
3766
3766
  icon: /* @__PURE__ */ e(Ka, {}),
3767
- chipClass: X.chipAmber,
3768
- value: G.closeRate,
3767
+ chipClass: Q.chipAmber,
3768
+ value: F.closeRate,
3769
3769
  suffix: "%",
3770
3770
  delta: A(
3771
- G.closeRate,
3771
+ F.closeRate,
3772
3772
  U ? U.closeRate : null,
3773
3773
  "%"
3774
3774
  ),
3775
- progress: G.closeRate,
3775
+ progress: F.closeRate,
3776
3776
  // 卡内嵌细进度条,替代原独立的全宽“关单率”卡
3777
3777
  drillable: !1
3778
3778
  // 比率无对应明细列表,不提供下钻
3779
3779
  }
3780
3780
  ];
3781
- return /* @__PURE__ */ n("div", { className: X.page, children: [
3782
- /* @__PURE__ */ n("div", { className: X.pageHeader, children: [
3783
- /* @__PURE__ */ n("div", { className: X.headerLeft, children: [
3784
- /* @__PURE__ */ e("span", { className: X.pageTitle, children: "数据概览" }),
3785
- /* @__PURE__ */ n("span", { className: X.headerMeta, children: [
3786
- K,
3787
- /* @__PURE__ */ e("span", { className: X.headerDot, children: "·" }),
3788
- Z,
3789
- /* @__PURE__ */ e("span", { className: X.headerDot, children: "·" }),
3781
+ return /* @__PURE__ */ n("div", { className: Q.page, children: [
3782
+ /* @__PURE__ */ n("div", { className: Q.pageHeader, children: [
3783
+ /* @__PURE__ */ n("div", { className: Q.headerLeft, children: [
3784
+ /* @__PURE__ */ e("span", { className: Q.pageTitle, children: "数据概览" }),
3785
+ /* @__PURE__ */ n("span", { className: Q.headerMeta, children: [
3786
+ J,
3787
+ /* @__PURE__ */ e("span", { className: Q.headerDot, children: "·" }),
3788
+ X,
3789
+ /* @__PURE__ */ e("span", { className: Q.headerDot, children: "·" }),
3790
3790
  "共",
3791
3791
  " ",
3792
- /* @__PURE__ */ e("b", { children: F.length }),
3792
+ /* @__PURE__ */ e("b", { children: z.length }),
3793
3793
  " 个场景实例"
3794
3794
  ] })
3795
3795
  ] }),
3796
- /* @__PURE__ */ n("div", { className: X.headerRight, children: [
3796
+ /* @__PURE__ */ n("div", { className: Q.headerRight, children: [
3797
3797
  /* @__PURE__ */ e(
3798
3798
  ut,
3799
3799
  {
3800
- className: X.scenarioSelect,
3800
+ className: Q.scenarioSelect,
3801
3801
  mode: "multiple",
3802
3802
  allowClear: !0,
3803
3803
  maxTagCount: "responsive",
3804
3804
  placeholder: "全部场景",
3805
3805
  value: c,
3806
- onChange: (v) => E(v),
3806
+ onChange: (v) => $(v),
3807
3807
  options: w,
3808
3808
  showSearch: !0,
3809
3809
  optionFilterProp: "label",
@@ -3835,10 +3835,10 @@ function Bn({
3835
3835
  )
3836
3836
  ] })
3837
3837
  ] }),
3838
- /* @__PURE__ */ e("div", { className: X.kpiGrid, children: Y.map((v) => /* @__PURE__ */ n(
3838
+ /* @__PURE__ */ e("div", { className: Q.kpiGrid, children: K.map((v) => /* @__PURE__ */ n(
3839
3839
  "div",
3840
3840
  {
3841
- className: `${X.kpiCard} ${v.drillable ? X.kpiCardClickable : ""}`,
3841
+ className: `${Q.kpiCard} ${v.drillable ? Q.kpiCardClickable : ""}`,
3842
3842
  onClick: v.drillable ? () => a == null ? void 0 : a(v.drillStatus) : void 0,
3843
3843
  role: v.drillable ? "button" : void 0,
3844
3844
  tabIndex: v.drillable ? 0 : void 0,
@@ -3846,34 +3846,34 @@ function Bn({
3846
3846
  (y.key === "Enter" || y.key === " ") && (y.preventDefault(), a == null || a(v.drillStatus));
3847
3847
  } : void 0,
3848
3848
  children: [
3849
- /* @__PURE__ */ n("div", { className: X.kpiTop, children: [
3850
- /* @__PURE__ */ e("span", { className: X.kpiLabel, children: v.label }),
3851
- /* @__PURE__ */ e("span", { className: `${X.kpiIcon} ${v.chipClass}`, children: v.icon })
3849
+ /* @__PURE__ */ n("div", { className: Q.kpiTop, children: [
3850
+ /* @__PURE__ */ e("span", { className: Q.kpiLabel, children: v.label }),
3851
+ /* @__PURE__ */ e("span", { className: `${Q.kpiIcon} ${v.chipClass}`, children: v.icon })
3852
3852
  ] }),
3853
- /* @__PURE__ */ n("div", { className: X.kpiValue, children: [
3853
+ /* @__PURE__ */ n("div", { className: Q.kpiValue, children: [
3854
3854
  v.value,
3855
- /* @__PURE__ */ e("span", { className: X.kpiSuffix, children: v.suffix })
3855
+ /* @__PURE__ */ e("span", { className: Q.kpiSuffix, children: v.suffix })
3856
3856
  ] }),
3857
- typeof v.progress == "number" && /* @__PURE__ */ e("div", { className: X.rateTrack, children: /* @__PURE__ */ e(
3857
+ typeof v.progress == "number" && /* @__PURE__ */ e("div", { className: Q.rateTrack, children: /* @__PURE__ */ e(
3858
3858
  "div",
3859
3859
  {
3860
- className: X.rateFill,
3860
+ className: Q.rateFill,
3861
3861
  style: { width: `${Math.min(v.progress, 100)}%` }
3862
3862
  }
3863
3863
  ) }),
3864
- /* @__PURE__ */ e("div", { className: X.kpiFooter, children: v.delta })
3864
+ /* @__PURE__ */ e("div", { className: Q.kpiFooter, children: v.delta })
3865
3865
  ]
3866
3866
  },
3867
3867
  v.key
3868
3868
  )) }),
3869
- /* @__PURE__ */ n("div", { className: X.chartCard, children: [
3870
- /* @__PURE__ */ n("div", { className: X.chartHeader, children: [
3871
- /* @__PURE__ */ e("span", { className: X.chartTitle, children: "每日趋势" }),
3872
- /* @__PURE__ */ e("span", { className: X.chartSub, children: "新建 / 关单 / 累计 / AI 有效性" })
3869
+ /* @__PURE__ */ n("div", { className: Q.chartCard, children: [
3870
+ /* @__PURE__ */ n("div", { className: Q.chartHeader, children: [
3871
+ /* @__PURE__ */ e("span", { className: Q.chartTitle, children: "每日趋势" }),
3872
+ /* @__PURE__ */ e("span", { className: Q.chartSub, children: "新建 / 关单 / 累计 / AI 有效性" })
3873
3873
  ] }),
3874
- z.length > 0 ? /* @__PURE__ */ e(Vt, { option: V, height: 300 }) : (
3874
+ E.length > 0 ? /* @__PURE__ */ e(Vt, { option: te, height: 300 }) : (
3875
3875
  // 数据为空:固定高度占位,保持布局稳定
3876
- /* @__PURE__ */ e("div", { className: X.chartEmpty, children: /* @__PURE__ */ e(
3876
+ /* @__PURE__ */ e("div", { className: Q.chartEmpty, children: /* @__PURE__ */ e(
3877
3877
  Me,
3878
3878
  {
3879
3879
  image: Me.PRESENTED_IMAGE_SIMPLE,
@@ -3882,35 +3882,35 @@ function Bn({
3882
3882
  ) })
3883
3883
  )
3884
3884
  ] }),
3885
- /* @__PURE__ */ n("div", { className: X.chartRow, children: [
3886
- /* @__PURE__ */ n("div", { className: `${X.chartCard} ${X.chartCardNarrow}`, children: [
3887
- /* @__PURE__ */ e("div", { className: X.chartHeader, children: m === "closed_ai" ? /* @__PURE__ */ n(ge, { children: [
3888
- /* @__PURE__ */ n("span", { className: X.chartBreadcrumb, children: [
3885
+ /* @__PURE__ */ n("div", { className: Q.chartRow, children: [
3886
+ /* @__PURE__ */ n("div", { className: `${Q.chartCard} ${Q.chartCardNarrow}`, children: [
3887
+ /* @__PURE__ */ e("div", { className: Q.chartHeader, children: m === "closed_ai" ? /* @__PURE__ */ n(ge, { children: [
3888
+ /* @__PURE__ */ n("span", { className: Q.chartBreadcrumb, children: [
3889
3889
  /* @__PURE__ */ e(
3890
3890
  "button",
3891
3891
  {
3892
3892
  type: "button",
3893
- className: X.chartBreadcrumbLink,
3893
+ className: Q.chartBreadcrumbLink,
3894
3894
  onClick: () => r("root"),
3895
3895
  children: "状态分布"
3896
3896
  }
3897
3897
  ),
3898
- /* @__PURE__ */ e("span", { className: X.chartBreadcrumbSep, children: "/" }),
3899
- /* @__PURE__ */ e("span", { className: X.chartTitle, children: "关单" })
3898
+ /* @__PURE__ */ e("span", { className: Q.chartBreadcrumbSep, children: "/" }),
3899
+ /* @__PURE__ */ e("span", { className: Q.chartTitle, children: "关单" })
3900
3900
  ] }),
3901
- /* @__PURE__ */ e("span", { className: X.chartSub, children: "关单反馈分布" })
3901
+ /* @__PURE__ */ e("span", { className: Q.chartSub, children: "关单反馈分布" })
3902
3902
  ] }) : /* @__PURE__ */ n(ge, { children: [
3903
- /* @__PURE__ */ e("span", { className: X.chartTitle, children: "状态分布" }),
3904
- G.closedCount > 0 && /* @__PURE__ */ e("span", { className: X.chartSub, children: "点击关单可下钻" })
3903
+ /* @__PURE__ */ e("span", { className: Q.chartTitle, children: "状态分布" }),
3904
+ F.closedCount > 0 && /* @__PURE__ */ e("span", { className: Q.chartSub, children: "点击关单可下钻" })
3905
3905
  ] }) }),
3906
3906
  (m === "root" ? N.length > 0 : g.rows.length > 0) ? /* @__PURE__ */ e(
3907
3907
  Vt,
3908
3908
  {
3909
- option: ne,
3909
+ option: se,
3910
3910
  height: 240,
3911
3911
  onEvents: { click: _ }
3912
3912
  }
3913
- ) : /* @__PURE__ */ e("div", { className: X.chartEmpty, children: /* @__PURE__ */ e(
3913
+ ) : /* @__PURE__ */ e("div", { className: Q.chartEmpty, children: /* @__PURE__ */ e(
3914
3914
  Me,
3915
3915
  {
3916
3916
  image: Me.PRESENTED_IMAGE_SIMPLE,
@@ -3918,21 +3918,21 @@ function Bn({
3918
3918
  }
3919
3919
  ) })
3920
3920
  ] }),
3921
- /* @__PURE__ */ n("div", { className: `${X.chartCard} ${X.chartCardWide}`, children: [
3922
- /* @__PURE__ */ n("div", { className: X.chartHeader, children: [
3923
- /* @__PURE__ */ e("span", { className: X.chartTitle, children: "场景分布" }),
3924
- /* @__PURE__ */ e("span", { className: X.chartSub, children: "按实例数量降序" })
3921
+ /* @__PURE__ */ n("div", { className: `${Q.chartCard} ${Q.chartCardWide}`, children: [
3922
+ /* @__PURE__ */ n("div", { className: Q.chartHeader, children: [
3923
+ /* @__PURE__ */ e("span", { className: Q.chartTitle, children: "场景分布" }),
3924
+ /* @__PURE__ */ e("span", { className: Q.chartSub, children: "按实例数量降序" })
3925
3925
  ] }),
3926
- te.length > 0 ? (
3926
+ ee.length > 0 ? (
3927
3927
  // 数据非空:横向条形图,高度随场景数自适应(每条 38px,最小 240)
3928
3928
  /* @__PURE__ */ e(
3929
3929
  Vt,
3930
3930
  {
3931
- option: $,
3932
- height: Math.max(240, te.length * 38 + 24)
3931
+ option: O,
3932
+ height: Math.max(240, ee.length * 38 + 24)
3933
3933
  }
3934
3934
  )
3935
- ) : /* @__PURE__ */ e("div", { className: X.chartEmpty, children: /* @__PURE__ */ e(
3935
+ ) : /* @__PURE__ */ e("div", { className: Q.chartEmpty, children: /* @__PURE__ */ e(
3936
3936
  Me,
3937
3937
  {
3938
3938
  image: Me.PRESENTED_IMAGE_SIMPLE,
@@ -3950,15 +3950,15 @@ function hg({
3950
3950
  hideTabs: o = !1
3951
3951
  }) {
3952
3952
  const l = Le((P) => P.projects), d = Le((P) => P.currentUser), h = Le((P) => P.loadProjects), [c, u] = i("personal"), m = t ?? c, r = s ?? u, [f, w] = i(null);
3953
- ee(() => {
3953
+ Z(() => {
3954
3954
  h();
3955
3955
  }, [h]);
3956
- const E = M(
3956
+ const $ = M(
3957
3957
  (P) => {
3958
3958
  a(P);
3959
3959
  },
3960
3960
  [a]
3961
- ), j = M(
3961
+ ), G = M(
3962
3962
  (P) => {
3963
3963
  w(P ?? null), s("projects");
3964
3964
  },
@@ -3982,7 +3982,7 @@ function hg({
3982
3982
  children: o ? (
3983
3983
  /* 外层 Tab 已控制导航,直接渲染当前 tab 内容 */
3984
3984
  /* @__PURE__ */ n("div", { style: { flex: 1, background: "#fff", overflow: "auto" }, children: [
3985
- m === "workbench" && /* @__PURE__ */ e(In, { onProjectCreated: E }),
3985
+ m === "workbench" && /* @__PURE__ */ e(In, { onProjectCreated: $ }),
3986
3986
  m === "projects" && /* @__PURE__ */ e(
3987
3987
  Ln,
3988
3988
  {
@@ -3995,7 +3995,7 @@ function hg({
3995
3995
  {
3996
3996
  projects: l,
3997
3997
  currentUser: d,
3998
- onNavigateToProjects: j
3998
+ onNavigateToProjects: G
3999
3999
  }
4000
4000
  )
4001
4001
  ] })
@@ -4014,7 +4014,7 @@ function hg({
4014
4014
  {
4015
4015
  key: "workbench",
4016
4016
  label: "智能工作台",
4017
- children: /* @__PURE__ */ e(In, { onProjectCreated: E })
4017
+ children: /* @__PURE__ */ e(In, { onProjectCreated: $ })
4018
4018
  },
4019
4019
  {
4020
4020
  key: "projects",
@@ -4035,7 +4035,7 @@ function hg({
4035
4035
  {
4036
4036
  projects: l,
4037
4037
  currentUser: d,
4038
- onNavigateToProjects: j
4038
+ onNavigateToProjects: G
4039
4039
  }
4040
4040
  )
4041
4041
  }
@@ -4372,23 +4372,23 @@ function ma() {
4372
4372
  }
4373
4373
  }, [t]), w = M(() => {
4374
4374
  o(JSON.stringify(t)), d("");
4375
- }, [t]), E = M(() => {
4375
+ }, [t]), $ = M(() => {
4376
4376
  try {
4377
4377
  const I = JSON.parse(t);
4378
4378
  o(typeof I == "string" ? I : JSON.stringify(I, null, 2)), d("");
4379
4379
  } catch (I) {
4380
4380
  d(I instanceof Error ? I.message : "反转义失败");
4381
4381
  }
4382
- }, [t]), j = M(() => {
4382
+ }, [t]), G = M(() => {
4383
4383
  if (h.trim())
4384
4384
  try {
4385
4385
  const I = JSON.parse(t), P = h.replace(/^\$\.?/, "").split(/[\.\[\]]+/).filter(Boolean);
4386
- let F = I;
4386
+ let z = I;
4387
4387
  for (const U of P) {
4388
- if (F == null) break;
4389
- F = F[U] ?? F[Number(U)];
4388
+ if (z == null) break;
4389
+ z = z[U] ?? z[Number(U)];
4390
4390
  }
4391
- m(JSON.stringify(F, null, 2));
4391
+ m(JSON.stringify(z, null, 2));
4392
4392
  } catch {
4393
4393
  m("查询失败,请检查路径或 JSON");
4394
4394
  }
@@ -4398,7 +4398,7 @@ function ma() {
4398
4398
  /* @__PURE__ */ e(R, { type: "primary", onClick: r, children: "格式化" }),
4399
4399
  /* @__PURE__ */ e(R, { onClick: f, children: "压缩" }),
4400
4400
  /* @__PURE__ */ e(R, { onClick: w, children: "转义" }),
4401
- /* @__PURE__ */ e(R, { onClick: E, children: "反转义" }),
4401
+ /* @__PURE__ */ e(R, { onClick: $, children: "反转义" }),
4402
4402
  a && /* @__PURE__ */ e(Ee, { text: a })
4403
4403
  ] }),
4404
4404
  /* @__PURE__ */ n(Ye, { gutter: 12, style: { marginBottom: 12 }, children: [
@@ -4435,10 +4435,10 @@ function ma() {
4435
4435
  placeholder: "JSONPath,如 $.store.book[0].title",
4436
4436
  value: h,
4437
4437
  onChange: (I) => c(I.target.value),
4438
- onPressEnter: j
4438
+ onPressEnter: G
4439
4439
  }
4440
4440
  ),
4441
- /* @__PURE__ */ e(R, { type: "primary", onClick: j, children: "查询" })
4441
+ /* @__PURE__ */ e(R, { type: "primary", onClick: G, children: "查询" })
4442
4442
  ] }),
4443
4443
  u && /* @__PURE__ */ e(
4444
4444
  ye,
@@ -4459,13 +4459,13 @@ function Iu() {
4459
4459
  d(r.textContent || "XML 解析失败");
4460
4460
  return;
4461
4461
  }
4462
- let w = new XMLSerializer().serializeToString(m), E = 0;
4462
+ let w = new XMLSerializer().serializeToString(m), $ = 0;
4463
4463
  w = w.replace(/></g, `>
4464
4464
  <`).split(`
4465
- `).map((j) => {
4466
- j.match(/^<\/\w/) && (E -= 1);
4467
- const I = " ".repeat(Math.max(0, E));
4468
- return j.match(/^<\w[^/]*[^/]>$/) && (E += 1), I + j;
4465
+ `).map((G) => {
4466
+ G.match(/^<\/\w/) && ($ -= 1);
4467
+ const I = " ".repeat(Math.max(0, $));
4468
+ return G.match(/^<\w[^/]*[^/]>$/) && ($ += 1), I + G;
4469
4469
  }).join(`
4470
4470
  `), o(w), d("");
4471
4471
  } catch (u) {
@@ -4638,13 +4638,13 @@ function Ru() {
4638
4638
  accept: "image/*",
4639
4639
  style: { display: "none" },
4640
4640
  onChange: (r) => {
4641
- var E;
4642
- const f = (E = r.target.files) == null ? void 0 : E[0];
4641
+ var $;
4642
+ const f = ($ = r.target.files) == null ? void 0 : $[0];
4643
4643
  if (!f) return;
4644
4644
  const w = new FileReader();
4645
4645
  w.onload = () => {
4646
- const j = w.result;
4647
- o(j), d(j);
4646
+ const G = w.result;
4647
+ o(G), d(G);
4648
4648
  }, w.readAsDataURL(f);
4649
4649
  }
4650
4650
  }
@@ -4751,7 +4751,7 @@ function Du() {
4751
4751
  ] })
4752
4752
  ] }),
4753
4753
  l && /* @__PURE__ */ e("div", { className: B.parsedBox, children: Object.entries(l).map(([m, r]) => /* @__PURE__ */ n("div", { style: { marginBottom: 4 }, children: [
4754
- /* @__PURE__ */ e(J, { color: "blue", style: { minWidth: 70 }, children: m }),
4754
+ /* @__PURE__ */ e(V, { color: "blue", style: { minWidth: 70 }, children: m }),
4755
4755
  /* @__PURE__ */ e(tt, { style: { whiteSpace: "pre-wrap" }, children: r })
4756
4756
  ] }, m)) })
4757
4757
  ] });
@@ -4839,9 +4839,9 @@ function Mu() {
4839
4839
  a && !("error" in a) && /* @__PURE__ */ n(Ye, { gutter: 12, children: [
4840
4840
  /* @__PURE__ */ n(we, { span: 12, children: [
4841
4841
  /* @__PURE__ */ n("div", { style: { marginBottom: 8 }, children: [
4842
- /* @__PURE__ */ e(J, { color: "red", style: { fontSize: 13, padding: "2px 10px" }, children: "Header" }),
4842
+ /* @__PURE__ */ e(V, { color: "red", style: { fontSize: 13, padding: "2px 10px" }, children: "Header" }),
4843
4843
  (o == null ? void 0 : o.expired) !== void 0 && /* @__PURE__ */ e(
4844
- J,
4844
+ V,
4845
4845
  {
4846
4846
  color: o.expired ? "error" : "success",
4847
4847
  style: { float: "right" },
@@ -4853,7 +4853,7 @@ function Mu() {
4853
4853
  ] }),
4854
4854
  /* @__PURE__ */ n(we, { span: 12, children: [
4855
4855
  /* @__PURE__ */ e(
4856
- J,
4856
+ V,
4857
4857
  {
4858
4858
  color: "green",
4859
4859
  style: { fontSize: 13, padding: "2px 10px", marginBottom: 8 },
@@ -4915,7 +4915,7 @@ function $u() {
4915
4915
  }
4916
4916
  ),
4917
4917
  l && /* @__PURE__ */ n("div", { className: B.hashResult, children: [
4918
- /* @__PURE__ */ e(J, { children: a }),
4918
+ /* @__PURE__ */ e(V, { children: a }),
4919
4919
  /* @__PURE__ */ e("code", { className: B.hashCode, children: l })
4920
4920
  ] })
4921
4921
  ] });
@@ -4989,7 +4989,7 @@ function Hu() {
4989
4989
  h && /* @__PURE__ */ e(Ee, { text: h })
4990
4990
  ] }),
4991
4991
  h && /* @__PURE__ */ n("div", { className: B.hashResult, children: [
4992
- /* @__PURE__ */ n(J, { children: [
4992
+ /* @__PURE__ */ n(V, { children: [
4993
4993
  "HMAC-",
4994
4994
  l
4995
4995
  ] }),
@@ -5010,7 +5010,7 @@ function ju(t, s) {
5010
5010
  }
5011
5011
  function Gu() {
5012
5012
  const [t, s] = i(""), [a, o] = i(""), [l, d] = i(!0), [h, c] = i({ add: 0, remove: 0 }), u = Re(null);
5013
- return ee(() => {
5013
+ return Z(() => {
5014
5014
  if (!t && !a) {
5015
5015
  c({ add: 0, remove: 0 });
5016
5016
  return;
@@ -5063,12 +5063,12 @@ function Gu() {
5063
5063
  }
5064
5064
  ),
5065
5065
  (t || a) && /* @__PURE__ */ n(ge, { children: [
5066
- /* @__PURE__ */ n(J, { color: "success", children: [
5066
+ /* @__PURE__ */ n(V, { color: "success", children: [
5067
5067
  "+",
5068
5068
  h.add,
5069
5069
  " 行新增"
5070
5070
  ] }),
5071
- /* @__PURE__ */ n(J, { color: "error", children: [
5071
+ /* @__PURE__ */ n(V, { color: "error", children: [
5072
5072
  "-",
5073
5073
  h.remove,
5074
5074
  " 行删除"
@@ -5155,7 +5155,7 @@ function Wu() {
5155
5155
  gap: 8
5156
5156
  },
5157
5157
  children: a.map((o) => /* @__PURE__ */ n("div", { className: B.caseRow, children: [
5158
- /* @__PURE__ */ e(J, { style: { minWidth: 100 }, children: o.label }),
5158
+ /* @__PURE__ */ e(V, { style: { minWidth: 100 }, children: o.label }),
5159
5159
  /* @__PURE__ */ e("code", { style: { flex: 1, fontSize: 13 }, children: o.value || "-" }),
5160
5160
  o.value && /* @__PURE__ */ e(Ee, { text: o.value })
5161
5161
  ] }, o.label))
@@ -5204,12 +5204,12 @@ function Vu() {
5204
5204
  try {
5205
5205
  const f = [], w = new RegExp(t, a);
5206
5206
  if (a.includes("g")) {
5207
- let E;
5208
- for (; (E = w.exec(l)) !== null && (f.push(E[0]), E[0] !== ""); )
5207
+ let $;
5208
+ for (; ($ = w.exec(l)) !== null && (f.push($[0]), $[0] !== ""); )
5209
5209
  ;
5210
5210
  } else {
5211
- const E = w.exec(l);
5212
- E && f.push(E[0]);
5211
+ const $ = w.exec(l);
5212
+ $ && f.push($[0]);
5213
5213
  }
5214
5214
  c(f), m("");
5215
5215
  } catch (f) {
@@ -5253,7 +5253,7 @@ function Vu() {
5253
5253
  }
5254
5254
  ),
5255
5255
  u ? /* @__PURE__ */ e(tt, { type: "danger", children: u }) : h.length > 0 ? /* @__PURE__ */ n("div", { children: [
5256
- /* @__PURE__ */ e("div", { style: { marginBottom: 6 }, children: /* @__PURE__ */ n(J, { color: "green", children: [
5256
+ /* @__PURE__ */ e("div", { style: { marginBottom: 6 }, children: /* @__PURE__ */ n(V, { color: "green", children: [
5257
5257
  "匹配 ",
5258
5258
  h.length,
5259
5259
  " 处"
@@ -5283,8 +5283,8 @@ function Ju() {
5283
5283
  for (let f = 0; f < Math.max(1, Math.min(a, 50)); f++)
5284
5284
  r.push(
5285
5285
  "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (w) => {
5286
- const E = Math.random() * 16 | 0;
5287
- return (w === "x" ? E : E & 3 | 8).toString(16);
5286
+ const $ = Math.random() * 16 | 0;
5287
+ return (w === "x" ? $ : $ & 3 | 8).toString(16);
5288
5288
  })
5289
5289
  );
5290
5290
  s(r), c((f) => [...r, ...f].slice(0, 20));
@@ -5444,19 +5444,19 @@ function Ku() {
5444
5444
  const m = Number(t), r = new Date(m > 1e12 ? m : m * 1e3);
5445
5445
  return /* @__PURE__ */ n(ge, { children: [
5446
5446
  /* @__PURE__ */ n("div", { children: [
5447
- /* @__PURE__ */ e(J, { color: "blue", children: "ISO 8601" }),
5447
+ /* @__PURE__ */ e(V, { color: "blue", children: "ISO 8601" }),
5448
5448
  r.toISOString()
5449
5449
  ] }),
5450
5450
  /* @__PURE__ */ n("div", { children: [
5451
- /* @__PURE__ */ e(J, { color: "blue", children: "本地时间" }),
5451
+ /* @__PURE__ */ e(V, { color: "blue", children: "本地时间" }),
5452
5452
  r.toLocaleString()
5453
5453
  ] }),
5454
5454
  /* @__PURE__ */ n("div", { children: [
5455
- /* @__PURE__ */ e(J, { color: "blue", children: "UTC" }),
5455
+ /* @__PURE__ */ e(V, { color: "blue", children: "UTC" }),
5456
5456
  r.toUTCString()
5457
5457
  ] }),
5458
5458
  /* @__PURE__ */ n("div", { children: [
5459
- /* @__PURE__ */ e(J, { color: "blue", children: "Unix(ms)" }),
5459
+ /* @__PURE__ */ e(V, { color: "blue", children: "Unix(ms)" }),
5460
5460
  r.getTime()
5461
5461
  ] })
5462
5462
  ] });
@@ -5483,10 +5483,10 @@ function Yu() {
5483
5483
  second: "2-digit"
5484
5484
  })
5485
5485
  );
5486
- const [f, w, E, j, I, P] = t.trim().split(/\s+/), F = t.trim().split(/\s+/).length === 6, U = [], K = (W, G) => W === "*" ? null : `${W} ${G}`;
5487
- F && K(f, "秒") && U.push(K(f, "秒")), K(w, "分") && U.push(K(w, "分")), K(E, "时") && U.push(K(E, "时")), K(j, "日(每月)") && U.push(K(j, "日(每月)")), K(I, "月") && U.push(K(I, "月")), K(P, "星期") && U.push(K(P, "星期"));
5488
- const Z = U.length ? U.join(",") + " 触发" : "每分钟触发一次";
5489
- o({ desc: Z, next: r }), d("");
5486
+ const [f, w, $, G, I, P] = t.trim().split(/\s+/), z = t.trim().split(/\s+/).length === 6, U = [], J = (W, F) => W === "*" ? null : `${W} ${F}`;
5487
+ z && J(f, "秒") && U.push(J(f, "秒")), J(w, "分") && U.push(J(w, "分")), J($, "时") && U.push(J($, "时")), J(G, "日(每月)") && U.push(J(G, "日(每月)")), J(I, "月") && U.push(J(I, "月")), J(P, "星期") && U.push(J(P, "星期"));
5488
+ const X = U.length ? U.join(",") + " 触发" : "每分钟触发一次";
5489
+ o({ desc: X, next: r }), d("");
5490
5490
  } catch (u) {
5491
5491
  d(u instanceof Error ? u.message : "解析失败"), o(null);
5492
5492
  }
@@ -5513,7 +5513,7 @@ function Yu() {
5513
5513
  /* @__PURE__ */ e(R, { type: "primary", onClick: h, children: "解析" })
5514
5514
  ] }),
5515
5515
  /* @__PURE__ */ e(ke, { wrap: !0, style: { marginBottom: 12 }, children: c.map((u) => /* @__PURE__ */ e(
5516
- J,
5516
+ V,
5517
5517
  {
5518
5518
  className: B.cronExample,
5519
5519
  onClick: () => s(u),
@@ -5526,7 +5526,7 @@ function Yu() {
5526
5526
  /* @__PURE__ */ e("div", { className: B.cronDesc, children: a.desc }),
5527
5527
  /* @__PURE__ */ e("div", { className: B.panelLabel, style: { marginTop: 12 }, children: "最近 5 次触发时间" }),
5528
5528
  a.next.map((u, m) => /* @__PURE__ */ n("div", { className: B.cronNext, children: [
5529
- /* @__PURE__ */ e(J, { children: m + 1 }),
5529
+ /* @__PURE__ */ e(V, { children: m + 1 }),
5530
5530
  u
5531
5531
  ] }, m))
5532
5532
  ] })
@@ -5616,7 +5616,7 @@ function Zu() {
5616
5616
  { label: "G", value: String(l[1]), copy: String(l[1]) },
5617
5617
  { label: "B", value: String(l[2]), copy: String(l[2]) }
5618
5618
  ].map((c) => /* @__PURE__ */ n("div", { className: B.colorRow, children: [
5619
- /* @__PURE__ */ e(J, { style: { minWidth: 40 }, children: c.label }),
5619
+ /* @__PURE__ */ e(V, { style: { minWidth: 40 }, children: c.label }),
5620
5620
  /* @__PURE__ */ e("code", { style: { fontSize: 13, flex: 1 }, children: c.value }),
5621
5621
  /* @__PURE__ */ e(Ee, { text: c.copy })
5622
5622
  ] }, c.label))
@@ -5730,47 +5730,47 @@ const am = [
5730
5730
  function sm() {
5731
5731
  const [t, s] = i("GET"), [a, o] = i(""), [l, d] = i([
5732
5732
  { key: "Content-Type", value: "application/json", enabled: !0 }
5733
- ]), [h, c] = i(""), [u, m] = i(""), [r, f] = i(!1), [w, E] = i(null), [j, I] = i(""), [P, F] = i(""), [U, K] = i(null), [Z, W] = i("body"), [G, te] = i(!1), N = M(() => {
5734
- const $ = tm(u);
5735
- s($.method), o($.url), d(
5736
- $.headers.length ? $.headers : [{ key: "Content-Type", value: "application/json", enabled: !0 }]
5737
- ), c($.body), te(!1), m(""), oe.success("导入成功");
5733
+ ]), [h, c] = i(""), [u, m] = i(""), [r, f] = i(!1), [w, $] = i(null), [G, I] = i(""), [P, z] = i(""), [U, J] = i(null), [X, W] = i("body"), [F, ee] = i(!1), N = M(() => {
5734
+ const O = tm(u);
5735
+ s(O.method), o(O.url), d(
5736
+ O.headers.length ? O.headers : [{ key: "Content-Type", value: "application/json", enabled: !0 }]
5737
+ ), c(O.body), ee(!1), m(""), oe.success("导入成功");
5738
5738
  }, [u]), g = M(() => {
5739
5739
  if (!a.trim()) {
5740
5740
  oe.warning("请先填写 URL");
5741
5741
  return;
5742
5742
  }
5743
5743
  ua(nm(t, a, l, h));
5744
- }, [t, a, l, h]), z = M(async () => {
5744
+ }, [t, a, l, h]), E = M(async () => {
5745
5745
  if (!a.trim()) {
5746
5746
  oe.warning("请先填写 URL");
5747
5747
  return;
5748
5748
  }
5749
- f(!0), E(null), I(""), F(""), K(null);
5750
- const $ = Date.now();
5749
+ f(!0), $(null), I(""), z(""), J(null);
5750
+ const O = Date.now();
5751
5751
  try {
5752
5752
  const A = {};
5753
5753
  l.filter((ce) => ce.enabled && ce.key).forEach((ce) => A[ce.key] = ce.value);
5754
- const Y = { method: t, headers: A };
5755
- h && t !== "GET" && t !== "HEAD" && (Y.body = h);
5756
- const v = await fetch(a, Y), y = Date.now() - $, q = await v.text(), O = [];
5757
- v.headers.forEach((ce, _e) => O.push(`${_e}: ${ce}`));
5758
- let ae = q;
5754
+ const K = { method: t, headers: A };
5755
+ h && t !== "GET" && t !== "HEAD" && (K.body = h);
5756
+ const v = await fetch(a, K), y = Date.now() - O, q = await v.text(), H = [];
5757
+ v.headers.forEach((ce, _e) => H.push(`${_e}: ${ce}`));
5758
+ let ne = q;
5759
5759
  try {
5760
- ae = JSON.stringify(JSON.parse(q), null, 2);
5760
+ ne = JSON.stringify(JSON.parse(q), null, 2);
5761
5761
  } catch {
5762
5762
  }
5763
- E(v.status), I(O.join(`
5764
- `)), F(ae), K(y), W("body");
5763
+ $(v.status), I(H.join(`
5764
+ `)), z(ne), J(y), W("body");
5765
5765
  } catch (A) {
5766
- F(
5766
+ z(
5767
5767
  A instanceof Error ? A.message : "请求失败(可能存在 CORS 限制)"
5768
- ), K(Date.now() - $);
5768
+ ), J(Date.now() - O);
5769
5769
  } finally {
5770
5770
  f(!1);
5771
5771
  }
5772
- }, [t, a, l, h]), V = () => d(($) => [...$, { key: "", value: "", enabled: !0 }]), ne = ($) => d((A) => A.filter((Y, v) => v !== $)), _ = ($, A, Y) => d(
5773
- (v) => v.map((y, q) => q === $ ? { ...y, [A]: Y } : y)
5772
+ }, [t, a, l, h]), te = () => d((O) => [...O, { key: "", value: "", enabled: !0 }]), se = (O) => d((A) => A.filter((K, v) => v !== O)), _ = (O, A, K) => d(
5773
+ (v) => v.map((y, q) => q === O ? { ...y, [A]: K } : y)
5774
5774
  );
5775
5775
  return /* @__PURE__ */ n("div", { children: [
5776
5776
  /* @__PURE__ */ n(ke.Compact, { style: { width: "100%", marginBottom: 12 }, children: [
@@ -5780,7 +5780,7 @@ function sm() {
5780
5780
  value: t,
5781
5781
  onChange: s,
5782
5782
  style: { width: 120 },
5783
- options: am.map(($) => ({ value: $, label: $ }))
5783
+ options: am.map((O) => ({ value: O, label: O }))
5784
5784
  }
5785
5785
  ),
5786
5786
  /* @__PURE__ */ e(
@@ -5788,8 +5788,8 @@ function sm() {
5788
5788
  {
5789
5789
  placeholder: "https://api.example.com/endpoint",
5790
5790
  value: a,
5791
- onChange: ($) => o($.target.value),
5792
- onPressEnter: z,
5791
+ onChange: (O) => o(O.target.value),
5792
+ onPressEnter: E,
5793
5793
  style: { flex: 1 }
5794
5794
  }
5795
5795
  ),
@@ -5799,28 +5799,28 @@ function sm() {
5799
5799
  type: "primary",
5800
5800
  icon: /* @__PURE__ */ e(ds, {}),
5801
5801
  loading: r,
5802
- onClick: z,
5802
+ onClick: E,
5803
5803
  children: "发送"
5804
5804
  }
5805
5805
  )
5806
5806
  ] }),
5807
5807
  /* @__PURE__ */ n(ke, { wrap: !0, style: { marginBottom: 12 }, children: [
5808
- /* @__PURE__ */ e(R, { size: "small", onClick: () => te(!0), children: "导入 cURL" }),
5808
+ /* @__PURE__ */ e(R, { size: "small", onClick: () => ee(!0), children: "导入 cURL" }),
5809
5809
  /* @__PURE__ */ e(R, { size: "small", onClick: g, children: "导出 cURL" }),
5810
- /* @__PURE__ */ n(R, { size: "small", onClick: V, children: [
5810
+ /* @__PURE__ */ n(R, { size: "small", onClick: te, children: [
5811
5811
  /* @__PURE__ */ e($t, {}),
5812
5812
  " 添加 Header"
5813
5813
  ] })
5814
5814
  ] }),
5815
5815
  /* @__PURE__ */ n("div", { style: { marginBottom: 12 }, children: [
5816
5816
  /* @__PURE__ */ e("div", { className: B.panelLabel, children: "Request Headers" }),
5817
- l.map(($, A) => /* @__PURE__ */ n("div", { className: B.httpHeaderRow, children: [
5817
+ l.map((O, A) => /* @__PURE__ */ n("div", { className: B.httpHeaderRow, children: [
5818
5818
  /* @__PURE__ */ e(
5819
5819
  "input",
5820
5820
  {
5821
5821
  type: "checkbox",
5822
- checked: $.enabled,
5823
- onChange: (Y) => _(A, "enabled", Y.target.checked),
5822
+ checked: O.enabled,
5823
+ onChange: (K) => _(A, "enabled", K.target.checked),
5824
5824
  style: { flexShrink: 0 }
5825
5825
  }
5826
5826
  ),
@@ -5828,8 +5828,8 @@ function sm() {
5828
5828
  fe,
5829
5829
  {
5830
5830
  placeholder: "Key",
5831
- value: $.key,
5832
- onChange: (Y) => _(A, "key", Y.target.value),
5831
+ value: O.key,
5832
+ onChange: (K) => _(A, "key", K.target.value),
5833
5833
  style: { width: 180 }
5834
5834
  }
5835
5835
  ),
@@ -5837,8 +5837,8 @@ function sm() {
5837
5837
  fe,
5838
5838
  {
5839
5839
  placeholder: "Value",
5840
- value: $.value,
5841
- onChange: (Y) => _(A, "value", Y.target.value),
5840
+ value: O.value,
5841
+ onChange: (K) => _(A, "value", K.target.value),
5842
5842
  style: { flex: 1 }
5843
5843
  }
5844
5844
  ),
@@ -5849,7 +5849,7 @@ function sm() {
5849
5849
  type: "text",
5850
5850
  danger: !0,
5851
5851
  icon: /* @__PURE__ */ e(zt, {}),
5852
- onClick: () => ne(A)
5852
+ onClick: () => se(A)
5853
5853
  }
5854
5854
  )
5855
5855
  ] }, A))
@@ -5862,14 +5862,14 @@ function sm() {
5862
5862
  rows: 6,
5863
5863
  placeholder: "{}",
5864
5864
  value: h,
5865
- onChange: ($) => c($.target.value)
5865
+ onChange: (O) => c(O.target.value)
5866
5866
  }
5867
5867
  )
5868
5868
  ] }),
5869
5869
  (w !== null || P) && /* @__PURE__ */ n("div", { className: B.httpResp, children: [
5870
5870
  /* @__PURE__ */ n("div", { className: B.httpRespMeta, children: [
5871
5871
  w !== null && /* @__PURE__ */ e(
5872
- J,
5872
+ V,
5873
5873
  {
5874
5874
  color: w < 300 ? "success" : w < 400 ? "warning" : "error",
5875
5875
  children: w
@@ -5884,7 +5884,7 @@ function sm() {
5884
5884
  R,
5885
5885
  {
5886
5886
  size: "small",
5887
- type: Z === "body" ? "primary" : "text",
5887
+ type: X === "body" ? "primary" : "text",
5888
5888
  onClick: () => W("body"),
5889
5889
  children: "Body"
5890
5890
  }
@@ -5893,19 +5893,19 @@ function sm() {
5893
5893
  R,
5894
5894
  {
5895
5895
  size: "small",
5896
- type: Z === "headers" ? "primary" : "text",
5896
+ type: X === "headers" ? "primary" : "text",
5897
5897
  onClick: () => W("headers"),
5898
5898
  children: "Headers"
5899
5899
  }
5900
5900
  ),
5901
- P && /* @__PURE__ */ e(Ee, { text: Z === "body" ? P : j })
5901
+ P && /* @__PURE__ */ e(Ee, { text: X === "body" ? P : G })
5902
5902
  ] }),
5903
5903
  /* @__PURE__ */ e(
5904
5904
  ye,
5905
5905
  {
5906
5906
  rows: 12,
5907
5907
  readOnly: !0,
5908
- value: Z === "body" ? P : j,
5908
+ value: X === "body" ? P : G,
5909
5909
  className: B.outputArea,
5910
5910
  style: { fontFamily: "var(--font-mono)", fontSize: 13 }
5911
5911
  }
@@ -5915,9 +5915,9 @@ function sm() {
5915
5915
  it,
5916
5916
  {
5917
5917
  title: "导入 cURL",
5918
- open: G,
5918
+ open: F,
5919
5919
  onOk: N,
5920
- onCancel: () => te(!1),
5920
+ onCancel: () => ee(!1),
5921
5921
  okText: "解析并导入",
5922
5922
  children: /* @__PURE__ */ e(
5923
5923
  ye,
@@ -5928,7 +5928,7 @@ function sm() {
5928
5928
  -H 'Content-Type: application/json' \\
5929
5929
  -d '{}' `,
5930
5930
  value: u,
5931
- onChange: ($) => m($.target.value)
5931
+ onChange: (O) => m(O.target.value)
5932
5932
  }
5933
5933
  )
5934
5934
  }
@@ -5998,8 +5998,8 @@ console.log("随机数:", nums);
5998
5998
  console.log("排序后:", [...nums].sort((a,b) => a-b));`
5999
5999
  ), [a, o] = i([]), [l, d] = i(!1), h = Re(null), c = M(async () => {
6000
6000
  d(!0);
6001
- const r = [], f = () => (/* @__PURE__ */ new Date()).toLocaleTimeString("zh-CN", { hour12: !1 }), w = {}, E = ["log", "warn", "error", "info", "debug"], j = { ...console };
6002
- E.forEach((I) => {
6001
+ const r = [], f = () => (/* @__PURE__ */ new Date()).toLocaleTimeString("zh-CN", { hour12: !1 }), w = {}, $ = ["log", "warn", "error", "info", "debug"], G = { ...console };
6002
+ $.forEach((I) => {
6003
6003
  w[I] = console[I].bind(console), console[I] = (...P) => {
6004
6004
  r.push({
6005
6005
  level: I,
@@ -6014,7 +6014,7 @@ console.log("排序后:", [...nums].sort((a,b) => a-b));`
6014
6014
  `return (async () => {
6015
6015
  ${t}
6016
6016
  })()`
6017
- )(j);
6017
+ )(G);
6018
6018
  P !== void 0 && r.push({
6019
6019
  level: "return",
6020
6020
  args: Rn(P),
@@ -6027,12 +6027,12 @@ ${t}
6027
6027
  time: f()
6028
6028
  });
6029
6029
  } finally {
6030
- E.forEach((I) => {
6030
+ $.forEach((I) => {
6031
6031
  console[I] = w[I];
6032
6032
  }), o(r), d(!1);
6033
6033
  }
6034
6034
  }, [t]);
6035
- ee(() => {
6035
+ Z(() => {
6036
6036
  var r;
6037
6037
  (r = h.current) == null || r.scrollIntoView({ behavior: "smooth" });
6038
6038
  }, [a]);
@@ -6103,8 +6103,8 @@ ${t}
6103
6103
  onKeyDown: (r) => {
6104
6104
  if (r.key === "Tab") {
6105
6105
  r.preventDefault();
6106
- const f = r.currentTarget, w = f.selectionStart ?? 0, E = f.selectionEnd ?? 0, j = t.slice(0, w) + " " + t.slice(E);
6107
- s(j), requestAnimationFrame(() => {
6106
+ const f = r.currentTarget, w = f.selectionStart ?? 0, $ = f.selectionEnd ?? 0, G = t.slice(0, w) + " " + t.slice($);
6107
+ s(G), requestAnimationFrame(() => {
6108
6108
  f.selectionStart = f.selectionEnd = w + 2;
6109
6109
  });
6110
6110
  }
@@ -6206,7 +6206,7 @@ function um({
6206
6206
  onSave: a
6207
6207
  }) {
6208
6208
  const [o] = Rt.useForm();
6209
- ee(() => {
6209
+ Z(() => {
6210
6210
  t ? o.setFieldsValue({
6211
6211
  name: t.name,
6212
6212
  url: t.url,
@@ -6316,7 +6316,7 @@ function mm({
6316
6316
  ]
6317
6317
  }
6318
6318
  ),
6319
- u.length > 0 && /* @__PURE__ */ e(ke, { style: { marginBottom: 12 }, wrap: !0, children: u.map((m) => /* @__PURE__ */ e(J, { color: "blue", children: m }, m)) }),
6319
+ u.length > 0 && /* @__PURE__ */ e(ke, { style: { marginBottom: 12 }, wrap: !0, children: u.map((m) => /* @__PURE__ */ e(V, { color: "blue", children: m }, m)) }),
6320
6320
  t.length === 0 ? /* @__PURE__ */ e(Me, { description: "暂无常用网站,点击右上角添加" }) : /* @__PURE__ */ e(Ye, { gutter: [16, 16], children: t.map((m) => /* @__PURE__ */ e(we, { xs: 24, sm: 12, md: 8, lg: 6, children: /* @__PURE__ */ n(
6321
6321
  "div",
6322
6322
  {
@@ -6339,7 +6339,7 @@ function mm({
6339
6339
  children: [
6340
6340
  /* @__PURE__ */ e(en, { style: { color: "var(--accent-blue)" } }),
6341
6341
  /* @__PURE__ */ e(tt, { strong: !0, ellipsis: !0, style: { flex: 1, maxWidth: 140 }, children: m.name }),
6342
- m.category && /* @__PURE__ */ e(J, { color: "default", children: m.category })
6342
+ m.category && /* @__PURE__ */ e(V, { color: "default", children: m.category })
6343
6343
  ]
6344
6344
  }
6345
6345
  ),
@@ -6398,12 +6398,12 @@ function pg({
6398
6398
  }
6399
6399
  return An[0].key;
6400
6400
  }), [l, d] = i(rm);
6401
- ee(() => {
6401
+ Z(() => {
6402
6402
  try {
6403
6403
  localStorage.setItem(Pn, a);
6404
6404
  } catch {
6405
6405
  }
6406
- }, [a]), ee(() => {
6406
+ }, [a]), Z(() => {
6407
6407
  cm(l);
6408
6408
  }, [l]);
6409
6409
  const h = im[a] || ma;
@@ -6507,60 +6507,60 @@ function lh({
6507
6507
  onBack: s,
6508
6508
  onOpenExam: a
6509
6509
  }) {
6510
- const o = Le((A) => A.token), [l, d] = i(null), [h, c] = i(!0), [u, m] = i(null), [r, f] = i(null), [w, E] = i(!1), [j, I] = i({}), [P, F] = i(!1), [U, K] = i(!1), [Z, W] = i(
6510
+ const o = Le((A) => A.token), [l, d] = i(null), [h, c] = i(!0), [u, m] = i(null), [r, f] = i(null), [w, $] = i(!1), [G, I] = i({}), [P, z] = i(!1), [U, J] = i(!1), [X, W] = i(
6511
6511
  {}
6512
6512
  );
6513
- ee(() => {
6513
+ Z(() => {
6514
6514
  la(t, o).then((A) => {
6515
- const Y = {}, v = [...A].sort(
6515
+ const K = {}, v = [...A].sort(
6516
6516
  (y, q) => String(q.submitTime ?? "").localeCompare(String(y.submitTime ?? ""))
6517
6517
  );
6518
6518
  for (const y of v)
6519
- y.paperId != null && Y[y.paperId] == null && (Y[y.paperId] = y.examId);
6520
- W(Y);
6519
+ y.paperId != null && K[y.paperId] == null && (K[y.paperId] = y.examId);
6520
+ W(K);
6521
6521
  }).catch(() => {
6522
6522
  });
6523
6523
  }, [t, o]);
6524
- const G = M(async () => {
6524
+ const F = M(async () => {
6525
6525
  c(!0);
6526
6526
  try {
6527
6527
  const A = await ul(t, o);
6528
- d(A), m((Y) => {
6528
+ d(A), m((K) => {
6529
6529
  var v, y;
6530
- return Y ?? ((y = (v = A.materials) == null ? void 0 : v[0]) == null ? void 0 : y.materialId) ?? null;
6530
+ return K ?? ((y = (v = A.materials) == null ? void 0 : v[0]) == null ? void 0 : y.materialId) ?? null;
6531
6531
  });
6532
6532
  } catch {
6533
6533
  } finally {
6534
6534
  c(!1);
6535
6535
  }
6536
6536
  }, [t, o]);
6537
- ee(() => {
6538
- G();
6539
- }, [G]), ee(() => {
6540
- ml("", "", o).then((A) => I(Object.fromEntries(A.map((Y) => [Y.id, Y])))).catch(() => {
6537
+ Z(() => {
6538
+ F();
6539
+ }, [F]), Z(() => {
6540
+ ml("", "", o).then((A) => I(Object.fromEntries(A.map((K) => [K.id, K])))).catch(() => {
6541
6541
  });
6542
- }, [o]), ee(() => {
6543
- u && (E(!0), hl(u, o).then(f).catch(() => f(null)).finally(() => E(!1)));
6542
+ }, [o]), Z(() => {
6543
+ u && ($(!0), hl(u, o).then(f).catch(() => f(null)).finally(() => $(!1)));
6544
6544
  }, [u, o]);
6545
- const te = (l == null ? void 0 : l.materials) ?? [], N = l != null && l.finalPaperId ? Z[l.finalPaperId] ?? null : null, g = be(
6546
- () => te.find((A) => A.materialId === u) ?? null,
6547
- [te, u]
6548
- ), z = async () => {
6549
- F(!0);
6545
+ const ee = (l == null ? void 0 : l.materials) ?? [], N = l != null && l.finalPaperId ? X[l.finalPaperId] ?? null : null, g = be(
6546
+ () => ee.find((A) => A.materialId === u) ?? null,
6547
+ [ee, u]
6548
+ ), E = async () => {
6549
+ z(!0);
6550
6550
  try {
6551
- await oa(t, null, o), oe.success("报名成功"), G();
6551
+ await oa(t, null, o), oe.success("报名成功"), F();
6552
6552
  } catch {
6553
6553
  } finally {
6554
- F(!1);
6554
+ z(!1);
6555
6555
  }
6556
- }, V = async () => {
6556
+ }, te = async () => {
6557
6557
  if (g) {
6558
- K(!0);
6558
+ J(!0);
6559
6559
  try {
6560
- await pl(t, g.materialId, o), oe.success("已记录学习进度"), G();
6560
+ await pl(t, g.materialId, o), oe.success("已记录学习进度"), F();
6561
6561
  } catch {
6562
6562
  } finally {
6563
- K(!1);
6563
+ J(!1);
6564
6564
  }
6565
6565
  }
6566
6566
  };
@@ -6568,18 +6568,18 @@ function lh({
6568
6568
  return /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: "80px 0" }, children: /* @__PURE__ */ e(et, {}) });
6569
6569
  if (!l)
6570
6570
  return /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: "60px 0", color: "#999" }, children: "课程不存在或已被下线" });
6571
- const ne = l.progressTotal ?? te.length, _ = l.progressDone ?? 0, $ = ne > 0 ? Math.round(_ / ne * 100) : 0;
6571
+ const se = l.progressTotal ?? ee.length, _ = l.progressDone ?? 0, O = se > 0 ? Math.round(_ / se * 100) : 0;
6572
6572
  return /* @__PURE__ */ n("div", { children: [
6573
6573
  /* @__PURE__ */ n("div", { className: S.viewHeader, children: [
6574
6574
  /* @__PURE__ */ e(R, { type: "text", icon: /* @__PURE__ */ e(kt, {}), onClick: s }),
6575
6575
  /* @__PURE__ */ e("span", { className: S.viewTitle, children: l.title }),
6576
- l.enrollStatus === 1 ? /* @__PURE__ */ e(J, { color: "success", icon: /* @__PURE__ */ e(mt, {}), children: "已完成" }) : l.enrolled ? /* @__PURE__ */ e(J, { color: "processing", children: "学习中" }) : null,
6576
+ l.enrollStatus === 1 ? /* @__PURE__ */ e(V, { color: "success", icon: /* @__PURE__ */ e(mt, {}), children: "已完成" }) : l.enrolled ? /* @__PURE__ */ e(V, { color: "processing", children: "学习中" }) : null,
6577
6577
  /* @__PURE__ */ n("div", { style: { marginLeft: "auto", width: 180 }, children: [
6578
- /* @__PURE__ */ e(Tt, { percent: $, size: "small" }),
6578
+ /* @__PURE__ */ e(Tt, { percent: O, size: "small" }),
6579
6579
  /* @__PURE__ */ n("div", { className: S.viewSub, style: { textAlign: "right" }, children: [
6580
6580
  _,
6581
6581
  "/",
6582
- ne,
6582
+ se,
6583
6583
  " 课节"
6584
6584
  ] })
6585
6585
  ] })
@@ -6604,7 +6604,7 @@ function lh({
6604
6604
  {
6605
6605
  type: "primary",
6606
6606
  loading: P,
6607
- onClick: () => void z(),
6607
+ onClick: () => void E(),
6608
6608
  children: "立即报名"
6609
6609
  }
6610
6610
  )
@@ -6613,18 +6613,18 @@ function lh({
6613
6613
  ),
6614
6614
  /* @__PURE__ */ n("div", { className: S.learnLayout, children: [
6615
6615
  /* @__PURE__ */ n("div", { className: S.materialList, children: [
6616
- te.map((A, Y) => /* @__PURE__ */ e(
6616
+ ee.map((A, K) => /* @__PURE__ */ e(
6617
6617
  oh,
6618
6618
  {
6619
6619
  item: A,
6620
- index: Y,
6620
+ index: K,
6621
6621
  active: A.materialId === u,
6622
6622
  onSelect: () => m(A.materialId),
6623
- onOpenRecord: A.paperId && Z[A.paperId] ? () => a(
6623
+ onOpenRecord: A.paperId && X[A.paperId] ? () => a(
6624
6624
  A.paperId,
6625
6625
  t,
6626
6626
  A.materialId,
6627
- Z[A.paperId]
6627
+ X[A.paperId]
6628
6628
  ) : void 0
6629
6629
  },
6630
6630
  A.materialId
@@ -6640,7 +6640,7 @@ function lh({
6640
6640
  children: [
6641
6641
  /* @__PURE__ */ e("div", { style: { fontSize: 13, fontWeight: 600, marginBottom: 6 }, children: "结业考试" }),
6642
6642
  l.finalPaperPassed ? /* @__PURE__ */ n(ge, { children: [
6643
- /* @__PURE__ */ n(J, { color: "success", icon: /* @__PURE__ */ e(mt, {}), children: [
6643
+ /* @__PURE__ */ n(V, { color: "success", icon: /* @__PURE__ */ e(mt, {}), children: [
6644
6644
  l.finalPaperTitle ?? "结业卷",
6645
6645
  " 已通过"
6646
6646
  ] }),
@@ -6684,21 +6684,21 @@ function lh({
6684
6684
  {
6685
6685
  remarkPlugins: [on],
6686
6686
  components: {
6687
- code({ className: A, children: Y, ...v }) {
6687
+ code({ className: A, children: K, ...v }) {
6688
6688
  return A === "language-video" ? /* @__PURE__ */ e(
6689
6689
  ih,
6690
6690
  {
6691
- block: sh(String(Y)),
6692
- videoMap: j
6691
+ block: sh(String(K)),
6692
+ videoMap: G
6693
6693
  }
6694
- ) : /* @__PURE__ */ e("code", { className: A, ...v, children: Y });
6694
+ ) : /* @__PURE__ */ e("code", { className: A, ...v, children: K });
6695
6695
  }
6696
6696
  },
6697
6697
  children: r.content ?? ""
6698
6698
  }
6699
6699
  ) }),
6700
6700
  /* @__PURE__ */ n("div", { className: S.finishBar, children: [
6701
- /* @__PURE__ */ e("div", { children: g != null && g.finished ? /* @__PURE__ */ e(J, { color: "success", icon: /* @__PURE__ */ e(tn, {}), children: "本节已完成" }) : /* @__PURE__ */ n("span", { className: S.viewSub, children: [
6701
+ /* @__PURE__ */ e("div", { children: g != null && g.finished ? /* @__PURE__ */ e(V, { color: "success", icon: /* @__PURE__ */ e(tn, {}), children: "本节已完成" }) : /* @__PURE__ */ n("span", { className: S.viewSub, children: [
6702
6702
  "读完资料后点击右侧按钮记录进度",
6703
6703
  g != null && g.paperId ? "(本节还需通过考试)" : ""
6704
6704
  ] }) }),
@@ -6723,7 +6723,7 @@ function lh({
6723
6723
  icon: /* @__PURE__ */ e(tn, {}),
6724
6724
  loading: U,
6725
6725
  disabled: !l.enrolled || (g == null ? void 0 : g.read),
6726
- onClick: () => void V(),
6726
+ onClick: () => void te(),
6727
6727
  children: g != null && g.read ? "已标记学完" : "标记学完"
6728
6728
  }
6729
6729
  )
@@ -6768,7 +6768,7 @@ function oh({
6768
6768
  t.finished ? /* @__PURE__ */ e(mt, { style: { color: "#52c41a" } }) : null
6769
6769
  ] }),
6770
6770
  /* @__PURE__ */ e("div", { className: S.materialMeta, children: t.paperId ? t.examPassed ? /* @__PURE__ */ n(ge, { children: [
6771
- /* @__PURE__ */ n(J, { color: "success", style: { marginRight: 0 }, children: [
6771
+ /* @__PURE__ */ n(V, { color: "success", style: { marginRight: 0 }, children: [
6772
6772
  "考试已过",
6773
6773
  t.bestScore != null ? ` ${t.bestScore}分` : ""
6774
6774
  ] }),
@@ -6857,8 +6857,8 @@ function dh({
6857
6857
  assignedExamId: l,
6858
6858
  onBack: d
6859
6859
  }) {
6860
- const h = Le((_) => _.token), [c, u] = i("loading"), [m, r] = i(null), [f, w] = i({}), [E, j] = i(!1), [I, P] = i(null), [F, U] = i(null), K = Re(!1), Z = M(async () => {
6861
- u("loading"), P(null), w({}), K.current = !1;
6860
+ const h = Le((_) => _.token), [c, u] = i("loading"), [m, r] = i(null), [f, w] = i({}), [$, G] = i(!1), [I, P] = i(null), [z, U] = i(null), J = Re(!1), X = M(async () => {
6861
+ u("loading"), P(null), w({}), J.current = !1;
6862
6862
  try {
6863
6863
  const _ = await fl(
6864
6864
  t,
@@ -6872,42 +6872,42 @@ function dh({
6872
6872
  u("failed");
6873
6873
  }
6874
6874
  }, [t, s, a, h, l]);
6875
- ee(() => {
6875
+ Z(() => {
6876
6876
  if (o) {
6877
6877
  u("loading"), Nn(o, h).then((_) => {
6878
6878
  P(_), u("result");
6879
6879
  }).catch(() => u("failed"));
6880
6880
  return;
6881
6881
  }
6882
- Z();
6883
- }, [o, Z, h]);
6882
+ X();
6883
+ }, [o, X, h]);
6884
6884
  const W = M(async () => {
6885
6885
  var _;
6886
- if (!(!m || E)) {
6887
- j(!0);
6886
+ if (!(!m || $)) {
6887
+ G(!0);
6888
6888
  try {
6889
- const $ = await _l(
6889
+ const O = await _l(
6890
6890
  {
6891
6891
  paperId: t,
6892
6892
  courseId: s ?? null,
6893
6893
  materialId: a ?? null,
6894
6894
  examId: l ?? null,
6895
- answers: m.questions.map((Y) => ({
6896
- questionId: Y.questionId,
6897
- answer: f[Y.questionId] ?? ""
6895
+ answers: m.questions.map((K) => ({
6896
+ questionId: K.questionId,
6897
+ answer: f[K.questionId] ?? ""
6898
6898
  }))
6899
6899
  },
6900
6900
  h
6901
- ), A = (_ = $.answers) != null && _.length ? $ : await Nn($.examId, h);
6901
+ ), A = (_ = O.answers) != null && _.length ? O : await Nn(O.examId, h);
6902
6902
  P(A), u("result");
6903
6903
  } catch {
6904
6904
  } finally {
6905
- j(!1);
6905
+ G(!1);
6906
6906
  }
6907
6907
  }
6908
6908
  }, [
6909
6909
  m,
6910
- E,
6910
+ $,
6911
6911
  f,
6912
6912
  t,
6913
6913
  s,
@@ -6915,22 +6915,22 @@ function dh({
6915
6915
  h,
6916
6916
  l
6917
6917
  ]);
6918
- ee(() => {
6919
- if (c !== "answering" || F == null) return;
6920
- if (F <= 0) {
6921
- K.current || (K.current = !0, oe.warning("考试时间已到,已自动交卷"), W());
6918
+ Z(() => {
6919
+ if (c !== "answering" || z == null) return;
6920
+ if (z <= 0) {
6921
+ J.current || (J.current = !0, oe.warning("考试时间已到,已自动交卷"), W());
6922
6922
  return;
6923
6923
  }
6924
6924
  const _ = setTimeout(
6925
- () => U(($) => $ == null ? null : $ - 1),
6925
+ () => U((O) => O == null ? null : O - 1),
6926
6926
  1e3
6927
6927
  );
6928
6928
  return () => clearTimeout(_);
6929
- }, [c, F, W]);
6930
- const G = () => {
6929
+ }, [c, z, W]);
6930
+ const F = () => {
6931
6931
  if (!m) return;
6932
6932
  const _ = m.questions.filter(
6933
- ($) => !(f[$.questionId] ?? "").trim()
6933
+ (O) => !(f[O.questionId] ?? "").trim()
6934
6934
  ).length;
6935
6935
  it.confirm({
6936
6936
  title: "确认交卷?",
@@ -6939,7 +6939,7 @@ function dh({
6939
6939
  cancelText: "继续作答",
6940
6940
  onOk: () => W()
6941
6941
  });
6942
- }, te = () => {
6942
+ }, ee = () => {
6943
6943
  it.confirm({
6944
6944
  title: "放弃本次考试?",
6945
6945
  content: "已作答的内容将不会被保存",
@@ -6948,10 +6948,10 @@ function dh({
6948
6948
  cancelText: "继续作答",
6949
6949
  onOk: d
6950
6950
  });
6951
- }, N = (_, $) => w((A) => ({ ...A, [_]: $ })), g = (_, $) => w((A) => {
6952
- const Y = (A[_] ?? "").split(",").filter(Boolean), v = Y.includes($) ? Y.filter((y) => y !== $) : [...Y, $].sort();
6951
+ }, N = (_, O) => w((A) => ({ ...A, [_]: O })), g = (_, O) => w((A) => {
6952
+ const K = (A[_] ?? "").split(",").filter(Boolean), v = K.includes(O) ? K.filter((y) => y !== O) : [...K, O].sort();
6953
6953
  return { ...A, [_]: v.join(",") };
6954
- }), z = (_, $) => w((A) => ({ ...A, [_]: $ }));
6954
+ }), E = (_, O) => w((A) => ({ ...A, [_]: O }));
6955
6955
  if (c === "loading")
6956
6956
  return /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: "80px 0" }, children: /* @__PURE__ */ e(et, {}) });
6957
6957
  if (c === "failed")
@@ -6966,12 +6966,12 @@ function dh({
6966
6966
  {
6967
6967
  record: I,
6968
6968
  onBack: d,
6969
- onRetry: _ ? () => void Z() : void 0
6969
+ onRetry: _ ? () => void X() : void 0
6970
6970
  }
6971
6971
  );
6972
6972
  }
6973
6973
  if (!m) return null;
6974
- const V = m.questions ?? [], ne = V.filter(
6974
+ const te = m.questions ?? [], se = te.filter(
6975
6975
  (_) => (f[_.questionId] ?? "").trim()
6976
6976
  ).length;
6977
6977
  return /* @__PURE__ */ n("div", { className: S.examWrap, children: [
@@ -6981,7 +6981,7 @@ function dh({
6981
6981
  {
6982
6982
  type: "text",
6983
6983
  icon: /* @__PURE__ */ e(kt, {}),
6984
- onClick: te
6984
+ onClick: ee
6985
6985
  }
6986
6986
  ),
6987
6987
  /* @__PURE__ */ e("span", { className: S.viewTitle, children: m.paperTitle })
@@ -7005,9 +7005,9 @@ function dh({
7005
7005
  ] }) : null,
7006
7006
  /* @__PURE__ */ n("span", { children: [
7007
7007
  "已答 ",
7008
- ne,
7008
+ se,
7009
7009
  "/",
7010
- V.length
7010
+ te.length
7011
7011
  ] }),
7012
7012
  m.retryCount ? /* @__PURE__ */ n("span", { children: [
7013
7013
  "第 ",
@@ -7019,31 +7019,31 @@ function dh({
7019
7019
  m.bestScore,
7020
7020
  " 分"
7021
7021
  ] }) : null,
7022
- F != null && /* @__PURE__ */ n(
7022
+ z != null && /* @__PURE__ */ n(
7023
7023
  "span",
7024
7024
  {
7025
7025
  style: {
7026
7026
  marginLeft: "auto",
7027
7027
  fontWeight: 600,
7028
- color: F < 300 ? "#f5222d" : "#333"
7028
+ color: z < 300 ? "#f5222d" : "#333"
7029
7029
  },
7030
7030
  children: [
7031
7031
  /* @__PURE__ */ e(Zt, {}),
7032
7032
  " 剩余 ",
7033
- ch(F)
7033
+ ch(z)
7034
7034
  ]
7035
7035
  }
7036
7036
  )
7037
7037
  ] }),
7038
- V.map((_, $) => /* @__PURE__ */ e(
7038
+ te.map((_, O) => /* @__PURE__ */ e(
7039
7039
  uh,
7040
7040
  {
7041
7041
  q: _,
7042
- index: $,
7042
+ index: O,
7043
7043
  value: f[_.questionId] ?? "",
7044
7044
  onPick: (A) => N(_.questionId, A),
7045
7045
  onToggle: (A) => g(_.questionId, A),
7046
- onWrite: (A) => z(_.questionId, A)
7046
+ onWrite: (A) => E(_.questionId, A)
7047
7047
  },
7048
7048
  _.questionId
7049
7049
  )),
@@ -7057,8 +7057,8 @@ function dh({
7057
7057
  margin: "18px 0 6px"
7058
7058
  },
7059
7059
  children: [
7060
- /* @__PURE__ */ e(R, { onClick: te, children: "放弃考试" }),
7061
- /* @__PURE__ */ e(R, { type: "primary", loading: E, onClick: G, children: "交卷" })
7060
+ /* @__PURE__ */ e(R, { onClick: ee, children: "放弃考试" }),
7061
+ /* @__PURE__ */ e(R, { type: "primary", loading: $, onClick: F, children: "交卷" })
7062
7062
  ]
7063
7063
  }
7064
7064
  )
@@ -7142,7 +7142,7 @@ function mh({
7142
7142
  ] })
7143
7143
  ] }),
7144
7144
  o ? t.passed ? /* @__PURE__ */ e(
7145
- J,
7145
+ V,
7146
7146
  {
7147
7147
  color: "success",
7148
7148
  icon: /* @__PURE__ */ e(mt, {}),
@@ -7150,14 +7150,14 @@ function mh({
7150
7150
  children: "恭喜通过"
7151
7151
  }
7152
7152
  ) : /* @__PURE__ */ e(
7153
- J,
7153
+ V,
7154
7154
  {
7155
7155
  color: "error",
7156
7156
  icon: /* @__PURE__ */ e(us, {}),
7157
7157
  style: { marginTop: 10 },
7158
7158
  children: "未通过"
7159
7159
  }
7160
- ) : /* @__PURE__ */ e(J, { color: "processing", style: { marginTop: 10 }, children: "自由题批改中" }),
7160
+ ) : /* @__PURE__ */ e(V, { color: "processing", style: { marginTop: 10 }, children: "自由题批改中" }),
7161
7161
  /* @__PURE__ */ n("div", { className: S.viewSub, style: { marginTop: 8 }, children: [
7162
7162
  t.retryNo ? `第 ${t.retryNo} 次考试 · ` : "",
7163
7163
  o ? t.passed ? "成绩已最终确认" : "未达到及格线,可返回重考" : "客观题已判分;自由题由 AI 初评并进入人工复核,最终成绩请稍后查看"
@@ -7215,7 +7215,7 @@ function hh({
7215
7215
  /* @__PURE__ */ n("span", { children: [
7216
7216
  /* @__PURE__ */ e("span", { style: { color: "#999" }, children: "得分:" }),
7217
7217
  t.score != null ? `${t.score} / ${t.scoreFull ?? "-"}` : `待批改(满分 ${t.scoreFull ?? "-"})`,
7218
- t.isCorrect != null && t.type !== "FREE" ? t.isCorrect ? /* @__PURE__ */ e(J, { color: "success", style: { marginLeft: 8 }, children: "正确" }) : /* @__PURE__ */ e(J, { color: "error", style: { marginLeft: 8 }, children: "错误" }) : null
7218
+ t.isCorrect != null && t.type !== "FREE" ? t.isCorrect ? /* @__PURE__ */ e(V, { color: "success", style: { marginLeft: 8 }, children: "正确" }) : /* @__PURE__ */ e(V, { color: "error", style: { marginLeft: 8 }, children: "错误" }) : null
7219
7219
  ] }),
7220
7220
  t.aiComment ? /* @__PURE__ */ n("span", { children: [
7221
7221
  /* @__PURE__ */ e("span", { style: { color: "#999" }, children: "AI 评语:" }),
@@ -7260,7 +7260,7 @@ function yh({
7260
7260
  onBack: s,
7261
7261
  onOpenCourse: a
7262
7262
  }) {
7263
- var Z;
7263
+ var X;
7264
7264
  const o = Le((W) => W.token), [l, d] = i(null), [h, c] = i(!0), [u, m] = i(!1), r = M(async () => {
7265
7265
  c(!0);
7266
7266
  try {
@@ -7270,7 +7270,7 @@ function yh({
7270
7270
  c(!1);
7271
7271
  }
7272
7272
  }, [t, o]);
7273
- ee(() => {
7273
+ Z(() => {
7274
7274
  r();
7275
7275
  }, [r]);
7276
7276
  const f = async () => {
@@ -7287,35 +7287,35 @@ function yh({
7287
7287
  return;
7288
7288
  }
7289
7289
  a(W.courseId);
7290
- }, E = be(() => {
7290
+ }, $ = be(() => {
7291
7291
  const W = ((l == null ? void 0 : l.nodes) ?? []).slice();
7292
7292
  W.sort(
7293
- (te, N) => (te.stage ?? 1) - (N.stage ?? 1) || (te.sortOrder ?? 0) - (N.sortOrder ?? 0)
7293
+ (ee, N) => (ee.stage ?? 1) - (N.stage ?? 1) || (ee.sortOrder ?? 0) - (N.sortOrder ?? 0)
7294
7294
  );
7295
- const G = [];
7296
- for (const te of W) {
7297
- const N = te.stage ?? 1, g = G.find((z) => z.stage === N);
7298
- g ? g.nodes.push(te) : G.push({ stage: N, nodes: [te] });
7295
+ const F = [];
7296
+ for (const ee of W) {
7297
+ const N = ee.stage ?? 1, g = F.find((E) => E.stage === N);
7298
+ g ? g.nodes.push(ee) : F.push({ stage: N, nodes: [ee] });
7299
7299
  }
7300
- return G;
7300
+ return F;
7301
7301
  }, [l]);
7302
7302
  if (h)
7303
7303
  return /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: "80px 0" }, children: /* @__PURE__ */ e(et, {}) });
7304
7304
  if (!l)
7305
7305
  return /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: "60px 0", color: "#999" }, children: "路径不存在或已下线" });
7306
- const j = l.totalCount ?? 0, I = l.doneCount ?? 0, P = j > 0 ? Math.round(I / j * 100) : 0, F = l.renderTemplate === "MAP", U = E.length > 1;
7307
- let K = 0;
7306
+ const G = l.totalCount ?? 0, I = l.doneCount ?? 0, P = G > 0 ? Math.round(I / G * 100) : 0, z = l.renderTemplate === "MAP", U = $.length > 1;
7307
+ let J = 0;
7308
7308
  return /* @__PURE__ */ n("div", { children: [
7309
7309
  /* @__PURE__ */ n("div", { className: S.viewHeader, children: [
7310
7310
  /* @__PURE__ */ e(R, { type: "text", icon: /* @__PURE__ */ e(kt, {}), onClick: s }),
7311
7311
  /* @__PURE__ */ e("span", { className: S.viewTitle, children: l.title }),
7312
- l.pathStatus === 1 ? /* @__PURE__ */ e(J, { color: "success", icon: /* @__PURE__ */ e(mt, {}), children: "已完成" }) : null,
7312
+ l.pathStatus === 1 ? /* @__PURE__ */ e(V, { color: "success", icon: /* @__PURE__ */ e(mt, {}), children: "已完成" }) : null,
7313
7313
  /* @__PURE__ */ n("div", { style: { marginLeft: "auto", width: 180 }, children: [
7314
7314
  /* @__PURE__ */ e(Tt, { percent: P, size: "small" }),
7315
7315
  /* @__PURE__ */ n("div", { className: S.viewSub, style: { textAlign: "right" }, children: [
7316
7316
  I,
7317
7317
  "/",
7318
- j,
7318
+ G,
7319
7319
  " 门课程"
7320
7320
  ] })
7321
7321
  ] })
@@ -7330,7 +7330,7 @@ function yh({
7330
7330
  /* @__PURE__ */ n("div", { children: [
7331
7331
  "解锁规则:",
7332
7332
  ph[l.unlockRule ?? "SEQUENTIAL"] ?? l.unlockRule,
7333
- (Z = l.rewardNames) != null && Z.length ? /* @__PURE__ */ n("span", { style: { marginLeft: 12, color: "#d48806" }, children: [
7333
+ (X = l.rewardNames) != null && X.length ? /* @__PURE__ */ n("span", { style: { marginLeft: 12, color: "#d48806" }, children: [
7334
7334
  /* @__PURE__ */ e(Zn, {}),
7335
7335
  " 完成可得:",
7336
7336
  l.rewardNames.join("、")
@@ -7367,33 +7367,33 @@ function yh({
7367
7367
  }
7368
7368
  ),
7369
7369
  /* @__PURE__ */ n("div", { className: S.pathBoard, children: [
7370
- E.map((W) => /* @__PURE__ */ n("div", { style: { marginBottom: 10 }, children: [
7370
+ $.map((W) => /* @__PURE__ */ n("div", { style: { marginBottom: 10 }, children: [
7371
7371
  U && /* @__PURE__ */ n("div", { className: S.stageHeader, children: [
7372
7372
  "第 ",
7373
7373
  W.stage,
7374
7374
  " 阶段"
7375
7375
  ] }),
7376
- F ? /* @__PURE__ */ e("div", { className: S.mapGrid, children: W.nodes.map((G) => /* @__PURE__ */ e(
7376
+ z ? /* @__PURE__ */ e("div", { className: S.mapGrid, children: W.nodes.map((F) => /* @__PURE__ */ e(
7377
7377
  Mn,
7378
7378
  {
7379
- node: G,
7380
- index: K += 1,
7381
- onClick: () => w(G)
7379
+ node: F,
7380
+ index: J += 1,
7381
+ onClick: () => w(F)
7382
7382
  },
7383
- G.courseId
7384
- )) }) : /* @__PURE__ */ e("div", { className: S.nodeColumn, children: W.nodes.map((G, te) => /* @__PURE__ */ n(Ts, { children: [
7385
- te > 0 && /* @__PURE__ */ e("div", { className: S.nodeLink }),
7383
+ F.courseId
7384
+ )) }) : /* @__PURE__ */ e("div", { className: S.nodeColumn, children: W.nodes.map((F, ee) => /* @__PURE__ */ n(Ts, { children: [
7385
+ ee > 0 && /* @__PURE__ */ e("div", { className: S.nodeLink }),
7386
7386
  /* @__PURE__ */ e(
7387
7387
  Mn,
7388
7388
  {
7389
- node: G,
7390
- index: K += 1,
7391
- onClick: () => w(G)
7389
+ node: F,
7390
+ index: J += 1,
7391
+ onClick: () => w(F)
7392
7392
  }
7393
7393
  )
7394
- ] }, G.courseId)) })
7394
+ ] }, F.courseId)) })
7395
7395
  ] }, W.stage)),
7396
- E.length === 0 && /* @__PURE__ */ e(
7396
+ $.length === 0 && /* @__PURE__ */ e(
7397
7397
  "div",
7398
7398
  {
7399
7399
  className: S.viewSub,
@@ -7422,7 +7422,7 @@ function Mn({
7422
7422
  /* @__PURE__ */ e("div", { className: S.nodeTitle, children: t.courseTitle }),
7423
7423
  /* @__PURE__ */ e("div", { className: S.nodeMeta, children: gh(t) })
7424
7424
  ] }),
7425
- o === "doing" ? /* @__PURE__ */ e(ht, { style: { color: "#2f70f1", fontSize: 18 } }) : o === "done" ? /* @__PURE__ */ e(J, { color: "success", children: "完成" }) : o === "locked" ? /* @__PURE__ */ e(Ft, { style: { color: "#bbb" } }) : null
7425
+ o === "doing" ? /* @__PURE__ */ e(ht, { style: { color: "#2f70f1", fontSize: 18 } }) : o === "done" ? /* @__PURE__ */ e(V, { color: "success", children: "完成" }) : o === "locked" ? /* @__PURE__ */ e(Ft, { style: { color: "#bbb" } }) : null
7426
7426
  ]
7427
7427
  }
7428
7428
  );
@@ -7488,7 +7488,7 @@ function bh({
7488
7488
  onPushExam: a
7489
7489
  }) {
7490
7490
  const [o, l] = i(t);
7491
- return ee(() => l(t), [t]), /* @__PURE__ */ n("div", { className: S.tabWrap, children: [
7491
+ return Z(() => l(t), [t]), /* @__PURE__ */ n("div", { className: S.tabWrap, children: [
7492
7492
  /* @__PURE__ */ n("div", { className: S.viewHeader, children: [
7493
7493
  /* @__PURE__ */ e("span", { className: S.viewTitle, children: "培训中心" }),
7494
7494
  /* @__PURE__ */ e("span", { className: S.viewSub, children: "课程学习 · 考试认证 · 荣耀收集" })
@@ -7579,7 +7579,7 @@ function kh({
7579
7579
  h(!1);
7580
7580
  }
7581
7581
  }, [a]);
7582
- return ee(() => {
7582
+ return Z(() => {
7583
7583
  c();
7584
7584
  }, [c]), d ? /* @__PURE__ */ e(xt, {}) : o.length === 0 ? /* @__PURE__ */ e(ga, { text: "还没有加入任何学习路径", onGo: s }) : /* @__PURE__ */ e("div", { className: S.cardGrid, children: o.map((u) => {
7585
7585
  const m = u.totalCount ?? 0, r = u.doneCount ?? 0, f = m > 0 ? Math.round(r / m * 100) : 0;
@@ -7587,7 +7587,7 @@ function kh({
7587
7587
  /* @__PURE__ */ n("div", { className: S.cardTitleRow, children: [
7588
7588
  /* @__PURE__ */ e(ea, { style: { color: "#d48806" } }),
7589
7589
  /* @__PURE__ */ e("span", { className: S.cardTitle, children: u.title }),
7590
- u.pathStatus === 1 ? /* @__PURE__ */ e(J, { color: "success", children: "已完成" }) : /* @__PURE__ */ e(J, { color: "processing", children: "学习中" })
7590
+ u.pathStatus === 1 ? /* @__PURE__ */ e(V, { color: "success", children: "已完成" }) : /* @__PURE__ */ e(V, { color: "processing", children: "学习中" })
7591
7591
  ] }),
7592
7592
  /* @__PURE__ */ e("div", { className: S.cardDesc, children: u.description }),
7593
7593
  /* @__PURE__ */ e(Tt, { percent: f, size: "small" }),
@@ -7626,14 +7626,14 @@ function Nh({
7626
7626
  h(!1);
7627
7627
  }
7628
7628
  }, [a]);
7629
- return ee(() => {
7629
+ return Z(() => {
7630
7630
  c();
7631
7631
  }, [c]), d ? /* @__PURE__ */ e(xt, {}) : o.length === 0 ? /* @__PURE__ */ e(ga, { text: "还没有报名任何课程", onGo: s }) : /* @__PURE__ */ e("div", { className: S.cardGrid, children: o.map((u) => {
7632
7632
  const m = u.progressTotal ?? 0, r = u.progressDone ?? 0, f = m > 0 ? Math.round(r / m * 100) : 0;
7633
7633
  return /* @__PURE__ */ n("div", { className: S.learnCard, children: [
7634
7634
  /* @__PURE__ */ n("div", { className: S.cardTitleRow, children: [
7635
7635
  /* @__PURE__ */ e("span", { className: S.cardTitle, children: u.title }),
7636
- u.enrollStatus === 1 ? /* @__PURE__ */ e(J, { color: "success", children: "已完成" }) : /* @__PURE__ */ e(J, { color: "processing", children: "学习中" })
7636
+ u.enrollStatus === 1 ? /* @__PURE__ */ e(V, { color: "success", children: "已完成" }) : /* @__PURE__ */ e(V, { color: "processing", children: "学习中" })
7637
7637
  ] }),
7638
7638
  /* @__PURE__ */ e("div", { className: S.cardDesc, children: u.description }),
7639
7639
  /* @__PURE__ */ e(Tt, { percent: f, size: "small" }),
@@ -7669,7 +7669,7 @@ function Ch() {
7669
7669
  l(!1);
7670
7670
  }
7671
7671
  }, [t]);
7672
- if (ee(() => {
7672
+ if (Z(() => {
7673
7673
  d();
7674
7674
  }, [d]), o) return /* @__PURE__ */ e(xt, {});
7675
7675
  if (s.length === 0)
@@ -7697,7 +7697,7 @@ function Ch() {
7697
7697
  }
7698
7698
  ) : /* @__PURE__ */ e(fs, { style: { color: "#d48806", fontSize: 20 } }),
7699
7699
  /* @__PURE__ */ e("span", { className: S.cardTitle, children: c.rewardName ?? "未知奖励" }),
7700
- c.rewardType === "RESOURCE_PACK" ? /* @__PURE__ */ e(J, { color: "cyan", children: "资源包" }) : /* @__PURE__ */ e(J, { color: "gold", children: "徽章" })
7700
+ c.rewardType === "RESOURCE_PACK" ? /* @__PURE__ */ e(V, { color: "cyan", children: "资源包" }) : /* @__PURE__ */ e(V, { color: "gold", children: "徽章" })
7701
7701
  ] }),
7702
7702
  /* @__PURE__ */ n("div", { className: S.cardDesc, children: [
7703
7703
  c.sourceType === "PATH" ? "完成学习路径" : "完成课程",
@@ -7714,7 +7714,7 @@ function Ch() {
7714
7714
  onClick: () => void h(c.id),
7715
7715
  children: "申请兑换"
7716
7716
  }
7717
- ) : c.redeemStatus === 1 ? /* @__PURE__ */ e(J, { color: "processing", children: "兑换申请中" }) : c.redeemStatus === 2 ? /* @__PURE__ */ e(J, { color: "success", children: "已兑换" }) : /* @__PURE__ */ e(J, { children: "永久收藏" }),
7717
+ ) : c.redeemStatus === 1 ? /* @__PURE__ */ e(V, { color: "processing", children: "兑换申请中" }) : c.redeemStatus === 2 ? /* @__PURE__ */ e(V, { color: "success", children: "已兑换" }) : /* @__PURE__ */ e(V, { children: "永久收藏" }),
7718
7718
  c.redeemCode ? /* @__PURE__ */ e(sn, { title: "兑换码(凭码领取资源包)", children: /* @__PURE__ */ e("code", { style: { fontSize: 12 }, children: c.redeemCode }) }) : null
7719
7719
  ] })
7720
7720
  ] }, c.id)) });
@@ -7736,7 +7736,7 @@ function Sh({
7736
7736
  d(!1);
7737
7737
  }
7738
7738
  }, [s]);
7739
- if (ee(() => {
7739
+ if (Z(() => {
7740
7740
  h();
7741
7741
  }, [h]), l) return /* @__PURE__ */ e(xt, {});
7742
7742
  if (a.length === 0)
@@ -7782,7 +7782,7 @@ function Sh({
7782
7782
  /* @__PURE__ */ n("div", { className: S.cardTitleRow, children: [
7783
7783
  /* @__PURE__ */ e(tn, { style: { color: "#2F70F1" } }),
7784
7784
  /* @__PURE__ */ e("span", { className: S.cardTitle, children: u.paperTitle ?? `试卷 #${u.paperId ?? "-"}` }),
7785
- m ? u.passed == null ? /* @__PURE__ */ e(J, { color: "success", children: "已出分" }) : u.passed ? /* @__PURE__ */ e(J, { color: "success", icon: /* @__PURE__ */ e(mt, {}), children: "已通过" }) : /* @__PURE__ */ e(J, { color: "error", children: "未通过" }) : /* @__PURE__ */ e(J, { color: r.color, children: r.label })
7785
+ m ? u.passed == null ? /* @__PURE__ */ e(V, { color: "success", children: "已出分" }) : u.passed ? /* @__PURE__ */ e(V, { color: "success", icon: /* @__PURE__ */ e(mt, {}), children: "已通过" }) : /* @__PURE__ */ e(V, { color: "error", children: "未通过" }) : /* @__PURE__ */ e(V, { color: r.color, children: r.label })
7786
7786
  ] }),
7787
7787
  /* @__PURE__ */ n("div", { className: S.cardDesc, children: [
7788
7788
  u.courseId ? "课程结业卷" : "组织发放考试",
@@ -7828,7 +7828,7 @@ function Th({
7828
7828
  d(!1);
7829
7829
  }
7830
7830
  }, [s]);
7831
- if (ee(() => {
7831
+ if (Z(() => {
7832
7832
  u();
7833
7833
  }, [u]), l) return /* @__PURE__ */ e(xt, {});
7834
7834
  if (a.length === 0)
@@ -7863,21 +7863,21 @@ function Th({
7863
7863
  }
7864
7864
  ),
7865
7865
  /* @__PURE__ */ e("div", { className: S.cardGrid, children: a.map((r) => {
7866
- var j;
7867
- const f = r.totalCount ?? 0, w = r.doneCount ?? 0, E = f > 0 ? Math.round(w / f * 100) : 0;
7866
+ var G;
7867
+ const f = r.totalCount ?? 0, w = r.doneCount ?? 0, $ = f > 0 ? Math.round(w / f * 100) : 0;
7868
7868
  return /* @__PURE__ */ n("div", { className: S.learnCard, children: [
7869
7869
  /* @__PURE__ */ n("div", { className: S.cardTitleRow, children: [
7870
7870
  /* @__PURE__ */ e(ea, { style: { color: "#d48806" } }),
7871
7871
  /* @__PURE__ */ e("span", { className: S.cardTitle, children: r.title }),
7872
- r.renderTemplate ? /* @__PURE__ */ e(J, { children: _a[r.renderTemplate] ?? r.renderTemplate }) : null
7872
+ r.renderTemplate ? /* @__PURE__ */ e(V, { children: _a[r.renderTemplate] ?? r.renderTemplate }) : null
7873
7873
  ] }),
7874
7874
  /* @__PURE__ */ e("div", { className: S.cardDesc, children: r.description }),
7875
- r.joined ? /* @__PURE__ */ e(Tt, { percent: E, size: "small" }) : null,
7875
+ r.joined ? /* @__PURE__ */ e(Tt, { percent: $, size: "small" }) : null,
7876
7876
  /* @__PURE__ */ n("div", { className: S.cardFooter, children: [
7877
7877
  /* @__PURE__ */ n("span", { className: S.viewSub, children: [
7878
7878
  f,
7879
7879
  " 门课程",
7880
- (j = r.rewardNames) != null && j.length ? ` · ${r.rewardNames.join("/")}` : ""
7880
+ (G = r.rewardNames) != null && G.length ? ` · ${r.rewardNames.join("/")}` : ""
7881
7881
  ] }),
7882
7882
  r.joined ? /* @__PURE__ */ e(
7883
7883
  R,
@@ -7917,7 +7917,7 @@ function xh({
7917
7917
  d(!1);
7918
7918
  }
7919
7919
  }, [s]);
7920
- if (ee(() => {
7920
+ if (Z(() => {
7921
7921
  u();
7922
7922
  }, [u]), l) return /* @__PURE__ */ e(xt, {});
7923
7923
  if (a.length === 0)
@@ -7952,14 +7952,14 @@ function xh({
7952
7952
  }
7953
7953
  ),
7954
7954
  /* @__PURE__ */ e("div", { className: S.cardGrid, children: a.map((r) => {
7955
- const f = r.progressTotal ?? 0, w = r.progressDone ?? 0, E = f > 0 ? Math.round(w / f * 100) : 0;
7955
+ const f = r.progressTotal ?? 0, w = r.progressDone ?? 0, $ = f > 0 ? Math.round(w / f * 100) : 0;
7956
7956
  return /* @__PURE__ */ n("div", { className: S.learnCard, children: [
7957
7957
  /* @__PURE__ */ n("div", { className: S.cardTitleRow, children: [
7958
7958
  /* @__PURE__ */ e("span", { className: S.cardTitle, children: r.title }),
7959
- r.enrolled ? r.enrollStatus === 1 ? /* @__PURE__ */ e(J, { color: "success", icon: /* @__PURE__ */ e(mt, {}), children: "已完成" }) : /* @__PURE__ */ e(J, { color: "processing", children: "学习中" }) : null
7959
+ r.enrolled ? r.enrollStatus === 1 ? /* @__PURE__ */ e(V, { color: "success", icon: /* @__PURE__ */ e(mt, {}), children: "已完成" }) : /* @__PURE__ */ e(V, { color: "processing", children: "学习中" }) : null
7960
7960
  ] }),
7961
7961
  /* @__PURE__ */ e("div", { className: S.cardDesc, children: r.description }),
7962
- r.enrolled ? /* @__PURE__ */ e(Tt, { percent: E, size: "small" }) : null,
7962
+ r.enrolled ? /* @__PURE__ */ e(Tt, { percent: $, size: "small" }) : null,
7963
7963
  /* @__PURE__ */ n("div", { className: S.cardFooter, children: [
7964
7964
  /* @__PURE__ */ n("span", { className: S.viewSub, children: [
7965
7965
  f,
@@ -8055,8 +8055,8 @@ const Qt = {
8055
8055
  path: ""
8056
8056
  };
8057
8057
  function _g() {
8058
- const t = Le((N) => N.currentUser), s = t == null ? void 0 : t.id, [a, o] = i([]), [l, d] = i([]), [h, c] = i(!1), [u, m] = i(!1), [r, f] = i(Qt), [w, E] = i(!1), [j, I] = i(null);
8059
- ee(() => {
8058
+ const t = Le((N) => N.currentUser), s = t == null ? void 0 : t.id, [a, o] = i([]), [l, d] = i([]), [h, c] = i(!1), [u, m] = i(!1), [r, f] = i(Qt), [w, $] = i(!1), [G, I] = i(null);
8059
+ Z(() => {
8060
8060
  o(Yh(s));
8061
8061
  }, [s]);
8062
8062
  const P = M(async () => {
@@ -8070,10 +8070,10 @@ function _g() {
8070
8070
  c(!1);
8071
8071
  }
8072
8072
  }, []);
8073
- ee(() => {
8073
+ Z(() => {
8074
8074
  P();
8075
8075
  }, [P]);
8076
- const F = M((N) => {
8076
+ const z = M((N) => {
8077
8077
  const g = Bs(N);
8078
8078
  window.open(g, "_blank", "noopener,noreferrer");
8079
8079
  }, []), U = M((N) => {
@@ -8082,7 +8082,7 @@ function _g() {
8082
8082
  "_blank",
8083
8083
  "noopener,noreferrer"
8084
8084
  );
8085
- }, []), K = M(async () => {
8085
+ }, []), J = M(async () => {
8086
8086
  if (!r.name.trim()) {
8087
8087
  oe.warning("请填写空间名称");
8088
8088
  return;
@@ -8096,7 +8096,7 @@ function _g() {
8096
8096
  oe.warning("请填写服务器目录路径");
8097
8097
  return;
8098
8098
  }
8099
- E(!0);
8099
+ $(!0);
8100
8100
  const N = {
8101
8101
  id: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
8102
8102
  name: r.name.trim(),
@@ -8107,8 +8107,8 @@ function _g() {
8107
8107
  path: r.type === "shared" ? r.path.trim() : void 0,
8108
8108
  createdAt: Date.now()
8109
8109
  }, g = [N, ...a];
8110
- o(g), En(s, g), f(Qt), E(!1), m(!1), F(N), setTimeout(P, 1500);
8111
- }, [r, a, s, F, P]), Z = M(
8110
+ o(g), En(s, g), f(Qt), $(!1), m(!1), z(N), setTimeout(P, 1500);
8111
+ }, [r, a, s, z, P]), X = M(
8112
8112
  (N) => {
8113
8113
  it.confirm({
8114
8114
  title: "删除工作空间",
@@ -8117,7 +8117,7 @@ function _g() {
8117
8117
  okButtonProps: { danger: !0 },
8118
8118
  cancelText: "取消",
8119
8119
  onOk: () => {
8120
- const g = a.filter((z) => z.id !== N.id);
8120
+ const g = a.filter((E) => E.id !== N.id);
8121
8121
  o(g), En(s, g), oe.success("已删除");
8122
8122
  }
8123
8123
  });
@@ -8135,7 +8135,7 @@ function _g() {
8135
8135
  }
8136
8136
  },
8137
8137
  [P]
8138
- ), G = M(
8138
+ ), F = M(
8139
8139
  (N) => {
8140
8140
  it.confirm({
8141
8141
  title: "删除实例",
@@ -8156,7 +8156,7 @@ function _g() {
8156
8156
  });
8157
8157
  },
8158
8158
  [P]
8159
- ), te = be(
8159
+ ), ee = be(
8160
8160
  () => l.filter((N) => N.status === 1).length,
8161
8161
  [l]
8162
8162
  );
@@ -8186,7 +8186,7 @@ function _g() {
8186
8186
  ) : /* @__PURE__ */ e("div", { className: re.cardGrid, children: a.map((N) => /* @__PURE__ */ n("div", { className: re.card, children: [
8187
8187
  /* @__PURE__ */ n("div", { className: re.cardHead, children: [
8188
8188
  /* @__PURE__ */ e("span", { className: re.cardName, title: N.name, children: N.name }),
8189
- /* @__PURE__ */ e(J, { color: N.type === "git" ? "blue" : "cyan", children: N.type === "git" ? "Git 仓库" : "服务器目录" })
8189
+ /* @__PURE__ */ e(V, { color: N.type === "git" ? "blue" : "cyan", children: N.type === "git" ? "Git 仓库" : "服务器目录" })
8190
8190
  ] }),
8191
8191
  /* @__PURE__ */ e("div", { className: re.cardMeta, title: $n(N), children: $n(N) }),
8192
8192
  /* @__PURE__ */ n("div", { className: re.cardFoot, children: [
@@ -8196,7 +8196,7 @@ function _g() {
8196
8196
  type: "link",
8197
8197
  size: "small",
8198
8198
  icon: /* @__PURE__ */ e(ht, {}),
8199
- onClick: () => F(N),
8199
+ onClick: () => z(N),
8200
8200
  children: "打开"
8201
8201
  }
8202
8202
  ),
@@ -8207,7 +8207,7 @@ function _g() {
8207
8207
  size: "small",
8208
8208
  danger: !0,
8209
8209
  icon: /* @__PURE__ */ e(zt, {}),
8210
- onClick: () => Z(N)
8210
+ onClick: () => X(N)
8211
8211
  }
8212
8212
  )
8213
8213
  ] })
@@ -8221,7 +8221,7 @@ function _g() {
8221
8221
  "来自 z-team-webide,共 ",
8222
8222
  l.length,
8223
8223
  " 个,运行中 ",
8224
- te,
8224
+ ee,
8225
8225
  " 个"
8226
8226
  ] }),
8227
8227
  /* @__PURE__ */ e(
@@ -8251,8 +8251,8 @@ function _g() {
8251
8251
  children: N.name || Qh(N.workspaceDir) || `实例 #${N.id}`
8252
8252
  }
8253
8253
  ),
8254
- /* @__PURE__ */ e(J, { color: N.status === 1 ? "green" : "default", children: N.status === 1 ? "运行中" : "已停止" }),
8255
- /* @__PURE__ */ e(J, { children: N.inspectType }),
8254
+ /* @__PURE__ */ e(V, { color: N.status === 1 ? "green" : "default", children: N.status === 1 ? "运行中" : "已停止" }),
8255
+ /* @__PURE__ */ e(V, { children: N.inspectType }),
8256
8256
  /* @__PURE__ */ e(
8257
8257
  "span",
8258
8258
  {
@@ -8279,7 +8279,7 @@ function _g() {
8279
8279
  type: "link",
8280
8280
  size: "small",
8281
8281
  icon: /* @__PURE__ */ e(gs, {}),
8282
- loading: Ke(j, N.id),
8282
+ loading: Ke(G, N.id),
8283
8283
  onClick: () => W(N),
8284
8284
  children: "停止"
8285
8285
  }
@@ -8291,8 +8291,8 @@ function _g() {
8291
8291
  size: "small",
8292
8292
  danger: !0,
8293
8293
  icon: /* @__PURE__ */ e(zt, {}),
8294
- loading: Ke(j, N.id),
8295
- onClick: () => G(N),
8294
+ loading: Ke(G, N.id),
8295
+ onClick: () => F(N),
8296
8296
  children: "删除"
8297
8297
  }
8298
8298
  )
@@ -8304,7 +8304,7 @@ function _g() {
8304
8304
  {
8305
8305
  title: "新建 WebIDE 工作空间",
8306
8306
  open: u,
8307
- onOk: K,
8307
+ onOk: J,
8308
8308
  onCancel: () => {
8309
8309
  f(Qt), m(!1);
8310
8310
  },
@@ -8400,7 +8400,7 @@ function Qh(t) {
8400
8400
  const s = t.replace(/\/+$/, ""), a = s.lastIndexOf("/");
8401
8401
  return a >= 0 ? s.substring(a + 1) : s;
8402
8402
  }
8403
- const Xh = "_host_1e6u2_1", Zh = "_header_1e6u2_11", ep = "_title_1e6u2_18", tp = "_subtitle_1e6u2_25", np = "_searchWrap_1e6u2_31", ap = "_searchIcon_1e6u2_47", sp = "_searchInput_1e6u2_52", lp = "_dimBar_1e6u2_66", op = "_dimBarLabel_1e6u2_73", ip = "_dimChip_1e6u2_78", rp = "_dimChipActive_1e6u2_96", cp = "_dimOrder_1e6u2_102", dp = "_dimReset_1e6u2_115", up = "_dimSummary_1e6u2_128", mp = "_listHost_1e6u2_135", hp = "_groupHeader_1e6u2_141", pp = "_groupCaret_1e6u2_158", fp = "_groupCaretOpen_1e6u2_165", _p = "_groupLabel_1e6u2_169", gp = "_groupCount_1e6u2_175", yp = "_rowWrap_1e6u2_183", vp = "_row_1e6u2_183", bp = "_agentDot_1e6u2_212", kp = "_rowTitle_1e6u2_225", Np = "_spacePill_1e6u2_235", Cp = "_rowAgent_1e6u2_251", wp = "_rowTime_1e6u2_265", Sp = "_rowActions_1e6u2_273", Tp = "_rowActionBtn_1e6u2_281", xp = "_rowActionBtnActive_1e6u2_297", Ip = "_rowUpdating_1e6u2_310", Lp = "_menuMask_1e6u2_315", Bp = "_empty_1e6u2_322", Ap = "_emptySpinner_1e6u2_332", Rp = "_emptyTitle_1e6u2_336", ue = {
8403
+ const Xh = "_host_11m4k_1", Zh = "_header_11m4k_11", ep = "_title_11m4k_18", tp = "_subtitle_11m4k_25", np = "_searchWrap_11m4k_31", ap = "_searchIcon_11m4k_47", sp = "_searchInput_11m4k_52", lp = "_dimBar_11m4k_66", op = "_dimBarLabel_11m4k_73", ip = "_dimChip_11m4k_78", rp = "_dimChipActive_11m4k_96", cp = "_dimOrder_11m4k_102", dp = "_dimReset_11m4k_115", up = "_dimSummary_11m4k_128", mp = "_listHost_11m4k_135", hp = "_groupHeader_11m4k_141", pp = "_groupCaret_11m4k_158", fp = "_groupCaretOpen_11m4k_165", _p = "_groupLabel_11m4k_169", gp = "_groupCount_11m4k_175", yp = "_rowWrap_11m4k_183", vp = "_row_11m4k_183", bp = "_agentDot_11m4k_212", kp = "_rowTitle_11m4k_225", Np = "_spacePill_11m4k_235", Cp = "_rowAgent_11m4k_251", wp = "_rowTime_11m4k_265", Sp = "_rowActions_11m4k_273", Tp = "_rowActionBtn_11m4k_281", xp = "_rowActionBtnActive_11m4k_297", Ip = "_rowUpdating_11m4k_310", Lp = "_menuMask_11m4k_315", Bp = "_empty_11m4k_322", Ap = "_emptySpinner_11m4k_332", Rp = "_emptyTitle_11m4k_336", ue = {
8404
8404
  host: Xh,
8405
8405
  header: Zh,
8406
8406
  title: ep,
@@ -8471,18 +8471,18 @@ function gg({
8471
8471
  try {
8472
8472
  const g = localStorage.getItem(Hn);
8473
8473
  return (g ? JSON.parse(g) : []).filter(
8474
- (V) => On.some((ne) => ne.key === V)
8474
+ (te) => On.some((se) => se.key === te)
8475
8475
  );
8476
8476
  } catch {
8477
8477
  return [];
8478
8478
  }
8479
8479
  }), [m, r] = i(
8480
8480
  /* @__PURE__ */ new Set()
8481
- ), [f, w] = i(""), [E, j] = i(null), [I, P] = i(null);
8482
- ee(() => {
8481
+ ), [f, w] = i(""), [$, G] = i(null), [I, P] = i(null);
8482
+ Z(() => {
8483
8483
  let g = !0;
8484
- return h(!0), Ea(s).then((z) => {
8485
- g && l(z || []);
8484
+ return h(!0), Ea(s).then((E) => {
8485
+ g && l(E || []);
8486
8486
  }).catch(() => {
8487
8487
  g && l([]);
8488
8488
  }).finally(() => {
@@ -8490,29 +8490,29 @@ function gg({
8490
8490
  }), () => {
8491
8491
  g = !1;
8492
8492
  };
8493
- }, [s]), ee(() => {
8493
+ }, [s]), Z(() => {
8494
8494
  localStorage.setItem(Hn, JSON.stringify(c));
8495
8495
  }, [c]);
8496
- const F = be(() => {
8496
+ const z = be(() => {
8497
8497
  const g = /* @__PURE__ */ new Map();
8498
- for (const z of t) g.set(z.id, z);
8498
+ for (const E of t) g.set(E.id, E);
8499
8499
  return g;
8500
8500
  }, [t]), U = M((g) => {
8501
8501
  u(
8502
- (z) => z.includes(g) ? z.filter((V) => V !== g) : [...z, g]
8502
+ (E) => E.includes(g) ? E.filter((te) => te !== g) : [...E, g]
8503
8503
  );
8504
- }, []), K = M((g) => {
8505
- r((z) => {
8506
- const V = new Set(z);
8507
- return V.has(g) ? V.delete(g) : V.add(g), V;
8504
+ }, []), J = M((g) => {
8505
+ r((E) => {
8506
+ const te = new Set(E);
8507
+ return te.has(g) ? te.delete(g) : te.add(g), te;
8508
8508
  });
8509
- }, []), Z = be(() => {
8510
- const g = f.trim().toLowerCase(), z = g ? o.filter((_) => (_.title || "").toLowerCase().includes(g)) : o;
8509
+ }, []), X = be(() => {
8510
+ const g = f.trim().toLowerCase(), E = g ? o.filter((_) => (_.title || "").toLowerCase().includes(g)) : o;
8511
8511
  if (c.length === 0)
8512
- return [{ key: "__all__", label: "", rawKey: "", sessions: z }];
8513
- function V(_, $) {
8512
+ return [{ key: "__all__", label: "", rawKey: "", sessions: E }];
8513
+ function te(_, O) {
8514
8514
  var A;
8515
- switch ($) {
8515
+ switch (O) {
8516
8516
  case "time":
8517
8517
  return Mp(_);
8518
8518
  case "space":
@@ -8523,48 +8523,48 @@ function gg({
8523
8523
  case "agent":
8524
8524
  return [
8525
8525
  String(_.personalAgentId),
8526
- ((A = F.get(_.personalAgentId)) == null ? void 0 : A.displayName) || "未知伙伴"
8526
+ ((A = z.get(_.personalAgentId)) == null ? void 0 : A.displayName) || "未知伙伴"
8527
8527
  ];
8528
8528
  }
8529
8529
  }
8530
- function ne(_, $, A) {
8531
- if ($.length === 0) return [];
8532
- const [Y, ...v] = $, y = /* @__PURE__ */ new Map();
8533
- for (const O of _) {
8534
- const [ae, ce] = V(O, Y);
8535
- y.has(ae) || y.set(ae, { label: ce, items: [] }), y.get(ae).items.push(O);
8530
+ function se(_, O, A) {
8531
+ if (O.length === 0) return [];
8532
+ const [K, ...v] = O, y = /* @__PURE__ */ new Map();
8533
+ for (const H of _) {
8534
+ const [ne, ce] = te(H, K);
8535
+ y.has(ne) || y.set(ne, { label: ce, items: [] }), y.get(ne).items.push(H);
8536
8536
  }
8537
8537
  const q = [];
8538
- for (const [O, { label: ae, items: ce }] of y) {
8539
- const _e = `${A}::${Y}=${O}`;
8538
+ for (const [H, { label: ne, items: ce }] of y) {
8539
+ const _e = `${A}::${K}=${H}`;
8540
8540
  q.push({
8541
8541
  key: _e,
8542
- label: ae,
8543
- rawKey: O,
8542
+ label: ne,
8543
+ rawKey: H,
8544
8544
  sessions: ce,
8545
- children: v.length > 0 ? ne(ce, v, _e) : void 0
8545
+ children: v.length > 0 ? se(ce, v, _e) : void 0
8546
8546
  });
8547
8547
  }
8548
8548
  return q.sort(
8549
- (O, ae) => Y === "time" ? O.rawKey.localeCompare(ae.rawKey) : ae.sessions.length - O.sessions.length
8549
+ (H, ne) => K === "time" ? H.rawKey.localeCompare(ne.rawKey) : ne.sessions.length - H.sessions.length
8550
8550
  ), q;
8551
8551
  }
8552
- return ne(z, c, "");
8553
- }, [o, c, f, F]), W = be(
8554
- () => Z.reduce((g, z) => g + z.sessions.length, 0),
8555
- [Z]
8556
- ), G = M(
8557
- async (g, z) => {
8558
- j(null), P(g.id);
8552
+ return se(E, c, "");
8553
+ }, [o, c, f, z]), W = be(
8554
+ () => X.reduce((g, E) => g + E.sessions.length, 0),
8555
+ [X]
8556
+ ), F = M(
8557
+ async (g, E) => {
8558
+ G(null), P(g.id);
8559
8559
  try {
8560
- const V = await $a(
8560
+ const te = await $a(
8561
8561
  g.personalAgentId,
8562
8562
  g.id,
8563
8563
  s,
8564
- z
8564
+ E
8565
8565
  );
8566
8566
  l(
8567
- (ne) => ne.map((_) => _.id === V.id ? { ..._, ...V } : _)
8567
+ (se) => se.map((_) => _.id === te.id ? { ..._, ...te } : _)
8568
8568
  );
8569
8569
  } catch {
8570
8570
  } finally {
@@ -8572,19 +8572,18 @@ function gg({
8572
8572
  }
8573
8573
  },
8574
8574
  [s]
8575
- ), te = M(
8576
- (g, z) => {
8577
- const V = F.get(g.personalAgentId), ne = E === g.id;
8575
+ ), ee = M(
8576
+ (g) => {
8577
+ const E = z.get(g.personalAgentId), te = $ === g.id;
8578
8578
  return /* @__PURE__ */ n("div", { className: ue.rowWrap, children: [
8579
8579
  /* @__PURE__ */ n(
8580
8580
  "button",
8581
8581
  {
8582
8582
  type: "button",
8583
8583
  className: ue.row,
8584
- style: { paddingLeft: 16 + z * 20 },
8585
- disabled: !V,
8586
- title: V ? g.title : "伙伴已不存在,无法打开",
8587
- onClick: () => V && a(V, g.id),
8584
+ disabled: !E,
8585
+ title: E ? g.title : "伙伴已不存在,无法打开",
8586
+ onClick: () => E && a(E, g.id),
8588
8587
  children: [
8589
8588
  /* @__PURE__ */ e(
8590
8589
  "span",
@@ -8592,10 +8591,10 @@ function gg({
8592
8591
  className: ue.agentDot,
8593
8592
  style: {
8594
8593
  background: Dp(
8595
- (V == null ? void 0 : V.displayName) || String(g.personalAgentId)
8594
+ (E == null ? void 0 : E.displayName) || String(g.personalAgentId)
8596
8595
  )
8597
8596
  },
8598
- children: ((V == null ? void 0 : V.displayName) || "?").charAt(0).toUpperCase()
8597
+ children: ((E == null ? void 0 : E.displayName) || "?").charAt(0).toUpperCase()
8599
8598
  }
8600
8599
  ),
8601
8600
  /* @__PURE__ */ e("span", { className: ue.rowTitle, children: g.title || "未命名会话" }),
@@ -8605,7 +8604,7 @@ function gg({
8605
8604
  ] }),
8606
8605
  /* @__PURE__ */ n("span", { className: ue.rowAgent, children: [
8607
8606
  /* @__PURE__ */ e(rn, {}),
8608
- (V == null ? void 0 : V.displayName) || "未知伙伴"
8607
+ (E == null ? void 0 : E.displayName) || "未知伙伴"
8609
8608
  ] }),
8610
8609
  /* @__PURE__ */ e("span", { className: ue.rowTime, children: Pp(g) })
8611
8610
  ]
@@ -8618,17 +8617,17 @@ function gg({
8618
8617
  type: "button",
8619
8618
  className: `${ue.rowActionBtn} ${g.projectSpaceId != null ? ue.rowActionBtnActive : ""}`,
8620
8619
  title: "归入项目空间",
8621
- onClick: () => j(ne ? null : g.id),
8620
+ onClick: () => G(te ? null : g.id),
8622
8621
  children: /* @__PURE__ */ e(vn, {})
8623
8622
  }
8624
8623
  ),
8625
8624
  I === g.id && /* @__PURE__ */ e(bn, { className: ue.rowUpdating }),
8626
- ne && /* @__PURE__ */ n(ge, { children: [
8625
+ te && /* @__PURE__ */ n(ge, { children: [
8627
8626
  /* @__PURE__ */ e(
8628
8627
  "div",
8629
8628
  {
8630
8629
  className: ue.menuMask,
8631
- onClick: () => j(null)
8630
+ onClick: () => G(null)
8632
8631
  }
8633
8632
  ),
8634
8633
  /* @__PURE__ */ e(
@@ -8637,31 +8636,31 @@ function gg({
8637
8636
  token: s,
8638
8637
  alignRight: !0,
8639
8638
  currentId: g.projectSpaceId ?? null,
8640
- onPick: (_) => void G(g, _)
8639
+ onPick: (se) => void F(g, se)
8641
8640
  }
8642
8641
  )
8643
8642
  ] })
8644
8643
  ] })
8645
8644
  ] }, g.id);
8646
8645
  },
8647
- [F, E, a, s, G, I]
8646
+ [z, $, a, s, F, I]
8648
8647
  ), N = M(
8649
- (g, z) => {
8650
- const V = m.has(g.key);
8648
+ (g, E) => {
8649
+ const te = m.has(g.key);
8651
8650
  return /* @__PURE__ */ n("div", { children: [
8652
8651
  g.label && /* @__PURE__ */ n(
8653
8652
  "button",
8654
8653
  {
8655
8654
  type: "button",
8656
8655
  className: ue.groupHeader,
8657
- style: { paddingLeft: 16 + z * 20 },
8658
- onClick: () => K(g.key),
8659
- "aria-expanded": !V,
8656
+ style: { paddingLeft: 16 + E * 20 },
8657
+ onClick: () => J(g.key),
8658
+ "aria-expanded": !te,
8660
8659
  children: [
8661
8660
  /* @__PURE__ */ e(
8662
8661
  Ps,
8663
8662
  {
8664
- className: `${ue.groupCaret} ${V ? "" : ue.groupCaretOpen}`
8663
+ className: `${ue.groupCaret} ${te ? "" : ue.groupCaretOpen}`
8665
8664
  }
8666
8665
  ),
8667
8666
  /* @__PURE__ */ e("span", { className: ue.groupLabel, children: g.label }),
@@ -8669,12 +8668,10 @@ function gg({
8669
8668
  ]
8670
8669
  }
8671
8670
  ),
8672
- !V && (g.children && g.children.length > 0 ? g.children.map((ne) => N(ne, z + 1)) : g.sessions.map(
8673
- (ne) => te(ne, g.label ? z + 1 : z)
8674
- ))
8671
+ !te && (g.children && g.children.length > 0 ? g.children.map((se) => N(se, E + 1)) : g.sessions.map((se) => ee(se)))
8675
8672
  ] }, g.key);
8676
8673
  },
8677
- [m, K, te]
8674
+ [m, J, ee]
8678
8675
  );
8679
8676
  return /* @__PURE__ */ n("div", { className: ue.host, children: [
8680
8677
  /* @__PURE__ */ n("div", { className: ue.header, children: [
@@ -8698,17 +8695,17 @@ function gg({
8698
8695
  /* @__PURE__ */ n("div", { className: ue.dimBar, children: [
8699
8696
  /* @__PURE__ */ e("span", { className: ue.dimBarLabel, children: "分组" }),
8700
8697
  On.map((g) => {
8701
- const z = c.indexOf(g.key);
8698
+ const E = c.indexOf(g.key);
8702
8699
  return /* @__PURE__ */ n(
8703
8700
  "button",
8704
8701
  {
8705
8702
  type: "button",
8706
- className: `${ue.dimChip} ${z >= 0 ? ue.dimChipActive : ""}`,
8707
- title: `按${g.label}分组${z >= 0 ? `(第 ${z + 1} 层)` : ""}`,
8703
+ className: `${ue.dimChip} ${E >= 0 ? ue.dimChipActive : ""}`,
8704
+ title: `按${g.label}分组${E >= 0 ? `(第 ${E + 1} 层)` : ""}`,
8708
8705
  onClick: () => U(g.key),
8709
8706
  children: [
8710
8707
  g.label,
8711
- z >= 0 && /* @__PURE__ */ e("span", { className: ue.dimOrder, children: z + 1 })
8708
+ E >= 0 && /* @__PURE__ */ e("span", { className: ue.dimOrder, children: E + 1 })
8712
8709
  ]
8713
8710
  },
8714
8711
  g.key
@@ -8728,7 +8725,7 @@ function gg({
8728
8725
  /* @__PURE__ */ e("div", { className: ue.listHost, children: d ? /* @__PURE__ */ n("div", { className: ue.empty, children: [
8729
8726
  /* @__PURE__ */ e(bn, { className: ue.emptySpinner }),
8730
8727
  /* @__PURE__ */ e("span", { children: "正在加载聊天记录…" })
8731
- ] }) : W === 0 ? /* @__PURE__ */ e("div", { className: ue.empty, children: /* @__PURE__ */ e("span", { className: ue.emptyTitle, children: o.length === 0 ? "还没有会话,去新建任务开始第一段对话吧" : "没有匹配的会话" }) }) : Z.map((g) => N(g, 0)) })
8728
+ ] }) : W === 0 ? /* @__PURE__ */ e("div", { className: ue.empty, children: /* @__PURE__ */ e("span", { className: ue.emptyTitle, children: o.length === 0 ? "还没有会话,去新建任务开始第一段对话吧" : "没有匹配的会话" }) }) : X.map((g) => N(g, 0)) })
8732
8729
  ] });
8733
8730
  }
8734
8731
  const Ep = "_host_11by3_1", $p = "_header_11by3_11", Op = "_title_11by3_17", Hp = "_subtitle_11by3_24", jp = "_section_11by3_30", Gp = "_sectionHead_11by3_36", Fp = "_sectionIcon_11by3_42", zp = "_sectionTitle_11by3_48", Up = "_sectionDesc_11by3_54", Wp = "_empty_11by3_59", qp = "_agentList_11by3_69", Vp = "_agentRow_11by3_78", Jp = "_agentDot_11by3_90", Kp = "_agentMain_11by3_103", Yp = "_agentName_11by3_111", Qp = "_sharedBadge_11by3_120", Xp = "_agentCode_11by3_129", Zp = "_rowBtn_11by3_137", ef = "_rowBtnGhost_11by3_156", tf = "_createRow_11by3_160", nf = "_createInput_11by3_167", af = "_createBtn_11by3_182", sf = "_skillGrid_11by3_202", lf = "_skillCard_11by3_208", of = "_skillHead_11by3_218", rf = "_skillName_11by3_225", cf = "_skillToggle_11by3_231", df = "_skillToggleOn_11by3_254", uf = "_skillToggling_11by3_262", mf = "_skillCategory_11by3_267", hf = "_skillDesc_11by3_276", pf = "_marketToolbar_11by3_286", ff = "_marketSearch_11by3_292", _f = "_marketSearchIcon_11by3_307", gf = "_chipRow_11by3_324", yf = "_chipRowLabel_11by3_331", vf = "_tagChip_11by3_339", bf = "_chip_11by3_324", kf = "_chipActive_11by3_361", Nf = "_marketGroups_11by3_368", Cf = "_marketGroup_11by3_368", wf = "_marketGroupHead_11by3_380", Sf = "_marketGroupName_11by3_388", Tf = "_marketGroupCount_11by3_394", xf = "_marketGrid_11by3_399", If = "_marketCard_11by3_405", Lf = "_cardHead_11by3_427", Bf = "_cardIcon_11by3_433", Af = "_cardTitle_11by3_445", Rf = "_cardName_11by3_452", Df = "_cardCode_11by3_461", Pf = "_cardDesc_11by3_470", Mf = "_tagRow_11by3_479", Ef = "_tagPill_11by3_485", $f = "_cardSymptom_11by3_495", Of = "_cardFoot_11by3_515", Hf = "_footTag_11by3_523", jf = "_footMeta_11by3_532", Gf = "_detailMask_11by3_542", Ff = "_detailPanel_11by3_549", zf = "_detailHead_11by3_567", Uf = "_detailTitleWrap_11by3_574", Wf = "_detailTitle_11by3_574", qf = "_detailCode_11by3_587", Vf = "_detailClose_11by3_593", Jf = "_detailMeta_11by3_610", Kf = "_metaItem_11by3_616", Yf = "_detailSymptoms_11by3_624", Qf = "_detailSymptomLabel_11by3_635", Xf = "_detailBody_11by3_642", Zf = "_detailRefs_11by3_657", e_ = "_detailRefsBody_11by3_663", t_ = "_detailNote_11by3_678", n_ = "_placeholderGrid_11by3_686", a_ = "_placeholderCard_11by3_692", s_ = "_placeholderName_11by3_701", l_ = "_placeholderDesc_11by3_707", C = {
@@ -8820,26 +8817,26 @@ function yg({
8820
8817
  onCreated: h
8821
8818
  }) {
8822
8819
  var Je;
8823
- const c = t.filter((T) => !T.isLocal), [u, m] = i([]), [r, f] = i(!1), [w, E] = i(null), [j, I] = i(""), [P, F] = i(!1), [U, K] = i([]), [Z, W] = i(!1), [G, te] = i(""), [N, g] = i(""), [z, V] = i(""), [ne, _] = i(null), [$, A] = i(null), [Y, v] = i(!1), [y, q] = i(null), [O, ae] = i(null), [ce, _e] = i(!1);
8824
- ee(() => {
8825
- const T = setTimeout(() => V(N.trim()), 300);
8820
+ const c = t.filter((T) => !T.isLocal), [u, m] = i([]), [r, f] = i(!1), [w, $] = i(null), [G, I] = i(""), [P, z] = i(!1), [U, J] = i([]), [X, W] = i(!1), [F, ee] = i(""), [N, g] = i(""), [E, te] = i(""), [se, _] = i(null), [O, A] = i(null), [K, v] = i(!1), [y, q] = i(null), [H, ne] = i(null), [ce, _e] = i(!1);
8821
+ Z(() => {
8822
+ const T = setTimeout(() => te(N.trim()), 300);
8826
8823
  return () => clearTimeout(T);
8827
8824
  }, [N]);
8828
8825
  const ve = M(async () => {
8829
- W(!0), te("");
8826
+ W(!0), ee("");
8830
8827
  try {
8831
8828
  const T = await wl(
8832
- { status: 1, keyword: z || void 0 },
8829
+ { status: 1, keyword: E || void 0 },
8833
8830
  o
8834
8831
  );
8835
- K(Array.isArray(T) ? T : []);
8832
+ J(Array.isArray(T) ? T : []);
8836
8833
  } catch (T) {
8837
- K([]), te(T instanceof Error ? T.message : "技能市场加载失败");
8834
+ J([]), ee(T instanceof Error ? T.message : "技能市场加载失败");
8838
8835
  } finally {
8839
8836
  W(!1);
8840
8837
  }
8841
- }, [z, o]);
8842
- ee(() => {
8838
+ }, [E, o]);
8839
+ Z(() => {
8843
8840
  ve();
8844
8841
  }, [ve]);
8845
8842
  const he = "未分组", Ne = (T) => {
@@ -8853,17 +8850,17 @@ function yg({
8853
8850
  ), qe = Array.from(new Set(U.flatMap(Ne))).sort(
8854
8851
  (T, pe) => T.localeCompare(pe, "zh")
8855
8852
  ), nt = U.filter(
8856
- (T) => (ne === null || Se(T) === ne) && ($ === null || Ne(T).includes($))
8853
+ (T) => (se === null || Se(T) === se) && (O === null || Ne(T).includes(O))
8857
8854
  ), Ve = He.map((T) => ({
8858
8855
  group: T,
8859
8856
  items: nt.filter((pe) => Se(pe) === T)
8860
8857
  })).filter((T) => T.items.length > 0), Ge = async (T) => {
8861
- if (q(T), ae(null), v(!0), !!T.id) {
8858
+ if (q(T), ne(null), v(!0), !!T.id) {
8862
8859
  _e(!0);
8863
8860
  try {
8864
- ae(await Sl(T.id, o));
8861
+ ne(await Sl(T.id, o));
8865
8862
  } catch {
8866
- ae(null);
8863
+ ne(null);
8867
8864
  } finally {
8868
8865
  _e(!1);
8869
8866
  }
@@ -8886,12 +8883,12 @@ function yg({
8886
8883
  }
8887
8884
  }
8888
8885
  }, [a, o]);
8889
- ee(() => {
8886
+ Z(() => {
8890
8887
  je();
8891
8888
  }, [je]);
8892
8889
  const Qe = async (T) => {
8893
8890
  if (!(!a || w)) {
8894
- E(T.skill_code);
8891
+ $(T.skill_code);
8895
8892
  try {
8896
8893
  await na(
8897
8894
  a.id,
@@ -8905,19 +8902,19 @@ function yg({
8905
8902
  );
8906
8903
  } catch {
8907
8904
  } finally {
8908
- E(null);
8905
+ $(null);
8909
8906
  }
8910
8907
  }
8911
8908
  }, ze = async () => {
8912
- const T = j.trim();
8909
+ const T = G.trim();
8913
8910
  if (!(!T || P)) {
8914
- F(!0);
8911
+ z(!0);
8915
8912
  try {
8916
8913
  const pe = await Oa(T, o);
8917
8914
  h(pe), I("");
8918
8915
  } catch {
8919
8916
  } finally {
8920
- F(!1);
8917
+ z(!1);
8921
8918
  }
8922
8919
  }
8923
8920
  };
@@ -8979,7 +8976,7 @@ function yg({
8979
8976
  "input",
8980
8977
  {
8981
8978
  className: C.createInput,
8982
- value: j,
8979
+ value: G,
8983
8980
  placeholder: "新智能体名称",
8984
8981
  onChange: (T) => I(T.target.value),
8985
8982
  onKeyDown: (T) => {
@@ -8992,7 +8989,7 @@ function yg({
8992
8989
  {
8993
8990
  type: "button",
8994
8991
  className: C.createBtn,
8995
- disabled: !j.trim() || P,
8992
+ disabled: !G.trim() || P,
8996
8993
  onClick: () => void ze(),
8997
8994
  children: [
8998
8995
  /* @__PURE__ */ e(sa, {}),
@@ -9006,7 +9003,7 @@ function yg({
9006
9003
  /* @__PURE__ */ n("div", { className: C.sectionHead, children: [
9007
9004
  /* @__PURE__ */ e("span", { className: C.sectionIcon, children: /* @__PURE__ */ e(kn, {}) }),
9008
9005
  /* @__PURE__ */ e("span", { className: C.sectionTitle, children: "技能市场" }),
9009
- /* @__PURE__ */ e("span", { className: C.sectionDesc, children: Z ? "加载中…" : `${U.length} 个上架技能 · FT 内置技能渠道` })
9006
+ /* @__PURE__ */ e("span", { className: C.sectionDesc, children: X ? "加载中…" : `${U.length} 个上架技能 · FT 内置技能渠道` })
9010
9007
  ] }),
9011
9008
  /* @__PURE__ */ n("div", { className: C.marketToolbar, children: [
9012
9009
  /* @__PURE__ */ n("div", { className: C.marketSearch, children: [
@@ -9025,7 +9022,7 @@ function yg({
9025
9022
  "button",
9026
9023
  {
9027
9024
  type: "button",
9028
- className: `${C.chip} ${ne === null ? C.chipActive : ""}`,
9025
+ className: `${C.chip} ${se === null ? C.chipActive : ""}`,
9029
9026
  onClick: () => _(null),
9030
9027
  children: "全部技能"
9031
9028
  }
@@ -9034,8 +9031,8 @@ function yg({
9034
9031
  "button",
9035
9032
  {
9036
9033
  type: "button",
9037
- className: `${C.chip} ${ne === T ? C.chipActive : ""}`,
9038
- onClick: () => _(ne === T ? null : T),
9034
+ className: `${C.chip} ${se === T ? C.chipActive : ""}`,
9035
+ onClick: () => _(se === T ? null : T),
9039
9036
  children: [
9040
9037
  T,
9041
9038
  " · ",
@@ -9051,15 +9048,15 @@ function yg({
9051
9048
  "button",
9052
9049
  {
9053
9050
  type: "button",
9054
- className: `${C.chip} ${C.tagChip} ${$ === T ? C.chipActive : ""}`,
9055
- onClick: () => A($ === T ? null : T),
9051
+ className: `${C.chip} ${C.tagChip} ${O === T ? C.chipActive : ""}`,
9052
+ onClick: () => A(O === T ? null : T),
9056
9053
  children: T
9057
9054
  },
9058
9055
  T
9059
9056
  ))
9060
9057
  ] })
9061
9058
  ] }),
9062
- Z && U.length === 0 ? /* @__PURE__ */ e("div", { className: C.empty, children: "技能市场加载中…" }) : G ? /* @__PURE__ */ e("div", { className: C.empty, children: G }) : Ve.length === 0 ? /* @__PURE__ */ e("div", { className: C.empty, children: U.length === 0 ? "渠道暂无上架技能" : "没有匹配的技能" }) : /* @__PURE__ */ e("div", { className: C.marketGroups, children: Ve.map(({ group: T, items: pe }) => /* @__PURE__ */ n("div", { className: C.marketGroup, children: [
9059
+ X && U.length === 0 ? /* @__PURE__ */ e("div", { className: C.empty, children: "技能市场加载中…" }) : F ? /* @__PURE__ */ e("div", { className: C.empty, children: F }) : Ve.length === 0 ? /* @__PURE__ */ e("div", { className: C.empty, children: U.length === 0 ? "渠道暂无上架技能" : "没有匹配的技能" }) : /* @__PURE__ */ e("div", { className: C.marketGroups, children: Ve.map(({ group: T, items: pe }) => /* @__PURE__ */ n("div", { className: C.marketGroup, children: [
9063
9060
  /* @__PURE__ */ n("div", { className: C.marketGroupHead, children: [
9064
9061
  /* @__PURE__ */ e("span", { className: C.marketGroupName, children: T }),
9065
9062
  /* @__PURE__ */ n("span", { className: C.marketGroupCount, children: [
@@ -9151,7 +9148,7 @@ function yg({
9151
9148
  ] })
9152
9149
  ] })
9153
9150
  ] }),
9154
- Y && y && /* @__PURE__ */ n(ge, { children: [
9151
+ K && y && /* @__PURE__ */ n(ge, { children: [
9155
9152
  /* @__PURE__ */ e(
9156
9153
  "div",
9157
9154
  {
@@ -9186,11 +9183,11 @@ function yg({
9186
9183
  /* @__PURE__ */ e("span", { className: C.detailSymptomLabel, children: "适用症状" }),
9187
9184
  y.symptoms
9188
9185
  ] }),
9189
- ce ? /* @__PURE__ */ e("div", { className: C.empty, children: "册子正文加载中…" }) : O != null && O.content ? /* @__PURE__ */ n(ge, { children: [
9190
- /* @__PURE__ */ e("pre", { className: C.detailBody, children: O.content }),
9191
- O.refFiles && /* @__PURE__ */ n("div", { className: C.detailRefs, children: [
9186
+ ce ? /* @__PURE__ */ e("div", { className: C.empty, children: "册子正文加载中…" }) : H != null && H.content ? /* @__PURE__ */ n(ge, { children: [
9187
+ /* @__PURE__ */ e("pre", { className: C.detailBody, children: H.content }),
9188
+ H.refFiles && /* @__PURE__ */ n("div", { className: C.detailRefs, children: [
9192
9189
  /* @__PURE__ */ e("span", { className: C.detailSymptomLabel, children: "附属文件" }),
9193
- /* @__PURE__ */ e("pre", { className: C.detailRefsBody, children: O.refFiles })
9190
+ /* @__PURE__ */ e("pre", { className: C.detailRefsBody, children: H.refFiles })
9194
9191
  ] })
9195
9192
  ] }) : /* @__PURE__ */ e("div", { className: C.empty, children: "无册子正文" }),
9196
9193
  /* @__PURE__ */ e("div", { className: C.detailNote, children: "伙伴运行时按「适用症状」经 skill 工具自动装册(search → fetch),无需手动安装" })