@blueking/ai-blueking 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-blueking.vue.d.ts +4 -0
- package/dist/components/render-content.vue.d.ts +2 -0
- package/dist/components/render-modal.vue.d.ts +2 -0
- package/dist/components/render-send.vue.d.ts +2 -0
- package/dist/lang/index.d.ts +2 -2
- package/dist/vue2/index.es.min.js +2161 -2143
- package/dist/vue2/index.iife.min.js +27 -27
- package/dist/vue2/index.umd.min.js +19 -19
- package/dist/vue2/style.css +1 -1
- package/dist/vue3/index.es.min.js +504 -496
- package/dist/vue3/index.iife.min.js +18 -18
- package/dist/vue3/index.umd.min.js +8 -8
- package/dist/vue3/style.css +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ var Rr = Object.defineProperty;
|
|
|
2
2
|
var Mr = (n, t, e) => t in n ? Rr(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
3
|
var At = (n, t, e) => (Mr(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
4
|
import { Popover as Fr, Input as eo, Exception as Ir, clickoutside as zr, bkTooltips as hn, Button as Nr, Message as Pr, provideGlobalConfig as Or } from "bkui-vue";
|
|
5
|
-
import { defineComponent as yt, ref as Ct, onMounted as dn, onBeforeUnmount as mn, openBlock as
|
|
5
|
+
import { defineComponent as yt, ref as Ct, onMounted as dn, onBeforeUnmount as mn, openBlock as P, createElementBlock as H, createTextVNode as Ae, toDisplayString as _t, unref as N, createCommentVNode as ut, pushScopeId as gn, popScopeId as bn, createElementVNode as F, computed as Tt, normalizeClass as me, Fragment as te, watch as Zo, createBlock as Qt, withCtx as _e, withDirectives as Dt, createVNode as kt, renderList as Wo, normalizeStyle as ve, nextTick as Xo, onBeforeMount as Br, withModifiers as bt, renderSlot as Ur } from "vue";
|
|
6
6
|
import ke from "dayjs";
|
|
7
7
|
import { Close as Hr } from "bkui-vue/lib/icon";
|
|
8
8
|
const Vr = (n) => {
|
|
@@ -33,7 +33,7 @@ const Vr = (n) => {
|
|
|
33
33
|
发送: "Send",
|
|
34
34
|
"您可以键入 “/” 查看更多Prompt": 'You can type "/" to see more Prompts',
|
|
35
35
|
请输入: "Please input",
|
|
36
|
-
返回最新: "
|
|
36
|
+
返回最新: "Latest",
|
|
37
37
|
终止生成: "Stop",
|
|
38
38
|
向上滚动加载更多记录: "Scroll up to load more records",
|
|
39
39
|
日: "sunday",
|
|
@@ -68,14 +68,14 @@ const Vr = (n) => {
|
|
|
68
68
|
const c = document.querySelector(".ai-blueking-messages");
|
|
69
69
|
c == null || c.removeEventListener("scroll", o);
|
|
70
70
|
};
|
|
71
|
-
return dn(s), mn(r), (c, i) => t.value ? (
|
|
71
|
+
return dn(s), mn(r), (c, i) => t.value ? (P(), H("span", {
|
|
72
72
|
key: 0,
|
|
73
73
|
class: "ai-blueking-render-back",
|
|
74
74
|
onClick: e
|
|
75
75
|
}, [
|
|
76
76
|
Xr,
|
|
77
77
|
Ae(
|
|
78
|
-
" " + _t(
|
|
78
|
+
" " + _t(N(U)("返回最新")),
|
|
79
79
|
1
|
|
80
80
|
/* TEXT */
|
|
81
81
|
)
|
|
@@ -96,14 +96,14 @@ const {
|
|
|
96
96
|
getOwnPropertyDescriptor: ts
|
|
97
97
|
} = Object;
|
|
98
98
|
let {
|
|
99
|
-
freeze:
|
|
99
|
+
freeze: tt,
|
|
100
100
|
seal: rt,
|
|
101
101
|
create: Jo
|
|
102
102
|
} = Object, {
|
|
103
103
|
apply: ln,
|
|
104
104
|
construct: un
|
|
105
105
|
} = typeof Reflect < "u" && Reflect;
|
|
106
|
-
|
|
106
|
+
tt || (tt = function(t) {
|
|
107
107
|
return t;
|
|
108
108
|
});
|
|
109
109
|
rt || (rt = function(t) {
|
|
@@ -115,7 +115,7 @@ ln || (ln = function(t, e, o) {
|
|
|
115
115
|
un || (un = function(t, e) {
|
|
116
116
|
return new t(...e);
|
|
117
117
|
});
|
|
118
|
-
const le = nt(Array.prototype.forEach), oo = nt(Array.prototype.pop), Wt = nt(Array.prototype.push), ge = nt(String.prototype.toLowerCase), Ve = nt(String.prototype.toString), ro = nt(String.prototype.match), Xt = nt(String.prototype.replace), es = nt(String.prototype.indexOf), ns = nt(String.prototype.trim), ct = nt(Object.prototype.hasOwnProperty),
|
|
118
|
+
const le = nt(Array.prototype.forEach), oo = nt(Array.prototype.pop), Wt = nt(Array.prototype.push), ge = nt(String.prototype.toLowerCase), Ve = nt(String.prototype.toString), ro = nt(String.prototype.match), Xt = nt(String.prototype.replace), es = nt(String.prototype.indexOf), ns = nt(String.prototype.trim), ct = nt(Object.prototype.hasOwnProperty), $ = nt(RegExp.prototype.test), Kt = os(TypeError);
|
|
119
119
|
function nt(n) {
|
|
120
120
|
return function(t) {
|
|
121
121
|
for (var e = arguments.length, o = new Array(e > 1 ? e - 1 : 0), s = 1; s < e; s++)
|
|
@@ -171,7 +171,7 @@ function ue(n, t) {
|
|
|
171
171
|
}
|
|
172
172
|
return e;
|
|
173
173
|
}
|
|
174
|
-
const so =
|
|
174
|
+
const so = tt(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Ge = tt(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), je = tt(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), ss = tt(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Ye = tt(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), cs = tt(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), co = tt(["#text"]), io = tt(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Ze = tt(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), ao = tt(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), pe = tt(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), is = rt(/\{\{[\w\W]*|[\w\W]*\}\}/gm), as = rt(/<%[\w\W]*|[\w\W]*%>/gm), ls = rt(/\${[\w\W]*}/gm), us = rt(/^data-[\-\w.\u00B7-\uFFFF]/), ps = rt(/^aria-[\-\w]+$/), Qo = rt(
|
|
175
175
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
176
176
|
// eslint-disable-line no-useless-escape
|
|
177
177
|
), fs = rt(/^(?:\w+script|data):/i), hs = rt(
|
|
@@ -247,31 +247,31 @@ function tr() {
|
|
|
247
247
|
HTMLFormElement: h,
|
|
248
248
|
DOMParser: f,
|
|
249
249
|
trustedTypes: d
|
|
250
|
-
} = n,
|
|
250
|
+
} = n, _ = a.prototype, k = ue(_, "cloneNode"), D = ue(_, "nextSibling"), A = ue(_, "childNodes"), v = ue(_, "parentNode");
|
|
251
251
|
if (typeof c == "function") {
|
|
252
252
|
const S = e.createElement("template");
|
|
253
253
|
S.content && S.content.ownerDocument && (e = S.content.ownerDocument);
|
|
254
254
|
}
|
|
255
|
-
let
|
|
255
|
+
let x, T = "";
|
|
256
256
|
const {
|
|
257
|
-
implementation:
|
|
258
|
-
createNodeIterator:
|
|
257
|
+
implementation: y,
|
|
258
|
+
createNodeIterator: m,
|
|
259
259
|
createDocumentFragment: R,
|
|
260
|
-
getElementsByTagName:
|
|
260
|
+
getElementsByTagName: z
|
|
261
261
|
} = e, {
|
|
262
|
-
importNode:
|
|
262
|
+
importNode: J
|
|
263
263
|
} = o;
|
|
264
264
|
let L = {};
|
|
265
|
-
t.isSupported = typeof Ko == "function" && typeof
|
|
265
|
+
t.isSupported = typeof Ko == "function" && typeof v == "function" && y && y.createHTMLDocument !== void 0;
|
|
266
266
|
const {
|
|
267
267
|
MUSTACHE_EXPR: X,
|
|
268
|
-
ERB_EXPR:
|
|
269
|
-
TMPLIT_EXPR:
|
|
270
|
-
DATA_ATTR:
|
|
268
|
+
ERB_EXPR: C,
|
|
269
|
+
TMPLIT_EXPR: O,
|
|
270
|
+
DATA_ATTR: b,
|
|
271
271
|
ARIA_ATTR: q,
|
|
272
272
|
IS_SCRIPT_OR_DATA: w,
|
|
273
273
|
ATTR_WHITESPACE: Z,
|
|
274
|
-
CUSTOM_ELEMENT:
|
|
274
|
+
CUSTOM_ELEMENT: qt
|
|
275
275
|
} = lo;
|
|
276
276
|
let {
|
|
277
277
|
IS_ALLOWED_URI: Sn
|
|
@@ -298,24 +298,24 @@ function tr() {
|
|
|
298
298
|
enumerable: !0,
|
|
299
299
|
value: !1
|
|
300
300
|
}
|
|
301
|
-
})), Gt = null, Me = null, qn = !0, Fe = !0, Rn = !1, Mn = !0,
|
|
301
|
+
})), Gt = null, Me = null, qn = !0, Fe = !0, Rn = !1, Mn = !0, Rt = !1, Ie = !0, xt = !1, ze = !1, Ne = !1, Mt = !1, re = !1, se = !1, Fn = !0, In = !1;
|
|
302
302
|
const wr = "user-content-";
|
|
303
|
-
let Pe = !0, jt = !1,
|
|
303
|
+
let Pe = !0, jt = !1, Ft = {}, It = null;
|
|
304
304
|
const zn = M({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
305
305
|
let Nn = null;
|
|
306
306
|
const Pn = M({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
307
307
|
let Oe = null;
|
|
308
308
|
const On = M({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ce = "http://www.w3.org/1998/Math/MathML", ie = "http://www.w3.org/2000/svg", mt = "http://www.w3.org/1999/xhtml";
|
|
309
|
-
let
|
|
309
|
+
let zt = mt, Be = !1, Ue = null;
|
|
310
310
|
const Er = M({}, [ce, ie, mt], Ve);
|
|
311
311
|
let Yt = null;
|
|
312
312
|
const Cr = ["application/xhtml+xml", "text/html"], Dr = "text/html";
|
|
313
|
-
let Y = null,
|
|
313
|
+
let Y = null, Nt = null;
|
|
314
314
|
const Sr = e.createElement("form"), Bn = function(p) {
|
|
315
315
|
return p instanceof RegExp || p instanceof Function;
|
|
316
316
|
}, He = function() {
|
|
317
317
|
let p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
318
|
-
if (!(
|
|
318
|
+
if (!(Nt && Nt === p)) {
|
|
319
319
|
if ((!p || typeof p != "object") && (p = {}), p = Et(p), Yt = // eslint-disable-next-line unicorn/prefer-includes
|
|
320
320
|
Cr.indexOf(p.PARSER_MEDIA_TYPE) === -1 ? Dr : p.PARSER_MEDIA_TYPE, Y = Yt === "application/xhtml+xml" ? Ve : ge, G = ct(p, "ALLOWED_TAGS") ? M({}, p.ALLOWED_TAGS, Y) : Tn, j = ct(p, "ALLOWED_ATTR") ? M({}, p.ALLOWED_ATTR, Y) : Ln, Ue = ct(p, "ALLOWED_NAMESPACES") ? M({}, p.ALLOWED_NAMESPACES, Ve) : Er, Oe = ct(p, "ADD_URI_SAFE_ATTR") ? M(
|
|
321
321
|
Et(On),
|
|
@@ -331,24 +331,24 @@ function tr() {
|
|
|
331
331
|
// eslint-disable-line indent
|
|
332
332
|
Y
|
|
333
333
|
// eslint-disable-line indent
|
|
334
|
-
) : Pn,
|
|
334
|
+
) : Pn, It = ct(p, "FORBID_CONTENTS") ? M({}, p.FORBID_CONTENTS, Y) : zn, Gt = ct(p, "FORBID_TAGS") ? M({}, p.FORBID_TAGS, Y) : {}, Me = ct(p, "FORBID_ATTR") ? M({}, p.FORBID_ATTR, Y) : {}, Ft = ct(p, "USE_PROFILES") ? p.USE_PROFILES : !1, qn = p.ALLOW_ARIA_ATTR !== !1, Fe = p.ALLOW_DATA_ATTR !== !1, Rn = p.ALLOW_UNKNOWN_PROTOCOLS || !1, Mn = p.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Rt = p.SAFE_FOR_TEMPLATES || !1, Ie = p.SAFE_FOR_XML !== !1, xt = p.WHOLE_DOCUMENT || !1, Mt = p.RETURN_DOM || !1, re = p.RETURN_DOM_FRAGMENT || !1, se = p.RETURN_TRUSTED_TYPE || !1, Ne = p.FORCE_BODY || !1, Fn = p.SANITIZE_DOM !== !1, In = p.SANITIZE_NAMED_PROPS || !1, Pe = p.KEEP_CONTENT !== !1, jt = p.IN_PLACE || !1, Sn = p.ALLOWED_URI_REGEXP || Qo, zt = p.NAMESPACE || mt, V = p.CUSTOM_ELEMENT_HANDLING || {}, p.CUSTOM_ELEMENT_HANDLING && Bn(p.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (V.tagNameCheck = p.CUSTOM_ELEMENT_HANDLING.tagNameCheck), p.CUSTOM_ELEMENT_HANDLING && Bn(p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (V.attributeNameCheck = p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), p.CUSTOM_ELEMENT_HANDLING && typeof p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (V.allowCustomizedBuiltInElements = p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Rt && (Fe = !1), re && (Mt = !0), Ft && (G = M({}, co), j = [], Ft.html === !0 && (M(G, so), M(j, io)), Ft.svg === !0 && (M(G, Ge), M(j, Ze), M(j, pe)), Ft.svgFilters === !0 && (M(G, je), M(j, Ze), M(j, pe)), Ft.mathMl === !0 && (M(G, Ye), M(j, ao), M(j, pe))), p.ADD_TAGS && (G === Tn && (G = Et(G)), M(G, p.ADD_TAGS, Y)), p.ADD_ATTR && (j === Ln && (j = Et(j)), M(j, p.ADD_ATTR, Y)), p.ADD_URI_SAFE_ATTR && M(Oe, p.ADD_URI_SAFE_ATTR, Y), p.FORBID_CONTENTS && (It === zn && (It = Et(It)), M(It, p.FORBID_CONTENTS, Y)), Pe && (G["#text"] = !0), xt && M(G, ["html", "head", "body"]), G.table && (M(G, ["tbody"]), delete Gt.tbody), p.TRUSTED_TYPES_POLICY) {
|
|
335
335
|
if (typeof p.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
336
336
|
throw Kt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
337
337
|
if (typeof p.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
338
338
|
throw Kt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
339
|
-
|
|
339
|
+
x = p.TRUSTED_TYPES_POLICY, T = x.createHTML("");
|
|
340
340
|
} else
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
x === void 0 && (x = gs(d, s)), x !== null && typeof T == "string" && (T = x.createHTML(""));
|
|
342
|
+
tt && tt(p), Nt = p;
|
|
343
343
|
}
|
|
344
344
|
}, Un = M({}, ["mi", "mo", "mn", "ms", "mtext"]), Hn = M({}, ["foreignobject", "annotation-xml"]), Tr = M({}, ["title", "style", "font", "a", "script"]), Vn = M({}, [...Ge, ...je, ...ss]), Gn = M({}, [...Ye, ...cs]), Lr = function(p) {
|
|
345
|
-
let
|
|
346
|
-
(!
|
|
347
|
-
namespaceURI:
|
|
345
|
+
let g = v(p);
|
|
346
|
+
(!g || !g.tagName) && (g = {
|
|
347
|
+
namespaceURI: zt,
|
|
348
348
|
tagName: "template"
|
|
349
349
|
});
|
|
350
|
-
const E = ge(p.tagName),
|
|
351
|
-
return Ue[p.namespaceURI] ? p.namespaceURI === ie ?
|
|
350
|
+
const E = ge(p.tagName), B = ge(g.tagName);
|
|
351
|
+
return Ue[p.namespaceURI] ? p.namespaceURI === ie ? g.namespaceURI === mt ? E === "svg" : g.namespaceURI === ce ? E === "svg" && (B === "annotation-xml" || Un[B]) : !!Vn[E] : p.namespaceURI === ce ? g.namespaceURI === mt ? E === "math" : g.namespaceURI === ie ? E === "math" && Hn[B] : !!Gn[E] : p.namespaceURI === mt ? g.namespaceURI === ie && !Hn[B] || g.namespaceURI === ce && !Un[B] ? !1 : !Gn[E] && (Tr[E] || !Vn[E]) : !!(Yt === "application/xhtml+xml" && Ue[p.namespaceURI]) : !1;
|
|
352
352
|
}, at = function(p) {
|
|
353
353
|
Wt(t.removed, {
|
|
354
354
|
element: p
|
|
@@ -358,55 +358,55 @@ function tr() {
|
|
|
358
358
|
} catch {
|
|
359
359
|
p.remove();
|
|
360
360
|
}
|
|
361
|
-
}, ae = function(p,
|
|
361
|
+
}, ae = function(p, g) {
|
|
362
362
|
try {
|
|
363
363
|
Wt(t.removed, {
|
|
364
|
-
attribute:
|
|
365
|
-
from:
|
|
364
|
+
attribute: g.getAttributeNode(p),
|
|
365
|
+
from: g
|
|
366
366
|
});
|
|
367
367
|
} catch {
|
|
368
368
|
Wt(t.removed, {
|
|
369
369
|
attribute: null,
|
|
370
|
-
from:
|
|
370
|
+
from: g
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
|
-
if (
|
|
374
|
-
if (
|
|
373
|
+
if (g.removeAttribute(p), p === "is" && !j[p])
|
|
374
|
+
if (Mt || re)
|
|
375
375
|
try {
|
|
376
|
-
at(
|
|
376
|
+
at(g);
|
|
377
377
|
} catch {
|
|
378
378
|
}
|
|
379
379
|
else
|
|
380
380
|
try {
|
|
381
|
-
|
|
381
|
+
g.setAttribute(p, "");
|
|
382
382
|
} catch {
|
|
383
383
|
}
|
|
384
384
|
}, jn = function(p) {
|
|
385
|
-
let
|
|
385
|
+
let g = null, E = null;
|
|
386
386
|
if (Ne)
|
|
387
387
|
p = "<remove></remove>" + p;
|
|
388
388
|
else {
|
|
389
389
|
const W = ro(p, /^[\r\n\t ]+/);
|
|
390
390
|
E = W && W[0];
|
|
391
391
|
}
|
|
392
|
-
Yt === "application/xhtml+xml" &&
|
|
393
|
-
const
|
|
394
|
-
if (
|
|
392
|
+
Yt === "application/xhtml+xml" && zt === mt && (p = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + p + "</body></html>");
|
|
393
|
+
const B = x ? x.createHTML(p) : p;
|
|
394
|
+
if (zt === mt)
|
|
395
395
|
try {
|
|
396
|
-
|
|
396
|
+
g = new f().parseFromString(B, Yt);
|
|
397
397
|
} catch {
|
|
398
398
|
}
|
|
399
|
-
if (!
|
|
400
|
-
|
|
399
|
+
if (!g || !g.documentElement) {
|
|
400
|
+
g = y.createDocument(zt, "template", null);
|
|
401
401
|
try {
|
|
402
|
-
|
|
402
|
+
g.documentElement.innerHTML = Be ? T : B;
|
|
403
403
|
} catch {
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
const K =
|
|
407
|
-
return p && E && K.insertBefore(e.createTextNode(E), K.childNodes[0] || null),
|
|
406
|
+
const K = g.body || g.documentElement;
|
|
407
|
+
return p && E && K.insertBefore(e.createTextNode(E), K.childNodes[0] || null), zt === mt ? z.call(g, xt ? "html" : "body")[0] : xt ? g.documentElement : K;
|
|
408
408
|
}, Yn = function(p) {
|
|
409
|
-
return
|
|
409
|
+
return m.call(
|
|
410
410
|
p.ownerDocument || p,
|
|
411
411
|
p,
|
|
412
412
|
// eslint-disable-next-line no-bitwise
|
|
@@ -417,59 +417,59 @@ function tr() {
|
|
|
417
417
|
return p instanceof h && (typeof p.nodeName != "string" || typeof p.textContent != "string" || typeof p.removeChild != "function" || !(p.attributes instanceof u) || typeof p.removeAttribute != "function" || typeof p.setAttribute != "function" || typeof p.namespaceURI != "string" || typeof p.insertBefore != "function" || typeof p.hasChildNodes != "function");
|
|
418
418
|
}, Wn = function(p) {
|
|
419
419
|
return typeof i == "function" && p instanceof i;
|
|
420
|
-
}, gt = function(p,
|
|
421
|
-
L[p] && le(L[p], (
|
|
422
|
-
|
|
420
|
+
}, gt = function(p, g, E) {
|
|
421
|
+
L[p] && le(L[p], (B) => {
|
|
422
|
+
B.call(t, g, E, Nt);
|
|
423
423
|
});
|
|
424
424
|
}, Xn = function(p) {
|
|
425
|
-
let
|
|
425
|
+
let g = null;
|
|
426
426
|
if (gt("beforeSanitizeElements", p, null), Zn(p))
|
|
427
427
|
return at(p), !0;
|
|
428
428
|
const E = Y(p.nodeName);
|
|
429
429
|
if (gt("uponSanitizeElement", p, {
|
|
430
430
|
tagName: E,
|
|
431
431
|
allowedTags: G
|
|
432
|
-
}), p.hasChildNodes() && !Wn(p.firstElementChild) &&
|
|
432
|
+
}), p.hasChildNodes() && !Wn(p.firstElementChild) && $(/<[/\w]/g, p.innerHTML) && $(/<[/\w]/g, p.textContent) || p.nodeType === Jt.progressingInstruction || Ie && p.nodeType === Jt.comment && $(/<[/\w]/g, p.data))
|
|
433
433
|
return at(p), !0;
|
|
434
434
|
if (!G[E] || Gt[E]) {
|
|
435
|
-
if (!Gt[E] && Jn(E) && (V.tagNameCheck instanceof RegExp &&
|
|
435
|
+
if (!Gt[E] && Jn(E) && (V.tagNameCheck instanceof RegExp && $(V.tagNameCheck, E) || V.tagNameCheck instanceof Function && V.tagNameCheck(E)))
|
|
436
436
|
return !1;
|
|
437
|
-
if (Pe && !
|
|
438
|
-
const
|
|
439
|
-
if (K &&
|
|
437
|
+
if (Pe && !It[E]) {
|
|
438
|
+
const B = v(p) || p.parentNode, K = A(p) || p.childNodes;
|
|
439
|
+
if (K && B) {
|
|
440
440
|
const W = K.length;
|
|
441
441
|
for (let et = W - 1; et >= 0; --et) {
|
|
442
442
|
const lt = k(K[et], !0);
|
|
443
|
-
lt.__removalCount = (p.__removalCount || 0) + 1,
|
|
443
|
+
lt.__removalCount = (p.__removalCount || 0) + 1, B.insertBefore(lt, D(p));
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
447
|
return at(p), !0;
|
|
448
448
|
}
|
|
449
|
-
return p instanceof a && !Lr(p) || (E === "noscript" || E === "noembed" || E === "noframes") &&
|
|
450
|
-
|
|
451
|
-
}), p.textContent !==
|
|
449
|
+
return p instanceof a && !Lr(p) || (E === "noscript" || E === "noembed" || E === "noframes") && $(/<\/no(script|embed|frames)/i, p.innerHTML) ? (at(p), !0) : (Rt && p.nodeType === Jt.text && (g = p.textContent, le([X, C, O], (B) => {
|
|
450
|
+
g = Xt(g, B, " ");
|
|
451
|
+
}), p.textContent !== g && (Wt(t.removed, {
|
|
452
452
|
element: p.cloneNode()
|
|
453
|
-
}), p.textContent =
|
|
454
|
-
}, Kn = function(p,
|
|
455
|
-
if (Fn && (
|
|
453
|
+
}), p.textContent = g)), gt("afterSanitizeElements", p, null), !1);
|
|
454
|
+
}, Kn = function(p, g, E) {
|
|
455
|
+
if (Fn && (g === "id" || g === "name") && (E in e || E in Sr))
|
|
456
456
|
return !1;
|
|
457
|
-
if (!(Fe && !Me[
|
|
458
|
-
if (!(qn &&
|
|
459
|
-
if (!j[
|
|
457
|
+
if (!(Fe && !Me[g] && $(b, g))) {
|
|
458
|
+
if (!(qn && $(q, g))) {
|
|
459
|
+
if (!j[g] || Me[g]) {
|
|
460
460
|
if (
|
|
461
461
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
462
462
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
463
463
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
464
|
-
!(Jn(p) && (V.tagNameCheck instanceof RegExp &&
|
|
464
|
+
!(Jn(p) && (V.tagNameCheck instanceof RegExp && $(V.tagNameCheck, p) || V.tagNameCheck instanceof Function && V.tagNameCheck(p)) && (V.attributeNameCheck instanceof RegExp && $(V.attributeNameCheck, g) || V.attributeNameCheck instanceof Function && V.attributeNameCheck(g)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
465
465
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
466
|
-
|
|
466
|
+
g === "is" && V.allowCustomizedBuiltInElements && (V.tagNameCheck instanceof RegExp && $(V.tagNameCheck, E) || V.tagNameCheck instanceof Function && V.tagNameCheck(E)))
|
|
467
467
|
)
|
|
468
468
|
return !1;
|
|
469
|
-
} else if (!Oe[
|
|
470
|
-
if (
|
|
471
|
-
if (!((
|
|
472
|
-
if (!(Rn &&
|
|
469
|
+
} else if (!Oe[g]) {
|
|
470
|
+
if (!$(Sn, Xt(E, Z, ""))) {
|
|
471
|
+
if (!((g === "src" || g === "xlink:href" || g === "href") && p !== "script" && es(E, "data:") === 0 && Nn[p])) {
|
|
472
|
+
if (!(Rn && !$(w, Xt(E, Z, "")))) {
|
|
473
473
|
if (E)
|
|
474
474
|
return !1;
|
|
475
475
|
}
|
|
@@ -480,13 +480,13 @@ function tr() {
|
|
|
480
480
|
}
|
|
481
481
|
return !0;
|
|
482
482
|
}, Jn = function(p) {
|
|
483
|
-
return p !== "annotation-xml" && ro(p,
|
|
483
|
+
return p !== "annotation-xml" && ro(p, qt);
|
|
484
484
|
}, Qn = function(p) {
|
|
485
485
|
gt("beforeSanitizeAttributes", p, null);
|
|
486
486
|
const {
|
|
487
|
-
attributes:
|
|
487
|
+
attributes: g
|
|
488
488
|
} = p;
|
|
489
|
-
if (!
|
|
489
|
+
if (!g)
|
|
490
490
|
return;
|
|
491
491
|
const E = {
|
|
492
492
|
attrName: "",
|
|
@@ -494,56 +494,56 @@ function tr() {
|
|
|
494
494
|
keepAttr: !0,
|
|
495
495
|
allowedAttributes: j
|
|
496
496
|
};
|
|
497
|
-
let
|
|
498
|
-
for (;
|
|
499
|
-
const K =
|
|
497
|
+
let B = g.length;
|
|
498
|
+
for (; B--; ) {
|
|
499
|
+
const K = g[B], {
|
|
500
500
|
name: W,
|
|
501
501
|
namespaceURI: et,
|
|
502
502
|
value: lt
|
|
503
503
|
} = K, Zt = Y(W);
|
|
504
|
-
let
|
|
505
|
-
if (E.attrName = Zt, E.attrValue =
|
|
504
|
+
let Q = W === "value" ? lt : ns(lt);
|
|
505
|
+
if (E.attrName = Zt, E.attrValue = Q, E.keepAttr = !0, E.forceKeepAttr = void 0, gt("uponSanitizeAttribute", p, E), Q = E.attrValue, E.forceKeepAttr || (ae(W, p), !E.keepAttr))
|
|
506
506
|
continue;
|
|
507
|
-
if (!Mn &&
|
|
507
|
+
if (!Mn && $(/\/>/i, Q)) {
|
|
508
508
|
ae(W, p);
|
|
509
509
|
continue;
|
|
510
510
|
}
|
|
511
|
-
if (Ie &&
|
|
511
|
+
if (Ie && $(/((--!?|])>)|<\/(style|title)/i, Q)) {
|
|
512
512
|
ae(W, p);
|
|
513
513
|
continue;
|
|
514
514
|
}
|
|
515
|
-
|
|
516
|
-
|
|
515
|
+
Rt && le([X, C, O], (to) => {
|
|
516
|
+
Q = Xt(Q, to, " ");
|
|
517
517
|
});
|
|
518
518
|
const $n = Y(p.nodeName);
|
|
519
|
-
if (Kn($n, Zt,
|
|
520
|
-
if (In && (Zt === "id" || Zt === "name") && (ae(W, p),
|
|
519
|
+
if (Kn($n, Zt, Q)) {
|
|
520
|
+
if (In && (Zt === "id" || Zt === "name") && (ae(W, p), Q = wr + Q), x && typeof d == "object" && typeof d.getAttributeType == "function" && !et)
|
|
521
521
|
switch (d.getAttributeType($n, Zt)) {
|
|
522
522
|
case "TrustedHTML": {
|
|
523
|
-
|
|
523
|
+
Q = x.createHTML(Q);
|
|
524
524
|
break;
|
|
525
525
|
}
|
|
526
526
|
case "TrustedScriptURL": {
|
|
527
|
-
|
|
527
|
+
Q = x.createScriptURL(Q);
|
|
528
528
|
break;
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
try {
|
|
532
|
-
et ? p.setAttributeNS(et, W,
|
|
532
|
+
et ? p.setAttributeNS(et, W, Q) : p.setAttribute(W, Q), Zn(p) ? at(p) : oo(t.removed);
|
|
533
533
|
} catch {
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
gt("afterSanitizeAttributes", p, null);
|
|
538
538
|
}, qr = function S(p) {
|
|
539
|
-
let
|
|
539
|
+
let g = null;
|
|
540
540
|
const E = Yn(p);
|
|
541
|
-
for (gt("beforeSanitizeShadowDOM", p, null);
|
|
542
|
-
gt("uponSanitizeShadowNode",
|
|
541
|
+
for (gt("beforeSanitizeShadowDOM", p, null); g = E.nextNode(); )
|
|
542
|
+
gt("uponSanitizeShadowNode", g, null), !Xn(g) && (g.content instanceof r && S(g.content), Qn(g));
|
|
543
543
|
gt("afterSanitizeShadowDOM", p, null);
|
|
544
544
|
};
|
|
545
545
|
return t.sanitize = function(S) {
|
|
546
|
-
let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
|
546
|
+
let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, g = null, E = null, B = null, K = null;
|
|
547
547
|
if (Be = !S, Be && (S = "<!-->"), typeof S != "string" && !Wn(S))
|
|
548
548
|
if (typeof S.toString == "function") {
|
|
549
549
|
if (S = S.toString(), typeof S != "string")
|
|
@@ -559,42 +559,42 @@ function tr() {
|
|
|
559
559
|
throw Kt("root node is forbidden and cannot be sanitized in-place");
|
|
560
560
|
}
|
|
561
561
|
} else if (S instanceof i)
|
|
562
|
-
|
|
562
|
+
g = jn("<!---->"), E = g.ownerDocument.importNode(S, !0), E.nodeType === Jt.element && E.nodeName === "BODY" || E.nodeName === "HTML" ? g = E : g.appendChild(E);
|
|
563
563
|
else {
|
|
564
|
-
if (!
|
|
564
|
+
if (!Mt && !Rt && !xt && // eslint-disable-next-line unicorn/prefer-includes
|
|
565
565
|
S.indexOf("<") === -1)
|
|
566
|
-
return
|
|
567
|
-
if (
|
|
568
|
-
return
|
|
566
|
+
return x && se ? x.createHTML(S) : S;
|
|
567
|
+
if (g = jn(S), !g)
|
|
568
|
+
return Mt ? null : se ? T : "";
|
|
569
569
|
}
|
|
570
|
-
|
|
571
|
-
const W = Yn(jt ? S :
|
|
572
|
-
for (;
|
|
573
|
-
Xn(
|
|
570
|
+
g && Ne && at(g.firstChild);
|
|
571
|
+
const W = Yn(jt ? S : g);
|
|
572
|
+
for (; B = W.nextNode(); )
|
|
573
|
+
Xn(B) || (B.content instanceof r && qr(B.content), Qn(B));
|
|
574
574
|
if (jt)
|
|
575
575
|
return S;
|
|
576
|
-
if (
|
|
576
|
+
if (Mt) {
|
|
577
577
|
if (re)
|
|
578
|
-
for (K = R.call(
|
|
579
|
-
K.appendChild(
|
|
578
|
+
for (K = R.call(g.ownerDocument); g.firstChild; )
|
|
579
|
+
K.appendChild(g.firstChild);
|
|
580
580
|
else
|
|
581
|
-
K =
|
|
582
|
-
return (j.shadowroot || j.shadowrootmode) && (K =
|
|
581
|
+
K = g;
|
|
582
|
+
return (j.shadowroot || j.shadowrootmode) && (K = J.call(o, K, !0)), K;
|
|
583
583
|
}
|
|
584
|
-
let et = xt ?
|
|
585
|
-
return xt && G["!doctype"] &&
|
|
586
|
-
` + et),
|
|
584
|
+
let et = xt ? g.outerHTML : g.innerHTML;
|
|
585
|
+
return xt && G["!doctype"] && g.ownerDocument && g.ownerDocument.doctype && g.ownerDocument.doctype.name && $($o, g.ownerDocument.doctype.name) && (et = "<!DOCTYPE " + g.ownerDocument.doctype.name + `>
|
|
586
|
+
` + et), Rt && le([X, C, O], (lt) => {
|
|
587
587
|
et = Xt(et, lt, " ");
|
|
588
|
-
}),
|
|
588
|
+
}), x && se ? x.createHTML(et) : et;
|
|
589
589
|
}, t.setConfig = function() {
|
|
590
590
|
let S = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
591
591
|
He(S), ze = !0;
|
|
592
592
|
}, t.clearConfig = function() {
|
|
593
|
-
|
|
594
|
-
}, t.isValidAttribute = function(S, p,
|
|
595
|
-
|
|
596
|
-
const E = Y(S),
|
|
597
|
-
return Kn(E,
|
|
593
|
+
Nt = null, ze = !1;
|
|
594
|
+
}, t.isValidAttribute = function(S, p, g) {
|
|
595
|
+
Nt || He({});
|
|
596
|
+
const E = Y(S), B = Y(p);
|
|
597
|
+
return Kn(E, B, g);
|
|
598
598
|
}, t.addHook = function(S, p) {
|
|
599
599
|
typeof p == "function" && (L[S] = L[S] || [], Wt(L[S], p));
|
|
600
600
|
}, t.removeHook = function(S) {
|
|
@@ -2882,28 +2882,28 @@ ye.prototype.parse = function(n, t) {
|
|
|
2882
2882
|
u === -1 && (u = i.length), i[u - 1] === ":" && u--;
|
|
2883
2883
|
var d = i.slice(0, u);
|
|
2884
2884
|
i = i.slice(u), this.parseHost(d), this.hostname = this.hostname || "";
|
|
2885
|
-
var
|
|
2886
|
-
if (!
|
|
2885
|
+
var _ = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
2886
|
+
if (!_) {
|
|
2887
2887
|
var k = this.hostname.split(/\./);
|
|
2888
2888
|
for (e = 0, o = k.length; e < o; e++) {
|
|
2889
|
-
var
|
|
2890
|
-
if (
|
|
2891
|
-
for (var A = "",
|
|
2892
|
-
|
|
2889
|
+
var D = k[e];
|
|
2890
|
+
if (D && !D.match(mo)) {
|
|
2891
|
+
for (var A = "", v = 0, x = D.length; v < x; v++)
|
|
2892
|
+
D.charCodeAt(v) > 127 ? A += "x" : A += D[v];
|
|
2893
2893
|
if (!A.match(mo)) {
|
|
2894
|
-
var
|
|
2895
|
-
|
|
2894
|
+
var T = k.slice(0, e), y = k.slice(e + 1), m = D.match(J7);
|
|
2895
|
+
m && (T.push(m[1]), y.unshift(m[2])), y.length && (i = y.join(".") + i), this.hostname = T.join(".");
|
|
2896
2896
|
break;
|
|
2897
2897
|
}
|
|
2898
2898
|
}
|
|
2899
2899
|
}
|
|
2900
2900
|
}
|
|
2901
|
-
this.hostname.length > K7 && (this.hostname = ""),
|
|
2901
|
+
this.hostname.length > K7 && (this.hostname = ""), _ && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
|
|
2902
2902
|
}
|
|
2903
2903
|
var R = i.indexOf("#");
|
|
2904
2904
|
R !== -1 && (this.hash = i.substr(R), i = i.slice(0, R));
|
|
2905
|
-
var
|
|
2906
|
-
return
|
|
2905
|
+
var z = i.indexOf("?");
|
|
2906
|
+
return z !== -1 && (this.search = i.substr(z), i = i.slice(0, z)), i && (this.pathname = i), bo[s] && this.hostname && !this.pathname && (this.pathname = ""), this;
|
|
2907
2907
|
};
|
|
2908
2908
|
ye.prototype.parseHost = function(n) {
|
|
2909
2909
|
var t = j7.exec(n);
|
|
@@ -2935,83 +2935,83 @@ function eI() {
|
|
|
2935
2935
|
return xo || (xo = 1, wt.Any = nr(), wt.Cc = or(), wt.Cf = tI(), wt.P = _n, wt.Z = rr()), wt;
|
|
2936
2936
|
}
|
|
2937
2937
|
(function(n) {
|
|
2938
|
-
function t(
|
|
2939
|
-
return Object.prototype.toString.call(
|
|
2938
|
+
function t(b) {
|
|
2939
|
+
return Object.prototype.toString.call(b);
|
|
2940
2940
|
}
|
|
2941
|
-
function e(
|
|
2942
|
-
return t(
|
|
2941
|
+
function e(b) {
|
|
2942
|
+
return t(b) === "[object String]";
|
|
2943
2943
|
}
|
|
2944
2944
|
var o = Object.prototype.hasOwnProperty;
|
|
2945
|
-
function s(
|
|
2946
|
-
return o.call(
|
|
2945
|
+
function s(b, q) {
|
|
2946
|
+
return o.call(b, q);
|
|
2947
2947
|
}
|
|
2948
|
-
function r(
|
|
2948
|
+
function r(b) {
|
|
2949
2949
|
var q = Array.prototype.slice.call(arguments, 1);
|
|
2950
2950
|
return q.forEach(function(w) {
|
|
2951
2951
|
if (w) {
|
|
2952
2952
|
if (typeof w != "object")
|
|
2953
2953
|
throw new TypeError(w + "must be object");
|
|
2954
2954
|
Object.keys(w).forEach(function(Z) {
|
|
2955
|
-
|
|
2955
|
+
b[Z] = w[Z];
|
|
2956
2956
|
});
|
|
2957
2957
|
}
|
|
2958
|
-
}),
|
|
2958
|
+
}), b;
|
|
2959
2959
|
}
|
|
2960
|
-
function c(
|
|
2961
|
-
return [].concat(
|
|
2960
|
+
function c(b, q, w) {
|
|
2961
|
+
return [].concat(b.slice(0, q), w, b.slice(q + 1));
|
|
2962
2962
|
}
|
|
2963
|
-
function i(
|
|
2964
|
-
return !(
|
|
2963
|
+
function i(b) {
|
|
2964
|
+
return !(b >= 55296 && b <= 57343 || b >= 64976 && b <= 65007 || (b & 65535) === 65535 || (b & 65535) === 65534 || b >= 0 && b <= 8 || b === 11 || b >= 14 && b <= 31 || b >= 127 && b <= 159 || b > 1114111);
|
|
2965
2965
|
}
|
|
2966
|
-
function a(
|
|
2967
|
-
if (
|
|
2968
|
-
|
|
2969
|
-
var q = 55296 + (
|
|
2966
|
+
function a(b) {
|
|
2967
|
+
if (b > 65535) {
|
|
2968
|
+
b -= 65536;
|
|
2969
|
+
var q = 55296 + (b >> 10), w = 56320 + (b & 1023);
|
|
2970
2970
|
return String.fromCharCode(q, w);
|
|
2971
2971
|
}
|
|
2972
|
-
return String.fromCharCode(
|
|
2972
|
+
return String.fromCharCode(b);
|
|
2973
2973
|
}
|
|
2974
2974
|
var l = /\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g, u = /&([a-z#][a-z0-9]{1,31});/gi, h = new RegExp(l.source + "|" + u.source, "gi"), f = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i, d = er;
|
|
2975
|
-
function b
|
|
2975
|
+
function _(b, q) {
|
|
2976
2976
|
var w;
|
|
2977
|
-
return s(d, q) ? d[q] : q.charCodeAt(0) === 35 && f.test(q) && (w = q[1].toLowerCase() === "x" ? parseInt(q.slice(2), 16) : parseInt(q.slice(1), 10), i(w)) ? a(w) :
|
|
2977
|
+
return s(d, q) ? d[q] : q.charCodeAt(0) === 35 && f.test(q) && (w = q[1].toLowerCase() === "x" ? parseInt(q.slice(2), 16) : parseInt(q.slice(1), 10), i(w)) ? a(w) : b;
|
|
2978
2978
|
}
|
|
2979
|
-
function k(
|
|
2980
|
-
return
|
|
2979
|
+
function k(b) {
|
|
2980
|
+
return b.indexOf("\\") < 0 ? b : b.replace(l, "$1");
|
|
2981
2981
|
}
|
|
2982
|
-
function
|
|
2983
|
-
return
|
|
2984
|
-
return w ||
|
|
2982
|
+
function D(b) {
|
|
2983
|
+
return b.indexOf("\\") < 0 && b.indexOf("&") < 0 ? b : b.replace(h, function(q, w, Z) {
|
|
2984
|
+
return w || _(q, Z);
|
|
2985
2985
|
});
|
|
2986
2986
|
}
|
|
2987
|
-
var A = /[&<>"]/,
|
|
2987
|
+
var A = /[&<>"]/, v = /[&<>"]/g, x = {
|
|
2988
2988
|
"&": "&",
|
|
2989
2989
|
"<": "<",
|
|
2990
2990
|
">": ">",
|
|
2991
2991
|
'"': """
|
|
2992
2992
|
};
|
|
2993
|
-
function
|
|
2994
|
-
return
|
|
2993
|
+
function T(b) {
|
|
2994
|
+
return x[b];
|
|
2995
2995
|
}
|
|
2996
|
-
function
|
|
2997
|
-
return A.test(
|
|
2996
|
+
function y(b) {
|
|
2997
|
+
return A.test(b) ? b.replace(v, T) : b;
|
|
2998
2998
|
}
|
|
2999
|
-
var
|
|
3000
|
-
function R(
|
|
3001
|
-
return
|
|
2999
|
+
var m = /[.?*+^$[\]\\(){}|-]/g;
|
|
3000
|
+
function R(b) {
|
|
3001
|
+
return b.replace(m, "\\$&");
|
|
3002
3002
|
}
|
|
3003
|
-
function
|
|
3004
|
-
switch (
|
|
3003
|
+
function z(b) {
|
|
3004
|
+
switch (b) {
|
|
3005
3005
|
case 9:
|
|
3006
3006
|
case 32:
|
|
3007
3007
|
return !0;
|
|
3008
3008
|
}
|
|
3009
3009
|
return !1;
|
|
3010
3010
|
}
|
|
3011
|
-
function
|
|
3012
|
-
if (
|
|
3011
|
+
function J(b) {
|
|
3012
|
+
if (b >= 8192 && b <= 8202)
|
|
3013
3013
|
return !0;
|
|
3014
|
-
switch (
|
|
3014
|
+
switch (b) {
|
|
3015
3015
|
case 9:
|
|
3016
3016
|
case 10:
|
|
3017
3017
|
case 11:
|
|
@@ -3028,11 +3028,11 @@ function eI() {
|
|
|
3028
3028
|
return !1;
|
|
3029
3029
|
}
|
|
3030
3030
|
var L = _n;
|
|
3031
|
-
function X(
|
|
3032
|
-
return L.test(
|
|
3031
|
+
function X(b) {
|
|
3032
|
+
return L.test(b);
|
|
3033
3033
|
}
|
|
3034
|
-
function
|
|
3035
|
-
switch (
|
|
3034
|
+
function C(b) {
|
|
3035
|
+
switch (b) {
|
|
3036
3036
|
case 33:
|
|
3037
3037
|
case 34:
|
|
3038
3038
|
case 35:
|
|
@@ -3070,10 +3070,10 @@ function eI() {
|
|
|
3070
3070
|
return !1;
|
|
3071
3071
|
}
|
|
3072
3072
|
}
|
|
3073
|
-
function
|
|
3074
|
-
return
|
|
3073
|
+
function O(b) {
|
|
3074
|
+
return b = b.trim().replace(/\s+/g, " "), "ẞ".toLowerCase() === "Ṿ" && (b = b.replace(/ẞ/g, "ß")), b.toLowerCase().toUpperCase();
|
|
3075
3075
|
}
|
|
3076
|
-
n.lib = {}, n.lib.mdurl = Ut, n.lib.ucmicro = eI(), n.assign = r, n.isString = e, n.has = s, n.unescapeMd = k, n.unescapeAll =
|
|
3076
|
+
n.lib = {}, n.lib.mdurl = Ut, n.lib.ucmicro = eI(), n.assign = r, n.isString = e, n.has = s, n.unescapeMd = k, n.unescapeAll = D, n.isValidEntityCode = i, n.fromCodePoint = a, n.escapeHtml = y, n.arrayReplaceAt = c, n.isSpace = z, n.isWhiteSpace = J, n.isMdAsciiPunct = C, n.isPunctChar = X, n.escapeRE = R, n.normalizeReference = O;
|
|
3077
3077
|
})(I);
|
|
3078
3078
|
var Ce = {}, nI = function(t, e, o) {
|
|
3079
3079
|
var s, r, c, i, a = -1, l = t.posMax, u = t.pos;
|
|
@@ -3149,19 +3149,19 @@ var Ce = {}, nI = function(t, e, o) {
|
|
|
3149
3149
|
Ce.parseLinkLabel = nI;
|
|
3150
3150
|
Ce.parseLinkDestination = oI;
|
|
3151
3151
|
Ce.parseLinkTitle = sI;
|
|
3152
|
-
var cI = I.assign, iI = I.unescapeAll,
|
|
3152
|
+
var cI = I.assign, iI = I.unescapeAll, Lt = I.escapeHtml, ht = {};
|
|
3153
3153
|
ht.code_inline = function(n, t, e, o, s) {
|
|
3154
3154
|
var r = n[t];
|
|
3155
|
-
return "<code" + s.renderAttrs(r) + ">" +
|
|
3155
|
+
return "<code" + s.renderAttrs(r) + ">" + Lt(r.content) + "</code>";
|
|
3156
3156
|
};
|
|
3157
3157
|
ht.code_block = function(n, t, e, o, s) {
|
|
3158
3158
|
var r = n[t];
|
|
3159
|
-
return "<pre" + s.renderAttrs(r) + "><code>" +
|
|
3159
|
+
return "<pre" + s.renderAttrs(r) + "><code>" + Lt(n[t].content) + `</code></pre>
|
|
3160
3160
|
`;
|
|
3161
3161
|
};
|
|
3162
3162
|
ht.fence = function(n, t, e, o, s) {
|
|
3163
3163
|
var r = n[t], c = r.info ? iI(r.info).trim() : "", i = "", a = "", l, u, h, f, d;
|
|
3164
|
-
return c && (h = c.split(/(\s+)/g), i = h[0], a = h.slice(2).join("")), e.highlight ? l = e.highlight(r.content, i, a) ||
|
|
3164
|
+
return c && (h = c.split(/(\s+)/g), i = h[0], a = h.slice(2).join("")), e.highlight ? l = e.highlight(r.content, i, a) || Lt(r.content) : l = Lt(r.content), l.indexOf("<pre") === 0 ? l + `
|
|
3165
3165
|
` : c ? (u = r.attrIndex("class"), f = r.attrs ? r.attrs.slice() : [], u < 0 ? f.push(["class", e.langPrefix + i]) : (f[u] = f[u].slice(), f[u][1] += " " + e.langPrefix + i), d = {
|
|
3166
3166
|
attrs: f
|
|
3167
3167
|
}, "<pre><code" + s.renderAttrs(d) + ">" + l + `</code></pre>
|
|
@@ -3184,7 +3184,7 @@ ht.softbreak = function(n, t, e) {
|
|
|
3184
3184
|
`;
|
|
3185
3185
|
};
|
|
3186
3186
|
ht.text = function(n, t) {
|
|
3187
|
-
return
|
|
3187
|
+
return Lt(n[t].content);
|
|
3188
3188
|
};
|
|
3189
3189
|
ht.html_block = function(n, t) {
|
|
3190
3190
|
return n[t].content;
|
|
@@ -3200,7 +3200,7 @@ Ht.prototype.renderAttrs = function(t) {
|
|
|
3200
3200
|
if (!t.attrs)
|
|
3201
3201
|
return "";
|
|
3202
3202
|
for (s = "", e = 0, o = t.attrs.length; e < o; e++)
|
|
3203
|
-
s += " " +
|
|
3203
|
+
s += " " + Lt(t.attrs[e][0]) + '="' + Lt(t.attrs[e][1]) + '"';
|
|
3204
3204
|
return s;
|
|
3205
3205
|
};
|
|
3206
3206
|
Ht.prototype.renderToken = function(t, e, o) {
|
|
@@ -3338,20 +3338,20 @@ function gI(n) {
|
|
|
3338
3338
|
return /^<\/a\s*>/i.test(n);
|
|
3339
3339
|
}
|
|
3340
3340
|
var bI = function(t) {
|
|
3341
|
-
var e, o, s, r, c, i, a, l, u, h, f, d,
|
|
3341
|
+
var e, o, s, r, c, i, a, l, u, h, f, d, _, k, D, A, v = t.tokens, x;
|
|
3342
3342
|
if (t.md.options.linkify) {
|
|
3343
|
-
for (o = 0, s =
|
|
3344
|
-
if (!(
|
|
3345
|
-
for (r =
|
|
3343
|
+
for (o = 0, s = v.length; o < s; o++)
|
|
3344
|
+
if (!(v[o].type !== "inline" || !t.md.linkify.pretest(v[o].content)))
|
|
3345
|
+
for (r = v[o].children, _ = 0, e = r.length - 1; e >= 0; e--) {
|
|
3346
3346
|
if (i = r[e], i.type === "link_close") {
|
|
3347
3347
|
for (e--; r[e].level !== i.level && r[e].type !== "link_open"; )
|
|
3348
3348
|
e--;
|
|
3349
3349
|
continue;
|
|
3350
3350
|
}
|
|
3351
|
-
if (i.type === "html_inline" && (mI(i.content) &&
|
|
3352
|
-
for (u = i.content,
|
|
3353
|
-
k =
|
|
3354
|
-
f < u.length && (c = new t.Token("text", "", 0), c.content = u.slice(f), c.level = d, a.push(c)),
|
|
3351
|
+
if (i.type === "html_inline" && (mI(i.content) && _ > 0 && _--, gI(i.content) && _++), !(_ > 0) && i.type === "text" && t.md.linkify.test(i.content)) {
|
|
3352
|
+
for (u = i.content, x = t.md.linkify.match(u), a = [], d = i.level, f = 0, x.length > 0 && x[0].index === 0 && e > 0 && r[e - 1].type === "text_special" && (x = x.slice(1)), l = 0; l < x.length; l++)
|
|
3353
|
+
k = x[l].url, D = t.md.normalizeLink(k), t.md.validateLink(D) && (A = x[l].text, x[l].schema ? x[l].schema === "mailto:" && !/^mailto:/i.test(A) ? A = t.md.normalizeLinkText("mailto:" + A).replace(/^mailto:/, "") : A = t.md.normalizeLinkText(A) : A = t.md.normalizeLinkText("http://" + A).replace(/^http:\/\//, ""), h = x[l].index, h > f && (c = new t.Token("text", "", 0), c.content = u.slice(f, h), c.level = d, a.push(c)), c = new t.Token("link_open", "a", 1), c.attrs = [["href", D]], c.level = d++, c.markup = "linkify", c.info = "auto", a.push(c), c = new t.Token("text", "", 0), c.content = A, c.level = d, a.push(c), c = new t.Token("link_close", "a", -1), c.level = --d, c.markup = "linkify", c.info = "auto", a.push(c), f = x[l].lastIndex);
|
|
3354
|
+
f < u.length && (c = new t.Token("text", "", 0), c.content = u.slice(f), c.level = d, a.push(c)), v[o].children = r = dI(r, e, a);
|
|
3355
3355
|
}
|
|
3356
3356
|
}
|
|
3357
3357
|
}
|
|
@@ -3383,51 +3383,51 @@ function fe(n, t, e) {
|
|
|
3383
3383
|
return n.slice(0, t) + e + n.slice(t + 1);
|
|
3384
3384
|
}
|
|
3385
3385
|
function CI(n, t) {
|
|
3386
|
-
var e, o, s, r, c, i, a, l, u, h, f, d,
|
|
3387
|
-
for (
|
|
3388
|
-
for (o = n[e], a = n[e].level,
|
|
3386
|
+
var e, o, s, r, c, i, a, l, u, h, f, d, _, k, D, A, v, x, T, y, m;
|
|
3387
|
+
for (T = [], e = 0; e < n.length; e++) {
|
|
3388
|
+
for (o = n[e], a = n[e].level, v = T.length - 1; v >= 0 && !(T[v].level <= a); v--)
|
|
3389
3389
|
;
|
|
3390
|
-
if (
|
|
3390
|
+
if (T.length = v + 1, o.type === "text") {
|
|
3391
3391
|
s = o.content, c = 0, i = s.length;
|
|
3392
3392
|
t:
|
|
3393
3393
|
for (; c < i && (Do.lastIndex = c, r = Do.exec(s), !!r); ) {
|
|
3394
|
-
if (
|
|
3394
|
+
if (D = A = !0, c = r.index + 1, x = r[0] === "'", u = 32, r.index - 1 >= 0)
|
|
3395
3395
|
u = s.charCodeAt(r.index - 1);
|
|
3396
3396
|
else
|
|
3397
|
-
for (
|
|
3398
|
-
if (n[
|
|
3399
|
-
u = n[
|
|
3397
|
+
for (v = e - 1; v >= 0 && !(n[v].type === "softbreak" || n[v].type === "hardbreak"); v--)
|
|
3398
|
+
if (n[v].content) {
|
|
3399
|
+
u = n[v].content.charCodeAt(n[v].content.length - 1);
|
|
3400
3400
|
break;
|
|
3401
3401
|
}
|
|
3402
3402
|
if (h = 32, c < i)
|
|
3403
3403
|
h = s.charCodeAt(c);
|
|
3404
3404
|
else
|
|
3405
|
-
for (
|
|
3406
|
-
if (n[
|
|
3407
|
-
h = n[
|
|
3405
|
+
for (v = e + 1; v < n.length && !(n[v].type === "softbreak" || n[v].type === "hardbreak"); v++)
|
|
3406
|
+
if (n[v].content) {
|
|
3407
|
+
h = n[v].content.charCodeAt(0);
|
|
3408
3408
|
break;
|
|
3409
3409
|
}
|
|
3410
|
-
if (f = Co(u) || Eo(String.fromCharCode(u)), d = Co(h) || Eo(String.fromCharCode(h)),
|
|
3411
|
-
|
|
3410
|
+
if (f = Co(u) || Eo(String.fromCharCode(u)), d = Co(h) || Eo(String.fromCharCode(h)), _ = wo(u), k = wo(h), k ? D = !1 : d && (_ || f || (D = !1)), _ ? A = !1 : f && (k || d || (A = !1)), h === 34 && r[0] === '"' && u >= 48 && u <= 57 && (A = D = !1), D && A && (D = f, A = d), !D && !A) {
|
|
3411
|
+
x && (o.content = fe(o.content, r.index, So));
|
|
3412
3412
|
continue;
|
|
3413
3413
|
}
|
|
3414
3414
|
if (A) {
|
|
3415
|
-
for (
|
|
3416
|
-
if (l.single ===
|
|
3417
|
-
l =
|
|
3415
|
+
for (v = T.length - 1; v >= 0 && (l = T[v], !(T[v].level < a)); v--)
|
|
3416
|
+
if (l.single === x && T[v].level === a) {
|
|
3417
|
+
l = T[v], x ? (y = t.md.options.quotes[2], m = t.md.options.quotes[3]) : (y = t.md.options.quotes[0], m = t.md.options.quotes[1]), o.content = fe(o.content, r.index, m), n[l.token].content = fe(
|
|
3418
3418
|
n[l.token].content,
|
|
3419
3419
|
l.pos,
|
|
3420
|
-
|
|
3421
|
-
), c +=
|
|
3420
|
+
y
|
|
3421
|
+
), c += m.length - 1, l.token === e && (c += y.length - 1), s = o.content, i = s.length, T.length = v;
|
|
3422
3422
|
continue t;
|
|
3423
3423
|
}
|
|
3424
3424
|
}
|
|
3425
|
-
|
|
3425
|
+
D ? T.push({
|
|
3426
3426
|
token: e,
|
|
3427
3427
|
pos: r.index,
|
|
3428
|
-
single:
|
|
3428
|
+
single: x,
|
|
3429
3429
|
level: a
|
|
3430
|
-
}) : A &&
|
|
3430
|
+
}) : A && x && (o.content = fe(o.content, r.index, So));
|
|
3431
3431
|
}
|
|
3432
3432
|
}
|
|
3433
3433
|
}
|
|
@@ -3514,15 +3514,15 @@ function To(n) {
|
|
|
3514
3514
|
return t.push(i + n.substring(c)), t;
|
|
3515
3515
|
}
|
|
3516
3516
|
var MI = function(t, e, o, s) {
|
|
3517
|
-
var r, c, i, a, l, u, h, f, d,
|
|
3518
|
-
if (e + 2 > o || (u = e + 1, t.sCount[u] < t.blkIndent) || t.sCount[u] - t.blkIndent >= 4 || (i = t.bMarks[u] + t.tShift[u], i >= t.eMarks[u]) || (
|
|
3517
|
+
var r, c, i, a, l, u, h, f, d, _, k, D, A, v, x, T, y, m;
|
|
3518
|
+
if (e + 2 > o || (u = e + 1, t.sCount[u] < t.blkIndent) || t.sCount[u] - t.blkIndent >= 4 || (i = t.bMarks[u] + t.tShift[u], i >= t.eMarks[u]) || (y = t.src.charCodeAt(i++), y !== 124 && y !== 45 && y !== 58) || i >= t.eMarks[u] || (m = t.src.charCodeAt(i++), m !== 124 && m !== 45 && m !== 58 && !$e(m)) || y === 45 && $e(m))
|
|
3519
3519
|
return !1;
|
|
3520
3520
|
for (; i < t.eMarks[u]; ) {
|
|
3521
3521
|
if (r = t.src.charCodeAt(i), r !== 124 && r !== 45 && r !== 58 && !$e(r))
|
|
3522
3522
|
return !1;
|
|
3523
3523
|
i++;
|
|
3524
3524
|
}
|
|
3525
|
-
for (c = tn(t, e + 1), h = c.split("|"),
|
|
3525
|
+
for (c = tn(t, e + 1), h = c.split("|"), _ = [], a = 0; a < h.length; a++) {
|
|
3526
3526
|
if (k = h[a].trim(), !k) {
|
|
3527
3527
|
if (a === 0 || a === h.length - 1)
|
|
3528
3528
|
continue;
|
|
@@ -3530,27 +3530,27 @@ var MI = function(t, e, o, s) {
|
|
|
3530
3530
|
}
|
|
3531
3531
|
if (!/^:?-+:?$/.test(k))
|
|
3532
3532
|
return !1;
|
|
3533
|
-
k.charCodeAt(k.length - 1) === 58 ?
|
|
3533
|
+
k.charCodeAt(k.length - 1) === 58 ? _.push(k.charCodeAt(0) === 58 ? "center" : "right") : k.charCodeAt(0) === 58 ? _.push("left") : _.push("");
|
|
3534
3534
|
}
|
|
3535
|
-
if (c = tn(t, e).trim(), c.indexOf("|") === -1 || t.sCount[e] - t.blkIndent >= 4 || (h = To(c), h.length && h[0] === "" && h.shift(), h.length && h[h.length - 1] === "" && h.pop(), f = h.length, f === 0 || f !==
|
|
3535
|
+
if (c = tn(t, e).trim(), c.indexOf("|") === -1 || t.sCount[e] - t.blkIndent >= 4 || (h = To(c), h.length && h[0] === "" && h.shift(), h.length && h[h.length - 1] === "" && h.pop(), f = h.length, f === 0 || f !== _.length))
|
|
3536
3536
|
return !1;
|
|
3537
3537
|
if (s)
|
|
3538
3538
|
return !0;
|
|
3539
|
-
for (
|
|
3540
|
-
d = t.push("th_open", "th", 1),
|
|
3539
|
+
for (v = t.parentType, t.parentType = "table", T = t.md.block.ruler.getRules("blockquote"), d = t.push("table_open", "table", 1), d.map = D = [e, 0], d = t.push("thead_open", "thead", 1), d.map = [e, e + 1], d = t.push("tr_open", "tr", 1), d.map = [e, e + 1], a = 0; a < h.length; a++)
|
|
3540
|
+
d = t.push("th_open", "th", 1), _[a] && (d.attrs = [["style", "text-align:" + _[a]]]), d = t.push("inline", "", 0), d.content = h[a].trim(), d.children = [], d = t.push("th_close", "th", -1);
|
|
3541
3541
|
for (d = t.push("tr_close", "tr", -1), d = t.push("thead_close", "thead", -1), u = e + 2; u < o && !(t.sCount[u] < t.blkIndent); u++) {
|
|
3542
|
-
for (
|
|
3543
|
-
if (
|
|
3544
|
-
|
|
3542
|
+
for (x = !1, a = 0, l = T.length; a < l; a++)
|
|
3543
|
+
if (T[a](t, u, o, !0)) {
|
|
3544
|
+
x = !0;
|
|
3545
3545
|
break;
|
|
3546
3546
|
}
|
|
3547
|
-
if (
|
|
3547
|
+
if (x || (c = tn(t, u).trim(), !c) || t.sCount[u] - t.blkIndent >= 4)
|
|
3548
3548
|
break;
|
|
3549
3549
|
for (h = To(c), h.length && h[0] === "" && h.shift(), h.length && h[h.length - 1] === "" && h.pop(), u === e + 2 && (d = t.push("tbody_open", "tbody", 1), d.map = A = [e + 2, 0]), d = t.push("tr_open", "tr", 1), d.map = [u, u + 1], a = 0; a < f; a++)
|
|
3550
|
-
d = t.push("td_open", "td", 1),
|
|
3550
|
+
d = t.push("td_open", "td", 1), _[a] && (d.attrs = [["style", "text-align:" + _[a]]]), d = t.push("inline", "", 0), d.content = h[a] ? h[a].trim() : "", d.children = [], d = t.push("td_close", "td", -1);
|
|
3551
3551
|
d = t.push("tr_close", "tr", -1);
|
|
3552
3552
|
}
|
|
3553
|
-
return A && (d = t.push("tbody_close", "tbody", -1), A[1] = u), d = t.push("table_close", "table", -1),
|
|
3553
|
+
return A && (d = t.push("tbody_close", "tbody", -1), A[1] = u), d = t.push("table_close", "table", -1), D[1] = u, t.parentType = v, t.line = u, !0;
|
|
3554
3554
|
}, FI = function(t, e, o) {
|
|
3555
3555
|
var s, r, c;
|
|
3556
3556
|
if (t.sCount[e] - t.blkIndent < 4)
|
|
@@ -3569,48 +3569,48 @@ var MI = function(t, e, o, s) {
|
|
|
3569
3569
|
return t.line = r, c = t.push("code_block", "code", 0), c.content = t.getLines(e, r, 4 + t.blkIndent, !1) + `
|
|
3570
3570
|
`, c.map = [e, t.line], !0;
|
|
3571
3571
|
}, II = function(t, e, o, s) {
|
|
3572
|
-
var r, c, i, a, l, u, h, f = !1, d = t.bMarks[e] + t.tShift[e],
|
|
3573
|
-
if (t.sCount[e] - t.blkIndent >= 4 || d + 3 >
|
|
3572
|
+
var r, c, i, a, l, u, h, f = !1, d = t.bMarks[e] + t.tShift[e], _ = t.eMarks[e];
|
|
3573
|
+
if (t.sCount[e] - t.blkIndent >= 4 || d + 3 > _ || (r = t.src.charCodeAt(d), r !== 126 && r !== 96) || (l = d, d = t.skipChars(d, r), c = d - l, c < 3) || (h = t.src.slice(l, d), i = t.src.slice(d, _), r === 96 && i.indexOf(String.fromCharCode(r)) >= 0))
|
|
3574
3574
|
return !1;
|
|
3575
3575
|
if (s)
|
|
3576
3576
|
return !0;
|
|
3577
|
-
for (a = e; a++, !(a >= o || (d = l = t.bMarks[a] + t.tShift[a],
|
|
3578
|
-
if (t.src.charCodeAt(d) === r && !(t.sCount[a] - t.blkIndent >= 4) && (d = t.skipChars(d, r), !(d - l < c) && (d = t.skipSpaces(d), !(d <
|
|
3577
|
+
for (a = e; a++, !(a >= o || (d = l = t.bMarks[a] + t.tShift[a], _ = t.eMarks[a], d < _ && t.sCount[a] < t.blkIndent)); )
|
|
3578
|
+
if (t.src.charCodeAt(d) === r && !(t.sCount[a] - t.blkIndent >= 4) && (d = t.skipChars(d, r), !(d - l < c) && (d = t.skipSpaces(d), !(d < _)))) {
|
|
3579
3579
|
f = !0;
|
|
3580
3580
|
break;
|
|
3581
3581
|
}
|
|
3582
3582
|
return c = t.sCount[e], t.line = a + (f ? 1 : 0), u = t.push("fence", "code", 0), u.info = i, u.content = t.getLines(e + 1, a, c, !0), u.markup = h, u.map = [e, t.line], !0;
|
|
3583
3583
|
}, zI = I.isSpace, NI = function(t, e, o, s) {
|
|
3584
|
-
var r, c, i, a, l, u, h, f, d,
|
|
3584
|
+
var r, c, i, a, l, u, h, f, d, _, k, D, A, v, x, T, y, m, R, z, J = t.lineMax, L = t.bMarks[e] + t.tShift[e], X = t.eMarks[e];
|
|
3585
3585
|
if (t.sCount[e] - t.blkIndent >= 4 || t.src.charCodeAt(L) !== 62)
|
|
3586
3586
|
return !1;
|
|
3587
3587
|
if (s)
|
|
3588
3588
|
return !0;
|
|
3589
|
-
for (
|
|
3590
|
-
if (t.src.charCodeAt(L++) === 62 && !
|
|
3591
|
-
for (a = t.sCount[f] + 1, t.src.charCodeAt(L) === 32 ? (L++, a++, r = !1,
|
|
3589
|
+
for (_ = [], k = [], v = [], x = [], m = t.md.block.ruler.getRules("blockquote"), A = t.parentType, t.parentType = "blockquote", f = e; f < o && (z = t.sCount[f] < t.blkIndent, L = t.bMarks[f] + t.tShift[f], X = t.eMarks[f], !(L >= X)); f++) {
|
|
3590
|
+
if (t.src.charCodeAt(L++) === 62 && !z) {
|
|
3591
|
+
for (a = t.sCount[f] + 1, t.src.charCodeAt(L) === 32 ? (L++, a++, r = !1, T = !0) : t.src.charCodeAt(L) === 9 ? (T = !0, (t.bsCount[f] + a) % 4 === 3 ? (L++, a++, r = !1) : r = !0) : T = !1, d = a, _.push(t.bMarks[f]), t.bMarks[f] = L; L < X && (c = t.src.charCodeAt(L), zI(c)); ) {
|
|
3592
3592
|
c === 9 ? d += 4 - (d + t.bsCount[f] + (r ? 1 : 0)) % 4 : d++;
|
|
3593
3593
|
L++;
|
|
3594
3594
|
}
|
|
3595
|
-
u = L >= X, k.push(t.bsCount[f]), t.bsCount[f] = t.sCount[f] + 1 + (
|
|
3595
|
+
u = L >= X, k.push(t.bsCount[f]), t.bsCount[f] = t.sCount[f] + 1 + (T ? 1 : 0), v.push(t.sCount[f]), t.sCount[f] = d - a, x.push(t.tShift[f]), t.tShift[f] = L - t.bMarks[f];
|
|
3596
3596
|
continue;
|
|
3597
3597
|
}
|
|
3598
3598
|
if (u)
|
|
3599
3599
|
break;
|
|
3600
|
-
for (
|
|
3601
|
-
if (
|
|
3602
|
-
|
|
3600
|
+
for (y = !1, i = 0, l = m.length; i < l; i++)
|
|
3601
|
+
if (m[i](t, f, o, !0)) {
|
|
3602
|
+
y = !0;
|
|
3603
3603
|
break;
|
|
3604
3604
|
}
|
|
3605
|
-
if (
|
|
3606
|
-
t.lineMax = f, t.blkIndent !== 0 && (
|
|
3605
|
+
if (y) {
|
|
3606
|
+
t.lineMax = f, t.blkIndent !== 0 && (_.push(t.bMarks[f]), k.push(t.bsCount[f]), x.push(t.tShift[f]), v.push(t.sCount[f]), t.sCount[f] -= t.blkIndent);
|
|
3607
3607
|
break;
|
|
3608
3608
|
}
|
|
3609
|
-
|
|
3609
|
+
_.push(t.bMarks[f]), k.push(t.bsCount[f]), x.push(t.tShift[f]), v.push(t.sCount[f]), t.sCount[f] = -1;
|
|
3610
3610
|
}
|
|
3611
|
-
for (
|
|
3612
|
-
t.bMarks[i + e] =
|
|
3613
|
-
return t.blkIndent =
|
|
3611
|
+
for (D = t.blkIndent, t.blkIndent = 0, R = t.push("blockquote_open", "blockquote", 1), R.markup = ">", R.map = h = [e, 0], t.md.block.tokenize(t, e, f), R = t.push("blockquote_close", "blockquote", -1), R.markup = ">", t.lineMax = J, t.parentType = A, h[1] = t.line, i = 0; i < x.length; i++)
|
|
3612
|
+
t.bMarks[i + e] = _[i], t.tShift[i + e] = x[i], t.sCount[i + e] = v[i], t.bsCount[i + e] = k[i];
|
|
3613
|
+
return t.blkIndent = D, !0;
|
|
3614
3614
|
}, PI = I.isSpace, OI = function(t, e, o, s) {
|
|
3615
3615
|
var r, c, i, a, l = t.bMarks[e] + t.tShift[e], u = t.eMarks[e];
|
|
3616
3616
|
if (t.sCount[e] - t.blkIndent >= 4 || (r = t.src.charCodeAt(l++), r !== 42 && r !== 45 && r !== 95))
|
|
@@ -3650,11 +3650,11 @@ function BI(n, t) {
|
|
|
3650
3650
|
n.tokens[e].level === s && n.tokens[e].type === "paragraph_open" && (n.tokens[e + 2].hidden = !0, n.tokens[e].hidden = !0, e += 2);
|
|
3651
3651
|
}
|
|
3652
3652
|
var UI = function(t, e, o, s) {
|
|
3653
|
-
var r, c, i, a, l, u, h, f, d,
|
|
3653
|
+
var r, c, i, a, l, u, h, f, d, _, k, D, A, v, x, T, y, m, R, z, J, L, X, C, O, b, q, w = e, Z = !1, qt = !0;
|
|
3654
3654
|
if (t.sCount[w] - t.blkIndent >= 4 || t.listIndent >= 0 && t.sCount[w] - t.listIndent >= 4 && t.sCount[w] < t.blkIndent)
|
|
3655
3655
|
return !1;
|
|
3656
3656
|
if (s && t.parentType === "paragraph" && t.sCount[w] >= t.blkIndent && (Z = !0), (L = qo(t, w)) >= 0) {
|
|
3657
|
-
if (h = !0,
|
|
3657
|
+
if (h = !0, C = t.bMarks[w] + t.tShift[w], A = Number(t.src.slice(C, L - 1)), Z && A !== 1)
|
|
3658
3658
|
return !1;
|
|
3659
3659
|
} else if ((L = Lo(t, w)) >= 0)
|
|
3660
3660
|
h = !1;
|
|
@@ -3664,84 +3664,84 @@ var UI = function(t, e, o, s) {
|
|
|
3664
3664
|
return !1;
|
|
3665
3665
|
if (s)
|
|
3666
3666
|
return !0;
|
|
3667
|
-
for (
|
|
3668
|
-
for (
|
|
3669
|
-
if (r = t.src.charCodeAt(
|
|
3670
|
-
|
|
3667
|
+
for (D = t.src.charCodeAt(L - 1), k = t.tokens.length, h ? (q = t.push("ordered_list_open", "ol", 1), A !== 1 && (q.attrs = [["start", A]])) : q = t.push("bullet_list_open", "ul", 1), q.map = _ = [w, 0], q.markup = String.fromCharCode(D), X = !1, b = t.md.block.ruler.getRules("list"), y = t.parentType, t.parentType = "list"; w < o; ) {
|
|
3668
|
+
for (J = L, v = t.eMarks[w], u = x = t.sCount[w] + L - (t.bMarks[w] + t.tShift[w]); J < v; ) {
|
|
3669
|
+
if (r = t.src.charCodeAt(J), r === 9)
|
|
3670
|
+
x += 4 - (x + t.bsCount[w]) % 4;
|
|
3671
3671
|
else if (r === 32)
|
|
3672
|
-
|
|
3672
|
+
x++;
|
|
3673
3673
|
else
|
|
3674
3674
|
break;
|
|
3675
|
-
|
|
3675
|
+
J++;
|
|
3676
3676
|
}
|
|
3677
|
-
if (c =
|
|
3677
|
+
if (c = J, c >= v ? l = 1 : l = x - u, l > 4 && (l = 1), a = u + l, q = t.push("list_item_open", "li", 1), q.markup = String.fromCharCode(D), q.map = f = [w, 0], h && (q.info = t.src.slice(C, L - 1)), z = t.tight, R = t.tShift[w], m = t.sCount[w], T = t.listIndent, t.listIndent = t.blkIndent, t.blkIndent = a, t.tight = !0, t.tShift[w] = c - t.bMarks[w], t.sCount[w] = x, c >= v && t.isEmpty(w + 1) ? t.line = Math.min(t.line + 2, o) : t.md.block.tokenize(t, w, o, !0), (!t.tight || X) && (qt = !1), X = t.line - w > 1 && t.isEmpty(t.line - 1), t.blkIndent = t.listIndent, t.listIndent = T, t.tShift[w] = R, t.sCount[w] = m, t.tight = z, q = t.push("list_item_close", "li", -1), q.markup = String.fromCharCode(D), w = t.line, f[1] = w, w >= o || t.sCount[w] < t.blkIndent || t.sCount[w] - t.blkIndent >= 4)
|
|
3678
3678
|
break;
|
|
3679
|
-
for (
|
|
3680
|
-
if (
|
|
3681
|
-
|
|
3679
|
+
for (O = !1, i = 0, d = b.length; i < d; i++)
|
|
3680
|
+
if (b[i](t, w, o, !0)) {
|
|
3681
|
+
O = !0;
|
|
3682
3682
|
break;
|
|
3683
3683
|
}
|
|
3684
|
-
if (
|
|
3684
|
+
if (O)
|
|
3685
3685
|
break;
|
|
3686
3686
|
if (h) {
|
|
3687
3687
|
if (L = qo(t, w), L < 0)
|
|
3688
3688
|
break;
|
|
3689
|
-
|
|
3689
|
+
C = t.bMarks[w] + t.tShift[w];
|
|
3690
3690
|
} else if (L = Lo(t, w), L < 0)
|
|
3691
3691
|
break;
|
|
3692
|
-
if (
|
|
3692
|
+
if (D !== t.src.charCodeAt(L - 1))
|
|
3693
3693
|
break;
|
|
3694
3694
|
}
|
|
3695
|
-
return h ? q = t.push("ordered_list_close", "ol", -1) : q = t.push("bullet_list_close", "ul", -1), q.markup = String.fromCharCode(
|
|
3695
|
+
return h ? q = t.push("ordered_list_close", "ol", -1) : q = t.push("bullet_list_close", "ul", -1), q.markup = String.fromCharCode(D), _[1] = w, t.line = w, t.parentType = y, qt && BI(t, k), !0;
|
|
3696
3696
|
}, HI = I.normalizeReference, he = I.isSpace, VI = function(t, e, o, s) {
|
|
3697
|
-
var r, c, i, a, l, u, h, f, d,
|
|
3698
|
-
if (t.sCount[e] - t.blkIndent >= 4 || t.src.charCodeAt(
|
|
3697
|
+
var r, c, i, a, l, u, h, f, d, _, k, D, A, v, x, T, y = 0, m = t.bMarks[e] + t.tShift[e], R = t.eMarks[e], z = e + 1;
|
|
3698
|
+
if (t.sCount[e] - t.blkIndent >= 4 || t.src.charCodeAt(m) !== 91)
|
|
3699
3699
|
return !1;
|
|
3700
|
-
for (; ++
|
|
3701
|
-
if (t.src.charCodeAt(
|
|
3702
|
-
if (
|
|
3700
|
+
for (; ++m < R; )
|
|
3701
|
+
if (t.src.charCodeAt(m) === 93 && t.src.charCodeAt(m - 1) !== 92) {
|
|
3702
|
+
if (m + 1 === R || t.src.charCodeAt(m + 1) !== 58)
|
|
3703
3703
|
return !1;
|
|
3704
3704
|
break;
|
|
3705
3705
|
}
|
|
3706
|
-
for (a = t.lineMax,
|
|
3707
|
-
if (!(t.sCount[
|
|
3708
|
-
for (
|
|
3709
|
-
if (
|
|
3710
|
-
|
|
3706
|
+
for (a = t.lineMax, x = t.md.block.ruler.getRules("reference"), _ = t.parentType, t.parentType = "reference"; z < a && !t.isEmpty(z); z++)
|
|
3707
|
+
if (!(t.sCount[z] - t.blkIndent > 3) && !(t.sCount[z] < 0)) {
|
|
3708
|
+
for (v = !1, u = 0, h = x.length; u < h; u++)
|
|
3709
|
+
if (x[u](t, z, a, !0)) {
|
|
3710
|
+
v = !0;
|
|
3711
3711
|
break;
|
|
3712
3712
|
}
|
|
3713
|
-
if (
|
|
3713
|
+
if (v)
|
|
3714
3714
|
break;
|
|
3715
3715
|
}
|
|
3716
|
-
for (A = t.getLines(e,
|
|
3717
|
-
if (r = A.charCodeAt(
|
|
3716
|
+
for (A = t.getLines(e, z, t.blkIndent, !1).trim(), R = A.length, m = 1; m < R; m++) {
|
|
3717
|
+
if (r = A.charCodeAt(m), r === 91)
|
|
3718
3718
|
return !1;
|
|
3719
3719
|
if (r === 93) {
|
|
3720
|
-
d =
|
|
3720
|
+
d = m;
|
|
3721
3721
|
break;
|
|
3722
3722
|
} else
|
|
3723
|
-
r === 10 ?
|
|
3723
|
+
r === 10 ? y++ : r === 92 && (m++, m < R && A.charCodeAt(m) === 10 && y++);
|
|
3724
3724
|
}
|
|
3725
3725
|
if (d < 0 || A.charCodeAt(d + 1) !== 58)
|
|
3726
3726
|
return !1;
|
|
3727
|
-
for (
|
|
3728
|
-
if (r = A.charCodeAt(
|
|
3729
|
-
|
|
3727
|
+
for (m = d + 2; m < R; m++)
|
|
3728
|
+
if (r = A.charCodeAt(m), r === 10)
|
|
3729
|
+
y++;
|
|
3730
3730
|
else if (!he(r))
|
|
3731
3731
|
break;
|
|
3732
|
-
if (k = t.md.helpers.parseLinkDestination(A,
|
|
3732
|
+
if (k = t.md.helpers.parseLinkDestination(A, m, R), !k.ok || (l = t.md.normalizeLink(k.str), !t.md.validateLink(l)))
|
|
3733
3733
|
return !1;
|
|
3734
|
-
for (
|
|
3735
|
-
if (r = A.charCodeAt(
|
|
3736
|
-
|
|
3734
|
+
for (m = k.pos, y += k.lines, c = m, i = y, D = m; m < R; m++)
|
|
3735
|
+
if (r = A.charCodeAt(m), r === 10)
|
|
3736
|
+
y++;
|
|
3737
3737
|
else if (!he(r))
|
|
3738
3738
|
break;
|
|
3739
|
-
for (k = t.md.helpers.parseLinkTitle(A,
|
|
3740
|
-
|
|
3741
|
-
if (
|
|
3742
|
-
for (
|
|
3743
|
-
|
|
3744
|
-
return
|
|
3739
|
+
for (k = t.md.helpers.parseLinkTitle(A, m, R), m < R && D !== m && k.ok ? (T = k.str, m = k.pos, y += k.lines) : (T = "", m = c, y = i); m < R && (r = A.charCodeAt(m), !!he(r)); )
|
|
3740
|
+
m++;
|
|
3741
|
+
if (m < R && A.charCodeAt(m) !== 10 && T)
|
|
3742
|
+
for (T = "", m = c, y = i; m < R && (r = A.charCodeAt(m), !!he(r)); )
|
|
3743
|
+
m++;
|
|
3744
|
+
return m < R && A.charCodeAt(m) !== 10 || (f = HI(A.slice(1, d)), !f) ? !1 : (s || (typeof t.env.references > "u" && (t.env.references = {}), typeof t.env.references[f] > "u" && (t.env.references[f] = { title: T, href: l }), t.parentType = _, t.line = e + y + 1), !0);
|
|
3745
3745
|
}, GI = [
|
|
3746
3746
|
"address",
|
|
3747
3747
|
"article",
|
|
@@ -3808,7 +3808,7 @@ var UI = function(t, e, o, s) {
|
|
|
3808
3808
|
], De = {}, jI = "[a-zA-Z_:][a-zA-Z0-9:._-]*", YI = "[^\"'=<>`\\x00-\\x20]+", ZI = "'[^']*'", WI = '"[^"]*"', XI = "(?:" + YI + "|" + ZI + "|" + WI + ")", KI = "(?:\\s+" + jI + "(?:\\s*=\\s*" + XI + ")?)", ar = "<[A-Za-z][A-Za-z0-9\\-]*" + KI + "*\\s*\\/?>", lr = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", JI = "<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->", QI = "<[?][\\s\\S]*?[?]>", $I = "<![A-Z]+\\s+[^>]*>", tz = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", ez = new RegExp("^(?:" + ar + "|" + lr + "|" + JI + "|" + QI + "|" + $I + "|" + tz + ")"), nz = new RegExp("^(?:" + ar + "|" + lr + ")");
|
|
3809
3809
|
De.HTML_TAG_RE = ez;
|
|
3810
3810
|
De.HTML_OPEN_CLOSE_TAG_RE = nz;
|
|
3811
|
-
var oz = GI, rz = De.HTML_OPEN_CLOSE_TAG_RE,
|
|
3811
|
+
var oz = GI, rz = De.HTML_OPEN_CLOSE_TAG_RE, Pt = [
|
|
3812
3812
|
[/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0],
|
|
3813
3813
|
[/^<!--/, /-->/, !0],
|
|
3814
3814
|
[/^<\?/, /\?>/, !0],
|
|
@@ -3820,15 +3820,15 @@ var oz = GI, rz = De.HTML_OPEN_CLOSE_TAG_RE, Nt = [
|
|
|
3820
3820
|
var r, c, i, a, l = t.bMarks[e] + t.tShift[e], u = t.eMarks[e];
|
|
3821
3821
|
if (t.sCount[e] - t.blkIndent >= 4 || !t.md.options.html || t.src.charCodeAt(l) !== 60)
|
|
3822
3822
|
return !1;
|
|
3823
|
-
for (a = t.src.slice(l, u), r = 0; r <
|
|
3823
|
+
for (a = t.src.slice(l, u), r = 0; r < Pt.length && !Pt[r][0].test(a); r++)
|
|
3824
3824
|
;
|
|
3825
|
-
if (r ===
|
|
3825
|
+
if (r === Pt.length)
|
|
3826
3826
|
return !1;
|
|
3827
3827
|
if (s)
|
|
3828
|
-
return
|
|
3829
|
-
if (c = e + 1, !
|
|
3828
|
+
return Pt[r][2];
|
|
3829
|
+
if (c = e + 1, !Pt[r][1].test(a)) {
|
|
3830
3830
|
for (; c < o && !(t.sCount[c] < t.blkIndent); c++)
|
|
3831
|
-
if (l = t.bMarks[c] + t.tShift[c], u = t.eMarks[c], a = t.src.slice(l, u),
|
|
3831
|
+
if (l = t.bMarks[c] + t.tShift[c], u = t.eMarks[c], a = t.src.slice(l, u), Pt[r][1].test(a)) {
|
|
3832
3832
|
a.length !== 0 && c++;
|
|
3833
3833
|
break;
|
|
3834
3834
|
}
|
|
@@ -3842,10 +3842,10 @@ var oz = GI, rz = De.HTML_OPEN_CLOSE_TAG_RE, Nt = [
|
|
|
3842
3842
|
c++, r = t.src.charCodeAt(++l);
|
|
3843
3843
|
return c > 6 || l < u && !Ro(r) ? !1 : (s || (u = t.skipSpacesBack(u, l), i = t.skipCharsBack(u, 35, l), i > l && Ro(t.src.charCodeAt(i - 1)) && (u = i), t.line = e + 1, a = t.push("heading_open", "h" + String(c), 1), a.markup = "########".slice(0, c), a.map = [e, t.line], a = t.push("inline", "", 0), a.content = t.src.slice(l, u).trim(), a.map = [e, t.line], a.children = [], a = t.push("heading_close", "h" + String(c), -1), a.markup = "########".slice(0, c)), !0);
|
|
3844
3844
|
}, iz = function(t, e, o) {
|
|
3845
|
-
var s, r, c, i, a, l, u, h, f, d = e + 1,
|
|
3845
|
+
var s, r, c, i, a, l, u, h, f, d = e + 1, _, k = t.md.block.ruler.getRules("paragraph");
|
|
3846
3846
|
if (t.sCount[e] - t.blkIndent >= 4)
|
|
3847
3847
|
return !1;
|
|
3848
|
-
for (
|
|
3848
|
+
for (_ = t.parentType, t.parentType = "paragraph"; d < o && !t.isEmpty(d); d++)
|
|
3849
3849
|
if (!(t.sCount[d] - t.blkIndent > 3)) {
|
|
3850
3850
|
if (t.sCount[d] >= t.blkIndent && (l = t.bMarks[d] + t.tShift[d], u = t.eMarks[d], l < u && (f = t.src.charCodeAt(l), (f === 45 || f === 61) && (l = t.skipChars(l, f), l = t.skipSpaces(l), l >= u)))) {
|
|
3851
3851
|
h = f === 61 ? 1 : 2;
|
|
@@ -3861,7 +3861,7 @@ var oz = GI, rz = De.HTML_OPEN_CLOSE_TAG_RE, Nt = [
|
|
|
3861
3861
|
break;
|
|
3862
3862
|
}
|
|
3863
3863
|
}
|
|
3864
|
-
return h ? (s = t.getLines(e, d, t.blkIndent, !1).trim(), t.line = d + 1, a = t.push("heading_open", "h" + String(h), 1), a.markup = String.fromCharCode(f), a.map = [e, t.line], a = t.push("inline", "", 0), a.content = s, a.map = [e, t.line - 1], a.children = [], a = t.push("heading_close", "h" + String(h), -1), a.markup = String.fromCharCode(f), t.parentType =
|
|
3864
|
+
return h ? (s = t.getLines(e, d, t.blkIndent, !1).trim(), t.line = d + 1, a = t.push("heading_open", "h" + String(h), 1), a.markup = String.fromCharCode(f), a.map = [e, t.line], a = t.push("inline", "", 0), a.content = s, a.map = [e, t.line - 1], a.children = [], a = t.push("heading_close", "h" + String(h), -1), a.markup = String.fromCharCode(f), t.parentType = _, !0) : !1;
|
|
3865
3865
|
}, az = function(t, e, o) {
|
|
3866
3866
|
var s, r, c, i, a, l, u = e + 1, h = t.md.block.ruler.getRules("paragraph");
|
|
3867
3867
|
for (l = t.parentType, t.parentType = "paragraph"; u < o && !t.isEmpty(u); u++)
|
|
@@ -4148,7 +4148,7 @@ qe.postProcess = function(t) {
|
|
|
4148
4148
|
o[e] && o[e].delimiters && Io(t, o[e].delimiters);
|
|
4149
4149
|
};
|
|
4150
4150
|
var yz = I.normalizeReference, en = I.isSpace, xz = function(t, e) {
|
|
4151
|
-
var o, s, r, c, i, a, l, u, h, f = "", d = "",
|
|
4151
|
+
var o, s, r, c, i, a, l, u, h, f = "", d = "", _ = t.pos, k = t.posMax, D = t.pos, A = !0;
|
|
4152
4152
|
if (t.src.charCodeAt(t.pos) !== 91 || (i = t.pos + 1, c = t.md.helpers.parseLinkLabel(t, t.pos, !0), c < 0))
|
|
4153
4153
|
return !1;
|
|
4154
4154
|
if (a = c + 1, a < k && t.src.charCodeAt(a) === 40) {
|
|
@@ -4156,10 +4156,10 @@ var yz = I.normalizeReference, en = I.isSpace, xz = function(t, e) {
|
|
|
4156
4156
|
;
|
|
4157
4157
|
if (a >= k)
|
|
4158
4158
|
return !1;
|
|
4159
|
-
if (
|
|
4160
|
-
for (f = t.md.normalizeLink(l.str), t.md.validateLink(f) ? a = l.pos : f = "",
|
|
4159
|
+
if (D = a, l = t.md.helpers.parseLinkDestination(t.src, a, t.posMax), l.ok) {
|
|
4160
|
+
for (f = t.md.normalizeLink(l.str), t.md.validateLink(f) ? a = l.pos : f = "", D = a; a < k && (s = t.src.charCodeAt(a), !(!en(s) && s !== 10)); a++)
|
|
4161
4161
|
;
|
|
4162
|
-
if (l = t.md.helpers.parseLinkTitle(t.src, a, t.posMax), a < k &&
|
|
4162
|
+
if (l = t.md.helpers.parseLinkTitle(t.src, a, t.posMax), a < k && D !== a && l.ok)
|
|
4163
4163
|
for (d = l.str, a = l.pos; a < k && (s = t.src.charCodeAt(a), !(!en(s) && s !== 10)); a++)
|
|
4164
4164
|
;
|
|
4165
4165
|
}
|
|
@@ -4168,43 +4168,43 @@ var yz = I.normalizeReference, en = I.isSpace, xz = function(t, e) {
|
|
|
4168
4168
|
if (A) {
|
|
4169
4169
|
if (typeof t.env.references > "u")
|
|
4170
4170
|
return !1;
|
|
4171
|
-
if (a < k && t.src.charCodeAt(a) === 91 ? (
|
|
4172
|
-
return t.pos =
|
|
4171
|
+
if (a < k && t.src.charCodeAt(a) === 91 ? (D = a + 1, a = t.md.helpers.parseLinkLabel(t, a), a >= 0 ? r = t.src.slice(D, a++) : a = c + 1) : a = c + 1, r || (r = t.src.slice(i, c)), u = t.env.references[yz(r)], !u)
|
|
4172
|
+
return t.pos = _, !1;
|
|
4173
4173
|
f = u.href, d = u.title;
|
|
4174
4174
|
}
|
|
4175
4175
|
return e || (t.pos = i, t.posMax = c, h = t.push("link_open", "a", 1), h.attrs = o = [["href", f]], d && o.push(["title", d]), t.linkLevel++, t.md.inline.tokenize(t), t.linkLevel--, h = t.push("link_close", "a", -1)), t.pos = a, t.posMax = k, !0;
|
|
4176
4176
|
}, Az = I.normalizeReference, nn = I.isSpace, wz = function(t, e) {
|
|
4177
|
-
var o, s, r, c, i, a, l, u, h, f, d,
|
|
4177
|
+
var o, s, r, c, i, a, l, u, h, f, d, _, k, D = "", A = t.pos, v = t.posMax;
|
|
4178
4178
|
if (t.src.charCodeAt(t.pos) !== 33 || t.src.charCodeAt(t.pos + 1) !== 91 || (a = t.pos + 2, i = t.md.helpers.parseLinkLabel(t, t.pos + 1, !1), i < 0))
|
|
4179
4179
|
return !1;
|
|
4180
|
-
if (l = i + 1, l <
|
|
4181
|
-
for (l++; l <
|
|
4180
|
+
if (l = i + 1, l < v && t.src.charCodeAt(l) === 40) {
|
|
4181
|
+
for (l++; l < v && (s = t.src.charCodeAt(l), !(!nn(s) && s !== 10)); l++)
|
|
4182
4182
|
;
|
|
4183
|
-
if (l >=
|
|
4183
|
+
if (l >= v)
|
|
4184
4184
|
return !1;
|
|
4185
|
-
for (k = l, h = t.md.helpers.parseLinkDestination(t.src, l, t.posMax), h.ok && (
|
|
4185
|
+
for (k = l, h = t.md.helpers.parseLinkDestination(t.src, l, t.posMax), h.ok && (D = t.md.normalizeLink(h.str), t.md.validateLink(D) ? l = h.pos : D = ""), k = l; l < v && (s = t.src.charCodeAt(l), !(!nn(s) && s !== 10)); l++)
|
|
4186
4186
|
;
|
|
4187
|
-
if (h = t.md.helpers.parseLinkTitle(t.src, l, t.posMax), l <
|
|
4188
|
-
for (f = h.str, l = h.pos; l <
|
|
4187
|
+
if (h = t.md.helpers.parseLinkTitle(t.src, l, t.posMax), l < v && k !== l && h.ok)
|
|
4188
|
+
for (f = h.str, l = h.pos; l < v && (s = t.src.charCodeAt(l), !(!nn(s) && s !== 10)); l++)
|
|
4189
4189
|
;
|
|
4190
4190
|
else
|
|
4191
4191
|
f = "";
|
|
4192
|
-
if (l >=
|
|
4192
|
+
if (l >= v || t.src.charCodeAt(l) !== 41)
|
|
4193
4193
|
return t.pos = A, !1;
|
|
4194
4194
|
l++;
|
|
4195
4195
|
} else {
|
|
4196
4196
|
if (typeof t.env.references > "u")
|
|
4197
4197
|
return !1;
|
|
4198
|
-
if (l <
|
|
4198
|
+
if (l < v && t.src.charCodeAt(l) === 91 ? (k = l + 1, l = t.md.helpers.parseLinkLabel(t, l), l >= 0 ? c = t.src.slice(k, l++) : l = i + 1) : l = i + 1, c || (c = t.src.slice(a, i)), u = t.env.references[Az(c)], !u)
|
|
4199
4199
|
return t.pos = A, !1;
|
|
4200
|
-
|
|
4200
|
+
D = u.href, f = u.title;
|
|
4201
4201
|
}
|
|
4202
4202
|
return e || (r = t.src.slice(a, i), t.md.inline.parse(
|
|
4203
4203
|
r,
|
|
4204
4204
|
t.md,
|
|
4205
4205
|
t.env,
|
|
4206
|
-
|
|
4207
|
-
), d = t.push("image", "img", 0), d.attrs = o = [["src",
|
|
4206
|
+
_ = []
|
|
4207
|
+
), d = t.push("image", "img", 0), d.attrs = o = [["src", D], ["alt", ""]], d.children = _, d.content = r, f && o.push(["title", f])), t.pos = l, t.posMax = v, !0;
|
|
4208
4208
|
}, Ez = /^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/, Cz = /^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/, Dz = function(t, e) {
|
|
4209
4209
|
var o, s, r, c, i, a, l = t.pos;
|
|
4210
4210
|
if (t.src.charCodeAt(l) !== 60)
|
|
@@ -4279,10 +4279,10 @@ ne.prototype.push = function(n, t, e) {
|
|
|
4279
4279
|
return e < 0 && (this.level--, this.delimiters = this._prev_delimiters.pop()), o.level = this.level, e > 0 && (this.level++, this._prev_delimiters.push(this.delimiters), this.delimiters = [], s = { delimiters: this.delimiters }), this.pendingLevel = this.level, this.tokens.push(o), this.tokens_meta.push(s), o;
|
|
4280
4280
|
};
|
|
4281
4281
|
ne.prototype.scanDelims = function(n, t) {
|
|
4282
|
-
var e = n, o, s, r, c, i, a, l, u, h, f = !0, d = !0,
|
|
4283
|
-
for (o = n > 0 ? this.src.charCodeAt(n - 1) : 32; e <
|
|
4282
|
+
var e = n, o, s, r, c, i, a, l, u, h, f = !0, d = !0, _ = this.posMax, k = this.src.charCodeAt(n);
|
|
4283
|
+
for (o = n > 0 ? this.src.charCodeAt(n - 1) : 32; e < _ && this.src.charCodeAt(e) === k; )
|
|
4284
4284
|
e++;
|
|
4285
|
-
return r = e - n, s = e <
|
|
4285
|
+
return r = e - n, s = e < _ ? this.src.charCodeAt(e) : 32, l = Uo(o) || Bo(String.fromCharCode(o)), h = Uo(s) || Bo(String.fromCharCode(s)), a = Oo(o), u = Oo(s), u ? f = !1 : h && (a || l || (f = !1)), a ? d = !1 : l && (u || h || (d = !1)), t ? (c = f, i = d) : (c = f && (!d || l), i = d && (!f || h)), {
|
|
4286
4286
|
can_open: c,
|
|
4287
4287
|
can_close: i,
|
|
4288
4288
|
length: r
|
|
@@ -4618,8 +4618,8 @@ const gr = (n) => String.fromCodePoint(...n), aN = function(n) {
|
|
|
4618
4618
|
const d = h <= r ? wn : h >= r + ee ? ee : h - r;
|
|
4619
4619
|
if (f < d)
|
|
4620
4620
|
break;
|
|
4621
|
-
const
|
|
4622
|
-
u > ft(Ot /
|
|
4621
|
+
const _ = pt - d;
|
|
4622
|
+
u > ft(Ot / _) && vt("overflow"), u *= _;
|
|
4623
4623
|
}
|
|
4624
4624
|
const l = t.length + 1;
|
|
4625
4625
|
r = br(o - a, l, a == 0), ft(o / l) > Ot - s && vt("overflow"), s += ft(o / l), o %= l, t.splice(o++, 0, s);
|
|
@@ -4647,10 +4647,10 @@ const gr = (n) => String.fromCodePoint(...n), aN = function(n) {
|
|
|
4647
4647
|
const d = f <= r ? wn : f >= r + ee ? ee : f - r;
|
|
4648
4648
|
if (h < d)
|
|
4649
4649
|
break;
|
|
4650
|
-
const
|
|
4650
|
+
const _ = h - d, k = pt - d;
|
|
4651
4651
|
t.push(
|
|
4652
|
-
an(Yo(d +
|
|
4653
|
-
), h = ft(
|
|
4652
|
+
an(Yo(d + _ % k, 0))
|
|
4653
|
+
), h = ft(_ / k);
|
|
4654
4654
|
}
|
|
4655
4655
|
t.push(an(Yo(h, 0))), r = br(s, l, i === c), s = 0, ++i;
|
|
4656
4656
|
}
|
|
@@ -4993,7 +4993,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
4993
4993
|
userPhoto: { default: LN }
|
|
4994
4994
|
},
|
|
4995
4995
|
setup(n) {
|
|
4996
|
-
const t = n, e =
|
|
4996
|
+
const t = n, e = Tt(() => {
|
|
4997
4997
|
var c;
|
|
4998
4998
|
const r = {
|
|
4999
4999
|
error: "ai-blueking-icon ai-blueking-warning-circle-fill",
|
|
@@ -5001,28 +5001,28 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5001
5001
|
success: ""
|
|
5002
5002
|
};
|
|
5003
5003
|
return (c = t.message) != null && c.status ? r[t.message.status] : "";
|
|
5004
|
-
}), o =
|
|
5004
|
+
}), o = Tt(() => {
|
|
5005
5005
|
if (t.message.content) {
|
|
5006
5006
|
const c = new TN().render(t.message.content);
|
|
5007
5007
|
return bs.sanitize(c);
|
|
5008
5008
|
}
|
|
5009
5009
|
return "";
|
|
5010
|
-
}), s =
|
|
5010
|
+
}), s = Tt(() => {
|
|
5011
5011
|
const r = ke(t.message.time), c = ke();
|
|
5012
5012
|
return t.message.time ? c.isSame(r, "year") ? r.format("MM-DD HH:mm:ss") : r.format("YYYY-MM-DD HH:mm:ss") : "";
|
|
5013
5013
|
});
|
|
5014
|
-
return (r, c) => (
|
|
5014
|
+
return (r, c) => (P(), H(
|
|
5015
5015
|
"li",
|
|
5016
5016
|
{
|
|
5017
5017
|
class: me([r.message.role, "message-main"])
|
|
5018
5018
|
},
|
|
5019
5019
|
[
|
|
5020
|
-
r.message.role ===
|
|
5020
|
+
r.message.role === N(xr).User ? (P(), H(
|
|
5021
5021
|
te,
|
|
5022
5022
|
{ key: 0 },
|
|
5023
5023
|
[
|
|
5024
5024
|
F("p", qN, [
|
|
5025
|
-
s.value ? (
|
|
5025
|
+
s.value ? (P(), H(
|
|
5026
5026
|
"span",
|
|
5027
5027
|
RN,
|
|
5028
5028
|
_t(s.value),
|
|
@@ -5040,20 +5040,20 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5040
5040
|
],
|
|
5041
5041
|
64
|
|
5042
5042
|
/* STABLE_FRAGMENT */
|
|
5043
|
-
)) : (
|
|
5043
|
+
)) : (P(), H(
|
|
5044
5044
|
te,
|
|
5045
5045
|
{ key: 1 },
|
|
5046
5046
|
[
|
|
5047
5047
|
zN,
|
|
5048
5048
|
F("p", NN, [
|
|
5049
|
-
s.value ? (
|
|
5049
|
+
s.value ? (P(), H(
|
|
5050
5050
|
"span",
|
|
5051
5051
|
PN,
|
|
5052
5052
|
_t(s.value),
|
|
5053
5053
|
1
|
|
5054
5054
|
/* TEXT */
|
|
5055
5055
|
)) : ut("v-if", !0),
|
|
5056
|
-
e.value ? (
|
|
5056
|
+
e.value ? (P(), H(
|
|
5057
5057
|
"i",
|
|
5058
5058
|
{
|
|
5059
5059
|
key: 1,
|
|
@@ -5063,19 +5063,19 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5063
5063
|
2
|
|
5064
5064
|
/* CLASS */
|
|
5065
5065
|
)) : ut("v-if", !0),
|
|
5066
|
-
r.message.status ===
|
|
5067
|
-
r.message.status ===
|
|
5066
|
+
r.message.status === N(be).Loading ? (P(), H("svg", ON, UN)) : ut("v-if", !0),
|
|
5067
|
+
r.message.status === N(be).Error ? (P(), H(
|
|
5068
5068
|
"span",
|
|
5069
5069
|
HN,
|
|
5070
5070
|
_t(r.message.content),
|
|
5071
5071
|
1
|
|
5072
5072
|
/* TEXT */
|
|
5073
|
-
)) : (
|
|
5073
|
+
)) : (P(), H("span", {
|
|
5074
5074
|
key: 4,
|
|
5075
5075
|
innerHTML: o.value,
|
|
5076
5076
|
class: me({
|
|
5077
5077
|
"markdown-message": !0,
|
|
5078
|
-
loading: r.message.status ===
|
|
5078
|
+
loading: r.message.status === N(be).Loading
|
|
5079
5079
|
})
|
|
5080
5080
|
}, null, 10, VN))
|
|
5081
5081
|
])
|
|
@@ -5092,45 +5092,49 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5092
5092
|
__name: "render-send",
|
|
5093
5093
|
props: {
|
|
5094
5094
|
prompts: {},
|
|
5095
|
+
placeholder: {},
|
|
5095
5096
|
value: {}
|
|
5096
5097
|
},
|
|
5097
5098
|
emits: ["update:value", "enter", "choose-prompt"],
|
|
5098
5099
|
setup(n, { emit: t }) {
|
|
5099
|
-
const e = n, o = t, s = zr, r = hn, c = Ct(""), i = Ct(40), a = Ct(), l = Ct(!1), u =
|
|
5100
|
-
var
|
|
5101
|
-
return ((
|
|
5102
|
-
}), h = (
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5100
|
+
const e = n, o = t, s = zr, r = hn, c = Ct(""), i = Ct(40), a = Ct(), l = Ct(!1), u = Tt(() => {
|
|
5101
|
+
var y;
|
|
5102
|
+
return ((y = e.prompts) == null ? void 0 : y.filter((m) => m.content.includes(c.value))) || [];
|
|
5103
|
+
}), h = Tt(() => {
|
|
5104
|
+
var y;
|
|
5105
|
+
return e.placeholder ? e.placeholder : (y = e.prompts) != null && y.length ? U("您可以键入 “/” 查看更多Prompt") : U("请输入");
|
|
5106
|
+
}), f = (y) => {
|
|
5107
|
+
o("update:value", y);
|
|
5107
5108
|
}, d = () => {
|
|
5109
|
+
var y;
|
|
5110
|
+
e.value === "/" && ((y = e.prompts) != null && y.length) ? x() : T();
|
|
5111
|
+
}, _ = () => {
|
|
5108
5112
|
Xo(() => {
|
|
5109
|
-
var
|
|
5110
|
-
const
|
|
5111
|
-
(
|
|
5113
|
+
var m;
|
|
5114
|
+
const y = (m = a.value) == null ? void 0 : m.$el.querySelector("textarea");
|
|
5115
|
+
(y == null ? void 0 : y.scrollHeight) > 40 && e.value ? i.value = y.scrollHeight <= 300 ? y.scrollHeight : 300 : i.value = 40;
|
|
5112
5116
|
});
|
|
5113
|
-
},
|
|
5114
|
-
o("update:value",
|
|
5115
|
-
},
|
|
5116
|
-
|
|
5117
|
-
}, C = () => {
|
|
5118
|
-
h("");
|
|
5117
|
+
}, k = (y) => {
|
|
5118
|
+
o("update:value", y.content), o("choose-prompt", y), T(), v();
|
|
5119
|
+
}, D = (y, m) => {
|
|
5120
|
+
m.key === "Enter" && !m.shiftKey && (m.preventDefault(), o("enter"));
|
|
5119
5121
|
}, A = () => {
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5122
|
+
f("");
|
|
5123
|
+
}, v = () => {
|
|
5124
|
+
var m;
|
|
5125
|
+
const y = (m = a.value) == null ? void 0 : m.$el.querySelector("textarea");
|
|
5126
|
+
y == null || y.focus();
|
|
5127
|
+
}, x = () => {
|
|
5124
5128
|
l.value = !0;
|
|
5125
|
-
},
|
|
5129
|
+
}, T = () => {
|
|
5126
5130
|
l.value = !1;
|
|
5127
5131
|
};
|
|
5128
5132
|
return Zo(
|
|
5129
5133
|
() => e.value,
|
|
5130
5134
|
() => {
|
|
5131
|
-
|
|
5135
|
+
_(), d();
|
|
5132
5136
|
}
|
|
5133
|
-
), dn(
|
|
5137
|
+
), dn(v), (y, m) => (P(), Qt(N(Fr), {
|
|
5134
5138
|
width: "calc(100% - 118px)",
|
|
5135
5139
|
"ext-cls": "empty-padding",
|
|
5136
5140
|
arrow: !1,
|
|
@@ -5142,36 +5146,36 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5142
5146
|
trigger: "manual"
|
|
5143
5147
|
}, {
|
|
5144
5148
|
content: _e(() => {
|
|
5145
|
-
var
|
|
5149
|
+
var R;
|
|
5146
5150
|
return [
|
|
5147
5151
|
F("div", null, [
|
|
5148
|
-
Dt((
|
|
5149
|
-
kt(
|
|
5152
|
+
Dt((P(), H("section", jN, [
|
|
5153
|
+
kt(N(eo), {
|
|
5150
5154
|
class: "input-search",
|
|
5151
5155
|
modelValue: c.value,
|
|
5152
|
-
"onUpdate:modelValue":
|
|
5156
|
+
"onUpdate:modelValue": m[0] || (m[0] = (z) => c.value = z),
|
|
5153
5157
|
behavior: "simplicity",
|
|
5154
5158
|
clearable: ""
|
|
5155
5159
|
}, null, 8, ["modelValue"]),
|
|
5156
5160
|
F("section", YN, [
|
|
5157
|
-
(
|
|
5161
|
+
(P(!0), H(
|
|
5158
5162
|
te,
|
|
5159
5163
|
null,
|
|
5160
|
-
Wo(u.value, (
|
|
5164
|
+
Wo(u.value, (z, J) => Dt((P(), H("span", {
|
|
5161
5165
|
class: "group-prompt",
|
|
5162
|
-
key:
|
|
5163
|
-
onClick: (
|
|
5166
|
+
key: J,
|
|
5167
|
+
onClick: (L) => k(z)
|
|
5164
5168
|
}, [
|
|
5165
5169
|
F(
|
|
5166
5170
|
"span",
|
|
5167
5171
|
WN,
|
|
5168
|
-
_t(
|
|
5172
|
+
_t(z.content),
|
|
5169
5173
|
1
|
|
5170
5174
|
/* TEXT */
|
|
5171
5175
|
)
|
|
5172
5176
|
], 8, ZN)), [
|
|
5173
|
-
[
|
|
5174
|
-
content:
|
|
5177
|
+
[N(r), {
|
|
5178
|
+
content: z.content,
|
|
5175
5179
|
placement: "right",
|
|
5176
5180
|
theme: "light",
|
|
5177
5181
|
width: 300,
|
|
@@ -5182,7 +5186,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5182
5186
|
128
|
|
5183
5187
|
/* KEYED_FRAGMENT */
|
|
5184
5188
|
)),
|
|
5185
|
-
(
|
|
5189
|
+
(R = u.value) != null && R.length ? ut("v-if", !0) : (P(), Qt(N(Ir), {
|
|
5186
5190
|
key: 0,
|
|
5187
5191
|
class: "exception-wrap-item exception-part",
|
|
5188
5192
|
scene: "part",
|
|
@@ -5190,53 +5194,50 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5190
5194
|
}))
|
|
5191
5195
|
])
|
|
5192
5196
|
])), [
|
|
5193
|
-
[
|
|
5197
|
+
[N(s), T]
|
|
5194
5198
|
])
|
|
5195
5199
|
])
|
|
5196
5200
|
];
|
|
5197
5201
|
}),
|
|
5198
|
-
default: _e(() =>
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
)
|
|
5233
|
-
];
|
|
5234
|
-
}),
|
|
5202
|
+
default: _e(() => [
|
|
5203
|
+
F(
|
|
5204
|
+
"section",
|
|
5205
|
+
{
|
|
5206
|
+
style: ve({
|
|
5207
|
+
"--text-height": i.value + "px"
|
|
5208
|
+
}),
|
|
5209
|
+
class: "send-prompt-container"
|
|
5210
|
+
},
|
|
5211
|
+
[
|
|
5212
|
+
kt(N(eo), {
|
|
5213
|
+
ref_key: "inputRef",
|
|
5214
|
+
ref: a,
|
|
5215
|
+
class: "send-prompt",
|
|
5216
|
+
autosize: !1,
|
|
5217
|
+
clearable: !0,
|
|
5218
|
+
"model-value": y.value,
|
|
5219
|
+
"native-attributes": { autofocus: "autofocus" },
|
|
5220
|
+
placeholder: h.value,
|
|
5221
|
+
row: "1",
|
|
5222
|
+
type: "textarea",
|
|
5223
|
+
onInput: f,
|
|
5224
|
+
onKeydown: D
|
|
5225
|
+
}, null, 8, ["model-value", "placeholder"]),
|
|
5226
|
+
y.value ? (P(), Qt(N(Hr), {
|
|
5227
|
+
key: 0,
|
|
5228
|
+
class: "show-clear-only-hover bk-input--clear-icon clear-icon",
|
|
5229
|
+
onClick: A
|
|
5230
|
+
})) : ut("v-if", !0)
|
|
5231
|
+
],
|
|
5232
|
+
4
|
|
5233
|
+
/* STYLE */
|
|
5234
|
+
)
|
|
5235
|
+
]),
|
|
5235
5236
|
_: 1
|
|
5236
5237
|
/* STABLE */
|
|
5237
5238
|
}, 8, ["is-show"]));
|
|
5238
5239
|
}
|
|
5239
|
-
}), KN = /* @__PURE__ */ Bt(XN, [["__scopeId", "data-v-
|
|
5240
|
+
}), KN = /* @__PURE__ */ Bt(XN, [["__scopeId", "data-v-2374c5aa"]]), JN = (n) => (gn("data-v-fd57f18d"), n = n(), bn(), n), QN = /* @__PURE__ */ JN(() => /* @__PURE__ */ F(
|
|
5240
5241
|
"svg",
|
|
5241
5242
|
{
|
|
5242
5243
|
width: "10",
|
|
@@ -5259,14 +5260,14 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5259
5260
|
const e = t, o = () => {
|
|
5260
5261
|
e("stop");
|
|
5261
5262
|
};
|
|
5262
|
-
return (s, r) => s.isShow ? (
|
|
5263
|
+
return (s, r) => s.isShow ? (P(), H("span", {
|
|
5263
5264
|
key: 0,
|
|
5264
5265
|
class: "ai-blueking-render-stop",
|
|
5265
5266
|
onClick: o
|
|
5266
5267
|
}, [
|
|
5267
5268
|
QN,
|
|
5268
5269
|
Ae(
|
|
5269
|
-
" " + _t(
|
|
5270
|
+
" " + _t(N(U)("终止生成")),
|
|
5270
5271
|
1
|
|
5271
5272
|
/* TEXT */
|
|
5272
5273
|
)
|
|
@@ -5281,7 +5282,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5281
5282
|
message: {}
|
|
5282
5283
|
},
|
|
5283
5284
|
setup(n) {
|
|
5284
|
-
const t = n, e =
|
|
5285
|
+
const t = n, e = Tt(() => {
|
|
5285
5286
|
var c;
|
|
5286
5287
|
const o = ke(t.message.time), s = ke(), r = {
|
|
5287
5288
|
0: U("日"),
|
|
@@ -5296,7 +5297,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5296
5297
|
(i) => Math.abs(o.diff(i, "minute")) < 10 && i !== t.message.time
|
|
5297
5298
|
) ? "" : (window.showTimes = [...window.showTimes || [], t.message.time], s.isSame(o, "day") ? o.format("HH:mm:ss") : s.subtract(1, "day").isSame(o, "week") ? U("昨天") + " " + o.format("HH:mm:ss") : s.isSame(o, "week") ? U("本周") + r[o.day()] + " " + o.format("HH:mm:ss") : s.subtract(1, "week").isSame(o, "week") ? U("上周") + r[o.day()] + " " + o.format("HH:mm:ss") : s.isSame(o, "year") ? o.format("MM-DD HH:mm:ss") : o.format("YYYY-MM-DD HH:mm:ss"));
|
|
5298
5299
|
});
|
|
5299
|
-
return (o, s) => e.value ? (
|
|
5300
|
+
return (o, s) => e.value ? (P(), H("section", eP, [
|
|
5300
5301
|
F(
|
|
5301
5302
|
"span",
|
|
5302
5303
|
nP,
|
|
@@ -5306,7 +5307,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5306
5307
|
)
|
|
5307
5308
|
])) : ut("v-if", !0);
|
|
5308
5309
|
}
|
|
5309
|
-
}), rP = /* @__PURE__ */ Bt(oP, [["__scopeId", "data-v-55c9a119"]]), Ar = (n) => (gn("data-v-
|
|
5310
|
+
}), rP = /* @__PURE__ */ Bt(oP, [["__scopeId", "data-v-55c9a119"]]), Ar = (n) => (gn("data-v-6cc6ac8a"), n = n(), bn(), n), sP = {
|
|
5310
5311
|
key: 0,
|
|
5311
5312
|
width: "18",
|
|
5312
5313
|
height: "18",
|
|
@@ -5334,6 +5335,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5334
5335
|
loading: { type: Boolean },
|
|
5335
5336
|
background: { default: "#f5f7fa" },
|
|
5336
5337
|
userPhoto: {},
|
|
5338
|
+
placeholder: {},
|
|
5337
5339
|
scrollLoading: { type: Boolean },
|
|
5338
5340
|
scrollLoadingEnd: { type: Boolean, default: !0 }
|
|
5339
5341
|
},
|
|
@@ -5374,7 +5376,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5374
5376
|
const h = () => {
|
|
5375
5377
|
window.showTimes = [];
|
|
5376
5378
|
};
|
|
5377
|
-
return dn(c), mn(h), (f, d) => (
|
|
5379
|
+
return dn(c), mn(h), (f, d) => (P(), H(
|
|
5378
5380
|
"section",
|
|
5379
5381
|
{
|
|
5380
5382
|
style: ve({
|
|
@@ -5388,26 +5390,26 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5388
5390
|
{
|
|
5389
5391
|
class: "ai-messages ai-blueking-messages",
|
|
5390
5392
|
onScrollPassive: d[0] || (d[0] = //@ts-ignore
|
|
5391
|
-
(...
|
|
5393
|
+
(..._) => N(i) && N(i)(..._))
|
|
5392
5394
|
},
|
|
5393
5395
|
[
|
|
5394
|
-
f.scrollLoading ? (
|
|
5395
|
-
(
|
|
5396
|
+
f.scrollLoading ? (P(), H("svg", sP, iP)) : ut("v-if", !0),
|
|
5397
|
+
(P(!0), H(
|
|
5396
5398
|
te,
|
|
5397
5399
|
null,
|
|
5398
|
-
Wo(f.messages, (
|
|
5400
|
+
Wo(f.messages, (_) => (P(), H(
|
|
5399
5401
|
te,
|
|
5400
5402
|
{
|
|
5401
|
-
key:
|
|
5403
|
+
key: _.content
|
|
5402
5404
|
},
|
|
5403
5405
|
[
|
|
5404
5406
|
kt(rP, {
|
|
5405
5407
|
class: "render-message",
|
|
5406
|
-
message:
|
|
5408
|
+
message: _
|
|
5407
5409
|
}, null, 8, ["message"]),
|
|
5408
5410
|
kt(GN, {
|
|
5409
5411
|
class: "render-message",
|
|
5410
|
-
message:
|
|
5412
|
+
message: _,
|
|
5411
5413
|
"user-photo": f.userPhoto
|
|
5412
5414
|
}, null, 8, ["message", "user-photo"])
|
|
5413
5415
|
],
|
|
@@ -5432,12 +5434,13 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5432
5434
|
F("section", uP, [
|
|
5433
5435
|
kt(KN, {
|
|
5434
5436
|
value: r.value,
|
|
5435
|
-
"onUpdate:value": d[1] || (d[1] = (
|
|
5437
|
+
"onUpdate:value": d[1] || (d[1] = (_) => r.value = _),
|
|
5438
|
+
placeholder: f.placeholder,
|
|
5436
5439
|
prompts: f.prompts,
|
|
5437
5440
|
onChoosePrompt: l,
|
|
5438
5441
|
onEnter: a
|
|
5439
|
-
}, null, 8, ["value", "prompts"]),
|
|
5440
|
-
Dt((
|
|
5442
|
+
}, null, 8, ["value", "placeholder", "prompts"]),
|
|
5443
|
+
Dt((P(), Qt(N(Nr), {
|
|
5441
5444
|
class: "ai-operation-button",
|
|
5442
5445
|
disabled: f.loading || !r.value,
|
|
5443
5446
|
size: "large",
|
|
@@ -5447,7 +5450,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5447
5450
|
default: _e(() => [
|
|
5448
5451
|
pP,
|
|
5449
5452
|
Ae(
|
|
5450
|
-
" " + _t(
|
|
5453
|
+
" " + _t(N(U)("发送")),
|
|
5451
5454
|
1
|
|
5452
5455
|
/* TEXT */
|
|
5453
5456
|
)
|
|
@@ -5455,8 +5458,8 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5455
5458
|
_: 1
|
|
5456
5459
|
/* STABLE */
|
|
5457
5460
|
}, 8, ["disabled"])), [
|
|
5458
|
-
[
|
|
5459
|
-
content:
|
|
5461
|
+
[N(s), {
|
|
5462
|
+
content: N(U)("内容正在执行中,请执行完成后再发送"),
|
|
5460
5463
|
disabled: !f.loading
|
|
5461
5464
|
}]
|
|
5462
5465
|
])
|
|
@@ -5467,7 +5470,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5467
5470
|
/* STYLE */
|
|
5468
5471
|
));
|
|
5469
5472
|
}
|
|
5470
|
-
}), hP = /* @__PURE__ */ Bt(fP, [["__scopeId", "data-v-
|
|
5473
|
+
}), hP = /* @__PURE__ */ Bt(fP, [["__scopeId", "data-v-6cc6ac8a"]]), dP = { class: "ai-modal-header-icon" }, mP = /* @__PURE__ */ yt({
|
|
5471
5474
|
__name: "render-modal",
|
|
5472
5475
|
props: {
|
|
5473
5476
|
headBackground: { default: "linear-gradient(267deg, #2dd1f4 0%, #1482ff 95%)" },
|
|
@@ -5482,6 +5485,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5482
5485
|
width: 400
|
|
5483
5486
|
}) },
|
|
5484
5487
|
logo: { default: "ai-blueking-icon ai-blueking-ai" },
|
|
5488
|
+
name: {},
|
|
5485
5489
|
startPosition: { default: () => ({
|
|
5486
5490
|
top: window.innerHeight - 560,
|
|
5487
5491
|
bottom: 0,
|
|
@@ -5500,50 +5504,50 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5500
5504
|
clientX: 0,
|
|
5501
5505
|
clientY: 0
|
|
5502
5506
|
}, i = () => {
|
|
5503
|
-
var
|
|
5504
|
-
const
|
|
5507
|
+
var O, b, q, w;
|
|
5508
|
+
const C = (Z, qt) => Z === void 0 ? qt : Z;
|
|
5505
5509
|
return {
|
|
5506
|
-
top:
|
|
5507
|
-
bottom:
|
|
5508
|
-
left:
|
|
5509
|
-
right:
|
|
5510
|
+
top: C((O = e.startPosition) == null ? void 0 : O.top, r.height - e.sizeLimit.height),
|
|
5511
|
+
bottom: C((b = e.startPosition) == null ? void 0 : b.bottom, 0),
|
|
5512
|
+
left: C((q = e.startPosition) == null ? void 0 : q.left, 0),
|
|
5513
|
+
right: C((w = e.startPosition) == null ? void 0 : w.right, r.width - e.sizeLimit.width)
|
|
5510
5514
|
};
|
|
5511
|
-
}, a = Ct(i()), l =
|
|
5512
|
-
c.isMove = !0, c.type = "move", c.clientX =
|
|
5513
|
-
}, h = (
|
|
5514
|
-
c.isMove = !0, c.type = "rightDrag", c.clientX =
|
|
5515
|
-
}, f = (
|
|
5516
|
-
c.isMove = !0, c.type = "leftDrag", c.clientX =
|
|
5517
|
-
}, d = (
|
|
5518
|
-
c.isMove = !0, c.type = "topDrag", c.clientY =
|
|
5519
|
-
},
|
|
5520
|
-
c.isMove = !0, c.type = "bottomDrag", c.clientY =
|
|
5521
|
-
}, k = (
|
|
5522
|
-
c.isMove = !0, c.type = "topLeftDrag", c.clientY =
|
|
5523
|
-
},
|
|
5524
|
-
c.isMove = !0, c.type = "topRightDrag", c.clientY =
|
|
5525
|
-
}, A = (
|
|
5526
|
-
c.isMove = !0, c.type = "bottomLeftDrag", c.clientY =
|
|
5527
|
-
},
|
|
5528
|
-
c.isMove = !0, c.type = "bottomRightDrag", c.clientY =
|
|
5529
|
-
},
|
|
5515
|
+
}, a = Ct(i()), l = Tt(() => a.value.top <= e.positionLimit.top && a.value.bottom <= e.positionLimit.bottom), u = (C) => {
|
|
5516
|
+
c.isMove = !0, c.type = "move", c.clientX = C.clientX, c.clientY = C.clientY;
|
|
5517
|
+
}, h = (C) => {
|
|
5518
|
+
c.isMove = !0, c.type = "rightDrag", c.clientX = C.clientX;
|
|
5519
|
+
}, f = (C) => {
|
|
5520
|
+
c.isMove = !0, c.type = "leftDrag", c.clientX = C.clientX;
|
|
5521
|
+
}, d = (C) => {
|
|
5522
|
+
c.isMove = !0, c.type = "topDrag", c.clientY = C.clientY;
|
|
5523
|
+
}, _ = (C) => {
|
|
5524
|
+
c.isMove = !0, c.type = "bottomDrag", c.clientY = C.clientY;
|
|
5525
|
+
}, k = (C) => {
|
|
5526
|
+
c.isMove = !0, c.type = "topLeftDrag", c.clientY = C.clientY, c.clientX = C.clientX;
|
|
5527
|
+
}, D = (C) => {
|
|
5528
|
+
c.isMove = !0, c.type = "topRightDrag", c.clientY = C.clientY, c.clientX = C.clientX;
|
|
5529
|
+
}, A = (C) => {
|
|
5530
|
+
c.isMove = !0, c.type = "bottomLeftDrag", c.clientY = C.clientY, c.clientX = C.clientX;
|
|
5531
|
+
}, v = (C) => {
|
|
5532
|
+
c.isMove = !0, c.type = "bottomRightDrag", c.clientY = C.clientY, c.clientX = C.clientX;
|
|
5533
|
+
}, x = () => {
|
|
5530
5534
|
c.isMove = !1;
|
|
5531
|
-
},
|
|
5532
|
-
["move", "leftDrag"].includes(c.type) && (a.value.left +=
|
|
5533
|
-
},
|
|
5534
|
-
const { top:
|
|
5535
|
-
(r.width - w - Z < e.sizeLimit.width || w < e.positionLimit.left || Z < e.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(c.type) && (a.value.left -=
|
|
5536
|
-
},
|
|
5535
|
+
}, T = (C, O) => {
|
|
5536
|
+
["move", "leftDrag"].includes(c.type) && (a.value.left += C), ["move", "rightDrag"].includes(c.type) && (a.value.right -= C), ["move", "topDrag"].includes(c.type) && (a.value.top += O), ["move", "bottomDrag"].includes(c.type) && (a.value.bottom -= O), ["topLeftDrag"].includes(c.type) && (a.value.left += C, a.value.top += O), ["topRightDrag"].includes(c.type) && (a.value.right -= C, a.value.top += O), ["bottomLeftDrag"].includes(c.type) && (a.value.left += C, a.value.bottom -= O), ["bottomRightDrag"].includes(c.type) && (a.value.right -= C, a.value.bottom -= O);
|
|
5537
|
+
}, y = (C, O) => {
|
|
5538
|
+
const { top: b, bottom: q, left: w, right: Z } = a.value;
|
|
5539
|
+
(r.width - w - Z < e.sizeLimit.width || w < e.positionLimit.left || Z < e.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(c.type) && (a.value.left -= C), ["move", "rightDrag", "topRightDrag", "bottomRightDrag"].includes(c.type) && (a.value.right += C)), (r.height - b - q < e.sizeLimit.height || b < e.positionLimit.top || q < e.positionLimit.bottom) && (["move", "topDrag", "topRightDrag", "topLeftDrag"].includes(c.type) && (a.value.top -= O), ["move", "bottomDrag", "bottomLeftDrag", "bottomRightDrag"].includes(c.type) && (a.value.bottom += O));
|
|
5540
|
+
}, m = (C) => {
|
|
5537
5541
|
if (!c.isMove)
|
|
5538
5542
|
return;
|
|
5539
|
-
|
|
5540
|
-
const
|
|
5541
|
-
|
|
5543
|
+
C.preventDefault();
|
|
5544
|
+
const O = C.clientX - c.clientX, b = C.clientY - c.clientY;
|
|
5545
|
+
T(O, b), y(O, b), c.clientX = C.clientX, c.clientY = C.clientY;
|
|
5542
5546
|
}, R = () => {
|
|
5543
5547
|
r.height = window.innerHeight, r.width = window.innerWidth, a.value = i();
|
|
5544
|
-
},
|
|
5548
|
+
}, z = () => {
|
|
5545
5549
|
a.value.top = e.positionLimit.top, a.value.bottom = e.positionLimit.bottom;
|
|
5546
|
-
},
|
|
5550
|
+
}, J = () => {
|
|
5547
5551
|
a.value.top = r.height - e.sizeLimit.height, a.value.bottom = e.positionLimit.bottom;
|
|
5548
5552
|
}, L = () => {
|
|
5549
5553
|
o("clear");
|
|
@@ -5551,10 +5555,10 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5551
5555
|
o("close");
|
|
5552
5556
|
};
|
|
5553
5557
|
return Br(() => {
|
|
5554
|
-
window.addEventListener("mousemove",
|
|
5558
|
+
window.addEventListener("mousemove", m, !0), window.addEventListener("mouseup", x), window.addEventListener("resize", R);
|
|
5555
5559
|
}), mn(() => {
|
|
5556
|
-
window.removeEventListener("mousemove",
|
|
5557
|
-
}), (
|
|
5560
|
+
window.removeEventListener("mousemove", m, !0), window.removeEventListener("mouseup", x), window.removeEventListener("resize", R);
|
|
5561
|
+
}), (C, O) => (P(), H(
|
|
5558
5562
|
"section",
|
|
5559
5563
|
{
|
|
5560
5564
|
style: ve({
|
|
@@ -5570,7 +5574,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5570
5574
|
"header",
|
|
5571
5575
|
{
|
|
5572
5576
|
style: ve({
|
|
5573
|
-
background:
|
|
5577
|
+
background: C.headBackground
|
|
5574
5578
|
}),
|
|
5575
5579
|
class: "ai-modal-header",
|
|
5576
5580
|
onMousedown: bt(u, ["stop"])
|
|
@@ -5580,47 +5584,47 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5580
5584
|
F(
|
|
5581
5585
|
"i",
|
|
5582
5586
|
{
|
|
5583
|
-
class: me(
|
|
5587
|
+
class: me(C.logo)
|
|
5584
5588
|
},
|
|
5585
5589
|
null,
|
|
5586
5590
|
2
|
|
5587
5591
|
/* CLASS */
|
|
5588
5592
|
),
|
|
5589
5593
|
Ae(
|
|
5590
|
-
" " + _t(
|
|
5594
|
+
" " + _t(C.name || N(U)("小鲸")),
|
|
5591
5595
|
1
|
|
5592
5596
|
/* TEXT */
|
|
5593
5597
|
)
|
|
5594
5598
|
]),
|
|
5595
5599
|
F("span", null, [
|
|
5596
|
-
l.value ? Dt((
|
|
5600
|
+
l.value ? Dt((P(), H(
|
|
5597
5601
|
"i",
|
|
5598
5602
|
{
|
|
5599
5603
|
key: 0,
|
|
5600
5604
|
class: "ai-header-tool ai-blueking-icon ai-blueking-shangxiajuhe",
|
|
5601
|
-
onClick:
|
|
5605
|
+
onClick: J
|
|
5602
5606
|
},
|
|
5603
5607
|
null,
|
|
5604
5608
|
512
|
|
5605
5609
|
/* NEED_PATCH */
|
|
5606
5610
|
)), [
|
|
5607
|
-
[
|
|
5608
|
-
content:
|
|
5611
|
+
[N(s), {
|
|
5612
|
+
content: N(U)("向下收缩"),
|
|
5609
5613
|
distance: 20
|
|
5610
5614
|
}]
|
|
5611
|
-
]) : Dt((
|
|
5615
|
+
]) : Dt((P(), H(
|
|
5612
5616
|
"i",
|
|
5613
5617
|
{
|
|
5614
5618
|
key: 1,
|
|
5615
5619
|
class: "ai-header-tool ai-blueking-icon ai-blueking-shangxialashen-2",
|
|
5616
|
-
onClick:
|
|
5620
|
+
onClick: z
|
|
5617
5621
|
},
|
|
5618
5622
|
null,
|
|
5619
5623
|
512
|
|
5620
5624
|
/* NEED_PATCH */
|
|
5621
5625
|
)), [
|
|
5622
|
-
[
|
|
5623
|
-
content:
|
|
5626
|
+
[N(s), {
|
|
5627
|
+
content: N(U)("向上扩展"),
|
|
5624
5628
|
distance: 20
|
|
5625
5629
|
}]
|
|
5626
5630
|
]),
|
|
@@ -5634,8 +5638,8 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5634
5638
|
512
|
|
5635
5639
|
/* NEED_PATCH */
|
|
5636
5640
|
), [
|
|
5637
|
-
[
|
|
5638
|
-
content:
|
|
5641
|
+
[N(s), {
|
|
5642
|
+
content: N(U)("清空聊天记录"),
|
|
5639
5643
|
distance: 20
|
|
5640
5644
|
}]
|
|
5641
5645
|
]),
|
|
@@ -5649,8 +5653,8 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5649
5653
|
512
|
|
5650
5654
|
/* NEED_PATCH */
|
|
5651
5655
|
), [
|
|
5652
|
-
[
|
|
5653
|
-
content:
|
|
5656
|
+
[N(s), {
|
|
5657
|
+
content: N(U)("关闭"),
|
|
5654
5658
|
distance: 20
|
|
5655
5659
|
}]
|
|
5656
5660
|
])
|
|
@@ -5659,7 +5663,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5659
5663
|
36
|
|
5660
5664
|
/* STYLE, NEED_HYDRATION */
|
|
5661
5665
|
),
|
|
5662
|
-
Ur(
|
|
5666
|
+
Ur(C.$slots, "default", {}, void 0, !0),
|
|
5663
5667
|
F(
|
|
5664
5668
|
"span",
|
|
5665
5669
|
{
|
|
@@ -5694,7 +5698,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5694
5698
|
"span",
|
|
5695
5699
|
{
|
|
5696
5700
|
class: "drag-line bottom",
|
|
5697
|
-
onMousedown: bt(
|
|
5701
|
+
onMousedown: bt(_, ["stop"])
|
|
5698
5702
|
},
|
|
5699
5703
|
null,
|
|
5700
5704
|
32
|
|
@@ -5714,7 +5718,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5714
5718
|
"span",
|
|
5715
5719
|
{
|
|
5716
5720
|
class: "drag-line top-right-corner",
|
|
5717
|
-
onMousedown: bt(
|
|
5721
|
+
onMousedown: bt(D, ["stop"])
|
|
5718
5722
|
},
|
|
5719
5723
|
null,
|
|
5720
5724
|
32
|
|
@@ -5734,7 +5738,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5734
5738
|
"span",
|
|
5735
5739
|
{
|
|
5736
5740
|
class: "drag-line bottom-right-corner",
|
|
5737
|
-
onMousedown: bt(
|
|
5741
|
+
onMousedown: bt(v, ["stop"])
|
|
5738
5742
|
},
|
|
5739
5743
|
null,
|
|
5740
5744
|
32
|
|
@@ -5745,7 +5749,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5745
5749
|
/* STYLE */
|
|
5746
5750
|
));
|
|
5747
5751
|
}
|
|
5748
|
-
}), gP = /* @__PURE__ */ Bt(mP, [["__scopeId", "data-v-
|
|
5752
|
+
}), gP = /* @__PURE__ */ Bt(mP, [["__scopeId", "data-v-e603010f"]]), xP = /* @__PURE__ */ yt({
|
|
5749
5753
|
__name: "ai-blueking",
|
|
5750
5754
|
props: {
|
|
5751
5755
|
messages: {},
|
|
@@ -5757,6 +5761,8 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5757
5761
|
sizeLimit: {},
|
|
5758
5762
|
startPosition: {},
|
|
5759
5763
|
userPhoto: {},
|
|
5764
|
+
name: {},
|
|
5765
|
+
placeholder: {},
|
|
5760
5766
|
logo: {},
|
|
5761
5767
|
scrollLoading: { type: Boolean },
|
|
5762
5768
|
scrollLoadingEnd: { type: Boolean }
|
|
@@ -5776,9 +5782,10 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5776
5782
|
}, a = (l) => {
|
|
5777
5783
|
e("choose-prompt", l);
|
|
5778
5784
|
};
|
|
5779
|
-
return (l, u) => (
|
|
5785
|
+
return (l, u) => (P(), Qt(gP, {
|
|
5780
5786
|
"head-background": l.headBackground,
|
|
5781
5787
|
logo: l.logo,
|
|
5788
|
+
name: l.name,
|
|
5782
5789
|
"position-limit": l.positionLimit,
|
|
5783
5790
|
"size-limit": l.sizeLimit,
|
|
5784
5791
|
"start-position": l.startPosition,
|
|
@@ -5790,6 +5797,7 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5790
5797
|
background: l.background,
|
|
5791
5798
|
loading: l.loading,
|
|
5792
5799
|
messages: l.messages,
|
|
5800
|
+
placeholder: l.placeholder,
|
|
5793
5801
|
prompts: l.prompts,
|
|
5794
5802
|
"scroll-loading": l.scrollLoading,
|
|
5795
5803
|
"scroll-loading-end": l.scrollLoadingEnd,
|
|
@@ -5798,11 +5806,11 @@ const qN = { class: "message-content user" }, RN = {
|
|
|
5798
5806
|
onScrollLoad: i,
|
|
5799
5807
|
onSend: r,
|
|
5800
5808
|
onStop: c
|
|
5801
|
-
}, null, 8, ["background", "loading", "messages", "prompts", "scroll-loading", "scroll-loading-end", "user-photo"])
|
|
5809
|
+
}, null, 8, ["background", "loading", "messages", "placeholder", "prompts", "scroll-loading", "scroll-loading-end", "user-photo"])
|
|
5802
5810
|
]),
|
|
5803
5811
|
_: 1
|
|
5804
5812
|
/* STABLE */
|
|
5805
|
-
}, 8, ["head-background", "logo", "position-limit", "size-limit", "start-position"]));
|
|
5813
|
+
}, 8, ["head-background", "logo", "name", "position-limit", "size-limit", "start-position"]));
|
|
5806
5814
|
}
|
|
5807
5815
|
});
|
|
5808
5816
|
(function() {
|
|
@@ -5852,9 +5860,9 @@ class AP {
|
|
|
5852
5860
|
`).forEach((u) => {
|
|
5853
5861
|
const h = u.replace("data:", "").trim();
|
|
5854
5862
|
if (Gr(h)) {
|
|
5855
|
-
const { event: f, content: d, result:
|
|
5856
|
-
if (
|
|
5857
|
-
this.handleError(
|
|
5863
|
+
const { event: f, content: d, result: _, code: k, message: D } = JSON.parse(h);
|
|
5864
|
+
if (_ === !1 || r.status !== 200) {
|
|
5865
|
+
this.handleError(D, k, e);
|
|
5858
5866
|
return;
|
|
5859
5867
|
}
|
|
5860
5868
|
switch (f) {
|
|
@@ -5865,7 +5873,7 @@ class AP {
|
|
|
5865
5873
|
this.handleEnd(e);
|
|
5866
5874
|
break;
|
|
5867
5875
|
case "error":
|
|
5868
|
-
this.handleError(
|
|
5876
|
+
this.handleError(D, k, e);
|
|
5869
5877
|
break;
|
|
5870
5878
|
}
|
|
5871
5879
|
}
|