@blueking/ai-blueking 2.0.0-dev.20 → 2.0.0-dev.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-blueking.vue.d.ts.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/vue2/index.es.min.js +532 -529
- package/dist/vue2/index.iife.min.js +2 -2
- package/dist/vue2/index.umd.min.js +25 -25
- package/dist/vue2/style.css +1 -1
- package/dist/vue3/index.es.min.js +558 -555
- package/dist/vue3/index.iife.min.js +2 -2
- package/dist/vue3/index.umd.min.js +25 -25
- package/dist/vue3/style.css +1 -1
- package/package.json +1 -1
|
@@ -729,17 +729,17 @@ var _hoisted_1$43 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
729
729
|
G(200);
|
|
730
730
|
}, q = () => {
|
|
731
731
|
G(300);
|
|
732
|
-
},
|
|
732
|
+
}, wg = (e) => {
|
|
733
733
|
i.value && l.value?.contains(e.target) || z();
|
|
734
734
|
}, Z = (e) => {
|
|
735
735
|
!k.value || !i.value || e.target instanceof HTMLElement && e.target.contains(k.value?.anchorNode) && z();
|
|
736
|
-
},
|
|
736
|
+
}, Tg = () => {
|
|
737
737
|
d.value?.show();
|
|
738
738
|
};
|
|
739
739
|
return onMounted(() => {
|
|
740
|
-
document.addEventListener("selectionchange", q), document.addEventListener("mouseup", K), document.addEventListener("mousedown",
|
|
740
|
+
document.addEventListener("selectionchange", q), document.addEventListener("mouseup", K), document.addEventListener("mousedown", wg), document.addEventListener("scroll", Z, !0), window.addEventListener("resize", z), window.addEventListener("blur", z);
|
|
741
741
|
}), onUnmounted(() => {
|
|
742
|
-
document.removeEventListener("selectionchange", q), document.removeEventListener("mouseup", K), document.removeEventListener("mousedown",
|
|
742
|
+
document.removeEventListener("selectionchange", q), document.removeEventListener("mouseup", K), document.removeEventListener("mousedown", wg), document.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", z), window.removeEventListener("blur", z);
|
|
743
743
|
}), (n, r) => (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, { name: "ai-fade" }, {
|
|
744
744
|
default: withCtx(() => [i.value ? (openBlock(), createElementBlock("div", {
|
|
745
745
|
key: 0,
|
|
@@ -782,7 +782,7 @@ var _hoisted_1$43 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
782
782
|
}, null, 8, ["shortcut", "onClick"]))), 128))])) : createCommentVNode("v-if", !0)]),
|
|
783
783
|
default: withCtx(() => [createVNode(shortcut_btn_default, {
|
|
784
784
|
style: { width: "28px" },
|
|
785
|
-
onClick:
|
|
785
|
+
onClick: Tg
|
|
786
786
|
}, {
|
|
787
787
|
default: withCtx(() => [createVNode(unref(CollapsedIcon), { class: "shortcut-btn-more-icon" })]),
|
|
788
788
|
_: 1
|
|
@@ -4797,7 +4797,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4797
4797
|
return a;
|
|
4798
4798
|
}).map((e) => `(${e})`).join(n);
|
|
4799
4799
|
}
|
|
4800
|
-
var G = /\b\B/, K = "[a-zA-Z]\\w*", q = "[a-zA-Z_]\\w*", J = "\\b\\d+(\\.\\d+)?",
|
|
4800
|
+
var G = /\b\B/, K = "[a-zA-Z]\\w*", q = "[a-zA-Z_]\\w*", J = "\\b\\d+(\\.\\d+)?", wg = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", Z = "\\b(0b[01]+)", Q = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", Tg = (e = {}) => {
|
|
4801
4801
|
let n = /^#![ ]*\//;
|
|
4802
4802
|
return e.binary && (e.begin = k(n, /.*\b/, e.binary, /\b.*/)), o({
|
|
4803
4803
|
scope: "meta",
|
|
@@ -4808,22 +4808,22 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4808
4808
|
e.index !== 0 && n.ignoreMatch();
|
|
4809
4809
|
}
|
|
4810
4810
|
}, e);
|
|
4811
|
-
},
|
|
4811
|
+
}, Eg = {
|
|
4812
4812
|
begin: "\\\\[\\s\\S]",
|
|
4813
4813
|
relevance: 0
|
|
4814
|
-
},
|
|
4814
|
+
}, Dg = {
|
|
4815
4815
|
scope: "string",
|
|
4816
4816
|
begin: "'",
|
|
4817
4817
|
end: "'",
|
|
4818
4818
|
illegal: "\\n",
|
|
4819
|
-
contains: [
|
|
4819
|
+
contains: [Eg]
|
|
4820
4820
|
}, $ = {
|
|
4821
4821
|
scope: "string",
|
|
4822
4822
|
begin: "\"",
|
|
4823
4823
|
end: "\"",
|
|
4824
4824
|
illegal: "\\n",
|
|
4825
|
-
contains: [
|
|
4826
|
-
},
|
|
4825
|
+
contains: [Eg]
|
|
4826
|
+
}, Og = { 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/ }, kg = function(e, n, r = {}) {
|
|
4827
4827
|
let i = o({
|
|
4828
4828
|
scope: "comment",
|
|
4829
4829
|
begin: e,
|
|
@@ -4839,50 +4839,50 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4839
4839
|
});
|
|
4840
4840
|
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,}/);
|
|
4841
4841
|
return i.contains.push({ begin: k(/[ ]+/, "(", a, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), i;
|
|
4842
|
-
},
|
|
4842
|
+
}, Ag = kg("//", "$"), jg = kg("/\\*", "\\*/"), Mg = kg("#", "$"), Ng = {
|
|
4843
4843
|
scope: "number",
|
|
4844
4844
|
begin: J,
|
|
4845
4845
|
relevance: 0
|
|
4846
|
-
},
|
|
4846
|
+
}, Pg = {
|
|
4847
4847
|
scope: "number",
|
|
4848
|
-
begin:
|
|
4848
|
+
begin: wg,
|
|
4849
4849
|
relevance: 0
|
|
4850
|
-
},
|
|
4850
|
+
}, Fg = {
|
|
4851
4851
|
scope: "number",
|
|
4852
4852
|
begin: Z,
|
|
4853
4853
|
relevance: 0
|
|
4854
|
-
},
|
|
4854
|
+
}, Ig = {
|
|
4855
4855
|
scope: "regexp",
|
|
4856
4856
|
begin: /\/(?=[^/\n]*\/)/,
|
|
4857
4857
|
end: /\/[gimuy]*/,
|
|
4858
|
-
contains: [
|
|
4858
|
+
contains: [Eg, {
|
|
4859
4859
|
begin: /\[/,
|
|
4860
4860
|
end: /\]/,
|
|
4861
4861
|
relevance: 0,
|
|
4862
|
-
contains: [
|
|
4862
|
+
contains: [Eg]
|
|
4863
4863
|
}]
|
|
4864
|
-
},
|
|
4864
|
+
}, Lg = {
|
|
4865
4865
|
scope: "title",
|
|
4866
4866
|
begin: K,
|
|
4867
4867
|
relevance: 0
|
|
4868
|
-
},
|
|
4868
|
+
}, Rg = {
|
|
4869
4869
|
scope: "title",
|
|
4870
4870
|
begin: q,
|
|
4871
4871
|
relevance: 0
|
|
4872
|
-
},
|
|
4872
|
+
}, zg = {
|
|
4873
4873
|
begin: "\\.\\s*" + q,
|
|
4874
4874
|
relevance: 0
|
|
4875
|
-
},
|
|
4875
|
+
}, Bg = /* @__PURE__ */ Object.freeze({
|
|
4876
4876
|
__proto__: null,
|
|
4877
|
-
APOS_STRING_MODE:
|
|
4878
|
-
BACKSLASH_ESCAPE:
|
|
4879
|
-
BINARY_NUMBER_MODE:
|
|
4877
|
+
APOS_STRING_MODE: Dg,
|
|
4878
|
+
BACKSLASH_ESCAPE: Eg,
|
|
4879
|
+
BINARY_NUMBER_MODE: Fg,
|
|
4880
4880
|
BINARY_NUMBER_RE: Z,
|
|
4881
|
-
COMMENT:
|
|
4882
|
-
C_BLOCK_COMMENT_MODE:
|
|
4883
|
-
C_LINE_COMMENT_MODE:
|
|
4884
|
-
C_NUMBER_MODE:
|
|
4885
|
-
C_NUMBER_RE:
|
|
4881
|
+
COMMENT: kg,
|
|
4882
|
+
C_BLOCK_COMMENT_MODE: jg,
|
|
4883
|
+
C_LINE_COMMENT_MODE: Ag,
|
|
4884
|
+
C_NUMBER_MODE: Pg,
|
|
4885
|
+
C_NUMBER_RE: wg,
|
|
4886
4886
|
END_SAME_AS_BEGIN: function(e) {
|
|
4887
4887
|
return Object.assign(e, {
|
|
4888
4888
|
"on:begin": (e, n) => {
|
|
@@ -4893,43 +4893,43 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4893
4893
|
}
|
|
4894
4894
|
});
|
|
4895
4895
|
},
|
|
4896
|
-
HASH_COMMENT_MODE:
|
|
4896
|
+
HASH_COMMENT_MODE: Mg,
|
|
4897
4897
|
IDENT_RE: K,
|
|
4898
4898
|
MATCH_NOTHING_RE: G,
|
|
4899
|
-
METHOD_GUARD:
|
|
4900
|
-
NUMBER_MODE:
|
|
4899
|
+
METHOD_GUARD: zg,
|
|
4900
|
+
NUMBER_MODE: Ng,
|
|
4901
4901
|
NUMBER_RE: J,
|
|
4902
|
-
PHRASAL_WORDS_MODE:
|
|
4902
|
+
PHRASAL_WORDS_MODE: Og,
|
|
4903
4903
|
QUOTE_STRING_MODE: $,
|
|
4904
|
-
REGEXP_MODE:
|
|
4904
|
+
REGEXP_MODE: Ig,
|
|
4905
4905
|
RE_STARTERS_RE: Q,
|
|
4906
|
-
SHEBANG:
|
|
4907
|
-
TITLE_MODE:
|
|
4906
|
+
SHEBANG: Tg,
|
|
4907
|
+
TITLE_MODE: Lg,
|
|
4908
4908
|
UNDERSCORE_IDENT_RE: q,
|
|
4909
|
-
UNDERSCORE_TITLE_MODE:
|
|
4909
|
+
UNDERSCORE_TITLE_MODE: Rg
|
|
4910
4910
|
});
|
|
4911
|
-
function
|
|
4911
|
+
function Vg(e, n) {
|
|
4912
4912
|
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
4913
4913
|
}
|
|
4914
|
-
function
|
|
4914
|
+
function Hg(e, n) {
|
|
4915
4915
|
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
4916
4916
|
}
|
|
4917
|
-
function
|
|
4918
|
-
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin =
|
|
4917
|
+
function Ug(e, n) {
|
|
4918
|
+
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Vg, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
4919
4919
|
}
|
|
4920
|
-
function
|
|
4920
|
+
function Wg(e, n) {
|
|
4921
4921
|
Array.isArray(e.illegal) && (e.illegal = I(...e.illegal));
|
|
4922
4922
|
}
|
|
4923
|
-
function
|
|
4923
|
+
function Gg(e, n) {
|
|
4924
4924
|
if (e.match) {
|
|
4925
4925
|
if (e.begin || e.end) throw Error("begin & end are not supported with match");
|
|
4926
4926
|
e.begin = e.match, delete e.match;
|
|
4927
4927
|
}
|
|
4928
4928
|
}
|
|
4929
|
-
function
|
|
4929
|
+
function Kg(e, n) {
|
|
4930
4930
|
e.relevance === void 0 && (e.relevance = 1);
|
|
4931
4931
|
}
|
|
4932
|
-
var
|
|
4932
|
+
var qg = (e, n) => {
|
|
4933
4933
|
if (!e.beforeMatch) return;
|
|
4934
4934
|
if (e.starts) throw Error("beforeMatch cannot be used with starts");
|
|
4935
4935
|
let r = Object.assign({}, e);
|
|
@@ -4939,7 +4939,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4939
4939
|
relevance: 0,
|
|
4940
4940
|
contains: [Object.assign(r, { endsParent: !0 })]
|
|
4941
4941
|
}, e.relevance = 0, delete r.beforeMatch;
|
|
4942
|
-
},
|
|
4942
|
+
}, Jg = [
|
|
4943
4943
|
"of",
|
|
4944
4944
|
"and",
|
|
4945
4945
|
"for",
|
|
@@ -4951,58 +4951,58 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4951
4951
|
"parent",
|
|
4952
4952
|
"list",
|
|
4953
4953
|
"value"
|
|
4954
|
-
],
|
|
4955
|
-
function
|
|
4954
|
+
], Yg = "keyword";
|
|
4955
|
+
function Xg(e, n, r = Yg) {
|
|
4956
4956
|
let i = Object.create(null);
|
|
4957
4957
|
return typeof e == "string" ? a(r, e.split(" ")) : Array.isArray(e) ? a(r, e) : Object.keys(e).forEach(function(r) {
|
|
4958
|
-
Object.assign(i,
|
|
4958
|
+
Object.assign(i, Xg(e[r], n, r));
|
|
4959
4959
|
}), i;
|
|
4960
4960
|
function a(e, r) {
|
|
4961
4961
|
n && (r = r.map((e) => e.toLowerCase())), r.forEach(function(n) {
|
|
4962
4962
|
let r = n.split("|");
|
|
4963
|
-
i[r[0]] = [e,
|
|
4963
|
+
i[r[0]] = [e, Zg(r[0], r[1])];
|
|
4964
4964
|
});
|
|
4965
4965
|
}
|
|
4966
4966
|
}
|
|
4967
|
-
function
|
|
4968
|
-
return n ? Number(n) :
|
|
4967
|
+
function Zg(e, n) {
|
|
4968
|
+
return n ? Number(n) : Qg(e) ? 0 : 1;
|
|
4969
4969
|
}
|
|
4970
|
-
function
|
|
4971
|
-
return
|
|
4970
|
+
function Qg(e) {
|
|
4971
|
+
return Jg.includes(e.toLowerCase());
|
|
4972
4972
|
}
|
|
4973
|
-
var
|
|
4973
|
+
var $g = {}, e_ = (e) => {
|
|
4974
4974
|
console.error(e);
|
|
4975
|
-
},
|
|
4975
|
+
}, t_ = (e, ...n) => {
|
|
4976
4976
|
console.log(`WARN: ${e}`, ...n);
|
|
4977
|
-
},
|
|
4978
|
-
|
|
4979
|
-
},
|
|
4980
|
-
function
|
|
4977
|
+
}, n_ = (e, n) => {
|
|
4978
|
+
$g[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), $g[`${e}/${n}`] = !0);
|
|
4979
|
+
}, r_ = /* @__PURE__ */ Error();
|
|
4980
|
+
function i_(e, n, { key: r }) {
|
|
4981
4981
|
let i = 0, a = e[r], o = {}, s = {};
|
|
4982
4982
|
for (let e = 1; e <= n.length; e++) s[e + i] = a[e], o[e + i] = !0, i += L(n[e - 1]);
|
|
4983
4983
|
e[r] = s, e[r]._emit = o, e[r]._multi = !0;
|
|
4984
4984
|
}
|
|
4985
|
-
function
|
|
4985
|
+
function a_(e) {
|
|
4986
4986
|
if (Array.isArray(e.begin)) {
|
|
4987
|
-
if (e.skip || e.excludeBegin || e.returnBegin) throw
|
|
4988
|
-
if (typeof e.beginScope != "object" || e.beginScope === null) throw
|
|
4989
|
-
|
|
4987
|
+
if (e.skip || e.excludeBegin || e.returnBegin) throw e_("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), r_;
|
|
4988
|
+
if (typeof e.beginScope != "object" || e.beginScope === null) throw e_("beginScope must be object"), r_;
|
|
4989
|
+
i_(e, e.begin, { key: "beginScope" }), e.begin = H(e.begin, { joinWith: "" });
|
|
4990
4990
|
}
|
|
4991
4991
|
}
|
|
4992
|
-
function
|
|
4992
|
+
function o_(e) {
|
|
4993
4993
|
if (Array.isArray(e.end)) {
|
|
4994
|
-
if (e.skip || e.excludeEnd || e.returnEnd) throw
|
|
4995
|
-
if (typeof e.endScope != "object" || e.endScope === null) throw
|
|
4996
|
-
|
|
4994
|
+
if (e.skip || e.excludeEnd || e.returnEnd) throw e_("skip, excludeEnd, returnEnd not compatible with endScope: {}"), r_;
|
|
4995
|
+
if (typeof e.endScope != "object" || e.endScope === null) throw e_("endScope must be object"), r_;
|
|
4996
|
+
i_(e, e.end, { key: "endScope" }), e.end = H(e.end, { joinWith: "" });
|
|
4997
4997
|
}
|
|
4998
4998
|
}
|
|
4999
|
-
function
|
|
4999
|
+
function s_(e) {
|
|
5000
5000
|
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
5001
5001
|
}
|
|
5002
|
-
function
|
|
5003
|
-
|
|
5002
|
+
function c_(e) {
|
|
5003
|
+
s_(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), a_(e), o_(e);
|
|
5004
5004
|
}
|
|
5005
|
-
function
|
|
5005
|
+
function l_(e) {
|
|
5006
5006
|
function n(n, r) {
|
|
5007
5007
|
return new RegExp(v(n), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (r ? "g" : ""));
|
|
5008
5008
|
}
|
|
@@ -5064,18 +5064,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5064
5064
|
let o = r;
|
|
5065
5065
|
if (r.isCompiled) return o;
|
|
5066
5066
|
[
|
|
5067
|
-
|
|
5068
|
-
Kg,
|
|
5069
|
-
l_,
|
|
5070
|
-
Jg
|
|
5071
|
-
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5072
|
-
Wg,
|
|
5067
|
+
Hg,
|
|
5073
5068
|
Gg,
|
|
5069
|
+
c_,
|
|
5074
5070
|
qg
|
|
5071
|
+
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5072
|
+
Ug,
|
|
5073
|
+
Wg,
|
|
5074
|
+
Kg
|
|
5075
5075
|
].forEach((e) => e(r, i)), r.isCompiled = !0;
|
|
5076
5076
|
let l = null;
|
|
5077
|
-
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 &&=
|
|
5078
|
-
return
|
|
5077
|
+
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 &&= Xg(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) {
|
|
5078
|
+
return d_(e === "self" ? r : e);
|
|
5079
5079
|
})), r.contains.forEach(function(e) {
|
|
5080
5080
|
s(e, o);
|
|
5081
5081
|
}), r.starts && s(r.starts, i), o.matcher = a(o), o;
|
|
@@ -5083,19 +5083,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5083
5083
|
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.");
|
|
5084
5084
|
return e.classNameAliases = o(e.classNameAliases || {}), s(e);
|
|
5085
5085
|
}
|
|
5086
|
-
function
|
|
5087
|
-
return e ? e.endsWithParent ||
|
|
5086
|
+
function u_(e) {
|
|
5087
|
+
return e ? e.endsWithParent || u_(e.starts) : !1;
|
|
5088
5088
|
}
|
|
5089
|
-
function
|
|
5089
|
+
function d_(e) {
|
|
5090
5090
|
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
|
|
5091
5091
|
return o(e, { variants: null }, n);
|
|
5092
|
-
})), e.cachedVariants ? e.cachedVariants :
|
|
5092
|
+
})), e.cachedVariants ? e.cachedVariants : u_(e) ? o(e, { starts: e.starts ? o(e.starts) : null }) : Object.isFrozen(e) ? o(e) : e;
|
|
5093
5093
|
}
|
|
5094
|
-
var
|
|
5094
|
+
var f_ = "11.11.1", p_ = class extends Error {
|
|
5095
5095
|
constructor(e, n) {
|
|
5096
5096
|
super(e), this.name = "HTMLInjectionError", this.html = n;
|
|
5097
5097
|
}
|
|
5098
|
-
},
|
|
5098
|
+
}, m_ = a, h_ = o, g_ = Symbol("nomatch"), __ = 7, v_ = function(e) {
|
|
5099
5099
|
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 = {
|
|
5100
5100
|
disableAutodetect: !0,
|
|
5101
5101
|
name: "Plain text",
|
|
@@ -5118,21 +5118,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5118
5118
|
n += e.parentNode ? e.parentNode.className : "";
|
|
5119
5119
|
let r = d.languageDetectRe.exec(n);
|
|
5120
5120
|
if (r) {
|
|
5121
|
-
let n =
|
|
5122
|
-
return n || (
|
|
5121
|
+
let n = Dg(r[1]);
|
|
5122
|
+
return n || (t_(l.replace("{}", r[1])), t_("Falling back to no-highlight mode for this block.", e)), n ? r[1] : "no-highlight";
|
|
5123
5123
|
}
|
|
5124
|
-
return n.split(/\s+/).find((e) => m(e) ||
|
|
5124
|
+
return n.split(/\s+/).find((e) => m(e) || Dg(e));
|
|
5125
5125
|
}
|
|
5126
5126
|
function v(e, n, r) {
|
|
5127
5127
|
let i = "", a = "";
|
|
5128
|
-
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (
|
|
5128
|
+
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (n_("10.7.0", "highlight(lang, code, ...args) has been deprecated."), n_("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);
|
|
5129
5129
|
let o = {
|
|
5130
5130
|
code: i,
|
|
5131
5131
|
language: a
|
|
5132
5132
|
};
|
|
5133
|
-
|
|
5133
|
+
Mg("before:highlight", o);
|
|
5134
5134
|
let s = o.result ? o.result : j(o.language, o.code, r);
|
|
5135
|
-
return s.code = o.code,
|
|
5135
|
+
return s.code = o.code, Mg("after:highlight", s), s;
|
|
5136
5136
|
}
|
|
5137
5137
|
function j(e, r, a, o) {
|
|
5138
5138
|
let u = Object.create(null);
|
|
@@ -5141,7 +5141,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5141
5141
|
}
|
|
5142
5142
|
function g() {
|
|
5143
5143
|
if (!Q.keywords) {
|
|
5144
|
-
|
|
5144
|
+
Eg.addText($);
|
|
5145
5145
|
return;
|
|
5146
5146
|
}
|
|
5147
5147
|
let e = 0;
|
|
@@ -5152,7 +5152,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5152
5152
|
let i = J.case_insensitive ? n[0].toLowerCase() : n[0], a = m(Q, i);
|
|
5153
5153
|
if (a) {
|
|
5154
5154
|
let [e, o] = a;
|
|
5155
|
-
if (
|
|
5155
|
+
if (Eg.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <= __ && (Og += o), e.startsWith("_")) r += n[0];
|
|
5156
5156
|
else {
|
|
5157
5157
|
let r = J.classNameAliases[e] || e;
|
|
5158
5158
|
T(n[0], r);
|
|
@@ -5160,25 +5160,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5160
5160
|
} else r += n[0];
|
|
5161
5161
|
e = Q.keywordPatternRe.lastIndex, n = Q.keywordPatternRe.exec($);
|
|
5162
5162
|
}
|
|
5163
|
-
r += $.substring(e),
|
|
5163
|
+
r += $.substring(e), Eg.addText(r);
|
|
5164
5164
|
}
|
|
5165
5165
|
function _() {
|
|
5166
5166
|
if ($ === "") return;
|
|
5167
5167
|
let e = null;
|
|
5168
5168
|
if (typeof Q.subLanguage == "string") {
|
|
5169
5169
|
if (!n[Q.subLanguage]) {
|
|
5170
|
-
|
|
5170
|
+
Eg.addText($);
|
|
5171
5171
|
return;
|
|
5172
5172
|
}
|
|
5173
|
-
e = j(Q.subLanguage, $, !0,
|
|
5173
|
+
e = j(Q.subLanguage, $, !0, Tg[Q.subLanguage]), Tg[Q.subLanguage] = e._top;
|
|
5174
5174
|
} else e = B($, Q.subLanguage.length ? Q.subLanguage : null);
|
|
5175
|
-
Q.relevance > 0 && (
|
|
5175
|
+
Q.relevance > 0 && (Og += e.relevance), Eg.__addSublanguage(e._emitter, e.language);
|
|
5176
5176
|
}
|
|
5177
5177
|
function v() {
|
|
5178
5178
|
Q.subLanguage == null ? g() : _(), $ = "";
|
|
5179
5179
|
}
|
|
5180
5180
|
function T(e, n) {
|
|
5181
|
-
e !== "" && (
|
|
5181
|
+
e !== "" && (Eg.startScope(n), Eg.addText(e), Eg.endScope());
|
|
5182
5182
|
}
|
|
5183
5183
|
function E(e, n) {
|
|
5184
5184
|
let r = 1, i = n.length - 1;
|
|
@@ -5192,7 +5192,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5192
5192
|
}
|
|
5193
5193
|
}
|
|
5194
5194
|
function O(e, n) {
|
|
5195
|
-
return e.scope && typeof e.scope == "string" &&
|
|
5195
|
+
return e.scope && typeof e.scope == "string" && Eg.openNode(J.classNameAliases[e.scope] || e.scope), e.beginScope && (e.beginScope._wrap ? (T($, J.classNameAliases[e.beginScope._wrap] || e.beginScope._wrap), $ = "") : e.beginScope._multi && (E(e.beginScope, n), $ = "")), Q = Object.create(e, { parent: { value: Q } }), Q;
|
|
5196
5196
|
}
|
|
5197
5197
|
function k(e, n, r) {
|
|
5198
5198
|
let a = z(e.endRe, r);
|
|
@@ -5209,7 +5209,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5209
5209
|
if (e.endsWithParent) return k(e.parent, n, r);
|
|
5210
5210
|
}
|
|
5211
5211
|
function I(e) {
|
|
5212
|
-
return Q.matcher.regexIndex === 0 ? ($ += e[0], 1) : (
|
|
5212
|
+
return Q.matcher.regexIndex === 0 ? ($ += e[0], 1) : (jg = !0, 0);
|
|
5213
5213
|
}
|
|
5214
5214
|
function L(e) {
|
|
5215
5215
|
let n = e[0], r = e.rule, a = new i(r), o = [r.__beforeBegin, r["on:begin"]];
|
|
@@ -5218,18 +5218,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5218
5218
|
}
|
|
5219
5219
|
function H(e) {
|
|
5220
5220
|
let n = e[0], i = r.substring(e.index), a = k(Q, e, i);
|
|
5221
|
-
if (!a) return
|
|
5221
|
+
if (!a) return g_;
|
|
5222
5222
|
let o = Q;
|
|
5223
5223
|
Q.endScope && Q.endScope._wrap ? (v(), T(n, Q.endScope._wrap)) : Q.endScope && Q.endScope._multi ? (v(), E(Q.endScope, e)) : o.skip ? $ += n : (o.returnEnd || o.excludeEnd || ($ += n), v(), o.excludeEnd && ($ = n));
|
|
5224
5224
|
do
|
|
5225
|
-
Q.scope &&
|
|
5225
|
+
Q.scope && Eg.closeNode(), !Q.skip && !Q.subLanguage && (Og += Q.relevance), Q = Q.parent;
|
|
5226
5226
|
while (Q !== a.parent);
|
|
5227
5227
|
return a.starts && O(a.starts, e), o.returnEnd ? 0 : n.length;
|
|
5228
5228
|
}
|
|
5229
5229
|
function G() {
|
|
5230
5230
|
let e = [];
|
|
5231
5231
|
for (let n = Q; n !== J; n = n.parent) n.scope && e.unshift(n.scope);
|
|
5232
|
-
e.forEach((e) =>
|
|
5232
|
+
e.forEach((e) => Eg.openNode(e));
|
|
5233
5233
|
}
|
|
5234
5234
|
let K = {};
|
|
5235
5235
|
function q(n, i) {
|
|
@@ -5248,59 +5248,59 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5248
5248
|
throw e.mode = Q, e;
|
|
5249
5249
|
} else if (i.type === "end") {
|
|
5250
5250
|
let e = H(i);
|
|
5251
|
-
if (e !==
|
|
5251
|
+
if (e !== g_) return e;
|
|
5252
5252
|
}
|
|
5253
5253
|
if (i.type === "illegal" && o === "") return $ += "\n", 1;
|
|
5254
|
-
if (
|
|
5254
|
+
if (Ag > 1e5 && Ag > i.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
|
|
5255
5255
|
return $ += o, o.length;
|
|
5256
5256
|
}
|
|
5257
|
-
let J =
|
|
5258
|
-
if (!J) throw
|
|
5259
|
-
let
|
|
5257
|
+
let J = Dg(e);
|
|
5258
|
+
if (!J) throw e_(l.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
5259
|
+
let wg = l_(J), Z = "", Q = o || wg, Tg = {}, Eg = new d.__emitter(d);
|
|
5260
5260
|
G();
|
|
5261
|
-
let $ = "",
|
|
5261
|
+
let $ = "", Og = 0, kg = 0, Ag = 0, jg = !1;
|
|
5262
5262
|
try {
|
|
5263
|
-
if (J.__emitTokens) J.__emitTokens(r,
|
|
5263
|
+
if (J.__emitTokens) J.__emitTokens(r, Eg);
|
|
5264
5264
|
else {
|
|
5265
5265
|
for (Q.matcher.considerAll();;) {
|
|
5266
|
-
|
|
5266
|
+
Ag++, jg ? jg = !1 : Q.matcher.considerAll(), Q.matcher.lastIndex = kg;
|
|
5267
5267
|
let e = Q.matcher.exec(r);
|
|
5268
5268
|
if (!e) break;
|
|
5269
|
-
let n = q(r.substring(
|
|
5270
|
-
|
|
5269
|
+
let n = q(r.substring(kg, e.index), e);
|
|
5270
|
+
kg = e.index + n;
|
|
5271
5271
|
}
|
|
5272
|
-
q(r.substring(
|
|
5272
|
+
q(r.substring(kg));
|
|
5273
5273
|
}
|
|
5274
|
-
return
|
|
5274
|
+
return Eg.finalize(), Z = Eg.toHTML(), {
|
|
5275
5275
|
language: e,
|
|
5276
5276
|
value: Z,
|
|
5277
|
-
relevance:
|
|
5277
|
+
relevance: Og,
|
|
5278
5278
|
illegal: !1,
|
|
5279
|
-
_emitter:
|
|
5279
|
+
_emitter: Eg,
|
|
5280
5280
|
_top: Q
|
|
5281
5281
|
};
|
|
5282
5282
|
} catch (n) {
|
|
5283
5283
|
if (n.message && n.message.includes("Illegal")) return {
|
|
5284
5284
|
language: e,
|
|
5285
|
-
value:
|
|
5285
|
+
value: m_(r),
|
|
5286
5286
|
illegal: !0,
|
|
5287
5287
|
relevance: 0,
|
|
5288
5288
|
_illegalBy: {
|
|
5289
5289
|
message: n.message,
|
|
5290
|
-
index:
|
|
5291
|
-
context: r.slice(
|
|
5290
|
+
index: kg,
|
|
5291
|
+
context: r.slice(kg - 100, kg + 100),
|
|
5292
5292
|
mode: n.mode,
|
|
5293
5293
|
resultSoFar: Z
|
|
5294
5294
|
},
|
|
5295
|
-
_emitter:
|
|
5295
|
+
_emitter: Eg
|
|
5296
5296
|
};
|
|
5297
5297
|
if (s) return {
|
|
5298
5298
|
language: e,
|
|
5299
|
-
value:
|
|
5299
|
+
value: m_(r),
|
|
5300
5300
|
illegal: !1,
|
|
5301
5301
|
relevance: 0,
|
|
5302
5302
|
errorRaised: n,
|
|
5303
|
-
_emitter:
|
|
5303
|
+
_emitter: Eg,
|
|
5304
5304
|
_top: Q
|
|
5305
5305
|
};
|
|
5306
5306
|
throw n;
|
|
@@ -5308,7 +5308,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5308
5308
|
}
|
|
5309
5309
|
function L(e) {
|
|
5310
5310
|
let n = {
|
|
5311
|
-
value:
|
|
5311
|
+
value: m_(e),
|
|
5312
5312
|
illegal: !1,
|
|
5313
5313
|
relevance: 0,
|
|
5314
5314
|
_top: u,
|
|
@@ -5318,13 +5318,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5318
5318
|
}
|
|
5319
5319
|
function B(e, r) {
|
|
5320
5320
|
r = r || d.languages || Object.keys(n);
|
|
5321
|
-
let i = L(e), a = r.filter(
|
|
5321
|
+
let i = L(e), a = r.filter(Dg).filter(Og).map((n) => j(n, e, !1));
|
|
5322
5322
|
a.unshift(i);
|
|
5323
5323
|
let [o, s] = a.sort((e, n) => {
|
|
5324
5324
|
if (e.relevance !== n.relevance) return n.relevance - e.relevance;
|
|
5325
5325
|
if (e.language && n.language) {
|
|
5326
|
-
if (
|
|
5327
|
-
if (
|
|
5326
|
+
if (Dg(e.language).supersetOf === n.language) return 1;
|
|
5327
|
+
if (Dg(n.language).supersetOf === e.language) return -1;
|
|
5328
5328
|
}
|
|
5329
5329
|
return 0;
|
|
5330
5330
|
}), l = o;
|
|
@@ -5337,14 +5337,14 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5337
5337
|
function G(e) {
|
|
5338
5338
|
let n = null, r = g(e);
|
|
5339
5339
|
if (m(r)) return;
|
|
5340
|
-
if (
|
|
5340
|
+
if (Mg("before:highlightElement", {
|
|
5341
5341
|
el: e,
|
|
5342
5342
|
language: r
|
|
5343
5343
|
}), e.dataset.highlighted) {
|
|
5344
5344
|
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
|
|
5345
5345
|
return;
|
|
5346
5346
|
}
|
|
5347
|
-
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
|
|
5347
|
+
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 p_("One of your code blocks includes unescaped HTML.", e.innerHTML);
|
|
5348
5348
|
n = e;
|
|
5349
5349
|
let i = n.textContent, a = r ? v(i, {
|
|
5350
5350
|
language: r,
|
|
@@ -5357,28 +5357,28 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5357
5357
|
}, a.secondBest && (e.secondBest = {
|
|
5358
5358
|
language: a.secondBest.language,
|
|
5359
5359
|
relevance: a.secondBest.relevance
|
|
5360
|
-
}),
|
|
5360
|
+
}), Mg("after:highlightElement", {
|
|
5361
5361
|
el: e,
|
|
5362
5362
|
result: a,
|
|
5363
5363
|
text: i
|
|
5364
5364
|
});
|
|
5365
5365
|
}
|
|
5366
5366
|
function K(e) {
|
|
5367
|
-
d =
|
|
5367
|
+
d = h_(d, e);
|
|
5368
5368
|
}
|
|
5369
5369
|
let q = () => {
|
|
5370
|
-
Z(),
|
|
5370
|
+
Z(), n_("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
5371
5371
|
};
|
|
5372
5372
|
function J() {
|
|
5373
|
-
Z(),
|
|
5373
|
+
Z(), n_("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
5374
5374
|
}
|
|
5375
|
-
let
|
|
5375
|
+
let wg = !1;
|
|
5376
5376
|
function Z() {
|
|
5377
5377
|
function e() {
|
|
5378
5378
|
Z();
|
|
5379
5379
|
}
|
|
5380
5380
|
if (document.readyState === "loading") {
|
|
5381
|
-
|
|
5381
|
+
wg || window.addEventListener("DOMContentLoaded", e, !1), wg = !0;
|
|
5382
5382
|
return;
|
|
5383
5383
|
}
|
|
5384
5384
|
document.querySelectorAll(d.cssSelector).forEach(G);
|
|
@@ -5388,20 +5388,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5388
5388
|
try {
|
|
5389
5389
|
a = i(e);
|
|
5390
5390
|
} catch (e) {
|
|
5391
|
-
if (
|
|
5391
|
+
if (e_("Language definition for '{}' could not be registered.".replace("{}", r)), s) e_(e);
|
|
5392
5392
|
else throw e;
|
|
5393
5393
|
a = u;
|
|
5394
5394
|
}
|
|
5395
5395
|
a.name ||= r, n[r] = a, a.rawDefinition = i.bind(null, e), a.aliases && $(a.aliases, { languageName: r });
|
|
5396
5396
|
}
|
|
5397
|
-
function
|
|
5397
|
+
function Tg(e) {
|
|
5398
5398
|
delete n[e];
|
|
5399
5399
|
for (let n of Object.keys(a)) a[n] === e && delete a[n];
|
|
5400
5400
|
}
|
|
5401
|
-
function
|
|
5401
|
+
function Eg() {
|
|
5402
5402
|
return Object.keys(n);
|
|
5403
5403
|
}
|
|
5404
|
-
function
|
|
5404
|
+
function Dg(e) {
|
|
5405
5405
|
return e = (e || "").toLowerCase(), n[e] || n[a[e]];
|
|
5406
5406
|
}
|
|
5407
5407
|
function $(e, { languageName: n }) {
|
|
@@ -5409,65 +5409,65 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5409
5409
|
a[e.toLowerCase()] = n;
|
|
5410
5410
|
});
|
|
5411
5411
|
}
|
|
5412
|
-
function
|
|
5413
|
-
let n =
|
|
5412
|
+
function Og(e) {
|
|
5413
|
+
let n = Dg(e);
|
|
5414
5414
|
return n && !n.disableAutodetect;
|
|
5415
5415
|
}
|
|
5416
|
-
function
|
|
5416
|
+
function kg(e) {
|
|
5417
5417
|
e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (n) => {
|
|
5418
5418
|
e["before:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5419
5419
|
}), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (n) => {
|
|
5420
5420
|
e["after:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5421
5421
|
});
|
|
5422
5422
|
}
|
|
5423
|
-
function
|
|
5424
|
-
|
|
5423
|
+
function Ag(e) {
|
|
5424
|
+
kg(e), o.push(e);
|
|
5425
5425
|
}
|
|
5426
|
-
function
|
|
5426
|
+
function jg(e) {
|
|
5427
5427
|
let n = o.indexOf(e);
|
|
5428
5428
|
n !== -1 && o.splice(n, 1);
|
|
5429
5429
|
}
|
|
5430
|
-
function
|
|
5430
|
+
function Mg(e, n) {
|
|
5431
5431
|
let r = e;
|
|
5432
5432
|
o.forEach(function(e) {
|
|
5433
5433
|
e[r] && e[r](n);
|
|
5434
5434
|
});
|
|
5435
5435
|
}
|
|
5436
|
-
function
|
|
5437
|
-
return
|
|
5436
|
+
function Ng(e) {
|
|
5437
|
+
return n_("10.7.0", "highlightBlock will be removed entirely in v12.0"), n_("10.7.0", "Please use highlightElement now."), G(e);
|
|
5438
5438
|
}
|
|
5439
5439
|
for (let n in Object.assign(e, {
|
|
5440
5440
|
highlight: v,
|
|
5441
5441
|
highlightAuto: B,
|
|
5442
5442
|
highlightAll: Z,
|
|
5443
5443
|
highlightElement: G,
|
|
5444
|
-
highlightBlock:
|
|
5444
|
+
highlightBlock: Ng,
|
|
5445
5445
|
configure: K,
|
|
5446
5446
|
initHighlighting: q,
|
|
5447
5447
|
initHighlightingOnLoad: J,
|
|
5448
5448
|
registerLanguage: Q,
|
|
5449
|
-
unregisterLanguage:
|
|
5450
|
-
listLanguages:
|
|
5451
|
-
getLanguage:
|
|
5449
|
+
unregisterLanguage: Tg,
|
|
5450
|
+
listLanguages: Eg,
|
|
5451
|
+
getLanguage: Dg,
|
|
5452
5452
|
registerAliases: $,
|
|
5453
|
-
autoDetection:
|
|
5454
|
-
inherit:
|
|
5455
|
-
addPlugin:
|
|
5456
|
-
removePlugin:
|
|
5453
|
+
autoDetection: Og,
|
|
5454
|
+
inherit: h_,
|
|
5455
|
+
addPlugin: Ag,
|
|
5456
|
+
removePlugin: jg
|
|
5457
5457
|
}), e.debugMode = function() {
|
|
5458
5458
|
s = !1;
|
|
5459
5459
|
}, e.safeMode = function() {
|
|
5460
5460
|
s = !0;
|
|
5461
|
-
}, e.versionString =
|
|
5461
|
+
}, e.versionString = f_, e.regex = {
|
|
5462
5462
|
concat: k,
|
|
5463
5463
|
lookahead: T,
|
|
5464
5464
|
either: I,
|
|
5465
5465
|
optional: O,
|
|
5466
5466
|
anyNumberOfTimes: E
|
|
5467
|
-
},
|
|
5468
|
-
return Object.assign(e,
|
|
5469
|
-
},
|
|
5470
|
-
|
|
5467
|
+
}, Bg) typeof Bg[n] == "object" && r(Bg[n]);
|
|
5468
|
+
return Object.assign(e, Bg), e;
|
|
5469
|
+
}, y_ = v_({});
|
|
5470
|
+
y_.newInstance = () => v_({}), n.exports = y_, y_.HighlightJS = y_, y_.default = y_;
|
|
5471
5471
|
})), require__1c = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
5472
5472
|
function r(e) {
|
|
5473
5473
|
let n = "[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+", r = "далее возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ", i = "null истина ложь неопределено", a = e.inherit(e.NUMBER_MODE), o = {
|
|
@@ -11589,7 +11589,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11589
11589
|
begin: /"/,
|
|
11590
11590
|
end: /"/,
|
|
11591
11591
|
contains: [e.BACKSLASH_ESCAPE]
|
|
11592
|
-
},
|
|
11592
|
+
}, wg = {
|
|
11593
11593
|
scope: "string",
|
|
11594
11594
|
begin: /@"/,
|
|
11595
11595
|
end: /"/,
|
|
@@ -11604,7 +11604,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11604
11604
|
begin: /\{/,
|
|
11605
11605
|
end: /\}/,
|
|
11606
11606
|
keywords: g
|
|
11607
|
-
},
|
|
11607
|
+
}, Tg = {
|
|
11608
11608
|
scope: "string",
|
|
11609
11609
|
begin: /\$"/,
|
|
11610
11610
|
end: /"/,
|
|
@@ -11614,7 +11614,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11614
11614
|
e.BACKSLASH_ESCAPE,
|
|
11615
11615
|
Q
|
|
11616
11616
|
]
|
|
11617
|
-
},
|
|
11617
|
+
}, Eg = {
|
|
11618
11618
|
scope: "string",
|
|
11619
11619
|
begin: /(\$@|@\$)"/,
|
|
11620
11620
|
end: /"/,
|
|
@@ -11625,7 +11625,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11625
11625
|
e.BACKSLASH_ESCAPE,
|
|
11626
11626
|
Q
|
|
11627
11627
|
]
|
|
11628
|
-
},
|
|
11628
|
+
}, Dg = {
|
|
11629
11629
|
scope: "string",
|
|
11630
11630
|
begin: /\$"""/,
|
|
11631
11631
|
end: /"""/,
|
|
@@ -11640,9 +11640,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11640
11640
|
match: o(/'/, l(/[^\\']/, /\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8})/), /'/)
|
|
11641
11641
|
};
|
|
11642
11642
|
Q.contains = [
|
|
11643
|
-
Dg,
|
|
11644
11643
|
Eg,
|
|
11645
11644
|
Tg,
|
|
11645
|
+
wg,
|
|
11646
11646
|
J,
|
|
11647
11647
|
$,
|
|
11648
11648
|
i,
|
|
@@ -11655,12 +11655,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11655
11655
|
O,
|
|
11656
11656
|
j
|
|
11657
11657
|
];
|
|
11658
|
-
let
|
|
11659
|
-
Og,
|
|
11658
|
+
let Og = { variants: [
|
|
11660
11659
|
Dg,
|
|
11661
11660
|
Eg,
|
|
11662
|
-
Z,
|
|
11663
11661
|
Tg,
|
|
11662
|
+
Z,
|
|
11663
|
+
wg,
|
|
11664
11664
|
J,
|
|
11665
11665
|
$
|
|
11666
11666
|
] };
|
|
@@ -11672,7 +11672,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11672
11672
|
classNameAliases: { "computation-expression": "keyword" },
|
|
11673
11673
|
contains: [
|
|
11674
11674
|
i,
|
|
11675
|
-
|
|
11675
|
+
Og,
|
|
11676
11676
|
_,
|
|
11677
11677
|
T,
|
|
11678
11678
|
H,
|
|
@@ -11684,7 +11684,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11684
11684
|
contains: [
|
|
11685
11685
|
T,
|
|
11686
11686
|
Z,
|
|
11687
|
-
|
|
11687
|
+
wg,
|
|
11688
11688
|
J,
|
|
11689
11689
|
$,
|
|
11690
11690
|
q
|
|
@@ -13866,7 +13866,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13866
13866
|
keywords: E,
|
|
13867
13867
|
contains: ["self"].concat(q)
|
|
13868
13868
|
});
|
|
13869
|
-
let J = [].concat(K, L.contains),
|
|
13869
|
+
let J = [].concat(K, L.contains), wg = J.concat([{
|
|
13870
13870
|
begin: /(\s*)\(/,
|
|
13871
13871
|
end: /\)/,
|
|
13872
13872
|
keywords: E,
|
|
@@ -13878,7 +13878,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13878
13878
|
excludeBegin: !0,
|
|
13879
13879
|
excludeEnd: !0,
|
|
13880
13880
|
keywords: E,
|
|
13881
|
-
contains:
|
|
13881
|
+
contains: wg
|
|
13882
13882
|
}, Q = { variants: [{
|
|
13883
13883
|
match: [
|
|
13884
13884
|
/class/,
|
|
@@ -13905,17 +13905,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13905
13905
|
1: "keyword",
|
|
13906
13906
|
3: "title.class"
|
|
13907
13907
|
}
|
|
13908
|
-
}] },
|
|
13908
|
+
}] }, Tg = {
|
|
13909
13909
|
relevance: 0,
|
|
13910
13910
|
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]*)*/),
|
|
13911
13911
|
className: "title.class",
|
|
13912
13912
|
keywords: { _: [...o, ...s] }
|
|
13913
|
-
},
|
|
13913
|
+
}, Eg = {
|
|
13914
13914
|
label: "use_strict",
|
|
13915
13915
|
className: "meta",
|
|
13916
13916
|
relevance: 10,
|
|
13917
13917
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
13918
|
-
},
|
|
13918
|
+
}, Dg = {
|
|
13919
13919
|
variants: [{ match: [
|
|
13920
13920
|
/function/,
|
|
13921
13921
|
/\s+/,
|
|
@@ -13934,25 +13934,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13934
13934
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
13935
13935
|
className: "variable.constant"
|
|
13936
13936
|
};
|
|
13937
|
-
function
|
|
13937
|
+
function Og(e) {
|
|
13938
13938
|
return n.concat("(?!", e.join("|"), ")");
|
|
13939
13939
|
}
|
|
13940
|
-
let
|
|
13941
|
-
match: n.concat(/\b/,
|
|
13940
|
+
let kg = {
|
|
13941
|
+
match: n.concat(/\b/, Og([
|
|
13942
13942
|
...l,
|
|
13943
13943
|
"super",
|
|
13944
13944
|
"import"
|
|
13945
13945
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
13946
13946
|
className: "title.function",
|
|
13947
13947
|
relevance: 0
|
|
13948
|
-
},
|
|
13948
|
+
}, Ag = {
|
|
13949
13949
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
13950
13950
|
end: g,
|
|
13951
13951
|
excludeBegin: !0,
|
|
13952
13952
|
keywords: "prototype",
|
|
13953
13953
|
className: "property",
|
|
13954
13954
|
relevance: 0
|
|
13955
|
-
},
|
|
13955
|
+
}, jg = {
|
|
13956
13956
|
match: [
|
|
13957
13957
|
/get|set/,
|
|
13958
13958
|
/\s+/,
|
|
@@ -13964,7 +13964,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13964
13964
|
3: "title.function"
|
|
13965
13965
|
},
|
|
13966
13966
|
contains: [{ begin: /\(\)/ }, Z]
|
|
13967
|
-
},
|
|
13967
|
+
}, Mg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Ng = {
|
|
13968
13968
|
match: [
|
|
13969
13969
|
/const|var|let/,
|
|
13970
13970
|
/\s+/,
|
|
@@ -13972,7 +13972,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13972
13972
|
/\s*/,
|
|
13973
13973
|
/=\s*/,
|
|
13974
13974
|
/(async\s*)?/,
|
|
13975
|
-
n.lookahead(
|
|
13975
|
+
n.lookahead(Mg)
|
|
13976
13976
|
],
|
|
13977
13977
|
keywords: "async",
|
|
13978
13978
|
className: {
|
|
@@ -13991,8 +13991,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13991
13991
|
],
|
|
13992
13992
|
keywords: E,
|
|
13993
13993
|
exports: {
|
|
13994
|
-
PARAMS_CONTAINS:
|
|
13995
|
-
CLASS_REFERENCE:
|
|
13994
|
+
PARAMS_CONTAINS: wg,
|
|
13995
|
+
CLASS_REFERENCE: Tg
|
|
13996
13996
|
},
|
|
13997
13997
|
illegal: /#(?![$_A-z])/,
|
|
13998
13998
|
contains: [
|
|
@@ -14001,7 +14001,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14001
14001
|
binary: "node",
|
|
14002
14002
|
relevance: 5
|
|
14003
14003
|
}),
|
|
14004
|
-
|
|
14004
|
+
Eg,
|
|
14005
14005
|
e.APOS_STRING_MODE,
|
|
14006
14006
|
e.QUOTE_STRING_MODE,
|
|
14007
14007
|
z,
|
|
@@ -14011,13 +14011,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14011
14011
|
K,
|
|
14012
14012
|
{ match: /\$\d+/ },
|
|
14013
14013
|
I,
|
|
14014
|
-
|
|
14014
|
+
Tg,
|
|
14015
14015
|
{
|
|
14016
14016
|
scope: "attr",
|
|
14017
14017
|
match: g + n.lookahead(":"),
|
|
14018
14018
|
relevance: 0
|
|
14019
14019
|
},
|
|
14020
|
-
|
|
14020
|
+
Ng,
|
|
14021
14021
|
{
|
|
14022
14022
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
14023
14023
|
keywords: "return throw case",
|
|
@@ -14027,7 +14027,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14027
14027
|
e.REGEXP_MODE,
|
|
14028
14028
|
{
|
|
14029
14029
|
className: "function",
|
|
14030
|
-
begin:
|
|
14030
|
+
begin: Mg,
|
|
14031
14031
|
returnBegin: !0,
|
|
14032
14032
|
end: "\\s*=>",
|
|
14033
14033
|
contains: [{
|
|
@@ -14048,7 +14048,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14048
14048
|
excludeBegin: !0,
|
|
14049
14049
|
excludeEnd: !0,
|
|
14050
14050
|
keywords: E,
|
|
14051
|
-
contains:
|
|
14051
|
+
contains: wg
|
|
14052
14052
|
}
|
|
14053
14053
|
]
|
|
14054
14054
|
}]
|
|
@@ -14084,7 +14084,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14084
14084
|
}
|
|
14085
14085
|
]
|
|
14086
14086
|
},
|
|
14087
|
-
|
|
14087
|
+
Dg,
|
|
14088
14088
|
{ beginKeywords: "while if switch catch for" },
|
|
14089
14089
|
{
|
|
14090
14090
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
@@ -14099,7 +14099,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14099
14099
|
match: /\.\.\./,
|
|
14100
14100
|
relevance: 0
|
|
14101
14101
|
},
|
|
14102
|
-
|
|
14102
|
+
Ag,
|
|
14103
14103
|
{
|
|
14104
14104
|
match: "\\$" + g,
|
|
14105
14105
|
relevance: 0
|
|
@@ -14109,10 +14109,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14109
14109
|
className: { 1: "title.function" },
|
|
14110
14110
|
contains: [Z]
|
|
14111
14111
|
},
|
|
14112
|
-
|
|
14112
|
+
kg,
|
|
14113
14113
|
$,
|
|
14114
14114
|
Q,
|
|
14115
|
-
|
|
14115
|
+
jg,
|
|
14116
14116
|
{ match: /\$[(.]/ }
|
|
14117
14117
|
]
|
|
14118
14118
|
};
|
|
@@ -17634,7 +17634,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17634
17634
|
T,
|
|
17635
17635
|
E,
|
|
17636
17636
|
z
|
|
17637
|
-
],
|
|
17637
|
+
], wg = {
|
|
17638
17638
|
begin: n.concat(/#\[\s*\\?/, n.either(a, o)),
|
|
17639
17639
|
beginScope: "meta",
|
|
17640
17640
|
end: /]/,
|
|
@@ -17664,7 +17664,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17664
17664
|
case_insensitive: !1,
|
|
17665
17665
|
keywords: I,
|
|
17666
17666
|
contains: [
|
|
17667
|
-
|
|
17667
|
+
wg,
|
|
17668
17668
|
e.HASH_COMMENT_MODE,
|
|
17669
17669
|
e.COMMENT("//", "$"),
|
|
17670
17670
|
e.COMMENT("/\\*", "\\*/", { contains: [{
|
|
@@ -17727,7 +17727,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17727
17727
|
keywords: I,
|
|
17728
17728
|
contains: [
|
|
17729
17729
|
"self",
|
|
17730
|
-
|
|
17730
|
+
wg,
|
|
17731
17731
|
s,
|
|
17732
17732
|
H,
|
|
17733
17733
|
e.C_BLOCK_COMMENT_MODE,
|
|
@@ -21076,7 +21076,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21076
21076
|
$pattern: s(/\b\w+/, /#\w+/),
|
|
21077
21077
|
keyword: K.concat(T),
|
|
21078
21078
|
literal: _
|
|
21079
|
-
},
|
|
21079
|
+
}, wg = [
|
|
21080
21080
|
O,
|
|
21081
21081
|
I,
|
|
21082
21082
|
q
|
|
@@ -21089,84 +21089,84 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21089
21089
|
}], Q = {
|
|
21090
21090
|
match: /->/,
|
|
21091
21091
|
relevance: 0
|
|
21092
|
-
},
|
|
21092
|
+
}, Tg = [Q, {
|
|
21093
21093
|
className: "operator",
|
|
21094
21094
|
relevance: 0,
|
|
21095
21095
|
variants: [{ match: j }, { match: `\\.(\\.|${k})+` }]
|
|
21096
|
-
}],
|
|
21096
|
+
}], Eg = "([0-9]_*)+", Dg = "([0-9a-fA-F]_*)+", $ = {
|
|
21097
21097
|
className: "number",
|
|
21098
21098
|
relevance: 0,
|
|
21099
21099
|
variants: [
|
|
21100
|
-
{ match: `\\b(${
|
|
21101
|
-
{ match: `\\b0x(${
|
|
21100
|
+
{ match: `\\b(${Eg})(\\.(${Eg}))?([eE][+-]?(${Eg}))?\\b` },
|
|
21101
|
+
{ match: `\\b0x(${Dg})(\\.(${Dg}))?([pP][+-]?(${Eg}))?\\b` },
|
|
21102
21102
|
{ match: /\b0o([0-7]_*)+\b/ },
|
|
21103
21103
|
{ match: /\b0b([01]_*)+\b/ }
|
|
21104
21104
|
]
|
|
21105
|
-
},
|
|
21105
|
+
}, Og = (e = "") => ({
|
|
21106
21106
|
className: "subst",
|
|
21107
21107
|
variants: [{ match: a(/\\/, e, /[0\\tnr"']/) }, { match: a(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) }]
|
|
21108
|
-
}),
|
|
21108
|
+
}), kg = (e = "") => ({
|
|
21109
21109
|
className: "subst",
|
|
21110
21110
|
match: a(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
|
|
21111
|
-
}),
|
|
21111
|
+
}), Ag = (e = "") => ({
|
|
21112
21112
|
className: "subst",
|
|
21113
21113
|
label: "interpol",
|
|
21114
21114
|
begin: a(/\\/, e, /\(/),
|
|
21115
21115
|
end: /\)/
|
|
21116
|
-
}),
|
|
21116
|
+
}), jg = (e = "") => ({
|
|
21117
21117
|
begin: a(e, /"""/),
|
|
21118
21118
|
end: a(/"""/, e),
|
|
21119
21119
|
contains: [
|
|
21120
|
+
Og(e),
|
|
21120
21121
|
kg(e),
|
|
21121
|
-
Ag(e)
|
|
21122
|
-
jg(e)
|
|
21122
|
+
Ag(e)
|
|
21123
21123
|
]
|
|
21124
|
-
}),
|
|
21124
|
+
}), Mg = (e = "") => ({
|
|
21125
21125
|
begin: a(e, /"/),
|
|
21126
21126
|
end: a(/"/, e),
|
|
21127
|
-
contains: [
|
|
21128
|
-
}),
|
|
21127
|
+
contains: [Og(e), Ag(e)]
|
|
21128
|
+
}), Ng = {
|
|
21129
21129
|
className: "string",
|
|
21130
21130
|
variants: [
|
|
21131
|
+
jg(),
|
|
21132
|
+
jg("#"),
|
|
21133
|
+
jg("##"),
|
|
21134
|
+
jg("###"),
|
|
21131
21135
|
Mg(),
|
|
21132
21136
|
Mg("#"),
|
|
21133
21137
|
Mg("##"),
|
|
21134
|
-
Mg("###")
|
|
21135
|
-
Ng(),
|
|
21136
|
-
Ng("#"),
|
|
21137
|
-
Ng("##"),
|
|
21138
|
-
Ng("###")
|
|
21138
|
+
Mg("###")
|
|
21139
21139
|
]
|
|
21140
|
-
},
|
|
21140
|
+
}, Pg = [e.BACKSLASH_ESCAPE, {
|
|
21141
21141
|
begin: /\[/,
|
|
21142
21142
|
end: /\]/,
|
|
21143
21143
|
relevance: 0,
|
|
21144
21144
|
contains: [e.BACKSLASH_ESCAPE]
|
|
21145
|
-
}],
|
|
21145
|
+
}], Fg = {
|
|
21146
21146
|
begin: /\/[^\s](?=[^/\n]*\/)/,
|
|
21147
21147
|
end: /\//,
|
|
21148
|
-
contains:
|
|
21149
|
-
},
|
|
21148
|
+
contains: Pg
|
|
21149
|
+
}, Ig = (e) => {
|
|
21150
21150
|
let n = a(e, /\//), r = a(/\//, e);
|
|
21151
21151
|
return {
|
|
21152
21152
|
begin: n,
|
|
21153
21153
|
end: r,
|
|
21154
|
-
contains: [...
|
|
21154
|
+
contains: [...Pg, {
|
|
21155
21155
|
scope: "comment",
|
|
21156
21156
|
begin: `#(?!.*${r})`,
|
|
21157
21157
|
end: /$/
|
|
21158
21158
|
}]
|
|
21159
21159
|
};
|
|
21160
|
-
},
|
|
21160
|
+
}, Lg = {
|
|
21161
21161
|
scope: "regexp",
|
|
21162
21162
|
variants: [
|
|
21163
|
-
|
|
21164
|
-
|
|
21165
|
-
|
|
21166
|
-
|
|
21163
|
+
Ig("###"),
|
|
21164
|
+
Ig("##"),
|
|
21165
|
+
Ig("#"),
|
|
21166
|
+
Fg
|
|
21167
21167
|
]
|
|
21168
|
-
},
|
|
21169
|
-
|
|
21168
|
+
}, Rg = { match: a(/`/, z, /`/) }, zg = [
|
|
21169
|
+
Rg,
|
|
21170
21170
|
{
|
|
21171
21171
|
className: "variable",
|
|
21172
21172
|
match: /\$\d+/
|
|
@@ -21175,7 +21175,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21175
21175
|
className: "variable",
|
|
21176
21176
|
match: `\\$${L}+`
|
|
21177
21177
|
}
|
|
21178
|
-
],
|
|
21178
|
+
], Bg = [
|
|
21179
21179
|
{
|
|
21180
21180
|
match: /(@|#(un)?)available/,
|
|
21181
21181
|
scope: "keyword",
|
|
@@ -21184,9 +21184,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21184
21184
|
end: /\)/,
|
|
21185
21185
|
keywords: G,
|
|
21186
21186
|
contains: [
|
|
21187
|
-
...
|
|
21187
|
+
...Tg,
|
|
21188
21188
|
$,
|
|
21189
|
-
|
|
21189
|
+
Ng
|
|
21190
21190
|
]
|
|
21191
21191
|
}] }
|
|
21192
21192
|
},
|
|
@@ -21198,7 +21198,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21198
21198
|
scope: "meta",
|
|
21199
21199
|
match: a(/@/, z)
|
|
21200
21200
|
}
|
|
21201
|
-
],
|
|
21201
|
+
], Vg = {
|
|
21202
21202
|
match: i(/\b[A-Z]/),
|
|
21203
21203
|
relevance: 0,
|
|
21204
21204
|
contains: [
|
|
@@ -21224,20 +21224,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21224
21224
|
relevance: 0
|
|
21225
21225
|
}
|
|
21226
21226
|
]
|
|
21227
|
-
},
|
|
21227
|
+
}, Hg = {
|
|
21228
21228
|
begin: /</,
|
|
21229
21229
|
end: />/,
|
|
21230
21230
|
keywords: J,
|
|
21231
21231
|
contains: [
|
|
21232
21232
|
...o,
|
|
21233
|
-
...
|
|
21234
|
-
...
|
|
21233
|
+
...wg,
|
|
21234
|
+
...Bg,
|
|
21235
21235
|
Q,
|
|
21236
|
-
|
|
21236
|
+
Vg
|
|
21237
21237
|
]
|
|
21238
21238
|
};
|
|
21239
|
-
|
|
21240
|
-
let
|
|
21239
|
+
Vg.contains.push(Hg);
|
|
21240
|
+
let Ug = {
|
|
21241
21241
|
begin: /\(/,
|
|
21242
21242
|
end: /\)/,
|
|
21243
21243
|
relevance: 0,
|
|
@@ -21250,22 +21250,22 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21250
21250
|
relevance: 0
|
|
21251
21251
|
},
|
|
21252
21252
|
...o,
|
|
21253
|
-
|
|
21254
|
-
...
|
|
21253
|
+
Lg,
|
|
21254
|
+
...wg,
|
|
21255
21255
|
...Z,
|
|
21256
|
-
...
|
|
21256
|
+
...Tg,
|
|
21257
21257
|
$,
|
|
21258
|
-
|
|
21258
|
+
Ng,
|
|
21259
|
+
...zg,
|
|
21259
21260
|
...Bg,
|
|
21260
|
-
|
|
21261
|
-
Hg
|
|
21261
|
+
Vg
|
|
21262
21262
|
]
|
|
21263
|
-
},
|
|
21263
|
+
}, Wg = {
|
|
21264
21264
|
begin: /</,
|
|
21265
21265
|
end: />/,
|
|
21266
21266
|
keywords: "repeat each",
|
|
21267
|
-
contains: [...o,
|
|
21268
|
-
},
|
|
21267
|
+
contains: [...o, Vg]
|
|
21268
|
+
}, Gg = {
|
|
21269
21269
|
begin: /\(/,
|
|
21270
21270
|
end: /\)/,
|
|
21271
21271
|
keywords: J,
|
|
@@ -21283,42 +21283,42 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21283
21283
|
}]
|
|
21284
21284
|
},
|
|
21285
21285
|
...o,
|
|
21286
|
+
...wg,
|
|
21286
21287
|
...Tg,
|
|
21287
|
-
...Eg,
|
|
21288
21288
|
$,
|
|
21289
|
-
|
|
21290
|
-
...
|
|
21291
|
-
|
|
21292
|
-
|
|
21289
|
+
Ng,
|
|
21290
|
+
...Bg,
|
|
21291
|
+
Vg,
|
|
21292
|
+
Ug
|
|
21293
21293
|
],
|
|
21294
21294
|
endsParent: !0,
|
|
21295
21295
|
illegal: /["']/
|
|
21296
|
-
},
|
|
21296
|
+
}, Kg = {
|
|
21297
21297
|
match: [
|
|
21298
21298
|
/(func|macro)/,
|
|
21299
21299
|
/\s+/,
|
|
21300
|
-
s(
|
|
21300
|
+
s(Rg.match, z, j)
|
|
21301
21301
|
],
|
|
21302
21302
|
className: {
|
|
21303
21303
|
1: "keyword",
|
|
21304
21304
|
3: "title.function"
|
|
21305
21305
|
},
|
|
21306
21306
|
contains: [
|
|
21307
|
+
Wg,
|
|
21307
21308
|
Gg,
|
|
21308
|
-
Kg,
|
|
21309
21309
|
n
|
|
21310
21310
|
],
|
|
21311
21311
|
illegal: [/\[/, /%/]
|
|
21312
|
-
},
|
|
21312
|
+
}, qg = {
|
|
21313
21313
|
match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
|
|
21314
21314
|
className: { 1: "keyword" },
|
|
21315
21315
|
contains: [
|
|
21316
|
+
Wg,
|
|
21316
21317
|
Gg,
|
|
21317
|
-
Kg,
|
|
21318
21318
|
n
|
|
21319
21319
|
],
|
|
21320
21320
|
illegal: /\[|%/
|
|
21321
|
-
},
|
|
21321
|
+
}, Jg = {
|
|
21322
21322
|
match: [
|
|
21323
21323
|
/operator/,
|
|
21324
21324
|
/\s+/,
|
|
@@ -21328,7 +21328,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21328
21328
|
1: "keyword",
|
|
21329
21329
|
3: "title"
|
|
21330
21330
|
}
|
|
21331
|
-
},
|
|
21331
|
+
}, Yg = {
|
|
21332
21332
|
begin: [
|
|
21333
21333
|
/precedencegroup/,
|
|
21334
21334
|
/\s+/,
|
|
@@ -21338,10 +21338,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21338
21338
|
1: "keyword",
|
|
21339
21339
|
3: "title"
|
|
21340
21340
|
},
|
|
21341
|
-
contains: [
|
|
21341
|
+
contains: [Vg],
|
|
21342
21342
|
keywords: [...v, ..._],
|
|
21343
21343
|
end: /}/
|
|
21344
|
-
},
|
|
21344
|
+
}, Xg = {
|
|
21345
21345
|
match: [
|
|
21346
21346
|
/class\b/,
|
|
21347
21347
|
/\s+/,
|
|
@@ -21354,7 +21354,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21354
21354
|
3: "keyword",
|
|
21355
21355
|
5: "title.function"
|
|
21356
21356
|
}
|
|
21357
|
-
},
|
|
21357
|
+
}, Zg = {
|
|
21358
21358
|
match: [
|
|
21359
21359
|
/class\b/,
|
|
21360
21360
|
/\s+/,
|
|
@@ -21364,7 +21364,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21364
21364
|
1: "keyword",
|
|
21365
21365
|
3: "keyword"
|
|
21366
21366
|
}
|
|
21367
|
-
},
|
|
21367
|
+
}, Qg = {
|
|
21368
21368
|
begin: [
|
|
21369
21369
|
/(struct|protocol|class|extension|enum|actor)/,
|
|
21370
21370
|
/\s+/,
|
|
@@ -21377,8 +21377,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21377
21377
|
},
|
|
21378
21378
|
keywords: J,
|
|
21379
21379
|
contains: [
|
|
21380
|
-
|
|
21381
|
-
...
|
|
21380
|
+
Wg,
|
|
21381
|
+
...wg,
|
|
21382
21382
|
{
|
|
21383
21383
|
begin: /:/,
|
|
21384
21384
|
end: /\{/,
|
|
@@ -21386,21 +21386,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21386
21386
|
contains: [{
|
|
21387
21387
|
scope: "title.class.inherited",
|
|
21388
21388
|
match: B
|
|
21389
|
-
}, ...
|
|
21389
|
+
}, ...wg],
|
|
21390
21390
|
relevance: 0
|
|
21391
21391
|
}
|
|
21392
21392
|
]
|
|
21393
21393
|
};
|
|
21394
|
-
for (let e of
|
|
21394
|
+
for (let e of Ng.variants) {
|
|
21395
21395
|
let n = e.contains.find((e) => e.label === "interpol");
|
|
21396
21396
|
n.keywords = J;
|
|
21397
21397
|
let r = [
|
|
21398
|
-
...
|
|
21398
|
+
...wg,
|
|
21399
21399
|
...Z,
|
|
21400
|
-
...
|
|
21400
|
+
...Tg,
|
|
21401
21401
|
$,
|
|
21402
|
-
|
|
21403
|
-
...
|
|
21402
|
+
Ng,
|
|
21403
|
+
...zg
|
|
21404
21404
|
];
|
|
21405
21405
|
n.contains = [...r, {
|
|
21406
21406
|
begin: /\(/,
|
|
@@ -21413,29 +21413,29 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21413
21413
|
keywords: J,
|
|
21414
21414
|
contains: [
|
|
21415
21415
|
...o,
|
|
21416
|
+
Kg,
|
|
21416
21417
|
qg,
|
|
21417
|
-
|
|
21418
|
+
Xg,
|
|
21418
21419
|
Zg,
|
|
21419
21420
|
Qg,
|
|
21420
|
-
|
|
21421
|
+
Jg,
|
|
21421
21422
|
Yg,
|
|
21422
|
-
Xg,
|
|
21423
21423
|
{
|
|
21424
21424
|
beginKeywords: "import",
|
|
21425
21425
|
end: /$/,
|
|
21426
21426
|
contains: [...o],
|
|
21427
21427
|
relevance: 0
|
|
21428
21428
|
},
|
|
21429
|
-
|
|
21430
|
-
...
|
|
21429
|
+
Lg,
|
|
21430
|
+
...wg,
|
|
21431
21431
|
...Z,
|
|
21432
|
-
...
|
|
21432
|
+
...Tg,
|
|
21433
21433
|
$,
|
|
21434
|
-
|
|
21434
|
+
Ng,
|
|
21435
|
+
...zg,
|
|
21435
21436
|
...Bg,
|
|
21436
|
-
|
|
21437
|
-
|
|
21438
|
-
Wg
|
|
21437
|
+
Vg,
|
|
21438
|
+
Ug
|
|
21439
21439
|
]
|
|
21440
21440
|
};
|
|
21441
21441
|
}
|
|
@@ -22103,7 +22103,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22103
22103
|
keywords: E,
|
|
22104
22104
|
contains: ["self"].concat(q)
|
|
22105
22105
|
});
|
|
22106
|
-
let J = [].concat(K, L.contains),
|
|
22106
|
+
let J = [].concat(K, L.contains), wg = J.concat([{
|
|
22107
22107
|
begin: /(\s*)\(/,
|
|
22108
22108
|
end: /\)/,
|
|
22109
22109
|
keywords: E,
|
|
@@ -22115,7 +22115,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22115
22115
|
excludeBegin: !0,
|
|
22116
22116
|
excludeEnd: !0,
|
|
22117
22117
|
keywords: E,
|
|
22118
|
-
contains:
|
|
22118
|
+
contains: wg
|
|
22119
22119
|
}, Q = { variants: [{
|
|
22120
22120
|
match: [
|
|
22121
22121
|
/class/,
|
|
@@ -22142,17 +22142,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22142
22142
|
1: "keyword",
|
|
22143
22143
|
3: "title.class"
|
|
22144
22144
|
}
|
|
22145
|
-
}] },
|
|
22145
|
+
}] }, Tg = {
|
|
22146
22146
|
relevance: 0,
|
|
22147
22147
|
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]*)*/),
|
|
22148
22148
|
className: "title.class",
|
|
22149
22149
|
keywords: { _: [...o, ...s] }
|
|
22150
|
-
},
|
|
22150
|
+
}, Eg = {
|
|
22151
22151
|
label: "use_strict",
|
|
22152
22152
|
className: "meta",
|
|
22153
22153
|
relevance: 10,
|
|
22154
22154
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
22155
|
-
},
|
|
22155
|
+
}, Dg = {
|
|
22156
22156
|
variants: [{ match: [
|
|
22157
22157
|
/function/,
|
|
22158
22158
|
/\s+/,
|
|
@@ -22171,25 +22171,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22171
22171
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
22172
22172
|
className: "variable.constant"
|
|
22173
22173
|
};
|
|
22174
|
-
function
|
|
22174
|
+
function Og(e) {
|
|
22175
22175
|
return n.concat("(?!", e.join("|"), ")");
|
|
22176
22176
|
}
|
|
22177
|
-
let
|
|
22178
|
-
match: n.concat(/\b/,
|
|
22177
|
+
let kg = {
|
|
22178
|
+
match: n.concat(/\b/, Og([
|
|
22179
22179
|
...l,
|
|
22180
22180
|
"super",
|
|
22181
22181
|
"import"
|
|
22182
22182
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
22183
22183
|
className: "title.function",
|
|
22184
22184
|
relevance: 0
|
|
22185
|
-
},
|
|
22185
|
+
}, Ag = {
|
|
22186
22186
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
22187
22187
|
end: g,
|
|
22188
22188
|
excludeBegin: !0,
|
|
22189
22189
|
keywords: "prototype",
|
|
22190
22190
|
className: "property",
|
|
22191
22191
|
relevance: 0
|
|
22192
|
-
},
|
|
22192
|
+
}, jg = {
|
|
22193
22193
|
match: [
|
|
22194
22194
|
/get|set/,
|
|
22195
22195
|
/\s+/,
|
|
@@ -22201,7 +22201,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22201
22201
|
3: "title.function"
|
|
22202
22202
|
},
|
|
22203
22203
|
contains: [{ begin: /\(\)/ }, Z]
|
|
22204
|
-
},
|
|
22204
|
+
}, Mg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Ng = {
|
|
22205
22205
|
match: [
|
|
22206
22206
|
/const|var|let/,
|
|
22207
22207
|
/\s+/,
|
|
@@ -22209,7 +22209,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22209
22209
|
/\s*/,
|
|
22210
22210
|
/=\s*/,
|
|
22211
22211
|
/(async\s*)?/,
|
|
22212
|
-
n.lookahead(
|
|
22212
|
+
n.lookahead(Mg)
|
|
22213
22213
|
],
|
|
22214
22214
|
keywords: "async",
|
|
22215
22215
|
className: {
|
|
@@ -22228,8 +22228,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22228
22228
|
],
|
|
22229
22229
|
keywords: E,
|
|
22230
22230
|
exports: {
|
|
22231
|
-
PARAMS_CONTAINS:
|
|
22232
|
-
CLASS_REFERENCE:
|
|
22231
|
+
PARAMS_CONTAINS: wg,
|
|
22232
|
+
CLASS_REFERENCE: Tg
|
|
22233
22233
|
},
|
|
22234
22234
|
illegal: /#(?![$_A-z])/,
|
|
22235
22235
|
contains: [
|
|
@@ -22238,7 +22238,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22238
22238
|
binary: "node",
|
|
22239
22239
|
relevance: 5
|
|
22240
22240
|
}),
|
|
22241
|
-
|
|
22241
|
+
Eg,
|
|
22242
22242
|
e.APOS_STRING_MODE,
|
|
22243
22243
|
e.QUOTE_STRING_MODE,
|
|
22244
22244
|
z,
|
|
@@ -22248,13 +22248,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22248
22248
|
K,
|
|
22249
22249
|
{ match: /\$\d+/ },
|
|
22250
22250
|
I,
|
|
22251
|
-
|
|
22251
|
+
Tg,
|
|
22252
22252
|
{
|
|
22253
22253
|
scope: "attr",
|
|
22254
22254
|
match: g + n.lookahead(":"),
|
|
22255
22255
|
relevance: 0
|
|
22256
22256
|
},
|
|
22257
|
-
|
|
22257
|
+
Ng,
|
|
22258
22258
|
{
|
|
22259
22259
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
22260
22260
|
keywords: "return throw case",
|
|
@@ -22264,7 +22264,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22264
22264
|
e.REGEXP_MODE,
|
|
22265
22265
|
{
|
|
22266
22266
|
className: "function",
|
|
22267
|
-
begin:
|
|
22267
|
+
begin: Mg,
|
|
22268
22268
|
returnBegin: !0,
|
|
22269
22269
|
end: "\\s*=>",
|
|
22270
22270
|
contains: [{
|
|
@@ -22285,7 +22285,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22285
22285
|
excludeBegin: !0,
|
|
22286
22286
|
excludeEnd: !0,
|
|
22287
22287
|
keywords: E,
|
|
22288
|
-
contains:
|
|
22288
|
+
contains: wg
|
|
22289
22289
|
}
|
|
22290
22290
|
]
|
|
22291
22291
|
}]
|
|
@@ -22321,7 +22321,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22321
22321
|
}
|
|
22322
22322
|
]
|
|
22323
22323
|
},
|
|
22324
|
-
|
|
22324
|
+
Dg,
|
|
22325
22325
|
{ beginKeywords: "while if switch catch for" },
|
|
22326
22326
|
{
|
|
22327
22327
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
@@ -22336,7 +22336,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22336
22336
|
match: /\.\.\./,
|
|
22337
22337
|
relevance: 0
|
|
22338
22338
|
},
|
|
22339
|
-
|
|
22339
|
+
Ag,
|
|
22340
22340
|
{
|
|
22341
22341
|
match: "\\$" + g,
|
|
22342
22342
|
relevance: 0
|
|
@@ -22346,10 +22346,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22346
22346
|
className: { 1: "title.function" },
|
|
22347
22347
|
contains: [Z]
|
|
22348
22348
|
},
|
|
22349
|
-
|
|
22349
|
+
kg,
|
|
22350
22350
|
$,
|
|
22351
22351
|
Q,
|
|
22352
|
-
|
|
22352
|
+
jg,
|
|
22353
22353
|
{ match: /\$[(.]/ }
|
|
22354
22354
|
]
|
|
22355
22355
|
};
|
|
@@ -24536,7 +24536,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24536
24536
|
}, g();
|
|
24537
24537
|
let J = createMutationObserver(r, () => {
|
|
24538
24538
|
H && setSelectionToDOM(K, r, d, q);
|
|
24539
|
-
}),
|
|
24539
|
+
}), wg = () => {
|
|
24540
24540
|
d = takeSelectionSnapshot(r, q);
|
|
24541
24541
|
}, Z = () => {
|
|
24542
24542
|
let e = J._flush();
|
|
@@ -24561,13 +24561,13 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24561
24561
|
r && (l(n(r[0])), d = r[1]);
|
|
24562
24562
|
}
|
|
24563
24563
|
}
|
|
24564
|
-
},
|
|
24564
|
+
}, Tg = () => {
|
|
24565
24565
|
B || Z();
|
|
24566
|
-
},
|
|
24566
|
+
}, Eg = (e) => {
|
|
24567
24567
|
e.preventDefault();
|
|
24568
24568
|
let n = e.inputType;
|
|
24569
24569
|
if (n.startsWith("format") || n === "historyUndo" || n === "historyRedo") return;
|
|
24570
|
-
B ? J._record(!0) :
|
|
24570
|
+
B ? J._record(!0) : wg();
|
|
24571
24571
|
let i = e.getTargetRanges()[0];
|
|
24572
24572
|
if (i) {
|
|
24573
24573
|
let a = serializeRange(r, q, i), o = n === "insertParagraph" || n === "insertLineBreak" ? "\n" : e.data;
|
|
@@ -24578,31 +24578,31 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24578
24578
|
z ||= new Transaction().select(...d), comparePosition(...a) !== 0 && z.delete(...a), o && z.insert(a[0], stringToDoc(o));
|
|
24579
24579
|
}
|
|
24580
24580
|
B || Z();
|
|
24581
|
-
},
|
|
24582
|
-
B ||
|
|
24581
|
+
}, Dg = () => {
|
|
24582
|
+
B || wg(), B = !0;
|
|
24583
24583
|
}, $ = () => {
|
|
24584
24584
|
Z();
|
|
24585
|
+
}, Og = () => {
|
|
24586
|
+
H = !0, wg();
|
|
24585
24587
|
}, kg = () => {
|
|
24586
|
-
H = !0, Tg();
|
|
24587
|
-
}, Ag = () => {
|
|
24588
24588
|
H = !1;
|
|
24589
|
-
},
|
|
24589
|
+
}, Ag = () => {
|
|
24590
24590
|
if (L) {
|
|
24591
24591
|
L = !1;
|
|
24592
24592
|
return;
|
|
24593
24593
|
}
|
|
24594
|
-
H && !B && !G &&
|
|
24594
|
+
H && !B && !G && wg();
|
|
24595
|
+
}, jg = (e) => {
|
|
24596
|
+
wg(), comparePosition(...d) !== 0 && i(e, sliceDoc(_(), ...range(d)), r);
|
|
24595
24597
|
}, Mg = (e) => {
|
|
24596
|
-
|
|
24598
|
+
e.preventDefault(), jg(e.clipboardData);
|
|
24597
24599
|
}, Ng = (e) => {
|
|
24598
|
-
e.preventDefault(),
|
|
24600
|
+
e.preventDefault(), m || (jg(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24599
24601
|
}, Pg = (e) => {
|
|
24600
|
-
e.preventDefault(), m || (Mg(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24601
|
-
}, Fg = (e) => {
|
|
24602
24602
|
e.preventDefault();
|
|
24603
24603
|
let [n, r] = range(d);
|
|
24604
24604
|
E(new Transaction().delete(n, r).insert(n, a(e.clipboardData, q)));
|
|
24605
|
-
},
|
|
24605
|
+
}, Fg = (e) => {
|
|
24606
24606
|
e.preventDefault();
|
|
24607
24607
|
let n = e.dataTransfer, i = getPointedCaretPosition(K, r, e, q);
|
|
24608
24608
|
if (n && i) {
|
|
@@ -24611,13 +24611,13 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24611
24611
|
let o = e.transform(i);
|
|
24612
24612
|
e.select(o, o).insert(o, a(n, q)).select(o), E(e), r.focus({ preventScroll: !0 });
|
|
24613
24613
|
}
|
|
24614
|
-
},
|
|
24615
|
-
G = !0,
|
|
24616
|
-
},
|
|
24614
|
+
}, Ig = (e) => {
|
|
24615
|
+
G = !0, jg(e.dataTransfer);
|
|
24616
|
+
}, Lg = () => {
|
|
24617
24617
|
G = !1;
|
|
24618
24618
|
};
|
|
24619
|
-
return K.addEventListener("selectionchange",
|
|
24620
|
-
I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, J._dispose(), K.removeEventListener("selectionchange",
|
|
24619
|
+
return K.addEventListener("selectionchange", Ag), r.addEventListener("keydown", Q), r.addEventListener("input", Tg), r.addEventListener("beforeinput", Eg), r.addEventListener("compositionstart", Dg), r.addEventListener("compositionend", $), r.addEventListener("focus", Og), r.addEventListener("blur", kg), r.addEventListener("copy", Mg), r.addEventListener("cut", Ng), r.addEventListener("paste", Pg), r.addEventListener("drop", Fg), r.addEventListener("dragstart", Ig), r.addEventListener("dragend", Lg), () => {
|
|
24620
|
+
I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, J._dispose(), K.removeEventListener("selectionchange", Ag), r.removeEventListener("keydown", Q), r.removeEventListener("input", Tg), r.removeEventListener("beforeinput", Eg), r.removeEventListener("compositionstart", Dg), r.removeEventListener("compositionend", $), r.removeEventListener("focus", Og), r.removeEventListener("blur", kg), r.removeEventListener("copy", Mg), r.removeEventListener("cut", Ng), r.removeEventListener("paste", Pg), r.removeEventListener("drop", Fg), r.removeEventListener("dragstart", Ig), r.removeEventListener("dragend", Lg));
|
|
24621
24621
|
};
|
|
24622
24622
|
},
|
|
24623
24623
|
command: (e, ...n) => {
|
|
@@ -24962,7 +24962,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
24962
24962
|
}
|
|
24963
24963
|
})), m = shallowRef("slash"), j = shallowRef(""), I = shallowRef([]), L = shallowRef([]), z = shallowRef([]), B, H, G = document.body, { commandSelection: K, GetCursorPosition: q } = useCommandSelection(), J = () => {
|
|
24964
24964
|
setTimeout(() => {
|
|
24965
|
-
let e =
|
|
24965
|
+
let e = Tg();
|
|
24966
24966
|
j.value = e.query || "", e.isActive ? (a.value?.setProps({ getReferenceClientRect: () => ({
|
|
24967
24967
|
left: e.coordinates?.left || 0,
|
|
24968
24968
|
top: e.coordinates?.top || 0,
|
|
@@ -24975,7 +24975,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
24975
24975
|
e.key === "@" && (m.value = "slash", J()), e.key === "/" && (m.value = "prompt", J());
|
|
24976
24976
|
}, Q = () => {
|
|
24977
24977
|
j.value = "";
|
|
24978
|
-
},
|
|
24978
|
+
}, Tg = () => {
|
|
24979
24979
|
let e = {
|
|
24980
24980
|
isActive: !1,
|
|
24981
24981
|
query: "",
|
|
@@ -25005,27 +25005,27 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25005
25005
|
} catch {
|
|
25006
25006
|
return e;
|
|
25007
25007
|
}
|
|
25008
|
-
},
|
|
25008
|
+
}, Dg = (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), kg = (e) => {
|
|
25009
25009
|
z.value.push(e), B.command(q);
|
|
25010
25010
|
let { column: n, line: r } = K.value;
|
|
25011
|
-
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(),
|
|
25012
|
-
},
|
|
25011
|
+
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(), Ag();
|
|
25012
|
+
}, Ag = () => {
|
|
25013
25013
|
setTimeout(() => {
|
|
25014
25014
|
let e = window.getSelection(), n = document.createRange();
|
|
25015
25015
|
i.value && e && (n.selectNodeContents(i.value), n.collapse(!1), e.removeAllRanges(), e.addRange(n));
|
|
25016
25016
|
}, 100);
|
|
25017
|
-
},
|
|
25018
|
-
B.command(ReplaceAll, e),
|
|
25017
|
+
}, jg = (e) => {
|
|
25018
|
+
B.command(ReplaceAll, e), Ag();
|
|
25019
25019
|
};
|
|
25020
25020
|
watchEffect(() => {
|
|
25021
25021
|
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();
|
|
25022
25022
|
});
|
|
25023
|
-
let
|
|
25023
|
+
let Mg = (e, n, r, i) => {
|
|
25024
25024
|
if (n.type === "tag") {
|
|
25025
|
-
let n =
|
|
25025
|
+
let n = Dg(e, r);
|
|
25026
25026
|
B.command(DeleteTag, [i, n], [i, n + 1]);
|
|
25027
25027
|
}
|
|
25028
|
-
},
|
|
25028
|
+
}, Pg = (e) => {
|
|
25029
25029
|
let n = e.clipboardData?.items;
|
|
25030
25030
|
if (!n) return;
|
|
25031
25031
|
let r = [];
|
|
@@ -25034,7 +25034,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25034
25034
|
n && r.push(n);
|
|
25035
25035
|
}
|
|
25036
25036
|
r.length > 0 && (e.preventDefault(), console.log("handlePaste files", r), s("upload", r));
|
|
25037
|
-
},
|
|
25037
|
+
}, Fg = () => {
|
|
25038
25038
|
H?.(), B = createEditor({
|
|
25039
25039
|
doc: d.value,
|
|
25040
25040
|
schema: tagSchema,
|
|
@@ -25043,16 +25043,16 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25043
25043
|
},
|
|
25044
25044
|
onKeyDown: (e) => Z(e)
|
|
25045
25045
|
}), H = B.input(i.value);
|
|
25046
|
-
},
|
|
25046
|
+
}, Rg = () => m.value === "slash" ? I.value.length < 1 ? !1 : void 0 : L.value.length < 1 ? !1 : void 0;
|
|
25047
25047
|
return onMounted(() => {
|
|
25048
|
-
|
|
25048
|
+
Fg(), i.value?.addEventListener("paste", Pg);
|
|
25049
25049
|
}), onUnmounted(() => {
|
|
25050
|
-
B.command(ReplaceAll, ""), H?.(), i.value?.removeEventListener("paste",
|
|
25050
|
+
B.command(ReplaceAll, ""), H?.(), i.value?.removeEventListener("paste", Pg);
|
|
25051
25051
|
}), n({
|
|
25052
25052
|
cleanup: () => {
|
|
25053
25053
|
B.command(ReplaceAll, "");
|
|
25054
25054
|
},
|
|
25055
|
-
focus:
|
|
25055
|
+
focus: Ag
|
|
25056
25056
|
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$27, [createElementVNode("div", {
|
|
25057
25057
|
ref_key: "editorRef",
|
|
25058
25058
|
ref: i,
|
|
@@ -25066,7 +25066,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25066
25066
|
"data-tag-type": r.data.type
|
|
25067
25067
|
}, [createTextVNode(toDisplayString(r.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
|
|
25068
25068
|
class: "mention-tag-remove-icon",
|
|
25069
|
-
onClick: (a) =>
|
|
25069
|
+
onClick: (a) => Mg(e, r, i, n)
|
|
25070
25070
|
}, null, 8, ["onClick"])], 10, _hoisted_4$12)) : createCommentVNode("v-if", !0)], 64))), 128)) : (openBlock(), createElementBlock("br", _hoisted_5$8))]))), 128)) : createCommentVNode("v-if", !0)], 8, _hoisted_2$19), createVNode(unref(Tippy), {
|
|
25071
25071
|
ref_key: "tippyRef",
|
|
25072
25072
|
ref: a,
|
|
@@ -25081,15 +25081,15 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25081
25081
|
"trigger-target": i.value,
|
|
25082
25082
|
"z-index": unref(EDITOR_MENU_Z_INDEX),
|
|
25083
25083
|
onHidden: Q,
|
|
25084
|
-
onShow:
|
|
25084
|
+
onShow: Rg
|
|
25085
25085
|
}, {
|
|
25086
25086
|
content: withCtx(() => [m.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
|
|
25087
25087
|
key: 0,
|
|
25088
|
-
"on-select":
|
|
25088
|
+
"on-select": kg,
|
|
25089
25089
|
"resource-list": I.value
|
|
25090
25090
|
}, null, 8, ["resource-list"])) : m.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
|
|
25091
25091
|
key: 1,
|
|
25092
|
-
"on-select":
|
|
25092
|
+
"on-select": jg,
|
|
25093
25093
|
prompts: L.value
|
|
25094
25094
|
}, null, 8, ["prompts"])) : createCommentVNode("v-if", !0)]),
|
|
25095
25095
|
_: 1
|
|
@@ -25213,7 +25213,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25213
25213
|
e.status = UploadStatus.Error;
|
|
25214
25214
|
});
|
|
25215
25215
|
}
|
|
25216
|
-
},
|
|
25216
|
+
}, wg = (e) => {
|
|
25217
25217
|
E.value = E.value.filter((n) => n.file ? n.file !== e.file : n.url ? n.url !== e.url : n.filename ? n.filename !== e.filename : !0);
|
|
25218
25218
|
};
|
|
25219
25219
|
return n({
|
|
@@ -25238,7 +25238,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25238
25238
|
class: "chat-input-files"
|
|
25239
25239
|
}, [createVNode(file_content_default, {
|
|
25240
25240
|
files: E.value,
|
|
25241
|
-
onDeleteFile:
|
|
25241
|
+
onDeleteFile: wg
|
|
25242
25242
|
}, null, 8, ["files"])], 512)) : createCommentVNode("v-if", !0)]),
|
|
25243
25243
|
createVNode(ai_slash_input_default, {
|
|
25244
25244
|
ref_key: "aiSlashInputRef",
|
|
@@ -26604,7 +26604,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26604
26604
|
onSessionDelete: (e) => a("history-session-delete", e),
|
|
26605
26605
|
onSessionRename: (e, n) => a("history-session-rename", e, n)
|
|
26606
26606
|
}));
|
|
26607
|
-
}, H = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")), G = computed(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"), K = computed(() => i.isCompressionHeight ? t("恢复默认尺寸") : t("缩小高度")), q = computed(() => i.hasPermission), J = (e) => q.value ? e : t("暂无使用权限"), Z = () => ({ cursor: q.value ? "pointer" : "not-allowed" }),
|
|
26607
|
+
}, H = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")), G = computed(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"), K = computed(() => i.isCompressionHeight ? t("恢复默认尺寸") : t("缩小高度")), q = computed(() => i.hasPermission), J = (e) => q.value ? e : t("暂无使用权限"), Z = () => ({ cursor: q.value ? "pointer" : "not-allowed" }), Dg = computed(() => {
|
|
26608
26608
|
let e = !i.hasSessionContents, n = e ? "disabled" : "", r = e ? `data-tippy-content="${t("请先发起会话")}"` : "", a = "";
|
|
26609
26609
|
return i.dropdownMenuConfig?.showRename && (a += `
|
|
26610
26610
|
<div class="tippy-menu-item" data-action="rename">
|
|
@@ -26636,18 +26636,18 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26636
26636
|
});
|
|
26637
26637
|
}
|
|
26638
26638
|
a("new-chat");
|
|
26639
|
-
},
|
|
26639
|
+
}, kg = (e) => {
|
|
26640
26640
|
e.stopPropagation(), i.sessionBusinessManager ? (z || B(), z && z.handleTriggerClick(e)) : a("history-click", e);
|
|
26641
|
-
},
|
|
26641
|
+
}, Ag = () => {
|
|
26642
26642
|
a("help-click");
|
|
26643
|
-
},
|
|
26643
|
+
}, Mg = (e) => {
|
|
26644
26644
|
e.stopPropagation(), L && (L.state.isVisible ? L.hide() : L.show());
|
|
26645
|
-
},
|
|
26645
|
+
}, Ng = (e) => {
|
|
26646
26646
|
e.stopPropagation(), e.preventDefault();
|
|
26647
26647
|
let n = e.currentTarget, r = n.dataset.action;
|
|
26648
26648
|
if (!n.classList.contains("disabled")) switch (L && L.hide(), r) {
|
|
26649
26649
|
case "rename":
|
|
26650
|
-
|
|
26650
|
+
Pg();
|
|
26651
26651
|
break;
|
|
26652
26652
|
case "auto-generate":
|
|
26653
26653
|
a("auto-generate-name");
|
|
@@ -26656,9 +26656,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26656
26656
|
a("share");
|
|
26657
26657
|
break;
|
|
26658
26658
|
}
|
|
26659
|
-
},
|
|
26660
|
-
document.removeEventListener("click",
|
|
26661
|
-
document.addEventListener("click",
|
|
26659
|
+
}, Pg = () => {
|
|
26660
|
+
document.removeEventListener("click", Bg), j.value = i.sessionName || "", k.value = !0, setTimeout(() => {
|
|
26661
|
+
document.addEventListener("click", Bg);
|
|
26662
26662
|
}, 100), setTimeout(() => {
|
|
26663
26663
|
if (I.value) try {
|
|
26664
26664
|
let e = I.value;
|
|
@@ -26669,26 +26669,26 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26669
26669
|
console.warn("Failed to focus rename input:", e);
|
|
26670
26670
|
}
|
|
26671
26671
|
}, 100);
|
|
26672
|
-
},
|
|
26672
|
+
}, Fg = () => {
|
|
26673
26673
|
let e = j.value.trim();
|
|
26674
26674
|
if (!e) {
|
|
26675
|
-
|
|
26675
|
+
Ig();
|
|
26676
26676
|
return;
|
|
26677
26677
|
}
|
|
26678
26678
|
a("rename", e), k.value = !1, j.value = "";
|
|
26679
|
-
},
|
|
26679
|
+
}, Ig = () => {
|
|
26680
26680
|
k.value = !1, j.value = "";
|
|
26681
|
-
},
|
|
26682
|
-
j.value = e, n.key === "Enter" ?
|
|
26683
|
-
},
|
|
26681
|
+
}, Rg = (e, n) => {
|
|
26682
|
+
j.value = e, n.key === "Enter" ? Fg() : n.key === "Escape" && Ig();
|
|
26683
|
+
}, Bg = (e) => {
|
|
26684
26684
|
if (!k.value) return;
|
|
26685
26685
|
let n = e.target, r = document.querySelector(".rename-tooltip");
|
|
26686
|
-
r && !r.contains(n) &&
|
|
26687
|
-
},
|
|
26686
|
+
r && !r.contains(n) && Ig();
|
|
26687
|
+
}, Vg = async () => {
|
|
26688
26688
|
if (!u.value) return;
|
|
26689
26689
|
let e = (await import("tippy.js")).default;
|
|
26690
26690
|
L &&= (L.destroy(), null), L = e(u.value, {
|
|
26691
|
-
content:
|
|
26691
|
+
content: Dg.value,
|
|
26692
26692
|
theme: "ai-blueking-light more-menu-light light",
|
|
26693
26693
|
placement: "bottom-start",
|
|
26694
26694
|
trigger: "manual",
|
|
@@ -26700,23 +26700,23 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26700
26700
|
onShow: () => {
|
|
26701
26701
|
setTimeout(() => {
|
|
26702
26702
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
26703
|
-
e.addEventListener("click",
|
|
26703
|
+
e.addEventListener("click", Ng);
|
|
26704
26704
|
});
|
|
26705
26705
|
}, 0);
|
|
26706
26706
|
},
|
|
26707
26707
|
onHide: () => {
|
|
26708
26708
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
26709
|
-
e.removeEventListener("click",
|
|
26709
|
+
e.removeEventListener("click", Ng);
|
|
26710
26710
|
});
|
|
26711
26711
|
}
|
|
26712
26712
|
});
|
|
26713
26713
|
};
|
|
26714
26714
|
return watch(() => [i.isCompressionHeight, i.hasSessionContents], () => {
|
|
26715
|
-
L && L.setContent(
|
|
26715
|
+
L && L.setContent(Dg.value);
|
|
26716
26716
|
}), onMounted(() => {
|
|
26717
|
-
|
|
26717
|
+
Vg(), i.sessionBusinessManager && B(), document.addEventListener("click", Bg);
|
|
26718
26718
|
}), onBeforeUnmount(() => {
|
|
26719
|
-
L &&= (L.destroy(), null), z &&= (z.destroy(), null), document.removeEventListener("click",
|
|
26719
|
+
L &&= (L.destroy(), null), z &&= (z.destroy(), null), document.removeEventListener("click", Bg);
|
|
26720
26720
|
}), n({
|
|
26721
26721
|
headerRef: s,
|
|
26722
26722
|
historyIconRef: l
|
|
@@ -26739,13 +26739,13 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26739
26739
|
"onUpdate:modelValue": r[0] ||= (e) => j.value = e,
|
|
26740
26740
|
class: "rename-input",
|
|
26741
26741
|
placeholder: unref(t)("请输入新的会话名称"),
|
|
26742
|
-
onKeyup:
|
|
26742
|
+
onKeyup: Rg
|
|
26743
26743
|
}, null, 8, ["modelValue", "placeholder"]), createElementVNode("div", { class: "rename-buttons" }, [createElementVNode("i", {
|
|
26744
26744
|
class: "bkai-icon bkai-check-1 rename-btn confirm-btn",
|
|
26745
|
-
onClick:
|
|
26745
|
+
onClick: Fg
|
|
26746
26746
|
}), createElementVNode("i", {
|
|
26747
26747
|
class: "bkai-icon bkai-close rename-btn cancel-btn",
|
|
26748
|
-
onClick:
|
|
26748
|
+
onClick: Ig
|
|
26749
26749
|
})])])])) : createCommentVNode("v-if", !0)
|
|
26750
26750
|
], 2),
|
|
26751
26751
|
i.showMoreIcon && q.value ? (openBlock(), createElementBlock("span", {
|
|
@@ -26753,7 +26753,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26753
26753
|
ref_key: "moreIconRef",
|
|
26754
26754
|
ref: u,
|
|
26755
26755
|
class: "bkai-icon bkai-more",
|
|
26756
|
-
onClick:
|
|
26756
|
+
onClick: Mg
|
|
26757
26757
|
}, null, 512)) : createCommentVNode("v-if", !0)
|
|
26758
26758
|
]), createElementVNode("div", _hoisted_6$1, [
|
|
26759
26759
|
createCommentVNode(" 新增会话按钮 "),
|
|
@@ -26781,7 +26781,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26781
26781
|
{ disabled: !q.value }
|
|
26782
26782
|
]),
|
|
26783
26783
|
style: normalizeStyle(Z()),
|
|
26784
|
-
onClick: r[2] ||= (e) => q.value ?
|
|
26784
|
+
onClick: r[2] ||= (e) => q.value ? kg(e) : void 0
|
|
26785
26785
|
}, null, 6)), [[unref(o), {
|
|
26786
26786
|
content: J(unref(t)("历史会话")),
|
|
26787
26787
|
boundary: "parent"
|
|
@@ -26789,7 +26789,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26789
26789
|
e.chatGroup?.enabled ? withDirectives((openBlock(), createElementBlock("i", {
|
|
26790
26790
|
key: 2,
|
|
26791
26791
|
class: "bkai-icon bkai-zhushou",
|
|
26792
|
-
onClick:
|
|
26792
|
+
onClick: Ag
|
|
26793
26793
|
}, null, 512)), [[unref(o), {
|
|
26794
26794
|
content: unref(t)("转人工"),
|
|
26795
26795
|
boundary: "parent"
|
|
@@ -27636,7 +27636,7 @@ var UIStateManager = class {
|
|
|
27636
27636
|
a("receive-text");
|
|
27637
27637
|
},
|
|
27638
27638
|
onDone: () => {
|
|
27639
|
-
a("receive-end"),
|
|
27639
|
+
a("receive-end"), d_();
|
|
27640
27640
|
},
|
|
27641
27641
|
onError: (e) => {
|
|
27642
27642
|
a("error", e);
|
|
@@ -27652,11 +27652,11 @@ var UIStateManager = class {
|
|
|
27652
27652
|
return n.injectMessageModule(r.message), r;
|
|
27653
27653
|
})(), B = computed(() => ((i.chatHelper || z)?.agent)?.isChatting?.value ? MessageStatus.Streaming : MessageStatus.Complete), H = computed(() => B.value === MessageStatus.Streaming ? MessageToolsStatus.Disabled : void 0), G = async (e, n) => {
|
|
27654
27654
|
if (e.id === "cite") {
|
|
27655
|
-
|
|
27655
|
+
qg.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), O_();
|
|
27656
27656
|
return;
|
|
27657
27657
|
}
|
|
27658
27658
|
if (e.id === "rebuild") {
|
|
27659
|
-
await
|
|
27659
|
+
await Dg(n);
|
|
27660
27660
|
return;
|
|
27661
27661
|
}
|
|
27662
27662
|
if (e.id === "delete") {
|
|
@@ -27664,7 +27664,7 @@ var UIStateManager = class {
|
|
|
27664
27664
|
return;
|
|
27665
27665
|
}
|
|
27666
27666
|
if (e.id === "share") {
|
|
27667
|
-
|
|
27667
|
+
Rg && (E.value = !0), a("request-share");
|
|
27668
27668
|
return;
|
|
27669
27669
|
}
|
|
27670
27670
|
if (e.id === "like" || e.id === "unlike") {
|
|
@@ -27686,7 +27686,7 @@ var UIStateManager = class {
|
|
|
27686
27686
|
console.error("[ChatBot] Cannot submit feedback: no active session");
|
|
27687
27687
|
return;
|
|
27688
27688
|
}
|
|
27689
|
-
let s = findLastUserMessageIdBefore(
|
|
27689
|
+
let s = findLastUserMessageIdBefore(Ug?.messages.value || [], n[0]);
|
|
27690
27690
|
if (s === void 0) {
|
|
27691
27691
|
console.error("[ChatBot] Cannot submit feedback: no user message found");
|
|
27692
27692
|
return;
|
|
@@ -27704,12 +27704,12 @@ var UIStateManager = class {
|
|
|
27704
27704
|
console.error("[ChatBot] Failed to submit feedback:", e), a("error", e);
|
|
27705
27705
|
}
|
|
27706
27706
|
}, Z = async (e) => {
|
|
27707
|
-
if (!
|
|
27707
|
+
if (!Ug || !z) {
|
|
27708
27708
|
console.error("[ChatBot] Cannot delete messages: chatBusinessManager not initialized");
|
|
27709
27709
|
return;
|
|
27710
27710
|
}
|
|
27711
27711
|
try {
|
|
27712
|
-
let n =
|
|
27712
|
+
let n = Ug.messages.value, r = findLastUserMessageBefore(n, e[0]);
|
|
27713
27713
|
if (!r) {
|
|
27714
27714
|
console.error("[ChatBot] No user message found before AI messages");
|
|
27715
27715
|
return;
|
|
@@ -27719,8 +27719,8 @@ var UIStateManager = class {
|
|
|
27719
27719
|
} catch (e) {
|
|
27720
27720
|
console.error("[ChatBot] Failed to delete messages:", e), a("error", e);
|
|
27721
27721
|
}
|
|
27722
|
-
},
|
|
27723
|
-
if (!
|
|
27722
|
+
}, Dg = async (e) => {
|
|
27723
|
+
if (!Ug || !z) {
|
|
27724
27724
|
console.error("[ChatBot] Cannot regenerate: chatBusinessManager not initialized");
|
|
27725
27725
|
return;
|
|
27726
27726
|
}
|
|
@@ -27730,21 +27730,21 @@ var UIStateManager = class {
|
|
|
27730
27730
|
return;
|
|
27731
27731
|
}
|
|
27732
27732
|
try {
|
|
27733
|
-
await
|
|
27733
|
+
await Ug.regenerateFromAIMessages(e, n), d_();
|
|
27734
27734
|
} catch (e) {
|
|
27735
27735
|
console.error("[ChatBot] Failed to regenerate:", e), a("error", e);
|
|
27736
27736
|
}
|
|
27737
27737
|
}, $ = async (e, n) => {
|
|
27738
27738
|
if (e.id === "delete") {
|
|
27739
|
-
await
|
|
27739
|
+
await Ng(n);
|
|
27740
27740
|
return;
|
|
27741
27741
|
}
|
|
27742
27742
|
if (e.id === "cite") {
|
|
27743
|
-
|
|
27743
|
+
qg.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), O_();
|
|
27744
27744
|
return;
|
|
27745
27745
|
}
|
|
27746
27746
|
console.log("handleUserAction", e, n);
|
|
27747
|
-
},
|
|
27747
|
+
}, kg = async (e, n, r) => {
|
|
27748
27748
|
if (!z) {
|
|
27749
27749
|
console.error("[ChatBot] Cannot edit message: chatHelper not initialized");
|
|
27750
27750
|
return;
|
|
@@ -27760,12 +27760,12 @@ var UIStateManager = class {
|
|
|
27760
27760
|
return;
|
|
27761
27761
|
}
|
|
27762
27762
|
try {
|
|
27763
|
-
console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n),
|
|
27763
|
+
console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n), d_();
|
|
27764
27764
|
} catch (e) {
|
|
27765
27765
|
console.error("[ChatBot] Failed to edit and resend message:", e), a("error", e);
|
|
27766
27766
|
}
|
|
27767
|
-
},
|
|
27768
|
-
if (!
|
|
27767
|
+
}, Ag = async (e, n) => {
|
|
27768
|
+
if (!Ug || !z) {
|
|
27769
27769
|
console.error("[ChatBot] Cannot edit shortcut message: chatHelper not initialized");
|
|
27770
27770
|
return;
|
|
27771
27771
|
}
|
|
@@ -27780,26 +27780,26 @@ var UIStateManager = class {
|
|
|
27780
27780
|
return;
|
|
27781
27781
|
}
|
|
27782
27782
|
try {
|
|
27783
|
-
let a =
|
|
27783
|
+
let a = Mg(e);
|
|
27784
27784
|
if (!a) {
|
|
27785
27785
|
console.error("[ChatBot] Cannot edit shortcut message: shortcut not found");
|
|
27786
27786
|
return;
|
|
27787
27787
|
}
|
|
27788
|
-
let o =
|
|
27789
|
-
await
|
|
27788
|
+
let o = C_(a, n), s = String(n.input ?? "");
|
|
27789
|
+
await Ug.resendMessageWithProperty(String(i), r, s, o), d_();
|
|
27790
27790
|
} catch (e) {
|
|
27791
27791
|
console.error("[ChatBot] Failed to edit shortcut message:", e), a("error", e);
|
|
27792
27792
|
}
|
|
27793
|
-
},
|
|
27793
|
+
}, Mg = (e) => {
|
|
27794
27794
|
let n = e.property?.extra;
|
|
27795
|
-
return n?.shortcut ? n.shortcut : n?.command ?
|
|
27796
|
-
},
|
|
27797
|
-
if (!
|
|
27795
|
+
return n?.shortcut ? n.shortcut : n?.command ? u_.value.find((e) => e.id === n.command) ?? null : null;
|
|
27796
|
+
}, Ng = async (e) => {
|
|
27797
|
+
if (!Ug || !z) {
|
|
27798
27798
|
console.error("[ChatBot] Cannot delete message: chatHelper not initialized");
|
|
27799
27799
|
return;
|
|
27800
27800
|
}
|
|
27801
27801
|
try {
|
|
27802
|
-
let n =
|
|
27802
|
+
let n = Ug.messages.value, r = n.findIndex((n) => n === e);
|
|
27803
27803
|
if (r === -1) {
|
|
27804
27804
|
console.error("[ChatBot] User message not found in messages list");
|
|
27805
27805
|
return;
|
|
@@ -27815,29 +27815,29 @@ var UIStateManager = class {
|
|
|
27815
27815
|
} catch (e) {
|
|
27816
27816
|
console.error("[ChatBot] Failed to delete user message:", e), a("error", e);
|
|
27817
27817
|
}
|
|
27818
|
-
},
|
|
27818
|
+
}, Fg = async () => {
|
|
27819
27819
|
((i.chatHelper || z)?.agent)?.stopChat?.(z?.session.current?.value?.sessionCode ?? "");
|
|
27820
|
-
},
|
|
27820
|
+
}, Rg = !i.chatHelper, Bg = computed(() => Rg ? E.value : i.enableSelection), Vg = computed(() => Rg ? k.value : i.shareLoading), Hg = z ? new SessionBusinessManager(z.session, z.message, null, {
|
|
27821
27821
|
enableChatSession: !0,
|
|
27822
27822
|
autoSwitchToInitialSession: !!i.sessionCode,
|
|
27823
27823
|
loadRecentSessionOnMount: i.autoLoad,
|
|
27824
27824
|
initialSessionCode: i.sessionCode
|
|
27825
|
-
}) : null,
|
|
27825
|
+
}) : null, Ug = z ? new ChatBusinessManager(z.agent, z.message, z.session, null, {
|
|
27826
27826
|
openingRemark: i.helloText,
|
|
27827
27827
|
predefinedQuestions: i.prompts,
|
|
27828
27828
|
placeholder: i.placeholder
|
|
27829
|
-
}) : null,
|
|
27829
|
+
}) : null, Wg = new ShortcutManager(null, i.shortcuts || []), Kg = shallowRef([[]]), qg = ref(""), Jg = computed(() => Ug?.messages.value ?? []), Yg = computed(() => Ug?.isMessagesLoading.value ?? !1), Xg = computed(() => Ug?.isGenerating.value ?? !1), Zg = computed(() => Hg?.currentSession.value ?? null), Qg = computed(() => Rg && !j.value ? !1 : !Yg.value && Jg.value.length === 0), $g = computed(() => z?.agent.info.value?.conversationSettings?.openingRemark || ""), e_ = computed(() => i.resources?.length ? i.resources : flattenResources(z?.agent.info.value?.resources)), t_ = computed(() => i.prompts?.length ? i.prompts : z?.agent.info.value?.conversationSettings?.predefinedQuestions ?? []), n_ = computed(() => ({
|
|
27830
27830
|
height: typeof i.height == "number" ? `${i.height}px` : i.height,
|
|
27831
27831
|
maxWidth: typeof i.maxWidth == "number" ? `${i.maxWidth}px` : i.maxWidth
|
|
27832
|
-
})),
|
|
27833
|
-
let e =
|
|
27832
|
+
})), r_ = computed(() => {
|
|
27833
|
+
let e = Wg.shortcuts.value;
|
|
27834
27834
|
return i.shortcutLimit && e.length > i.shortcutLimit ? e.slice(0, i.shortcutLimit) : e;
|
|
27835
|
-
}),
|
|
27836
|
-
m.value = [],
|
|
27837
|
-
},
|
|
27835
|
+
}), i_ = () => {
|
|
27836
|
+
m.value = [], Rg && (E.value = !1), a("cancel-share");
|
|
27837
|
+
}, s_ = async () => {
|
|
27838
27838
|
let e = m.value;
|
|
27839
|
-
|
|
27840
|
-
},
|
|
27839
|
+
Rg && await c_(e), a("confirm-share", e);
|
|
27840
|
+
}, c_ = async (e) => {
|
|
27841
27841
|
if (!z || e.length === 0) return;
|
|
27842
27842
|
let n = z.session.current?.value?.sessionCode;
|
|
27843
27843
|
if (!n) {
|
|
@@ -27859,42 +27859,42 @@ var UIStateManager = class {
|
|
|
27859
27859
|
} finally {
|
|
27860
27860
|
k.value = !1, E.value = !1, m.value = [];
|
|
27861
27861
|
}
|
|
27862
|
-
},
|
|
27863
|
-
e ? m.value =
|
|
27864
|
-
},
|
|
27862
|
+
}, l_ = (e) => {
|
|
27863
|
+
e ? m.value = Jg.value : m.value = [];
|
|
27864
|
+
}, u_ = Wg.effectiveShortcuts;
|
|
27865
27865
|
watch(() => i.shortcuts, (e) => {
|
|
27866
|
-
|
|
27866
|
+
Wg.setShortcuts(e || []);
|
|
27867
27867
|
}, { immediate: !0 }), watch(() => z?.agent.info.value?.conversationSettings?.commands, (e) => {
|
|
27868
|
-
e &&
|
|
27868
|
+
e && Wg.setAgentShortcuts(e);
|
|
27869
27869
|
}, { immediate: !0 });
|
|
27870
|
-
let
|
|
27870
|
+
let d_ = async () => {
|
|
27871
27871
|
await nextTick(), s.value && (s.value.scrollTop = s.value.scrollHeight);
|
|
27872
|
-
},
|
|
27873
|
-
if (!
|
|
27872
|
+
}, f_ = async (e, n = {}) => {
|
|
27873
|
+
if (!Ug || !z) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
|
|
27874
27874
|
let r = z.session.current?.value?.sessionCode;
|
|
27875
27875
|
if (!r) throw Error("[ChatBot] Cannot send message: no active session");
|
|
27876
|
-
|
|
27877
|
-
},
|
|
27876
|
+
Kg.value = [[]], qg.value = "", a("send-message", typeof e == "string" ? e : ""), await Ug.sendMessage(e, r, n);
|
|
27877
|
+
}, p_ = async (e) => {
|
|
27878
27878
|
let n = z?.session.current?.value?.sessionCode;
|
|
27879
27879
|
if (!n) throw Error("[ChatBot] Cannot upload: no active session");
|
|
27880
27880
|
let r = await z.session.uploadFile(n, e);
|
|
27881
27881
|
if (!r?.download_url) throw Error("[ChatBot] Upload failed: no download URL returned");
|
|
27882
27882
|
return r;
|
|
27883
|
-
},
|
|
27883
|
+
}, m_ = async (e, n) => {
|
|
27884
27884
|
try {
|
|
27885
27885
|
let n = {};
|
|
27886
|
-
|
|
27886
|
+
qg.value && (n.cite = qg.value), u.value && (n.command = u.value.id), await f_(e, Object.keys(n).length ? { property: { extra: n } } : {});
|
|
27887
27887
|
} catch (e) {
|
|
27888
27888
|
console.error("Failed to send message:", e), a("error", e);
|
|
27889
27889
|
}
|
|
27890
|
-
},
|
|
27891
|
-
|
|
27892
|
-
},
|
|
27893
|
-
|
|
27890
|
+
}, g_ = async () => {
|
|
27891
|
+
T_();
|
|
27892
|
+
}, v_ = (e, n) => {
|
|
27893
|
+
x_(e, n), a("shortcut-click", {
|
|
27894
27894
|
shortcut: e,
|
|
27895
27895
|
source: "main"
|
|
27896
27896
|
});
|
|
27897
|
-
},
|
|
27897
|
+
}, x_ = (e, n) => {
|
|
27898
27898
|
let r = e, i = r.components?.find((e) => e.fillBack)?.key || "input";
|
|
27899
27899
|
u.value = {
|
|
27900
27900
|
...r,
|
|
@@ -27903,9 +27903,9 @@ var UIStateManager = class {
|
|
|
27903
27903
|
[i]: n || ""
|
|
27904
27904
|
}
|
|
27905
27905
|
};
|
|
27906
|
-
},
|
|
27906
|
+
}, S_ = () => {
|
|
27907
27907
|
u.value = null;
|
|
27908
|
-
},
|
|
27908
|
+
}, C_ = (e, n) => {
|
|
27909
27909
|
let r = e.components || [];
|
|
27910
27910
|
return { extra: {
|
|
27911
27911
|
cite: {
|
|
@@ -27925,42 +27925,42 @@ var UIStateManager = class {
|
|
|
27925
27925
|
__value: n[e.key]
|
|
27926
27926
|
}))
|
|
27927
27927
|
} };
|
|
27928
|
-
},
|
|
27928
|
+
}, w_ = async (e) => {
|
|
27929
27929
|
if (!u.value) {
|
|
27930
27930
|
console.error("[ChatBot] No selected shortcut");
|
|
27931
27931
|
return;
|
|
27932
27932
|
}
|
|
27933
|
-
let n =
|
|
27934
|
-
|
|
27933
|
+
let n = C_(u.value, e), r = u.value.name, i = u.value;
|
|
27934
|
+
S_();
|
|
27935
27935
|
try {
|
|
27936
|
-
await
|
|
27936
|
+
await f_(r, { property: n });
|
|
27937
27937
|
} catch (e) {
|
|
27938
27938
|
u.value = i, console.error("[ChatBot] Failed to submit shortcut:", e), a("error", e);
|
|
27939
27939
|
}
|
|
27940
|
-
},
|
|
27941
|
-
if (!
|
|
27940
|
+
}, T_ = () => {
|
|
27941
|
+
if (!Ug) {
|
|
27942
27942
|
console.error("[ChatBot] Cannot stop generation: chatBusinessManager not initialized");
|
|
27943
27943
|
return;
|
|
27944
27944
|
}
|
|
27945
|
-
|
|
27946
|
-
},
|
|
27947
|
-
if (!
|
|
27945
|
+
Ug.stopGeneration(), a("stop");
|
|
27946
|
+
}, E_ = async (e) => {
|
|
27947
|
+
if (!Hg) {
|
|
27948
27948
|
console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
|
|
27949
27949
|
return;
|
|
27950
27950
|
}
|
|
27951
27951
|
try {
|
|
27952
|
-
await
|
|
27952
|
+
await Hg.switchSession(e), a("session-switched", Hg.currentSession.value);
|
|
27953
27953
|
} catch (e) {
|
|
27954
27954
|
console.error("Failed to switch session:", e), a("error", e);
|
|
27955
27955
|
}
|
|
27956
|
-
},
|
|
27957
|
-
|
|
27958
|
-
},
|
|
27956
|
+
}, D_ = (e) => {
|
|
27957
|
+
qg.value = e;
|
|
27958
|
+
}, O_ = () => {
|
|
27959
27959
|
l.value?.focus?.();
|
|
27960
27960
|
};
|
|
27961
27961
|
return onMounted(async () => {
|
|
27962
27962
|
if (!(!z || I.value)) try {
|
|
27963
|
-
if (
|
|
27963
|
+
if (Rg) {
|
|
27964
27964
|
if (await z.agent.getAgentInfo(), await z.session.getSessions(), i.sessionCode) await z.session.chooseSession(i.sessionCode);
|
|
27965
27965
|
else if (z.session.list.value.length > 0) {
|
|
27966
27966
|
let e = z.session.list.value[0];
|
|
@@ -27973,38 +27973,38 @@ var UIStateManager = class {
|
|
|
27973
27973
|
console.error("Failed to initialize ChatBot:", e), I.value = e, a("error", e);
|
|
27974
27974
|
}
|
|
27975
27975
|
}), onBeforeUnmount(() => {
|
|
27976
|
-
|
|
27976
|
+
Rg && z && z.agent.stopChat(z.session.current?.value?.sessionCode ?? "");
|
|
27977
27977
|
}), n({
|
|
27978
|
-
sendMessage: (e) =>
|
|
27979
|
-
stopGeneration:
|
|
27980
|
-
switchSession:
|
|
27981
|
-
messages:
|
|
27982
|
-
currentSession:
|
|
27983
|
-
isGenerating:
|
|
27978
|
+
sendMessage: (e) => m_(e, [[]]),
|
|
27979
|
+
stopGeneration: T_,
|
|
27980
|
+
switchSession: E_,
|
|
27981
|
+
messages: Jg,
|
|
27982
|
+
currentSession: Zg,
|
|
27983
|
+
isGenerating: Xg,
|
|
27984
27984
|
getChatHelper: () => z,
|
|
27985
|
-
setCiteText:
|
|
27986
|
-
focusInput:
|
|
27985
|
+
setCiteText: D_,
|
|
27986
|
+
focusInput: O_,
|
|
27987
27987
|
selectShortcut: (e, n) => {
|
|
27988
|
-
|
|
27988
|
+
x_(e, n);
|
|
27989
27989
|
}
|
|
27990
27990
|
}), (e, n) => (openBlock(), createElementBlock("div", {
|
|
27991
27991
|
class: normalizeClass([
|
|
27992
27992
|
"ai-chatbot",
|
|
27993
27993
|
i.extCls,
|
|
27994
|
-
{ "welcome-state":
|
|
27994
|
+
{ "welcome-state": Qg.value }
|
|
27995
27995
|
]),
|
|
27996
|
-
style: normalizeStyle(
|
|
27997
|
-
}, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("span", null, toDisplayString(I.value.message), 1)])) :
|
|
27996
|
+
style: normalizeStyle(n_.value)
|
|
27997
|
+
}, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("span", null, toDisplayString(I.value.message), 1)])) : Rg && !j.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 独立模式:初始化中(getAgentInfo → getSessions → chooseSession)统一展示 Loading "), createElementVNode("div", _hoisted_2$1, [createVNode(unref(Loading), {
|
|
27998
27998
|
mode: "spin",
|
|
27999
27999
|
size: "small",
|
|
28000
28000
|
theme: "primary"
|
|
28001
28001
|
})])], 2112)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
28002
28002
|
createCommentVNode(" 内容区:欢迎状态 "),
|
|
28003
|
-
|
|
28003
|
+
Qg.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [n[3] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1), $g.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(unref(content_render_default), { content: $g.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 内容区:消息列表 "), createElementVNode("div", {
|
|
28004
28004
|
ref_key: "messagesContainerRef",
|
|
28005
28005
|
ref: s,
|
|
28006
28006
|
class: "chatbot-messages"
|
|
28007
|
-
}, [
|
|
28007
|
+
}, [Yg.value ? (openBlock(), createElementBlock("div", _hoisted_6, [createVNode(unref(Loading), {
|
|
28008
28008
|
mode: "spin",
|
|
28009
28009
|
size: "small",
|
|
28010
28010
|
theme: "primary"
|
|
@@ -28012,17 +28012,17 @@ var UIStateManager = class {
|
|
|
28012
28012
|
key: 1,
|
|
28013
28013
|
"selected-messages": m.value,
|
|
28014
28014
|
"onUpdate:selectedMessages": n[0] ||= (e) => m.value = e,
|
|
28015
|
-
"enable-selection":
|
|
28015
|
+
"enable-selection": Bg.value,
|
|
28016
28016
|
"message-status": B.value,
|
|
28017
28017
|
"message-tools-status": H.value,
|
|
28018
28018
|
"message-tools-tippy-options": i.messageToolsTippyOptions,
|
|
28019
|
-
messages:
|
|
28019
|
+
messages: Jg.value,
|
|
28020
28020
|
"on-agent-action": G,
|
|
28021
28021
|
"on-agent-feedback": K,
|
|
28022
28022
|
"on-user-action": $,
|
|
28023
|
-
"on-user-input-confirm":
|
|
28024
|
-
"on-user-shortcut-confirm":
|
|
28025
|
-
onStopStreaming:
|
|
28023
|
+
"on-user-input-confirm": kg,
|
|
28024
|
+
"on-user-shortcut-confirm": Ag,
|
|
28025
|
+
onStopStreaming: Fg
|
|
28026
28026
|
}, null, 8, [
|
|
28027
28027
|
"selected-messages",
|
|
28028
28028
|
"enable-selection",
|
|
@@ -28032,39 +28032,39 @@ var UIStateManager = class {
|
|
|
28032
28032
|
"messages"
|
|
28033
28033
|
]))], 512)], 2112)),
|
|
28034
28034
|
createCommentVNode(" 统一底部区域 "),
|
|
28035
|
-
|
|
28035
|
+
!Qg.value && Bg.value ? (openBlock(), createBlock(selection_footer_default, {
|
|
28036
28036
|
key: 2,
|
|
28037
|
-
"is-all-selected": m.value.length ===
|
|
28038
|
-
loading:
|
|
28037
|
+
"is-all-selected": m.value.length === Jg.value.length,
|
|
28038
|
+
loading: Vg.value,
|
|
28039
28039
|
"selected-count": m.value.length,
|
|
28040
|
-
onCancel:
|
|
28041
|
-
onConfirm:
|
|
28042
|
-
onToggleAll:
|
|
28040
|
+
onCancel: i_,
|
|
28041
|
+
onConfirm: s_,
|
|
28042
|
+
onToggleAll: l_
|
|
28043
28043
|
}, null, 8, [
|
|
28044
28044
|
"is-all-selected",
|
|
28045
28045
|
"loading",
|
|
28046
28046
|
"selected-count"
|
|
28047
28047
|
])) : (openBlock(), createElementBlock("div", _hoisted_7, [u.value?.components?.length ? (openBlock(), createBlock(unref(shortcut_render_default), mergeProps({ key: 0 }, u.value, {
|
|
28048
|
-
onClose:
|
|
28049
|
-
onSubmit:
|
|
28048
|
+
onClose: S_,
|
|
28049
|
+
onSubmit: w_
|
|
28050
28050
|
}), null, 16)) : renderSlot(e.$slots, "input", { key: 1 }, () => [createVNode(unref(chat_input_default), {
|
|
28051
28051
|
ref_key: "chatInputRef",
|
|
28052
28052
|
ref: l,
|
|
28053
|
-
modelValue:
|
|
28054
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
28055
|
-
cite:
|
|
28056
|
-
"onUpdate:cite": n[2] ||= (e) =>
|
|
28053
|
+
modelValue: Kg.value,
|
|
28054
|
+
"onUpdate:modelValue": n[1] ||= (e) => Kg.value = e,
|
|
28055
|
+
cite: qg.value,
|
|
28056
|
+
"onUpdate:cite": n[2] ||= (e) => qg.value = e,
|
|
28057
28057
|
"message-status": B.value,
|
|
28058
|
-
"on-send-message":
|
|
28059
|
-
"on-stop-sending":
|
|
28060
|
-
"on-upload":
|
|
28058
|
+
"on-send-message": m_,
|
|
28059
|
+
"on-stop-sending": g_,
|
|
28060
|
+
"on-upload": p_,
|
|
28061
28061
|
placeholder: i.placeholder,
|
|
28062
|
-
prompts:
|
|
28063
|
-
resources:
|
|
28062
|
+
prompts: t_.value,
|
|
28063
|
+
resources: e_.value,
|
|
28064
28064
|
"shortcut-id": u.value?.id,
|
|
28065
|
-
shortcuts:
|
|
28066
|
-
onDeleteShortcut:
|
|
28067
|
-
onSelectShortcut:
|
|
28065
|
+
shortcuts: r_.value,
|
|
28066
|
+
onDeleteShortcut: S_,
|
|
28067
|
+
onSelectShortcut: v_
|
|
28068
28068
|
}, null, 8, [
|
|
28069
28069
|
"modelValue",
|
|
28070
28070
|
"cite",
|
|
@@ -28865,7 +28865,7 @@ function useDraggable(e = {}, n) {
|
|
|
28865
28865
|
})) : (_.value = window.innerHeight - s - l, v.value = u.value - l, T.value = r, E.value = s), k.value = !k.value;
|
|
28866
28866
|
}, q = (e, n) => {
|
|
28867
28867
|
v.value = e, _.value = n, j.value = e - (window.innerWidth - T.value);
|
|
28868
|
-
},
|
|
28868
|
+
}, wg = (e, n) => {
|
|
28869
28869
|
T.value = Math.max(i, Math.min(e, O.value)), E.value = Math.max(a, n);
|
|
28870
28870
|
};
|
|
28871
28871
|
return onMounted(() => {
|
|
@@ -28887,9 +28887,9 @@ function useDraggable(e = {}, n) {
|
|
|
28887
28887
|
handleResizeStop: H,
|
|
28888
28888
|
toggleCompression: K,
|
|
28889
28889
|
updatePosition: q,
|
|
28890
|
-
updateSize:
|
|
28890
|
+
updateSize: wg,
|
|
28891
28891
|
updatePositionAndSize: (e, n, r, i) => {
|
|
28892
|
-
q(e, n),
|
|
28892
|
+
q(e, n), wg(r, i);
|
|
28893
28893
|
}
|
|
28894
28894
|
};
|
|
28895
28895
|
}
|
|
@@ -28961,11 +28961,11 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28961
28961
|
document.querySelectorAll("iframe").forEach((e) => {
|
|
28962
28962
|
e.style.pointerEvents = "";
|
|
28963
28963
|
});
|
|
28964
|
-
},
|
|
28964
|
+
}, Tg = (e, n) => {
|
|
28965
28965
|
o.value || (o.value = !0, J()), k(e, n);
|
|
28966
|
-
},
|
|
28966
|
+
}, Eg = (e, n, r, i) => {
|
|
28967
28967
|
o.value || (o.value = !0, J()), j(e, n, r, i);
|
|
28968
|
-
},
|
|
28968
|
+
}, Dg = (e, n) => {
|
|
28969
28969
|
I(e, n), o.value = !1, Z();
|
|
28970
28970
|
}, $ = (e, n, r, i) => {
|
|
28971
28971
|
L(e, n, r, i), o.value = !1, Z();
|
|
@@ -28997,9 +28997,9 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28997
28997
|
"prevent-deactivation": !0,
|
|
28998
28998
|
"drag-handle": i.dragHandle,
|
|
28999
28999
|
"class-name": "draggable-container-inner",
|
|
29000
|
-
onDragging:
|
|
29001
|
-
onResizing:
|
|
29002
|
-
onDragStop:
|
|
29000
|
+
onDragging: Tg,
|
|
29001
|
+
onResizing: Eg,
|
|
29002
|
+
onDragStop: Dg,
|
|
29003
29003
|
onResizeStop: $
|
|
29004
29004
|
}, {
|
|
29005
29005
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$2, [renderSlot(e.$slots, "default", {}, void 0, !0)])]),
|
|
@@ -29243,12 +29243,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29243
29243
|
}), K = I, q = new SessionBusinessManager(K.session, K.message, null, {
|
|
29244
29244
|
enableChatSession: i.enableChatSession,
|
|
29245
29245
|
initialSessionCode: i.initialSessionCode
|
|
29246
|
-
}), J = new ShareBusinessManager(K.message, K.session), Z = new UIStateManager(), Q = computed(() => Z.isSelectionMode.value),
|
|
29246
|
+
}), J = new ShareBusinessManager(K.message, K.session), Z = new UIStateManager(), Q = computed(() => Z.isSelectionMode.value), Dg = ref(!1), $ = new ShortcutManager(null, i.shortcuts || []), kg = ref(!1), Ag = ref(""), Mg = { appendTo: (e) => {
|
|
29247
29247
|
let n = e.closest(".draggable-container-content");
|
|
29248
29248
|
return console.log("[ai-blueking] appendTo called, ref:", e), console.log("[ai-blueking] appendTo closest result:", n), n ?? document.body;
|
|
29249
|
-
} },
|
|
29249
|
+
} }, Ng = computed(() => m.isCompressed.value), Pg = computed(() => B.value), Fg = ref(""), Ig = ref(!0), Lg = ref(!1), Rg = computed(() => i.resources?.length ? i.resources : flattenResources(z.value?.resources)), Bg = computed(() => i.prompts?.length ? i.prompts : z.value?.conversationSettings?.predefinedQuestions ?? []), Vg = computed(() => {
|
|
29250
29250
|
let e = $.effectiveShortcuts.value;
|
|
29251
|
-
return typeof i.shortcutFilter == "function" &&
|
|
29251
|
+
return typeof i.shortcutFilter == "function" && Ag.value ? e.filter((e) => i.shortcutFilter?.(e, Ag.value)) : e;
|
|
29252
29252
|
});
|
|
29253
29253
|
watch(() => L.value, async (e) => {
|
|
29254
29254
|
if (e && z.value) {
|
|
@@ -29268,22 +29268,24 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29268
29268
|
}, { immediate: !0 }), watch(() => i.shortcuts, (e) => {
|
|
29269
29269
|
$.setShortcuts(e || []);
|
|
29270
29270
|
}, { immediate: !0 }), watch(() => G.value, (e) => {
|
|
29271
|
-
e && (
|
|
29271
|
+
e && (Fg.value = e.sessionName || "", Lg.value = (e.sessionContentCount ?? 0) > 0);
|
|
29272
29272
|
}, { immediate: !0 }), watch(() => K.message.list.value.length, (e) => {
|
|
29273
|
-
e > 0 && (
|
|
29273
|
+
e > 0 && (Lg.value = !0);
|
|
29274
29274
|
});
|
|
29275
|
-
let
|
|
29275
|
+
let Hg = async (e) => {
|
|
29276
29276
|
m.showPanel(e), e && l.value && await l.value.switchSession(e);
|
|
29277
|
+
}, Ug = async (e) => {
|
|
29278
|
+
await Hg(e);
|
|
29277
29279
|
}, Wg = () => {
|
|
29278
29280
|
m.hidePanel();
|
|
29279
|
-
},
|
|
29281
|
+
}, Kg = () => {
|
|
29280
29282
|
Wg();
|
|
29281
29283
|
}, qg = () => {
|
|
29282
29284
|
m.handleNimbusClick();
|
|
29283
|
-
},
|
|
29284
|
-
|
|
29285
|
+
}, Yg = (e) => {
|
|
29286
|
+
Ag.value = e;
|
|
29285
29287
|
}, Xg = async (e, n) => {
|
|
29286
|
-
|
|
29288
|
+
kg.value = !1, await Hg(), e.components?.length && l.value ? l.value.selectShortcut(e, n) : l.value && (l.value.setCiteText(n), l.value.focusInput()), k("shortcut-click", {
|
|
29287
29289
|
shortcut: e,
|
|
29288
29290
|
source: "popup"
|
|
29289
29291
|
});
|
|
@@ -29305,7 +29307,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29305
29307
|
j.newChat();
|
|
29306
29308
|
}, a_ = (e) => {
|
|
29307
29309
|
j.historyClick(e);
|
|
29308
|
-
},
|
|
29310
|
+
}, s_ = async (e) => {
|
|
29309
29311
|
await q.switchSession(e);
|
|
29310
29312
|
}, c_ = async (e) => {
|
|
29311
29313
|
await q.deleteSession(e);
|
|
@@ -29320,7 +29322,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29320
29322
|
try {
|
|
29321
29323
|
await K.session.renameSession(e);
|
|
29322
29324
|
let n = K.session.list.value.find((n) => n.sessionCode === e);
|
|
29323
|
-
n && (
|
|
29325
|
+
n && (Fg.value = n.sessionName || "");
|
|
29324
29326
|
} catch (e) {
|
|
29325
29327
|
console.error("[AIBlueking] Failed to auto-generate session name:", e), D_(e);
|
|
29326
29328
|
}
|
|
@@ -29337,7 +29339,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29337
29339
|
await K.session.updateSession({
|
|
29338
29340
|
...n,
|
|
29339
29341
|
sessionName: e
|
|
29340
|
-
}),
|
|
29342
|
+
}), Fg.value = e;
|
|
29341
29343
|
} catch (e) {
|
|
29342
29344
|
console.error("[AIBlueking] Failed to rename session:", e), D_(e);
|
|
29343
29345
|
}
|
|
@@ -29347,7 +29349,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29347
29349
|
}, m_ = () => {
|
|
29348
29350
|
Z.disableSelectionMode();
|
|
29349
29351
|
}, h_ = async (e) => {
|
|
29350
|
-
|
|
29352
|
+
Dg.value = !0;
|
|
29351
29353
|
try {
|
|
29352
29354
|
let { shareUrl: n, userMessageIds: r } = await J.shareMessages(e);
|
|
29353
29355
|
await copyToClipboard(n), Message({
|
|
@@ -29357,12 +29359,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29357
29359
|
} catch (e) {
|
|
29358
29360
|
console.error("[AIBlueking] Failed to share messages:", e), D_(e);
|
|
29359
29361
|
} finally {
|
|
29360
|
-
|
|
29362
|
+
Dg.value = !1;
|
|
29361
29363
|
}
|
|
29362
29364
|
}, g_ = async (e) => {
|
|
29363
29365
|
l.value && await l.value.sendMessage(e);
|
|
29364
29366
|
}, __ = (e) => {
|
|
29365
|
-
|
|
29367
|
+
Lg.value = !0, j.sendMessage(e);
|
|
29366
29368
|
}, v_ = () => {
|
|
29367
29369
|
j.receiveStart();
|
|
29368
29370
|
}, y_ = () => {
|
|
@@ -29379,12 +29381,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29379
29381
|
l.value && await l.value.switchSession(e);
|
|
29380
29382
|
}, T_ = async (e, n) => {
|
|
29381
29383
|
try {
|
|
29382
|
-
await q.updateSessionName(e, n),
|
|
29384
|
+
await q.updateSessionName(e, n), Fg.value = n;
|
|
29383
29385
|
} catch (e) {
|
|
29384
29386
|
console.error("[AIBlueking] Failed to update session name:", e), D_(e);
|
|
29385
29387
|
}
|
|
29386
29388
|
}, E_ = (e) => {
|
|
29387
|
-
e && (
|
|
29389
|
+
e && (Fg.value = e.sessionName || "", Lg.value = (e.sessionContentCount ?? 0) > 0 || K.message.list.value.length > 0);
|
|
29388
29390
|
}, D_ = (e) => {
|
|
29389
29391
|
console.error("ChatBot error:", e), m.emitInternal("sdk-error", {
|
|
29390
29392
|
apiName: "chat",
|
|
@@ -29403,14 +29405,15 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29403
29405
|
}, M_ = () => {
|
|
29404
29406
|
l.value && l.value.focusInput();
|
|
29405
29407
|
}, N_ = (e) => {
|
|
29406
|
-
isTogglePanelShortcut(e) && (e.preventDefault(), v.value ? Wg() :
|
|
29408
|
+
isTogglePanelShortcut(e) && (e.preventDefault(), v.value ? Wg() : Hg());
|
|
29407
29409
|
};
|
|
29408
29410
|
return onMounted(async () => {
|
|
29409
29411
|
o.value && m.setContainerRef(o.value), window.addEventListener("keydown", N_);
|
|
29410
29412
|
}), onBeforeUnmount(() => {
|
|
29411
29413
|
window.removeEventListener("keydown", N_), m.destroy();
|
|
29412
29414
|
}), n({
|
|
29413
|
-
show:
|
|
29415
|
+
show: Hg,
|
|
29416
|
+
handleShow: Ug,
|
|
29414
29417
|
hide: Wg,
|
|
29415
29418
|
sendMessage: g_,
|
|
29416
29419
|
stopGeneration: S_,
|
|
@@ -29447,28 +29450,28 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29447
29450
|
createCommentVNode(" 独立的 Header 组件 "),
|
|
29448
29451
|
i.hideHeader ? createCommentVNode("v-if", !0) : (openBlock(), createBlock(ai_header_default, {
|
|
29449
29452
|
key: 0,
|
|
29450
|
-
"agent-name":
|
|
29453
|
+
"agent-name": Pg.value,
|
|
29451
29454
|
"chat-helper": unref(K),
|
|
29452
29455
|
draggable: i.draggable,
|
|
29453
29456
|
"dropdown-menu-config": i.dropdownMenuConfig,
|
|
29454
29457
|
"enable-chat-session": i.enableChatSession,
|
|
29455
|
-
"has-permission":
|
|
29456
|
-
"has-session-contents":
|
|
29457
|
-
"is-compression-height":
|
|
29458
|
+
"has-permission": Ig.value,
|
|
29459
|
+
"has-session-contents": Lg.value,
|
|
29460
|
+
"is-compression-height": Ng.value,
|
|
29458
29461
|
"session-business-manager": unref(q),
|
|
29459
|
-
"session-name":
|
|
29462
|
+
"session-name": Fg.value,
|
|
29460
29463
|
"show-compression-icon": i.showCompressionIcon,
|
|
29461
29464
|
"show-history-icon": i.showHistoryIcon,
|
|
29462
29465
|
"show-more-icon": i.showMoreIcon,
|
|
29463
29466
|
"show-new-chat-icon": i.showNewChatIcon,
|
|
29464
29467
|
title: i.title,
|
|
29465
29468
|
onAutoGenerateName: u_,
|
|
29466
|
-
onClose:
|
|
29469
|
+
onClose: Kg,
|
|
29467
29470
|
onHelpClick: d_,
|
|
29468
29471
|
onHistoryClick: a_,
|
|
29469
29472
|
onHistorySessionDelete: c_,
|
|
29470
29473
|
onHistorySessionRename: l_,
|
|
29471
|
-
onHistorySessionSwitch:
|
|
29474
|
+
onHistorySessionSwitch: s_,
|
|
29472
29475
|
onNewChat: i_,
|
|
29473
29476
|
onRename: f_,
|
|
29474
29477
|
onShare: p_,
|
|
@@ -29498,13 +29501,13 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29498
29501
|
"chat-helper": unref(K),
|
|
29499
29502
|
"enable-selection": Q.value,
|
|
29500
29503
|
"hello-text": i.helloText,
|
|
29501
|
-
"message-tools-tippy-options":
|
|
29504
|
+
"message-tools-tippy-options": Mg,
|
|
29502
29505
|
placeholder: i.placeholder,
|
|
29503
|
-
prompts:
|
|
29506
|
+
prompts: Bg.value,
|
|
29504
29507
|
"request-options": i.requestOptions,
|
|
29505
|
-
resources:
|
|
29508
|
+
resources: Rg.value,
|
|
29506
29509
|
"session-code": i.initialSessionCode,
|
|
29507
|
-
"share-loading":
|
|
29510
|
+
"share-loading": Dg.value,
|
|
29508
29511
|
"shortcut-limit": i.shortcutLimit,
|
|
29509
29512
|
shortcuts: i.shortcuts,
|
|
29510
29513
|
url: u.value,
|
|
@@ -29565,12 +29568,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29565
29568
|
createCommentVNode(" 划词选择弹窗(使用 chat-x 的 AiSelection 组件) "),
|
|
29566
29569
|
i.enablePopup ? (openBlock(), createBlock(unref(ai_selection_default), {
|
|
29567
29570
|
key: 1,
|
|
29568
|
-
visible:
|
|
29569
|
-
"onUpdate:visible": n[6] ||= (e) =>
|
|
29571
|
+
visible: kg.value,
|
|
29572
|
+
"onUpdate:visible": n[6] ||= (e) => kg.value = e,
|
|
29570
29573
|
"max-shortcut-count": i.shortcutLimit,
|
|
29571
|
-
shortcuts:
|
|
29574
|
+
shortcuts: Vg.value,
|
|
29572
29575
|
onSelectShortcut: Xg,
|
|
29573
|
-
onSelectionChange:
|
|
29576
|
+
onSelectionChange: Yg
|
|
29574
29577
|
}, null, 8, [
|
|
29575
29578
|
"visible",
|
|
29576
29579
|
"max-shortcut-count",
|
|
@@ -29578,7 +29581,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29578
29581
|
])) : createCommentVNode("v-if", !0)
|
|
29579
29582
|
], 2)], 8, ["to"]));
|
|
29580
29583
|
}
|
|
29581
|
-
}), [["__scopeId", "data-v-
|
|
29584
|
+
}), [["__scopeId", "data-v-ddf60092"]]), vue2_default = {
|
|
29582
29585
|
name: "AIBluekingV2",
|
|
29583
29586
|
render(e) {
|
|
29584
29587
|
return e("div", { style: {
|