required-doc 0.0.6 → 0.0.7
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.js +177 -174
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20,10 +20,10 @@ function ce() {
|
|
|
20
20
|
function le() {
|
|
21
21
|
return k;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function ue() {
|
|
24
24
|
return w;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function A() {
|
|
27
27
|
return T;
|
|
28
28
|
}
|
|
29
29
|
function de() {
|
|
@@ -48,10 +48,10 @@ function pe() {
|
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region src/catalog/CatalogView.vue?vue&type=script&setup=true&lang.ts
|
|
51
|
-
var M = { class: "mx-auto min-h-screen max-w-3xl p-8" }, N = { class: "mb-8 flex items-center" },
|
|
51
|
+
var M = { class: "mx-auto min-h-screen max-w-3xl p-8" }, N = { class: "mb-8 flex items-center" }, P = { class: "mb-10" }, me = { class: "space-y-2" }, he = { class: "font-bold dark:text-gray-100" }, ge = { class: "ml-1 text-xs text-gray-400" }, F = { class: "text-sm text-gray-500 dark:text-gray-400" }, _e = { class: "mb-10" }, ve = { class: "space-y-2" }, ye = { class: "font-bold dark:text-gray-100" }, be = { class: "ml-1 text-xs text-gray-400" }, xe = { class: "text-sm text-gray-500 dark:text-gray-400" }, Se = { class: "mb-2 rounded-lg border border-gray-300 bg-white p-4 dark:border-gray-700 dark:bg-gray-800" }, I = { class: "space-y-2 text-sm" }, L = { class: "flex gap-3" }, Ce = { class: "font-bold dark:text-gray-100" }, we = { class: "flex gap-3" }, Te = { class: "flex-1" }, Ee = { class: "space-y-1" }, De = { class: "space-y-2" }, Oe = "block rounded-lg border border-gray-300 bg-white p-4 transition hover:border-blue-500 dark:border-gray-700 dark:bg-gray-800 dark:hover:border-blue-400", ke = /* @__PURE__ */ l({
|
|
52
52
|
__name: "CatalogView",
|
|
53
53
|
setup(t) {
|
|
54
|
-
let { isDark: n, toggle: r } = pe(), l = se(), u = ce(), f =
|
|
54
|
+
let { isDark: n, toggle: r } = pe(), l = se(), u = ce(), f = ue(), p = A();
|
|
55
55
|
function ee(e) {
|
|
56
56
|
return e.minWidth === e.maxWidth ? `${e.maxWidth}px` : `${e.minWidth}–${e.maxWidth}px`;
|
|
57
57
|
}
|
|
@@ -62,29 +62,29 @@ var M = { class: "mx-auto min-h-screen max-w-3xl p-8" }, N = { class: "mb-8 flex
|
|
|
62
62
|
class: "ml-auto rounded-md border border-gray-300 px-3 py-1 text-xs font-bold text-gray-600 transition hover:bg-gray-100 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-800",
|
|
63
63
|
onClick: h[0] ||= (...e) => y(r) && y(r)(...e)
|
|
64
64
|
}, v(y(n) ? "ライトモード" : "ダークモード"), 1)) : i("", !0)]),
|
|
65
|
-
o("section",
|
|
65
|
+
o("section", P, [h[2] ||= o("h2", { class: "mb-3 text-lg font-bold text-gray-700 dark:text-gray-300" }, "ページ", -1), o("ul", me, [(m(!0), a(e, null, g(y(p), (e) => (m(), a("li", { key: e.name }, [c(y(x), {
|
|
66
66
|
to: `/pages/${e.name}`,
|
|
67
|
-
class: d(
|
|
67
|
+
class: d(Oe)
|
|
68
68
|
}, {
|
|
69
|
-
default: b(() => [o("div",
|
|
69
|
+
default: b(() => [o("div", he, [s(v(e.title) + " ", 1), o("span", ge, "(" + v(e.latest) + ")", 1)]), o("div", F, v(e.desc), 1)]),
|
|
70
70
|
_: 2
|
|
71
71
|
}, 1032, ["to"])]))), 128))])]),
|
|
72
|
-
o("section",
|
|
72
|
+
o("section", _e, [h[3] ||= o("h2", { class: "mb-3 text-lg font-bold text-gray-700 dark:text-gray-300" }, "コンポーネント", -1), o("ul", ve, [(m(!0), a(e, null, g(y(f), (e) => (m(), a("li", { key: e.name }, [c(y(x), {
|
|
73
73
|
to: `/components/${e.name}`,
|
|
74
|
-
class: d(
|
|
74
|
+
class: d(Oe)
|
|
75
75
|
}, {
|
|
76
|
-
default: b(() => [o("div",
|
|
76
|
+
default: b(() => [o("div", ye, [s(v(e.title) + " ", 1), o("span", be, "(" + v(e.latest) + ")", 1)]), o("div", xe, v(e.desc), 1)]),
|
|
77
77
|
_: 2
|
|
78
78
|
}, 1032, ["to"])]))), 128))])]),
|
|
79
79
|
o("section", null, [
|
|
80
80
|
h[8] ||= o("h2", { class: "mb-3 text-lg font-bold text-gray-700 dark:text-gray-300" }, "デザイン", -1),
|
|
81
|
-
o("div",
|
|
81
|
+
o("div", Se, [h[6] ||= o("div", { class: "mb-2 text-xs font-bold uppercase tracking-wide text-gray-400" }, "表示設定", -1), o("dl", I, [o("div", L, [h[4] ||= o("dt", { class: "w-28 shrink-0 text-gray-500 dark:text-gray-400" }, "ダークモード切替", -1), o("dd", Ce, v(y(l) ? "表示" : "非表示"), 1)]), o("div", we, [h[5] ||= o("dt", { class: "w-28 shrink-0 text-gray-500 dark:text-gray-400" }, "端末", -1), o("dd", Te, [o("ul", Ee, [(m(!0), a(e, null, g(y(u), (e) => (m(), a("li", {
|
|
82
82
|
key: e.id,
|
|
83
83
|
class: "font-mono text-xs text-gray-700 dark:text-gray-200"
|
|
84
84
|
}, v(e.label) + "(" + v(e.frame) + ") / 幅: " + v(ee(e)), 1))), 128))])])])])]),
|
|
85
|
-
o("ul",
|
|
85
|
+
o("ul", De, [o("li", null, [c(y(x), {
|
|
86
86
|
to: "/colors",
|
|
87
|
-
class: d(
|
|
87
|
+
class: d(Oe)
|
|
88
88
|
}, {
|
|
89
89
|
default: b(() => [...h[7] ||= [o("div", { class: "font-bold dark:text-gray-100" }, "カラー", -1), o("div", { class: "text-sm text-gray-500 dark:text-gray-400" }, "accentColor 等の色定義一覧", -1)]]),
|
|
90
90
|
_: 1
|
|
@@ -95,7 +95,7 @@ var M = { class: "mx-auto min-h-screen max-w-3xl p-8" }, N = { class: "mb-8 flex
|
|
|
95
95
|
});
|
|
96
96
|
//#endregion
|
|
97
97
|
//#region node_modules/marked/lib/marked.esm.js
|
|
98
|
-
function
|
|
98
|
+
function Ae() {
|
|
99
99
|
return {
|
|
100
100
|
async: !1,
|
|
101
101
|
breaks: !1,
|
|
@@ -109,22 +109,22 @@ function je() {
|
|
|
109
109
|
walkTokens: null
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
var
|
|
113
|
-
function
|
|
114
|
-
|
|
112
|
+
var R = Ae();
|
|
113
|
+
function je(e) {
|
|
114
|
+
R = e;
|
|
115
115
|
}
|
|
116
|
-
var
|
|
117
|
-
function
|
|
116
|
+
var z = { exec: () => null };
|
|
117
|
+
function B(e, t = "") {
|
|
118
118
|
let n = typeof e == "string" ? e : e.source, r = {
|
|
119
119
|
replace: (e, t) => {
|
|
120
120
|
let i = typeof t == "string" ? t : t.source;
|
|
121
|
-
return i = i.replace(
|
|
121
|
+
return i = i.replace(V.caret, "$1"), n = n.replace(e, i), r;
|
|
122
122
|
},
|
|
123
123
|
getRegex: () => new RegExp(n, t)
|
|
124
124
|
};
|
|
125
125
|
return r;
|
|
126
126
|
}
|
|
127
|
-
var
|
|
127
|
+
var V = {
|
|
128
128
|
codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
|
|
129
129
|
outputLinkReplace: /\\([\[\]])/g,
|
|
130
130
|
indentCodeCompensation: /^(\s+)(?:```)/,
|
|
@@ -181,111 +181,111 @@ var B = {
|
|
|
181
181
|
fencesBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`),
|
|
182
182
|
headingBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}#`),
|
|
183
183
|
htmlBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i")
|
|
184
|
-
},
|
|
185
|
-
blockquote:
|
|
186
|
-
code:
|
|
187
|
-
def:
|
|
188
|
-
fences:
|
|
189
|
-
heading:
|
|
190
|
-
hr:
|
|
191
|
-
html:
|
|
184
|
+
}, Me = /^(?:[ \t]*(?:\n|$))+/, Ne = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Pe = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, H = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Fe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ie = /(?:[*+-]|\d{1,9}[.)])/, Le = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Re = B(Le).replace(/bull/g, Ie).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(), ze = B(Le).replace(/bull/g, Ie).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(), Be = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ve = /^[^\n]+/, He = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Ue = B(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", He).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), We = B(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ie).getRegex(), U = "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", Ge = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ke = B("^ {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", Ge).replace("tag", U).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), qe = B(Be).replace("hr", H).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[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", U).getRegex(), Je = {
|
|
185
|
+
blockquote: B(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", qe).getRegex(),
|
|
186
|
+
code: Ne,
|
|
187
|
+
def: Ue,
|
|
188
|
+
fences: Pe,
|
|
189
|
+
heading: Fe,
|
|
190
|
+
hr: H,
|
|
191
|
+
html: Ke,
|
|
192
|
+
lheading: Re,
|
|
193
|
+
list: We,
|
|
194
|
+
newline: Me,
|
|
195
|
+
paragraph: qe,
|
|
196
|
+
table: z,
|
|
197
|
+
text: Ve
|
|
198
|
+
}, Ye = B("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", H).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[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", U).getRegex(), Xe = {
|
|
199
|
+
...Je,
|
|
192
200
|
lheading: ze,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}, Xe = z("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", V).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[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex(), Ze = {
|
|
199
|
-
...Ye,
|
|
200
|
-
lheading: Be,
|
|
201
|
-
table: Xe,
|
|
202
|
-
paragraph: z(Ve).replace("hr", V).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Xe).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex()
|
|
203
|
-
}, Qe = {
|
|
204
|
-
...Ye,
|
|
205
|
-
html: z("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Ke).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(),
|
|
201
|
+
table: Ye,
|
|
202
|
+
paragraph: B(Be).replace("hr", H).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ye).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", U).getRegex()
|
|
203
|
+
}, Ze = {
|
|
204
|
+
...Je,
|
|
205
|
+
html: B("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Ge).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(),
|
|
206
206
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
207
207
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
208
|
-
fences:
|
|
208
|
+
fences: z,
|
|
209
209
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
210
|
-
paragraph:
|
|
211
|
-
},
|
|
212
|
-
_backpedal:
|
|
213
|
-
anyPunctuation:
|
|
214
|
-
autolink:
|
|
215
|
-
blockSkip:
|
|
216
|
-
br:
|
|
217
|
-
code:
|
|
218
|
-
del:
|
|
219
|
-
emStrongLDelim:
|
|
220
|
-
emStrongRDelimAst:
|
|
221
|
-
emStrongRDelimUnd:
|
|
222
|
-
escape:
|
|
223
|
-
link:
|
|
224
|
-
nolink:
|
|
225
|
-
punctuation:
|
|
226
|
-
reflink:
|
|
227
|
-
reflinkSearch:
|
|
228
|
-
tag:
|
|
229
|
-
text:
|
|
230
|
-
url:
|
|
210
|
+
paragraph: B(Be).replace("hr", H).replace("heading", " *#{1,6} *[^\n]").replace("lheading", Re).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
211
|
+
}, Qe = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, $e = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, et = /^( {2,}|\\)\n(?!\s*$)/, tt = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, W = /[\p{P}\p{S}]/u, nt = /[\s\p{P}\p{S}]/u, rt = /[^\s\p{P}\p{S}]/u, it = B(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, nt).getRegex(), at = /(?!~)[\p{P}\p{S}]/u, ot = /(?!~)[\s\p{P}\p{S}]/u, st = /(?:[^\s\p{P}\p{S}]|~)/u, ct = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, lt = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, ut = B(lt, "u").replace(/punct/g, W).getRegex(), dt = B(lt, "u").replace(/punct/g, at).getRegex(), ft = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", pt = B(ft, "gu").replace(/notPunctSpace/g, rt).replace(/punctSpace/g, nt).replace(/punct/g, W).getRegex(), mt = B(ft, "gu").replace(/notPunctSpace/g, st).replace(/punctSpace/g, ot).replace(/punct/g, at).getRegex(), ht = B("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, rt).replace(/punctSpace/g, nt).replace(/punct/g, W).getRegex(), gt = B(/\\(punct)/, "gu").replace(/punct/g, W).getRegex(), _t = B(/^<(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(), vt = B(Ge).replace("(?:-->|$)", "-->").getRegex(), yt = B("^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", vt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), G = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, bt = B(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", G).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), xt = B(/^!?\[(label)\]\[(ref)\]/).replace("label", G).replace("ref", He).getRegex(), St = B(/^!?\[(ref)\](?:\[\])?/).replace("ref", He).getRegex(), Ct = {
|
|
212
|
+
_backpedal: z,
|
|
213
|
+
anyPunctuation: gt,
|
|
214
|
+
autolink: _t,
|
|
215
|
+
blockSkip: ct,
|
|
216
|
+
br: et,
|
|
217
|
+
code: $e,
|
|
218
|
+
del: z,
|
|
219
|
+
emStrongLDelim: ut,
|
|
220
|
+
emStrongRDelimAst: pt,
|
|
221
|
+
emStrongRDelimUnd: ht,
|
|
222
|
+
escape: Qe,
|
|
223
|
+
link: bt,
|
|
224
|
+
nolink: St,
|
|
225
|
+
punctuation: it,
|
|
226
|
+
reflink: xt,
|
|
227
|
+
reflinkSearch: B("reflink|nolink(?!\\()", "g").replace("reflink", xt).replace("nolink", St).getRegex(),
|
|
228
|
+
tag: yt,
|
|
229
|
+
text: tt,
|
|
230
|
+
url: z
|
|
231
|
+
}, wt = {
|
|
232
|
+
...Ct,
|
|
233
|
+
link: B(/^!?\[(label)\]\((.*?)\)/).replace("label", G).getRegex(),
|
|
234
|
+
reflink: B(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", G).getRegex()
|
|
231
235
|
}, Tt = {
|
|
232
|
-
...
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
...wt,
|
|
237
|
-
emStrongRDelimAst: ht,
|
|
238
|
-
emStrongLDelim: ft,
|
|
239
|
-
url: z(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
236
|
+
...Ct,
|
|
237
|
+
emStrongRDelimAst: mt,
|
|
238
|
+
emStrongLDelim: dt,
|
|
239
|
+
url: B(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
240
240
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
241
241
|
del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
|
|
242
242
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
243
|
-
},
|
|
244
|
-
...
|
|
245
|
-
br:
|
|
246
|
-
text:
|
|
247
|
-
}, G = {
|
|
248
|
-
normal: Ye,
|
|
249
|
-
gfm: Ze,
|
|
250
|
-
pedantic: Qe
|
|
243
|
+
}, Et = {
|
|
244
|
+
...Tt,
|
|
245
|
+
br: B(et).replace("{2,}", "*").getRegex(),
|
|
246
|
+
text: B(Tt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
251
247
|
}, K = {
|
|
252
|
-
normal:
|
|
253
|
-
gfm:
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
248
|
+
normal: Je,
|
|
249
|
+
gfm: Xe,
|
|
250
|
+
pedantic: Ze
|
|
251
|
+
}, q = {
|
|
252
|
+
normal: Ct,
|
|
253
|
+
gfm: Tt,
|
|
254
|
+
breaks: Et,
|
|
255
|
+
pedantic: wt
|
|
256
|
+
}, Dt = {
|
|
257
257
|
"&": "&",
|
|
258
258
|
"<": "<",
|
|
259
259
|
">": ">",
|
|
260
260
|
"\"": """,
|
|
261
261
|
"'": "'"
|
|
262
|
-
},
|
|
263
|
-
function
|
|
262
|
+
}, Ot = (e) => Dt[e];
|
|
263
|
+
function J(e, t) {
|
|
264
264
|
if (t) {
|
|
265
|
-
if (
|
|
266
|
-
} else if (
|
|
265
|
+
if (V.escapeTest.test(e)) return e.replace(V.escapeReplace, Ot);
|
|
266
|
+
} else if (V.escapeTestNoEncode.test(e)) return e.replace(V.escapeReplaceNoEncode, Ot);
|
|
267
267
|
return e;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function kt(e) {
|
|
270
270
|
try {
|
|
271
|
-
e = encodeURI(e).replace(
|
|
271
|
+
e = encodeURI(e).replace(V.percentDecode, "%");
|
|
272
272
|
} catch {
|
|
273
273
|
return null;
|
|
274
274
|
}
|
|
275
275
|
return e;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
let n = e.replace(
|
|
277
|
+
function At(e, t) {
|
|
278
|
+
let n = e.replace(V.findPipe, (e, t, n) => {
|
|
279
279
|
let r = !1, i = t;
|
|
280
280
|
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
281
281
|
return r ? "|" : " |";
|
|
282
|
-
}).split(
|
|
282
|
+
}).split(V.splitPipe), r = 0;
|
|
283
283
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
|
|
284
284
|
else for (; n.length < t;) n.push("");
|
|
285
|
-
for (; r < n.length; r++) n[r] = n[r].trim().replace(
|
|
285
|
+
for (; r < n.length; r++) n[r] = n[r].trim().replace(V.slashPipe, "|");
|
|
286
286
|
return n;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function Y(e, t, n) {
|
|
289
289
|
let r = e.length;
|
|
290
290
|
if (r === 0) return "";
|
|
291
291
|
let i = 0;
|
|
@@ -297,7 +297,7 @@ function J(e, t, n) {
|
|
|
297
297
|
}
|
|
298
298
|
return e.slice(0, r - i);
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function jt(e, t) {
|
|
301
301
|
if (e.indexOf(t[1]) === -1) return -1;
|
|
302
302
|
let n = 0;
|
|
303
303
|
for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
|
|
@@ -305,7 +305,7 @@ function Mt(e, t) {
|
|
|
305
305
|
else if (e[r] === t[1] && (n--, n < 0)) return r;
|
|
306
306
|
return n > 0 ? -2 : -1;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function Mt(e, t, n, r, i) {
|
|
309
309
|
let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
|
|
310
310
|
r.state.inLink = !0;
|
|
311
311
|
let c = {
|
|
@@ -318,7 +318,7 @@ function Nt(e, t, n, r, i) {
|
|
|
318
318
|
};
|
|
319
319
|
return r.state.inLink = !1, c;
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function Nt(e, t, n) {
|
|
322
322
|
let r = e.match(n.other.indentCodeCompensation);
|
|
323
323
|
if (r === null) return t;
|
|
324
324
|
let i = r[1];
|
|
@@ -329,12 +329,12 @@ function Pt(e, t, n) {
|
|
|
329
329
|
return r.length >= i.length ? e.slice(i.length) : e;
|
|
330
330
|
}).join("\n");
|
|
331
331
|
}
|
|
332
|
-
var
|
|
332
|
+
var Pt = class {
|
|
333
333
|
options;
|
|
334
334
|
rules;
|
|
335
335
|
lexer;
|
|
336
336
|
constructor(e) {
|
|
337
|
-
this.options = e ||
|
|
337
|
+
this.options = e || R;
|
|
338
338
|
}
|
|
339
339
|
space(e) {
|
|
340
340
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -351,14 +351,14 @@ var Y = class {
|
|
|
351
351
|
type: "code",
|
|
352
352
|
raw: t[0],
|
|
353
353
|
codeBlockStyle: "indented",
|
|
354
|
-
text: this.options.pedantic ? e :
|
|
354
|
+
text: this.options.pedantic ? e : Y(e, "\n")
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
fences(e) {
|
|
359
359
|
let t = this.rules.block.fences.exec(e);
|
|
360
360
|
if (t) {
|
|
361
|
-
let e = t[0], n =
|
|
361
|
+
let e = t[0], n = Nt(e, t[3] || "", this.rules);
|
|
362
362
|
return {
|
|
363
363
|
type: "code",
|
|
364
364
|
raw: e,
|
|
@@ -372,7 +372,7 @@ var Y = class {
|
|
|
372
372
|
if (t) {
|
|
373
373
|
let e = t[2].trim();
|
|
374
374
|
if (this.rules.other.endingHash.test(e)) {
|
|
375
|
-
let t =
|
|
375
|
+
let t = Y(e, "#");
|
|
376
376
|
(this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
|
|
377
377
|
}
|
|
378
378
|
return {
|
|
@@ -388,13 +388,13 @@ var Y = class {
|
|
|
388
388
|
let t = this.rules.block.hr.exec(e);
|
|
389
389
|
if (t) return {
|
|
390
390
|
type: "hr",
|
|
391
|
-
raw:
|
|
391
|
+
raw: Y(t[0], "\n")
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
394
|
blockquote(e) {
|
|
395
395
|
let t = this.rules.block.blockquote.exec(e);
|
|
396
396
|
if (t) {
|
|
397
|
-
let e =
|
|
397
|
+
let e = Y(t[0], "\n").split("\n"), n = "", r = "", i = [];
|
|
398
398
|
for (; e.length > 0;) {
|
|
399
399
|
let t = !1, a = [], o;
|
|
400
400
|
for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
|
|
@@ -508,7 +508,7 @@ ${c}` : c;
|
|
|
508
508
|
table(e) {
|
|
509
509
|
let t = this.rules.block.table.exec(e);
|
|
510
510
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
511
|
-
let n =
|
|
511
|
+
let n = At(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
|
|
512
512
|
type: "table",
|
|
513
513
|
raw: t[0],
|
|
514
514
|
header: [],
|
|
@@ -523,7 +523,7 @@ ${c}` : c;
|
|
|
523
523
|
header: !0,
|
|
524
524
|
align: a.align[e]
|
|
525
525
|
});
|
|
526
|
-
for (let e of i) a.rows.push(
|
|
526
|
+
for (let e of i) a.rows.push(At(e, a.header.length).map((e, t) => ({
|
|
527
527
|
text: e,
|
|
528
528
|
tokens: this.lexer.inline(e),
|
|
529
529
|
header: !1,
|
|
@@ -588,10 +588,10 @@ ${c}` : c;
|
|
|
588
588
|
let e = t[2].trim();
|
|
589
589
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
|
|
590
590
|
if (!this.rules.other.endAngleBracket.test(e)) return;
|
|
591
|
-
let t =
|
|
591
|
+
let t = Y(e.slice(0, -1), "\\");
|
|
592
592
|
if ((e.length - t.length) % 2 == 0) return;
|
|
593
593
|
} else {
|
|
594
|
-
let e =
|
|
594
|
+
let e = jt(t[2], "()");
|
|
595
595
|
if (e === -2) return;
|
|
596
596
|
if (e > -1) {
|
|
597
597
|
let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
|
|
@@ -603,7 +603,7 @@ ${c}` : c;
|
|
|
603
603
|
let e = this.rules.other.pedanticHrefTitle.exec(n);
|
|
604
604
|
e && (n = e[1], r = e[3]);
|
|
605
605
|
} else r = t[3] ? t[3].slice(1, -1) : "";
|
|
606
|
-
return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)),
|
|
606
|
+
return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), Mt(t, {
|
|
607
607
|
href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
608
608
|
title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
|
|
609
609
|
}, t[0], this.lexer, this.rules);
|
|
@@ -621,7 +621,7 @@ ${c}` : c;
|
|
|
621
621
|
text: e
|
|
622
622
|
};
|
|
623
623
|
}
|
|
624
|
-
return
|
|
624
|
+
return Mt(n, e, n[0], this.lexer, this.rules);
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
627
|
emStrong(e, t, n = "") {
|
|
@@ -747,22 +747,22 @@ ${c}` : c;
|
|
|
747
747
|
tokenizer;
|
|
748
748
|
inlineQueue;
|
|
749
749
|
constructor(e) {
|
|
750
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
750
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || R, this.options.tokenizer = this.options.tokenizer || new Pt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
751
751
|
inLink: !1,
|
|
752
752
|
inRawBlock: !1,
|
|
753
753
|
top: !0
|
|
754
754
|
};
|
|
755
755
|
let t = {
|
|
756
|
-
other:
|
|
757
|
-
block:
|
|
758
|
-
inline:
|
|
756
|
+
other: V,
|
|
757
|
+
block: K.normal,
|
|
758
|
+
inline: q.normal
|
|
759
759
|
};
|
|
760
|
-
this.options.pedantic ? (t.block =
|
|
760
|
+
this.options.pedantic ? (t.block = K.pedantic, t.inline = q.pedantic) : this.options.gfm && (t.block = K.gfm, this.options.breaks ? t.inline = q.breaks : t.inline = q.gfm), this.tokenizer.rules = t;
|
|
761
761
|
}
|
|
762
762
|
static get rules() {
|
|
763
763
|
return {
|
|
764
|
-
block:
|
|
765
|
-
inline:
|
|
764
|
+
block: K,
|
|
765
|
+
inline: q
|
|
766
766
|
};
|
|
767
767
|
}
|
|
768
768
|
static lex(t, n) {
|
|
@@ -772,7 +772,7 @@ ${c}` : c;
|
|
|
772
772
|
return new e(n).inlineTokens(t);
|
|
773
773
|
}
|
|
774
774
|
lex(e) {
|
|
775
|
-
e = e.replace(
|
|
775
|
+
e = e.replace(V.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
|
|
776
776
|
for (let e = 0; e < this.inlineQueue.length; e++) {
|
|
777
777
|
let t = this.inlineQueue[e];
|
|
778
778
|
this.inlineTokens(t.src, t.tokens);
|
|
@@ -780,7 +780,7 @@ ${c}` : c;
|
|
|
780
780
|
return this.inlineQueue = [], this.tokens;
|
|
781
781
|
}
|
|
782
782
|
blockTokens(e, t = [], n = !1) {
|
|
783
|
-
for (this.options.pedantic && (e = e.replace(
|
|
783
|
+
for (this.options.pedantic && (e = e.replace(V.tabCharGlobal, " ").replace(V.spaceLine, "")); e;) {
|
|
784
784
|
let r;
|
|
785
785
|
if (this.options.extensions?.block?.some((n) => (r = n.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
|
|
786
786
|
if (r = this.tokenizer.space(e)) {
|
|
@@ -952,14 +952,14 @@ ${c}` : c;
|
|
|
952
952
|
options;
|
|
953
953
|
parser;
|
|
954
954
|
constructor(e) {
|
|
955
|
-
this.options = e ||
|
|
955
|
+
this.options = e || R;
|
|
956
956
|
}
|
|
957
957
|
space(e) {
|
|
958
958
|
return "";
|
|
959
959
|
}
|
|
960
960
|
code({ text: e, lang: t, escaped: n }) {
|
|
961
|
-
let r = (t || "").match(
|
|
962
|
-
return r ? "<pre><code class=\"language-" +
|
|
961
|
+
let r = (t || "").match(V.notSpaceStart)?.[0], i = e.replace(V.endingNewline, "") + "\n";
|
|
962
|
+
return r ? "<pre><code class=\"language-" + J(r) + "\">" + (n ? i : J(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : J(i, !0)) + "</code></pre>\n";
|
|
963
963
|
}
|
|
964
964
|
blockquote({ tokens: e }) {
|
|
965
965
|
return `<blockquote>
|
|
@@ -989,7 +989,7 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
989
989
|
let t = "";
|
|
990
990
|
if (e.task) {
|
|
991
991
|
let n = this.checkbox({ checked: !!e.checked });
|
|
992
|
-
e.loose ? e.tokens[0]?.type === "paragraph" ? (e.tokens[0].text = n + " " + e.tokens[0].text, e.tokens[0].tokens && e.tokens[0].tokens.length > 0 && e.tokens[0].tokens[0].type === "text" && (e.tokens[0].tokens[0].text = n + " " +
|
|
992
|
+
e.loose ? e.tokens[0]?.type === "paragraph" ? (e.tokens[0].text = n + " " + e.tokens[0].text, e.tokens[0].tokens && e.tokens[0].tokens.length > 0 && e.tokens[0].tokens[0].type === "text" && (e.tokens[0].tokens[0].text = n + " " + J(e.tokens[0].tokens[0].text), e.tokens[0].tokens[0].escaped = !0)) : e.tokens.unshift({
|
|
993
993
|
type: "text",
|
|
994
994
|
raw: n + " ",
|
|
995
995
|
text: n + " ",
|
|
@@ -1036,7 +1036,7 @@ ${e}</tr>
|
|
|
1036
1036
|
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
1037
1037
|
}
|
|
1038
1038
|
codespan({ text: e }) {
|
|
1039
|
-
return `<code>${
|
|
1039
|
+
return `<code>${J(e, !0)}</code>`;
|
|
1040
1040
|
}
|
|
1041
1041
|
br(e) {
|
|
1042
1042
|
return "<br>";
|
|
@@ -1045,22 +1045,22 @@ ${e}</tr>
|
|
|
1045
1045
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
1046
1046
|
}
|
|
1047
1047
|
link({ href: e, title: t, tokens: n }) {
|
|
1048
|
-
let r = this.parser.parseInline(n), i =
|
|
1048
|
+
let r = this.parser.parseInline(n), i = kt(e);
|
|
1049
1049
|
if (i === null) return r;
|
|
1050
1050
|
e = i;
|
|
1051
1051
|
let a = "<a href=\"" + e + "\"";
|
|
1052
|
-
return t && (a += " title=\"" +
|
|
1052
|
+
return t && (a += " title=\"" + J(t) + "\""), a += ">" + r + "</a>", a;
|
|
1053
1053
|
}
|
|
1054
1054
|
image({ href: e, title: t, text: n, tokens: r }) {
|
|
1055
1055
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
1056
|
-
let i =
|
|
1057
|
-
if (i === null) return
|
|
1056
|
+
let i = kt(e);
|
|
1057
|
+
if (i === null) return J(n);
|
|
1058
1058
|
e = i;
|
|
1059
1059
|
let a = `<img src="${e}" alt="${n}"`;
|
|
1060
|
-
return t && (a += ` title="${
|
|
1060
|
+
return t && (a += ` title="${J(t)}"`), a += ">", a;
|
|
1061
1061
|
}
|
|
1062
1062
|
text(e) {
|
|
1063
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text :
|
|
1063
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : J(e.text);
|
|
1064
1064
|
}
|
|
1065
1065
|
}, It = class {
|
|
1066
1066
|
strong({ text: e }) {
|
|
@@ -1095,7 +1095,7 @@ ${e}</tr>
|
|
|
1095
1095
|
renderer;
|
|
1096
1096
|
textRenderer;
|
|
1097
1097
|
constructor(e) {
|
|
1098
|
-
this.options = e ||
|
|
1098
|
+
this.options = e || R, this.options.renderer = this.options.renderer || new Ft(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new It();
|
|
1099
1099
|
}
|
|
1100
1100
|
static parse(t, n) {
|
|
1101
1101
|
return new e(n).parse(t);
|
|
@@ -1246,7 +1246,7 @@ ${e}</tr>
|
|
|
1246
1246
|
options;
|
|
1247
1247
|
block;
|
|
1248
1248
|
constructor(e) {
|
|
1249
|
-
this.options = e ||
|
|
1249
|
+
this.options = e || R;
|
|
1250
1250
|
}
|
|
1251
1251
|
static passThroughHooks = /* @__PURE__ */ new Set([
|
|
1252
1252
|
"preprocess",
|
|
@@ -1269,7 +1269,7 @@ ${e}</tr>
|
|
|
1269
1269
|
return this.block ? Z.parse : Z.parseInline;
|
|
1270
1270
|
}
|
|
1271
1271
|
}, Q = new class {
|
|
1272
|
-
defaults =
|
|
1272
|
+
defaults = Ae();
|
|
1273
1273
|
options = this.setOptions;
|
|
1274
1274
|
parse = this.parseMarkdown(!0);
|
|
1275
1275
|
parseInline = this.parseMarkdown(!1);
|
|
@@ -1277,7 +1277,7 @@ ${e}</tr>
|
|
|
1277
1277
|
Renderer = Ft;
|
|
1278
1278
|
TextRenderer = It;
|
|
1279
1279
|
Lexer = X;
|
|
1280
|
-
Tokenizer =
|
|
1280
|
+
Tokenizer = Pt;
|
|
1281
1281
|
Hooks = Lt;
|
|
1282
1282
|
constructor(...e) {
|
|
1283
1283
|
this.use(...e);
|
|
@@ -1342,7 +1342,7 @@ ${e}</tr>
|
|
|
1342
1342
|
n.renderer = t;
|
|
1343
1343
|
}
|
|
1344
1344
|
if (e.tokenizer) {
|
|
1345
|
-
let t = this.defaults.tokenizer || new
|
|
1345
|
+
let t = this.defaults.tokenizer || new Pt(this.defaults);
|
|
1346
1346
|
for (let n in e.tokenizer) {
|
|
1347
1347
|
if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
|
|
1348
1348
|
if ([
|
|
@@ -1426,7 +1426,7 @@ ${e}</tr>
|
|
|
1426
1426
|
onError(e, t) {
|
|
1427
1427
|
return (n) => {
|
|
1428
1428
|
if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
|
|
1429
|
-
let e = "<p>An error occurred:</p><pre>" +
|
|
1429
|
+
let e = "<p>An error occurred:</p><pre>" + J(n.message + "", !0) + "</pre>";
|
|
1430
1430
|
return t ? Promise.resolve(e) : e;
|
|
1431
1431
|
}
|
|
1432
1432
|
if (t) return Promise.reject(n);
|
|
@@ -1440,12 +1440,12 @@ function $(e, t) {
|
|
|
1440
1440
|
//#endregion
|
|
1441
1441
|
//#region src/lib/markdown.ts
|
|
1442
1442
|
$.options = $.setOptions = function(e) {
|
|
1443
|
-
return Q.setOptions(e), $.defaults = Q.defaults,
|
|
1444
|
-
}, $.getDefaults =
|
|
1445
|
-
return Q.use(...e), $.defaults = Q.defaults,
|
|
1443
|
+
return Q.setOptions(e), $.defaults = Q.defaults, je($.defaults), $;
|
|
1444
|
+
}, $.getDefaults = Ae, $.defaults = R, $.use = function(...e) {
|
|
1445
|
+
return Q.use(...e), $.defaults = Q.defaults, je($.defaults), $;
|
|
1446
1446
|
}, $.walkTokens = function(e, t) {
|
|
1447
1447
|
return Q.walkTokens(e, t);
|
|
1448
|
-
}, $.parseInline = Q.parseInline, $.Parser = Z, $.parser = Z.parse, $.Renderer = Ft, $.TextRenderer = It, $.Lexer = X, $.lexer = X.lex, $.Tokenizer =
|
|
1448
|
+
}, $.parseInline = Q.parseInline, $.Parser = Z, $.parser = Z.parse, $.Renderer = Ft, $.TextRenderer = It, $.Lexer = X, $.lexer = X.lex, $.Tokenizer = Pt, $.Hooks = Lt, $.parse = $, $.options, $.setOptions, $.use, $.walkTokens, $.parseInline, Z.parse, X.lex, $.setOptions({
|
|
1449
1449
|
gfm: !0,
|
|
1450
1450
|
breaks: !1
|
|
1451
1451
|
});
|
|
@@ -1517,7 +1517,7 @@ var zt = {
|
|
|
1517
1517
|
background: e.bg,
|
|
1518
1518
|
color: e.font
|
|
1519
1519
|
};
|
|
1520
|
-
}), D = h(null), O = h(null), k = h(0), oe = h(0), A = h(!1),
|
|
1520
|
+
}), D = h(null), O = h(null), k = h(0), oe = h(0), ue = h(0), A = h(!1), de = h(null), fe = t(() => {
|
|
1521
1521
|
let e = w.value;
|
|
1522
1522
|
return e ? {
|
|
1523
1523
|
min: e.minWidth,
|
|
@@ -1527,63 +1527,66 @@ var zt = {
|
|
|
1527
1527
|
max: 0
|
|
1528
1528
|
};
|
|
1529
1529
|
});
|
|
1530
|
-
function
|
|
1530
|
+
function j() {
|
|
1531
1531
|
let e = w.value;
|
|
1532
1532
|
if (!e) return 0;
|
|
1533
|
-
let t =
|
|
1533
|
+
let t = de.value ?? e.minWidth;
|
|
1534
1534
|
return Math.min(e.maxWidth, Math.max(e.minWidth, t));
|
|
1535
1535
|
}
|
|
1536
|
-
let
|
|
1536
|
+
let M = t(() => j()), N = t(() => {
|
|
1537
1537
|
let e = w.value;
|
|
1538
1538
|
return !!e && e.minWidth < e.maxWidth;
|
|
1539
|
-
}),
|
|
1539
|
+
}), P = t(() => {
|
|
1540
1540
|
if (A.value) return 1;
|
|
1541
|
-
let e =
|
|
1541
|
+
let e = ue.value || M.value;
|
|
1542
1542
|
return !e || k.value === 0 ? 1 : Math.min(1, k.value / e);
|
|
1543
|
-
}), me = t(() =>
|
|
1543
|
+
}), me = t(() => {
|
|
1544
|
+
let e = ue.value || M.value;
|
|
1545
|
+
return e ? e * P.value : 0;
|
|
1546
|
+
}), he = t(() => oe.value * P.value), ge = t(() => A.value && M.value > 0 && k.value > 0 && M.value < k.value), F = h(!1), _e = 0, ve = 0, ye = 1;
|
|
1544
1547
|
function be(e) {
|
|
1545
1548
|
let t = w.value;
|
|
1546
|
-
t && (
|
|
1549
|
+
t && (de.value = Math.min(t.maxWidth, Math.max(t.minWidth, e)));
|
|
1547
1550
|
}
|
|
1548
1551
|
function xe(e) {
|
|
1549
|
-
let t =
|
|
1552
|
+
let t = M.value;
|
|
1550
1553
|
C.value = e, be(t);
|
|
1551
1554
|
}
|
|
1552
1555
|
function Se(e) {
|
|
1553
|
-
if (!w.value || !
|
|
1556
|
+
if (!w.value || !N.value) return;
|
|
1554
1557
|
e.preventDefault(), e.stopPropagation();
|
|
1555
1558
|
let t = e.currentTarget;
|
|
1556
|
-
t.setPointerCapture(e.pointerId),
|
|
1559
|
+
t.setPointerCapture(e.pointerId), F.value = !0, _e = e.clientX, ve = M.value, ye = P.value, document.body.style.userSelect = "none", document.body.style.cursor = "ew-resize";
|
|
1557
1560
|
function n(e) {
|
|
1558
1561
|
if (!e.isPrimary) return;
|
|
1559
1562
|
let t = (e.clientX - _e) / ye;
|
|
1560
1563
|
be(ve + t);
|
|
1561
1564
|
}
|
|
1562
1565
|
function r(e) {
|
|
1563
|
-
e.isPrimary && (t.releasePointerCapture(e.pointerId),
|
|
1566
|
+
e.isPrimary && (t.releasePointerCapture(e.pointerId), F.value = !1, document.body.style.userSelect = "", document.body.style.cursor = "", t.removeEventListener("pointermove", n), t.removeEventListener("pointerup", r), t.removeEventListener("pointercancel", r), u(L));
|
|
1564
1567
|
}
|
|
1565
1568
|
t.addEventListener("pointermove", n), t.addEventListener("pointerup", r), t.addEventListener("pointercancel", r);
|
|
1566
1569
|
}
|
|
1567
|
-
let
|
|
1568
|
-
function
|
|
1569
|
-
D.value && (k.value = D.value.clientWidth), O.value && (oe.value = O.value.offsetHeight);
|
|
1570
|
+
let I = null;
|
|
1571
|
+
function L() {
|
|
1572
|
+
D.value && (k.value = D.value.clientWidth), O.value && (oe.value = O.value.offsetHeight, ue.value = O.value.offsetWidth);
|
|
1570
1573
|
}
|
|
1571
1574
|
function Ce() {
|
|
1572
|
-
|
|
1575
|
+
I?.disconnect(), D.value && I?.observe(D.value), O.value && I?.observe(O.value);
|
|
1573
1576
|
}
|
|
1574
1577
|
function we(e) {
|
|
1575
1578
|
e.key === "Escape" && (A.value = !1);
|
|
1576
1579
|
}
|
|
1577
1580
|
return ee(() => {
|
|
1578
|
-
|
|
1581
|
+
I = new ResizeObserver(() => L()), Ce(), L(), window.addEventListener("keydown", we);
|
|
1579
1582
|
}), p(() => {
|
|
1580
|
-
|
|
1583
|
+
I?.disconnect(), window.removeEventListener("keydown", we);
|
|
1581
1584
|
}), ne([
|
|
1582
1585
|
C,
|
|
1583
1586
|
A,
|
|
1584
|
-
|
|
1587
|
+
M
|
|
1585
1588
|
], () => u(() => {
|
|
1586
|
-
Ce(),
|
|
1589
|
+
Ce(), L();
|
|
1587
1590
|
})), (t, l) => A.value ? (m(), a("div", rn, [o("button", {
|
|
1588
1591
|
type: "button",
|
|
1589
1592
|
class: "fixed right-4 top-4 z-10 rounded-md border border-gray-300 bg-white px-3 py-1 text-xs font-bold text-gray-700 shadow-sm transition hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-100 dark:hover:bg-gray-700",
|
|
@@ -1602,7 +1605,7 @@ var zt = {
|
|
|
1602
1605
|
}, [w.value ? (m(), r(Ht, {
|
|
1603
1606
|
key: 0,
|
|
1604
1607
|
frame: w.value.frame,
|
|
1605
|
-
"screen-width":
|
|
1608
|
+
"screen-width": M.value,
|
|
1606
1609
|
"base-style": E.value
|
|
1607
1610
|
}, {
|
|
1608
1611
|
default: b(() => [_(t.$slots, "mock")]),
|
|
@@ -1611,11 +1614,11 @@ var zt = {
|
|
|
1611
1614
|
"frame",
|
|
1612
1615
|
"screen-width",
|
|
1613
1616
|
"base-style"
|
|
1614
|
-
])) : i("", !0)], 512),
|
|
1617
|
+
])) : i("", !0)], 512), N.value ? (m(), a("div", {
|
|
1615
1618
|
key: 0,
|
|
1616
|
-
class: d(["absolute inset-y-0 -right-1 z-20 flex w-3 cursor-ew-resize touch-none items-center justify-center opacity-60 hover:opacity-100",
|
|
1619
|
+
class: d(["absolute inset-y-0 -right-1 z-20 flex w-3 cursor-ew-resize touch-none items-center justify-center opacity-60 hover:opacity-100", F.value ? "opacity-100" : ""]),
|
|
1617
1620
|
onPointerdown: Se
|
|
1618
|
-
}, [o("div", { class: d(["h-10 w-1 rounded-full bg-gray-400 dark:bg-gray-500",
|
|
1621
|
+
}, [o("div", { class: d(["h-10 w-1 rounded-full bg-gray-400 dark:bg-gray-500", F.value ? "bg-blue-500 dark:bg-blue-400" : ""]) }, null, 2)], 34)) : i("", !0)], 2)) : i("", !0)], 512)])) : (m(), a("div", Ut, [o("header", Wt, [
|
|
1619
1622
|
c(y(x), {
|
|
1620
1623
|
to: "/catalog",
|
|
1621
1624
|
class: "text-sm text-gray-500 underline hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-100"
|
|
@@ -1638,9 +1641,9 @@ var zt = {
|
|
|
1638
1641
|
onClick: l[1] ||= (...e) => y(ie) && y(ie)(...e)
|
|
1639
1642
|
}, v(y(re) ? "ライトモード" : "ダークモード"), 1)) : i("", !0)
|
|
1640
1643
|
])
|
|
1641
|
-
]), o("div", qt, [o("section", Jt, [o("div", Yt, [l[4] ||= o("span", { class: "text-xs font-bold uppercase tracking-wide text-gray-400" }, " 画面 mock ", -1), o("div", Xt, [w.value ? (m(), a("span", Zt, [s(v(
|
|
1644
|
+
]), o("div", qt, [o("section", Jt, [o("div", Yt, [l[4] ||= o("span", { class: "text-xs font-bold uppercase tracking-wide text-gray-400" }, " 画面 mock ", -1), o("div", Xt, [w.value ? (m(), a("span", Zt, [s(v(M.value) + "px ", 1), N.value ? (m(), a("span", Qt, " (" + v(fe.value.min) + "–" + v(fe.value.max) + ") ", 1)) : i("", !0)])) : i("", !0), y(S).length > 1 ? (m(), a("div", {
|
|
1642
1645
|
key: 1,
|
|
1643
|
-
class: d(["inline-flex overflow-hidden rounded-md border border-gray-300 text-xs font-bold dark:border-gray-600",
|
|
1646
|
+
class: d(["inline-flex overflow-hidden rounded-md border border-gray-300 text-xs font-bold dark:border-gray-600", F.value ? "pointer-events-none" : ""])
|
|
1644
1647
|
}, [(m(!0), a(e, null, g(y(S), (e) => (m(), a("button", {
|
|
1645
1648
|
key: e.id,
|
|
1646
1649
|
type: "button",
|
|
@@ -1660,11 +1663,11 @@ var zt = {
|
|
|
1660
1663
|
ref_key: "contentRef",
|
|
1661
1664
|
ref: O,
|
|
1662
1665
|
class: "origin-top-left w-fit",
|
|
1663
|
-
style: f({ transform: `scale(${
|
|
1666
|
+
style: f({ transform: `scale(${P.value})` })
|
|
1664
1667
|
}, [w.value ? (m(), r(Ht, {
|
|
1665
1668
|
key: 0,
|
|
1666
1669
|
frame: w.value.frame,
|
|
1667
|
-
"screen-width":
|
|
1670
|
+
"screen-width": M.value,
|
|
1668
1671
|
"base-style": E.value
|
|
1669
1672
|
}, {
|
|
1670
1673
|
default: b(() => [_(t.$slots, "mock")]),
|
|
@@ -1673,11 +1676,11 @@ var zt = {
|
|
|
1673
1676
|
"frame",
|
|
1674
1677
|
"screen-width",
|
|
1675
1678
|
"base-style"
|
|
1676
|
-
])) : i("", !0)], 4),
|
|
1679
|
+
])) : i("", !0)], 4), N.value ? (m(), a("div", {
|
|
1677
1680
|
key: 0,
|
|
1678
|
-
class: d(["absolute inset-y-0 -right-1 z-20 flex w-3 cursor-ew-resize touch-none items-center justify-center",
|
|
1681
|
+
class: d(["absolute inset-y-0 -right-1 z-20 flex w-3 cursor-ew-resize touch-none items-center justify-center", F.value ? "opacity-100" : "opacity-60 hover:opacity-100"]),
|
|
1679
1682
|
onPointerdown: Se
|
|
1680
|
-
}, [o("div", { class: d(["h-10 w-1 rounded-full bg-gray-400 dark:bg-gray-500",
|
|
1683
|
+
}, [o("div", { class: d(["h-10 w-1 rounded-full bg-gray-400 dark:bg-gray-500", F.value ? "bg-blue-500 dark:bg-blue-400" : ""]) }, null, 2)], 34)) : i("", !0)], 4)) : i("", !0)], 512)])]), o("section", tn, [l[5] ||= o("div", { class: "mb-3 text-xs font-bold uppercase tracking-wide text-gray-400" }, " 要件 ", -1), o("div", {
|
|
1681
1684
|
class: "req-md",
|
|
1682
1685
|
innerHTML: te.value
|
|
1683
1686
|
}, null, 8, nn)])])]));
|
|
@@ -1782,7 +1785,7 @@ function Sn() {
|
|
|
1782
1785
|
{
|
|
1783
1786
|
path: "/catalog",
|
|
1784
1787
|
name: "catalog",
|
|
1785
|
-
component:
|
|
1788
|
+
component: ke
|
|
1786
1789
|
},
|
|
1787
1790
|
{
|
|
1788
1791
|
path: "/colors",
|