-
Notifications
You must be signed in to change notification settings - Fork 0
/
marked.min.js
6 lines (6 loc) · 17.5 KB
/
marked.min.js
1
2
3
4
5
6
/**
* marked - a markdown parser
* Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
* https://github.com/chjj/marked
*/
function getRandomInt(e){return Math.floor(Math.random()*Math.floor(e))}!function(){var k={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,attr:/^{{([^}]*)}}/,fences:t,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:t,lheading:/^([^\n]+)\n *(=|-){4,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:t,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,quiz:/^( *[>>]){2,}(.*?)([<<]){2,} *(?:\n+|$)/,text:/^[^\n]+/};function h(e){this.tokens=[],this.tokens.links={},this.options=e||c.defaults,this.rules=k.normal,this.options.gfm&&(this.options.tables?this.rules=k.tables:this.rules=k.gfm)}k.bullet=/(?:[*+-]|\d+\.)/,k.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,k.item=e(k.item,"gm")(/bull/g,k.bullet)(),k.list=e(k.list)(/bull/g,k.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+k.def.source+")")(),k.blockquote=e(k.blockquote)("def",k.def)(),k._tag="(?!(?: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",k.html=e(k.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,k._tag)(),k.paragraph=e(k.paragraph)("hr",k.hr)("heading",k.heading)("lheading",k.lheading)("blockquote",k.blockquote)("tag","<"+k._tag)("def",k.def)(),k.normal=u({},k),k.gfm=u({},k.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|{{([^}]*)}})/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),k.gfm.paragraph=e(k.paragraph)("(?!","(?!"+k.gfm.fences.source.replace("\\1","\\2")+"|"+k.list.source.replace("\\1","\\3")+"|")(),k.tables=u({},k.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),h.rules=k,h.lex=function(e,t){return new h(t).lex(e)},h.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},h.prototype.token=function(e,t,n){for(var r,s,i,o,l,h,e=e.replace(/^ +$/gm,"");e;)if((s=this.rules.newline.exec(e))&&(e=e.substring(s[0].length),1<s[0].length&&this.tokens.push({type:"space"})),s=this.rules.code.exec(e))e=e.substring(s[0].length),s=s[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?s:s.replace(/\n+$/,"")});else if(s=this.rules.fences.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"code",lang:s[2],text:s[3]||"",attr:s[4]});else if(s=this.rules.heading.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"heading",depth:s[1].length,text:s[2]});else if(t&&(s=this.rules.nptable.exec(e))){for(e=e.substring(s[0].length),o={type:"table",header:s[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3].replace(/\n$/,"").split("\n")},d=0;d<o.align.length;d++)/^ *-+: *$/.test(o.align[d])?o.align[d]="right":/^ *:-+: *$/.test(o.align[d])?o.align[d]="center":/^ *:-+ *$/.test(o.align[d])?o.align[d]="left":o.align[d]=null;for(d=0;d<o.cells.length;d++)o.cells[d]=o.cells[d].split(/ *\| */);this.tokens.push(o)}else if(s=this.rules.lheading.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"heading",depth:"="===s[2]?1:2,text:s[1]});else if(s=this.rules.hr.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"hr"});else if(s=this.rules.quiz.exec(e)){for(var a=(e=e.substring(s[0].length)).indexOf("\n\n"),p=(-1===a&&(a=e.length),cap2=e.substring(0,a),e=e.substring(cap2.length),{"[":"checkbox","(":"radio","=":"text"}),u={"*":"correct","?":"optional","=":"match","~":"contains"},c=cap2.split("\n"),g=[],d=0;d<c.length;d++){var f=c[d],b=p[f[0]];void 0!==b&&g.push({type:b,text:f.substring(3).trim(),option:u[f[1]]})}this.tokens.push({id:this.tokens.length,type:"quiz",text:s[2].trim(),items:g})}else if(s=this.rules.blockquote.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"blockquote_start"}),s=s[0].replace(/^ *> ?/gm,""),this.token(s,t,!0),this.tokens.push({type:"blockquote_end"});else if(s=this.rules.list.exec(e)){for(e=e.substring(s[0].length),i=s[2],this.tokens.push({type:"list_start",ordered:1<i.length}),r=!1,h=(s=s[0].match(this.rules.item)).length,d=0;d<h;d++)l=(o=s[d]).length,~(o=o.replace(/^ *([*+-]|\d+\.) +/,"")).indexOf("\n ")&&(l-=o.length,o=this.options.pedantic?o.replace(/^ {1,4}/gm,""):o.replace(new RegExp("^ {1,"+l+"}","gm"),"")),!this.options.smartLists||d===h-1||i===(l=k.bullet.exec(s[d+1])[0])||1<i.length&&1<l.length||(e=s.slice(d+1).join("\n")+e,d=h-1),l=r||/\n\n(?!\s*$)/.test(o),d!==h-1&&(r="\n"===o.charAt(o.length-1),l=l||r),this.tokens.push({type:l?"loose_item_start":"list_item_start"}),this.token(o,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(s=this.rules.html.exec(e))e=e.substring(s[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===s[1]||"script"===s[1]||"style"===s[1]),text:s[0]});else if(!n&&t&&(s=this.rules.def.exec(e)))e=e.substring(s[0].length),this.tokens.links[s[1].toLowerCase()]={href:s[2],title:s[3]};else if(t&&(s=this.rules.table.exec(e))){for(e=e.substring(s[0].length),o={type:"table",header:s[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3].replace(/(?: *\| *)?\n$/,"").split("\n")},d=0;d<o.align.length;d++)/^ *-+: *$/.test(o.align[d])?o.align[d]="right":/^ *:-+: *$/.test(o.align[d])?o.align[d]="center":/^ *:-+ *$/.test(o.align[d])?o.align[d]="left":o.align[d]=null;for(d=0;d<o.cells.length;d++)o.cells[d]=o.cells[d].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(o)}else if(t&&(s=this.rules.paragraph.exec(e)))e=e.substring(s[0].length),this.tokens.push({type:"paragraph",text:"\n"===s[1].charAt(s[1].length-1)?s[1].slice(0,-1):s[1]});else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"text",text:s[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var n={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:t,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,attr:/^{{([^}]*)}}/,br:/^ {2,}\n(?!\s*$)/,del:t,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};function r(e,t){if(this.options=t||c.defaults,this.links=e,this.rules=n.normal,this.renderer=this.options.renderer||new s,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=n.breaks:this.rules=n.gfm:this.options.pedantic&&(this.rules=n.pedantic)}function s(e){this.options=e||{}}function a(e){this.tokens=[],this.token=null,this.options=e||c.defaults,this.options.renderer=this.options.renderer||new s,this.renderer=this.options.renderer,this.renderer.options=this.options}function p(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function e(r,s){return r=r.source,s=s||"",function e(t,n){return t?(n=(n=n.source||n).replace(/(^|[^\[])\^/g,"$1"),r=r.replace(t,n),e):new RegExp(r,s)}}function t(){}function u(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function c(e,n,r){if(r||"function"==typeof n){r||(r=n,n=null);var s,i=(n=u({},c.defaults,n||{})).highlight,t=0;try{s=h.lex(e,n)}catch(e){return r(e)}function o(t){if(t)return n.highlight=i,r(t);var e;try{e=a.parse(s,n)}catch(e){t=e}return n.highlight=i,t?r(t):r(null,e)}var l=s.length;if(!i||i.length<3)return o();if(delete n.highlight,!l)return o();for(;t<s.length;t++)!function(n){"code"!==n.type?--l||o():i(n.text,n.lang,function(e,t){return e?o(e):null==t||t===n.text?--l||o():(n.text=t,n.escaped=!0,void(--l||o()))})}(s[t])}else try{return n=n&&u({},c.defaults,n),a.parse(h.lex(e,n),n)}catch(e){if(e.message+="\nPlease report this to https://github.com/chjj/marked.",(n||c.defaults).silent)return"<p>An error occured:</p><pre>"+p(e.message+"",!0)+"</pre>";throw e}}n._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,n._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,n.link=e(n.link)("inside",n._inside)("href",n._href)(),n.reflink=e(n.reflink)("inside",n._inside)(),n.normal=u({},n),n.pedantic=u({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),n.gfm=u({},n.normal,{escape:e(n.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:e(n.text)("]|","~]|")("|","|https?://|")()}),n.breaks=u({},n.gfm,{br:e(n.br)("{2,}","*")(),text:e(n.gfm.text)("{2,}","*")()}),r.rules=n,r.output=function(e,t,n){return new r(t,n).output(e)},r.prototype.output=function(e){for(var t,n,r,s="";e;)if(r=this.rules.escape.exec(e))e=e.substring(r[0].length),s+=r[1];else if(r=this.rules.autolink.exec(e))e=e.substring(r[0].length),n="@"===r[2]?(t=":"===r[1].charAt(6)?this.mangle(r[1].substring(7)):this.mangle(r[1]),this.mangle("mailto:")+t):t=p(r[1]),s+=this.renderer.link(n,null,t);else if(!this.inLink&&(r=this.rules.url.exec(e)))e=e.substring(r[0].length),n=t=p(r[1]),s+=this.renderer.link(n,null,t);else if(r=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(r[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(r[0])&&(this.inLink=!1),e=e.substring(r[0].length),s+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):p(r[0]):r[0];else if(r=this.rules.link.exec(e))e=e.substring(r[0].length),this.inLink=!0,s+=this.outputLink(r,{href:r[2],title:r[3]}),this.inLink=!1;else if((r=this.rules.reflink.exec(e))||(r=this.rules.nolink.exec(e)))e=e.substring(r[0].length),i=(r[2]||r[1]).replace(/\s+/g," "),(i=this.links[i.toLowerCase()])&&i.href?(this.inLink=!0,s+=this.outputLink(r,i),this.inLink=!1):(s+=r[0].charAt(0),e=r[0].substring(1)+e);else if(r=this.rules.strong.exec(e))e=e.substring(r[0].length),s+=this.renderer.strong(this.output(r[2]||r[1]));else if(r=this.rules.em.exec(e))e=e.substring(r[0].length),s+=this.renderer.em(this.output(r[2]||r[1]));else if(r=this.rules.code.exec(e)){e=e.substring(r[0].length);var i=void 0;(attr_cap=this.rules.attr.exec(e))&&(e=e.substring(attr_cap[0].length),i=attr_cap[1]),s+=this.renderer.codespan(p(r[2],!0),i)}else if(r=this.rules.br.exec(e))e=e.substring(r[0].length),s+=this.renderer.br();else if(r=this.rules.del.exec(e))e=e.substring(r[0].length),s+=this.renderer.del(this.output(r[1]));else if(r=this.rules.text.exec(e))e=e.substring(r[0].length),s+=this.renderer.text(p(this.smartypants(r[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return s},r.prototype.outputLink=function(e,t){var n=p(t.href),t=t.title?p(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,t,this.output(e[1])):this.renderer.image(n,t,p(e[1]))},r.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},r.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,s=0;s<r;s++)t=e.charCodeAt(s),n+="&#"+(t=.5<Math.random()?"x"+t.toString(16):t)+";";return n},s.prototype.code=function(e,t,n,r){if(!this.options.highlight||null!=(s=this.options.highlight(e,t))&&s!==e&&(n=!0,e=s),!t)return r?'<pre><code class="'+r+'">'+(n?e:p(e,!0))+"\n</code></pre>":"<pre><code>"+(n?e:p(e,!0))+"\n</code></pre>";var s=this.options.langPrefix+p(t,!0);return r&&(s+=" "+r),'<pre><code class="'+s+'">'+(n?e:p(e,!0))+"\n</code></pre>\n"},s.prototype.quiz=function(e){var t="<section class='quiz'> <h1>"+e.text+"</h1>",n=getRandomInt(1e4);t+="<form id='quiz-group-"+e.id+"'>";for(var r=0;r<e.items.length;r++){var s=e.items[r],i=getRandomInt(1e4);"text"===s.type?t+="<label for='quiz-group-"+e.id+"-"+i+"' class='incorrect'><input id='quiz-group-"+e.id+"-"+i+"' name='quiz-group-"+e.id+"-"+i+"' type='text' data-answer='"+(s.option||"")+"' data-value='"+s.text.toString("base64")+"' /></label>":"radio"===s.type?t+="<label for='quiz-group-"+e.id+"-"+i+"' class='incorrect'><input id='quiz-group-"+e.id+"-"+i+"' name='quiz-group-"+e.id+"-"+n+"' type='"+s.type+"' data-answer='"+(s.option||"")+"' />"+s.text+"</label></br>":t+="<label for='quiz-group-"+e.id+"-"+i+"' class='incorrect'><input id='quiz-group-"+e.id+"-"+i+"' name='quiz-group-"+e.id+"-"+i+"' type='"+s.type+"' data-answer='"+(s.option||"")+"' />"+s.text+"</label></br>"}return t=t+"</form>"+"</section>"},s.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},s.prototype.html=function(e){return e},s.prototype.heading=function(e,t,n){return"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},s.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},s.prototype.list=function(e,t){t=t?"ol":"ul";return"<"+t+">\n"+e+"</"+t+">\n"},s.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},s.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},s.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},s.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},s.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},s.prototype.strong=function(e){return"<strong>"+e+"</strong>"},s.prototype.em=function(e){return"<em>"+e+"</em>"},s.prototype.codespan=function(e,t){return t?'<code class="'+t+'">'+e+"</code>":"<code>"+e+"</code>"},s.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},s.prototype.del=function(e){return"<del>"+e+"</del>"},s.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,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)):""})).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return""}r='<a href="'+e+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},s.prototype.image=function(e,t,n){e='<img src="'+e+'" alt="'+n+'"';return t&&(e+=' title="'+t+'"'),e+=this.options.xhtml?"/>":">"},s.prototype.text=function(e){return e},a.parse=function(e,t,n){return new a(t).parse(e)},a.prototype.parse=function(e){this.inline=new r(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},a.prototype.next=function(){return this.token=this.tokens.pop()},a.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},a.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},a.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped,this.token.attr);case"table":for(var e,t,n="",r="",s="",i=0;i<this.token.header.length;i++)this.token.align[i],s+=this.renderer.tablecell(this.inline.output(this.token.header[i]),{header:!0,align:this.token.align[i]});for(n+=this.renderer.tablerow(s),i=0;i<this.token.cells.length;i++){for(e=this.token.cells[i],s="",t=0;t<e.length;t++)s+=this.renderer.tablecell(this.inline.output(e[t]),{header:!1,align:this.token.align[t]});r+=this.renderer.tablerow(s)}return this.renderer.table(n,r);case"blockquote_start":for(r="";"blockquote_end"!==this.next().type;)r+=this.tok();return this.renderer.blockquote(r);case"list_start":for(var r="",n=this.token.ordered;"list_end"!==this.next().type;)r+=this.tok();return this.renderer.list(r,n);case"list_item_start":for(r="";"list_item_end"!==this.next().type;)r+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(r);case"loose_item_start":for(r="";"list_item_end"!==this.next().type;)r+=this.tok();return this.renderer.listitem(r);case"html":n=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(n);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText());case"quiz":return this.renderer.quiz(this.token)}},t.exec=t,c.options=c.setOptions=function(e){return u(c.defaults,e),c},c.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new s,xhtml:!1},c.Parser=a,c.parser=a.parse,c.Renderer=s,c.Lexer=h,c.lexer=h.lex,c.InlineLexer=r,c.inlineLexer=r.output,c.parse=c,"undefined"!=typeof module&&"object"==typeof exports?module.exports=c:"function"==typeof define&&define.amd?define(function(){return c}):this.marked=c}.call(function(){return this||("undefined"!=typeof window?window:global)}());