(function(){var a=new RegExp(["^(<\\/?(a|abbr|acronym|applet|area|b|basefont|","bdo|big|button|cite|code|del|dfn|em|figcaption|","font|i|iframe|img|input|ins|kbd|label|map|","mark|meter|object|param|progress|q|ruby|rp|rt|s|","samp|script|select|small|span|strike|strong|","sub|sup|textarea|time|tt|u|var|wbr)[^>]*>|","<(br)\\s?\\/?>)$"].join(""),"i");if(!Array.indexOf){Array.prototype.indexOf=function(v){for(var u=0;u]*>?/gi,function(w){return w.match(v)?w:""})}function b(u,B){var A={};for(var z=0;z~X"+(this.hashBlocks.push(u)-1)+"X

\n"};Markdown.Extra.prototype.hashExtraInline=function(u){return"~X"+(this.hashBlocks.push(u)-1)+"X"};Markdown.Extra.prototype.unHashExtraBlocks=function(w){var v=this;function u(){var x=false;w=w.replace(/(?:

)?~X(\d+)X(?:<\/p>)?/g,function(y,z){x=true;var A=parseInt(z,10);return v.hashBlocks[A]});if(x===true){u()}}u();return w};Markdown.Extra.prototype.wrapHeaders=function(v){function u(w){return"\n"+w+"\n"}v=v.replace(/^.+[ \t]*\n=+[ \t]*\n+/gm,u);v=v.replace(/^.+[ \t]*\n-+[ \t]*\n+/gm,u);v=v.replace(/^\#{1,6}[ \t]*.+?[ \t]*\#*\n+/gm,u);return v};var e="\\{[ \\t]*((?:[#.][-_:a-zA-Z0-9]+[ \\t]*)+)\\}";var o=new RegExp("^(#{1,6}.*#{0,6})[ \\t]+"+e+"[ \\t]*(?:\\n|0x03)","gm");var n=new RegExp("^(.*)[ \\t]+"+e+"[ \\t]*\\n(?=[\\-|=]+\\s*(?:\\n|0x03))","gm");var f=new RegExp("^(```[ \\t]*[^{\\s]*)[ \\t]+"+e+"[ \\t]*\\n(?=([\\s\\S]*?)\\n```[ \\t]*(\\n|0x03))","gm");Markdown.Extra.prototype.hashHeaderAttributeBlocks=function(w){var v=this;function u(y,z,x){return"

~XX"+(v.hashBlocks.push(x)-1)+"XX

\n"+z+"\n"}w=w.replace(o,u);w=w.replace(n,u);return w};Markdown.Extra.prototype.hashFcbAttributeBlocks=function(w){var v=this;function u(y,z,x){return"

~XX"+(v.hashBlocks.push(x)-1)+"XX

\n"+z+"\n"}return w.replace(f,u)};Markdown.Extra.prototype.applyAttributeBlocks=function(w){var u=this;var v=new RegExp('

~XX(\\d+)XX

[\\s]*(?:<(h[1-6]|pre)(?: +class="(\\S+)")?(>[\\s\\S]*?))',"gm");w=w.replace(v,function(F,B,I,H,y){if(!I){return""}var G=parseInt(B,10);var C=u.hashBlocks[G];var x=C.match(/#[^\s#.]+/g)||[];var E=x[0]?' id="'+x[0].substr(1,x[0].length-1)+'"':"";var z=C.match(/\.[^\s#.]+/g)||[];for(var D=0;D0){A=' class="'+z.join(" ")+'"'}return"<"+I+E+A+y});return w};Markdown.Extra.prototype.tables=function(y){var v=this;var u=new RegExp(["^","[ ]{0,3}","[|]","(.+)\\n","[ ]{0,3}","[|]([ ]*[-:]+[-| :]*)\\n","(","(?:[ ]*[|].*\\n?)*",")","(?:\\n|$)"].join(""),"gm");var w=new RegExp(["^","[ ]{0,3}","(\\S.*[|].*)\\n","[ ]{0,3}","([-:]+[ ]*[|][-| :]*)\\n","(","(?:.*[|].*\\n?)*",")","(?:\\n|$)"].join(""),"gm");y=y.replace(u,x);y=y.replace(w,x);function x(I,P,E,K,F,z){P=P.replace(/^ *[|]/m,"");E=E.replace(/^ *[|]/m,"");K=K.replace(/^ *[|]/gm,"");P=P.replace(/[|] *$/m,"");E=E.replace(/[|] *$/m,"");K=K.replace(/[|] *$/gm,"");alignspecs=E.split(/ *[|] */);align=[];for(var Q=0;Q\n","\n","\n"].join("");for(Q=0;Q",A,"\n"].join("")}L+="\n\n";var J=K.split("\n");for(Q=0;Q\n";for(O=0;O",B,"\n"].join("")}L+="\n"}L+="\n";return v.hashExtraBlock(L)}return y};Markdown.Extra.prototype.stripFootnoteDefinitions=function(v){var u=this;v=v.replace(/\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/g,function(w,y,x){y=i(y);x+="\n";x=x.replace(/^[ ]{0,3}/g,"");u.footnotes[y]=x;return"\n"});return v};Markdown.Extra.prototype.doFootnotes=function(v){var u=this;if(u.isConvertingFootnote===true){return v}var w=0;v=v.replace(/\[\^(.+?)\]/g,function(x,y){var B=i(y);var A=u.footnotes[B];if(A===undefined){return x}w++;u.usedFootnotes.push(B);var z=''+w+"";return u.hashExtraInline(z)});return v};Markdown.Extra.prototype.printFootnotes=function(x){var v=this;if(v.usedFootnotes.length===0){return x}x+='\n\n
\n
\n
    \n\n';for(var w=0;w'+u+' \n\n'}x+="
\n
";return x};Markdown.Extra.prototype.fencedCodeBlocks=function(w){function v(x){x=x.replace(/&/g,"&");x=x.replace(//g,">");x=x.replace(/~D/g,"$$");x=x.replace(/~T/g,"~");return x}var u=this;w=w.replace(/(?:^|\n)```[ \t]*(\S*)[ \t]*\n([\s\S]*?)\n```[ \t]*(?=\n)/g,function(A,z,y){var E=z,D=y;var x=u.googleCodePrettify?' class="prettyprint"':"";var C="";if(E){if(u.googleCodePrettify||u.highlightJs){C=' class="language-'+E+'"'}else{C=' class="'+E+'"'}}var B=["",v(D),""].join("");return u.hashExtraBlock(B)});return w};Markdown.Extra.prototype.educatePants=function(y){var w=this;var v="";var x=0;y.replace(/(?:)|(<)([a-zA-Z1-6]+)([^\n]*?>)([\s\S]*?)(<\/\2>)/g,function(B,D,C,A,z,G,F){var E=y.substring(x,F);v+=w.applyPants(E);w.smartyPantsLastChar=v.substring(v.length-1);x=F+B.length;if(!D){v+=B;return}if(!/code|kbd|pre|script|noscript|iframe|math|ins|del|pre/i.test(C)){z=w.educatePants(z)}else{w.smartyPantsLastChar=z.substring(z.length-1)}v+=D+C+A+z+G});var u=y.substring(x);v+=w.applyPants(u);w.smartyPantsLastChar=v.substring(v.length-1);return v};function s(u,v){var w=v;w=w.replace(/&\#8220;/g,'"');w=w.replace(/&\#8221;/g,'"');w=w.replace(/&\#8216;/g,"'");w=w.replace(/&\#8217;/g,"'");w=w.replace(/&\#8212;/g,"---");w=w.replace(/&\#8211;/g,"--");w=w.replace(/&\#8230;/g,"...");return w}Markdown.Extra.prototype.applyPants=function(u){u=u.replace(/---/g,"—").replace(/--/g,"–");u=u.replace(/\.\.\./g,"…").replace(/\.\s\.\s\./g,"…");u=u.replace(/``/g,"“").replace(/''/g,"”");if(/^'$/.test(u)){if(/\S/.test(this.smartyPantsLastChar)){return"’"}return"‘"}if(/^"$/.test(u)){if(/\S/.test(this.smartyPantsLastChar)){return"”"}return"“"}u=u.replace(/^'(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/,"’");u=u.replace(/^"(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/,"”");u=u.replace(/"'(?=\w)/g,"“‘");u=u.replace(/'"(?=\w)/g,"‘“");u=u.replace(/'(?=\d{2}s)/g,"’");u=u.replace(/(\s| |--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)'(?=\w)/g,"$1‘");u=u.replace(/([^\s\[\{\(\-])'/g,"$1’");u=u.replace(/'(?=\s|s\b)/g,"’");u=u.replace(/'/g,"‘");u=u.replace(/(\s| |--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)"(?=\w)/g,"$1“");u=u.replace(/([^\s\[\{\(\-])"/g,"$1”");u=u.replace(/"(?=\s)/g,"”");u=u.replace(/"/ig,"“");return u};Markdown.Extra.prototype.runSmartyPants=function(u){this.smartyPantsLastChar="";u=this.educatePants(u);u=u.replace(/(<([a-zA-Z1-6]+)\b([^\n>]*?)(\/)?>)/g,s);return u};Markdown.Extra.prototype.definitionLists=function(w){var v=new RegExp(["(\\x02\\n?|\\n\\n)","(?:","(","(","[ ]{0,3}","((?:[ \\t]*\\S.*\\n)+)","\\n?","[ ]{0,3}:[ ]+",")","([\\s\\S]+?)","(","(?=\\0x03)","|","(?=","\\n{2,}","(?=\\S)","(?!","[ ]{0,3}","(?:\\S.*\\n)+?","\\n?","[ ]{0,3}:[ ]+",")","(?!","[ ]{0,3}:[ ]+",")",")",")",")",")"].join(""),"gm");var u=this;w=p(w);w=w.replace(v,function(y,A,z){var x=m(u.processDefListItems(z));x="
\n"+x+"\n
";return A+u.hashExtraBlock(x)+"\n\n"});return k(w)};Markdown.Extra.prototype.processDefListItems=function(v){var w=this;var x=new RegExp(["(\\x02\\n?|\\n\\n+)","(","[ ]{0,3}","(?![:][ ]|[ ])","(?:\\S.*\\n)+?",")","(?=\\n?[ ]{0,3}:[ ])"].join(""),"gm");var u=new RegExp(["\\n(\\n+)?","(","[ ]{0,3}","[:][ ]+",")","([\\s\\S]+?)","(?=\\n*","(?:","\\n[ ]{0,3}[:][ ]|","
|\\x03",")",")"].join(""),"gm");v=p(v);v=v.replace(/\n{2,}(?=\\x03)/,"\n");v=v.replace(x,function(y,D,B){var C=m(B).split("\n");var E="";for(var A=0;A"+z+"
"}return E+"\n"});v=v.replace(u,function(y,B,z,A){if(B||A.match(/\n{2,}/)){A=Array(z.length+1).join(" ")+A;A=h(A)+"\n\n";A="\n"+j(A,w)+"\n"}else{A=c(A);A=t(h(A),w)}return"\n
"+A+"
\n"});return k(v)};Markdown.Extra.prototype.strikethrough=function(u){return u.replace(/([\W_]|^)~T~T(?=\S)([^\r]*?\S[\*_]*)~T~T([\W_]|$)/g,"$1$2$3")};Markdown.Extra.prototype.newlines=function(u){return u.replace(/(<(?:br|\/li)>)?\n/g,function(v,w){return w?v:"
\n"})}})();