/*! showdown v 2.0.0 - 15-02-2022 */ ! function() {
function a(e) {
"use strict";
var r = {
omitExtraWLInCodeBlocks: {
defaultValue: !1,
describe: "Omit the default extra whiteline added to code blocks",
type: "boolean"
},
noHeaderId: {
defaultValue: !1,
describe: "Turn on/off generated header id",
type: "boolean"
},
prefixHeaderId: {
defaultValue: !1,
describe: "Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",
type: "string"
},
rawPrefixHeaderId: {
defaultValue: !1,
describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',
type: "boolean"
},
ghCompatibleHeaderId: {
defaultValue: !1,
describe: "Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",
type: "boolean"
},
rawHeaderId: {
defaultValue: !1,
describe: "Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",
type: "boolean"
},
headerLevelStart: {
defaultValue: !1,
describe: "The header blocks level start",
type: "integer"
},
parseImgDimensions: {
defaultValue: !1,
describe: "Turn on/off image dimension parsing",
type: "boolean"
},
simplifiedAutoLink: {
defaultValue: !1,
describe: "Turn on/off GFM autolink style",
type: "boolean"
},
excludeTrailingPunctuationFromURLs: {
defaultValue: !1,
describe: "Excludes trailing punctuation from links generated with autoLinking",
type: "boolean"
},
literalMidWordUnderscores: {
defaultValue: !1,
describe: "Parse midword underscores as literal underscores",
type: "boolean"
},
literalMidWordAsterisks: {
defaultValue: !1,
describe: "Parse midword asterisks as literal asterisks",
type: "boolean"
},
strikethrough: {
defaultValue: !1,
describe: "Turn on/off strikethrough support",
type: "boolean"
},
tables: {
defaultValue: !1,
describe: "Turn on/off tables support",
type: "boolean"
},
tablesHeaderId: {
defaultValue: !1,
describe: "Add an id to table headers",
type: "boolean"
},
ghCodeBlocks: {
defaultValue: !0,
describe: "Turn on/off GFM fenced code blocks support",
type: "boolean"
},
tasklists: {
defaultValue: !1,
describe: "Turn on/off GFM tasklist support",
type: "boolean"
},
smoothLivePreview: {
defaultValue: !1,
describe: "Prevents weird effects in live previews due to incomplete input",
type: "boolean"
},
smartIndentationFix: {
defaultValue: !1,
description: "Tries to smartly fix indentation in es6 strings",
type: "boolean"
},
disableForced4SpacesIndentedSublists: {
defaultValue: !1,
description: "Disables the requirement of indenting nested sublists by 4 spaces",
type: "boolean"
},
simpleLineBreaks: {
defaultValue: !1,
description: "Parses simple line breaks as
(GFM Style)",
type: "boolean"
},
requireSpaceBeforeHeadingText: {
defaultValue: !1,
description: "Makes adding a space between `#` and the header text mandatory (GFM Style)",
type: "boolean"
},
ghMentions: {
defaultValue: !1,
description: "Enables github @mentions",
type: "boolean"
},
ghMentionsLink: {
defaultValue: "https://github.com/{u}",
description: "Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",
type: "string"
},
encodeEmails: {
defaultValue: !0,
description: "Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",
type: "boolean"
},
openLinksInNewWindow: {
defaultValue: !1,
description: "Open all links in new windows",
type: "boolean"
},
backslashEscapesHTMLTags: {
defaultValue: !1,
description: "Support for HTML Tag escaping. ex:
[^\r]+?<\/pre>)/gm, function(e, r) { return r.replace(/^ /gm, "¨0").replace(/¨0/g, "") }), x.subParser("hashBlock")("\n" + e + "\n", r, t) }), e = t.converter._dispatch("blockQuotes.after", e, r, t) }), x.subParser("codeBlocks", function(e, n, s) { "use strict"; e = s.converter._dispatch("codeBlocks.before", e, n, s); return e = (e = (e += "¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g, function(e, r, t) { var a = "\n", r = x.subParser("outdent")(r, n, s); return r = x.subParser("encodeCode")(r, n, s), r = "", x.subParser("hashBlock")(r, n, s) + t })).replace(/¨0/, ""), e = s.converter._dispatch("codeBlocks.after", e, n, s) }), x.subParser("codeSpans", function(e, n, s) { "use strict"; return e = (e = void 0 === (e = s.converter._dispatch("codeSpans.before", e, n, s)) ? "" : e).replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function(e, r, t, a) { return a = (a = a.replace(/^([ \t]*)/g, "")).replace(/[ \t]*$/g, ""), a = r + "" + (r = (r = (r = x.subParser("detab")(r, n, s)).replace(/^\n+/g, "")).replace(/\n+$/g, "")) + (a = n.omitExtraWLInCodeBlocks ? "" : a) + "
" + (a = x.subParser("encodeCode")(a, n, s)) + "
", a = x.subParser("hashHTMLSpans")(a, n, s) }), e = s.converter._dispatch("codeSpans.after", e, n, s) }), x.subParser("completeHTMLDocument", function(e, r, t) { "use strict"; if (!r.completeHTMLDocument) return e; e = t.converter._dispatch("completeHTMLDocument.before", e, r, t); var a, n = "html", s = "\n", o = "", i = '\n', l = "", c = ""; for (a in void 0 !== t.metadata.parsed.doctype && (s = "\n", "html" !== (n = t.metadata.parsed.doctype.toString().toLowerCase()) && "html5" !== n || (i = '')), t.metadata.parsed) if (t.metadata.parsed.hasOwnProperty(a)) switch (a.toLowerCase()) { case "doctype": break; case "title": o = "" + t.metadata.parsed.title + " \n"; break; case "charset": i = "html" === n || "html5" === n ? '\n' : '\n'; break; case "language": case "lang": l = ' lang="' + t.metadata.parsed[a] + '"', c += '\n'; break; default: c += '\n' } return e = s + "\n\n" + o + i + c + "\n\n" + e.trim() + "\n\n", e = t.converter._dispatch("completeHTMLDocument.after", e, r, t) }), x.subParser("detab", function(e, r, t) { "use strict"; return e = (e = (e = (e = (e = (e = t.converter._dispatch("detab.before", e, r, t)).replace(/\t(?=\t)/g, " ")).replace(/\t/g, "¨A¨B")).replace(/¨B(.+?)¨A/g, function(e, r) { for (var t = r, a = 4 - t.length % 4, n = 0; n < a; n++) t += " "; return t })).replace(/¨A/g, " ")).replace(/¨B/g, ""), e = t.converter._dispatch("detab.after", e, r, t) }), x.subParser("ellipsis", function(e, r, t) { "use strict"; return r.ellipsis ? (e = (e = t.converter._dispatch("ellipsis.before", e, r, t)).replace(/\.\.\./g, "…"), t.converter._dispatch("ellipsis.after", e, r, t)) : e }), x.subParser("emoji", function(e, r, t) { "use strict"; if (!r.emoji) return e; return e = (e = t.converter._dispatch("emoji.before", e, r, t)).replace(/:([\S]+?):/g, function(e, r) { return x.helper.emojis.hasOwnProperty(r) ? x.helper.emojis[r] : e }), e = t.converter._dispatch("emoji.after", e, r, t) }), x.subParser("encodeAmpsAndAngles", function(e, r, t) { "use strict"; return e = (e = (e = (e = (e = t.converter._dispatch("encodeAmpsAndAngles.before", e, r, t)).replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&")).replace(/<(?![a-z\/?$!])/gi, "<")).replace(//g, ">"), e = t.converter._dispatch("encodeAmpsAndAngles.after", e, r, t) }), x.subParser("encodeBackslashEscapes", function(e, r, t) { "use strict"; return e = (e = (e = t.converter._dispatch("encodeBackslashEscapes.before", e, r, t)).replace(/\\(\\)/g, x.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g, x.helper.escapeCharactersCallback), e = t.converter._dispatch("encodeBackslashEscapes.after", e, r, t) }), x.subParser("encodeCode", function(e, r, t) { "use strict"; return e = (e = t.converter._dispatch("encodeCode.before", e, r, t)).replace(/&/g, "&").replace(//g, ">").replace(/([*_{}\[\]\\=~-])/g, x.helper.escapeCharactersCallback), e = t.converter._dispatch("encodeCode.after", e, r, t) }), x.subParser("escapeSpecialCharsWithinTagAttributes", function(e, r, t) { "use strict"; return e = (e = (e = t.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before", e, r, t)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi, function(e) { return e.replace(/(.)<\/?code>(?=.)/g, "$1`").replace(/([\\`*_~=|])/g, x.helper.escapeCharactersCallback) })).replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi, function(e) { return e.replace(/([\\`*_~=|])/g, x.helper.escapeCharactersCallback) }), e = t.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after", e, r, t) }), x.subParser("githubCodeBlocks", function(e, s, o) { "use strict"; return s.ghCodeBlocks ? (e = o.converter._dispatch("githubCodeBlocks.before", e, s, o), e = (e = (e += "¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g, function(e, r, t, a) { var n = s.omitExtraWLInCodeBlocks ? "" : "\n"; return a = x.subParser("encodeCode")(a, s, o), a = "", a = x.subParser("hashBlock")(a, s, o), "\n\n¨G" + (o.ghCodeBlocks.push({ text: e, codeblock: a }) - 1) + "G\n\n" })).replace(/¨0/, ""), o.converter._dispatch("githubCodeBlocks.after", e, s, o)) : e }), x.subParser("hashBlock", function(e, r, t) { "use strict"; return e = (e = t.converter._dispatch("hashBlock.before", e, r, t)).replace(/(^\n+|\n+$)/g, ""), e = "\n\n¨K" + (t.gHtmlBlocks.push(e) - 1) + "K\n\n", e = t.converter._dispatch("hashBlock.after", e, r, t) }), x.subParser("hashCodeTags", function(e, n, s) { "use strict"; e = s.converter._dispatch("hashCodeTags.before", e, n, s); return e = x.helper.replaceRecursiveRegExp(e, function(e, r, t, a) { t = t + x.subParser("encodeCode")(r, n, s) + a; return "¨C" + (s.gHtmlSpans.push(t) - 1) + "C" }, "" + (a = (a = (a = x.subParser("detab")(a, s, o)).replace(/^\n+/g, "")).replace(/\n+$/g, "")) + n + "
]*>", "
", "gim"), e = s.converter._dispatch("hashCodeTags.after", e, n, s) }), x.subParser("hashElement", function(e, r, t) { "use strict"; return function(e, r) { return r = (r = (r = r.replace(/\n\n/g, "\n")).replace(/^\n/, "")).replace(/\n+$/g, ""), r = "\n\n¨K" + (t.gHtmlBlocks.push(r) - 1) + "K\n\n" } }), x.subParser("hashHTMLBlocks", function(e, r, n) { "use strict"; e = n.converter._dispatch("hashHTMLBlocks.before", e, r, n); function t(e, r, t, a) { return -1 !== t.search(/\bmarkdown\b/) && (e = t + n.converter.makeHtml(r) + a), "\n\n¨K" + (n.gHtmlBlocks.push(e) - 1) + "K\n\n" } var a = ["pre", "div", "h1", "h2", "h3", "h4", "h5", "h6", "blockquote", "table", "dl", "ol", "ul", "script", "noscript", "form", "fieldset", "iframe", "math", "style", "section", "header", "footer", "nav", "article", "aside", "address", "audio", "canvas", "figure", "hgroup", "output", "video", "p"]; r.backslashEscapesHTMLTags && (e = e.replace(/\\<(\/?[^>]+?)>/g, function(e, r) { return "<" + r + ">" })); for (var s = 0; s < a.length; ++s) for (var o = new RegExp("^ {0,3}(<" + a[s] + "\\b[^>]*>)", "im"), i = "<" + a[s] + "\\b[^>]*>", u = "" + a[s] + ">"; - 1 !== (l = x.helper.regexIndexOf(e, o));) { var l = x.helper.splitAtIndex(e, l), c = x.helper.replaceRecursiveRegExp(l[1], t, i, u, "im"); if (c === l[1]) break; e = l[0].concat(c) } return e = e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, x.subParser("hashElement")(e, r, n)), e = (e = x.helper.replaceRecursiveRegExp(e, function(e) { return "\n\n¨K" + (n.gHtmlBlocks.push(e) - 1) + "K\n\n" }, "^ {0,3}\x3c!--", "--\x3e", "gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, x.subParser("hashElement")(e, r, n)), e = n.converter._dispatch("hashHTMLBlocks.after", e, r, n) }), x.subParser("hashHTMLSpans", function(e, r, t) { "use strict"; function a(e) { return "¨C" + (t.gHtmlSpans.push(e) - 1) + "C" } return e = (e = (e = (e = (e = t.converter._dispatch("hashHTMLSpans.before", e, r, t)).replace(/<[^>]+?\/>/gi, a)).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g, a)).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g, a)).replace(/<[^>]+?>/gi, a), e = t.converter._dispatch("hashHTMLSpans.after", e, r, t) }), x.subParser("unhashHTMLSpans", function(e, r, t) { "use strict"; e = t.converter._dispatch("unhashHTMLSpans.before", e, r, t); for (var a = 0; a < t.gHtmlSpans.length; ++a) { for (var n = t.gHtmlSpans[a], s = 0; /¨C(\d+)C/.test(n);) { var o = RegExp.$1, n = n.replace("¨C" + o + "C", t.gHtmlSpans[o]); if (10 === s) { console.error("maximum nesting of 10 spans reached!!!"); break }++s } e = e.replace("¨C" + a + "C", n) } return e = t.converter._dispatch("unhashHTMLSpans.after", e, r, t) }), x.subParser("hashPreCodeTags", function(e, n, s) { "use strict"; e = s.converter._dispatch("hashPreCodeTags.before", e, n, s); return e = x.helper.replaceRecursiveRegExp(e, function(e, r, t, a) { t = t + x.subParser("encodeCode")(r, n, s) + a; return "\n\n¨G" + (s.ghCodeBlocks.push({ text: e, codeblock: t }) - 1) + "G\n\n" }, "^ {0,3}]*>\\s*", "gim"), e = s.converter._dispatch("hashPreCodeTags.after", e, n, s) }), x.subParser("headers", function(e, n, s) { "use strict"; e = s.converter._dispatch("headers.before", e, n, s); var o = isNaN(parseInt(n.headerLevelStart)) ? 1 : parseInt(n.headerLevelStart), r = n.smoothLivePreview ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n=+[ \t]*\n+/gm, t = n.smoothLivePreview ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n-+[ \t]*\n+/gm, r = (e = (e = e.replace(r, function(e, r) { var t = x.subParser("spanGamut")(r, n, s), r = n.noHeaderId ? "" : ' id="' + i(r) + '"', r = "]*>", "^ {0,3}
\\s*" + t + " "; return x.subParser("hashBlock")(r, n, s) })).replace(t, function(e, r) { var t = x.subParser("spanGamut")(r, n, s), r = n.noHeaderId ? "" : ' id="' + i(r) + '"', a = o + 1, r = "" + t + " "; return x.subParser("hashBlock")(r, n, s) }), n.requireSpaceBeforeHeadingText ? /^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm : /^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm); function i(e) { var r; return !n.customizedHeaderId || (r = e.match(/\{([^{]+?)}\s*$/)) && r[1] && (e = r[1]), r = e, e = x.helper.isString(n.prefixHeaderId) ? n.prefixHeaderId : !0 === n.prefixHeaderId ? "section-" : "", n.rawPrefixHeaderId || (r = e + r), r = (n.ghCompatibleHeaderId ? r.replace(/ /g, "-").replace(/&/g, "").replace(/¨T/g, "").replace(/¨D/g, "").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g, "") : n.rawHeaderId ? r.replace(/ /g, "-").replace(/&/g, "&").replace(/¨T/g, "¨").replace(/¨D/g, "$").replace(/["']/g, "-") : r.replace(/[^\w]/g, "")).toLowerCase(), n.rawPrefixHeaderId && (r = e + r), s.hashLinkCounts[r] ? r = r + "-" + s.hashLinkCounts[r]++ : s.hashLinkCounts[r] = 1, r } return e = e.replace(r, function(e, r, t) { var a = t, a = (n.customizedHeaderId && (a = t.replace(/\s?\{([^{]+?)}\s*$/, "")), x.subParser("spanGamut")(a, n, s)), t = n.noHeaderId ? "" : ' id="' + i(t) + '"', r = o - 1 + r.length, t = "" + a + " "; return x.subParser("hashBlock")(t, n, s) }), e = s.converter._dispatch("headers.after", e, n, s) }), x.subParser("horizontalRule", function(e, r, t) { "use strict"; e = t.converter._dispatch("horizontalRule.before", e, r, t); var a = x.subParser("hashBlock")("
", r, t); return e = (e = (e = e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm, a)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm, a)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm, a), e = t.converter._dispatch("horizontalRule.after", e, r, t) }), x.subParser("images", function(e, r, d) { "use strict"; function l(e, r, t, a, n, s, u, o) { var i = d.gUrls, l = d.gTitles, c = d.gDimensions; if (t = t.toLowerCase(), o = o || "", -1 < e.search(/\(\s*>? ?(['"].*['"])?\)$/m)) a = ""; else if ("" === a || null === a) { if (a = "#" + (t = "" !== t && null !== t ? t : r.toLowerCase().replace(/ ?\n/g, " ")), x.helper.isUndefined(i[t])) return e; a = i[t], x.helper.isUndefined(l[t]) || (o = l[t]), x.helper.isUndefined(c[t]) || (n = c[t].width, s = c[t].height) } r = r.replace(/"/g, """).replace(x.helper.regexes.asteriskDashAndColon, x.helper.escapeCharactersCallback); e = '" } return e = (e = (e = (e = (e = (e = d.converter._dispatch("images.before", e, r, d)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g, l)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g, function(e, r, t, a, n, s, o, i) { return l(e, r, t, a = a.replace(/\s/g, ""), n, s, 0, i) })).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g, l)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g, l)).replace(/!\[([^\[\]]+)]()()()()()/g, l), e = d.converter._dispatch("images.after", e, r, d) }), x.subParser("italicsAndBold", function(e, r, t) { "use strict"; return e = t.converter._dispatch("italicsAndBold.before", e, r, t), e = r.literalMidWordUnderscores ? (e = (e = e.replace(/\b___(\S[\s\S]*?)___\b/g, function(e, r) { return "" + r + "" })).replace(/\b__(\S[\s\S]*?)__\b/g, function(e, r) { return "" + r + "" })).replace(/\b_(\S[\s\S]*?)_\b/g, function(e, r) { return "" + r + "" }) : (e = (e = e.replace(/___(\S[\s\S]*?)___/g, function(e, r) { return /\S$/.test(r) ? "" + r + "" : e })).replace(/__(\S[\s\S]*?)__/g, function(e, r) { return /\S$/.test(r) ? "" + r + "" : e })).replace(/_([^\s_][\s\S]*?)_/g, function(e, r) { return /\S$/.test(r) ? "" + r + "" : e }), e = r.literalMidWordAsterisks ? (e = (e = e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g, function(e, r, t) { return r + "" + t + "" })).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g, function(e, r, t) { return r + "" + t + "" })).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g, function(e, r, t) { return r + "" + t + "" }) : (e = (e = e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g, function(e, r) { return /\S$/.test(r) ? "" + r + "" : e })).replace(/\*\*(\S[\s\S]*?)\*\*/g, function(e, r) { return /\S$/.test(r) ? "" + r + "" : e })).replace(/\*([^\s*][\s\S]*?)\*/g, function(e, r) { return /\S$/.test(r) ? "" + r + "" : e }), e = t.converter._dispatch("italicsAndBold.after", e, r, t) }), x.subParser("lists", function(e, d, c) { "use strict"; function p(e, r) { c.gListLevel++, e = e.replace(/\n{2,}$/, "\n"); var t = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm, l = /\n[ \t]*\n(?!¨0)/.test(e += "¨0"); return d.disableForced4SpacesIndentedSublists && (t = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm), e = (e = e.replace(t, function(e, r, t, a, n, s, o) { o = o && "" !== o.trim(); var n = x.subParser("outdent")(n, d, c), i = ""; return s && d.tasklists && (i = ' class="task-list-item" style="list-style-type: none;"', n = n.replace(/^[ \t]*\[(x|X| )?]/m, function() { var e = '" })), n = n.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g, function(e) { return "¨A" + e }), n = "
"), o += "
", a.push(o)) } for (n = a.length, s = 0; s < n; s++) { for (var i = "", l = a[s], d = !1; /¨(K|G)(\d+)\1/.test(l);) { var p = RegExp.$1, c = RegExp.$2; i = (i = "K" === p ? t.gHtmlBlocks[c] : d ? x.subParser("encodeCode")(t.ghCodeBlocks[c].text, r, t) : t.ghCodeBlocks[c].codeblock).replace(/\$/g, "$$$$"), l = l.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/, i), /^]*>\s*]*>/.test(l) && (d = !0)
}
a[s] = l
}
return e = (e = (e = a.join("\n")).replace(/^\n+/g, "")).replace(/\n+$/g, ""), t.converter._dispatch("paragraphs.after", e, r, t)
}), x.subParser("runExtension", function(e, r, t, a) {
"use strict";
return e.filter ? r = e.filter(r, a.converter, t) : e.regex && ((a = e.regex) instanceof RegExp || (a = new RegExp(a, "g")), r = r.replace(a, e.replace)), r
}), x.subParser("spanGamut", function(e, r, t) {
"use strict";
return e = t.converter._dispatch("spanGamut.before", e, r, t), e = x.subParser("codeSpans")(e, r, t), e = x.subParser("escapeSpecialCharsWithinTagAttributes")(e, r, t), e = x.subParser("encodeBackslashEscapes")(e, r, t), e = x.subParser("images")(e, r, t), e = x.subParser("anchors")(e, r, t), e = x.subParser("autoLinks")(e, r, t), e = x.subParser("simplifiedAutoLinks")(e, r, t), e = x.subParser("emoji")(e, r, t), e = x.subParser("underline")(e, r, t), e = x.subParser("italicsAndBold")(e, r, t), e = x.subParser("strikethrough")(e, r, t), e = x.subParser("ellipsis")(e, r, t), e = x.subParser("hashHTMLSpans")(e, r, t), e = x.subParser("encodeAmpsAndAngles")(e, r, t), r.simpleLineBreaks ? /\n\n¨K/.test(e) || (e = e.replace(/\n+/g, "
\n")) : e = e.replace(/ +\n/g, "
\n"), e = t.converter._dispatch("spanGamut.after", e, r, t)
}), x.subParser("strikethrough", function(e, t, a) {
"use strict";
return t.strikethrough && (e = (e = a.converter._dispatch("strikethrough.before", e, t, a)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g, function(e, r) {
return r = r, "" + (r = t.simplifiedAutoLink ? x.subParser("simplifiedAutoLinks")(r, t, a) : r) + ""
}), e = a.converter._dispatch("strikethrough.after", e, t, a)), e
}), x.subParser("stripLinkDefinitions", function(i, l, c) {
"use strict";
function e(e, r, t, a, n, s, o) {
return r = r.toLowerCase(), i.toLowerCase().split(r).length - 1 < 2 ? e : (t.match(/^data:.+?\/.+?;base64,/) ? c.gUrls[r] = t.replace(/\s/g, "") : c.gUrls[r] = x.subParser("encodeAmpsAndAngles")(t, l, c), s ? s + o : (o && (c.gTitles[r] = o.replace(/"|'/g, """)), l.parseImgDimensions && a && n && (c.gDimensions[r] = {
width: a,
height: n
}), ""))
}
return i = (i = (i = (i += "¨0").replace(/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm, e)).replace(/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm, e)).replace(/¨0/, "")
}), x.subParser("tables", function(e, y, P) {
"use strict";
if (!y.tables) return e;
function r(u) {
for (var e = u.split("\n"), r = 0; r < e.length; ++r) /^ {0,3}\|/.test(e[r]) && (e[r] = e[r].replace(/^ {0,3}\|/, "")), /\|[ \t]*$/.test(e[r]) && (e[r] = e[r].replace(/\|[ \t]*$/, "")), e[r] = x.subParser("codeSpans")(e[r], y, P);
var t, a, d, n, p, h = e[0].split("|").map(function(e) {
return e.trim()
}),
_ = e[1].split("|").map(function(e) {
return e.trim()
}),
s = [],
g = [],
o = [],
m = [];
for (e.shift(), e.shift(), r = 0; r < e.length; ++r) "" !== e[r].trim() && s.push(e[r].split("|").map(function(e) {
return e.trim()
}));
if (h.length < _.length) return u;
for (r = 0; r < _.length; ++r) o.push((t = _[r], /^:[ \t]*--*$/.test(t) ? ' style="text-align:left;"' : /^--*[ \t]*:[ \t]*$/.test(t) ? ' style="text-align:right;"' : /^:[ \t]*--*[ \t]*:$/.test(t) ? ' style="text-align:center;"' : ""));
for (r = 0; r < h.length; ++r) x.helper.isUndefined(o[r]) && (o[r] = ""), g.push((a = h[r], d = o[r], void 0, n = "", a = a.trim(), "" + (a = x.subParser("spanGamut")(a, y, P)) + " \n"));
for (r = 0; r < s.length; ++r) {
for (var f = [], i = 0; i < g.length; ++i) x.helper.isUndefined(s[r][i]), f.push((p = s[r][i], "" + x.subParser("spanGamut")(p, y, P) + " \n"));
m.push(f)
}
for (var b = g, w = m, l = "\n\n\n", k = b.length, c = 0; c < k; ++c) l += b[c];
for (l += " \n\n\n", c = 0; c < w.length; ++c) {
l += "\n";
for (var v = 0; v < k; ++v) l += w[c][v];
l += " \n"
}
return l += "\n
\n"
}
return e = (e = (e = (e = P.converter._dispatch("tables.before", e, y, P)).replace(/\\(\|)/g, x.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm, r)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm, r), e = P.converter._dispatch("tables.after", e, y, P)
}), x.subParser("underline", function(e, r, t) {
"use strict";
return r.underline ? (e = t.converter._dispatch("underline.before", e, r, t), e = (e = r.literalMidWordUnderscores ? (e = e.replace(/\b___(\S[\s\S]*?)___\b/g, function(e, r) {
return "" + r + ""
})).replace(/\b__(\S[\s\S]*?)__\b/g, function(e, r) {
return "" + r + ""
}) : (e = e.replace(/___(\S[\s\S]*?)___/g, function(e, r) {
return /\S$/.test(r) ? "" + r + "" : e
})).replace(/__(\S[\s\S]*?)__/g, function(e, r) {
return /\S$/.test(r) ? "" + r + "" : e
})).replace(/(_)/g, x.helper.escapeCharactersCallback), t.converter._dispatch("underline.after", e, r, t)) : e
}), x.subParser("unescapeSpecialChars", function(e, r, t) {
"use strict";
return e = (e = t.converter._dispatch("unescapeSpecialChars.before", e, r, t)).replace(/¨E(\d+)E/g, function(e, r) {
r = parseInt(r);
return String.fromCharCode(r)
}), e = t.converter._dispatch("unescapeSpecialChars.after", e, r, t)
}), x.subParser("makeMarkdown.blockquote", function(e, r) {
"use strict";
var t = "";
if (e.hasChildNodes())
for (var a = e.childNodes, n = a.length, s = 0; s < n; ++s) {
var o = x.subParser("makeMarkdown.node")(a[s], r);
"" !== o && (t += o)
}
return t = "> " + (t = t.trim()).split("\n").join("\n> ")
}), x.subParser("makeMarkdown.codeBlock", function(e, r) {
"use strict";
var t = e.getAttribute("language"),
e = e.getAttribute("precodenum");
return "```" + t + "\n" + r.preList[e] + "\n```"
}), x.subParser("makeMarkdown.codeSpan", function(e) {
"use strict";
return "`" + e.innerHTML + "`"
}), x.subParser("makeMarkdown.emphasis", function(e, r) {
"use strict";
var t = "";
if (e.hasChildNodes()) {
t += "*";
for (var a = e.childNodes, n = a.length, s = 0; s < n; ++s) t += x.subParser("makeMarkdown.node")(a[s], r);
t += "*"
}
return t
}), x.subParser("makeMarkdown.header", function(e, r, t) {
"use strict";
var t = new Array(t + 1).join("#"),
a = "";
if (e.hasChildNodes())
for (var a = t + " ", n = e.childNodes, s = n.length, o = 0; o < s; ++o) a += x.subParser("makeMarkdown.node")(n[o], r);
return a
}), x.subParser("makeMarkdown.hr", function() {
"use strict";
return "---"
}), x.subParser("makeMarkdown.image", function(e) {
"use strict";
var r = "";
return e.hasAttribute("src") && (r = (r += "![" + e.getAttribute("alt") + "](") + "<" + e.getAttribute("src") + ">", e.hasAttribute("width") && e.hasAttribute("height") && (r += " =" + e.getAttribute("width") + "x" + e.getAttribute("height")), e.hasAttribute("title") && (r += ' "' + e.getAttribute("title") + '"'), r += ")"), r
}), x.subParser("makeMarkdown.links", function(e, r) {
"use strict";
var t = "";
if (e.hasChildNodes() && e.hasAttribute("href")) {
for (var a = e.childNodes, n = a.length, t = "[", s = 0; s < n; ++s) t += x.subParser("makeMarkdown.node")(a[s], r);
t = (t += "](") + ("<" + e.getAttribute("href") + ">"), e.hasAttribute("title") && (t += ' "' + e.getAttribute("title") + '"'), t += ")"
}
return t
}), x.subParser("makeMarkdown.list", function(e, r, t) {
"use strict";
var a = "";
if (!e.hasChildNodes()) return "";
for (var n = e.childNodes, s = n.length, o = e.getAttribute("start") || 1, i = 0; i < s; ++i) void 0 !== n[i].tagName && "li" === n[i].tagName.toLowerCase() && (a += ("ol" === t ? o.toString() + ". " : "- ") + x.subParser("makeMarkdown.listItem")(n[i], r), ++o);
return (a += "\n\x3c!-- --\x3e\n").trim()
}), x.subParser("makeMarkdown.listItem", function(e, r) {
"use strict";
for (var t = "", a = e.childNodes, n = a.length, s = 0; s < n; ++s) t += x.subParser("makeMarkdown.node")(a[s], r);
return /\n$/.test(t) ? t = t.split("\n").join("\n ").replace(/^ {4}$/gm, "").replace(/\n\n+/g, "\n\n") : t += "\n", t
}), x.subParser("makeMarkdown.node", function(e, r, t) {
"use strict";
t = t || !1;
var a = "";
if (3 === e.nodeType) return x.subParser("makeMarkdown.txt")(e, r);
if (8 === e.nodeType) return "\x3c!--" + e.data + "--\x3e\n\n";
if (1 !== e.nodeType) return "";
switch (e.tagName.toLowerCase()) {
case "h1":
t || (a = x.subParser("makeMarkdown.header")(e, r, 1) + "\n\n");
break;
case "h2":
t || (a = x.subParser("makeMarkdown.header")(e, r, 2) + "\n\n");
break;
case "h3":
t || (a = x.subParser("makeMarkdown.header")(e, r, 3) + "\n\n");
break;
case "h4":
t || (a = x.subParser("makeMarkdown.header")(e, r, 4) + "\n\n");
break;
case "h5":
t || (a = x.subParser("makeMarkdown.header")(e, r, 5) + "\n\n");
break;
case "h6":
t || (a = x.subParser("makeMarkdown.header")(e, r, 6) + "\n\n");
break;
case "p":
t || (a = x.subParser("makeMarkdown.paragraph")(e, r) + "\n\n");
break;
case "blockquote":
t || (a = x.subParser("makeMarkdown.blockquote")(e, r) + "\n\n");
break;
case "hr":
t || (a = x.subParser("makeMarkdown.hr")(e, r) + "\n\n");
break;
case "ol":
t || (a = x.subParser("makeMarkdown.list")(e, r, "ol") + "\n\n");
break;
case "ul":
t || (a = x.subParser("makeMarkdown.list")(e, r, "ul") + "\n\n");
break;
case "precode":
t || (a = x.subParser("makeMarkdown.codeBlock")(e, r) + "\n\n");
break;
case "pre":
t || (a = x.subParser("makeMarkdown.pre")(e, r) + "\n\n");
break;
case "table":
t || (a = x.subParser("makeMarkdown.table")(e, r) + "\n\n");
break;
case "code":
a = x.subParser("makeMarkdown.codeSpan")(e, r);
break;
case "em":
case "i":
a = x.subParser("makeMarkdown.emphasis")(e, r);
break;
case "strong":
case "b":
a = x.subParser("makeMarkdown.strong")(e, r);
break;
case "del":
a = x.subParser("makeMarkdown.strikethrough")(e, r);
break;
case "a":
a = x.subParser("makeMarkdown.links")(e, r);
break;
case "img":
a = x.subParser("makeMarkdown.image")(e, r);
break;
default:
a = e.outerHTML + "\n\n"
}
return a
}), x.subParser("makeMarkdown.paragraph", function(e, r) {
"use strict";
var t = "";
if (e.hasChildNodes())
for (var a = e.childNodes, n = a.length, s = 0; s < n; ++s) t += x.subParser("makeMarkdown.node")(a[s], r);
return t = t.trim()
}), x.subParser("makeMarkdown.pre", function(e, r) {
"use strict";
e = e.getAttribute("prenum");
return "" + r.preList[e] + "
"
}), x.subParser("makeMarkdown.strikethrough", function(e, r) {
"use strict";
var t = "";
if (e.hasChildNodes()) {
t += "~~";
for (var a = e.childNodes, n = a.length, s = 0; s < n; ++s) t += x.subParser("makeMarkdown.node")(a[s], r);
t += "~~"
}
return t
}), x.subParser("makeMarkdown.strong", function(e, r) {
"use strict";
var t = "";
if (e.hasChildNodes()) {
t += "**";
for (var a = e.childNodes, n = a.length, s = 0; s < n; ++s) t += x.subParser("makeMarkdown.node")(a[s], r);
t += "**"
}
return t
}), x.subParser("makeMarkdown.table", function(e, r) {
"use strict";
for (var t = "", a = [
[],
[]
], n = e.querySelectorAll("thead>tr>th"), s = e.querySelectorAll("tbody>tr"), o = 0; o < n.length; ++o) {
var u = x.subParser("makeMarkdown.tableCell")(n[o], r),
i = "---";
if (n[o].hasAttribute("style")) switch (n[o].getAttribute("style").toLowerCase().replace(/\s/g, "")) {
case "text-align:left;":
i = ":---";
break;
case "text-align:right;":
i = "---:";
break;
case "text-align:center;":
i = ":---:"
}
a[0][o] = u.trim(), a[1][o] = i
}
for (o = 0; o < s.length; ++o)
for (var d = a.push([]) - 1, p = s[o].getElementsByTagName("td"), l = 0; l < n.length; ++l) {
var h = " ";
void 0 !== p[l] && (h = x.subParser("makeMarkdown.tableCell")(p[l], r)), a[d].push(h)
}
var c = 3;
for (o = 0; o < a.length; ++o)
for (l = 0; l < a[o].length; ++l) {
var _ = a[o][l].length;
c < _ && (c = _)
}
for (o = 0; o < a.length; ++o) {
for (l = 0; l < a[o].length; ++l) 1 === o ? ":" === a[o][l].slice(-1) ? a[o][l] = x.helper.padEnd(a[o][l].slice(-1), c - 1, "-") + ":" : a[o][l] = x.helper.padEnd(a[o][l], c, "-") : a[o][l] = x.helper.padEnd(a[o][l], c);
t += "| " + a[o].join(" | ") + " |\n"
}
return t.trim()
}), x.subParser("makeMarkdown.tableCell", function(e, r) {
"use strict";
var t = "";
if (!e.hasChildNodes()) return "";
for (var a = e.childNodes, n = a.length, s = 0; s < n; ++s) t += x.subParser("makeMarkdown.node")(a[s], r, !0);
return t.trim()
}), x.subParser("makeMarkdown.txt", function(e) {
"use strict";
e = e.nodeValue;
return e = (e = e.replace(/ +/g, " ")).replace(/¨NBSP;/g, " "), e = (e = (e = (e = (e = (e = (e = (e = (e = x.helper.unescapeHTMLEntities(e)).replace(/([*_~|`])/g, "\\$1")).replace(/^(\s*)>/g, "\\$1>")).replace(/^#/gm, "\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/, "$1\\$2$3")).replace(/^( {0,3}\d+)\./gm, "$1\\.")).replace(/^( {0,3})([+-])/gm, "$1\\$2")).replace(/]([\s]*)\(/g, "\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm, "\\[$1]:")
});
"function" == typeof define && define.amd ? define(function() {
"use strict";
return x
}) : "undefined" != typeof module && module.exports ? module.exports = x : this.showdown = x
}.call(this);
//# sourceMappingURL=showdown.min.js.map