17 lines
101 KiB
JavaScript
17 lines
101 KiB
JavaScript
|
|
const Bu={};function C0(u){let e=Bu[u];if(e)return e;e=Bu[u]=[];for(let r=0;r<128;r++){const t=String.fromCharCode(r);e.push(t)}for(let r=0;r<u.length;r++){const t=u.charCodeAt(r);e[t]="%"+("0"+t.toString(16).toUpperCase()).slice(-2)}return e}function Z(u,e){typeof e!="string"&&(e=Z.defaultChars);const r=C0(e);return u.replace(/(%[a-f0-9]{2})+/gi,function(t){let n="";for(let c=0,o=t.length;c<o;c+=3){const i=parseInt(t.slice(c+1,c+3),16);if(i<128){n+=r[i];continue}if((i&224)===192&&c+3<o){const a=parseInt(t.slice(c+4,c+6),16);if((a&192)===128){const s=i<<6&1984|a&63;s<128?n+="<22><>":n+=String.fromCharCode(s),c+=3;continue}}if((i&240)===224&&c+6<o){const a=parseInt(t.slice(c+4,c+6),16),s=parseInt(t.slice(c+7,c+9),16);if((a&192)===128&&(s&192)===128){const f=i<<12&61440|a<<6&4032|s&63;f<2048||f>=55296&&f<=57343?n+="<22><><EFBFBD>":n+=String.fromCharCode(f),c+=6;continue}}if((i&248)===240&&c+9<o){const a=parseInt(t.slice(c+4,c+6),16),s=parseInt(t.slice(c+7,c+9),16),f=parseInt(t.slice(c+10,c+12),16);if((a&192)===128&&(s&192)===128&&(f&192)===128){let d=i<<18&1835008|a<<12&258048|s<<6&4032|f&63;d<65536||d>1114111?n+="<22><><EFBFBD><EFBFBD>":(d-=65536,n+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),c+=9;continue}}n+="<22>"}return n})}Z.defaultChars=";/?:@&=+$,#";Z.componentChars="";const Tu={};function E0(u){let e=Tu[u];if(e)return e;e=Tu[u]=[];for(let r=0;r<128;r++){const t=String.fromCharCode(r);/^[0-9a-z]$/i.test(t)?e.push(t):e.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2))}for(let r=0;r<u.length;r++)e[u.charCodeAt(r)]=u[r];return e}function Y(u,e,r){typeof e!="string"&&(r=e,e=Y.defaultChars),typeof r=="undefined"&&(r=!0);const t=E0(e);let n="";for(let c=0,o=u.length;c<o;c++){const i=u.charCodeAt(c);if(r&&i===37&&c+2<o&&/^[0-9a-f]{2}$/i.test(u.slice(c+1,c+3))){n+=u.slice(c,c+3),c+=2;continue}if(i<128){n+=t[i];continue}if(i>=55296&&i<=57343){if(i>=55296&&i<=56319&&c+1<o){const a=u.charCodeAt(c+1);if(a>=56320&&a<=57343){n+=encodeURIComponent(u[c]+u[c+1]),c++;continue}}n+="%EF%BF%BD";continue}n+=encodeURIComponent(u[c])}return n}Y.defaultChars=";/?:@&=+$,-_.!~*'()#";Y.componentChars="-_.!~*'()";function Du(u){let e="";return e+=u.protocol||"",e+=u.slashes?"//":"",e+=u.auth?u.auth+"@":"",u.hostname&&u.hostname.indexOf(":")!==-1?e+="["+u.hostname+"]":e+=u.hostname||"",e+=u.port?":"+u.port:"",e+=u.pathname||"",e+=u.search||"",e+=u.hash||"",e}function nu(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const F0=/^([a-z0-9.+-]+:)/i,A0=/:[0-9]*$/,y0=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,w0=["<",">",'"',"`"," ","\r",`
|
|||
|
|
`," "],S0=["{","}","|","\\","^","`"].concat(w0),v0=["'"].concat(S0),zu=["%","/","?",";","#"].concat(v0),Iu=["/","?","#"],B0=255,Mu=/^[+a-z0-9A-Z_-]{0,63}$/,T0=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,qu={javascript:!0,"javascript:":!0},Ru={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Cu(u,e){if(u&&u instanceof nu)return u;const r=new nu;return r.parse(u,e),r}nu.prototype.parse=function(u,e){let r,t,n,c=u;if(c=c.trim(),!e&&u.split("#").length===1){const s=y0.exec(c);if(s)return this.pathname=s[1],s[2]&&(this.search=s[2]),this}let o=F0.exec(c);if(o&&(o=o[0],r=o.toLowerCase(),this.protocol=o,c=c.substr(o.length)),(e||o||c.match(/^\/\/[^@\/]+@[^@\/]+/))&&(n=c.substr(0,2)==="//",n&&!(o&&qu[o])&&(c=c.substr(2),this.slashes=!0)),!qu[o]&&(n||o&&!Ru[o])){let s=-1;for(let l=0;l<Iu.length;l++)t=c.indexOf(Iu[l]),t!==-1&&(s===-1||t<s)&&(s=t);let f,d;s===-1?d=c.lastIndexOf("@"):d=c.lastIndexOf("@",s),d!==-1&&(f=c.slice(0,d),c=c.slice(d+1),this.auth=f),s=-1;for(let l=0;l<zu.length;l++)t=c.indexOf(zu[l]),t!==-1&&(s===-1||t<s)&&(s=t);s===-1&&(s=c.length),c[s-1]===":"&&s--;const b=c.slice(0,s);c=c.slice(s),this.parseHost(b),this.hostname=this.hostname||"";const h=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!h){const l=this.hostname.split(/\./);for(let k=0,g=l.length;k<g;k++){const C=l[k];if(C&&!C.match(Mu)){let p="";for(let _=0,x=C.length;_<x;_++)C.charCodeAt(_)>127?p+="x":p+=C[_];if(!p.match(Mu)){const _=l.slice(0,k),x=l.slice(k+1),m=C.match(T0);m&&(_.push(m[1]),x.unshift(m[2])),x.length&&(c=x.join(".")+c),this.hostname=_.join(".");break}}}}this.hostname.length>B0&&(this.hostname=""),h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const i=c.indexOf("#");i!==-1&&(this.hash=c.substr(i),c=c.slice(0,i));const a=c.indexOf("?");return a!==-1&&(this.search=c.substr(a),c=c.slice(0,a)),c&&(this.pathname=c),Ru[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};nu.prototype.parseHost=function(u){let e=A0.exec(u);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),u=u.substr(0,u.length-e.length)),u&&(this.hostname=u)};const z0=Object.freeze(Object.defineProperty({__proto__:null,decode:Z,encode:Y,format:Du,parse:Cu},Symbol.toStringTag,{value:"Module"})),Wu=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ju=/[\0-\x1F\x7F-\x9F]/,I0=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Eu=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF9
|
|||
|
|
`};M.fence=function(u,e,r,t,n){const c=u[e],o=c.info?H(c.info).trim():"";let i="",a="";if(o){const f=o.split(/(\s+)/g);i=f[0],a=f.slice(2).join("")}let s;if(r.highlight?s=r.highlight(c.content,i,a)||N(c.content):s=N(c.content),s.indexOf("<pre")===0)return s+`
|
|||
|
|
`;if(o){const f=c.attrIndex("class"),d=c.attrs?c.attrs.slice():[];f<0?d.push(["class",r.langPrefix+i]):(d[f]=d[f].slice(),d[f][1]+=" "+r.langPrefix+i);const b={attrs:d};return`<pre><code${n.renderAttrs(b)}>${s}</code></pre>
|
|||
|
|
`}return`<pre><code${n.renderAttrs(c)}>${s}</code></pre>
|
|||
|
|
`};M.image=function(u,e,r,t,n){const c=u[e];return c.attrs[c.attrIndex("alt")][1]=n.renderInlineAsText(c.children,r,t),n.renderToken(u,e,r)};M.hardbreak=function(u,e,r){return r.xhtmlOut?`<br />
|
|||
|
|
`:`<br>
|
|||
|
|
`};M.softbreak=function(u,e,r){return r.breaks?r.xhtmlOut?`<br />
|
|||
|
|
`:`<br>
|
|||
|
|
`:`
|
|||
|
|
`};M.text=function(u,e){return N(u[e].content)};M.html_block=function(u,e){return u[e].content};M.html_inline=function(u,e){return u[e].content};function V(){this.rules=iu({},M)}V.prototype.renderAttrs=function(e){let r,t,n;if(!e.attrs)return"";for(n="",r=0,t=e.attrs.length;r<t;r++)n+=" "+N(e.attrs[r][0])+'="'+N(e.attrs[r][1])+'"';return n};V.prototype.renderToken=function(e,r,t){const n=e[r];let c="";if(n.hidden)return"";n.block&&n.nesting!==-1&&r&&e[r-1].hidden&&(c+=`
|
|||
|
|
`),c+=(n.nesting===-1?"</":"<")+n.tag,c+=this.renderAttrs(n),n.nesting===0&&t.xhtmlOut&&(c+=" /");let o=!1;if(n.block&&(o=!0,n.nesting===1&&r+1<e.length)){const i=e[r+1];(i.type==="inline"||i.hidden||i.nesting===-1&&i.tag===n.tag)&&(o=!1)}return c+=o?`>
|
|||
|
|
`:">",c};V.prototype.renderInline=function(u,e,r){let t="";const n=this.rules;for(let c=0,o=u.length;c<o;c++){const i=u[c].type;typeof n[i]!="undefined"?t+=n[i](u,c,e,r,this):t+=this.renderToken(u,c,e)}return t};V.prototype.renderInlineAsText=function(u,e,r){let t="";for(let n=0,c=u.length;n<c;n++)switch(u[n].type){case"text":t+=u[n].content;break;case"image":t+=this.renderInlineAsText(u[n].children,e,r);break;case"html_inline":case"html_block":t+=u[n].content;break;case"softbreak":case"hardbreak":t+=`
|
|||
|
|
`;break}return t};V.prototype.render=function(u,e,r){let t="";const n=this.rules;for(let c=0,o=u.length;c<o;c++){const i=u[c].type;i==="inline"?t+=this.renderInline(u[c].children,e,r):typeof n[i]!="undefined"?t+=n[i](u,c,e,r,this):t+=this.renderToken(u,c,e,r)}return t};function w(){this.__rules__=[],this.__cache__=null}w.prototype.__find__=function(u){for(let e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===u)return e;return-1};w.prototype.__compile__=function(){const u=this,e=[""];u.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(t){e.indexOf(t)<0&&e.push(t)})}),u.__cache__={},e.forEach(function(r){u.__cache__[r]=[],u.__rules__.forEach(function(t){t.enabled&&(r&&t.alt.indexOf(r)<0||u.__cache__[r].push(t.fn))})})};w.prototype.at=function(u,e,r){const t=this.__find__(u),n=r||{};if(t===-1)throw new Error("Parser rule not found: "+u);this.__rules__[t].fn=e,this.__rules__[t].alt=n.alt||[],this.__cache__=null};w.prototype.before=function(u,e,r,t){const n=this.__find__(u),c=t||{};if(n===-1)throw new Error("Parser rule not found: "+u);this.__rules__.splice(n,0,{name:e,enabled:!0,fn:r,alt:c.alt||[]}),this.__cache__=null};w.prototype.after=function(u,e,r,t){const n=this.__find__(u),c=t||{};if(n===-1)throw new Error("Parser rule not found: "+u);this.__rules__.splice(n+1,0,{name:e,enabled:!0,fn:r,alt:c.alt||[]}),this.__cache__=null};w.prototype.push=function(u,e,r){const t=r||{};this.__rules__.push({name:u,enabled:!0,fn:e,alt:t.alt||[]}),this.__cache__=null};w.prototype.enable=function(u,e){Array.isArray(u)||(u=[u]);const r=[];return u.forEach(function(t){const n=this.__find__(t);if(n<0){if(e)return;throw new Error("Rules manager: invalid rule name "+t)}this.__rules__[n].enabled=!0,r.push(t)},this),this.__cache__=null,r};w.prototype.enableOnly=function(u,e){Array.isArray(u)||(u=[u]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(u,e)};w.prototype.disable=function(u,e){Array.isArray(u)||(u=[u]);const r=[];return u.forEach(function(t){const n=this.__find__(t);if(n<0){if(e)return;throw new Error("Rules manager: invalid rule name "+t)}this.__rules__[n].enabled=!1,r.push(t)},this),this.__cache__=null,r};w.prototype.getRules=function(u){return this.__cache__===null&&this.__compile__(),this.__cache__[u]||[]};function T(u,e,r){this.type=u,this.tag=e,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}T.prototype.attrIndex=function(e){if(!this.attrs)return-1;const r=this.attrs;for(let t=0,n=r.length;t<n;t++)if(r[t][0]===e)return t;return-1};T.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]};T.prototype.attrSet=function(e,r){const t=this.attrIndex(e),n=[e,r];t<0?this.attrPush(n):this.attrs[t]=n};T.prototype.attrGet=function(e){const r=this.attrIndex(e);let t=null;return r>=0&&(t=this.attrs[r][1]),t};T.prototype.attrJoin=function(e,r){const t=this.attrIndex(e);t<0?this.attrPush([e,r]):this.attrs[t][1]=this.attrs[t][1]+" "+r};function r0(u,e,r){this.src=u,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}r0.prototype.Token=T;const he=/\r\n?|\n/g,be=/\0/g;function pe(u){let e;e=u.src.replace(he,`
|
|||
|
|
`),e=e.replace(be,"<22>"),u.src=e}function xe(u){let e;u.inlineMode?(e=new u.Token("inline","",0),e.content=u.src,e.map=[0,1],e.children=[],u.tokens.push(e)):u.md.block.parse(u.src,u.md,u.env,u.tokens)}function _e(u){const e=u.tokens;for(let r=0,t=e.length;r<t;r++){const n=e[r];n.type==="inline"&&u.md.inline.parse(n.content,u.md,u.env,n.children)}}function me(u){return/^<a[>\s]/i.test(u)}function ke(u){return/^<\/a\s*>/i.test(u)}function ge(u){const e=u.tokens;if(u.md.options.linkify)for(let r=0,t=e.length;r<t;r++){if(e[r].type!=="inline"||!u.md.linkify.pretest(e[r].content))continue;let n=e[r].children,c=0;for(let o=n.length-1;o>=0;o--){const i=n[o];if(i.type==="link_close"){for(o--;n[o].level!==i.level&&n[o].type!=="link_open";)o--;continue}if(i.type==="html_inline"&&(me(i.content)&&c>0&&c--,ke(i.content)&&c++),!(c>0)&&i.type==="text"&&u.md.linkify.test(i.content)){const a=i.content;let s=u.md.linkify.match(a);const f=[];let d=i.level,b=0;s.length>0&&s[0].index===0&&o>0&&n[o-1].type==="text_special"&&(s=s.slice(1));for(let h=0;h<s.length;h++){const l=s[h].url,k=u.md.normalizeLink(l);if(!u.md.validateLink(k))continue;let g=s[h].text;s[h].schema?s[h].schema==="mailto:"&&!/^mailto:/i.test(g)?g=u.md.normalizeLinkText("mailto:"+g).replace(/^mailto:/,""):g=u.md.normalizeLinkText(g):g=u.md.normalizeLinkText("http://"+g).replace(/^http:\/\//,"");const C=s[h].index;if(C>b){const m=new u.Token("text","",0);m.content=a.slice(b,C),m.level=d,f.push(m)}const p=new u.Token("link_open","a",1);p.attrs=[["href",k]],p.level=d++,p.markup="linkify",p.info="auto",f.push(p);const _=new u.Token("text","",0);_.content=g,_.level=d,f.push(_);const x=new u.Token("link_close","a",-1);x.level=--d,x.markup="linkify",x.info="auto",f.push(x),b=s[h].lastIndex}if(b<a.length){const h=new u.Token("text","",0);h.content=a.slice(b),h.level=d,f.push(h)}e[r].children=n=u0(n,o,f)}}}}const n0=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,De=/\((c|tm|r)\)/i,Ce=/\((c|tm|r)\)/ig,Ee={c:"©",r:"®",tm:"™"};function Fe(u,e){return Ee[e.toLowerCase()]}function Ae(u){let e=0;for(let r=u.length-1;r>=0;r--){const t=u[r];t.type==="text"&&!e&&(t.content=t.content.replace(Ce,Fe)),t.type==="link_open"&&t.info==="auto"&&e--,t.type==="link_close"&&t.info==="auto"&&e++}}function ye(u){let e=0;for(let r=u.length-1;r>=0;r--){const t=u[r];t.type==="text"&&!e&&n0.test(t.content)&&(t.content=t.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),t.type==="link_open"&&t.info==="auto"&&e--,t.type==="link_close"&&t.info==="auto"&&e++}}function we(u){let e;if(u.md.options.typographer)for(e=u.tokens.length-1;e>=0;e--)u.tokens[e].type==="inline"&&(De.test(u.tokens[e].content)&&Ae(u.tokens[e].children),n0.test(u.tokens[e].content)&&ye(u.tokens[e].children))}const Se=/['"]/,Lu=/['"]/g,Pu="’";function eu(u,e,r){return u.slice(0,e)+r+u.slice(e+1)}function ve(u,e){let r;const t=[];for(let n=0;n<u.length;n++){const c=u[n],o=u[n].level;for(r=t.length-1;r>=0&&!(t[r].level<=o);r--);if(t.length=r+1,c.type!=="text")continue;let i=c.content,a=0,s=i.length;u:for(;a<s;){Lu.lastIndex=a;const f=Lu.exec(i);if(!f)break;let d=!0,b=!0;a=f.index+1;const h=f[0]==="'";let l=32;if(f.index-1>=0)l=i.charCodeAt(f.index-1);else for(r=n-1;r>=0&&!(u[r].type==="softbreak"||u[r].type==="hardbreak");r--)if(u[r].content){l=u[r].content.charCodeAt(u[r].content.length-1);break}let k=32;if(a<s)k=i.charCodeAt(a);else for(r=n+1;r<u.length&&!(u[r].type==="softbreak"||u[r].type==="hardbreak");r++)if(u[r].content){k=u[r].content.charCodeAt(0);break}const g=Q(l)||J(String.fromCharCode(l)),C=Q(k)||J(String.fromCharCode(k)),p=W(l),_=W(k);if(_?d=!1:C&&(p||g||(d=!1)),p?b=!1:g&&(_||C||(b=!1)),k===34&&f[0]==='"'&&l>=48&&l<=57&&(b=d=!1),d&&b&&(d=g,b=C),!d&&!b){h&&(c.content=eu(c.content,f.index,Pu));continue}if(b)for(r=t.length-1;r>=0;r--){let x=t[r];if(t[r].level<o)break;if(x.single===h&&t[r].level===o){x=t[r];let m,D;h?(m=e.md.options.quo
|
|||
|
|
`,c.map=[e,u.line],!0}function qe(u,e,r,t){let n=u.bMarks[e]+u.tShift[e],c=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||n+3>c)return!1;const o=u.src.charCodeAt(n);if(o!==126&&o!==96)return!1;let i=n;n=u.skipChars(n,o);let a=n-i;if(a<3)return!1;const s=u.src.slice(i,n),f=u.src.slice(n,c);if(o===96&&f.indexOf(String.fromCharCode(o))>=0)return!1;if(t)return!0;let d=e,b=!1;for(;d++,!(d>=r||(n=i=u.bMarks[d]+u.tShift[d],c=u.eMarks[d],n<c&&u.sCount[d]<u.blkIndent));)if(u.src.charCodeAt(n)===o&&!(u.sCount[d]-u.blkIndent>=4)&&(n=u.skipChars(n,o),!(n-i<a)&&(n=u.skipSpaces(n),!(n<c)))){b=!0;break}a=u.sCount[e],u.line=d+(b?1:0);const h=u.push("fence","code",0);return h.info=f,h.content=u.getLines(e+1,d,a,!0),h.markup=s,h.map=[e,u.line],!0}function Re(u,e,r,t){let n=u.bMarks[e]+u.tShift[e],c=u.eMarks[e];const o=u.lineMax;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(n)!==62)return!1;if(t)return!0;const i=[],a=[],s=[],f=[],d=u.md.block.ruler.getRules("blockquote"),b=u.parentType;u.parentType="blockquote";let h=!1,l;for(l=e;l<r;l++){const _=u.sCount[l]<u.blkIndent;if(n=u.bMarks[l]+u.tShift[l],c=u.eMarks[l],n>=c)break;if(u.src.charCodeAt(n++)===62&&!_){let m=u.sCount[l]+1,D,y;u.src.charCodeAt(n)===32?(n++,m++,y=!1,D=!0):u.src.charCodeAt(n)===9?(D=!0,(u.bsCount[l]+m)%4===3?(n++,m++,y=!1):y=!0):D=!1;let v=m;for(i.push(u.bMarks[l]),u.bMarks[l]=n;n<c;){const R=u.src.charCodeAt(n);if(E(R))R===9?v+=4-(v+u.bsCount[l]+(y?1:0))%4:v++;else break;n++}h=n>=c,a.push(u.bsCount[l]),u.bsCount[l]=u.sCount[l]+1+(D?1:0),s.push(u.sCount[l]),u.sCount[l]=v-m,f.push(u.tShift[l]),u.tShift[l]=n-u.bMarks[l];continue}if(h)break;let x=!1;for(let m=0,D=d.length;m<D;m++)if(d[m](u,l,r,!0)){x=!0;break}if(x){u.lineMax=l,u.blkIndent!==0&&(i.push(u.bMarks[l]),a.push(u.bsCount[l]),f.push(u.tShift[l]),s.push(u.sCount[l]),u.sCount[l]-=u.blkIndent);break}i.push(u.bMarks[l]),a.push(u.bsCount[l]),f.push(u.tShift[l]),s.push(u.sCount[l]),u.sCount[l]=-1}const k=u.blkIndent;u.blkIndent=0;const g=u.push("blockquote_open","blockquote",1);g.markup=">";const C=[e,0];g.map=C,u.md.block.tokenize(u,e,l);const p=u.push("blockquote_close","blockquote",-1);p.markup=">",u.lineMax=o,u.parentType=b,C[1]=u.line;for(let _=0;_<f.length;_++)u.bMarks[_+e]=i[_],u.tShift[_+e]=f[_],u.sCount[_+e]=s[_],u.bsCount[_+e]=a[_];return u.blkIndent=k,!0}function Le(u,e,r,t){const n=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let c=u.bMarks[e]+u.tShift[e];const o=u.src.charCodeAt(c++);if(o!==42&&o!==45&&o!==95)return!1;let i=1;for(;c<n;){const s=u.src.charCodeAt(c++);if(s!==o&&!E(s))return!1;s===o&&i++}if(i<3)return!1;if(t)return!0;u.line=e+1;const a=u.push("hr","hr",0);return a.map=[e,u.line],a.markup=Array(i+1).join(String.fromCharCode(o)),!0}function Nu(u,e){const r=u.eMarks[e];let t=u.bMarks[e]+u.tShift[e];const n=u.src.charCodeAt(t++);if(n!==42&&n!==45&&n!==43)return-1;if(t<r){const c=u.src.charCodeAt(t);if(!E(c))return-1}return t}function ju(u,e){const r=u.bMarks[e]+u.tShift[e],t=u.eMarks[e];let n=r;if(n+1>=t)return-1;let c=u.src.charCodeAt(n++);if(c<48||c>57)return-1;for(;;){if(n>=t)return-1;if(c=u.src.charCodeAt(n++),c>=48&&c<=57){if(n-r>=10)return-1;continue}if(c===41||c===46)break;return-1}return n<t&&(c=u.src.charCodeAt(n),!E(c))?-1:n}function Pe(u,e){const r=u.level+2;for(let t=e+2,n=u.tokens.length-2;t<n;t++)u.tokens[t].level===r&&u.tokens[t].type==="paragraph_open"&&(u.tokens[t+2].hidden=!0,u.tokens[t].hidden=!0,t+=2)}function Oe(u,e,r,t){let n,c,o,i,a=e,s=!0;if(u.sCount[a]-u.blkIndent>=4||u.listIndent>=0&&u.sCount[a]-u.listIndent>=4&&u.sCount[a]<u.blkIndent)return!1;let f=!1;t&&u.parentType==="paragraph"&&u.sCount[a]>=u.blkIndent&&(f=!0);let d,b,h;if((h=ju(u,a))>=0){if(d=!0,o=u.bMarks[a]+u.tShift[a],b=Number(u.src.slice(o,h-1)),f&&b!==1)return!1}else if((h=Nu(u,a))>=0)d=!1;else return!1;if(f&&u.skipSpaces(h)>=u.eMarks[a])return!1;if(t)return!0;const l=u.src.charCodeAt(h-1),k=u.tokens.length;d?(i=u.push("ordered_list_open","ol",1),b!==1&&(i.attrs=[["start",b]])):i=u.push("bullet_list_open","ul",1);const g=[a,0];i.map=g,i.markup=String.fromCharCode(l);let C=!1;const p=u.md.block.ruler.getRul
|