Files
pgsql-jellyfin/wwwroot/node_modules.markdown-it.ab3f9d08cb52d5a9c2d4.chunk.js
T
2026-07-08 12:44:58 -04:00

1 line
48 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[28336],{47593:function(e,t,r){r.d(t,{A:function(){return et}});var n={};r.r(n),r.d(n,{arrayReplaceAt:function(){return k},assign:function(){return d},escapeHtml:function(){return w},escapeRE:function(){return L},fromCodePoint:function(){return m},has:function(){return f},isMdAsciiPunct:function(){return $},isPunctChar:function(){return E},isSpace:function(){return z},isString:function(){return u},isValidEntityCode:function(){return v},isWhiteSpace:function(){return T},lib:function(){return q},normalizeReference:function(){return O},unescapeAll:function(){return y},unescapeMd:function(){return C}});var i={};r.r(i),r.d(i,{parseLinkDestination:function(){return R},parseLinkLabel:function(){return P},parseLinkTitle:function(){return j}}),r(24776),r(14382),r(84734),r(89336),r(83810),r(78557),r(95021),r(46968),r(23630),r(29305),r(32733),r(84701),r(44962),r(96054),r(646),r(73687),r(83994),r(93062),r(82367);var s=r(15603),o=r(47692),a=r(95131),c=r(74546),l=r(86942);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function u(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)}var p=Object.prototype.hasOwnProperty;function f(e,t){return p.call(e,t)}function d(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){if(t){if("object"!==h(t))throw new TypeError(t+"must be object");Object.keys(t).forEach((function(r){e[r]=t[r]}))}})),e}function k(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function v(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||!(65535&~e&&65534!=(65535&e))||e>=0&&e<=8||11===e||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function m(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}var g=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,b=new RegExp(g.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),_=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function C(e){return e.indexOf("\\")<0?e:e.replace(g,"$1")}function y(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(b,(function(e,t,r){return t||function(e,t){if(35===t.charCodeAt(0)&&_.test(t)){var r="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return v(r)?m(r):e}var n=(0,l.Gz)(e);return n!==e?n:e}(e,r)}))}var A=/[&<>"]/,x=/[&<>"]/g,M={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function S(e){return M[e]}function w(e){return A.test(e)?e.replace(x,S):e}var I=/[.?*+^$[\]\\(){}|-]/g;function L(e){return e.replace(I,"\\$&")}function z(e){switch(e){case 9:case 32:return!0}return!1}function T(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function E(e){return o.A.test(e)||a.A.test(e)}function $(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function O(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}var q={mdurl:s,ucmicro:c};function P(e,t,r){var n,i,s,o,a=e.posMax,c=e.pos;for(e.pos=t+1,n=1;e.pos<a;){if(93===(s=e.src.charCodeAt(e.pos))&&0==--n){i=!0;break}if(o=e.pos,e.md.inline.skipToken(e),91===s)if(o===e.pos-1)n++;else if(r)return e.pos=c,-1}var l=-1;return i&&(l=e.pos),e.pos=c,l}function R(e,t,r){var n,i=t,s={ok:!1,pos:0,str:""};if(60===e.charCodeAt(i)){for(i++;i<r;){if(10===(n=e.charCodeAt(i)))return s;if(60===n)return s;if(62===n)return s.pos=i+1,s.str=y(e.slice(t+1,i)),s.ok=!0,s;92===n&&i+1<r?i+=2:i++}return s}for(var o=0;i<r&&32!==(n=e.charCodeAt(i))&&!(n<32||127===n);)if(92===n&&i+1<r){if(32===e.charCodeAt(i+1))break;i+=2}else{if(40===n&&++o>32)return s;if(41===n){if(0===o)break;o--}i++}return t===i||0!==o||(s.str=y(e.slice(t,i)),s.pos=i,s.ok=!0),s}function j(e,t,r,n){var i,s=t,o={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)o.str=n.str,o.marker=n.marker;else{if(s>=r)return o;var a=e.charCodeAt(s);if(34!==a&&39!==a&&40!==a)return o;t++,s++,40===a&&(a=41),o.marker=a}for(;s<r;){if((i=e.charCodeAt(s))===o.marker)return o.pos=s+1,o.str+=y(e.slice(t,s)),o.ok=!0,o;if(40===i&&41===o.marker)return o;92===i&&s+1<r&&s++,s++}return o.can_continue=!0,o.str+=y(e.slice(t,s)),o}r(11810);var Z={};function D(){this.rules=d({},Z)}Z.code_inline=function(e,t,r,n,i){var s=e[t];return"<code"+i.renderAttrs(s)+">"+w(s.content)+"</code>"},Z.code_block=function(e,t,r,n,i){var s=e[t];return"<pre"+i.renderAttrs(s)+"><code>"+w(e[t].content)+"</code></pre>\n"},Z.fence=function(e,t,r,n,i){var s,o=e[t],a=o.info?y(o.info).trim():"",c="",l="";if(a){var h=a.split(/(\s+)/g);c=h[0],l=h.slice(2).join("")}if(0===(s=r.highlight&&r.highlight(o.content,c,l)||w(o.content)).indexOf("<pre"))return s+"\n";if(a){var u=o.attrIndex("class"),p=o.attrs?o.attrs.slice():[];u<0?p.push(["class",r.langPrefix+c]):(p[u]=p[u].slice(),p[u][1]+=" "+r.langPrefix+c);var f={attrs:p};return"<pre><code".concat(i.renderAttrs(f),">").concat(s,"</code></pre>\n")}return"<pre><code".concat(i.renderAttrs(o),">").concat(s,"</code></pre>\n")},Z.image=function(e,t,r,n,i){var s=e[t];return s.attrs[s.attrIndex("alt")][1]=i.renderInlineAsText(s.children,r,n),i.renderToken(e,t,r)},Z.hardbreak=function(e,t,r){return r.xhtmlOut?"<br />\n":"<br>\n"},Z.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?"<br />\n":"<br>\n":"\n"},Z.text=function(e,t){return w(e[t].content)},Z.html_block=function(e,t){return e[t].content},Z.html_inline=function(e,t){return e[t].content},D.prototype.renderAttrs=function(e){var t,r,n;if(!e.attrs)return"";for(n="",t=0,r=e.attrs.length;t<r;t++)n+=" "+w(e.attrs[t][0])+'="'+w(e.attrs[t][1])+'"';return n},D.prototype.renderToken=function(e,t,r){var n=e[t],i="";if(n.hidden)return"";n.block&&-1!==n.nesting&&t&&e[t-1].hidden&&(i+="\n"),i+=(-1===n.nesting?"</":"<")+n.tag,i+=this.renderAttrs(n),0===n.nesting&&r.xhtmlOut&&(i+=" /");var s=!1;if(n.block&&(s=!0,1===n.nesting&&t+1<e.length)){var o=e[t+1];("inline"===o.type||o.hidden||-1===o.nesting&&o.tag===n.tag)&&(s=!1)}return i+(s?">\n":">")},D.prototype.renderInline=function(e,t,r){for(var n="",i=this.rules,s=0,o=e.length;s<o;s++){var a=e[s].type;void 0!==i[a]?n+=i[a](e,s,t,r,this):n+=this.renderToken(e,s,t)}return n},D.prototype.renderInlineAsText=function(e,t,r){for(var n="",i=0,s=e.length;i<s;i++)switch(e[i].type){case"text":case"html_inline":case"html_block":n+=e[i].content;break;case"image":n+=this.renderInlineAsText(e[i].children,t,r);break;case"softbreak":case"hardbreak":n+="\n"}return n},D.prototype.render=function(e,t,r){for(var n="",i=this.rules,s=0,o=e.length;s<o;s++){var a=e[s].type;"inline"===a?n+=this.renderInline(e[s].children,t,r):void 0!==i[a]?n+=i[a](e,s,t,r,this):n+=this.renderToken(e,s,t,r)}return n};var N=D;function B(){this.__rules__=[],this.__cache__=null}r(74576),B.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},B.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(r){r.enabled&&(t&&r.alt.indexOf(t)<0||e.__cache__[t].push(r.fn))}))}))},B.prototype.at=function(e,t,r){var n=this.__find__(e),i=r||{};if(-1===n)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=i.alt||[],this.__cache__=null},B.prototype.before=function(e,t,r,n){var i=this.__find__(e),s=n||{};if(-1===i)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:r,alt:s.alt||[]}),this.__cache__=null},B.prototype.after=function(e,t,r,n){var i=this.__find__(e),s=n||{};if(-1===i)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:r,alt:s.alt||[]}),this.__cache__=null},B.prototype.push=function(e,t,r){var n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null},B.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var r=[];return e.forEach((function(e){var n=this.__find__(e);if(n<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,r.push(e)}),this),this.__cache__=null,r},B.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},B.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var r=[];return e.forEach((function(e){var n=this.__find__(e);if(n<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,r.push(e)}),this),this.__cache__=null,r},B.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]};var G=B;function W(e,t,r){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}r(86584),W.prototype.attrIndex=function(e){if(!this.attrs)return-1;for(var t=this.attrs,r=0,n=t.length;r<n;r++)if(t[r][0]===e)return r;return-1},W.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},W.prototype.attrSet=function(e,t){var r=this.attrIndex(e),n=[e,t];r<0?this.attrPush(n):this.attrs[r]=n},W.prototype.attrGet=function(e){var t=this.attrIndex(e),r=null;return t>=0&&(r=this.attrs[t][1]),r},W.prototype.attrJoin=function(e,t){var r=this.attrIndex(e);r<0?this.attrPush([e,t]):this.attrs[r][1]=this.attrs[r][1]+" "+t};var F=W;function U(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}U.prototype.Token=F;var H=U,J=/\r\n?|\n/g,V=/\0/g;function K(e){return/^<\/a\s*>/i.test(e)}r(53819);var Q=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,X=/\((c|tm|r)\)/i,Y=/\((c|tm|r)\)/gi,ee={c:"©",r:"®",tm:"™"};function te(e,t){return ee[t.toLowerCase()]}function re(e){for(var t=0,r=e.length-1;r>=0;r--){var n=e[r];"text"!==n.type||t||(n.content=n.content.replace(Y,te)),"link_open"===n.type&&"auto"===n.info&&t--,"link_close"===n.type&&"auto"===n.info&&t++}}function ne(e){for(var t=0,r=e.length-1;r>=0;r--){var n=e[r];"text"!==n.type||t||Q.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1")),"link_open"===n.type&&"auto"===n.info&&t--,"link_close"===n.type&&"auto"===n.info&&t++}}var ie=/['"]/,se=/['"]/g;function oe(e,t,r){return e.slice(0,t)+r+e.slice(t+1)}function ae(e,t){for(var r,n=[],i=0;i<e.length;i++){var s=e[i],o=e[i].level;for(r=n.length-1;r>=0&&!(n[r].level<=o);r--);if(n.length=r+1,"text"===s.type){var a=s.content,c=0,l=a.length;e:for(;c<l;){se.lastIndex=c;var h=se.exec(a);if(!h)break;var u=!0,p=!0;c=h.index+1;var f="'"===h[0],d=32;if(h.index-1>=0)d=a.charCodeAt(h.index-1);else for(r=i-1;r>=0&&"softbreak"!==e[r].type&&"hardbreak"!==e[r].type;r--)if(e[r].content){d=e[r].content.charCodeAt(e[r].content.length-1);break}var k=32;if(c<l)k=a.charCodeAt(c);else for(r=i+1;r<e.length&&"softbreak"!==e[r].type&&"hardbreak"!==e[r].type;r++)if(e[r].content){k=e[r].content.charCodeAt(0);break}var v=$(d)||E(String.fromCharCode(d)),m=$(k)||E(String.fromCharCode(k)),g=T(d),b=T(k);if(b?u=!1:m&&(g||v||(u=!1)),g?p=!1:v&&(b||m||(p=!1)),34===k&&'"'===h[0]&&d>=48&&d<=57&&(p=u=!1),u&&p&&(u=v,p=m),u||p){if(p)for(r=n.length-1;r>=0;r--){var _=n[r];if(n[r].level<o)break;if(_.single===f&&n[r].level===o){_=n[r];var C=void 0,y=void 0;f?(C=t.md.options.quotes[2],y=t.md.options.quotes[3]):(C=t.md.options.quotes[0],y=t.md.options.quotes[1]),s.content=oe(s.content,h.index,y),e[_.token].content=oe(e[_.token].content,_.pos,C),c+=y.length-1,_.token===i&&(c+=C.length-1),l=(a=s.content).length,n.length=r;continue e}}u?n.push({token:i,pos:h.index,single:f,level:o}):p&&f&&(s.content=oe(s.content,h.index,""))}else f&&(s.content=oe(s.content,h.index,""))}}}}var ce=[["normalize",function(e){var t;t=(t=e.src.replace(J,"\n")).replace(V,""),e.src=t}],["block",function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function(e){for(var t=e.tokens,r=0,n=t.length;r<n;r++){var i=t[r];"inline"===i.type&&e.md.inline.parse(i.content,e.md,e.env,i.children)}}],["linkify",function(e){var t,r=e.tokens;if(e.md.options.linkify)for(var n=0,i=r.length;n<i;n++)if("inline"===r[n].type&&e.md.linkify.pretest(r[n].content))for(var s=r[n].children,o=0,a=s.length-1;a>=0;a--){var c=s[a];if("link_close"!==c.type){if("html_inline"===c.type&&(t=c.content,/^<a[>\s]/i.test(t)&&o>0&&o--,K(c.content)&&o++),!(o>0)&&"text"===c.type&&e.md.linkify.test(c.content)){var l=c.content,h=e.md.linkify.match(l),u=[],p=c.level,f=0;h.length>0&&0===h[0].index&&a>0&&"text_special"===s[a-1].type&&(h=h.slice(1));for(var d=0;d<h.length;d++){var v=h[d].url,m=e.md.normalizeLink(v);if(e.md.validateLink(m)){var g=h[d].text;g=h[d].schema?"mailto:"!==h[d].schema||/^mailto:/i.test(g)?e.md.normalizeLinkText(g):e.md.normalizeLinkText("mailto:"+g).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+g).replace(/^http:\/\//,"");var b=h[d].index;if(b>f){var _=new e.Token("text","",0);_.content=l.slice(f,b),_.level=p,u.push(_)}var C=new e.Token("link_open","a",1);C.attrs=[["href",m]],C.level=p++,C.markup="linkify",C.info="auto",u.push(C);var y=new e.Token("text","",0);y.content=g,y.level=p,u.push(y);var A=new e.Token("link_close","a",-1);A.level=--p,A.markup="linkify",A.info="auto",u.push(A),f=h[d].lastIndex}}if(f<l.length){var x=new e.Token("text","",0);x.content=l.slice(f),x.level=p,u.push(x)}r[n].children=s=k(s,a,u)}}else for(a--;s[a].level!==c.level&&"link_open"!==s[a].type;)a--}}],["replacements",function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(X.test(e.tokens[t].content)&&re(e.tokens[t].children),Q.test(e.tokens[t].content)&&ne(e.tokens[t].children))}],["smartquotes",function(e){if(e.md.options.typographer)for(var t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&ie.test(e.tokens[t].content)&&ae(e.tokens[t].children,e)}],["text_join",function(e){for(var t,r,n=e.tokens,i=n.length,s=0;s<i;s++)if("inline"===n[s].type){var o=n[s].children,a=o.length;for(t=0;t<a;t++)"text_special"===o[t].type&&(o[t].type="text");for(t=r=0;t<a;t++)"text"===o[t].type&&t+1<a&&"text"===o[t+1].type?o[t+1].content=o[t].content+o[t+1].content:(t!==r&&(o[r]=o[t]),r++);t!==r&&(o.length=r)}}]];function le(){this.ruler=new G;for(var e=0;e<ce.length;e++)this.ruler.push(ce[e][0],ce[e][1])}le.prototype.process=function(e){for(var t=this.ruler.getRules(""),r=0,n=t.length;r<n;r++)t[r](e)},le.prototype.State=H;var he=le;function ue(e,t,r,n){this.src=e,this.md=t,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;for(var i=this.src,s=0,o=0,a=0,c=0,l=i.length,h=!1;o<l;o++){var u=i.charCodeAt(o);if(!h){if(z(u)){a++,9===u?c+=4-c%4:c++;continue}h=!0}10!==u&&o!==l-1||(10!==u&&o++,this.bMarks.push(s),this.eMarks.push(o),this.tShift.push(a),this.sCount.push(c),this.bsCount.push(0),h=!1,a=0,c=0,s=o+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}ue.prototype.push=function(e,t,r){var n=new F(e,t,r);return n.block=!0,r<0&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n},ue.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},ue.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},ue.prototype.skipSpaces=function(e){for(var t=this.src.length;e<t&&z(this.src.charCodeAt(e));e++);return e},ue.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!z(this.src.charCodeAt(--e)))return e+1;return e},ue.prototype.skipChars=function(e,t){for(var r=this.src.length;e<r&&this.src.charCodeAt(e)===t;e++);return e},ue.prototype.skipCharsBack=function(e,t,r){if(e<=r)return e;for(;e>r;)if(t!==this.src.charCodeAt(--e))return e+1;return e},ue.prototype.getLines=function(e,t,r,n){if(e>=t)return"";for(var i=new Array(t-e),s=0,o=e;o<t;o++,s++){var a,c=0,l=this.bMarks[o],h=l;for(a=o+1<t||n?this.eMarks[o]+1:this.eMarks[o];h<a&&c<r;){var u=this.src.charCodeAt(h);if(z(u))9===u?c+=4-(c+this.bsCount[o])%4:c++;else{if(!(h-l<this.tShift[o]))break;c++}h++}i[s]=c>r?new Array(c-r+1).join(" ")+this.src.slice(h,a):this.src.slice(h,a)}return i.join("")},ue.prototype.Token=F;var pe=ue;function fe(e,t){var r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(r,n)}function de(e){for(var t=[],r=e.length,n=0,i=e.charCodeAt(n),s=!1,o=0,a="";n<r;)124===i&&(s?(a+=e.substring(o,n-1),o=n):(t.push(a+e.substring(o,n)),a="",o=n+1)),s=92===i,n++,i=e.charCodeAt(n);return t.push(a+e.substring(o)),t}function ke(e,t){var r=e.eMarks[t],n=e.bMarks[t]+e.tShift[t],i=e.src.charCodeAt(n++);return 42!==i&&45!==i&&43!==i||n<r&&!z(e.src.charCodeAt(n))?-1:n}function ve(e,t){var r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t],i=r;if(i+1>=n)return-1;var s=e.src.charCodeAt(i++);if(s<48||s>57)return-1;for(;;){if(i>=n)return-1;if(!((s=e.src.charCodeAt(i++))>=48&&s<=57)){if(41===s||46===s)break;return-1}if(i-r>=10)return-1}return i<n&&!z(s=e.src.charCodeAt(i))?-1:i}r(94);var me="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",ge="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",be=new RegExp("^(?:"+me+"|"+ge+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),_e=new RegExp("^(?:"+me+"|"+ge+")"),Ce=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"].join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(_e.source+"\\s*$"),/^$/,!1]],ye=[["table",function(e,t,r,n){if(t+2>r)return!1;var i=t+1;if(e.sCount[i]<e.blkIndent)return!1;if(e.sCount[i]-e.blkIndent>=4)return!1;var s=e.bMarks[i]+e.tShift[i];if(s>=e.eMarks[i])return!1;var o=e.src.charCodeAt(s++);if(124!==o&&45!==o&&58!==o)return!1;if(s>=e.eMarks[i])return!1;var a=e.src.charCodeAt(s++);if(124!==a&&45!==a&&58!==a&&!z(a))return!1;if(45===o&&z(a))return!1;for(;s<e.eMarks[i];){var c=e.src.charCodeAt(s);if(124!==c&&45!==c&&58!==c&&!z(c))return!1;s++}for(var l=fe(e,t+1),h=l.split("|"),u=[],p=0;p<h.length;p++){var f=h[p].trim();if(!f){if(0===p||p===h.length-1)continue;return!1}if(!/^:?-+:?$/.test(f))return!1;58===f.charCodeAt(f.length-1)?u.push(58===f.charCodeAt(0)?"center":"right"):58===f.charCodeAt(0)?u.push("left"):u.push("")}if(-1===(l=fe(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;(h=de(l)).length&&""===h[0]&&h.shift(),h.length&&""===h[h.length-1]&&h.pop();var d=h.length;if(0===d||d!==u.length)return!1;if(n)return!0;var k=e.parentType;e.parentType="table";var v,m=e.md.block.ruler.getRules("blockquote"),g=[t,0];e.push("table_open","table",1).map=g,e.push("thead_open","thead",1).map=[t,t+1],e.push("tr_open","tr",1).map=[t,t+1];for(var b=0;b<h.length;b++){var _=e.push("th_open","th",1);u[b]&&(_.attrs=[["style","text-align:"+u[b]]]);var C=e.push("inline","",0);C.content=h[b].trim(),C.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);var y=0;for(i=t+2;i<r&&!(e.sCount[i]<e.blkIndent);i++){for(var A=!1,x=0,M=m.length;x<M;x++)if(m[x](e,i,r,!0)){A=!0;break}if(A)break;if(!(l=fe(e,i).trim()))break;if(e.sCount[i]-e.blkIndent>=4)break;if((h=de(l)).length&&""===h[0]&&h.shift(),h.length&&""===h[h.length-1]&&h.pop(),(y+=d-h.length)>65536)break;i===t+2&&(e.push("tbody_open","tbody",1).map=v=[t+2,0]),e.push("tr_open","tr",1).map=[i,i+1];for(var S=0;S<d;S++){var w=e.push("td_open","td",1);u[S]&&(w.attrs=[["style","text-align:"+u[S]]]);var I=e.push("inline","",0);I.content=h[S]?h[S].trim():"",I.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return v&&(e.push("tbody_close","tbody",-1),v[1]=i),e.push("table_close","table",-1),g[1]=i,e.parentType=k,e.line=i,!0},["paragraph","reference"]],["code",function(e,t,r){if(e.sCount[t]-e.blkIndent<4)return!1;for(var n=t+1,i=n;n<r;)if(e.isEmpty(n))n++;else{if(!(e.sCount[n]-e.blkIndent>=4))break;i=++n}e.line=i;var s=e.push("code_block","code",0);return s.content=e.getLines(t,i,4+e.blkIndent,!1)+"\n",s.map=[t,e.line],!0}],["fence",function(e,t,r,n){var i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(i+3>s)return!1;var o=e.src.charCodeAt(i);if(126!==o&&96!==o)return!1;var a=i,c=(i=e.skipChars(i,o))-a;if(c<3)return!1;var l=e.src.slice(a,i),h=e.src.slice(i,s);if(96===o&&h.indexOf(String.fromCharCode(o))>=0)return!1;if(n)return!0;for(var u=t,p=!1;!(++u>=r||(i=a=e.bMarks[u]+e.tShift[u])<(s=e.eMarks[u])&&e.sCount[u]<e.blkIndent);)if(e.src.charCodeAt(i)===o&&!(e.sCount[u]-e.blkIndent>=4||(i=e.skipChars(i,o))-a<c||(i=e.skipSpaces(i))<s)){p=!0;break}c=e.sCount[t],e.line=u+(p?1:0);var f=e.push("fence","code",0);return f.info=h,f.content=e.getLines(t+1,u,c,!0),f.markup=l,f.map=[t,e.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function(e,t,r,n){var i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],o=e.lineMax;if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(i))return!1;if(n)return!0;var a=[],c=[],l=[],h=[],u=e.md.block.ruler.getRules("blockquote"),p=e.parentType;e.parentType="blockquote";var f,d=!1;for(f=t;f<r;f++){var k=e.sCount[f]<e.blkIndent;if((i=e.bMarks[f]+e.tShift[f])>=(s=e.eMarks[f]))break;if(62!==e.src.charCodeAt(i++)||k){if(d)break;for(var v=!1,m=0,g=u.length;m<g;m++)if(u[m](e,f,r,!0)){v=!0;break}if(v){e.lineMax=f,0!==e.blkIndent&&(a.push(e.bMarks[f]),c.push(e.bsCount[f]),h.push(e.tShift[f]),l.push(e.sCount[f]),e.sCount[f]-=e.blkIndent);break}a.push(e.bMarks[f]),c.push(e.bsCount[f]),h.push(e.tShift[f]),l.push(e.sCount[f]),e.sCount[f]=-1}else{var b=e.sCount[f]+1,_=void 0,C=void 0;32===e.src.charCodeAt(i)?(i++,b++,C=!1,_=!0):9===e.src.charCodeAt(i)?(_=!0,(e.bsCount[f]+b)%4==3?(i++,b++,C=!1):C=!0):_=!1;var y=b;for(a.push(e.bMarks[f]),e.bMarks[f]=i;i<s;){var A=e.src.charCodeAt(i);if(!z(A))break;9===A?y+=4-(y+e.bsCount[f]+(C?1:0))%4:y++,i++}d=i>=s,c.push(e.bsCount[f]),e.bsCount[f]=e.sCount[f]+1+(_?1:0),l.push(e.sCount[f]),e.sCount[f]=y-b,h.push(e.tShift[f]),e.tShift[f]=i-e.bMarks[f]}}var x=e.blkIndent;e.blkIndent=0;var M=e.push("blockquote_open","blockquote",1);M.markup=">";var S=[t,0];M.map=S,e.md.block.tokenize(e,t,f),e.push("blockquote_close","blockquote",-1).markup=">",e.lineMax=o,e.parentType=p,S[1]=e.line;for(var w=0;w<h.length;w++)e.bMarks[w+t]=a[w],e.tShift[w+t]=h[w],e.sCount[w+t]=l[w],e.bsCount[w+t]=c[w];return e.blkIndent=x,!0},["paragraph","reference","blockquote","list"]],["hr",function(e,t,r,n){var i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;var s=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(s++);if(42!==o&&45!==o&&95!==o)return!1;for(var a=1;s<i;){var c=e.src.charCodeAt(s++);if(c!==o&&!z(c))return!1;c===o&&a++}if(a<3)return!1;if(n)return!0;e.line=t+1;var l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(a+1).join(String.fromCharCode(o)),!0},["paragraph","reference","blockquote","list"]],["list",function(e,t,r,n){var i,s,o,a,c=t,l=!0;if(e.sCount[c]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[c]-e.listIndent>=4&&e.sCount[c]<e.blkIndent)return!1;var h,u,p,f=!1;if(n&&"paragraph"===e.parentType&&e.sCount[c]>=e.blkIndent&&(f=!0),(p=ve(e,c))>=0){if(h=!0,o=e.bMarks[c]+e.tShift[c],u=Number(e.src.slice(o,p-1)),f&&1!==u)return!1}else{if(!((p=ke(e,c))>=0))return!1;h=!1}if(f&&e.skipSpaces(p)>=e.eMarks[c])return!1;if(n)return!0;var d=e.src.charCodeAt(p-1),k=e.tokens.length;h?(a=e.push("ordered_list_open","ol",1),1!==u&&(a.attrs=[["start",u]])):a=e.push("bullet_list_open","ul",1);var v=[c,0];a.map=v,a.markup=String.fromCharCode(d);var m=!1,g=e.md.block.ruler.getRules("list"),b=e.parentType;for(e.parentType="list";c<r;){s=p,i=e.eMarks[c];for(var _=e.sCount[c]+p-(e.bMarks[c]+e.tShift[c]),C=_;s<i;){var y=e.src.charCodeAt(s);if(9===y)C+=4-(C+e.bsCount[c])%4;else{if(32!==y)break;C++}s++}var A=s,x=void 0;(x=A>=i?1:C-_)>4&&(x=1);var M=_+x;(a=e.push("list_item_open","li",1)).markup=String.fromCharCode(d);var S=[c,0];a.map=S,h&&(a.info=e.src.slice(o,p-1));var w=e.tight,I=e.tShift[c],L=e.sCount[c],z=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=M,e.tight=!0,e.tShift[c]=A-e.bMarks[c],e.sCount[c]=C,A>=i&&e.isEmpty(c+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,c,r,!0),e.tight&&!m||(l=!1),m=e.line-c>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=z,e.tShift[c]=I,e.sCount[c]=L,e.tight=w,(a=e.push("list_item_close","li",-1)).markup=String.fromCharCode(d),c=e.line,S[1]=c,c>=r)break;if(e.sCount[c]<e.blkIndent)break;if(e.sCount[c]-e.blkIndent>=4)break;for(var T=!1,E=0,$=g.length;E<$;E++)if(g[E](e,c,r,!0)){T=!0;break}if(T)break;if(h){if((p=ve(e,c))<0)break;o=e.bMarks[c]+e.tShift[c]}else if((p=ke(e,c))<0)break;if(d!==e.src.charCodeAt(p-1))break}return(a=h?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(d),v[1]=c,e.line=c,e.parentType=b,l&&function(e,t){for(var r=e.level+2,n=t+2,i=e.tokens.length-2;n<i;n++)e.tokens[n].level===r&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,k),!0},["paragraph","reference","blockquote"]],["reference",function(e,t,r,n){var i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],o=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(i))return!1;function a(t){var r=e.lineMax;if(t>=r||e.isEmpty(t))return null;var n=!1;if(e.sCount[t]-e.blkIndent>3&&(n=!0),e.sCount[t]<0&&(n=!0),!n){var i=e.md.block.ruler.getRules("reference"),s=e.parentType;e.parentType="reference";for(var o=!1,a=0,c=i.length;a<c;a++)if(i[a](e,t,r,!0)){o=!0;break}if(e.parentType=s,o)return null}var l=e.bMarks[t]+e.tShift[t],h=e.eMarks[t];return e.src.slice(l,h+1)}var c=e.src.slice(i,s+1);s=c.length;var l=-1;for(i=1;i<s;i++){var h=c.charCodeAt(i);if(91===h)return!1;if(93===h){l=i;break}if(10===h){var u=a(o);null!==u&&(s=(c+=u).length,o++)}else if(92===h&&++i<s&&10===c.charCodeAt(i)){var p=a(o);null!==p&&(s=(c+=p).length,o++)}}if(l<0||58!==c.charCodeAt(l+1))return!1;for(i=l+2;i<s;i++){var f=c.charCodeAt(i);if(10===f){var d=a(o);null!==d&&(s=(c+=d).length,o++)}else if(!z(f))break}var k=e.md.helpers.parseLinkDestination(c,i,s);if(!k.ok)return!1;var v=e.md.normalizeLink(k.str);if(!e.md.validateLink(v))return!1;for(var m=i=k.pos,g=o,b=i;i<s;i++){var _=c.charCodeAt(i);if(10===_){var C=a(o);null!==C&&(s=(c+=C).length,o++)}else if(!z(_))break}for(var y,A=e.md.helpers.parseLinkTitle(c,i,s);A.can_continue;){var x=a(o);if(null===x)break;i=s,s=(c+=x).length,o++,A=e.md.helpers.parseLinkTitle(c,i,s,A)}for(i<s&&b!==i&&A.ok?(y=A.str,i=A.pos):(y="",i=m,o=g);i<s&&z(c.charCodeAt(i));)i++;if(i<s&&10!==c.charCodeAt(i)&&y)for(y="",i=m,o=g;i<s&&z(c.charCodeAt(i));)i++;if(i<s&&10!==c.charCodeAt(i))return!1;var M=O(c.slice(1,l));return!!M&&(n||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[M]&&(e.env.references[M]={title:y,href:v}),e.line=o),!0)}],["html_block",function(e,t,r,n){var i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(i))return!1;for(var o=e.src.slice(i,s),a=0;a<Ce.length&&!Ce[a][0].test(o);a++);if(a===Ce.length)return!1;if(n)return Ce[a][2];var c=t+1;if(!Ce[a][1].test(o))for(;c<r&&!(e.sCount[c]<e.blkIndent);c++)if(i=e.bMarks[c]+e.tShift[c],s=e.eMarks[c],o=e.src.slice(i,s),Ce[a][1].test(o)){0!==o.length&&c++;break}e.line=c;var l=e.push("html_block","",0);return l.map=[t,c],l.content=e.getLines(t,c,e.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function(e,t,r,n){var i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;var o=e.src.charCodeAt(i);if(35!==o||i>=s)return!1;var a=1;for(o=e.src.charCodeAt(++i);35===o&&i<s&&a<=6;)a++,o=e.src.charCodeAt(++i);if(a>6||i<s&&!z(o))return!1;if(n)return!0;s=e.skipSpacesBack(s,i);var c=e.skipCharsBack(s,35,i);c>i&&z(e.src.charCodeAt(c-1))&&(s=c),e.line=t+1;var l=e.push("heading_open","h"+String(a),1);l.markup="########".slice(0,a),l.map=[t,e.line];var h=e.push("inline","",0);return h.content=e.src.slice(i,s).trim(),h.map=[t,e.line],h.children=[],e.push("heading_close","h"+String(a),-1).markup="########".slice(0,a),!0},["paragraph","reference","blockquote"]],["lheading",function(e,t,r){var n=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;var i=e.parentType;e.parentType="paragraph";for(var s,o=0,a=t+1;a<r&&!e.isEmpty(a);a++)if(!(e.sCount[a]-e.blkIndent>3)){if(e.sCount[a]>=e.blkIndent){var c=e.bMarks[a]+e.tShift[a],l=e.eMarks[a];if(c<l&&(45===(s=e.src.charCodeAt(c))||61===s)&&(c=e.skipChars(c,s),(c=e.skipSpaces(c))>=l)){o=61===s?1:2;break}}if(!(e.sCount[a]<0)){for(var h=!1,u=0,p=n.length;u<p;u++)if(n[u](e,a,r,!0)){h=!0;break}if(h)break}}if(!o)return!1;var f=e.getLines(t,a,e.blkIndent,!1).trim();e.line=a+1;var d=e.push("heading_open","h"+String(o),1);d.markup=String.fromCharCode(s),d.map=[t,e.line];var k=e.push("inline","",0);return k.content=f,k.map=[t,e.line-1],k.children=[],e.push("heading_close","h"+String(o),-1).markup=String.fromCharCode(s),e.parentType=i,!0}],["paragraph",function(e,t,r){var n=e.md.block.ruler.getRules("paragraph"),i=e.parentType,s=t+1;for(e.parentType="paragraph";s<r&&!e.isEmpty(s);s++)if(!(e.sCount[s]-e.blkIndent>3||e.sCount[s]<0)){for(var o=!1,a=0,c=n.length;a<c;a++)if(n[a](e,s,r,!0)){o=!0;break}if(o)break}var l=e.getLines(t,s,e.blkIndent,!1).trim();e.line=s,e.push("paragraph_open","p",1).map=[t,e.line];var h=e.push("inline","",0);return h.content=l,h.map=[t,e.line],h.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}]];function Ae(){this.ruler=new G;for(var e=0;e<ye.length;e++)this.ruler.push(ye[e][0],ye[e][1],{alt:(ye[e][2]||[]).slice()})}Ae.prototype.tokenize=function(e,t,r){for(var n=this.ruler.getRules(""),i=n.length,s=e.md.options.maxNesting,o=t,a=!1;o<r&&(e.line=o=e.skipEmptyLines(o),!(o>=r))&&!(e.sCount[o]<e.blkIndent);){if(e.level>=s){e.line=r;break}for(var c=e.line,l=!1,h=0;h<i;h++)if(l=n[h](e,o,r,!1)){if(c>=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),(o=e.line)<r&&e.isEmpty(o)&&(a=!0,o++,e.line=o)}},Ae.prototype.parse=function(e,t,r,n){if(e){var i=new this.State(e,t,r,n);this.tokenize(i,i.line,i.lineMax)}},Ae.prototype.State=pe;var xe=Ae;function Me(e,t,r,n){this.src=e,this.env=r,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Me.prototype.pushPending=function(){var e=new F("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Me.prototype.push=function(e,t,r){this.pending&&this.pushPending();var n=new F(e,t,r),i=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n},Me.prototype.scanDelims=function(e,t){for(var r=this.posMax,n=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32,s=e;s<r&&this.src.charCodeAt(s)===n;)s++;var o=s-e,a=s<r?this.src.charCodeAt(s):32,c=$(i)||E(String.fromCharCode(i)),l=$(a)||E(String.fromCharCode(a)),h=T(i),u=T(a),p=!u&&(!l||h||c),f=!h&&(!c||u||l);return{can_open:p&&(t||!f||c),can_close:f&&(t||!p||l),length:o}},Me.prototype.Token=F;var Se=Me;function we(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}for(var Ie=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,Le=[],ze=0;ze<256;ze++)Le.push(0);function Te(e,t){for(var r,n=[],i=t.length,s=0;s<i;s++){var o=t[s];if(126===o.marker&&-1!==o.end){var a=t[o.end];(r=e.tokens[o.token]).type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",(r=e.tokens[a.token]).type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="","text"===e.tokens[a.token-1].type&&"~"===e.tokens[a.token-1].content&&n.push(a.token-1)}}for(;n.length;){for(var c=n.pop(),l=c+1;l<e.tokens.length&&"s_close"===e.tokens[l].type;)l++;c!==--l&&(r=e.tokens[l],e.tokens[l]=e.tokens[c],e.tokens[c]=r)}}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){Le[e.charCodeAt(0)]=1}));var Ee={tokenize:function(e,t){var r=e.pos,n=e.src.charCodeAt(r);if(t)return!1;if(126!==n)return!1;var i=e.scanDelims(e.pos,!0),s=i.length,o=String.fromCharCode(n);if(s<2)return!1;s%2&&(e.push("text","",0).content=o,s--);for(var a=0;a<s;a+=2)e.push("text","",0).content=o+o,e.delimiters.push({marker:n,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0},postProcess:function(e){var t=e.tokens_meta,r=e.tokens_meta.length;Te(e,e.delimiters);for(var n=0;n<r;n++)t[n]&&t[n].delimiters&&Te(e,t[n].delimiters)}};function $e(e,t){for(var r=t.length-1;r>=0;r--){var n=t[r];if((95===n.marker||42===n.marker)&&-1!==n.end){var i=t[n.end],s=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,o=String.fromCharCode(n.marker),a=e.tokens[n.token];a.type=s?"strong_open":"em_open",a.tag=s?"strong":"em",a.nesting=1,a.markup=s?o+o:o,a.content="";var c=e.tokens[i.token];c.type=s?"strong_close":"em_close",c.tag=s?"strong":"em",c.nesting=-1,c.markup=s?o+o:o,c.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[n.end+1].token].content="",r--)}}}var Oe={tokenize:function(e,t){var r=e.pos,n=e.src.charCodeAt(r);if(t)return!1;if(95!==n&&42!==n)return!1;for(var i=e.scanDelims(e.pos,42===n),s=0;s<i.length;s++)e.push("text","",0).content=String.fromCharCode(n),e.delimiters.push({marker:n,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0},postProcess:function(e){var t=e.tokens_meta,r=e.tokens_meta.length;$e(e,e.delimiters);for(var n=0;n<r;n++)t[n]&&t[n].delimiters&&$e(e,t[n].delimiters)}},qe=/^([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])?)*)$/,Pe=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/,Re=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,je=/^&([a-z][a-z0-9]{1,31});/i;function Ze(e){var t={},r=e.length;if(r)for(var n=0,i=-2,s=[],o=0;o<r;o++){var a=e[o];if(s.push(0),e[n].marker===a.marker&&i===a.token-1||(n=o),i=a.token,a.length=a.length||0,a.close){t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);for(var c=t[a.marker][(a.open?3:0)+a.length%3],l=n-s[n]-1,h=l;l>c;l-=s[l]+1){var u=e[l];if(u.marker===a.marker&&u.open&&u.end<0){var p=!1;if((u.close||a.open)&&(u.length+a.length)%3==0&&(u.length%3==0&&a.length%3==0||(p=!0)),!p){var f=l>0&&!e[l-1].open?s[l-1]+1:0;s[o]=o-l+f,s[l]=f,a.open=!1,u.end=o,u.close=!1,h=-1,i=-2;break}}}-1!==h&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=h)}}}var De=[["text",function(e,t){for(var r=e.pos;r<e.posMax&&!we(e.src.charCodeAt(r));)r++;return r!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}],["linkify",function(e,t){if(!e.md.options.linkify)return!1;if(e.linkLevel>0)return!1;var r=e.pos;if(r+3>e.posMax)return!1;if(58!==e.src.charCodeAt(r))return!1;if(47!==e.src.charCodeAt(r+1))return!1;if(47!==e.src.charCodeAt(r+2))return!1;var n=e.pending.match(Ie);if(!n)return!1;var i=n[1],s=e.md.linkify.matchAtStart(e.src.slice(r-i.length));if(!s)return!1;var o=s.url;if(o.length<=i.length)return!1;o=o.replace(/\*+$/,"");var a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);var c=e.push("link_open","a",1);c.attrs=[["href",a]],c.markup="linkify",c.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(o);var l=e.push("link_close","a",-1);l.markup="linkify",l.info="auto"}return e.pos+=o.length-i.length,!0}],["newline",function(e,t){var r=e.pos;if(10!==e.src.charCodeAt(r))return!1;var n=e.pending.length-1,i=e.posMax;if(!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(var s=n-1;s>=1&&32===e.pending.charCodeAt(s-1);)s--;e.pending=e.pending.slice(0,s),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(r++;r<i&&z(e.src.charCodeAt(r));)r++;return e.pos=r,!0}],["escape",function(e,t){var r=e.pos,n=e.posMax;if(92!==e.src.charCodeAt(r))return!1;if(++r>=n)return!1;var i=e.src.charCodeAt(r);if(10===i){for(t||e.push("hardbreak","br",0),r++;r<n&&z(i=e.src.charCodeAt(r));)r++;return e.pos=r,!0}var s=e.src[r];if(i>=55296&&i<=56319&&r+1<n){var o=e.src.charCodeAt(r+1);o>=56320&&o<=57343&&(s+=e.src[r+1],r++)}var a="\\"+s;if(!t){var c=e.push("text_special","",0);i<256&&0!==Le[i]?c.content=s:c.content=a,c.markup=a,c.info="escape"}return e.pos=r+1,!0}],["backticks",function(e,t){var r=e.pos;if(96!==e.src.charCodeAt(r))return!1;var n=r;r++;for(var i=e.posMax;r<i&&96===e.src.charCodeAt(r);)r++;var s=e.src.slice(n,r),o=s.length;if(e.backticksScanned&&(e.backticks[o]||0)<=n)return t||(e.pending+=s),e.pos+=o,!0;for(var a,c=r;-1!==(a=e.src.indexOf("`",c));){for(c=a+1;c<i&&96===e.src.charCodeAt(c);)c++;var l=c-a;if(l===o){if(!t){var h=e.push("code_inline","code",0);h.markup=s,h.content=e.src.slice(r,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=c,!0}e.backticks[l]=a}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=o,!0}],["strikethrough",Ee.tokenize],["emphasis",Oe.tokenize],["link",function(e,t){var r,n,i,s,o="",a="",c=e.pos,l=!0;if(91!==e.src.charCodeAt(e.pos))return!1;var h=e.pos,u=e.posMax,p=e.pos+1,f=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(f<0)return!1;var d=f+1;if(d<u&&40===e.src.charCodeAt(d)){for(l=!1,d++;d<u&&(z(r=e.src.charCodeAt(d))||10===r);d++);if(d>=u)return!1;if(c=d,(i=e.md.helpers.parseLinkDestination(e.src,d,e.posMax)).ok){for(o=e.md.normalizeLink(i.str),e.md.validateLink(o)?d=i.pos:o="",c=d;d<u&&(z(r=e.src.charCodeAt(d))||10===r);d++);if(i=e.md.helpers.parseLinkTitle(e.src,d,e.posMax),d<u&&c!==d&&i.ok)for(a=i.str,d=i.pos;d<u&&(z(r=e.src.charCodeAt(d))||10===r);d++);}(d>=u||41!==e.src.charCodeAt(d))&&(l=!0),d++}if(l){if(void 0===e.env.references)return!1;if(d<u&&91===e.src.charCodeAt(d)?(c=d+1,(d=e.md.helpers.parseLinkLabel(e,d))>=0?n=e.src.slice(c,d++):d=f+1):d=f+1,n||(n=e.src.slice(p,f)),!(s=e.env.references[O(n)]))return e.pos=h,!1;o=s.href,a=s.title}if(!t){e.pos=p,e.posMax=f;var k=[["href",o]];e.push("link_open","a",1).attrs=k,a&&k.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=d,e.posMax=u,!0}],["image",function(e,t){var r,n,i,s,o,a,c,l,h="",u=e.pos,p=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;var f=e.pos+2,d=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(d<0)return!1;if((s=d+1)<p&&40===e.src.charCodeAt(s)){for(s++;s<p&&(z(r=e.src.charCodeAt(s))||10===r);s++);if(s>=p)return!1;for(l=s,(a=e.md.helpers.parseLinkDestination(e.src,s,e.posMax)).ok&&(h=e.md.normalizeLink(a.str),e.md.validateLink(h)?s=a.pos:h=""),l=s;s<p&&(z(r=e.src.charCodeAt(s))||10===r);s++);if(a=e.md.helpers.parseLinkTitle(e.src,s,e.posMax),s<p&&l!==s&&a.ok)for(c=a.str,s=a.pos;s<p&&(z(r=e.src.charCodeAt(s))||10===r);s++);else c="";if(s>=p||41!==e.src.charCodeAt(s))return e.pos=u,!1;s++}else{if(void 0===e.env.references)return!1;if(s<p&&91===e.src.charCodeAt(s)?(l=s+1,(s=e.md.helpers.parseLinkLabel(e,s))>=0?i=e.src.slice(l,s++):s=d+1):s=d+1,i||(i=e.src.slice(f,d)),!(o=e.env.references[O(i)]))return e.pos=u,!1;h=o.href,c=o.title}if(!t){n=e.src.slice(f,d);var k=[];e.md.inline.parse(n,e.md,e.env,k);var v=e.push("image","img",0),m=[["src",h],["alt",""]];v.attrs=m,v.children=k,v.content=n,c&&m.push(["title",c])}return e.pos=s,e.posMax=p,!0}],["autolink",function(e,t){var r=e.pos;if(60!==e.src.charCodeAt(r))return!1;for(var n=e.pos,i=e.posMax;;){if(++r>=i)return!1;var s=e.src.charCodeAt(r);if(60===s)return!1;if(62===s)break}var o=e.src.slice(n+1,r);if(Pe.test(o)){var a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){var c=e.push("link_open","a",1);c.attrs=[["href",a]],c.markup="autolink",c.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(o);var l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}if(qe.test(o)){var h=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(h))return!1;if(!t){var u=e.push("link_open","a",1);u.attrs=[["href",h]],u.markup="autolink",u.info="auto",e.push("text","",0).content=e.md.normalizeLinkText(o);var p=e.push("link_close","a",-1);p.markup="autolink",p.info="auto"}return e.pos+=o.length+2,!0}return!1}],["html_inline",function(e,t){if(!e.md.options.html)return!1;var r=e.posMax,n=e.pos;if(60!==e.src.charCodeAt(n)||n+2>=r)return!1;var i=e.src.charCodeAt(n+1);if(33!==i&&63!==i&&47!==i&&!function(e){var t=32|e;return t>=97&&t<=122}(i))return!1;var s,o=e.src.slice(n).match(be);if(!o)return!1;if(!t){var a=e.push("html_inline","",0);a.content=o[0],s=a.content,/^<a[>\s]/i.test(s)&&e.linkLevel++,function(e){return/^<\/a\s*>/i.test(e)}(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}],["entity",function(e,t){var r=e.pos,n=e.posMax;if(38!==e.src.charCodeAt(r))return!1;if(r+1>=n)return!1;if(35===e.src.charCodeAt(r+1)){var i=e.src.slice(r).match(Re);if(i){if(!t){var s="x"===i[1][0].toLowerCase()?parseInt(i[1].slice(1),16):parseInt(i[1],10),o=e.push("text_special","",0);o.content=v(s)?m(s):m(65533),o.markup=i[0],o.info="entity"}return e.pos+=i[0].length,!0}}else{var a=e.src.slice(r).match(je);if(a){var c=(0,l.Gz)(a[0]);if(c!==a[0]){if(!t){var h=e.push("text_special","",0);h.content=c,h.markup=a[0],h.info="entity"}return e.pos+=a[0].length,!0}}}return!1}]],Ne=[["balance_pairs",function(e){var t=e.tokens_meta,r=e.tokens_meta.length;Ze(e.delimiters);for(var n=0;n<r;n++)t[n]&&t[n].delimiters&&Ze(t[n].delimiters)}],["strikethrough",Ee.postProcess],["emphasis",Oe.postProcess],["fragments_join",function(e){var t,r,n=0,i=e.tokens,s=e.tokens.length;for(t=r=0;t<s;t++)i[t].nesting<0&&n--,i[t].level=n,i[t].nesting>0&&n++,"text"===i[t].type&&t+1<s&&"text"===i[t+1].type?i[t+1].content=i[t].content+i[t+1].content:(t!==r&&(i[r]=i[t]),r++);t!==r&&(i.length=r)}]];function Be(){this.ruler=new G;for(var e=0;e<De.length;e++)this.ruler.push(De[e][0],De[e][1]);this.ruler2=new G;for(var t=0;t<Ne.length;t++)this.ruler2.push(Ne[t][0],Ne[t][1])}Be.prototype.skipToken=function(e){var t=e.pos,r=this.ruler.getRules(""),n=r.length,i=e.md.options.maxNesting,s=e.cache;if(void 0===s[t]){var o=!1;if(e.level<i){for(var a=0;a<n;a++)if(e.level++,o=r[a](e,!0),e.level--,o){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;o||e.pos++,s[t]=e.pos}else e.pos=s[t]},Be.prototype.tokenize=function(e){for(var t=this.ruler.getRules(""),r=t.length,n=e.posMax,i=e.md.options.maxNesting;e.pos<n;){var s=e.pos,o=!1;if(e.level<i)for(var a=0;a<r;a++)if(o=t[a](e,!1)){if(s>=e.pos)throw new Error("inline rule didn't increment state.pos");break}if(o){if(e.pos>=n)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Be.prototype.parse=function(e,t,r,n){var i=new this.State(e,t,r,n);this.tokenize(i);for(var s=this.ruler2.getRules(""),o=s.length,a=0;a<o;a++)s[a](i)},Be.prototype.State=Se;var Ge=Be,We=r(64536),Fe=r(89293),Ue={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},He=/^(vbscript|javascript|file|data):/,Je=/^data:image\/(gif|png|jpeg|webp);/;function Ve(e){var t=e.trim().toLowerCase();return!He.test(t)||Je.test(t)}var Ke=["http:","https:","mailto:"];function Qe(e){var t=s.parse(e,!0);if(t.hostname&&(!t.protocol||Ke.indexOf(t.protocol)>=0))try{t.hostname=Fe.Ay.toASCII(t.hostname)}catch(e){}return s.encode(s.format(t))}function Xe(e){var t=s.parse(e,!0);if(t.hostname&&(!t.protocol||Ke.indexOf(t.protocol)>=0))try{t.hostname=Fe.Ay.toUnicode(t.hostname)}catch(e){}return s.decode(s.format(t),s.decode.defaultChars+"%")}function Ye(e,t){if(!(this instanceof Ye))return new Ye(e,t);t||u(e)||(t=e||{},e="default"),this.inline=new Ge,this.block=new xe,this.core=new he,this.renderer=new N,this.linkify=new We.A,this.validateLink=Ve,this.normalizeLink=Qe,this.normalizeLinkText=Xe,this.utils=n,this.helpers=d({},i),this.options={},this.configure(e),t&&this.set(t)}Ye.prototype.set=function(e){return d(this.options,e),this},Ye.prototype.configure=function(e){var t=this;if(u(e)){var r=e;if(!(e=Ue[r]))throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach((function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)})),this},Ye.prototype.enable=function(e,t){var r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){r=r.concat(this[t].ruler.enable(e,!0))}),this),r=r.concat(this.inline.ruler2.enable(e,!0));var n=e.filter((function(e){return r.indexOf(e)<0}));if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},Ye.prototype.disable=function(e,t){var r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){r=r.concat(this[t].ruler.disable(e,!0))}),this),r=r.concat(this.inline.ruler2.disable(e,!0));var n=e.filter((function(e){return r.indexOf(e)<0}));if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},Ye.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Ye.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var r=new this.core.State(e,this,t);return this.core.process(r),r.tokens},Ye.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},Ye.prototype.parseInline=function(e,t){var r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens},Ye.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var et=Ye}}]);