UNPKG

@huluvu424242/honey-slideshow

Version:

Text to Speech component wich is reading texts from DOM elements.

1 lines 64.6 kB
import{r as t,h as e,g as n}from"./p-4a369965.js";import{I as s}from"./p-13631053.js";class i{static logMessage(t){console.log(t)}static debugMessage(t){console.debug(t)}static errorMessage(t){console.error(t)}static infoMessage(t){console.info(t)}}class r{constructor(t,e,n){this.sprachSynthese=t,this.sprachauswahl=e,this.vorleserCallbacks=n,i.infoMessage("####constructor finished")}initialisiereVorleserStimme(t){i.infoMessage("erzeugeVorleser started"),t.pitch=this.sprachauswahl.getPitch(),t.rate=this.sprachauswahl.getRate(),t.volume=this.sprachauswahl.getVolume(),t.voice=this.sprachauswahl.getVoice(),t.lang=t.voice&&t.voice.lang?t.voice.lang:"de-DE"}erzeugeVorleser(t){const e=new SpeechSynthesisUtterance(t);return this.vorleserCallbacks&&(e.onend=()=>{i.debugMessage("Vorlesen beendet"),this.vorleserCallbacks.onend&&this.vorleserCallbacks.onend()},e.onstart=()=>{i.debugMessage("Vorlesen gestartet"),this.vorleserCallbacks.onstart&&this.vorleserCallbacks.onstart()},e.onpause=()=>{i.debugMessage("Pause mit Vorlesen"),this.vorleserCallbacks.onpause&&this.vorleserCallbacks.onpause()},e.onresume=()=>{i.debugMessage("Fortsetzen des Vorlesen"),this.vorleserCallbacks.onresume&&this.vorleserCallbacks.onresume()},e.onerror=()=>{i.errorMessage("Fehler beim Vorlesen"),this.vorleserCallbacks.onerror&&this.vorleserCallbacks.onerror()}),this.initialisiereVorleserStimme(e),e}textVorlesen(t){t&&[t].forEach(e=>{const n=this.erzeugeVorleser(e);i.infoMessage("speaker lang used:"+n.lang),n.voice?(i.infoMessage("speaker voice used:"+n.voice.name),i.infoMessage("speaker voice lang:"+n.voice.lang)):i.infoMessage("no voice matched for text: "+t),this.sprachSynthese.getSynthese().speak(n)})}cancelSpeakingAndClearQueue(){this.sprachSynthese.getSynthese().cancel()}pauseSpeakingFromQueue(){this.sprachSynthese.getSynthese().pause()}resumeSpeakingFromQueue(){this.sprachSynthese.getSynthese().resume()}isPaused(){return this.sprachSynthese.getSynthese().paused}}class l{constructor(t){i.infoMessage("create Sprachauswahl"),this.sprachSynthese=t,this.rate=1,this.volume=1,this.pitch=1,this.initDefaultStimme()}initDefaultStimme(){const t=this.sprachSynthese.getVoices();if(t)this.voice=t[0];else{const t=this.sprachSynthese.getVoices();this.voice=t[0]}}getRate(){return this.rate}getVolume(){return this.volume}getPitch(){return this.pitch}getVoice(){return this.voice}getVoiceList(){return this.sprachSynthese.getVoices()}setChoosenVoice(t){this.voice=t}setVolume(t){this.volume=t}setRate(t){this.rate=t}setPitch(t){this.pitch=t}}function o(t){return"function"==typeof t}let a=!1;const h={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else a&&console.log("RxJS: Back to a better error behavior. Thank you. <3");a=t},get useDeprecatedSynchronousErrorHandling(){return a}};function c(t){setTimeout(()=>{throw t},0)}const u={closed:!0,next(t){},error(t){if(h.useDeprecatedSynchronousErrorHandling)throw t;c(t)},complete(){}},d=Array.isArray||(t=>t&&"number"==typeof t.length),p=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();class f{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}unsubscribe(){let t;if(this.closed)return;let{_parentOrParents:e,_unsubscribe:n,_subscriptions:s}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof f)e.remove(this);else if(null!==e)for(let l=0;l<e.length;++l)e[l].remove(this);if(o(n))try{n.call(this)}catch(r){t=r instanceof p?g(r.errors):[r]}if(d(s)){let e=-1,n=s.length;for(;++e<n;){const n=s[e];if(null!==(i=n)&&"object"==typeof i)try{n.unsubscribe()}catch(r){t=t||[],r instanceof p?t=t.concat(g(r.errors)):t.push(r)}}}var i;if(t)throw new p(t)}add(t){let e=t;if(!t)return f.EMPTY;switch(typeof t){case"function":e=new f(t);case"object":if(e===this||e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;if(!(e instanceof f)){const t=e;e=new f,e._subscriptions=[t]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}let{_parentOrParents:n}=e;if(null===n)e._parentOrParents=this;else if(n instanceof f){if(n===this)return e;e._parentOrParents=[n,this]}else{if(-1!==n.indexOf(this))return e;n.push(this)}const s=this._subscriptions;return null===s?this._subscriptions=[e]:s.push(e),e}remove(t){const e=this._subscriptions;if(e){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}}}function g(t){return t.reduce((t,e)=>t.concat(e instanceof p?e.errors:e),[])}f.EMPTY=function(t){return t.closed=!0,t}(new f);const b="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class m extends f{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=u;break;case 1:if(!t){this.destination=u;break}if("object"==typeof t){t instanceof m?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new w(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new w(this,t,e,n)}}[b](){return this}static create(t,e,n){const s=new m(t,e,n);return s.syncErrorThrowable=!1,s}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class w extends m{constructor(t,e,n,s){let i;super(),this._parentSubscriber=t;let r=this;o(e)?i=e:e&&(i=e.next,n=e.error,s=e.complete,e!==u&&(r=Object.create(e),o(r.unsubscribe)&&this.add(r.unsubscribe.bind(r)),r.unsubscribe=this.unsubscribe.bind(this))),this._context=r,this._next=i,this._error=n,this._complete=s}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;h.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=h;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):c(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;c(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);h.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),h.useDeprecatedSynchronousErrorHandling)throw n;c(n)}}__tryOrSetError(t,e,n){if(!h.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(s){return h.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=s,t.syncErrorThrown=!0,!0):(c(s),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const k="function"==typeof Symbol&&Symbol.observable||"@@observable";function x(t){return t}class _{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(t){const e=new _;return e.source=this,e.operator=t,e}subscribe(t,e,n){const{operator:s}=this,i=function(t,e,n){if(t){if(t instanceof m)return t;if(t[b])return t[b]()}return t||e||n?new m(t,e,n):new m(u)}(t,e,n);if(i.add(s?s.call(i,this.source):this.source||h.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),h.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i}_trySubscribe(t){try{return this._subscribe(t)}catch(e){h.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:n,isStopped:s}=t;if(e||s)return!1;t=n&&n instanceof m?n:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=z(e))((e,n)=>{let s;s=this.subscribe(e=>{try{t(e)}catch(i){n(i),s&&s.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[k](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?x:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=z(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}function z(t){if(t||(t=Promise),!t)throw new Error("no Promise impl found");return t}_.create=t=>new _(t);const S=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class v extends f{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class y extends m{constructor(t){super(t),this.destination=t}}class $ extends _{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[b](){return new y(this)}lift(t){const e=new A(this,this);return e.operator=t,e}next(t){if(this.closed)throw new S;if(!this.isStopped){const{observers:e}=this,n=e.length,s=e.slice();for(let i=0;i<n;i++)s[i].next(t)}}error(t){if(this.closed)throw new S;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,n=e.length,s=e.slice();for(let i=0;i<n;i++)s[i].error(t);this.observers.length=0}complete(){if(this.closed)throw new S;this.isStopped=!0;const{observers:t}=this,e=t.length,n=t.slice();for(let s=0;s<e;s++)n[s].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new S;return super._trySubscribe(t)}_subscribe(t){if(this.closed)throw new S;return this.hasError?(t.error(this.thrownError),f.EMPTY):this.isStopped?(t.complete(),f.EMPTY):(this.observers.push(t),new v(this,t))}asObservable(){const t=new _;return t.source=this,t}}$.create=(t,e)=>new A(t,e);class A extends ${constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):f.EMPTY}}class Z{constructor(t){this.responseInfo={content:null,status:null},this.url=t}static of(t){return new Z(new URL(t))}loadFile(){const t=this.responseInfo,e=new $,n=new XMLHttpRequest;return n.addEventListener("load",e=>{t.content=n.responseText,console.log(e.total+" bytes gelesen.\n:"+t.content)}),n.onloadend=function(){t.status=n.status,console.log("Response Status:"+t.status),e.next(t)},n.open("GET",this.url.toString()),n.send(),e}}function P(t,e,n){return t(n={path:e,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}P((function(t){t.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,tokenizer:null,xhtml:!1},getDefaults:function(){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,tokenizer:null,xhtml:!1}},changeDefaults:function(e){t.exports.defaults=e}}}));var q=P((function(t){t.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,tokenizer:null,xhtml:!1},getDefaults:function(){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,tokenizer:null,xhtml:!1}},changeDefaults:function(e){t.exports.defaults=e}}}));const E=/[&<>"']/,j=/[&<>"']/g,T=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,D={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},L=t=>D[t],F=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function R(t){return t.replace(F,(t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):"")}const U=/(^|[^\[])\^/g,V=/[^\w:]/g,M=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,I={},B=/^[^:]+:\/*[^/]*$/,H=/^([^:]+:)[\s\S]*$/,O=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Q(t,e){I[" "+t]||(I[" "+t]=B.test(t)?t+"/":N(t,"/",!0));const n=-1===(t=I[" "+t]).indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(H,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(O,"$1")+e:t+e}function N(t,e,n){const s=t.length;if(0===s)return"";let i=0;for(;i<s;){const r=t.charAt(s-i-1);if(r!==e||n){if(r===e||!n)break;i++}else i++}return t.substr(0,s-i)}var X={escape:function(t,e){if(e){if(E.test(t))return t.replace(j,L)}else if(T.test(t))return t.replace(C,L);return t},unescape:R,edit:function(t,e){t=t.source||t,e=e||"";const n={replace:(e,s)=>(s=(s=s.source||s).replace(U,"$1"),t=t.replace(e,s),n),getRegex:()=>new RegExp(t,e)};return n},cleanUrl:function(t,e,n){if(t){let t;try{t=decodeURIComponent(R(n)).replace(V,"").toLowerCase()}catch(s){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!M.test(n)&&(n=Q(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(s){return null}return n},resolveUrl:Q,noopTest:{exec:function(){}},merge:function(t){let e,n,s=1;for(;s<arguments.length;s++)for(n in e=arguments[s],e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},splitCells:function(t,e){const n=t.replace(/\|/g,(t,e,n)=>{let s=!1,i=e;for(;--i>=0&&"\\"===n[i];)s=!s;return s?"|":" |"}).split(/ \|/);let s=0;if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(/\\\|/g,"|");return n},rtrim:N,findClosingBracket:function(t,e){if(-1===t.indexOf(e[1]))return-1;const n=t.length;let s=0,i=0;for(;i<n;i++)if("\\"===t[i])i++;else if(t[i]===e[0])s++;else if(t[i]===e[1]&&(s--,s<0))return i;return-1},checkSanitizeDeprecation:function(t){t&&t.sanitize&&!t.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")}};const{noopTest:G,edit:J,merge:W}=X,K={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}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:G,table:G,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};K.def=J(K.def).replace("label",K._label).replace("title",K._title).getRegex(),K.bullet=/(?:[*+-]|\d{1,9}\.)/,K.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,K.item=J(K.item,"gm").replace(/bull/g,K.bullet).getRegex(),K.list=J(K.list).replace(/bull/g,K.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+K.def.source+")").getRegex(),K._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",K._comment=/<!--(?!-?>)[\s\S]*?-->/,K.html=J(K.html,"i").replace("comment",K._comment).replace("tag",K._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),K.paragraph=J(K._paragraph).replace("hr",K.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",K._tag).getRegex(),K.blockquote=J(K.blockquote).replace("paragraph",K.paragraph).getRegex(),K.normal=W({},K),K.gfm=W({},K.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),K.gfm.nptable=J(K.gfm.nptable).replace("hr",K.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",K._tag).getRegex(),K.gfm.table=J(K.gfm.table).replace("hr",K.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",K._tag).getRegex(),K.pedantic=W({},K.normal,{html:J("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",K._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:G,paragraph:J(K.normal._paragraph).replace("hr",K.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",K.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const Y={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:G,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^_([^\s_<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s*<\[])\*(?!\*)|^\*([^\s<"][\s\S]*?[^\s\[\*])\*(?![\]`punctuation])|^\*([^\s*"<\[][\s\S]*[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:G,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,_punctuation:"!\"#$%&'()*+\\-./:;<=>?@\\[^_{|}~"};Y.em=J(Y.em).replace(/punctuation/g,Y._punctuation).getRegex(),Y._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Y._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Y._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Y.autolink=J(Y.autolink).replace("scheme",Y._scheme).replace("email",Y._email).getRegex(),Y._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Y.tag=J(Y.tag).replace("comment",K._comment).replace("attribute",Y._attribute).getRegex(),Y._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Y._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Y._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Y.link=J(Y.link).replace("label",Y._label).replace("href",Y._href).replace("title",Y._title).getRegex(),Y.reflink=J(Y.reflink).replace("label",Y._label).getRegex(),Y.normal=W({},Y),Y.pedantic=W({},Y.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:J(/^!?\[(label)\]\((.*?)\)/).replace("label",Y._label).getRegex(),reflink:J(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y._label).getRegex()}),Y.gfm=W({},Y.normal,{escape:J(Y.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),Y.gfm.url=J(Y.gfm.url,"i").replace("email",Y.gfm._extended_email).getRegex(),Y.breaks=W({},Y.gfm,{br:J(Y.br).replace("{2,}","*").getRegex(),text:J(Y.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});const{defaults:tt}=q,{rtrim:et,splitCells:nt,escape:st,findClosingBracket:it}=X;function rt(t,e,n){const s=e.href,i=e.title?st(e.title):null;return"!"!==t[0].charAt(0)?{type:"link",raw:n,href:s,title:i,text:t[1]}:{type:"image",raw:n,text:st(t[1]),href:s,title:i}}var lt=class{constructor(t){this.options=t||tt}space(t){const e=this.rules.block.newline.exec(t);if(e)return e[0].length>1?{type:"space",raw:e[0]}:{raw:"\n"}}code(t,e){const n=this.rules.block.code.exec(t);if(n){const t=e[e.length-1];if(t&&"paragraph"===t.type)return e.pop(),t.text+="\n"+n[0].trimRight(),t.raw+="\n"+n[0],t;{const t=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?t:et(t,"\n")}}}}fences(t){const e=this.rules.block.fences.exec(t);if(e)return{type:"code",raw:e[0],lang:e[2]?e[2].trim():e[2],text:e[3]||""}}heading(t){const e=this.rules.block.heading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}}nptable(t){const e=this.rules.block.nptable.exec(t);if(e){const t={type:"table",header:nt(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(t.header.length===t.align.length){let e,n=t.align.length;for(e=0;e<n;e++)t.align[e]=/^ *-+: *$/.test(t.align[e])?"right":/^ *:-+: *$/.test(t.align[e])?"center":/^ *:-+ *$/.test(t.align[e])?"left":null;for(n=t.cells.length,e=0;e<n;e++)t.cells[e]=nt(t.cells[e],t.header.length);return t}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){const t=e[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:e[0],text:t}}}list(t){const e=this.rules.block.list.exec(t);if(e){let t=e[0];const n=e[2],s=n.length>1,i={type:"list",raw:t,ordered:s,start:s?+n:"",loose:!1,items:[]},r=e[0].match(this.rules.block.item);let l,o,a,h,c,u,d,p=!1;const f=r.length;for(let e=0;e<f;e++)l=r[e],t=l,o=l.length,l=l.replace(/^ *([*+-]|\d+\.) */,""),~l.indexOf("\n ")&&(o-=l.length,l=l.replace(this.options.pedantic?/^ {1,4}/gm:new RegExp("^ {1,"+o+"}","gm"),"")),e!==f-1&&(a=this.rules.block.bullet.exec(r[e+1])[0],(n.length>1?1===a.length:a.length>1||this.options.smartLists&&a!==n)&&(h=r.slice(e+1).join("\n"),i.raw=i.raw.substring(0,i.raw.length-h.length),e=f-1)),c=p||/\n\n(?!\s*$)/.test(l),e!==f-1&&(p="\n"===l.charAt(l.length-1),c||(c=p)),c&&(i.loose=!0),u=/^\[[ xX]\] /.test(l),d=void 0,u&&(d=" "!==l[1],l=l.replace(/^\[[ xX]\] +/,"")),i.items.push({raw:t,task:u,checked:d,loose:c,text:l});return i}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):st(e[0]):e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}}table(t){const e=this.rules.block.table.exec(t);if(e){const t={type:"table",header:nt(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=e[0];let n,s=t.align.length;for(n=0;n<s;n++)t.align[n]=/^ *-+: *$/.test(t.align[n])?"right":/^ *:-+: *$/.test(t.align[n])?"center":/^ *:-+ *$/.test(t.align[n])?"left":null;for(s=t.cells.length,n=0;n<s;n++)t.cells[n]=nt(t.cells[n].replace(/^ *\| *| *\| *$/g,""),t.header.length);return t}}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1]}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e)return{type:"paragraph",raw:e[0],text:"\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1]}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0]}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:st(e[1])}}tag(t,e,n){const s=this.rules.inline.tag.exec(t);if(s)return!e&&/^<a /i.test(s[0])?e=!0:e&&/^<\/a>/i.test(s[0])&&(e=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(s[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(s[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:s[0],inLink:e,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):st(s[0]):s[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=it(e[2],"()");if(t>-1){const n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}let n=e[2],s="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);t?(n=t[1],s=t[3]):s=""}else s=e[3]?e[3].slice(1,-1):"";return n=n.trim().replace(/^<([\s\S]*)>$/,"$1"),rt(e,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:s?s.replace(this.rules.inline._escapes,"$1"):s},e[0])}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let t=(n[2]||n[1]).replace(/\s+/g," ");if(t=e[t.toLowerCase()],!t||!t.href){const t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return rt(n,t,n[0])}}strong(t){const e=this.rules.inline.strong.exec(t);if(e)return{type:"strong",raw:e[0],text:e[4]||e[3]||e[2]||e[1]}}em(t){const e=this.rules.inline.em.exec(t);if(e)return{type:"em",raw:e[0],text:e[6]||e[5]||e[4]||e[3]||e[2]||e[1]}}codespan(t){const e=this.rules.inline.code.exec(t);if(e)return{type:"codespan",raw:e[0],text:st(e[2].trim(),!0)}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[1]}}autolink(t,e){const n=this.rules.inline.autolink.exec(t);if(n){let t,s;return"@"===n[2]?(t=st(this.options.mangle?e(n[1]):n[1]),s="mailto:"+t):(t=st(n[1]),s=t),{type:"link",raw:n[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(t,e){let n;if(n=this.rules.inline.url.exec(t)){let t,s;if("@"===n[2])t=st(this.options.mangle?e(n[0]):n[0]),s="mailto:"+t;else{let e;do{e=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(e!==n[0]);t=st(n[0]),s="www."===n[1]?"http://"+t:t}return{type:"link",raw:n[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t,e,n){const s=this.rules.inline.text.exec(t);if(s){let t;return t=e?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):st(s[0]):s[0]:st(this.options.smartypants?n(s[0]):s[0]),{type:"text",raw:s[0],text:t}}}};const{noopTest:ot,edit:at,merge:ht}=X,ct={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}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ot,table:ot,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};ct.def=at(ct.def).replace("label",ct._label).replace("title",ct._title).getRegex(),ct.bullet=/(?:[*+-]|\d{1,9}\.)/,ct.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ct.item=at(ct.item,"gm").replace(/bull/g,ct.bullet).getRegex(),ct.list=at(ct.list).replace(/bull/g,ct.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ct.def.source+")").getRegex(),ct._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ct._comment=/<!--(?!-?>)[\s\S]*?-->/,ct.html=at(ct.html,"i").replace("comment",ct._comment).replace("tag",ct._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ct.paragraph=at(ct._paragraph).replace("hr",ct.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ct._tag).getRegex(),ct.blockquote=at(ct.blockquote).replace("paragraph",ct.paragraph).getRegex(),ct.normal=ht({},ct),ct.gfm=ht({},ct.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),ct.gfm.nptable=at(ct.gfm.nptable).replace("hr",ct.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ct._tag).getRegex(),ct.gfm.table=at(ct.gfm.table).replace("hr",ct.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ct._tag).getRegex(),ct.pedantic=ht({},ct.normal,{html:at("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",ct._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ot,paragraph:at(ct.normal._paragraph).replace("hr",ct.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ct.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const ut={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ot,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^_([^\s_<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s*<\[])\*(?!\*)|^\*([^\s<"][\s\S]*?[^\s\[\*])\*(?![\]`punctuation])|^\*([^\s*"<\[][\s\S]*[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ot,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,_punctuation:"!\"#$%&'()*+\\-./:;<=>?@\\[^_{|}~"};ut.em=at(ut.em).replace(/punctuation/g,ut._punctuation).getRegex(),ut._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ut._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ut._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,ut.autolink=at(ut.autolink).replace("scheme",ut._scheme).replace("email",ut._email).getRegex(),ut._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ut.tag=at(ut.tag).replace("comment",ct._comment).replace("attribute",ut._attribute).getRegex(),ut._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ut._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ut._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ut.link=at(ut.link).replace("label",ut._label).replace("href",ut._href).replace("title",ut._title).getRegex(),ut.reflink=at(ut.reflink).replace("label",ut._label).getRegex(),ut.normal=ht({},ut),ut.pedantic=ht({},ut.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:at(/^!?\[(label)\]\((.*?)\)/).replace("label",ut._label).getRegex(),reflink:at(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ut._label).getRegex()}),ut.gfm=ht({},ut.normal,{escape:at(ut.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),ut.gfm.url=at(ut.gfm.url,"i").replace("email",ut.gfm._extended_email).getRegex(),ut.breaks=ht({},ut.gfm,{br:at(ut.br).replace("{2,}","*").getRegex(),text:at(ut.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var dt={block:ct,inline:ut};const{defaults:pt}=q,{cleanUrl:ft,escape:gt}=X;var bt=class{constructor(t){this.options=t||pt}code(t,e,n){const s=(e||"").match(/\S*/)[0];if(this.options.highlight){const e=this.options.highlight(t,s);null!=e&&e!==t&&(n=!0,t=e)}return s?'<pre><code class="'+this.options.langPrefix+gt(s,!0)+'">'+(n?t:gt(t,!0))+"</code></pre>\n":"<pre><code>"+(n?t:gt(t,!0))+"</code></pre>"}blockquote(t){return"<blockquote>\n"+t+"</blockquote>\n"}html(t){return t}heading(t,e,n,s){return this.options.headerIds?"<h"+e+' id="'+this.options.headerPrefix+s.slug(n)+'">'+t+"</h"+e+">\n":"<h"+e+">"+t+"</h"+e+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(t,e,n){const s=e?"ol":"ul";return"<"+s+(e&&1!==n?' start="'+n+'"':"")+">\n"+t+"</"+s+">\n"}listitem(t){return"<li>"+t+"</li>\n"}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return"<p>"+t+"</p>\n"}table(t,e){return e&&(e="<tbody>"+e+"</tbody>"),"<table>\n<thead>\n"+t+"</thead>\n"+e+"</table>\n"}tablerow(t){return"<tr>\n"+t+"</tr>\n"}tablecell(t,e){const n=e.header?"th":"td";return(e.align?"<"+n+' align="'+e.align+'">':"<"+n+">")+t+"</"+n+">\n"}strong(t){return"<strong>"+t+"</strong>"}em(t){return"<em>"+t+"</em>"}codespan(t){return"<code>"+t+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return"<del>"+t+"</del>"}link(t,e,n){if(null===(t=ft(this.options.sanitize,this.options.baseUrl,t)))return n;let s='<a href="'+gt(t)+'"';return e&&(s+=' title="'+e+'"'),s+=">"+n+"</a>",s}image(t,e,n){if(null===(t=ft(this.options.sanitize,this.options.baseUrl,t)))return n;let s='<img src="'+t+'" alt="'+n+'"';return e&&(s+=' title="'+e+'"'),s+=this.options.xhtml?"/>":">",s}text(t){return t}},mt=class{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,e,n){return""+n}image(t,e,n){return""+n}br(){return""}},wt=class{constructor(){this.seen={}}slug(t){let e=t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(e)){const t=e;do{this.seen[t]++,e=t+"-"+this.seen[t]}while(this.seen.hasOwnProperty(e))}return this.seen[e]=0,e}};const{defaults:kt}=q,{block:xt,inline:_t}=dt;function zt(t){return t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function St(t){let e,n,s="";const i=t.length;for(e=0;e<i;e++)n=t.charCodeAt(e),Math.random()>.5&&(n="x"+n.toString(16)),s+="&#"+n+";";return s}var vt=class t{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||kt,this.options.tokenizer=this.options.tokenizer||new lt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;const e={block:xt.normal,inline:_t.normal};this.options.pedantic?(e.block=xt.pedantic,e.inline=_t.pedantic):this.options.gfm&&(e.block=xt.gfm,e.inline=this.options.breaks?_t.breaks:_t.gfm),this.tokenizer.rules=e}static get rules(){return{block:xt,inline:_t}}static lex(e,n){return new t(n).lex(e)}lex(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(t,this.tokens,!0),this.inline(this.tokens),this.tokens}blockTokens(t,e=[],n=!0){let s,i,r;for(t=t.replace(/^ +$/gm,"");t;)if(s=this.tokenizer.space(t))t=t.substring(s.raw.length),s.type&&e.push(s);else if(s=this.tokenizer.code(t,e))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.fences(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.heading(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.nptable(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.hr(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.blockquote(t))t=t.substring(s.raw.length),s.tokens=this.blockTokens(s.text,[],n),e.push(s);else if(s=this.tokenizer.list(t)){for(t=t.substring(s.raw.length),r=s.items.length,i=0;i<r;i++)s.items[i].tokens=this.blockTokens(s.items[i].text,[],!1);e.push(s)}else if(s=this.tokenizer.html(t))t=t.substring(s.raw.length),e.push(s);else if(n&&(s=this.tokenizer.def(t)))t=t.substring(s.raw.length),this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});else if(s=this.tokenizer.table(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.lheading(t))t=t.substring(s.raw.length),e.push(s);else if(n&&(s=this.tokenizer.paragraph(t)))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.text(t))t=t.substring(s.raw.length),e.push(s);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}return e}inline(t){let e,n,s,i,r,l;const o=t.length;for(e=0;e<o;e++)switch(l=t[e],l.type){case"paragraph":case"text":case"heading":l.tokens=[],this.inlineTokens(l.text,l.tokens);break;case"table":for(l.tokens={header:[],cells:[]},i=l.header.length,n=0;n<i;n++)l.tokens.header[n]=[],this.inlineTokens(l.header[n],l.tokens.header[n]);for(i=l.cells.length,n=0;n<i;n++)for(r=l.cells[n],l.tokens.cells[n]=[],s=0;s<r.length;s++)l.tokens.cells[n][s]=[],this.inlineTokens(r[s],l.tokens.cells[n][s]);break;case"blockquote":this.inline(l.tokens);break;case"list":for(i=l.items.length,n=0;n<i;n++)this.inline(l.items[n].tokens)}return t}inlineTokens(t,e=[],n=!1,s=!1){let i;for(;t;)if(i=this.tokenizer.escape(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.tag(t,n,s))t=t.substring(i.raw.length),n=i.inLink,s=i.inRawBlock,e.push(i);else if(i=this.tokenizer.link(t))t=t.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,s)),e.push(i);else if(i=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,s)),e.push(i);else if(i=this.tokenizer.strong(t))t=t.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,s),e.push(i);else if(i=this.tokenizer.em(t))t=t.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,s),e.push(i);else if(i=this.tokenizer.codespan(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.br(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.del(t))t=t.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,s),e.push(i);else if(i=this.tokenizer.autolink(t,St))t=t.substring(i.raw.length),e.push(i);else if(n||!(i=this.tokenizer.url(t,St))){if(i=this.tokenizer.inlineText(t,s,zt))t=t.substring(i.raw.length),e.push(i);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(i.raw.length),e.push(i);return e}};const{defaults:yt}=q,{unescape:$t}=X;var At=class t{constructor(t){this.options=t||yt,this.options.renderer=this.options.renderer||new bt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new mt,this.slugger=new wt}static parse(e,n){return new t(n).parse(e)}parse(t,e=!0){let n,s,i,r,l,o,a,h,c,u,d,p,f,g,b,m,w,k,x="";const _=t.length;for(n=0;n<_;n++)switch(u=t[n],u.type){case"space":continue;case"hr":x+=this.renderer.hr();continue;case"heading":x+=this.renderer.heading(this.parseInline(u.tokens),u.depth,$t(this.parseInline(u.tokens,this.textRenderer)),this.slugger);continue;case"code":x+=this.renderer.code(u.text,u.lang,u.escaped);continue;case"table":for(h="",a="",r=u.header.length,s=0;s<r;s++)a+=this.renderer.tablecell(this.parseInline(u.tokens.header[s]),{header:!0,align:u.align[s]});for(h+=this.renderer.tablerow(a),c="",r=u.cells.length,s=0;s<r;s++){for(o=u.tokens.cells[s],a="",l=o.length,i=0;i<l;i++)a+=this.renderer.tablecell(this.parseInline(o[i]),{header:!1,align:u.align[i]});c+=this.renderer.tablerow(a)}x+=this.renderer.table(h,c);continue;case"blockquote":c=this.parse(u.tokens),x+=this.renderer.blockquote(c);continue;case"list":for(d=u.ordered,p=u.start,f=u.loose,r=u.items.length,c="",s=0;s<r;s++)b=u.items[s],m=b.checked,w=b.task,g="",b.task&&(k=this.renderer.checkbox(m),f?"text"===b.tokens[0].type?(b.tokens[0].text=k+" "+b.tokens[0].text,b.tokens[0].tokens&&b.tokens[0].tokens.length>0&&"text"===b.tokens[0].tokens[0].type&&(b.tokens[0].tokens[0].text=k+" "+b.tokens[0].tokens[0].text)):b.tokens.unshift({type:"text",text:k}):g+=k),g+=this.parse(b.tokens,f),c+=this.renderer.listitem(g,w,m);x+=this.renderer.list(c,d,p);continue;case"html":x+=this.renderer.html(u.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(u.tokens));continue;case"text":for(c=u.tokens?this.parseInline(u.tokens):u.text;n+1<_&&"text"===t[n+1].type;)u=t[++n],c+="\n"+(u.tokens?this.parseInline(u.tokens):u.text);x+=e?this.renderer.paragraph(c):c;continue;default:{const t='Token with "'+u.type+'" type was not found.';if(this.options.silent)return void console.error(t);throw new Error(t)}}return x}parseInline(t,e){e=e||this.renderer;let n,s,i="";const r=t.length;for(n=0;n<r;n++)switch(s=t[n],s.type){case"escape":i+=e.text(s.text);break;case"html":i+=e.html(s.text);break;case"link":i+=e.link(s.href,s.title,this.parseInline(s.tokens,e));break;case"image":i+=e.image(s.href,s.title,s.text);break;case"strong":i+=e.strong(this.parseInline(s.tokens,e));break;case"em":i+=e.em(this.parseInline(s.tokens,e));break;case"codespan":i+=e.codespan(s.text);break;case"br":i+=e.br();break;case"del":i+=e.del(this.parseInline(s.tokens,e));break;case"text":i+=e.text(s.text);break;default:{const t='Token with "'+s.type+'" type was not found.';if(this.options.silent)return void console.error(t);throw new Error(t)}}return i}};const{merge:Zt,checkSanitizeDeprecation:Pt,escape:qt}=X,{getDefaults:Et,changeDefaults:jt,defaults:Tt}=q;function Ct(t,e,n){if(null==t)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof t)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");if(n||"function"==typeof e){n||(n=e,e=null),e=Zt({},Ct.defaults,e||{}),Pt(e);const i=e.highlight;let r,l,o=0;try{r=vt.lex(t,e)}catch(s){return n(s)}l=r.length;const a=function(t){if(t)return e.highlight=i,n(t);let l;try{l=At.parse(r,e)}catch(s){t=s}return e.highlight=i,t?n(t):n(null,l)};if(!i||i.length<3)return a();if(delete e.highlight,!l)return a();for(;o<r.length;o++)!function(t){"code"!==t.type?--l||a():i(t.text,t.lang,(function(e,n){return e?a(e):null==n||n===t.text?--l||a():(t.text=n,t.escaped=!0,void(--l||a()))}))}(r[o])}else try{return e=Zt({},Ct.defaults,e||{}),Pt(e),At.parse(vt.lex(t,e),e)}catch(s){if(s.message+="\nPlease report this to https://github.com/markedjs/marked.",(e||Ct.defaults).silent)return"<p>An error occurred:</p><pre>"+qt(s.message+"",!0)+"</pre>";throw s}}Ct.options=Ct.setOptions=function(t){return Zt(Ct.defaults,t),jt(Ct.defaults),Ct},Ct.getDefaults=Et,Ct.defaults=Tt,Ct.use=function(t){const e=Zt({},t);if(t.renderer){const n=Ct.defaults.renderer||new bt;for(const e in t.renderer){const s=n[e];n[e]=(...i)=>{let r=t.renderer[e].apply(n,i);return!1===r&&(r=s.apply(n,i)),r}}e.renderer=n}if(t.tokenizer){const n=Ct.defaults.tokenizer||new lt;for(const e in t.tokenizer){const s=n[e];n[e]=(...i)=>{let r=t.tokenizer[e].apply(n,i);return!1===r&&(r=s.apply(n,i)),r}}e.tokenizer=n}Ct.setOptions(e)},Ct.Parser=At,Ct.parser=At.parse,Ct.Renderer=bt,Ct.TextRenderer=mt,Ct.Lexer=vt,Ct.lexer=vt.lex,Ct.Tokenizer=lt,Ct.Slugger=wt,Ct.parse=Ct;var Dt=Ct;class Lt{constructor(){this.sprachSynthese=window.speechSynthesis,this.sprachSynthese.onvoiceschanged=()=>{this.voices=this.sprachSynthese.getVoices(),i.debugMessage("voices changed to: "+this.voices.join(","))}}getSynthese(){return this.sprachSynthese}getVoices(){return i.infoMessage("call getVoices"),this.voices||(this.voices=this.sprachSynthese.getVoices()),this.voices}}const Ft=class{constructor(e){t(this,e)}getFileURLexternalForm(t){return this.baseurl.endsWith("/")?this.baseurl+t:this.baseurl+"/"+t}getCurrentSlideURLExternalForm(){return this.getFileURLexternalForm(this.slides[this.slide])}getVorleserCallbacks(){const t={};return t.onstart=()=>{this.isPlayingMode=!0,this.isPausierend=!1,i.debugMessage("onstart")},t.onpause=()=>{this.isPlayingMode=!0,this.isPausierend=!0,i.debugMessage("onpause")},t.onresume=()=>{this.isPlayingMode=!0,this.isPausierend=!1,i.debugMessage("onresume")},t.onend=()=>{this.isPlayingMode=!1,this.isPausierend=!1,i.debugMessage("onend")},t}componentWillLoad(){const t=new Lt;this.sprachauswahl=new l(t),this.sprachausgabe=new r(t,this.sprachauswahl,this.getVorleserCallbacks()),this.isPlayingMode=!1,this.isPausierend=!1,this.slide=0,this.slides=[],this.tags=[],this.loadMetadata(),Dt.setOptions({baseUrl:this.baseurl,headerIds:!0,headerPrefix:"heading"})}printPageNum(){return"Folie "+(this.slide+1)+"/"+this.slides.length}playSlide(){i.debugMessage("Play slide"+this.baseurl+"/"+this.slides[this.slide]),this.loadAudioContent()}lo