(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)returne.valid=!1,e.error=g+"type "+i+' is not recognized. Valid values: "lang" or "output"',e;if(h.filter){if("function"!=typeofh.filter)returne.valid=!1,e.error=g+'"filter" must be a function, but '+typeofh.filter+" given",e}else{if(!h.regex)returne.valid=!1,e.error=g+'extensions must define either a "regex" property or a "filter" method',e;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}if(d.helper.isUndefined(h.filter)&&d.helper.isUndefined(h.regex))returne.valid=!1,e.error=g+"output extensions must define a filter property",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=function(a,b){"use strict";if(d.helper.isString(a)){if("undefined"==typeofb){if(e.hasOwnProperty(a))returne[a];throwError("SubParser named "+a+" not registered!")}e[a]=b}},d.extension=function(a,c){"use strict";if(!d.helper.isString(a))throwError("Extension 'name' must be a string");if(a=d.helper.stdExtName(a),d.helper.isUndefined(c)){if(!f.hasOwnProperty(a))throwError("Extension named "+a+" is not registered!");returnf[a]}"function"==typeofc&&(c=c()),d.helper.isArray(c)||(c=[c]);vare=b(c,a);if(!e.valid)throwError(e.error);f[a]=c}