(function(){functiona(a){"use strict";varb={omitExtraWLInCodeBlocks:{"default":!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{"default":!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{"default":!1,describe:"Specify a prefix to generated header ids",type:"string"},headerLevelStart:{"default":!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{"default":!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{"default":!1,describe:"Turn on/off GFM autolink style",type:"boolean"},literalMidWordUnderscores:{"default":!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},strikethrough:{"default":!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{"default":!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{"default":!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{"default":!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{"default":!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{"default":!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"}};if(a===!1)returnJSON.parse(JSON.stringify(b));varc={};for(vardinb)b.hasOwnProperty(d)&&(c[d]=b[d]["default"]);returnc}functionb(a,b){"use strict";varc=b?"Error in "+b+" extension->":"Error in unnamed extension",e={valid:!0,error:""};d.helper.isArray(a)||(a=[a]);for(varf=0;f<a.length;++f){varg=c+" sub-extension "+f+": ",h=a[f];if("object"!=typeofh)returne.valid=!1,e.error=g+"must be an object, but "+typeofh+" given",e;if(!d.helper.isString(h.type))returne.valid=!1,e.error=g+'property "type" must be a string, but '+typeofh.type+" given",e;vari=h.type=h.type.toLowerCase();if("language"===i&&(i=h.type="lang"),"html"===i&&(i=h.type="output"),"lang"!==i&&"output"!==i&&"listener"!==i)returne.valid=!1,e.error=g+"type "+i+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',e;if("listener"===i){if(d.helper.isUndefined(h.listeners))returne.valid=!1,e.error=g+'. Extensions of type "listener" must have a property called "listeners"',e}elseif(d.helper.isUndefined(h.filter)&&d.helper.isUndefined(h.regex))returne.valid=!1,e.error=g+i+' extensions must define either a "regex" property or a "filter" method',e;if(h.listeners){if("object"!=typeofh.listeners)returne.valid=!1,e.error=g+'"listeners" property must be an object but '+typeofh.listeners+" given",e;for(varjinh.listeners)if(h.listeners.hasOwnProperty(j)&&"function"!=typeofh.listeners[j])returne.valid=!1,e.error=g+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+j+" must be a function but "+typeofh.listeners[j]+" given",e}if(h.filter){if("function"!=typeofh.filter)returne.valid=!1,e.error=g+'"filter" must be a function, but '+typeofh.filter+" given",e}elseif(h.regex){if(d.helper.isString(h.regex)&&(h.regex=newRegExp(h.regex,"g")),!h.regexinstanceofRegExp)returne.valid=!1,e.error=g+'"regex" property must either be a string or a RegExp object, but '+typeofh.regex+" given",e;if(d.helper.isUndefined(h.replace))returne.valid=!1,e.error=g+'"regex" extensions must implement a replace string or function',e}}returne}functionc(a,b){"use strict";varc=b.charCodeAt(0);return"~E"+c+"E"}vard={},e={},f={},g=a(!0),h={github:{omitExtraWLInCodeBlocks:!0,prefixHeaderId:"user-content-",simplifiedAutoLink:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0},vanilla:a(!0)};d.helper={},d.extensions={},d.setOption=function(a,b){"use strict";returng[a]=b,this},d.getOption=function(a){"use strict";returng[a]},d.getOptions=function(){"use strict";returng},d.resetOptions=function(){"use strict";g=a(!0)},d.setFlavor=function(a){"use strict";if(h.hasOwnProperty(a)){varb=h[a];for(varcinb)b.hasOwnProperty(c)&&(g[c]=b[c])}},d.getDefaultOptions=function(b){"use strict";returna(b)},d.subParser=