mirror of
https://github.com/wassname/template.git
synced 2026-07-15 11:27:10 +08:00
4 lines
50 KiB
JavaScript
4 lines
50 KiB
JavaScript
document.write('<script src="http://'+(location.host||"localhost").split(":")[0]+':35729/livereload.js?snipver=1"></script>');var dl=function(){"use strict";function t(t,e){return e={exports:{}},t(e,e.exports),e.exports}function e(t,e){t.innerHTML+=e}function n(t){var e="citation_title="+t.title+";";return t.author.split(" and ").forEach(function(t){e+="citation_author="+t.trim()+";"}),"journal"in t&&(e+="citation_journal_title="+t.journal+";"),"volume"in t&&(e+="citation_volume="+t.volume+";"),("issue"in t||"number"in t)&&(e+="citation_number="+(t.issue||t.number)+";"),e}function i(t,e){h(t,e),document.addEventListener("DOMContentLoaded",function(n){o(t,e),s(t,e),f(t,e),b(t,e),x(t,e),w(t,e),S(t,e),k(t,e),console.log("final data:");for(var i in e)console.log(" ",i,": ",e[i])})}var r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},a=t(function(t,e){!function(t){function e(){this.months=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],this.notKey=[",","{","}"," ","="],this.pos=0,this.input="",this.entries=new Array,this.currentEntry="",this.setInput=function(t){this.input=t},this.getEntries=function(){return this.entries},this.isWhitespace=function(t){return" "==t||"\r"==t||"\t"==t||"\n"==t},this.match=function(t,e){if(void 0!=e&&null!=e||(e=!0),this.skipWhitespace(e),this.input.substring(this.pos,this.pos+t.length)!=t)throw"Token mismatch, expected "+t+", found "+this.input.substring(this.pos);this.pos+=t.length,this.skipWhitespace(e)},this.tryMatch=function(t,e){return void 0!=e&&null!=e||(e=!0),this.skipWhitespace(e),this.input.substring(this.pos,this.pos+t.length)==t},this.matchAt=function(){for(var t=this;this.input.length>this.pos&&"@"!=this.input[this.pos];)t.pos++;return"@"==this.input[this.pos]},this.skipWhitespace=function(t){for(var e=this;this.isWhitespace(this.input[this.pos]);)e.pos++;if("%"==this.input[this.pos]&&1==t){for(;"\n"!=this.input[this.pos];)e.pos++;this.skipWhitespace(t)}},this.value_braces=function(){var t=this,e=0;this.match("{",!1);for(var n=this.pos,i=!1;;){if(!i)if("}"==t.input[t.pos]){if(!(e>0)){var r=t.pos;return t.match("}",!1),t.input.substring(n,r)}e--}else if("{"==t.input[t.pos])e++;else if(t.pos>=t.input.length-1)throw"Unterminated value";i="\\"==t.input[t.pos]&&0==i,t.pos++}},this.value_comment=function(){for(var t=this,e="",n=0;!this.tryMatch("}",!1)||0!=n;){if(e+=t.input[t.pos],"{"==t.input[t.pos]&&n++,"}"==t.input[t.pos]&&n--,t.pos>=t.input.length-1)throw"Unterminated value:"+t.input.substring(start);t.pos++}return e},this.value_quotes=function(){var t=this;this.match('"',!1);for(var e=this.pos,n=!1;;){if(!n){if('"'==t.input[t.pos]){var i=t.pos;return t.match('"',!1),t.input.substring(e,i)}if(t.pos>=t.input.length-1)throw"Unterminated value:"+t.input.substring(e)}n="\\"==t.input[t.pos]&&0==n,t.pos++}},this.single_value=function(){var t=this.pos;if(this.tryMatch("{"))return this.value_braces();if(this.tryMatch('"'))return this.value_quotes();var e=this.key();if(e.match("^[0-9]+$"))return e;if(this.months.indexOf(e.toLowerCase())>=0)return e.toLowerCase();throw"Value expected:"+this.input.substring(t)+" for key: "+e},this.value=function(){var t=this,e=[];for(e.push(this.single_value());this.tryMatch("#");)t.match("#"),e.push(t.single_value());return e.join("")},this.key=function(){for(var t=this,e=this.pos;;){if(t.pos>=t.input.length)throw"Runaway key";if(t.notKey.indexOf(t.input[t.pos])>=0)return t.input.substring(e,t.pos);t.pos++}},this.key_equals_value=function(){var t=this.key();if(this.tryMatch("=")){this.match("=");var e=this.value();return[t,e]}throw"... = value expected, equals sign missing:"+this.input.substring(this.pos)},this.key_value_list=function(){var t=this,e=this.key_equals_value();for(this.currentEntry.entryTags={},this.currentEntry.entryTags[e[0]]=e[1];this.tryMatch(",")&&(t.match(","),!t.tryMatch("}"));)e=t.key_equals_value(),t.currentEntry.entryTags[e[0]]=e[1]},this.entry_body=function(t){this.currentEntry={},this.currentEntry.citationKey=this.key(),this.currentEntry.entryType=t.substring(1),this.match(","),this.key_value_list(),this.entries.push(this.currentEntry)},this.directive=function(){return this.match("@"),"@"+this.key()},this.preamble=function(){this.currentEntry={},this.currentEntry.entryType="PREAMBLE",this.currentEntry.entry=this.value_comment(),this.entries.push(this.currentEntry)},this.comment=function(){this.currentEntry={},this.currentEntry.entryType="COMMENT",this.currentEntry.entry=this.value_comment(),this.entries.push(this.currentEntry)},this.entry=function(t){this.entry_body(t)},this.bibtex=function(){for(var t=this;this.matchAt();){var e=t.directive();t.match("{"),"@STRING"==e?t.string():"@PREAMBLE"==e?t.preamble():"@COMMENT"==e?t.comment():t.entry(e),t.match("}")}}}t.toJSON=function(t){var n=new e;return n.setInput(t),n.bibtex(),n.entries},t.toBibtex=function(t){var e="";for(var n in t){if(e+="@"+t[n].entryType,e+="{",t[n].citationKey&&(e+=t[n].citationKey+", "),t[n].entry&&(e+=t[n].entry),t[n].entryTags){var i="";for(var r in t[n].entryTags)0!=i.length&&(i+=", "),i+=r+"= {"+t[n].entryTags[r]+"}";e+=i}e+="}\n\n"}return e}}(e)}),o=function(t,e){var n="\n @article{gregor2015draw,\n title={DRAW: A recurrent neural network for image generation},\n author={Gregor, Karol and Danihelka, Ivo and Graves, Alex and Rezende, Danilo Jimenez and Wierstra, Daan},\n journal={arXivreprint arXiv:1502.04623},\n year={2015}\n }\n @article{mercier2011humans,\n title={Why do humans reason? Arguments for an argumentative theory},\n author={Mercier, Hugo and Sperber, Dan},\n journal={Behavioral and brain sciences},\n volume={34},\n number={02},\n pages={57--74},\n year={2011},\n publisher={Cambridge Univ Press}\n }",i={};a.toJSON(n).forEach(function(t){i[t.citationKey]=t.entryTags,i[t.citationKey].type=t.entryType});var r={},o=[].slice.apply(t.querySelectorAll("dt-cite"));o.forEach(function(t){var e=t.textContent.split(",");e.forEach(function(t){i[t]?r[t]=i[t]:console.warn("No bibliography entry found for: "+t)})}),e.citations=r},s=function(t,i){t.querySelector("html").setAttribute("lang","en");var r=t.querySelector("head");t.querySelector("meta[charset]")||e(r,'<meta charset="utf-8">'),t.querySelector("meta[name=viewport]")||e(r,'<meta name="viewport" content="width=device-width, initial-scale=1">'),e(r,'\n <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">\n <link rel="icon" type="image/png" href="/favicon.png">\n <link href="/rss.xml" rel="alternate" type="application/rss+xml" title="Articles from Distill">\n <link rel="canonical" href="'+i.url+'">\n <title>'+i.title+"</title>\n "),e(r,'\n <!-- https://schema.org/Article -->\n <meta property="article:published" itemprop="datePublished" content="'+i.publishedDate+'" />\n <meta property="article:modified" itemprop="dateModified" content="'+i.updatedDate+'" />\n '),i.authors.forEach(function(t){e(r,'\n <meta property="article:author" content="'+t.firstName+" "+t.lastName+'" />')}),e(r,'\n <!-- https://developers.facebook.com/docs/sharing/webmasters#markup -->\n <meta property="og:type" content="article"/>\n <meta property="og:title" content="'+i.title+'"/>\n <meta property="og:description" content="'+i.description+'">\n <meta property="og:url" content="'+i.url+'"/>\n <meta property="og:image" content="'+i.url+'/thumbnail.png"/>\n <meta property="og:locale" content="en_US" />\n <meta property="og:site_name" content="Distill" />\n '),e(r,'\n <!-- https://dev.twitter.com/cards/types/summary -->\n <meta name="twitter:card" content="summary_large_image">\n <meta name="twitter:title" content="'+i.title+'">\n <meta name="twitter:description" content="'+i.description+'">\n <meta name="twitter:url" content="'+i.url+'">\n <meta name="twitter:image" content="'+i.url+'/thumbnail.png">\n <meta name="twitter:image:width" content="560">\n <meta name="twitter:image:height" content="295">\n '),e(r,'\n <!-- https://scholar.google.com/intl/en/scholar/inclusion.html#indexing -->\n <meta name="citation_title" content="'+i.title+'">\n <meta name="citation_publication_date" content="'+i.publishedYear+"/"+i.publishedMonthPadded+"/"+i.publishedDayPadded+'">\n <meta name="citation_fulltext_html_url" content="'+i.url+'">\n <meta name="citation_volume" content="'+i.volume+'">\n <meta name="citation_issue" content="'+i.issue+'">\n <meta name="citation_journal_title" content="'+i.journal.name+'">\n <meta name="citation_journal_abbrev" content="'+i.journal.nameAbbrev+'"/>\n <meta name="citation_firstpage" content="e'+i.doiSuffix+'"/>\n <meta name="citation_doi" content="'+i.doi+'">\n <meta name="citation_issn" content="'+i.journal.issn+'">\n <meta name="citation_publisher" content="'+i.journal.publisher+'"/>\n '),i.authors.forEach(function(t){e(r,'\n <meta name="citation_author" content="'+t.lastName+", "+t.firstName+'" />\n <meta name="citation_author_institution" content="'+t.affiliation+'"/>\n ')}),Object.keys(i.citations).forEach(function(t){console.log(t),e(r,'\n <meta name="citation_reference" content="'+n(i.citations[t])+'" >\n ')})},l="html {\n font: 400 15px/1.55em -apple-system, BlinkMacSystemFont, \"Roboto\", sans-serif;\n}\n\nhtml {\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n text-size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\n\n/*\nhtml, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, img, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\nb, u, i, center,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td,\narticle, aside, canvas, details, embed,\nfigure, figcaption, footer, header, hgroup,\nmenu, nav, output, ruby, section, summary,\ntime, mark, audio, video {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tfont-size: 100%;\n\tfont: inherit;\n\tvertical-align: baseline;\n}\narticle, aside, details, figcaption, figure,\nfooter, header, hgroup, menu, nav, section {\n\tdisplay: block;\n}\nbody {\n\tline-height: 1;\n}\nol, ul {\n\tlist-style: none;\n}\nblockquote, q {\n\tquotes: none;\n}\nblockquote:before, blockquote:after,\nq:before, q:after {\n\tcontent: '';\n\tcontent: none;\n}\ntable {\n\tborder-collapse: collapse;\n\tborder-spacing: 0;\n}*/\n",c=".l-body,\n.l-page,\ndt-article > * {\n margin-left: 24px;\n margin-right: 24px;\n box-sizing: border-box;\n}\n\n@media(min-width: 768px) {\n .l-body,\n .l-page,\n dt-article > * {\n margin-left: 72px;\n margin-right: 72px;\n }\n}\n\n@media(min-width: 1080px) {\n .l-body,\n dt-article > * {\n margin-left: calc(50% - 984px / 2);\n width: 648px;\n }\n .l-body-outset,\n dt-article .l-body-outset {\n margin-left: calc(50% - 984px / 2 - 24px);\n width: calc(648px + 48px);\n }\n .l-middle,\n dt-article .l-middle {\n width: 816px;\n margin-left: calc(50% - 984px / 2);\n }\n .l-page,\n dt-article .l-page {\n width: 984px;\n margin-left: auto;\n margin-right: auto;\n }\n .l-page-outset,\n dt-article .l-page-outset {\n width: 1080px;\n margin-left: auto;\n margin-right: auto;\n }\n .l-screen,\n dt-article .l-screen {\n margin-left: auto;\n margin-right: auto;\n width: auto;\n }\n .l-screen-inset,\n dt-article .l-screen-inset {\n margin-left: 24px;\n margin-right: 24px;\n width: auto;\n }\n .l-gutter,\n dt-article .l-gutter {\n clear: both;\n float: right;\n margin-top: 0;\n margin-left: 24px;\n margin-right: calc((100vw - 960px) / 2);\n width: calc((984px - 648px) / 2 - 24px);\n }\n /* Side */\n .side.l-body,\n dt-article .side.l-body {\n clear: both;\n float: right;\n margin-top: 0;\n margin-left: 48px;\n margin-right: calc((100vw - 984px + 648px) / 2);\n width: calc(648px / 2 - 24px);\n }\n .side.l-body-outset,\n dt-article .side.l-body-outset {\n clear: both;\n float: right;\n margin-top: 0;\n margin-left: 48px;\n margin-right: calc((100vw - 984px + 648px - 48px) / 2);\n width: calc(648px / 2 - 48px + 24px);\n }\n .side.l-page,\n dt-article .side.l-page {\n clear: both;\n float: right;\n margin-top: 0;\n margin-left: 48px;\n margin-right: calc((100vw - 984px) / 2);\n width: calc(960px / 2 - 48px);\n }\n}\n",p='dt-article {\n color: rgba(0, 0, 0, 0.8);\n font: 15px/1.55em -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;\n}\n\n@media(min-width: 1024px) {\n dt-article {\n font-size: 20px;\n }\n}\n\ndt-article h1 {\n font-weight: 700;\n font-size: 32px;\n line-height: 1.1em;\n /*-webkit-font-smoothing: antialiased;*/\n}\n\n@media(min-width: 1024px) {\n dt-article h1 {\n font-size: 50px;\n margin-bottom: 12px;\n letter-spacing: -0.025em;\n }\n}\n\n@media(min-width: 1024px) {\n dt-article > h1:first-of-type {\n margin-top: 100px;\n }\n}\n\ndt-article h2 {\n font-weight: 400;\n font-size: 28px;\n line-height: 1.25em;\n margin-top: 12px;\n margin-bottom: 24px;\n}\n\ndt-article h1 + h2 {\n padding-bottom: 48px;\n margin-bottom: 48px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n}\n\ndt-article h3 {\n font-weight: 700;\n font-size: 20px;\n line-height: 1.4em;\n margin-top: 24px;\n margin-bottom: 24px;\n}\n\ndt-article h4 {\n font-weight: 600;\n text-transform: uppercase;\n font-size: 14px;\n line-height: 1.4em;\n}\n\ndt-article a {\n color: inherit;\n}\n\ndt-article p {\n margin-bottom: 24px;\n -webkit-font-smoothing: antialiased;\n /*font-family: Georgia, serif;*/\n}\n\ndt-article p a {\n /*text-decoration: none;*/\n /*background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0) 50%);*/\n /*background-repeat: repeat-x;*/\n /*background-size: 2px 1em;*/\n /*background-position: 0 1.25em;*/\n}\n\ndt-article p .link {\n text-decoration: underline;\n cursor: pointer;\n}\n\n\n\ndt-article ul {\n padding-left: 20px;\n}\n\ndt-article li {\n /*margin-bottom: 24px;*/\n}\n\ndt-article pre {\n font-size: 14px;\n margin-bottom: 20px;\n}\n\n\ndt-article hr {\n border: none;\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n margin-top: 60px;\n margin-bottom: 60px;\n}\n\ndt-article section {\n margin-top: 60px;\n margin-bottom: 60px;\n}\n\n\n/* Figure */\n\ndt-article figure {\n position: relative;\n margin-top: 30px;\n margin-bottom: 30px;\n}\n\n@media(min-width: 1024px) {\n dt-article figure {\n margin-top: 48px;\n margin-bottom: 48px;\n }\n}\n\ndt-article figure img {\n width: 100%;\n}\n\ndt-article figure svg text,\ndt-article figure svg tspan {\n}\n\ndt-article figure figcaption {\n color: rgba(0, 0, 0, 0.6);\n font-size: 12px;\n line-height: 1.5em;\n}\n@media(min-width: 1024px) {\n dt-article figure figcaption {\n font-size: 13px;\n }\n}\n\ndt-article figure.external img {\n background: white;\n border: 1px solid rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);\n padding: 18px;\n box-sizing: border-box;\n}\n\ndt-article figure figcaption a {\n color: rgba(0, 0, 0, 0.6);\n}\n\n/*dt-article figure figcaption::before {\n position: relative;\n display: block;\n top: -20px;\n content: "";\n width: 25px;\n border-top: 1px solid rgba(0, 0, 0, 0.3);\n}*/\n\ndt-article span.equation-mimic {\n font-family: georgia;\n font-size: 115%;\n font-style: italic;\n}\n\ndt-article figure figcaption b {\n font-weight: 600;\n color: rgba(0, 0, 0, 1.0);\n}\n\ndt-article > dt-code {\n display: block;\n}\n',u='/**\n * prism.js default theme for JavaScript, CSS and HTML\n * Based on dabblet (http://dabblet.com)\n * @author Lea Verou\n */\n\n code {\n white-space:pre-wrap;\n background: rgba(0, 0, 0, 0.04);\n border-radius: 2px;\n padding: 4px 7px;\n font-size: 15px;\n color: rgba(0, 0, 0, 0.6);\n }\n\n pre code {\n display: block;\n background: white;\n border: 1px solid rgba(0, 0, 0, 0.08);\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);\n }\n\n\ncode[class*="language-"],\npre[class*="language-"] {\n\tcolor: black;\n\ttext-shadow: 0 1px white;\n\tfont-family: Consolas, Monaco, \'Andale Mono\', \'Ubuntu Mono\', monospace;\n\ttext-align: left;\n\twhite-space: pre;\n\tword-spacing: normal;\n\tword-break: normal;\n\tword-wrap: normal;\n\tline-height: 1.5;\n\n\t-moz-tab-size: 4;\n\t-o-tab-size: 4;\n\ttab-size: 4;\n\n\t-webkit-hyphens: none;\n\t-moz-hyphens: none;\n\t-ms-hyphens: none;\n\thyphens: none;\n}\n\npre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,\ncode[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {\n\ttext-shadow: none;\n\tbackground: #b3d4fc;\n}\n\npre[class*="language-"]::selection, pre[class*="language-"] ::selection,\ncode[class*="language-"]::selection, code[class*="language-"] ::selection {\n\ttext-shadow: none;\n\tbackground: #b3d4fc;\n}\n\n@media print {\n\tcode[class*="language-"],\n\tpre[class*="language-"] {\n\t\ttext-shadow: none;\n\t}\n}\n\n/* Code blocks */\npre[class*="language-"] {\n\toverflow: auto;\n}\n\n:not(pre) > code[class*="language-"],\npre[class*="language-"] {\n}\n\n/* Inline code */\n:not(pre) > code[class*="language-"] {\n\twhite-space: normal;\n}\n\n.token.comment,\n.token.prolog,\n.token.doctype,\n.token.cdata {\n\tcolor: slategray;\n}\n\n.token.punctuation {\n\tcolor: #999;\n}\n\n.namespace {\n\topacity: .7;\n}\n\n.token.property,\n.token.tag,\n.token.boolean,\n.token.number,\n.token.constant,\n.token.symbol,\n.token.deleted {\n\tcolor: #905;\n}\n\n.token.selector,\n.token.attr-name,\n.token.string,\n.token.char,\n.token.builtin,\n.token.inserted {\n\tcolor: #690;\n}\n\n.token.operator,\n.token.entity,\n.token.url,\n.language-css .token.string,\n.style .token.string {\n\tcolor: #a67f59;\n\tbackground: hsla(0, 0%, 100%, .5);\n}\n\n.token.atrule,\n.token.attr-value,\n.token.keyword {\n\tcolor: #07a;\n}\n\n.token.function {\n\tcolor: #DD4A68;\n}\n\n.token.regex,\n.token.important,\n.token.variable {\n\tcolor: #e90;\n}\n\n.token.important,\n.token.bold {\n\tfont-weight: bold;\n}\n.token.italic {\n\tfont-style: italic;\n}\n\n.token.entity {\n\tcursor: help;\n}\n',h=function(t,e){var n=t.createElement("style");n.textContent=l+c+p+u,t.querySelector("head").appendChild(n)},g='<svg viewBox="-607 419 64 64">\n <path style="fill: none; stroke: black;stroke-width: 2px;" d="M-573.4,478.9c-8,0-14.6-6.4-14.6-14.5s14.6-25.9,14.6-40.8c0,14.9,14.6,32.8,14.6,40.8S-565.4,478.9-573.4,478.9z"/>\n</svg>\n',d='\n<style>\ndt-header {\n display: block;\n position: relative;\n height: 60px;\n background-color: #fcfcfc;\n width: 100%;\n box-sizing: border-box;\n z-index: 2;\n color: rgba(0, 0, 0, 0.8);\n}\ndt-header .content {\n border-bottom: 1px solid rgba(0, 0, 0, 0.3);\n height: 60px;\n}\ndt-header a {\n font-size: 16px;\n height: 60px;\n line-height: 60px;\n text-decoration: none;\n color: rgba(0, 0, 0, 0.8);\n}\ndt-header svg {\n width: 24px;\n position: relative;\n top: 4px;\n margin-right: -2px;\n}\ndt-header svg path {\n fill: none;\n stroke: black;\n stroke-width: 1;\n stroke-linejoin: round;\n}\ndt-header .logo {\n font-size: 16px;\n font-weight: 300;\n}\ndt-header .nav {\n float: right;\n}\ndt-header .nav a {\n font-size: 14px;\n}\n</style>\n\n<div class="content l-page">\n <a href="/" class="logo">\n '+g+'\n Distill\n </a>\n <div class="nav">\n </div>\n</div>\n',f=function(t,e){t.querySelector("dt-header").innerHTML=d},m='\n<style>\n dt-appendix {\n display: block;\n font-family: "Open Sans";\n font-size: 14px;\n line-height: 24px;\n margin-bottom: 0;\n border-top: 1px solid rgba(0,0,0,0.1);\n color: rgba(0,0,0,0.5);\n background: rgba(0,0,0,0.025);\n padding-top: 36px;\n padding-right: 24px;\n padding-bottom: 60px;\n padding-left: 24px;\n }\n dt-appendix h3 {\n font-size: 16px;\n font-weight: 500;\n margin-top: 18px;\n margin-bottom: 18px;\n color: rgba(0,0,0,0.65);\n }\n dt-appendix .citation {\n font-size: 11px;\n line-height: 15px;\n border-left: 1px solid rgba(0, 0, 0, 0.1);\n padding-left: 18px;\n border: 1px solid rgba(0,0,0,0.1);\n background: rgba(0, 0, 0, 0.02);\n padding: 10px 18px;\n border-radius: 3px;\n color: rgba(150, 150, 150, 1);\n overflow: hidden;\n margin-top: -12px;\n }\n dt-appendix .references {\n font-size: 12px;\n line-height: 20px;\n }\n dt-appendix a {\n color: rgba(0, 0, 0, 0.6);\n }\n</style>\n\n<div class="l-body">\n <h3>References</h3>\n <dt-bibliography></dt-bibliography>\n <h3 id="citation">Errors, Reuse, and Citation</h3>\n <p>If you see mistakes or want to suggest changes, please submit a pull request on <a class="github">github</a>.</p>\n <p>Diagrams and text are licensed under Creative Commons Attribution <a href="https://creativecommons.org/licenses/by/2.0/">CC-BY 2.0</a>, unless noted otherwise, with the source available on available on <a class="github">github</a>. The figures that have been reused from other sources don\'t fall under this license and can be recognized by a note in their caption: “Figure from …”.</p>\n <p>For attribution in academic contexts, please cite this work as</p>\n <pre class="citation short"></pre>\n <p>BibTeX citation</p>\n <pre class="citation long"></pre>\n</div>\n',b=function(t,e){t.querySelector("dt-appendix").innerHTML=m},y='\n<style>\ndt-footer {\n display: block;\n color: rgba(255, 255, 255, 0.4);\n font-weight: 300;\n padding: 40px 0;\n border-top: 1px solid rgba(0, 0, 0, 0.1);\n background-color: rgba(0, 0, 0, 0.6);\n}\ndt-footer .logo svg {\n width: 24px;\n position: relative;\n top: 4px;\n margin-right: -2px;\n}\ndt-footer .logo svg path {\n stroke: rgba(255, 255, 255, 0.8)!important;\n stroke-width: 3px!important;\n}\ndt-footer .logo {\n font-size: 16px;\n font-weight: 300;\n color: rgba(255, 255, 255, 0.8);\n text-decoration: none;\n margin-right: 6px;\n}\n</style>\n\n<div class="l-body">\n <a href="/" class="logo">\n '+g+"\n Distill\n </a> is dedicated to clear explanations of machine learning\n</div>\n",x=function(t,e){t.querySelector("dt-footer").innerHTML=y},k=function(t,e){function n(t){if(!(t in e.citations))return"?";var n=e.citations[t],i=n.author.split(" and ");i=i.map(function(t){return t.split(",")[0].trim()});var r=n.year;return 1==i.length?i[0]+", "+r:2==i.length?i[0]+" & "+i[1]+", "+r:i.length>2?i[0]+", et al., "+r:void 0}function i(t){if(t){var e=t.author.split(" and "),n="",i=e.map(function(t){var e=t.split(",")[0].trim(),n=t.split(",")[1];if(void 0!=n){var i=n.trim().split(" ").map(function(t){return t.trim()[0]});return e+", "+i.join(".")+"."}return e});if(e.length>1?(n+=i.slice(0,e.length-1).join(", "),n+=" and "+i[e.length-1]):n+=i[0],n+=", "+t.year+". ",n+=t.title+". ",n+=t.journal||t.booktitle||"","volume"in t){var r=t.issue||t.number;r=void 0!=r?"("+r+")":"",n+=", Vol "+t.volume+r}return"pages"in t&&(n+=", pp. "+t.pages),n+=". "}return"?"}var r=Object.keys(e.citations).map(function(t){return e.citations[t]});r.sort(function(t,e){return t.author.localeCompare(e.author)});var a=[].slice.apply(t.querySelectorAll("dt-cite"));a.forEach(function(t){var e=t.textContent.split(","),i=e.map(n).join(", ");t.innerHTML=i});var o=t.querySelector("dt-bibliography"),s=t.createElement("ol");r.forEach(function(e){var n=t.createElement("li");n.textContent=i(e),s.appendChild(n)}),o.appendChild(s)},v=t(function(t,e){(function(){function e(t){this.tokens=[],this.tokens.links={},this.options=t||p.defaults,this.rules=u.normal,this.options.gfm&&(this.options.tables?this.rules=u.tables:this.rules=u.gfm)}function n(t,e){if(this.options=e||p.defaults,this.links=t,this.rules=h.normal,this.renderer=this.options.renderer||new i,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=h.breaks:this.rules=h.gfm:this.options.pedantic&&(this.rules=h.pedantic)}function i(t){this.options=t||{}}function r(t){this.tokens=[],this.token=null,this.options=t||p.defaults,this.options.renderer=this.options.renderer||new i,this.renderer=this.options.renderer,this.renderer.options=this.options}function a(t,e){return t.replace(e?/&/g:/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function o(t){return t.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,function(t,e){return e=e.toLowerCase(),"colon"===e?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""})}function s(t,e){return t=t.source,e=e||"",function n(i,r){return i?(r=r.source||r,r=r.replace(/(^|[^\[])\^/g,"$1"),t=t.replace(i,r),n):new RegExp(t,e)}}function l(){}function c(t){for(var e,n,i=arguments,r=1;r<arguments.length;r++){e=i[r];for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t}function p(t,n,i){if(i||"function"==typeof n){i||(i=n,n=null),n=c({},p.defaults,n||{});var o,s,l=n.highlight,u=0;try{o=e.lex(t,n)}catch(t){return i(t)}s=o.length;var h=function(t){if(t)return n.highlight=l,i(t);var e;try{e=r.parse(o,n)}catch(e){t=e}return n.highlight=l,t?i(t):i(null,e)};if(!l||l.length<3)return h();if(delete n.highlight,!s)return h();for(;u<o.length;u++)!function(t){return"code"!==t.type?--s||h():l(t.text,t.lang,function(e,n){return e?h(e):null==n||n===t.text?--s||h():(t.text=n,t.escaped=!0,void(--s||h()))})}(o[u])}else try{return n&&(n=c({},p.defaults,n)),r.parse(e.lex(t,n),n)}catch(t){if(t.message+="\nPlease report this to https://github.com/chjj/marked.",(n||p.defaults).silent)return"<p>An error occured:</p><pre>"+a(t.message+"",!0)+"</pre>";throw t}}var u={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:l,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:l,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\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:l,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};u.bullet=/(?:[*+-]|\d+\.)/,u.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,u.item=s(u.item,"gm")(/bull/g,u.bullet)(),u.list=s(u.list)(/bull/g,u.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+u.def.source+")")(),u.blockquote=s(u.blockquote)("def",u.def)(),u._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",u.html=s(u.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,u._tag)(),u.paragraph=s(u.paragraph)("hr",u.hr)("heading",u.heading)("lheading",u.lheading)("blockquote",u.blockquote)("tag","<"+u._tag)("def",u.def)(),u.normal=c({},u),u.gfm=c({},u.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),u.gfm.paragraph=s(u.paragraph)("(?!","(?!"+u.gfm.fences.source.replace("\\1","\\2")+"|"+u.list.source.replace("\\1","\\3")+"|")(),u.tables=c({},u.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=u,e.lex=function(t,n){var i=new e(n);return i.lex(t)},e.prototype.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(t,!0)},e.prototype.token=function(t,e,n){for(var i,r,a,o,s,l,c,p,h,g=this,t=t.replace(/^ +$/gm,"");t;)if((a=g.rules.newline.exec(t))&&(t=t.substring(a[0].length),a[0].length>1&&g.tokens.push({type:"space"})),a=g.rules.code.exec(t))t=t.substring(a[0].length),a=a[0].replace(/^ {4}/gm,""),g.tokens.push({type:"code",text:g.options.pedantic?a:a.replace(/\n+$/,"")});else if(a=g.rules.fences.exec(t))t=t.substring(a[0].length),g.tokens.push({type:"code",lang:a[2],text:a[3]||""});else if(a=g.rules.heading.exec(t))t=t.substring(a[0].length),g.tokens.push({type:"heading",depth:a[1].length,text:a[2]});else if(e&&(a=g.rules.nptable.exec(t))){for(t=t.substring(a[0].length),l={type:"table",header:a[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:a[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:a[3].replace(/\n$/,"").split("\n")},p=0;p<l.align.length;p++)/^ *-+: *$/.test(l.align[p])?l.align[p]="right":/^ *:-+: *$/.test(l.align[p])?l.align[p]="center":/^ *:-+ *$/.test(l.align[p])?l.align[p]="left":l.align[p]=null;for(p=0;p<l.cells.length;p++)l.cells[p]=l.cells[p].split(/ *\| */);g.tokens.push(l)}else if(a=g.rules.lheading.exec(t))t=t.substring(a[0].length),g.tokens.push({type:"heading",depth:"="===a[2]?1:2,text:a[1]});else if(a=g.rules.hr.exec(t))t=t.substring(a[0].length),g.tokens.push({type:"hr"});else if(a=g.rules.blockquote.exec(t))t=t.substring(a[0].length),g.tokens.push({type:"blockquote_start"}),a=a[0].replace(/^ *> ?/gm,""),g.token(a,e,!0),g.tokens.push({type:"blockquote_end"});else if(a=g.rules.list.exec(t)){for(t=t.substring(a[0].length),o=a[2],g.tokens.push({type:"list_start",ordered:o.length>1}),a=a[0].match(g.rules.item),i=!1,h=a.length,p=0;p<h;p++)l=a[p],c=l.length,l=l.replace(/^ *([*+-]|\d+\.) +/,""),~l.indexOf("\n ")&&(c-=l.length,l=g.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+c+"}","gm"),"")),g.options.smartLists&&p!==h-1&&(s=u.bullet.exec(a[p+1])[0],o===s||o.length>1&&s.length>1||(t=a.slice(p+1).join("\n")+t,p=h-1)),r=i||/\n\n(?!\s*$)/.test(l),p!==h-1&&(i="\n"===l.charAt(l.length-1),r||(r=i)),g.tokens.push({type:r?"loose_item_start":"list_item_start"}),g.token(l,!1,n),g.tokens.push({type:"list_item_end"});g.tokens.push({type:"list_end"})}else if(a=g.rules.html.exec(t))t=t.substring(a[0].length),g.tokens.push({type:g.options.sanitize?"paragraph":"html",pre:!g.options.sanitizer&&("pre"===a[1]||"script"===a[1]||"style"===a[1]),text:a[0]});else if(!n&&e&&(a=g.rules.def.exec(t)))t=t.substring(a[0].length),g.tokens.links[a[1].toLowerCase()]={href:a[2],title:a[3]};else if(e&&(a=g.rules.table.exec(t))){for(t=t.substring(a[0].length),l={type:"table",header:a[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:a[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:a[3].replace(/(?: *\| *)?\n$/,"").split("\n")},p=0;p<l.align.length;p++)/^ *-+: *$/.test(l.align[p])?l.align[p]="right":/^ *:-+: *$/.test(l.align[p])?l.align[p]="center":/^ *:-+ *$/.test(l.align[p])?l.align[p]="left":l.align[p]=null;for(p=0;p<l.cells.length;p++)l.cells[p]=l.cells[p].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);g.tokens.push(l)}else if(e&&(a=g.rules.paragraph.exec(t)))t=t.substring(a[0].length),g.tokens.push({type:"paragraph",text:"\n"===a[1].charAt(a[1].length-1)?a[1].slice(0,-1):a[1]});else if(a=g.rules.text.exec(t))t=t.substring(a[0].length),g.tokens.push({type:"text",text:a[0]});else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0));return this.tokens};var h={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:l,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(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:l,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};h._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,h._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,h.link=s(h.link)("inside",h._inside)("href",h._href)(),h.reflink=s(h.reflink)("inside",h._inside)(),h.normal=c({},h),h.pedantic=c({},h.normal,{
|
||
strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),h.gfm=c({},h.normal,{escape:s(h.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:s(h.text)("]|","~]|")("|","|https?://|")()}),h.breaks=c({},h.gfm,{br:s(h.br)("{2,}","*")(),text:s(h.gfm.text)("{2,}","*")()}),n.rules=h,n.output=function(t,e,i){var r=new n(e,i);return r.output(t)},n.prototype.output=function(t){for(var e,n,i,r,o=this,s="";t;)if(r=o.rules.escape.exec(t))t=t.substring(r[0].length),s+=r[1];else if(r=o.rules.autolink.exec(t))t=t.substring(r[0].length),"@"===r[2]?(n=":"===r[1].charAt(6)?o.mangle(r[1].substring(7)):o.mangle(r[1]),i=o.mangle("mailto:")+n):(n=a(r[1]),i=n),s+=o.renderer.link(i,null,n);else if(o.inLink||!(r=o.rules.url.exec(t))){if(r=o.rules.tag.exec(t))!o.inLink&&/^<a /i.test(r[0])?o.inLink=!0:o.inLink&&/^<\/a>/i.test(r[0])&&(o.inLink=!1),t=t.substring(r[0].length),s+=o.options.sanitize?o.options.sanitizer?o.options.sanitizer(r[0]):a(r[0]):r[0];else if(r=o.rules.link.exec(t))t=t.substring(r[0].length),o.inLink=!0,s+=o.outputLink(r,{href:r[2],title:r[3]}),o.inLink=!1;else if((r=o.rules.reflink.exec(t))||(r=o.rules.nolink.exec(t))){if(t=t.substring(r[0].length),e=(r[2]||r[1]).replace(/\s+/g," "),e=o.links[e.toLowerCase()],!e||!e.href){s+=r[0].charAt(0),t=r[0].substring(1)+t;continue}o.inLink=!0,s+=o.outputLink(r,e),o.inLink=!1}else if(r=o.rules.strong.exec(t))t=t.substring(r[0].length),s+=o.renderer.strong(o.output(r[2]||r[1]));else if(r=o.rules.em.exec(t))t=t.substring(r[0].length),s+=o.renderer.em(o.output(r[2]||r[1]));else if(r=o.rules.code.exec(t))t=t.substring(r[0].length),s+=o.renderer.codespan(a(r[2],!0));else if(r=o.rules.br.exec(t))t=t.substring(r[0].length),s+=o.renderer.br();else if(r=o.rules.del.exec(t))t=t.substring(r[0].length),s+=o.renderer.del(o.output(r[1]));else if(r=o.rules.text.exec(t))t=t.substring(r[0].length),s+=o.renderer.text(a(o.smartypants(r[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else t=t.substring(r[0].length),n=a(r[1]),i=n,s+=o.renderer.link(i,null,n);return s},n.prototype.outputLink=function(t,e){var n=a(e.href),i=e.title?a(e.title):null;return"!"!==t[0].charAt(0)?this.renderer.link(n,i,this.output(t[1])):this.renderer.image(n,i,a(t[1]))},n.prototype.smartypants=function(t){return this.options.smartypants?t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):t},n.prototype.mangle=function(t){if(!this.options.mangle)return t;for(var e,n="",i=t.length,r=0;r<i;r++)e=t.charCodeAt(r),Math.random()>.5&&(e="x"+e.toString(16)),n+="&#"+e+";";return n},i.prototype.code=function(t,e,n){if(this.options.highlight){var i=this.options.highlight(t,e);null!=i&&i!==t&&(n=!0,t=i)}return e?'<pre><code class="'+this.options.langPrefix+a(e,!0)+'">'+(n?t:a(t,!0))+"\n</code></pre>\n":"<pre><code>"+(n?t:a(t,!0))+"\n</code></pre>"},i.prototype.blockquote=function(t){return"<blockquote>\n"+t+"</blockquote>\n"},i.prototype.html=function(t){return t},i.prototype.heading=function(t,e,n){return"<h"+e+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+t+"</h"+e+">\n"},i.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},i.prototype.list=function(t,e){var n=e?"ol":"ul";return"<"+n+">\n"+t+"</"+n+">\n"},i.prototype.listitem=function(t){return"<li>"+t+"</li>\n"},i.prototype.paragraph=function(t){return"<p>"+t+"</p>\n"},i.prototype.table=function(t,e){return"<table>\n<thead>\n"+t+"</thead>\n<tbody>\n"+e+"</tbody>\n</table>\n"},i.prototype.tablerow=function(t){return"<tr>\n"+t+"</tr>\n"},i.prototype.tablecell=function(t,e){var n=e.header?"th":"td",i=e.align?"<"+n+' style="text-align:'+e.align+'">':"<"+n+">";return i+t+"</"+n+">\n"},i.prototype.strong=function(t){return"<strong>"+t+"</strong>"},i.prototype.em=function(t){return"<em>"+t+"</em>"},i.prototype.codespan=function(t){return"<code>"+t+"</code>"},i.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},i.prototype.del=function(t){return"<del>"+t+"</del>"},i.prototype.link=function(t,e,n){if(this.options.sanitize){try{var i=decodeURIComponent(o(t)).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return""}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:"))return""}var r='<a href="'+t+'"';return e&&(r+=' title="'+e+'"'),r+=">"+n+"</a>"},i.prototype.image=function(t,e,n){var i='<img src="'+t+'" alt="'+n+'"';return e&&(i+=' title="'+e+'"'),i+=this.options.xhtml?"/>":">"},i.prototype.text=function(t){return t},r.parse=function(t,e,n){var i=new r(e,n);return i.parse(t)},r.prototype.parse=function(t){var e=this;this.inline=new n(t.links,this.options,this.renderer),this.tokens=t.reverse();for(var i="";this.next();)i+=e.tok();return i},r.prototype.next=function(){return this.token=this.tokens.pop()},r.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},r.prototype.parseText=function(){for(var t=this,e=this.token.text;"text"===this.peek().type;)e+="\n"+t.next().text;return this.inline.output(e)},r.prototype.tok=function(){var t=this;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);case"table":var e,n,i,r,a,o="",s="";for(i="",e=0;e<this.token.header.length;e++)r={header:!0,align:t.token.align[e]},i+=t.renderer.tablecell(t.inline.output(t.token.header[e]),{header:!0,align:t.token.align[e]});for(o+=this.renderer.tablerow(i),e=0;e<this.token.cells.length;e++){for(n=t.token.cells[e],i="",a=0;a<n.length;a++)i+=t.renderer.tablecell(t.inline.output(n[a]),{header:!1,align:t.token.align[a]});s+=t.renderer.tablerow(i)}return this.renderer.table(o,s);case"blockquote_start":for(var s="";"blockquote_end"!==this.next().type;)s+=t.tok();return this.renderer.blockquote(s);case"list_start":for(var s="",l=this.token.ordered;"list_end"!==this.next().type;)s+=t.tok();return this.renderer.list(s,l);case"list_item_start":for(var s="";"list_item_end"!==this.next().type;)s+="text"===t.token.type?t.parseText():t.tok();return this.renderer.listitem(s);case"loose_item_start":for(var s="";"list_item_end"!==this.next().type;)s+=t.tok();return this.renderer.listitem(s);case"html":var c=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(c);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},l.exec=l,p.options=p.setOptions=function(t){return c(p.defaults,t),p},p.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 i,xhtml:!1},p.Parser=r,p.parser=r.parse,p.Renderer=i,p.Lexer=e,p.lexer=e.lex,p.InlineLexer=n,p.inlineLexer=n.output,p.parse=p,t.exports=p}).call(function(){return this||("undefined"!=typeof window?window:r)}())});v.setOptions({gfm:!0,smartypants:!0});var w=function(t,e){var n=[].slice.call(t.querySelectorAll("[dt-markdown]"));n.forEach(function(t){var e=t.innerHTML;t.innerHTML=v(e)})},_=t(function(t){var e="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},n=function(){var t=/\blang(?:uage)?-(\w+)\b/i,n=0,i=e.Prism={util:{encode:function(t){return t instanceof r?new r(t.type,i.util.encode(t.content),t.alias):"Array"===i.util.type(t)?t.map(i.util.encode):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(t){return Object.prototype.toString.call(t).match(/\[object (\w+)\]/)[1]},objId:function(t){return t.__id||Object.defineProperty(t,"__id",{value:++n}),t.__id},clone:function(t){var e=i.util.type(t);switch(e){case"Object":var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=i.util.clone(t[r]));return n;case"Array":return t.map&&t.map(function(t){return i.util.clone(t)})}return t}},languages:{extend:function(t,e){var n=i.util.clone(i.languages[t]);for(var r in e)n[r]=e[r];return n},insertBefore:function(t,e,n,r){r=r||i.languages;var a=r[t];if(2==arguments.length){n=arguments[1];for(var o in n)n.hasOwnProperty(o)&&(a[o]=n[o]);return a}var s={};for(var l in a)if(a.hasOwnProperty(l)){if(l==e)for(var o in n)n.hasOwnProperty(o)&&(s[o]=n[o]);s[l]=a[l]}return i.languages.DFS(i.languages,function(e,n){n===r[t]&&e!=t&&(this[e]=s)}),r[t]=s},DFS:function(t,e,n,r){r=r||{};for(var a in t)t.hasOwnProperty(a)&&(e.call(t,a,t[a],n||a),"Object"!==i.util.type(t[a])||r[i.util.objId(t[a])]?"Array"!==i.util.type(t[a])||r[i.util.objId(t[a])]||(r[i.util.objId(t[a])]=!0,i.languages.DFS(t[a],e,a,r)):(r[i.util.objId(t[a])]=!0,i.languages.DFS(t[a],e,null,r)))}},plugins:{},highlightAll:function(t,e){var n={callback:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",n);for(var r,a=n.elements||document.querySelectorAll(n.selector),o=0;r=a[o++];)i.highlightElement(r,t===!0,n.callback)},highlightElement:function(n,r,a){for(var o,s,l=n;l&&!t.test(l.className);)l=l.parentNode;l&&(o=(l.className.match(t)||[,""])[1].toLowerCase(),s=i.languages[o]),n.className=n.className.replace(t,"").replace(/\s+/g," ")+" language-"+o,l=n.parentNode,/pre/i.test(l.nodeName)&&(l.className=l.className.replace(t,"").replace(/\s+/g," ")+" language-"+o);var c=n.textContent,p={element:n,language:o,grammar:s,code:c};if(i.hooks.run("before-sanity-check",p),!p.code||!p.grammar)return p.code&&(p.element.textContent=p.code),void i.hooks.run("complete",p);if(i.hooks.run("before-highlight",p),r&&e.Worker){var u=new Worker(i.filename);u.onmessage=function(t){p.highlightedCode=t.data,i.hooks.run("before-insert",p),p.element.innerHTML=p.highlightedCode,a&&a.call(p.element),i.hooks.run("after-highlight",p),i.hooks.run("complete",p)},u.postMessage(JSON.stringify({language:p.language,code:p.code,immediateClose:!0}))}else p.highlightedCode=i.highlight(p.code,p.grammar,p.language),i.hooks.run("before-insert",p),p.element.innerHTML=p.highlightedCode,a&&a.call(n),i.hooks.run("after-highlight",p),i.hooks.run("complete",p)},highlight:function(t,e,n){var a=i.tokenize(t,e);return r.stringify(i.util.encode(a),n)},tokenize:function(t,e,n){var r=i.Token,a=[t],o=e.rest;if(o){for(var s in o)e[s]=o[s];delete e.rest}t:for(var s in e)if(e.hasOwnProperty(s)&&e[s]){var l=e[s];l="Array"===i.util.type(l)?l:[l];for(var c=0;c<l.length;++c){var p=l[c],u=p.inside,h=!!p.lookbehind,g=!!p.greedy,d=0,f=p.alias;if(g&&!p.pattern.global){var m=p.pattern.toString().match(/[imuy]*$/)[0];p.pattern=RegExp(p.pattern.source,m+"g")}p=p.pattern||p;for(var b=0,y=0;b<a.length;y+=a[b].length,++b){var x=a[b];if(a.length>t.length)break t;if(!(x instanceof r)){p.lastIndex=0;var k=p.exec(x),v=1;if(!k&&g&&b!=a.length-1){if(p.lastIndex=y,k=p.exec(t),!k)break;for(var w=k.index+(h?k[1].length:0),_=k.index+k[0].length,S=b,E=y,A=a.length;S<A&&E<_;++S)E+=a[S].length,w>=E&&(++b,y=E);if(a[b]instanceof r||a[S-1].greedy)continue;v=S-b,x=t.slice(y,E),k.index-=y}if(k){h&&(d=k[1].length);var w=k.index+d,k=k[0].slice(d),_=w+k.length,C=x.slice(0,w),j=x.slice(_),z=[b,v];C&&z.push(C);var L=new r(s,u?i.tokenize(k,u):k,f,k,g);z.push(L),j&&z.push(j),Array.prototype.splice.apply(a,z)}}}}}return a},hooks:{all:{},add:function(t,e){var n=i.hooks.all;n[t]=n[t]||[],n[t].push(e)},run:function(t,e){var n=i.hooks.all[t];if(n&&n.length)for(var r,a=0;r=n[a++];)r(e)}}},r=i.Token=function(t,e,n,i,r){this.type=t,this.content=e,this.alias=n,this.length=0|(i||"").length,this.greedy=!!r};if(r.stringify=function(t,e,n){if("string"==typeof t)return t;if("Array"===i.util.type(t))return t.map(function(n){return r.stringify(n,e,t)}).join("");var a={type:t.type,content:r.stringify(t.content,e,n),tag:"span",classes:["token",t.type],attributes:{},language:e,parent:n};if("comment"==a.type&&(a.attributes.spellcheck="true"),t.alias){var o="Array"===i.util.type(t.alias)?t.alias:[t.alias];Array.prototype.push.apply(a.classes,o)}i.hooks.run("wrap",a);var s=Object.keys(a.attributes).map(function(t){return t+'="'+(a.attributes[t]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+(s?" "+s:"")+">"+a.content+"</"+a.tag+">"},!e.document)return e.addEventListener?(e.addEventListener("message",function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()},!1),e.Prism):e.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(i.filename=a.src,document.addEventListener&&!a.hasAttribute("data-manual")&&("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(i.highlightAll):window.setTimeout(i.highlightAll,16):document.addEventListener("DOMContentLoaded",i.highlightAll))),e.Prism}();t.exports&&(t.exports=n),"undefined"!=typeof r&&(r.Prism=n),n.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/i,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},n.hooks.add("wrap",function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&/,"&"))}),n.languages.xml=n.languages.markup,n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:{pattern:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},n.languages.css.atrule.inside.rest=n.util.clone(n.languages.css),n.languages.markup&&(n.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\w\W]*?>)[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:n.languages.css,alias:"language-css"}}),n.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:n.languages.css}},alias:"language-css"}},n.languages.markup.tag)),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(true|false)\b/,function:/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,function:/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*\*?|\/|~|\^|%|\.{3}/}),n.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}}),n.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\\\|\\?[^\\])*?`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}}}),n.languages.markup&&n.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:n.languages.javascript,alias:"language-javascript"}}),n.languages.js=n.languages.javascript,function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(){var t={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.forEach&&Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(e){for(var i,r=e.getAttribute("data-src"),a=e,o=/\blang(?:uage)?-(?!\*)(\w+)\b/i;a&&!o.test(a.className);)a=a.parentNode;if(a&&(i=(e.className.match(o)||[,""])[1]),!i){var s=(r.match(/\.(\w+)$/)||[,""])[1];i=t[s]||s}var l=document.createElement("code");l.className="language-"+i,e.textContent="",l.textContent="Loading…",e.appendChild(l);var c=new XMLHttpRequest;c.open("GET",r,!0),c.onreadystatechange=function(){4==c.readyState&&(c.status<400&&c.responseText?(l.textContent=c.responseText,n.highlightElement(l)):c.status>=400?l.textContent="✖ Error "+c.status+" while fetching file: "+c.statusText:l.textContent="✖ Error: File does not exist or is empty")},c.send(null)})},document.addEventListener("DOMContentLoaded",self.Prism.fileHighlight))}()}),S=function(t,e){var n=[].slice.call(t.querySelectorAll("dt-code"));n.forEach(function(e){var n=e.textContent;e.innerHTML="";var i=e.getAttribute("language"),r=t.createElement("code");if(""===e.getAttribute("block")){n=n.replace(/\n/,"");var a=n.match(/\s*/);n=n.replace(new RegExp("\n"+a,"g"),"\n"),n=n.trim();var o=t.createElement("pre");o.appendChild(r),e.appendChild(o)}else e.appendChild(r);var s=n;_.languages[i]&&(r.setAttribute("class","language-"+i),s=_.highlight(n,_.languages[i])),r.innerHTML=s})},E={title:"Experiments in Handwriting with a Neural Network",description:"Several interactive visualizations of a generative model of handwriting. Some are fun, some are serious.",url:"http://distill.pub/2016/handwriting/",github:"https://github.com/distillpub/post--handwriting",firstPublished:"Tue Dec 6 2016 21:39:33 GMT-0700 (PDT)",lastPublished:"Tue Dec 6 2016 21:39:33 GMT-0700 (PDT)",authors:[{firstName:"Shan",lastName:"Carter",personalURL:"http://shancarter.com",affiliation:"Google Brain",affiliationURL:"http://g.co/brain"},{firstName:"David",lastName:"Ha",personalURL:"https://github.com/hardmaru",affiliation:"Google Brain",affiliationURL:"http://g.co/brain"},{firstName:"Ian",lastName:"Johnson",personalURL:"https://github.com/enjalot",affiliation:"Google Cloud",affiliationURL:""},{firstName:"Chris",lastName:"Olah",personalURL:"http://colah.github.io/",affiliation:"Google Brain",affiliationURL:"http://g.co/brain"}],journal:{title:"Distill",full_title:"Distill",abbrev_title:"Distill",url:"http://distill.pub",doi:"00.0000/dstl",issn:"0000-0000"}};return window.document&&i(window.document,E),i}();
|
||
//# sourceMappingURL=template.min.js.map
|