@blueking/ai-blueking 1.2.3 → 1.2.4-beta.2

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 (85) hide show
  1. package/dist/vue2/{arc-CoITCIeg.mjs → arc-BbjP-KpD.mjs} +1 -1
  2. package/dist/vue2/{blockDiagram-38ab4fdb-B79ALQFr.mjs → blockDiagram-38ab4fdb-BNqXW3w7.mjs} +5 -5
  3. package/dist/{vue3/c4Diagram-3d4e48cf-DBY6dYfi.mjs → vue2/c4Diagram-3d4e48cf-qiOfT5h-.mjs} +2 -2
  4. package/dist/{vue3/channel-B_u2Kbah.mjs → vue2/channel-KvtvS4xZ.mjs} +1 -1
  5. package/dist/vue2/{classDiagram-70f12bd4-TUGX41Hr.mjs → classDiagram-70f12bd4-Ci9LEt-e.mjs} +5 -5
  6. package/dist/vue2/{classDiagram-v2-f2320105-DD7zTzsZ.mjs → classDiagram-v2-f2320105-CqZ_yFMp.mjs} +5 -5
  7. package/dist/vue2/{clone-kSlC3ZuF.mjs → clone-Bl0_l-uy.mjs} +1 -1
  8. package/dist/vue2/{createText-2e5e7dd3-Bs4zLwec.mjs → createText-2e5e7dd3-CJ0oTZoL.mjs} +1 -1
  9. package/dist/{vue3/edges-e0da2a9e-cskaPHoA.mjs → vue2/edges-e0da2a9e-TMIwnL_w.mjs} +3 -3
  10. package/dist/{vue3/erDiagram-9861fffd-cZK-bNAM.mjs → vue2/erDiagram-9861fffd-CUqKaKZb.mjs} +4 -4
  11. package/dist/vue2/{flowDb-956e92f1-DqLnUF-k.mjs → flowDb-956e92f1-B5takIrS.mjs} +1 -1
  12. package/dist/{vue3/flowDiagram-66a62f08-DalCgmrg.mjs → vue2/flowDiagram-66a62f08-BtbGNMiV.mjs} +6 -6
  13. package/dist/vue2/{flowDiagram-v2-96b9c2cf-CIEmz0g3.mjs → flowDiagram-v2-96b9c2cf-DPDLUOdj.mjs} +5 -5
  14. package/dist/vue2/{flowchart-elk-definition-4a651766-j2EoWTmc.mjs → flowchart-elk-definition-4a651766-DQ3w6ATQ.mjs} +4 -4
  15. package/dist/{vue3/ganttDiagram-c361ad54-Cs4P9X7B.mjs → vue2/ganttDiagram-c361ad54-DcYTPxzW.mjs} +2 -2
  16. package/dist/vue2/{gitGraphDiagram-72cf32ee-BCTVjY7p.mjs → gitGraphDiagram-72cf32ee-Bi18eBqf.mjs} +1 -1
  17. package/dist/vue2/{graph-Dcxz709E.mjs → graph-D9-3Aixt.mjs} +1 -1
  18. package/dist/{vue3/index-3862675e-C7lJNnnh.mjs → vue2/index-3862675e-7EZxZuav.mjs} +6 -6
  19. package/dist/vue2/index.es.min.js +1 -1
  20. package/dist/vue2/index.iife.min.js +3 -3
  21. package/dist/vue2/index.umd.min.js +3 -3
  22. package/dist/vue2/{infoDiagram-f8f76790-hj8k-SBv.mjs → infoDiagram-f8f76790-DtS9jx2g.mjs} +1 -1
  23. package/dist/vue2/{journeyDiagram-49397b02-C0DCZid3.mjs → journeyDiagram-49397b02-DTtQfO6V.mjs} +3 -3
  24. package/dist/vue2/{layout-DH8CMw1a.mjs → layout-C1ctolBY.mjs} +2 -2
  25. package/dist/vue2/{line-yLO7kdd0.mjs → line-BalR2WKF.mjs} +1 -1
  26. package/dist/vue2/{linear-B17g9H1-.mjs → linear-CE0XD8vE.mjs} +1 -1
  27. package/dist/vue2/{mindmap-definition-fc14e90a-Bz_gLosq.mjs → mindmap-definition-fc14e90a-jOQSGoZX.mjs} +2 -2
  28. package/dist/vue2/{pieDiagram-8a3498a8-Dv-vMRyC.mjs → pieDiagram-8a3498a8-B1V2RtrX.mjs} +2 -2
  29. package/dist/vue2/{quadrantDiagram-120e2f19-fuR7zO_t.mjs → quadrantDiagram-120e2f19-B3WaiiRD.mjs} +2 -2
  30. package/dist/vue2/{requirementDiagram-deff3bca-LC2xsHoX.mjs → requirementDiagram-deff3bca-BURD3DSL.mjs} +4 -4
  31. package/dist/vue2/{sankeyDiagram-04a897e0-BZuuDL9W.mjs → sankeyDiagram-04a897e0-dmECM0pe.mjs} +1 -1
  32. package/dist/vue2/{sequenceDiagram-704730f1-DZ7wY6si.mjs → sequenceDiagram-704730f1-bZRTVN9M.mjs} +2 -2
  33. package/dist/{vue3/stateDiagram-587899a1-JBSELOt8.mjs → vue2/stateDiagram-587899a1-DKVn_6ZA.mjs} +5 -5
  34. package/dist/vue2/{stateDiagram-v2-d93cdb3a-DflkHVal.mjs → stateDiagram-v2-d93cdb3a-YkBXMt-D.mjs} +5 -5
  35. package/dist/vue2/style.css +1 -1
  36. package/dist/{vue3/styles-6aaf32cf-DaAE-dN6.mjs → vue2/styles-6aaf32cf-DCRogc-n.mjs} +1 -1
  37. package/dist/vue2/{styles-9a916d00-DbQ5RQXR.mjs → styles-9a916d00-BitAVXpd.mjs} +1 -1
  38. package/dist/{vue3/styles-c10674c1-C8cDBA3I.mjs → vue2/styles-c10674c1-DECxoTvs.mjs} +4 -4
  39. package/dist/vue2/{svgDrawCommon-08f97a94-Dl3rEnvk.mjs → svgDrawCommon-08f97a94-DNPf_mK8.mjs} +1 -1
  40. package/dist/vue2/{timeline-definition-85554ec2-BX7myD6R.mjs → timeline-definition-85554ec2-B1jShlXM.mjs} +2 -2
  41. package/dist/vue2/{vue2-BDVsNVVl.mjs → vue2-Bo_RgFqf.mjs} +617 -603
  42. package/dist/{vue3/xychartDiagram-e933f94c-BR8JWdpv.mjs → vue2/xychartDiagram-e933f94c-DOfdgZJD.mjs} +4 -4
  43. package/dist/vue3/{arc-JbBswLsk.mjs → arc-BnyRmQmM.mjs} +1 -1
  44. package/dist/vue3/{blockDiagram-38ab4fdb-B11c8tmJ.mjs → blockDiagram-38ab4fdb-CG_wgnbL.mjs} +5 -5
  45. package/dist/{vue2/c4Diagram-3d4e48cf-ZjBKDmcG.mjs → vue3/c4Diagram-3d4e48cf-BYdAU8HJ.mjs} +2 -2
  46. package/dist/{vue2/channel-CHAr-DS3.mjs → vue3/channel-8OxsQkdL.mjs} +1 -1
  47. package/dist/vue3/{classDiagram-70f12bd4-RpyKqv0B.mjs → classDiagram-70f12bd4-DMQVDgIL.mjs} +5 -5
  48. package/dist/vue3/{classDiagram-v2-f2320105-SdFoPeNM.mjs → classDiagram-v2-f2320105--5aQo4eJ.mjs} +5 -5
  49. package/dist/vue3/{clone-DF0Wb5-s.mjs → clone-BahwDtHP.mjs} +1 -1
  50. package/dist/vue3/{createText-2e5e7dd3-CUjkXu6x.mjs → createText-2e5e7dd3-BQyymDt_.mjs} +1 -1
  51. package/dist/{vue2/edges-e0da2a9e-BhabJjR5.mjs → vue3/edges-e0da2a9e-ediFQQXk.mjs} +3 -3
  52. package/dist/{vue2/erDiagram-9861fffd-DDxJjunn.mjs → vue3/erDiagram-9861fffd-BmlT4hhx.mjs} +4 -4
  53. package/dist/vue3/{flowDb-956e92f1-C-nhzbo8.mjs → flowDb-956e92f1-D_3qNkr-.mjs} +1 -1
  54. package/dist/{vue2/flowDiagram-66a62f08-YLZEfNd-.mjs → vue3/flowDiagram-66a62f08-DyFcnq2X.mjs} +6 -6
  55. package/dist/vue3/{flowDiagram-v2-96b9c2cf-CsX812_d.mjs → flowDiagram-v2-96b9c2cf-ChJHWwBC.mjs} +5 -5
  56. package/dist/vue3/{flowchart-elk-definition-4a651766-CC21tNNF.mjs → flowchart-elk-definition-4a651766-BnM0pBy5.mjs} +4 -4
  57. package/dist/{vue2/ganttDiagram-c361ad54-CuLDPZ5c.mjs → vue3/ganttDiagram-c361ad54-C5u4iyvj.mjs} +2 -2
  58. package/dist/vue3/{gitGraphDiagram-72cf32ee-er7l1Vwu.mjs → gitGraphDiagram-72cf32ee-CW2uFSsY.mjs} +1 -1
  59. package/dist/vue3/{graph-BkdYTwQY.mjs → graph-C2CIl_GE.mjs} +1 -1
  60. package/dist/{vue2/index-3862675e-D0ly-ftk.mjs → vue3/index-3862675e-DJ8cBuN-.mjs} +6 -6
  61. package/dist/vue3/index.es.min.js +1 -1
  62. package/dist/vue3/index.iife.min.js +3 -3
  63. package/dist/vue3/index.umd.min.js +3 -3
  64. package/dist/vue3/{infoDiagram-f8f76790-CfS0AerJ.mjs → infoDiagram-f8f76790-BGCDrqeA.mjs} +1 -1
  65. package/dist/vue3/{journeyDiagram-49397b02-C7AiQpxY.mjs → journeyDiagram-49397b02-Tl8gHApt.mjs} +3 -3
  66. package/dist/vue3/{layout-DuPGw-d8.mjs → layout-DCU3XBFk.mjs} +2 -2
  67. package/dist/vue3/{line-BeJeAfJl.mjs → line-BPvQZJk_.mjs} +1 -1
  68. package/dist/vue3/{linear-BOacLYWl.mjs → linear-CvyK5FxU.mjs} +1 -1
  69. package/dist/vue3/{mindmap-definition-fc14e90a-Dhd4NZUr.mjs → mindmap-definition-fc14e90a-B1XNoCc4.mjs} +2 -2
  70. package/dist/vue3/{pieDiagram-8a3498a8-zT5CvSpw.mjs → pieDiagram-8a3498a8-CmeE8uvK.mjs} +2 -2
  71. package/dist/vue3/{quadrantDiagram-120e2f19-DPJcxru3.mjs → quadrantDiagram-120e2f19-CJzo-Yw6.mjs} +2 -2
  72. package/dist/vue3/{requirementDiagram-deff3bca-CP6G_Zoz.mjs → requirementDiagram-deff3bca-B_5dzDDR.mjs} +4 -4
  73. package/dist/vue3/{sankeyDiagram-04a897e0-DcJ7vqUs.mjs → sankeyDiagram-04a897e0-DdfwAWbC.mjs} +1 -1
  74. package/dist/vue3/{sequenceDiagram-704730f1-Czk1oC0y.mjs → sequenceDiagram-704730f1-C_RcLhgs.mjs} +2 -2
  75. package/dist/{vue2/stateDiagram-587899a1-5fbTvUa3.mjs → vue3/stateDiagram-587899a1-y4PvcJUy.mjs} +5 -5
  76. package/dist/vue3/{stateDiagram-v2-d93cdb3a-DcDRwvpk.mjs → stateDiagram-v2-d93cdb3a-BlIvnHWv.mjs} +5 -5
  77. package/dist/vue3/style.css +1 -1
  78. package/dist/{vue2/styles-6aaf32cf-Dzah28hh.mjs → vue3/styles-6aaf32cf-C549doGw.mjs} +1 -1
  79. package/dist/vue3/{styles-9a916d00-DypTgbKt.mjs → styles-9a916d00-BMRdNh8L.mjs} +1 -1
  80. package/dist/{vue2/styles-c10674c1-B0tAwQC_.mjs → vue3/styles-c10674c1-DxCgAgGc.mjs} +4 -4
  81. package/dist/vue3/{svgDrawCommon-08f97a94-BLrA7RFB.mjs → svgDrawCommon-08f97a94-1IsizEWZ.mjs} +1 -1
  82. package/dist/vue3/{timeline-definition-85554ec2-YAY6t41S.mjs → timeline-definition-85554ec2-B7WhqOGh.mjs} +2 -2
  83. package/dist/vue3/{vue3-DlNXJSWb.mjs → vue3-DOsius-r.mjs} +783 -769
  84. package/dist/{vue2/xychartDiagram-e933f94c-BjK8nBCp.mjs → vue3/xychartDiagram-e933f94c-DAhUsssY.mjs} +4 -4
  85. package/package.json +1 -1
@@ -296,28 +296,28 @@ class kg {
296
296
  `).forEach((g) => {
297
297
  const y = g.replace("data:", "").trim();
298
298
  if (bg(y)) {
299
- const { event: b, content: T, cover: A, documents: L, result: $, code: R, elapsed_time: q, message: U } = JSON.parse(y);
300
- if ($ === !1 || c.status !== 200) {
301
- o.handleError(e, U || "模型调用失败", R);
299
+ const { event: x, content: T, cover: A, documents: L, result: H, code: I, elapsed_time: q, message: U } = JSON.parse(y);
300
+ if (H === !1 || c.status !== 200) {
301
+ o.handleError(e, U || "模型调用失败", I);
302
302
  return;
303
303
  }
304
- switch (b) {
304
+ switch (x) {
305
305
  case "text":
306
306
  o.handleText(e, T, A);
307
307
  break;
308
308
  case "reference_doc":
309
- var x, w;
310
- (x = (w = o).handleReferenceDoc) === null || x === void 0 || x.call(w, e, L, A);
309
+ var b, w;
310
+ (b = (w = o).handleReferenceDoc) === null || b === void 0 || b.call(w, e, L, A);
311
311
  break;
312
312
  case "think":
313
- var m, C;
314
- (m = (C = o).handleThink) === null || m === void 0 || m.call(C, e, T, A, q);
313
+ var m, _;
314
+ (m = (_ = o).handleThink) === null || m === void 0 || m.call(_, e, T, A, q);
315
315
  break;
316
316
  case "done":
317
317
  o.handleEnd(e, A ? T : "");
318
318
  break;
319
319
  case "error":
320
- o.handleError(e, U || "模型调用失败", R);
320
+ o.handleError(e, U || "模型调用失败", I);
321
321
  break;
322
322
  }
323
323
  h = "";
@@ -1387,39 +1387,39 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1387
1387
  const u = "内容正在生成中...", c = M(s), d = M(), h = M({}), f = M([]), v = {}, p = {}, g = M(!1), y = ft(() => {
1388
1388
  const k = [];
1389
1389
  for (let F = f.value.length - 1; F >= 0; F--) {
1390
- const j = f.value[F];
1391
- let N = F + 1, I = f.value[N];
1392
- for (; I && ![
1390
+ const $ = f.value[F];
1391
+ let N = F + 1, R = f.value[N];
1392
+ for (; R && ![
1393
1393
  P.Ai,
1394
1394
  P.TokenExpired,
1395
1395
  P.ImageNotSupported,
1396
1396
  P.Pause,
1397
1397
  P.Guide
1398
- ].includes(I.role); )
1399
- N += 1, I = f.value[N];
1400
- if (j.role === P.System)
1398
+ ].includes(R.role); )
1399
+ N += 1, R = f.value[N];
1400
+ if ($.role === P.System)
1401
1401
  break;
1402
- j.status !== ue.Fail && !((I == null ? void 0 : I.status) === ue.Fail && [
1402
+ $.status !== ue.Fail && !((R == null ? void 0 : R.status) === ue.Fail && [
1403
1403
  P.User,
1404
1404
  P.UserImage
1405
- ].includes(j.role)) && ![
1405
+ ].includes($.role)) && ![
1406
1406
  P.Time,
1407
1407
  P.System
1408
- ].includes(j.role) && k.unshift(j);
1408
+ ].includes($.role) && k.unshift($);
1409
1409
  }
1410
1410
  return k;
1411
- }), x = ft(() => {
1411
+ }), b = ft(() => {
1412
1412
  var k;
1413
1413
  const F = (k = d.value) === null || k === void 0 ? void 0 : k.sessionCode;
1414
1414
  return F ? h.value[F] : !1;
1415
1415
  }), w = ft(() => {
1416
- var k, F, j;
1417
- const N = [], I = [], pt = [], It = f.value.findLastIndex((Tt) => Tt.role === P.System && [
1416
+ var k, F, $;
1417
+ const N = [], R = [], pt = [], It = f.value.findLastIndex((Tt) => Tt.role === P.System && [
1418
1418
  "已启用角色",
1419
1419
  "已启用模型"
1420
1420
  ].some((kt) => Tt.content.includes(kt)));
1421
1421
  let qt = 0;
1422
- (j = d.value) === null || j === void 0 || (F = j.roleInfo) === null || F === void 0 || (k = F.content) === null || k === void 0 || k.forEach((Tt) => {
1422
+ ($ = d.value) === null || $ === void 0 || (F = $.roleInfo) === null || F === void 0 || (k = F.content) === null || k === void 0 || k.forEach((Tt) => {
1423
1423
  const kt = f.value[It + 1 + qt];
1424
1424
  let Lt = f.value[It + 2 + qt];
1425
1425
  if ((kt == null ? void 0 : kt.content) === Tt.content && kt.role !== P.System && (N.push(ba(kt)), qt += 1, (kt == null ? void 0 : kt.role) === P.Pause)) {
@@ -1431,12 +1431,12 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1431
1431
  ].includes(Lt.role); )
1432
1432
  N.push(ba(Lt)), qt += 1, Lt = f.value[It + 1 + qt];
1433
1433
  }
1434
- }), I.push(...y.value.map(ba));
1434
+ }), R.push(...y.value.map(ba));
1435
1435
  const fe = (Tt) => {
1436
1436
  let kt = !0;
1437
1437
  for (let ee = Tt; ee < N.length; ee++) {
1438
1438
  var Lt;
1439
- N[ee].content !== ((Lt = I[ee - Tt]) === null || Lt === void 0 ? void 0 : Lt.content) && (kt = !1);
1439
+ N[ee].content !== ((Lt = R[ee - Tt]) === null || Lt === void 0 ? void 0 : Lt.content) && (kt = !1);
1440
1440
  }
1441
1441
  return kt;
1442
1442
  };
@@ -1446,7 +1446,7 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1446
1446
  break;
1447
1447
  pt.push(kt);
1448
1448
  }
1449
- return pt.push(...I), pt.forEach((Tt) => {
1449
+ return pt.push(...R), pt.forEach((Tt) => {
1450
1450
  Tt.content = r3(Tt.content), Tt.content = Bg(Tt.content);
1451
1451
  }), pt;
1452
1452
  }), m = new kg({
@@ -1457,10 +1457,10 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1457
1457
  handleEnd: Nt,
1458
1458
  handleError: Z
1459
1459
  });
1460
- function C(k) {
1460
+ function _(k) {
1461
1461
  c.value = xa({}, c.value, k), (k.url || k.headers) && (l = Ku(c.value.url, c.value.headers));
1462
1462
  }
1463
- function b(k) {
1463
+ function x(k) {
1464
1464
  return l.plusSessionContent(k).then((F) => (k.id = F.id, k.createdAt = F.createdAt, k));
1465
1465
  }
1466
1466
  const T = yg((k, F) => l.modifySessionContent(F), 1e3);
@@ -1470,11 +1470,11 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1470
1470
  function L(k) {
1471
1471
  d.value && (v[d.value.sessionCode] = k, f.value = k);
1472
1472
  }
1473
- function $(k) {
1474
- return R.apply(this, arguments);
1473
+ function H(k) {
1474
+ return I.apply(this, arguments);
1475
1475
  }
1476
- function R() {
1477
- return R = // 自动设置 currentSession 以及当然 sessionConetnts内容
1476
+ function I() {
1477
+ return I = // 自动设置 currentSession 以及当然 sessionConetnts内容
1478
1478
  Bi(function* (k) {
1479
1479
  d.value = k;
1480
1480
  try {
@@ -1484,7 +1484,7 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1484
1484
  } catch {
1485
1485
  g.value = !1;
1486
1486
  }
1487
- }), R.apply(this, arguments);
1487
+ }), I.apply(this, arguments);
1488
1488
  }
1489
1489
  function q(k, F) {
1490
1490
  return wt(F).find((N) => N.id === k);
@@ -1498,54 +1498,54 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1498
1498
  return ((F = d.value) === null || F === void 0 ? void 0 : F.sessionCode) === k ? f.value : v[k];
1499
1499
  }
1500
1500
  function st(k, F) {
1501
- return wt(k).push(F), b(F);
1501
+ return wt(k).push(F), x(F);
1502
1502
  }
1503
1503
  function ut(k) {
1504
1504
  var F;
1505
- const N = (((F = d.value) === null || F === void 0 ? void 0 : F.sessionCode) === k.sessionCode ? f.value : v[k.sessionCode]).find((I) => +(I.id || 0) == +(k.id || 0));
1505
+ const N = (((F = d.value) === null || F === void 0 ? void 0 : F.sessionCode) === k.sessionCode ? f.value : v[k.sessionCode]).find((R) => +(R.id || 0) == +(k.id || 0));
1506
1506
  return N && Object.assign(N, k), T(k.id, k);
1507
1507
  }
1508
- function gt(k, F, j) {
1508
+ function gt(k, F, $) {
1509
1509
  var N;
1510
- const I = ((N = d.value) === null || N === void 0 ? void 0 : N.sessionCode) === k ? f.value : v[k], pt = [];
1510
+ const R = ((N = d.value) === null || N === void 0 ? void 0 : N.sessionCode) === k ? f.value : v[k], pt = [];
1511
1511
  return F.forEach((It) => {
1512
- const qt = I.findIndex((fe) => fe.id === It);
1512
+ const qt = R.findIndex((fe) => fe.id === It);
1513
1513
  if (qt > -1) {
1514
- const fe = I[qt - 1], Tt = I[qt + 1], kt = I[qt + 2];
1515
- if (I.splice(qt, 1), pt.push(It), [
1514
+ const fe = R[qt - 1], Tt = R[qt + 1], kt = R[qt + 2];
1515
+ if (R.splice(qt, 1), pt.push(It), [
1516
1516
  P.Hidden
1517
1517
  ].includes(fe == null ? void 0 : fe.role)) {
1518
- const Lt = I.findIndex((ee) => ee.id === fe.id);
1519
- I.splice(Lt, 1), pt.push(fe.id);
1518
+ const Lt = R.findIndex((ee) => ee.id === fe.id);
1519
+ R.splice(Lt, 1), pt.push(fe.id);
1520
1520
  }
1521
- if ((Tt == null ? void 0 : Tt.role) === P.Ai || j && [
1521
+ if ((Tt == null ? void 0 : Tt.role) === P.Ai || $ && [
1522
1522
  P.Ai,
1523
1523
  P.Guide,
1524
1524
  P.TokenExpired,
1525
1525
  P.ImageNotSupported,
1526
1526
  P.Pause
1527
1527
  ].includes(Tt == null ? void 0 : Tt.role)) {
1528
- const Lt = I.findIndex((ee) => ee.id === Tt.id);
1529
- I.splice(Lt, 1), pt.push(Tt.id);
1528
+ const Lt = R.findIndex((ee) => ee.id === Tt.id);
1529
+ R.splice(Lt, 1), pt.push(Tt.id);
1530
1530
  }
1531
1531
  if ([
1532
1532
  P.Guide
1533
- ].includes(kt == null ? void 0 : kt.role) && j) {
1534
- const Lt = I.findIndex((ee) => ee.id === kt.id);
1535
- I.splice(Lt, 1), pt.push(kt.id);
1533
+ ].includes(kt == null ? void 0 : kt.role) && $) {
1534
+ const Lt = R.findIndex((ee) => ee.id === kt.id);
1535
+ R.splice(Lt, 1), pt.push(kt.id);
1536
1536
  }
1537
1537
  }
1538
1538
  }), pt;
1539
1539
  }
1540
1540
  function at(k, F) {
1541
- const j = gt(k, [
1541
+ const $ = gt(k, [
1542
1542
  F
1543
1543
  ], !0);
1544
- return l.batchDeleteSessionContents(j);
1544
+ return l.batchDeleteSessionContents($);
1545
1545
  }
1546
1546
  function bt(k, F) {
1547
- const j = gt(k, F, !1);
1548
- return l.batchDeleteSessionContents(j);
1547
+ const $ = gt(k, F, !1);
1548
+ return l.batchDeleteSessionContents($);
1549
1549
  }
1550
1550
  function Wt(k) {
1551
1551
  return vt.apply(this, arguments);
@@ -1563,37 +1563,37 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1563
1563
  return yield st(k, F), t == null ? void 0 : t(k, F);
1564
1564
  }), vt.apply(this, arguments);
1565
1565
  }
1566
- function Ut(k, F, j) {
1566
+ function Ut(k, F, $) {
1567
1567
  return xt.apply(this, arguments);
1568
1568
  }
1569
1569
  function xt() {
1570
1570
  return xt = // 引用资料
1571
- Bi(function* (k, F, j) {
1572
- const N = U(k), I = Ag(F, a == null ? void 0 : a.hideReferenceDocIcon);
1573
- N.content = j ? I : N.content + I, yield T(N.id, N), yield i == null ? void 0 : i(k, N);
1571
+ Bi(function* (k, F, $) {
1572
+ const N = U(k), R = Ag(F, a == null ? void 0 : a.hideReferenceDocIcon);
1573
+ N.content = $ ? R : N.content + R, yield T(N.id, N), yield i == null ? void 0 : i(k, N);
1574
1574
  }), xt.apply(this, arguments);
1575
1575
  }
1576
- function Gt(k, F, j, N) {
1576
+ function Gt(k, F, $, N) {
1577
1577
  return nt.apply(this, arguments);
1578
1578
  }
1579
1579
  function nt() {
1580
1580
  return nt = // 思考
1581
- Bi(function* (k, F, j, N) {
1582
- const I = U(k);
1583
- I.content = n3(I.content, F, j, N), yield T(I.id, I), yield n == null ? void 0 : n(k, I);
1581
+ Bi(function* (k, F, $, N) {
1582
+ const R = U(k);
1583
+ R.content = n3(R.content, F, $, N), yield T(R.id, R), yield n == null ? void 0 : n(k, R);
1584
1584
  }), nt.apply(this, arguments);
1585
1585
  }
1586
- function Dt(k, F, j) {
1586
+ function Dt(k, F, $) {
1587
1587
  return zt.apply(this, arguments);
1588
1588
  }
1589
1589
  function zt() {
1590
1590
  return zt = // 文本
1591
- Bi(function* (k, F, j) {
1591
+ Bi(function* (k, F, $) {
1592
1592
  const N = U(k);
1593
1593
  if (N.content === u)
1594
1594
  N.content = F;
1595
1595
  else if (N.status === ue.Loading)
1596
- N.content = j ? F : N.content + F;
1596
+ N.content = $ ? F : N.content + F;
1597
1597
  else
1598
1598
  return;
1599
1599
  yield T(N.id, N), yield e == null ? void 0 : e(k, N);
@@ -1605,24 +1605,24 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1605
1605
  function Ht() {
1606
1606
  return Ht = // 聊天结束
1607
1607
  Bi(function* (k, F) {
1608
- const j = U(k);
1609
- if (j.content === u || o3(j.content)) {
1608
+ const $ = U(k);
1609
+ if ($.content === u || o3($.content)) {
1610
1610
  Z(k, "聊天内容已中断");
1611
1611
  return;
1612
1612
  }
1613
- j.status === ue.Loading && (h.value[k] = !1, F && (j.content = F), j.status = ue.Success, yield T(j.id, j), yield r == null ? void 0 : r(k, j));
1613
+ $.status === ue.Loading && (h.value[k] = !1, F && ($.content = F), $.status = ue.Success, yield T($.id, $), yield r == null ? void 0 : r(k, $));
1614
1614
  }), Ht.apply(this, arguments);
1615
1615
  }
1616
- function Z(k, F, j) {
1616
+ function Z(k, F, $) {
1617
1617
  return ht.apply(this, arguments);
1618
1618
  }
1619
1619
  function ht() {
1620
1620
  return ht = // 聊天异常
1621
- Bi(function* (k, F, j) {
1621
+ Bi(function* (k, F, $) {
1622
1622
  const N = U(k);
1623
- if (N.status = ue.Fail, N.content = F, h.value[k] = !1, j === rs.TokenExpired) {
1624
- var I, pt;
1625
- if (N.content = "抱歉,您的剩余 Token 不足,无法返回回答内容,请先清空当前会话(上下文仍会作为历史记录保留))", N.role = P.TokenExpired, !((pt = d.value) === null || pt === void 0 || (I = pt.sessionProperty) === null || I === void 0) && I.isAutoClear) {
1623
+ if (N.status = ue.Fail, N.content = F, h.value[k] = !1, $ === rs.TokenExpired) {
1624
+ var R, pt;
1625
+ if (N.content = "抱歉,您的剩余 Token 不足,无法返回回答内容,请先清空当前会话(上下文仍会作为历史记录保留))", N.role = P.TokenExpired, !((pt = d.value) === null || pt === void 0 || (R = pt.sessionProperty) === null || R === void 0) && R.isAutoClear) {
1626
1626
  var It;
1627
1627
  yield st(k, {
1628
1628
  sessionCode: k,
@@ -1631,7 +1631,7 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1631
1631
  }), yield l.clearSession((It = d.value) === null || It === void 0 ? void 0 : It.sessionCode);
1632
1632
  }
1633
1633
  }
1634
- j === rs.ImageNotSupported && (N.content = "抱歉,当前模型不支持图片内容解析", N.role = P.ImageNotSupported), yield T(N.id, N), yield o == null ? void 0 : o(k, N, j);
1634
+ $ === rs.ImageNotSupported && (N.content = "抱歉,当前模型不支持图片内容解析", N.role = P.ImageNotSupported), yield T(N.id, N), yield o == null ? void 0 : o(k, N, $);
1635
1635
  }), ht.apply(this, arguments);
1636
1636
  }
1637
1637
  function Ct(k, F) {
@@ -1640,38 +1640,38 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1640
1640
  function St() {
1641
1641
  return St = // 完成角色演绎
1642
1642
  Bi(function* (k, F) {
1643
- let j = !1;
1643
+ let $ = !1;
1644
1644
  p[k] = [];
1645
1645
  for (const N of F)
1646
- if (j)
1646
+ if ($)
1647
1647
  p[k].push(N);
1648
1648
  else {
1649
- const I = c3(xa({}, e3(N)), {
1649
+ const R = c3(xa({}, e3(N)), {
1650
1650
  sessionCode: k,
1651
1651
  status: ue.Success
1652
1652
  });
1653
- yield st(k, I), I.role === P.Pause && (j = !0);
1653
+ yield st(k, R), R.role === P.Pause && ($ = !0);
1654
1654
  }
1655
1655
  }), St.apply(this, arguments);
1656
1656
  }
1657
- function Ft(k, F, j) {
1657
+ function Ft(k, F, $) {
1658
1658
  if (F.role !== P.Ai)
1659
1659
  return;
1660
- const N = f.value.slice(j, f.value.length).map((pt) => pt.id).filter((pt) => pt !== void 0);
1660
+ const N = f.value.slice($, f.value.length).map((pt) => pt.id).filter((pt) => pt !== void 0);
1661
1661
  N.length > 0 && bt(k, N);
1662
- const I = f.value[j - 1];
1663
- I && we(I);
1662
+ const R = f.value[$ - 1];
1663
+ R && we(R);
1664
1664
  }
1665
- function we({ sessionCode: k, url: F, data: j, headers: N }) {
1666
- const I = p[k];
1667
- (I == null ? void 0 : I.length) > 0 ? Ct(k, I) : He(k, j, F, N);
1665
+ function we({ sessionCode: k, url: F, data: $, headers: N }) {
1666
+ const R = p[k];
1667
+ (R == null ? void 0 : R.length) > 0 ? Ct(k, R) : He(k, $, F, N);
1668
1668
  }
1669
- function He(k, F, j, N) {
1670
- var I;
1669
+ function He(k, F, $, N) {
1670
+ var R;
1671
1671
  const pt = U(k);
1672
1672
  m.stream({
1673
1673
  sessionCode: k,
1674
- url: j || `${c.value.url}/chat_completion/`,
1674
+ url: $ || `${c.value.url}/chat_completion/`,
1675
1675
  data: xa({
1676
1676
  session_content_id: pt == null ? void 0 : pt.id,
1677
1677
  session_code: k,
@@ -1679,38 +1679,38 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1679
1679
  stream: !0
1680
1680
  }
1681
1681
  }, F, c.value.data),
1682
- headers: N || ((I = c.value) === null || I === void 0 ? void 0 : I.headers)
1682
+ headers: N || ((R = c.value) === null || R === void 0 ? void 0 : R.headers)
1683
1683
  });
1684
1684
  }
1685
- function ae(k, F, j) {
1685
+ function ae(k, F, $) {
1686
1686
  return he.apply(this, arguments);
1687
1687
  }
1688
1688
  function he() {
1689
1689
  return he = // 重新发送聊天, 需要将当前聊天内容以及下方的所有内容删除
1690
- Bi(function* (k, F, j) {
1691
- var N, I;
1690
+ Bi(function* (k, F, $) {
1691
+ var N, R;
1692
1692
  if (F.role !== P.User)
1693
1693
  return;
1694
- const pt = f.value.slice(j, f.value.length).map((It) => It.id).filter((It) => It !== void 0);
1694
+ const pt = f.value.slice($, f.value.length).map((It) => It.id).filter((It) => It !== void 0);
1695
1695
  pt.length > 0 && bt(k, pt), yield st(k, {
1696
1696
  role: P.User,
1697
1697
  content: F.content,
1698
1698
  sessionCode: k,
1699
1699
  property: {
1700
1700
  extra: {
1701
- cite: (I = F.property) === null || I === void 0 || (N = I.extra) === null || N === void 0 ? void 0 : N.cite
1701
+ cite: (R = F.property) === null || R === void 0 || (N = R.extra) === null || N === void 0 ? void 0 : N.cite
1702
1702
  }
1703
1703
  }
1704
1704
  }), we(F);
1705
1705
  }), he.apply(this, arguments);
1706
1706
  }
1707
1707
  function Fe(k, F) {
1708
- let j = [];
1708
+ let $ = [];
1709
1709
  if (f.value[k].role === P.User) {
1710
- j = f.value.slice(k, k + 2).map((I) => I.id).filter((I) => I !== void 0), bt(F, j);
1710
+ $ = f.value.slice(k, k + 2).map((R) => R.id).filter((R) => R !== void 0), bt(F, $);
1711
1711
  return;
1712
1712
  }
1713
- j = f.value.slice(k - 1, k + 1).map((I) => I.id).filter((I) => I !== void 0), bt(F, j);
1713
+ $ = f.value.slice(k - 1, k + 1).map((R) => R.id).filter((R) => R !== void 0), bt(F, $);
1714
1714
  }
1715
1715
  function de(k) {
1716
1716
  m.stop(k);
@@ -1721,7 +1721,7 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1721
1721
  sessionContentsMap: v,
1722
1722
  sessionLoadingMap: h,
1723
1723
  prompts: w,
1724
- currentSessionLoading: x,
1724
+ currentSessionLoading: b,
1725
1725
  isLoadingSessionContents: g,
1726
1726
  chat: we,
1727
1727
  stopChat: de,
@@ -1731,7 +1731,7 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1731
1731
  getLastSessionContentBySessionCode: U,
1732
1732
  getSessionContentsBySessionCode: wt,
1733
1733
  setCurrentSession: A,
1734
- setCurrentSessionChain: $,
1734
+ setCurrentSessionChain: H,
1735
1735
  setSessionContents: L,
1736
1736
  deleteSessionContent: at,
1737
1737
  deleteSessionContents: bt,
@@ -1756,7 +1756,7 @@ const u3 = ({ handleStart: t, handleText: e, handleReferenceDoc: i, handleThink:
1756
1756
  deleteSessionContentApi: (...k) => l.deleteSessionContent(...k),
1757
1757
  batchDeleteSessionContentsApi: (...k) => l.batchDeleteSessionContents(...k),
1758
1758
  renameSessionApi: (...k) => l.renameSession(...k),
1759
- updateRequestOptions: C
1759
+ updateRequestOptions: _
1760
1760
  };
1761
1761
  };
1762
1762
  (function() {
@@ -1779,12 +1779,12 @@ const h3 = () => {
1779
1779
  };
1780
1780
  return e({
1781
1781
  handleShow: (u, c) => {
1782
- var d, h, f, v, p, g, y, x, w, m;
1782
+ var d, h, f, v, p, g, y, b, w, m;
1783
1783
  n.value = u, i.value = !0, r.value = [
1784
1784
  {
1785
1785
  system_name: u == null || (d = u.permission) === null || d === void 0 ? void 0 : d.system_name,
1786
- name: u == null || (f = u.permission) === null || f === void 0 || (h = f.actions) === null || h === void 0 ? void 0 : h.map((C) => C.name).join(","),
1787
- instance_name: u == null || (m = u.permission) === null || m === void 0 || (w = m.actions[0]) === null || w === void 0 || (x = w.related_resource_types) === null || x === void 0 || (y = x[0]) === null || y === void 0 || (g = y.instances) === null || g === void 0 || (p = g[0]) === null || p === void 0 || (v = p.at(-1)) === null || v === void 0 ? void 0 : v.name
1786
+ name: u == null || (f = u.permission) === null || f === void 0 || (h = f.actions) === null || h === void 0 ? void 0 : h.map((_) => _.name).join(","),
1787
+ instance_name: u == null || (m = u.permission) === null || m === void 0 || (w = m.actions[0]) === null || w === void 0 || (b = w.related_resource_types) === null || b === void 0 || (y = b[0]) === null || y === void 0 || (g = y.instances) === null || g === void 0 || (p = g[0]) === null || p === void 0 || (v = p.at(-1)) === null || v === void 0 ? void 0 : v.name
1788
1788
  }
1789
1789
  ], o = c;
1790
1790
  }
@@ -2278,18 +2278,18 @@ function zp(t, e) {
2278
2278
  delta: 0,
2279
2279
  timestamp: 0,
2280
2280
  isProcessing: !1
2281
- }, o = () => i = !0, s = Eo.reduce((y, x) => (y[x] = H3(o), y), {}), { read: a, resolveKeyframes: l, update: u, preRender: c, render: d, postRender: h } = s, f = () => {
2281
+ }, o = () => i = !0, s = Eo.reduce((y, b) => (y[b] = H3(o), y), {}), { read: a, resolveKeyframes: l, update: u, preRender: c, render: d, postRender: h } = s, f = () => {
2282
2282
  const y = performance.now();
2283
2283
  i = !1, r.delta = n ? 1e3 / 60 : Math.max(Math.min(y - r.timestamp, j3), 1), r.timestamp = y, r.isProcessing = !0, a.process(r), l.process(r), u.process(r), c.process(r), d.process(r), h.process(r), r.isProcessing = !1, i && e && (n = !1, t(f));
2284
2284
  }, v = () => {
2285
2285
  i = !0, n = !0, r.isProcessing || t(f);
2286
2286
  };
2287
- return { schedule: Eo.reduce((y, x) => {
2288
- const w = s[x];
2289
- return y[x] = (m, C = !1, b = !1) => (i || v(), w.schedule(m, C, b)), y;
2287
+ return { schedule: Eo.reduce((y, b) => {
2288
+ const w = s[b];
2289
+ return y[b] = (m, _ = !1, x = !1) => (i || v(), w.schedule(m, _, x)), y;
2290
2290
  }, {}), cancel: (y) => {
2291
- for (let x = 0; x < Eo.length; x++)
2292
- s[Eo[x]].cancel(y);
2291
+ for (let b = 0; b < Eo.length; b++)
2292
+ s[Eo[b]].cancel(y);
2293
2293
  }, state: r, steps: s };
2294
2294
  }
2295
2295
  const { schedule: Mt, cancel: Ni, state: ce, steps: Ca } = zp(typeof requestAnimationFrame < "u" ? requestAnimationFrame : Re, !0);
@@ -3757,41 +3757,41 @@ function yc(t = Yt.visualDuration, e = Yt.bounce) {
3757
3757
  const o = i.keyframes[0], s = i.keyframes[i.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: u, mass: c, duration: d, velocity: h, isResolvedFromDuration: f } = s4({
3758
3758
  ...i,
3759
3759
  velocity: -/* @__PURE__ */ Ri(i.velocity || 0)
3760
- }), v = h || 0, p = u / (2 * Math.sqrt(l * c)), g = s - o, y = /* @__PURE__ */ Ri(Math.sqrt(l / c)), x = Math.abs(g) < 5;
3761
- n || (n = x ? Yt.restSpeed.granular : Yt.restSpeed.default), r || (r = x ? Yt.restDelta.granular : Yt.restDelta.default);
3760
+ }), v = h || 0, p = u / (2 * Math.sqrt(l * c)), g = s - o, y = /* @__PURE__ */ Ri(Math.sqrt(l / c)), b = Math.abs(g) < 5;
3761
+ n || (n = b ? Yt.restSpeed.granular : Yt.restSpeed.default), r || (r = b ? Yt.restDelta.granular : Yt.restDelta.default);
3762
3762
  let w;
3763
3763
  if (p < 1) {
3764
- const C = vl(y, p);
3765
- w = (b) => {
3766
- const T = Math.exp(-p * y * b);
3767
- return s - T * ((v + p * y * g) / C * Math.sin(C * b) + g * Math.cos(C * b));
3764
+ const _ = vl(y, p);
3765
+ w = (x) => {
3766
+ const T = Math.exp(-p * y * x);
3767
+ return s - T * ((v + p * y * g) / _ * Math.sin(_ * x) + g * Math.cos(_ * x));
3768
3768
  };
3769
3769
  } else if (p === 1)
3770
- w = (C) => s - Math.exp(-y * C) * (g + (v + y * g) * C);
3770
+ w = (_) => s - Math.exp(-y * _) * (g + (v + y * g) * _);
3771
3771
  else {
3772
- const C = y * Math.sqrt(p * p - 1);
3773
- w = (b) => {
3774
- const T = Math.exp(-p * y * b), A = Math.min(C * b, 300);
3775
- return s - T * ((v + p * y * g) * Math.sinh(A) + C * g * Math.cosh(A)) / C;
3772
+ const _ = y * Math.sqrt(p * p - 1);
3773
+ w = (x) => {
3774
+ const T = Math.exp(-p * y * x), A = Math.min(_ * x, 300);
3775
+ return s - T * ((v + p * y * g) * Math.sinh(A) + _ * g * Math.cosh(A)) / _;
3776
3776
  };
3777
3777
  }
3778
3778
  const m = {
3779
3779
  calculatedDuration: f && d || null,
3780
- next: (C) => {
3781
- const b = w(C);
3780
+ next: (_) => {
3781
+ const x = w(_);
3782
3782
  if (f)
3783
- a.done = C >= d;
3783
+ a.done = _ >= d;
3784
3784
  else {
3785
3785
  let T = 0;
3786
- p < 1 && (T = C === 0 ? /* @__PURE__ */ Ii(v) : x1(w, C, b));
3787
- const A = Math.abs(T) <= n, L = Math.abs(s - b) <= r;
3786
+ p < 1 && (T = _ === 0 ? /* @__PURE__ */ Ii(v) : x1(w, _, x));
3787
+ const A = Math.abs(T) <= n, L = Math.abs(s - x) <= r;
3788
3788
  a.done = A && L;
3789
3789
  }
3790
- return a.value = a.done ? s : b, a;
3790
+ return a.value = a.done ? s : x, a;
3791
3791
  },
3792
3792
  toString: () => {
3793
- const C = Math.min(gc(m), us), b = Xp((T) => m.next(C * T).value, C, 30);
3794
- return C + "ms " + b;
3793
+ const _ = Math.min(gc(m), us), x = Xp((T) => m.next(_ * T).value, _, 30);
3794
+ return _ + "ms " + x;
3795
3795
  }
3796
3796
  };
3797
3797
  return m;
@@ -3804,13 +3804,13 @@ function yh({ keyframes: t, velocity: e = 0, power: i = 0.8, timeConstant: n = 3
3804
3804
  let p = i * e;
3805
3805
  const g = d + p, y = s === void 0 ? g : s(g);
3806
3806
  y !== g && (p = y - d);
3807
- const x = (A) => -p * Math.exp(-A / n), w = (A) => y + x(A), m = (A) => {
3808
- const L = x(A), $ = w(A);
3809
- h.done = Math.abs(L) <= u, h.value = h.done ? y : $;
3807
+ const b = (A) => -p * Math.exp(-A / n), w = (A) => y + b(A), m = (A) => {
3808
+ const L = b(A), H = w(A);
3809
+ h.done = Math.abs(L) <= u, h.value = h.done ? y : H;
3810
3810
  };
3811
- let C, b;
3811
+ let _, x;
3812
3812
  const T = (A) => {
3813
- f(h.value) && (C = A, b = yc({
3813
+ f(h.value) && (_ = A, x = yc({
3814
3814
  keyframes: [h.value, v(h.value)],
3815
3815
  velocity: x1(w, A, h.value),
3816
3816
  // TODO: This should be passing * 1000
@@ -3824,7 +3824,7 @@ function yh({ keyframes: t, velocity: e = 0, power: i = 0.8, timeConstant: n = 3
3824
3824
  calculatedDuration: null,
3825
3825
  next: (A) => {
3826
3826
  let L = !1;
3827
- return !b && C === void 0 && (L = !0, m(A), T(A)), C !== void 0 && A >= C ? b.next(A - C) : (!L && m(A), h);
3827
+ return !x && _ === void 0 && (L = !0, m(A), T(A)), _ !== void 0 && A >= _ ? x.next(A - _) : (!L && m(A), h);
3828
3828
  }
3829
3829
  };
3830
3830
  }
@@ -3983,20 +3983,20 @@ class bc extends v1 {
3983
3983
  return o.next(0);
3984
3984
  const { delay: h, repeat: f, repeatType: v, repeatDelay: p, onUpdate: g } = this.options;
3985
3985
  this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - c / this.speed, this.startTime)), i ? this.currentTime = e : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(e - this.startTime) * this.speed;
3986
- const y = this.currentTime - h * (this.speed >= 0 ? 1 : -1), x = this.speed >= 0 ? y < 0 : y > c;
3986
+ const y = this.currentTime - h * (this.speed >= 0 ? 1 : -1), b = this.speed >= 0 ? y < 0 : y > c;
3987
3987
  this.currentTime = Math.max(y, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = c);
3988
3988
  let w = this.currentTime, m = o;
3989
3989
  if (f) {
3990
3990
  const A = Math.min(this.currentTime, c) / d;
3991
- let L = Math.floor(A), $ = A % 1;
3992
- !$ && A >= 1 && ($ = 1), $ === 1 && L--, L = Math.min(L, f + 1), !!(L % 2) && (v === "reverse" ? ($ = 1 - $, p && ($ -= p / d)) : v === "mirror" && (m = s)), w = rn(0, 1, $) * d;
3991
+ let L = Math.floor(A), H = A % 1;
3992
+ !H && A >= 1 && (H = 1), H === 1 && L--, L = Math.min(L, f + 1), !!(L % 2) && (v === "reverse" ? (H = 1 - H, p && (H -= p / d)) : v === "mirror" && (m = s)), w = rn(0, 1, H) * d;
3993
3993
  }
3994
- const C = x ? { done: !1, value: l[0] } : m.next(w);
3995
- a && (C.value = a(C.value));
3996
- let { done: b } = C;
3997
- !x && u !== null && (b = this.speed >= 0 ? this.currentTime >= c : this.currentTime <= 0);
3998
- const T = this.holdTime === null && (this.state === "finished" || this.state === "running" && b);
3999
- return T && r !== void 0 && (C.value = Ks(l, this.options, r)), g && g(C.value), T && this.finish(), C;
3994
+ const _ = b ? { done: !1, value: l[0] } : m.next(w);
3995
+ a && (_.value = a(_.value));
3996
+ let { done: x } = _;
3997
+ !b && u !== null && (x = this.speed >= 0 ? this.currentTime >= c : this.currentTime <= 0);
3998
+ const T = this.holdTime === null && (this.state === "finished" || this.state === "running" && x);
3999
+ return T && r !== void 0 && (_.value = Ks(l, this.options, r)), g && g(_.value), T && this.finish(), _;
4000
4000
  }
4001
4001
  get duration() {
4002
4002
  const { resolved: e } = this;
@@ -4651,8 +4651,8 @@ function R1({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
4651
4651
  this.target = void 0, this.relativeTarget = void 0;
4652
4652
  return;
4653
4653
  }
4654
- const p = this.options.transition || c.getDefaultTransition() || vv, { onLayoutAnimationStart: g, onLayoutAnimationComplete: y } = c.getProps(), x = !this.targetLayout || !z1(this.targetLayout, v), w = !h && f;
4655
- if (this.options.layoutRoot || this.resumeFrom || w || h && (x || !this.currentAnimation)) {
4654
+ const p = this.options.transition || c.getDefaultTransition() || vv, { onLayoutAnimationStart: g, onLayoutAnimationComplete: y } = c.getProps(), b = !this.targetLayout || !z1(this.targetLayout, v), w = !h && f;
4655
+ if (this.options.layoutRoot || this.resumeFrom || w || h && (b || !this.currentAnimation)) {
4656
4656
  this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(d, w);
4657
4657
  const m = {
4658
4658
  ...sc(p, "layout"),
@@ -4909,12 +4909,12 @@ function R1({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
4909
4909
  setAnimationOrigin(s, a = !1) {
4910
4910
  const l = this.snapshot, u = l ? l.latestValues : {}, c = { ...this.latestValues }, d = Rn();
4911
4911
  (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
4912
- const h = Xt(), f = l ? l.source : void 0, v = this.layout ? this.layout.source : void 0, p = f !== v, g = this.getStack(), y = !g || g.members.length <= 1, x = !!(p && !y && this.options.crossfade === !0 && !this.path.some(gv));
4912
+ const h = Xt(), f = l ? l.source : void 0, v = this.layout ? this.layout.source : void 0, p = f !== v, g = this.getStack(), y = !g || g.members.length <= 1, b = !!(p && !y && this.options.crossfade === !0 && !this.path.some(gv));
4913
4913
  this.animationProgress = 0;
4914
4914
  let w;
4915
4915
  this.mixTargetDelta = (m) => {
4916
- const C = m / 1e3;
4917
- Yh(d.x, s.x, C), Yh(d.y, s.y, C), this.setTargetDelta(d), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Vr(h, this.layout.layoutBox, this.relativeParent.layout.layoutBox), mv(this.relativeTarget, this.relativeTargetOrigin, h, C), w && J4(this.relativeTarget, w) && (this.isProjectionDirty = !1), w || (w = Xt()), Ue(w, this.relativeTarget)), p && (this.animationValues = c, N4(c, u, this.latestValues, C, x, y)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = C;
4916
+ const _ = m / 1e3;
4917
+ Yh(d.x, s.x, _), Yh(d.y, s.y, _), this.setTargetDelta(d), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Vr(h, this.layout.layoutBox, this.relativeParent.layout.layoutBox), mv(this.relativeTarget, this.relativeTargetOrigin, h, _), w && J4(this.relativeTarget, w) && (this.isProjectionDirty = !1), w || (w = Xt()), Ue(w, this.relativeTarget)), p && (this.animationValues = c, N4(c, u, this.latestValues, _, b, y)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = _;
4918
4918
  }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
4919
4919
  }
4920
4920
  startAnimation(s) {
@@ -5029,13 +5029,13 @@ function R1({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
5029
5029
  for (const p in Xr) {
5030
5030
  if (h[p] === void 0)
5031
5031
  continue;
5032
- const { correct: g, applyTo: y, isCSSVariable: x } = Xr[p], w = u.transform === "none" ? h[p] : g(h[p], d);
5032
+ const { correct: g, applyTo: y, isCSSVariable: b } = Xr[p], w = u.transform === "none" ? h[p] : g(h[p], d);
5033
5033
  if (y) {
5034
5034
  const m = y.length;
5035
- for (let C = 0; C < m; C++)
5036
- u[y[C]] = w;
5035
+ for (let _ = 0; _ < m; _++)
5036
+ u[y[_]] = w;
5037
5037
  } else
5038
- x ? this.options.visualElement.renderState.vars[p] = w : u[p] = w;
5038
+ b ? this.options.visualElement.renderState.vars[p] = w : u[p] = w;
5039
5039
  }
5040
5040
  return this.options.layoutId && (u.pointerEvents = d === this ? Ba(s == null ? void 0 : s.pointerEvents) || "" : "none"), u;
5041
5041
  }
@@ -5680,8 +5680,8 @@ class ry {
5680
5680
  if (Qv.test(g)) {
5681
5681
  const { projection: y } = this.visualElement;
5682
5682
  if (y && y.layout) {
5683
- const x = y.layout.layoutBox[p];
5684
- x && (g = xl(x) * (parseFloat(g) / 100));
5683
+ const b = y.layout.layoutBox[p];
5684
+ b && (g = xl(b) * (parseFloat(g) / 100));
5685
5685
  }
5686
5686
  }
5687
5687
  this.originPoint[p] = g;
@@ -6630,11 +6630,11 @@ function Wy(t, { defaultTransition: e = {}, ...i } = {}, n, r) {
6630
6630
  }
6631
6631
  let [p, g, y = {}] = v;
6632
6632
  y.at !== void 0 && (d = _d(d, y.at, c, u));
6633
- let x = 0;
6634
- const w = (m, C, b, T = 0, A = 0) => {
6635
- const L = qy(m), { delay: $ = 0, times: R = T1(L), type: q = "keyframes", repeat: U, repeatType: wt, repeatDelay: st = 0, ...ut } = C;
6636
- let { ease: gt = e.ease || "easeOut", duration: at } = C;
6637
- const bt = typeof $ == "function" ? $(T, A) : $, Wt = L.length, vt = Ys(q) ? q : r == null ? void 0 : r[q];
6633
+ let b = 0;
6634
+ const w = (m, _, x, T = 0, A = 0) => {
6635
+ const L = qy(m), { delay: H = 0, times: I = T1(L), type: q = "keyframes", repeat: U, repeatType: wt, repeatDelay: st = 0, ...ut } = _;
6636
+ let { ease: gt = e.ease || "easeOut", duration: at } = _;
6637
+ const bt = typeof H == "function" ? H(T, A) : H, Wt = L.length, vt = Ys(q) ? q : r == null ? void 0 : r[q];
6638
6638
  if (Wt <= 2 && vt) {
6639
6639
  let nt = 100;
6640
6640
  if (Wt === 2 && Yy(L)) {
@@ -6648,47 +6648,47 @@ function Wy(t, { defaultTransition: e = {}, ...i } = {}, n, r) {
6648
6648
  }
6649
6649
  at ?? (at = o);
6650
6650
  const Ut = d + bt;
6651
- R.length === 1 && R[0] === 0 && (R[1] = 1);
6652
- const xt = R.length - L.length;
6653
- if (xt > 0 && w1(R, xt), L.length === 1 && L.unshift(null), U) {
6651
+ I.length === 1 && I[0] === 0 && (I[1] = 1);
6652
+ const xt = I.length - L.length;
6653
+ if (xt > 0 && w1(I, xt), L.length === 1 && L.unshift(null), U) {
6654
6654
  at = Ry(at, U);
6655
- const nt = [...L], Dt = [...R];
6655
+ const nt = [...L], Dt = [...I];
6656
6656
  gt = Array.isArray(gt) ? [...gt] : [gt];
6657
6657
  const zt = [...gt];
6658
6658
  for (let Nt = 0; Nt < U; Nt++) {
6659
6659
  L.push(...nt);
6660
6660
  for (let Ht = 0; Ht < nt.length; Ht++)
6661
- R.push(Dt[Ht] + (Nt + 1)), gt.push(Ht === 0 ? "linear" : r0(zt, Ht - 1));
6661
+ I.push(Dt[Ht] + (Nt + 1)), gt.push(Ht === 0 ? "linear" : r0(zt, Ht - 1));
6662
6662
  }
6663
- Hy(R, U);
6663
+ Hy(I, U);
6664
6664
  }
6665
6665
  const Gt = Ut + at;
6666
- Ny(b, L, gt, R, Ut, Gt), x = Math.max(bt + at, x), h = Math.max(Gt, h);
6666
+ Ny(x, L, gt, I, Ut, Gt), b = Math.max(bt + at, b), h = Math.max(Gt, h);
6667
6667
  };
6668
6668
  if (be(p)) {
6669
6669
  const m = wd(p, a);
6670
6670
  w(g, y, Td("default", m));
6671
6671
  } else {
6672
- const m = o0(p, g, n, l), C = m.length;
6673
- for (let b = 0; b < C; b++) {
6672
+ const m = o0(p, g, n, l), _ = m.length;
6673
+ for (let x = 0; x < _; x++) {
6674
6674
  g = g, y = y;
6675
- const T = m[b], A = wd(T, a);
6675
+ const T = m[x], A = wd(T, a);
6676
6676
  for (const L in g)
6677
- w(g[L], Uy(y, L), Td(L, A), b, C);
6677
+ w(g[L], Uy(y, L), Td(L, A), x, _);
6678
6678
  }
6679
6679
  }
6680
- c = d, d += x;
6680
+ c = d, d += b;
6681
6681
  }
6682
6682
  return a.forEach((f, v) => {
6683
6683
  for (const p in f) {
6684
6684
  const g = f[p];
6685
6685
  g.sort(jy);
6686
- const y = [], x = [], w = [];
6687
- for (let C = 0; C < g.length; C++) {
6688
- const { at: b, value: T, easing: A } = g[C];
6689
- y.push(T), x.push(/* @__PURE__ */ go(0, h, b)), w.push(A || "easeOut");
6686
+ const y = [], b = [], w = [];
6687
+ for (let _ = 0; _ < g.length; _++) {
6688
+ const { at: x, value: T, easing: A } = g[_];
6689
+ y.push(T), b.push(/* @__PURE__ */ go(0, h, x)), w.push(A || "easeOut");
6690
6690
  }
6691
- x[0] !== 0 && (x.unshift(0), y.unshift(y[0]), w.unshift($y)), x[x.length - 1] !== 1 && (x.push(1), y.push(null)), s.has(v) || s.set(v, {
6691
+ b[0] !== 0 && (b.unshift(0), y.unshift(y[0]), w.unshift($y)), b[b.length - 1] !== 1 && (b.push(1), y.push(null)), s.has(v) || s.set(v, {
6692
6692
  keyframes: {},
6693
6693
  transition: {}
6694
6694
  });
@@ -6697,7 +6697,7 @@ function Wy(t, { defaultTransition: e = {}, ...i } = {}, n, r) {
6697
6697
  ...e,
6698
6698
  duration: h,
6699
6699
  ease: w,
6700
- times: x,
6700
+ times: b,
6701
6701
  ...i
6702
6702
  };
6703
6703
  }
@@ -6764,8 +6764,8 @@ function e5(t, e, { delay: i = 0, transitionOverride: n, type: r } = {}) {
6764
6764
  if (window.MotionHandoffAnimation) {
6765
6765
  const y = A1(t);
6766
6766
  if (y) {
6767
- const x = window.MotionHandoffAnimation(y, d, Mt);
6768
- x !== null && (v.startTime = x, p = !0);
6767
+ const b = window.MotionHandoffAnimation(y, d, Mt);
6768
+ b !== null && (v.startTime = b, p = !0);
6769
6769
  }
6770
6770
  }
6771
6771
  Jy(t, d), h.start(xc(d, h, f, t.shouldReduceMotion && l1.has(d) ? { type: !1 } : v, t, p));
@@ -7271,8 +7271,8 @@ const Da = /* @__PURE__ */ Pt({
7271
7271
  ...v ? {} : u.visualElement.latestValues
7272
7272
  };
7273
7273
  if (v) {
7274
- const { attributes: y, style: x } = R3(u.isMounted() ? u.target : u.baseTarget);
7275
- Object.assign(p, y), Object.assign(g, x);
7274
+ const { attributes: y, style: b } = R3(u.isMounted() ? u.target : u.baseTarget);
7275
+ Object.assign(p, y), Object.assign(g, b);
7276
7276
  }
7277
7277
  return e.drag && e.dragListener !== !1 && Object.assign(g, {
7278
7278
  userSelect: "none",
@@ -8066,8 +8066,8 @@ var X5 = function(e, i) {
8066
8066
  function Q5(t) {
8067
8067
  var e, i = t.state, n = t.name, r = t.options, o = i.elements.arrow, s = i.modifiersData.popperOffsets, a = gi(i.placement), l = Lc(a), u = [Ne, Je].indexOf(a) >= 0, c = u ? "height" : "width";
8068
8068
  if (!(!o || !s)) {
8069
- var d = X5(r.padding, i), h = Ec(o), f = l === "y" ? Ve : Ne, v = l === "y" ? Ze : Je, p = i.rects.reference[c] + i.rects.reference[l] - s[l] - i.rects.popper[c], g = s[l] - i.rects.reference[l], y = bo(o), x = y ? l === "y" ? y.clientHeight || 0 : y.clientWidth || 0 : 0, w = p / 2 - g / 2, m = d[f], C = x - h[c] - d[v], b = x / 2 - h[c] / 2 + w, T = Nr(m, b, C), A = l;
8070
- i.modifiersData[n] = (e = {}, e[A] = T, e.centerOffset = T - b, e);
8069
+ var d = X5(r.padding, i), h = Ec(o), f = l === "y" ? Ve : Ne, v = l === "y" ? Ze : Je, p = i.rects.reference[c] + i.rects.reference[l] - s[l] - i.rects.popper[c], g = s[l] - i.rects.reference[l], y = bo(o), b = y ? l === "y" ? y.clientHeight || 0 : y.clientWidth || 0 : 0, w = p / 2 - g / 2, m = d[f], _ = b - h[c] - d[v], x = b / 2 - h[c] / 2 + w, T = Nr(m, x, _), A = l;
8070
+ i.modifiersData[n] = (e = {}, e[A] = T, e.centerOffset = T - x, e);
8071
8071
  }
8072
8072
  }
8073
8073
  function Z5(t) {
@@ -8108,27 +8108,27 @@ function Md(t) {
8108
8108
  y: p
8109
8109
  };
8110
8110
  f = g.x, p = g.y;
8111
- var y = s.hasOwnProperty("x"), x = s.hasOwnProperty("y"), w = Ne, m = Ve, C = window;
8111
+ var y = s.hasOwnProperty("x"), b = s.hasOwnProperty("y"), w = Ne, m = Ve, _ = window;
8112
8112
  if (u) {
8113
- var b = bo(i), T = "clientHeight", A = "clientWidth";
8114
- if (b === $e(i) && (b = ln(i), Hi(b).position !== "static" && a === "absolute" && (T = "scrollHeight", A = "scrollWidth")), b = b, r === Ve || (r === Ne || r === Je) && o === eo) {
8113
+ var x = bo(i), T = "clientHeight", A = "clientWidth";
8114
+ if (x === $e(i) && (x = ln(i), Hi(x).position !== "static" && a === "absolute" && (T = "scrollHeight", A = "scrollWidth")), x = x, r === Ve || (r === Ne || r === Je) && o === eo) {
8115
8115
  m = Ze;
8116
- var L = d && b === C && C.visualViewport ? C.visualViewport.height : (
8116
+ var L = d && x === _ && _.visualViewport ? _.visualViewport.height : (
8117
8117
  // $FlowFixMe[prop-missing]
8118
- b[T]
8118
+ x[T]
8119
8119
  );
8120
8120
  p -= L - n.height, p *= l ? 1 : -1;
8121
8121
  }
8122
8122
  if (r === Ne || (r === Ve || r === Ze) && o === eo) {
8123
8123
  w = Je;
8124
- var $ = d && b === C && C.visualViewport ? C.visualViewport.width : (
8124
+ var H = d && x === _ && _.visualViewport ? _.visualViewport.width : (
8125
8125
  // $FlowFixMe[prop-missing]
8126
- b[A]
8126
+ x[A]
8127
8127
  );
8128
- f -= $ - n.width, f *= l ? 1 : -1;
8128
+ f -= H - n.width, f *= l ? 1 : -1;
8129
8129
  }
8130
8130
  }
8131
- var R = Object.assign({
8131
+ var I = Object.assign({
8132
8132
  position: a
8133
8133
  }, u && t8), q = c === !0 ? e8({
8134
8134
  x: f,
@@ -8139,9 +8139,9 @@ function Md(t) {
8139
8139
  };
8140
8140
  if (f = q.x, p = q.y, l) {
8141
8141
  var U;
8142
- return Object.assign({}, R, (U = {}, U[m] = x ? "0" : "", U[w] = y ? "0" : "", U.transform = (C.devicePixelRatio || 1) <= 1 ? "translate(" + f + "px, " + p + "px)" : "translate3d(" + f + "px, " + p + "px, 0)", U));
8142
+ return Object.assign({}, I, (U = {}, U[m] = b ? "0" : "", U[w] = y ? "0" : "", U.transform = (_.devicePixelRatio || 1) <= 1 ? "translate(" + f + "px, " + p + "px)" : "translate3d(" + f + "px, " + p + "px, 0)", U));
8143
8143
  }
8144
- return Object.assign({}, R, (e = {}, e[m] = x ? p + "px" : "", e[w] = y ? f + "px" : "", e.transform = "", e));
8144
+ return Object.assign({}, I, (e = {}, e[m] = b ? p + "px" : "", e[w] = y ? f + "px" : "", e.transform = "", e));
8145
8145
  }
8146
8146
  function i8(t) {
8147
8147
  var e = t.state, i = t.options, n = i.gpuAcceleration, r = n === void 0 ? !0 : n, o = i.adaptive, s = o === void 0 ? !0 : o, a = i.roundOffsets, l = a === void 0 ? !0 : a, u = {
@@ -8341,24 +8341,24 @@ function g0(t) {
8341
8341
  }
8342
8342
  function io(t, e) {
8343
8343
  e === void 0 && (e = {});
8344
- var i = e, n = i.placement, r = n === void 0 ? t.placement : n, o = i.strategy, s = o === void 0 ? t.strategy : o, a = i.boundary, l = a === void 0 ? O5 : a, u = i.rootBoundary, c = u === void 0 ? a0 : u, d = i.elementContext, h = d === void 0 ? xr : d, f = i.altBoundary, v = f === void 0 ? !1 : f, p = i.padding, g = p === void 0 ? 0 : p, y = f0(typeof g != "number" ? g : p0(g, yo)), x = h === xr ? P5 : xr, w = t.rects.popper, m = t.elements[v ? x : h], C = d8(Sn(m) ? m : m.contextElement || ln(t.elements.popper), l, c, s), b = Kn(t.elements.reference), T = g0({
8345
- reference: b,
8344
+ var i = e, n = i.placement, r = n === void 0 ? t.placement : n, o = i.strategy, s = o === void 0 ? t.strategy : o, a = i.boundary, l = a === void 0 ? O5 : a, u = i.rootBoundary, c = u === void 0 ? a0 : u, d = i.elementContext, h = d === void 0 ? xr : d, f = i.altBoundary, v = f === void 0 ? !1 : f, p = i.padding, g = p === void 0 ? 0 : p, y = f0(typeof g != "number" ? g : p0(g, yo)), b = h === xr ? P5 : xr, w = t.rects.popper, m = t.elements[v ? b : h], _ = d8(Sn(m) ? m : m.contextElement || ln(t.elements.popper), l, c, s), x = Kn(t.elements.reference), T = g0({
8345
+ reference: x,
8346
8346
  element: w,
8347
8347
  placement: r
8348
- }), A = Al(Object.assign({}, w, T)), L = h === xr ? A : b, $ = {
8349
- top: C.top - L.top + y.top,
8350
- bottom: L.bottom - C.bottom + y.bottom,
8351
- left: C.left - L.left + y.left,
8352
- right: L.right - C.right + y.right
8353
- }, R = t.modifiersData.offset;
8354
- if (h === xr && R) {
8355
- var q = R[r];
8356
- Object.keys($).forEach(function(U) {
8348
+ }), A = Al(Object.assign({}, w, T)), L = h === xr ? A : x, H = {
8349
+ top: _.top - L.top + y.top,
8350
+ bottom: L.bottom - _.bottom + y.bottom,
8351
+ left: _.left - L.left + y.left,
8352
+ right: L.right - _.right + y.right
8353
+ }, I = t.modifiersData.offset;
8354
+ if (h === xr && I) {
8355
+ var q = I[r];
8356
+ Object.keys(H).forEach(function(U) {
8357
8357
  var wt = [Je, Ze].indexOf(U) >= 0 ? 1 : -1, st = [Ve, Ze].indexOf(U) >= 0 ? "y" : "x";
8358
- $[U] += q[st] * wt;
8358
+ H[U] += q[st] * wt;
8359
8359
  });
8360
8360
  }
8361
- return $;
8361
+ return H;
8362
8362
  }
8363
8363
  function f8(t, e) {
8364
8364
  e === void 0 && (e = {});
@@ -8389,7 +8389,7 @@ function p8(t) {
8389
8389
  function m8(t) {
8390
8390
  var e = t.state, i = t.options, n = t.name;
8391
8391
  if (!e.modifiersData[n]._skip) {
8392
- for (var r = i.mainAxis, o = r === void 0 ? !0 : r, s = i.altAxis, a = s === void 0 ? !0 : s, l = i.fallbackPlacements, u = i.padding, c = i.boundary, d = i.rootBoundary, h = i.altBoundary, f = i.flipVariations, v = f === void 0 ? !0 : f, p = i.allowedAutoPlacements, g = e.options.placement, y = gi(g), x = y === g, w = l || (x || !v ? [qo(g)] : p8(g)), m = [g].concat(w).reduce(function(Gt, nt) {
8392
+ for (var r = i.mainAxis, o = r === void 0 ? !0 : r, s = i.altAxis, a = s === void 0 ? !0 : s, l = i.fallbackPlacements, u = i.padding, c = i.boundary, d = i.rootBoundary, h = i.altBoundary, f = i.flipVariations, v = f === void 0 ? !0 : f, p = i.allowedAutoPlacements, g = e.options.placement, y = gi(g), b = y === g, w = l || (b || !v ? [qo(g)] : p8(g)), m = [g].concat(w).reduce(function(Gt, nt) {
8393
8393
  return Gt.concat(gi(nt) === Ac ? f8(e, {
8394
8394
  placement: nt,
8395
8395
  boundary: c,
@@ -8398,23 +8398,23 @@ function m8(t) {
8398
8398
  flipVariations: v,
8399
8399
  allowedAutoPlacements: p
8400
8400
  }) : nt);
8401
- }, []), C = e.rects.reference, b = e.rects.popper, T = /* @__PURE__ */ new Map(), A = !0, L = m[0], $ = 0; $ < m.length; $++) {
8402
- var R = m[$], q = gi(R), U = Xn(R) === Gn, wt = [Ve, Ze].indexOf(q) >= 0, st = wt ? "width" : "height", ut = io(e, {
8403
- placement: R,
8401
+ }, []), _ = e.rects.reference, x = e.rects.popper, T = /* @__PURE__ */ new Map(), A = !0, L = m[0], H = 0; H < m.length; H++) {
8402
+ var I = m[H], q = gi(I), U = Xn(I) === Gn, wt = [Ve, Ze].indexOf(q) >= 0, st = wt ? "width" : "height", ut = io(e, {
8403
+ placement: I,
8404
8404
  boundary: c,
8405
8405
  rootBoundary: d,
8406
8406
  altBoundary: h,
8407
8407
  padding: u
8408
8408
  }), gt = wt ? U ? Je : Ne : U ? Ze : Ve;
8409
- C[st] > b[st] && (gt = qo(gt));
8409
+ _[st] > x[st] && (gt = qo(gt));
8410
8410
  var at = qo(gt), bt = [];
8411
8411
  if (o && bt.push(ut[q] <= 0), a && bt.push(ut[gt] <= 0, ut[at] <= 0), bt.every(function(Gt) {
8412
8412
  return Gt;
8413
8413
  })) {
8414
- L = R, A = !1;
8414
+ L = I, A = !1;
8415
8415
  break;
8416
8416
  }
8417
- T.set(R, bt);
8417
+ T.set(I, bt);
8418
8418
  }
8419
8419
  if (A)
8420
8420
  for (var Wt = v ? 3 : 1, vt = function(nt) {
@@ -8532,29 +8532,29 @@ function S8(t) {
8532
8532
  rootBoundary: u,
8533
8533
  padding: d,
8534
8534
  altBoundary: c
8535
- }), y = gi(e.placement), x = Xn(e.placement), w = !x, m = Lc(y), C = T8(m), b = e.modifiersData.popperOffsets, T = e.rects.reference, A = e.rects.popper, L = typeof p == "function" ? p(Object.assign({}, e.rects, {
8535
+ }), y = gi(e.placement), b = Xn(e.placement), w = !b, m = Lc(y), _ = T8(m), x = e.modifiersData.popperOffsets, T = e.rects.reference, A = e.rects.popper, L = typeof p == "function" ? p(Object.assign({}, e.rects, {
8536
8536
  placement: e.placement
8537
- })) : p, $ = typeof L == "number" ? {
8537
+ })) : p, H = typeof L == "number" ? {
8538
8538
  mainAxis: L,
8539
8539
  altAxis: L
8540
8540
  } : Object.assign({
8541
8541
  mainAxis: 0,
8542
8542
  altAxis: 0
8543
- }, L), R = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, q = {
8543
+ }, L), I = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, q = {
8544
8544
  x: 0,
8545
8545
  y: 0
8546
8546
  };
8547
- if (b) {
8547
+ if (x) {
8548
8548
  if (o) {
8549
- var U, wt = m === "y" ? Ve : Ne, st = m === "y" ? Ze : Je, ut = m === "y" ? "height" : "width", gt = b[m], at = gt + g[wt], bt = gt - g[st], Wt = f ? -A[ut] / 2 : 0, vt = x === Gn ? T[ut] : A[ut], Ut = x === Gn ? -A[ut] : -T[ut], xt = e.elements.arrow, Gt = f && xt ? Ec(xt) : {
8549
+ var U, wt = m === "y" ? Ve : Ne, st = m === "y" ? Ze : Je, ut = m === "y" ? "height" : "width", gt = x[m], at = gt + g[wt], bt = gt - g[st], Wt = f ? -A[ut] / 2 : 0, vt = b === Gn ? T[ut] : A[ut], Ut = b === Gn ? -A[ut] : -T[ut], xt = e.elements.arrow, Gt = f && xt ? Ec(xt) : {
8550
8550
  width: 0,
8551
8551
  height: 0
8552
- }, nt = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : d0(), Dt = nt[wt], zt = nt[st], Nt = Nr(0, T[ut], Gt[ut]), Ht = w ? T[ut] / 2 - Wt - Nt - Dt - $.mainAxis : vt - Nt - Dt - $.mainAxis, Z = w ? -T[ut] / 2 + Wt + Nt + zt + $.mainAxis : Ut + Nt + zt + $.mainAxis, ht = e.elements.arrow && bo(e.elements.arrow), Ct = ht ? m === "y" ? ht.clientTop || 0 : ht.clientLeft || 0 : 0, St = (U = R == null ? void 0 : R[m]) != null ? U : 0, Ft = gt + Ht - St - Ct, we = gt + Z - St, He = Nr(f ? ys(at, Ft) : at, gt, f ? Cn(bt, we) : bt);
8553
- b[m] = He, q[m] = He - gt;
8552
+ }, nt = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : d0(), Dt = nt[wt], zt = nt[st], Nt = Nr(0, T[ut], Gt[ut]), Ht = w ? T[ut] / 2 - Wt - Nt - Dt - H.mainAxis : vt - Nt - Dt - H.mainAxis, Z = w ? -T[ut] / 2 + Wt + Nt + zt + H.mainAxis : Ut + Nt + zt + H.mainAxis, ht = e.elements.arrow && bo(e.elements.arrow), Ct = ht ? m === "y" ? ht.clientTop || 0 : ht.clientLeft || 0 : 0, St = (U = I == null ? void 0 : I[m]) != null ? U : 0, Ft = gt + Ht - St - Ct, we = gt + Z - St, He = Nr(f ? ys(at, Ft) : at, gt, f ? Cn(bt, we) : bt);
8553
+ x[m] = He, q[m] = He - gt;
8554
8554
  }
8555
8555
  if (a) {
8556
- var ae, he = m === "x" ? Ve : Ne, Fe = m === "x" ? Ze : Je, de = b[C], k = C === "y" ? "height" : "width", F = de + g[he], j = de - g[Fe], N = [Ve, Ne].indexOf(y) !== -1, I = (ae = R == null ? void 0 : R[C]) != null ? ae : 0, pt = N ? F : de - T[k] - A[k] - I + $.altAxis, It = N ? de + T[k] + A[k] - I - $.altAxis : j, qt = f && N ? K5(pt, de, It) : Nr(f ? pt : F, de, f ? It : j);
8557
- b[C] = qt, q[C] = qt - de;
8556
+ var ae, he = m === "x" ? Ve : Ne, Fe = m === "x" ? Ze : Je, de = x[_], k = _ === "y" ? "height" : "width", F = de + g[he], $ = de - g[Fe], N = [Ve, Ne].indexOf(y) !== -1, R = (ae = I == null ? void 0 : I[_]) != null ? ae : 0, pt = N ? F : de - T[k] - A[k] - R + H.altAxis, It = N ? de + T[k] + A[k] - R - H.altAxis : $, qt = f && N ? K5(pt, de, It) : Nr(f ? pt : F, de, f ? It : $);
8557
+ x[_] = qt, q[_] = qt - de;
8558
8558
  }
8559
8559
  e.modifiersData[n] = q;
8560
8560
  }
@@ -8676,8 +8676,8 @@ function D8(t) {
8676
8676
  }, d = [], h = !1, f = {
8677
8677
  state: c,
8678
8678
  setOptions: function(y) {
8679
- var x = typeof y == "function" ? y(c.options) : y;
8680
- p(), c.options = Object.assign({}, o, c.options, x), c.scrollParents = {
8679
+ var b = typeof y == "function" ? y(c.options) : y;
8680
+ p(), c.options = Object.assign({}, o, c.options, b), c.scrollParents = {
8681
8681
  reference: Sn(a) ? Hr(a) : a.contextElement ? Hr(a.contextElement) : [],
8682
8682
  popper: Hr(l)
8683
8683
  };
@@ -8693,21 +8693,21 @@ function D8(t) {
8693
8693
  // prefer the async Popper#update method
8694
8694
  forceUpdate: function() {
8695
8695
  if (!h) {
8696
- var y = c.elements, x = y.reference, w = y.popper;
8697
- if (Id(x, w)) {
8696
+ var y = c.elements, b = y.reference, w = y.popper;
8697
+ if (Id(b, w)) {
8698
8698
  c.rects = {
8699
- reference: L8(x, bo(w), c.options.strategy === "fixed"),
8699
+ reference: L8(b, bo(w), c.options.strategy === "fixed"),
8700
8700
  popper: Ec(w)
8701
- }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function($) {
8702
- return c.modifiersData[$.name] = Object.assign({}, $.data);
8701
+ }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(H) {
8702
+ return c.modifiersData[H.name] = Object.assign({}, H.data);
8703
8703
  });
8704
8704
  for (var m = 0; m < c.orderedModifiers.length; m++) {
8705
8705
  if (c.reset === !0) {
8706
8706
  c.reset = !1, m = -1;
8707
8707
  continue;
8708
8708
  }
8709
- var C = c.orderedModifiers[m], b = C.fn, T = C.options, A = T === void 0 ? {} : T, L = C.name;
8710
- typeof b == "function" && (c = b({
8709
+ var _ = c.orderedModifiers[m], x = _.fn, T = _.options, A = T === void 0 ? {} : T, L = _.name;
8710
+ typeof x == "function" && (c = x({
8711
8711
  state: c,
8712
8712
  options: A,
8713
8713
  name: L,
@@ -8735,16 +8735,16 @@ function D8(t) {
8735
8735
  });
8736
8736
  function v() {
8737
8737
  c.orderedModifiers.forEach(function(g) {
8738
- var y = g.name, x = g.options, w = x === void 0 ? {} : x, m = g.effect;
8738
+ var y = g.name, b = g.options, w = b === void 0 ? {} : b, m = g.effect;
8739
8739
  if (typeof m == "function") {
8740
- var C = m({
8740
+ var _ = m({
8741
8741
  state: c,
8742
8742
  name: y,
8743
8743
  instance: f,
8744
8744
  options: w
8745
- }), b = function() {
8745
+ }), x = function() {
8746
8746
  };
8747
- d.push(C || b);
8747
+ d.push(_ || x);
8748
8748
  }
8749
8749
  });
8750
8750
  }
@@ -8853,8 +8853,8 @@ function Y8(t, e) {
8853
8853
  var o = r.popperRect, s = r.popperState, a = r.props, l = a.interactiveBorder, u = j8(s.placement), c = s.modifiersData.offset;
8854
8854
  if (!c)
8855
8855
  return !0;
8856
- var d = u === "bottom" ? c.top.y : 0, h = u === "top" ? c.bottom.y : 0, f = u === "right" ? c.left.x : 0, v = u === "left" ? c.right.x : 0, p = o.top - n + d > l, g = n - o.bottom - h > l, y = o.left - i + f > l, x = i - o.right - v > l;
8857
- return p || g || y || x;
8856
+ var d = u === "bottom" ? c.top.y : 0, h = u === "top" ? c.bottom.y : 0, f = u === "right" ? c.left.x : 0, v = u === "left" ? c.right.x : 0, p = o.top - n + d > l, g = n - o.bottom - h > l, y = o.left - i + f > l, b = i - o.right - v > l;
8857
+ return p || g || y || b;
8858
8858
  });
8859
8859
  }
8860
8860
  function Na(t, e, i) {
@@ -9048,7 +9048,7 @@ function T0(t) {
9048
9048
  T0.$$tippy = !0;
9049
9049
  var sb = 1, Po = [], Ha = [];
9050
9050
  function ab(t, e) {
9051
- var i = Wd(t, Object.assign({}, si, w0(Nd(e)))), n, r, o, s = !1, a = !1, l = !1, u = !1, c, d, h, f = [], v = Rd(Ft, i.interactiveDebounce), p, g = sb++, y = null, x = H8(i.plugins), w = {
9051
+ var i = Wd(t, Object.assign({}, si, w0(Nd(e)))), n, r, o, s = !1, a = !1, l = !1, u = !1, c, d, h, f = [], v = Rd(Ft, i.interactiveDebounce), p, g = sb++, y = null, b = H8(i.plugins), w = {
9052
9052
  // Is the instance currently enabled?
9053
9053
  isEnabled: !0,
9054
9054
  // Is the tippy currently showing and not transitioning out?
@@ -9067,7 +9067,7 @@ function ab(t, e) {
9067
9067
  popperInstance: y,
9068
9068
  props: i,
9069
9069
  state: w,
9070
- plugins: x,
9070
+ plugins: b,
9071
9071
  // methods
9072
9072
  clearDelayTimeouts: pt,
9073
9073
  setProps: It,
@@ -9076,28 +9076,28 @@ function ab(t, e) {
9076
9076
  hide: Tt,
9077
9077
  hideWithInteractivity: kt,
9078
9078
  enable: N,
9079
- disable: I,
9079
+ disable: R,
9080
9080
  unmount: Lt,
9081
9081
  destroy: ee
9082
9082
  };
9083
9083
  if (!i.render)
9084
9084
  return m;
9085
- var C = i.render(m), b = C.popper, T = C.onUpdate;
9086
- b.setAttribute("data-tippy-root", ""), b.id = "tippy-" + m.id, m.popper = b, t._tippy = m, b._tippy = m;
9087
- var A = x.map(function(B) {
9085
+ var _ = i.render(m), x = _.popper, T = _.onUpdate;
9086
+ x.setAttribute("data-tippy-root", ""), x.id = "tippy-" + m.id, m.popper = x, t._tippy = m, x._tippy = m;
9087
+ var A = b.map(function(B) {
9088
9088
  return B.fn(m);
9089
9089
  }), L = t.hasAttribute("aria-expanded");
9090
- return ht(), Wt(), gt(), at("onCreate", [m]), i.showOnCreate && F(), b.addEventListener("mouseenter", function() {
9090
+ return ht(), Wt(), gt(), at("onCreate", [m]), i.showOnCreate && F(), x.addEventListener("mouseenter", function() {
9091
9091
  m.props.interactive && m.state.isVisible && m.clearDelayTimeouts();
9092
- }), b.addEventListener("mouseleave", function() {
9092
+ }), x.addEventListener("mouseleave", function() {
9093
9093
  m.props.interactive && m.props.trigger.indexOf("mouseenter") >= 0 && wt().addEventListener("mousemove", v);
9094
9094
  }), m;
9095
- function $() {
9095
+ function H() {
9096
9096
  var B = m.props.touch;
9097
9097
  return Array.isArray(B) ? B : [B, 0];
9098
9098
  }
9099
- function R() {
9100
- return $()[0] === "hold";
9099
+ function I() {
9100
+ return H()[0] === "hold";
9101
9101
  }
9102
9102
  function q() {
9103
9103
  var B;
@@ -9111,33 +9111,33 @@ function ab(t, e) {
9111
9111
  return B ? G8(B) : document;
9112
9112
  }
9113
9113
  function st() {
9114
- return El(b);
9114
+ return El(x);
9115
9115
  }
9116
9116
  function ut(B) {
9117
9117
  return m.state.isMounted && !m.state.isVisible || pi.isTouch || c && c.type === "focus" ? 0 : Ra(m.props.delay, B ? 0 : 1, si.delay);
9118
9118
  }
9119
9119
  function gt(B) {
9120
- B === void 0 && (B = !1), b.style.pointerEvents = m.props.interactive && !B ? "" : "none", b.style.zIndex = "" + m.props.zIndex;
9120
+ B === void 0 && (B = !1), x.style.pointerEvents = m.props.interactive && !B ? "" : "none", x.style.zIndex = "" + m.props.zIndex;
9121
9121
  }
9122
- function at(B, H, J) {
9122
+ function at(B, j, J) {
9123
9123
  if (J === void 0 && (J = !0), A.forEach(function(ct) {
9124
- ct[B] && ct[B].apply(ct, H);
9124
+ ct[B] && ct[B].apply(ct, j);
9125
9125
  }), J) {
9126
9126
  var _t;
9127
- (_t = m.props)[B].apply(_t, H);
9127
+ (_t = m.props)[B].apply(_t, j);
9128
9128
  }
9129
9129
  }
9130
9130
  function bt() {
9131
9131
  var B = m.props.aria;
9132
9132
  if (B.content) {
9133
- var H = "aria-" + B.content, J = b.id, _t = Dn(m.props.triggerTarget || t);
9133
+ var j = "aria-" + B.content, J = x.id, _t = Dn(m.props.triggerTarget || t);
9134
9134
  _t.forEach(function(ct) {
9135
- var jt = ct.getAttribute(H);
9135
+ var jt = ct.getAttribute(j);
9136
9136
  if (m.state.isVisible)
9137
- ct.setAttribute(H, jt ? jt + " " + J : J);
9137
+ ct.setAttribute(j, jt ? jt + " " + J : J);
9138
9138
  else {
9139
9139
  var Qt = jt && jt.replace(J, "").trim();
9140
- Qt ? ct.setAttribute(H, Qt) : ct.removeAttribute(H);
9140
+ Qt ? ct.setAttribute(j, Qt) : ct.removeAttribute(j);
9141
9141
  }
9142
9142
  });
9143
9143
  }
@@ -9145,8 +9145,8 @@ function ab(t, e) {
9145
9145
  function Wt() {
9146
9146
  if (!(L || !m.props.aria.expanded)) {
9147
9147
  var B = Dn(m.props.triggerTarget || t);
9148
- B.forEach(function(H) {
9149
- m.props.interactive ? H.setAttribute("aria-expanded", m.state.isVisible && H === U() ? "true" : "false") : H.removeAttribute("aria-expanded");
9148
+ B.forEach(function(j) {
9149
+ m.props.interactive ? j.setAttribute("aria-expanded", m.state.isVisible && j === U() ? "true" : "false") : j.removeAttribute("aria-expanded");
9150
9150
  });
9151
9151
  }
9152
9152
  }
@@ -9157,10 +9157,10 @@ function ab(t, e) {
9157
9157
  }
9158
9158
  function Ut(B) {
9159
9159
  if (!(pi.isTouch && (l || B.type === "mousedown"))) {
9160
- var H = B.composedPath && B.composedPath()[0] || B.target;
9161
- if (!(m.props.interactive && jd(b, H))) {
9160
+ var j = B.composedPath && B.composedPath()[0] || B.target;
9161
+ if (!(m.props.interactive && jd(x, j))) {
9162
9162
  if (Dn(m.props.triggerTarget || t).some(function(J) {
9163
- return jd(J, H);
9163
+ return jd(J, j);
9164
9164
  })) {
9165
9165
  if (pi.isTouch || m.state.isVisible && m.props.trigger.indexOf("click") >= 0)
9166
9166
  return;
@@ -9186,37 +9186,37 @@ function ab(t, e) {
9186
9186
  var B = wt();
9187
9187
  B.removeEventListener("mousedown", Ut, !0), B.removeEventListener("touchend", Ut, fn), B.removeEventListener("touchstart", Gt, fn), B.removeEventListener("touchmove", xt, fn);
9188
9188
  }
9189
- function zt(B, H) {
9189
+ function zt(B, j) {
9190
9190
  Ht(B, function() {
9191
- !m.state.isVisible && b.parentNode && b.parentNode.contains(b) && H();
9191
+ !m.state.isVisible && x.parentNode && x.parentNode.contains(x) && j();
9192
9192
  });
9193
9193
  }
9194
- function Nt(B, H) {
9195
- Ht(B, H);
9194
+ function Nt(B, j) {
9195
+ Ht(B, j);
9196
9196
  }
9197
- function Ht(B, H) {
9197
+ function Ht(B, j) {
9198
9198
  var J = st().box;
9199
9199
  function _t(ct) {
9200
- ct.target === J && (Na(J, "remove", _t), H());
9200
+ ct.target === J && (Na(J, "remove", _t), j());
9201
9201
  }
9202
9202
  if (B === 0)
9203
- return H();
9203
+ return j();
9204
9204
  Na(J, "remove", d), Na(J, "add", _t), d = _t;
9205
9205
  }
9206
- function Z(B, H, J) {
9206
+ function Z(B, j, J) {
9207
9207
  J === void 0 && (J = !1);
9208
9208
  var _t = Dn(m.props.triggerTarget || t);
9209
9209
  _t.forEach(function(ct) {
9210
- ct.addEventListener(B, H, J), f.push({
9210
+ ct.addEventListener(B, j, J), f.push({
9211
9211
  node: ct,
9212
9212
  eventType: B,
9213
- handler: H,
9213
+ handler: j,
9214
9214
  options: J
9215
9215
  });
9216
9216
  });
9217
9217
  }
9218
9218
  function ht() {
9219
- R() && (Z("touchstart", St, {
9219
+ I() && (Z("touchstart", St, {
9220
9220
  passive: !0
9221
9221
  }), Z("touchend", we, {
9222
9222
  passive: !0
@@ -9237,23 +9237,23 @@ function ab(t, e) {
9237
9237
  }
9238
9238
  function Ct() {
9239
9239
  f.forEach(function(B) {
9240
- var H = B.node, J = B.eventType, _t = B.handler, ct = B.options;
9241
- H.removeEventListener(J, _t, ct);
9240
+ var j = B.node, J = B.eventType, _t = B.handler, ct = B.options;
9241
+ j.removeEventListener(J, _t, ct);
9242
9242
  }), f = [];
9243
9243
  }
9244
9244
  function St(B) {
9245
- var H, J = !1;
9245
+ var j, J = !1;
9246
9246
  if (!(!m.state.isEnabled || ae(B) || a)) {
9247
- var _t = ((H = c) == null ? void 0 : H.type) === "focus";
9247
+ var _t = ((j = c) == null ? void 0 : j.type) === "focus";
9248
9248
  c = B, p = B.currentTarget, Wt(), !m.state.isVisible && W8(B) && Po.forEach(function(ct) {
9249
9249
  return ct(B);
9250
- }), B.type === "click" && (m.props.trigger.indexOf("mouseenter") < 0 || s) && m.props.hideOnClick !== !1 && m.state.isVisible ? J = !0 : F(B), B.type === "click" && (s = !J), J && !_t && j(B);
9250
+ }), B.type === "click" && (m.props.trigger.indexOf("mouseenter") < 0 || s) && m.props.hideOnClick !== !1 && m.state.isVisible ? J = !0 : F(B), B.type === "click" && (s = !J), J && !_t && $(B);
9251
9251
  }
9252
9252
  }
9253
9253
  function Ft(B) {
9254
- var H = B.target, J = U().contains(H) || b.contains(H);
9254
+ var j = B.target, J = U().contains(j) || x.contains(j);
9255
9255
  if (!(B.type === "mousemove" && J)) {
9256
- var _t = k().concat(b).map(function(ct) {
9256
+ var _t = k().concat(x).map(function(ct) {
9257
9257
  var jt, Qt = ct._tippy, ui = (jt = Qt.popperInstance) == null ? void 0 : jt.state;
9258
9258
  return ui ? {
9259
9259
  popperRect: ct.getBoundingClientRect(),
@@ -9261,28 +9261,28 @@ function ab(t, e) {
9261
9261
  props: i
9262
9262
  } : null;
9263
9263
  }).filter(Boolean);
9264
- Y8(_t, B) && (vt(), j(B));
9264
+ Y8(_t, B) && (vt(), $(B));
9265
9265
  }
9266
9266
  }
9267
9267
  function we(B) {
9268
- var H = ae(B) || m.props.trigger.indexOf("click") >= 0 && s;
9269
- if (!H) {
9268
+ var j = ae(B) || m.props.trigger.indexOf("click") >= 0 && s;
9269
+ if (!j) {
9270
9270
  if (m.props.interactive) {
9271
9271
  m.hideWithInteractivity(B);
9272
9272
  return;
9273
9273
  }
9274
- j(B);
9274
+ $(B);
9275
9275
  }
9276
9276
  }
9277
9277
  function He(B) {
9278
- m.props.trigger.indexOf("focusin") < 0 && B.target !== U() || m.props.interactive && B.relatedTarget && b.contains(B.relatedTarget) || j(B);
9278
+ m.props.trigger.indexOf("focusin") < 0 && B.target !== U() || m.props.interactive && B.relatedTarget && x.contains(B.relatedTarget) || $(B);
9279
9279
  }
9280
9280
  function ae(B) {
9281
- return pi.isTouch ? R() !== B.type.indexOf("touch") >= 0 : !1;
9281
+ return pi.isTouch ? I() !== B.type.indexOf("touch") >= 0 : !1;
9282
9282
  }
9283
9283
  function he() {
9284
9284
  Fe();
9285
- var B = m.props, H = B.popperOptions, J = B.placement, _t = B.offset, ct = B.getReferenceClientRect, jt = B.moveTransition, Qt = q() ? El(b).arrow : null, ui = ct ? {
9285
+ var B = m.props, j = B.popperOptions, J = B.placement, _t = B.offset, ct = B.getReferenceClientRect, jt = B.moveTransition, Qt = q() ? El(x).arrow : null, ui = ct ? {
9286
9286
  getBoundingClientRect: ct,
9287
9287
  contextElement: ct.contextElement || U()
9288
9288
  } : t, hi = {
@@ -9331,7 +9331,7 @@ function ab(t, e) {
9331
9331
  element: Qt,
9332
9332
  padding: 3
9333
9333
  }
9334
- }), ii.push.apply(ii, (H == null ? void 0 : H.modifiers) || []), m.popperInstance = I8(ui, b, Object.assign({}, H, {
9334
+ }), ii.push.apply(ii, (j == null ? void 0 : j.modifiers) || []), m.popperInstance = I8(ui, x, Object.assign({}, j, {
9335
9335
  placement: J,
9336
9336
  onFirstUpdate: h,
9337
9337
  modifiers: ii
@@ -9341,29 +9341,29 @@ function ab(t, e) {
9341
9341
  m.popperInstance && (m.popperInstance.destroy(), m.popperInstance = null);
9342
9342
  }
9343
9343
  function de() {
9344
- var B = m.props.appendTo, H, J = U();
9345
- m.props.interactive && B === x0 || B === "parent" ? H = J.parentNode : H = C0(B, [J]), H.contains(b) || H.appendChild(b), m.state.isMounted = !0, he();
9344
+ var B = m.props.appendTo, j, J = U();
9345
+ m.props.interactive && B === x0 || B === "parent" ? j = J.parentNode : j = C0(B, [J]), j.contains(x) || j.appendChild(x), m.state.isMounted = !0, he();
9346
9346
  }
9347
9347
  function k() {
9348
- return bs(b.querySelectorAll("[data-tippy-root]"));
9348
+ return bs(x.querySelectorAll("[data-tippy-root]"));
9349
9349
  }
9350
9350
  function F(B) {
9351
9351
  m.clearDelayTimeouts(), B && at("onTrigger", [m, B]), nt();
9352
- var H = ut(!0), J = $(), _t = J[0], ct = J[1];
9353
- pi.isTouch && _t === "hold" && ct && (H = ct), H ? n = setTimeout(function() {
9352
+ var j = ut(!0), J = H(), _t = J[0], ct = J[1];
9353
+ pi.isTouch && _t === "hold" && ct && (j = ct), j ? n = setTimeout(function() {
9354
9354
  m.show();
9355
- }, H) : m.show();
9355
+ }, j) : m.show();
9356
9356
  }
9357
- function j(B) {
9357
+ function $(B) {
9358
9358
  if (m.clearDelayTimeouts(), at("onUntrigger", [m, B]), !m.state.isVisible) {
9359
9359
  Dt();
9360
9360
  return;
9361
9361
  }
9362
9362
  if (!(m.props.trigger.indexOf("mouseenter") >= 0 && m.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(B.type) >= 0 && s)) {
9363
- var H = ut(!1);
9364
- H ? r = setTimeout(function() {
9363
+ var j = ut(!1);
9364
+ j ? r = setTimeout(function() {
9365
9365
  m.state.isVisible && m.hide();
9366
- }, H) : o = requestAnimationFrame(function() {
9366
+ }, j) : o = requestAnimationFrame(function() {
9367
9367
  m.hide();
9368
9368
  });
9369
9369
  }
@@ -9371,7 +9371,7 @@ function ab(t, e) {
9371
9371
  function N() {
9372
9372
  m.state.isEnabled = !0;
9373
9373
  }
9374
- function I() {
9374
+ function R() {
9375
9375
  m.hide(), m.state.isEnabled = !1;
9376
9376
  }
9377
9377
  function pt() {
@@ -9380,12 +9380,12 @@ function ab(t, e) {
9380
9380
  function It(B) {
9381
9381
  if (!m.state.isDestroyed) {
9382
9382
  at("onBeforeUpdate", [m, B]), Ct();
9383
- var H = m.props, J = Wd(t, Object.assign({}, H, Nd(B), {
9383
+ var j = m.props, J = Wd(t, Object.assign({}, j, Nd(B), {
9384
9384
  ignoreAttributes: !0
9385
9385
  }));
9386
- m.props = J, ht(), H.interactiveDebounce !== J.interactiveDebounce && (vt(), v = Rd(Ft, J.interactiveDebounce)), H.triggerTarget && !J.triggerTarget ? Dn(H.triggerTarget).forEach(function(_t) {
9386
+ m.props = J, ht(), j.interactiveDebounce !== J.interactiveDebounce && (vt(), v = Rd(Ft, J.interactiveDebounce)), j.triggerTarget && !J.triggerTarget ? Dn(j.triggerTarget).forEach(function(_t) {
9387
9387
  _t.removeAttribute("aria-expanded");
9388
- }) : J.triggerTarget && t.removeAttribute("aria-expanded"), Wt(), gt(), T && T(H, J), m.popperInstance && (he(), k().forEach(function(_t) {
9388
+ }) : J.triggerTarget && t.removeAttribute("aria-expanded"), Wt(), gt(), T && T(j, J), m.popperInstance && (he(), k().forEach(function(_t) {
9389
9389
  requestAnimationFrame(_t._tippy.popperInstance.forceUpdate);
9390
9390
  })), at("onAfterUpdate", [m, B]);
9391
9391
  }
@@ -9396,16 +9396,16 @@ function ab(t, e) {
9396
9396
  });
9397
9397
  }
9398
9398
  function fe() {
9399
- var B = m.state.isVisible, H = m.state.isDestroyed, J = !m.state.isEnabled, _t = pi.isTouch && !m.props.touch, ct = Ra(m.props.duration, 0, si.duration);
9400
- if (!(B || H || J || _t) && !U().hasAttribute("disabled") && (at("onShow", [m], !1), m.props.onShow(m) !== !1)) {
9401
- if (m.state.isVisible = !0, q() && (b.style.visibility = "visible"), gt(), nt(), m.state.isMounted || (b.style.transition = "none"), q()) {
9399
+ var B = m.state.isVisible, j = m.state.isDestroyed, J = !m.state.isEnabled, _t = pi.isTouch && !m.props.touch, ct = Ra(m.props.duration, 0, si.duration);
9400
+ if (!(B || j || J || _t) && !U().hasAttribute("disabled") && (at("onShow", [m], !1), m.props.onShow(m) !== !1)) {
9401
+ if (m.state.isVisible = !0, q() && (x.style.visibility = "visible"), gt(), nt(), m.state.isMounted || (x.style.transition = "none"), q()) {
9402
9402
  var jt = st(), Qt = jt.box, ui = jt.content;
9403
9403
  Va([Qt, ui], 0);
9404
9404
  }
9405
9405
  h = function() {
9406
9406
  var ii;
9407
9407
  if (!(!m.state.isVisible || u)) {
9408
- if (u = !0, b.offsetHeight, b.style.transition = m.props.moveTransition, q() && m.props.animation) {
9408
+ if (u = !0, x.offsetHeight, x.style.transition = m.props.moveTransition, q() && m.props.animation) {
9409
9409
  var qi = st(), Et = qi.box, Te = qi.content;
9410
9410
  Va([Et, Te], ct), Hd([Et, Te], "visible");
9411
9411
  }
@@ -9417,9 +9417,9 @@ function ab(t, e) {
9417
9417
  }
9418
9418
  }
9419
9419
  function Tt() {
9420
- var B = !m.state.isVisible, H = m.state.isDestroyed, J = !m.state.isEnabled, _t = Ra(m.props.duration, 1, si.duration);
9421
- if (!(B || H || J) && (at("onHide", [m], !1), m.props.onHide(m) !== !1)) {
9422
- if (m.state.isVisible = !1, m.state.isShown = !1, u = !1, s = !1, q() && (b.style.visibility = "hidden"), vt(), Dt(), gt(!0), q()) {
9420
+ var B = !m.state.isVisible, j = m.state.isDestroyed, J = !m.state.isEnabled, _t = Ra(m.props.duration, 1, si.duration);
9421
+ if (!(B || j || J) && (at("onHide", [m], !1), m.props.onHide(m) !== !1)) {
9422
+ if (m.state.isVisible = !1, m.state.isShown = !1, u = !1, s = !1, q() && (x.style.visibility = "hidden"), vt(), Dt(), gt(!0), q()) {
9423
9423
  var ct = st(), jt = ct.box, Qt = ct.content;
9424
9424
  m.props.animation && (Va([jt, Qt], _t), Hd([jt, Qt], "hidden"));
9425
9425
  }
@@ -9432,7 +9432,7 @@ function ab(t, e) {
9432
9432
  function Lt() {
9433
9433
  m.state.isVisible && m.hide(), m.state.isMounted && (Fe(), k().forEach(function(B) {
9434
9434
  B._tippy.unmount();
9435
- }), b.parentNode && b.parentNode.removeChild(b), Ha = Ha.filter(function(B) {
9435
+ }), x.parentNode && x.parentNode.removeChild(x), Ha = Ha.filter(function(B) {
9436
9436
  return B !== m;
9437
9437
  }), m.state.isMounted = !1, at("onHidden", [m]));
9438
9438
  }
@@ -9491,8 +9491,8 @@ function lb(t) {
9491
9491
  const g = p.target, y = e.value;
9492
9492
  if (y && y.contains(g))
9493
9493
  return;
9494
- const x = document.querySelector('.tippy-box[data-theme~="history-panel"]');
9495
- x && x.contains(g) || (w = o.value) != null && w.state.isVisible && o.value.hide();
9494
+ const b = document.querySelector('.tippy-box[data-theme~="history-panel"]');
9495
+ b && b.contains(g) || (w = o.value) != null && w.state.isVisible && o.value.hide();
9496
9496
  }, u = () => {
9497
9497
  if (!e.value || o.value) return;
9498
9498
  const p = {
@@ -9671,102 +9671,102 @@ function mb() {
9671
9671
  }, l = async (m) => {
9672
9672
  try {
9673
9673
  await a("setCurrentSessionChain")(m), g(m);
9674
- } catch (C) {
9675
- throw console.error("Failed to switch session:", C), C;
9674
+ } catch (_) {
9675
+ throw console.error("Failed to switch session:", _), _;
9676
9676
  }
9677
9677
  }, u = (m) => {
9678
- if (t.value = m.map((C) => ({ ...C, isEdit: !1 })), e.value) {
9679
- const C = m.find(
9680
- (b) => {
9678
+ if (t.value = m.map((_) => ({ ..._, isEdit: !1 })), e.value) {
9679
+ const _ = m.find(
9680
+ (x) => {
9681
9681
  var T;
9682
- return b.sessionCode === ((T = e.value) == null ? void 0 : T.sessionCode);
9682
+ return x.sessionCode === ((T = e.value) == null ? void 0 : T.sessionCode);
9683
9683
  }
9684
9684
  );
9685
- C && (e.value = {
9685
+ _ && (e.value = {
9686
9686
  ...e.value,
9687
- ...C,
9687
+ ..._,
9688
9688
  isEdit: e.value.isEdit
9689
9689
  });
9690
9690
  }
9691
9691
  }, c = (m) => {
9692
- const C = { ...m, isEdit: !1 };
9693
- return t.value.unshift(C), C;
9692
+ const _ = { ...m, isEdit: !1 };
9693
+ return t.value.unshift(_), _;
9694
9694
  }, d = async (m) => {
9695
- const C = m || ub(), b = ot("新会话"), T = {
9696
- sessionCode: C,
9697
- sessionName: b,
9695
+ const _ = m || ub(), x = ot("新会话"), T = {
9696
+ sessionCode: _,
9697
+ sessionName: x,
9698
9698
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
9699
9699
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
9700
9700
  }, A = c(T);
9701
9701
  return await a("plusSessionApi")(A), await l(A), A;
9702
9702
  }, h = (m) => {
9703
- const C = t.value.find((b) => b.sessionCode === m);
9704
- C && (o.value[m] = { ...C }, v(m, { isEdit: !0 }, { syncBackend: !1 }));
9705
- }, f = async (m, C) => {
9706
- const b = o.value[m];
9707
- if (!b)
9703
+ const _ = t.value.find((x) => x.sessionCode === m);
9704
+ _ && (o.value[m] = { ..._ }, v(m, { isEdit: !0 }, { syncBackend: !1 }));
9705
+ }, f = async (m, _) => {
9706
+ const x = o.value[m];
9707
+ if (!x)
9708
9708
  return null;
9709
- const T = Object.entries(C).some(([L, $]) => L === "isEdit" ? !1 : b[L] !== $), A = await v(
9709
+ const T = Object.entries(_).some(([L, H]) => L === "isEdit" ? !1 : x[L] !== H), A = await v(
9710
9710
  m,
9711
- { ...C, isEdit: !1 },
9711
+ { ..._, isEdit: !1 },
9712
9712
  { syncBackend: T }
9713
9713
  );
9714
9714
  return delete o.value[m], A;
9715
- }, v = async (m, C, b = {}) => {
9716
- const { syncBackend: T = !0, forceSync: A = !1 } = b, L = t.value.findIndex((q) => q.sessionCode === m);
9715
+ }, v = async (m, _, x = {}) => {
9716
+ const { syncBackend: T = !0, forceSync: A = !1 } = x, L = t.value.findIndex((q) => q.sessionCode === m);
9717
9717
  if (L === -1)
9718
9718
  return null;
9719
- const $ = t.value[L], R = { ...$, ...C };
9720
- if (t.value[L] = R, t.value = [...t.value], n.value[m] || (n.value[m] = 0), n.value[m]++, e.value && e.value.sessionCode === m && (e.value = { ...e.value, ...C }), T && !C.isEdit || A)
9719
+ const H = t.value[L], I = { ...H, ..._ };
9720
+ if (t.value[L] = I, t.value = [...t.value], n.value[m] || (n.value[m] = 0), n.value[m]++, e.value && e.value.sessionCode === m && (e.value = { ...e.value, ..._ }), T && !_.isEdit || A)
9721
9721
  try {
9722
- const q = a("modifySessionApi"), U = { ...R, isEdit: !1 };
9722
+ const q = a("modifySessionApi"), U = { ...I, isEdit: !1 };
9723
9723
  await q(U);
9724
9724
  } catch (q) {
9725
- console.error("Failed to sync session to backend:", q), t.value[L] = $, t.value = [...t.value], e.value && e.value.sessionCode === m && (e.value = $);
9725
+ console.error("Failed to sync session to backend:", q), t.value[L] = H, t.value = [...t.value], e.value && e.value.sessionCode === m && (e.value = H);
9726
9726
  }
9727
- return R;
9727
+ return I;
9728
9728
  }, p = async (m) => {
9729
9729
  var A;
9730
9730
  await a("deleteSessionApi")(m);
9731
- const b = t.value.findIndex((L) => L.sessionCode === m);
9732
- if (b === -1)
9731
+ const x = t.value.findIndex((L) => L.sessionCode === m);
9732
+ if (x === -1)
9733
9733
  return null;
9734
9734
  const T = ((A = e.value) == null ? void 0 : A.sessionCode) === m;
9735
- if (t.value.splice(b, 1), T) {
9735
+ if (t.value.splice(x, 1), T) {
9736
9736
  if (t.value.length > 0) {
9737
- const L = (/* @__PURE__ */ new Date()).toDateString(), $ = t.value.filter(
9737
+ const L = (/* @__PURE__ */ new Date()).toDateString(), H = t.value.filter(
9738
9738
  (q) => new Date(q.createdAt || "").toDateString() === L
9739
- ), R = $.length > 0 ? $[0] : t.value[0];
9740
- return await l(R), R;
9739
+ ), I = H.length > 0 ? H[0] : t.value[0];
9740
+ return await l(I), I;
9741
9741
  }
9742
- return await x(!1), null;
9742
+ return await b(!1), null;
9743
9743
  }
9744
9744
  return null;
9745
9745
  }, g = (m) => {
9746
- const C = t.value.find((b) => b.sessionCode === m.sessionCode);
9747
- if (C)
9748
- e.value = C;
9746
+ const _ = t.value.find((x) => x.sessionCode === m.sessionCode);
9747
+ if (_)
9748
+ e.value = _;
9749
9749
  else {
9750
- const b = c(m);
9751
- e.value = b;
9750
+ const x = c(m);
9751
+ e.value = x;
9752
9752
  }
9753
9753
  }, y = (m) => {
9754
9754
  r = m;
9755
- }, x = async (m = !0) => {
9756
- var A, L, $, R;
9757
- let C = t.value;
9755
+ }, b = async (m = !0) => {
9756
+ var A, L, H, I;
9757
+ let _ = t.value;
9758
9758
  if (m) {
9759
9759
  const U = await a("getSessionsApi")();
9760
9760
  u(U);
9761
9761
  }
9762
- let b = null, T = [];
9763
- if (C.length > 0) {
9764
- const q = C.sort(
9762
+ let x = null, T = [];
9763
+ if (_.length > 0) {
9764
+ const q = _.sort(
9765
9765
  (st, ut) => new Date(ut.createdAt || "").getTime() - new Date(st.createdAt || "").getTime()
9766
9766
  )[0];
9767
- T = await a("getSessionContentsApi")(q.sessionCode), T.filter((st) => !xs.includes(st.role)).some((st) => st.content && st.content.trim() !== "") || (b = { ...q, isEdit: !1 });
9767
+ T = await a("getSessionContentsApi")(q.sessionCode), T.filter((st) => !xs.includes(st.role)).some((st) => st.content && st.content.trim() !== "") || (x = { ...q, isEdit: !1 });
9768
9768
  }
9769
- if (b ? (a("setSessionContents")(T), l(b)) : b = await d(), !s.value || m) {
9769
+ if (x ? (a("setSessionContents")(T), l(x)) : x = await d(), !s.value || m) {
9770
9770
  const q = a("getAgentInfoApi"), { conversationSettings: U, promptSetting: wt, agentName: st } = await q();
9771
9771
  Object.assign(s.value, {
9772
9772
  conversationSettings: U,
@@ -9774,8 +9774,8 @@ function mb() {
9774
9774
  agentName: st
9775
9775
  });
9776
9776
  }
9777
- return ($ = (L = (A = s.value) == null ? void 0 : A.promptSetting) == null ? void 0 : L.content) != null && $.length && await a("handleCompleteRole")(b.sessionCode, s.value.promptSetting.content), {
9778
- conversationSettings: (R = s.value) == null ? void 0 : R.conversationSettings
9777
+ return (H = (L = (A = s.value) == null ? void 0 : A.promptSetting) == null ? void 0 : L.content) != null && H.length && await a("handleCompleteRole")(x.sessionCode, s.value.promptSetting.content), {
9778
+ conversationSettings: (I = s.value) == null ? void 0 : I.conversationSettings
9779
9779
  };
9780
9780
  };
9781
9781
  return {
@@ -9784,7 +9784,7 @@ function mb() {
9784
9784
  setSessionList: u,
9785
9785
  addSession: c,
9786
9786
  addNewSession: d,
9787
- initSession: x,
9787
+ initSession: b,
9788
9788
  updateSession: v,
9789
9789
  startEditSession: h,
9790
9790
  finishEditSession: f,
@@ -9795,21 +9795,23 @@ function mb() {
9795
9795
  sessionContentLoading: i,
9796
9796
  agentInfo: s,
9797
9797
  getSessionList: async () => {
9798
- const C = await a("getSessionsApi")();
9799
- if (u(C), e.value) {
9800
- const b = C.find(
9798
+ const _ = await a("getSessionsApi")();
9799
+ if (u(_), e.value) {
9800
+ const x = _.find(
9801
9801
  (T) => {
9802
9802
  var A;
9803
9803
  return T.sessionCode === ((A = e.value) == null ? void 0 : A.sessionCode);
9804
9804
  }
9805
9805
  );
9806
- b && (e.value = {
9806
+ x && (e.value = {
9807
9807
  ...e.value,
9808
- ...b,
9808
+ ...x,
9809
9809
  isEdit: e.value.isEdit
9810
9810
  });
9811
9811
  }
9812
- return t.value;
9812
+ return _.forEach((x) => {
9813
+ n.value[x.sessionCode] || (n.value[x.sessionCode] = 0), n.value[x.sessionCode]++;
9814
+ }), t.value;
9813
9815
  },
9814
9816
  sessionUpdateCounter: n
9815
9817
  };
@@ -9894,8 +9896,8 @@ const yb = { class: "bkai-history-panel" }, bb = { class: "history-panel-header"
9894
9896
  (y) => y.sessionName.toLowerCase().includes(o.value.toLowerCase())
9895
9897
  );
9896
9898
  for (const y of g) {
9897
- const x = new Date(y.createdAt || ""), w = /* @__PURE__ */ new Date(), m = /* @__PURE__ */ new Date();
9898
- m.setDate(m.getDate() - 1), x.toDateString() === w.toDateString() ? p.today.sessionList.push(y) : x.toDateString() === m.toDateString() ? p.yesterday.sessionList.push(y) : p.before.sessionList.push(y);
9899
+ const b = new Date(y.createdAt || ""), w = /* @__PURE__ */ new Date(), m = /* @__PURE__ */ new Date();
9900
+ m.setDate(m.getDate() - 1), b.toDateString() === w.toDateString() ? p.today.sessionList.push(y) : b.toDateString() === m.toDateString() ? p.yesterday.sessionList.push(y) : p.before.sessionList.push(y);
9899
9901
  }
9900
9902
  return Object.values(p).filter((y) => y.sessionList.length > 0);
9901
9903
  }), u = (p) => {
@@ -9963,21 +9965,21 @@ const yb = { class: "bkai-history-panel" }, bb = { class: "history-panel-header"
9963
9965
  (D(!0), G(
9964
9966
  Ie,
9965
9967
  null,
9966
- li(y.sessionList, (x) => (D(), G("div", {
9967
- key: `${x.sessionCode}-${E(s).sessionUpdateCounter.value[x.sessionCode] || 0}`,
9968
- class: Ot(["history-panel-content-item-list-item", { active: u(x) }]),
9969
- onClick: (w) => c(x)
9968
+ li(y.sessionList, (b) => (D(), G("div", {
9969
+ key: `${b.sessionCode}-${E(s).sessionUpdateCounter.value[b.sessionCode] || 0}`,
9970
+ class: Ot(["history-panel-content-item-list-item", { active: u(b) }]),
9971
+ onClick: (w) => c(b)
9970
9972
  }, [
9971
- x.isEdit ? (D(), Kt(E(es), {
9973
+ b.isEdit ? (D(), Kt(E(es), {
9972
9974
  key: 1,
9973
9975
  ref_for: !0,
9974
9976
  ref: (w) => {
9975
- x.isEdit && (a.value[x.sessionCode] = w);
9977
+ b.isEdit && (a.value[b.sessionCode] = w);
9976
9978
  },
9977
- modelValue: x.sessionName,
9978
- "onUpdate:modelValue": (w) => x.sessionName = w,
9979
+ modelValue: b.sessionName,
9980
+ "onUpdate:modelValue": (w) => b.sessionName = w,
9979
9981
  style: { width: "100%", height: "28px" },
9980
- onBlur: (w) => h(x),
9982
+ onBlur: (w) => h(b),
9981
9983
  onEnter: v,
9982
9984
  onClick: g[2] || (g[2] = tn(() => {
9983
9985
  }, ["stop"]))
@@ -9991,7 +9993,7 @@ const yb = { class: "bkai-history-panel" }, bb = { class: "history-panel-header"
9991
9993
  {
9992
9994
  default: Vt(() => [
9993
9995
  bi(
9994
- Bt(x.sessionName),
9996
+ Bt(b.sessionName),
9995
9997
  1
9996
9998
  /* TEXT */
9997
9999
  )
@@ -10005,7 +10007,7 @@ const yb = { class: "bkai-history-panel" }, bb = { class: "history-panel-header"
10005
10007
  z("span", kb, [
10006
10008
  nn(z("i", {
10007
10009
  class: "bkai-icon bkai-bianji",
10008
- onClick: tn((w) => f(x), ["stop"])
10010
+ onClick: tn((w) => f(b), ["stop"])
10009
10011
  }, null, 8, Ab), [
10010
10012
  [E(r), {
10011
10013
  content: E(ot)("编辑"),
@@ -10020,7 +10022,7 @@ const yb = { class: "bkai-history-panel" }, bb = { class: "history-panel-header"
10020
10022
  },
10021
10023
  trigger: "click",
10022
10024
  boundary: "parent",
10023
- onConfirm: (w) => d(x.sessionCode)
10025
+ onConfirm: (w) => d(b.sessionCode)
10024
10026
  }, {
10025
10027
  default: Vt(() => [
10026
10028
  nn(z(
@@ -10095,8 +10097,8 @@ const yb = { class: "bkai-history-panel" }, bb = { class: "history-panel-header"
10095
10097
  appendTo: () => document.querySelector(".ai-blueking-container-wrapper") || document.body
10096
10098
  }
10097
10099
  }), l = ft(() => {
10098
- var x, w, m;
10099
- return i.enableChatSession ? i.title || `${((w = o.agentInfo.value) == null ? void 0 : w.agentName) || ""}-${(m = o.currentSession.value) == null ? void 0 : m.sessionName}` : (x = o.agentInfo.value) == null ? void 0 : x.agentName;
10100
+ var b, w, m;
10101
+ return i.enableChatSession ? i.title || `${((w = o.agentInfo.value) == null ? void 0 : w.agentName) || ""}-${(m = o.currentSession.value) == null ? void 0 : m.sessionName}` : (b = o.agentInfo.value) == null ? void 0 : b.agentName;
10100
10102
  }), u = ft(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"), c = ft(() => i.isCompressionHeight ? ot("恢复默认尺寸") : ot("缩小高度")), d = M(null), h = M(null), f = M(null), { createTooltip: v, destroyAll: p } = cr({
10101
10103
  arrow: !0,
10102
10104
  delay: [0, 0]
@@ -10120,11 +10122,11 @@ const yb = { class: "bkai-history-panel" }, bb = { class: "history-panel-header"
10120
10122
  const y = async () => {
10121
10123
  try {
10122
10124
  n("newChat"), await o.initSession(!1);
10123
- } catch (x) {
10124
- console.error("Failed to create new chat:", x);
10125
+ } catch (b) {
10126
+ console.error("Failed to create new chat:", b);
10125
10127
  }
10126
10128
  };
10127
- return (x, w) => (D(), G(
10129
+ return (b, w) => (D(), G(
10128
10130
  "div",
10129
10131
  {
10130
10132
  ref_key: "headerRef",
@@ -10374,29 +10376,29 @@ function xo(t) {
10374
10376
  Math.pow(w.clientX - a.x, 2) + Math.pow(w.clientY - a.y, 2)
10375
10377
  ) > 5), a = null;
10376
10378
  }, c = (w, m) => {
10377
- const C = window.innerWidth, { width: b, height: T, offset: A } = $a;
10378
- let L = w + window.scrollX - b / 2;
10379
- L = Math.max(A, Math.min(L, C - b - A));
10380
- let $ = m + window.scrollY - T - A;
10381
- return m <= T + A && ($ = m + window.scrollY + A), {
10382
- top: `${$}px`,
10379
+ const _ = window.innerWidth, { width: x, height: T, offset: A } = $a;
10380
+ let L = w + window.scrollX - x / 2;
10381
+ L = Math.max(A, Math.min(L, _ - x - A));
10382
+ let H = m + window.scrollY - T - A;
10383
+ return m <= T + A && (H = m + window.scrollY + A), {
10384
+ top: `${H}px`,
10383
10385
  left: `${L}px`
10384
10386
  };
10385
10387
  }, d = (w) => {
10386
- const m = window.innerWidth, { width: C, height: b, offset: T } = $a;
10387
- let A = w.left + window.scrollX + w.width / 2 - C / 2;
10388
- A = Math.max(T, Math.min(A, m - C - T));
10389
- let L = w.top + window.scrollY - b - T;
10390
- return w.top <= b + T && (L = w.bottom + window.scrollY + T), {
10388
+ const m = window.innerWidth, { width: _, height: x, offset: T } = $a;
10389
+ let A = w.left + window.scrollX + w.width / 2 - _ / 2;
10390
+ A = Math.max(T, Math.min(A, m - _ - T));
10391
+ let L = w.top + window.scrollY - x - T;
10392
+ return w.top <= x + T && (L = w.bottom + window.scrollY + T), {
10391
10393
  top: `${L}px`,
10392
10394
  left: `${A}px`
10393
10395
  };
10394
10396
  }, h = (w, m) => {
10395
- let C = w;
10396
- for (; C && C !== document.documentElement; ) {
10397
- if (C.hasAttribute && C.hasAttribute(m))
10397
+ let _ = w;
10398
+ for (; _ && _ !== document.documentElement; ) {
10399
+ if (_.hasAttribute && _.hasAttribute(m))
10398
10400
  return !0;
10399
- C = C.parentElement;
10401
+ _ = _.parentElement;
10400
10402
  }
10401
10403
  return !1;
10402
10404
  }, f = () => {
@@ -10412,8 +10414,8 @@ function xo(t) {
10412
10414
  v();
10413
10415
  return;
10414
10416
  }
10415
- const C = m.commonAncestorContainer, b = C.nodeType === Node.ELEMENT_NODE ? C : C.parentElement;
10416
- if (h(b, "ai-blueking-hide")) {
10417
+ const _ = m.commonAncestorContainer, x = _.nodeType === Node.ELEMENT_NODE ? _ : _.parentElement;
10418
+ if (h(x, "ai-blueking-hide")) {
10417
10419
  v();
10418
10420
  return;
10419
10421
  }
@@ -10424,8 +10426,8 @@ function xo(t) {
10424
10426
  v();
10425
10427
  return;
10426
10428
  }
10427
- const { clientX: L, clientY: $ } = r;
10428
- i.value = c(L, $), e.value = !0, r = null;
10429
+ const { clientX: L, clientY: H } = r;
10430
+ i.value = c(L, H), e.value = !0, r = null;
10429
10431
  } else {
10430
10432
  const L = m.getBoundingClientRect();
10431
10433
  if (!L.width || !L.height) {
@@ -10439,20 +10441,20 @@ function xo(t) {
10439
10441
  e.value = !1, ja.value || (Cr.value = "");
10440
10442
  }, p = (w) => {
10441
10443
  var T, A, L;
10442
- const m = w.target, C = ((T = m.classList) == null ? void 0 : T.contains("ai-blueking-tag-text")) || ((A = m.classList) == null ? void 0 : A.contains("shortcut-btn")), b = (L = o.value) == null ? void 0 : L.contains(m);
10443
- if (!(C || !s)) {
10444
+ const m = w.target, _ = ((T = m.classList) == null ? void 0 : T.contains("ai-blueking-tag-text")) || ((A = m.classList) == null ? void 0 : A.contains("shortcut-btn")), x = (L = o.value) == null ? void 0 : L.contains(m);
10445
+ if (!(_ || !s)) {
10444
10446
  if (s) {
10445
10447
  w.preventDefault(), w.stopPropagation(), s = !1;
10446
10448
  return;
10447
10449
  }
10448
- b || (v(), g());
10450
+ x || (v(), g());
10449
10451
  }
10450
10452
  }, g = () => {
10451
10453
  const w = window.getSelection();
10452
10454
  w && w.removeAllRanges(), Cr.value = "";
10453
10455
  }, y = (w) => {
10454
10456
  Cr.value = w;
10455
- }, x = (w) => {
10457
+ }, b = (w) => {
10456
10458
  Kd.value = w;
10457
10459
  };
10458
10460
  return _e(() => {
@@ -10467,7 +10469,7 @@ function xo(t) {
10467
10469
  hideIcon: v,
10468
10470
  clearSelection: g,
10469
10471
  setSelection: y,
10470
- setCiteText: x,
10472
+ setCiteText: b,
10471
10473
  lockSelectedText: ja,
10472
10474
  popupRef: o
10473
10475
  };
@@ -10510,26 +10512,26 @@ function E0(t, e, i = M(null), n = {}) {
10510
10512
  arrow: d,
10511
10513
  offset: h
10512
10514
  }), g = ft(() => o.value.length === 0 ? "" : `<div class="tippy-dropdown-menu">${o.value.map(
10513
- (C) => `<div class="tippy-menu-item" data-item-id="${C.id}">
10514
- ${C.icon ? `<i class="${C.icon}"></i>` : ""}
10515
- <span>${C.name}</span>
10515
+ (_) => `<div class="tippy-menu-item" data-item-id="${_.id}">
10516
+ ${_.icon ? `<i class="${_.icon}"></i>` : ""}
10517
+ <span>${_.name}</span>
10516
10518
  </div>`
10517
10519
  ).join("")}</div>`), y = async () => {
10518
10520
  var wt;
10519
10521
  const m = t.value;
10520
10522
  if (!m) return;
10521
10523
  r.value = [...e.value], o.value = [], await oe();
10522
- const C = m.clientWidth, b = Array.from(m.children), T = window.getComputedStyle(m), A = parseFloat(T.gap) || 0;
10524
+ const _ = m.clientWidth, x = Array.from(m.children), T = window.getComputedStyle(m), A = parseFloat(T.gap) || 0;
10523
10525
  let L = 0;
10524
- if (b.forEach((st, ut) => {
10525
- L += st.getBoundingClientRect().width, ut < b.length - 1 && (L += A);
10526
- }), L <= C)
10526
+ if (x.forEach((st, ut) => {
10527
+ L += st.getBoundingClientRect().width, ut < x.length - 1 && (L += A);
10528
+ }), L <= _)
10527
10529
  return;
10528
- const $ = ((wt = i.value) == null ? void 0 : wt.offsetWidth) || 70, R = C - $;
10530
+ const H = ((wt = i.value) == null ? void 0 : wt.offsetWidth) || 70, I = _ - H;
10529
10531
  let q = 0, U = -1;
10530
- for (let st = 0; st < b.length; st++) {
10531
- const ut = b[st];
10532
- if (q += ut.getBoundingClientRect().width, st < b.length - 1 && (q += A), q > R) {
10532
+ for (let st = 0; st < x.length; st++) {
10533
+ const ut = x[st];
10534
+ if (q += ut.getBoundingClientRect().width, st < x.length - 1 && (q += A), q > I) {
10533
10535
  U = st;
10534
10536
  break;
10535
10537
  }
@@ -10549,14 +10551,14 @@ function E0(t, e, i = M(null), n = {}) {
10549
10551
  m.length > 0 && i.value ? (p(), v(i.value, g.value, {
10550
10552
  onShow: () => {
10551
10553
  setTimeout(() => {
10552
- document.querySelectorAll(".tippy-menu-item").forEach((b) => {
10553
- b.addEventListener("click", x);
10554
+ document.querySelectorAll(".tippy-menu-item").forEach((x) => {
10555
+ x.addEventListener("click", b);
10554
10556
  });
10555
10557
  }, 0);
10556
10558
  },
10557
10559
  onHide: () => {
10558
- document.querySelectorAll(".tippy-menu-item").forEach((b) => {
10559
- b.removeEventListener("click", x);
10560
+ document.querySelectorAll(".tippy-menu-item").forEach((x) => {
10561
+ x.removeEventListener("click", b);
10560
10562
  });
10561
10563
  }
10562
10564
  })) : p();
@@ -10564,8 +10566,8 @@ function E0(t, e, i = M(null), n = {}) {
10564
10566
  },
10565
10567
  { immediate: !0 }
10566
10568
  );
10567
- const x = (m) => {
10568
- const b = m.currentTarget.dataset.itemId, T = o.value.find((A) => A.id === b);
10569
+ const b = (m) => {
10570
+ const x = m.currentTarget.dataset.itemId, T = o.value.find((A) => A.id === x);
10569
10571
  T && f && f(T);
10570
10572
  };
10571
10573
  let w = null;
@@ -10742,8 +10744,8 @@ const $b = { class: "ai-selected-box" }, Wb = { class: "ai-selected-tip" }, qb =
10742
10744
  if (!p) return;
10743
10745
  const g = p.children[a.value];
10744
10746
  if (!g) return;
10745
- const y = p.getBoundingClientRect(), x = g.getBoundingClientRect();
10746
- x.top < y.top ? p.scrollTop = g.offsetTop : x.bottom > y.bottom && (p.scrollTop = g.offsetTop + g.offsetHeight - p.clientHeight);
10747
+ const y = p.getBoundingClientRect(), b = g.getBoundingClientRect();
10748
+ b.top < y.top ? p.scrollTop = g.offsetTop : b.bottom > y.bottom && (p.scrollTop = g.offsetTop + g.offsetHeight - p.clientHeight);
10747
10749
  };
10748
10750
  let v = null;
10749
10751
  return _e(() => {
@@ -10783,13 +10785,13 @@ const $b = { class: "ai-selected-box" }, Wb = { class: "ai-selected-tip" }, qb =
10783
10785
  )) : (D(!0), G(
10784
10786
  Ie,
10785
10787
  { key: 1 },
10786
- li(l.value, (y, x) => (D(), G("div", {
10788
+ li(l.value, (y, b) => (D(), G("div", {
10787
10789
  key: y,
10788
10790
  style: { overflow: "hidden" },
10789
- class: Ot(["bkai-prompt-list-item", { active: a.value === x }]),
10791
+ class: Ot(["bkai-prompt-list-item", { active: a.value === b }]),
10790
10792
  onClick: (w) => u(y),
10791
10793
  onMouseleave: g[1] || (g[1] = (w) => a.value = null),
10792
- onMouseover: (w) => a.value = x
10794
+ onMouseover: (w) => a.value = b
10793
10795
  }, Bt(y), 43, Jb))),
10794
10796
  128
10795
10797
  /* KEYED_FRAGMENT */
@@ -10917,18 +10919,18 @@ const $b = { class: "ai-selected-box" }, Wb = { class: "ai-selected-tip" }, qb =
10917
10919
  }));
10918
10920
  const n = i, { enablePopup: r } = Dc(), { selectedText: o, citeText: s, setCiteText: a, clearSelection: l, lockSelectedText: u } = xo(r), c = t, d = M(), h = M(""), f = M(null), v = M(0), p = ft(() => -(v.value + 8) + "px"), g = M(!1), y = (Z) => {
10919
10921
  h.value = Z, g.value = !1;
10920
- }, x = M(), w = M(), m = ft(() => c.loading ? "bkai-published-zhongzhi" : "bkai-fasong"), C = ft(() => c.loading ? ot("停止") : ot("发送")), b = ft(() => !c.loading && !h.value.trim()), { createTooltip: T } = cr({
10922
+ }, b = M(), w = M(), m = ft(() => c.loading ? "bkai-published-zhongzhi" : "bkai-fasong"), _ = ft(() => c.loading ? ot("停止") : ot("发送")), x = ft(() => !c.loading && !h.value.trim()), { createTooltip: T } = cr({
10921
10923
  arrow: !0,
10922
10924
  delay: [0, 0]
10923
10925
  }), A = () => {
10924
10926
  c.disabled || (c.loading ? vt() : Gt());
10925
10927
  }, L = () => {
10926
- x.value && (w.value = T(x.value, C.value, {
10928
+ b.value && (w.value = T(b.value, _.value, {
10927
10929
  appendTo: document.querySelector(".ai-blueking-container-wrapper")
10928
- })), $();
10929
- }, $ = () => {
10930
- w.value && (w.value.setContent(C.value), b.value ? w.value.disable() : w.value.enable());
10931
- }, { textareaHeight: R, updateHeight: q, resetHeight: U, bindTextarea: wt } = jb({
10930
+ })), H();
10931
+ }, H = () => {
10932
+ w.value && (w.value.setContent(_.value), x.value ? w.value.disable() : w.value.enable());
10933
+ }, { textareaHeight: I, updateHeight: q, resetHeight: U, bindTextarea: wt } = jb({
10932
10934
  minHeight: 68,
10933
10935
  maxHeight: 248,
10934
10936
  defaultHeight: 68
@@ -10955,12 +10957,12 @@ const $b = { class: "ai-selected-box" }, Wb = { class: "ai-selected-tip" }, qb =
10955
10957
  var Z;
10956
10958
  s.value.length > 0 && ((Z = d.value) == null || Z.focus());
10957
10959
  }), re(
10958
- () => R.value,
10960
+ () => I.value,
10959
10961
  (Z) => {
10960
10962
  n("height-change", Z);
10961
10963
  }
10962
10964
  ), re([() => c.loading, () => h.value], () => {
10963
- $();
10965
+ H();
10964
10966
  });
10965
10967
  const Ut = () => {
10966
10968
  gt.value || q(), (h.value.trim() || gt.value) && o.value && (o.value = ""), h.value.includes("/") && c.prompts.length > 0 ? g.value = !0 : g.value = !1, n("update:modelValue", h.value);
@@ -10976,7 +10978,7 @@ const $b = { class: "ai-selected-box" }, Wb = { class: "ai-selected-tip" }, qb =
10976
10978
  }
10977
10979
  };
10978
10980
  _e(() => {
10979
- d.value && (wt(d.value), n("height-change", R.value)), L(), document.addEventListener("click", nt);
10981
+ d.value && (wt(d.value), n("height-change", I.value)), L(), document.addEventListener("click", nt);
10980
10982
  }), Ce(() => {
10981
10983
  document.removeEventListener("click", nt);
10982
10984
  }), e({
@@ -11046,7 +11048,7 @@ const $b = { class: "ai-selected-box" }, Wb = { class: "ai-selected-tip" }, qb =
11046
11048
  ref_key: "textareaRef",
11047
11049
  ref: d,
11048
11050
  "onUpdate:modelValue": ht[3] || (ht[3] = (Ft) => h.value = Ft),
11049
- style: qn({ height: E(R) + "px" }),
11051
+ style: qn({ height: E(I) + "px" }),
11050
11052
  class: "input-area",
11051
11053
  disabled: c.disabled,
11052
11054
  placeholder: c.placeholder,
@@ -11065,7 +11067,7 @@ const $b = { class: "ai-selected-box" }, Wb = { class: "ai-selected-tip" }, qb =
11065
11067
  "i",
11066
11068
  {
11067
11069
  ref_key: "actionIconRef",
11068
- ref: x,
11070
+ ref: b,
11069
11071
  class: Ot([
11070
11072
  "bkai-icon",
11071
11073
  m.value,
@@ -11327,7 +11329,7 @@ const $b = { class: "ai-selected-box" }, Wb = { class: "ai-selected-tip" }, qb =
11327
11329
  (D(), Kt(cg(o(g.type)), pp({
11328
11330
  id: g.key,
11329
11331
  modelValue: E(l)[y][g.key],
11330
- "onUpdate:modelValue": (x) => E(l)[y][g.key] = x
11332
+ "onUpdate:modelValue": (b) => E(l)[y][g.key] = b
11331
11333
  }, { ref_for: !0 }, {
11332
11334
  ...g,
11333
11335
  placeholder: g.placeholder === null ? void 0 : g.placeholder,
@@ -11642,22 +11644,22 @@ function P0() {
11642
11644
  HTMLFormElement: d,
11643
11645
  DOMParser: h,
11644
11646
  trustedTypes: f
11645
- } = t, v = l.prototype, p = Sr(v, "cloneNode"), g = Sr(v, "remove"), y = Sr(v, "nextSibling"), x = Sr(v, "childNodes"), w = Sr(v, "parentNode");
11647
+ } = t, v = l.prototype, p = Sr(v, "cloneNode"), g = Sr(v, "remove"), y = Sr(v, "nextSibling"), b = Sr(v, "childNodes"), w = Sr(v, "parentNode");
11646
11648
  if (typeof s == "function") {
11647
11649
  const K = i.createElement("template");
11648
11650
  K.content && K.content.ownerDocument && (i = K.content.ownerDocument);
11649
11651
  }
11650
- let m, C = "";
11652
+ let m, _ = "";
11651
11653
  const {
11652
- implementation: b,
11654
+ implementation: x,
11653
11655
  createNodeIterator: T,
11654
11656
  createDocumentFragment: A,
11655
11657
  getElementsByTagName: L
11656
11658
  } = i, {
11657
- importNode: $
11659
+ importNode: H
11658
11660
  } = n;
11659
- let R = of();
11660
- e.isSupported = typeof L0 == "function" && typeof w == "function" && b && b.createHTMLDocument !== void 0;
11661
+ let I = of();
11662
+ e.isSupported = typeof L0 == "function" && typeof w == "function" && x && x.createHTMLDocument !== void 0;
11661
11663
  const {
11662
11664
  MUSTACHE_EXPR: q,
11663
11665
  ERB_EXPR: U,
@@ -11695,56 +11697,56 @@ function P0() {
11695
11697
  }
11696
11698
  })), Dt = null, zt = null, Nt = !0, Ht = !0, Z = !1, ht = !0, Ct = !1, St = !0, Ft = !1, we = !1, He = !1, ae = !1, he = !1, Fe = !1, de = !0, k = !1;
11697
11699
  const F = "user-content-";
11698
- let j = !0, N = !1, I = {}, pt = null;
11700
+ let $ = !0, N = !1, R = {}, pt = null;
11699
11701
  const It = yt({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
11700
11702
  let qt = null;
11701
11703
  const fe = yt({}, ["audio", "video", "img", "source", "image", "track"]);
11702
11704
  let Tt = null;
11703
11705
  const kt = yt({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Lt = "http://www.w3.org/1998/Math/MathML", ee = "http://www.w3.org/2000/svg", B = "http://www.w3.org/1999/xhtml";
11704
- let H = B, J = !1, _t = null;
11706
+ let j = B, J = !1, _t = null;
11705
11707
  const ct = yt({}, [Lt, ee, B], qa);
11706
11708
  let jt = yt({}, ["mi", "mo", "mn", "ms", "mtext"]), Qt = yt({}, ["annotation-xml"]);
11707
11709
  const ui = yt({}, ["title", "style", "font", "a", "script"]);
11708
11710
  let hi = null;
11709
11711
  const ii = ["application/xhtml+xml", "text/html"], qi = "text/html";
11710
11712
  let Et = null, Te = null;
11711
- const fr = i.createElement("form"), ki = function(_) {
11712
- return _ instanceof RegExp || _ instanceof Function;
11713
+ const fr = i.createElement("form"), ki = function(C) {
11714
+ return C instanceof RegExp || C instanceof Function;
11713
11715
  }, ni = function() {
11714
- let _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
11715
- if (!(Te && Te === _)) {
11716
- if ((!_ || typeof _ != "object") && (_ = {}), _ = Pi(_), hi = // eslint-disable-next-line unicorn/prefer-includes
11717
- ii.indexOf(_.PARSER_MEDIA_TYPE) === -1 ? qi : _.PARSER_MEDIA_TYPE, Et = hi === "application/xhtml+xml" ? qa : Uo, vt = ri(_, "ALLOWED_TAGS") ? yt({}, _.ALLOWED_TAGS, Et) : Ut, xt = ri(_, "ALLOWED_ATTR") ? yt({}, _.ALLOWED_ATTR, Et) : Gt, _t = ri(_, "ALLOWED_NAMESPACES") ? yt({}, _.ALLOWED_NAMESPACES, qa) : ct, Tt = ri(_, "ADD_URI_SAFE_ATTR") ? yt(Pi(kt), _.ADD_URI_SAFE_ATTR, Et) : kt, qt = ri(_, "ADD_DATA_URI_TAGS") ? yt(Pi(fe), _.ADD_DATA_URI_TAGS, Et) : fe, pt = ri(_, "FORBID_CONTENTS") ? yt({}, _.FORBID_CONTENTS, Et) : It, Dt = ri(_, "FORBID_TAGS") ? yt({}, _.FORBID_TAGS, Et) : Pi({}), zt = ri(_, "FORBID_ATTR") ? yt({}, _.FORBID_ATTR, Et) : Pi({}), I = ri(_, "USE_PROFILES") ? _.USE_PROFILES : !1, Nt = _.ALLOW_ARIA_ATTR !== !1, Ht = _.ALLOW_DATA_ATTR !== !1, Z = _.ALLOW_UNKNOWN_PROTOCOLS || !1, ht = _.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ct = _.SAFE_FOR_TEMPLATES || !1, St = _.SAFE_FOR_XML !== !1, Ft = _.WHOLE_DOCUMENT || !1, ae = _.RETURN_DOM || !1, he = _.RETURN_DOM_FRAGMENT || !1, Fe = _.RETURN_TRUSTED_TYPE || !1, He = _.FORCE_BODY || !1, de = _.SANITIZE_DOM !== !1, k = _.SANITIZE_NAMED_PROPS || !1, j = _.KEEP_CONTENT !== !1, N = _.IN_PLACE || !1, Wt = _.ALLOWED_URI_REGEXP || F0, H = _.NAMESPACE || B, jt = _.MATHML_TEXT_INTEGRATION_POINTS || jt, Qt = _.HTML_INTEGRATION_POINTS || Qt, nt = _.CUSTOM_ELEMENT_HANDLING || {}, _.CUSTOM_ELEMENT_HANDLING && ki(_.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (nt.tagNameCheck = _.CUSTOM_ELEMENT_HANDLING.tagNameCheck), _.CUSTOM_ELEMENT_HANDLING && ki(_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (nt.attributeNameCheck = _.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), _.CUSTOM_ELEMENT_HANDLING && typeof _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (nt.allowCustomizedBuiltInElements = _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ct && (Ht = !1), he && (ae = !0), I && (vt = yt({}, tf), xt = [], I.html === !0 && (yt(vt, Jd), yt(xt, ef)), I.svg === !0 && (yt(vt, Ua), yt(xt, Ka), yt(xt, zo)), I.svgFilters === !0 && (yt(vt, Ga), yt(xt, Ka), yt(xt, zo)), I.mathMl === !0 && (yt(vt, Ya), yt(xt, nf), yt(xt, zo))), _.ADD_TAGS && (vt === Ut && (vt = Pi(vt)), yt(vt, _.ADD_TAGS, Et)), _.ADD_ATTR && (xt === Gt && (xt = Pi(xt)), yt(xt, _.ADD_ATTR, Et)), _.ADD_URI_SAFE_ATTR && yt(Tt, _.ADD_URI_SAFE_ATTR, Et), _.FORBID_CONTENTS && (pt === It && (pt = Pi(pt)), yt(pt, _.FORBID_CONTENTS, Et)), j && (vt["#text"] = !0), Ft && yt(vt, ["html", "head", "body"]), vt.table && (yt(vt, ["tbody"]), delete Dt.tbody), _.TRUSTED_TYPES_POLICY) {
11718
- if (typeof _.TRUSTED_TYPES_POLICY.createHTML != "function")
11716
+ let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
11717
+ if (!(Te && Te === C)) {
11718
+ if ((!C || typeof C != "object") && (C = {}), C = Pi(C), hi = // eslint-disable-next-line unicorn/prefer-includes
11719
+ ii.indexOf(C.PARSER_MEDIA_TYPE) === -1 ? qi : C.PARSER_MEDIA_TYPE, Et = hi === "application/xhtml+xml" ? qa : Uo, vt = ri(C, "ALLOWED_TAGS") ? yt({}, C.ALLOWED_TAGS, Et) : Ut, xt = ri(C, "ALLOWED_ATTR") ? yt({}, C.ALLOWED_ATTR, Et) : Gt, _t = ri(C, "ALLOWED_NAMESPACES") ? yt({}, C.ALLOWED_NAMESPACES, qa) : ct, Tt = ri(C, "ADD_URI_SAFE_ATTR") ? yt(Pi(kt), C.ADD_URI_SAFE_ATTR, Et) : kt, qt = ri(C, "ADD_DATA_URI_TAGS") ? yt(Pi(fe), C.ADD_DATA_URI_TAGS, Et) : fe, pt = ri(C, "FORBID_CONTENTS") ? yt({}, C.FORBID_CONTENTS, Et) : It, Dt = ri(C, "FORBID_TAGS") ? yt({}, C.FORBID_TAGS, Et) : Pi({}), zt = ri(C, "FORBID_ATTR") ? yt({}, C.FORBID_ATTR, Et) : Pi({}), R = ri(C, "USE_PROFILES") ? C.USE_PROFILES : !1, Nt = C.ALLOW_ARIA_ATTR !== !1, Ht = C.ALLOW_DATA_ATTR !== !1, Z = C.ALLOW_UNKNOWN_PROTOCOLS || !1, ht = C.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ct = C.SAFE_FOR_TEMPLATES || !1, St = C.SAFE_FOR_XML !== !1, Ft = C.WHOLE_DOCUMENT || !1, ae = C.RETURN_DOM || !1, he = C.RETURN_DOM_FRAGMENT || !1, Fe = C.RETURN_TRUSTED_TYPE || !1, He = C.FORCE_BODY || !1, de = C.SANITIZE_DOM !== !1, k = C.SANITIZE_NAMED_PROPS || !1, $ = C.KEEP_CONTENT !== !1, N = C.IN_PLACE || !1, Wt = C.ALLOWED_URI_REGEXP || F0, j = C.NAMESPACE || B, jt = C.MATHML_TEXT_INTEGRATION_POINTS || jt, Qt = C.HTML_INTEGRATION_POINTS || Qt, nt = C.CUSTOM_ELEMENT_HANDLING || {}, C.CUSTOM_ELEMENT_HANDLING && ki(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (nt.tagNameCheck = C.CUSTOM_ELEMENT_HANDLING.tagNameCheck), C.CUSTOM_ELEMENT_HANDLING && ki(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (nt.attributeNameCheck = C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), C.CUSTOM_ELEMENT_HANDLING && typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (nt.allowCustomizedBuiltInElements = C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ct && (Ht = !1), he && (ae = !0), R && (vt = yt({}, tf), xt = [], R.html === !0 && (yt(vt, Jd), yt(xt, ef)), R.svg === !0 && (yt(vt, Ua), yt(xt, Ka), yt(xt, zo)), R.svgFilters === !0 && (yt(vt, Ga), yt(xt, Ka), yt(xt, zo)), R.mathMl === !0 && (yt(vt, Ya), yt(xt, nf), yt(xt, zo))), C.ADD_TAGS && (vt === Ut && (vt = Pi(vt)), yt(vt, C.ADD_TAGS, Et)), C.ADD_ATTR && (xt === Gt && (xt = Pi(xt)), yt(xt, C.ADD_ATTR, Et)), C.ADD_URI_SAFE_ATTR && yt(Tt, C.ADD_URI_SAFE_ATTR, Et), C.FORBID_CONTENTS && (pt === It && (pt = Pi(pt)), yt(pt, C.FORBID_CONTENTS, Et)), $ && (vt["#text"] = !0), Ft && yt(vt, ["html", "head", "body"]), vt.table && (yt(vt, ["tbody"]), delete Dt.tbody), C.TRUSTED_TYPES_POLICY) {
11720
+ if (typeof C.TRUSTED_TYPES_POLICY.createHTML != "function")
11719
11721
  throw Tr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
11720
- if (typeof _.TRUSTED_TYPES_POLICY.createScriptURL != "function")
11722
+ if (typeof C.TRUSTED_TYPES_POLICY.createScriptURL != "function")
11721
11723
  throw Tr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
11722
- m = _.TRUSTED_TYPES_POLICY, C = m.createHTML("");
11724
+ m = C.TRUSTED_TYPES_POLICY, _ = m.createHTML("");
11723
11725
  } else
11724
- m === void 0 && (m = Yx(f, r)), m !== null && typeof C == "string" && (C = m.createHTML(""));
11725
- Le && Le(_), Te = _;
11726
+ m === void 0 && (m = Yx(f, r)), m !== null && typeof _ == "string" && (_ = m.createHTML(""));
11727
+ Le && Le(C), Te = C;
11726
11728
  }
11727
- }, pr = yt({}, [...Ua, ...Ga, ...Ix]), un = yt({}, [...Ya, ...Rx]), ga = function(_) {
11728
- let O = w(_);
11729
+ }, pr = yt({}, [...Ua, ...Ga, ...Ix]), un = yt({}, [...Ya, ...Rx]), ga = function(C) {
11730
+ let O = w(C);
11729
11731
  (!O || !O.tagName) && (O = {
11730
- namespaceURI: H,
11732
+ namespaceURI: j,
11731
11733
  tagName: "template"
11732
11734
  });
11733
- const Y = Uo(_.tagName), $t = Uo(O.tagName);
11734
- return _t[_.namespaceURI] ? _.namespaceURI === ee ? O.namespaceURI === B ? Y === "svg" : O.namespaceURI === Lt ? Y === "svg" && ($t === "annotation-xml" || jt[$t]) : !!pr[Y] : _.namespaceURI === Lt ? O.namespaceURI === B ? Y === "math" : O.namespaceURI === ee ? Y === "math" && Qt[$t] : !!un[Y] : _.namespaceURI === B ? O.namespaceURI === ee && !Qt[$t] || O.namespaceURI === Lt && !jt[$t] ? !1 : !un[Y] && (ui[Y] || !pr[Y]) : !!(hi === "application/xhtml+xml" && _t[_.namespaceURI]) : !1;
11735
- }, je = function(_) {
11735
+ const Y = Uo(C.tagName), $t = Uo(O.tagName);
11736
+ return _t[C.namespaceURI] ? C.namespaceURI === ee ? O.namespaceURI === B ? Y === "svg" : O.namespaceURI === Lt ? Y === "svg" && ($t === "annotation-xml" || jt[$t]) : !!pr[Y] : C.namespaceURI === Lt ? O.namespaceURI === B ? Y === "math" : O.namespaceURI === ee ? Y === "math" && Qt[$t] : !!un[Y] : C.namespaceURI === B ? O.namespaceURI === ee && !Qt[$t] || O.namespaceURI === Lt && !jt[$t] ? !1 : !un[Y] && (ui[Y] || !pr[Y]) : !!(hi === "application/xhtml+xml" && _t[C.namespaceURI]) : !1;
11737
+ }, je = function(C) {
11736
11738
  _r(e.removed, {
11737
- element: _
11739
+ element: C
11738
11740
  });
11739
11741
  try {
11740
- w(_).removeChild(_);
11742
+ w(C).removeChild(C);
11741
11743
  } catch {
11742
- g(_);
11744
+ g(C);
11743
11745
  }
11744
- }, Ui = function(_, O) {
11746
+ }, Ui = function(C, O) {
11745
11747
  try {
11746
11748
  _r(e.removed, {
11747
- attribute: O.getAttributeNode(_),
11749
+ attribute: O.getAttributeNode(C),
11748
11750
  from: O
11749
11751
  });
11750
11752
  } catch {
@@ -11753,7 +11755,7 @@ function P0() {
11753
11755
  from: O
11754
11756
  });
11755
11757
  }
11756
- if (O.removeAttribute(_), _ === "is")
11758
+ if (O.removeAttribute(C), C === "is")
11757
11759
  if (ae || he)
11758
11760
  try {
11759
11761
  je(O);
@@ -11761,82 +11763,82 @@ function P0() {
11761
11763
  }
11762
11764
  else
11763
11765
  try {
11764
- O.setAttribute(_, "");
11766
+ O.setAttribute(C, "");
11765
11767
  } catch {
11766
11768
  }
11767
- }, W = function(_) {
11769
+ }, W = function(C) {
11768
11770
  let O = null, Y = null;
11769
11771
  if (He)
11770
- _ = "<remove></remove>" + _;
11772
+ C = "<remove></remove>" + C;
11771
11773
  else {
11772
- const ne = Zd(_, /^[\r\n\t ]+/);
11774
+ const ne = Zd(C, /^[\r\n\t ]+/);
11773
11775
  Y = ne && ne[0];
11774
11776
  }
11775
- hi === "application/xhtml+xml" && H === B && (_ = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + _ + "</body></html>");
11776
- const $t = m ? m.createHTML(_) : _;
11777
- if (H === B)
11777
+ hi === "application/xhtml+xml" && j === B && (C = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + C + "</body></html>");
11778
+ const $t = m ? m.createHTML(C) : C;
11779
+ if (j === B)
11778
11780
  try {
11779
11781
  O = new h().parseFromString($t, hi);
11780
11782
  } catch {
11781
11783
  }
11782
11784
  if (!O || !O.documentElement) {
11783
- O = b.createDocument(H, "template", null);
11785
+ O = x.createDocument(j, "template", null);
11784
11786
  try {
11785
- O.documentElement.innerHTML = J ? C : $t;
11787
+ O.documentElement.innerHTML = J ? _ : $t;
11786
11788
  } catch {
11787
11789
  }
11788
11790
  }
11789
11791
  const pe = O.body || O.documentElement;
11790
- return _ && Y && pe.insertBefore(i.createTextNode(Y), pe.childNodes[0] || null), H === B ? L.call(O, Ft ? "html" : "body")[0] : Ft ? O.documentElement : pe;
11791
- }, lt = function(_) {
11792
+ return C && Y && pe.insertBefore(i.createTextNode(Y), pe.childNodes[0] || null), j === B ? L.call(O, Ft ? "html" : "body")[0] : Ft ? O.documentElement : pe;
11793
+ }, lt = function(C) {
11792
11794
  return T.call(
11793
- _.ownerDocument || _,
11794
- _,
11795
+ C.ownerDocument || C,
11796
+ C,
11795
11797
  // eslint-disable-next-line no-bitwise
11796
11798
  u.SHOW_ELEMENT | u.SHOW_COMMENT | u.SHOW_TEXT | u.SHOW_PROCESSING_INSTRUCTION | u.SHOW_CDATA_SECTION,
11797
11799
  null
11798
11800
  );
11799
- }, ie = function(_) {
11800
- return _ instanceof d && (typeof _.nodeName != "string" || typeof _.textContent != "string" || typeof _.removeChild != "function" || !(_.attributes instanceof c) || typeof _.removeAttribute != "function" || typeof _.setAttribute != "function" || typeof _.namespaceURI != "string" || typeof _.insertBefore != "function" || typeof _.hasChildNodes != "function");
11801
- }, Se = function(_) {
11802
- return typeof a == "function" && _ instanceof a;
11801
+ }, ie = function(C) {
11802
+ return C instanceof d && (typeof C.nodeName != "string" || typeof C.textContent != "string" || typeof C.removeChild != "function" || !(C.attributes instanceof c) || typeof C.removeAttribute != "function" || typeof C.setAttribute != "function" || typeof C.namespaceURI != "string" || typeof C.insertBefore != "function" || typeof C.hasChildNodes != "function");
11803
+ }, Se = function(C) {
11804
+ return typeof a == "function" && C instanceof a;
11803
11805
  };
11804
- function le(K, _, O) {
11806
+ function le(K, C, O) {
11805
11807
  Do(K, (Y) => {
11806
- Y.call(e, _, O, Te);
11808
+ Y.call(e, C, O, Te);
11807
11809
  });
11808
11810
  }
11809
- const Gi = function(_) {
11811
+ const Gi = function(C) {
11810
11812
  let O = null;
11811
- if (le(R.beforeSanitizeElements, _, null), ie(_))
11812
- return je(_), !0;
11813
- const Y = Et(_.nodeName);
11814
- if (le(R.uponSanitizeElement, _, {
11813
+ if (le(I.beforeSanitizeElements, C, null), ie(C))
11814
+ return je(C), !0;
11815
+ const Y = Et(C.nodeName);
11816
+ if (le(I.uponSanitizeElement, C, {
11815
11817
  tagName: Y,
11816
11818
  allowedTags: vt
11817
- }), St && _.hasChildNodes() && !Se(_.firstElementChild) && ke(/<[/\w!]/g, _.innerHTML) && ke(/<[/\w!]/g, _.textContent) || _.nodeType === kr.progressingInstruction || St && _.nodeType === kr.comment && ke(/<[/\w]/g, _.data))
11818
- return je(_), !0;
11819
+ }), St && C.hasChildNodes() && !Se(C.firstElementChild) && ke(/<[/\w!]/g, C.innerHTML) && ke(/<[/\w!]/g, C.textContent) || C.nodeType === kr.progressingInstruction || St && C.nodeType === kr.comment && ke(/<[/\w]/g, C.data))
11820
+ return je(C), !0;
11819
11821
  if (!vt[Y] || Dt[Y]) {
11820
11822
  if (!Dt[Y] && mr(Y) && (nt.tagNameCheck instanceof RegExp && ke(nt.tagNameCheck, Y) || nt.tagNameCheck instanceof Function && nt.tagNameCheck(Y)))
11821
11823
  return !1;
11822
- if (j && !pt[Y]) {
11823
- const $t = w(_) || _.parentNode, pe = x(_) || _.childNodes;
11824
+ if ($ && !pt[Y]) {
11825
+ const $t = w(C) || C.parentNode, pe = b(C) || C.childNodes;
11824
11826
  if (pe && $t) {
11825
11827
  const ne = pe.length;
11826
11828
  for (let Oe = ne - 1; Oe >= 0; --Oe) {
11827
11829
  const Ai = p(pe[Oe], !0);
11828
- Ai.__removalCount = (_.__removalCount || 0) + 1, $t.insertBefore(Ai, y(_));
11830
+ Ai.__removalCount = (C.__removalCount || 0) + 1, $t.insertBefore(Ai, y(C));
11829
11831
  }
11830
11832
  }
11831
11833
  }
11832
- return je(_), !0;
11834
+ return je(C), !0;
11833
11835
  }
11834
- return _ instanceof l && !ga(_) || (Y === "noscript" || Y === "noembed" || Y === "noframes") && ke(/<\/no(script|embed|frames)/i, _.innerHTML) ? (je(_), !0) : (Ct && _.nodeType === kr.text && (O = _.textContent, Do([q, U, wt], ($t) => {
11836
+ return C instanceof l && !ga(C) || (Y === "noscript" || Y === "noembed" || Y === "noframes") && ke(/<\/no(script|embed|frames)/i, C.innerHTML) ? (je(C), !0) : (Ct && C.nodeType === kr.text && (O = C.textContent, Do([q, U, wt], ($t) => {
11835
11837
  O = wr(O, $t, " ");
11836
- }), _.textContent !== O && (_r(e.removed, {
11837
- element: _.cloneNode()
11838
- }), _.textContent = O)), le(R.afterSanitizeElements, _, null), !1);
11839
- }, Yi = function(_, O, Y) {
11838
+ }), C.textContent !== O && (_r(e.removed, {
11839
+ element: C.cloneNode()
11840
+ }), C.textContent = O)), le(I.afterSanitizeElements, C, null), !1);
11841
+ }, Yi = function(C, O, Y) {
11840
11842
  if (de && (O === "id" || O === "name") && (Y in i || Y in fr))
11841
11843
  return !1;
11842
11844
  if (!(Ht && !zt[O] && ke(st, O))) {
@@ -11846,13 +11848,13 @@ function P0() {
11846
11848
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
11847
11849
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
11848
11850
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
11849
- !(mr(_) && (nt.tagNameCheck instanceof RegExp && ke(nt.tagNameCheck, _) || nt.tagNameCheck instanceof Function && nt.tagNameCheck(_)) && (nt.attributeNameCheck instanceof RegExp && ke(nt.attributeNameCheck, O) || nt.attributeNameCheck instanceof Function && nt.attributeNameCheck(O)) || // Alternative, second condition checks if it's an `is`-attribute, AND
11851
+ !(mr(C) && (nt.tagNameCheck instanceof RegExp && ke(nt.tagNameCheck, C) || nt.tagNameCheck instanceof Function && nt.tagNameCheck(C)) && (nt.attributeNameCheck instanceof RegExp && ke(nt.attributeNameCheck, O) || nt.attributeNameCheck instanceof Function && nt.attributeNameCheck(O)) || // Alternative, second condition checks if it's an `is`-attribute, AND
11850
11852
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
11851
11853
  O === "is" && nt.allowCustomizedBuiltInElements && (nt.tagNameCheck instanceof RegExp && ke(nt.tagNameCheck, Y) || nt.tagNameCheck instanceof Function && nt.tagNameCheck(Y)))
11852
11854
  ) return !1;
11853
11855
  } else if (!Tt[O]) {
11854
11856
  if (!ke(Wt, wr(Y, at, ""))) {
11855
- if (!((O === "src" || O === "xlink:href" || O === "href") && _ !== "script" && Ox(Y, "data:") === 0 && qt[_])) {
11857
+ if (!((O === "src" || O === "xlink:href" || O === "href") && C !== "script" && Ox(Y, "data:") === 0 && qt[C])) {
11856
11858
  if (!(Z && !ke(gt, wr(Y, at, "")))) {
11857
11859
  if (Y)
11858
11860
  return !1;
@@ -11863,14 +11865,14 @@ function P0() {
11863
11865
  }
11864
11866
  }
11865
11867
  return !0;
11866
- }, mr = function(_) {
11867
- return _ !== "annotation-xml" && Zd(_, bt);
11868
- }, gr = function(_) {
11869
- le(R.beforeSanitizeAttributes, _, null);
11868
+ }, mr = function(C) {
11869
+ return C !== "annotation-xml" && Zd(C, bt);
11870
+ }, gr = function(C) {
11871
+ le(I.beforeSanitizeAttributes, C, null);
11870
11872
  const {
11871
11873
  attributes: O
11872
- } = _;
11873
- if (!O || ie(_))
11874
+ } = C;
11875
+ if (!O || ie(C))
11874
11876
  return;
11875
11877
  const Y = {
11876
11878
  attrName: "",
@@ -11887,26 +11889,26 @@ function P0() {
11887
11889
  value: Ai
11888
11890
  } = pe, vr = Et(ne), va = Ai;
11889
11891
  let me = ne === "value" ? va : Px(va);
11890
- if (Y.attrName = vr, Y.attrValue = me, Y.keepAttr = !0, Y.forceKeepAttr = void 0, le(R.uponSanitizeAttribute, _, Y), me = Y.attrValue, k && (vr === "id" || vr === "name") && (Ui(ne, _), me = F + me), St && ke(/((--!?|])>)|<\/(style|title)/i, me)) {
11891
- Ui(ne, _);
11892
+ if (Y.attrName = vr, Y.attrValue = me, Y.keepAttr = !0, Y.forceKeepAttr = void 0, le(I.uponSanitizeAttribute, C, Y), me = Y.attrValue, k && (vr === "id" || vr === "name") && (Ui(ne, C), me = F + me), St && ke(/((--!?|])>)|<\/(style|title)/i, me)) {
11893
+ Ui(ne, C);
11892
11894
  continue;
11893
11895
  }
11894
11896
  if (Y.forceKeepAttr)
11895
11897
  continue;
11896
11898
  if (!Y.keepAttr) {
11897
- Ui(ne, _);
11899
+ Ui(ne, C);
11898
11900
  continue;
11899
11901
  }
11900
11902
  if (!ht && ke(/\/>/i, me)) {
11901
- Ui(ne, _);
11903
+ Ui(ne, C);
11902
11904
  continue;
11903
11905
  }
11904
11906
  Ct && Do([q, U, wt], (vu) => {
11905
11907
  me = wr(me, vu, " ");
11906
11908
  });
11907
- const gu = Et(_.nodeName);
11909
+ const gu = Et(C.nodeName);
11908
11910
  if (!Yi(gu, vr, me)) {
11909
- Ui(ne, _);
11911
+ Ui(ne, C);
11910
11912
  continue;
11911
11913
  }
11912
11914
  if (m && typeof f == "object" && typeof f.getAttributeType == "function" && !Oe)
@@ -11922,21 +11924,21 @@ function P0() {
11922
11924
  }
11923
11925
  if (me !== va)
11924
11926
  try {
11925
- Oe ? _.setAttributeNS(Oe, ne, me) : _.setAttribute(ne, me), ie(_) ? je(_) : Qd(e.removed);
11927
+ Oe ? C.setAttributeNS(Oe, ne, me) : C.setAttribute(ne, me), ie(C) ? je(C) : Qd(e.removed);
11926
11928
  } catch {
11927
- Ui(ne, _);
11929
+ Ui(ne, C);
11928
11930
  }
11929
11931
  }
11930
- le(R.afterSanitizeAttributes, _, null);
11931
- }, Ao = function K(_) {
11932
+ le(I.afterSanitizeAttributes, C, null);
11933
+ }, Ao = function K(C) {
11932
11934
  let O = null;
11933
- const Y = lt(_);
11934
- for (le(R.beforeSanitizeShadowDOM, _, null); O = Y.nextNode(); )
11935
- le(R.uponSanitizeShadowNode, O, null), Gi(O), gr(O), O.content instanceof o && K(O.content);
11936
- le(R.afterSanitizeShadowDOM, _, null);
11935
+ const Y = lt(C);
11936
+ for (le(I.beforeSanitizeShadowDOM, C, null); O = Y.nextNode(); )
11937
+ le(I.uponSanitizeShadowNode, O, null), Gi(O), gr(O), O.content instanceof o && K(O.content);
11938
+ le(I.afterSanitizeShadowDOM, C, null);
11937
11939
  };
11938
11940
  return e.sanitize = function(K) {
11939
- let _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, O = null, Y = null, $t = null, pe = null;
11941
+ let C = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, O = null, Y = null, $t = null, pe = null;
11940
11942
  if (J = !K, J && (K = "<!-->"), typeof K != "string" && !Se(K))
11941
11943
  if (typeof K.toString == "function") {
11942
11944
  if (K = K.toString(), typeof K != "string")
@@ -11945,7 +11947,7 @@ function P0() {
11945
11947
  throw Tr("toString is not a function");
11946
11948
  if (!e.isSupported)
11947
11949
  return K;
11948
- if (we || ni(_), e.removed = [], typeof K == "string" && (N = !1), N) {
11950
+ if (we || ni(C), e.removed = [], typeof K == "string" && (N = !1), N) {
11949
11951
  if (K.nodeName) {
11950
11952
  const Ai = Et(K.nodeName);
11951
11953
  if (!vt[Ai] || Dt[Ai])
@@ -11958,7 +11960,7 @@ function P0() {
11958
11960
  K.indexOf("<") === -1)
11959
11961
  return m && Fe ? m.createHTML(K) : K;
11960
11962
  if (O = W(K), !O)
11961
- return ae ? null : Fe ? C : "";
11963
+ return ae ? null : Fe ? _ : "";
11962
11964
  }
11963
11965
  O && He && je(O.firstChild);
11964
11966
  const ne = lt(N ? K : O);
@@ -11972,7 +11974,7 @@ function P0() {
11972
11974
  pe.appendChild(O.firstChild);
11973
11975
  else
11974
11976
  pe = O;
11975
- return (xt.shadowroot || xt.shadowrootmode) && (pe = $.call(n, pe, !0)), pe;
11977
+ return (xt.shadowroot || xt.shadowrootmode) && (pe = H.call(n, pe, !0)), pe;
11976
11978
  }
11977
11979
  let Oe = Ft ? O.outerHTML : O.innerHTML;
11978
11980
  return Ft && vt["!doctype"] && O.ownerDocument && O.ownerDocument.doctype && O.ownerDocument.doctype.name && ke(O0, O.ownerDocument.doctype.name) && (Oe = "<!DOCTYPE " + O.ownerDocument.doctype.name + `>
@@ -11984,22 +11986,22 @@ function P0() {
11984
11986
  ni(K), we = !0;
11985
11987
  }, e.clearConfig = function() {
11986
11988
  Te = null, we = !1;
11987
- }, e.isValidAttribute = function(K, _, O) {
11989
+ }, e.isValidAttribute = function(K, C, O) {
11988
11990
  Te || ni({});
11989
- const Y = Et(K), $t = Et(_);
11991
+ const Y = Et(K), $t = Et(C);
11990
11992
  return Yi(Y, $t, O);
11991
- }, e.addHook = function(K, _) {
11992
- typeof _ == "function" && _r(R[K], _);
11993
- }, e.removeHook = function(K, _) {
11994
- if (_ !== void 0) {
11995
- const O = Mx(R[K], _);
11996
- return O === -1 ? void 0 : Fx(R[K], O, 1)[0];
11997
- }
11998
- return Qd(R[K]);
11993
+ }, e.addHook = function(K, C) {
11994
+ typeof C == "function" && _r(I[K], C);
11995
+ }, e.removeHook = function(K, C) {
11996
+ if (C !== void 0) {
11997
+ const O = Mx(I[K], C);
11998
+ return O === -1 ? void 0 : Fx(I[K], O, 1)[0];
11999
+ }
12000
+ return Qd(I[K]);
11999
12001
  }, e.removeHooks = function(K) {
12000
- R[K] = [];
12002
+ I[K] = [];
12001
12003
  }, e.removeAllHooks = function() {
12002
- R = of();
12004
+ I = of();
12003
12005
  }, e;
12004
12006
  }
12005
12007
  var ji = P0();
@@ -12286,10 +12288,10 @@ function _7(t, e) {
12286
12288
  for (var o = r.length, s = new Array(o), a = new Array(o), l = new Array(o), u = 0; u < o; ++u) {
12287
12289
  var c = n[u], d = r[u], h = d.length, f = w7(t.call(c, c && c.__data__, u, n)), v = f.length, p = a[u] = new Array(v), g = s[u] = new Array(v), y = l[u] = new Array(h);
12288
12290
  i(c, d, p, g, y, f, e);
12289
- for (var x = 0, w = 0, m, C; x < v; ++x)
12290
- if (m = p[x]) {
12291
- for (x >= w && (w = x + 1); !(C = g[w]) && ++w < v; ) ;
12292
- m._next = C || null;
12291
+ for (var b = 0, w = 0, m, _; b < v; ++b)
12292
+ if (m = p[b]) {
12293
+ for (b >= w && (w = b + 1); !(_ = g[w]) && ++w < v; ) ;
12294
+ m._next = _ || null;
12293
12295
  }
12294
12296
  }
12295
12297
  return s = new We(s, n), s._enter = a, s._exit = l, s;
@@ -14977,8 +14979,8 @@ const na = new P_({ r: 0, g: 0, b: 0, a: 0 }, "transparent"), jn = {
14977
14979
  e[r] && (n[r] = i[r] + e[r]);
14978
14980
  return xm(t, n);
14979
14981
  }, I_ = (t, e, i = 50) => {
14980
- const { r: n, g: r, b: o, a: s } = Ci.parse(t), { r: a, g: l, b: u, a: c } = Ci.parse(e), d = i / 100, h = d * 2 - 1, f = s - c, p = ((h * f === -1 ? h : (h + f) / (1 + h * f)) + 1) / 2, g = 1 - p, y = n * p + a * g, x = r * p + l * g, w = o * p + u * g, m = s * d + c * (1 - d);
14981
- return Wr(y, x, w, m);
14982
+ const { r: n, g: r, b: o, a: s } = Ci.parse(t), { r: a, g: l, b: u, a: c } = Ci.parse(e), d = i / 100, h = d * 2 - 1, f = s - c, p = ((h * f === -1 ? h : (h + f) / (1 + h * f)) + 1) / 2, g = 1 - p, y = n * p + a * g, b = r * p + l * g, w = o * p + u * g, m = s * d + c * (1 - d);
14983
+ return Wr(y, b, w, m);
14982
14984
  }, V = (t, e = 100) => {
14983
14985
  const i = Ci.parse(t);
14984
14986
  return i.r = 255 - i.r, i.g = 255 - i.g, i.b = 255 - i.b, I_(i, t, e);
@@ -15638,17 +15640,17 @@ function kS(t) {
15638
15640
  return CS(Jo("", null, null, null, [""], t = xS(t), 0, [0], t));
15639
15641
  }
15640
15642
  function Jo(t, e, i, n, r, o, s, a, l) {
15641
- for (var u = 0, c = 0, d = s, h = 0, f = 0, v = 0, p = 1, g = 1, y = 1, x = 0, w = "", m = r, C = o, b = n, T = w; g; )
15642
- switch (v = x, x = ai()) {
15643
+ for (var u = 0, c = 0, d = s, h = 0, f = 0, v = 0, p = 1, g = 1, y = 1, b = 0, w = "", m = r, _ = o, x = n, T = w; g; )
15644
+ switch (v = b, b = ai()) {
15643
15645
  case 40:
15644
15646
  if (v != 108 && $n(T, d - 1) == 58) {
15645
- gS(T += Qo(el(x), "&", "&\f"), "&\f", Vm(u ? a[u - 1] : 0)) != -1 && (y = -1);
15647
+ gS(T += Qo(el(b), "&", "&\f"), "&\f", Vm(u ? a[u - 1] : 0)) != -1 && (y = -1);
15646
15648
  break;
15647
15649
  }
15648
15650
  case 34:
15649
15651
  case 39:
15650
15652
  case 91:
15651
- T += el(x);
15653
+ T += el(b);
15652
15654
  break;
15653
15655
  case 9:
15654
15656
  case 10:
@@ -15674,7 +15676,7 @@ function Jo(t, e, i, n, r, o, s, a, l) {
15674
15676
  case 125 * p:
15675
15677
  case 59:
15676
15678
  case 0:
15677
- switch (x) {
15679
+ switch (b) {
15678
15680
  case 0:
15679
15681
  case 125:
15680
15682
  g = 0;
@@ -15684,9 +15686,9 @@ function Jo(t, e, i, n, r, o, s, a, l) {
15684
15686
  case 59:
15685
15687
  T += ";";
15686
15688
  default:
15687
- if (No(b = Hf(T, e, i, u, c, r, a, w, m = [], C = [], d, o), o), x === 123)
15689
+ if (No(x = Hf(T, e, i, u, c, r, a, w, m = [], _ = [], d, o), o), b === 123)
15688
15690
  if (c === 0)
15689
- Jo(T, e, b, b, m, o, d, a, C);
15691
+ Jo(T, e, x, x, m, o, d, a, _);
15690
15692
  else {
15691
15693
  switch (h) {
15692
15694
  case 99:
@@ -15699,7 +15701,7 @@ function Jo(t, e, i, n, r, o, s, a, l) {
15699
15701
  case 109:
15700
15702
  case 115:
15701
15703
  }
15702
- c ? Jo(t, b, b, n && No(Hf(t, b, b, 0, 0, r, a, w, r, m = [], d, C), C), r, C, d, a, n ? m : C) : Jo(T, b, b, b, [""], C, 0, a, C);
15704
+ c ? Jo(t, x, x, n && No(Hf(t, x, x, 0, 0, r, a, w, r, m = [], d, _), _), r, _, d, a, n ? m : _) : Jo(T, x, x, x, [""], _, 0, a, _);
15703
15705
  }
15704
15706
  }
15705
15707
  u = c = f = 0, p = y = 1, w = T = "", d = s;
@@ -15708,12 +15710,12 @@ function Jo(t, e, i, n, r, o, s, a, l) {
15708
15710
  d = 1 + fi(T), f = v;
15709
15711
  default:
15710
15712
  if (p < 1) {
15711
- if (x == 123)
15713
+ if (b == 123)
15712
15714
  --p;
15713
- else if (x == 125 && p++ == 0 && bS() == 125)
15715
+ else if (b == 125 && p++ == 0 && bS() == 125)
15714
15716
  continue;
15715
15717
  }
15716
- switch (T += Zc(x), x * p) {
15718
+ switch (T += Zc(b), b * p) {
15717
15719
  case 38:
15718
15720
  y = c > 0 ? 1 : (T += "\f", -1);
15719
15721
  break;
@@ -15721,7 +15723,7 @@ function Jo(t, e, i, n, r, o, s, a, l) {
15721
15723
  a[u++] = (fi(T) - 1) * y, y = 1;
15722
15724
  break;
15723
15725
  case 64:
15724
- Ji() === 45 && (T += el(ai())), h = Ji(), c = d = fi(w = T += SS(Zo())), x++;
15726
+ Ji() === 45 && (T += el(ai())), h = Ji(), c = d = fi(w = T += SS(Zo())), b++;
15725
15727
  break;
15726
15728
  case 45:
15727
15729
  v === 45 && fi(T) == 2 && (p = 0);
@@ -15731,8 +15733,8 @@ function Jo(t, e, i, n, r, o, s, a, l) {
15731
15733
  }
15732
15734
  function Hf(t, e, i, n, r, o, s, a, l, u, c, d) {
15733
15735
  for (var h = r - 1, f = r === 0 ? o : [""], v = vS(f), p = 0, g = 0, y = 0; p < n; ++p)
15734
- for (var x = 0, w = Jn(t, h + 1, h = Vm(g = s[p])), m = t; x < v; ++x)
15735
- (m = Nm(g > 0 ? f[x] + " " + w : Qo(w, /&\f/g, f[x]))) && (l[y++] = m);
15736
+ for (var b = 0, w = Jn(t, h + 1, h = Vm(g = s[p])), m = t; b < v; ++b)
15737
+ (m = Nm(g > 0 ? f[b] + " " + w : Qo(w, /&\f/g, f[b]))) && (l[y++] = m);
15736
15738
  return Jc(t, e, i, r === 0 ? Im : a, l, u, c, d);
15737
15739
  }
15738
15740
  function AS(t, e, i, n) {
@@ -17155,10 +17157,10 @@ const nu = To(
17155
17157
  for (const p of a) {
17156
17158
  const g = Pk();
17157
17159
  g.text = p || vk;
17158
- const y = Dk(c, g).style("font-size", o).style("font-weight", r).style("font-family", h), x = (y._groups || y)[0][0].getBBox();
17159
- if (x.width === 0 && x.height === 0)
17160
+ const y = Dk(c, g).style("font-size", o).style("font-weight", r).style("font-family", h), b = (y._groups || y)[0][0].getBBox();
17161
+ if (b.width === 0 && b.height === 0)
17160
17162
  throw new Error("svg element not in render tree");
17161
- v.width = Math.round(Math.max(v.width, x.width)), f = Math.round(x.height), v.height += f, v.lineHeight = Math.round(Math.max(v.lineHeight, f));
17163
+ v.width = Math.round(Math.max(v.width, b.width)), f = Math.round(b.height), v.height += f, v.lineHeight = Math.round(Math.max(v.lineHeight, f));
17162
17164
  }
17163
17165
  l.push(v);
17164
17166
  }
@@ -17265,7 +17267,7 @@ const pa = (t, e) => {
17265
17267
  }, o2 = (t) => {
17266
17268
  t && (t.lazyLoadedDiagrams || t.loadExternalDiagramsAtStartup) && Kk("LAZY_LOAD_DEPRECATED");
17267
17269
  }, s2 = "c4", Xk = (t) => /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t), Qk = async () => {
17268
- const { diagram: t } = await import("./c4Diagram-3d4e48cf-DBY6dYfi.mjs");
17270
+ const { diagram: t } = await import("./c4Diagram-3d4e48cf-BYdAU8HJ.mjs");
17269
17271
  return { id: s2, diagram: t };
17270
17272
  }, Zk = {
17271
17273
  id: s2,
@@ -17275,7 +17277,7 @@ const pa = (t, e) => {
17275
17277
  var i, n;
17276
17278
  return ((i = e == null ? void 0 : e.flowchart) == null ? void 0 : i.defaultRenderer) === "dagre-wrapper" || ((n = e == null ? void 0 : e.flowchart) == null ? void 0 : n.defaultRenderer) === "elk" ? !1 : /^\s*graph/.test(t);
17277
17279
  }, eA = async () => {
17278
- const { diagram: t } = await import("./flowDiagram-66a62f08-DalCgmrg.mjs");
17280
+ const { diagram: t } = await import("./flowDiagram-66a62f08-DyFcnq2X.mjs");
17279
17281
  return { id: a2, diagram: t };
17280
17282
  }, iA = {
17281
17283
  id: a2,
@@ -17285,70 +17287,70 @@ const pa = (t, e) => {
17285
17287
  var i, n, r;
17286
17288
  return ((i = e == null ? void 0 : e.flowchart) == null ? void 0 : i.defaultRenderer) === "dagre-d3" || ((n = e == null ? void 0 : e.flowchart) == null ? void 0 : n.defaultRenderer) === "elk" ? !1 : /^\s*graph/.test(t) && ((r = e == null ? void 0 : e.flowchart) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" ? !0 : /^\s*flowchart/.test(t);
17287
17289
  }, oA = async () => {
17288
- const { diagram: t } = await import("./flowDiagram-v2-96b9c2cf-CsX812_d.mjs");
17290
+ const { diagram: t } = await import("./flowDiagram-v2-96b9c2cf-ChJHWwBC.mjs");
17289
17291
  return { id: l2, diagram: t };
17290
17292
  }, sA = {
17291
17293
  id: l2,
17292
17294
  detector: rA,
17293
17295
  loader: oA
17294
17296
  }, aA = sA, c2 = "er", lA = (t) => /^\s*erDiagram/.test(t), cA = async () => {
17295
- const { diagram: t } = await import("./erDiagram-9861fffd-cZK-bNAM.mjs");
17297
+ const { diagram: t } = await import("./erDiagram-9861fffd-BmlT4hhx.mjs");
17296
17298
  return { id: c2, diagram: t };
17297
17299
  }, uA = {
17298
17300
  id: c2,
17299
17301
  detector: lA,
17300
17302
  loader: cA
17301
17303
  }, hA = uA, u2 = "gitGraph", dA = (t) => /^\s*gitGraph/.test(t), fA = async () => {
17302
- const { diagram: t } = await import("./gitGraphDiagram-72cf32ee-er7l1Vwu.mjs");
17304
+ const { diagram: t } = await import("./gitGraphDiagram-72cf32ee-CW2uFSsY.mjs");
17303
17305
  return { id: u2, diagram: t };
17304
17306
  }, pA = {
17305
17307
  id: u2,
17306
17308
  detector: dA,
17307
17309
  loader: fA
17308
17310
  }, mA = pA, h2 = "gantt", gA = (t) => /^\s*gantt/.test(t), vA = async () => {
17309
- const { diagram: t } = await import("./ganttDiagram-c361ad54-Cs4P9X7B.mjs");
17311
+ const { diagram: t } = await import("./ganttDiagram-c361ad54-C5u4iyvj.mjs");
17310
17312
  return { id: h2, diagram: t };
17311
17313
  }, yA = {
17312
17314
  id: h2,
17313
17315
  detector: gA,
17314
17316
  loader: vA
17315
17317
  }, bA = yA, d2 = "info", xA = (t) => /^\s*info/.test(t), CA = async () => {
17316
- const { diagram: t } = await import("./infoDiagram-f8f76790-CfS0AerJ.mjs");
17318
+ const { diagram: t } = await import("./infoDiagram-f8f76790-BGCDrqeA.mjs");
17317
17319
  return { id: d2, diagram: t };
17318
17320
  }, _A = {
17319
17321
  id: d2,
17320
17322
  detector: xA,
17321
17323
  loader: CA
17322
17324
  }, f2 = "pie", wA = (t) => /^\s*pie/.test(t), TA = async () => {
17323
- const { diagram: t } = await import("./pieDiagram-8a3498a8-zT5CvSpw.mjs");
17325
+ const { diagram: t } = await import("./pieDiagram-8a3498a8-CmeE8uvK.mjs");
17324
17326
  return { id: f2, diagram: t };
17325
17327
  }, SA = {
17326
17328
  id: f2,
17327
17329
  detector: wA,
17328
17330
  loader: TA
17329
17331
  }, p2 = "quadrantChart", kA = (t) => /^\s*quadrantChart/.test(t), AA = async () => {
17330
- const { diagram: t } = await import("./quadrantDiagram-120e2f19-DPJcxru3.mjs");
17332
+ const { diagram: t } = await import("./quadrantDiagram-120e2f19-CJzo-Yw6.mjs");
17331
17333
  return { id: p2, diagram: t };
17332
17334
  }, BA = {
17333
17335
  id: p2,
17334
17336
  detector: kA,
17335
17337
  loader: AA
17336
17338
  }, EA = BA, m2 = "xychart", LA = (t) => /^\s*xychart-beta/.test(t), MA = async () => {
17337
- const { diagram: t } = await import("./xychartDiagram-e933f94c-BR8JWdpv.mjs");
17339
+ const { diagram: t } = await import("./xychartDiagram-e933f94c-DAhUsssY.mjs");
17338
17340
  return { id: m2, diagram: t };
17339
17341
  }, FA = {
17340
17342
  id: m2,
17341
17343
  detector: LA,
17342
17344
  loader: MA
17343
17345
  }, OA = FA, g2 = "requirement", PA = (t) => /^\s*requirement(Diagram)?/.test(t), DA = async () => {
17344
- const { diagram: t } = await import("./requirementDiagram-deff3bca-CP6G_Zoz.mjs");
17346
+ const { diagram: t } = await import("./requirementDiagram-deff3bca-B_5dzDDR.mjs");
17345
17347
  return { id: g2, diagram: t };
17346
17348
  }, zA = {
17347
17349
  id: g2,
17348
17350
  detector: PA,
17349
17351
  loader: DA
17350
17352
  }, IA = zA, v2 = "sequence", RA = (t) => /^\s*sequenceDiagram/.test(t), VA = async () => {
17351
- const { diagram: t } = await import("./sequenceDiagram-704730f1-Czk1oC0y.mjs");
17353
+ const { diagram: t } = await import("./sequenceDiagram-704730f1-C_RcLhgs.mjs");
17352
17354
  return { id: v2, diagram: t };
17353
17355
  }, NA = {
17354
17356
  id: v2,
@@ -17358,7 +17360,7 @@ const pa = (t, e) => {
17358
17360
  var i;
17359
17361
  return ((i = e == null ? void 0 : e.class) == null ? void 0 : i.defaultRenderer) === "dagre-wrapper" ? !1 : /^\s*classDiagram/.test(t);
17360
17362
  }, $A = async () => {
17361
- const { diagram: t } = await import("./classDiagram-70f12bd4-RpyKqv0B.mjs");
17363
+ const { diagram: t } = await import("./classDiagram-70f12bd4-DMQVDgIL.mjs");
17362
17364
  return { id: y2, diagram: t };
17363
17365
  }, WA = {
17364
17366
  id: y2,
@@ -17368,7 +17370,7 @@ const pa = (t, e) => {
17368
17370
  var i;
17369
17371
  return /^\s*classDiagram/.test(t) && ((i = e == null ? void 0 : e.class) == null ? void 0 : i.defaultRenderer) === "dagre-wrapper" ? !0 : /^\s*classDiagram-v2/.test(t);
17370
17372
  }, GA = async () => {
17371
- const { diagram: t } = await import("./classDiagram-v2-f2320105-SdFoPeNM.mjs");
17373
+ const { diagram: t } = await import("./classDiagram-v2-f2320105--5aQo4eJ.mjs");
17372
17374
  return { id: b2, diagram: t };
17373
17375
  }, YA = {
17374
17376
  id: b2,
@@ -17378,7 +17380,7 @@ const pa = (t, e) => {
17378
17380
  var i;
17379
17381
  return ((i = e == null ? void 0 : e.state) == null ? void 0 : i.defaultRenderer) === "dagre-wrapper" ? !1 : /^\s*stateDiagram/.test(t);
17380
17382
  }, QA = async () => {
17381
- const { diagram: t } = await import("./stateDiagram-587899a1-JBSELOt8.mjs");
17383
+ const { diagram: t } = await import("./stateDiagram-587899a1-y4PvcJUy.mjs");
17382
17384
  return { id: x2, diagram: t };
17383
17385
  }, ZA = {
17384
17386
  id: x2,
@@ -17388,14 +17390,14 @@ const pa = (t, e) => {
17388
17390
  var i;
17389
17391
  return !!(/^\s*stateDiagram-v2/.test(t) || /^\s*stateDiagram/.test(t) && ((i = e == null ? void 0 : e.state) == null ? void 0 : i.defaultRenderer) === "dagre-wrapper");
17390
17392
  }, eB = async () => {
17391
- const { diagram: t } = await import("./stateDiagram-v2-d93cdb3a-DcDRwvpk.mjs");
17393
+ const { diagram: t } = await import("./stateDiagram-v2-d93cdb3a-BlIvnHWv.mjs");
17392
17394
  return { id: C2, diagram: t };
17393
17395
  }, iB = {
17394
17396
  id: C2,
17395
17397
  detector: tB,
17396
17398
  loader: eB
17397
17399
  }, nB = iB, _2 = "journey", rB = (t) => /^\s*journey/.test(t), oB = async () => {
17398
- const { diagram: t } = await import("./journeyDiagram-49397b02-C7AiQpxY.mjs");
17400
+ const { diagram: t } = await import("./journeyDiagram-49397b02-Tl8gHApt.mjs");
17399
17401
  return { id: _2, diagram: t };
17400
17402
  }, sB = {
17401
17403
  id: _2,
@@ -17564,35 +17566,35 @@ const BB = (t) => {
17564
17566
  /^\s*flowchart|graph/.test(t) && ((i = e == null ? void 0 : e.flowchart) == null ? void 0 : i.defaultRenderer) === "elk")
17565
17567
  );
17566
17568
  }, PB = async () => {
17567
- const { diagram: t } = await import("./flowchart-elk-definition-4a651766-CC21tNNF.mjs");
17569
+ const { diagram: t } = await import("./flowchart-elk-definition-4a651766-BnM0pBy5.mjs");
17568
17570
  return { id: S2, diagram: t };
17569
17571
  }, DB = {
17570
17572
  id: S2,
17571
17573
  detector: OB,
17572
17574
  loader: PB
17573
17575
  }, zB = DB, k2 = "timeline", IB = (t) => /^\s*timeline/.test(t), RB = async () => {
17574
- const { diagram: t } = await import("./timeline-definition-85554ec2-YAY6t41S.mjs");
17576
+ const { diagram: t } = await import("./timeline-definition-85554ec2-B7WhqOGh.mjs");
17575
17577
  return { id: k2, diagram: t };
17576
17578
  }, VB = {
17577
17579
  id: k2,
17578
17580
  detector: IB,
17579
17581
  loader: RB
17580
17582
  }, NB = VB, A2 = "mindmap", HB = (t) => /^\s*mindmap/.test(t), jB = async () => {
17581
- const { diagram: t } = await import("./mindmap-definition-fc14e90a-Dhd4NZUr.mjs");
17583
+ const { diagram: t } = await import("./mindmap-definition-fc14e90a-B1XNoCc4.mjs");
17582
17584
  return { id: A2, diagram: t };
17583
17585
  }, $B = {
17584
17586
  id: A2,
17585
17587
  detector: HB,
17586
17588
  loader: jB
17587
17589
  }, WB = $B, B2 = "sankey", qB = (t) => /^\s*sankey-beta/.test(t), UB = async () => {
17588
- const { diagram: t } = await import("./sankeyDiagram-04a897e0-DcJ7vqUs.mjs");
17590
+ const { diagram: t } = await import("./sankeyDiagram-04a897e0-DdfwAWbC.mjs");
17589
17591
  return { id: B2, diagram: t };
17590
17592
  }, GB = {
17591
17593
  id: B2,
17592
17594
  detector: qB,
17593
17595
  loader: UB
17594
17596
  }, YB = GB, E2 = "block", KB = (t) => /^\s*block-beta/.test(t), XB = async () => {
17595
- const { diagram: t } = await import("./blockDiagram-38ab4fdb-B11c8tmJ.mjs");
17597
+ const { diagram: t } = await import("./blockDiagram-38ab4fdb-CG_wgnbL.mjs");
17596
17598
  return { id: E2, diagram: t };
17597
17599
  }, QB = {
17598
17600
  id: E2,
@@ -18508,17 +18510,17 @@ function OL(t, e) {
18508
18510
  Q(t, "unexpected end of the stream within a double quoted scalar");
18509
18511
  }
18510
18512
  function PL(t, e) {
18511
- var i = !0, n, r, o, s = t.tag, a, l = t.anchor, u, c, d, h, f, v = /* @__PURE__ */ Object.create(null), p, g, y, x;
18512
- if (x = t.input.charCodeAt(t.position), x === 91)
18513
+ var i = !0, n, r, o, s = t.tag, a, l = t.anchor, u, c, d, h, f, v = /* @__PURE__ */ Object.create(null), p, g, y, b;
18514
+ if (b = t.input.charCodeAt(t.position), b === 91)
18513
18515
  c = 93, f = !1, a = [];
18514
- else if (x === 123)
18516
+ else if (b === 123)
18515
18517
  c = 125, f = !0, a = {};
18516
18518
  else
18517
18519
  return !1;
18518
- for (t.anchor !== null && (t.anchorMap[t.anchor] = a), x = t.input.charCodeAt(++t.position); x !== 0; ) {
18519
- if (te(t, !0, e), x = t.input.charCodeAt(t.position), x === c)
18520
+ for (t.anchor !== null && (t.anchorMap[t.anchor] = a), b = t.input.charCodeAt(++t.position); b !== 0; ) {
18521
+ if (te(t, !0, e), b = t.input.charCodeAt(t.position), b === c)
18520
18522
  return t.position++, t.tag = s, t.anchor = l, t.kind = f ? "mapping" : "sequence", t.result = a, !0;
18521
- i ? x === 44 && Q(t, "expected the node content, but found ','") : Q(t, "missed comma between flow collection entries"), g = p = y = null, d = h = !1, x === 63 && (u = t.input.charCodeAt(t.position + 1), ze(u) && (d = h = !0, t.position++, te(t, !0, e))), n = t.line, r = t.lineStart, o = t.position, rr(t, e, Vs, !1, !0), g = t.tag, p = t.result, te(t, !0, e), x = t.input.charCodeAt(t.position), (h || t.line === n) && x === 58 && (d = !0, x = t.input.charCodeAt(++t.position), te(t, !0, e), rr(t, e, Vs, !1, !0), y = t.result), f ? Nn(t, a, v, g, p, y, n, r, o) : d ? a.push(Nn(t, null, v, g, p, y, n, r, o)) : a.push(p), te(t, !0, e), x = t.input.charCodeAt(t.position), x === 44 ? (i = !0, x = t.input.charCodeAt(++t.position)) : i = !1;
18523
+ i ? b === 44 && Q(t, "expected the node content, but found ','") : Q(t, "missed comma between flow collection entries"), g = p = y = null, d = h = !1, b === 63 && (u = t.input.charCodeAt(t.position + 1), ze(u) && (d = h = !0, t.position++, te(t, !0, e))), n = t.line, r = t.lineStart, o = t.position, rr(t, e, Vs, !1, !0), g = t.tag, p = t.result, te(t, !0, e), b = t.input.charCodeAt(t.position), (h || t.line === n) && b === 58 && (d = !0, b = t.input.charCodeAt(++t.position), te(t, !0, e), rr(t, e, Vs, !1, !0), y = t.result), f ? Nn(t, a, v, g, p, y, n, r, o) : d ? a.push(Nn(t, null, v, g, p, y, n, r, o)) : a.push(p), te(t, !0, e), b = t.input.charCodeAt(t.position), b === 44 ? (i = !0, b = t.input.charCodeAt(++t.position)) : i = !1;
18522
18524
  }
18523
18525
  Q(t, "unexpected end of the stream within a flow collection");
18524
18526
  }
@@ -18586,20 +18588,20 @@ function cp(t, e) {
18586
18588
  return a ? (t.tag = n, t.anchor = r, t.kind = "sequence", t.result = o, !0) : !1;
18587
18589
  }
18588
18590
  function zL(t, e, i) {
18589
- var n, r, o, s, a, l, u = t.tag, c = t.anchor, d = {}, h = /* @__PURE__ */ Object.create(null), f = null, v = null, p = null, g = !1, y = !1, x;
18591
+ var n, r, o, s, a, l, u = t.tag, c = t.anchor, d = {}, h = /* @__PURE__ */ Object.create(null), f = null, v = null, p = null, g = !1, y = !1, b;
18590
18592
  if (t.firstTabInLine !== -1)
18591
18593
  return !1;
18592
- for (t.anchor !== null && (t.anchorMap[t.anchor] = d), x = t.input.charCodeAt(t.position); x !== 0; ) {
18593
- if (!g && t.firstTabInLine !== -1 && (t.position = t.firstTabInLine, Q(t, "tab characters must not be used in indentation")), n = t.input.charCodeAt(t.position + 1), o = t.line, (x === 63 || x === 58) && ze(n))
18594
- x === 63 ? (g && (Nn(t, d, h, f, v, null, s, a, l), f = v = p = null), y = !0, g = !0, r = !0) : g ? (g = !1, r = !0) : Q(t, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), t.position += 1, x = n;
18594
+ for (t.anchor !== null && (t.anchorMap[t.anchor] = d), b = t.input.charCodeAt(t.position); b !== 0; ) {
18595
+ if (!g && t.firstTabInLine !== -1 && (t.position = t.firstTabInLine, Q(t, "tab characters must not be used in indentation")), n = t.input.charCodeAt(t.position + 1), o = t.line, (b === 63 || b === 58) && ze(n))
18596
+ b === 63 ? (g && (Nn(t, d, h, f, v, null, s, a, l), f = v = p = null), y = !0, g = !0, r = !0) : g ? (g = !1, r = !0) : Q(t, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), t.position += 1, b = n;
18595
18597
  else {
18596
18598
  if (s = t.line, a = t.lineStart, l = t.position, !rr(t, i, z2, !1, !0))
18597
18599
  break;
18598
18600
  if (t.line === o) {
18599
- for (x = t.input.charCodeAt(t.position); wn(x); )
18600
- x = t.input.charCodeAt(++t.position);
18601
- if (x === 58)
18602
- x = t.input.charCodeAt(++t.position), ze(x) || Q(t, "a whitespace character is expected after the key-value separator within a block mapping"), g && (Nn(t, d, h, f, v, null, s, a, l), f = v = p = null), y = !0, g = !1, r = !1, f = t.tag, v = t.result;
18601
+ for (b = t.input.charCodeAt(t.position); wn(b); )
18602
+ b = t.input.charCodeAt(++t.position);
18603
+ if (b === 58)
18604
+ b = t.input.charCodeAt(++t.position), ze(b) || Q(t, "a whitespace character is expected after the key-value separator within a block mapping"), g && (Nn(t, d, h, f, v, null, s, a, l), f = v = p = null), y = !0, g = !1, r = !1, f = t.tag, v = t.result;
18603
18605
  else if (y)
18604
18606
  Q(t, "can not read an implicit mapping pair; a colon is missed");
18605
18607
  else
@@ -18609,7 +18611,7 @@ function zL(t, e, i) {
18609
18611
  else
18610
18612
  return t.tag = u, t.anchor = c, !0;
18611
18613
  }
18612
- if ((t.line === o || t.lineIndent > e) && (g && (s = t.line, a = t.lineStart, l = t.position), rr(t, e, Ns, !0, r) && (g ? v = t.result : p = t.result), g || (Nn(t, d, h, f, v, p, s, a, l), f = v = p = null), te(t, !0, -1), x = t.input.charCodeAt(t.position)), (t.line === o || t.lineIndent > e) && x !== 0)
18614
+ if ((t.line === o || t.lineIndent > e) && (g && (s = t.line, a = t.lineStart, l = t.position), rr(t, e, Ns, !0, r) && (g ? v = t.result : p = t.result), g || (Nn(t, d, h, f, v, p, s, a, l), f = v = p = null), te(t, !0, -1), b = t.input.charCodeAt(t.position)), (t.line === o || t.lineIndent > e) && b !== 0)
18613
18615
  Q(t, "bad indentation of a mapping entry");
18614
18616
  else if (t.lineIndent < e)
18615
18617
  break;
@@ -18843,7 +18845,7 @@ const vM = (t, e, i, n) => {
18843
18845
  tt.debug(c), e.length > ((c == null ? void 0 : c.maxTextSize) ?? QL) && (e = ZL);
18844
18846
  const d = "#" + t, h = "i" + t, f = "#" + h, v = "d" + t, p = "#" + v;
18845
18847
  let g = Ke("body");
18846
- const y = c.securityLevel === JL, x = c.securityLevel === tM, w = c.fontFamily;
18848
+ const y = c.securityLevel === JL, b = c.securityLevel === tM, w = c.fontFamily;
18847
18849
  if (i !== void 0) {
18848
18850
  if (i && (i.innerHTML = ""), y) {
18849
18851
  const bt = dp(Ke(i), h);
@@ -18859,14 +18861,14 @@ const vM = (t, e, i, n) => {
18859
18861
  g = Ke("body");
18860
18862
  hp(g, t, v);
18861
18863
  }
18862
- let m, C;
18864
+ let m, _;
18863
18865
  try {
18864
18866
  m = await mu(e, { title: u.title });
18865
18867
  } catch (bt) {
18866
- m = new L2("error"), C = bt;
18868
+ m = new L2("error"), _ = bt;
18867
18869
  }
18868
- const b = g.select(p).node(), T = m.type, A = b.firstChild, L = A.firstChild, $ = (r = (n = m.renderer).getClasses) == null ? void 0 : r.call(n, e, m), R = pM(c, T, $, d), q = document.createElement("style");
18869
- q.innerHTML = R, A.insertBefore(q, L);
18870
+ const x = g.select(p).node(), T = m.type, A = x.firstChild, L = A.firstChild, H = (r = (n = m.renderer).getClasses) == null ? void 0 : r.call(n, e, m), I = pM(c, T, H, d), q = document.createElement("style");
18871
+ q.innerHTML = I, A.insertBefore(q, L);
18870
18872
  try {
18871
18873
  await m.renderer.draw(e, t, Jf, m);
18872
18874
  } catch (bt) {
@@ -18878,12 +18880,12 @@ const vM = (t, e, i, n) => {
18878
18880
  if (tt.debug("config.arrowMarkerAbsolute", c.arrowMarkerAbsolute), ut = mM(ut, y, Wm(c.arrowMarkerAbsolute)), y) {
18879
18881
  const bt = g.select(p + " svg").node();
18880
18882
  ut = gM(ut, bt);
18881
- } else x || (ut = ji.sanitize(ut, {
18883
+ } else b || (ut = ji.sanitize(ut, {
18882
18884
  ADD_TAGS: uM,
18883
18885
  ADD_ATTR: hM
18884
18886
  }));
18885
- if (tE(), C)
18886
- throw C;
18887
+ if (tE(), _)
18888
+ throw _;
18887
18889
  const at = Ke(y ? f : p).node();
18888
18890
  return at && "remove" in at && at.remove(), {
18889
18891
  svg: ut,
@@ -19432,25 +19434,25 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19432
19434
  delay: [0, 0]
19433
19435
  }), { initMermaid: c, processMermaidDiagrams: d, cleanupMermaidElements: h } = BM(), f = new xp({
19434
19436
  html: !0,
19435
- highlight: (b, T) => {
19437
+ highlight: (x, T) => {
19436
19438
  if (T && ns.getLanguage(T))
19437
19439
  try {
19438
- return ns.highlight(b, { language: T }).value;
19440
+ return ns.highlight(x, { language: T }).value;
19439
19441
  } catch {
19440
19442
  }
19441
19443
  return "";
19442
19444
  }
19443
19445
  }).use(bp).use(X2).use(Q2), v = ft(() => {
19444
19446
  var T;
19445
- const b = {
19447
+ const x = {
19446
19448
  [ue.Fail]: "bkai-icon bkai-warning-circle-fill",
19447
19449
  [ue.Loading]: "",
19448
19450
  [ue.Success]: ""
19449
19451
  };
19450
- return (T = n.message) != null && T.status ? b[n.message.status] : "";
19452
+ return (T = n.message) != null && T.status ? x[n.message.status] : "";
19451
19453
  }), p = ft(() => {
19452
19454
  if (!n.message.content) return "";
19453
- const b = f.render(n.message.content), T = ji.sanitize(b, {
19455
+ const x = f.render(n.message.content), T = ji.sanitize(x, {
19454
19456
  USE_PROFILES: { html: !0, svg: !0 },
19455
19457
  ADD_TAGS: ["svg", "g", "path"],
19456
19458
  ADD_ATTR: [
@@ -19476,26 +19478,26 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19476
19478
  }), T.replace(/\s*<\/p>\s*$/, "</p>");
19477
19479
  }), g = ft(() => {
19478
19480
  if (!n.message.time) return "";
19479
- const b = cl(n.message.time);
19480
- return cl().isSame(b, "year") ? b.format("MM-DD HH:mm:ss") : b.format("YYYY-MM-DD HH:mm:ss");
19481
- }), y = (b) => {
19482
- r.value = !1, i("resend", n.index, { message: b });
19483
- }, x = async () => {
19481
+ const x = cl(n.message.time);
19482
+ return cl().isSame(x, "year") ? x.format("MM-DD HH:mm:ss") : x.format("YYYY-MM-DD HH:mm:ss");
19483
+ }), y = (x) => {
19484
+ r.value = !1, i("resend", n.index, { message: x });
19485
+ }, b = async () => {
19484
19486
  try {
19485
19487
  await navigator.clipboard.writeText(n.message.content), al({
19486
19488
  theme: "success",
19487
19489
  message: ot("复制成功")
19488
19490
  });
19489
- } catch (b) {
19490
- console.error("复制失败:", b), al({
19491
+ } catch (x) {
19492
+ console.error("复制失败:", x), al({
19491
19493
  theme: "error",
19492
19494
  message: ot("复制失败")
19493
19495
  });
19494
19496
  }
19495
19497
  }, w = () => {
19496
19498
  i("regenerate", n.index);
19497
- }, m = (b) => {
19498
- const T = b.currentTarget;
19499
+ }, m = (x) => {
19500
+ const T = x.currentTarget;
19499
19501
  DM(T, {
19500
19502
  onConfirm: () => {
19501
19503
  i("delete", n.index);
@@ -19505,52 +19507,52 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19505
19507
  placement: "top",
19506
19508
  appendTo: o.value
19507
19509
  });
19508
- }, C = () => {
19510
+ }, _ = () => {
19509
19511
  u(), l(".message-tool .bkai-fuzhi", ot("复制")), l(".message-tool .bkai-zhongxinshengcheng", ot("重新生成")), l(".message-tool .bkai-yinyong", ot("引用")), l(".message-tool .bkai-bianji", ot("编辑")), l(".message-tool .bkai-shanchu", ot("删除"));
19510
19512
  };
19511
19513
  return _e(() => {
19512
- c(), setTimeout(C, 0);
19514
+ c(), setTimeout(_, 0);
19513
19515
  }), re(
19514
19516
  () => n.message,
19515
19517
  () => {
19516
- setTimeout(C, 0);
19518
+ setTimeout(_, 0);
19517
19519
  },
19518
19520
  { deep: !0 }
19519
- ), re(r, (b) => {
19520
- b || setTimeout(C, 0);
19521
+ ), re(r, (x) => {
19522
+ x || setTimeout(_, 0);
19521
19523
  }), Ce(() => {
19522
19524
  zM(), h();
19523
- }), (b, T) => {
19524
- var A, L, $;
19525
- return E(xs).includes(b.message.role) ? mt("v-if", !0) : (D(), G(
19525
+ }), (x, T) => {
19526
+ var A, L, H;
19527
+ return E(xs).includes(x.message.role) ? mt("v-if", !0) : (D(), G(
19526
19528
  "li",
19527
19529
  {
19528
19530
  key: 0,
19529
19531
  ref_key: "messageMainRef",
19530
19532
  ref: o,
19531
- class: Ot([b.message.role, "message-main"])
19533
+ class: Ot([x.message.role, "message-main"])
19532
19534
  },
19533
19535
  [
19534
- ($ = (L = (A = b.message) == null ? void 0 : A.property) == null ? void 0 : L.extra) != null && $.cite ? (D(), G("div", $M, [
19536
+ (H = (L = (A = x.message) == null ? void 0 : A.property) == null ? void 0 : L.extra) != null && H.cite ? (D(), G("div", $M, [
19535
19537
  At(k0, {
19536
- text: b.message.property.extra.cite
19538
+ text: x.message.property.extra.cite
19537
19539
  }, null, 8, ["text"])
19538
19540
  ])) : mt("v-if", !0),
19539
19541
  z(
19540
19542
  "div",
19541
19543
  {
19542
- class: Ot(`message-content-container ${b.message.role}`)
19544
+ class: Ot(`message-content-container ${x.message.role}`)
19543
19545
  },
19544
19546
  [
19545
- [E(P).User, E(P).Role].includes(b.message.role) ? (D(), G(
19547
+ [E(P).User, E(P).Role].includes(x.message.role) ? (D(), G(
19546
19548
  Ie,
19547
19549
  { key: 0 },
19548
19550
  [
19549
19551
  r.value ? (D(), Kt(jM, {
19550
19552
  key: 0,
19551
19553
  "auto-focus": !0,
19552
- "model-value": b.message.content,
19553
- onCancel: T[0] || (T[0] = (R) => r.value = !1),
19554
+ "model-value": x.message.content,
19555
+ onCancel: T[0] || (T[0] = (I) => r.value = !1),
19554
19556
  onSubmit: y
19555
19557
  }, null, 8, ["model-value"])) : (D(), G("p", WM, [
19556
19558
  g.value && n.showTime ? (D(), G(
@@ -19586,7 +19588,7 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19586
19588
  2
19587
19589
  /* CLASS */
19588
19590
  )) : mt("v-if", !0),
19589
- b.message.status === E(ue).Loading ? (D(), G("svg", KM, T[3] || (T[3] = [
19591
+ x.message.status === E(ue).Loading ? (D(), G("svg", KM, T[3] || (T[3] = [
19590
19592
  z(
19591
19593
  "use",
19592
19594
  { "xlink:href": "#bkai-quanquan" },
@@ -19595,39 +19597,39 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19595
19597
  /* CACHED */
19596
19598
  )
19597
19599
  ]))) : mt("v-if", !0),
19598
- b.message.status === E(ue).Fail ? (D(), G(
19600
+ x.message.status === E(ue).Fail ? (D(), G(
19599
19601
  "span",
19600
19602
  XM,
19601
- Bt(b.message.content),
19603
+ Bt(x.message.content),
19602
19604
  1
19603
19605
  /* TEXT */
19604
19606
  )) : (D(), G("span", {
19605
19607
  key: 4,
19606
19608
  class: Ot({
19607
19609
  "markdown-content": !0,
19608
- loading: b.message.status === E(ue).Loading
19610
+ loading: x.message.status === E(ue).Loading
19609
19611
  }),
19610
19612
  innerHTML: p.value
19611
19613
  }, null, 10, QM))
19612
19614
  ])),
19613
- !r.value && b.message.status !== E(ue).Loading ? (D(), G("div", ZM, [
19615
+ !r.value && x.message.status !== E(ue).Loading ? (D(), G("div", ZM, [
19614
19616
  z("i", {
19615
19617
  class: "bkai-icon bkai-fuzhi",
19616
- onClick: x
19618
+ onClick: b
19617
19619
  }),
19618
19620
  z("i", {
19619
19621
  class: "bkai-icon bkai-yinyong",
19620
- onClick: T[1] || (T[1] = (R) => E(a)(b.message.content))
19622
+ onClick: T[1] || (T[1] = (I) => E(a)(x.message.content))
19621
19623
  }),
19622
- b.message.role === E(P).Ai ? (D(), G("i", {
19624
+ x.message.role === E(P).Ai ? (D(), G("i", {
19623
19625
  key: 0,
19624
19626
  class: "bkai-icon bkai-zhongxinshengcheng",
19625
19627
  onClick: w
19626
19628
  })) : mt("v-if", !0),
19627
- b.message.role === E(P).User ? (D(), G("i", {
19629
+ x.message.role === E(P).User ? (D(), G("i", {
19628
19630
  key: 1,
19629
19631
  class: "bkai-icon bkai-bianji",
19630
- onClick: T[2] || (T[2] = (R) => r.value = !0)
19632
+ onClick: T[2] || (T[2] = (I) => r.value = !0)
19631
19633
  })) : mt("v-if", !0),
19632
19634
  z("i", {
19633
19635
  class: "bkai-icon bkai-shanchu",
@@ -19661,8 +19663,8 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19661
19663
  const a = M(!1), l = () => {
19662
19664
  if (!o.value) return;
19663
19665
  a.value = !0;
19664
- const { scrollTop: g, scrollHeight: y, clientHeight: x } = o.value;
19665
- g + x >= y - 50 && g > s && (a.value = !1), s = g;
19666
+ const { scrollTop: g, scrollHeight: y, clientHeight: b } = o.value;
19667
+ g + b >= y - 50 && g > s && (a.value = !1), s = g;
19666
19668
  }, u = () => {
19667
19669
  o.value && o.value.scrollTo({
19668
19670
  top: o.value.scrollHeight,
@@ -19705,13 +19707,13 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19705
19707
  (D(!0), G(
19706
19708
  Ie,
19707
19709
  null,
19708
- li(g.sessionContents, (x, w) => (D(), G("div", {
19709
- key: x.id,
19710
+ li(g.sessionContents, (b, w) => (D(), G("div", {
19711
+ key: b.id,
19710
19712
  class: "message-line-wrapper"
19711
19713
  }, [
19712
19714
  At(JM, {
19713
19715
  index: w,
19714
- message: x,
19716
+ message: b,
19715
19717
  onDelete: d,
19716
19718
  onRegenerate: h,
19717
19719
  onResend: f
@@ -19735,37 +19737,49 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19735
19737
  },
19736
19738
  emits: ["click", "shortcut-click"],
19737
19739
  setup(t, { emit: e }) {
19738
- const i = t, { enablePopup: n } = Dc(), { isIconVisible: r, iconPosition: o, popupRef: s, clearSelection: a } = xo(n), l = ft(() => {
19739
- var b;
19740
- const C = i.shortcuts.length > 0 ? i.shortcuts : ((b = i.conversationSettings) == null ? void 0 : b.commands) || [];
19741
- return i.shortcutFilter ? C.filter(i.shortcutFilter) : C;
19742
- }), u = ft(() => l.value.slice(0, i.shortcutLimit)), c = ft(() => l.value.slice(i.shortcutLimit)), d = M(!1);
19743
- let h = null, f = null;
19744
- const v = e, p = () => {
19745
- v("click"), r.value = !1;
19746
- }, g = () => {
19747
- f && (clearTimeout(f), f = null), d.value = !0;
19740
+ const i = t, { enablePopup: n } = Dc(), { isIconVisible: r, iconPosition: o, popupRef: s, clearSelection: a, selectedText: l } = xo(n), u = ft(() => {
19741
+ var T;
19742
+ const x = i.shortcuts.length > 0 ? i.shortcuts : ((T = i.conversationSettings) == null ? void 0 : T.commands) || [];
19743
+ return i.shortcutFilter ? x.map((L) => {
19744
+ if (L.components && l.value) {
19745
+ const H = L.components.map((I) => ({
19746
+ ...I,
19747
+ selectedText: l.value
19748
+ }));
19749
+ return {
19750
+ ...L,
19751
+ components: H
19752
+ };
19753
+ }
19754
+ return L;
19755
+ }).filter(i.shortcutFilter) : x;
19756
+ }), c = ft(() => u.value.slice(0, i.shortcutLimit)), d = ft(() => u.value.slice(i.shortcutLimit)), h = M(!1);
19757
+ let f = null, v = null;
19758
+ const p = e, g = () => {
19759
+ p("click"), r.value = !1;
19748
19760
  }, y = () => {
19749
- f && (window.clearTimeout(f), f = null), f = window.setTimeout(() => {
19750
- h || (d.value = !1);
19761
+ v && (clearTimeout(v), v = null), h.value = !0;
19762
+ }, b = () => {
19763
+ v && (window.clearTimeout(v), v = null), v = window.setTimeout(() => {
19764
+ f || (h.value = !1);
19751
19765
  }, 100);
19752
- }, x = () => {
19753
- h && (clearTimeout(h), h = null);
19754
19766
  }, w = () => {
19755
- h && (window.clearTimeout(h), h = null), h = window.setTimeout(() => {
19756
- d.value = !1;
19767
+ f && (clearTimeout(f), f = null);
19768
+ }, m = () => {
19769
+ f && (window.clearTimeout(f), f = null), f = window.setTimeout(() => {
19770
+ h.value = !1;
19757
19771
  }, 100);
19758
- }, m = (C) => {
19772
+ }, _ = (x) => {
19759
19773
  try {
19760
- v("shortcut-click", {
19761
- shortcut: C,
19774
+ p("shortcut-click", {
19775
+ shortcut: x,
19762
19776
  source: "popup"
19763
19777
  }), a(), r.value = !1;
19764
- } catch (b) {
19765
- console.error("处理快捷按钮点击事件时出错:", b);
19778
+ } catch (T) {
19779
+ console.error("处理快捷按钮点击事件时出错:", T);
19766
19780
  }
19767
19781
  };
19768
- return (C, b) => E(r) ? (D(), G(
19782
+ return (x, T) => E(r) ? (D(), G(
19769
19783
  "div",
19770
19784
  {
19771
19785
  key: 0,
@@ -19773,7 +19787,7 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19773
19787
  ref: s,
19774
19788
  style: qn(E(o)),
19775
19789
  class: "ai-blueking-render-popup",
19776
- onMousedown: b[0] || (b[0] = tn(() => {
19790
+ onMousedown: T[0] || (T[0] = tn(() => {
19777
19791
  }, ["prevent"]))
19778
19792
  },
19779
19793
  [
@@ -19781,7 +19795,7 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19781
19795
  mt(" AI图标按钮 "),
19782
19796
  z("div", {
19783
19797
  class: "popup-bkai-btn",
19784
- onClick: p
19798
+ onClick: g
19785
19799
  }, [
19786
19800
  z("img", {
19787
19801
  class: "avatar",
@@ -19801,16 +19815,16 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19801
19815
  (D(!0), G(
19802
19816
  Ie,
19803
19817
  null,
19804
- li(u.value, (T, A) => (D(), G("div", {
19805
- key: A,
19818
+ li(c.value, (A, L) => (D(), G("div", {
19819
+ key: L,
19806
19820
  class: "shortcut-btn",
19807
- onClick: (L) => m(T)
19821
+ onClick: (H) => _(A)
19808
19822
  }, [
19809
- T.icon ? (D(), G(
19823
+ A.icon ? (D(), G(
19810
19824
  "i",
19811
19825
  {
19812
19826
  key: 0,
19813
- class: Ot(T.icon)
19827
+ class: Ot(A.icon)
19814
19828
  },
19815
19829
  null,
19816
19830
  2
@@ -19819,7 +19833,7 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19819
19833
  z(
19820
19834
  "span",
19821
19835
  sF,
19822
- Bt(T.name),
19836
+ Bt(A.name),
19823
19837
  1
19824
19838
  /* TEXT */
19825
19839
  )
@@ -19828,23 +19842,23 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19828
19842
  /* KEYED_FRAGMENT */
19829
19843
  )),
19830
19844
  mt(" 更多按钮 "),
19831
- c.value.length > 0 ? (D(), G(
19845
+ d.value.length > 0 ? (D(), G(
19832
19846
  "div",
19833
19847
  {
19834
19848
  key: 0,
19835
19849
  class: "shortcut-btn more-btn",
19836
- onMouseenter: g,
19837
- onMouseleave: y
19850
+ onMouseenter: y,
19851
+ onMouseleave: b
19838
19852
  },
19839
19853
  [
19840
- b[1] || (b[1] = z(
19854
+ T[1] || (T[1] = z(
19841
19855
  "span",
19842
19856
  { class: "btn-text" },
19843
19857
  "更多",
19844
19858
  -1
19845
19859
  /* CACHED */
19846
19860
  )),
19847
- b[2] || (b[2] = z(
19861
+ T[2] || (T[2] = z(
19848
19862
  "i",
19849
19863
  { class: "bkai-icon bkai-angle-down" },
19850
19864
  null,
@@ -19852,28 +19866,28 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19852
19866
  /* CACHED */
19853
19867
  )),
19854
19868
  mt(" 更多菜单 "),
19855
- d.value ? (D(), G(
19869
+ h.value ? (D(), G(
19856
19870
  "div",
19857
19871
  {
19858
19872
  key: 0,
19859
19873
  class: "more-menu",
19860
- onMouseenter: x,
19861
- onMouseleave: w
19874
+ onMouseenter: w,
19875
+ onMouseleave: m
19862
19876
  },
19863
19877
  [
19864
19878
  (D(!0), G(
19865
19879
  Ie,
19866
19880
  null,
19867
- li(c.value, (T, A) => (D(), G("div", {
19868
- key: A,
19881
+ li(d.value, (A, L) => (D(), G("div", {
19882
+ key: L,
19869
19883
  class: "more-menu-item",
19870
- onClick: (L) => m(T)
19884
+ onClick: (H) => _(A)
19871
19885
  }, [
19872
- T.icon ? (D(), G(
19886
+ A.icon ? (D(), G(
19873
19887
  "i",
19874
19888
  {
19875
19889
  key: 0,
19876
- class: Ot(T.icon)
19890
+ class: Ot(A.icon)
19877
19891
  },
19878
19892
  null,
19879
19893
  2
@@ -19882,7 +19896,7 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19882
19896
  z(
19883
19897
  "span",
19884
19898
  null,
19885
- Bt(T.name),
19899
+ Bt(A.name),
19886
19900
  1
19887
19901
  /* TEXT */
19888
19902
  )
@@ -19905,7 +19919,7 @@ const IM = { class: "bk-text-editor" }, RM = ["placeholder"], VM = { class: "edi
19905
19919
  /* STYLE, NEED_HYDRATION */
19906
19920
  )) : mt("v-if", !0);
19907
19921
  }
19908
- }), cF = /* @__PURE__ */ se(lF, [["__scopeId", "data-v-1dffefe6"]]);
19922
+ }), cF = /* @__PURE__ */ se(lF, [["__scopeId", "data-v-ff43a0ca"]]);
19909
19923
  function uF(t) {
19910
19924
  const { greetingMaxHeight: e } = t, i = M(0), n = M();
19911
19925
  return {
@@ -19980,23 +19994,23 @@ function fF(t = {}) {
19980
19994
  t.defaultLeft !== void 0 ? t.defaultLeft : window.innerWidth - e
19981
19995
  ), l = M(t.defaultTop !== void 0 ? t.defaultTop : 0), u = M(
19982
19996
  t.defaultHeight !== void 0 ? t.defaultHeight : window.innerHeight - (t.defaultTop !== void 0 ? t.defaultTop : 0)
19983
- ), c = M(e), d = M(l.value), h = M(a.value), f = M(c.value), v = M(u.value), p = M(Math.max(window.innerWidth * (r / 100), f.value)), g = M(!1), y = M(0), x = (b, T) => {
19984
- h.value = b, d.value = T, y.value = b - (window.innerWidth - f.value);
19985
- }, w = (b, T, A, L) => {
19986
- h.value = b, d.value = T, f.value = Math.min(A, p.value), v.value = L;
19997
+ ), c = M(e), d = M(l.value), h = M(a.value), f = M(c.value), v = M(u.value), p = M(Math.max(window.innerWidth * (r / 100), f.value)), g = M(!1), y = M(0), b = (x, T) => {
19998
+ h.value = x, d.value = T, y.value = x - (window.innerWidth - f.value);
19999
+ }, w = (x, T, A, L) => {
20000
+ h.value = x, d.value = T, f.value = Math.min(A, p.value), v.value = L;
19987
20001
  }, m = () => {
19988
20002
  p.value = Math.max(window.innerWidth * (r / 100), f.value), oe(() => {
19989
20003
  if (g.value)
19990
20004
  h.value = window.innerWidth - f.value - s, d.value = window.innerHeight - o - s;
19991
20005
  else {
19992
- const b = window.innerWidth - f.value - y.value;
19993
- h.value = Math.max(0, b), setTimeout(() => {
20006
+ const x = window.innerWidth - f.value - y.value;
20007
+ h.value = Math.max(0, x), setTimeout(() => {
19994
20008
  v.value = window.innerHeight - d.value;
19995
20009
  }, 0);
19996
20010
  }
19997
20011
  f.value > p.value && (f.value = p.value);
19998
20012
  });
19999
- }, C = () => {
20013
+ }, _ = () => {
20000
20014
  g.value ? (d.value = l.value, oe(() => {
20001
20015
  v.value = u.value, h.value = a.value, f.value = c.value;
20002
20016
  })) : (d.value = window.innerHeight - o - s, h.value = a.value - s, f.value = e, v.value = o), g.value = !g.value;
@@ -20016,9 +20030,9 @@ function fF(t = {}) {
20016
20030
  height: v,
20017
20031
  isCompressionHeight: g,
20018
20032
  // 事件处理方法
20019
- handleDragging: x,
20033
+ handleDragging: b,
20020
20034
  handleResizing: w,
20021
- toggleCompression: C
20035
+ toggleCompression: _
20022
20036
  };
20023
20037
  }
20024
20038
  function pF(t) {
@@ -20043,10 +20057,10 @@ function pF(t) {
20043
20057
  let y = e.value;
20044
20058
  if (h.fillRegx)
20045
20059
  try {
20046
- const x = new RegExp(h.fillRegx), w = e.value.match(x);
20060
+ const b = new RegExp(h.fillRegx), w = e.value.match(b);
20047
20061
  w && w.length > 0 ? y = w[0] : y = "";
20048
- } catch (x) {
20049
- console.error("快捷方式组件中的正则表达式无效:", h.fillRegx, x);
20062
+ } catch (b) {
20063
+ console.error("快捷方式组件中的正则表达式无效:", h.fillRegx, b);
20050
20064
  }
20051
20065
  h.selectedText = y;
20052
20066
  }
@@ -20077,15 +20091,15 @@ function mF(t, e = !1) {
20077
20091
  t("click");
20078
20092
  }, y = () => {
20079
20093
  u.value = !u.value, t("minimize", u.value), u.value ? s.value = window.innerWidth - 12 : s.value = window.innerWidth - 60;
20080
- }, x = (T, A) => {
20094
+ }, b = (T, A) => {
20081
20095
  s.value = T, a.value = A;
20082
20096
  }, w = () => {
20083
20097
  c.value = !0;
20084
20098
  }, m = () => {
20085
20099
  c.value = !1;
20086
- }, C = () => {
20100
+ }, _ = () => {
20087
20101
  h = Date.now(), d.value = !1;
20088
- }, b = () => {
20102
+ }, x = () => {
20089
20103
  Date.now() - h > 200 && (d.value = !0);
20090
20104
  };
20091
20105
  return _e(() => {
@@ -20104,11 +20118,11 @@ function mF(t, e = !1) {
20104
20118
  handleNimbusMinimize: f,
20105
20119
  handleClick: g,
20106
20120
  handleMinimize: y,
20107
- handleDragging: x,
20121
+ handleDragging: b,
20108
20122
  handleMouseEnter: w,
20109
20123
  handleMouseLeave: m,
20110
- handleMouseDown: C,
20111
- handleMouseUp: b
20124
+ handleMouseDown: _,
20125
+ handleMouseUp: x
20112
20126
  };
20113
20127
  }
20114
20128
  const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF = /* @__PURE__ */ Pt({
@@ -20174,19 +20188,19 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20174
20188
  re(c, (T) => {
20175
20189
  n("update:isMinimize", T);
20176
20190
  });
20177
- const x = ft(
20191
+ const b = ft(
20178
20192
  () => c.value ? ot("恢复默认大小") : ot("最小化,将缩成锚点")
20179
20193
  ), { createTooltip: w, destroyAll: m } = cr({
20180
20194
  theme: "ai-blueking",
20181
20195
  delay: [0, 0]
20182
- }), C = () => {
20196
+ }), _ = () => {
20183
20197
  oe(() => {
20184
- b();
20198
+ x();
20185
20199
  });
20186
- }, b = () => {
20200
+ }, x = () => {
20187
20201
  m(), s.value && !c.value && w(s.value, "Cmd + I", {
20188
20202
  placement: "left"
20189
- }), a.value && w(a.value, x.value, {
20203
+ }), a.value && w(a.value, b.value, {
20190
20204
  placement: "top"
20191
20205
  });
20192
20206
  };
@@ -20194,15 +20208,15 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20194
20208
  () => c.value,
20195
20209
  () => {
20196
20210
  oe(() => {
20197
- b();
20211
+ x();
20198
20212
  });
20199
20213
  }
20200
20214
  ), _e(() => {
20201
20215
  oe(() => {
20202
- b();
20203
- }), window.addEventListener("resize", C);
20216
+ x();
20217
+ }), window.addEventListener("resize", _);
20204
20218
  }), Ce(() => {
20205
- window.removeEventListener("resize", C);
20219
+ window.removeEventListener("resize", _);
20206
20220
  }), (T, A) => (D(), Kt(E(Sc), {
20207
20221
  active: !T.isPanelShow,
20208
20222
  axis: "y",
@@ -20309,7 +20323,7 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20309
20323
  Zl(B0, n.enablePopup);
20310
20324
  const o = M(), s = M(), a = M(), l = M(!1), u = M(n.defaultMinimize), c = M(""), d = M(!1), h = M(!1);
20311
20325
  let f = null;
20312
- const v = M(""), p = M([]), g = M(window.innerHeight), y = M(68), x = gb(), { renderMarkdown: w } = hF(), { selectedText: m, citeText: C, setCiteText: b } = xo(n.enablePopup), { messageListRef: T, scrollMainToBottom: A, scrollToBottomIfNeeded: L, resetUserScrolling: $ } = dF(), { currentShortcut: R, handleShortcutClick: q, handleCancelShortcut: U } = pF({
20326
+ const v = M(""), p = M([]), g = M(window.innerHeight), y = M(68), b = gb(), { renderMarkdown: w } = hF(), { selectedText: m, citeText: _, setCiteText: x } = xo(n.enablePopup), { messageListRef: T, scrollMainToBottom: A, scrollToBottomIfNeeded: L, resetUserScrolling: H } = dF(), { currentShortcut: I, handleShortcutClick: q, handleCancelShortcut: U } = pF({
20313
20327
  selectedText: m,
20314
20328
  isShow: l,
20315
20329
  handleShow: () => {
@@ -20338,7 +20352,7 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20338
20352
  miniPadding: n.miniPadding
20339
20353
  }), nt = ft(() => g.value - 367), { greetingSectionRef: Dt, updateGreetingTextHeight: zt, getInputContainerStyle: Nt } = uF({
20340
20354
  greetingMaxHeight: nt.value
20341
- }), Ht = ft(() => Nt(H.value)), Z = ft(() => {
20355
+ }), Ht = ft(() => Nt(j.value)), Z = ft(() => {
20342
20356
  const lt = m.value ? 100 : 70;
20343
20357
  return y.value + 40 + lt;
20344
20358
  }), ht = ft(() => hb(n.url)), {
@@ -20353,9 +20367,9 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20353
20367
  setCurrentSessionChain: de,
20354
20368
  currentSessionLoading: k,
20355
20369
  reGenerateChat: F,
20356
- reSendChat: j,
20370
+ reSendChat: $,
20357
20371
  deleteChat: N,
20358
- updateRequestOptions: I,
20372
+ updateRequestOptions: R,
20359
20373
  getAgentInfoApi: pt,
20360
20374
  getSessionsApi: It,
20361
20375
  getSessionContentsApi: qt,
@@ -20382,7 +20396,7 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20382
20396
  hideReferenceDocIcon: !0
20383
20397
  }
20384
20398
  });
20385
- x.registerSdkMethods({
20399
+ b.registerSdkMethods({
20386
20400
  setCurrentSession: Fe,
20387
20401
  setCurrentSessionChain: de,
20388
20402
  setSessionContents: Lt,
@@ -20395,9 +20409,9 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20395
20409
  plusSessionApi: He,
20396
20410
  handleCompleteRole: ee
20397
20411
  });
20398
- const B = ft(() => [...n.prompts, ...p.value]), H = ft(() => St.value.filter((W) => !xs.includes(W.role)).length > 0), J = ft(() => {
20412
+ const B = ft(() => [...n.prompts, ...p.value]), j = ft(() => St.value.filter((W) => !xs.includes(W.role)).length > 0), J = ft(() => {
20399
20413
  var W, lt;
20400
- return ((lt = (W = x.agentInfo.value) == null ? void 0 : W.conversationSettings) == null ? void 0 : lt.enableChatSession) ?? !0;
20414
+ return ((lt = (W = b.agentInfo.value) == null ? void 0 : W.conversationSettings) == null ? void 0 : lt.enableChatSession) ?? !0;
20401
20415
  }), _t = ft(() => v.value || ot("输入你的问题,助你高效的完成工作")), ct = async () => {
20402
20416
  if (f) {
20403
20417
  await f;
@@ -20405,7 +20419,7 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20405
20419
  }
20406
20420
  h.value && !f || (f = (async () => {
20407
20421
  try {
20408
- const { conversationSettings: W } = await x.initSession();
20422
+ const { conversationSettings: W } = await b.initSession();
20409
20423
  v.value = (W == null ? void 0 : W.openingRemark) || "", p.value = (W == null ? void 0 : W.predefinedQuestions) || [], h.value = !0, r("session-initialized", {
20410
20424
  openingRemark: v.value,
20411
20425
  predefinedQuestions: p.value
@@ -20418,7 +20432,7 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20418
20432
  re(
20419
20433
  () => ht.value,
20420
20434
  (W, lt) => {
20421
- W !== lt && W && (I({
20435
+ W !== lt && W && (R({
20422
20436
  url: W,
20423
20437
  ...n.requestOptions
20424
20438
  }), h.value = !1, f = null, ct());
@@ -20426,7 +20440,7 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20426
20440
  ), re(
20427
20441
  () => n.requestOptions,
20428
20442
  (W) => {
20429
- I({
20443
+ R({
20430
20444
  url: ht.value,
20431
20445
  ...W
20432
20446
  });
@@ -20450,8 +20464,8 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20450
20464
  const jt = async (W) => {
20451
20465
  if (!W) return;
20452
20466
  h.value || await ct();
20453
- const lt = x.sessionList.value.find((ie) => ie.sessionCode === W);
20454
- return lt ? (await x.switchSessionWithContents(lt), !0) : !1;
20467
+ const lt = b.sessionList.value.find((ie) => ie.sessionCode === W);
20468
+ return lt ? (await b.switchSessionWithContents(lt), !0) : !1;
20455
20469
  }, Qt = () => {
20456
20470
  g.value = window.innerHeight;
20457
20471
  };
@@ -20481,7 +20495,7 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20481
20495
  }, ki = async (W) => {
20482
20496
  var le, Gi, Yi, mr, gr, Ao, K;
20483
20497
  if (!W.trim()) return;
20484
- !h.value && ht.value && await ct(), $();
20498
+ !h.value && ht.value && await ct(), H();
20485
20499
  const lt = Gd(W);
20486
20500
  await we((le = Ct.value) == null ? void 0 : le.sessionCode, {
20487
20501
  role: P.User,
@@ -20489,31 +20503,31 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20489
20503
  sessionCode: (Gi = Ct.value) == null ? void 0 : Gi.sessionCode,
20490
20504
  property: {
20491
20505
  extra: {
20492
- cite: C.value,
20506
+ cite: _.value,
20493
20507
  ...typeof ((Yi = n.requestOptions) == null ? void 0 : Yi.context) == "function" ? (mr = n.requestOptions) == null ? void 0 : mr.context() : (gr = n.requestOptions) == null ? void 0 : gr.context
20494
20508
  }
20495
20509
  }
20496
20510
  });
20497
20511
  const ie = St.value.filter(
20498
- (_) => !xs.includes(_.role)
20512
+ (C) => !xs.includes(C.role)
20499
20513
  ), Se = ie.length === 1 && ie[0].role === P.User;
20500
20514
  if (ae({
20501
20515
  sessionCode: (Ao = Ct.value) == null ? void 0 : Ao.sessionCode,
20502
20516
  ...n.requestOptions
20503
20517
  }), Se && ((K = Ct.value) != null && K.sessionCode))
20504
20518
  try {
20505
- const _ = await kt(Ct.value.sessionCode);
20506
- _ != null && _.sessionName && await x.getSessionList();
20507
- } catch (_) {
20508
- console.error("自动命名会话失败:", _);
20519
+ const C = await kt(Ct.value.sessionCode);
20520
+ C != null && C.sessionName && await b.getSessionList();
20521
+ } catch (C) {
20522
+ console.error("自动命名会话失败:", C);
20509
20523
  }
20510
- r("send-message", lt), c.value = "", b("");
20524
+ r("send-message", lt), c.value = "", x("");
20511
20525
  }, ni = (W) => {
20512
20526
  const lt = St.value[W];
20513
20527
  lt && F(lt.sessionCode, lt, W);
20514
20528
  }, pr = (W, { message: lt }) => {
20515
20529
  const ie = St.value[W];
20516
- ie && (ie.content = Gd(lt), j(ie.sessionCode, ie, W));
20530
+ ie && (ie.content = Gd(lt), $(ie.sessionCode, ie, W));
20517
20531
  }, un = () => {
20518
20532
  var W;
20519
20533
  (W = Ct == null ? void 0 : Ct.value) != null && W.sessionCode && (he(Ct.value.sessionCode), r("stop"));
@@ -20545,7 +20559,7 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20545
20559
  N(W, (lt = Ct.value) == null ? void 0 : lt.sessionCode);
20546
20560
  }, Ui = async () => {
20547
20561
  var W;
20548
- he((W = Ct.value) == null ? void 0 : W.sessionCode), c.value = "", b(""), Lt([]);
20562
+ he((W = Ct.value) == null ? void 0 : W.sessionCode), c.value = "", x(""), Lt([]);
20549
20563
  };
20550
20564
  return e({
20551
20565
  sessionContents: St,
@@ -20557,7 +20571,7 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20557
20571
  handleDelete: je,
20558
20572
  handleRegenerate: ni,
20559
20573
  handleResend: pr,
20560
- updateRequestOptions: I,
20574
+ updateRequestOptions: R,
20561
20575
  currentSessionLoading: k,
20562
20576
  isLoadingSessionContents: Ft,
20563
20577
  updateGreetingTextHeight: zt,
@@ -20567,14 +20581,14 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20567
20581
  (W = s.value) == null || W.focus();
20568
20582
  },
20569
20583
  // 新增会话接口
20570
- addNewSession: (W) => x.addNewSession(W),
20584
+ addNewSession: (W) => b.addNewSession(W),
20571
20585
  // 更新会话名称接口
20572
- updateSessionName: async (W, lt) => x.updateSession(W, { sessionName: lt }),
20586
+ updateSessionName: async (W, lt) => b.updateSession(W, { sessionName: lt }),
20573
20587
  // 切换到指定会话
20574
20588
  switchToSession: jt,
20575
20589
  // 获取会话列表
20576
- getSessionList: x.getSessionList,
20577
- sessionList: x.sessionList,
20590
+ getSessionList: b.getSessionList,
20591
+ sessionList: b.sessionList,
20578
20592
  // 是否启用会话管理
20579
20593
  enableChatSession: J
20580
20594
  }), (W, lt) => {
@@ -20635,7 +20649,7 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20635
20649
  z(
20636
20650
  "div",
20637
20651
  {
20638
- class: Ot(`main-content ${H.value ? "chat-layout" : "greeting-layout"}`)
20652
+ class: Ot(`main-content ${j.value ? "chat-layout" : "greeting-layout"}`)
20639
20653
  },
20640
20654
  [
20641
20655
  At(Tx, {
@@ -20643,7 +20657,7 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20643
20657
  ref: Dt,
20644
20658
  title: n.helloText,
20645
20659
  "greeting-text": _t.value,
20646
- "has-session-contents": H.value,
20660
+ "has-session-contents": j.value,
20647
20661
  "render-markdown": E(w),
20648
20662
  "greeting-max-height": nt.value
20649
20663
  }, null, 8, ["title", "greeting-text", "has-session-contents", "render-markdown", "greeting-max-height"]),
@@ -20651,7 +20665,7 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20651
20665
  ref_key: "messageListRef",
20652
20666
  ref: T,
20653
20667
  "session-contents": E(St),
20654
- "has-session-contents": H.value,
20668
+ "has-session-contents": j.value,
20655
20669
  "content-margin-bottom": Z.value,
20656
20670
  onDelete: je,
20657
20671
  onRegenerate: ni,
@@ -20664,8 +20678,8 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20664
20678
  type: "tween",
20665
20679
  layoutId: "chat-input"
20666
20680
  },
20667
- class: Ot(`chat-input-container ${H.value ? "bottom" : "centered"}`),
20668
- style: qn(H.value ? void 0 : Ht.value),
20681
+ class: Ot(`chat-input-container ${j.value ? "bottom" : "centered"}`),
20682
+ style: qn(j.value ? void 0 : Ht.value),
20669
20683
  layout: ""
20670
20684
  }, {
20671
20685
  default: Vt(() => {
@@ -20688,21 +20702,21 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20688
20702
  onClick: fr
20689
20703
  }, null, 8, ["text"])) : mt("v-if", !0)
20690
20704
  ])) : mt("v-if", !0),
20691
- E(R) ? (D(), Kt(bx, {
20692
- key: E(R).id,
20693
- shortcut: E(R),
20705
+ E(I) ? (D(), Kt(bx, {
20706
+ key: E(I).id,
20707
+ shortcut: E(I),
20694
20708
  "root-node": a.value,
20695
20709
  onCancel: E(U),
20696
20710
  onSubmit: ga
20697
20711
  }, null, 8, ["shortcut", "root-node", "onCancel"])) : (D(), Kt(hx, {
20698
20712
  key: 2,
20699
- class: Ot(H.value ? "chat-layout" : "greeting-layout"),
20713
+ class: Ot(j.value ? "chat-layout" : "greeting-layout"),
20700
20714
  modelValue: c.value,
20701
20715
  "onUpdate:modelValue": lt[0] || (lt[0] = (le) => c.value = le),
20702
20716
  loading: E(k) || !1,
20703
20717
  prompts: B.value,
20704
20718
  shortcuts: n.shortcuts,
20705
- "conversation-settings": (Se = E(x).agentInfo.value) == null ? void 0 : Se.conversationSettings,
20719
+ "conversation-settings": (Se = E(b).agentInfo.value) == null ? void 0 : Se.conversationSettings,
20706
20720
  disabled: n.disabledInput,
20707
20721
  onHeightChange: ii,
20708
20722
  onSend: ki,
@@ -20740,7 +20754,7 @@ const gF = { class: "nimbus-bkai-wrapper" }, vF = ["width", "height", "src"], yF
20740
20754
  }, null, 8, ["is-panel-show", "is-minimize", "default-minimize", "size"])),
20741
20755
  At(cF, {
20742
20756
  shortcuts: n.shortcuts,
20743
- "conversation-settings": (ie = E(x).agentInfo.value) == null ? void 0 : ie.conversationSettings,
20757
+ "conversation-settings": (ie = E(b).agentInfo.value) == null ? void 0 : ie.conversationSettings,
20744
20758
  "shortcut-limit": n.shortcutLimit,
20745
20759
  "shortcut-filter": n.shortcutFilter,
20746
20760
  onClick: lt[3] || (lt[3] = (Se) => l.value = !0),