!function(e,t){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define(t):(e=e||self).RevealMarkdown=t()}(this,(function(){"use strict";functione(t){return(e="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe})(t)}functiont(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functionn(e,t){for(varn=0;n<t.length;n++){varr=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}functionr(e,t,r){returnt&&n(e.prototype,t),r&&n(e,r),e}vars=function(e,t){returne(t={exports:{}},t.exports),t.exports}((function(e){functiont(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),i=(s.defaults,s.getDefaults,s.changeDefaults,/[&<>"']/),a=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,c={"&":"&","<":"<",">":">",'"':""","'":"'"},u=function(e){returnc[e]};varh=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;functionp(e){returne.replace(h,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}varg=/(^|[^\[])\^/g;varf=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;varb={},k=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,x=/^([^:]+:\/*[^/]*)[\s\S]*$/;functiony(e,t){b[" "+e]||(k.test(e)?b[" "+e]=e+"/":b[" "+e]=v(e,"/",!0));varn=-1===(e=b[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(x,"$1")+t:e+t}functionv(e,t,n){varr=e.length;if(0===r)return"";for(vars=0;s<r;){vari=e.charAt(r-s-1);if(i!==t||n){if(i===t||!n)break;s++}elses++}returne.substr(0,r-s)}varw=function(e,t){if(t){if(i.test(e))returne.replace(a,u)}elseif(l.test(e))returne.replace(o,u);returne},_=p,S=function(e,t,n){if(e){varr;try{r=decodeURIComponent(p(n)).replace(f,"").toLowerCase()}catch(e){returnnull}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))returnnull}t&&!d.test(n)&&(n=y(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){returnnull}returnn},A=function(e){for(vart,n,r=1;r<arguments.length;r++)for(nint=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);returne},$=function(e,t){varn=e.replace(/\|/g,(function(e,t,n){for(varr=!1,s=t;--s>=0&&"\\"===n[s];)r=!r;returnr?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);elsefor(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");returnn},R=v,z=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(varn=e.length,r=0,s=0;s<n;s++)if("\\"===e[s])s++;elseif(e[s]===t[0])r++;elseif(e[s]===t[1]&&--r<0)returns;return-1},T=function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")},E={exec:function(){}},L=function(e,t){e=e.source||e,t=t||"";varn={replace:function(t,r){returnr=(r=r.source||r).replace(g,"$1"),e=e.replace(t,r),n},getRegex:function(){returnnewRegExp(e,t)}};returnn},q=A,C={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^({0,3}>?(pa
*/function oe(e){var t=(e.querySelector("[data-template]")||e.querySelector("script")||e).textContent,n=(t=t.replace(new RegExp("__SCRIPT_END__","g"),"<\/script>")).match(/^\n?(\s*)/)[1].length,r=t.match(/^\n?(\t*)/)[1].length;returnr>0?t=t.replace(newRegExp("\\n?\\t{"+r+"}","g"),"\n"):n>1&&(t=t.replace(newRegExp("\\n? {"+n+"}","g"),"\n")),t}functionce(e){for(vart=e.attributes,n=[],r=0,s=t.length;r<s;r++){vari=t[r].name,a=t[r].value;/data\-(markdown|separator|vertical|notes)/gi.test(i)||(a?n.push(i+'="'+a+'"'):n.push(i))}returnn.join(" ")}functionue(e){return(e=e||{}).separator=e.separator||"^\r?\n---\r?\n$",e.notesSeparator=e.notesSeparator||"notes?:",e.attributes=e.attributes||"",e}functionhe(e,t){t=ue(t);varn=e.split(newRegExp(t.notesSeparator,"mgi"));return2===n.length&&(e=n[0]+'<aside class="notes">'+ae(n[1].trim())+"</aside>"),'<script type="text/template">'+(e=e.replace(/<\/script>/g,"__SCRIPT_END__"))+"<\/script>"}functionpe(e,t){t=ue(t);for(varn,r,s,i=newRegExp(t.separator+(t.verticalSeparator?"|"+t.verticalSeparator:""),"mg"),a=newRegExp(t.separator),l=0,o=!0,c=[];n=i.exec(e);)!(r=a.test(n[0]))&&o&&c.push([]),s=e.substring(l,n.index),r&&o?c.push(s):c[c.length-1].push(s),l=i.lastIndex,o=r;(o?c:c[c.length-1]).push(e.substring(l));for(varu="",h=0,p=c.length;h<p;h++)c[h]instanceofArray?(u+="<section "+t.attributes+">",c[h].forEach((function(e){u+="<section data-markdown>"+he(e,t)+"</section>"})),u+="</section>"):u+="<section "+t.attributes+" data-markdown>"+he(c[h],t)+"</section>";returnu}functionge(e){returnnewPromise((function(t){varn=[];[].slice.call(e.querySelectorAll("[data-markdown]:not([data-markdown-parsed])")).forEach((function(e,t){e.getAttribute("data-markdown").length?n.push(function(e){returnnewPromise((function(t,n){varr=newXMLHttpRequest,s=e.getAttribute("data-markdown"),i=e.getAttribute("data-charset");null!=i&&""!=i&&r.overrideMimeType("text/html; charset="+i),r.onreadystatechange=function(e,r){4===r.readyState&&(r.status>=200&&r.status<300||0===r.status?t(r,s):n(r,s))}.bind(this,e,r),r.open("GET",s,!0);try{r.send()}catch(e){console.warn("Failed to get the Markdown file "+s+". Make sure that the presentation and the file are served by a HTTP server and the file can be found there. "+e),t(r,s)}}))}(e).then((function(t,n){e.outerHTML=pe(t.responseText,{separator:e.getAttribute("data-separator"),verticalSeparator:e.getAttribute("data-separator-vertical"),notesSeparator:e.getAttribute("data-separator-notes"),attributes:ce(e)})}),(function(t,n){e.outerHTML='<section data-state="alert">ERROR: The attempt to fetch '+n+" failed with HTTP status "+t.status+".Check your browser's JavaScript console for more details.<p>Remember that you need to serve the presentation HTML from a HTTP server.</p></section>"}))):e.getAttribute("data-separator")||e.getAttribute("data-separator-vertical")||e.getAttribute("data-separator-notes")?e.outerHTML=pe(oe(e),{separator:e.getAttribute("data-separator"),verticalSeparator:e.getAttribute("data-separator-vertical"),notesSeparator:e.getAttribute("data-separator-notes"),attributes:ce(e)}):e.innerHTML=he(oe(e))})),Promise.all(n).then(t)}))}functionfe(e,t,n){varr,s,i=newRegExp(n,"mg"),a=newRegExp('([^"= ]+?)="([^"]+?)"|(data-[^"= ]+?)(?=[" ])',"mg"),l=e.nodeValue;if(r=i.exec(l)){varo=r[1];for(l=l.substring(0,r.index)+l.substring(i.lastIndex),e.nodeValue=l;s=a.exec(o);)s[2]?t.setAttribute(s[1],s[2]):t.setAttribute(s[3],"");return!0}return!1}functionde(){vare=document.querySelectorAll("[data-markdown]:not([data-markdown-parsed])");return[].slice.call(e).forEach((function(e){e.setAttribute("data-markdown-parsed",!0);vart=e.querySelector("aside.notes"),n=oe(e);e.innerHTML=ae(n),functione(t,n,r,s,i){if(null!=n&&null!=n.childNodes&&n.childNodes.length>0)for(vara=n,l=0;l<n.childNodes.length;l++){varo=n.childNodes[l];if(l>0)for(varc=l-1;c>=0;){varu=n.childNodes[c];if("function"==typeofu.setAttribute&&"BR"!=u.tagName){a=u;break}c-=1}varh=t;"section"==o.nodeName&&(h=o,a=o),"function"!=typeofo.setAttribute&&o.nodeType!=Node.COMMENT_NODE||e(h,o,a,