@blueking/ai-blueking 2.0.0-dev.7 → 2.0.0-dev.8

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.
@@ -718,25 +718,25 @@ var _hoisted_1$41 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
718
718
  i.value &&= (k.value?.removeAllRanges(), !1);
719
719
  }, B = (e) => {
720
720
  z(), a("selectShortcut", e, O.value);
721
- }, H = null, dg = (e) => {
721
+ }, H = null, _g = (e) => {
722
722
  H && clearTimeout(H), H = window.setTimeout(() => {
723
723
  L();
724
724
  }, e);
725
- }, fg = () => {
726
- dg(200);
725
+ }, vg = () => {
726
+ _g(200);
727
727
  }, K = () => {
728
- dg(300);
728
+ _g(300);
729
729
  }, J = (e) => {
730
730
  i.value && l.value?.contains(e.target) || z();
731
- }, pg = (e) => {
731
+ }, yg = (e) => {
732
732
  !k.value || !i.value || e.target instanceof HTMLElement && e.target.contains(k.value?.anchorNode) && z();
733
733
  }, $ = () => {
734
734
  d.value?.show();
735
735
  };
736
736
  return onMounted(() => {
737
- document.addEventListener("selectionchange", K), document.addEventListener("mouseup", fg), document.addEventListener("mousedown", J), document.addEventListener("scroll", pg, !0), window.addEventListener("resize", z), window.addEventListener("blur", z);
737
+ document.addEventListener("selectionchange", K), document.addEventListener("mouseup", vg), document.addEventListener("mousedown", J), document.addEventListener("scroll", yg, !0), window.addEventListener("resize", z), window.addEventListener("blur", z);
738
738
  }), onUnmounted(() => {
739
- document.removeEventListener("selectionchange", K), document.removeEventListener("mouseup", fg), document.removeEventListener("mousedown", J), document.removeEventListener("scroll", pg, !0), window.removeEventListener("resize", z), window.removeEventListener("blur", z);
739
+ document.removeEventListener("selectionchange", K), document.removeEventListener("mouseup", vg), document.removeEventListener("mousedown", J), document.removeEventListener("scroll", yg, !0), window.removeEventListener("resize", z), window.removeEventListener("blur", z);
740
740
  }), (n, r) => (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, { name: "ai-fade" }, {
741
741
  default: withCtx(() => [i.value ? (openBlock(), createElementBlock("div", {
742
742
  key: 0,
@@ -1103,17 +1103,17 @@ var _hoisted_1$39 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
1103
1103
  }
1104
1104
  function H() {
1105
1105
  var e = i();
1106
- if (B(e)) return dg(e);
1106
+ if (B(e)) return _g(e);
1107
1107
  v = setTimeout(H, z(e));
1108
1108
  }
1109
- function dg(e) {
1109
+ function _g(e) {
1110
1110
  return v = void 0, j && d ? I(e) : (d = m = void 0, _);
1111
1111
  }
1112
1112
  function G() {
1113
1113
  v !== void 0 && clearTimeout(v), E = 0, d = T = m = v = void 0;
1114
1114
  }
1115
- function fg() {
1116
- return v === void 0 ? _ : dg(i());
1115
+ function vg() {
1116
+ return v === void 0 ? _ : _g(i());
1117
1117
  }
1118
1118
  function K() {
1119
1119
  var e = i(), r = B(e);
@@ -1123,7 +1123,7 @@ var _hoisted_1$39 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
1123
1123
  }
1124
1124
  return v === void 0 && (v = setTimeout(H, n)), _;
1125
1125
  }
1126
- return K.cancel = G, K.flush = fg, K;
1126
+ return K.cancel = G, K.flush = vg, K;
1127
1127
  }
1128
1128
  n.exports = u;
1129
1129
  })), require_throttle = /* @__PURE__ */ __commonJSMin(((e, n) => {
@@ -4789,7 +4789,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
4789
4789
  return a;
4790
4790
  }).map((e) => `(${e})`).join(n);
4791
4791
  }
4792
- var dg = /\b\B/, G = "[a-zA-Z]\\w*", fg = "[a-zA-Z_]\\w*", K = "\\b\\d+(\\.\\d+)?", q = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", J = "\\b(0b[01]+)", Z = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", pg = (e = {}) => {
4792
+ var _g = /\b\B/, G = "[a-zA-Z]\\w*", vg = "[a-zA-Z_]\\w*", K = "\\b\\d+(\\.\\d+)?", q = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", J = "\\b(0b[01]+)", Z = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", yg = (e = {}) => {
4793
4793
  let n = /^#![ ]*\//;
4794
4794
  return e.binary && (e.begin = k(n, /.*\b/, e.binary, /\b.*/)), o({
4795
4795
  scope: "meta",
@@ -4803,7 +4803,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
4803
4803
  }, Q = {
4804
4804
  begin: "\\\\[\\s\\S]",
4805
4805
  relevance: 0
4806
- }, mg = {
4806
+ }, bg = {
4807
4807
  scope: "string",
4808
4808
  begin: "'",
4809
4809
  end: "'",
@@ -4815,7 +4815,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
4815
4815
  end: "\"",
4816
4816
  illegal: "\\n",
4817
4817
  contains: [Q]
4818
- }, hg = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }, gg = function(e, n, r = {}) {
4818
+ }, xg = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }, Sg = function(e, n, r = {}) {
4819
4819
  let i = o({
4820
4820
  scope: "comment",
4821
4821
  begin: e,
@@ -4831,19 +4831,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
4831
4831
  });
4832
4832
  let a = I("I", "a", "is", "so", "us", "to", "at", "if", "in", "it", "on", /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, /[A-Za-z]+[-][a-z]+/, /[A-Za-z][a-z]{2,}/);
4833
4833
  return i.contains.push({ begin: k(/[ ]+/, "(", a, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), i;
4834
- }, _g = gg("//", "$"), vg = gg("/\\*", "\\*/"), yg = gg("#", "$"), bg = {
4834
+ }, Cg = Sg("//", "$"), wg = Sg("/\\*", "\\*/"), Tg = Sg("#", "$"), Eg = {
4835
4835
  scope: "number",
4836
4836
  begin: K,
4837
4837
  relevance: 0
4838
- }, xg = {
4838
+ }, Dg = {
4839
4839
  scope: "number",
4840
4840
  begin: q,
4841
4841
  relevance: 0
4842
- }, Sg = {
4842
+ }, Og = {
4843
4843
  scope: "number",
4844
4844
  begin: J,
4845
4845
  relevance: 0
4846
- }, Cg = {
4846
+ }, kg = {
4847
4847
  scope: "regexp",
4848
4848
  begin: /\/(?=[^/\n]*\/)/,
4849
4849
  end: /\/[gimuy]*/,
@@ -4853,27 +4853,27 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
4853
4853
  relevance: 0,
4854
4854
  contains: [Q]
4855
4855
  }]
4856
- }, wg = {
4856
+ }, Ag = {
4857
4857
  scope: "title",
4858
4858
  begin: G,
4859
4859
  relevance: 0
4860
- }, Tg = {
4860
+ }, jg = {
4861
4861
  scope: "title",
4862
- begin: fg,
4862
+ begin: vg,
4863
4863
  relevance: 0
4864
- }, Eg = {
4865
- begin: "\\.\\s*" + fg,
4864
+ }, Mg = {
4865
+ begin: "\\.\\s*" + vg,
4866
4866
  relevance: 0
4867
- }, Dg = /* @__PURE__ */ Object.freeze({
4867
+ }, Ng = /* @__PURE__ */ Object.freeze({
4868
4868
  __proto__: null,
4869
- APOS_STRING_MODE: mg,
4869
+ APOS_STRING_MODE: bg,
4870
4870
  BACKSLASH_ESCAPE: Q,
4871
- BINARY_NUMBER_MODE: Sg,
4871
+ BINARY_NUMBER_MODE: Og,
4872
4872
  BINARY_NUMBER_RE: J,
4873
- COMMENT: gg,
4874
- C_BLOCK_COMMENT_MODE: vg,
4875
- C_LINE_COMMENT_MODE: _g,
4876
- C_NUMBER_MODE: xg,
4873
+ COMMENT: Sg,
4874
+ C_BLOCK_COMMENT_MODE: wg,
4875
+ C_LINE_COMMENT_MODE: Cg,
4876
+ C_NUMBER_MODE: Dg,
4877
4877
  C_NUMBER_RE: q,
4878
4878
  END_SAME_AS_BEGIN: function(e) {
4879
4879
  return Object.assign(e, {
@@ -4885,43 +4885,43 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
4885
4885
  }
4886
4886
  });
4887
4887
  },
4888
- HASH_COMMENT_MODE: yg,
4888
+ HASH_COMMENT_MODE: Tg,
4889
4889
  IDENT_RE: G,
4890
- MATCH_NOTHING_RE: dg,
4891
- METHOD_GUARD: Eg,
4892
- NUMBER_MODE: bg,
4890
+ MATCH_NOTHING_RE: _g,
4891
+ METHOD_GUARD: Mg,
4892
+ NUMBER_MODE: Eg,
4893
4893
  NUMBER_RE: K,
4894
- PHRASAL_WORDS_MODE: hg,
4894
+ PHRASAL_WORDS_MODE: xg,
4895
4895
  QUOTE_STRING_MODE: $,
4896
- REGEXP_MODE: Cg,
4896
+ REGEXP_MODE: kg,
4897
4897
  RE_STARTERS_RE: Z,
4898
- SHEBANG: pg,
4899
- TITLE_MODE: wg,
4900
- UNDERSCORE_IDENT_RE: fg,
4901
- UNDERSCORE_TITLE_MODE: Tg
4898
+ SHEBANG: yg,
4899
+ TITLE_MODE: Ag,
4900
+ UNDERSCORE_IDENT_RE: vg,
4901
+ UNDERSCORE_TITLE_MODE: jg
4902
4902
  });
4903
- function Og(e, n) {
4903
+ function Pg(e, n) {
4904
4904
  e.input[e.index - 1] === "." && n.ignoreMatch();
4905
4905
  }
4906
- function kg(e, n) {
4906
+ function Fg(e, n) {
4907
4907
  e.className !== void 0 && (e.scope = e.className, delete e.className);
4908
4908
  }
4909
- function Ag(e, n) {
4910
- n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Og, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
4909
+ function Ig(e, n) {
4910
+ n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Pg, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
4911
4911
  }
4912
- function jg(e, n) {
4912
+ function Lg(e, n) {
4913
4913
  Array.isArray(e.illegal) && (e.illegal = I(...e.illegal));
4914
4914
  }
4915
- function Mg(e, n) {
4915
+ function Rg(e, n) {
4916
4916
  if (e.match) {
4917
4917
  if (e.begin || e.end) throw Error("begin & end are not supported with match");
4918
4918
  e.begin = e.match, delete e.match;
4919
4919
  }
4920
4920
  }
4921
- function Ng(e, n) {
4921
+ function zg(e, n) {
4922
4922
  e.relevance === void 0 && (e.relevance = 1);
4923
4923
  }
4924
- var Pg = (e, n) => {
4924
+ var Bg = (e, n) => {
4925
4925
  if (!e.beforeMatch) return;
4926
4926
  if (e.starts) throw Error("beforeMatch cannot be used with starts");
4927
4927
  let r = Object.assign({}, e);
@@ -4931,7 +4931,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
4931
4931
  relevance: 0,
4932
4932
  contains: [Object.assign(r, { endsParent: !0 })]
4933
4933
  }, e.relevance = 0, delete r.beforeMatch;
4934
- }, Fg = [
4934
+ }, Vg = [
4935
4935
  "of",
4936
4936
  "and",
4937
4937
  "for",
@@ -4943,58 +4943,58 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
4943
4943
  "parent",
4944
4944
  "list",
4945
4945
  "value"
4946
- ], Ig = "keyword";
4947
- function Lg(e, n, r = Ig) {
4946
+ ], Hg = "keyword";
4947
+ function Ug(e, n, r = Hg) {
4948
4948
  let i = Object.create(null);
4949
4949
  return typeof e == "string" ? a(r, e.split(" ")) : Array.isArray(e) ? a(r, e) : Object.keys(e).forEach(function(r) {
4950
- Object.assign(i, Lg(e[r], n, r));
4950
+ Object.assign(i, Ug(e[r], n, r));
4951
4951
  }), i;
4952
4952
  function a(e, r) {
4953
4953
  n && (r = r.map((e) => e.toLowerCase())), r.forEach(function(n) {
4954
4954
  let r = n.split("|");
4955
- i[r[0]] = [e, Rg(r[0], r[1])];
4955
+ i[r[0]] = [e, Wg(r[0], r[1])];
4956
4956
  });
4957
4957
  }
4958
4958
  }
4959
- function Rg(e, n) {
4960
- return n ? Number(n) : zg(e) ? 0 : 1;
4959
+ function Wg(e, n) {
4960
+ return n ? Number(n) : Gg(e) ? 0 : 1;
4961
4961
  }
4962
- function zg(e) {
4963
- return Fg.includes(e.toLowerCase());
4962
+ function Gg(e) {
4963
+ return Vg.includes(e.toLowerCase());
4964
4964
  }
4965
- var Bg = {}, Vg = (e) => {
4965
+ var Kg = {}, qg = (e) => {
4966
4966
  console.error(e);
4967
- }, Hg = (e, ...n) => {
4967
+ }, Jg = (e, ...n) => {
4968
4968
  console.log(`WARN: ${e}`, ...n);
4969
- }, Ug = (e, n) => {
4970
- Bg[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), Bg[`${e}/${n}`] = !0);
4971
- }, Wg = /* @__PURE__ */ Error();
4972
- function Gg(e, n, { key: r }) {
4969
+ }, Yg = (e, n) => {
4970
+ Kg[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), Kg[`${e}/${n}`] = !0);
4971
+ }, Xg = /* @__PURE__ */ Error();
4972
+ function Zg(e, n, { key: r }) {
4973
4973
  let i = 0, a = e[r], o = {}, s = {};
4974
4974
  for (let e = 1; e <= n.length; e++) s[e + i] = a[e], o[e + i] = !0, i += L(n[e - 1]);
4975
4975
  e[r] = s, e[r]._emit = o, e[r]._multi = !0;
4976
4976
  }
4977
- function Kg(e) {
4977
+ function Qg(e) {
4978
4978
  if (Array.isArray(e.begin)) {
4979
- if (e.skip || e.excludeBegin || e.returnBegin) throw Vg("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Wg;
4980
- if (typeof e.beginScope != "object" || e.beginScope === null) throw Vg("beginScope must be object"), Wg;
4981
- Gg(e, e.begin, { key: "beginScope" }), e.begin = H(e.begin, { joinWith: "" });
4979
+ if (e.skip || e.excludeBegin || e.returnBegin) throw qg("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Xg;
4980
+ if (typeof e.beginScope != "object" || e.beginScope === null) throw qg("beginScope must be object"), Xg;
4981
+ Zg(e, e.begin, { key: "beginScope" }), e.begin = H(e.begin, { joinWith: "" });
4982
4982
  }
4983
4983
  }
4984
- function qg(e) {
4984
+ function $g(e) {
4985
4985
  if (Array.isArray(e.end)) {
4986
- if (e.skip || e.excludeEnd || e.returnEnd) throw Vg("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Wg;
4987
- if (typeof e.endScope != "object" || e.endScope === null) throw Vg("endScope must be object"), Wg;
4988
- Gg(e, e.end, { key: "endScope" }), e.end = H(e.end, { joinWith: "" });
4986
+ if (e.skip || e.excludeEnd || e.returnEnd) throw qg("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Xg;
4987
+ if (typeof e.endScope != "object" || e.endScope === null) throw qg("endScope must be object"), Xg;
4988
+ Zg(e, e.end, { key: "endScope" }), e.end = H(e.end, { joinWith: "" });
4989
4989
  }
4990
4990
  }
4991
- function Jg(e) {
4991
+ function e_(e) {
4992
4992
  e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
4993
4993
  }
4994
- function Yg(e) {
4995
- Jg(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), Kg(e), qg(e);
4994
+ function t_(e) {
4995
+ e_(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), Qg(e), $g(e);
4996
4996
  }
4997
- function Xg(e) {
4997
+ function n_(e) {
4998
4998
  function n(n, r) {
4999
4999
  return new RegExp(v(n), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (r ? "g" : ""));
5000
5000
  }
@@ -5056,18 +5056,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5056
5056
  let o = r;
5057
5057
  if (r.isCompiled) return o;
5058
5058
  [
5059
- kg,
5060
- Mg,
5061
- Yg,
5062
- Pg
5059
+ Fg,
5060
+ Rg,
5061
+ t_,
5062
+ Bg
5063
5063
  ].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
5064
- Ag,
5065
- jg,
5066
- Ng
5064
+ Ig,
5065
+ Lg,
5066
+ zg
5067
5067
  ].forEach((e) => e(r, i)), r.isCompiled = !0;
5068
5068
  let l = null;
5069
- return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), l = r.keywords.$pattern, delete r.keywords.$pattern), l ||= /\w+/, r.keywords &&= Lg(r.keywords, e.case_insensitive), o.keywordPatternRe = n(l, !0), i && (r.begin ||= /\B|\b/, o.beginRe = n(o.begin), !r.end && !r.endsWithParent && (r.end = /\B|\b/), r.end && (o.endRe = n(o.end)), o.terminatorEnd = v(o.end) || "", r.endsWithParent && i.terminatorEnd && (o.terminatorEnd += (r.end ? "|" : "") + i.terminatorEnd)), r.illegal && (o.illegalRe = n(r.illegal)), r.contains ||= [], r.contains = [].concat(...r.contains.map(function(e) {
5070
- return Qg(e === "self" ? r : e);
5069
+ return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), l = r.keywords.$pattern, delete r.keywords.$pattern), l ||= /\w+/, r.keywords &&= Ug(r.keywords, e.case_insensitive), o.keywordPatternRe = n(l, !0), i && (r.begin ||= /\B|\b/, o.beginRe = n(o.begin), !r.end && !r.endsWithParent && (r.end = /\B|\b/), r.end && (o.endRe = n(o.end)), o.terminatorEnd = v(o.end) || "", r.endsWithParent && i.terminatorEnd && (o.terminatorEnd += (r.end ? "|" : "") + i.terminatorEnd)), r.illegal && (o.illegalRe = n(r.illegal)), r.contains ||= [], r.contains = [].concat(...r.contains.map(function(e) {
5070
+ return i_(e === "self" ? r : e);
5071
5071
  })), r.contains.forEach(function(e) {
5072
5072
  s(e, o);
5073
5073
  }), r.starts && s(r.starts, i), o.matcher = a(o), o;
@@ -5075,19 +5075,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5075
5075
  if (e.compilerExtensions ||= [], e.contains && e.contains.includes("self")) throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
5076
5076
  return e.classNameAliases = o(e.classNameAliases || {}), s(e);
5077
5077
  }
5078
- function Zg(e) {
5079
- return e ? e.endsWithParent || Zg(e.starts) : !1;
5078
+ function r_(e) {
5079
+ return e ? e.endsWithParent || r_(e.starts) : !1;
5080
5080
  }
5081
- function Qg(e) {
5081
+ function i_(e) {
5082
5082
  return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
5083
5083
  return o(e, { variants: null }, n);
5084
- })), e.cachedVariants ? e.cachedVariants : Zg(e) ? o(e, { starts: e.starts ? o(e.starts) : null }) : Object.isFrozen(e) ? o(e) : e;
5084
+ })), e.cachedVariants ? e.cachedVariants : r_(e) ? o(e, { starts: e.starts ? o(e.starts) : null }) : Object.isFrozen(e) ? o(e) : e;
5085
5085
  }
5086
- var $g = "11.11.1", e_ = class extends Error {
5086
+ var a_ = "11.11.1", o_ = class extends Error {
5087
5087
  constructor(e, n) {
5088
5088
  super(e), this.name = "HTMLInjectionError", this.html = n;
5089
5089
  }
5090
- }, t_ = a, n_ = o, r_ = Symbol("nomatch"), i_ = 7, a_ = function(e) {
5090
+ }, s_ = a, c_ = o, l_ = Symbol("nomatch"), u_ = 7, d_ = function(e) {
5091
5091
  let n = Object.create(null), a = Object.create(null), o = [], s = !0, l = "Could not find the language '{}', did you forget to load/include a language module?", u = {
5092
5092
  disableAutodetect: !0,
5093
5093
  name: "Plain text",
@@ -5110,21 +5110,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5110
5110
  n += e.parentNode ? e.parentNode.className : "";
5111
5111
  let r = d.languageDetectRe.exec(n);
5112
5112
  if (r) {
5113
- let n = mg(r[1]);
5114
- return n || (Hg(l.replace("{}", r[1])), Hg("Falling back to no-highlight mode for this block.", e)), n ? r[1] : "no-highlight";
5113
+ let n = bg(r[1]);
5114
+ return n || (Jg(l.replace("{}", r[1])), Jg("Falling back to no-highlight mode for this block.", e)), n ? r[1] : "no-highlight";
5115
5115
  }
5116
- return n.split(/\s+/).find((e) => m(e) || mg(e));
5116
+ return n.split(/\s+/).find((e) => m(e) || bg(e));
5117
5117
  }
5118
5118
  function v(e, n, r) {
5119
5119
  let i = "", a = "";
5120
- typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (Ug("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Ug("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), a = e, i = n), r === void 0 && (r = !0);
5120
+ typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (Yg("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Yg("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), a = e, i = n), r === void 0 && (r = !0);
5121
5121
  let o = {
5122
5122
  code: i,
5123
5123
  language: a
5124
5124
  };
5125
- yg("before:highlight", o);
5125
+ Tg("before:highlight", o);
5126
5126
  let s = o.result ? o.result : j(o.language, o.code, r);
5127
- return s.code = o.code, yg("after:highlight", s), s;
5127
+ return s.code = o.code, Tg("after:highlight", s), s;
5128
5128
  }
5129
5129
  function j(e, r, a, o) {
5130
5130
  let u = Object.create(null);
@@ -5144,7 +5144,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5144
5144
  let i = K.case_insensitive ? n[0].toLowerCase() : n[0], a = m(Z, i);
5145
5145
  if (a) {
5146
5146
  let [e, o] = a;
5147
- if (Q.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <= i_ && (hg += o), e.startsWith("_")) r += n[0];
5147
+ if (Q.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <= u_ && (xg += o), e.startsWith("_")) r += n[0];
5148
5148
  else {
5149
5149
  let r = K.classNameAliases[e] || e;
5150
5150
  T(n[0], r);
@@ -5162,9 +5162,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5162
5162
  Q.addText($);
5163
5163
  return;
5164
5164
  }
5165
- e = j(Z.subLanguage, $, !0, pg[Z.subLanguage]), pg[Z.subLanguage] = e._top;
5165
+ e = j(Z.subLanguage, $, !0, yg[Z.subLanguage]), yg[Z.subLanguage] = e._top;
5166
5166
  } else e = B($, Z.subLanguage.length ? Z.subLanguage : null);
5167
- Z.relevance > 0 && (hg += e.relevance), Q.__addSublanguage(e._emitter, e.language);
5167
+ Z.relevance > 0 && (xg += e.relevance), Q.__addSublanguage(e._emitter, e.language);
5168
5168
  }
5169
5169
  function v() {
5170
5170
  Z.subLanguage == null ? g() : _(), $ = "";
@@ -5201,7 +5201,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5201
5201
  if (e.endsWithParent) return k(e.parent, n, r);
5202
5202
  }
5203
5203
  function I(e) {
5204
- return Z.matcher.regexIndex === 0 ? ($ += e[0], 1) : (vg = !0, 0);
5204
+ return Z.matcher.regexIndex === 0 ? ($ += e[0], 1) : (wg = !0, 0);
5205
5205
  }
5206
5206
  function L(e) {
5207
5207
  let n = e[0], r = e.rule, a = new i(r), o = [r.__beforeBegin, r["on:begin"]];
@@ -5210,21 +5210,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5210
5210
  }
5211
5211
  function H(e) {
5212
5212
  let n = e[0], i = r.substring(e.index), a = k(Z, e, i);
5213
- if (!a) return r_;
5213
+ if (!a) return l_;
5214
5214
  let o = Z;
5215
5215
  Z.endScope && Z.endScope._wrap ? (v(), T(n, Z.endScope._wrap)) : Z.endScope && Z.endScope._multi ? (v(), E(Z.endScope, e)) : o.skip ? $ += n : (o.returnEnd || o.excludeEnd || ($ += n), v(), o.excludeEnd && ($ = n));
5216
5216
  do
5217
- Z.scope && Q.closeNode(), !Z.skip && !Z.subLanguage && (hg += Z.relevance), Z = Z.parent;
5217
+ Z.scope && Q.closeNode(), !Z.skip && !Z.subLanguage && (xg += Z.relevance), Z = Z.parent;
5218
5218
  while (Z !== a.parent);
5219
5219
  return a.starts && O(a.starts, e), o.returnEnd ? 0 : n.length;
5220
5220
  }
5221
- function dg() {
5221
+ function _g() {
5222
5222
  let e = [];
5223
5223
  for (let n = Z; n !== K; n = n.parent) n.scope && e.unshift(n.scope);
5224
5224
  e.forEach((e) => Q.openNode(e));
5225
5225
  }
5226
5226
  let G = {};
5227
- function fg(n, i) {
5227
+ function vg(n, i) {
5228
5228
  let o = i && i[0];
5229
5229
  if ($ += n, o == null) return v(), 0;
5230
5230
  if (G.type === "begin" && i.type === "end" && G.index === i.index && o === "") {
@@ -5240,33 +5240,33 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5240
5240
  throw e.mode = Z, e;
5241
5241
  } else if (i.type === "end") {
5242
5242
  let e = H(i);
5243
- if (e !== r_) return e;
5243
+ if (e !== l_) return e;
5244
5244
  }
5245
5245
  if (i.type === "illegal" && o === "") return $ += "\n", 1;
5246
- if (_g > 1e5 && _g > i.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
5246
+ if (Cg > 1e5 && Cg > i.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
5247
5247
  return $ += o, o.length;
5248
5248
  }
5249
- let K = mg(e);
5250
- if (!K) throw Vg(l.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
5251
- let q = Xg(K), J = "", Z = o || q, pg = {}, Q = new d.__emitter(d);
5252
- dg();
5253
- let $ = "", hg = 0, gg = 0, _g = 0, vg = !1;
5249
+ let K = bg(e);
5250
+ if (!K) throw qg(l.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
5251
+ let q = n_(K), J = "", Z = o || q, yg = {}, Q = new d.__emitter(d);
5252
+ _g();
5253
+ let $ = "", xg = 0, Sg = 0, Cg = 0, wg = !1;
5254
5254
  try {
5255
5255
  if (K.__emitTokens) K.__emitTokens(r, Q);
5256
5256
  else {
5257
5257
  for (Z.matcher.considerAll();;) {
5258
- _g++, vg ? vg = !1 : Z.matcher.considerAll(), Z.matcher.lastIndex = gg;
5258
+ Cg++, wg ? wg = !1 : Z.matcher.considerAll(), Z.matcher.lastIndex = Sg;
5259
5259
  let e = Z.matcher.exec(r);
5260
5260
  if (!e) break;
5261
- let n = fg(r.substring(gg, e.index), e);
5262
- gg = e.index + n;
5261
+ let n = vg(r.substring(Sg, e.index), e);
5262
+ Sg = e.index + n;
5263
5263
  }
5264
- fg(r.substring(gg));
5264
+ vg(r.substring(Sg));
5265
5265
  }
5266
5266
  return Q.finalize(), J = Q.toHTML(), {
5267
5267
  language: e,
5268
5268
  value: J,
5269
- relevance: hg,
5269
+ relevance: xg,
5270
5270
  illegal: !1,
5271
5271
  _emitter: Q,
5272
5272
  _top: Z
@@ -5274,13 +5274,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5274
5274
  } catch (n) {
5275
5275
  if (n.message && n.message.includes("Illegal")) return {
5276
5276
  language: e,
5277
- value: t_(r),
5277
+ value: s_(r),
5278
5278
  illegal: !0,
5279
5279
  relevance: 0,
5280
5280
  _illegalBy: {
5281
5281
  message: n.message,
5282
- index: gg,
5283
- context: r.slice(gg - 100, gg + 100),
5282
+ index: Sg,
5283
+ context: r.slice(Sg - 100, Sg + 100),
5284
5284
  mode: n.mode,
5285
5285
  resultSoFar: J
5286
5286
  },
@@ -5288,7 +5288,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5288
5288
  };
5289
5289
  if (s) return {
5290
5290
  language: e,
5291
- value: t_(r),
5291
+ value: s_(r),
5292
5292
  illegal: !1,
5293
5293
  relevance: 0,
5294
5294
  errorRaised: n,
@@ -5300,7 +5300,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5300
5300
  }
5301
5301
  function L(e) {
5302
5302
  let n = {
5303
- value: t_(e),
5303
+ value: s_(e),
5304
5304
  illegal: !1,
5305
5305
  relevance: 0,
5306
5306
  _top: u,
@@ -5310,13 +5310,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5310
5310
  }
5311
5311
  function B(e, r) {
5312
5312
  r = r || d.languages || Object.keys(n);
5313
- let i = L(e), a = r.filter(mg).filter(hg).map((n) => j(n, e, !1));
5313
+ let i = L(e), a = r.filter(bg).filter(xg).map((n) => j(n, e, !1));
5314
5314
  a.unshift(i);
5315
5315
  let [o, s] = a.sort((e, n) => {
5316
5316
  if (e.relevance !== n.relevance) return n.relevance - e.relevance;
5317
5317
  if (e.language && n.language) {
5318
- if (mg(e.language).supersetOf === n.language) return 1;
5319
- if (mg(n.language).supersetOf === e.language) return -1;
5318
+ if (bg(e.language).supersetOf === n.language) return 1;
5319
+ if (bg(n.language).supersetOf === e.language) return -1;
5320
5320
  }
5321
5321
  return 0;
5322
5322
  }), l = o;
@@ -5326,17 +5326,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5326
5326
  let i = n && a[n] || r;
5327
5327
  e.classList.add("hljs"), e.classList.add(`language-${i}`);
5328
5328
  }
5329
- function dg(e) {
5329
+ function _g(e) {
5330
5330
  let n = null, r = g(e);
5331
5331
  if (m(r)) return;
5332
- if (yg("before:highlightElement", {
5332
+ if (Tg("before:highlightElement", {
5333
5333
  el: e,
5334
5334
  language: r
5335
5335
  }), e.dataset.highlighted) {
5336
5336
  console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
5337
5337
  return;
5338
5338
  }
5339
- if (e.children.length > 0 && (d.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), d.throwUnescapedHTML)) throw new e_("One of your code blocks includes unescaped HTML.", e.innerHTML);
5339
+ if (e.children.length > 0 && (d.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), d.throwUnescapedHTML)) throw new o_("One of your code blocks includes unescaped HTML.", e.innerHTML);
5340
5340
  n = e;
5341
5341
  let i = n.textContent, a = r ? v(i, {
5342
5342
  language: r,
@@ -5349,20 +5349,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5349
5349
  }, a.secondBest && (e.secondBest = {
5350
5350
  language: a.secondBest.language,
5351
5351
  relevance: a.secondBest.relevance
5352
- }), yg("after:highlightElement", {
5352
+ }), Tg("after:highlightElement", {
5353
5353
  el: e,
5354
5354
  result: a,
5355
5355
  text: i
5356
5356
  });
5357
5357
  }
5358
5358
  function G(e) {
5359
- d = n_(d, e);
5359
+ d = c_(d, e);
5360
5360
  }
5361
- let fg = () => {
5362
- J(), Ug("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
5361
+ let vg = () => {
5362
+ J(), Yg("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
5363
5363
  };
5364
5364
  function K() {
5365
- J(), Ug("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
5365
+ J(), Yg("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
5366
5366
  }
5367
5367
  let q = !1;
5368
5368
  function J() {
@@ -5373,27 +5373,27 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5373
5373
  q || window.addEventListener("DOMContentLoaded", e, !1), q = !0;
5374
5374
  return;
5375
5375
  }
5376
- document.querySelectorAll(d.cssSelector).forEach(dg);
5376
+ document.querySelectorAll(d.cssSelector).forEach(_g);
5377
5377
  }
5378
5378
  function Z(r, i) {
5379
5379
  let a = null;
5380
5380
  try {
5381
5381
  a = i(e);
5382
5382
  } catch (e) {
5383
- if (Vg("Language definition for '{}' could not be registered.".replace("{}", r)), s) Vg(e);
5383
+ if (qg("Language definition for '{}' could not be registered.".replace("{}", r)), s) qg(e);
5384
5384
  else throw e;
5385
5385
  a = u;
5386
5386
  }
5387
5387
  a.name ||= r, n[r] = a, a.rawDefinition = i.bind(null, e), a.aliases && $(a.aliases, { languageName: r });
5388
5388
  }
5389
- function pg(e) {
5389
+ function yg(e) {
5390
5390
  delete n[e];
5391
5391
  for (let n of Object.keys(a)) a[n] === e && delete a[n];
5392
5392
  }
5393
5393
  function Q() {
5394
5394
  return Object.keys(n);
5395
5395
  }
5396
- function mg(e) {
5396
+ function bg(e) {
5397
5397
  return e = (e || "").toLowerCase(), n[e] || n[a[e]];
5398
5398
  }
5399
5399
  function $(e, { languageName: n }) {
@@ -5401,65 +5401,65 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5401
5401
  a[e.toLowerCase()] = n;
5402
5402
  });
5403
5403
  }
5404
- function hg(e) {
5405
- let n = mg(e);
5404
+ function xg(e) {
5405
+ let n = bg(e);
5406
5406
  return n && !n.disableAutodetect;
5407
5407
  }
5408
- function gg(e) {
5408
+ function Sg(e) {
5409
5409
  e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (n) => {
5410
5410
  e["before:highlightBlock"](Object.assign({ block: n.el }, n));
5411
5411
  }), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (n) => {
5412
5412
  e["after:highlightBlock"](Object.assign({ block: n.el }, n));
5413
5413
  });
5414
5414
  }
5415
- function _g(e) {
5416
- gg(e), o.push(e);
5415
+ function Cg(e) {
5416
+ Sg(e), o.push(e);
5417
5417
  }
5418
- function vg(e) {
5418
+ function wg(e) {
5419
5419
  let n = o.indexOf(e);
5420
5420
  n !== -1 && o.splice(n, 1);
5421
5421
  }
5422
- function yg(e, n) {
5422
+ function Tg(e, n) {
5423
5423
  let r = e;
5424
5424
  o.forEach(function(e) {
5425
5425
  e[r] && e[r](n);
5426
5426
  });
5427
5427
  }
5428
- function bg(e) {
5429
- return Ug("10.7.0", "highlightBlock will be removed entirely in v12.0"), Ug("10.7.0", "Please use highlightElement now."), dg(e);
5428
+ function Eg(e) {
5429
+ return Yg("10.7.0", "highlightBlock will be removed entirely in v12.0"), Yg("10.7.0", "Please use highlightElement now."), _g(e);
5430
5430
  }
5431
5431
  for (let n in Object.assign(e, {
5432
5432
  highlight: v,
5433
5433
  highlightAuto: B,
5434
5434
  highlightAll: J,
5435
- highlightElement: dg,
5436
- highlightBlock: bg,
5435
+ highlightElement: _g,
5436
+ highlightBlock: Eg,
5437
5437
  configure: G,
5438
- initHighlighting: fg,
5438
+ initHighlighting: vg,
5439
5439
  initHighlightingOnLoad: K,
5440
5440
  registerLanguage: Z,
5441
- unregisterLanguage: pg,
5441
+ unregisterLanguage: yg,
5442
5442
  listLanguages: Q,
5443
- getLanguage: mg,
5443
+ getLanguage: bg,
5444
5444
  registerAliases: $,
5445
- autoDetection: hg,
5446
- inherit: n_,
5447
- addPlugin: _g,
5448
- removePlugin: vg
5445
+ autoDetection: xg,
5446
+ inherit: c_,
5447
+ addPlugin: Cg,
5448
+ removePlugin: wg
5449
5449
  }), e.debugMode = function() {
5450
5450
  s = !1;
5451
5451
  }, e.safeMode = function() {
5452
5452
  s = !0;
5453
- }, e.versionString = $g, e.regex = {
5453
+ }, e.versionString = a_, e.regex = {
5454
5454
  concat: k,
5455
5455
  lookahead: T,
5456
5456
  either: I,
5457
5457
  optional: O,
5458
5458
  anyNumberOfTimes: E
5459
- }, Dg) typeof Dg[n] == "object" && r(Dg[n]);
5460
- return Object.assign(e, Dg), e;
5461
- }, o_ = a_({});
5462
- o_.newInstance = () => a_({}), n.exports = o_, o_.HighlightJS = o_, o_.default = o_;
5459
+ }, Ng) typeof Ng[n] == "object" && r(Ng[n]);
5460
+ return Object.assign(e, Ng), e;
5461
+ }, f_ = d_({});
5462
+ f_.newInstance = () => d_({}), n.exports = f_, f_.HighlightJS = f_, f_.default = f_;
5463
5463
  })), require__1c = /* @__PURE__ */ __commonJSMin(((e, n) => {
5464
5464
  function r(e) {
5465
5465
  let n = "[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+", r = "далее возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ", i = "null истина ложь неопределено", a = e.inherit(e.NUMBER_MODE), o = {
@@ -11565,7 +11565,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11565
11565
  },
11566
11566
  z
11567
11567
  ]
11568
- }, dg = {
11568
+ }, _g = {
11569
11569
  scope: "computation-expression",
11570
11570
  match: /\b[_a-z]\w*(?=\s*\{)/
11571
11571
  }, G = {
@@ -11576,7 +11576,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11576
11576
  ],
11577
11577
  beginScope: { 2: "meta" },
11578
11578
  end: a(/\s|$/)
11579
- }, fg = { variants: [e.BINARY_NUMBER_MODE, e.C_NUMBER_MODE] }, K = {
11579
+ }, vg = { variants: [e.BINARY_NUMBER_MODE, e.C_NUMBER_MODE] }, K = {
11580
11580
  scope: "string",
11581
11581
  begin: /"/,
11582
11582
  end: /"/,
@@ -11596,7 +11596,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11596
11596
  begin: /\{/,
11597
11597
  end: /\}/,
11598
11598
  keywords: g
11599
- }, pg = {
11599
+ }, yg = {
11600
11600
  scope: "string",
11601
11601
  begin: /\$"/,
11602
11602
  end: /"/,
@@ -11617,7 +11617,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11617
11617
  e.BACKSLASH_ESCAPE,
11618
11618
  Z
11619
11619
  ]
11620
- }, mg = {
11620
+ }, bg = {
11621
11621
  scope: "string",
11622
11622
  begin: /\$"""/,
11623
11623
  end: /"""/,
@@ -11633,7 +11633,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11633
11633
  };
11634
11634
  Z.contains = [
11635
11635
  Q,
11636
- pg,
11636
+ yg,
11637
11637
  q,
11638
11638
  K,
11639
11639
  $,
@@ -11641,16 +11641,16 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11641
11641
  _,
11642
11642
  T,
11643
11643
  z,
11644
- dg,
11644
+ _g,
11645
11645
  G,
11646
- fg,
11646
+ vg,
11647
11647
  O,
11648
11648
  j
11649
11649
  ];
11650
- let hg = { variants: [
11651
- mg,
11650
+ let xg = { variants: [
11651
+ bg,
11652
11652
  Q,
11653
- pg,
11653
+ yg,
11654
11654
  J,
11655
11655
  q,
11656
11656
  K,
@@ -11664,7 +11664,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11664
11664
  classNameAliases: { "computation-expression": "keyword" },
11665
11665
  contains: [
11666
11666
  i,
11667
- hg,
11667
+ xg,
11668
11668
  _,
11669
11669
  T,
11670
11670
  H,
@@ -11679,14 +11679,14 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11679
11679
  q,
11680
11680
  K,
11681
11681
  $,
11682
- fg
11682
+ vg
11683
11683
  ]
11684
11684
  },
11685
11685
  B,
11686
11686
  z,
11687
- dg,
11687
+ _g,
11688
11688
  G,
11689
- fg,
11689
+ vg,
11690
11690
  O,
11691
11691
  j
11692
11692
  ]
@@ -13800,7 +13800,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
13800
13800
  contains: [e.BACKSLASH_ESCAPE, L],
13801
13801
  subLanguage: "graphql"
13802
13802
  }
13803
- }, dg = {
13803
+ }, _g = {
13804
13804
  className: "string",
13805
13805
  begin: "`",
13806
13806
  end: "`",
@@ -13842,21 +13842,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
13842
13842
  e.C_BLOCK_COMMENT_MODE,
13843
13843
  e.C_LINE_COMMENT_MODE
13844
13844
  ]
13845
- }, fg = [
13845
+ }, vg = [
13846
13846
  e.APOS_STRING_MODE,
13847
13847
  e.QUOTE_STRING_MODE,
13848
13848
  z,
13849
13849
  B,
13850
13850
  H,
13851
- dg,
13851
+ _g,
13852
13852
  { match: /\$\d+/ },
13853
13853
  I
13854
13854
  ];
13855
- L.contains = fg.concat({
13855
+ L.contains = vg.concat({
13856
13856
  begin: /\{/,
13857
13857
  end: /\}/,
13858
13858
  keywords: E,
13859
- contains: ["self"].concat(fg)
13859
+ contains: ["self"].concat(vg)
13860
13860
  });
13861
13861
  let K = [].concat(G, L.contains), q = K.concat([{
13862
13862
  begin: /(\s*)\(/,
@@ -13897,7 +13897,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
13897
13897
  1: "keyword",
13898
13898
  3: "title.class"
13899
13899
  }
13900
- }] }, pg = {
13900
+ }] }, yg = {
13901
13901
  relevance: 0,
13902
13902
  match: n.either(/\bJSON/, /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),
13903
13903
  className: "title.class",
@@ -13907,7 +13907,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
13907
13907
  className: "meta",
13908
13908
  relevance: 10,
13909
13909
  begin: /^\s*['"]use (strict|asm)['"]/
13910
- }, mg = {
13910
+ }, bg = {
13911
13911
  variants: [{ match: [
13912
13912
  /function/,
13913
13913
  /\s+/,
@@ -13926,25 +13926,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
13926
13926
  match: /\b[A-Z][A-Z_0-9]+\b/,
13927
13927
  className: "variable.constant"
13928
13928
  };
13929
- function hg(e) {
13929
+ function xg(e) {
13930
13930
  return n.concat("(?!", e.join("|"), ")");
13931
13931
  }
13932
- let gg = {
13933
- match: n.concat(/\b/, hg([
13932
+ let Sg = {
13933
+ match: n.concat(/\b/, xg([
13934
13934
  ...l,
13935
13935
  "super",
13936
13936
  "import"
13937
13937
  ].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
13938
13938
  className: "title.function",
13939
13939
  relevance: 0
13940
- }, _g = {
13940
+ }, Cg = {
13941
13941
  begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
13942
13942
  end: g,
13943
13943
  excludeBegin: !0,
13944
13944
  keywords: "prototype",
13945
13945
  className: "property",
13946
13946
  relevance: 0
13947
- }, vg = {
13947
+ }, wg = {
13948
13948
  match: [
13949
13949
  /get|set/,
13950
13950
  /\s+/,
@@ -13956,7 +13956,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
13956
13956
  3: "title.function"
13957
13957
  },
13958
13958
  contains: [{ begin: /\(\)/ }, J]
13959
- }, yg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", bg = {
13959
+ }, Tg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Eg = {
13960
13960
  match: [
13961
13961
  /const|var|let/,
13962
13962
  /\s+/,
@@ -13964,7 +13964,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
13964
13964
  /\s*/,
13965
13965
  /=\s*/,
13966
13966
  /(async\s*)?/,
13967
- n.lookahead(yg)
13967
+ n.lookahead(Tg)
13968
13968
  ],
13969
13969
  keywords: "async",
13970
13970
  className: {
@@ -13984,7 +13984,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
13984
13984
  keywords: E,
13985
13985
  exports: {
13986
13986
  PARAMS_CONTAINS: q,
13987
- CLASS_REFERENCE: pg
13987
+ CLASS_REFERENCE: yg
13988
13988
  },
13989
13989
  illegal: /#(?![$_A-z])/,
13990
13990
  contains: [
@@ -13999,17 +13999,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
13999
13999
  z,
14000
14000
  B,
14001
14001
  H,
14002
- dg,
14002
+ _g,
14003
14003
  G,
14004
14004
  { match: /\$\d+/ },
14005
14005
  I,
14006
- pg,
14006
+ yg,
14007
14007
  {
14008
14008
  scope: "attr",
14009
14009
  match: g + n.lookahead(":"),
14010
14010
  relevance: 0
14011
14011
  },
14012
- bg,
14012
+ Eg,
14013
14013
  {
14014
14014
  begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
14015
14015
  keywords: "return throw case",
@@ -14019,7 +14019,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
14019
14019
  e.REGEXP_MODE,
14020
14020
  {
14021
14021
  className: "function",
14022
- begin: yg,
14022
+ begin: Tg,
14023
14023
  returnBegin: !0,
14024
14024
  end: "\\s*=>",
14025
14025
  contains: [{
@@ -14076,7 +14076,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
14076
14076
  }
14077
14077
  ]
14078
14078
  },
14079
- mg,
14079
+ bg,
14080
14080
  { beginKeywords: "while if switch catch for" },
14081
14081
  {
14082
14082
  begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
@@ -14091,7 +14091,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
14091
14091
  match: /\.\.\./,
14092
14092
  relevance: 0
14093
14093
  },
14094
- _g,
14094
+ Cg,
14095
14095
  {
14096
14096
  match: "\\$" + g,
14097
14097
  relevance: 0
@@ -14101,10 +14101,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
14101
14101
  className: { 1: "title.function" },
14102
14102
  contains: [J]
14103
14103
  },
14104
- gg,
14104
+ Sg,
14105
14105
  $,
14106
14106
  Z,
14107
- vg,
14107
+ wg,
14108
14108
  { match: /\$[(.]/ }
14109
14109
  ]
14110
14110
  };
@@ -15058,12 +15058,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
15058
15058
  { begin: "!important" },
15059
15059
  n.FUNCTION_DISPATCH
15060
15060
  ]
15061
- }, dg = {
15061
+ }, _g = {
15062
15062
  begin: `[\\w-]+:(:)?(${i.join("|")})`,
15063
15063
  returnBegin: !0,
15064
15064
  contains: [H]
15065
15065
  };
15066
- return _.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, z, B, dg, L, H, I, n.FUNCTION_DISPATCH), {
15066
+ return _.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, z, B, _g, L, H, I, n.FUNCTION_DISPATCH), {
15067
15067
  name: "Less",
15068
15068
  case_insensitive: !0,
15069
15069
  illegal: "[=>'/<($\"]",
@@ -17589,7 +17589,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
17589
17589
  3: "variable.language"
17590
17590
  }
17591
17591
  }
17592
- ] }, dg = {
17592
+ ] }, _g = {
17593
17593
  scope: "attr",
17594
17594
  match: n.concat(i, n.lookahead(":"), n.lookahead(/(?!::)/))
17595
17595
  }, G = {
@@ -17598,7 +17598,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
17598
17598
  end: /\)/,
17599
17599
  keywords: I,
17600
17600
  contains: [
17601
- dg,
17601
+ _g,
17602
17602
  s,
17603
17603
  H,
17604
17604
  e.C_BLOCK_COMMENT_MODE,
@@ -17606,7 +17606,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
17606
17606
  E,
17607
17607
  z
17608
17608
  ]
17609
- }, fg = {
17609
+ }, vg = {
17610
17610
  relevance: 0,
17611
17611
  match: [
17612
17612
  /\b/,
@@ -17618,9 +17618,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
17618
17618
  scope: { 3: "title.function.invoke" },
17619
17619
  contains: [G]
17620
17620
  };
17621
- G.contains.push(fg);
17621
+ G.contains.push(vg);
17622
17622
  let K = [
17623
- dg,
17623
+ _g,
17624
17624
  H,
17625
17625
  e.C_BLOCK_COMMENT_MODE,
17626
17626
  T,
@@ -17682,7 +17682,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
17682
17682
  match: /\$this\b/
17683
17683
  },
17684
17684
  s,
17685
- fg,
17685
+ vg,
17686
17686
  H,
17687
17687
  {
17688
17688
  match: [
@@ -21038,7 +21038,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21038
21038
  "unknown",
21039
21039
  "usableFromInline",
21040
21040
  "warn_unqualified_access"
21041
- ], dg = [
21041
+ ], _g = [
21042
21042
  "iOS",
21043
21043
  "iOSApplicationExtension",
21044
21044
  "macOS",
@@ -21061,7 +21061,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21061
21061
  }, I = {
21062
21062
  match: a(/\./, s(...g)),
21063
21063
  relevance: 0
21064
- }, G = g.filter((e) => typeof e == "string").concat(["_|0"]), fg = { variants: [{
21064
+ }, G = g.filter((e) => typeof e == "string").concat(["_|0"]), vg = { variants: [{
21065
21065
  className: "keyword",
21066
21066
  match: s(...g.filter((e) => typeof e != "string").concat(m).map(l), ...d)
21067
21067
  }] }, K = {
@@ -21071,7 +21071,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21071
21071
  }, q = [
21072
21072
  O,
21073
21073
  I,
21074
- fg
21074
+ vg
21075
21075
  ], J = [{
21076
21076
  match: a(/\./, s(...E)),
21077
21077
  relevance: 0
@@ -21081,84 +21081,84 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21081
21081
  }], Z = {
21082
21082
  match: /->/,
21083
21083
  relevance: 0
21084
- }, pg = [Z, {
21084
+ }, yg = [Z, {
21085
21085
  className: "operator",
21086
21086
  relevance: 0,
21087
21087
  variants: [{ match: j }, { match: `\\.(\\.|${k})+` }]
21088
- }], Q = "([0-9]_*)+", mg = "([0-9a-fA-F]_*)+", $ = {
21088
+ }], Q = "([0-9]_*)+", bg = "([0-9a-fA-F]_*)+", $ = {
21089
21089
  className: "number",
21090
21090
  relevance: 0,
21091
21091
  variants: [
21092
21092
  { match: `\\b(${Q})(\\.(${Q}))?([eE][+-]?(${Q}))?\\b` },
21093
- { match: `\\b0x(${mg})(\\.(${mg}))?([pP][+-]?(${Q}))?\\b` },
21093
+ { match: `\\b0x(${bg})(\\.(${bg}))?([pP][+-]?(${Q}))?\\b` },
21094
21094
  { match: /\b0o([0-7]_*)+\b/ },
21095
21095
  { match: /\b0b([01]_*)+\b/ }
21096
21096
  ]
21097
- }, hg = (e = "") => ({
21097
+ }, xg = (e = "") => ({
21098
21098
  className: "subst",
21099
21099
  variants: [{ match: a(/\\/, e, /[0\\tnr"']/) }, { match: a(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) }]
21100
- }), gg = (e = "") => ({
21100
+ }), Sg = (e = "") => ({
21101
21101
  className: "subst",
21102
21102
  match: a(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
21103
- }), _g = (e = "") => ({
21103
+ }), Cg = (e = "") => ({
21104
21104
  className: "subst",
21105
21105
  label: "interpol",
21106
21106
  begin: a(/\\/, e, /\(/),
21107
21107
  end: /\)/
21108
- }), vg = (e = "") => ({
21108
+ }), wg = (e = "") => ({
21109
21109
  begin: a(e, /"""/),
21110
21110
  end: a(/"""/, e),
21111
21111
  contains: [
21112
- hg(e),
21113
- gg(e),
21114
- _g(e)
21112
+ xg(e),
21113
+ Sg(e),
21114
+ Cg(e)
21115
21115
  ]
21116
- }), yg = (e = "") => ({
21116
+ }), Tg = (e = "") => ({
21117
21117
  begin: a(e, /"/),
21118
21118
  end: a(/"/, e),
21119
- contains: [hg(e), _g(e)]
21120
- }), bg = {
21119
+ contains: [xg(e), Cg(e)]
21120
+ }), Eg = {
21121
21121
  className: "string",
21122
21122
  variants: [
21123
- vg(),
21124
- vg("#"),
21125
- vg("##"),
21126
- vg("###"),
21127
- yg(),
21128
- yg("#"),
21129
- yg("##"),
21130
- yg("###")
21123
+ wg(),
21124
+ wg("#"),
21125
+ wg("##"),
21126
+ wg("###"),
21127
+ Tg(),
21128
+ Tg("#"),
21129
+ Tg("##"),
21130
+ Tg("###")
21131
21131
  ]
21132
- }, xg = [e.BACKSLASH_ESCAPE, {
21132
+ }, Dg = [e.BACKSLASH_ESCAPE, {
21133
21133
  begin: /\[/,
21134
21134
  end: /\]/,
21135
21135
  relevance: 0,
21136
21136
  contains: [e.BACKSLASH_ESCAPE]
21137
- }], Sg = {
21137
+ }], Og = {
21138
21138
  begin: /\/[^\s](?=[^/\n]*\/)/,
21139
21139
  end: /\//,
21140
- contains: xg
21141
- }, Cg = (e) => {
21140
+ contains: Dg
21141
+ }, kg = (e) => {
21142
21142
  let n = a(e, /\//), r = a(/\//, e);
21143
21143
  return {
21144
21144
  begin: n,
21145
21145
  end: r,
21146
- contains: [...xg, {
21146
+ contains: [...Dg, {
21147
21147
  scope: "comment",
21148
21148
  begin: `#(?!.*${r})`,
21149
21149
  end: /$/
21150
21150
  }]
21151
21151
  };
21152
- }, wg = {
21152
+ }, Ag = {
21153
21153
  scope: "regexp",
21154
21154
  variants: [
21155
- Cg("###"),
21156
- Cg("##"),
21157
- Cg("#"),
21158
- Sg
21155
+ kg("###"),
21156
+ kg("##"),
21157
+ kg("#"),
21158
+ Og
21159
21159
  ]
21160
- }, Tg = { match: a(/`/, z, /`/) }, Eg = [
21161
- Tg,
21160
+ }, jg = { match: a(/`/, z, /`/) }, Mg = [
21161
+ jg,
21162
21162
  {
21163
21163
  className: "variable",
21164
21164
  match: /\$\d+/
@@ -21167,18 +21167,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21167
21167
  className: "variable",
21168
21168
  match: `\\$${L}+`
21169
21169
  }
21170
- ], Dg = [
21170
+ ], Ng = [
21171
21171
  {
21172
21172
  match: /(@|#(un)?)available/,
21173
21173
  scope: "keyword",
21174
21174
  starts: { contains: [{
21175
21175
  begin: /\(/,
21176
21176
  end: /\)/,
21177
- keywords: dg,
21177
+ keywords: _g,
21178
21178
  contains: [
21179
- ...pg,
21179
+ ...yg,
21180
21180
  $,
21181
- bg
21181
+ Eg
21182
21182
  ]
21183
21183
  }] }
21184
21184
  },
@@ -21190,7 +21190,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21190
21190
  scope: "meta",
21191
21191
  match: a(/@/, z)
21192
21192
  }
21193
- ], Og = {
21193
+ ], Pg = {
21194
21194
  match: i(/\b[A-Z]/),
21195
21195
  relevance: 0,
21196
21196
  contains: [
@@ -21216,20 +21216,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21216
21216
  relevance: 0
21217
21217
  }
21218
21218
  ]
21219
- }, kg = {
21219
+ }, Fg = {
21220
21220
  begin: /</,
21221
21221
  end: />/,
21222
21222
  keywords: K,
21223
21223
  contains: [
21224
21224
  ...o,
21225
21225
  ...q,
21226
- ...Dg,
21226
+ ...Ng,
21227
21227
  Z,
21228
- Og
21228
+ Pg
21229
21229
  ]
21230
21230
  };
21231
- Og.contains.push(kg);
21232
- let Ag = {
21231
+ Pg.contains.push(Fg);
21232
+ let Ig = {
21233
21233
  begin: /\(/,
21234
21234
  end: /\)/,
21235
21235
  relevance: 0,
@@ -21242,22 +21242,22 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21242
21242
  relevance: 0
21243
21243
  },
21244
21244
  ...o,
21245
- wg,
21245
+ Ag,
21246
21246
  ...q,
21247
21247
  ...J,
21248
- ...pg,
21248
+ ...yg,
21249
21249
  $,
21250
- bg,
21251
- ...Eg,
21252
- ...Dg,
21253
- Og
21250
+ Eg,
21251
+ ...Mg,
21252
+ ...Ng,
21253
+ Pg
21254
21254
  ]
21255
- }, jg = {
21255
+ }, Lg = {
21256
21256
  begin: /</,
21257
21257
  end: />/,
21258
21258
  keywords: "repeat each",
21259
- contains: [...o, Og]
21260
- }, Mg = {
21259
+ contains: [...o, Pg]
21260
+ }, Rg = {
21261
21261
  begin: /\(/,
21262
21262
  end: /\)/,
21263
21263
  keywords: K,
@@ -21276,41 +21276,41 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21276
21276
  },
21277
21277
  ...o,
21278
21278
  ...q,
21279
- ...pg,
21279
+ ...yg,
21280
21280
  $,
21281
- bg,
21282
- ...Dg,
21283
- Og,
21284
- Ag
21281
+ Eg,
21282
+ ...Ng,
21283
+ Pg,
21284
+ Ig
21285
21285
  ],
21286
21286
  endsParent: !0,
21287
21287
  illegal: /["']/
21288
- }, Ng = {
21288
+ }, zg = {
21289
21289
  match: [
21290
21290
  /(func|macro)/,
21291
21291
  /\s+/,
21292
- s(Tg.match, z, j)
21292
+ s(jg.match, z, j)
21293
21293
  ],
21294
21294
  className: {
21295
21295
  1: "keyword",
21296
21296
  3: "title.function"
21297
21297
  },
21298
21298
  contains: [
21299
- jg,
21300
- Mg,
21299
+ Lg,
21300
+ Rg,
21301
21301
  n
21302
21302
  ],
21303
21303
  illegal: [/\[/, /%/]
21304
- }, Pg = {
21304
+ }, Bg = {
21305
21305
  match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
21306
21306
  className: { 1: "keyword" },
21307
21307
  contains: [
21308
- jg,
21309
- Mg,
21308
+ Lg,
21309
+ Rg,
21310
21310
  n
21311
21311
  ],
21312
21312
  illegal: /\[|%/
21313
- }, Fg = {
21313
+ }, Vg = {
21314
21314
  match: [
21315
21315
  /operator/,
21316
21316
  /\s+/,
@@ -21320,7 +21320,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21320
21320
  1: "keyword",
21321
21321
  3: "title"
21322
21322
  }
21323
- }, Ig = {
21323
+ }, Hg = {
21324
21324
  begin: [
21325
21325
  /precedencegroup/,
21326
21326
  /\s+/,
@@ -21330,10 +21330,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21330
21330
  1: "keyword",
21331
21331
  3: "title"
21332
21332
  },
21333
- contains: [Og],
21333
+ contains: [Pg],
21334
21334
  keywords: [...v, ..._],
21335
21335
  end: /}/
21336
- }, Lg = {
21336
+ }, Ug = {
21337
21337
  match: [
21338
21338
  /class\b/,
21339
21339
  /\s+/,
@@ -21346,7 +21346,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21346
21346
  3: "keyword",
21347
21347
  5: "title.function"
21348
21348
  }
21349
- }, Rg = {
21349
+ }, Wg = {
21350
21350
  match: [
21351
21351
  /class\b/,
21352
21352
  /\s+/,
@@ -21356,7 +21356,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21356
21356
  1: "keyword",
21357
21357
  3: "keyword"
21358
21358
  }
21359
- }, zg = {
21359
+ }, Gg = {
21360
21360
  begin: [
21361
21361
  /(struct|protocol|class|extension|enum|actor)/,
21362
21362
  /\s+/,
@@ -21369,7 +21369,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21369
21369
  },
21370
21370
  keywords: K,
21371
21371
  contains: [
21372
- jg,
21372
+ Lg,
21373
21373
  ...q,
21374
21374
  {
21375
21375
  begin: /:/,
@@ -21383,16 +21383,16 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21383
21383
  }
21384
21384
  ]
21385
21385
  };
21386
- for (let e of bg.variants) {
21386
+ for (let e of Eg.variants) {
21387
21387
  let n = e.contains.find((e) => e.label === "interpol");
21388
21388
  n.keywords = K;
21389
21389
  let r = [
21390
21390
  ...q,
21391
21391
  ...J,
21392
- ...pg,
21392
+ ...yg,
21393
21393
  $,
21394
- bg,
21395
- ...Eg
21394
+ Eg,
21395
+ ...Mg
21396
21396
  ];
21397
21397
  n.contains = [...r, {
21398
21398
  begin: /\(/,
@@ -21405,29 +21405,29 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21405
21405
  keywords: K,
21406
21406
  contains: [
21407
21407
  ...o,
21408
- Ng,
21409
- Pg,
21410
- Lg,
21411
- Rg,
21412
21408
  zg,
21413
- Fg,
21414
- Ig,
21409
+ Bg,
21410
+ Ug,
21411
+ Wg,
21412
+ Gg,
21413
+ Vg,
21414
+ Hg,
21415
21415
  {
21416
21416
  beginKeywords: "import",
21417
21417
  end: /$/,
21418
21418
  contains: [...o],
21419
21419
  relevance: 0
21420
21420
  },
21421
- wg,
21421
+ Ag,
21422
21422
  ...q,
21423
21423
  ...J,
21424
- ...pg,
21424
+ ...yg,
21425
21425
  $,
21426
- bg,
21427
- ...Eg,
21428
- ...Dg,
21429
- Og,
21430
- Ag
21426
+ Eg,
21427
+ ...Mg,
21428
+ ...Ng,
21429
+ Pg,
21430
+ Ig
21431
21431
  ]
21432
21432
  };
21433
21433
  }
@@ -22037,7 +22037,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22037
22037
  contains: [e.BACKSLASH_ESCAPE, L],
22038
22038
  subLanguage: "graphql"
22039
22039
  }
22040
- }, dg = {
22040
+ }, _g = {
22041
22041
  className: "string",
22042
22042
  begin: "`",
22043
22043
  end: "`",
@@ -22079,21 +22079,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22079
22079
  e.C_BLOCK_COMMENT_MODE,
22080
22080
  e.C_LINE_COMMENT_MODE
22081
22081
  ]
22082
- }, fg = [
22082
+ }, vg = [
22083
22083
  e.APOS_STRING_MODE,
22084
22084
  e.QUOTE_STRING_MODE,
22085
22085
  z,
22086
22086
  B,
22087
22087
  H,
22088
- dg,
22088
+ _g,
22089
22089
  { match: /\$\d+/ },
22090
22090
  I
22091
22091
  ];
22092
- L.contains = fg.concat({
22092
+ L.contains = vg.concat({
22093
22093
  begin: /\{/,
22094
22094
  end: /\}/,
22095
22095
  keywords: E,
22096
- contains: ["self"].concat(fg)
22096
+ contains: ["self"].concat(vg)
22097
22097
  });
22098
22098
  let K = [].concat(G, L.contains), q = K.concat([{
22099
22099
  begin: /(\s*)\(/,
@@ -22134,7 +22134,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22134
22134
  1: "keyword",
22135
22135
  3: "title.class"
22136
22136
  }
22137
- }] }, pg = {
22137
+ }] }, yg = {
22138
22138
  relevance: 0,
22139
22139
  match: n.either(/\bJSON/, /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),
22140
22140
  className: "title.class",
@@ -22144,7 +22144,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22144
22144
  className: "meta",
22145
22145
  relevance: 10,
22146
22146
  begin: /^\s*['"]use (strict|asm)['"]/
22147
- }, mg = {
22147
+ }, bg = {
22148
22148
  variants: [{ match: [
22149
22149
  /function/,
22150
22150
  /\s+/,
@@ -22163,25 +22163,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22163
22163
  match: /\b[A-Z][A-Z_0-9]+\b/,
22164
22164
  className: "variable.constant"
22165
22165
  };
22166
- function hg(e) {
22166
+ function xg(e) {
22167
22167
  return n.concat("(?!", e.join("|"), ")");
22168
22168
  }
22169
- let gg = {
22170
- match: n.concat(/\b/, hg([
22169
+ let Sg = {
22170
+ match: n.concat(/\b/, xg([
22171
22171
  ...l,
22172
22172
  "super",
22173
22173
  "import"
22174
22174
  ].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
22175
22175
  className: "title.function",
22176
22176
  relevance: 0
22177
- }, _g = {
22177
+ }, Cg = {
22178
22178
  begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
22179
22179
  end: g,
22180
22180
  excludeBegin: !0,
22181
22181
  keywords: "prototype",
22182
22182
  className: "property",
22183
22183
  relevance: 0
22184
- }, vg = {
22184
+ }, wg = {
22185
22185
  match: [
22186
22186
  /get|set/,
22187
22187
  /\s+/,
@@ -22193,7 +22193,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22193
22193
  3: "title.function"
22194
22194
  },
22195
22195
  contains: [{ begin: /\(\)/ }, J]
22196
- }, yg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", bg = {
22196
+ }, Tg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Eg = {
22197
22197
  match: [
22198
22198
  /const|var|let/,
22199
22199
  /\s+/,
@@ -22201,7 +22201,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22201
22201
  /\s*/,
22202
22202
  /=\s*/,
22203
22203
  /(async\s*)?/,
22204
- n.lookahead(yg)
22204
+ n.lookahead(Tg)
22205
22205
  ],
22206
22206
  keywords: "async",
22207
22207
  className: {
@@ -22221,7 +22221,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22221
22221
  keywords: E,
22222
22222
  exports: {
22223
22223
  PARAMS_CONTAINS: q,
22224
- CLASS_REFERENCE: pg
22224
+ CLASS_REFERENCE: yg
22225
22225
  },
22226
22226
  illegal: /#(?![$_A-z])/,
22227
22227
  contains: [
@@ -22236,17 +22236,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22236
22236
  z,
22237
22237
  B,
22238
22238
  H,
22239
- dg,
22239
+ _g,
22240
22240
  G,
22241
22241
  { match: /\$\d+/ },
22242
22242
  I,
22243
- pg,
22243
+ yg,
22244
22244
  {
22245
22245
  scope: "attr",
22246
22246
  match: g + n.lookahead(":"),
22247
22247
  relevance: 0
22248
22248
  },
22249
- bg,
22249
+ Eg,
22250
22250
  {
22251
22251
  begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
22252
22252
  keywords: "return throw case",
@@ -22256,7 +22256,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22256
22256
  e.REGEXP_MODE,
22257
22257
  {
22258
22258
  className: "function",
22259
- begin: yg,
22259
+ begin: Tg,
22260
22260
  returnBegin: !0,
22261
22261
  end: "\\s*=>",
22262
22262
  contains: [{
@@ -22313,7 +22313,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22313
22313
  }
22314
22314
  ]
22315
22315
  },
22316
- mg,
22316
+ bg,
22317
22317
  { beginKeywords: "while if switch catch for" },
22318
22318
  {
22319
22319
  begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
@@ -22328,7 +22328,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22328
22328
  match: /\.\.\./,
22329
22329
  relevance: 0
22330
22330
  },
22331
- _g,
22331
+ Cg,
22332
22332
  {
22333
22333
  match: "\\$" + g,
22334
22334
  relevance: 0
@@ -22338,10 +22338,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22338
22338
  className: { 1: "title.function" },
22339
22339
  contains: [J]
22340
22340
  },
22341
- gg,
22341
+ Sg,
22342
22342
  $,
22343
22343
  Z,
22344
- vg,
22344
+ wg,
22345
22345
  { match: /\$[(.]/ }
22346
22346
  ]
22347
22347
  };
@@ -24482,7 +24482,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
24482
24482
  if (!(window.InputEvent && typeof InputEvent.prototype.getTargetRanges == "function")) return console.error("beforeinput event is not supported."), noop;
24483
24483
  let { contentEditable: o, role: T, ariaMultiLine: O, ariaReadOnly: k } = r, j = r.style.whiteSpace;
24484
24484
  r.role = "textbox", r.style.whiteSpace = "pre-wrap", e || (r.ariaMultiLine = "true");
24485
- let I = !1, L = !1, z = null, B = !1, H = !1, dg = !1, G = getCurrentDocument(r), fg = {
24485
+ let I = !1, L = !1, z = null, B = !1, H = !1, _g = !1, G = getCurrentDocument(r), vg = {
24486
24486
  _document: G,
24487
24487
  _isBlock: s
24488
24488
  };
@@ -24490,9 +24490,9 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
24490
24490
  r.contentEditable = m ? "false" : "true", r.ariaReadOnly = m ? "true" : null;
24491
24491
  }, g();
24492
24492
  let K = createMutationObserver(r, () => {
24493
- H && setSelectionToDOM(G, r, d, fg);
24493
+ H && setSelectionToDOM(G, r, d, vg);
24494
24494
  }), q = () => {
24495
- d = takeSelectionSnapshot(r, fg);
24495
+ d = takeSelectionSnapshot(r, vg);
24496
24496
  }, J = () => {
24497
24497
  let e = K._flush();
24498
24498
  if (K._record(!1), e.length) {
@@ -24502,7 +24502,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
24502
24502
  for (let n = r.length - 1; n >= 0; n--) e.insertBefore(r[n], a);
24503
24503
  for (let n = i.length - 1; n >= 0; n--) e.removeChild(i[n]);
24504
24504
  } else n.target.nodeValue = n.oldValue;
24505
- K._flush(), L = setSelectionToDOM(G, r, d, fg);
24505
+ K._flush(), L = setSelectionToDOM(G, r, d, vg);
24506
24506
  }
24507
24507
  E(z), B = !1, z = null;
24508
24508
  }, Z = (e) => {
@@ -24516,7 +24516,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
24516
24516
  r && (l(n(r[0])), d = r[1]);
24517
24517
  }
24518
24518
  }
24519
- }, pg = () => {
24519
+ }, yg = () => {
24520
24520
  B || J();
24521
24521
  }, Q = (e) => {
24522
24522
  e.preventDefault();
@@ -24525,7 +24525,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
24525
24525
  B ? K._record(!0) : q();
24526
24526
  let i = e.getTargetRanges()[0];
24527
24527
  if (i) {
24528
- let a = serializeRange(r, fg, i), o = n === "insertParagraph" || n === "insertLineBreak" ? "\n" : e.data;
24528
+ let a = serializeRange(r, vg, i), o = n === "insertParagraph" || n === "insertLineBreak" ? "\n" : e.data;
24529
24529
  if (o == null) {
24530
24530
  let n = e.dataTransfer;
24531
24531
  n && (o = n.getData("text/plain"));
@@ -24533,46 +24533,46 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
24533
24533
  z ||= new Transaction().select(...d), comparePosition(...a) !== 0 && z.delete(...a), o && z.insert(a[0], stringToDoc(o));
24534
24534
  }
24535
24535
  B || J();
24536
- }, mg = () => {
24536
+ }, bg = () => {
24537
24537
  B || q(), B = !0;
24538
24538
  }, $ = () => {
24539
24539
  J();
24540
- }, hg = () => {
24540
+ }, xg = () => {
24541
24541
  H = !0, q();
24542
- }, gg = () => {
24542
+ }, Sg = () => {
24543
24543
  H = !1;
24544
- }, _g = () => {
24544
+ }, Cg = () => {
24545
24545
  if (L) {
24546
24546
  L = !1;
24547
24547
  return;
24548
24548
  }
24549
- H && !B && !dg && q();
24550
- }, vg = (e) => {
24549
+ H && !B && !_g && q();
24550
+ }, wg = (e) => {
24551
24551
  q(), comparePosition(...d) !== 0 && i(e, sliceDoc(_(), ...range(d)), r);
24552
- }, yg = (e) => {
24553
- e.preventDefault(), vg(e.clipboardData);
24554
- }, bg = (e) => {
24555
- e.preventDefault(), m || (vg(e.clipboardData), E(new Transaction().delete(...range(d))));
24556
- }, xg = (e) => {
24552
+ }, Tg = (e) => {
24553
+ e.preventDefault(), wg(e.clipboardData);
24554
+ }, Eg = (e) => {
24555
+ e.preventDefault(), m || (wg(e.clipboardData), E(new Transaction().delete(...range(d))));
24556
+ }, Dg = (e) => {
24557
24557
  e.preventDefault();
24558
24558
  let [n, r] = range(d);
24559
- E(new Transaction().delete(n, r).insert(n, a(e.clipboardData, fg)));
24560
- }, Sg = (e) => {
24559
+ E(new Transaction().delete(n, r).insert(n, a(e.clipboardData, vg)));
24560
+ }, Og = (e) => {
24561
24561
  e.preventDefault();
24562
- let n = e.dataTransfer, i = getPointedCaretPosition(G, r, e, fg);
24562
+ let n = e.dataTransfer, i = getPointedCaretPosition(G, r, e, vg);
24563
24563
  if (n && i) {
24564
24564
  let e = new Transaction();
24565
- dg && e.delete(...range(d));
24565
+ _g && e.delete(...range(d));
24566
24566
  let o = e.transform(i);
24567
- e.select(o, o).insert(o, a(n, fg)).select(o), E(e), r.focus({ preventScroll: !0 });
24567
+ e.select(o, o).insert(o, a(n, vg)).select(o), E(e), r.focus({ preventScroll: !0 });
24568
24568
  }
24569
- }, Cg = (e) => {
24570
- dg = !0, vg(e.dataTransfer);
24571
- }, wg = () => {
24572
- dg = !1;
24569
+ }, kg = (e) => {
24570
+ _g = !0, wg(e.dataTransfer);
24571
+ }, Ag = () => {
24572
+ _g = !1;
24573
24573
  };
24574
- return G.addEventListener("selectionchange", _g), r.addEventListener("keydown", Z), r.addEventListener("input", pg), r.addEventListener("beforeinput", Q), r.addEventListener("compositionstart", mg), r.addEventListener("compositionend", $), r.addEventListener("focus", hg), r.addEventListener("blur", gg), r.addEventListener("copy", yg), r.addEventListener("cut", bg), r.addEventListener("paste", xg), r.addEventListener("drop", Sg), r.addEventListener("dragstart", Cg), r.addEventListener("dragend", wg), () => {
24575
- I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, K._dispose(), G.removeEventListener("selectionchange", _g), r.removeEventListener("keydown", Z), r.removeEventListener("input", pg), r.removeEventListener("beforeinput", Q), r.removeEventListener("compositionstart", mg), r.removeEventListener("compositionend", $), r.removeEventListener("focus", hg), r.removeEventListener("blur", gg), r.removeEventListener("copy", yg), r.removeEventListener("cut", bg), r.removeEventListener("paste", xg), r.removeEventListener("drop", Sg), r.removeEventListener("dragstart", Cg), r.removeEventListener("dragend", wg));
24574
+ return G.addEventListener("selectionchange", Cg), r.addEventListener("keydown", Z), r.addEventListener("input", yg), r.addEventListener("beforeinput", Q), r.addEventListener("compositionstart", bg), r.addEventListener("compositionend", $), r.addEventListener("focus", xg), r.addEventListener("blur", Sg), r.addEventListener("copy", Tg), r.addEventListener("cut", Eg), r.addEventListener("paste", Dg), r.addEventListener("drop", Og), r.addEventListener("dragstart", kg), r.addEventListener("dragend", Ag), () => {
24575
+ I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, K._dispose(), G.removeEventListener("selectionchange", Cg), r.removeEventListener("keydown", Z), r.removeEventListener("input", yg), r.removeEventListener("beforeinput", Q), r.removeEventListener("compositionstart", bg), r.removeEventListener("compositionend", $), r.removeEventListener("focus", xg), r.removeEventListener("blur", Sg), r.removeEventListener("copy", Tg), r.removeEventListener("cut", Eg), r.removeEventListener("paste", Dg), r.removeEventListener("drop", Og), r.removeEventListener("dragstart", kg), r.removeEventListener("dragend", Ag));
24576
24576
  };
24577
24577
  },
24578
24578
  command: (e, ...n) => {
@@ -24915,7 +24915,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
24915
24915
  set(e) {
24916
24916
  l.value = e, n();
24917
24917
  }
24918
- })), k = shallowRef("slash"), j = shallowRef(""), I = shallowRef([]), L = shallowRef([]), z = shallowRef([]), B, H, dg = document.body, { commandSelection: G, GetCursorPosition: K } = useCommandSelection(), q = () => {
24918
+ })), k = shallowRef("slash"), j = shallowRef(""), I = shallowRef([]), L = shallowRef([]), z = shallowRef([]), B, H, _g = document.body, { commandSelection: G, GetCursorPosition: K } = useCommandSelection(), q = () => {
24919
24919
  setTimeout(() => {
24920
24920
  let e = $();
24921
24921
  j.value = e.query || "", e.isActive ? (a.value?.setProps({ getReferenceClientRect: () => ({
@@ -24928,7 +24928,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
24928
24928
  }, J = (e) => {
24929
24929
  if (s("keydown", e), e.key === "Enter" || e.key === "NumpadEnter") return e.shiftKey ? void 0 : (e.preventDefault?.(), !1);
24930
24930
  e.key === "@" && (k.value = "slash", q()), e.key === "/" && (k.value = "prompt", q());
24931
- }, pg = () => {
24931
+ }, yg = () => {
24932
24932
  j.value = "";
24933
24933
  }, $ = () => {
24934
24934
  let e = {
@@ -24960,27 +24960,27 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
24960
24960
  } catch {
24961
24961
  return e;
24962
24962
  }
24963
- }, hg = (e, n) => e.reduce((e, r, i) => i >= n ? e : (r.type === "text" && (e += r.text?.length || 0), r.type === "tag" && (e += 1), e), 0), gg = (e) => {
24963
+ }, xg = (e, n) => e.reduce((e, r, i) => i >= n ? e : (r.type === "text" && (e += r.text?.length || 0), r.type === "tag" && (e += 1), e), 0), Sg = (e) => {
24964
24964
  z.value.push(e), B.command(K);
24965
24965
  let { column: n, line: r } = G.value;
24966
- B.command(DeleteTag, [r, n - j.value.length - 1], [r, n]), B.command(InsertTag, [r, n], e), B.command(InsertText, [r, n + j.value.length + 1 + 1], " "), a.value?.hide(), _g();
24967
- }, _g = () => {
24966
+ B.command(DeleteTag, [r, n - j.value.length - 1], [r, n]), B.command(InsertTag, [r, n], e), B.command(InsertText, [r, n + j.value.length + 1 + 1], " "), a.value?.hide(), Cg();
24967
+ }, Cg = () => {
24968
24968
  setTimeout(() => {
24969
24969
  let e = window.getSelection(), n = document.createRange();
24970
24970
  i.value && e && (n.selectNodeContents(i.value), n.collapse(!1), e.removeAllRanges(), e.addRange(n));
24971
24971
  }, 100);
24972
- }, yg = (e) => {
24973
- B.command(ReplaceAll, e), _g();
24972
+ }, Tg = (e) => {
24973
+ B.command(ReplaceAll, e), Cg();
24974
24974
  };
24975
24975
  watchEffect(() => {
24976
24976
  j.value ? (I.value = u.resources.filter((e) => e.name.toLowerCase().includes(j.value.toLowerCase())), L.value = u.prompts.filter((e) => e.toLowerCase().includes(j.value.toLowerCase()))) : (I.value = u.resources, L.value = u.prompts), !I.value.length && !L.value.length && a.value?.hide();
24977
24977
  });
24978
- let bg = (e, n, r, i) => {
24978
+ let Eg = (e, n, r, i) => {
24979
24979
  if (n.type === "tag") {
24980
- let n = hg(e, r);
24980
+ let n = xg(e, r);
24981
24981
  B.command(DeleteTag, [i, n], [i, n + 1]);
24982
24982
  }
24983
- }, Cg = (e) => {
24983
+ }, kg = (e) => {
24984
24984
  let n = e.clipboardData?.items;
24985
24985
  if (!n) return;
24986
24986
  let r = [];
@@ -24989,7 +24989,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
24989
24989
  n && r.push(n);
24990
24990
  }
24991
24991
  r.length > 0 && (e.preventDefault(), console.log("handlePaste files", r), s("upload", r));
24992
- }, Tg = () => {
24992
+ }, jg = () => {
24993
24993
  H?.(), B = createEditor({
24994
24994
  doc: d.value,
24995
24995
  schema: tagSchema,
@@ -24998,16 +24998,16 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
24998
24998
  },
24999
24999
  onKeyDown: (e) => J(e)
25000
25000
  }), H = B.input(i.value);
25001
- }, Dg = () => k.value === "slash" ? I.value.length < 1 ? !1 : void 0 : L.value.length < 1 ? !1 : void 0;
25001
+ }, Ng = () => k.value === "slash" ? I.value.length < 1 ? !1 : void 0 : L.value.length < 1 ? !1 : void 0;
25002
25002
  return onMounted(() => {
25003
- Tg(), i.value?.addEventListener("paste", Cg);
25003
+ jg(), i.value?.addEventListener("paste", kg);
25004
25004
  }), onUnmounted(() => {
25005
- B.command(ReplaceAll, ""), H?.(), i.value?.removeEventListener("paste", Cg);
25005
+ B.command(ReplaceAll, ""), H?.(), i.value?.removeEventListener("paste", kg);
25006
25006
  }), n({
25007
25007
  cleanup: () => {
25008
25008
  B.command(ReplaceAll, "");
25009
25009
  },
25010
- focus: _g
25010
+ focus: Cg
25011
25011
  }), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$26, [createElementVNode("div", {
25012
25012
  ref_key: "editorRef",
25013
25013
  ref: i,
@@ -25021,11 +25021,11 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
25021
25021
  "data-tag-type": r.data.type
25022
25022
  }, [createTextVNode(toDisplayString(r.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
25023
25023
  class: "mention-tag-remove-icon",
25024
- onClick: (a) => bg(e, r, i, n)
25024
+ onClick: (a) => Eg(e, r, i, n)
25025
25025
  }, null, 8, ["onClick"])], 10, _hoisted_4$11)) : createCommentVNode("v-if", !0)], 64))), 128)) : (openBlock(), createElementBlock("br", _hoisted_5$7))]))), 128)) : createCommentVNode("v-if", !0)], 8, _hoisted_2$18), createVNode(unref(Tippy), {
25026
25026
  ref_key: "tippyRef",
25027
25027
  ref: a,
25028
- "append-to": unref(dg),
25028
+ "append-to": unref(_g),
25029
25029
  arrow: !1,
25030
25030
  "hide-on-click": !0,
25031
25031
  interactive: !0,
@@ -25035,16 +25035,16 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
25035
25035
  trigger: "manual",
25036
25036
  "trigger-target": i.value,
25037
25037
  "z-index": unref(EDITOR_MENU_Z_INDEX),
25038
- onHidden: pg,
25039
- onShow: Dg
25038
+ onHidden: yg,
25039
+ onShow: Ng
25040
25040
  }, {
25041
25041
  content: withCtx(() => [k.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
25042
25042
  key: 0,
25043
- "on-select": gg,
25043
+ "on-select": Sg,
25044
25044
  "resource-list": I.value
25045
25045
  }, null, 8, ["resource-list"])) : k.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
25046
25046
  key: 1,
25047
- "on-select": yg,
25047
+ "on-select": Tg,
25048
25048
  prompts: L.value
25049
25049
  }, null, 8, ["prompts"])) : createCommentVNode("v-if", !0)]),
25050
25050
  _: 1
@@ -25145,11 +25145,11 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
25145
25145
  } catch (e) {
25146
25146
  console.error(e);
25147
25147
  }
25148
- }, dg = () => {
25148
+ }, _g = () => {
25149
25149
  s.value = "";
25150
25150
  }, G = (e) => {
25151
25151
  T("selectShortcut", e);
25152
- }, fg = () => {
25152
+ }, vg = () => {
25153
25153
  T("deleteShortcut");
25154
25154
  }, J = async (e) => {
25155
25155
  if (L.value) for (let n of e) {
@@ -25180,7 +25180,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
25180
25180
  key: 0,
25181
25181
  class: "chat-input-cite",
25182
25182
  content: s.value,
25183
- onClose: dg
25183
+ onClose: _g
25184
25184
  }, null, 8, ["content"])) : createCommentVNode("v-if", !0)]),
25185
25185
  renderSlot(n.$slots, "files", normalizeProps(guardReactiveProps({ files: O.value })), () => [O.value.length ? (openBlock(), createElementBlock("div", {
25186
25186
  key: 0,
@@ -25227,7 +25227,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
25227
25227
  class: "selected-shortcut-btn",
25228
25228
  shortcut: k.value
25229
25229
  }, {
25230
- append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: fg })]),
25230
+ append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: vg })]),
25231
25231
  _: 1
25232
25232
  }, 8, ["shortcut"])) : createCommentVNode("v-if", !0)])
25233
25233
  ]),
@@ -25361,10 +25361,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
25361
25361
  theme: "ai-chat-box-light light",
25362
25362
  trigger: "click",
25363
25363
  appendTo: () => document.body,
25364
- ...r.tippyOptions || {},
25365
- onShow: () => {
25366
- if (r.messageToolsStatus === MessageToolsStatus.Disabled) return !1;
25367
- }
25364
+ ...r.tippyOptions || {}
25368
25365
  })), O = async (e) => {
25369
25366
  if (e.id === "like" || e.id === "unlike") {
25370
25367
  try {
@@ -25380,6 +25377,7 @@ var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$18 = ["aria-
25380
25377
  }, j = (e) => u.value ? u.value === "like" && e === "like" ? "activeLike" : u.value === "unlike" && e === "unlike" ? "activeUnLike" : e : e, I = (e, n, r) => {
25381
25378
  k(), u.value === e.id ? u.value = null : u.value = e.id, i("feedback", e, n, r);
25382
25379
  }, L = (e) => {
25380
+ if (r.messageToolsStatus === MessageToolsStatus.Disabled) return !1;
25383
25381
  if (u.value && u.value === e) return u.value = null, !1;
25384
25382
  };
25385
25383
  return onUnmounted(() => {
@@ -26026,6 +26024,20 @@ const normalizeUrl = (e) => {
26026
26024
  return console.warn("Failed to normalize URL:", n), ensureTrailingSlash(e);
26027
26025
  }
26028
26026
  };
26027
+ async function copyToClipboard(e) {
26028
+ if (typeof navigator < "u" && "clipboard" in navigator) try {
26029
+ return await navigator.clipboard.writeText(e), !0;
26030
+ } catch {}
26031
+ let n = document.createElement("textarea");
26032
+ n.value = e, n.style.position = "fixed", n.style.left = "-9999px", n.style.top = "-9999px", n.style.opacity = "0", document.body.appendChild(n), n.focus(), n.select();
26033
+ try {
26034
+ return document.execCommand("copy");
26035
+ } catch {
26036
+ return !1;
26037
+ } finally {
26038
+ document.body.removeChild(n);
26039
+ }
26040
+ }
26029
26041
  function getPlatform() {
26030
26042
  let e = window.navigator.userAgent.toLowerCase(), n = window.navigator.platform.toLowerCase();
26031
26043
  return n.includes("mac") || e.includes("mac") ? "mac" : n.includes("win") || e.includes("win") ? "windows" : n.includes("linux") || e.includes("linux") ? "linux" : "unknown";
@@ -26468,7 +26480,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26468
26480
  onSessionDelete: (e) => a("history-session-delete", e),
26469
26481
  onSessionRename: (e, n) => a("history-session-rename", e, n)
26470
26482
  }));
26471
- }, H = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")), dg = computed(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"), G = computed(() => i.isCompressionHeight ? t("恢复默认尺寸") : t("缩小高度")), K = computed(() => i.hasPermission), pg = (e) => K.value ? e : t("暂无使用权限"), Q = () => ({ cursor: K.value ? "pointer" : "not-allowed" }), $ = computed(() => {
26483
+ }, H = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")), _g = computed(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"), G = computed(() => i.isCompressionHeight ? t("恢复默认尺寸") : t("缩小高度")), K = computed(() => i.hasPermission), yg = (e) => K.value ? e : t("暂无使用权限"), Q = () => ({ cursor: K.value ? "pointer" : "not-allowed" }), $ = computed(() => {
26472
26484
  let e = !i.hasSessionContents, n = e ? "disabled" : "", r = e ? `data-tippy-content="${t("请先发起会话")}"` : "", a = "";
26473
26485
  return i.dropdownMenuConfig?.showRename && (a += `
26474
26486
  <div class="tippy-menu-item" data-action="rename">
@@ -26490,7 +26502,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26490
26502
  ${a}
26491
26503
  </div>
26492
26504
  `;
26493
- }), hg = async () => {
26505
+ }), xg = async () => {
26494
26506
  if (i.sessionBusinessManager) try {
26495
26507
  await i.sessionBusinessManager.createNewSession();
26496
26508
  } catch (e) {
@@ -26500,18 +26512,18 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26500
26512
  });
26501
26513
  }
26502
26514
  a("new-chat");
26503
- }, _g = (e) => {
26515
+ }, Cg = (e) => {
26504
26516
  e.stopPropagation(), i.sessionBusinessManager ? (z || B(), z && z.handleTriggerClick(e)) : a("history-click", e);
26505
- }, vg = () => {
26517
+ }, wg = () => {
26506
26518
  a("help-click");
26507
- }, yg = (e) => {
26519
+ }, Tg = (e) => {
26508
26520
  e.stopPropagation(), L && (L.state.isVisible ? L.hide() : L.show());
26509
- }, bg = (e) => {
26521
+ }, Eg = (e) => {
26510
26522
  e.stopPropagation(), e.preventDefault();
26511
26523
  let n = e.currentTarget, r = n.dataset.action;
26512
26524
  if (!n.classList.contains("disabled")) switch (L && L.hide(), r) {
26513
26525
  case "rename":
26514
- xg();
26526
+ Dg();
26515
26527
  break;
26516
26528
  case "auto-generate":
26517
26529
  a("auto-generate-name");
@@ -26520,9 +26532,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26520
26532
  a("share");
26521
26533
  break;
26522
26534
  }
26523
- }, xg = () => {
26524
- document.removeEventListener("click", Dg), j.value = i.sessionName || "", k.value = !0, setTimeout(() => {
26525
- document.addEventListener("click", Dg);
26535
+ }, Dg = () => {
26536
+ document.removeEventListener("click", Ng), j.value = i.sessionName || "", k.value = !0, setTimeout(() => {
26537
+ document.addEventListener("click", Ng);
26526
26538
  }, 100), setTimeout(() => {
26527
26539
  if (I.value) try {
26528
26540
  let e = I.value;
@@ -26533,22 +26545,22 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26533
26545
  console.warn("Failed to focus rename input:", e);
26534
26546
  }
26535
26547
  }, 100);
26536
- }, Cg = () => {
26548
+ }, kg = () => {
26537
26549
  let e = j.value.trim();
26538
26550
  if (!e) {
26539
- Tg();
26551
+ jg();
26540
26552
  return;
26541
26553
  }
26542
26554
  a("rename", e), k.value = !1, j.value = "";
26543
- }, Tg = () => {
26555
+ }, jg = () => {
26544
26556
  k.value = !1, j.value = "";
26545
- }, Eg = (e, n) => {
26546
- j.value = e, n.key === "Enter" ? Cg() : n.key === "Escape" && Tg();
26547
- }, Dg = (e) => {
26557
+ }, Mg = (e, n) => {
26558
+ j.value = e, n.key === "Enter" ? kg() : n.key === "Escape" && jg();
26559
+ }, Ng = (e) => {
26548
26560
  if (!k.value) return;
26549
26561
  let n = e.target, r = document.querySelector(".rename-tooltip");
26550
- r && !r.contains(n) && Tg();
26551
- }, Og = async () => {
26562
+ r && !r.contains(n) && jg();
26563
+ }, Pg = async () => {
26552
26564
  if (!u.value) return;
26553
26565
  let e = (await import("tippy.js")).default;
26554
26566
  L &&= (L.destroy(), null), L = e(u.value, {
@@ -26564,13 +26576,13 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26564
26576
  onShow: () => {
26565
26577
  setTimeout(() => {
26566
26578
  document.querySelectorAll(".tippy-menu-item").forEach((e) => {
26567
- e.addEventListener("click", bg);
26579
+ e.addEventListener("click", Eg);
26568
26580
  });
26569
26581
  }, 0);
26570
26582
  },
26571
26583
  onHide: () => {
26572
26584
  document.querySelectorAll(".tippy-menu-item").forEach((e) => {
26573
- e.removeEventListener("click", bg);
26585
+ e.removeEventListener("click", Eg);
26574
26586
  });
26575
26587
  }
26576
26588
  });
@@ -26578,9 +26590,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26578
26590
  return watch(() => [i.isCompressionHeight, i.hasSessionContents], () => {
26579
26591
  L && L.setContent($.value);
26580
26592
  }), onMounted(() => {
26581
- Og(), i.sessionBusinessManager && B(), document.addEventListener("click", Dg);
26593
+ Pg(), i.sessionBusinessManager && B(), document.addEventListener("click", Ng);
26582
26594
  }), onBeforeUnmount(() => {
26583
- L &&= (L.destroy(), null), z &&= (z.destroy(), null), document.removeEventListener("click", Dg);
26595
+ L &&= (L.destroy(), null), z &&= (z.destroy(), null), document.removeEventListener("click", Ng);
26584
26596
  }), n({
26585
26597
  headerRef: s,
26586
26598
  historyIconRef: l
@@ -26603,13 +26615,13 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26603
26615
  "onUpdate:modelValue": r[0] ||= (e) => j.value = e,
26604
26616
  class: "rename-input",
26605
26617
  placeholder: unref(t)("请输入新的会话名称"),
26606
- onKeyup: Eg
26618
+ onKeyup: Mg
26607
26619
  }, null, 8, ["modelValue", "placeholder"]), createElementVNode("div", { class: "rename-buttons" }, [createElementVNode("i", {
26608
26620
  class: "bkai-icon bkai-check-1 rename-btn confirm-btn",
26609
- onClick: Cg
26621
+ onClick: kg
26610
26622
  }), createElementVNode("i", {
26611
26623
  class: "bkai-icon bkai-close rename-btn cancel-btn",
26612
- onClick: Tg
26624
+ onClick: jg
26613
26625
  })])])])) : createCommentVNode("v-if", !0)
26614
26626
  ], 2),
26615
26627
  i.showMoreIcon && K.value ? (openBlock(), createElementBlock("span", {
@@ -26617,7 +26629,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26617
26629
  ref_key: "moreIconRef",
26618
26630
  ref: u,
26619
26631
  class: "bkai-icon bkai-more",
26620
- onClick: yg
26632
+ onClick: Tg
26621
26633
  }, null, 512)) : createCommentVNode("v-if", !0)
26622
26634
  ]), createElementVNode("div", _hoisted_6$1, [
26623
26635
  createCommentVNode(" 新增会话按钮 "),
@@ -26629,9 +26641,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26629
26641
  { disabled: !K.value }
26630
26642
  ]),
26631
26643
  style: normalizeStyle(Q()),
26632
- onClick: r[1] ||= (e) => K.value ? hg() : void 0
26644
+ onClick: r[1] ||= (e) => K.value ? xg() : void 0
26633
26645
  }, null, 6)), [[unref(o), {
26634
- content: pg(unref(t)("新增会话")),
26646
+ content: yg(unref(t)("新增会话")),
26635
26647
  boundary: "parent"
26636
26648
  }]]) : createCommentVNode("v-if", !0),
26637
26649
  createCommentVNode(" 历史会话按钮 "),
@@ -26645,15 +26657,15 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26645
26657
  { disabled: !K.value }
26646
26658
  ]),
26647
26659
  style: normalizeStyle(Q()),
26648
- onClick: r[2] ||= (e) => K.value ? _g(e) : void 0
26660
+ onClick: r[2] ||= (e) => K.value ? Cg(e) : void 0
26649
26661
  }, null, 6)), [[unref(o), {
26650
- content: pg(unref(t)("历史会话")),
26662
+ content: yg(unref(t)("历史会话")),
26651
26663
  boundary: "parent"
26652
26664
  }]]) : createCommentVNode("v-if", !0),
26653
26665
  e.chatGroup?.enabled ? withDirectives((openBlock(), createElementBlock("i", {
26654
26666
  key: 2,
26655
26667
  class: "bkai-icon bkai-zhushou",
26656
- onClick: vg
26668
+ onClick: wg
26657
26669
  }, null, 512)), [[unref(o), {
26658
26670
  content: unref(t)("转人工"),
26659
26671
  boundary: "parent"
@@ -26662,7 +26674,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26662
26674
  key: 3,
26663
26675
  ref_key: "compressionRef",
26664
26676
  ref: m,
26665
- class: normalizeClass(["bkai-icon", dg.value]),
26677
+ class: normalizeClass(["bkai-icon", _g.value]),
26666
26678
  onClick: r[3] ||= (e) => a("toggle-compression")
26667
26679
  }, null, 2)), [[unref(o), {
26668
26680
  content: G.value,
@@ -26964,6 +26976,23 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26964
26976
  }), e;
26965
26977
  }
26966
26978
  }
26979
+ }, ShareBusinessManager = class {
26980
+ messageModule;
26981
+ sessionModule;
26982
+ constructor(e, n) {
26983
+ this.messageModule = e, this.sessionModule = n;
26984
+ }
26985
+ async shareMessages(e) {
26986
+ if (e.length === 0) throw Error("No messages to share");
26987
+ let n = this.sessionModule.current?.value?.sessionCode;
26988
+ if (!n) throw Error("No active session");
26989
+ let r = await this.messageModule.shareMessages(n, e);
26990
+ if (!r) throw Error("Share failed: no result returned");
26991
+ return {
26992
+ shareUrl: `${r.share_page}share-page/${r.share_token}`,
26993
+ userMessageIds: e.filter((e) => e.role === "user").map((e) => String(e.id))
26994
+ };
26995
+ }
26967
26996
  }, ShortcutManager = class {
26968
26997
  _agentShortcuts;
26969
26998
  _effectiveShortcuts;
@@ -27445,7 +27474,6 @@ var UIStateManager = class {
27445
27474
  height: {},
27446
27475
  helloText: {},
27447
27476
  maxWidth: {},
27448
- messageTools: { default: void 0 },
27449
27477
  placeholder: {},
27450
27478
  prompts: {},
27451
27479
  requestOptions: {},
@@ -27456,16 +27484,7 @@ var UIStateManager = class {
27456
27484
  },
27457
27485
  shortcutLimit: { default: 10 },
27458
27486
  shortcuts: { default: () => [] },
27459
- showMessageTools: {
27460
- type: Boolean,
27461
- default: !0
27462
- },
27463
- updateTools: { default: void 0 },
27464
- url: { default: "" },
27465
- onToolAction: {
27466
- type: Function,
27467
- default: void 0
27468
- }
27487
+ url: { default: "" }
27469
27488
  },
27470
27489
  emits: [
27471
27490
  "agent-info-loaded",
@@ -27478,53 +27497,54 @@ var UIStateManager = class {
27478
27497
  "receive-text",
27479
27498
  "request-share",
27480
27499
  "send-message",
27481
- "session-deleted",
27482
27500
  "session-switched",
27483
27501
  "shortcut-click",
27484
- "stop",
27485
- "tool-action"
27502
+ "stop"
27486
27503
  ],
27487
27504
  setup(e, { expose: n, emit: r }) {
27488
- let i = e, a = r, s = ref(), l = ref(), u = ref(null), T = shallowRef([]), O = ref(!1), k = ref(null), j = new AGUIProtocol$1({
27489
- onStart: () => {
27490
- a("receive-start");
27491
- },
27492
- onMessage: (e) => {
27493
- a("receive-text");
27494
- },
27495
- onDone: () => {
27496
- a("receive-end"), Wg();
27497
- },
27498
- onError: (e) => {
27499
- a("error", e);
27500
- }
27501
- }), I = () => i.chatHelper ? !i.chatHelper.agent || !i.chatHelper.session || !i.chatHelper.message ? {
27505
+ let i = e, a = r, s = ref(), l = ref(), u = ref(null), T = shallowRef([]), O = ref(!1), k = ref(null), j = () => i.chatHelper ? !i.chatHelper.agent || !i.chatHelper.session || !i.chatHelper.message ? {
27502
27506
  valid: !1,
27503
27507
  error: "[ChatBot] Invalid chatHelper: missing required modules (agent, session, message)"
27504
27508
  } : { valid: !0 } : i.url ? { valid: !0 } : {
27505
27509
  valid: !1,
27506
27510
  error: "[ChatBot] Neither chatHelper nor url provided. Component requires at least one."
27507
- }, L = (() => {
27508
- let e = I();
27509
- return e.valid ? i.chatHelper ? i.chatHelper : useChatHelper$1({
27511
+ }, I = (() => {
27512
+ let e = j();
27513
+ if (!e.valid) return console.error(e.error), k.value = Error(e.error), null;
27514
+ if (i.chatHelper) return i.chatHelper;
27515
+ let n = new AGUIProtocol$1({
27516
+ onStart: () => {
27517
+ a("receive-start");
27518
+ },
27519
+ onMessage: (e) => {
27520
+ a("receive-text");
27521
+ },
27522
+ onDone: () => {
27523
+ a("receive-end"), Yg();
27524
+ },
27525
+ onError: (e) => {
27526
+ a("error", e);
27527
+ }
27528
+ }), r = useChatHelper$1({
27510
27529
  requestData: {
27511
27530
  urlPrefix: normalizeUrl(i.url),
27512
27531
  headers: i.requestOptions?.headers,
27513
27532
  data: i.requestOptions?.data
27514
27533
  },
27515
- protocol: j
27516
- }) : (console.error(e.error), k.value = Error(e.error), null);
27517
- })(), z = computed(() => ((i.chatHelper || L)?.agent)?.isChatting?.value ? MessageStatus.Streaming : MessageStatus.Complete), B = computed(() => z.value === MessageStatus.Streaming ? MessageToolsStatus.Disabled : void 0), H = async (e, n) => {
27534
+ protocol: n
27535
+ });
27536
+ return n.injectMessageModule(r.message), r;
27537
+ })(), L = computed(() => ((i.chatHelper || I)?.agent)?.isChatting?.value ? MessageStatus.Streaming : MessageStatus.Complete), z = computed(() => L.value === MessageStatus.Streaming ? MessageToolsStatus.Disabled : void 0), B = async (e, n) => {
27518
27538
  if (e.id === "cite") {
27519
- jg.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), r_();
27539
+ Fg.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), c_();
27520
27540
  return;
27521
27541
  }
27522
27542
  if (e.id === "rebuild") {
27523
- await Q(n);
27543
+ await yg(n);
27524
27544
  return;
27525
27545
  }
27526
27546
  if (e.id === "delete") {
27527
- await pg(n);
27547
+ await K(n);
27528
27548
  return;
27529
27549
  }
27530
27550
  if (e.id === "share") {
@@ -27534,30 +27554,30 @@ var UIStateManager = class {
27534
27554
  if (e.id === "like" || e.id === "unlike") {
27535
27555
  let n = e.id === "like" ? 5 : 0;
27536
27556
  try {
27537
- return await L?.session.getSessionFeedbackReasons(n) || [];
27557
+ return await I?.session.getSessionFeedbackReasons(n) || [];
27538
27558
  } catch (e) {
27539
27559
  return console.error("[ChatBot] Failed to get feedback reasons:", e), [];
27540
27560
  }
27541
27561
  }
27542
27562
  console.log("handleAgentAction", e, n);
27543
- }, K = async (e, n, r, i) => {
27544
- if (!L) {
27563
+ }, H = async (e, n, r, i) => {
27564
+ if (!I) {
27545
27565
  console.error("[ChatBot] Cannot submit feedback: chatHelper not initialized");
27546
27566
  return;
27547
27567
  }
27548
- let o = L.session.current?.value?.sessionCode;
27568
+ let o = I.session.current?.value?.sessionCode;
27549
27569
  if (!o) {
27550
27570
  console.error("[ChatBot] Cannot submit feedback: no active session");
27551
27571
  return;
27552
27572
  }
27553
- let s = findLastUserMessageIdBefore(Dg?.messages.value || [], n[0]);
27573
+ let s = findLastUserMessageIdBefore(Mg?.messages.value || [], n[0]);
27554
27574
  if (s === void 0) {
27555
27575
  console.error("[ChatBot] Cannot submit feedback: no user message found");
27556
27576
  return;
27557
27577
  }
27558
27578
  let l = e.id === "like" ? 5 : 0;
27559
27579
  try {
27560
- await L.session.postSessionFeedback({
27580
+ await I.session.postSessionFeedback({
27561
27581
  sessionCode: o,
27562
27582
  sessionContentIds: [s],
27563
27583
  rate: l,
@@ -27567,53 +27587,53 @@ var UIStateManager = class {
27567
27587
  } catch (e) {
27568
27588
  console.error("[ChatBot] Failed to submit feedback:", e), a("error", e);
27569
27589
  }
27570
- }, pg = async (e) => {
27571
- if (!Dg || !L) {
27590
+ }, K = async (e) => {
27591
+ if (!Mg || !I) {
27572
27592
  console.error("[ChatBot] Cannot delete messages: chatBusinessManager not initialized");
27573
27593
  return;
27574
27594
  }
27575
27595
  try {
27576
- let n = Dg.messages.value, r = findLastUserMessageBefore(n, e[0]);
27596
+ let n = Mg.messages.value, r = findLastUserMessageBefore(n, e[0]);
27577
27597
  if (!r) {
27578
27598
  console.error("[ChatBot] No user message found before AI messages");
27579
27599
  return;
27580
27600
  }
27581
27601
  let i = [r, ...e];
27582
- await L.message.deleteMessages(i);
27602
+ await I.message.deleteMessages(i);
27583
27603
  } catch (e) {
27584
27604
  console.error("[ChatBot] Failed to delete messages:", e), a("error", e);
27585
27605
  }
27586
- }, Q = async (e) => {
27587
- if (!Dg || !L) {
27606
+ }, yg = async (e) => {
27607
+ if (!Mg || !I) {
27588
27608
  console.error("[ChatBot] Cannot regenerate: chatBusinessManager not initialized");
27589
27609
  return;
27590
27610
  }
27591
- let n = L.session.current?.value?.sessionCode;
27611
+ let n = I.session.current?.value?.sessionCode;
27592
27612
  if (!n) {
27593
27613
  console.error("[ChatBot] Cannot regenerate: no active session");
27594
27614
  return;
27595
27615
  }
27596
27616
  try {
27597
- await Dg.regenerateFromAIMessages(e, n), Wg();
27617
+ await Mg.regenerateFromAIMessages(e, n), Yg();
27598
27618
  } catch (e) {
27599
27619
  console.error("[ChatBot] Failed to regenerate:", e), a("error", e);
27600
27620
  }
27601
- }, $ = async (e, n) => {
27621
+ }, Q = async (e, n) => {
27602
27622
  if (e.id === "delete") {
27603
- await bg(n);
27623
+ await wg(n);
27604
27624
  return;
27605
27625
  }
27606
27626
  if (e.id === "cite") {
27607
- jg.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), r_();
27627
+ Fg.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), c_();
27608
27628
  return;
27609
27629
  }
27610
27630
  console.log("handleUserAction", e, n);
27611
- }, hg = async (e, n, r) => {
27612
- if (!L) {
27631
+ }, $ = async (e, n, r) => {
27632
+ if (!I) {
27613
27633
  console.error("[ChatBot] Cannot edit message: chatHelper not initialized");
27614
27634
  return;
27615
27635
  }
27616
- let i = L.session.current?.value?.sessionCode;
27636
+ let i = I.session.current?.value?.sessionCode;
27617
27637
  if (!i) {
27618
27638
  console.error("[ChatBot] Cannot edit message: no active session");
27619
27639
  return;
@@ -27631,16 +27651,16 @@ var UIStateManager = class {
27631
27651
  console.error("[ChatBot] Cannot edit message: invalid content type");
27632
27652
  return;
27633
27653
  }
27634
- await L.agent.resendMessage(String(o), i, e), Wg();
27654
+ await I.agent.resendMessage(String(o), i, e), Yg();
27635
27655
  } catch (e) {
27636
27656
  console.error("[ChatBot] Failed to edit and resend message:", e), a("error", e);
27637
27657
  }
27638
- }, _g = async (e, n) => {
27639
- if (!Dg || !L) {
27658
+ }, xg = async (e, n) => {
27659
+ if (!Mg || !I) {
27640
27660
  console.error("[ChatBot] Cannot edit shortcut message: chatHelper not initialized");
27641
27661
  return;
27642
27662
  }
27643
- let r = L.session.current?.value?.sessionCode;
27663
+ let r = I.session.current?.value?.sessionCode;
27644
27664
  if (!r) {
27645
27665
  console.error("[ChatBot] Cannot edit shortcut message: no active session");
27646
27666
  return;
@@ -27651,26 +27671,26 @@ var UIStateManager = class {
27651
27671
  return;
27652
27672
  }
27653
27673
  try {
27654
- let a = vg(e);
27674
+ let a = Cg(e);
27655
27675
  if (!a) {
27656
27676
  console.error("[ChatBot] Cannot edit shortcut message: shortcut not found");
27657
27677
  return;
27658
27678
  }
27659
- let o = Zg(a, n), s = String(n.input ?? "");
27660
- await Dg.resendMessageWithProperty(String(i), r, s, o), Wg();
27679
+ let o = n_(a, n), s = String(n.input ?? "");
27680
+ await Mg.resendMessageWithProperty(String(i), r, s, o), Yg();
27661
27681
  } catch (e) {
27662
27682
  console.error("[ChatBot] Failed to edit shortcut message:", e), a("error", e);
27663
27683
  }
27664
- }, vg = (e) => {
27684
+ }, Cg = (e) => {
27665
27685
  let n = e.property?.extra;
27666
- return n?.shortcut ? n.shortcut : n?.command ? Ug.value.find((e) => e.id === n.command) ?? null : null;
27667
- }, bg = async (e) => {
27668
- if (!Dg || !L) {
27686
+ return n?.shortcut ? n.shortcut : n?.command ? Jg.value.find((e) => e.id === n.command) ?? null : null;
27687
+ }, wg = async (e) => {
27688
+ if (!Mg || !I) {
27669
27689
  console.error("[ChatBot] Cannot delete message: chatHelper not initialized");
27670
27690
  return;
27671
27691
  }
27672
27692
  try {
27673
- let n = Dg.messages.value, r = n.findIndex((n) => n === e);
27693
+ let n = Mg.messages.value, r = n.findIndex((n) => n === e);
27674
27694
  if (r === -1) {
27675
27695
  console.error("[ChatBot] User message not found in messages list");
27676
27696
  return;
@@ -27682,63 +27702,61 @@ var UIStateManager = class {
27682
27702
  i.push(r);
27683
27703
  }
27684
27704
  let a = [e, ...i];
27685
- await L.message.deleteMessages(a);
27705
+ await I.message.deleteMessages(a);
27686
27706
  } catch (e) {
27687
27707
  console.error("[ChatBot] Failed to delete user message:", e), a("error", e);
27688
27708
  }
27689
- }, Cg = async () => {
27690
- ((i.chatHelper || L)?.agent)?.stopChat?.();
27691
- }, Tg = !i.chatHelper;
27692
- Tg && L && j.injectMessageModule(L.message);
27693
- let Eg = L ? new SessionBusinessManager(L.session, L.message, null, {
27709
+ }, Eg = async () => {
27710
+ ((i.chatHelper || I)?.agent)?.stopChat?.();
27711
+ }, kg = !i.chatHelper, jg = I ? new SessionBusinessManager(I.session, I.message, null, {
27694
27712
  enableChatSession: !0,
27695
27713
  autoSwitchToInitialSession: !!i.sessionCode,
27696
27714
  loadRecentSessionOnMount: i.autoLoad,
27697
27715
  initialSessionCode: i.sessionCode
27698
- }) : null, Dg = L ? new ChatBusinessManager(L.agent, L.message, L.session, null, {
27716
+ }) : null, Mg = I ? new ChatBusinessManager(I.agent, I.message, I.session, null, {
27699
27717
  openingRemark: i.helloText,
27700
27718
  predefinedQuestions: i.prompts,
27701
27719
  placeholder: i.placeholder
27702
- }) : null, Og = new ShortcutManager(null, i.shortcuts || []), kg = shallowRef([[]]), jg = ref(""), Mg = computed(() => Dg?.messages.value ?? []), Ng = computed(() => Dg?.isMessagesLoading.value ?? !1), Pg = computed(() => Dg?.isGenerating.value ?? !1), Fg = computed(() => Eg?.currentSession.value ?? null), Ig = computed(() => !Ng.value && Mg.value.length === 0), Lg = computed(() => L?.agent.info.value?.conversationSettings?.openingRemark || ""), Rg = computed(() => ({
27720
+ }) : null, Ng = new ShortcutManager(null, i.shortcuts || []), Pg = shallowRef([[]]), Fg = ref(""), Lg = computed(() => Mg?.messages.value ?? []), Rg = computed(() => Mg?.isMessagesLoading.value ?? !1), zg = computed(() => Mg?.isGenerating.value ?? !1), Bg = computed(() => jg?.currentSession.value ?? null), Vg = computed(() => !Rg.value && Lg.value.length === 0), Hg = computed(() => I?.agent.info.value?.conversationSettings?.openingRemark || ""), Ug = computed(() => ({
27703
27721
  height: typeof i.height == "number" ? `${i.height}px` : i.height,
27704
27722
  maxWidth: typeof i.maxWidth == "number" ? `${i.maxWidth}px` : i.maxWidth
27705
- })), zg = computed(() => {
27706
- let e = Og.shortcuts.value;
27723
+ })), Wg = computed(() => {
27724
+ let e = Ng.shortcuts.value;
27707
27725
  return i.shortcutLimit && e.length > i.shortcutLimit ? e.slice(0, i.shortcutLimit) : e;
27708
- }), Bg = () => {
27726
+ }), Gg = () => {
27709
27727
  T.value = [], a("cancel-share");
27710
- }, Vg = () => {
27728
+ }, Kg = () => {
27711
27729
  a("confirm-share", T.value);
27712
- }, Hg = (e) => {
27713
- e ? T.value = Mg.value : T.value = [];
27714
- }, Ug = Og.effectiveShortcuts;
27730
+ }, qg = (e) => {
27731
+ e ? T.value = Lg.value : T.value = [];
27732
+ }, Jg = Ng.effectiveShortcuts;
27715
27733
  watch(() => i.shortcuts, (e) => {
27716
- Og.setShortcuts(e || []);
27717
- }, { immediate: !0 }), watch(() => L?.agent.info.value?.conversationSettings?.commands, (e) => {
27718
- e && Og.setAgentShortcuts(e);
27734
+ Ng.setShortcuts(e || []);
27735
+ }, { immediate: !0 }), watch(() => I?.agent.info.value?.conversationSettings?.commands, (e) => {
27736
+ e && Ng.setAgentShortcuts(e);
27719
27737
  }, { immediate: !0 });
27720
- let Wg = async () => {
27738
+ let Yg = async () => {
27721
27739
  await nextTick(), s.value && (s.value.scrollTop = s.value.scrollHeight);
27722
- }, Gg = async (e, n = {}) => {
27723
- if (!Dg || !L) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
27724
- let r = L.session.current?.value.sessionCode;
27740
+ }, Xg = async (e, n = {}) => {
27741
+ if (!Mg || !I) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
27742
+ let r = I.session.current?.value.sessionCode;
27725
27743
  if (!r) throw Error("[ChatBot] Cannot send message: no active session");
27726
- kg.value = [[]], jg.value = "", a("send-message", e), await Dg.sendMessage(e, r, n);
27727
- }, Kg = async (e, n) => {
27744
+ Pg.value = [[]], Fg.value = "", a("send-message", e), await Mg.sendMessage(e, r, n);
27745
+ }, Zg = async (e, n) => {
27728
27746
  try {
27729
- let n = jg.value ? { property: { extra: { cite: jg.value } } } : {};
27730
- typeof e == "string" && await Gg(e, n);
27747
+ let n = Fg.value ? { property: { extra: { cite: Fg.value } } } : {};
27748
+ typeof e == "string" && await Xg(e, n);
27731
27749
  } catch (e) {
27732
27750
  console.error("Failed to send message:", e), a("error", e);
27733
27751
  }
27734
- }, qg = async () => {
27735
- $g();
27736
- }, Jg = (e, n) => {
27737
- Yg(e, n), a("shortcut-click", {
27752
+ }, Qg = async () => {
27753
+ i_();
27754
+ }, $g = (e, n) => {
27755
+ e_(e, n), a("shortcut-click", {
27738
27756
  shortcut: e,
27739
27757
  source: "main"
27740
27758
  });
27741
- }, Yg = (e, n) => {
27759
+ }, e_ = (e, n) => {
27742
27760
  let r = e, i = r.components?.find((e) => e.fillBack)?.key || "input";
27743
27761
  u.value = {
27744
27762
  ...r,
@@ -27747,9 +27765,9 @@ var UIStateManager = class {
27747
27765
  [i]: n || ""
27748
27766
  }
27749
27767
  };
27750
- }, Xg = () => {
27768
+ }, t_ = () => {
27751
27769
  u.value = null;
27752
- }, Zg = (e, n) => {
27770
+ }, n_ = (e, n) => {
27753
27771
  let r = e.components || [];
27754
27772
  return { extra: {
27755
27773
  cite: {
@@ -27769,94 +27787,95 @@ var UIStateManager = class {
27769
27787
  __value: n[e.key]
27770
27788
  }))
27771
27789
  } };
27772
- }, Qg = async (e) => {
27790
+ }, r_ = async (e) => {
27791
+ if (!u.value) {
27792
+ console.error("[ChatBot] No selected shortcut");
27793
+ return;
27794
+ }
27795
+ let n = n_(u.value, e), r = u.value.name, i = u.value;
27796
+ t_();
27773
27797
  try {
27774
- if (!u.value) {
27775
- console.error("[ChatBot] No selected shortcut");
27776
- return;
27777
- }
27778
- let n = Zg(u.value, e);
27779
- await Gg(String(e.input ?? ""), { property: n }), Xg();
27798
+ await Xg(r, { property: n });
27780
27799
  } catch (e) {
27781
- console.error("Failed to submit shortcut:", e), a("error", e);
27800
+ u.value = i, console.error("[ChatBot] Failed to submit shortcut:", e), a("error", e);
27782
27801
  }
27783
- }, $g = () => {
27784
- if (!Dg) {
27802
+ }, i_ = () => {
27803
+ if (!Mg) {
27785
27804
  console.error("[ChatBot] Cannot stop generation: chatBusinessManager not initialized");
27786
27805
  return;
27787
27806
  }
27788
- Dg.stopGeneration(), a("stop");
27789
- }, e_ = async (e) => {
27790
- if (!Eg) {
27807
+ Mg.stopGeneration(), a("stop");
27808
+ }, a_ = async (e) => {
27809
+ if (!jg) {
27791
27810
  console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
27792
27811
  return;
27793
27812
  }
27794
27813
  try {
27795
- await Eg.switchSession(e), a("session-switched", Eg.currentSession.value);
27814
+ await jg.switchSession(e), a("session-switched", jg.currentSession.value);
27796
27815
  } catch (e) {
27797
27816
  console.error("Failed to switch session:", e), a("error", e);
27798
27817
  }
27799
- }, n_ = (e) => {
27800
- jg.value = e;
27801
- }, r_ = () => {
27818
+ }, o_ = (e) => {
27819
+ Fg.value = e;
27820
+ }, c_ = () => {
27802
27821
  l.value?.focus?.();
27803
27822
  };
27804
27823
  return onMounted(async () => {
27805
- if (!(!L || k.value)) try {
27806
- if (Tg) {
27807
- if (await L.agent.getAgentInfo(), await L.session.getSessions(), i.sessionCode) await L.session.chooseSession(i.sessionCode);
27808
- else if (L.session.list.value.length > 0) {
27809
- let e = L.session.list.value[0];
27810
- await L.session.chooseSession(e.sessionCode);
27824
+ if (!(!I || k.value)) try {
27825
+ if (kg) {
27826
+ if (await I.agent.getAgentInfo(), await I.session.getSessions(), i.sessionCode) await I.session.chooseSession(i.sessionCode);
27827
+ else if (I.session.list.value.length > 0) {
27828
+ let e = I.session.list.value[0];
27829
+ await I.session.chooseSession(e.sessionCode);
27811
27830
  }
27812
27831
  O.value = !0;
27813
27832
  } else O.value = !0;
27814
- a("agent-info-loaded", L);
27833
+ a("agent-info-loaded", I);
27815
27834
  } catch (e) {
27816
27835
  console.error("Failed to initialize ChatBot:", e), k.value = e, a("error", e);
27817
27836
  }
27818
27837
  }), onBeforeUnmount(() => {
27819
- Tg && L && L.agent.stopChat();
27838
+ kg && I && I.agent.stopChat();
27820
27839
  }), n({
27821
- sendMessage: (e) => Kg(e, [[]]),
27822
- stopGeneration: $g,
27823
- switchSession: e_,
27824
- messages: Mg,
27825
- currentSession: Fg,
27826
- isGenerating: Pg,
27827
- getChatHelper: () => L,
27828
- setCiteText: n_,
27829
- focusInput: r_,
27840
+ sendMessage: (e) => Zg(e, [[]]),
27841
+ stopGeneration: i_,
27842
+ switchSession: a_,
27843
+ messages: Lg,
27844
+ currentSession: Bg,
27845
+ isGenerating: zg,
27846
+ getChatHelper: () => I,
27847
+ setCiteText: o_,
27848
+ focusInput: c_,
27830
27849
  selectShortcut: (e, n) => {
27831
- Yg(e, n);
27850
+ e_(e, n);
27832
27851
  }
27833
27852
  }), (e, n) => (openBlock(), createElementBlock("div", {
27834
27853
  class: normalizeClass([
27835
27854
  "ai-chatbot",
27836
27855
  i.extCls,
27837
- { "welcome-state": Ig.value }
27856
+ { "welcome-state": Vg.value }
27838
27857
  ]),
27839
- style: normalizeStyle(Rg.value)
27858
+ style: normalizeStyle(Ug.value)
27840
27859
  }, [createCommentVNode(" 初始化错误提示 "), k.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("span", null, toDisplayString(k.value.message), 1)])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
27841
27860
  createCommentVNode(" 内容区:欢迎状态 "),
27842
- Ig.value ? (openBlock(), createElementBlock("div", _hoisted_2$1, [createElementVNode("div", _hoisted_3, [n[3] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1), Lg.value ? (openBlock(), createElementBlock("div", _hoisted_4, [createVNode(unref(content_render_default), { content: Lg.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 内容区:消息列表 "), createElementVNode("div", {
27861
+ Vg.value ? (openBlock(), createElementBlock("div", _hoisted_2$1, [createElementVNode("div", _hoisted_3, [n[3] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1), Hg.value ? (openBlock(), createElementBlock("div", _hoisted_4, [createVNode(unref(content_render_default), { content: Hg.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 内容区:消息列表 "), createElementVNode("div", {
27843
27862
  ref_key: "messagesContainerRef",
27844
27863
  ref: s,
27845
27864
  class: "chatbot-messages"
27846
- }, [Ng.value ? (openBlock(), createElementBlock("div", _hoisted_5, " 加载中... ")) : (openBlock(), createBlock(unref(message_container_default), {
27865
+ }, [Rg.value ? (openBlock(), createElementBlock("div", _hoisted_5, " 加载中... ")) : (openBlock(), createBlock(unref(message_container_default), {
27847
27866
  key: 1,
27848
27867
  "selected-messages": T.value,
27849
27868
  "onUpdate:selectedMessages": n[0] ||= (e) => T.value = e,
27850
27869
  "enable-selection": i.enableSelection,
27851
- "message-status": z.value,
27852
- "message-tools-status": B.value,
27853
- messages: Mg.value,
27854
- "on-agent-action": H,
27855
- "on-agent-feedback": K,
27856
- "on-user-action": $,
27857
- "on-user-input-confirm": hg,
27858
- "on-user-shortcut-confirm": _g,
27859
- onStopStreaming: Cg
27870
+ "message-status": L.value,
27871
+ "message-tools-status": z.value,
27872
+ messages: Lg.value,
27873
+ "on-agent-action": B,
27874
+ "on-agent-feedback": H,
27875
+ "on-user-action": Q,
27876
+ "on-user-input-confirm": $,
27877
+ "on-user-shortcut-confirm": xg,
27878
+ onStopStreaming: Eg
27860
27879
  }, null, 8, [
27861
27880
  "selected-messages",
27862
27881
  "enable-selection",
@@ -27865,35 +27884,35 @@ var UIStateManager = class {
27865
27884
  "messages"
27866
27885
  ]))], 512)], 2112)),
27867
27886
  createCommentVNode(" 统一底部区域 "),
27868
- !Ig.value && i.enableSelection ? (openBlock(), createBlock(selection_footer_default, {
27887
+ !Vg.value && i.enableSelection ? (openBlock(), createBlock(selection_footer_default, {
27869
27888
  key: 2,
27870
- "is-all-selected": T.value.length === Mg.value.length,
27889
+ "is-all-selected": T.value.length === Lg.value.length,
27871
27890
  loading: i.shareLoading,
27872
27891
  "selected-count": T.value.length,
27873
- onCancel: Bg,
27874
- onConfirm: Vg,
27875
- onToggleAll: Hg
27892
+ onCancel: Gg,
27893
+ onConfirm: Kg,
27894
+ onToggleAll: qg
27876
27895
  }, null, 8, [
27877
27896
  "is-all-selected",
27878
27897
  "loading",
27879
27898
  "selected-count"
27880
27899
  ])) : (openBlock(), createElementBlock("div", _hoisted_6, [u.value?.components?.length ? (openBlock(), createBlock(unref(shortcut_render_default), mergeProps({ key: 0 }, u.value, {
27881
- onClose: Xg,
27882
- onSubmit: Qg
27900
+ onClose: t_,
27901
+ onSubmit: r_
27883
27902
  }), null, 16)) : renderSlot(e.$slots, "input", { key: 1 }, () => [createVNode(unref(chat_input_default), {
27884
27903
  ref_key: "chatInputRef",
27885
27904
  ref: l,
27886
- modelValue: kg.value,
27887
- "onUpdate:modelValue": n[1] ||= (e) => kg.value = e,
27888
- cite: jg.value,
27889
- "onUpdate:cite": n[2] ||= (e) => jg.value = e,
27890
- "message-status": z.value,
27891
- "on-send-message": Kg,
27892
- "on-stop-sending": qg,
27905
+ modelValue: Pg.value,
27906
+ "onUpdate:modelValue": n[1] ||= (e) => Pg.value = e,
27907
+ cite: Fg.value,
27908
+ "onUpdate:cite": n[2] ||= (e) => Fg.value = e,
27909
+ "message-status": L.value,
27910
+ "on-send-message": Zg,
27911
+ "on-stop-sending": Qg,
27893
27912
  placeholder: i.placeholder,
27894
27913
  "shortcut-id": u.value?.id,
27895
- shortcuts: zg.value,
27896
- onSelectShortcut: Jg
27914
+ shortcuts: Wg.value,
27915
+ onSelectShortcut: $g
27897
27916
  }, null, 8, [
27898
27917
  "modelValue",
27899
27918
  "cite",
@@ -28721,7 +28740,7 @@ function useDraggable(e = {}, n) {
28721
28740
  v.value = e, _.value = r, j.value = e - (window.innerWidth - T.value), n?.onDragStop?.(I());
28722
28741
  }, H = (e, r, i, a) => {
28723
28742
  v.value = e, _.value = r, T.value = Math.min(i, O.value), E.value = a, n?.onResizeStop?.(I());
28724
- }, dg = () => {
28743
+ }, _g = () => {
28725
28744
  O.value = Math.max(window.innerWidth * (o / 100), T.value), nextTick(() => {
28726
28745
  if (k.value) v.value = window.innerWidth - T.value - l, _.value = window.innerHeight - s - l;
28727
28746
  else {
@@ -28732,7 +28751,7 @@ function useDraggable(e = {}, n) {
28732
28751
  }
28733
28752
  T.value > O.value && (T.value = O.value);
28734
28753
  });
28735
- }, fg = () => {
28754
+ }, vg = () => {
28736
28755
  k.value ? (_.value = d.value, nextTick(() => {
28737
28756
  E.value = m.value, v.value = u.value, T.value = g.value;
28738
28757
  })) : (_.value = window.innerHeight - s - l, v.value = u.value - l, T.value = r, E.value = s), k.value = !k.value;
@@ -28742,9 +28761,9 @@ function useDraggable(e = {}, n) {
28742
28761
  T.value = Math.max(i, Math.min(e, O.value)), E.value = Math.max(a, n);
28743
28762
  };
28744
28763
  return onMounted(() => {
28745
- window.addEventListener("resize", dg);
28764
+ window.addEventListener("resize", _g);
28746
28765
  }), onBeforeUnmount(() => {
28747
- window.removeEventListener("resize", dg);
28766
+ window.removeEventListener("resize", _g);
28748
28767
  }), {
28749
28768
  minWidth: i,
28750
28769
  minHeight: a,
@@ -28758,7 +28777,7 @@ function useDraggable(e = {}, n) {
28758
28777
  handleResizing: z,
28759
28778
  handleDragStop: B,
28760
28779
  handleResizeStop: H,
28761
- toggleCompression: fg,
28780
+ toggleCompression: vg,
28762
28781
  updatePosition: K,
28763
28782
  updateSize: q,
28764
28783
  updatePositionAndSize: (e, n, r, i) => {
@@ -28803,7 +28822,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
28803
28822
  "compression-change"
28804
28823
  ],
28805
28824
  setup(e, { expose: n, emit: r }) {
28806
- let i = e, a = r, o = ref(!1), { minWidth: s, minHeight: l, maxWidth: u, top: g, left: _, width: T, height: E, isCompressed: O, handleDragging: k, handleResizing: j, handleDragStop: I, handleResizeStop: L, toggleCompression: z, updatePosition: B, updateSize: H, updatePositionAndSize: dg } = useDraggable({
28825
+ let i = e, a = r, o = ref(!1), { minWidth: s, minHeight: l, maxWidth: u, top: g, left: _, width: T, height: E, isCompressed: O, handleDragging: k, handleResizing: j, handleDragStop: I, handleResizeStop: L, toggleCompression: z, updatePosition: B, updateSize: H, updatePositionAndSize: _g } = useDraggable({
28807
28826
  initWidth: i.defaultWidth,
28808
28827
  minWidth: i.minWidth,
28809
28828
  minHeight: i.minHeight,
@@ -28834,13 +28853,13 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
28834
28853
  document.querySelectorAll("iframe").forEach((e) => {
28835
28854
  e.style.pointerEvents = "";
28836
28855
  });
28837
- }, pg = (e, n) => {
28856
+ }, yg = (e, n) => {
28838
28857
  o.value || (o.value = !0, J()), k(e, n);
28839
28858
  }, Q = (e, n, r, i) => {
28840
28859
  o.value || (o.value = !0, J()), j(e, n, r, i);
28841
28860
  }, $ = (e, n) => {
28842
28861
  I(e, n), o.value = !1, Z();
28843
- }, hg = (e, n, r, i) => {
28862
+ }, xg = (e, n, r, i) => {
28844
28863
  L(e, n, r, i), o.value = !1, Z();
28845
28864
  };
28846
28865
  return watch(O, (e) => {
@@ -28848,7 +28867,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
28848
28867
  }), n({
28849
28868
  updatePosition: B,
28850
28869
  updateSize: H,
28851
- updatePositionAndSize: dg,
28870
+ updatePositionAndSize: _g,
28852
28871
  toggleCompression: z,
28853
28872
  positionAndSize: K,
28854
28873
  isCompressed: O
@@ -28870,10 +28889,10 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
28870
28889
  "prevent-deactivation": !0,
28871
28890
  "drag-handle": i.dragHandle,
28872
28891
  "class-name": "draggable-container-inner",
28873
- onDragging: pg,
28892
+ onDragging: yg,
28874
28893
  onResizing: Q,
28875
28894
  onDragStop: $,
28876
- onResizeStop: hg
28895
+ onResizeStop: xg
28877
28896
  }, {
28878
28897
  default: withCtx(() => [createElementVNode("div", _hoisted_1$2, [renderSlot(e.$slots, "default", {}, void 0, !0)])]),
28879
28898
  _: 3
@@ -28956,7 +28975,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
28956
28975
  let z = computed(() => _.value ? t("恢复默认大小") : t("最小化,将缩成锚点")), { createTooltip: B, destroyAll: H } = useTooltip({
28957
28976
  theme: "ai-blueking",
28958
28977
  delay: [0, 0]
28959
- }), dg = () => {
28978
+ }), _g = () => {
28960
28979
  nextTick(() => {
28961
28980
  K();
28962
28981
  });
@@ -28970,9 +28989,9 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
28970
28989
  }), onMounted(() => {
28971
28990
  nextTick(() => {
28972
28991
  K();
28973
- }), window.addEventListener("resize", dg);
28992
+ }), window.addEventListener("resize", _g);
28974
28993
  }), onBeforeUnmount(() => {
28975
- window.removeEventListener("resize", dg);
28994
+ window.removeEventListener("resize", _g);
28976
28995
  }), (n, r) => (openBlock(), createBlock(unref(U), {
28977
28996
  active: !e.isPanelShow,
28978
28997
  axis: "y",
@@ -29080,9 +29099,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29080
29099
  "share"
29081
29100
  ],
29082
29101
  setup(e, { expose: n, emit: r }) {
29083
- let i = e, a = r, o = ref(), l = ref(), u = computed(() => normalizeUrl(i.url));
29084
- o.value;
29085
- let _ = createComponentManager({
29102
+ let i = e, a = r, o = ref(), l = ref(), u = computed(() => normalizeUrl(i.url)), _ = createComponentManager({
29086
29103
  initialPanelVisible: !1,
29087
29104
  initialNimbusMinimized: i.defaultMinimize,
29088
29105
  enablePopup: i.enablePopup,
@@ -29091,7 +29108,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29091
29108
  }), T = _.panelVisible, O = _.nimbusMinimized, { forwardToManager: k } = useEventBridge({
29092
29109
  componentManager: _,
29093
29110
  emit: a
29094
- }), j = createEventForwarders(k), { chatHelper: I, isReady: L, agentInfo: B, agentName: H, currentSession: dg } = useChatBootstrap({
29111
+ }), j = createEventForwarders(k), { chatHelper: I, isReady: L, agentInfo: B, agentName: H, currentSession: _g } = useChatBootstrap({
29095
29112
  url: u,
29096
29113
  requestOptions: i.requestOptions,
29097
29114
  autoInit: !0,
@@ -29117,9 +29134,9 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29117
29134
  }), G = I, K = new SessionBusinessManager(G.session, G.message, null, {
29118
29135
  enableChatSession: i.enableChatSession,
29119
29136
  initialSessionCode: i.initialSessionCode
29120
- }), q = new UIStateManager(), pg = computed(() => q.isSelectionMode.value), Q = shallowRef([]), $ = ref(!1), hg = new ShortcutManager(null, i.shortcuts || []), _g = ref(!1), vg = ref(""), yg = computed(() => _.isCompressed.value), bg = computed(() => H.value), Sg = ref(""), Cg = ref(!0), Tg = ref(!1), Eg = computed(() => {
29121
- let e = hg.effectiveShortcuts.value;
29122
- return typeof i.shortcutFilter == "function" && vg.value ? e.filter((e) => i.shortcutFilter?.(e, vg.value)) : e;
29137
+ }), q = new ShareBusinessManager(G.message, G.session), yg = new UIStateManager(), Q = computed(() => yg.isSelectionMode.value), $ = ref(!1), xg = new ShortcutManager(null, i.shortcuts || []), Cg = ref(!1), wg = ref(""), Tg = computed(() => _.isCompressed.value), Eg = computed(() => H.value), Dg = ref(""), Og = ref(!0), kg = ref(!1), jg = computed(() => {
29138
+ let e = xg.effectiveShortcuts.value;
29139
+ return typeof i.shortcutFilter == "function" && wg.value ? e.filter((e) => i.shortcutFilter?.(e, wg.value)) : e;
29123
29140
  });
29124
29141
  watch(() => L.value, async (e) => {
29125
29142
  if (e && B.value) {
@@ -29130,69 +29147,59 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29130
29147
  }).catch(() => {}), e.conversationSettings && (k("session-initialized", {
29131
29148
  openingRemark: e.conversationSettings.openingRemark || "",
29132
29149
  predefinedQuestions: e.conversationSettings.predefinedQuestions || []
29133
- }), e.conversationSettings.commands && hg.setAgentShortcuts(e.conversationSettings.commands)), i.loadRecentSessionOnMount) try {
29150
+ }), e.conversationSettings.commands && xg.setAgentShortcuts(e.conversationSettings.commands)), i.loadRecentSessionOnMount) try {
29134
29151
  await K.loadRecentSession({ skipLoadSessions: !0 });
29135
29152
  } catch (e) {
29136
29153
  console.error("[AIBlueking] Failed to load recent session:", e);
29137
29154
  }
29138
29155
  }
29139
29156
  }, { immediate: !0 }), watch(() => i.shortcuts, (e) => {
29140
- hg.setShortcuts(e || []);
29141
- }, { immediate: !0 }), watch(() => dg.value, (e) => {
29142
- e && (Sg.value = e.sessionName || "", Tg.value = (e.sessionContentCount ?? 0) > 0);
29157
+ xg.setShortcuts(e || []);
29158
+ }, { immediate: !0 }), watch(() => _g.value, (e) => {
29159
+ e && (Dg.value = e.sessionName || "", kg.value = (e.sessionContentCount ?? 0) > 0);
29143
29160
  }, { immediate: !0 }), watch(() => G.message.list.value.length, (e) => {
29144
- e > 0 && (Tg.value = !0);
29161
+ e > 0 && (kg.value = !0);
29145
29162
  });
29146
- let Dg = (e) => {
29147
- if (e?.agent?.info?.value) {
29148
- let n = e.agent.info.value;
29149
- n.conversationSettings && k("session-initialized", {
29150
- openingRemark: n.conversationSettings.openingRemark || "",
29151
- predefinedQuestions: n.conversationSettings.predefinedQuestions || []
29152
- });
29153
- }
29154
- }, Og = async (e) => {
29163
+ let Mg = async (e) => {
29155
29164
  _.showPanel(e), e && l.value && await l.value.switchSession(e);
29156
- }, kg = () => {
29165
+ }, Ng = () => {
29157
29166
  _.hidePanel();
29158
- }, jg = () => {
29159
- kg();
29160
- }, Mg = () => {
29167
+ }, Pg = () => {
29168
+ Ng();
29169
+ }, Fg = () => {
29161
29170
  _.handleNimbusClick();
29162
- }, Pg = (e) => {
29163
- vg.value = e;
29164
- }, Fg = async (e, n) => {
29165
- _g.value = !1, await Og(), e.components?.length && l.value ? l.value.selectShortcut(e, n) : l.value && (l.value.setCiteText(n), l.value.focusInput()), k("shortcut-click", {
29171
+ }, Lg = (e) => {
29172
+ wg.value = e;
29173
+ }, Rg = async (e, n) => {
29174
+ Cg.value = !1, await Mg(), e.components?.length && l.value ? l.value.selectShortcut(e, n) : l.value && (l.value.setCiteText(n), l.value.focusInput()), k("shortcut-click", {
29166
29175
  shortcut: e,
29167
29176
  source: "popup"
29168
29177
  });
29169
- }, Ig = (e) => {
29178
+ }, Bg = (e) => {
29170
29179
  k("shortcut-click", e);
29171
- }, Lg = (e) => {
29180
+ }, Vg = (e) => {
29172
29181
  _.handleDragging(e);
29173
- }, Rg = (e) => {
29182
+ }, Hg = (e) => {
29174
29183
  _.handleResizing(e);
29175
- }, zg = (e) => {
29184
+ }, Ug = (e) => {
29176
29185
  _.handleDragStop(e);
29177
- }, Bg = (e) => {
29186
+ }, Wg = (e) => {
29178
29187
  _.handleResizeStop(e);
29179
- }, Vg = () => {
29188
+ }, Gg = () => {
29180
29189
  _.container.toggleCompression();
29181
- }, Hg = (e) => {
29190
+ }, Kg = (e) => {
29182
29191
  _.setCompressed(e);
29183
- }, Ug = async () => {
29192
+ }, qg = async () => {
29184
29193
  j.newChat();
29185
- }, Wg = (e) => {
29194
+ }, Jg = (e) => {
29186
29195
  j.historyClick(e);
29187
- }, Kg = async (e) => {
29196
+ }, Yg = async (e) => {
29188
29197
  await K.switchSession(e);
29189
- }, qg = async (e) => {
29198
+ }, Xg = async (e) => {
29190
29199
  await K.deleteSession(e);
29191
- }, Jg = (e) => {
29192
- Tg.value = !1, Sg.value = "", k("session-deleted", { sessionCode: e });
29193
- }, Yg = async (e, n) => {
29200
+ }, Qg = async (e, n) => {
29194
29201
  await K.updateSessionName(e, n);
29195
- }, Xg = async () => {
29202
+ }, $g = async () => {
29196
29203
  let e = G.session.current?.value?.sessionCode;
29197
29204
  if (!e) {
29198
29205
  console.error("[AIBlueking] Cannot auto-generate name: no active session");
@@ -29201,14 +29208,14 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29201
29208
  try {
29202
29209
  await G.session.renameSession(e);
29203
29210
  let n = G.session.list.value.find((n) => n.sessionCode === e);
29204
- n && (Sg.value = n.sessionName || "");
29211
+ n && (Dg.value = n.sessionName || "");
29205
29212
  } catch (e) {
29206
- console.error("[AIBlueking] Failed to auto-generate session name:", e), m_(e);
29213
+ console.error("[AIBlueking] Failed to auto-generate session name:", e), g_(e);
29207
29214
  }
29208
29215
  j.autoGenerateName();
29209
- }, Zg = () => {
29216
+ }, e_ = () => {
29210
29217
  j.helpClick();
29211
- }, Qg = async (e) => {
29218
+ }, t_ = async (e) => {
29212
29219
  let n = G.session.current?.value;
29213
29220
  if (!n) {
29214
29221
  console.error("[AIBlueking] Cannot rename: no active session");
@@ -29218,110 +29225,91 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29218
29225
  await G.session.updateSession({
29219
29226
  ...n,
29220
29227
  sessionName: e
29221
- }), Sg.value = e;
29228
+ }), Dg.value = e;
29222
29229
  } catch (e) {
29223
- console.error("[AIBlueking] Failed to rename session:", e), m_(e);
29230
+ console.error("[AIBlueking] Failed to rename session:", e), g_(e);
29224
29231
  }
29225
29232
  j.rename(e);
29226
- }, $g = () => {
29227
- q.enableSelectionMode(), j.share();
29228
- }, e_ = () => {
29229
- q.disableSelectionMode(), Q.value = [];
29230
- }, t_ = async (e) => {
29231
- if (typeof navigator < "u" && "clipboard" in navigator) try {
29232
- return await navigator.clipboard.writeText(e), !0;
29233
- } catch {}
29234
- let n = document.createElement("textarea");
29235
- n.value = e, n.style.position = "fixed", n.style.left = "-9999px", n.style.top = "-9999px", n.style.opacity = "0", document.body.appendChild(n), n.focus(), n.select();
29236
- try {
29237
- return document.execCommand("copy");
29238
- } catch {
29239
- return !1;
29240
- } finally {
29241
- document.body.removeChild(n);
29242
- }
29243
- }, n_ = async (e) => {
29244
- if ($.value = !0, e.length === 0) {
29245
- $.value = !1;
29246
- return;
29247
- }
29248
- let n = G.session.current?.value?.sessionCode;
29249
- if (!n) {
29250
- console.error("[AIBlueking] Cannot share: no active session"), $.value = !1;
29251
- return;
29252
- }
29233
+ }, n_ = () => {
29234
+ yg.enableSelectionMode(), j.share();
29235
+ }, r_ = () => {
29236
+ yg.disableSelectionMode();
29237
+ }, i_ = async (e) => {
29238
+ $.value = !0;
29253
29239
  try {
29254
- let r = await G.message.shareMessages(n, e);
29255
- r && (await t_(`${r.share_page}share-page/${r.share_token}`), Message({
29240
+ let { shareUrl: n, userMessageIds: r } = await q.shareMessages(e);
29241
+ await copyToClipboard(n), Message({
29256
29242
  message: t("分享链接已复制到剪贴板"),
29257
29243
  theme: "success"
29258
- }));
29259
- let i = e.filter((e) => e.role === "user").map((e) => String(e.id));
29260
- q.disableSelectionMode(), Q.value = [], j.shareMessages(i);
29244
+ }), yg.disableSelectionMode(), j.shareMessages(r);
29261
29245
  } catch (e) {
29262
- console.error("[AIBlueking] Failed to share messages:", e), m_(e);
29246
+ console.error("[AIBlueking] Failed to share messages:", e), g_(e);
29263
29247
  } finally {
29264
29248
  $.value = !1;
29265
29249
  }
29266
- }, r_ = async (e) => {
29250
+ }, a_ = async (e) => {
29267
29251
  l.value && await l.value.sendMessage(e);
29268
- }, i_ = (e) => {
29269
- Tg.value = !0, j.sendMessage(e);
29270
- }, a_ = () => {
29252
+ }, o_ = (e) => {
29253
+ kg.value = !0, j.sendMessage(e);
29254
+ }, s_ = () => {
29271
29255
  j.receiveStart();
29272
- }, o_ = () => {
29256
+ }, c_ = () => {
29273
29257
  j.receiveText();
29274
- }, s_ = () => {
29258
+ }, l_ = () => {
29275
29259
  j.receiveEnd();
29276
- }, c_ = () => {
29260
+ }, u_ = () => {
29277
29261
  j.stop();
29278
- }, l_ = () => {
29262
+ }, d_ = () => {
29279
29263
  l.value && l.value.stopGeneration();
29280
- }, u_ = async () => {
29281
- await K.createNewSession();
29282
- }, d_ = async (e) => {
29264
+ }, f_ = async (e) => {
29265
+ e ? await K.createSession({ sessionCode: e }) : await K.createNewSession();
29266
+ }, p_ = async (e) => {
29283
29267
  l.value && await l.value.switchSession(e);
29284
- }, f_ = async (e, n) => {
29285
- Sg.value = n;
29286
- }, p_ = (e) => {
29287
- e && (Sg.value = e.sessionName || "", Tg.value = (e.sessionContentCount ?? 0) > 0 || G.message.list.value.length > 0);
29288
- }, m_ = (e) => {
29268
+ }, m_ = async (e, n) => {
29269
+ try {
29270
+ await K.updateSessionName(e, n), Dg.value = n;
29271
+ } catch (e) {
29272
+ console.error("[AIBlueking] Failed to update session name:", e), g_(e);
29273
+ }
29274
+ }, h_ = (e) => {
29275
+ e && (Dg.value = e.sessionName || "", kg.value = (e.sessionContentCount ?? 0) > 0 || G.message.list.value.length > 0);
29276
+ }, g_ = (e) => {
29289
29277
  console.error("ChatBot error:", e), _.emitInternal("sdk-error", {
29290
29278
  apiName: "chat",
29291
29279
  code: -1,
29292
29280
  message: e.message,
29293
29281
  data: e
29294
29282
  });
29295
- }, h_ = (e, n) => {
29283
+ }, __ = (e, n) => {
29296
29284
  _.container.updatePosition(e, n);
29297
- }, g_ = (e, n) => {
29285
+ }, v_ = (e, n) => {
29298
29286
  _.container.updateSize(e, n);
29299
- }, __ = (e, n, r, i) => {
29287
+ }, y_ = (e, n, r, i) => {
29300
29288
  _.container.updatePositionAndSize(e, n, r, i);
29301
- }, v_ = (e) => {
29289
+ }, b_ = (e) => {
29302
29290
  l.value && l.value.setCiteText(e);
29303
- }, y_ = () => {
29291
+ }, x_ = () => {
29304
29292
  l.value && l.value.focusInput();
29305
- }, b_ = (e) => {
29306
- isTogglePanelShortcut(e) && (e.preventDefault(), T.value ? kg() : Og());
29293
+ }, S_ = (e) => {
29294
+ isTogglePanelShortcut(e) && (e.preventDefault(), T.value ? Ng() : Mg());
29307
29295
  };
29308
29296
  return onMounted(async () => {
29309
- o.value && _.setContainerRef(o.value), window.addEventListener("keydown", b_);
29297
+ o.value && _.setContainerRef(o.value), window.addEventListener("keydown", S_);
29310
29298
  }), onBeforeUnmount(() => {
29311
- window.removeEventListener("keydown", b_), _.destroy();
29299
+ window.removeEventListener("keydown", S_), _.destroy();
29312
29300
  }), n({
29313
- show: Og,
29314
- hide: kg,
29315
- sendMessage: r_,
29316
- stopGeneration: l_,
29317
- addNewSession: u_,
29318
- switchToSession: d_,
29319
- updateSessionName: f_,
29320
- updatePosition: h_,
29321
- updateSize: g_,
29322
- updatePositionAndSize: __,
29323
- setCiteText: v_,
29324
- focusInput: y_
29301
+ show: Mg,
29302
+ hide: Ng,
29303
+ sendMessage: a_,
29304
+ stopGeneration: d_,
29305
+ addNewSession: f_,
29306
+ switchToSession: p_,
29307
+ updateSessionName: m_,
29308
+ updatePosition: __,
29309
+ updateSize: v_,
29310
+ updatePositionAndSize: y_,
29311
+ setCiteText: b_,
29312
+ focusInput: x_
29325
29313
  }), (e, n) => (openBlock(), createBlock(Teleport, { to: i.teleportTo }, [createElementVNode("div", { class: normalizeClass(["ai-blueking-v2", i.extCls]) }, [
29326
29314
  createCommentVNode(" 可拖拽容器 "),
29327
29315
  createVNode(unref(draggable_container_default), {
@@ -29337,42 +29325,42 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29337
29325
  "max-width": i.maxWidth,
29338
29326
  "max-width-percent": 80,
29339
29327
  visible: unref(T),
29340
- onCompressionChange: Hg,
29341
- onDragStop: zg,
29342
- onDragging: Lg,
29343
- onResizeStop: Bg,
29344
- onResizing: Rg
29328
+ onCompressionChange: Kg,
29329
+ onDragStop: Ug,
29330
+ onDragging: Vg,
29331
+ onResizeStop: Wg,
29332
+ onResizing: Hg
29345
29333
  }, {
29346
29334
  default: withCtx(() => [createElementVNode("div", _hoisted_1, [
29347
29335
  createCommentVNode(" 独立的 Header 组件 "),
29348
29336
  i.hideHeader ? createCommentVNode("v-if", !0) : (openBlock(), createBlock(ai_header_default, {
29349
29337
  key: 0,
29350
- "agent-name": bg.value,
29338
+ "agent-name": Eg.value,
29351
29339
  "chat-helper": unref(G),
29352
29340
  draggable: i.draggable,
29353
29341
  "dropdown-menu-config": i.dropdownMenuConfig,
29354
29342
  "enable-chat-session": i.enableChatSession,
29355
- "has-permission": Cg.value,
29356
- "has-session-contents": Tg.value,
29357
- "is-compression-height": yg.value,
29343
+ "has-permission": Og.value,
29344
+ "has-session-contents": kg.value,
29345
+ "is-compression-height": Tg.value,
29358
29346
  "session-business-manager": unref(K),
29359
- "session-name": Sg.value,
29347
+ "session-name": Dg.value,
29360
29348
  "show-compression-icon": i.showCompressionIcon,
29361
29349
  "show-history-icon": i.showHistoryIcon,
29362
29350
  "show-more-icon": i.showMoreIcon,
29363
29351
  "show-new-chat-icon": i.showNewChatIcon,
29364
29352
  title: i.title,
29365
- onAutoGenerateName: Xg,
29366
- onClose: jg,
29367
- onHelpClick: Zg,
29368
- onHistoryClick: Wg,
29369
- onHistorySessionDelete: qg,
29370
- onHistorySessionRename: Yg,
29371
- onHistorySessionSwitch: Kg,
29372
- onNewChat: Ug,
29373
- onRename: Qg,
29374
- onShare: $g,
29375
- onToggleCompression: Vg
29353
+ onAutoGenerateName: $g,
29354
+ onClose: Pg,
29355
+ onHelpClick: e_,
29356
+ onHistoryClick: Jg,
29357
+ onHistorySessionDelete: Xg,
29358
+ onHistorySessionRename: Qg,
29359
+ onHistorySessionSwitch: Yg,
29360
+ onNewChat: qg,
29361
+ onRename: t_,
29362
+ onShare: n_,
29363
+ onToggleCompression: Gg
29376
29364
  }, null, 8, [
29377
29365
  "agent-name",
29378
29366
  "chat-helper",
@@ -29396,7 +29384,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29396
29384
  ref: l,
29397
29385
  "auto-load": i.loadRecentSessionOnMount,
29398
29386
  "chat-helper": unref(G),
29399
- "enable-selection": pg.value,
29387
+ "enable-selection": Q.value,
29400
29388
  "hello-text": i.helloText,
29401
29389
  placeholder: i.placeholder,
29402
29390
  prompts: i.prompts,
@@ -29406,19 +29394,17 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29406
29394
  "shortcut-limit": i.shortcutLimit,
29407
29395
  shortcuts: i.shortcuts,
29408
29396
  url: u.value,
29409
- onAgentInfoLoaded: n[0] ||= (e) => Dg(e),
29410
- onCancelShare: e_,
29411
- onConfirmShare: n[1] ||= (e) => n_(e),
29412
- onError: n[2] ||= (e) => m_(e),
29413
- onReceiveEnd: s_,
29414
- onReceiveStart: a_,
29415
- onReceiveText: o_,
29416
- onRequestShare: $g,
29417
- onSendMessage: n[3] ||= (e) => i_(e),
29418
- onSessionDeleted: n[4] ||= (e) => Jg(e),
29419
- onSessionSwitched: n[5] ||= (e) => p_(e),
29420
- onShortcutClick: n[6] ||= (e) => Ig(e),
29421
- onStop: c_
29397
+ onCancelShare: r_,
29398
+ onConfirmShare: n[0] ||= (e) => i_(e),
29399
+ onError: n[1] ||= (e) => g_(e),
29400
+ onReceiveEnd: l_,
29401
+ onReceiveStart: s_,
29402
+ onReceiveText: c_,
29403
+ onRequestShare: n_,
29404
+ onSendMessage: n[2] ||= (e) => o_(e),
29405
+ onSessionSwitched: n[3] ||= (e) => h_(e),
29406
+ onShortcutClick: n[4] ||= (e) => Bg(e),
29407
+ onStop: u_
29422
29408
  }, null, 8, [
29423
29409
  "auto-load",
29424
29410
  "chat-helper",
@@ -29449,12 +29435,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29449
29435
  i.hideNimbus ? createCommentVNode("v-if", !0) : (openBlock(), createBlock(nimbus_default, {
29450
29436
  key: 0,
29451
29437
  "is-minimize": unref(O),
29452
- "onUpdate:isMinimize": n[7] ||= (e) => isRef(O) ? O.value = e : null,
29438
+ "onUpdate:isMinimize": n[5] ||= (e) => isRef(O) ? O.value = e : null,
29453
29439
  "is-panel-show": unref(T),
29454
- "onUpdate:isPanelShow": n[8] ||= (e) => isRef(T) ? T.value = e : null,
29440
+ "onUpdate:isPanelShow": n[6] ||= (e) => isRef(T) ? T.value = e : null,
29455
29441
  "default-minimize": i.defaultMinimize,
29456
29442
  size: i.nimbusSize,
29457
- onClick: Mg
29443
+ onClick: Fg
29458
29444
  }, null, 8, [
29459
29445
  "is-minimize",
29460
29446
  "is-panel-show",
@@ -29464,12 +29450,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29464
29450
  createCommentVNode(" 划词选择弹窗(使用 chat-x 的 AiSelection 组件) "),
29465
29451
  i.enablePopup ? (openBlock(), createBlock(unref(ai_selection_default), {
29466
29452
  key: 1,
29467
- visible: _g.value,
29468
- "onUpdate:visible": n[9] ||= (e) => _g.value = e,
29453
+ visible: Cg.value,
29454
+ "onUpdate:visible": n[7] ||= (e) => Cg.value = e,
29469
29455
  "max-shortcut-count": i.shortcutLimit,
29470
- shortcuts: Eg.value,
29471
- onSelectShortcut: Fg,
29472
- onSelectionChange: Pg
29456
+ shortcuts: jg.value,
29457
+ onSelectShortcut: Rg,
29458
+ onSelectionChange: Lg
29473
29459
  }, null, 8, [
29474
29460
  "visible",
29475
29461
  "max-shortcut-count",
@@ -29477,5 +29463,5 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29477
29463
  ])) : createCommentVNode("v-if", !0)
29478
29464
  ], 2)], 8, ["to"]));
29479
29465
  }
29480
- }), [["__scopeId", "data-v-cc4558ca"]]);
29466
+ }), [["__scopeId", "data-v-25c583ac"]]);
29481
29467
  export { AGUIProtocol, ai_blueking_default as AIBlueking, ai_blueking_default as default, BluekingProtocol, BootstrapPhase, chat_bot_default as ChatBot, ChatBusinessManager, ComponentManager, draggable_container_default as DraggableContainer, MessageContentType, SessionBusinessManager, ShortcutManager, UIStateManager, createBluekingProtocol, createComponentManager, defaultProps, useChatBootstrap, useChatHelper, useDraggable };