@m2s2/vue-lib 2.3.1 → 2.4.1
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/index.cjs +1 -1
- package/dist/index.mjs +58 -34
- package/dist/index16.cjs +1 -1
- package/dist/index16.mjs +1 -1
- package/dist/index26.cjs +1 -1
- package/dist/index26.mjs +1 -1
- package/dist/index34.cjs +1 -1
- package/dist/index34.mjs +36 -81
- package/dist/index35.cjs +1 -0
- package/dist/index35.mjs +11 -0
- package/dist/index36.cjs +1 -1
- package/dist/index36.mjs +80 -21
- package/dist/index38.cjs +1 -1
- package/dist/index38.mjs +30 -3
- package/dist/index39.cjs +1 -1
- package/dist/index39.mjs +9 -3
- package/dist/index40.cjs +1 -1
- package/dist/index40.mjs +26 -3
- package/dist/index42.cjs +1 -1
- package/dist/index42.mjs +30 -3
- package/dist/index43.cjs +1 -1
- package/dist/index43.mjs +9 -3
- package/dist/index44.cjs +1 -1
- package/dist/index44.mjs +34 -3
- package/dist/index45.cjs +1 -1
- package/dist/index45.mjs +9 -3
- package/dist/index46.cjs +1 -1
- package/dist/index46.mjs +48 -2
- package/dist/index48.cjs +1 -1
- package/dist/index48.mjs +69 -3
- package/dist/index50.cjs +1 -1
- package/dist/index50.mjs +27 -3
- package/dist/index51.cjs +1 -1
- package/dist/index51.mjs +2 -2
- package/dist/index52.cjs +1 -1
- package/dist/index52.mjs +2 -2
- package/dist/index53.cjs +1 -1
- package/dist/index53.mjs +2 -2
- package/dist/index54.cjs +1 -1
- package/dist/index54.mjs +2 -2
- package/dist/index55.cjs +1 -1
- package/dist/index55.mjs +1 -1
- package/dist/index56.cjs +1 -59
- package/dist/index56.mjs +3 -1150
- package/dist/index57.cjs +1 -1
- package/dist/index57.mjs +3 -51
- package/dist/index58.cjs +1 -1
- package/dist/index58.mjs +3 -2
- package/dist/index59.cjs +1 -0
- package/dist/index59.mjs +5 -0
- package/dist/index61.cjs +1 -0
- package/dist/index61.mjs +5 -0
- package/dist/index63.cjs +1 -0
- package/dist/index63.mjs +5 -0
- package/dist/index64.cjs +1 -0
- package/dist/index64.mjs +5 -0
- package/dist/index65.cjs +1 -0
- package/dist/index65.mjs +5 -0
- package/dist/index66.cjs +1 -0
- package/dist/index66.mjs +5 -0
- package/dist/index67.cjs +1 -0
- package/dist/index67.mjs +4 -0
- package/dist/index68.cjs +1 -0
- package/dist/index68.mjs +5 -0
- package/dist/index69.cjs +1 -0
- package/dist/index69.mjs +4 -0
- package/dist/index70.cjs +1 -0
- package/dist/index70.mjs +5 -0
- package/dist/index71.cjs +1 -0
- package/dist/index71.mjs +4 -0
- package/dist/index72.cjs +1 -0
- package/dist/index72.mjs +4 -0
- package/dist/index73.cjs +1 -0
- package/dist/index73.mjs +5 -0
- package/dist/index74.cjs +1 -0
- package/dist/index74.mjs +5 -0
- package/dist/index75.cjs +1 -0
- package/dist/index75.mjs +53 -0
- package/dist/index76.cjs +59 -0
- package/dist/index76.mjs +1152 -0
- package/dist/index77.cjs +1 -0
- package/dist/index77.mjs +4 -0
- package/dist/vue-lib/src/components/Auth/AuthProvider.vue.d.ts +17 -0
- package/dist/vue-lib/src/components/Auth/AuthProvider.vue.d.ts.map +1 -0
- package/dist/vue-lib/src/components/Auth/useAuth.d.ts +19 -0
- package/dist/vue-lib/src/components/Auth/useAuth.d.ts.map +1 -0
- package/dist/vue-lib/src/components/Dropdown/Dropdown.vue.d.ts +21 -0
- package/dist/vue-lib/src/components/Dropdown/Dropdown.vue.d.ts.map +1 -0
- package/dist/vue-lib/src/components/Dropdown/DropdownItem.vue.d.ts +12 -0
- package/dist/vue-lib/src/components/Dropdown/DropdownItem.vue.d.ts.map +1 -0
- package/dist/vue-lib/src/components/ThemeProvider/ThemeProvider.vue.d.ts +19 -0
- package/dist/vue-lib/src/components/ThemeProvider/ThemeProvider.vue.d.ts.map +1 -0
- package/dist/vue-lib/src/components/ThemeProvider/useTheme.d.ts +9 -0
- package/dist/vue-lib/src/components/ThemeProvider/useTheme.d.ts.map +1 -0
- package/dist/vue-lib/src/index.d.ts +14 -0
- package/dist/vue-lib/src/index.d.ts.map +1 -1
- package/dist/vue-lib/src/plugin.d.ts +9 -0
- package/dist/vue-lib/src/plugin.d.ts.map +1 -0
- package/dist/vue-lib.css +1 -1
- package/package.json +1 -1
- package/dist/index41.cjs +0 -1
- package/dist/index41.mjs +0 -5
- /package/dist/{index47.cjs → index60.cjs} +0 -0
- /package/dist/{index47.mjs → index60.mjs} +0 -0
- /package/dist/{index49.cjs → index62.cjs} +0 -0
- /package/dist/{index49.mjs → index62.mjs} +0 -0
package/dist/index57.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("
|
|
1
|
+
"use strict";const e=require("./index14.cjs");;/* empty css */module.exports=e;
|
package/dist/index57.mjs
CHANGED
|
@@ -1,53 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
key: 0,
|
|
4
|
-
class: "social-icon",
|
|
5
|
-
viewBox: "0 0 98 96",
|
|
6
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
-
"aria-hidden": "true",
|
|
8
|
-
fill: "currentColor"
|
|
9
|
-
}, c = {
|
|
10
|
-
key: 1,
|
|
11
|
-
class: "social-icon",
|
|
12
|
-
viewBox: "0 0 24 24",
|
|
13
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
-
"aria-hidden": "true",
|
|
15
|
-
fill: "currentColor"
|
|
16
|
-
}, d = {
|
|
17
|
-
key: 2,
|
|
18
|
-
class: "social-icon",
|
|
19
|
-
viewBox: "0 0 24 24",
|
|
20
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
-
"aria-hidden": "true",
|
|
22
|
-
fill: "currentColor"
|
|
23
|
-
}, a = {
|
|
24
|
-
key: 3,
|
|
25
|
-
class: "social-icon",
|
|
26
|
-
viewBox: "0 0 24 24",
|
|
27
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
28
|
-
"aria-hidden": "true",
|
|
29
|
-
fill: "currentColor"
|
|
30
|
-
}, u = /* @__PURE__ */ i({
|
|
31
|
-
__name: "SocialIcon",
|
|
32
|
-
props: {
|
|
33
|
-
type: {}
|
|
34
|
-
},
|
|
35
|
-
setup(t) {
|
|
36
|
-
return (v, e) => t.type === "github" ? (l(), o("svg", s, [...e[0] || (e[0] = [
|
|
37
|
-
n("path", {
|
|
38
|
-
"fill-rule": "evenodd",
|
|
39
|
-
"clip-rule": "evenodd",
|
|
40
|
-
d: "M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"
|
|
41
|
-
}, null, -1)
|
|
42
|
-
])])) : t.type === "linkedin" ? (l(), o("svg", c, [...e[1] || (e[1] = [
|
|
43
|
-
n("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }, null, -1)
|
|
44
|
-
])])) : t.type === "twitter" ? (l(), o("svg", d, [...e[2] || (e[2] = [
|
|
45
|
-
n("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.747l7.73-8.835L1.254 2.25H8.08l4.253 5.622 5.91-5.622Zm-1.161 17.52h1.833L7.084 4.126H5.117z" }, null, -1)
|
|
46
|
-
])])) : t.type === "email" ? (l(), o("svg", a, [...e[3] || (e[3] = [
|
|
47
|
-
n("path", { d: "M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z" }, null, -1)
|
|
48
|
-
])])) : r("", !0);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
1
|
+
import o from "./index14.mjs";
|
|
2
|
+
/* empty css */
|
|
51
3
|
export {
|
|
52
|
-
|
|
4
|
+
o as default
|
|
53
5
|
};
|
package/dist/index58.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./
|
|
1
|
+
"use strict";const e=require("./index16.cjs");;/* empty css */module.exports=e;
|
package/dist/index58.mjs
CHANGED
package/dist/index59.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index18.cjs");;/* empty css */module.exports=e;
|
package/dist/index59.mjs
ADDED
package/dist/index61.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index22.cjs");;/* empty css */module.exports=e;
|
package/dist/index61.mjs
ADDED
package/dist/index63.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index26.cjs");;/* empty css */module.exports=e;
|
package/dist/index63.mjs
ADDED
package/dist/index64.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index28.cjs");;/* empty css */module.exports=e;
|
package/dist/index64.mjs
ADDED
package/dist/index65.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index30.cjs");;/* empty css */module.exports=e;
|
package/dist/index65.mjs
ADDED
package/dist/index66.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index32.cjs");;/* empty css */module.exports=e;
|
package/dist/index66.mjs
ADDED
package/dist/index67.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index34.cjs");module.exports=e;
|
package/dist/index67.mjs
ADDED
package/dist/index68.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index36.cjs");;/* empty css */module.exports=e;
|
package/dist/index68.mjs
ADDED
package/dist/index69.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index38.cjs");module.exports=e;
|
package/dist/index69.mjs
ADDED
package/dist/index70.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index40.cjs");;/* empty css */module.exports=e;
|
package/dist/index70.mjs
ADDED
package/dist/index71.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index42.cjs");module.exports=e;
|
package/dist/index71.mjs
ADDED
package/dist/index72.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index44.cjs");module.exports=e;
|
package/dist/index72.mjs
ADDED
package/dist/index73.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index46.cjs");;/* empty css */module.exports=e;
|
package/dist/index73.mjs
ADDED
package/dist/index74.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index48.cjs");;/* empty css */module.exports=e;
|
package/dist/index74.mjs
ADDED
package/dist/index75.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),o={key:0,class:"social-icon",viewBox:"0 0 98 96",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",fill:"currentColor"},n={key:1,class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",fill:"currentColor"},r={key:2,class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",fill:"currentColor"},i={key:3,class:"social-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",fill:"currentColor"},c=e.defineComponent({__name:"SocialIcon",props:{type:{}},setup(l){return(s,t)=>l.type==="github"?(e.openBlock(),e.createElementBlock("svg",o,[...t[0]||(t[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"},null,-1)])])):l.type==="linkedin"?(e.openBlock(),e.createElementBlock("svg",n,[...t[1]||(t[1]=[e.createElementVNode("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"},null,-1)])])):l.type==="twitter"?(e.openBlock(),e.createElementBlock("svg",r,[...t[2]||(t[2]=[e.createElementVNode("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.747l7.73-8.835L1.254 2.25H8.08l4.253 5.622 5.91-5.622Zm-1.161 17.52h1.833L7.084 4.126H5.117z"},null,-1)])])):l.type==="email"?(e.openBlock(),e.createElementBlock("svg",i,[...t[3]||(t[3]=[e.createElementVNode("path",{d:"M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z"},null,-1)])])):e.createCommentVNode("",!0)}});module.exports=c;
|
package/dist/index75.mjs
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineComponent as i, openBlock as l, createElementBlock as o, createElementVNode as n, createCommentVNode as r } from "vue";
|
|
2
|
+
const s = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "social-icon",
|
|
5
|
+
viewBox: "0 0 98 96",
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
"aria-hidden": "true",
|
|
8
|
+
fill: "currentColor"
|
|
9
|
+
}, c = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "social-icon",
|
|
12
|
+
viewBox: "0 0 24 24",
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
fill: "currentColor"
|
|
16
|
+
}, d = {
|
|
17
|
+
key: 2,
|
|
18
|
+
class: "social-icon",
|
|
19
|
+
viewBox: "0 0 24 24",
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
fill: "currentColor"
|
|
23
|
+
}, a = {
|
|
24
|
+
key: 3,
|
|
25
|
+
class: "social-icon",
|
|
26
|
+
viewBox: "0 0 24 24",
|
|
27
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28
|
+
"aria-hidden": "true",
|
|
29
|
+
fill: "currentColor"
|
|
30
|
+
}, u = /* @__PURE__ */ i({
|
|
31
|
+
__name: "SocialIcon",
|
|
32
|
+
props: {
|
|
33
|
+
type: {}
|
|
34
|
+
},
|
|
35
|
+
setup(t) {
|
|
36
|
+
return (v, e) => t.type === "github" ? (l(), o("svg", s, [...e[0] || (e[0] = [
|
|
37
|
+
n("path", {
|
|
38
|
+
"fill-rule": "evenodd",
|
|
39
|
+
"clip-rule": "evenodd",
|
|
40
|
+
d: "M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"
|
|
41
|
+
}, null, -1)
|
|
42
|
+
])])) : t.type === "linkedin" ? (l(), o("svg", c, [...e[1] || (e[1] = [
|
|
43
|
+
n("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }, null, -1)
|
|
44
|
+
])])) : t.type === "twitter" ? (l(), o("svg", d, [...e[2] || (e[2] = [
|
|
45
|
+
n("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.747l7.73-8.835L1.254 2.25H8.08l4.253 5.622 5.91-5.622Zm-1.161 17.52h1.833L7.084 4.126H5.117z" }, null, -1)
|
|
46
|
+
])])) : t.type === "email" ? (l(), o("svg", a, [...e[3] || (e[3] = [
|
|
47
|
+
n("path", { d: "M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z" }, null, -1)
|
|
48
|
+
])])) : r("", !0);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
export {
|
|
52
|
+
u as default
|
|
53
|
+
};
|
package/dist/index76.cjs
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";var ye=Object.defineProperty;var Re=(r,e,t)=>e in r?ye(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var x=(r,e,t)=>Re(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function M(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}exports.defaults=M();function oe(r){exports.defaults=r}var $={exec:()=>null};function f(r,e=""){let t=typeof r=="string"?r:r.source,s={replace:(n,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(m.caret,"$1"),t=t.replace(n,a),s},getRegex:()=>new RegExp(t,e)};return s}var Se=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),m={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}>`)},$e=/^(?:[ \t]*(?:\n|$))+/,Te=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ze=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,q=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ae=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,W=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ce=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,he=f(ce).replace(/bull/g,W).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Pe=f(ce).replace(/bull/g,W).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),F=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_e=/^[^\n]+/,U=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ie=f(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",U).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Le=f(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,W).getRegex(),Q="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",J=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Be=f("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",J).replace("tag",Q).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pe=f(F).replace("hr",q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Q).getRegex(),Ce=f(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",pe).getRegex(),K={blockquote:Ce,code:Te,def:Ie,fences:ze,heading:Ae,hr:q,html:Be,lheading:he,list:Le,newline:$e,paragraph:pe,table:$,text:_e},re=f("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Q).getRegex(),qe={...K,lheading:Pe,table:re,paragraph:f(F).replace("hr",q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",re).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Q).getRegex()},Ee={...K,html:f(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",J).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:$,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:f(F).replace("hr",q).replace("heading",` *#{1,6} *[^
|
|
2
|
+
]`).replace("lheading",he).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ze=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ue=/^( {2,}|\\)\n(?!\s*$)/,De=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,P=/[\p{P}\p{S}]/u,H=/[\s\p{P}\p{S}]/u,V=/[^\s\p{P}\p{S}]/u,Me=f(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,H).getRegex(),ge=/(?!~)[\p{P}\p{S}]/u,Qe=/(?!~)[\s\p{P}\p{S}]/u,He=/(?:[^\s\p{P}\p{S}]|~)/u,je=f(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Se?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ke=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Ne=f(ke,"u").replace(/punct/g,P).getRegex(),Oe=f(ke,"u").replace(/punct/g,ge).getRegex(),fe="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ge=f(fe,"gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,H).replace(/punct/g,P).getRegex(),Xe=f(fe,"gu").replace(/notPunctSpace/g,He).replace(/punctSpace/g,Qe).replace(/punct/g,ge).getRegex(),We=f("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,H).replace(/punct/g,P).getRegex(),Fe=f(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,P).getRegex(),Ue="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Je=f(Ue,"gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,H).replace(/punct/g,P).getRegex(),Ke=f(/\\(punct)/,"gu").replace(/punct/g,P).getRegex(),Ve=f(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ye=f(J).replace("(?:-->|$)","-->").getRegex(),et=f("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ye).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),D=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,tt=f(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",D).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),de=f(/^!?\[(label)\]\[(ref)\]/).replace("label",D).replace("ref",U).getRegex(),xe=f(/^!?\[(ref)\](?:\[\])?/).replace("ref",U).getRegex(),rt=f("reflink|nolink(?!\\()","g").replace("reflink",de).replace("nolink",xe).getRegex(),ne=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Y={_backpedal:$,anyPunctuation:Ke,autolink:Ve,blockSkip:je,br:ue,code:Ze,del:$,delLDelim:$,delRDelim:$,emStrongLDelim:Ne,emStrongRDelimAst:Ge,emStrongRDelimUnd:We,escape:ve,link:tt,nolink:xe,punctuation:Me,reflink:de,reflinkSearch:rt,tag:et,text:De,url:$},nt={...Y,link:f(/^!?\[(label)\]\((.*?)\)/).replace("label",D).getRegex(),reflink:f(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",D).getRegex()},O={...Y,emStrongRDelimAst:Xe,emStrongLDelim:Oe,delLDelim:Fe,delRDelim:Je,url:f(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ne).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:f(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ne).getRegex()},st={...O,br:f(ue).replace("{2,}","*").getRegex(),text:f(O.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},v={normal:K,gfm:qe,pedantic:Ee},I={normal:Y,gfm:O,breaks:st,pedantic:nt},lt={"&":"&","<":"<",">":">",'"':""","'":"'"},se=r=>lt[r];function S(r,e){if(e){if(m.escapeTest.test(r))return r.replace(m.escapeReplace,se)}else if(m.escapeTestNoEncode.test(r))return r.replace(m.escapeReplaceNoEncode,se);return r}function le(r){try{r=encodeURI(r).replace(m.percentDecode,"%")}catch{return null}return r}function ie(r,e){var i;let t=r.replace(m.findPipe,(a,l,h)=>{let o=!1,p=l;for(;--p>=0&&h[p]==="\\";)o=!o;return o?"|":" |"}),s=t.split(m.splitPipe),n=0;if(s[0].trim()||s.shift(),s.length>0&&!((i=s.at(-1))!=null&&i.trim())&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;n<s.length;n++)s[n]=s[n].trim().replace(m.slashPipe,"|");return s}function L(r,e,t){let s=r.length;if(s===0)return"";let n=0;for(;n<s&&r.charAt(s-n-1)===e;)n++;return r.slice(0,s-n)}function it(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])t++;else if(r[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function at(r,e=0){let t=e,s="";for(let n of r)if(n===" "){let i=4-t%4;s+=" ".repeat(i),t+=i}else s+=n,t++;return s}function ae(r,e,t,s,n){let i=e.href,a=e.title||null,l=r[1].replace(n.other.outputLinkReplace,"$1");s.state.inLink=!0;let h={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:i,title:a,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,h}function ot(r,e,t){let s=r.match(t.other.indentCodeCompensation);if(s===null)return e;let n=s[1];return e.split(`
|
|
3
|
+
`).map(i=>{let a=i.match(t.other.beginningSpace);if(a===null)return i;let[l]=a;return l.length>=n.length?i.slice(n.length):i}).join(`
|
|
4
|
+
`)}var B=class{constructor(r){x(this,"options");x(this,"rules");x(this,"lexer");this.options=r||exports.defaults}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:L(t,`
|
|
5
|
+
`)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],s=ot(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=L(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(t=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:L(e[0],`
|
|
6
|
+
`)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=L(e[0],`
|
|
7
|
+
`).split(`
|
|
8
|
+
`),s="",n="",i=[];for(;t.length>0;){let a=!1,l=[],h;for(h=0;h<t.length;h++)if(this.rules.other.blockquoteStart.test(t[h]))l.push(t[h]),a=!0;else if(!a)l.push(t[h]);else break;t=t.slice(h);let o=l.join(`
|
|
9
|
+
`),p=o.replace(this.rules.other.blockquoteSetextReplace,`
|
|
10
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
11
|
+
${o}`:o,n=n?`${n}
|
|
12
|
+
${p}`:p;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,i,!0),this.lexer.state.top=g,t.length===0)break;let u=i.at(-1);if((u==null?void 0:u.type)==="code")break;if((u==null?void 0:u.type)==="blockquote"){let c=u,b=c.raw+`
|
|
13
|
+
`+t.join(`
|
|
14
|
+
`),k=this.blockquote(b);i[i.length-1]=k,s=s.substring(0,s.length-c.raw.length)+k.raw,n=n.substring(0,n.length-c.text.length)+k.text;break}else if((u==null?void 0:u.type)==="list"){let c=u,b=c.raw+`
|
|
15
|
+
`+t.join(`
|
|
16
|
+
`),k=this.list(b);i[i.length-1]=k,s=s.substring(0,s.length-u.raw.length)+k.raw,n=n.substring(0,n.length-c.raw.length)+k.raw,t=b.substring(i.at(-1).raw.length).split(`
|
|
17
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:i,text:n}}}list(r){var t,s;let e=this.rules.block.list.exec(r);if(e){let n=e[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let l=this.rules.other.listItemRegex(n),h=!1;for(;r;){let p=!1,g="",u="";if(!(e=l.exec(r))||this.rules.block.hr.test(r))break;g=e[0],r=r.substring(g.length);let c=at(e[2].split(`
|
|
18
|
+
`,1)[0],e[1].length),b=r.split(`
|
|
19
|
+
`,1)[0],k=!c.trim(),w=0;if(this.options.pedantic?(w=2,u=c.trimStart()):k?w=e[1].length+1:(w=c.search(this.rules.other.nonSpaceChar),w=w>4?1:w,u=c.slice(w),w+=e[1].length),k&&this.rules.other.blankLine.test(b)&&(g+=b+`
|
|
20
|
+
`,r=r.substring(b.length+1),p=!0),!p){let z=this.rules.other.nextBulletRegex(w),E=this.rules.other.hrRegex(w),ee=this.rules.other.fencesBeginRegex(w),te=this.rules.other.headingBeginRegex(w),we=this.rules.other.htmlBeginRegex(w),me=this.rules.other.blockquoteBeginRegex(w);for(;r;){let N=r.split(`
|
|
21
|
+
`,1)[0],_;if(b=N,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),_=b):_=b.replace(this.rules.other.tabCharGlobal," "),ee.test(b)||te.test(b)||we.test(b)||me.test(b)||z.test(b)||E.test(b))break;if(_.search(this.rules.other.nonSpaceChar)>=w||!b.trim())u+=`
|
|
22
|
+
`+_.slice(w);else{if(k||c.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||ee.test(c)||te.test(c)||E.test(c))break;u+=`
|
|
23
|
+
`+b}k=!b.trim(),g+=N+`
|
|
24
|
+
`,r=r.substring(N.length+1),c=_.slice(w)}}a.loose||(h?a.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(h=!0)),a.items.push({type:"list_item",raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(u),loose:!1,text:u,tokens:[]}),a.raw+=g}let o=a.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let p of a.items){if(this.lexer.state.top=!1,p.tokens=this.lexer.blockTokens(p.text,[]),p.task){if(p.text=p.text.replace(this.rules.other.listReplaceTask,""),((t=p.tokens[0])==null?void 0:t.type)==="text"||((s=p.tokens[0])==null?void 0:s.type)==="paragraph"){p.tokens[0].raw=p.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),p.tokens[0].text=p.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}}let g=this.rules.other.listTaskCheckbox.exec(p.raw);if(g){let u={type:"checkbox",raw:g[0]+" ",checked:g[0]!=="[ ]"};p.checked=u.checked,a.loose?p.tokens[0]&&["paragraph","text"].includes(p.tokens[0].type)&&"tokens"in p.tokens[0]&&p.tokens[0].tokens?(p.tokens[0].raw=u.raw+p.tokens[0].raw,p.tokens[0].text=u.raw+p.tokens[0].text,p.tokens[0].tokens.unshift(u)):p.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):p.tokens.unshift(u)}}if(!a.loose){let g=p.tokens.filter(c=>c.type==="space"),u=g.length>0&&g.some(c=>this.rules.other.anyLine.test(c.raw));a.loose=u}}if(a.loose)for(let p of a.items){p.loose=!0;for(let g of p.tokens)g.type==="text"&&(g.type="paragraph")}return a}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:s,title:n}}}table(r){var a;let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=ie(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=(a=e[3])!=null&&a.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
25
|
+
`):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l<t.length;l++)i.header.push({text:t[l],tokens:this.lexer.inline(t[l]),header:!0,align:i.align[l]});for(let l of n)i.rows.push(ie(l,i.header.length).map((h,o)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:i.align[o]})));return i}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
|
|
26
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let i=L(t.slice(0,-1),"\\");if((t.length-i.length)%2===0)return}else{let i=it(e[2],"()");if(i===-2)return;if(i>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let s=e[2],n="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],n=i[3])}else n=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s=s.slice(1):s=s.slice(1,-1)),ae(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let s=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[s.toLowerCase()];if(!n){let i=t[0].charAt(0);return{type:"text",raw:i,text:i}}return ae(t,n,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!t||this.rules.inline.punctuation.exec(t))){let n=[...s[0]].length-1,i,a,l=n,h=0,o=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,e=e.slice(-1*r.length+n);(s=o.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(a=[...i].length,s[3]||s[4]){l+=a;continue}else if((s[5]||s[6])&&n%3&&!((n+a)%3)){h+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+h);let p=[...s[0]][0].length,g=r.slice(0,n+s.index+p+a);if(Math.min(n,a)%2){let c=g.slice(1,-1);return{type:"em",raw:g,text:c,tokens:this.lexer.inlineTokens(c)}}let u=g.slice(2,-2);return{type:"strong",raw:g,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let s=this.rules.inline.delLDelim.exec(r);if(s&&(!s[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...s[0]].length-1,i,a,l=n,h=this.rules.inline.delRDelim;for(h.lastIndex=0,e=e.slice(-1*r.length+n);(s=h.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(a=[...i].length,a!==n))continue;if(s[3]||s[4]){l+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l);let o=[...s[0]][0].length,p=r.slice(0,n+s.index+o+a),g=p.slice(n,-n);return{type:"del",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(r){var t;let e;if(e=this.rules.inline.url.exec(r)){let s,n;if(e[2]==="@")s=e[0],n="mailto:"+s;else{let i;do i=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(i!==e[0]);s=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:s,href:n,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},y=class G{constructor(e){x(this,"tokens");x(this,"options");x(this,"state");x(this,"inlineQueue");x(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||exports.defaults,this.options.tokenizer=this.options.tokenizer||new B,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:m,block:v.normal,inline:I.normal};this.options.pedantic?(t.block=v.pedantic,t.inline=I.pedantic):this.options.gfm&&(t.block=v.gfm,this.options.breaks?t.inline=I.breaks:t.inline=I.gfm),this.tokenizer.rules=t}static get rules(){return{block:v,inline:I}}static lex(e,t){return new G(t).lex(e)}static lexInline(e,t){return new G(t).inlineTokens(e)}lex(e){e=e.replace(m.carriageReturn,`
|
|
27
|
+
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){var n,i,a;for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(m.tabCharGlobal," ").replace(m.spaceLine,""));e;){let l;if((i=(n=this.options.extensions)==null?void 0:n.block)!=null&&i.some(o=>(l=o.call({lexer:this},e,t))?(e=e.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.space(e)){e=e.substring(l.raw.length);let o=t.at(-1);l.raw.length===1&&o!==void 0?o.raw+=`
|
|
28
|
+
`:t.push(l);continue}if(l=this.tokenizer.code(e)){e=e.substring(l.raw.length);let o=t.at(-1);(o==null?void 0:o.type)==="paragraph"||(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
|
|
29
|
+
`)?"":`
|
|
30
|
+
`)+l.raw,o.text+=`
|
|
31
|
+
`+l.text,this.inlineQueue.at(-1).src=o.text):t.push(l);continue}if(l=this.tokenizer.fences(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.heading(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.hr(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.blockquote(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.list(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.html(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.def(e)){e=e.substring(l.raw.length);let o=t.at(-1);(o==null?void 0:o.type)==="paragraph"||(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
|
|
32
|
+
`)?"":`
|
|
33
|
+
`)+l.raw,o.text+=`
|
|
34
|
+
`+l.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},t.push(l));continue}if(l=this.tokenizer.table(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.lheading(e)){e=e.substring(l.raw.length),t.push(l);continue}let h=e;if((a=this.options.extensions)!=null&&a.startBlock){let o=1/0,p=e.slice(1),g;this.options.extensions.startBlock.forEach(u=>{g=u.call({lexer:this},p),typeof g=="number"&&g>=0&&(o=Math.min(o,g))}),o<1/0&&o>=0&&(h=e.substring(0,o+1))}if(this.state.top&&(l=this.tokenizer.paragraph(h))){let o=t.at(-1);s&&(o==null?void 0:o.type)==="paragraph"?(o.raw+=(o.raw.endsWith(`
|
|
35
|
+
`)?"":`
|
|
36
|
+
`)+l.raw,o.text+=`
|
|
37
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(l),s=h.length!==e.length,e=e.substring(l.raw.length);continue}if(l=this.tokenizer.text(e)){e=e.substring(l.raw.length);let o=t.at(-1);(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
|
|
38
|
+
`)?"":`
|
|
39
|
+
`)+l.raw,o.text+=`
|
|
40
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(l);continue}if(e){let o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var h,o,p,g,u;this.tokenizer.lexer=this;let s=e,n=null;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(s))!==null;)c.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(s))!==null;)s=s.slice(0,n.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(s))!==null;)i=n[2]?n[2].length:0,s=s.slice(0,n.index+i)+"["+"a".repeat(n[0].length-i-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=((o=(h=this.options.hooks)==null?void 0:h.emStrongMask)==null?void 0:o.call({lexer:this},s))??s;let a=!1,l="";for(;e;){a||(l=""),a=!1;let c;if((g=(p=this.options.extensions)==null?void 0:p.inline)!=null&&g.some(k=>(c=k.call({lexer:this},e,t))?(e=e.substring(c.raw.length),t.push(c),!0):!1))continue;if(c=this.tokenizer.escape(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.tag(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.link(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(c.raw.length);let k=t.at(-1);c.type==="text"&&(k==null?void 0:k.type)==="text"?(k.raw+=c.raw,k.text+=c.text):t.push(c);continue}if(c=this.tokenizer.emStrong(e,s,l)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.codespan(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.br(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.del(e,s,l)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.autolink(e)){e=e.substring(c.raw.length),t.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(e))){e=e.substring(c.raw.length),t.push(c);continue}let b=e;if((u=this.options.extensions)!=null&&u.startInline){let k=1/0,w=e.slice(1),z;this.options.extensions.startInline.forEach(E=>{z=E.call({lexer:this},w),typeof z=="number"&&z>=0&&(k=Math.min(k,z))}),k<1/0&&k>=0&&(b=e.substring(0,k+1))}if(c=this.tokenizer.inlineText(b)){e=e.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(l=c.raw.slice(-1)),a=!0;let k=t.at(-1);(k==null?void 0:k.type)==="text"?(k.raw+=c.raw,k.text+=c.text):t.push(c);continue}if(e){let k="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw new Error(k)}}return t}},C=class{constructor(r){x(this,"options");x(this,"parser");this.options=r||exports.defaults}space(r){return""}code({text:r,lang:e,escaped:t}){var i;let s=(i=(e||"").match(m.notSpaceStart))==null?void 0:i[0],n=r.replace(m.endingNewline,"")+`
|
|
41
|
+
`;return s?'<pre><code class="language-'+S(s)+'">'+(t?n:S(n,!0))+`</code></pre>
|
|
42
|
+
`:"<pre><code>"+(t?n:S(n,!0))+`</code></pre>
|
|
43
|
+
`}blockquote({tokens:r}){return`<blockquote>
|
|
44
|
+
${this.parser.parse(r)}</blockquote>
|
|
45
|
+
`}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
|
|
46
|
+
`}hr(r){return`<hr>
|
|
47
|
+
`}list(r){let e=r.ordered,t=r.start,s="";for(let a=0;a<r.items.length;a++){let l=r.items[a];s+=this.listitem(l)}let n=e?"ol":"ul",i=e&&t!==1?' start="'+t+'"':"";return"<"+n+i+`>
|
|
48
|
+
`+s+"</"+n+`>
|
|
49
|
+
`}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
|
|
50
|
+
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
|
|
51
|
+
`}table(r){let e="",t="";for(let n=0;n<r.header.length;n++)t+=this.tablecell(r.header[n]);e+=this.tablerow({text:t});let s="";for(let n=0;n<r.rows.length;n++){let i=r.rows[n];t="";for(let a=0;a<i.length;a++)t+=this.tablecell(i[a]);s+=this.tablerow({text:t})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
52
|
+
<thead>
|
|
53
|
+
`+e+`</thead>
|
|
54
|
+
`+s+`</table>
|
|
55
|
+
`}tablerow({text:r}){return`<tr>
|
|
56
|
+
${r}</tr>
|
|
57
|
+
`}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
|
|
58
|
+
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${S(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){let s=this.parser.parseInline(t),n=le(r);if(n===null)return s;r=n;let i='<a href="'+r+'"';return e&&(i+=' title="'+S(e)+'"'),i+=">"+s+"</a>",i}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let n=le(r);if(n===null)return S(t);r=n;let i=`<img src="${r}" alt="${S(t)}"`;return e&&(i+=` title="${S(e)}"`),i+=">",i}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:S(r.text)}},j=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},R=class X{constructor(e){x(this,"options");x(this,"renderer");x(this,"textRenderer");this.options=e||exports.defaults,this.options.renderer=this.options.renderer||new C,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new j}static parse(e,t){return new X(t).parse(e)}static parseInline(e,t){return new X(t).parseInline(e)}parse(e){var s,n;this.renderer.parser=this;let t="";for(let i=0;i<e.length;i++){let a=e[i];if((n=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&n[a.type]){let h=a,o=this.options.extensions.renderers[h.type].call({parser:this},h);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){t+=o||"";continue}}let l=a;switch(l.type){case"space":{t+=this.renderer.space(l);break}case"hr":{t+=this.renderer.hr(l);break}case"heading":{t+=this.renderer.heading(l);break}case"code":{t+=this.renderer.code(l);break}case"table":{t+=this.renderer.table(l);break}case"blockquote":{t+=this.renderer.blockquote(l);break}case"list":{t+=this.renderer.list(l);break}case"checkbox":{t+=this.renderer.checkbox(l);break}case"html":{t+=this.renderer.html(l);break}case"def":{t+=this.renderer.def(l);break}case"paragraph":{t+=this.renderer.paragraph(l);break}case"text":{t+=this.renderer.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return t}parseInline(e,t=this.renderer){var n,i;this.renderer.parser=this;let s="";for(let a=0;a<e.length;a++){let l=e[a];if((i=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&i[l.type]){let o=this.options.extensions.renderers[l.type].call({parser:this},l);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){s+=o||"";continue}}let h=l;switch(h.type){case"escape":{s+=t.text(h);break}case"html":{s+=t.html(h);break}case"link":{s+=t.link(h);break}case"image":{s+=t.image(h);break}case"checkbox":{s+=t.checkbox(h);break}case"strong":{s+=t.strong(h);break}case"em":{s+=t.em(h);break}case"codespan":{s+=t.codespan(h);break}case"br":{s+=t.br(h);break}case"del":{s+=t.del(h);break}case"text":{s+=t.text(h);break}default:{let o='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return s}},Z,A=(Z=class{constructor(r){x(this,"options");x(this,"block");this.options=r||exports.defaults}preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?y.lex:y.lexInline}provideParser(r=this.block){return r?R.parse:R.parseInline}},x(Z,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),x(Z,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Z),be=class{constructor(...r){x(this,"defaults",M());x(this,"options",this.setOptions);x(this,"parse",this.parseMarkdown(!0));x(this,"parseInline",this.parseMarkdown(!1));x(this,"Parser",R);x(this,"Renderer",C);x(this,"TextRenderer",j);x(this,"Lexer",y);x(this,"Tokenizer",B);x(this,"Hooks",A);this.use(...r)}walkTokens(r,e){var s,n;let t=[];for(let i of r)switch(t=t.concat(e.call(this,i)),i.type){case"table":{let a=i;for(let l of a.header)t=t.concat(this.walkTokens(l.tokens,e));for(let l of a.rows)for(let h of l)t=t.concat(this.walkTokens(h.tokens,e));break}case"list":{let a=i;t=t.concat(this.walkTokens(a.items,e));break}default:{let a=i;(n=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&n[a.type]?this.defaults.extensions.childTokens[a.type].forEach(l=>{let h=a[l].flat(1/0);t=t.concat(this.walkTokens(h,e))}):a.tokens&&(t=t.concat(this.walkTokens(a.tokens,e)))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let i=e.renderers[n.name];i?e.renderers[n.name]=function(...a){let l=n.renderer.apply(this,a);return l===!1&&(l=i.apply(this,a)),l}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[n.level];i?i.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),s.extensions=e),t.renderer){let n=this.defaults.renderer||new C(this.defaults);for(let i in t.renderer){if(!(i in n))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,l=t.renderer[a],h=n[a];n[a]=(...o)=>{let p=l.apply(n,o);return p===!1&&(p=h.apply(n,o)),p||""}}s.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new B(this.defaults);for(let i in t.tokenizer){if(!(i in n))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,l=t.tokenizer[a],h=n[a];n[a]=(...o)=>{let p=l.apply(n,o);return p===!1&&(p=h.apply(n,o)),p}}s.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new A;for(let i in t.hooks){if(!(i in n))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,l=t.hooks[a],h=n[a];A.passThroughHooks.has(i)?n[a]=o=>{if(this.defaults.async&&A.passThroughHooksRespectAsync.has(i))return(async()=>{let g=await l.call(n,o);return h.call(n,g)})();let p=l.call(n,o);return h.call(n,p)}:n[a]=(...o)=>{if(this.defaults.async)return(async()=>{let g=await l.apply(n,o);return g===!1&&(g=await h.apply(n,o)),g})();let p=l.apply(n,o);return p===!1&&(p=h.apply(n,o)),p}}s.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,i=t.walkTokens;s.walkTokens=function(a){let l=[];return l.push(i.call(this,a)),n&&(l=l.concat(n.call(this,a))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return y.lex(r,e??this.defaults)}parser(r,e){return R.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let s={...t},n={...this.defaults,...s},i=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=r),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(e):e,l=await(n.hooks?await n.hooks.provideLexer(r):r?y.lex:y.lexInline)(a,n),h=n.hooks?await n.hooks.processAllTokens(l):l;n.walkTokens&&await Promise.all(this.walkTokens(h,n.walkTokens));let o=await(n.hooks?await n.hooks.provideParser(r):r?R.parse:R.parseInline)(h,n);return n.hooks?await n.hooks.postprocess(o):o})().catch(i);try{n.hooks&&(e=n.hooks.preprocess(e));let a=(n.hooks?n.hooks.provideLexer(r):r?y.lex:y.lexInline)(e,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let l=(n.hooks?n.hooks.provideParser(r):r?R.parse:R.parseInline)(a,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(a){return i(a)}}}onError(r,e){return t=>{if(t.message+=`
|
|
59
|
+
Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+S(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},T=new be;function d(r,e){return T.parse(r,e)}d.options=d.setOptions=function(r){return T.setOptions(r),d.defaults=T.defaults,oe(d.defaults),d};d.getDefaults=M;d.defaults=exports.defaults;d.use=function(...r){return T.use(...r),d.defaults=T.defaults,oe(d.defaults),d};d.walkTokens=function(r,e){return T.walkTokens(r,e)};d.parseInline=T.parseInline;d.Parser=R;d.parser=R.parse;d.Renderer=C;d.TextRenderer=j;d.Lexer=y;d.lexer=y.lex;d.Tokenizer=B;d.Hooks=A;d.parse=d;d.options;d.setOptions;d.use;d.walkTokens;d.parseInline;R.parse;y.lex;exports.Hooks=A;exports.Lexer=y;exports.Marked=be;exports.Parser=R;exports.Renderer=C;exports.TextRenderer=j;exports.Tokenizer=B;exports.getDefaults=M;exports.marked=d;
|