@opentiny/tiny-robot 0.3.1-alpha.3 → 0.3.1-alpha.5
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/action-group/index.js +1 -1
- package/dist/base-popper/index.js +1 -1
- package/dist/bubble/index.js +317 -317
- package/dist/chat-input/index.js +3151 -0
- package/dist/chat-input-actions/index.js +13 -0
- package/dist/drag-overlay/index.js +5 -5
- package/dist/dropdown-menu/index.js +5 -5
- package/dist/flow-layout-buttons/index.js +1 -1
- package/dist/history/index.js +1 -1
- package/dist/index.d.ts +2340 -1342
- package/dist/index.js +133 -101
- package/dist/index2.js +183 -285
- package/dist/index3.js +250 -683
- package/dist/index4.js +729 -147
- package/dist/index5.js +301 -0
- package/dist/index6.js +161 -0
- package/dist/mcp-add-form/index.js +1 -1
- package/dist/mcp-server-picker/index.js +58 -59
- package/dist/sender/index.js +6 -1625
- package/dist/sender-compat/index.js +233 -0
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +1 -1
- package/dist/suggestion-popover/index.js +2 -2
- package/dist/useSlotRefs.js +3 -3
- package/dist/utils.js +1 -1
- package/package.json +13 -3
package/dist/bubble/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var hn = Object.defineProperty;
|
|
2
2
|
var bn = (u, e, t) => e in u ? hn(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
|
|
3
3
|
var Ou = (u, e, t) => bn(u, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { defineComponent as
|
|
4
|
+
import { defineComponent as Fu, ref as l0, createElementBlock as H, openBlock as S, createElementVNode as Z, createVNode as Dt, toDisplayString as Du, unref as f0, normalizeClass as Cu, withDirectives as mn, vShow as _n, computed as X, useCssModule as xn, createCommentVNode as Pu, createBlock as eu, resolveDynamicComponent as xu, createTextVNode as gn, inject as W0, normalizeProps as Ce, mergeProps as Ku, h as Z0, useSlots as kn, useAttrs as En, normalizeStyle as An, renderSlot as Qu, Fragment as De, renderList as Ee, watch as Cn, nextTick as Dn, createSlots as V0, withCtx as Y0, guardReactiveProps as yn, provide as X0 } from "vue";
|
|
5
5
|
import { _ as Fn } from "../loading.js";
|
|
6
6
|
import { t as Tn } from "../utils.js";
|
|
7
7
|
import { IconArrowUp as Sn, IconPlugin as J0, IconArrowDown as wn, IconLoading as vn, IconError as Rn, IconCancelled as In } from "@opentiny/tiny-robot-svgs";
|
|
8
8
|
import { _ as ce } from "../_plugin-vue_export-helper.js";
|
|
9
|
-
import {
|
|
10
|
-
class
|
|
9
|
+
import { i as Mn } from "../index4.js";
|
|
10
|
+
class d0 {
|
|
11
11
|
}
|
|
12
|
-
const Ln = { class: "tr-bubble__step-text" }, On = { class: "tr-bubble__step-text-title" }, Nn = { class: "tr-bubble__step-text-content-wrapper" }, Pn = /* @__PURE__ */
|
|
12
|
+
const Ln = { class: "tr-bubble__step-text" }, On = { class: "tr-bubble__step-text-title" }, Nn = { class: "tr-bubble__step-text-content-wrapper" }, Pn = /* @__PURE__ */ Fu({
|
|
13
13
|
__name: "collapsible-text",
|
|
14
14
|
props: {
|
|
15
15
|
title: {},
|
|
@@ -17,35 +17,35 @@ const Ln = { class: "tr-bubble__step-text" }, On = { class: "tr-bubble__step-tex
|
|
|
17
17
|
defaultOpen: { type: Boolean }
|
|
18
18
|
},
|
|
19
19
|
setup(u) {
|
|
20
|
-
const e = u, t =
|
|
20
|
+
const e = u, t = l0(e.defaultOpen ?? !1);
|
|
21
21
|
return (n, r) => (S(), H("div", Ln, [
|
|
22
22
|
Z("div", On, [
|
|
23
|
-
Z("span", null,
|
|
24
|
-
Dt(
|
|
25
|
-
class:
|
|
23
|
+
Z("span", null, Du(e.title), 1),
|
|
24
|
+
Dt(f0(Sn), {
|
|
25
|
+
class: Cu(["expand-icon", { "rotate-180": !t.value }]),
|
|
26
26
|
onClick: r[0] || (r[0] = (o) => t.value = !t.value)
|
|
27
27
|
}, null, 8, ["class"])
|
|
28
28
|
]),
|
|
29
29
|
Z("div", Nn, [
|
|
30
|
-
mn(Z("div", { class: "tr-bubble__step-text-content" },
|
|
30
|
+
mn(Z("div", { class: "tr-bubble__step-text-content" }, Du(e.content), 513), [
|
|
31
31
|
[_n, t.value]
|
|
32
32
|
])
|
|
33
33
|
])
|
|
34
34
|
]));
|
|
35
35
|
}
|
|
36
|
-
}), Bn = /* @__PURE__ */ ce(Pn, [["__scopeId", "data-v-c614ffd3"]]), zn = Bn, qn = { class: "tr-bubble__text" }, Un = /* @__PURE__ */
|
|
36
|
+
}), Bn = /* @__PURE__ */ ce(Pn, [["__scopeId", "data-v-c614ffd3"]]), zn = Bn, qn = { class: "tr-bubble__text" }, Un = /* @__PURE__ */ Fu({
|
|
37
37
|
__name: "text",
|
|
38
38
|
props: {
|
|
39
39
|
content: {}
|
|
40
40
|
},
|
|
41
41
|
setup(u) {
|
|
42
42
|
const e = u;
|
|
43
|
-
return (t, n) => (S(), H("span", qn,
|
|
43
|
+
return (t, n) => (S(), H("span", qn, Du(e.content), 1));
|
|
44
44
|
}
|
|
45
|
-
}), Hn = /* @__PURE__ */ ce(Un, [["__scopeId", "data-v-06772094"]]),
|
|
45
|
+
}), Hn = /* @__PURE__ */ ce(Un, [["__scopeId", "data-v-06772094"]]), p0 = Hn, $n = { class: "tr-bubble__step-tool" }, jn = { class: "tr-bubble__step-tool-header" }, Gn = { class: "tr-bubble__step-tool-left" }, Wn = { class: "tr-bubble__step-tool-title" }, Zn = { class: "tr-bubble__step-tool-name" }, Vn = { class: "tr-bubble__step-tool-expand" }, Yn = {
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "tr-bubble__step-tool-params"
|
|
48
|
-
}, Xn = ["innerHTML"], Jn = /* @__PURE__ */
|
|
48
|
+
}, Xn = ["innerHTML"], Jn = /* @__PURE__ */ Fu({
|
|
49
49
|
__name: "tool",
|
|
50
50
|
props: {
|
|
51
51
|
name: {},
|
|
@@ -55,7 +55,7 @@ const Ln = { class: "tr-bubble__step-text" }, On = { class: "tr-bubble__step-tex
|
|
|
55
55
|
defaultOpen: { type: Boolean }
|
|
56
56
|
},
|
|
57
57
|
setup(u) {
|
|
58
|
-
const e = u, t =
|
|
58
|
+
const e = u, t = l0(e.defaultOpen ?? !1), n = /* @__PURE__ */ new Map([
|
|
59
59
|
["running", { text: "正在调用", icon: vn }],
|
|
60
60
|
["success", { text: "已调用", icon: J0 }],
|
|
61
61
|
["failed", { text: "调用失败", icon: Rn }],
|
|
@@ -81,17 +81,17 @@ const Ln = { class: "tr-bubble__step-text" }, On = { class: "tr-bubble__step-tex
|
|
|
81
81
|
return (c, a) => (S(), H("div", $n, [
|
|
82
82
|
Z("div", jn, [
|
|
83
83
|
Z("div", Gn, [
|
|
84
|
-
(S(), eu(
|
|
85
|
-
class:
|
|
84
|
+
(S(), eu(xu(r.value.icon), {
|
|
85
|
+
class: Cu(["tr-bubble__step-tool-icon", `icon-${e.status}`])
|
|
86
86
|
}, null, 8, ["class"])),
|
|
87
87
|
Z("span", Wn, [
|
|
88
|
-
gn(
|
|
89
|
-
Z("span", Zn,
|
|
88
|
+
gn(Du(r.value.text) + " ", 1),
|
|
89
|
+
Z("span", Zn, Du(e.name), 1)
|
|
90
90
|
])
|
|
91
91
|
]),
|
|
92
92
|
Z("div", Vn, [
|
|
93
|
-
Dt(
|
|
94
|
-
class:
|
|
93
|
+
Dt(f0(wn), {
|
|
94
|
+
class: Cu(["expand-icon", { "-rotate-90": !t.value }]),
|
|
95
95
|
onClick: a[0] || (a[0] = (s) => t.value = !t.value)
|
|
96
96
|
}, null, 8, ["class"])
|
|
97
97
|
])
|
|
@@ -114,27 +114,27 @@ const Ln = { class: "tr-bubble__step-text" }, On = { class: "tr-bubble__step-tex
|
|
|
114
114
|
}, nr = {
|
|
115
115
|
$style: tr
|
|
116
116
|
}, rr = /* @__PURE__ */ ce(Jn, [["__cssModules", nr], ["__scopeId", "data-v-51783ae6"]]), or = rr, yt = /* @__PURE__ */ new Map([
|
|
117
|
-
["text",
|
|
117
|
+
["text", p0],
|
|
118
118
|
["tool", or],
|
|
119
119
|
["collapsible-text", zn]
|
|
120
|
-
]), Ft = Symbol("bubbleContentRendererMap"), Tt = Symbol("bubbleContentFallbackRenderer"), cr = /* @__PURE__ */
|
|
120
|
+
]), Ft = Symbol("bubbleContentRendererMap"), Tt = Symbol("bubbleContentFallbackRenderer"), cr = /* @__PURE__ */ Fu({
|
|
121
121
|
__name: "ContentItem",
|
|
122
122
|
props: {
|
|
123
123
|
item: {}
|
|
124
124
|
},
|
|
125
125
|
setup(u) {
|
|
126
|
-
const e = W0(Ft, yt), t = W0(Tt,
|
|
126
|
+
const e = W0(Ft, yt), t = W0(Tt, p0), n = u, r = (i) => {
|
|
127
127
|
const c = e.get(i) || t;
|
|
128
|
-
return typeof c == "function" ? { isComponent: !1, vNodeOrComponent: c(n.item) } : c instanceof
|
|
128
|
+
return typeof c == "function" ? { isComponent: !1, vNodeOrComponent: c(n.item) } : c instanceof d0 ? { isComponent: !1, vNodeOrComponent: c.render(n.item) } : typeof c == "object" && c !== null && "component" in c ? {
|
|
129
129
|
isComponent: !0,
|
|
130
130
|
vNodeOrComponent: c.component,
|
|
131
131
|
defaultProps: c.defaultProps
|
|
132
132
|
} : { isComponent: !0, vNodeOrComponent: c };
|
|
133
133
|
}, o = X(() => r(n.item.type));
|
|
134
|
-
return (i, c) => o.value.isComponent ? (S(), eu(
|
|
134
|
+
return (i, c) => o.value.isComponent ? (S(), eu(xu(o.value.vNodeOrComponent), Ce(Ku({ key: 0 }, { ...o.value.defaultProps, ...n.item })), null, 16)) : (S(), eu(xu(o.value.vNodeOrComponent), { key: 1 }));
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
|
-
/*! @license DOMPurify 3.3.
|
|
137
|
+
/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
|
|
138
138
|
const {
|
|
139
139
|
entries: St,
|
|
140
140
|
setPrototypeOf: Q0,
|
|
@@ -145,10 +145,10 @@ const {
|
|
|
145
145
|
let {
|
|
146
146
|
freeze: j,
|
|
147
147
|
seal: Q,
|
|
148
|
-
create:
|
|
148
|
+
create: r0
|
|
149
149
|
} = Object, {
|
|
150
|
-
apply:
|
|
151
|
-
construct:
|
|
150
|
+
apply: o0,
|
|
151
|
+
construct: c0
|
|
152
152
|
} = typeof Reflect < "u" && Reflect;
|
|
153
153
|
j || (j = function(e) {
|
|
154
154
|
return e;
|
|
@@ -156,33 +156,33 @@ j || (j = function(e) {
|
|
|
156
156
|
Q || (Q = function(e) {
|
|
157
157
|
return e;
|
|
158
158
|
});
|
|
159
|
-
|
|
159
|
+
o0 || (o0 = function(e, t) {
|
|
160
160
|
for (var n = arguments.length, r = new Array(n > 2 ? n - 2 : 0), o = 2; o < n; o++)
|
|
161
161
|
r[o - 2] = arguments[o];
|
|
162
162
|
return e.apply(t, r);
|
|
163
163
|
});
|
|
164
|
-
|
|
164
|
+
c0 || (c0 = function(e) {
|
|
165
165
|
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
|
|
166
166
|
n[r - 1] = arguments[r];
|
|
167
167
|
return new e(...n);
|
|
168
168
|
});
|
|
169
|
-
const _e = G(Array.prototype.forEach), lr = G(Array.prototype.lastIndexOf), K0 = G(Array.prototype.pop), Zu = G(Array.prototype.push), fr = G(Array.prototype.splice), Ae = G(String.prototype.toLowerCase),
|
|
169
|
+
const _e = G(Array.prototype.forEach), lr = G(Array.prototype.lastIndexOf), K0 = G(Array.prototype.pop), Zu = G(Array.prototype.push), fr = G(Array.prototype.splice), Ae = G(String.prototype.toLowerCase), Ge = G(String.prototype.toString), We = G(String.prototype.match), Vu = G(String.prototype.replace), dr = G(String.prototype.indexOf), pr = G(String.prototype.trim), uu = G(Object.prototype.hasOwnProperty), $ = G(RegExp.prototype.test), Yu = hr(TypeError);
|
|
170
170
|
function G(u) {
|
|
171
171
|
return function(e) {
|
|
172
172
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
173
173
|
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
|
|
174
174
|
n[r - 1] = arguments[r];
|
|
175
|
-
return
|
|
175
|
+
return o0(u, e, n);
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
178
|
function hr(u) {
|
|
179
179
|
return function() {
|
|
180
180
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
181
181
|
t[n] = arguments[n];
|
|
182
|
-
return
|
|
182
|
+
return c0(u, t);
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function y(u, e) {
|
|
186
186
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ae;
|
|
187
187
|
Q0 && Q0(u, null);
|
|
188
188
|
let n = e.length;
|
|
@@ -201,10 +201,10 @@ function br(u) {
|
|
|
201
201
|
uu(u, e) || (u[e] = null);
|
|
202
202
|
return u;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
const e =
|
|
204
|
+
function cu(u) {
|
|
205
|
+
const e = r0(null);
|
|
206
206
|
for (const [t, n] of St(u))
|
|
207
|
-
uu(u, t) && (Array.isArray(n) ? e[t] = br(n) : n && typeof n == "object" && n.constructor === Object ? e[t] =
|
|
207
|
+
uu(u, t) && (Array.isArray(n) ? e[t] = br(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = cu(n) : e[t] = n);
|
|
208
208
|
return e;
|
|
209
209
|
}
|
|
210
210
|
function Xu(u, e) {
|
|
@@ -223,7 +223,7 @@ function Xu(u, e) {
|
|
|
223
223
|
}
|
|
224
224
|
return t;
|
|
225
225
|
}
|
|
226
|
-
const ut = j(["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", "search", "section", "select", "shadow", "slot", "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"]),
|
|
226
|
+
const ut = j(["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", "search", "section", "select", "shadow", "slot", "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"]), Ze = j(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ve = j(["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"]), mr = j(["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 = j(["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"]), _r = j(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), et = j(["#text"]), tt = j(["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", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "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", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Xe = j(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "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", "exponent", "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", "intercept", "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", "mask-type", "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", "slope", "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", "tablevalues", "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"]), nt = j(["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"]), xe = j(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), xr = Q(/\{\{[\w\W]*|[\w\W]*\}\}/gm), gr = Q(/<%[\w\W]*|[\w\W]*%>/gm), kr = Q(/\$\{[\w\W]*/gm), Er = Q(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ar = Q(/^aria-[\-\w]+$/), wt = Q(
|
|
227
227
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
228
228
|
// eslint-disable-line no-useless-escape
|
|
229
229
|
), Cr = Q(/^(?:\w+script|data):/i), Dr = Q(
|
|
@@ -287,7 +287,7 @@ const Ju = {
|
|
|
287
287
|
function Rt() {
|
|
288
288
|
let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Fr();
|
|
289
289
|
const e = (g) => Rt(g);
|
|
290
|
-
if (e.version = "3.3.
|
|
290
|
+
if (e.version = "3.3.1", e.removed = [], !u || !u.document || u.document.nodeType !== Ju.document || !u.Element)
|
|
291
291
|
return e.isSupported = !1, e;
|
|
292
292
|
let {
|
|
293
293
|
document: t
|
|
@@ -309,32 +309,32 @@ function Rt() {
|
|
|
309
309
|
}
|
|
310
310
|
let _, A = "";
|
|
311
311
|
const {
|
|
312
|
-
implementation:
|
|
312
|
+
implementation: F,
|
|
313
313
|
createNodeIterator: M,
|
|
314
314
|
createDocumentFragment: Y,
|
|
315
315
|
getElementsByTagName: nu
|
|
316
316
|
} = t, {
|
|
317
|
-
importNode:
|
|
317
|
+
importNode: ku
|
|
318
318
|
} = n;
|
|
319
319
|
let L = ot();
|
|
320
|
-
e.isSupported = typeof St == "function" && typeof k == "function" &&
|
|
320
|
+
e.isSupported = typeof St == "function" && typeof k == "function" && F && F.createHTMLDocument !== void 0;
|
|
321
321
|
const {
|
|
322
322
|
MUSTACHE_EXPR: Hu,
|
|
323
323
|
ERB_EXPR: $u,
|
|
324
|
-
TMPLIT_EXPR:
|
|
325
|
-
DATA_ATTR:
|
|
324
|
+
TMPLIT_EXPR: Tu,
|
|
325
|
+
DATA_ATTR: hu,
|
|
326
326
|
ARIA_ATTR: Ie,
|
|
327
327
|
IS_SCRIPT_OR_DATA: nn,
|
|
328
|
-
ATTR_WHITESPACE:
|
|
328
|
+
ATTR_WHITESPACE: A0,
|
|
329
329
|
CUSTOM_ELEMENT: rn
|
|
330
330
|
} = rt;
|
|
331
331
|
let {
|
|
332
|
-
IS_ALLOWED_URI:
|
|
333
|
-
} = rt,
|
|
334
|
-
const
|
|
332
|
+
IS_ALLOWED_URI: C0
|
|
333
|
+
} = rt, N = null;
|
|
334
|
+
const D0 = y({}, [...ut, ...Ze, ...Ve, ...Ye, ...et]);
|
|
335
335
|
let z = null;
|
|
336
|
-
const
|
|
337
|
-
let R = Object.seal(
|
|
336
|
+
const y0 = y({}, [...tt, ...Xe, ...nt, ...xe]);
|
|
337
|
+
let R = Object.seal(r0(null, {
|
|
338
338
|
tagNameCheck: {
|
|
339
339
|
writable: !0,
|
|
340
340
|
configurable: !1,
|
|
@@ -354,7 +354,7 @@ function Rt() {
|
|
|
354
354
|
value: !1
|
|
355
355
|
}
|
|
356
356
|
})), ju = null, Me = null;
|
|
357
|
-
const
|
|
357
|
+
const Su = Object.seal(r0(null, {
|
|
358
358
|
tagCheck: {
|
|
359
359
|
writable: !0,
|
|
360
360
|
configurable: !1,
|
|
@@ -368,28 +368,28 @@ function Rt() {
|
|
|
368
368
|
value: null
|
|
369
369
|
}
|
|
370
370
|
}));
|
|
371
|
-
let
|
|
371
|
+
let F0 = !0, Le = !0, T0 = !1, S0 = !0, wu = !1, le = !0, Eu = !1, Oe = !1, Ne = !1, vu = !1, fe = !1, de = !1, w0 = !0, v0 = !1;
|
|
372
372
|
const on = "user-content-";
|
|
373
|
-
let Pe = !0, Gu = !1,
|
|
374
|
-
const
|
|
373
|
+
let Pe = !0, Gu = !1, Ru = {}, ru = null;
|
|
374
|
+
const Be = y({}, ["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"]);
|
|
375
375
|
let R0 = null;
|
|
376
|
-
const I0 =
|
|
377
|
-
let
|
|
378
|
-
const M0 =
|
|
379
|
-
let Iu =
|
|
380
|
-
const cn =
|
|
381
|
-
let be =
|
|
382
|
-
const an =
|
|
376
|
+
const I0 = y({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
377
|
+
let ze = null;
|
|
378
|
+
const M0 = y({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), pe = "http://www.w3.org/1998/Math/MathML", he = "http://www.w3.org/2000/svg", fu = "http://www.w3.org/1999/xhtml";
|
|
379
|
+
let Iu = fu, qe = !1, Ue = null;
|
|
380
|
+
const cn = y({}, [pe, he, fu], Ge);
|
|
381
|
+
let be = y({}, ["mi", "mo", "mn", "ms", "mtext"]), me = y({}, ["annotation-xml"]);
|
|
382
|
+
const an = y({}, ["title", "style", "font", "a", "script"]);
|
|
383
383
|
let Wu = null;
|
|
384
384
|
const sn = ["application/xhtml+xml", "text/html"], ln = "text/html";
|
|
385
|
-
let
|
|
385
|
+
let O = null, Mu = null;
|
|
386
386
|
const fn = t.createElement("form"), L0 = function(l) {
|
|
387
387
|
return l instanceof RegExp || l instanceof Function;
|
|
388
|
-
},
|
|
388
|
+
}, He = function() {
|
|
389
389
|
let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
390
390
|
if (!(Mu && Mu === l)) {
|
|
391
|
-
if ((!l || typeof l != "object") && (l = {}), l =
|
|
392
|
-
sn.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? ln : l.PARSER_MEDIA_TYPE,
|
|
391
|
+
if ((!l || typeof l != "object") && (l = {}), l = cu(l), Wu = // eslint-disable-next-line unicorn/prefer-includes
|
|
392
|
+
sn.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? ln : l.PARSER_MEDIA_TYPE, O = Wu === "application/xhtml+xml" ? Ge : Ae, N = uu(l, "ALLOWED_TAGS") ? y({}, l.ALLOWED_TAGS, O) : D0, z = uu(l, "ALLOWED_ATTR") ? y({}, l.ALLOWED_ATTR, O) : y0, Ue = uu(l, "ALLOWED_NAMESPACES") ? y({}, l.ALLOWED_NAMESPACES, Ge) : cn, ze = uu(l, "ADD_URI_SAFE_ATTR") ? y(cu(M0), l.ADD_URI_SAFE_ATTR, O) : M0, R0 = uu(l, "ADD_DATA_URI_TAGS") ? y(cu(I0), l.ADD_DATA_URI_TAGS, O) : I0, ru = uu(l, "FORBID_CONTENTS") ? y({}, l.FORBID_CONTENTS, O) : Be, ju = uu(l, "FORBID_TAGS") ? y({}, l.FORBID_TAGS, O) : cu({}), Me = uu(l, "FORBID_ATTR") ? y({}, l.FORBID_ATTR, O) : cu({}), Ru = uu(l, "USE_PROFILES") ? l.USE_PROFILES : !1, F0 = l.ALLOW_ARIA_ATTR !== !1, Le = l.ALLOW_DATA_ATTR !== !1, T0 = l.ALLOW_UNKNOWN_PROTOCOLS || !1, S0 = l.ALLOW_SELF_CLOSE_IN_ATTR !== !1, wu = l.SAFE_FOR_TEMPLATES || !1, le = l.SAFE_FOR_XML !== !1, Eu = l.WHOLE_DOCUMENT || !1, vu = l.RETURN_DOM || !1, fe = l.RETURN_DOM_FRAGMENT || !1, de = l.RETURN_TRUSTED_TYPE || !1, Ne = l.FORCE_BODY || !1, w0 = l.SANITIZE_DOM !== !1, v0 = l.SANITIZE_NAMED_PROPS || !1, Pe = l.KEEP_CONTENT !== !1, Gu = l.IN_PLACE || !1, C0 = l.ALLOWED_URI_REGEXP || wt, Iu = l.NAMESPACE || fu, be = l.MATHML_TEXT_INTEGRATION_POINTS || be, me = l.HTML_INTEGRATION_POINTS || me, R = l.CUSTOM_ELEMENT_HANDLING || {}, l.CUSTOM_ELEMENT_HANDLING && L0(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (R.tagNameCheck = l.CUSTOM_ELEMENT_HANDLING.tagNameCheck), l.CUSTOM_ELEMENT_HANDLING && L0(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (R.attributeNameCheck = l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), l.CUSTOM_ELEMENT_HANDLING && typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), wu && (Le = !1), fe && (vu = !0), Ru && (N = y({}, et), z = [], Ru.html === !0 && (y(N, ut), y(z, tt)), Ru.svg === !0 && (y(N, Ze), y(z, Xe), y(z, xe)), Ru.svgFilters === !0 && (y(N, Ve), y(z, Xe), y(z, xe)), Ru.mathMl === !0 && (y(N, Ye), y(z, nt), y(z, xe))), l.ADD_TAGS && (typeof l.ADD_TAGS == "function" ? Su.tagCheck = l.ADD_TAGS : (N === D0 && (N = cu(N)), y(N, l.ADD_TAGS, O))), l.ADD_ATTR && (typeof l.ADD_ATTR == "function" ? Su.attributeCheck = l.ADD_ATTR : (z === y0 && (z = cu(z)), y(z, l.ADD_ATTR, O))), l.ADD_URI_SAFE_ATTR && y(ze, l.ADD_URI_SAFE_ATTR, O), l.FORBID_CONTENTS && (ru === Be && (ru = cu(ru)), y(ru, l.FORBID_CONTENTS, O)), l.ADD_FORBID_CONTENTS && (ru === Be && (ru = cu(ru)), y(ru, l.ADD_FORBID_CONTENTS, O)), Pe && (N["#text"] = !0), Eu && y(N, ["html", "head", "body"]), N.table && (y(N, ["tbody"]), delete ju.tbody), l.TRUSTED_TYPES_POLICY) {
|
|
393
393
|
if (typeof l.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
394
394
|
throw Yu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
395
395
|
if (typeof l.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -399,15 +399,15 @@ function Rt() {
|
|
|
399
399
|
_ === void 0 && (_ = Tr(h, r)), _ !== null && typeof A == "string" && (A = _.createHTML(""));
|
|
400
400
|
j && j(l), Mu = l;
|
|
401
401
|
}
|
|
402
|
-
}, O0 =
|
|
402
|
+
}, O0 = y({}, [...Ze, ...Ve, ...mr]), N0 = y({}, [...Ye, ..._r]), dn = function(l) {
|
|
403
403
|
let b = k(l);
|
|
404
404
|
(!b || !b.tagName) && (b = {
|
|
405
405
|
namespaceURI: Iu,
|
|
406
406
|
tagName: "template"
|
|
407
407
|
});
|
|
408
408
|
const x = Ae(l.tagName), v = Ae(b.tagName);
|
|
409
|
-
return
|
|
410
|
-
},
|
|
409
|
+
return Ue[l.namespaceURI] ? l.namespaceURI === he ? b.namespaceURI === fu ? x === "svg" : b.namespaceURI === pe ? x === "svg" && (v === "annotation-xml" || be[v]) : !!O0[x] : l.namespaceURI === pe ? b.namespaceURI === fu ? x === "math" : b.namespaceURI === he ? x === "math" && me[v] : !!N0[x] : l.namespaceURI === fu ? b.namespaceURI === he && !me[v] || b.namespaceURI === pe && !be[v] ? !1 : !N0[x] && (an[x] || !O0[x]) : !!(Wu === "application/xhtml+xml" && Ue[l.namespaceURI]) : !1;
|
|
410
|
+
}, ou = function(l) {
|
|
411
411
|
Zu(e.removed, {
|
|
412
412
|
element: l
|
|
413
413
|
});
|
|
@@ -416,7 +416,7 @@ function Rt() {
|
|
|
416
416
|
} catch {
|
|
417
417
|
D(l);
|
|
418
418
|
}
|
|
419
|
-
},
|
|
419
|
+
}, Au = function(l, b) {
|
|
420
420
|
try {
|
|
421
421
|
Zu(e.removed, {
|
|
422
422
|
attribute: b.getAttributeNode(l),
|
|
@@ -429,9 +429,9 @@ function Rt() {
|
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
431
|
if (b.removeAttribute(l), l === "is")
|
|
432
|
-
if (
|
|
432
|
+
if (vu || fe)
|
|
433
433
|
try {
|
|
434
|
-
|
|
434
|
+
ou(b);
|
|
435
435
|
} catch {
|
|
436
436
|
}
|
|
437
437
|
else
|
|
@@ -444,25 +444,25 @@ function Rt() {
|
|
|
444
444
|
if (Ne)
|
|
445
445
|
l = "<remove></remove>" + l;
|
|
446
446
|
else {
|
|
447
|
-
const I =
|
|
447
|
+
const I = We(l, /^[\r\n\t ]+/);
|
|
448
448
|
x = I && I[0];
|
|
449
449
|
}
|
|
450
|
-
Wu === "application/xhtml+xml" && Iu ===
|
|
450
|
+
Wu === "application/xhtml+xml" && Iu === fu && (l = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + l + "</body></html>");
|
|
451
451
|
const v = _ ? _.createHTML(l) : l;
|
|
452
|
-
if (Iu ===
|
|
452
|
+
if (Iu === fu)
|
|
453
453
|
try {
|
|
454
454
|
b = new m().parseFromString(v, Wu);
|
|
455
455
|
} catch {
|
|
456
456
|
}
|
|
457
457
|
if (!b || !b.documentElement) {
|
|
458
|
-
b =
|
|
458
|
+
b = F.createDocument(Iu, "template", null);
|
|
459
459
|
try {
|
|
460
|
-
b.documentElement.innerHTML =
|
|
460
|
+
b.documentElement.innerHTML = qe ? A : v;
|
|
461
461
|
} catch {
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
const U = b.body || b.documentElement;
|
|
465
|
-
return l && x && U.insertBefore(t.createTextNode(x), U.childNodes[0] || null), Iu ===
|
|
465
|
+
return l && x && U.insertBefore(t.createTextNode(x), U.childNodes[0] || null), Iu === fu ? nu.call(b, Eu ? "html" : "body")[0] : Eu ? b.documentElement : U;
|
|
466
466
|
}, B0 = function(l) {
|
|
467
467
|
return M.call(
|
|
468
468
|
l.ownerDocument || l,
|
|
@@ -471,52 +471,52 @@ function Rt() {
|
|
|
471
471
|
s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION,
|
|
472
472
|
null
|
|
473
473
|
);
|
|
474
|
-
},
|
|
474
|
+
}, $e = function(l) {
|
|
475
475
|
return l instanceof f && (typeof l.nodeName != "string" || typeof l.textContent != "string" || typeof l.removeChild != "function" || !(l.attributes instanceof d) || typeof l.removeAttribute != "function" || typeof l.setAttribute != "function" || typeof l.namespaceURI != "string" || typeof l.insertBefore != "function" || typeof l.hasChildNodes != "function");
|
|
476
476
|
}, z0 = function(l) {
|
|
477
477
|
return typeof c == "function" && l instanceof c;
|
|
478
478
|
};
|
|
479
|
-
function
|
|
479
|
+
function du(g, l, b) {
|
|
480
480
|
_e(g, (x) => {
|
|
481
481
|
x.call(e, l, b, Mu);
|
|
482
482
|
});
|
|
483
483
|
}
|
|
484
484
|
const q0 = function(l) {
|
|
485
485
|
let b = null;
|
|
486
|
-
if (
|
|
487
|
-
return
|
|
488
|
-
const x =
|
|
489
|
-
if (
|
|
486
|
+
if (du(L.beforeSanitizeElements, l, null), $e(l))
|
|
487
|
+
return ou(l), !0;
|
|
488
|
+
const x = O(l.nodeName);
|
|
489
|
+
if (du(L.uponSanitizeElement, l, {
|
|
490
490
|
tagName: x,
|
|
491
|
-
allowedTags:
|
|
491
|
+
allowedTags: N
|
|
492
492
|
}), le && l.hasChildNodes() && !z0(l.firstElementChild) && $(/<[/\w!]/g, l.innerHTML) && $(/<[/\w!]/g, l.textContent) || l.nodeType === Ju.progressingInstruction || le && l.nodeType === Ju.comment && $(/<[/\w]/g, l.data))
|
|
493
|
-
return
|
|
494
|
-
if (!(
|
|
493
|
+
return ou(l), !0;
|
|
494
|
+
if (!(Su.tagCheck instanceof Function && Su.tagCheck(x)) && (!N[x] || ju[x])) {
|
|
495
495
|
if (!ju[x] && H0(x) && (R.tagNameCheck instanceof RegExp && $(R.tagNameCheck, x) || R.tagNameCheck instanceof Function && R.tagNameCheck(x)))
|
|
496
496
|
return !1;
|
|
497
|
-
if (Pe && !
|
|
497
|
+
if (Pe && !ru[x]) {
|
|
498
498
|
const v = k(l) || l.parentNode, U = E(l) || l.childNodes;
|
|
499
499
|
if (U && v) {
|
|
500
500
|
const I = U.length;
|
|
501
501
|
for (let W = I - 1; W >= 0; --W) {
|
|
502
|
-
const
|
|
503
|
-
|
|
502
|
+
const pu = C(U[W], !0);
|
|
503
|
+
pu.__removalCount = (l.__removalCount || 0) + 1, v.insertBefore(pu, T(l));
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
return
|
|
507
|
+
return ou(l), !0;
|
|
508
508
|
}
|
|
509
|
-
return l instanceof a && !dn(l) || (x === "noscript" || x === "noembed" || x === "noframes") && $(/<\/no(script|embed|frames)/i, l.innerHTML) ? (
|
|
509
|
+
return l instanceof a && !dn(l) || (x === "noscript" || x === "noembed" || x === "noframes") && $(/<\/no(script|embed|frames)/i, l.innerHTML) ? (ou(l), !0) : (wu && l.nodeType === Ju.text && (b = l.textContent, _e([Hu, $u, Tu], (v) => {
|
|
510
510
|
b = Vu(b, v, " ");
|
|
511
511
|
}), l.textContent !== b && (Zu(e.removed, {
|
|
512
512
|
element: l.cloneNode()
|
|
513
|
-
}), l.textContent = b)),
|
|
513
|
+
}), l.textContent = b)), du(L.afterSanitizeElements, l, null), !1);
|
|
514
514
|
}, U0 = function(l, b, x) {
|
|
515
|
-
if (
|
|
515
|
+
if (w0 && (b === "id" || b === "name") && (x in t || x in fn))
|
|
516
516
|
return !1;
|
|
517
|
-
if (!(Le && !Me[b] && $(
|
|
518
|
-
if (!(
|
|
519
|
-
if (!(
|
|
517
|
+
if (!(Le && !Me[b] && $(hu, b))) {
|
|
518
|
+
if (!(F0 && $(Ie, b))) {
|
|
519
|
+
if (!(Su.attributeCheck instanceof Function && Su.attributeCheck(b, l))) {
|
|
520
520
|
if (!z[b] || Me[b]) {
|
|
521
521
|
if (
|
|
522
522
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
@@ -526,10 +526,10 @@ function Rt() {
|
|
|
526
526
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
527
527
|
b === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp && $(R.tagNameCheck, x) || R.tagNameCheck instanceof Function && R.tagNameCheck(x)))
|
|
528
528
|
) return !1;
|
|
529
|
-
} else if (!
|
|
530
|
-
if (!$(
|
|
529
|
+
} else if (!ze[b]) {
|
|
530
|
+
if (!$(C0, Vu(x, A0, ""))) {
|
|
531
531
|
if (!((b === "src" || b === "xlink:href" || b === "href") && l !== "script" && dr(x, "data:") === 0 && R0[l])) {
|
|
532
|
-
if (!(
|
|
532
|
+
if (!(T0 && !$(nn, Vu(x, A0, "")))) {
|
|
533
533
|
if (x)
|
|
534
534
|
return !1;
|
|
535
535
|
}
|
|
@@ -541,13 +541,13 @@ function Rt() {
|
|
|
541
541
|
}
|
|
542
542
|
return !0;
|
|
543
543
|
}, H0 = function(l) {
|
|
544
|
-
return l !== "annotation-xml" &&
|
|
544
|
+
return l !== "annotation-xml" && We(l, rn);
|
|
545
545
|
}, $0 = function(l) {
|
|
546
|
-
|
|
546
|
+
du(L.beforeSanitizeAttributes, l, null);
|
|
547
547
|
const {
|
|
548
548
|
attributes: b
|
|
549
549
|
} = l;
|
|
550
|
-
if (!b ||
|
|
550
|
+
if (!b || $e(l))
|
|
551
551
|
return;
|
|
552
552
|
const x = {
|
|
553
553
|
attrName: "",
|
|
@@ -561,33 +561,33 @@ function Rt() {
|
|
|
561
561
|
const U = b[v], {
|
|
562
562
|
name: I,
|
|
563
563
|
namespaceURI: W,
|
|
564
|
-
value:
|
|
565
|
-
} = U, Lu =
|
|
566
|
-
let q = I === "value" ?
|
|
567
|
-
if (x.attrName = Lu, x.attrValue = q, x.keepAttr = !0, x.forceKeepAttr = void 0,
|
|
568
|
-
|
|
564
|
+
value: pu
|
|
565
|
+
} = U, Lu = O(I), je = pu;
|
|
566
|
+
let q = I === "value" ? je : pr(je);
|
|
567
|
+
if (x.attrName = Lu, x.attrValue = q, x.keepAttr = !0, x.forceKeepAttr = void 0, du(L.uponSanitizeAttribute, l, x), q = x.attrValue, v0 && (Lu === "id" || Lu === "name") && (Au(I, l), q = on + q), le && $(/((--!?|])>)|<\/(style|title|textarea)/i, q)) {
|
|
568
|
+
Au(I, l);
|
|
569
569
|
continue;
|
|
570
570
|
}
|
|
571
|
-
if (Lu === "attributename" &&
|
|
572
|
-
|
|
571
|
+
if (Lu === "attributename" && We(q, "href")) {
|
|
572
|
+
Au(I, l);
|
|
573
573
|
continue;
|
|
574
574
|
}
|
|
575
575
|
if (x.forceKeepAttr)
|
|
576
576
|
continue;
|
|
577
577
|
if (!x.keepAttr) {
|
|
578
|
-
|
|
578
|
+
Au(I, l);
|
|
579
579
|
continue;
|
|
580
580
|
}
|
|
581
|
-
if (!
|
|
582
|
-
|
|
581
|
+
if (!S0 && $(/\/>/i, q)) {
|
|
582
|
+
Au(I, l);
|
|
583
583
|
continue;
|
|
584
584
|
}
|
|
585
|
-
|
|
585
|
+
wu && _e([Hu, $u, Tu], (G0) => {
|
|
586
586
|
q = Vu(q, G0, " ");
|
|
587
587
|
});
|
|
588
|
-
const j0 =
|
|
588
|
+
const j0 = O(l.nodeName);
|
|
589
589
|
if (!U0(j0, Lu, q)) {
|
|
590
|
-
|
|
590
|
+
Au(I, l);
|
|
591
591
|
continue;
|
|
592
592
|
}
|
|
593
593
|
if (_ && typeof h == "object" && typeof h.getAttributeType == "function" && !W)
|
|
@@ -601,24 +601,24 @@ function Rt() {
|
|
|
601
601
|
break;
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
|
-
if (q !==
|
|
604
|
+
if (q !== je)
|
|
605
605
|
try {
|
|
606
|
-
W ? l.setAttributeNS(W, I, q) : l.setAttribute(I, q),
|
|
606
|
+
W ? l.setAttributeNS(W, I, q) : l.setAttribute(I, q), $e(l) ? ou(l) : K0(e.removed);
|
|
607
607
|
} catch {
|
|
608
|
-
|
|
608
|
+
Au(I, l);
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
|
-
|
|
611
|
+
du(L.afterSanitizeAttributes, l, null);
|
|
612
612
|
}, pn = function g(l) {
|
|
613
613
|
let b = null;
|
|
614
614
|
const x = B0(l);
|
|
615
|
-
for (
|
|
616
|
-
|
|
617
|
-
|
|
615
|
+
for (du(L.beforeSanitizeShadowDOM, l, null); b = x.nextNode(); )
|
|
616
|
+
du(L.uponSanitizeShadowNode, b, null), q0(b), $0(b), b.content instanceof o && g(b.content);
|
|
617
|
+
du(L.afterSanitizeShadowDOM, l, null);
|
|
618
618
|
};
|
|
619
619
|
return e.sanitize = function(g) {
|
|
620
620
|
let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, b = null, x = null, v = null, U = null;
|
|
621
|
-
if (
|
|
621
|
+
if (qe = !g, qe && (g = "<!-->"), typeof g != "string" && !z0(g))
|
|
622
622
|
if (typeof g.toString == "function") {
|
|
623
623
|
if (g = g.toString(), typeof g != "string")
|
|
624
624
|
throw Yu("dirty is not a string, aborting");
|
|
@@ -626,48 +626,48 @@ function Rt() {
|
|
|
626
626
|
throw Yu("toString is not a function");
|
|
627
627
|
if (!e.isSupported)
|
|
628
628
|
return g;
|
|
629
|
-
if (Oe ||
|
|
629
|
+
if (Oe || He(l), e.removed = [], typeof g == "string" && (Gu = !1), Gu) {
|
|
630
630
|
if (g.nodeName) {
|
|
631
|
-
const
|
|
632
|
-
if (!
|
|
631
|
+
const pu = O(g.nodeName);
|
|
632
|
+
if (!N[pu] || ju[pu])
|
|
633
633
|
throw Yu("root node is forbidden and cannot be sanitized in-place");
|
|
634
634
|
}
|
|
635
635
|
} else if (g instanceof c)
|
|
636
636
|
b = P0("<!---->"), x = b.ownerDocument.importNode(g, !0), x.nodeType === Ju.element && x.nodeName === "BODY" || x.nodeName === "HTML" ? b = x : b.appendChild(x);
|
|
637
637
|
else {
|
|
638
|
-
if (!
|
|
638
|
+
if (!vu && !wu && !Eu && // eslint-disable-next-line unicorn/prefer-includes
|
|
639
639
|
g.indexOf("<") === -1)
|
|
640
640
|
return _ && de ? _.createHTML(g) : g;
|
|
641
641
|
if (b = P0(g), !b)
|
|
642
|
-
return
|
|
642
|
+
return vu ? null : de ? A : "";
|
|
643
643
|
}
|
|
644
|
-
b && Ne &&
|
|
644
|
+
b && Ne && ou(b.firstChild);
|
|
645
645
|
const I = B0(Gu ? g : b);
|
|
646
646
|
for (; v = I.nextNode(); )
|
|
647
647
|
q0(v), $0(v), v.content instanceof o && pn(v.content);
|
|
648
648
|
if (Gu)
|
|
649
649
|
return g;
|
|
650
|
-
if (
|
|
650
|
+
if (vu) {
|
|
651
651
|
if (fe)
|
|
652
652
|
for (U = Y.call(b.ownerDocument); b.firstChild; )
|
|
653
653
|
U.appendChild(b.firstChild);
|
|
654
654
|
else
|
|
655
655
|
U = b;
|
|
656
|
-
return (z.shadowroot || z.shadowrootmode) && (U =
|
|
656
|
+
return (z.shadowroot || z.shadowrootmode) && (U = ku.call(n, U, !0)), U;
|
|
657
657
|
}
|
|
658
|
-
let W =
|
|
659
|
-
return
|
|
660
|
-
` + W),
|
|
661
|
-
W = Vu(W,
|
|
658
|
+
let W = Eu ? b.outerHTML : b.innerHTML;
|
|
659
|
+
return Eu && N["!doctype"] && b.ownerDocument && b.ownerDocument.doctype && b.ownerDocument.doctype.name && $(vt, b.ownerDocument.doctype.name) && (W = "<!DOCTYPE " + b.ownerDocument.doctype.name + `>
|
|
660
|
+
` + W), wu && _e([Hu, $u, Tu], (pu) => {
|
|
661
|
+
W = Vu(W, pu, " ");
|
|
662
662
|
}), _ && de ? _.createHTML(W) : W;
|
|
663
663
|
}, e.setConfig = function() {
|
|
664
664
|
let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
665
|
-
|
|
665
|
+
He(g), Oe = !0;
|
|
666
666
|
}, e.clearConfig = function() {
|
|
667
667
|
Mu = null, Oe = !1;
|
|
668
668
|
}, e.isValidAttribute = function(g, l, b) {
|
|
669
|
-
Mu ||
|
|
670
|
-
const x =
|
|
669
|
+
Mu || He({});
|
|
670
|
+
const x = O(g), v = O(l);
|
|
671
671
|
return U0(x, v, b);
|
|
672
672
|
}, e.addHook = function(g, l) {
|
|
673
673
|
typeof l == "function" && Zu(L[g], l);
|
|
@@ -787,7 +787,7 @@ function ie(u, e, t) {
|
|
|
787
787
|
}
|
|
788
788
|
ie.defaultChars = ";/?:@&=+$,-_.!~*'()#";
|
|
789
789
|
ie.componentChars = "-_.!~*'()";
|
|
790
|
-
function
|
|
790
|
+
function h0(u) {
|
|
791
791
|
let e = "";
|
|
792
792
|
return e += u.protocol || "", e += u.slashes ? "//" : "", e += u.auth ? u.auth + "@" : "", u.hostname && u.hostname.indexOf(":") !== -1 ? e += "[" + u.hostname + "]" : e += u.hostname || "", e += u.port ? ":" + u.port : "", e += u.pathname || "", e += u.search || "", e += u.hash || "", e;
|
|
793
793
|
}
|
|
@@ -810,7 +810,7 @@ const Rr = /^([a-z0-9.+-]+:)/i, Ir = /:[0-9]*$/, Mr = /^(\/\/?(?!\/)[^\?\s]*)(\?
|
|
|
810
810
|
"gopher:": !0,
|
|
811
811
|
"file:": !0
|
|
812
812
|
};
|
|
813
|
-
function
|
|
813
|
+
function b0(u, e) {
|
|
814
814
|
if (u && u instanceof ye) return u;
|
|
815
815
|
const t = new ye();
|
|
816
816
|
return t.parse(u, e), t;
|
|
@@ -866,14 +866,14 @@ const zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
866
866
|
__proto__: null,
|
|
867
867
|
decode: zu,
|
|
868
868
|
encode: ie,
|
|
869
|
-
format:
|
|
870
|
-
parse:
|
|
871
|
-
}, Symbol.toStringTag, { value: "Module" })), It = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Mt = /[\0-\x1F\x7F-\x9F]/, qr = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,
|
|
869
|
+
format: h0,
|
|
870
|
+
parse: b0
|
|
871
|
+
}, Symbol.toStringTag, { value: "Module" })), It = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Mt = /[\0-\x1F\x7F-\x9F]/, qr = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/, m0 = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/, Lt = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/, Ot = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, Ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
872
872
|
__proto__: null,
|
|
873
873
|
Any: It,
|
|
874
874
|
Cc: Mt,
|
|
875
875
|
Cf: qr,
|
|
876
|
-
P:
|
|
876
|
+
P: m0,
|
|
877
877
|
S: Lt,
|
|
878
878
|
Z: Ot
|
|
879
879
|
}, Symbol.toStringTag, { value: "Module" })), Hr = new Uint16Array(
|
|
@@ -883,7 +883,7 @@ const zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
883
883
|
// prettier-ignore
|
|
884
884
|
"Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((u) => u.charCodeAt(0))
|
|
885
885
|
);
|
|
886
|
-
var
|
|
886
|
+
var Je;
|
|
887
887
|
const jr = /* @__PURE__ */ new Map([
|
|
888
888
|
[0, 65533],
|
|
889
889
|
// C1 Unicode control character reference replacements
|
|
@@ -916,7 +916,7 @@ const jr = /* @__PURE__ */ new Map([
|
|
|
916
916
|
[159, 376]
|
|
917
917
|
]), Gr = (
|
|
918
918
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins
|
|
919
|
-
(
|
|
919
|
+
(Je = String.fromCodePoint) !== null && Je !== void 0 ? Je : function(u) {
|
|
920
920
|
let e = "";
|
|
921
921
|
return u > 65535 && (u -= 65536, e += String.fromCharCode(u >>> 10 & 1023 | 55296), u = 56320 | u & 1023), e += String.fromCharCode(u), e;
|
|
922
922
|
}
|
|
@@ -930,18 +930,18 @@ var B;
|
|
|
930
930
|
u[u.NUM = 35] = "NUM", u[u.SEMI = 59] = "SEMI", u[u.EQUALS = 61] = "EQUALS", u[u.ZERO = 48] = "ZERO", u[u.NINE = 57] = "NINE", u[u.LOWER_A = 97] = "LOWER_A", u[u.LOWER_F = 102] = "LOWER_F", u[u.LOWER_X = 120] = "LOWER_X", u[u.LOWER_Z = 122] = "LOWER_Z", u[u.UPPER_A = 65] = "UPPER_A", u[u.UPPER_F = 70] = "UPPER_F", u[u.UPPER_Z = 90] = "UPPER_Z";
|
|
931
931
|
})(B || (B = {}));
|
|
932
932
|
const Zr = 32;
|
|
933
|
-
var
|
|
933
|
+
var _u;
|
|
934
934
|
(function(u) {
|
|
935
935
|
u[u.VALUE_LENGTH = 49152] = "VALUE_LENGTH", u[u.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", u[u.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
936
|
-
})(
|
|
937
|
-
function
|
|
936
|
+
})(_u || (_u = {}));
|
|
937
|
+
function i0(u) {
|
|
938
938
|
return u >= B.ZERO && u <= B.NINE;
|
|
939
939
|
}
|
|
940
940
|
function Vr(u) {
|
|
941
941
|
return u >= B.UPPER_A && u <= B.UPPER_F || u >= B.LOWER_A && u <= B.LOWER_F;
|
|
942
942
|
}
|
|
943
943
|
function Yr(u) {
|
|
944
|
-
return u >= B.UPPER_A && u <= B.UPPER_Z || u >= B.LOWER_A && u <= B.LOWER_Z ||
|
|
944
|
+
return u >= B.UPPER_A && u <= B.UPPER_Z || u >= B.LOWER_A && u <= B.LOWER_Z || i0(u);
|
|
945
945
|
}
|
|
946
946
|
function Xr(u) {
|
|
947
947
|
return u === B.EQUALS || Yr(u);
|
|
@@ -950,13 +950,13 @@ var P;
|
|
|
950
950
|
(function(u) {
|
|
951
951
|
u[u.EntityStart = 0] = "EntityStart", u[u.NumericStart = 1] = "NumericStart", u[u.NumericDecimal = 2] = "NumericDecimal", u[u.NumericHex = 3] = "NumericHex", u[u.NamedEntity = 4] = "NamedEntity";
|
|
952
952
|
})(P || (P = {}));
|
|
953
|
-
var
|
|
953
|
+
var mu;
|
|
954
954
|
(function(u) {
|
|
955
955
|
u[u.Legacy = 0] = "Legacy", u[u.Strict = 1] = "Strict", u[u.Attribute = 2] = "Attribute";
|
|
956
|
-
})(
|
|
956
|
+
})(mu || (mu = {}));
|
|
957
957
|
class Jr {
|
|
958
958
|
constructor(e, t, n) {
|
|
959
|
-
this.decodeTree = e, this.emitCodePoint = t, this.errors = n, this.state = P.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode =
|
|
959
|
+
this.decodeTree = e, this.emitCodePoint = t, this.errors = n, this.state = P.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = mu.Strict;
|
|
960
960
|
}
|
|
961
961
|
/** Resets the instance to make it reusable. */
|
|
962
962
|
startEntity(e) {
|
|
@@ -1018,7 +1018,7 @@ class Jr {
|
|
|
1018
1018
|
const n = t;
|
|
1019
1019
|
for (; t < e.length; ) {
|
|
1020
1020
|
const r = e.charCodeAt(t);
|
|
1021
|
-
if (
|
|
1021
|
+
if (i0(r) || Vr(r))
|
|
1022
1022
|
t += 1;
|
|
1023
1023
|
else
|
|
1024
1024
|
return this.addToNumericResult(e, n, t, 16), this.emitNumericEntity(r, 3);
|
|
@@ -1038,7 +1038,7 @@ class Jr {
|
|
|
1038
1038
|
const n = t;
|
|
1039
1039
|
for (; t < e.length; ) {
|
|
1040
1040
|
const r = e.charCodeAt(t);
|
|
1041
|
-
if (
|
|
1041
|
+
if (i0(r))
|
|
1042
1042
|
t += 1;
|
|
1043
1043
|
else
|
|
1044
1044
|
return this.addToNumericResult(e, n, t, 10), this.emitNumericEntity(r, 2);
|
|
@@ -1064,7 +1064,7 @@ class Jr {
|
|
|
1064
1064
|
return (n = this.errors) === null || n === void 0 || n.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
1065
1065
|
if (e === B.SEMI)
|
|
1066
1066
|
this.consumed += 1;
|
|
1067
|
-
else if (this.decodeMode ===
|
|
1067
|
+
else if (this.decodeMode === mu.Strict)
|
|
1068
1068
|
return 0;
|
|
1069
1069
|
return this.emitCodePoint(Wr(this.result), this.consumed), this.errors && (e !== B.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
1070
1070
|
}
|
|
@@ -1079,18 +1079,18 @@ class Jr {
|
|
|
1079
1079
|
*/
|
|
1080
1080
|
stateNamedEntity(e, t) {
|
|
1081
1081
|
const { decodeTree: n } = this;
|
|
1082
|
-
let r = n[this.treeIndex], o = (r &
|
|
1082
|
+
let r = n[this.treeIndex], o = (r & _u.VALUE_LENGTH) >> 14;
|
|
1083
1083
|
for (; t < e.length; t++, this.excess++) {
|
|
1084
1084
|
const i = e.charCodeAt(t);
|
|
1085
1085
|
if (this.treeIndex = Qr(n, r, this.treeIndex + Math.max(1, o), i), this.treeIndex < 0)
|
|
1086
1086
|
return this.result === 0 || // If we are parsing an attribute
|
|
1087
|
-
this.decodeMode ===
|
|
1087
|
+
this.decodeMode === mu.Attribute && // We shouldn't have consumed any characters after the entity,
|
|
1088
1088
|
(o === 0 || // And there should be no invalid characters.
|
|
1089
1089
|
Xr(i)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
1090
|
-
if (r = n[this.treeIndex], o = (r &
|
|
1090
|
+
if (r = n[this.treeIndex], o = (r & _u.VALUE_LENGTH) >> 14, o !== 0) {
|
|
1091
1091
|
if (i === B.SEMI)
|
|
1092
1092
|
return this.emitNamedEntityData(this.treeIndex, o, this.consumed + this.excess);
|
|
1093
|
-
this.decodeMode !==
|
|
1093
|
+
this.decodeMode !== mu.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
1096
1096
|
return -1;
|
|
@@ -1102,7 +1102,7 @@ class Jr {
|
|
|
1102
1102
|
*/
|
|
1103
1103
|
emitNotTerminatedNamedEntity() {
|
|
1104
1104
|
var e;
|
|
1105
|
-
const { result: t, decodeTree: n } = this, r = (n[t] &
|
|
1105
|
+
const { result: t, decodeTree: n } = this, r = (n[t] & _u.VALUE_LENGTH) >> 14;
|
|
1106
1106
|
return this.emitNamedEntityData(t, r, this.consumed), (e = this.errors) === null || e === void 0 || e.missingSemicolonAfterCharacterReference(), this.consumed;
|
|
1107
1107
|
}
|
|
1108
1108
|
/**
|
|
@@ -1116,7 +1116,7 @@ class Jr {
|
|
|
1116
1116
|
*/
|
|
1117
1117
|
emitNamedEntityData(e, t, n) {
|
|
1118
1118
|
const { decodeTree: r } = this;
|
|
1119
|
-
return this.emitCodePoint(t === 1 ? r[e] & ~
|
|
1119
|
+
return this.emitCodePoint(t === 1 ? r[e] & ~_u.VALUE_LENGTH : r[e + 1], n), t === 3 && this.emitCodePoint(r[e + 2], n), n;
|
|
1120
1120
|
}
|
|
1121
1121
|
/**
|
|
1122
1122
|
* Signal to the parser that the end of the input was reached.
|
|
@@ -1129,7 +1129,7 @@ class Jr {
|
|
|
1129
1129
|
var e;
|
|
1130
1130
|
switch (this.state) {
|
|
1131
1131
|
case P.NamedEntity:
|
|
1132
|
-
return this.result !== 0 && (this.decodeMode !==
|
|
1132
|
+
return this.result !== 0 && (this.decodeMode !== mu.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
1133
1133
|
case P.NumericDecimal:
|
|
1134
1134
|
return this.emitNumericEntity(0, 2);
|
|
1135
1135
|
case P.NumericHex:
|
|
@@ -1164,7 +1164,7 @@ function Nt(u) {
|
|
|
1164
1164
|
};
|
|
1165
1165
|
}
|
|
1166
1166
|
function Qr(u, e, t, n) {
|
|
1167
|
-
const r = (e &
|
|
1167
|
+
const r = (e & _u.BRANCH_LENGTH) >> 7, o = e & _u.JUMP_TABLE;
|
|
1168
1168
|
if (r === 0)
|
|
1169
1169
|
return o !== 0 && n === o ? t : -1;
|
|
1170
1170
|
if (o) {
|
|
@@ -1185,13 +1185,13 @@ function Qr(u, e, t, n) {
|
|
|
1185
1185
|
}
|
|
1186
1186
|
const Kr = Nt(Hr);
|
|
1187
1187
|
Nt($r);
|
|
1188
|
-
function Pt(u, e =
|
|
1188
|
+
function Pt(u, e = mu.Legacy) {
|
|
1189
1189
|
return Kr(u, e);
|
|
1190
1190
|
}
|
|
1191
1191
|
function uo(u) {
|
|
1192
1192
|
return Object.prototype.toString.call(u);
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function _0(u) {
|
|
1195
1195
|
return uo(u) === "[object String]";
|
|
1196
1196
|
}
|
|
1197
1197
|
const eo = Object.prototype.hasOwnProperty;
|
|
@@ -1212,7 +1212,7 @@ function Se(u) {
|
|
|
1212
1212
|
function Bt(u, e, t) {
|
|
1213
1213
|
return [].concat(u.slice(0, e), t, u.slice(e + 1));
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1215
|
+
function x0(u) {
|
|
1216
1216
|
return !(u >= 55296 && u <= 57343 || u >= 64976 && u <= 65007 || (u & 65535) === 65535 || (u & 65535) === 65534 || u >= 0 && u <= 8 || u === 11 || u >= 14 && u <= 31 || u >= 127 && u <= 159 || u > 1114111);
|
|
1217
1217
|
}
|
|
1218
1218
|
function Fe(u) {
|
|
@@ -1227,7 +1227,7 @@ const zt = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, no = /&([a-z#][a-z0-9]{
|
|
|
1227
1227
|
function co(u, e) {
|
|
1228
1228
|
if (e.charCodeAt(0) === 35 && oo.test(e)) {
|
|
1229
1229
|
const n = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10);
|
|
1230
|
-
return
|
|
1230
|
+
return x0(n) ? Fe(n) : u;
|
|
1231
1231
|
}
|
|
1232
1232
|
const t = Pt(u);
|
|
1233
1233
|
return t !== u ? t : u;
|
|
@@ -1249,7 +1249,7 @@ const ao = /[&<>"]/, so = /[&<>"]/g, lo = {
|
|
|
1249
1249
|
function fo(u) {
|
|
1250
1250
|
return lo[u];
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function gu(u) {
|
|
1253
1253
|
return ao.test(u) ? u.replace(so, fo) : u;
|
|
1254
1254
|
}
|
|
1255
1255
|
const po = /[.?*+^$[\]\\(){}|-]/g;
|
|
@@ -1284,7 +1284,7 @@ function ue(u) {
|
|
|
1284
1284
|
return !1;
|
|
1285
1285
|
}
|
|
1286
1286
|
function ee(u) {
|
|
1287
|
-
return
|
|
1287
|
+
return m0.test(u) || Lt.test(u);
|
|
1288
1288
|
}
|
|
1289
1289
|
function te(u) {
|
|
1290
1290
|
switch (u) {
|
|
@@ -1332,15 +1332,15 @@ const bo = { mdurl: zr, ucmicro: Ur }, mo = /* @__PURE__ */ Object.freeze(/* @__
|
|
|
1332
1332
|
__proto__: null,
|
|
1333
1333
|
arrayReplaceAt: Bt,
|
|
1334
1334
|
assign: Se,
|
|
1335
|
-
escapeHtml:
|
|
1335
|
+
escapeHtml: gu,
|
|
1336
1336
|
escapeRE: ho,
|
|
1337
1337
|
fromCodePoint: Fe,
|
|
1338
1338
|
has: to,
|
|
1339
1339
|
isMdAsciiPunct: te,
|
|
1340
1340
|
isPunctChar: ee,
|
|
1341
1341
|
isSpace: w,
|
|
1342
|
-
isString:
|
|
1343
|
-
isValidEntityCode:
|
|
1342
|
+
isString: _0,
|
|
1343
|
+
isValidEntityCode: x0,
|
|
1344
1344
|
isWhiteSpace: ue,
|
|
1345
1345
|
lib: bo,
|
|
1346
1346
|
normalizeReference: we,
|
|
@@ -1443,17 +1443,17 @@ const ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1443
1443
|
parseLinkDestination: xo,
|
|
1444
1444
|
parseLinkLabel: _o,
|
|
1445
1445
|
parseLinkTitle: go
|
|
1446
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1447
|
-
|
|
1446
|
+
}, Symbol.toStringTag, { value: "Module" })), su = {};
|
|
1447
|
+
su.code_inline = function(u, e, t, n, r) {
|
|
1448
1448
|
const o = u[e];
|
|
1449
|
-
return "<code" + r.renderAttrs(o) + ">" +
|
|
1449
|
+
return "<code" + r.renderAttrs(o) + ">" + gu(o.content) + "</code>";
|
|
1450
1450
|
};
|
|
1451
|
-
|
|
1451
|
+
su.code_block = function(u, e, t, n, r) {
|
|
1452
1452
|
const o = u[e];
|
|
1453
|
-
return "<pre" + r.renderAttrs(o) + "><code>" +
|
|
1453
|
+
return "<pre" + r.renderAttrs(o) + "><code>" + gu(u[e].content) + `</code></pre>
|
|
1454
1454
|
`;
|
|
1455
1455
|
};
|
|
1456
|
-
|
|
1456
|
+
su.fence = function(u, e, t, n, r) {
|
|
1457
1457
|
const o = u[e], i = o.info ? qu(o.info).trim() : "";
|
|
1458
1458
|
let c = "", a = "";
|
|
1459
1459
|
if (i) {
|
|
@@ -1461,7 +1461,7 @@ iu.fence = function(u, e, t, n, r) {
|
|
|
1461
1461
|
c = d[0], a = d.slice(2).join("");
|
|
1462
1462
|
}
|
|
1463
1463
|
let s;
|
|
1464
|
-
if (t.highlight ? s = t.highlight(o.content, c, a) ||
|
|
1464
|
+
if (t.highlight ? s = t.highlight(o.content, c, a) || gu(o.content) : s = gu(o.content), s.indexOf("<pre") === 0)
|
|
1465
1465
|
return s + `
|
|
1466
1466
|
`;
|
|
1467
1467
|
if (i) {
|
|
@@ -1476,39 +1476,39 @@ iu.fence = function(u, e, t, n, r) {
|
|
|
1476
1476
|
return `<pre><code${r.renderAttrs(o)}>${s}</code></pre>
|
|
1477
1477
|
`;
|
|
1478
1478
|
};
|
|
1479
|
-
|
|
1479
|
+
su.image = function(u, e, t, n, r) {
|
|
1480
1480
|
const o = u[e];
|
|
1481
1481
|
return o.attrs[o.attrIndex("alt")][1] = r.renderInlineAsText(o.children, t, n), r.renderToken(u, e, t);
|
|
1482
1482
|
};
|
|
1483
|
-
|
|
1483
|
+
su.hardbreak = function(u, e, t) {
|
|
1484
1484
|
return t.xhtmlOut ? `<br />
|
|
1485
1485
|
` : `<br>
|
|
1486
1486
|
`;
|
|
1487
1487
|
};
|
|
1488
|
-
|
|
1488
|
+
su.softbreak = function(u, e, t) {
|
|
1489
1489
|
return t.breaks ? t.xhtmlOut ? `<br />
|
|
1490
1490
|
` : `<br>
|
|
1491
1491
|
` : `
|
|
1492
1492
|
`;
|
|
1493
1493
|
};
|
|
1494
|
-
|
|
1495
|
-
return
|
|
1494
|
+
su.text = function(u, e) {
|
|
1495
|
+
return gu(u[e].content);
|
|
1496
1496
|
};
|
|
1497
|
-
|
|
1497
|
+
su.html_block = function(u, e) {
|
|
1498
1498
|
return u[e].content;
|
|
1499
1499
|
};
|
|
1500
|
-
|
|
1500
|
+
su.html_inline = function(u, e) {
|
|
1501
1501
|
return u[e].content;
|
|
1502
1502
|
};
|
|
1503
1503
|
function Uu() {
|
|
1504
|
-
this.rules = Se({},
|
|
1504
|
+
this.rules = Se({}, su);
|
|
1505
1505
|
}
|
|
1506
1506
|
Uu.prototype.renderAttrs = function(e) {
|
|
1507
1507
|
let t, n, r;
|
|
1508
1508
|
if (!e.attrs)
|
|
1509
1509
|
return "";
|
|
1510
1510
|
for (r = "", t = 0, n = e.attrs.length; t < n; t++)
|
|
1511
|
-
r += " " +
|
|
1511
|
+
r += " " + gu(e.attrs[t][0]) + '="' + gu(e.attrs[t][1]) + '"';
|
|
1512
1512
|
return r;
|
|
1513
1513
|
};
|
|
1514
1514
|
Uu.prototype.renderToken = function(e, t, n) {
|
|
@@ -1841,12 +1841,12 @@ function Po(u, e) {
|
|
|
1841
1841
|
break;
|
|
1842
1842
|
if (_.single === h && n[t].level === i) {
|
|
1843
1843
|
_ = n[t];
|
|
1844
|
-
let A,
|
|
1845
|
-
h ? (A = e.md.options.quotes[2],
|
|
1844
|
+
let A, F;
|
|
1845
|
+
h ? (A = e.md.options.quotes[2], F = e.md.options.quotes[3]) : (A = e.md.options.quotes[0], F = e.md.options.quotes[1]), o.content = ge(o.content, d.index, F), u[_.token].content = ge(
|
|
1846
1846
|
u[_.token].content,
|
|
1847
1847
|
_.pos,
|
|
1848
1848
|
A
|
|
1849
|
-
), a +=
|
|
1849
|
+
), a += F.length - 1, _.token === r && (a += A.length - 1), c = o.content, s = c.length, n.length = t;
|
|
1850
1850
|
continue u;
|
|
1851
1851
|
}
|
|
1852
1852
|
}
|
|
@@ -1877,7 +1877,7 @@ function zo(u) {
|
|
|
1877
1877
|
e !== t && (i.length = t);
|
|
1878
1878
|
}
|
|
1879
1879
|
}
|
|
1880
|
-
const
|
|
1880
|
+
const Qe = [
|
|
1881
1881
|
["normalize", Co],
|
|
1882
1882
|
["block", Do],
|
|
1883
1883
|
["inline", yo],
|
|
@@ -1888,18 +1888,18 @@ const Je = [
|
|
|
1888
1888
|
// and joins them with the rest of the text
|
|
1889
1889
|
["text_join", zo]
|
|
1890
1890
|
];
|
|
1891
|
-
function
|
|
1891
|
+
function g0() {
|
|
1892
1892
|
this.ruler = new V();
|
|
1893
|
-
for (let u = 0; u <
|
|
1894
|
-
this.ruler.push(
|
|
1893
|
+
for (let u = 0; u < Qe.length; u++)
|
|
1894
|
+
this.ruler.push(Qe[u][0], Qe[u][1]);
|
|
1895
1895
|
}
|
|
1896
|
-
|
|
1896
|
+
g0.prototype.process = function(u) {
|
|
1897
1897
|
const e = this.ruler.getRules("");
|
|
1898
1898
|
for (let t = 0, n = e.length; t < n; t++)
|
|
1899
1899
|
e[t](u);
|
|
1900
1900
|
};
|
|
1901
|
-
|
|
1902
|
-
function
|
|
1901
|
+
g0.prototype.State = qt;
|
|
1902
|
+
function lu(u, e, t, n) {
|
|
1903
1903
|
this.src = u, this.md = e, this.env = t, this.tokens = n, this.bMarks = [], this.eMarks = [], this.tShift = [], this.sCount = [], this.bsCount = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.ddIndent = -1, this.listIndent = -1, this.parentType = "root", this.level = 0;
|
|
1904
1904
|
const r = this.src;
|
|
1905
1905
|
for (let o = 0, i = 0, c = 0, a = 0, s = r.length, d = !1; i < s; i++) {
|
|
@@ -1914,19 +1914,19 @@ function au(u, e, t, n) {
|
|
|
1914
1914
|
}
|
|
1915
1915
|
this.bMarks.push(r.length), this.eMarks.push(r.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1;
|
|
1916
1916
|
}
|
|
1917
|
-
|
|
1917
|
+
lu.prototype.push = function(u, e, t) {
|
|
1918
1918
|
const n = new tu(u, e, t);
|
|
1919
1919
|
return n.block = !0, t < 0 && this.level--, n.level = this.level, t > 0 && this.level++, this.tokens.push(n), n;
|
|
1920
1920
|
};
|
|
1921
|
-
|
|
1921
|
+
lu.prototype.isEmpty = function(e) {
|
|
1922
1922
|
return this.bMarks[e] + this.tShift[e] >= this.eMarks[e];
|
|
1923
1923
|
};
|
|
1924
|
-
|
|
1924
|
+
lu.prototype.skipEmptyLines = function(e) {
|
|
1925
1925
|
for (let t = this.lineMax; e < t && !(this.bMarks[e] + this.tShift[e] < this.eMarks[e]); e++)
|
|
1926
1926
|
;
|
|
1927
1927
|
return e;
|
|
1928
1928
|
};
|
|
1929
|
-
|
|
1929
|
+
lu.prototype.skipSpaces = function(e) {
|
|
1930
1930
|
for (let t = this.src.length; e < t; e++) {
|
|
1931
1931
|
const n = this.src.charCodeAt(e);
|
|
1932
1932
|
if (!w(n))
|
|
@@ -1934,7 +1934,7 @@ au.prototype.skipSpaces = function(e) {
|
|
|
1934
1934
|
}
|
|
1935
1935
|
return e;
|
|
1936
1936
|
};
|
|
1937
|
-
|
|
1937
|
+
lu.prototype.skipSpacesBack = function(e, t) {
|
|
1938
1938
|
if (e <= t)
|
|
1939
1939
|
return e;
|
|
1940
1940
|
for (; e > t; )
|
|
@@ -1942,12 +1942,12 @@ au.prototype.skipSpacesBack = function(e, t) {
|
|
|
1942
1942
|
return e + 1;
|
|
1943
1943
|
return e;
|
|
1944
1944
|
};
|
|
1945
|
-
|
|
1945
|
+
lu.prototype.skipChars = function(e, t) {
|
|
1946
1946
|
for (let n = this.src.length; e < n && this.src.charCodeAt(e) === t; e++)
|
|
1947
1947
|
;
|
|
1948
1948
|
return e;
|
|
1949
1949
|
};
|
|
1950
|
-
|
|
1950
|
+
lu.prototype.skipCharsBack = function(e, t, n) {
|
|
1951
1951
|
if (e <= n)
|
|
1952
1952
|
return e;
|
|
1953
1953
|
for (; e > n; )
|
|
@@ -1955,7 +1955,7 @@ au.prototype.skipCharsBack = function(e, t, n) {
|
|
|
1955
1955
|
return e + 1;
|
|
1956
1956
|
return e;
|
|
1957
1957
|
};
|
|
1958
|
-
|
|
1958
|
+
lu.prototype.getLines = function(e, t, n, r) {
|
|
1959
1959
|
if (e >= t)
|
|
1960
1960
|
return "";
|
|
1961
1961
|
const o = new Array(t - e);
|
|
@@ -1977,9 +1977,9 @@ au.prototype.getLines = function(e, t, n, r) {
|
|
|
1977
1977
|
}
|
|
1978
1978
|
return o.join("");
|
|
1979
1979
|
};
|
|
1980
|
-
|
|
1980
|
+
lu.prototype.Token = tu;
|
|
1981
1981
|
const qo = 65536;
|
|
1982
|
-
function
|
|
1982
|
+
function Ke(u, e) {
|
|
1983
1983
|
const t = u.bMarks[e] + u.tShift[e], n = u.eMarks[e];
|
|
1984
1984
|
return u.src.slice(t, n);
|
|
1985
1985
|
}
|
|
@@ -2011,7 +2011,7 @@ function Uo(u, e, t, n) {
|
|
|
2011
2011
|
return !1;
|
|
2012
2012
|
o++;
|
|
2013
2013
|
}
|
|
2014
|
-
let a =
|
|
2014
|
+
let a = Ke(u, e + 1), s = a.split("|");
|
|
2015
2015
|
const d = [];
|
|
2016
2016
|
for (let _ = 0; _ < s.length; _++) {
|
|
2017
2017
|
const A = s[_].trim();
|
|
@@ -2024,7 +2024,7 @@ function Uo(u, e, t, n) {
|
|
|
2024
2024
|
return !1;
|
|
2025
2025
|
A.charCodeAt(A.length - 1) === 58 ? d.push(A.charCodeAt(0) === 58 ? "center" : "right") : A.charCodeAt(0) === 58 ? d.push("left") : d.push("");
|
|
2026
2026
|
}
|
|
2027
|
-
if (a =
|
|
2027
|
+
if (a = Ke(u, e).trim(), a.indexOf("|") === -1 || u.sCount[e] - u.blkIndent >= 4)
|
|
2028
2028
|
return !1;
|
|
2029
2029
|
s = bt(a), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop();
|
|
2030
2030
|
const f = s.length;
|
|
@@ -2043,31 +2043,31 @@ function Uo(u, e, t, n) {
|
|
|
2043
2043
|
for (let _ = 0; _ < s.length; _++) {
|
|
2044
2044
|
const A = u.push("th_open", "th", 1);
|
|
2045
2045
|
d[_] && (A.attrs = [["style", "text-align:" + d[_]]]);
|
|
2046
|
-
const
|
|
2047
|
-
|
|
2046
|
+
const F = u.push("inline", "", 0);
|
|
2047
|
+
F.content = s[_].trim(), F.children = [], u.push("th_close", "th", -1);
|
|
2048
2048
|
}
|
|
2049
2049
|
u.push("tr_close", "tr", -1), u.push("thead_close", "thead", -1);
|
|
2050
2050
|
let E, k = 0;
|
|
2051
2051
|
for (r = e + 2; r < t && !(u.sCount[r] < u.blkIndent); r++) {
|
|
2052
2052
|
let _ = !1;
|
|
2053
|
-
for (let
|
|
2054
|
-
if (h[
|
|
2053
|
+
for (let F = 0, M = h.length; F < M; F++)
|
|
2054
|
+
if (h[F](u, r, t, !0)) {
|
|
2055
2055
|
_ = !0;
|
|
2056
2056
|
break;
|
|
2057
2057
|
}
|
|
2058
|
-
if (_ || (a =
|
|
2058
|
+
if (_ || (a = Ke(u, r).trim(), !a) || u.sCount[r] - u.blkIndent >= 4 || (s = bt(a), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop(), k += f - s.length, k > qo))
|
|
2059
2059
|
break;
|
|
2060
2060
|
if (r === e + 2) {
|
|
2061
|
-
const
|
|
2062
|
-
|
|
2061
|
+
const F = u.push("tbody_open", "tbody", 1);
|
|
2062
|
+
F.map = E = [e + 2, 0];
|
|
2063
2063
|
}
|
|
2064
2064
|
const A = u.push("tr_open", "tr", 1);
|
|
2065
2065
|
A.map = [r, r + 1];
|
|
2066
|
-
for (let
|
|
2066
|
+
for (let F = 0; F < f; F++) {
|
|
2067
2067
|
const M = u.push("td_open", "td", 1);
|
|
2068
|
-
d[
|
|
2068
|
+
d[F] && (M.attrs = [["style", "text-align:" + d[F]]]);
|
|
2069
2069
|
const Y = u.push("inline", "", 0);
|
|
2070
|
-
Y.content = s[
|
|
2070
|
+
Y.content = s[F] ? s[F].trim() : "", Y.children = [], u.push("td_close", "td", -1);
|
|
2071
2071
|
}
|
|
2072
2072
|
u.push("tr_close", "tr", -1);
|
|
2073
2073
|
}
|
|
@@ -2135,8 +2135,8 @@ function jo(u, e, t, n) {
|
|
|
2135
2135
|
if (r = u.bMarks[p] + u.tShift[p], o = u.eMarks[p], r >= o)
|
|
2136
2136
|
break;
|
|
2137
2137
|
if (u.src.charCodeAt(r++) === 62 && !k) {
|
|
2138
|
-
let A = u.sCount[p] + 1,
|
|
2139
|
-
u.src.charCodeAt(r) === 32 ? (r++, A++, M = !1,
|
|
2138
|
+
let A = u.sCount[p] + 1, F, M;
|
|
2139
|
+
u.src.charCodeAt(r) === 32 ? (r++, A++, M = !1, F = !0) : u.src.charCodeAt(r) === 9 ? (F = !0, (u.bsCount[p] + A) % 4 === 3 ? (r++, A++, M = !1) : M = !0) : F = !1;
|
|
2140
2140
|
let Y = A;
|
|
2141
2141
|
for (c.push(u.bMarks[p]), u.bMarks[p] = r; r < o; ) {
|
|
2142
2142
|
const nu = u.src.charCodeAt(r);
|
|
@@ -2146,13 +2146,13 @@ function jo(u, e, t, n) {
|
|
|
2146
2146
|
break;
|
|
2147
2147
|
r++;
|
|
2148
2148
|
}
|
|
2149
|
-
h = r >= o, a.push(u.bsCount[p]), u.bsCount[p] = u.sCount[p] + 1 + (
|
|
2149
|
+
h = r >= o, a.push(u.bsCount[p]), u.bsCount[p] = u.sCount[p] + 1 + (F ? 1 : 0), s.push(u.sCount[p]), u.sCount[p] = Y - A, d.push(u.tShift[p]), u.tShift[p] = r - u.bMarks[p];
|
|
2150
2150
|
continue;
|
|
2151
2151
|
}
|
|
2152
2152
|
if (h)
|
|
2153
2153
|
break;
|
|
2154
2154
|
let _ = !1;
|
|
2155
|
-
for (let A = 0,
|
|
2155
|
+
for (let A = 0, F = f.length; A < F; A++)
|
|
2156
2156
|
if (f[A](u, p, t, !0)) {
|
|
2157
2157
|
_ = !0;
|
|
2158
2158
|
break;
|
|
@@ -2266,32 +2266,32 @@ function Zo(u, e, t, n) {
|
|
|
2266
2266
|
const _ = u.sCount[a] + h - (u.bMarks[a] + u.tShift[a]);
|
|
2267
2267
|
let A = _;
|
|
2268
2268
|
for (; o < r; ) {
|
|
2269
|
-
const
|
|
2270
|
-
if (
|
|
2269
|
+
const hu = u.src.charCodeAt(o);
|
|
2270
|
+
if (hu === 9)
|
|
2271
2271
|
A += 4 - (A + u.bsCount[a]) % 4;
|
|
2272
|
-
else if (
|
|
2272
|
+
else if (hu === 32)
|
|
2273
2273
|
A++;
|
|
2274
2274
|
else
|
|
2275
2275
|
break;
|
|
2276
2276
|
o++;
|
|
2277
2277
|
}
|
|
2278
|
-
const
|
|
2278
|
+
const F = o;
|
|
2279
2279
|
let M;
|
|
2280
|
-
|
|
2280
|
+
F >= r ? M = 1 : M = A - _, M > 4 && (M = 1);
|
|
2281
2281
|
const Y = _ + M;
|
|
2282
2282
|
c = u.push("list_item_open", "li", 1), c.markup = String.fromCharCode(p);
|
|
2283
2283
|
const nu = [a, 0];
|
|
2284
2284
|
c.map = nu, f && (c.info = u.src.slice(i, h - 1));
|
|
2285
|
-
const
|
|
2286
|
-
if (u.listIndent = u.blkIndent, u.blkIndent = Y, u.tight = !0, u.tShift[a] =
|
|
2285
|
+
const ku = u.tight, L = u.tShift[a], Hu = u.sCount[a], $u = u.listIndent;
|
|
2286
|
+
if (u.listIndent = u.blkIndent, u.blkIndent = Y, u.tight = !0, u.tShift[a] = F - u.bMarks[a], u.sCount[a] = A, F >= r && u.isEmpty(a + 1) ? u.line = Math.min(u.line + 2, t) : u.md.block.tokenize(u, a, t, !0), (!u.tight || T) && (s = !1), T = u.line - a > 1 && u.isEmpty(u.line - 1), u.blkIndent = u.listIndent, u.listIndent = $u, u.tShift[a] = L, u.sCount[a] = Hu, u.tight = ku, c = u.push("list_item_close", "li", -1), c.markup = String.fromCharCode(p), a = u.line, nu[1] = a, a >= t || u.sCount[a] < u.blkIndent || u.sCount[a] - u.blkIndent >= 4)
|
|
2287
2287
|
break;
|
|
2288
|
-
let
|
|
2289
|
-
for (let
|
|
2290
|
-
if (E[
|
|
2291
|
-
|
|
2288
|
+
let Tu = !1;
|
|
2289
|
+
for (let hu = 0, Ie = E.length; hu < Ie; hu++)
|
|
2290
|
+
if (E[hu](u, a, t, !0)) {
|
|
2291
|
+
Tu = !0;
|
|
2292
2292
|
break;
|
|
2293
2293
|
}
|
|
2294
|
-
if (
|
|
2294
|
+
if (Tu)
|
|
2295
2295
|
break;
|
|
2296
2296
|
if (f) {
|
|
2297
2297
|
if (h = _t(u, a), h < 0)
|
|
@@ -2317,16 +2317,16 @@ function Vo(u, e, t, n) {
|
|
|
2317
2317
|
const M = u.md.block.ruler.getRules("reference"), Y = u.parentType;
|
|
2318
2318
|
u.parentType = "reference";
|
|
2319
2319
|
let nu = !1;
|
|
2320
|
-
for (let
|
|
2321
|
-
if (M[
|
|
2320
|
+
for (let ku = 0, L = M.length; ku < L; ku++)
|
|
2321
|
+
if (M[ku](u, E, k, !0)) {
|
|
2322
2322
|
nu = !0;
|
|
2323
2323
|
break;
|
|
2324
2324
|
}
|
|
2325
2325
|
if (u.parentType = Y, nu)
|
|
2326
2326
|
return null;
|
|
2327
2327
|
}
|
|
2328
|
-
const A = u.bMarks[E] + u.tShift[E],
|
|
2329
|
-
return u.src.slice(A,
|
|
2328
|
+
const A = u.bMarks[E] + u.tShift[E], F = u.eMarks[E];
|
|
2329
|
+
return u.src.slice(A, F + 1);
|
|
2330
2330
|
}
|
|
2331
2331
|
let a = u.src.slice(r, o + 1);
|
|
2332
2332
|
o = a.length;
|
|
@@ -2622,7 +2622,7 @@ ve.prototype.parse = function(u, e, t, n) {
|
|
|
2622
2622
|
const r = new this.State(u, e, t, n);
|
|
2623
2623
|
this.tokenize(r, r.line, r.lineMax);
|
|
2624
2624
|
};
|
|
2625
|
-
ve.prototype.State =
|
|
2625
|
+
ve.prototype.State = lu;
|
|
2626
2626
|
function ae(u, e, t, n) {
|
|
2627
2627
|
this.src = u, this.env = t, this.md = e, this.tokens = n, this.tokens_meta = Array(n.length), this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = {}, this.delimiters = [], this._prev_delimiters = [], this.backticks = {}, this.backticksScanned = !1, this.linkLevel = 0;
|
|
2628
2628
|
}
|
|
@@ -2725,11 +2725,11 @@ function mc(u, e) {
|
|
|
2725
2725
|
t++;
|
|
2726
2726
|
return u.pos = t, !0;
|
|
2727
2727
|
}
|
|
2728
|
-
const
|
|
2728
|
+
const k0 = [];
|
|
2729
2729
|
for (let u = 0; u < 256; u++)
|
|
2730
|
-
|
|
2730
|
+
k0.push(0);
|
|
2731
2731
|
"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(u) {
|
|
2732
|
-
|
|
2732
|
+
k0[u.charCodeAt(0)] = 1;
|
|
2733
2733
|
});
|
|
2734
2734
|
function _c(u, e) {
|
|
2735
2735
|
let t = u.pos;
|
|
@@ -2749,7 +2749,7 @@ function _c(u, e) {
|
|
|
2749
2749
|
const i = "\\" + o;
|
|
2750
2750
|
if (!e) {
|
|
2751
2751
|
const c = u.push("text_special", "", 0);
|
|
2752
|
-
r < 256 &&
|
|
2752
|
+
r < 256 && k0[r] !== 0 ? c.content = o : c.content = i, c.markup = i, c.info = "escape";
|
|
2753
2753
|
}
|
|
2754
2754
|
return u.pos = t + 1, !0;
|
|
2755
2755
|
}
|
|
@@ -3046,7 +3046,7 @@ function Lc(u, e) {
|
|
|
3046
3046
|
if (o) {
|
|
3047
3047
|
if (!e) {
|
|
3048
3048
|
const i = o[1][0].toLowerCase() === "x" ? parseInt(o[1].slice(1), 16) : parseInt(o[1], 10), c = u.push("text_special", "", 0);
|
|
3049
|
-
c.content =
|
|
3049
|
+
c.content = x0(i) ? Fe(i) : Fe(65533), c.markup = o[0], c.info = "entity";
|
|
3050
3050
|
}
|
|
3051
3051
|
return u.pos += o[0].length, !0;
|
|
3052
3052
|
}
|
|
@@ -3103,7 +3103,7 @@ function Nc(u) {
|
|
|
3103
3103
|
r[e].nesting < 0 && n--, r[e].level = n, r[e].nesting > 0 && n++, r[e].type === "text" && e + 1 < o && r[e + 1].type === "text" ? r[e + 1].content = r[e].content + r[e + 1].content : (e !== t && (r[t] = r[e]), t++);
|
|
3104
3104
|
e !== t && (r.length = t);
|
|
3105
3105
|
}
|
|
3106
|
-
const
|
|
3106
|
+
const u0 = [
|
|
3107
3107
|
["text", pc],
|
|
3108
3108
|
["linkify", bc],
|
|
3109
3109
|
["newline", mc],
|
|
@@ -3116,7 +3116,7 @@ const Ke = [
|
|
|
3116
3116
|
["autolink", Tc],
|
|
3117
3117
|
["html_inline", Rc],
|
|
3118
3118
|
["entity", Lc]
|
|
3119
|
-
],
|
|
3119
|
+
], e0 = [
|
|
3120
3120
|
["balance_pairs", Oc],
|
|
3121
3121
|
["strikethrough", jt.postProcess],
|
|
3122
3122
|
["emphasis", Gt.postProcess],
|
|
@@ -3126,11 +3126,11 @@ const Ke = [
|
|
|
3126
3126
|
];
|
|
3127
3127
|
function se() {
|
|
3128
3128
|
this.ruler = new V();
|
|
3129
|
-
for (let u = 0; u < Ke.length; u++)
|
|
3130
|
-
this.ruler.push(Ke[u][0], Ke[u][1]);
|
|
3131
|
-
this.ruler2 = new V();
|
|
3132
3129
|
for (let u = 0; u < u0.length; u++)
|
|
3133
|
-
this.
|
|
3130
|
+
this.ruler.push(u0[u][0], u0[u][1]);
|
|
3131
|
+
this.ruler2 = new V();
|
|
3132
|
+
for (let u = 0; u < e0.length; u++)
|
|
3133
|
+
this.ruler2.push(e0[u][0], e0[u][1]);
|
|
3134
3134
|
}
|
|
3135
3135
|
se.prototype.skipToken = function(u) {
|
|
3136
3136
|
const e = u.pos, t = this.ruler.getRules(""), n = t.length, r = u.md.options.maxNesting, o = u.cache;
|
|
@@ -3182,7 +3182,7 @@ se.prototype.parse = function(u, e, t, n) {
|
|
|
3182
3182
|
se.prototype.State = ae;
|
|
3183
3183
|
function Pc(u) {
|
|
3184
3184
|
const e = {};
|
|
3185
|
-
u = u || {}, e.src_Any = It.source, e.src_Cc = Mt.source, e.src_Z = Ot.source, e.src_P =
|
|
3185
|
+
u = u || {}, e.src_Any = It.source, e.src_Cc = Mt.source, e.src_Z = Ot.source, e.src_P = m0.source, e.src_ZPCc = [e.src_Z, e.src_P, e.src_Cc].join("|"), e.src_ZCc = [e.src_Z, e.src_Cc].join("|");
|
|
3186
3186
|
const t = "[><|]";
|
|
3187
3187
|
return e.src_pseudo_letter = "(?:(?!" + t + "|" + e.src_ZPCc + ")" + e.src_Any + ")", e.src_ip4 = "(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)", e.src_auth = "(?:(?:(?!" + e.src_ZCc + "|[@/\\[\\]()]).)+@)?", e.src_port = "(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?", e.src_host_terminator = "(?=$|" + t + "|" + e.src_ZPCc + ")(?!" + (u["---"] ? "-(?!--)|" : "-|") + "_|:\\d|\\.-|\\.(?!$|" + e.src_ZPCc + "))", e.src_path = "(?:[/?#](?:(?!" + e.src_ZCc + "|" + t + `|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!` + e.src_ZCc + "|\\]).)*\\]|\\((?:(?!" + e.src_ZCc + "|[)]).)*\\)|\\{(?:(?!" + e.src_ZCc + '|[}]).)*\\}|\\"(?:(?!' + e.src_ZCc + `|["]).)+\\"|\\'(?:(?!` + e.src_ZCc + "|[']).)+\\'|\\'(?=" + e.src_pseudo_letter + "|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!" + e.src_ZCc + "|[.]|$)|" + (u["---"] ? "\\-(?!--(?:[^-]|$))(?:-*)|" : "\\-+|") + // allow `,,,` in paths
|
|
3188
3188
|
",(?!" + e.src_ZCc + "|$)|;(?!" + e.src_ZCc + "|$)|\\!+(?!" + e.src_ZCc + "|[!]|$)|\\?(?!" + e.src_ZCc + "|[?]|$))+|\\/)?", e.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*', e.src_xn = "xn--[a-z0-9\\-]{1,59}", e.src_domain_root = // Allow letters & digits (http://test1)
|
|
@@ -3192,7 +3192,7 @@ function Pc(u) {
|
|
|
3192
3192
|
// but can start with > (markdown blockquote)
|
|
3193
3193
|
"(^|(?![.:/\\-_@])(?:[$+<=>^`||]|" + e.src_ZPCc + "))((?![$+<=>^`||])" + e.tpl_host_port_no_ip_fuzzy_strict + e.src_path + ")", e;
|
|
3194
3194
|
}
|
|
3195
|
-
function
|
|
3195
|
+
function a0(u) {
|
|
3196
3196
|
return Array.prototype.slice.call(arguments, 1).forEach(function(t) {
|
|
3197
3197
|
t && Object.keys(t).forEach(function(n) {
|
|
3198
3198
|
u[n] = t[n];
|
|
@@ -3315,20 +3315,20 @@ function Vc(u, e) {
|
|
|
3315
3315
|
const t = u.__index__, n = u.__last_index__, r = u.__text_cache__.slice(t, n);
|
|
3316
3316
|
this.schema = u.__schema__.toLowerCase(), this.index = t + e, this.lastIndex = n + e, this.raw = r, this.text = r, this.url = r;
|
|
3317
3317
|
}
|
|
3318
|
-
function
|
|
3318
|
+
function s0(u, e) {
|
|
3319
3319
|
const t = new Vc(u, e);
|
|
3320
3320
|
return u.__compiled__[t.schema].normalize(t, u), t;
|
|
3321
3321
|
}
|
|
3322
3322
|
function J(u, e) {
|
|
3323
3323
|
if (!(this instanceof J))
|
|
3324
3324
|
return new J(u, e);
|
|
3325
|
-
e || Hc(u) && (e = u, u = {}), this.__opts__ =
|
|
3325
|
+
e || Hc(u) && (e = u, u = {}), this.__opts__ = a0({}, Wt, e), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = a0({}, $c, u), this.__compiled__ = {}, this.__tlds__ = Gc, this.__tlds_replaced__ = !1, this.re = {}, Te(this);
|
|
3326
3326
|
}
|
|
3327
3327
|
J.prototype.add = function(e, t) {
|
|
3328
3328
|
return this.__schemas__[e] = t, Te(this), this;
|
|
3329
3329
|
};
|
|
3330
3330
|
J.prototype.set = function(e) {
|
|
3331
|
-
return this.__opts__ =
|
|
3331
|
+
return this.__opts__ = a0(this.__opts__, e), this;
|
|
3332
3332
|
};
|
|
3333
3333
|
J.prototype.test = function(e) {
|
|
3334
3334
|
if (this.__text_cache__ = e, this.__index__ = -1, !e.length)
|
|
@@ -3352,10 +3352,10 @@ J.prototype.testSchemaAt = function(e, t, n) {
|
|
|
3352
3352
|
J.prototype.match = function(e) {
|
|
3353
3353
|
const t = [];
|
|
3354
3354
|
let n = 0;
|
|
3355
|
-
this.__index__ >= 0 && this.__text_cache__ === e && (t.push(
|
|
3355
|
+
this.__index__ >= 0 && this.__text_cache__ === e && (t.push(s0(this, n)), n = this.__last_index__);
|
|
3356
3356
|
let r = n ? e.slice(n) : e;
|
|
3357
3357
|
for (; this.test(r); )
|
|
3358
|
-
t.push(
|
|
3358
|
+
t.push(s0(this, n)), r = r.slice(this.__last_index__), n += this.__last_index__;
|
|
3359
3359
|
return t.length ? t : null;
|
|
3360
3360
|
};
|
|
3361
3361
|
J.prototype.matchAtStart = function(e) {
|
|
@@ -3363,7 +3363,7 @@ J.prototype.matchAtStart = function(e) {
|
|
|
3363
3363
|
const t = this.re.schema_at_start.exec(e);
|
|
3364
3364
|
if (!t) return null;
|
|
3365
3365
|
const n = this.testSchemaAt(e, t[2], t[0].length);
|
|
3366
|
-
return n ? (this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length + n,
|
|
3366
|
+
return n ? (this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length + n, s0(this, 0)) : null;
|
|
3367
3367
|
};
|
|
3368
3368
|
J.prototype.tlds = function(e, t) {
|
|
3369
3369
|
return e = Array.isArray(e) ? e : [e], t ? (this.__tlds__ = this.__tlds__.concat(e).sort().filter(function(n, r, o) {
|
|
@@ -3375,12 +3375,12 @@ J.prototype.normalize = function(e) {
|
|
|
3375
3375
|
};
|
|
3376
3376
|
J.prototype.onCompile = function() {
|
|
3377
3377
|
};
|
|
3378
|
-
const Bu = 2147483647,
|
|
3378
|
+
const Bu = 2147483647, iu = 36, E0 = 1, ne = 26, Yc = 38, Xc = 700, Zt = 72, Vt = 128, Yt = "-", Jc = /^xn--/, Qc = /[^\0-\x7F]/, Kc = /[\x2E\u3002\uFF0E\uFF61]/g, ui = {
|
|
3379
3379
|
overflow: "Overflow: input needs wider integers to process",
|
|
3380
3380
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
3381
3381
|
"invalid-input": "Invalid input"
|
|
3382
|
-
},
|
|
3383
|
-
function
|
|
3382
|
+
}, t0 = iu - E0, au = Math.floor, n0 = String.fromCharCode;
|
|
3383
|
+
function bu(u) {
|
|
3384
3384
|
throw new RangeError(ui[u]);
|
|
3385
3385
|
}
|
|
3386
3386
|
function ei(u, e) {
|
|
@@ -3412,34 +3412,34 @@ function Jt(u) {
|
|
|
3412
3412
|
return e;
|
|
3413
3413
|
}
|
|
3414
3414
|
const ti = (u) => String.fromCodePoint(...u), ni = function(u) {
|
|
3415
|
-
return u >= 48 && u < 58 ? 26 + (u - 48) : u >= 65 && u < 91 ? u - 65 : u >= 97 && u < 123 ? u - 97 :
|
|
3415
|
+
return u >= 48 && u < 58 ? 26 + (u - 48) : u >= 65 && u < 91 ? u - 65 : u >= 97 && u < 123 ? u - 97 : iu;
|
|
3416
3416
|
}, Ct = function(u, e) {
|
|
3417
3417
|
return u + 22 + 75 * (u < 26) - ((e != 0) << 5);
|
|
3418
3418
|
}, Qt = function(u, e, t) {
|
|
3419
3419
|
let n = 0;
|
|
3420
|
-
for (u = t ?
|
|
3421
|
-
u =
|
|
3422
|
-
return
|
|
3420
|
+
for (u = t ? au(u / Xc) : u >> 1, u += au(u / e); u > t0 * ne >> 1; n += iu)
|
|
3421
|
+
u = au(u / t0);
|
|
3422
|
+
return au(n + (t0 + 1) * u / (u + Yc));
|
|
3423
3423
|
}, Kt = function(u) {
|
|
3424
3424
|
const e = [], t = u.length;
|
|
3425
3425
|
let n = 0, r = Vt, o = Zt, i = u.lastIndexOf(Yt);
|
|
3426
3426
|
i < 0 && (i = 0);
|
|
3427
3427
|
for (let c = 0; c < i; ++c)
|
|
3428
|
-
u.charCodeAt(c) >= 128 &&
|
|
3428
|
+
u.charCodeAt(c) >= 128 && bu("not-basic"), e.push(u.charCodeAt(c));
|
|
3429
3429
|
for (let c = i > 0 ? i + 1 : 0; c < t; ) {
|
|
3430
3430
|
const a = n;
|
|
3431
|
-
for (let d = 1, f =
|
|
3432
|
-
c >= t &&
|
|
3431
|
+
for (let d = 1, f = iu; ; f += iu) {
|
|
3432
|
+
c >= t && bu("invalid-input");
|
|
3433
3433
|
const m = ni(u.charCodeAt(c++));
|
|
3434
|
-
m >=
|
|
3435
|
-
const h = f <= o ?
|
|
3434
|
+
m >= iu && bu("invalid-input"), m > au((Bu - n) / d) && bu("overflow"), n += m * d;
|
|
3435
|
+
const h = f <= o ? E0 : f >= o + ne ? ne : f - o;
|
|
3436
3436
|
if (m < h)
|
|
3437
3437
|
break;
|
|
3438
|
-
const p =
|
|
3439
|
-
d >
|
|
3438
|
+
const p = iu - h;
|
|
3439
|
+
d > au(Bu / p) && bu("overflow"), d *= p;
|
|
3440
3440
|
}
|
|
3441
3441
|
const s = e.length + 1;
|
|
3442
|
-
o = Qt(n - a, s, a == 0),
|
|
3442
|
+
o = Qt(n - a, s, a == 0), au(n / s) > Bu - r && bu("overflow"), r += au(n / s), n %= s, e.splice(n++, 0, r);
|
|
3443
3443
|
}
|
|
3444
3444
|
return String.fromCodePoint(...e);
|
|
3445
3445
|
}, un = function(u) {
|
|
@@ -3448,7 +3448,7 @@ const ti = (u) => String.fromCodePoint(...u), ni = function(u) {
|
|
|
3448
3448
|
const t = u.length;
|
|
3449
3449
|
let n = Vt, r = 0, o = Zt;
|
|
3450
3450
|
for (const a of u)
|
|
3451
|
-
a < 128 && e.push(
|
|
3451
|
+
a < 128 && e.push(n0(a));
|
|
3452
3452
|
const i = e.length;
|
|
3453
3453
|
let c = i;
|
|
3454
3454
|
for (i && e.push(Yt); c < t; ) {
|
|
@@ -3456,20 +3456,20 @@ const ti = (u) => String.fromCodePoint(...u), ni = function(u) {
|
|
|
3456
3456
|
for (const d of u)
|
|
3457
3457
|
d >= n && d < a && (a = d);
|
|
3458
3458
|
const s = c + 1;
|
|
3459
|
-
a - n >
|
|
3459
|
+
a - n > au((Bu - r) / s) && bu("overflow"), r += (a - n) * s, n = a;
|
|
3460
3460
|
for (const d of u)
|
|
3461
|
-
if (d < n && ++r > Bu &&
|
|
3461
|
+
if (d < n && ++r > Bu && bu("overflow"), d === n) {
|
|
3462
3462
|
let f = r;
|
|
3463
|
-
for (let m =
|
|
3464
|
-
const h = m <= o ?
|
|
3463
|
+
for (let m = iu; ; m += iu) {
|
|
3464
|
+
const h = m <= o ? E0 : m >= o + ne ? ne : m - o;
|
|
3465
3465
|
if (f < h)
|
|
3466
3466
|
break;
|
|
3467
|
-
const p = f - h, C =
|
|
3467
|
+
const p = f - h, C = iu - h;
|
|
3468
3468
|
e.push(
|
|
3469
|
-
|
|
3470
|
-
), f =
|
|
3469
|
+
n0(Ct(h + p % C, 0))
|
|
3470
|
+
), f = au(p / C);
|
|
3471
3471
|
}
|
|
3472
|
-
e.push(
|
|
3472
|
+
e.push(n0(Ct(f, 0))), o = Qt(r, s, c === i), r = 0, ++c;
|
|
3473
3473
|
}
|
|
3474
3474
|
++r, ++n;
|
|
3475
3475
|
}
|
|
@@ -3680,34 +3680,34 @@ function di(u) {
|
|
|
3680
3680
|
}
|
|
3681
3681
|
const tn = ["http:", "https:", "mailto:"];
|
|
3682
3682
|
function pi(u) {
|
|
3683
|
-
const e =
|
|
3683
|
+
const e = b0(u, !0);
|
|
3684
3684
|
if (e.hostname && (!e.protocol || tn.indexOf(e.protocol) >= 0))
|
|
3685
3685
|
try {
|
|
3686
3686
|
e.hostname = en.toASCII(e.hostname);
|
|
3687
3687
|
} catch {
|
|
3688
3688
|
}
|
|
3689
|
-
return ie(
|
|
3689
|
+
return ie(h0(e));
|
|
3690
3690
|
}
|
|
3691
3691
|
function hi(u) {
|
|
3692
|
-
const e =
|
|
3692
|
+
const e = b0(u, !0);
|
|
3693
3693
|
if (e.hostname && (!e.protocol || tn.indexOf(e.protocol) >= 0))
|
|
3694
3694
|
try {
|
|
3695
3695
|
e.hostname = en.toUnicode(e.hostname);
|
|
3696
3696
|
} catch {
|
|
3697
3697
|
}
|
|
3698
|
-
return zu(
|
|
3698
|
+
return zu(h0(e), zu.defaultChars + "%");
|
|
3699
3699
|
}
|
|
3700
3700
|
function K(u, e) {
|
|
3701
3701
|
if (!(this instanceof K))
|
|
3702
3702
|
return new K(u, e);
|
|
3703
|
-
e ||
|
|
3703
|
+
e || _0(u) || (e = u || {}, u = "default"), this.inline = new se(), this.block = new ve(), this.core = new g0(), this.renderer = new Uu(), this.linkify = new J(), this.validateLink = di, this.normalizeLink = pi, this.normalizeLinkText = hi, this.utils = mo, this.helpers = Se({}, ko), this.options = {}, this.configure(u), e && this.set(e);
|
|
3704
3704
|
}
|
|
3705
3705
|
K.prototype.set = function(u) {
|
|
3706
3706
|
return Se(this.options, u), this;
|
|
3707
3707
|
};
|
|
3708
3708
|
K.prototype.configure = function(u) {
|
|
3709
3709
|
const e = this;
|
|
3710
|
-
if (
|
|
3710
|
+
if (_0(u)) {
|
|
3711
3711
|
const t = u;
|
|
3712
3712
|
if (u = si[t], !u)
|
|
3713
3713
|
throw new Error('Wrong `markdown-it` preset "' + t + '", check name');
|
|
@@ -3762,7 +3762,7 @@ K.prototype.parseInline = function(u, e) {
|
|
|
3762
3762
|
K.prototype.renderInline = function(u, e) {
|
|
3763
3763
|
return e = e || {}, this.renderer.render(this.parseInline(u, e), this.options, e);
|
|
3764
3764
|
};
|
|
3765
|
-
class Mi extends
|
|
3765
|
+
class Mi extends d0 {
|
|
3766
3766
|
constructor(t = {}) {
|
|
3767
3767
|
super();
|
|
3768
3768
|
Ou(this, "mdConfig");
|
|
@@ -3788,7 +3788,7 @@ class Mi extends f0 {
|
|
|
3788
3788
|
}
|
|
3789
3789
|
const bi = {
|
|
3790
3790
|
key: 0,
|
|
3791
|
-
class: /* @__PURE__ */
|
|
3791
|
+
class: /* @__PURE__ */ Cu(["tr-bubble__avatar"])
|
|
3792
3792
|
}, mi = {
|
|
3793
3793
|
key: 2,
|
|
3794
3794
|
class: "tr-bubble__content-wrapper"
|
|
@@ -3804,7 +3804,7 @@ const bi = {
|
|
|
3804
3804
|
}, ki = {
|
|
3805
3805
|
key: 3,
|
|
3806
3806
|
class: "tr-bubble__footer"
|
|
3807
|
-
}, Ei = /* @__PURE__ */
|
|
3807
|
+
}, Ei = /* @__PURE__ */ Fu({
|
|
3808
3808
|
__name: "Bubble",
|
|
3809
3809
|
props: {
|
|
3810
3810
|
content: { default: "" },
|
|
@@ -3823,7 +3823,7 @@ const bi = {
|
|
|
3823
3823
|
setup(u) {
|
|
3824
3824
|
const e = u, t = kn(), n = X(() => {
|
|
3825
3825
|
const f = e.contentRenderer;
|
|
3826
|
-
return f ? typeof f == "function" ? { isComponent: !1, vNodeOrComponent: f(e) } : f instanceof
|
|
3826
|
+
return f ? typeof f == "function" ? { isComponent: !1, vNodeOrComponent: f(e) } : f instanceof d0 ? { isComponent: !1, vNodeOrComponent: f.render(e) } : typeof f == "object" && f !== null && "component" in f ? { isComponent: !0, vNodeOrComponent: f.component, defaultProps: f.defaultProps } : { isComponent: !0, vNodeOrComponent: f } : null;
|
|
3827
3827
|
}), r = En(), o = X(() => {
|
|
3828
3828
|
if (!e.customContentField)
|
|
3829
3829
|
return null;
|
|
@@ -3833,7 +3833,7 @@ const bi = {
|
|
|
3833
3833
|
"--max-width": Tn(e.maxWidth)
|
|
3834
3834
|
} : {});
|
|
3835
3835
|
return (f, m) => (S(), H("div", {
|
|
3836
|
-
class:
|
|
3836
|
+
class: Cu([
|
|
3837
3837
|
"tr-bubble",
|
|
3838
3838
|
{
|
|
3839
3839
|
"placement-start": s.value,
|
|
@@ -3843,14 +3843,14 @@ const bi = {
|
|
|
3843
3843
|
style: An(d.value)
|
|
3844
3844
|
}, [
|
|
3845
3845
|
e.avatar ? (S(), H("div", bi, [
|
|
3846
|
-
(S(), eu(
|
|
3846
|
+
(S(), eu(xu(e.avatar)))
|
|
3847
3847
|
])) : Pu("", !0),
|
|
3848
3848
|
e.loading ? Qu(f.$slots, "loading", {
|
|
3849
3849
|
key: 1,
|
|
3850
3850
|
bubbleProps: e
|
|
3851
3851
|
}, () => [
|
|
3852
3852
|
Z("div", {
|
|
3853
|
-
class:
|
|
3853
|
+
class: Cu(["tr-bubble__content", { "border-corner": e.shape === "corner" }])
|
|
3854
3854
|
}, [...m[0] || (m[0] = [
|
|
3855
3855
|
Z("img", {
|
|
3856
3856
|
src: Fn,
|
|
@@ -3860,10 +3860,10 @@ const bi = {
|
|
|
3860
3860
|
])], 2)
|
|
3861
3861
|
], !0) : (S(), H("div", mi, [
|
|
3862
3862
|
Z("div", {
|
|
3863
|
-
class:
|
|
3863
|
+
class: Cu(["tr-bubble__content", { "border-corner": e.shape === "corner" }])
|
|
3864
3864
|
}, [
|
|
3865
3865
|
a.value.length ? (S(), H("div", _i, [
|
|
3866
|
-
(S(!0), H(De, null, Ee(a.value, (h, p) => (S(), eu(
|
|
3866
|
+
(S(!0), H(De, null, Ee(a.value, (h, p) => (S(), eu(f0(cr), {
|
|
3867
3867
|
key: p,
|
|
3868
3868
|
item: h
|
|
3869
3869
|
}, null, 8, ["item"]))), 128))
|
|
@@ -3872,10 +3872,10 @@ const bi = {
|
|
|
3872
3872
|
bubbleProps: e
|
|
3873
3873
|
}, () => [
|
|
3874
3874
|
n.value ? (S(), H(De, { key: 0 }, [
|
|
3875
|
-
n.value.isComponent ? (S(), eu(
|
|
3876
|
-
], 64)) : (S(), H("span", xi,
|
|
3875
|
+
n.value.isComponent ? (S(), eu(xu(n.value.vNodeOrComponent), Ce(Ku({ key: 0 }, { ...n.value.defaultProps, ...e })), null, 16)) : (S(), eu(xu(n.value.vNodeOrComponent), { key: 1 }))
|
|
3876
|
+
], 64)) : (S(), H("span", xi, Du(c.value), 1))
|
|
3877
3877
|
], !0),
|
|
3878
|
-
e.aborted ? (S(), H("span", gi,
|
|
3878
|
+
e.aborted ? (S(), H("span", gi, Du(e.abortedText), 1)) : Pu("", !0),
|
|
3879
3879
|
t.footer ? (S(), H("div", ki, [
|
|
3880
3880
|
Qu(f.$slots, "footer", { bubbleProps: e }, void 0, !0)
|
|
3881
3881
|
])) : Pu("", !0)
|
|
@@ -3884,7 +3884,7 @@ const bi = {
|
|
|
3884
3884
|
]))
|
|
3885
3885
|
], 6));
|
|
3886
3886
|
}
|
|
3887
|
-
}),
|
|
3887
|
+
}), yu = /* @__PURE__ */ ce(Ei, [["__scopeId", "data-v-7785f269"]]), Ai = /* @__PURE__ */ Fu({
|
|
3888
3888
|
__name: "BubbleList",
|
|
3889
3889
|
props: {
|
|
3890
3890
|
items: {},
|
|
@@ -3894,7 +3894,7 @@ const bi = {
|
|
|
3894
3894
|
autoScroll: { type: Boolean }
|
|
3895
3895
|
},
|
|
3896
3896
|
setup(u) {
|
|
3897
|
-
const e = u, t =
|
|
3897
|
+
const e = u, t = l0(null), { y: n } = Mn(t, {
|
|
3898
3898
|
behavior: "smooth",
|
|
3899
3899
|
throttle: 100
|
|
3900
3900
|
}), r = X(() => e.items.at(-1)), o = X(() => {
|
|
@@ -3953,29 +3953,29 @@ const bi = {
|
|
|
3953
3953
|
(S(!0), H(De, null, Ee(i.value, (d, f) => (S(), H(De, {
|
|
3954
3954
|
key: d.id || f
|
|
3955
3955
|
}, [
|
|
3956
|
-
d.hidden ? Pu("", !0) : (S(), eu(
|
|
3956
|
+
d.hidden ? Pu("", !0) : (S(), eu(yu, Ku({
|
|
3957
3957
|
key: 0,
|
|
3958
3958
|
ref_for: !0
|
|
3959
3959
|
}, d.props), V0({ _: 2 }, [
|
|
3960
3960
|
Ee(d.slots, (m, h) => ({
|
|
3961
3961
|
name: h,
|
|
3962
3962
|
fn: Y0((p) => [
|
|
3963
|
-
(S(), eu(
|
|
3963
|
+
(S(), eu(xu(m), Ku({ ref_for: !0 }, { ...p, index: d.index }), null, 16))
|
|
3964
3964
|
])
|
|
3965
3965
|
}))
|
|
3966
3966
|
]), 1040))
|
|
3967
3967
|
], 64))), 128)),
|
|
3968
|
-
c.value ? (S(), eu(
|
|
3968
|
+
c.value ? (S(), eu(yu, Ce(Ku({ key: 0 }, c.value.props)), V0({ _: 2 }, [
|
|
3969
3969
|
Ee(c.value.slots, (d, f) => ({
|
|
3970
3970
|
name: f,
|
|
3971
3971
|
fn: Y0((m) => [
|
|
3972
|
-
(S(), eu(
|
|
3972
|
+
(S(), eu(xu(d), Ce(yn(m)), null, 16))
|
|
3973
3973
|
])
|
|
3974
3974
|
}))
|
|
3975
3975
|
]), 1040)) : Pu("", !0)
|
|
3976
3976
|
], 512));
|
|
3977
3977
|
}
|
|
3978
|
-
}), re = /* @__PURE__ */ ce(Ai, [["__scopeId", "data-v-b8c91fe5"]]), oe = /* @__PURE__ */
|
|
3978
|
+
}), re = /* @__PURE__ */ ce(Ai, [["__scopeId", "data-v-b8c91fe5"]]), oe = /* @__PURE__ */ Fu({
|
|
3979
3979
|
__name: "BubbleProvider",
|
|
3980
3980
|
props: {
|
|
3981
3981
|
contentRenderers: { default: () => ({}) }
|
|
@@ -3986,15 +3986,15 @@ const bi = {
|
|
|
3986
3986
|
t.set(n, r);
|
|
3987
3987
|
for (const [n, r] of Object.entries(e.contentRenderers))
|
|
3988
3988
|
t.set(n, r);
|
|
3989
|
-
return X0(Ft, t), X0(Tt,
|
|
3989
|
+
return X0(Ft, t), X0(Tt, p0), (n, r) => Qu(n.$slots, "default");
|
|
3990
3990
|
}
|
|
3991
3991
|
});
|
|
3992
|
-
|
|
3992
|
+
yu.name = "TrBubble";
|
|
3993
3993
|
const Ci = function(u) {
|
|
3994
|
-
u.component(
|
|
3994
|
+
u.component(yu.name, yu);
|
|
3995
3995
|
};
|
|
3996
|
-
|
|
3997
|
-
const Li =
|
|
3996
|
+
yu.install = Ci;
|
|
3997
|
+
const Li = yu;
|
|
3998
3998
|
re.name = "TrBubbleList";
|
|
3999
3999
|
const Di = function(u) {
|
|
4000
4000
|
u.component(re.name, re);
|
|
@@ -4009,7 +4009,7 @@ oe.install = yi;
|
|
|
4009
4009
|
const Ni = oe;
|
|
4010
4010
|
export {
|
|
4011
4011
|
Li as Bubble,
|
|
4012
|
-
|
|
4012
|
+
d0 as BubbleContentClassRenderer,
|
|
4013
4013
|
Oi as BubbleList,
|
|
4014
4014
|
Mi as BubbleMarkdownContentRenderer,
|
|
4015
4015
|
Ni as BubbleProvider
|