@blueking/ai-blueking 0.3.15 → 0.3.16

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.
@@ -1,8 +1,8 @@
1
1
  var Be = Object.defineProperty;
2
2
  var He = (o, s, t) => s in o ? Be(o, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[s] = t;
3
- var Q = (o, s, t) => (He(o, typeof s != "symbol" ? s + "" : s, t), t);
3
+ var j = (o, s, t) => (He(o, typeof s != "symbol" ? s + "" : s, t), t);
4
4
  import { Popover as Te, Input as me, Exception as Pe, clickoutside as Re, bkTooltips as ue, Tag as Ve, Alert as De, Button as xe, Message as ge, Select as ve, provideGlobalConfig as Ee } from "bkui-vue";
5
- import { ref as x, onMounted as se, onBeforeUnmount as ae, defineComponent as E, withDirectives as A, openBlock as m, createElementBlock as g, createElementVNode as d, toDisplayString as P, unref as c, createCommentVNode as z, vShow as be, createTextVNode as te, pushScopeId as le, popScopeId as ie, computed as X, normalizeStyle as j, normalizeClass as ee, createVNode as T, Fragment as K, watch as ye, createBlock as q, withCtx as G, renderList as re, nextTick as ke, withModifiers as D, onBeforeMount as Ye, renderSlot as Ie } from "vue";
5
+ import { ref as x, onMounted as se, onBeforeUnmount as ae, defineComponent as E, withDirectives as X, openBlock as m, createElementBlock as g, createElementVNode as p, toDisplayString as P, unref as d, createCommentVNode as S, vShow as be, createTextVNode as te, pushScopeId as le, popScopeId as ie, computed as q, normalizeStyle as G, normalizeClass as ee, createVNode as V, Fragment as U, watch as ye, createBlock as K, withCtx as Z, renderList as re, nextTick as ke, withModifiers as D, onBeforeMount as Ye, renderSlot as Ie } from "vue";
6
6
  import ne from "dayjs";
7
7
  import fe from "highlight.js";
8
8
  import Ae from "markdown-it";
@@ -18,11 +18,11 @@ function we() {
18
18
  }, n = () => {
19
19
  const a = document.querySelector(".ai-blueking-messages");
20
20
  a == null || a.addEventListener("scroll", t, { passive: !0 });
21
- }, l = () => {
21
+ }, i = () => {
22
22
  const a = document.querySelector(".ai-blueking-messages");
23
23
  a == null || a.removeEventListener("scroll", t);
24
24
  };
25
- return se(n), ae(l), {
25
+ return se(n), ae(i), {
26
26
  isShow: o,
27
27
  scrollToBottom: s
28
28
  };
@@ -36,20 +36,20 @@ function pe() {
36
36
  const r = window.getSelection();
37
37
  if (r && r.toString().trim().length > 0) {
38
38
  de.value = !1;
39
- const S = r.getRangeAt(0).getBoundingClientRect(), C = window.innerWidth;
39
+ const M = r.getRangeAt(0).getBoundingClientRect(), B = window.innerWidth;
40
40
  $.value = r.toString().trim();
41
- const y = 80, B = 34, M = 10;
42
- let H = S.left + window.scrollX + S.width / 2 - y / 2;
43
- H = Math.max(M, Math.min(H, C - y - M));
44
- let R = S.top + window.scrollY - B - M;
45
- S.top > B + M || (R = S.bottom + window.scrollY + M), s.value = {
41
+ const y = 80, H = 34, z = 10;
42
+ let T = M.left + window.scrollX + M.width / 2 - y / 2;
43
+ T = Math.max(z, Math.min(T, B - y - z));
44
+ let R = M.top + window.scrollY - H - z;
45
+ M.top > H + z || (R = M.bottom + window.scrollY + z), s.value = {
46
46
  top: `${R}px`,
47
- left: `${H}px`
47
+ left: `${T}px`
48
48
  }, o.value = !0;
49
49
  } else
50
- l();
50
+ i();
51
51
  }, 300);
52
- }, l = () => {
52
+ }, i = () => {
53
53
  o.value = !1, de.value || ($.value = "");
54
54
  }, a = () => {
55
55
  const r = window.getSelection();
@@ -65,7 +65,7 @@ function pe() {
65
65
  isIconVisible: o,
66
66
  iconPosition: s,
67
67
  selectedText: $,
68
- hideIcon: l,
68
+ hideIcon: i,
69
69
  clearSelection: a,
70
70
  setSelection: e,
71
71
  lockSelectedText: de
@@ -89,7 +89,7 @@ const Ke = (o) => {
89
89
  o(n), t = !0;
90
90
  }, s);
91
91
  };
92
- }, je = Ke("blueking_language") || "zh-cn", We = {
92
+ }, We = Ke("blueking_language") || "zh-cn", je = {
93
93
  小鲸: "BK GPT",
94
94
  向下收缩: "shrink down",
95
95
  向上扩展: "expand upward",
@@ -132,7 +132,7 @@ const Ke = (o) => {
132
132
  {{ selected_text }}
133
133
  '''`,
134
134
  explanationShortcut: "您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。"
135
- }, f = (o) => je !== "en" ? Ge[o] || o : We[o] || o, Je = [
135
+ }, f = (o) => We !== "en" ? Ge[o] || o : je[o] || o, Je = [
136
136
  {
137
137
  label: f("翻译"),
138
138
  prompt: f("translateShortcut")
@@ -149,21 +149,21 @@ const Ke = (o) => {
149
149
  },
150
150
  emits: ["close"],
151
151
  setup(o) {
152
- return (s, t) => A((m(), g(
152
+ return (s, t) => X((m(), g(
153
153
  "section",
154
154
  Ze,
155
155
  [
156
- d(
156
+ p(
157
157
  "span",
158
158
  Oe,
159
159
  P(s.text),
160
160
  1
161
161
  /* TEXT */
162
162
  ),
163
- d(
163
+ p(
164
164
  "span",
165
165
  Ne,
166
- P(c(f)("您选择的文本内容")),
166
+ P(d(f)("您选择的文本内容")),
167
167
  1
168
168
  /* TEXT */
169
169
  ),
@@ -171,7 +171,7 @@ const Ke = (o) => {
171
171
  key: 0,
172
172
  class: "ai-blueking-icon ai-blueking-close-circle-fill",
173
173
  onClick: t[0] || (t[0] = (n) => s.$emit("close"))
174
- })) : z("v-if", !0)
174
+ })) : S("v-if", !0)
175
175
  ],
176
176
  512
177
177
  /* NEED_PATCH */
@@ -181,10 +181,10 @@ const Ke = (o) => {
181
181
  }
182
182
  }), Y = (o, s) => {
183
183
  const t = o.__vccOpts || o;
184
- for (const [n, l] of s)
185
- t[n] = l;
184
+ for (const [n, i] of s)
185
+ t[n] = i;
186
186
  return t;
187
- }, Le = /* @__PURE__ */ Y(Fe, [["__scopeId", "data-v-3fd96961"]]), _e = (o) => (le("data-v-a8d839da"), o = o(), ie(), o), $e = /* @__PURE__ */ _e(() => /* @__PURE__ */ d(
187
+ }, Le = /* @__PURE__ */ Y(Fe, [["__scopeId", "data-v-3fd96961"]]), _e = (o) => (le("data-v-a8d839da"), o = o(), ie(), o), $e = /* @__PURE__ */ _e(() => /* @__PURE__ */ p(
188
188
  "i",
189
189
  { class: "ai-blueking-icon ai-blueking-xiangxia-2" },
190
190
  null,
@@ -194,26 +194,26 @@ const Ke = (o) => {
194
194
  __name: "render-back",
195
195
  setup(o) {
196
196
  const { isShow: s, scrollToBottom: t } = we();
197
- return (n, l) => c(s) ? (m(), g("span", {
197
+ return (n, i) => d(s) ? (m(), g("span", {
198
198
  key: 0,
199
199
  class: "ai-blueking-render-back",
200
- onClick: l[0] || (l[0] = //@ts-ignore
201
- (...a) => c(t) && c(t)(...a))
200
+ onClick: i[0] || (i[0] = //@ts-ignore
201
+ (...a) => d(t) && d(t)(...a))
202
202
  }, [
203
203
  $e,
204
204
  te(
205
- " " + P(c(f)("返回最新")),
205
+ " " + P(d(f)("返回最新")),
206
206
  1
207
207
  /* TEXT */
208
208
  )
209
- ])) : z("v-if", !0);
209
+ ])) : S("v-if", !0);
210
210
  }
211
211
  }), tt = /* @__PURE__ */ Y(et, [["__scopeId", "data-v-a8d839da"]]), ot = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAH3tJREFUeF69nAd4VFXax39nStqkNxJC6KGDghQFXIosogGkCKKuFYVFFBVQXEEN69pFF5VFFGRFUelSFUQjCFIUkN5LIIH0hGSSSabd7zln5sIkhBRwv8MzzwBz7yn/8/b3PUfwP2iaphkAgxDC6du9pmmxQFugKdACaAU0BkKBEO9HvlLs/RQBZ4AjwDHgFHBQCJFdqV8T4BZCuP/s5Yg/s0NN02R/Ehw5WU32rWmaBGMI0ANoDTQHzNc4rgM4ARwGtgLfCiEkaHKcK8a+x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vbJWO5h6+INRT90w9d3nbi+5PPcqVX+V/3lNh7ZSUjTDwTZLxJKRI11zT2q3Ia5+uUlFkDTMgQJnuYuMI9nkpOUphzQqMYK45jEEhZs9Al4TygQwmcHlAHkaQRg0JZQPpZ5i69e/KftJsnO9pjH0vL8rTTs3cDnKPDVYyhsxsTPzZNaLU/vG/fj/ernJ5QWnGFJSICUlxT3viBbiNjNaiKqvx6lw4YksMTEKTNKz0MugBTjt4HZ6QnxGI5Rb7Zw7kkl8UiyW8ABl9+iay1bspDCrSLovWni9YM0cYNQc5erUknwkU9N4y+Bg3uhWolhuppxzSkrdb35RFFx7Yqv6yRTPfWWkCOFemKZF2NyMQav6gqVLLKhJpvEpElfRGE+QTAplSTnfz9rEps+30Sm5PcNfulNRlTy8IenLYBRuowmj9F1dDmlJqOOkxxHMCzTwyf2NRIGa1/RrB0Zf7XUDpMDxAUn+e/YJLdZkoL/wXNHVr05XdGlgNKOt+2ATqfO2SGGsjZg+UGKhaS6lqmXBhV7bUq7BRiHEN043G8Y191z+Vnk+10MEfwpAPqaAWAKGET6XvH2WpjXVnAzRDPRAq8Ulb7IAwQS2i+WkHUgnoVUcIdEW3J779DyXvAkOCzdbhYlvH210+ZK3ymNfDzB/KgVVnojawZ8xpPSpeE2gpCw/E21x01TTaIGglabRRIhLVwTKq75kKzYYKTYHUORwcMZdzhEhOIaBU3YnB3VK0cdNSdVM9MYt2fzPAMW3j/8Dx+VMHl8zFNkAAAAASUVORK5CYII=", nt = (o) => {
212
- var s = o.renderer.rules.link_open || function(t, n, l, a, e) {
213
- return e.renderToken(t, n, l);
212
+ var s = o.renderer.rules.link_open || function(t, n, i, a, e) {
213
+ return e.renderToken(t, n, i);
214
214
  };
215
- o.renderer.rules.link_open = function(t, n, l, a, e) {
216
- return t[n].attrSet("target", "_blank"), s(t, n, l, a, e);
215
+ o.renderer.rules.link_open = function(t, n, i, a, e) {
216
+ return t[n].attrSet("target", "_blank"), s(t, n, i, a, e);
217
217
  };
218
218
  };
219
219
  var Se = /* @__PURE__ */ ((o) => (o.Assistant = "assistant", o.Cite = "cite", o.System = "system", o.User = "user", o))(Se || {}), oe = /* @__PURE__ */ ((o) => (o.Error = "error", o.Loading = "loading", o.Success = "success", o))(oe || {});
@@ -223,28 +223,28 @@ const st = /* @__PURE__ */ E({
223
223
  size: { default: 36 }
224
224
  },
225
225
  setup(o) {
226
- const s = o, t = X(() => ({
226
+ const s = o, t = q(() => ({
227
227
  minWidth: `${s.size}px`,
228
228
  maxWidth: `${s.size}px`,
229
229
  minHeight: `${s.size}px`,
230
230
  maxHeight: `${s.size}px`,
231
231
  padding: `${s.size * 0.208}px ${s.size * 0.222}px ${s.size * 0.194}px ${s.size * 0.18}px`
232
232
  // 保持原比例
233
- })), n = X(() => ({
233
+ })), n = q(() => ({
234
234
  fontSize: `${s.size * 0.611}px`
235
235
  // 保持原比例 22/36
236
236
  }));
237
- return (l, a) => (m(), g(
237
+ return (i, a) => (m(), g(
238
238
  "span",
239
239
  {
240
- style: j(t.value),
240
+ style: G(t.value),
241
241
  class: "message-photo ai"
242
242
  },
243
243
  [
244
- d(
244
+ p(
245
245
  "i",
246
246
  {
247
- style: j(n.value),
247
+ style: G(n.value),
248
248
  class: "ai-blueking-icon ai-blueking-ai"
249
249
  },
250
250
  null,
@@ -271,7 +271,7 @@ const st = /* @__PURE__ */ E({
271
271
  height: "16",
272
272
  class: "loading-message",
273
273
  "aria-hidden": "true"
274
- }, vt = /* @__PURE__ */ d(
274
+ }, vt = /* @__PURE__ */ p(
275
275
  "use",
276
276
  { "xlink:href": "#ai-blueking-quanquan" },
277
277
  null,
@@ -302,7 +302,7 @@ const st = /* @__PURE__ */ E({
302
302
  }).use(Xe, {
303
303
  iconClass: "ai-blueking-icon ai-blueking-copy",
304
304
  buttonClass: "ai-blueking-copy-button"
305
- }).use(nt), t = o, n = X(() => {
305
+ }).use(nt), t = o, n = q(() => {
306
306
  var r;
307
307
  const e = {
308
308
  error: "ai-blueking-icon ai-blueking-warning-circle-fill",
@@ -310,7 +310,7 @@ const st = /* @__PURE__ */ E({
310
310
  success: ""
311
311
  };
312
312
  return (r = t.message) != null && r.status ? e[t.message.status] : "";
313
- }), l = X(() => t.message.content ? s.render(t.message.content) : ""), a = X(() => {
313
+ }), i = q(() => t.message.content ? s.render(t.message.content) : ""), a = q(() => {
314
314
  const e = ne(t.message.time), r = ne();
315
315
  return t.message.time ? r.isSame(e, "year") ? e.format("MM-DD HH:mm:ss") : e.format("YYYY-MM-DD HH:mm:ss") : "";
316
316
  });
@@ -321,47 +321,47 @@ const st = /* @__PURE__ */ E({
321
321
  },
322
322
  [
323
323
  e.message.cite ? (m(), g("div", lt, [
324
- T(Le, {
324
+ V(Le, {
325
325
  text: e.message.cite
326
326
  }, null, 8, ["text"])
327
- ])) : z("v-if", !0),
328
- d("div", it, [
329
- e.message.role === c(Se).User ? (m(), g(
330
- K,
327
+ ])) : S("v-if", !0),
328
+ p("div", it, [
329
+ e.message.role === d(Se).User ? (m(), g(
330
+ U,
331
331
  { key: 0 },
332
332
  [
333
- d("p", rt, [
333
+ p("p", rt, [
334
334
  a.value ? (m(), g(
335
335
  "span",
336
336
  ct,
337
337
  P(a.value),
338
338
  1
339
339
  /* TEXT */
340
- )) : z("v-if", !0),
341
- d("span", {
340
+ )) : S("v-if", !0),
341
+ p("span", {
342
342
  class: "markdown-message",
343
- innerHTML: l.value
343
+ innerHTML: i.value
344
344
  }, null, 8, dt)
345
345
  ]),
346
- d("span", ut, [
347
- d("img", { src: e.userPhoto }, null, 8, pt)
346
+ p("span", ut, [
347
+ p("img", { src: e.userPhoto }, null, 8, pt)
348
348
  ])
349
349
  ],
350
350
  64
351
351
  /* STABLE_FRAGMENT */
352
352
  )) : (m(), g(
353
- K,
353
+ U,
354
354
  { key: 1 },
355
355
  [
356
- T(at),
357
- d("p", ht, [
356
+ V(at),
357
+ p("p", ht, [
358
358
  a.value ? (m(), g(
359
359
  "span",
360
360
  mt,
361
361
  P(a.value),
362
362
  1
363
363
  /* TEXT */
364
- )) : z("v-if", !0),
364
+ )) : S("v-if", !0),
365
365
  n.value ? (m(), g(
366
366
  "i",
367
367
  {
@@ -371,9 +371,9 @@ const st = /* @__PURE__ */ E({
371
371
  null,
372
372
  2
373
373
  /* CLASS */
374
- )) : z("v-if", !0),
375
- e.message.status === c(oe).Loading ? (m(), g("svg", gt, ft)) : z("v-if", !0),
376
- e.message.status === c(oe).Error ? (m(), g(
374
+ )) : S("v-if", !0),
375
+ e.message.status === d(oe).Loading ? (m(), g("svg", gt, ft)) : S("v-if", !0),
376
+ e.message.status === d(oe).Error ? (m(), g(
377
377
  "span",
378
378
  bt,
379
379
  P(e.message.content),
@@ -381,10 +381,10 @@ const st = /* @__PURE__ */ E({
381
381
  /* TEXT */
382
382
  )) : (m(), g("span", {
383
383
  key: 4,
384
- innerHTML: l.value,
384
+ innerHTML: i.value,
385
385
  class: ee({
386
386
  "markdown-message": !0,
387
- loading: e.message.status === c(oe).Loading
387
+ loading: e.message.status === d(oe).Loading
388
388
  })
389
389
  }, null, 10, yt))
390
390
  ])
@@ -407,13 +407,13 @@ const st = /* @__PURE__ */ E({
407
407
  },
408
408
  emits: ["change-prompt", "update:value", "enter", "choose-prompt"],
409
409
  setup(o, { emit: s }) {
410
- const t = o, n = s, l = Re, a = ue, { selectedText: e, lockSelectedText: r } = pe(), h = x(""), S = x(40), C = x(), y = x(!1), B = X(() => {
410
+ const t = o, n = s, i = Re, a = ue, { selectedText: e, lockSelectedText: r } = pe(), c = x(""), M = x(40), B = x(), y = x(!1), H = q(() => {
411
411
  var v;
412
- return ((v = t.prompts) == null ? void 0 : v.filter((L) => L.content.includes(h.value))) || [];
413
- }), M = X(() => {
412
+ return ((v = t.prompts) == null ? void 0 : v.filter((L) => L.content.includes(c.value))) || [];
413
+ }), z = q(() => {
414
414
  var v;
415
415
  return t.placeholder ? t.placeholder : (v = t.prompts) != null && v.length ? f("您可以键入 “/” 查看更多Prompt") : f("请输入");
416
- }), H = (v) => {
416
+ }), T = (v) => {
417
417
  n("update:value", v), n("change-prompt", v);
418
418
  }, R = () => {
419
419
  var v;
@@ -421,20 +421,20 @@ const st = /* @__PURE__ */ E({
421
421
  }, u = () => {
422
422
  ke(() => {
423
423
  var L;
424
- const v = (L = C.value) == null ? void 0 : L.$el.querySelector("textarea");
425
- (v == null ? void 0 : v.scrollHeight) > 40 && t.value ? S.value = v.scrollHeight <= 300 ? v.scrollHeight : 300 : S.value = 40;
424
+ const v = (L = B.value) == null ? void 0 : L.$el.querySelector("textarea");
425
+ (v == null ? void 0 : v.scrollHeight) > 40 && t.value ? M.value = v.scrollHeight <= 300 ? v.scrollHeight : 300 : M.value = 40;
426
426
  });
427
427
  }, I = (v) => {
428
- n("update:value", v.content), n("choose-prompt", v), k(), W();
429
- }, J = (v, L) => {
428
+ n("update:value", v.content), n("choose-prompt", v), k(), J();
429
+ }, O = (v, L) => {
430
430
  L.key === "Enter" && !L.shiftKey && (L.preventDefault(), n("enter"));
431
- }, Z = () => {
432
- H("");
433
- }, W = () => {
431
+ }, N = () => {
432
+ T("");
433
+ }, J = () => {
434
434
  var L;
435
- const v = (L = C.value) == null ? void 0 : L.$el.querySelector("textarea");
435
+ const v = (L = B.value) == null ? void 0 : L.$el.querySelector("textarea");
436
436
  v == null || v.focus();
437
- }, p = () => {
437
+ }, h = () => {
438
438
  e.value && (r.value = !0);
439
439
  }, b = () => {
440
440
  y.value = !0;
@@ -446,7 +446,7 @@ const st = /* @__PURE__ */ E({
446
446
  () => {
447
447
  u(), R();
448
448
  }
449
- ), se(W), (v, L) => (m(), q(c(Te), {
449
+ ), se(J), (v, L) => (m(), K(d(Te), {
450
450
  width: "calc(100% - 118px)",
451
451
  "ext-cls": "empty-padding",
452
452
  arrow: !1,
@@ -457,37 +457,37 @@ const st = /* @__PURE__ */ E({
457
457
  theme: "light",
458
458
  trigger: "manual"
459
459
  }, {
460
- content: G(() => {
461
- var O;
460
+ content: Z(() => {
461
+ var F;
462
462
  return [
463
- d("div", null, [
464
- A((m(), g("section", wt, [
465
- T(c(me), {
463
+ p("div", null, [
464
+ X((m(), g("section", wt, [
465
+ V(d(me), {
466
466
  class: "input-search",
467
- modelValue: h.value,
468
- "onUpdate:modelValue": L[0] || (L[0] = (U) => h.value = U),
467
+ modelValue: c.value,
468
+ "onUpdate:modelValue": L[0] || (L[0] = (Q) => c.value = Q),
469
469
  behavior: "simplicity",
470
470
  clearable: ""
471
471
  }, null, 8, ["modelValue"]),
472
- d("section", Lt, [
472
+ p("section", Lt, [
473
473
  (m(!0), g(
474
- K,
474
+ U,
475
475
  null,
476
- re(B.value, (U, ce) => A((m(), g("span", {
476
+ re(H.value, (Q, ce) => X((m(), g("span", {
477
477
  class: "group-prompt",
478
478
  key: ce,
479
- onClick: (he) => I(U)
479
+ onClick: (he) => I(Q)
480
480
  }, [
481
- d(
481
+ p(
482
482
  "span",
483
483
  Mt,
484
- P(U.content),
484
+ P(Q.content),
485
485
  1
486
486
  /* TEXT */
487
487
  )
488
488
  ], 8, St)), [
489
- [c(a), {
490
- content: U.content,
489
+ [d(a), {
490
+ content: Q.content,
491
491
  placement: "right",
492
492
  theme: "light",
493
493
  width: 300,
@@ -497,7 +497,7 @@ const st = /* @__PURE__ */ E({
497
497
  128
498
498
  /* KEYED_FRAGMENT */
499
499
  )),
500
- (O = B.value) != null && O.length ? z("v-if", !0) : (m(), q(c(Pe), {
500
+ (F = H.value) != null && F.length ? S("v-if", !0) : (m(), K(d(Pe), {
501
501
  key: 0,
502
502
  class: "exception-wrap-item exception-part",
503
503
  scene: "part",
@@ -505,41 +505,41 @@ const st = /* @__PURE__ */ E({
505
505
  }))
506
506
  ])
507
507
  ])), [
508
- [c(l), k]
508
+ [d(i), k]
509
509
  ])
510
510
  ])
511
511
  ];
512
512
  }),
513
- default: G(() => [
514
- d(
513
+ default: Z(() => [
514
+ p(
515
515
  "section",
516
516
  {
517
- style: j({
518
- "--text-height": S.value + "px"
517
+ style: G({
518
+ "--text-height": M.value + "px"
519
519
  }),
520
520
  class: "send-prompt-container"
521
521
  },
522
522
  [
523
- T(c(me), {
523
+ V(d(me), {
524
524
  ref_key: "inputRef",
525
- ref: C,
525
+ ref: B,
526
526
  class: "send-prompt",
527
527
  autosize: !1,
528
528
  clearable: !0,
529
529
  "model-value": v.value,
530
530
  "native-attributes": { autofocus: "autofocus" },
531
- placeholder: M.value,
531
+ placeholder: z.value,
532
532
  row: "1",
533
533
  type: "textarea",
534
- onFocus: p,
535
- onInput: H,
536
- onKeydown: J
534
+ onFocus: h,
535
+ onInput: T,
536
+ onKeydown: O
537
537
  }, null, 8, ["model-value", "placeholder"]),
538
- v.value ? (m(), q(c(qe), {
538
+ v.value ? (m(), K(d(qe), {
539
539
  key: 0,
540
540
  class: "show-clear-only-hover bk-input--clear-icon clear-icon",
541
- onClick: Z
542
- })) : z("v-if", !0)
541
+ onClick: N
542
+ })) : S("v-if", !0)
543
543
  ],
544
544
  4
545
545
  /* STYLE */
@@ -556,20 +556,20 @@ const st = /* @__PURE__ */ E({
556
556
  },
557
557
  emits: ["select"],
558
558
  setup(o, { emit: s }) {
559
- const t = s, n = (l) => {
560
- t("select", l);
559
+ const t = s, n = (i) => {
560
+ t("select", i);
561
561
  };
562
- return (l, a) => (m(), g("ul", Bt, [
562
+ return (i, a) => (m(), g("ul", Bt, [
563
563
  (m(!0), g(
564
- K,
564
+ U,
565
565
  null,
566
- re(l.shortcuts, (e) => (m(), q(c(Ve), {
566
+ re(i.shortcuts, (e) => (m(), K(d(Ve), {
567
567
  class: "ai-blueking-shortcut",
568
568
  key: e.label,
569
569
  theme: "info",
570
570
  onClick: (r) => n(e)
571
571
  }, {
572
- default: G(() => [
572
+ default: Z(() => [
573
573
  te(
574
574
  P(e.label),
575
575
  1
@@ -584,7 +584,7 @@ const st = /* @__PURE__ */ E({
584
584
  ))
585
585
  ]));
586
586
  }
587
- }), Tt = /* @__PURE__ */ Y(Ht, [["__scopeId", "data-v-266e17ca"]]), Pt = (o) => (le("data-v-fd57f18d"), o = o(), ie(), o), Rt = /* @__PURE__ */ Pt(() => /* @__PURE__ */ d(
587
+ }), Tt = /* @__PURE__ */ Y(Ht, [["__scopeId", "data-v-266e17ca"]]), Pt = (o) => (le("data-v-fd57f18d"), o = o(), ie(), o), Rt = /* @__PURE__ */ Pt(() => /* @__PURE__ */ p(
588
588
  "svg",
589
589
  {
590
590
  width: "10",
@@ -593,7 +593,7 @@ const st = /* @__PURE__ */ E({
593
593
  "aria-hidden": "true"
594
594
  },
595
595
  [
596
- /* @__PURE__ */ d("use", { "xlink:href": "#ai-blueking-tingzhi" })
596
+ /* @__PURE__ */ p("use", { "xlink:href": "#ai-blueking-tingzhi" })
597
597
  ],
598
598
  -1
599
599
  /* HOISTED */
@@ -607,18 +607,18 @@ const st = /* @__PURE__ */ E({
607
607
  const t = s, n = () => {
608
608
  t("stop");
609
609
  };
610
- return (l, a) => l.isShow ? (m(), g("span", {
610
+ return (i, a) => i.isShow ? (m(), g("span", {
611
611
  key: 0,
612
612
  class: "ai-blueking-render-stop",
613
613
  onClick: n
614
614
  }, [
615
615
  Rt,
616
616
  te(
617
- " " + P(c(f)("终止生成")),
617
+ " " + P(d(f)("终止生成")),
618
618
  1
619
619
  /* TEXT */
620
620
  )
621
- ])) : z("v-if", !0);
621
+ ])) : S("v-if", !0);
622
622
  }
623
623
  }), Dt = /* @__PURE__ */ Y(Vt, [["__scopeId", "data-v-fd57f18d"]]), xt = {
624
624
  key: 0,
@@ -629,9 +629,9 @@ const st = /* @__PURE__ */ E({
629
629
  message: {}
630
630
  },
631
631
  setup(o) {
632
- const s = o, t = X(() => {
632
+ const s = o, t = q(() => {
633
633
  var e;
634
- const n = ne(s.message.time), l = ne(), a = {
634
+ const n = ne(s.message.time), i = ne(), a = {
635
635
  0: f("日"),
636
636
  1: f("一"),
637
637
  2: f("二"),
@@ -642,17 +642,17 @@ const st = /* @__PURE__ */ E({
642
642
  };
643
643
  return !s.message.time || (e = window.showTimes) != null && e.some(
644
644
  (r) => Math.abs(n.diff(r, "minute")) < 10 && r !== s.message.time
645
- ) ? "" : (window.showTimes = [...window.showTimes || [], s.message.time], l.isSame(n, "day") ? n.format("HH:mm:ss") : l.subtract(1, "day").isSame(n, "week") ? f("昨天") + " " + n.format("HH:mm:ss") : l.isSame(n, "week") ? f("本周") + a[n.day()] + " " + n.format("HH:mm:ss") : l.subtract(1, "week").isSame(n, "week") ? f("上周") + a[n.day()] + " " + n.format("HH:mm:ss") : l.isSame(n, "year") ? n.format("MM-DD HH:mm:ss") : n.format("YYYY-MM-DD HH:mm:ss"));
645
+ ) ? "" : (window.showTimes = [...window.showTimes || [], s.message.time], i.isSame(n, "day") ? n.format("HH:mm:ss") : i.subtract(1, "day").isSame(n, "week") ? f("昨天") + " " + n.format("HH:mm:ss") : i.isSame(n, "week") ? f("本周") + a[n.day()] + " " + n.format("HH:mm:ss") : i.subtract(1, "week").isSame(n, "week") ? f("上周") + a[n.day()] + " " + n.format("HH:mm:ss") : i.isSame(n, "year") ? n.format("MM-DD HH:mm:ss") : n.format("YYYY-MM-DD HH:mm:ss"));
646
646
  });
647
- return (n, l) => t.value ? (m(), g("section", xt, [
648
- d(
647
+ return (n, i) => t.value ? (m(), g("section", xt, [
648
+ p(
649
649
  "span",
650
650
  Et,
651
651
  P(t.value),
652
652
  1
653
653
  /* TEXT */
654
654
  )
655
- ])) : z("v-if", !0);
655
+ ])) : S("v-if", !0);
656
656
  }
657
657
  }), It = /* @__PURE__ */ Y(Yt, [["__scopeId", "data-v-55c9a119"]]), Me = (o) => (le("data-v-de79ff73"), o = o(), ie(), o), At = {
658
658
  key: 0,
@@ -660,7 +660,7 @@ const st = /* @__PURE__ */ E({
660
660
  height: "18",
661
661
  class: "scroll-loading-icon",
662
662
  "aria-hidden": "true"
663
- }, Xt = /* @__PURE__ */ Me(() => /* @__PURE__ */ d(
663
+ }, Xt = /* @__PURE__ */ Me(() => /* @__PURE__ */ p(
664
664
  "use",
665
665
  { "xlink:href": "#ai-blueking-loading-2" },
666
666
  null,
@@ -668,7 +668,7 @@ const st = /* @__PURE__ */ E({
668
668
  /* HOISTED */
669
669
  )), qt = [
670
670
  Xt
671
- ], Kt = { class: "ai-operation" }, Ut = { class: "ai-operation-input-wrapper" }, Qt = { class: "ai-cite-tips" }, jt = { class: "ai-operation-input" }, Wt = /* @__PURE__ */ Me(() => /* @__PURE__ */ d(
671
+ ], Kt = { class: "ai-operation" }, Ut = { class: "ai-operation-input-wrapper" }, Qt = { class: "ai-cite-tips" }, Wt = { class: "ai-operation-input" }, jt = /* @__PURE__ */ Me(() => /* @__PURE__ */ p(
672
672
  "i",
673
673
  { class: "ai-blueking-icon ai-blueking-fasong" },
674
674
  null,
@@ -690,53 +690,53 @@ const st = /* @__PURE__ */ E({
690
690
  },
691
691
  emits: ["ai-click", "change-prompt", "send", "choose-prompt", "scroll-load", "stop"],
692
692
  setup(o, { expose: s, emit: t }) {
693
- const n = o, l = t, a = ue, e = x(""), { selectedText: r, clearSelection: h } = pe(), { isShow: S } = we(), C = () => {
693
+ const n = o, i = t, a = ue, e = x(""), { selectedText: r, clearSelection: c } = pe(), { isShow: M } = we(), B = () => {
694
694
  ke(() => {
695
- const p = document.querySelector(".ai-blueking-messages");
696
- p.scrollTop = p.scrollHeight;
695
+ const h = document.querySelector(".ai-blueking-messages");
696
+ h.scrollTop = h.scrollHeight;
697
697
  });
698
- }, y = Qe((p) => {
698
+ }, y = Qe((h) => {
699
699
  if (n.scrollLoading || n.scrollLoadingEnd)
700
700
  return;
701
- p.target.scrollTop < 200 && l("scroll-load");
702
- }), B = () => {
701
+ h.target.scrollTop < 200 && i("scroll-load");
702
+ }), H = () => {
703
703
  if (e.value) {
704
704
  if (n.loading) {
705
705
  ge({ theme: "warning", message: f("内容正在执行中,请执行完成后再发送") });
706
706
  return;
707
707
  }
708
- l("send", {
708
+ i("send", {
709
709
  content: e.value,
710
710
  cite: r.value
711
711
  }), e.value = "", r.value = "";
712
712
  }
713
- }, M = (p) => {
714
- l("choose-prompt", p);
715
- }, H = (p) => {
716
- l("change-prompt", p);
713
+ }, z = (h) => {
714
+ i("choose-prompt", h);
715
+ }, T = (h) => {
716
+ i("change-prompt", h);
717
717
  }, R = () => {
718
- l("stop");
719
- }, u = (p) => {
720
- const b = p.target;
718
+ i("stop");
719
+ }, u = (h) => {
720
+ const b = h.target;
721
721
  if (b != null && b.classList.contains("ai-blueking-angle-up")) {
722
722
  const k = b == null ? void 0 : b.parentElement;
723
723
  k != null && k.classList.contains("closed") ? k == null || k.classList.remove("closed") : k == null || k.classList.add("closed");
724
724
  }
725
- b != null && b.classList.contains("ai-clickable") && l("ai-click", b.dataset.ai);
725
+ b != null && b.classList.contains("ai-clickable") && i("ai-click", b.dataset.ai);
726
726
  }, I = () => {
727
- C(), document.addEventListener("click", u);
728
- }, J = () => {
727
+ B(), document.addEventListener("click", u);
728
+ }, O = () => {
729
729
  window.showTimes = [], document.removeEventListener("click", u);
730
- }, Z = (p) => {
731
- e.value = p;
732
- }, W = (p) => {
733
- const b = p.prompt.replace("{{ SELECTED_TEXT }}", r.value);
730
+ }, N = (h) => {
731
+ e.value = h;
732
+ }, J = (h) => {
733
+ const b = h.prompt.replace("{{ SELECTED_TEXT }}", r.value);
734
734
  if (n.loading) {
735
735
  ge({ theme: "warning", message: f("内容正在执行中,请执行完成后再发送") });
736
736
  return;
737
737
  }
738
- l("send", {
739
- content: p.label,
738
+ i("send", {
739
+ content: h.label,
740
740
  cite: r.value,
741
741
  prompt: b
742
742
  }), r.value = "";
@@ -744,55 +744,55 @@ const st = /* @__PURE__ */ E({
744
744
  return ye(
745
745
  () => n.messages,
746
746
  () => {
747
- const p = document.querySelector(".ai-blueking-messages");
748
- (p == null ? void 0 : p.scrollTop) + (p == null ? void 0 : p.clientHeight) + 100 >= (p == null ? void 0 : p.scrollHeight) && C();
747
+ const h = document.querySelector(".ai-blueking-messages");
748
+ (h == null ? void 0 : h.scrollTop) + (h == null ? void 0 : h.clientHeight) + 100 >= (h == null ? void 0 : h.scrollHeight) && B();
749
749
  },
750
750
  {
751
751
  deep: !0
752
752
  }
753
- ), se(I), ae(J), s({
754
- setInputMessage: Z
755
- }), (p, b) => (m(), g(
753
+ ), se(I), ae(O), s({
754
+ setInputMessage: N
755
+ }), (h, b) => (m(), g(
756
756
  "section",
757
757
  {
758
- style: j({
759
- background: p.background
758
+ style: G({
759
+ background: h.background
760
760
  }),
761
761
  class: "ai-content"
762
762
  },
763
763
  [
764
- p.alert ? (m(), q(c(De), {
764
+ h.alert ? (m(), K(d(De), {
765
765
  key: 0,
766
- title: p.alert,
766
+ title: h.alert,
767
767
  theme: "warning",
768
768
  closable: ""
769
- }, null, 8, ["title"])) : z("v-if", !0),
770
- d(
769
+ }, null, 8, ["title"])) : S("v-if", !0),
770
+ p(
771
771
  "ul",
772
772
  {
773
773
  class: "ai-messages ai-blueking-messages",
774
774
  onScrollPassive: b[0] || (b[0] = //@ts-ignore
775
- (...k) => c(y) && c(y)(...k))
775
+ (...k) => d(y) && d(y)(...k))
776
776
  },
777
777
  [
778
- p.scrollLoading ? (m(), g("svg", At, qt)) : z("v-if", !0),
778
+ h.scrollLoading ? (m(), g("svg", At, qt)) : S("v-if", !0),
779
779
  (m(!0), g(
780
- K,
780
+ U,
781
781
  null,
782
- re(p.messages, (k) => (m(), g(
783
- K,
782
+ re(h.messages, (k) => (m(), g(
783
+ U,
784
784
  {
785
785
  key: k.content
786
786
  },
787
787
  [
788
- T(It, {
788
+ V(It, {
789
789
  class: "render-message",
790
790
  message: k
791
791
  }, null, 8, ["message"]),
792
- T(kt, {
792
+ V(kt, {
793
793
  class: "render-message",
794
794
  message: k,
795
- "user-photo": p.userPhoto
795
+ "user-photo": h.userPhoto
796
796
  }, null, 8, ["message", "user-photo"])
797
797
  ],
798
798
  64
@@ -805,8 +805,8 @@ const st = /* @__PURE__ */ E({
805
805
  32
806
806
  /* NEED_HYDRATION */
807
807
  ),
808
- d("section", Kt, [
809
- d(
808
+ p("section", Kt, [
809
+ p(
810
810
  "section",
811
811
  {
812
812
  class: "ai-operation-tools",
@@ -814,66 +814,66 @@ const st = /* @__PURE__ */ E({
814
814
  }, ["prevent"]))
815
815
  },
816
816
  [
817
- T(tt),
818
- T(Dt, {
819
- "is-show": p.loading,
817
+ V(tt),
818
+ V(Dt, {
819
+ "is-show": h.loading,
820
820
  onStop: R
821
821
  }, null, 8, ["is-show"])
822
822
  ],
823
823
  32
824
824
  /* NEED_HYDRATION */
825
825
  ),
826
- d("section", Ut, [
827
- c(r) ? (m(), g(
826
+ p("section", Ut, [
827
+ d(r) ? (m(), g(
828
828
  "div",
829
829
  {
830
830
  key: 0,
831
- class: ee(["ai-cite-container", { "is-back-show": !c(S) }]),
831
+ class: ee(["ai-cite-container", { "is-back-show": !d(M) }]),
832
832
  onMousedown: b[2] || (b[2] = D(() => {
833
833
  }, ["prevent"]))
834
834
  },
835
835
  [
836
- T(Le, {
836
+ V(Le, {
837
837
  "show-close-icon": !0,
838
- text: c(r),
839
- onClose: c(h)
838
+ text: d(r),
839
+ onClose: d(c)
840
840
  }, null, 8, ["text", "onClose"]),
841
- d(
841
+ p(
842
842
  "span",
843
843
  Qt,
844
- P(c(f)("想对选中的文本做什么")),
844
+ P(d(f)("想对选中的文本做什么")),
845
845
  1
846
846
  /* TEXT */
847
847
  ),
848
- T(Tt, {
849
- shortcuts: p.shortcuts,
850
- onSelect: W
848
+ V(Tt, {
849
+ shortcuts: h.shortcuts,
850
+ onSelect: J
851
851
  }, null, 8, ["shortcuts"])
852
852
  ],
853
853
  34
854
854
  /* CLASS, NEED_HYDRATION */
855
- )) : z("v-if", !0),
856
- d("section", jt, [
857
- T(Ct, {
855
+ )) : S("v-if", !0),
856
+ p("section", Wt, [
857
+ V(Ct, {
858
858
  value: e.value,
859
859
  "onUpdate:value": b[3] || (b[3] = (k) => e.value = k),
860
- placeholder: p.placeholder,
861
- prompts: p.prompts,
862
- onChangePrompt: H,
863
- onChoosePrompt: M,
864
- onEnter: B
860
+ placeholder: h.placeholder,
861
+ prompts: h.prompts,
862
+ onChangePrompt: T,
863
+ onChoosePrompt: z,
864
+ onEnter: H
865
865
  }, null, 8, ["value", "placeholder", "prompts"]),
866
- A((m(), q(c(xe), {
866
+ X((m(), K(d(xe), {
867
867
  class: "ai-operation-button",
868
- disabled: p.loading || !e.value,
868
+ disabled: h.loading || !e.value,
869
869
  size: "large",
870
870
  theme: "primary",
871
- onClick: B
871
+ onClick: H
872
872
  }, {
873
- default: G(() => [
874
- Wt,
873
+ default: Z(() => [
874
+ jt,
875
875
  te(
876
- " " + P(c(f)("发送")),
876
+ " " + P(d(f)("发送")),
877
877
  1
878
878
  /* TEXT */
879
879
  )
@@ -881,9 +881,9 @@ const st = /* @__PURE__ */ E({
881
881
  _: 1
882
882
  /* STABLE */
883
883
  }, 8, ["disabled"])), [
884
- [c(a), {
885
- content: c(f)("内容正在执行中,请执行完成后再发送"),
886
- disabled: !p.loading
884
+ [d(a), {
885
+ content: d(f)("内容正在执行中,请执行完成后再发送"),
886
+ disabled: !h.loading
887
887
  }]
888
888
  ])
889
889
  ])
@@ -921,7 +921,7 @@ const st = /* @__PURE__ */ E({
921
921
  },
922
922
  emits: ["clear", "close", "choose-model"],
923
923
  setup(o, { emit: s }) {
924
- const t = o, n = s, l = ue, a = {
924
+ const t = o, n = s, i = ue, a = {
925
925
  height: window.innerHeight,
926
926
  width: window.innerWidth
927
927
  }, e = {
@@ -929,123 +929,128 @@ const st = /* @__PURE__ */ E({
929
929
  type: "",
930
930
  clientX: 0,
931
931
  clientY: 0
932
- }, r = () => {
933
- var w, V, N, F;
934
- const i = (_, Ce) => _ === void 0 ? Ce : _;
932
+ }, c = x((() => {
933
+ var w, C, A, W;
934
+ const l = (_, Ce) => _ === void 0 ? Ce : _;
935
935
  return {
936
- top: i((w = t.startPosition) == null ? void 0 : w.top, a.height - t.sizeLimit.height),
937
- bottom: i((V = t.startPosition) == null ? void 0 : V.bottom, 0),
938
- left: i((N = t.startPosition) == null ? void 0 : N.left, 0),
939
- right: i((F = t.startPosition) == null ? void 0 : F.right, a.width - t.sizeLimit.width)
936
+ top: l((w = t.startPosition) == null ? void 0 : w.top, a.height - t.sizeLimit.height),
937
+ bottom: l((C = t.startPosition) == null ? void 0 : C.bottom, 0),
938
+ left: l((A = t.startPosition) == null ? void 0 : A.left, 0),
939
+ right: l((W = t.startPosition) == null ? void 0 : W.right, a.width - t.sizeLimit.width)
940
940
  };
941
- }, h = x(r()), S = X(() => h.value.top <= t.positionLimit.top && h.value.bottom <= t.positionLimit.bottom), C = (i) => {
942
- n("choose-model", i);
941
+ })()), M = q(() => c.value.top <= t.positionLimit.top && c.value.bottom <= t.positionLimit.bottom), B = (l) => {
942
+ n("choose-model", l);
943
943
  }, y = () => {
944
944
  document.querySelectorAll("iframe").forEach((w) => {
945
945
  w.style.pointerEvents = "none";
946
946
  });
947
- }, B = () => {
947
+ }, H = () => {
948
948
  document.querySelectorAll("iframe").forEach((w) => {
949
949
  w.style.pointerEvents = "auto";
950
950
  });
951
- }, M = (i) => {
952
- y(), e.isMove = !0, e.type = "move", e.clientX = i.clientX, e.clientY = i.clientY;
953
- }, H = (i) => {
954
- y(), e.isMove = !0, e.type = "rightDrag", e.clientX = i.clientX;
955
- }, R = (i) => {
956
- y(), e.isMove = !0, e.type = "leftDrag", e.clientX = i.clientX;
957
- }, u = (i) => {
958
- y(), e.isMove = !0, e.type = "topDrag", e.clientY = i.clientY;
959
- }, I = (i) => {
960
- y(), e.isMove = !0, e.type = "bottomDrag", e.clientY = i.clientY;
961
- }, J = (i) => {
962
- y(), e.isMove = !0, e.type = "topLeftDrag", e.clientY = i.clientY, e.clientX = i.clientX;
963
- }, Z = (i) => {
964
- y(), e.isMove = !0, e.type = "topRightDrag", e.clientY = i.clientY, e.clientX = i.clientX;
965
- }, W = (i) => {
966
- y(), e.isMove = !0, e.type = "bottomLeftDrag", e.clientY = i.clientY, e.clientX = i.clientX;
967
- }, p = (i) => {
968
- y(), e.isMove = !0, e.type = "bottomRightDrag", e.clientY = i.clientY, e.clientX = i.clientX;
951
+ }, z = (l) => {
952
+ y(), e.isMove = !0, e.type = "move", e.clientX = l.clientX, e.clientY = l.clientY;
953
+ }, T = (l) => {
954
+ y(), e.isMove = !0, e.type = "rightDrag", e.clientX = l.clientX;
955
+ }, R = (l) => {
956
+ y(), e.isMove = !0, e.type = "leftDrag", e.clientX = l.clientX;
957
+ }, u = (l) => {
958
+ y(), e.isMove = !0, e.type = "topDrag", e.clientY = l.clientY;
959
+ }, I = (l) => {
960
+ y(), e.isMove = !0, e.type = "bottomDrag", e.clientY = l.clientY;
961
+ }, O = (l) => {
962
+ y(), e.isMove = !0, e.type = "topLeftDrag", e.clientY = l.clientY, e.clientX = l.clientX;
963
+ }, N = (l) => {
964
+ y(), e.isMove = !0, e.type = "topRightDrag", e.clientY = l.clientY, e.clientX = l.clientX;
965
+ }, J = (l) => {
966
+ y(), e.isMove = !0, e.type = "bottomLeftDrag", e.clientY = l.clientY, e.clientX = l.clientX;
967
+ }, h = (l) => {
968
+ y(), e.isMove = !0, e.type = "bottomRightDrag", e.clientY = l.clientY, e.clientX = l.clientX;
969
969
  }, b = () => {
970
- e.isMove = !1, B();
971
- }, k = (i, w) => {
972
- ["move", "leftDrag"].includes(e.type) && (h.value.left += i), ["move", "rightDrag"].includes(e.type) && (h.value.right -= i), ["move", "topDrag"].includes(e.type) && (h.value.top += w), ["move", "bottomDrag"].includes(e.type) && (h.value.bottom -= w), ["topLeftDrag"].includes(e.type) && (h.value.left += i, h.value.top += w), ["topRightDrag"].includes(e.type) && (h.value.right -= i, h.value.top += w), ["bottomLeftDrag"].includes(e.type) && (h.value.left += i, h.value.bottom -= w), ["bottomRightDrag"].includes(e.type) && (h.value.right -= i, h.value.bottom -= w);
973
- }, v = (i, w) => {
974
- const { top: V, bottom: N, left: F, right: _ } = h.value;
975
- (a.width - F - _ < t.sizeLimit.width || F < t.positionLimit.left || _ < t.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(e.type) && (h.value.left -= i), ["move", "rightDrag", "topRightDrag", "bottomRightDrag"].includes(e.type) && (h.value.right += i)), (a.height - V - N < t.sizeLimit.height || V < t.positionLimit.top || N < t.positionLimit.bottom) && (["move", "topDrag", "topRightDrag", "topLeftDrag"].includes(e.type) && (h.value.top -= w), ["move", "bottomDrag", "bottomLeftDrag", "bottomRightDrag"].includes(e.type) && (h.value.bottom += w));
976
- }, L = (i) => {
970
+ e.isMove = !1, H();
971
+ }, k = (l, w) => {
972
+ ["move", "leftDrag"].includes(e.type) && (c.value.left += l), ["move", "rightDrag"].includes(e.type) && (c.value.right -= l), ["move", "topDrag"].includes(e.type) && (c.value.top += w), ["move", "bottomDrag"].includes(e.type) && (c.value.bottom -= w), ["topLeftDrag"].includes(e.type) && (c.value.left += l, c.value.top += w), ["topRightDrag"].includes(e.type) && (c.value.right -= l, c.value.top += w), ["bottomLeftDrag"].includes(e.type) && (c.value.left += l, c.value.bottom -= w), ["bottomRightDrag"].includes(e.type) && (c.value.right -= l, c.value.bottom -= w);
973
+ }, v = (l, w) => {
974
+ const { top: C, bottom: A, left: W, right: _ } = c.value;
975
+ (a.width - W - _ < t.sizeLimit.width || W < t.positionLimit.left || _ < t.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(e.type) && (c.value.left -= l), ["move", "rightDrag", "topRightDrag", "bottomRightDrag"].includes(e.type) && (c.value.right += l)), (a.height - C - A < t.sizeLimit.height || C < t.positionLimit.top || A < t.positionLimit.bottom) && (["move", "topDrag", "topRightDrag", "topLeftDrag"].includes(e.type) && (c.value.top -= w), ["move", "bottomDrag", "bottomLeftDrag", "bottomRightDrag"].includes(e.type) && (c.value.bottom += w));
976
+ }, L = (l) => {
977
977
  if (!e.isMove)
978
978
  return;
979
- i.preventDefault();
980
- const w = i.clientX - e.clientX, V = i.clientY - e.clientY;
981
- k(w, V), v(w, V), e.clientX = i.clientX, e.clientY = i.clientY;
982
- }, O = () => {
983
- a.height = window.innerHeight, a.width = window.innerWidth, h.value = r();
984
- }, U = () => {
985
- h.value.top = t.positionLimit.top, h.value.bottom = t.positionLimit.bottom;
979
+ l.preventDefault();
980
+ const w = l.clientX - e.clientX, C = l.clientY - e.clientY;
981
+ k(w, C), v(w, C), e.clientX = l.clientX, e.clientY = l.clientY;
982
+ }, F = () => {
983
+ const l = window.innerWidth - a.width, w = window.innerHeight - a.height;
984
+ a.height = window.innerHeight, a.width = window.innerWidth;
985
+ const C = (A, W) => {
986
+ c.value[A] += W, c.value[A] < 0 && (c.value[A] = 0);
987
+ };
988
+ C(c.value.top > c.value.bottom ? "top" : "bottom", w), C(c.value.left > c.value.right ? "left" : "right", l);
989
+ }, Q = () => {
990
+ c.value.top = t.positionLimit.top, c.value.bottom = t.positionLimit.bottom;
986
991
  }, ce = () => {
987
- h.value.top = a.height - t.sizeLimit.height, h.value.bottom = t.positionLimit.bottom;
992
+ c.value.top = a.height - t.sizeLimit.height, c.value.bottom = t.positionLimit.bottom;
988
993
  }, he = () => {
989
994
  n("clear");
990
995
  }, ze = () => {
991
996
  n("close");
992
997
  };
993
998
  return Ye(() => {
994
- window.addEventListener("mousemove", L, !0), window.addEventListener("mouseup", b), window.addEventListener("resize", O);
999
+ window.addEventListener("mousemove", L, !0), window.addEventListener("mouseup", b), window.addEventListener("resize", F);
995
1000
  }), ae(() => {
996
- window.removeEventListener("mousemove", L, !0), window.removeEventListener("mouseup", b), window.removeEventListener("resize", O);
997
- }), (i, w) => (m(), g(
1001
+ window.removeEventListener("mousemove", L, !0), window.removeEventListener("mouseup", b), window.removeEventListener("resize", F);
1002
+ }), (l, w) => (m(), g(
998
1003
  "section",
999
1004
  {
1000
- style: j({
1001
- top: h.value.top + "px",
1002
- bottom: h.value.bottom + "px",
1003
- left: h.value.left + "px",
1004
- right: h.value.right + "px"
1005
+ style: G({
1006
+ top: c.value.top + "px",
1007
+ bottom: c.value.bottom + "px",
1008
+ left: c.value.left + "px",
1009
+ right: c.value.right + "px"
1005
1010
  }),
1006
1011
  class: "ai-modal"
1007
1012
  },
1008
1013
  [
1009
- d(
1014
+ p(
1010
1015
  "header",
1011
1016
  {
1012
- style: j({
1013
- background: i.headBackground
1017
+ style: G({
1018
+ background: l.headBackground
1014
1019
  }),
1015
1020
  class: "ai-modal-header",
1016
- onMousedown: D(M, ["stop"])
1021
+ onMousedown: D(z, ["stop"])
1017
1022
  },
1018
1023
  [
1019
- d("span", Zt, [
1020
- d(
1024
+ p("span", Zt, [
1025
+ p(
1021
1026
  "i",
1022
1027
  {
1023
- class: ee(i.logo)
1028
+ class: ee(l.logo)
1024
1029
  },
1025
1030
  null,
1026
1031
  2
1027
1032
  /* CLASS */
1028
1033
  ),
1029
1034
  te(
1030
- " " + P(i.name || c(f)("小鲸")) + " ",
1035
+ " " + P(l.name || d(f)("小鲸")) + " ",
1031
1036
  1
1032
1037
  /* TEXT */
1033
1038
  ),
1034
- i.models ? (m(), q(c(ve), {
1039
+ l.models ? (m(), K(d(ve), {
1035
1040
  key: 0,
1036
1041
  class: "ai-modal-header-models",
1037
- "model-value": i.model,
1042
+ "model-value": l.model,
1038
1043
  size: "small",
1039
- onChange: C
1044
+ onChange: B
1040
1045
  }, {
1041
- default: G(() => [
1046
+ default: Z(() => [
1042
1047
  (m(!0), g(
1043
- K,
1048
+ U,
1044
1049
  null,
1045
- re(i.models, (V) => (m(), q(c(ve).Option, {
1046
- key: V.id,
1047
- name: V.name,
1048
- value: V.id
1050
+ re(l.models, (C) => (m(), K(d(ve).Option, {
1051
+ key: C.id,
1052
+ name: C.name,
1053
+ value: C.id
1049
1054
  }, null, 8, ["name", "value"]))),
1050
1055
  128
1051
1056
  /* KEYED_FRAGMENT */
@@ -1053,10 +1058,10 @@ const st = /* @__PURE__ */ E({
1053
1058
  ]),
1054
1059
  _: 1
1055
1060
  /* STABLE */
1056
- }, 8, ["model-value"])) : z("v-if", !0)
1061
+ }, 8, ["model-value"])) : S("v-if", !0)
1057
1062
  ]),
1058
- d("span", null, [
1059
- S.value ? A((m(), g(
1063
+ p("span", null, [
1064
+ M.value ? X((m(), g(
1060
1065
  "i",
1061
1066
  {
1062
1067
  key: 0,
@@ -1067,27 +1072,27 @@ const st = /* @__PURE__ */ E({
1067
1072
  512
1068
1073
  /* NEED_PATCH */
1069
1074
  )), [
1070
- [c(l), {
1071
- content: c(f)("向下收缩"),
1075
+ [d(i), {
1076
+ content: d(f)("向下收缩"),
1072
1077
  distance: 20
1073
1078
  }]
1074
- ]) : A((m(), g(
1079
+ ]) : X((m(), g(
1075
1080
  "i",
1076
1081
  {
1077
1082
  key: 1,
1078
1083
  class: "ai-header-tool ai-blueking-icon ai-blueking-shangxialashen-2",
1079
- onClick: U
1084
+ onClick: Q
1080
1085
  },
1081
1086
  null,
1082
1087
  512
1083
1088
  /* NEED_PATCH */
1084
1089
  )), [
1085
- [c(l), {
1086
- content: c(f)("向上扩展"),
1090
+ [d(i), {
1091
+ content: d(f)("向上扩展"),
1087
1092
  distance: 20
1088
1093
  }]
1089
1094
  ]),
1090
- A(d(
1095
+ X(p(
1091
1096
  "i",
1092
1097
  {
1093
1098
  class: "ai-header-tool ai-blueking-icon ai-blueking-saoba",
@@ -1097,12 +1102,12 @@ const st = /* @__PURE__ */ E({
1097
1102
  512
1098
1103
  /* NEED_PATCH */
1099
1104
  ), [
1100
- [c(l), {
1101
- content: c(f)("清空聊天记录"),
1105
+ [d(i), {
1106
+ content: d(f)("清空聊天记录"),
1102
1107
  distance: 20
1103
1108
  }]
1104
1109
  ]),
1105
- A(d(
1110
+ X(p(
1106
1111
  "i",
1107
1112
  {
1108
1113
  class: "ai-header-tool ai-blueking-icon ai-blueking-shanchu-2",
@@ -1112,8 +1117,8 @@ const st = /* @__PURE__ */ E({
1112
1117
  512
1113
1118
  /* NEED_PATCH */
1114
1119
  ), [
1115
- [c(l), {
1116
- content: c(f)("关闭"),
1120
+ [d(i), {
1121
+ content: d(f)("关闭"),
1117
1122
  distance: 20
1118
1123
  }]
1119
1124
  ])
@@ -1122,8 +1127,8 @@ const st = /* @__PURE__ */ E({
1122
1127
  36
1123
1128
  /* STYLE, NEED_HYDRATION */
1124
1129
  ),
1125
- Ie(i.$slots, "default", {}, void 0, !0),
1126
- d(
1130
+ Ie(l.$slots, "default", {}, void 0, !0),
1131
+ p(
1127
1132
  "span",
1128
1133
  {
1129
1134
  class: "drag-line left",
@@ -1133,17 +1138,17 @@ const st = /* @__PURE__ */ E({
1133
1138
  32
1134
1139
  /* NEED_HYDRATION */
1135
1140
  ),
1136
- d(
1141
+ p(
1137
1142
  "span",
1138
1143
  {
1139
1144
  class: "drag-line right",
1140
- onMousedown: D(H, ["stop"])
1145
+ onMousedown: D(T, ["stop"])
1141
1146
  },
1142
1147
  null,
1143
1148
  32
1144
1149
  /* NEED_HYDRATION */
1145
1150
  ),
1146
- d(
1151
+ p(
1147
1152
  "span",
1148
1153
  {
1149
1154
  class: "drag-line top",
@@ -1153,7 +1158,7 @@ const st = /* @__PURE__ */ E({
1153
1158
  32
1154
1159
  /* NEED_HYDRATION */
1155
1160
  ),
1156
- d(
1161
+ p(
1157
1162
  "span",
1158
1163
  {
1159
1164
  class: "drag-line bottom",
@@ -1163,41 +1168,41 @@ const st = /* @__PURE__ */ E({
1163
1168
  32
1164
1169
  /* NEED_HYDRATION */
1165
1170
  ),
1166
- d(
1171
+ p(
1167
1172
  "span",
1168
1173
  {
1169
1174
  class: "drag-line top-left-corner",
1170
- onMousedown: D(J, ["stop"])
1175
+ onMousedown: D(O, ["stop"])
1171
1176
  },
1172
1177
  null,
1173
1178
  32
1174
1179
  /* NEED_HYDRATION */
1175
1180
  ),
1176
- d(
1181
+ p(
1177
1182
  "span",
1178
1183
  {
1179
1184
  class: "drag-line top-right-corner",
1180
- onMousedown: D(Z, ["stop"])
1185
+ onMousedown: D(N, ["stop"])
1181
1186
  },
1182
1187
  null,
1183
1188
  32
1184
1189
  /* NEED_HYDRATION */
1185
1190
  ),
1186
- d(
1191
+ p(
1187
1192
  "span",
1188
1193
  {
1189
1194
  class: "drag-line bottom-left-corner",
1190
- onMousedown: D(W, ["stop"])
1195
+ onMousedown: D(J, ["stop"])
1191
1196
  },
1192
1197
  null,
1193
1198
  32
1194
1199
  /* NEED_HYDRATION */
1195
1200
  ),
1196
- d(
1201
+ p(
1197
1202
  "span",
1198
1203
  {
1199
1204
  class: "drag-line bottom-right-corner",
1200
- onMousedown: D(p, ["stop"])
1205
+ onMousedown: D(h, ["stop"])
1201
1206
  },
1202
1207
  null,
1203
1208
  32
@@ -1208,7 +1213,7 @@ const st = /* @__PURE__ */ E({
1208
1213
  /* STYLE */
1209
1214
  ));
1210
1215
  }
1211
- }), Nt = /* @__PURE__ */ Y(Ot, [["__scopeId", "data-v-1fd06ed6"]]), Ft = (o) => (le("data-v-b3f7ed37"), o = o(), ie(), o), _t = /* @__PURE__ */ Ft(() => /* @__PURE__ */ d(
1216
+ }), Nt = /* @__PURE__ */ Y(Ot, [["__scopeId", "data-v-e67f8e05"]]), Ft = (o) => (le("data-v-b3f7ed37"), o = o(), ie(), o), _t = /* @__PURE__ */ Ft(() => /* @__PURE__ */ p(
1212
1217
  "i",
1213
1218
  { class: "ai-blueking-icon ai-blueking-ai" },
1214
1219
  null,
@@ -1218,28 +1223,28 @@ const st = /* @__PURE__ */ E({
1218
1223
  __name: "render-popup",
1219
1224
  emits: ["click"],
1220
1225
  setup(o, { emit: s }) {
1221
- const { isIconVisible: t, iconPosition: n } = pe(), l = s, a = () => {
1222
- l("click"), t.value = !1;
1226
+ const { isIconVisible: t, iconPosition: n } = pe(), i = s, a = () => {
1227
+ i("click"), t.value = !1;
1223
1228
  };
1224
- return (e, r) => c(t) ? (m(), g(
1229
+ return (e, r) => d(t) ? (m(), g(
1225
1230
  "div",
1226
1231
  {
1227
1232
  key: 0,
1228
- style: j(c(n)),
1233
+ style: G(d(n)),
1229
1234
  class: "ai-blueking-render-popup",
1230
1235
  onMousedown: r[0] || (r[0] = D(() => {
1231
1236
  }, ["prevent"]))
1232
1237
  },
1233
1238
  [
1234
- d("div", {
1239
+ p("div", {
1235
1240
  class: "popup-content",
1236
1241
  onClick: a
1237
1242
  }, [
1238
1243
  _t,
1239
- d(
1244
+ p(
1240
1245
  "span",
1241
1246
  $t,
1242
- P(c(f)("问小鲸")),
1247
+ P(d(f)("问小鲸")),
1243
1248
  1
1244
1249
  /* TEXT */
1245
1250
  )
@@ -1247,7 +1252,7 @@ const st = /* @__PURE__ */ E({
1247
1252
  ],
1248
1253
  36
1249
1254
  /* STYLE, NEED_HYDRATION */
1250
- )) : z("v-if", !0);
1255
+ )) : S("v-if", !0);
1251
1256
  }
1252
1257
  }), to = /* @__PURE__ */ Y(eo, [["__scopeId", "data-v-b3f7ed37"]]), uo = /* @__PURE__ */ E({
1253
1258
  __name: "ai-blueking",
@@ -1270,30 +1275,31 @@ const st = /* @__PURE__ */ E({
1270
1275
  models: {},
1271
1276
  model: {},
1272
1277
  isShow: { type: Boolean },
1273
- shortcuts: {}
1278
+ shortcuts: {},
1279
+ enablePopup: { type: Boolean, default: !0 }
1274
1280
  },
1275
1281
  emits: ["clear", "close", "scroll-load", "stop", "ai-click", "change-prompt", "update:model", "choose-prompt", "send", "update:isShow"],
1276
1282
  setup(o, { expose: s, emit: t }) {
1277
- const n = t, l = x(), a = (u) => {
1283
+ const n = t, i = x(), a = (u) => {
1278
1284
  var I;
1279
- (I = l.value) == null || I.setInputMessage(u);
1285
+ (I = i.value) == null || I.setInputMessage(u);
1280
1286
  }, e = () => {
1281
1287
  n("update:isShow", !0);
1282
1288
  }, r = () => {
1283
1289
  n("clear");
1284
- }, h = () => {
1290
+ }, c = () => {
1285
1291
  n("update:isShow", !1), n("close");
1286
- }, S = (u) => {
1292
+ }, M = (u) => {
1287
1293
  n("update:model", u);
1288
- }, C = (u) => {
1294
+ }, B = (u) => {
1289
1295
  n("send", u);
1290
1296
  }, y = () => {
1291
1297
  n("stop");
1292
- }, B = () => {
1298
+ }, H = () => {
1293
1299
  n("scroll-load");
1294
- }, M = (u) => {
1300
+ }, z = (u) => {
1295
1301
  n("ai-click", u);
1296
- }, H = (u) => {
1302
+ }, T = (u) => {
1297
1303
  n("choose-prompt", u);
1298
1304
  }, R = (u) => {
1299
1305
  n("change-prompt", u);
@@ -1301,10 +1307,10 @@ const st = /* @__PURE__ */ E({
1301
1307
  return s({
1302
1308
  setInputMessage: a
1303
1309
  }), (u, I) => (m(), g(
1304
- K,
1310
+ U,
1305
1311
  null,
1306
1312
  [
1307
- A(T(Nt, {
1313
+ X(V(Nt, {
1308
1314
  "head-background": u.headBackground,
1309
1315
  logo: u.logo,
1310
1316
  model: u.model,
@@ -1313,14 +1319,14 @@ const st = /* @__PURE__ */ E({
1313
1319
  "position-limit": u.positionLimit,
1314
1320
  "size-limit": u.sizeLimit,
1315
1321
  "start-position": u.startPosition,
1316
- onChooseModel: S,
1322
+ onChooseModel: M,
1317
1323
  onClear: r,
1318
- onClose: h
1324
+ onClose: c
1319
1325
  }, {
1320
- default: G(() => [
1321
- T(Jt, {
1326
+ default: Z(() => [
1327
+ V(Jt, {
1322
1328
  ref_key: "contentRef",
1323
- ref: l,
1329
+ ref: i,
1324
1330
  alert: u.alert,
1325
1331
  background: u.background,
1326
1332
  loading: u.loading,
@@ -1331,11 +1337,11 @@ const st = /* @__PURE__ */ E({
1331
1337
  "scroll-loading-end": u.scrollLoadingEnd,
1332
1338
  shortcuts: u.shortcuts,
1333
1339
  "user-photo": u.userPhoto,
1334
- onAiClick: M,
1340
+ onAiClick: z,
1335
1341
  onChangePrompt: R,
1336
- onChoosePrompt: H,
1337
- onScrollLoad: B,
1338
- onSend: C,
1342
+ onChoosePrompt: T,
1343
+ onScrollLoad: H,
1344
+ onSend: B,
1339
1345
  onStop: y
1340
1346
  }, null, 8, ["alert", "background", "loading", "messages", "placeholder", "prompts", "scroll-loading", "scroll-loading-end", "shortcuts", "user-photo"])
1341
1347
  ]),
@@ -1344,7 +1350,10 @@ const st = /* @__PURE__ */ E({
1344
1350
  }, 8, ["head-background", "logo", "model", "models", "name", "position-limit", "size-limit", "start-position"]), [
1345
1351
  [be, u.isShow]
1346
1352
  ]),
1347
- T(to, { onClick: e })
1353
+ u.enablePopup !== !1 ? (m(), K(to, {
1354
+ key: 0,
1355
+ onClick: e
1356
+ })) : S("v-if", !0)
1348
1357
  ],
1349
1358
  64
1350
1359
  /* STABLE_FRAGMENT */
@@ -1358,24 +1367,24 @@ const st = /* @__PURE__ */ E({
1358
1367
  });
1359
1368
  })();
1360
1369
  class po {
1361
- constructor(s, t, n, l, a) {
1362
- Q(this, "controllerMap");
1363
- Q(this, "handleEnd");
1364
- Q(this, "handleError");
1365
- Q(this, "handleReceiveMessage");
1366
- Q(this, "handleStart");
1367
- Q(this, "url");
1368
- this.url = s, this.handleStart = t, this.handleReceiveMessage = n, this.handleEnd = l, this.handleError = a, this.controllerMap = {};
1370
+ constructor(s, t, n, i, a) {
1371
+ j(this, "controllerMap");
1372
+ j(this, "handleEnd");
1373
+ j(this, "handleError");
1374
+ j(this, "handleReceiveMessage");
1375
+ j(this, "handleStart");
1376
+ j(this, "url");
1377
+ this.url = s, this.handleStart = t, this.handleReceiveMessage = n, this.handleEnd = i, this.handleError = a, this.controllerMap = {};
1369
1378
  }
1370
1379
  stop(s) {
1371
1380
  var t, n;
1372
1381
  return (n = (t = this.controllerMap[s]) == null ? void 0 : t.abort) == null || n.call(t), this.handleEnd(s);
1373
1382
  }
1374
1383
  async stream(s, t, n) {
1375
- const l = new AbortController();
1376
- this.controllerMap[t] = l, fetch(this.url, {
1384
+ const i = new AbortController();
1385
+ this.controllerMap[t] = i, fetch(this.url, {
1377
1386
  method: "post",
1378
- signal: l.signal,
1387
+ signal: i.signal,
1379
1388
  headers: {
1380
1389
  "Content-Type": "application/json",
1381
1390
  ...n
@@ -1387,30 +1396,30 @@ class po {
1387
1396
  const e = a.body.pipeThrough(new window.TextDecoderStream()).getReader();
1388
1397
  for (; ; )
1389
1398
  try {
1390
- const { value: r, done: h } = await e.read();
1399
+ const { value: r, done: c } = await e.read();
1391
1400
  if (!a.ok) {
1392
1401
  this.handleError(r || a.statusText, a.status, t);
1393
1402
  break;
1394
1403
  }
1395
- if (h) {
1404
+ if (c) {
1396
1405
  this.handleEnd(t);
1397
1406
  break;
1398
1407
  }
1399
1408
  r.toString().split(`
1400
- `).forEach((C) => {
1401
- const y = C.replace("data:", "").trim();
1409
+ `).forEach((B) => {
1410
+ const y = B.replace("data:", "").trim();
1402
1411
  if (Ue(y)) {
1403
- const { event: B, content: M, result: H, code: R, message: u } = JSON.parse(y);
1404
- if (H === !1 || a.status !== 200) {
1412
+ const { event: H, content: z, result: T, code: R, message: u } = JSON.parse(y);
1413
+ if (T === !1 || a.status !== 200) {
1405
1414
  this.handleError(u, R, t);
1406
1415
  return;
1407
1416
  }
1408
- switch (B) {
1417
+ switch (H) {
1409
1418
  case "text":
1410
- this.handleReceiveMessage(M, t);
1419
+ this.handleReceiveMessage(z, t);
1411
1420
  break;
1412
1421
  case "done":
1413
- this.handleEnd(t, M);
1422
+ this.handleEnd(t, z);
1414
1423
  break;
1415
1424
  case "error":
1416
1425
  this.handleError(u, R, t);