.obsidian/plugins/oz-image-plugin/main.js

190 lines
152 KiB
JavaScript
Raw Normal View History

2023-11-18 05:21:52 +00:00
/*
THIS IS A GENERATED/BUNDLED FILE
If you want to view the source, visit the plugins github repository
https://github.com/ozntel/oz-image-in-editor-obsidian
*/
var cu=Object.create;var Se=Object.defineProperty;var su=Object.getOwnPropertyDescriptor;var lu=Object.getOwnPropertyNames,Rr=Object.getOwnPropertySymbols,fu=Object.getPrototypeOf,Ir=Object.prototype.hasOwnProperty,pu=Object.prototype.propertyIsEnumerable;var Fr=(e,n,r)=>n in e?Se(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,cr=(e,n)=>{for(var r in n||(n={}))Ir.call(n,r)&&Fr(e,r,n[r]);if(Rr)for(var r of Rr(n))pu.call(n,r)&&Fr(e,r,n[r]);return e};var jr=e=>Se(e,"__esModule",{value:!0});var H=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),mu=(e,n)=>{jr(e);for(var r in n)Se(e,r,{get:n[r],enumerable:!0})},hu=(e,n,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of lu(n))!Ir.call(e,a)&&a!=="default"&&Se(e,a,{get:()=>n[a],enumerable:!(r=su(n,a))||r.enumerable});return e},Z=e=>hu(jr(Se(e!=null?cu(fu(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var ne=(e,n,r)=>new Promise((a,d)=>{var o=_=>{try{m(r.next(_))}catch(A){d(A)}},c=_=>{try{m(r.throw(_))}catch(A){d(A)}},m=_=>_.done?a(_.value):Promise.resolve(_.value).then(o,c);m((r=r.apply(e,n)).next())});var Vr=H((Ur,Ue)=>{(function(){function e(i){"use strict";var t={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 <br> (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 @m
`),l=l.replace(/\r/g,`
`),l=l.replace(/\u00A0/g,"&nbsp;"),t.smartIndentationFix&&(l=y(l)),l=`
`+l+`
`,l=r.subParser("detab")(l,t,k),l=l.replace(/^[ \t]+$/mg,""),r.helper.forEach(u,function(C){l=r.subParser("runExtension")(C,l,t,k)}),l=r.subParser("metadata")(l,t,k),l=r.subParser("hashPreCodeTags")(l,t,k),l=r.subParser("githubCodeBlocks")(l,t,k),l=r.subParser("hashHTMLBlocks")(l,t,k),l=r.subParser("hashCodeTags")(l,t,k),l=r.subParser("stripLinkDefinitions")(l,t,k),l=r.subParser("blockGamut")(l,t,k),l=r.subParser("unhashHTMLSpans")(l,t,k),l=r.subParser("unescapeSpecialChars")(l,t,k),l=l.replace(/¨D/g,"$$"),l=l.replace(/¨T/g,"\xA8"),l=r.subParser("completeHTMLDocument")(l,t,k),r.helper.forEach(s,function(C){l=r.subParser("runExtension")(C,l,t,k)}),f=k.metadata,l},this.makeMarkdown=this.makeMd=function(l,k){if(l=l.replace(/\r\n/g,`
`),l=l.replace(/\r/g,`
`),l=l.replace(/>[ \t]+</,">\xA8NBSP;<"),!k)if(window&&window.document)k=window.document;else throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var C=k.createElement("div");C.innerHTML=l;var L={preList:J(C)};Y(C);for(var j=C.childNodes,P="",q=0;q<j.length;q++)P+=r.subParser("makeMarkdown.node")(j[q],L);function Y(D){for(var U=0;U<D.childNodes.length;++U){var ee=D.childNodes[U];ee.nodeType===3?/\S/.test(ee.nodeValue)?(ee.nodeValue=ee.nodeValue.split(`
`).join(" "),ee.nodeValue=ee.nodeValue.replace(/(\s)+/g,"$1")):(D.removeChild(ee),--U):ee.nodeType===1&&Y(ee)}}function J(D){for(var U=D.querySelectorAll("pre"),ee=[],re=0;re<U.length;++re)if(U[re].childElementCount===1&&U[re].firstChild.tagName.toLowerCase()==="code"){var tr=U[re].firstChild.innerHTML.trim(),dr=U[re].firstChild.getAttribute("data-language")||"";if(dr==="")for(var Pr=U[re].firstChild.className.split(" "),or=0;or<Pr.length;++or){var Mr=Pr[or].match(/^language-(.+)$/);if(Mr!==null){dr=Mr[1];break}}tr=r.helper.unescapeHTMLEntities(tr),ee.push(tr),U[re].outerHTML='<precode language="'+dr+'" precodenum="'+re.toString()+'"></precode>'}else ee.push(U[re].innerHTML),U[re].innerHTML="",U[re].setAttribute("prenum",re.toString());return ee}return P},this.setOption=function(l,k){t[l]=k},this.getOption=function(l){return t[l]},this.getOptions=function(){return t},this.addExtension=function(l,k){k=k||null,T(l,k)},this.useExtension=function(l){T(l)},this.setFlavor=function(l){if(!m.hasOwnProperty(l))throw Error(l+" flavor was not found");var k=m[l];h=l;for(var C in k)k.hasOwnProperty(C)&&(t[C]=k[C])},this.getFlavor=function(){return h},this.removeExtension=function(l){r.helper.isArray(l)||(l=[l]);for(var k=0;k<l.length;++k){for(var C=l[k],L=0;L<u.length;++L)u[L]===C&&u[L].splice(L,1);for(var j=0;j<s.length;++L)s[j]===C&&s[j].splice(L,1)}},this.getAllExtensions=function(){return{language:u,output:s}},this.getMetadata=function(l){return l?f.raw:f.parsed},this.getMetadataFormat=function(){return f.format},this._setMetadataPair=function(l,k){f.parsed[l]=k},this._setMetadataFormat=function(l){f.format=l},this._setMetadataRaw=function(l){f.raw=l}},r.subParser("anchors",function(i,t,u){"use strict";i=u.converter._dispatch("anchors.before",i,t,u);var s=function(p,h,f,g,T,b,w){if(r.helper.isUndefined(w)&&(w=""),f=f.toLowerCase(),p.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)g="";else if(!g)if(f||(f=h.toLowerCase().replace(/ ?\n/g," ")),g="#"+f,!r.helper.isUndefined(u.gUrls[f]))g=u.gUrls[f],r.helper.isUndefined(u.gTitles[f])||(w=u.gTitles[f]);else return p;g=g.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var y='<a href="'+g+'"';return w!==""&&w!==null&&(w=w.replace(/"/g,"&quot;"),w=w.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),y+=' title="'+w+'"'),t.openLinksInNewWindow&&!/^#/.test(g)&&(y+=' rel="noopener noreferrer" target="\xA8E95Eblank"'),y+=">"+h+"</a>",y};return i=i.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,s),i=i.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,s),i=i.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,s),i=i.replace(/\[([^\[\]]+)]()()()()()/g,s),t.ghMentions&&(i=i.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function(p,h,f,g,T){if(f==="\\")return h+g;if(!r.helper.isString(t.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var b=t.ghMentionsLink.replace(/\{u}/g,T),w="";return t.openLinksInNewWindow&&(w=' rel="noopener noreferrer" target="\xA8E95Eblank"'),h+'<a href="'+b+'"'+w+">"+g+"</a>"})),i=u.converter._dispatch("anchors.after",i,t,u),i});var x=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,E=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,v=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,M=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,F=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,I=function(i){"use strict";return function(t,u,s,p,h,f,g){s=s.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var T=s,b="",w="",y=u||"",l=g||"";return/^www\./i.test(s)&&(s=s.replace(/^www\./i,"http://www.")),i.excludeTrailingPunctuationFromURLs&&f&&(b=f),i.openLinksInNewWindow&&(w=' rel="noopener noreferrer" target="\xA8E95Eblank"'),y+'<a href="'+s+'"'+w+
`;var s=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(s=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),i=i.replace(s,function(p){return p=p.replace(/^[ \t]*>[ \t]?/gm,""),p=p.replace(/¨0/g,""),p=p.replace(/^[ \t]+$/gm,""),p=r.subParser("githubCodeBlocks")(p,t,u),p=r.subParser("blockGamut")(p,t,u),p=p.replace(/(^|\n)/g,"$1 "),p=p.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(h,f){var g=f;return g=g.replace(/^ /mg,"\xA80"),g=g.replace(/¨0/g,""),g}),r.subParser("hashBlock")(`<blockquote>
`+p+`
</blockquote>`,t,u)}),i=u.converter._dispatch("blockQuotes.after",i,t,u),i}),r.subParser("codeBlocks",function(i,t,u){"use strict";i=u.converter._dispatch("codeBlocks.before",i,t,u),i+="\xA80";var s=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;return i=i.replace(s,function(p,h,f){var g=h,T=f,b=`
`;return g=r.subParser("outdent")(g,t,u),g=r.subParser("encodeCode")(g,t,u),g=r.subParser("detab")(g,t,u),g=g.replace(/^\n+/g,""),g=g.replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(b=""),g="<pre><code>"+g+b+"</code></pre>",r.subParser("hashBlock")(g,t,u)+T}),i=i.replace(/¨0/,""),i=u.converter._dispatch("codeBlocks.after",i,t,u),i}),r.subParser("codeSpans",function(i,t,u){"use strict";return i=u.converter._dispatch("codeSpans.before",i,t,u),typeof i=="undefined"&&(i=""),i=i.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(s,p,h,f){var g=f;return g=g.replace(/^([ \t]*)/g,""),g=g.replace(/[ \t]*$/g,""),g=r.subParser("encodeCode")(g,t,u),g=p+"<code>"+g+"</code>",g=r.subParser("hashHTMLSpans")(g,t,u),g}),i=u.converter._dispatch("codeSpans.after",i,t,u),i}),r.subParser("completeHTMLDocument",function(i,t,u){"use strict";if(!t.completeHTMLDocument)return i;i=u.converter._dispatch("completeHTMLDocument.before",i,t,u);var s="html",p=`<!DOCTYPE HTML>
`,h="",f=`<meta charset="utf-8">
`,g="",T="";typeof u.metadata.parsed.doctype!="undefined"&&(p="<!DOCTYPE "+u.metadata.parsed.doctype+`>
`,s=u.metadata.parsed.doctype.toString().toLowerCase(),(s==="html"||s==="html5")&&(f='<meta charset="utf-8">'));for(var b in u.metadata.parsed)if(u.metadata.parsed.hasOwnProperty(b))switch(b.toLowerCase()){case"doctype":break;case"title":h="<title>"+u.metadata.parsed.title+`</title>
`;break;case"charset":s==="html"||s==="html5"?f='<meta charset="'+u.metadata.parsed.charset+`">
`:f='<meta name="charset" content="'+u.metadata.parsed.charset+`">
`;break;case"language":case"lang":g=' lang="'+u.metadata.parsed[b]+'"',T+='<meta name="'+b+'" content="'+u.metadata.parsed[b]+`">
`;break;default:T+='<meta name="'+b+'" content="'+u.metadata.parsed[b]+`">
`}return i=p+"<html"+g+`>
<head>
`+h+f+T+`</head>
<body>
`+i.trim()+`
</body>
</html>`,i=u.converter._dispatch("completeHTMLDocument.after",i,t,u),i}),r.subParser("detab",function(i,t,u){"use strict";return i=u.converter._dispatch("detab.before",i,t,u),i=i.replace(/\t(?=\t)/g," "),i=i.replace(/\t/g,"\xA8A\xA8B"),i=i.replace(/¨B(.+?)¨A/g,function(s,p){for(var h=p,f=4-h.length%4,g=0;g<f;g++)h+=" ";return h}),i=i.replace(/¨A/g," "),i=i.replace(/¨B/g,""),i=u.converter._dispatch("detab.after",i,t,u),i}),r.subParser("ellipsis",function(i,t,u){"use strict";return i=u.converter._dispatch("ellipsis.before",i,t,u),i=i.replace(/\.\.\./g,"\u2026"),i=u.converter._dispatch("ellipsis.after",i,t,u),i}),r.subParser("emoji",function(i,t,u){"use strict";if(!t.emoji)return i;i=u.converter._dispatch("emoji.before",i,t,u);var s=/:([\S]+?):/g;return i=i.replace(s,function(p,h){return r.helper.emojis.hasOwnProperty(h)?r.helper.emojis[h]:p}),i=u.converter._dispatch("emoji.after",i,t,u),i}),r.subParser("encodeAmpsAndAngles",function(i,t,u){"use strict";return i=u.converter._dispatch("encodeAmpsAndAngles.before",i,t,u),i=i.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;"),i=i.replace(/<(?![a-z\/?$!])/gi,"&lt;"),i=i.replace(/</g,"&lt;"),i=i.replace(/>/g,"&gt;"),i=u.converter._dispatch("encodeAmpsAndAngles.after",i,t,u),i}),r.subParser("encodeBackslashEscapes",function(i,t,u){"use strict";return i=u.converter._dispatch("encodeBackslashEscapes.before",i,t,u),i=i.replace(/\\(\\)/g,r.helper.escapeCharactersCallback),i=i.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,r.helper.escapeCharactersCallback),i=u.converter._dispatch("encodeBackslashEscapes.after",i,t,u),i}),r.subParser("encodeCode",function(i,t,u){"use strict";return i=u.converter._dispatch("encodeCode.before",i,t,u),i=i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/([*_{}\[\]\\=~-])/g,r.helper.escapeCharactersCallback),i=u.converter._dispatch("encodeCode.after",i,t,u),i}),r.subParser("escapeSpecialCharsWithinTagAttributes",function(i,t,u){"use strict";i=u.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",i,t,u);var s=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,p=/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return i=i.replace(s,function(h){return h.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),i=i.replace(p,function(h){return h.replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),i=u.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",i,t,u),i}),r.subParser("githubCodeBlocks",function(i,t,u){"use strict";return t.ghCodeBlocks?(i=u.converter._dispatch("githubCodeBlocks.before",i,t,u),i+="\xA80",i=i.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(s,p,h,f){var g=t.omitExtraWLInCodeBlocks?"":`
`;return f=r.subParser("encodeCode")(f,t,u),f=r.subParser("detab")(f,t,u),f=f.replace(/^\n+/g,""),f=f.replace(/\n+$/g,""),f="<pre><code"+(h?' class="'+h+" language-"+h+'"':"")+">"+f+g+"</code></pre>",f=r.subParser("hashBlock")(f,t,u),`
\xA8G`+(u.ghCodeBlocks.push({text:s,codeblock:f})-1)+`G
`}),i=i.replace(/¨0/,""),u.converter._dispatch("githubCodeBlocks.after",i,t,u)):i}),r.subParser("hashBlock",function(i,t,u){"use strict";return i=u.converter._dispatch("hashBlock.before",i,t,u),i=i.replace(/(^\n+|\n+$)/g,""),i=`
\xA8K`+(u.gHtmlBlocks.push(i)-1)+`K
`,i=u.converter._dispatch("hashBlock.after",i,t,u),i}),r.subParser("hashCodeTags",function(i,t,u){"use strict";i=u.converter._dispatch("hashCodeTags.before",i,t,u);var s=function(p,h,f,g){var T=f+r.subParser("encodeCode")(h,t,u)+g;return"\xA8C"+(u.gHtmlSpans.push(T)-1)+"C"};return i=r.helper.replaceRecursiveRegExp(i,s,"<code\\b[^>]*>","</code>","gim"),i=u.converter._dispatch("hashCodeTags.after",i,t,u),i}),r.subParser("hashElement",function(i,t,u){"use strict";return function(s,p){var h=p;return h=h.replace(/\n\n/g,`
`),h=h.replace(/^\n/,""),h=h.replace(/\n+$/g,""),h=`
\xA8K`+(u.gHtmlBlocks.push(h)-1)+`K
`,h}}),r.subParser("hashHTMLBlocks",function(i,t,u){"use strict";i=u.converter._dispatch("hashHTMLBlocks.before",i,t,u);var s=["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"],p=function(l,k,C,L){var j=l;return C.search(/\bmarkdown\b/)!==-1&&(j=C+u.converter.makeHtml(k)+L),`
\xA8K`+(u.gHtmlBlocks.push(j)-1)+`K
`};t.backslashEscapesHTMLTags&&(i=i.replace(/\\<(\/?[^>]+?)>/g,function(l,k){return"&lt;"+k+"&gt;"}));for(var h=0;h<s.length;++h)for(var f,g=new RegExp("^ {0,3}(<"+s[h]+"\\b[^>]*>)","im"),T="<"+s[h]+"\\b[^>]*>",b="</"+s[h]+">";(f=r.helper.regexIndexOf(i,g))!==-1;){var w=r.helper.splitAtIndex(i,f),y=r.helper.replaceRecursiveRegExp(w[1],p,T,b,"im");if(y===w[1])break;i=w[0].concat(y)}return i=i.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(i,t,u)),i=r.helper.replaceRecursiveRegExp(i,function(l){return`
\xA8K`+(u.gHtmlBlocks.push(l)-1)+`K
`},"^ {0,3}<!--","-->","gm"),i=i.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(i,t,u)),i=u.converter._dispatch("hashHTMLBlocks.after",i,t,u),i}),r.subParser("hashHTMLSpans",function(i,t,u){"use strict";i=u.converter._dispatch("hashHTMLSpans.before",i,t,u);function s(p){return"\xA8C"+(u.gHtmlSpans.push(p)-1)+"C"}return i=i.replace(/<[^>]+?\/>/gi,function(p){return s(p)}),i=i.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(p){return s(p)}),i=i.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(p){return s(p)}),i=i.replace(/<[^>]+?>/gi,function(p){return s(p)}),i=u.converter._dispatch("hashHTMLSpans.after",i,t,u),i}),r.subParser("unhashHTMLSpans",function(i,t,u){"use strict";i=u.converter._dispatch("unhashHTMLSpans.before",i,t,u);for(var s=0;s<u.gHtmlSpans.length;++s){for(var p=u.gHtmlSpans[s],h=0;/¨C(\d+)C/.test(p);){var f=RegExp.$1;if(p=p.replace("\xA8C"+f+"C",u.gHtmlSpans[f]),h===10){console.error("maximum nesting of 10 spans reached!!!");break}++h}i=i.replace("\xA8C"+s+"C",p)}return i=u.converter._dispatch("unhashHTMLSpans.after",i,t,u),i}),r.subParser("hashPreCodeTags",function(i,t,u){"use strict";i=u.converter._dispatch("hashPreCodeTags.before",i,t,u);var s=function(p,h,f,g){var T=f+r.subParser("encodeCode")(h,t,u)+g;return`
\xA8G`+(u.ghCodeBlocks.push({text:p,codeblock:T})-1)+`G
`};return i=r.helper.replaceRecursiveRegExp(i,s,"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),i=u.converter._dispatch("hashPreCodeTags.after",i,t,u),i}),r.subParser("headers",function(i,t,u){"use strict";i=u.converter._dispatch("headers.before",i,t,u);var s=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),p=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,h=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;i=i.replace(p,function(T,b){var w=r.subParser("spanGamut")(b,t,u),y=t.noHeaderId?"":' id="'+g(b)+'"',l=s,k="<h"+l+y+">"+w+"</h"+l+">";return r.subParser("hashBlock")(k,t,u)}),i=i.replace(h,function(T,b){var w=r.subParser("spanGamut")(b,t,u),y=t.noHeaderId?"":' id="'+g(b)+'"',l=s+1,k="<h"+l+y+">"+w+"</h"+l+">";return r.subParser("hashBlock")(k,t,u)});var f=t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;i=i.replace(f,function(T,b,w){var y=w;t.customizedHeaderId&&(y=w.replace(/\s?\{([^{]+?)}\s*$/,""));var l=r.subParser("spanGamut")(y,t,u),k=t.noHeaderId?"":' id="'+g(w)+'"',C=s-1+b.length,L="<h"+C+k+">"+l+"</h"+C+">";return r.subParser("hashBlock")(L,t,u)});function g(T){var b,w;if(t.customizedHeaderId){var y=T.match(/\{([^{]+?)}\s*$/);y&&y[1]&&(T=y[1])}return b=T,r.helper.isString(t.prefixHeaderId)?w=t.prefixHeaderId:t.prefixHeaderId===!0?w="section-":w="",t.rawPrefixHeaderId||(b=w+b),t.ghCompatibleHeaderId?b=b.replace(/ /g,"-").replace(/&amp;/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?b=b.replace(/ /g,"-").replace(/&amp;/g,"&").replace(/¨T/g,"\xA8").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():b=b.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(b=w+b),u.hashLinkCounts[b]?b=b+"-"+u.hashLinkCounts[b]++:u.hashLinkCounts[b]=1,b}return i=u.converter._dispatch("headers.after",i,t,u),i}),r.subParser("horizontalRule",function(i,t,u){"use strict";i=u.converter._dispatch("horizontalRule.before",i,t,u);var s=r.subParser("hashBlock")("<hr />",t,u);return i=i.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,s),i=i.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,s),i=i.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,s),i=u.converter._dispatch("horizontalRule.after",i,t,u),i}),r.subParser("images",function(i,t,u){"use strict";i=u.converter._dispatch("images.before",i,t,u);var s=/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,p=/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,h=/!\[([^\]]*?)][ \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,f=/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,g=/!\[([^\[\]]+)]()()()()()/g;function T(w,y,l,k,C,L,j,P){return k=k.replace(/\s/g,""),b(w,y,l,k,C,L,j,P)}function b(w,y,l,k,C,L,j,P){var q=u.gUrls,Y=u.gTitles,J=u.gDimensions;if(l=l.toLowerCase(),P||(P=""),w.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)k="";else if(k===""||k===null)if((l===""||l===null)&&(l=y.toLowerCase().replace(/ ?\n/g," ")),k="#"+l,!r.helper.isUndefined(q[l]))k=q[l],r.helper.isUndefined(Y[l])||(P=Y[l]),r.helper.isUndefined(J[l])||(C=J[l].width,L=J[l].height);else return w;y=y.replace(/"/g,"&quot;").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),k=k.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var D='<img src="'+k+'" alt="'+y+'"';return P&&r.helper.isString(P)&&(P=P.replace(/"/g,"&quot;").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),D+=' title="'+P+'"'),C&&L&&(C=C==="*"?"auto":C,L=L==="*"?"auto":L,D+=' width="'+C+'"',D+=' height="'+L+'"'),D+=" />",D}return i=i.replace(f,b),i=i.replace(h,T),i=i.replace(p,b),i=i.replace(s,b),i=i.replace(g,b),i=u.converter._dispatch("images.after",i,t,u),i}),r.subParser("italicsAnd
`),f+="\xA80";var T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,b=/\n[ \t]*\n(?!¨0)/.test(f);return t.disableForced4SpacesIndentedSublists&&(T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),f=f.replace(T,function(w,y,l,k,C,L,j){j=j&&j.trim()!=="";var P=r.subParser("outdent")(C,t,u),q="";return L&&t.tasklists&&(q=' class="task-list-item" style="list-style-type: none;"',P=P.replace(/^[ \t]*\[(x|X| )?]/m,function(){var Y='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return j&&(Y+=" checked"),Y+=">",Y})),P=P.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(Y){return"\xA8A"+Y}),y||P.search(/\n{2,}/)>-1?(P=r.subParser("githubCodeBlocks")(P,t,u),P=r.subParser("blockGamut")(P,t,u)):(P=r.subParser("lists")(P,t,u),P=P.replace(/\n$/,""),P=r.subParser("hashHTMLBlocks")(P,t,u),P=P.replace(/\n\n+/g,`
`),b?P=r.subParser("paragraphs")(P,t,u):P=r.subParser("spanGamut")(P,t,u)),P=P.replace("\xA8A",""),P="<li"+q+">"+P+`</li>
`,P}),f=f.replace(/¨0/g,""),u.gListLevel--,g&&(f=f.replace(/\s+$/,"")),f}function p(f,g){if(g==="ol"){var T=f.match(/^ *(\d+)\./);if(T&&T[1]!=="1")return' start="'+T[1]+'"'}return""}function h(f,g,T){var b=t.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,w=t.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,y=g==="ul"?b:w,l="";if(f.search(y)!==-1)(function C(L){var j=L.search(y),P=p(f,g);j!==-1?(l+=`
<`+g+P+`>
`+s(L.slice(0,j),!!T)+"</"+g+`>
`,g=g==="ul"?"ol":"ul",y=g==="ul"?b:w,C(L.slice(j))):l+=`
<`+g+P+`>
`+s(L,!!T)+"</"+g+`>
`})(f);else{var k=p(f,g);l=`
<`+g+k+`>
`+s(f,!!T)+"</"+g+`>
`}return l}return i=u.converter._dispatch("lists.before",i,t,u),i+="\xA80",u.gListLevel?i=i.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(f,g,T){var b=T.search(/[*+-]/g)>-1?"ul":"ol";return h(g,b,!0)}):i=i.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(f,g,T,b){var w=b.search(/[*+-]/g)>-1?"ul":"ol";return h(T,w,!1)}),i=i.replace(/¨0/,""),i=u.converter._dispatch("lists.after",i,t,u),i}),r.subParser("metadata",function(i,t,u){"use strict";if(!t.metadata)return i;i=u.converter._dispatch("metadata.before",i,t,u);function s(p){u.metadata.raw=p,p=p.replace(/&/g,"&amp;").replace(/"/g,"&quot;"),p=p.replace(/\n {4}/g," "),p.replace(/^([\S ]+): +([\s\S]+?)$/gm,function(h,f,g){return u.metadata.parsed[f]=g,""})}return i=i.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(p,h,f){return s(f),"\xA8M"}),i=i.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(p,h,f){return h&&(u.metadata.format=h),s(f),"\xA8M"}),i=i.replace(/¨M/g,""),i=u.converter._dispatch("metadata.after",i,t,u),i}),r.subParser("outdent",function(i,t,u){"use strict";return i=u.converter._dispatch("outdent.before",i,t,u),i=i.replace(/^(\t|[ ]{1,4})/gm,"\xA80"),i=i.replace(/¨0/g,""),i=u.converter._dispatch("outdent.after",i,t,u),i}),r.subParser("paragraphs",function(i,t,u){"use strict";i=u.converter._dispatch("paragraphs.before",i,t,u),i=i.replace(/^\n+/g,""),i=i.replace(/\n+$/g,"");for(var s=i.split(/\n{2,}/g),p=[],h=s.length,f=0;f<h;f++){var g=s[f];g.search(/¨(K|G)(\d+)\1/g)>=0?p.push(g):g.search(/\S/)>=0&&(g=r.subParser("spanGamut")(g,t,u),g=g.replace(/^([ \t]*)/g,"<p>"),g+="</p>",p.push(g))}for(h=p.length,f=0;f<h;f++){for(var T="",b=p[f],w=!1;/¨(K|G)(\d+)\1/.test(b);){var y=RegExp.$1,l=RegExp.$2;y==="K"?T=u.gHtmlBlocks[l]:w?T=r.subParser("encodeCode")(u.ghCodeBlocks[l].text,t,u):T=u.ghCodeBlocks[l].codeblock,T=T.replace(/\$/g,"$$$$"),b=b.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,T),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(b)&&(w=!0)}p[f]=b}return i=p.join(`
`),i=i.replace(/^\n+/g,""),i=i.replace(/\n+$/g,""),u.converter._dispatch("paragraphs.after",i,t,u)}),r.subParser("runExtension",function(i,t,u,s){"use strict";if(i.filter)t=i.filter(t,s.converter,u);else if(i.regex){var p=i.regex;p instanceof RegExp||(p=new RegExp(p,"g")),t=t.replace(p,i.replace)}return t}),r.subParser("spanGamut",function(i,t,u){"use strict";return i=u.converter._dispatch("spanGamut.before",i,t,u),i=r.subParser("codeSpans")(i,t,u),i=r.subParser("escapeSpecialCharsWithinTagAttributes")(i,t,u),i=r.subParser("encodeBackslashEscapes")(i,t,u),i=r.subParser("images")(i,t,u),i=r.subParser("anchors")(i,t,u),i=r.subParser("autoLinks")(i,t,u),i=r.subParser("simplifiedAutoLinks")(i,t,u),i=r.subParser("emoji")(i,t,u),i=r.subParser("underline")(i,t,u),i=r.subParser("italicsAndBold")(i,t,u),i=r.subParser("strikethrough")(i,t,u),i=r.subParser("ellipsis")(i,t,u),i=r.subParser("hashHTMLSpans")(i,t,u),i=r.subParser("encodeAmpsAndAngles")(i,t,u),t.simpleLineBreaks?/\n\n¨K/.test(i)||(i=i.replace(/\n+/g,`<br />
`)):i=i.replace(/ +\n/g,`<br />
`),i=u.converter._dispatch("spanGamut.after",i,t,u),i}),r.subParser("strikethrough",function(i,t,u){"use strict";function s(p){return t.simplifiedAutoLink&&(p=r.subParser("simplifiedAutoLinks")(p,t,u)),"<del>"+p+"</del>"}return t.strikethrough&&(i=u.converter._dispatch("strikethrough.before",i,t,u),i=i.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(p,h){return s(h)}),i=u.converter._dispatch("strikethrough.after",i,t,u)),i}),r.subParser("stripLinkDefinitions",function(i,t,u){"use strict";var s=/^ {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,p=/^ {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;i+="\xA80";var h=function(f,g,T,b,w,y,l){return g=g.toLowerCase(),T.match(/^data:.+?\/.+?;base64,/)?u.gUrls[g]=T.replace(/\s/g,""):u.gUrls[g]=r.subParser("encodeAmpsAndAngles")(T,t,u),y?y+l:(l&&(u.gTitles[g]=l.replace(/"|'/g,"&quot;")),t.parseImgDimensions&&b&&w&&(u.gDimensions[g]={width:b,height:w}),"")};return i=i.replace(p,h),i=i.replace(s,h),i=i.replace(/¨0/,""),i}),r.subParser("tables",function(i,t,u){"use strict";if(!t.tables)return i;var s=/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,p=/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;function h(w){return/^:[ \t]*--*$/.test(w)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(w)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(w)?' style="text-align:center;"':""}function f(w,y){var l="";return w=w.trim(),(t.tablesHeaderId||t.tableHeaderId)&&(l=' id="'+w.replace(/ /g,"_").toLowerCase()+'"'),w=r.subParser("spanGamut")(w,t,u),"<th"+l+y+">"+w+`</th>
`}function g(w,y){var l=r.subParser("spanGamut")(w,t,u);return"<td"+y+">"+l+`</td>
`}function T(w,y){for(var l=`<table>
<thead>
<tr>
`,k=w.length,C=0;C<k;++C)l+=w[C];for(l+=`</tr>
</thead>
<tbody>
`,C=0;C<y.length;++C){l+=`<tr>
`;for(var L=0;L<k;++L)l+=y[C][L];l+=`</tr>
`}return l+=`</tbody>
</table>
`,l}function b(w){var y,l=w.split(`
`);for(y=0;y<l.length;++y)/^ {0,3}\|/.test(l[y])&&(l[y]=l[y].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(l[y])&&(l[y]=l[y].replace(/\|[ \t]*$/,"")),l[y]=r.subParser("codeSpans")(l[y],t,u);var k=l[0].split("|").map(function(D){return D.trim()}),C=l[1].split("|").map(function(D){return D.trim()}),L=[],j=[],P=[],q=[];for(l.shift(),l.shift(),y=0;y<l.length;++y)l[y].trim()!==""&&L.push(l[y].split("|").map(function(D){return D.trim()}));if(k.length<C.length)return w;for(y=0;y<C.length;++y)P.push(h(C[y]));for(y=0;y<k.length;++y)r.helper.isUndefined(P[y])&&(P[y]=""),j.push(f(k[y],P[y]));for(y=0;y<L.length;++y){for(var Y=[],J=0;J<j.length;++J)r.helper.isUndefined(L[y][J]),Y.push(g(L[y][J],P[J]));q.push(Y)}return T(j,q)}return i=u.converter._dispatch("tables.before",i,t,u),i=i.replace(/\\(\|)/g,r.helper.escapeCharactersCallback),i=i.replace(s,b),i=i.replace(p,b),i=u.converter._dispatch("tables.after",i,t,u),i}),r.subParser("underline",function(i,t,u){"use strict";return t.underline&&(i=u.converter._dispatch("underline.before",i,t,u),t.literalMidWordUnderscores?(i=i.replace(/\b___(\S[\s\S]*?)___\b/g,function(s,p){return"<u>"+p+"</u>"}),i=i.replace(/\b__(\S[\s\S]*?)__\b/g,function(s,p){return"<u>"+p+"</u>"})):(i=i.replace(/___(\S[\s\S]*?)___/g,function(s,p){return/\S$/.test(p)?"<u>"+p+"</u>":s}),i=i.replace(/__(\S[\s\S]*?)__/g,function(s,p){return/\S$/.test(p)?"<u>"+p+"</u>":s})),i=i.replace(/(_)/g,r.helper.escapeCharactersCallback),i=u.converter._dispatch("underline.after",i,t,u)),i}),r.subParser("unescapeSpecialChars",function(i,t,u){"use strict";return i=u.converter._dispatch("unescapeSpecialChars.before",i,t,u),i=i.replace(/¨E(\d+)E/g,function(s,p){var h=parseInt(p);return String.fromCharCode(h)}),i=u.converter._dispatch("unescapeSpecialChars.after",i,t,u),i}),r.subParser("makeMarkdown.blockquote",function(i,t){"use strict";var u="";if(i.hasChildNodes())for(var s=i.childNodes,p=s.length,h=0;h<p;++h){var f=r.subParser("makeMarkdown.node")(s[h],t);f!==""&&(u+=f)}return u=u.trim(),u="> "+u.split(`
`).join(`
> `),u}),r.subParser("makeMarkdown.codeBlock",function(i,t){"use strict";var u=i.getAttribute("language"),s=i.getAttribute("precodenum");return"```"+u+`
`+t.preList[s]+"\n```"}),r.subParser("makeMarkdown.codeSpan",function(i){"use strict";return"`"+i.innerHTML+"`"}),r.subParser("makeMarkdown.emphasis",function(i,t){"use strict";var u="";if(i.hasChildNodes()){u+="*";for(var s=i.childNodes,p=s.length,h=0;h<p;++h)u+=r.subParser("makeMarkdown.node")(s[h],t);u+="*"}return u}),r.subParser("makeMarkdown.header",function(i,t,u){"use strict";var s=new Array(u+1).join("#"),p="";if(i.hasChildNodes()){p=s+" ";for(var h=i.childNodes,f=h.length,g=0;g<f;++g)p+=r.subParser("makeMarkdown.node")(h[g],t)}return p}),r.subParser("makeMarkdown.hr",function(){"use strict";return"---"}),r.subParser("makeMarkdown.image",function(i){"use strict";var t="";return i.hasAttribute("src")&&(t+="!["+i.getAttribute("alt")+"](",t+="<"+i.getAttribute("src")+">",i.hasAttribute("width")&&i.hasAttribute("height")&&(t+=" ="+i.getAttribute("width")+"x"+i.getAttribute("height")),i.hasAttribute("title")&&(t+=' "'+i.getAttribute("title")+'"'),t+=")"),t}),r.subParser("makeMarkdown.links",function(i,t){"use strict";var u="";if(i.hasChildNodes()&&i.hasAttribute("href")){var s=i.childNodes,p=s.length;u="[";for(var h=0;h<p;++h)u+=r.subParser("makeMarkdown.node")(s[h],t);u+="](",u+="<"+i.getAttribute("href")+">",i.hasAttribute("title")&&(u+=' "'+i.getAttribute("title")+'"'),u+=")"}return u}),r.subParser("makeMarkdown.list",function(i,t,u){"use strict";var s="";if(!i.hasChildNodes())return"";for(var p=i.childNodes,h=p.length,f=i.getAttribute("start")||1,g=0;g<h;++g)if(!(typeof p[g].tagName=="undefined"||p[g].tagName.toLowerCase()!=="li")){var T="";u==="ol"?T=f.toString()+". ":T="- ",s+=T+r.subParser("makeMarkdown.listItem")(p[g],t),++f}return s+=`
<!-- -->
`,s.trim()}),r.subParser("makeMarkdown.listItem",function(i,t){"use strict";for(var u="",s=i.childNodes,p=s.length,h=0;h<p;++h)u+=r.subParser("makeMarkdown.node")(s[h],t);return/\n$/.test(u)?u=u.split(`
`).join(`
`).replace(/^ {4}$/gm,"").replace(/\n\n+/g,`
`):u+=`
`,u}),r.subParser("makeMarkdown.node",function(i,t,u){"use strict";u=u||!1;var s="";if(i.nodeType===3)return r.subParser("makeMarkdown.txt")(i,t);if(i.nodeType===8)return"<!--"+i.data+`-->
`;if(i.nodeType!==1)return"";var p=i.tagName.toLowerCase();switch(p){case"h1":u||(s=r.subParser("makeMarkdown.header")(i,t,1)+`
`);break;case"h2":u||(s=r.subParser("makeMarkdown.header")(i,t,2)+`
`);break;case"h3":u||(s=r.subParser("makeMarkdown.header")(i,t,3)+`
`);break;case"h4":u||(s=r.subParser("makeMarkdown.header")(i,t,4)+`
`);break;case"h5":u||(s=r.subParser("makeMarkdown.header")(i,t,5)+`
`);break;case"h6":u||(s=r.subParser("makeMarkdown.header")(i,t,6)+`
`);break;case"p":u||(s=r.subParser("makeMarkdown.paragraph")(i,t)+`
`);break;case"blockquote":u||(s=r.subParser("makeMarkdown.blockquote")(i,t)+`
`);break;case"hr":u||(s=r.subParser("makeMarkdown.hr")(i,t)+`
`);break;case"ol":u||(s=r.subParser("makeMarkdown.list")(i,t,"ol")+`
`);break;case"ul":u||(s=r.subParser("makeMarkdown.list")(i,t,"ul")+`
`);break;case"precode":u||(s=r.subParser("makeMarkdown.codeBlock")(i,t)+`
`);break;case"pre":u||(s=r.subParser("makeMarkdown.pre")(i,t)+`
`);break;case"table":u||(s=r.subParser("makeMarkdown.table")(i,t)+`
`);break;case"code":s=r.subParser("makeMarkdown.codeSpan")(i,t);break;case"em":case"i":s=r.subParser("makeMarkdown.emphasis")(i,t);break;case"strong":case"b":s=r.subParser("makeMarkdown.strong")(i,t);break;case"del":s=r.subParser("makeMarkdown.strikethrough")(i,t);break;case"a":s=r.subParser("makeMarkdown.links")(i,t);break;case"img":s=r.subParser("makeMarkdown.image")(i,t);break;default:s=i.outerHTML+`
`}return s}),r.subParser("makeMarkdown.paragraph",function(i,t){"use strict";var u="";if(i.hasChildNodes())for(var s=i.childNodes,p=s.length,h=0;h<p;++h)u+=r.subParser("makeMarkdown.node")(s[h],t);return u=u.trim(),u}),r.subParser("makeMarkdown.pre",function(i,t){"use strict";var u=i.getAttribute("prenum");return"<pre>"+t.preList[u]+"</pre>"}),r.subParser("makeMarkdown.strikethrough",function(i,t){"use strict";var u="";if(i.hasChildNodes()){u+="~~";for(var s=i.childNodes,p=s.length,h=0;h<p;++h)u+=r.subParser("makeMarkdown.node")(s[h],t);u+="~~"}return u}),r.subParser("makeMarkdown.strong",function(i,t){"use strict";var u="";if(i.hasChildNodes()){u+="**";for(var s=i.childNodes,p=s.length,h=0;h<p;++h)u+=r.subParser("makeMarkdown.node")(s[h],t);u+="**"}return u}),r.subParser("makeMarkdown.table",function(i,t){"use strict";var u="",s=[[],[]],p=i.querySelectorAll("thead>tr>th"),h=i.querySelectorAll("tbody>tr"),f,g;for(f=0;f<p.length;++f){var T=r.subParser("makeMarkdown.tableCell")(p[f],t),b="---";if(p[f].hasAttribute("style")){var w=p[f].getAttribute("style").toLowerCase().replace(/\s/g,"");switch(w){case"text-align:left;":b=":---";break;case"text-align:right;":b="---:";break;case"text-align:center;":b=":---:";break}}s[0][f]=T.trim(),s[1][f]=b}for(f=0;f<h.length;++f){var y=s.push([])-1,l=h[f].getElementsByTagName("td");for(g=0;g<p.length;++g){var k=" ";typeof l[g]!="undefined"&&(k=r.subParser("makeMarkdown.tableCell")(l[g],t)),s[y].push(k)}}var C=3;for(f=0;f<s.length;++f)for(g=0;g<s[f].length;++g){var L=s[f][g].length;L>C&&(C=L)}for(f=0;f<s.length;++f){for(g=0;g<s[f].length;++g)f===1?s[f][g].slice(-1)===":"?s[f][g]=r.helper.padEnd(s[f][g].slice(-1),C-1,"-")+":":s[f][g]=r.helper.padEnd(s[f][g],C,"-"):s[f][g]=r.helper.padEnd(s[f][g],C);u+="| "+s[f].join(" | ")+` |
`}return u.trim()}),r.subParser("makeMarkdown.tableCell",function(i,t){"use strict";var u="";if(!i.hasChildNodes())return"";for(var s=i.childNodes,p=s.length,h=0;h<p;++h)u+=r.subParser("makeMarkdown.node")(s[h],t,!0);return u.trim()}),r.subParser("makeMarkdown.txt",function(i){"use strict";var t=i.nodeValue;return t=t.replace(/ +/g," "),t=t.replace(/¨NBSP;/g," "),t=r.helper.unescapeHTMLEntities(t),t=t.replace(/([*_~|`])/g,"\\$1"),t=t.replace(/^(\s*)>/g,"\\$1>"),t=t.replace(/^#/gm,"\\#"),t=t.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),t=t.replace(/^( {0,3}\d+)\./gm,"$1\\."),t=t.replace(/^( {0,3})([+-])/gm,"$1\\$2"),t=t.replace(/]([\s]*)\(/g,"\\]$1\\("),t=t.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),t});var ue=this;typeof define=="function"&&define.amd?define(function(){"use strict";return r}):typeof Ue!="undefined"&&Ue.exports?Ue.exports=r:ue.showdown=r}).call(Ur)});var pe=H((hl,fe)=>{"use strict";function Gr(e){return typeof e=="undefined"||e===null}function Vu(e){return typeof e=="object"&&e!==null}function Wu(e){return Array.isArray(e)?e:Gr(e)?[]:[e]}function Gu(e,n){var r,a,d,o;if(n)for(o=Object.keys(n),r=0,a=o.length;r<a;r+=1)d=o[r],e[d]=n[d];return e}function Yu(e,n){var r="",a;for(a=0;a<n;a+=1)r+=e;return r}function Ku(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}fe.exports.isNothing=Gr;fe.exports.isObject=Vu;fe.exports.toArray=Wu;fe.exports.repeat=Yu;fe.exports.isNegativeZero=Ku;fe.exports.extend=Gu});var ve=H((gl,Yr)=>{"use strict";function Me(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Me.prototype=Object.create(Error.prototype);Me.prototype.constructor=Me;Me.prototype.toString=function(n){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!n&&this.mark&&(r+=" "+this.mark.toString()),r};Yr.exports=Me});var Zr=H((_l,Jr)=>{"use strict";var Kr=pe();function pr(e,n,r,a,d){this.name=e,this.buffer=n,this.position=r,this.line=a,this.column=d}pr.prototype.getSnippet=function(n,r){var a,d,o,c,m;if(!this.buffer)return null;for(n=n||4,r=r||75,a="",d=this.position;d>0&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(d-1))===-1;)if(d-=1,this.position-d>r/2-1){a=" ... ",d+=5;break}for(o="",c=this.position;c<this.buffer.length&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(c))===-1;)if(c+=1,c-this.position>r/2-1){o=" ... ",c-=5;break}return m=this.buffer.slice(d,c),Kr.repeat(" ",n)+a+m+o+`
`+Kr.repeat(" ",n+this.position-d+a.length)+"^"};pr.prototype.toString=function(n){var r,a="";return this.name&&(a+='in "'+this.name+'" '),a+="at line "+(this.line+1)+", column "+(this.column+1),n||(r=this.getSnippet(),r&&(a+=`:
`+r)),a};Jr.exports=pr});var V=H((wl,Xr)=>{"use strict";var Qr=ve(),Ju=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Zu=["scalar","sequence","mapping"];function Qu(e){var n={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(a){n[String(a)]=r})}),n}function Xu(e,n){if(n=n||{},Object.keys(n).forEach(function(r){if(Ju.indexOf(r)===-1)throw new Qr('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(r){return r},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.defaultStyle=n.defaultStyle||null,this.styleAliases=Qu(n.styleAliases||null),Zu.indexOf(this.kind)===-1)throw new Qr('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}Xr.exports=Xu});var me=H((bl,rn)=>{"use strict";var en=pe(),Ge=ve(),ea=V();function mr(e,n,r){var a=[];return e.include.forEach(function(d){r=mr(d,n,r)}),e[n].forEach(function(d){r.forEach(function(o,c){o.tag===d.tag&&o.kind===d.kind&&a.push(c)}),r.push(d)}),r.filter(function(d,o){return a.indexOf(o)===-1})}function ra(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},n,r;function a(d){e[d.kind][d.tag]=e.fallback[d.tag]=d}for(n=0,r=arguments.length;n<r;n+=1)arguments[n].forEach(a);return e}function ye(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(n){if(n.loadKind&&n.loadKind!=="scalar")throw new Ge("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=mr(this,"implicit",[]),this.compiledExplicit=mr(this,"explicit",[]),this.compiledTypeMap=ra(this.compiledImplicit,this.compiledExplicit)}ye.DEFAULT=null;ye.create=function(){var n,r;switch(arguments.length){case 1:n=ye.DEFAULT,r=arguments[0];break;case 2:n=arguments[0],r=arguments[1];break;default:throw new Ge("Wrong number of arguments for Schema.create function")}if(n=en.toArray(n),r=en.toArray(r),!n.every(function(a){return a instanceof ye}))throw new Ge("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(a){return a instanceof ea}))throw new Ge("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new ye({include:n,explicit:r})};rn.exports=ye});var un=H((vl,nn)=>{"use strict";var na=V();nn.exports=new na("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var tn=H((yl,an)=>{"use strict";var ia=V();an.exports=new ia("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var on=H((kl,dn)=>{"use strict";var ua=V();dn.exports=new ua("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Ye=H((Tl,cn)=>{"use strict";var aa=me();cn.exports=new aa({explicit:[un(),tn(),on()]})});var ln=H((Al,sn)=>{"use strict";var ta=V();function da(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function oa(){return null}function ca(e){return e===null}sn.exports=new ta("tag:yaml.org,2002:null",{kind:"scalar",resolve:da,construct:oa,predicate:ca,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var pn=H((xl,fn)=>{"use strict";var sa=V();function la(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function fa(e){return e==="true"||e==="True"||e==="TRUE"}function pa(e){return Object.prototype.toString.call(e)==="[object Boolean]"}fn.exports=new sa("tag:yaml.org,2002:bool",{kind:"scalar",resolve:la,construct:fa,predicate:pa,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"Fa
\r`;function Oa(e){if(e===null)return!1;var n,r,a=0,d=e.length,o=_r;for(r=0;r<d;r++)if(n=o.indexOf(e.charAt(r)),!(n>64)){if(n<0)return!1;a+=6}return a%8==0}function Da(e){var n,r,a=e.replace(/[\r\n=]/g,""),d=a.length,o=_r,c=0,m=[];for(n=0;n<d;n++)n%4==0&&n&&(m.push(c>>16&255),m.push(c>>8&255),m.push(c&255)),c=c<<6|o.indexOf(a.charAt(n));return r=d%4*6,r===0?(m.push(c>>16&255),m.push(c>>8&255),m.push(c&255)):r===18?(m.push(c>>10&255),m.push(c>>2&255)):r===12&&m.push(c>>4&255),he?he.from?he.from(m):new he(m):m}function Na(e){var n="",r=0,a,d,o=e.length,c=_r;for(a=0;a<o;a++)a%3==0&&a&&(n+=c[r>>18&63],n+=c[r>>12&63],n+=c[r>>6&63],n+=c[r&63]),r=(r<<8)+e[a];return d=o%3,d===0?(n+=c[r>>18&63],n+=c[r>>12&63],n+=c[r>>6&63],n+=c[r&63]):d===2?(n+=c[r>>10&63],n+=c[r>>4&63],n+=c[r<<2&63],n+=c[64]):d===1&&(n+=c[r>>2&63],n+=c[r<<4&63],n+=c[64],n+=c[64]),n}function Ba(e){return he&&he.isBuffer(e)}Sn.exports=new za("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Oa,construct:Da,predicate:Ba,represent:Na})});var Mn=H((Il,Pn)=>{"use strict";var qa=V(),$a=Object.prototype.hasOwnProperty,Ua=Object.prototype.toString;function Va(e){if(e===null)return!0;var n=[],r,a,d,o,c,m=e;for(r=0,a=m.length;r<a;r+=1){if(d=m[r],c=!1,Ua.call(d)!=="[object Object]")return!1;for(o in d)if($a.call(d,o))if(!c)c=!0;else return!1;if(!c)return!1;if(n.indexOf(o)===-1)n.push(o);else return!1}return!0}function Wa(e){return e!==null?e:[]}Pn.exports=new qa("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Va,construct:Wa})});var In=H((Fl,Rn)=>{"use strict";var Ga=V(),Ya=Object.prototype.toString;function Ka(e){if(e===null)return!0;var n,r,a,d,o,c=e;for(o=new Array(c.length),n=0,r=c.length;n<r;n+=1){if(a=c[n],Ya.call(a)!=="[object Object]"||(d=Object.keys(a),d.length!==1))return!1;o[n]=[d[0],a[d[0]]]}return!0}function Ja(e){if(e===null)return[];var n,r,a,d,o,c=e;for(o=new Array(c.length),n=0,r=c.length;n<r;n+=1)a=c[n],d=Object.keys(a),o[n]=[d[0],a[d[0]]];return o}Rn.exports=new Ga("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ka,construct:Ja})});var jn=H((jl,Fn)=>{"use strict";var Za=V(),Qa=Object.prototype.hasOwnProperty;function Xa(e){if(e===null)return!0;var n,r=e;for(n in r)if(Qa.call(r,n)&&r[n]!==null)return!1;return!0}function et(e){return e!==null?e:{}}Fn.exports=new Za("tag:yaml.org,2002:set",{kind:"mapping",resolve:Xa,construct:et})});var ke=H((Hl,Hn)=>{"use strict";var rt=me();Hn.exports=new rt({include:[gr()],implicit:[An(),En()],explicit:[Ln(),Mn(),In(),jn()]})});var On=H((zl,zn)=>{"use strict";var nt=V();function it(){return!0}function ut(){}function at(){return""}function tt(e){return typeof e=="undefined"}zn.exports=new nt("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:it,construct:ut,predicate:tt,represent:at})});var Nn=H((Ol,Dn)=>{"use strict";var dt=V();function ot(e){if(e===null||e.length===0)return!1;var n=e,r=/\/([gim]*)$/.exec(e),a="";return!(n[0]==="/"&&(r&&(a=r[1]),a.length>3||n[n.length-a.length-1]!=="/"))}function ct(e){var n=e,r=/\/([gim]*)$/.exec(e),a="";return n[0]==="/"&&(r&&(a=r[1]),n=n.slice(1,n.length-a.length-1)),new RegExp(n,a)}function st(e){var n="/"+e.source+"/";return e.global&&(n+="g"),e.multiline&&(n+="m"),e.ignoreCase&&(n+="i"),n}function lt(e){return Object.prototype.toString.call(e)==="[object RegExp]"}Dn.exports=new dt("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:ot,construct:ct,predicate:lt,represent:st})});var $n=H((Dl,qn)=>{"use strict";var Ke;try{Bn=require,Ke=Bn("esprima")}catch(e){typeof window!="undefined"&&(Ke=window.esprima)}var Bn,ft=V();function pt(e){if(e===null)return!1;try{var n="("+e+")",r=Ke.parse(n,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch(a){return!1}}function mt(e){var n="("+e+")",r=Ke.parse(n,{range:!0}),a=[],d;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function Et(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var ri=new Array(256),ni=new Array(256);for(_e=0;_e<256;_e++)ri[_e]=ei(_e)?1:0,ni[_e]=ei(_e);var _e;function Ct(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||wt,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function ii(e,n){return new Wn(n,new _t(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function R(e,n){throw ii(e,n)}function Qe(e,n){e.onWarning&&e.onWarning.call(null,ii(e,n))}var ui={YAML:function(n,r,a){var d,o,c;n.version!==null&&R(n,"duplication of %YAML directive"),a.length!==1&&R(n,"YAML directive accepts exactly one argument"),d=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),d===null&&R(n,"ill-formed argument of the YAML directive"),o=parseInt(d[1],10),c=parseInt(d[2],10),o!==1&&R(n,"unacceptable YAML version of the document"),n.version=a[0],n.checkLineBreaks=c<2,c!==1&&c!==2&&Qe(n,"unsupported YAML version of the document")},TAG:function(n,r,a){var d,o;a.length!==2&&R(n,"TAG directive accepts exactly two arguments"),d=a[0],o=a[1],Zn.test(d)||R(n,"ill-formed tag handle (first argument) of the TAG directive"),ce.call(n.tagMap,d)&&R(n,'there is a previously declared suffix for "'+d+'" tag handle'),Qn.test(o)||R(n,"ill-formed tag prefix (second argument) of the TAG directive"),n.tagMap[d]=o}};function se(e,n,r,a){var d,o,c,m;if(n<r){if(m=e.input.slice(n,r),a)for(d=0,o=m.length;d<o;d+=1)c=m.charCodeAt(d),c===9||32<=c&&c<=1114111||R(e,"expected valid JSON character");else vt.test(m)&&R(e,"the stream contains non-printable characters");e.result+=m}}function ai(e,n,r,a){var d,o,c,m;for(oe.isObject(r)||R(e,"cannot merge mappings; the provided source object is unacceptable"),d=Object.keys(r),c=0,m=d.length;c<m;c+=1)o=d[c],ce.call(n,o)||(n[o]=r[o],a[o]=!0)}function Ae(e,n,r,a,d,o,c,m){var _,A;if(Array.isArray(d))for(d=Array.prototype.slice.call(d),_=0,A=d.length;_<A;_+=1)Array.isArray(d[_])&&R(e,"nested arrays are not supported inside keys"),typeof d=="object"&&Xn(d[_])==="[object Object]"&&(d[_]="[object Object]");if(typeof d=="object"&&Xn(d)==="[object Object]"&&(d="[object Object]"),d=String(d),n===null&&(n={}),a==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(_=0,A=o.length;_<A;_+=1)ai(e,n,o[_],r);else ai(e,n,o,r);else!e.json&&!ce.call(r,d)&&ce.call(n,d)&&(e.line=c||e.line,e.position=m||e.position,R(e,"duplicated mapping key")),n[d]=o,delete r[d];return n}function br(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):R(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function $(e,n,r){for(var a=0,d=e.input.charCodeAt(e.position);d!==0;){for(;ge(d);)d=e.input.charCodeAt(++e.position);if(n&&d===35)do d=e.input.charCodeAt(++e.position);while(d!==10&&d!==13&&d!==0);if(ae(d))for(br(e),d=e.input.charCodeAt(e.position),a++,e.lineIndent=0;d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);else break}return r!==-1&&a!==0&&e.lineIndent<r&&Qe(e,"deficient indentation"),a}function Xe(e){var n=e.position,r;return r=e.input.charCodeAt(n),!!((r===45||r===46)&&r===e.input.charCodeAt(n+1)&&r===e.input.charCodeAt(n+2)&&(n+=3,r=e.input.charCodeAt(n),r===0||X(r)))}function vr(e,n){n===1?e.result+=" ":n>1&&(e.result+=oe.repeat(`
`,n-1))}function St(e,n,r){var a,d,o,c,m,_,A,S,x=e.kind,E=e.result,v;if(v=e.input.charCodeAt(e.position),X(v)||Te(v)||v===35||v===38||v===42||v===33||v===124||v===62||v===39||v===34||v===37||v===64||v===96||(v===63||v===45)&&(d=e.input.charCodeAt(e.position+1),X(d)||r&&Te(d)))return!1;for(e.kind="scalar",e.result="",o=c=e.position,m=!1;v!==0;){if(v===58){if(d=e.input.charCodeAt(e.position+1),X(d)||r&&Te(d))break}else if(v===35){if(a=e.input.charCodeAt(e.position-1),X(a))break}else{if(e.position===e.lineStart&&Xe(e)||r&&Te(v))break;if(ae(v))if(_=e.line,A=e.lineStart,S=e.lineIndent,$(e,!1,-1),e.lineIndent>=n){m=!0,v=e.input.charCodeAt(e.position);continue}else{e.position=c,e.line=_,e.lineStart=A,e.lineIndent=S;break}}m&&(se(e,o,c,!1),vr(e,e.line-_),o=c=e.position,m=!1),ge(v)||(c=e.position+1),v=e.input.charCodeAt(++e.position)}return se(e,o,c,!1),e.result?!0:(e.kind=x,e.result=E,!1)}function Lt(e,n){var r,a,d;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,a=d=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(se(e,a,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)a=e.position,e.position++,d=e.position;else return!0;else ae(r)?(se(e,a,d,!0),vr(e,$(e,!1,n)),a=d=e.position):e.position===e.lineStart&&Xe(e)?R(e,"unexpected end of the document within a single quoted scalar"):(e.position++,d=e.position);R(e,"unexpected end of the stream within a single quoted scalar")}function Pt(e,n){var r,a,d,o,c,m;if(m=e.input.charCodeAt(e.position),m!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=a=e.position;(m=e.input.charCodeAt(e.position))!==0;){if(m===34)return se(e,r,e.position,!0),e.position++,!0;if(m===92){if(se(e,r,e.position,!0),m=e.input.charCodeAt(++e.position),ae(m))$(e,!1,n);else if(m<256&&ri[m])e.result+=ni[m],e.position++;else if((c=At(m))>0){for(d=c,o=0;d>0;d--)m=e.input.charCodeAt(++e.position),(c=Tt(m))>=0?o=(o<<4)+c:R(e,"expected hexadecimal character");e.result+=Et(o),e.position++}else R(e,"unknown escape sequence");r=a=e.position}else ae(m)?(se(e,r,a,!0),vr(e,$(e,!1,n)),r=a=e.position):e.position===e.lineStart&&Xe(e)?R(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}R(e,"unexpected end of the stream within a double quoted scalar")}function Mt(e,n){var r=!0,a,d=e.tag,o,c=e.anchor,m,_,A,S,x,E={},v,M,F,I;if(I=e.input.charCodeAt(e.position),I===91)_=93,x=!1,o=[];else if(I===123)_=125,x=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),I=e.input.charCodeAt(++e.position);I!==0;){if($(e,!0,n),I=e.input.charCodeAt(e.position),I===_)return e.position++,e.tag=d,e.anchor=c,e.kind=x?"mapping":"sequence",e.result=o,!0;r||R(e,"missed comma between flow collection entries"),M=v=F=null,A=S=!1,I===63&&(m=e.input.charCodeAt(e.position+1),X(m)&&(A=S=!0,e.position++,$(e,!0,n))),a=e.line,xe(e,n,Je,!1,!0),M=e.tag,v=e.result,$(e,!0,n),I=e.input.charCodeAt(e.position),(S||e.line===a)&&I===58&&(A=!0,I=e.input.charCodeAt(++e.position),$(e,!0,n),xe(e,n,Je,!1,!0),F=e.result),x?Ae(e,o,E,M,v,F):A?o.push(Ae(e,null,E,M,v,F)):o.push(v),$(e,!0,n),I=e.input.charCodeAt(e.position),I===44?(r=!0,I=e.input.charCodeAt(++e.position)):r=!1}R(e,"unexpected end of the stream within a flow collection")}function Rt(e,n){var r,a,d=wr,o=!1,c=!1,m=n,_=0,A=!1,S,x;if(x=e.input.charCodeAt(e.position),x===124)a=!1;else if(x===62)a=!0;else return!1;for(e.kind="scalar",e.result="";x!==0;)if(x=e.input.charCodeAt(++e.position),x===43||x===45)wr===d?d=x===43?Jn:bt:R(e,"repeat of a chomping mode identifier");else if((S=xt(x))>=0)S===0?R(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?R(e,"repeat of an indentation width identifier"):(m=n+S-1,c=!0);else break;if(ge(x)){do x=e.input.charCodeAt(++e.position);while(ge(x));if(x===35)do x=e.input.charCodeAt(++e.position);while(!ae(x)&&x!==0)}for(;x!==0;){for(br(e),e.lineIndent=0,x=e.input.charCodeAt(e.position);(!c||e.lineIndent<m)&&x===32;)e.lineIndent++,x=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>m&&(m=e.lineIndent),ae(x)){_++;continue}if
`,o?1+_:_):d===wr&&o&&(e.result+=`
`);break}for(a?ge(x)?(A=!0,e.result+=oe.repeat(`
`,o?1+_:_)):A?(A=!1,e.result+=oe.repeat(`
`,_+1)):_===0?o&&(e.result+=" "):e.result+=oe.repeat(`
`,_):e.result+=oe.repeat(`
`,o?1+_:_),o=!0,c=!0,_=0,r=e.position;!ae(x)&&x!==0;)x=e.input.charCodeAt(++e.position);se(e,r,e.position,!1)}return!0}function ti(e,n){var r,a=e.tag,d=e.anchor,o=[],c,m=!1,_;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),_=e.input.charCodeAt(e.position);_!==0&&!(_!==45||(c=e.input.charCodeAt(e.position+1),!X(c)));){if(m=!0,e.position++,$(e,!0,-1)&&e.lineIndent<=n){o.push(null),_=e.input.charCodeAt(e.position);continue}if(r=e.line,xe(e,n,Kn,!1,!0),o.push(e.result),$(e,!0,-1),_=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>n)&&_!==0)R(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return m?(e.tag=a,e.anchor=d,e.kind="sequence",e.result=o,!0):!1}function It(e,n,r){var a,d,o,c,m=e.tag,_=e.anchor,A={},S={},x=null,E=null,v=null,M=!1,F=!1,I;for(e.anchor!==null&&(e.anchorMap[e.anchor]=A),I=e.input.charCodeAt(e.position);I!==0;){if(a=e.input.charCodeAt(e.position+1),o=e.line,c=e.position,(I===63||I===58)&&X(a))I===63?(M&&(Ae(e,A,S,x,E,null),x=E=v=null),F=!0,M=!0,d=!0):M?(M=!1,d=!0):R(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,I=a;else if(xe(e,r,Yn,!1,!0))if(e.line===o){for(I=e.input.charCodeAt(e.position);ge(I);)I=e.input.charCodeAt(++e.position);if(I===58)I=e.input.charCodeAt(++e.position),X(I)||R(e,"a whitespace character is expected after the key-value separator within a block mapping"),M&&(Ae(e,A,S,x,E,null),x=E=v=null),F=!0,M=!1,d=!1,x=e.tag,E=e.result;else if(F)R(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=m,e.anchor=_,!0}else if(F)R(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=m,e.anchor=_,!0;else break;if((e.line===o||e.lineIndent>n)&&(xe(e,n,Ze,!0,d)&&(M?E=e.result:v=e.result),M||(Ae(e,A,S,x,E,v,o,c),x=E=v=null),$(e,!0,-1),I=e.input.charCodeAt(e.position)),e.lineIndent>n&&I!==0)R(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return M&&Ae(e,A,S,x,E,null),F&&(e.tag=m,e.anchor=_,e.kind="mapping",e.result=A),F}function Ft(e){var n,r=!1,a=!1,d,o,c;if(c=e.input.charCodeAt(e.position),c!==33)return!1;if(e.tag!==null&&R(e,"duplication of a tag property"),c=e.input.charCodeAt(++e.position),c===60?(r=!0,c=e.input.charCodeAt(++e.position)):c===33?(a=!0,d="!!",c=e.input.charCodeAt(++e.position)):d="!",n=e.position,r){do c=e.input.charCodeAt(++e.position);while(c!==0&&c!==62);e.position<e.length?(o=e.input.slice(n,e.position),c=e.input.charCodeAt(++e.position)):R(e,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!X(c);)c===33&&(a?R(e,"tag suffix cannot contain exclamation marks"):(d=e.input.slice(n-1,e.position+1),Zn.test(d)||R(e,"named tag handle cannot contain such characters"),a=!0,n=e.position+1)),c=e.input.charCodeAt(++e.position);o=e.input.slice(n,e.position),kt.test(o)&&R(e,"tag suffix cannot contain flow indicator characters")}return o&&!Qn.test(o)&&R(e,"tag name cannot contain such characters: "+o),r?e.tag=o:ce.call(e.tagMap,d)?e.tag=e.tagMap[d]+o:d==="!"?e.tag="!"+o:d==="!!"?e.tag="tag:yaml.org,2002:"+o:R(e,'undeclared tag handle "'+d+'"'),!0}function jt(e){var n,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&R(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),n=e.position;r!==0&&!X(r)&&!Te(r);)r=e.input.charCodeAt(++e.position);return e.position===n&&R(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function Ht(e){var n,r,a;if(a=e.input.charCodeAt(e.position),a!==42)return!1;for(a=e.input.charCodeAt(++e.position),n=e.position;a!==0&&!X(a)&&!Te(a);)a=e.input.charCodeAt(++e.position);return e.position===n&&R(e,"name of an alias node must contain at least one character"),r=e.input.slice(n,e.position),ce.call(e.anchorMap,r)||R(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],$(e,!0,-1),!0}function xe(e,n,r,a,d){var o,c,m,_=1,A=!1,S=!1,x,E,v,M,F;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=c=m=Ze===r||Kn===r,a&&$(e,!0,-1
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Ct(e,n),a=e.indexOf("\0");for(a!==-1&&(r.position=a,R(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)zt(r);return r.documents}function oi(e,n,r){n!==null&&typeof n=="object"&&typeof r=="undefined"&&(r=n,n=null);var a=di(e,r);if(typeof n!="function")return a;for(var d=0,o=a.length;d<o;d+=1)n(a[d])}function ci(e,n){var r=di(e,n);if(r.length!==0){if(r.length===1)return r[0];throw new Wn("expected a single document in the stream, but found more")}}function Ot(e,n,r){return typeof n=="object"&&n!==null&&typeof r=="undefined"&&(r=n,n=null),oi(e,n,oe.extend({schema:Gn},r))}function Dt(e,n){return ci(e,oe.extend({schema:Gn},n))}Ie.exports.loadAll=oi;Ie.exports.load=ci;Ie.exports.safeLoadAll=Ot;Ie.exports.safeLoad=Dt});var Ii=H((ql,Ar)=>{"use strict";var Fe=pe(),je=ve(),Nt=Re(),Bt=ke(),li=Object.prototype.toString,fi=Object.prototype.hasOwnProperty,qt=9,He=10,$t=13,Ut=32,Vt=33,Wt=34,pi=35,Gt=37,Yt=38,Kt=39,Jt=42,mi=44,Zt=45,hi=58,Qt=61,Xt=62,ed=63,rd=64,gi=91,_i=93,nd=96,wi=123,id=124,bi=125,K={};K[0]="\\0";K[7]="\\a";K[8]="\\b";K[9]="\\t";K[10]="\\n";K[11]="\\v";K[12]="\\f";K[13]="\\r";K[27]="\\e";K[34]='\\"';K[92]="\\\\";K[133]="\\N";K[160]="\\_";K[8232]="\\L";K[8233]="\\P";var ud=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function ad(e,n){var r,a,d,o,c,m,_;if(n===null)return{};for(r={},a=Object.keys(n),d=0,o=a.length;d<o;d+=1)c=a[d],m=String(n[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),_=e.compiledTypeMap.fallback[c],_&&fi.call(_.styleAliases,m)&&(m=_.styleAliases[m]),r[c]=m;return r}function vi(e){var n,r,a;if(n=e.toString(16).toUpperCase(),e<=255)r="x",a=2;else if(e<=65535)r="u",a=4;else if(e<=4294967295)r="U",a=8;else throw new je("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Fe.repeat("0",a-n.length)+n}function td(e){this.schema=e.schema||Nt,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Fe.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=ad(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function yi(e,n){for(var r=Fe.repeat(" ",n),a=0,d=-1,o="",c,m=e.length;a<m;)d=e.indexOf(`
`,a),d===-1?(c=e.slice(a),a=m):(c=e.slice(a,d+1),a=d+1),c.length&&c!==`
`&&(o+=r),o+=c;return o}function yr(e,n){return`
`+Fe.repeat(" ",e.indent*n)}function dd(e,n){var r,a,d;for(r=0,a=e.implicitTypes.length;r<a;r+=1)if(d=e.implicitTypes[r],d.resolve(n))return!0;return!1}function kr(e){return e===Ut||e===qt}function Ee(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function od(e){return Ee(e)&&!kr(e)&&e!==65279&&e!==$t&&e!==He}function ki(e,n){return Ee(e)&&e!==65279&&e!==mi&&e!==gi&&e!==_i&&e!==wi&&e!==bi&&e!==hi&&(e!==pi||n&&od(n))}function cd(e){return Ee(e)&&e!==65279&&!kr(e)&&e!==Zt&&e!==ed&&e!==hi&&e!==mi&&e!==gi&&e!==_i&&e!==wi&&e!==bi&&e!==pi&&e!==Yt&&e!==Jt&&e!==Vt&&e!==id&&e!==Qt&&e!==Xt&&e!==Kt&&e!==Wt&&e!==Gt&&e!==rd&&e!==nd}function Ti(e){var n=/^\n* /;return n.test(e)}var Ai=1,xi=2,Ei=3,Ci=4,er=5;function sd(e,n,r,a,d){var o,c,m,_=!1,A=!1,S=a!==-1,x=-1,E=cd(e.charCodeAt(0))&&!kr(e.charCodeAt(e.length-1));if(n)for(o=0;o<e.length;o++){if(c=e.charCodeAt(o),!Ee(c))return er;m=o>0?e.charCodeAt(o-1):null,E=E&&ki(c,m)}else{for(o=0;o<e.length;o++){if(c=e.charCodeAt(o),c===He)_=!0,S&&(A=A||o-x-1>a&&e[x+1]!==" ",x=o);else if(!Ee(c))return er;m=o>0?e.charCodeAt(o-1):null,E=E&&ki(c,m)}A=A||S&&o-x-1>a&&e[x+1]!==" "}return!_&&!A?E&&!d(e)?Ai:xi:r>9&&Ti(e)?er:A?Ci:Ei}function ld(e,n,r,a){e.dump=function(){if(n.length===0)return"''";if(!e.noCompatMode&&ud.indexOf(n)!==-1)return"'"+n+"'";var d=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-d),c=a||e.flowLevel>-1&&r>=e.flowLevel;function m(_){return dd(e,_)}switch(sd(n,c,e.indent,o,m)){case Ai:return n;case xi:return"'"+n.replace(/'/g,"''")+"'";case Ei:return"|"+Si(n,e.indent)+Li(yi(n,d));case Ci:return">"+Si(n,e.indent)+Li(yi(fd(n,o),d));case er:return'"'+pd(n,o)+'"';default:throw new je("impossible error: invalid scalar style")}}()}function Si(e,n){var r=Ti(e)?String(n):"",a=e[e.length-1]===`
`,d=a&&(e[e.length-2]===`
`||e===`
`),o=d?"+":a?"":"-";return r+o+`
`}function Li(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function fd(e,n){for(var r=/(\n+)([^\n]*)/g,a=function(){var A=e.indexOf(`
`);return A=A!==-1?A:e.length,r.lastIndex=A,Pi(e.slice(0,A),n)}(),d=e[0]===`
`||e[0]===" ",o,c;c=r.exec(e);){var m=c[1],_=c[2];o=_[0]===" ",a+=m+(!d&&!o&&_!==""?`
`:"")+Pi(_,n),d=o}return a}function Pi(e,n){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,a,d=0,o,c=0,m=0,_="";a=r.exec(e);)m=a.index,m-d>n&&(o=c>d?c:m,_+=`
`+e.slice(d,o),d=o+1),c=m;return _+=`
`,e.length-d>n&&c>d?_+=e.slice(d,c)+`
`+e.slice(c+1):_+=e.slice(d),_.slice(1)}function pd(e){for(var n="",r,a,d,o=0;o<e.length;o++){if(r=e.charCodeAt(o),r>=55296&&r<=56319&&(a=e.charCodeAt(o+1),a>=56320&&a<=57343)){n+=vi((r-55296)*1024+a-56320+65536),o++;continue}d=K[r],n+=!d&&Ee(r)?e[o]:d||vi(r)}return n}function md(e,n,r){var a="",d=e.tag,o,c;for(o=0,c=r.length;o<c;o+=1)we(e,n,r[o],!1,!1)&&(o!==0&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=d,e.dump="["+a+"]"}function hd(e,n,r,a){var d="",o=e.tag,c,m;for(c=0,m=r.length;c<m;c+=1)we(e,n+1,r[c],!0,!0)&&((!a||c!==0)&&(d+=yr(e,n)),e.dump&&He===e.dump.charCodeAt(0)?d+="-":d+="- ",d+=e.dump);e.tag=o,e.dump=d||"[]"}function gd(e,n,r){var a="",d=e.tag,o=Object.keys(r),c,m,_,A,S;for(c=0,m=o.length;c<m;c+=1)S="",c!==0&&(S+=", "),e.condenseFlow&&(S+='"'),_=o[c],A=r[_],!!we(e,n,_,!1,!1)&&(e.dump.length>1024&&(S+="? "),S+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),!!we(e,n,A,!1,!1)&&(S+=e.dump,a+=S));e.tag=d,e.dump="{"+a+"}"}function _d(e,n,r,a){var d="",o=e.tag,c=Object.keys(r),m,_,A,S,x,E;if(e.sortKeys===!0)c.sort();else if(typeof e.sortKeys=="function")c.sort(e.sortKeys);else if(e.sortKeys)throw new je("sortKeys must be a boolean or a function");for(m=0,_=c.length;m<_;m+=1)E="",(!a||m!==0)&&(E+=yr(e,n)),A=c[m],S=r[A],!!we(e,n+1,A,!0,!0,!0)&&(x=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,x&&(e.dump&&He===e.dump.charCodeAt(0)?E+="?":E+="? "),E+=e.dump,x&&(E+=yr(e,n)),!!we(e,n+1,S,!0,x)&&(e.dump&&He===e.dump.charCodeAt(0)?E+=":":E+=": ",E+=e.dump,d+=E));e.tag=o,e.dump=d||"{}"}function Mi(e,n,r){var a,d,o,c,m,_;for(d=r?e.explicitTypes:e.implicitTypes,o=0,c=d.length;o<c;o+=1)if(m=d[o],(m.instanceOf||m.predicate)&&(!m.instanceOf||typeof n=="object"&&n instanceof m.instanceOf)&&(!m.predicate||m.predicate(n))){if(e.tag=r?m.tag:"?",m.represent){if(_=e.styleMap[m.tag]||m.defaultStyle,li.call(m.represent)==="[object Function]")a=m.represent(n,_);else if(fi.call(m.represent,_))a=m.represent[_](n,_);else throw new je("!<"+m.tag+'> tag resolver accepts not "'+_+'" style');e.dump=a}return!0}return!1}function we(e,n,r,a,d,o){e.tag=null,e.dump=r,Mi(e,r,!1)||Mi(e,r,!0);var c=li.call(e.dump);a&&(a=e.flowLevel<0||e.flowLevel>n);var m=c==="[object Object]"||c==="[object Array]",_,A;if(m&&(_=e.duplicates.indexOf(r),A=_!==-1),(e.tag!==null&&e.tag!=="?"||A||e.indent!==2&&n>0)&&(d=!1),A&&e.usedDuplicates[_])e.dump="*ref_"+_;else{if(m&&A&&!e.usedDuplicates[_]&&(e.usedDuplicates[_]=!0),c==="[object Object]")a&&Object.keys(e.dump).length!==0?(_d(e,n,e.dump,d),A&&(e.dump="&ref_"+_+e.dump)):(gd(e,n,e.dump),A&&(e.dump="&ref_"+_+" "+e.dump));else if(c==="[object Array]"){var S=e.noArrayIndent&&n>0?n-1:n;a&&e.dump.length!==0?(hd(e,S,e.dump,d),A&&(e.dump="&ref_"+_+e.dump)):(md(e,S,e.dump),A&&(e.dump="&ref_"+_+" "+e.dump))}else if(c==="[object String]")e.tag!=="?"&&ld(e,e.dump,n,o);else{if(e.skipInvalid)return!1;throw new je("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function wd(e,n){var r=[],a=[],d,o;for(Tr(e,r,a),d=0,o=a.length;d<o;d+=1)n.duplicates.push(r[a[d]]);n.usedDuplicates=new Array(o)}function Tr(e,n,r){var a,d,o;if(e!==null&&typeof e=="object")if(d=n.indexOf(e),d!==-1)r.indexOf(d)===-1&&r.push(d);else if(n.push(e),Array.isArray(e))for(d=0,o=e.length;d<o;d+=1)Tr(e[d],n,r);else for(a=Object.keys(e),d=0,o=a.length;d<o;d+=1)Tr(e[a[d]],n,r)}function Ri(e,n){n=n||{};var r=new td(n);return r.noRefs||wd(e,r),we(r,0,e,!0,!0)?r.dump+`
`:""}function bd(e,n){return Ri(e,Fe.extend({schema:Bt},n))}Ar.exports.dump=Ri;Ar.exports.safeDump=bd});var ji=H(($l,B)=>{"use strict";var rr=si(),Fi=Ii();function nr(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}B.exports.Type=V();B.exports.Schema=me();B.exports.FAILSAFE_SCHEMA=Ye();B.exports.JSON_SCHEMA=hr();B.exports.CORE_SCHEMA=gr();B.exports.DEFAULT_SAFE_SCHEMA=ke();B.exports.DEFAULT_FULL_SCHEMA=Re();B.exports.load=rr.load;B.exports.loadAll=rr.loadAll;B.exports.safeLoad=rr.safeLoad;B.exports.safeLoadAll=rr.safeLoadAll;B.exports.dump=Fi.dump;B.exports.safeDump=Fi.safeDump;B.exports.YAMLException=ve();B.exports.MINIMAL_SCHEMA=Ye();B.exports.SAFE_SCHEMA=ke();B.exports.DEFAULT_SCHEMA=Re();B.exports.scan=nr("scan");B.exports.parse=nr("parse");B.exports.compose=nr("compose");B.exports.addConstructor=nr("addConstructor")});var zi=H((Ul,Hi)=>{"use strict";var vd=ji();Hi.exports=vd});var Ni=H((Vl,xr)=>{var Oi=zi(),yd="\\ufeff?",kd=typeof process!="undefined"?process.platform:"",Td="^("+yd+"(= yaml =|---)$([\\s\\S]*?)^(?:\\2|\\.\\.\\.)\\s*$"+(kd==="win32"?"\\r?":"")+"(?:\\n)?)",Di=new RegExp(Td,"m");xr.exports=Ad;xr.exports.test=Cd;function Ad(e,n){e=e||"";var r={allowUnsafe:!1};n=n instanceof Object?cr(cr({},r),n):r,n.allowUnsafe=Boolean(n.allowUnsafe);var a=e.split(/(\r?\n)/);return a[0]&&/= yaml =|---/.test(a[0])?Ed(e,n.allowUnsafe):{attributes:{},body:e,bodyBegin:1}}function xd(e,n){for(var r=1,a=n.indexOf(`
`),d=e.index+e[0].length;a!==-1;){if(a>=d)return r;r++,a=n.indexOf(`
`,a+1)}return r}function Ed(e,n){var r=Di.exec(e);if(!r)return{attributes:{},body:e,bodyBegin:1};var a=n?Oi.load:Oi.safeLoad,d=r[r.length-1].replace(/^\s+|\s+$/g,""),o=a(d)||{},c=e.replace(r[0],""),m=xd(r,e);return{attributes:o,body:c,bodyBegin:m,frontmatter:d}}function Cd(e){return e=e||"",Di.test(e)}});mu(exports,{default:()=>Lr});var le=Z(require("obsidian"));var ie=Z(require("obsidian")),Hr={cm6RenderAll:!0,renderImages:!0,renderPDF:!0,renderIframe:!1,renderExcalidraw:!1,renderMsgFile:!1,renderRichLink:!1,renderTransclusion:!1,previewOnHoverInternalLink:!1,refreshImagesAfterChange:!1,WYSIWYG:!1},sr=class extends ie.PluginSettingTab{constructor(n,r){super(n,r);this.plugin=r}display(){let{containerEl:n}=this;n.empty(),n.createEl("h1",{text:"Image in Editor Settings"}).addClass("image-in-editor-settings-main-header");let a=n.createDiv("tip");a.addClass("oz-tip-div");let o=a.createEl("a",{href:"https://revolut.me/ozante"}).createEl("img",{attr:{src:"https://raw.githubusercontent.com/ozntel/file-tree-alternative/main/images/tip%20the%20artist_v2.png"}});o.height=55;let c=n.createDiv("coffee");c.addClass("oz-coffee-div");let _=c.createEl("a",{href:"https://ko-fi.com/L3L356V6Q"}).createEl("img",{attr:{src:"https://cdn.ko-fi.com/cdn/kofi2.png?v=3"}});_.height=45;let A=n.createEl("div");A.innerHTML=`
<p>
The plugin will add image preview within the "Source Mode" of New Editor.
In case you have Live Preview enabled, the plugin will automatically detect this and won't render additionally to avoid duplication.
</p>
`,new ie.Setting(n).setName("Render All").setDesc("Turn off this option if you want to stop rendering images in the editor source mode. Disabling requires vault reload.").addToggle(S=>{S.setValue(this.plugin.settings.cm6RenderAll).onChange(x=>{this.plugin.settings.cm6RenderAll=x,this.plugin.saveSettings()})}),new ie.Setting(n).setName("Render Images in Editor").setDesc("Turn on this option if you want Image files (jpeg, jpg, png, gif, svg, bmp) to be rendered in Editor").addToggle(S=>S.setValue(this.plugin.settings.renderImages).onChange(x=>{this.plugin.settings.renderImages=x,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render Transclusion in Editor").setDesc("Turn on this option if you want transclusions to be rendered in Editor. Once this is enabled, you will have custom options for transclusions below.").addToggle(S=>S.setValue(this.plugin.settings.renderTransclusion).onChange(x=>{this.plugin.settings.renderTransclusion=x,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render PDFs in Editor").setDesc("Turn on this option if you want also PDF files to be rendered in Editor").addToggle(S=>S.setValue(this.plugin.settings.renderPDF).onChange(x=>{this.plugin.settings.renderPDF=x,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render Iframes in Editor").setDesc("Turn on this option if you want iframes to be rendered in Editor").addToggle(S=>S.setValue(this.plugin.settings.renderIframe).onChange(x=>{this.plugin.settings.renderIframe=x,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render Excalidraw in Editor").setDesc(`
Turn on this option if you want drawings to be rendered in Editor.
You need to have "Excalidraw" plugin installed so that this
option works.
`).addToggle(S=>S.setValue(this.plugin.settings.renderExcalidraw).onChange(x=>{this.plugin.settings.renderExcalidraw=x,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render Outlook MSG Files in Editor").setDesc(`
Turn on this option if you want outlook MSG Files to be rendered in Editor.
You need to have "MSG Handler" plugin installed so that
this option works
`).addToggle(S=>S.setValue(this.plugin.settings.renderMsgFile).onChange(x=>{this.plugin.settings.renderMsgFile=x,this.plugin.saveSettings()})),new ie.Setting(n).setName("Preview on Hover for File Links").setDesc("Turn on if you want to trigger preview when you hover on internal links within the rendered transclusion").addToggle(S=>S.setValue(this.plugin.settings.previewOnHoverInternalLink).onChange(x=>{this.plugin.settings.previewOnHoverInternalLink=x,this.plugin.saveSettings(),x?document.on("mouseover",".oz-obsidian-inner-link",this.plugin.filePreviewOnHover):document.off("mouseover",".oz-obsidian-inner-link",this.plugin.filePreviewOnHover)}))}};var Oe=Z(require("obsidian"));var De=(e,n)=>e.getResourcePath(n)+"?"+n.stat.mtime,zr=(e,n,r)=>{r.workspace.openLinkText(n,"/",Oe.Keymap.isModifier(e,"Mod")||e.button===1)},lr=e=>e.replace(/\s|\W|[#$%^&*()]/g,""),Ne=(e,n)=>e.plugins.getPlugin(n),fr=e=>{var n;return(n=e.vault.config)==null?void 0:n.livePreview},Or=()=>{var e;return((e=Oe.Platform)==null?void 0:e.resourcePathPrefix)||"app://local/"};var Dr=Z(require("obsidian"));var Be=e=>{let n=/[^(x|0-9)]/;if(e.match(n))return!1;let r=/[0-9]+x[0-9]+/,a=/[0-9]+/;var d=e.match(r);if(d){var o=d[0].indexOf("x");return{width:parseInt(d[0].substr(0,o)),height:parseInt(d[0].substr(o+1))}}else{var c=e.match(a);if(c)return{width:parseInt(c[0])}}return!1};var Nr=(e,n,r)=>{let a=new Dr.Menu(n.app);return a.addItem(d=>{d.setTitle("Copy Image to Clipboard"),d.setIcon("image-file"),d.onClick(o=>ne(void 0,null,function*(){var c=yield n.app.vault.adapter.readBinary(r.path),m=new Uint8Array(c),_=new Blob([m],{type:"image/png"});let A=new ClipboardItem({"image/png":_});window.navigator.clipboard.write([A])}))}),n.app.workspace.trigger("file-menu",a,r,"file-explorer"),a.showAtPosition({x:e.pageX,y:e.pageY}),!1};var qe=Z(require("@codemirror/state")),$e=Z(require("@codemirror/view"));function gu(){let e=qe.StateEffect.define(),n=qe.StateField.define({create(){return $e.Decoration.none},update(r,a){return a.effects.reduce((d,o)=>o.is(e)?o.value:d,r)},provide:r=>$e.EditorView.decorations.from(r)});return{update:e,field:n}}var Le=gu();var tu=Z(require("@codemirror/view"));var Ce=Z(require("obsidian")),uu=Z(require("@codemirror/state")),au=Z(require("@codemirror/view"));var Br=e=>Ne(e,"obsidian-excalidraw-plugin"),qr=e=>e.extension==="excalidraw"||ExcalidrawAutomate.isExcalidrawFile&&ExcalidrawAutomate.isExcalidrawFile(e),$r=e=>ne(void 0,null,function*(){ExcalidrawAutomate.reset();var n=yield ExcalidrawAutomate.createPNG(e.path);return n});var Bi=Z(Vr());var _u=function(){function e(n,r){for(var a=0;a<r.length;a++){var d=r[a];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(n,d.key,d)}}return function(n,r,a){return r&&e(n.prototype,r),a&&e(n,a),n}}(),wu=bu(["",""],["",""]);function bu(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function vu(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var yu=function(){function e(){for(var n=this,r=arguments.length,a=Array(r),d=0;d<r;d++)a[d]=arguments[d];return vu(this,e),this.tag=function(o){for(var c=arguments.length,m=Array(c>1?c-1:0),_=1;_<c;_++)m[_-1]=arguments[_];return typeof o=="function"?n.interimTag.bind(n,o):typeof o=="string"?n.transformEndResult(o):(o=o.map(n.transformString.bind(n)),n.transformEndResult(o.reduce(n.processSubstitutions.bind(n,m))))},a.length>0&&Array.isArray(a[0])&&(a=a[0]),this.transformers=a.map(function(o){return typeof o=="function"?o():o}),this.tag}return _u(e,[{key:"interimTag",value:function(r,a){for(var d=arguments.length,o=Array(d>2?d-2:0),c=2;c<d;c++)o[c-2]=arguments[c];return this.tag(wu,r.apply(void 0,[a].concat(o)))}},{key:"processSubstitutions",value:function(r,a,d){var o=this.transformSubstitution(r.shift(),a);return"".concat(a,o,d)}},{key:"transformString",value:function(r){var a=function(o,c){return c.onString?c.onString(o):o};return this.transformers.reduce(a,r)}},{key:"transformSubstitution",value:function(r,a){var d=function(c,
`),Ve,N,G,O);var Ec=new z(be(`
`),N,G,O,de(/&/g,"&amp;"),de(/</g,"&lt;"),de(/>/g,"&gt;"),de(/"/g,"&quot;"),de(/'/g,"&#x27;"),de(/`/g,"&#x60;"));var Ic=new z(Q(/(?:\n(?:\s*))+/g," "),O);var Nc=new z(Q(/(?:\n\s*)/g,""),O);var Yc=new z(N({separator:","}),Q(/(?:\s+)/g," "),O);var ns=new z(N({separator:",",conjunction:"or"}),Q(/(?:\s+)/g," "),O);var ss=new z(N({separator:",",conjunction:"and"}),Q(/(?:\s+)/g," "),O);var ws=new z(N,G,O);var Es=new z(N,Q(/(?:\s+)/g," "),O);var Is=new z(G,O);var Uu=new z(G("all"),O),We=Uu;var qi=Z(Ni()),Sd=e=>{let n=e,r=/\[\[.*?\]\]/g,a=n.match(r);if(a){let d=/\[\[.*?(?=(\]|\|))/,o=/\|.*(?=]])/;for(let c of a){let m=c.match(d);if(m){let _=c.match(o),A=Ld(m[0].replace("[[",""),_?_[0].replace("|",""):"");n=n.replace(c,A)}}}return n},Ld=(e,n)=>`[${n}](${encodeURI(e)})`,Pd=/!\[\[(.*)#\^(.*)\]\]/,Md=/!\[\[(.*)#((?!\^).*)\]\]/;var Rd=e=>{let n=e,r=e.match(new RegExp(`(${Pd.source})|(${Md.source})`,"g"));return r==null||r.forEach(a=>n=n.replace(a,a.substring(1))),n},Id=e=>{let n=/( +)#[^\s#]+|^#[^\s#]+/gm,r=e.match(n);if(!r)return e;let a=e;for(let d of r)a=a.replace(d,`<span class="hashtag">${d}</span>`);return a};var Fd=e=>{let n=Id(e);return n=Rd(n),n=Sd(n),n=Od(n),Ki()&&(n=Ud(n)),n},ze=e=>{let n=Fd(e);return new Bi.default.Converter({tables:!0,simpleLineBreaks:!0,strikethrough:!0,tasklists:!0,smartIndentationFix:!0}).makeHtml(n)},$i=(e,n,r)=>{let a=document.createElement("div"),d=r.substr(e,n-e);return a.innerHTML=ze(d),a},Ui=(e,n)=>{let r=document.createElement("div"),a=e.position.start.offset,d=e.position.end.offset,o=n.substr(a,d-a),c=o.indexOf(`^${e.id}`);return c!==-1&&(o=o.slice(0,c)+o.slice(c+e.id.length+1)),r.innerHTML=ze(o),r},ir=(e,n)=>{jd(e),Hd(e,n.app),zd(e,n.app),Dd(e),qd()&&Bd(e),Ki()&&Vd(e)},jd=e=>{e.querySelectorAll("pre > code").forEach(r=>{r.addClass("line-numbers")})},Hd=(e,n)=>{e.querySelectorAll("img").forEach(a=>{if(a.getAttr("src")){let o=n.metadataCache.getFirstLinkpathDest(decodeURI(a.getAttr("src")),"");if(o){let c=De(n.vault,o);a.setAttr("src",c);let m=a.getAttr("alt");if(m){let _=Be(m);_&&(a.width=_.width,_.height&&(a.height=_.height))}}}})},zd=(e,n)=>{e.querySelectorAll("a").forEach(a=>{let d=a.getAttr("href");a.innerText===""&&(a.innerText=decodeURI(d)),d.match(new RegExp(".*#.*"))&&(d=d.match(new RegExp(".*(?=#)"))[0]),n.metadataCache.getFirstLinkpathDest(decodeURI(d),"")&&(a.setAttr("href",decodeURI(d)),a.addClass("oz-obsidian-inner-link")),a.innerText.startsWith("#")&&a.addClass("tag")})},Od=e=>{try{return(0,qi.default)(e).body}catch(n){return e}},Dd=e=>{let n=e.querySelectorAll('code[class*="language-ad-"]');n==null||n.forEach(r=>{let a=r.className,d=/language-ad-.*?(?=\s)/,o=a.match(d),c=o?o[0].replace("language-ad-",""):"Note",m=Nd(c,r.innerHTML);r.parentElement.replaceWith(m)})},Nd=(e,n)=>{let r=Vi[e]?Vi[e]:"68, 138, 255",a=document.createElement("div");a.addClass("oz-admonition"),a.style.cssText=`--oz-admonition-color: ${r};`;let d=a.createEl("div");d.addClass("oz-admonition-title");let o=d.createEl("div");o.addClass("oz-admonition-title-content");let c=o.createEl("div");c.addClass("oz-admonition-title-markdown"),c.innerText=e;let m=a.createEl("div");m.addClass("oz-admonition-content-holder");let _=m.createEl("div");return _.addClass("oz-admonition-content"),_.innerHTML=ze(n),a},Vi={abstract:"0, 176, 255",attention:"255, 145, 0",bug:"245, 0, 87",caution:"255, 145, 0",check:"0, 200, 83",cite:"158, 158, 158",danger:"255, 23, 68",done:"0, 200, 83",error:"255, 23, 68",example:"124, 77, 255",fail:"255, 82, 82",failure:"255, 82, 82",faq:"100, 221, 23",help:"100, 221, 23",hint:"0, 191, 165",important:"0, 191, 165",info:"0, 184, 212",missing:"255, 82, 82",note:"68, 138, 255",question:"100, 221, 23",quote:"158, 158, 158",seealso:"68, 138, 255",success:"0, 200, 83",summary:"0, 176, 255",tip:"0, 191, 165",todo:"0, 184, 212"},Bd=e=>{let n=e.querySelectorAll('code[class*="language-mermaid"]');n.length!==0&&(window.mermaid.initialize($d),n==null||n.forEach(r=>{let a=document.createElement("div"),d=Math.floor(Math.random()*999999);a.id=`mermaid-${d}`,a.innerHTML=r.innerHTML;try{window.mermaid.mermaidAPI.re
<pre class="language-mathjax">
<code class="language-mathjax ${n==="inline"?"inline":""}">
${e}
</code>
</pre>
`,Vd=e=>{let n=e.querySelectorAll("code.language-mathjax");for(let r=0;r<n.length;r++){let a=n[r],d=a.classList.contains("inline");if(d){let o=a.parentElement.previousElementSibling;o&&o.classList.add("inline-block")}Wd(a.innerHTML,d?"inline":"newline").then(o=>{a.parentElement.replaceWith(o)})}},Wd=(e,n)=>ne(void 0,null,function*(){let r;n==="inline"?(r=document.createElement("span"),r.classList.add("inline-mathjax-block")):n==="newline"&&(r=document.createElement("div"),r.classList.add("newline-mathjax-block"));let a=Gi(e),d=yield window.MathJax.tex2chtmlPromise(a,{display:n!=="inline"}),o=window.MathJax.startup.adaptor;r.innerHTML=o.outerHTML(d);let c=document.createElement("style");return c.innerHTML=o.textContent(window.MathJax.chtmlStylesheet()),r.appendChild(c),r}),Ki=()=>{var e;return(e=window.MathJax)==null?void 0:e.version};var te=Z(require("@codemirror/view"));var ur=e=>te.Decoration.replace({widget:new Ji(e),inclusive:!1}),Er=e=>te.Decoration.replace({widget:new Zi(e),inclusive:!1}),Cr=e=>te.Decoration.replace({widget:new Qi(e),inclusive:!1}),ar=e=>te.Decoration.replace({widget:new Xi(e),inclusive:!1}),Ji=class extends te.WidgetType{constructor({url:n,altText:r,filePath:a}){super();this.url=n,this.altText=r,this.filePath=a}eq(n){return n.altText===this.altText&&n.filePath===this.filePath}toDOM(){let n=document.createElement("div");n.addClass("oz-image-widget-cm6");let r=n.createEl("img");r.src=this.url,r.setAttr("data-path",this.filePath);let a=Be(this.altText);return a&&(r.width=a.width,a.height&&(r.height=a.height)),r.alt=this.altText,n}ignoreEvent(){return!0}},Zi=class extends te.WidgetType{constructor({url:n,filePath:r}){super();this.url=n,this.filePath=r}toDOM(){let n=document.createElement("div");n.addClass("oz-pdf-widget-cm6");let r=n.createEl("embed");return r.src=this.url,r.type="application/pdf",r.width="100%",r.height="800px",n}eq(n){return n.filePath===this.filePath||n.url===this.url}ignoreEvent(){return!0}},Qi=class extends te.WidgetType{constructor({htmlText:n,htmlEl:r}){super();this.htmlText=n,this.htmlEl=r}toDOM(){let n=document.createElement("div");return n.addClass("oz-custom-html-widget-cm6"),this.htmlText?n.innerHTML=this.htmlText.trim():n.appendChild(this.htmlEl),n}eq(n){return n.htmlText===this.htmlText}ignoreEvent(){return!0}},Xi=class extends te.WidgetType{constructor({type:n,htmlDivElement:r,filePath:a,blockRef:d}){super();this.type=n,this.htmlDivElement=r,this.filePath=a,this.blockRef=d}toDOM(){let n=document.createElement("div");return n.addClasses(["oz-transclusion-widget-cm6",this.type]),n.appendChild(this.htmlDivElement),n}eq(n){return n.filePath+n.blockRef===this.filePath+this.blockRef}ignoreEvent(){return!0}};var eu=["file-transclusion","header-transclusion","blockid-transclusion"],ru=e=>{let{lineText:n,plugin:r,sourceFile:a}=e,d=/!\[\[.*?(jpe?g|png|gif|svg|bmp|webp).*?\]\]/,o=n.match(d);if(o){let g=/\[\[.*(jpe?g|png|gif|svg|bmp|webp)/,T=o[0].match(g);if(T){let b=T[0].replace("[[",""),w=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(b),a.path);if(w){let y=/\|.*(?=]])/,l=o[0].match(y);return{type:"vault-image",match:o[0],linkText:b,altText:l?l[0].replace("|",""):"",blockRef:"",file:w}}}}let c=/!\[\[.*(pdf)(.*)?\]\]/,m=n.match(c);if(m){let g=/\[\[.*.pdf/,T=m[0].match(g);if(T){let b=T[0].replace("[[",""),w=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(b),a.path);if(w){let y=new RegExp("#page=[0-9]+"),l=m[0].match(y);return{type:"pdf-file",match:m[0],linkText:"",altText:"",blockRef:l?l[0]:"",file:w}}}}let _=/!\[(^$|.*)\]\(.*(pdf)(.*)?\)/,A=n.match(_);if(A){let g=/\(.*.pdf/,T=A[0].match(g);if(T){let b=T[0].replace("(",""),w=/(http[s]?:\/\/)([^\/\s]+\/)(.*)/,y=new RegExp("#page=[0-9]+"),l=A[0].match(y);if(w.test(b))return{type:"pdf-link",match:A[0],linkText:b,altText:"",blockRef:l?l[0]:""};{let k=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(b),a.path);if(k)return{type:"pdf-file",match:A[0],linkText:k.path,altText:"",blockRef:l?l[0]:"",file:k}}}}let S=/(http[s]?:\/\/)([^\/\s]+\/)(.*)/,x=/!\[[^)]*\]\([a-z][a-z0-9+\-.]+:\/[^)]*\)/,E=n.match
/*! showdown v 1.9.1 - 02-11-2019 */