Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allowing local name to override repo name

  • Loading branch information...
commit 788b30c365067148bbe55e214ce58fd1eb42af54 1 parent 5600ba3
Scott authored
2  paintjob-config.json
View
@@ -10,7 +10,7 @@
"local" : {
"user" : "stolksdorf",
"repo" : "paintjob",
- "name" : "Paintjob",
+ "name" : "Paintjobdsf",
"description" : "This is just some sample text for when I'm local testing"
},
2  paintjob.compiled.html
View
@@ -32,7 +32,7 @@
* Copyright (c) 2013 Kushagra Gour; Licensed MIT */.hint,[data-hint]{position:relative;display:inline-block}.hint:before,.hint:after,[data-hint]:before,[data-hint]:after{position:absolute;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0);visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;-webkit-transition:.3s ease;-moz-transition:.3s ease;transition:.3s ease}.hint:hover:before,.hint:hover:after,.hint:focus:before,.hint:focus:after,[data-hint]:hover:before,[data-hint]:hover:after,[data-hint]:focus:before,[data-hint]:focus:after{visibility:visible;opacity:1}.hint:before,[data-hint]:before{content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1000001}.hint:after,[data-hint]:after{content:attr(data-hint);background:#383838;color:#fff;text-shadow:0 -1px 0 #000;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap}.hint--top:before{border-top-color:#383838}.hint--bottom:before{border-bottom-color:#383838}.hint--left:before{border-left-color:#383838}.hint--right:before{border-right-color:#383838}.hint--top:before{margin-bottom:-12px}.hint--top:after{margin-left:-18px}.hint--top:before,.hint--top:after{bottom:100%;left:50%}.hint--top:hover:after,.hint--top:hover:before,.hint--top:focus:after,.hint--top:focus:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.hint--bottom:before{margin-top:-12px}.hint--bottom:after{margin-left:-18px}.hint--bottom:before,.hint--bottom:after{top:100%;left:50%}.hint--bottom:hover:after,.hint--bottom:hover:before,.hint--bottom:focus:after,.hint--bottom:focus:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.hint--right:before{margin-left:-12px;margin-bottom:-6px}.hint--right:after{margin-bottom:-14px}.hint--right:before,.hint--right:after{left:100%;bottom:50%}.hint--right:hover:after,.hint--right:hover:before,.hint--right:focus:after,.hint--right:focus:before{-webkit-transform:translateX(8px);-moz-transform:translateX(8px);transform:translateX(8px)}.hint--left:before{margin-right:-12px;margin-bottom:-6px}.hint--left:after{margin-bottom:-14px}.hint--left:before,.hint--left:after{right:100%;bottom:50%}.hint--left:hover:after,.hint--left:hover:before,.hint--left:focus:after,.hint--left:focus:before{-webkit-transform:translateX(-8px);-moz-transform:translateX(-8px);transform:translateX(-8px)}.hint--error:after{background-color:#b34e4d;text-shadow:0 -1px 0 #592726}.hint--error.hint--top:before{border-top-color:#b34e4d}.hint--error.hint--bottom:before{border-bottom-color:#b34e4d}.hint--error.hint--left:before{border-left-color:#b34e4d}.hint--error.hint--right:before{border-right-color:#b34e4d}.hint--warning:after{background-color:#c09854;text-shadow:0 -1px 0 #6c5328}.hint--warning.hint--top:before{border-top-color:#c09854}.hint--warning.hint--bottom:before{border-bottom-color:#c09854}.hint--warning.hint--left:before{border-left-color:#c09854}.hint--warning.hint--right:before{border-right-color:#c09854}.hint--info:after{background-color:#3986ac;text-shadow:0 -1px 0 #193b4d}.hint--info.hint--top:before{border-top-color:#3986ac}.hint--info.hint--bottom:before{border-bottom-color:#3986ac}.hint--info.hint--left:before{border-left-color:#3986ac}.hint--info.hint--right:before{border-right-color:#3986ac}.hint--success:after{background-color:#458746;text-shadow:0 -1px 0 #1a321a}.hint--success.hint--top:before{border-top-color:#458746}.hint--success.hint--bottom:before{border-bottom-color:#458746}.hint--success.hint--left:before{border-left-color:#458746}.hint--success.hint--right:before{border-right-color:#458746}.hint--always:after,.hint--always:before{opacity:1;visibility:visible}.hint--always.hint--top:after,.hint--always.hint--top:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.hint--always.hint--bottom:after,.hint--always.hint--bottom:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.hint--always.hint--left:after,.hint--always.hint--left:before{-webkit-transform:translateX(-8px);-moz-transform:translateX(-8px);transform:translateX(-8px)}.hint--always.hint--right:after,.hint--always.hint--right:before{-webkit-transform:translateX(8px);-moz-transform:translateX(8px);transform:translateX(8px)}.hint--rounded:after{border-radius:4px}.hint--bounce:before,.hint--bounce:after{-webkit-transition:opacity .3s ease,visibility .3s ease,-webkit-transform .3s cubic-bezier(0.71,1.7,.77,1.24);-moz-transition:opacity .3s ease,visibility .3s ease,-moz-transform .3s cubic-bezier(0.71,1.7,.77,1.24);transition:opacity .3s ease,visibility .3s ease,transform .3s cubic-bezier(0.71,1.7,.77,1.24)}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}:focus{outline:0}body{line-height:1;color:#000;background:#fff}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,th,td{text-align:left;font-weight:400}blockquote:before,blockquote:after,q:before,q:after{content:""}blockquote,q{quotes:"" ""}[data-schematic]{display:none!important}html{}body{}h1{font-size:2em;margin-top:10px;margin-bottom:15px}h2{font-size:1.5em;font-weight:900;margin-bottom:15px;margin-top:10px}h3{font-size:1em;font-weight:900;margin-top:5px;margin-bottom:7px}p{margin-bottom:1em;line-height:1.5em;font-size:16px;color:#333}code{font-family:Courier,mono;color:#000;white-space:pre;background-color:#F8F8F8}a{color:inherit}a:hover{font-weight:700}strong{font-weight:700}.btn{cursor:pointer;display:inline-block;padding:.6em;color:#fff;font-size:16px}.btn.large{font-size:35px;font-weight:900}.btn.teal:hover{background-color:#1ABC9C}.btn.teal{background-color:#16A085}.btn.green:hover{background-color:#2ECC71}.btn.green{background-color:#27AE60}.btn.blue:hover{background-color:#3498DB}.btn.blue{background-color:#2980B9}.btn.purple:hover{background-color:#9B59B6}.btn.purple{background-color:#8E44AD}.btn.steel:hover{background-color:#34495E}.btn.steel{background-color:#2C3E50}.btn.yellow:hover{background-color:#F1C40F}.btn.yellow{background-color:#F39C12}.btn.orange:hover{background-color:#E67E22}.btn.orange{background-color:#D35400}.btn.red:hover{background-color:#E74C3C}.btn.red{background-color:#C0392B}.btn.silver:hover{background-color:#ECF0F1}.btn.silver{background-color:#BDC3C7}.btn.grey:hover{background-color:#95A5A6}.btn.grey{background-color:#7F8C8D}.card{color:#fff;background-color:#3498DB;text-align:center;display:inline-block;padding:0;width:1.7em;height:1.7em;line-height:1.7em;margin-right:15px;margin-bottom:15px}.card.teal-l{background-color:#1ABC9C}.card.teal{background-color:#16A085}.card.green-l{background-color:#2ECC71}.card.green{background-color:#27AE60}.card.blue-l{background-color:#3498DB}.card.blue{background-color:#2980B9}.card.purple-l{background-color:#9B59B6}.card.purple{background-color:#8E44AD}.card.steel-l{background-color:#34495E}.card.steel{background-color:#2C3E50}.card.yellow-l{background-color:#F1C40F}.card.yellow{background-color:#F39C12}.card.orange-l{background-color:#E67E22}.card.orange{background-color:#D35400}.card.red-l{background-color:#E74C3C}.card.red{background-color:#C0392B}.card.silver-l{background-color:#ECF0F1}.card.silver{background-color:#BDC3C7}.card.grey-l{background-color:#95A5A6}.card.grey{background-color:#7F8C8D}body{font-family:'Lato',sans-serif}ol{list-style-type:decimal}ul{list-style-type:disc}li{margin-left:30px;margin-top:10px}.container{max-width:960px;margin-right:auto;margin-left:auto;padding-bottom:100px}.project{position:relative;display:inline-block;margin-top:150px;margin-right:auto;margin-bottom:100px;margin-left:auto;text-align:left}.project__main{display:inline-block;vertical-align:top;max-width:600px;margin-right:40px;margin-left:25px}.project__name{margin-bottom:30px;margin-left:-8px;font-size:130px;font-weight:900;line-height:94px}.project__description{margin-bottom:20px;font-size:21px;line-height:31px}.project__icons{}.project__icon{font-size:30px;text-decoration:none}.project__example{float:right;max-height:240px;max-width:350px;margin-top:150px}@media all and (max-width:960px){.project__example{display:none}}.spinner{display:block;margin-right:auto;margin-left:auto;text-align:center;margin-top:125px}.error{display:none;font-size:7em;font-weight:700;margin-top:100px}.error p{margin-top:40px;font-size:.25em;font-weight:400}.documentation{text-align:left;border-top:1px solid #BDC3C7;border-right:1px solid #BDC3C7;border-bottom:1px solid #BDC3C7}.documentation h1{margin-left:-20px}.documentation h2{margin-left:-10px}.docblock{padding-top:10px;padding-right:30px;padding-bottom:10px;padding-left:50px;border-left:25px solid #7F8C8D}.docblock.teal{border-left:25px solid #16A085}.docblock.green{border-left:25px solid #27AE60}.docblock.blue{border-left:25px solid #2980B9}.docblock.purple{border-left:25px solid #8E44AD}.docblock.steel{border-left:25px solid #2C3E50}.docblock.yellow{border-left:25px solid #F39C12}.docblock.orange{border-left:25px solid #D35400}.docblock.red{border-left:25px solid #C0392B}.docblock.silver{border-left:25px solid #BDC3C7}.docblock.grey{border-left:25px solid #7F8C8D}.codeblock{margin-bottom:20px}.codeblock .CodeMirror{height:auto;border:1px solid #eee}.codeblock__output{float:left;overflow-x:hidden;min-width:50%;max-width:85%;margin-top:15px;margin-right:10px;padding:20px;border:1px solid #eee}.codeblock__output__errorText{color:#C0392B}.codeblock__runButton{display:inline-block;vertical-align:top;float:right;margin-top:10px}.sideBar{position:absolute;top:150px;width:150px;margin-left:-150px}@media all and (max-width:1150px){.sideBar{display:none}}.sideBar__logo{float:right;margin-right:0;font-size:57px}.sideBar.stuck .sideBar__logo{cursor:pointer}.sideBar__logo__up{display:none}.sideBar__nav{float:right}.sideBar__nav__item{display:none;z-index:3;width:130px;padding-top:5px;padding-right:7px;padding-bottom:5px;cursor:pointer;font-size:.8em;text-align:right;text-transform:uppercase;border-left:10px solid transparent;transition:.25s;-webkit-transition:.25s}.sideBar__nav__item:hover{color:#BDC3C7}.sideBar__nav__item.teal:hover{border-left:10px solid #16A085}.sideBar__nav__item.green:hover{border-left:10px solid #27AE60}.sideBar__nav__item.blue:hover{border-left:10px solid #2980B9}.sideBar__nav__item.purple:hover{border-left:10px solid #8E44AD}.sideBar__nav__item.steel:hover{border-left:10px solid #2C3E50}.sideBar__nav__item.yellow:hover{border-left:10px solid #F39C12}.sideBar__nav__item.orange:hover{border-left:10px solid #D35400}.sideBar__nav__item.red:hover{border-left:10px solid #C0392B}.sideBar__nav__item.silver:hover{border-left:10px solid #BDC3C7}.sideBar__nav__item.grey:hover{border-left:10px solid #7F8C8D}.sideBar__nav__item.teal.scrolled{border-left:10px solid #16A085}.sideBar__nav__item.green.scrolled{border-left:10px solid #27AE60}.sideBar__nav__item.blue.scrolled{border-left:10px solid #2980B9}.sideBar__nav__item.purple.scrolled{border-left:10px solid #8E44AD}.sideBar__nav__item.steel.scrolled{border-left:10px solid #2C3E50}.sideBar__nav__item.yellow.scrolled{border-left:10px solid #F39C12}.sideBar__nav__item.orange.scrolled{border-left:10px solid #D35400}.sideBar__nav__item.red.scrolled{border-left:10px solid #C0392B}.sideBar__nav__item.silver.scrolled{border-left:10px solid #BDC3C7}.sideBar__nav__item.grey.scrolled{border-left:10px solid #7F8C8D}.sideBar.stuck .sideBar__nav__item{display:block}.sideBar:hover .sideBar__nav__item{display:block}.footer{position:relative;z-index:10;overflow:hidden;padding-left:30px;background-color:#000;color:#fff}.footer__content{height:100%;max-width:960px;margin-right:auto;margin-left:auto}.footer__about{float:left;width:350px;margin-top:80px;margin-bottom:80px}.footer__about h3{color:#95A5A6}.footer__about p{font-size:12px;color:#7F8C8D}.footer__about__icons a{font-size:17px;letter-spacing:10px;text-decoration:none}.footer__about__icons a:hover{color:#fff}.footer__license{float:right;height:300px;width:280px;padding-top:27px;padding-right:30px;padding-left:30px;background-color:#2980B9}@media all and (max-width:750px){.footer__license{float:left;width:100%;margin-left:-30px;padding-right:0}}.footer__license h2{color:#fff}.footer__license p{color:#ECF0F1;line-height:22px}
</style><script>
FontAwesomeFavicon=function(a){var b=function(a){var b="."+a+"::before",c="content";for(var d in document.styleSheets){var e=document.styleSheets[d].rules||document.styleSheets[d].cssRules;for(var f in e)if(e[f].selectorText==b)return e[f].style[c]}},c=function(a){var b=document.createElement("canvas"),c=b.getContext("2d");return b.width=50,b.height=50,c.fillStyle="rgba(0, 0, 0, 1)",c.font="50px FontAwesome",c.textAlign="center",c.fillText(a,25,45),b.toDataURL("image/png")},d=function(a){var b=document.createElement("link"),c=document.getElementById("dynamic-favicon");document.head=document.head||document.getElementsByTagName("head")[0],b.id="dynamic-favicon",b.rel="shortcut icon",b.href=a,c&&document.head.removeChild(c),document.head.appendChild(b)},e=setInterval(function(){var f=b(a);if(f){var g=c(f);"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAyklEQVRoQ+2ZwQmAMBAEo7XZgF1Yg034shybEvx7YgOZQILEEfLbJO7scg8dUifP0ImPpJGvJWkiJlKJgNWqBLb4WBMpRldpo4lUAlt87G8TGQPZHmspRpe3cQrZkSd9VTSRx8gWa411kYuAdg7tqZFMYiaSCeqRWS0AK1ktQMtqAVhWi8CyWoSWUwvQsloAllOLwLJahJZTC9CyWgCWU4vAslqEllML0LJaAJZTi8CyWoRWN1/jiemmWvpboenLkcs0Qmi10HaTyA36YHgzqZSIngAAAABJRU5ErkJggg=="!=g&&(d(g),clearInterval(e))}},10)},function(){Object.create=Object.create||function(a){function b(){}return b.prototype=a,new b};var a=(new Date).getTime();Archetype=archetype={initialize:function(){return this},create:function(){var a=this.extend();return a.deep("initialize").apply(a,arguments),a.trigger("created",a),a},extend:function(a){var b=Object.create(this);return b.events=b._events.bind({storedEvents:[]}),b.mixin(a)},mixin:function(a){for(var b in a)this[b]=a[b];return this},deep:function(a){var b=this,c=function(){return this[a]&&c.apply(Object.getPrototypeOf(this),arguments),this.hasOwnProperty(a)?this[a].apply(b,arguments):void 0};return c.bind(this)},_events:function(a,b){return a&&(this.storedEvents=a),b&&this.storedEvents.push(b),this.storedEvents},on:function(b,c,d){return this.events(void 0,{id:++a,name:b,fn:c,fireOnce:d||!1}),a},once:function(a,b){return this.on(a,b,!0)},trigger:function(a){var b=this.events(),c=[].slice.apply(arguments).slice(1);for(var d in b){var e=b[d];(a==e.id||a==e.name)&&(e.fn.apply(this,c),e.fireOnce&&this.off(e.id)),"*"===e.name&&(c.unshift(a),e.fn.apply(this,c))}return this},off:function(a){a||this.events([]);var b=[];for(var c in this.events()){var d=this.events()[c];a!=d.id&&a!=d.name&&b.push(d)}return this.events(b),this}}}(),CodeMirror.defineMode("css",function(a){return CodeMirror.getMode(a,"text/css")}),CodeMirror.defineMode("css-base",function(a,b){"use strict";function c(a,b){return o=b,a}function d(a,b){var d=a.next();if(h[d]){var g=h[d](a,b);if(g!==!1)return g}if("@"==d)return a.eatWhile(/[\w\\\-]/),c("def",a.current());if("="==d)c(null,"compare");else{if(("~"==d||"|"==d)&&a.eat("="))return c(null,"compare");if('"'==d||"'"==d)return b.tokenize=e(d),b.tokenize(a,b);if("#"==d)return a.eatWhile(/[\w\\\-]/),c("atom","hash");if("!"==d)return a.match(/^\s*\w*/),c("keyword","important");if(/\d/.test(d))return a.eatWhile(/[\w.%]/),c("number","unit");if("-"!==d)return/[,+>*\/]/.test(d)?c(null,"select-op"):"."==d&&a.match(/^-?[_a-z][_a-z0-9-]*/i)?c("qualifier","qualifier"):":"==d?c("operator",d):/[;{}\[\]\(\)]/.test(d)?c(null,d):"u"==d&&a.match("rl(")?(a.backUp(1),b.tokenize=f,c("property","variable")):(a.eatWhile(/[\w\\\-]/),c("property","variable"));if(/\d/.test(a.peek()))return a.eatWhile(/[\w.%]/),c("number","unit");if(a.match(/^[^-]+-/))return c("meta","meta")}}function e(a,b){return function(e,f){for(var g,h=!1;null!=(g=e.next())&&(g!=a||h);)h=!h&&"\\"==g;return h||(b&&e.backUp(1),f.tokenize=d),c("string","string")}}function f(a,b){return a.next(),b.tokenize=a.match(/\s*[\"\']/,!1)?d:e(")",!0),c(null,"(")}var g=a.indentUnit,h=b.hooks||{},i=b.atMediaTypes||{},j=b.atMediaFeatures||{},k=b.propertyKeywords||{},l=b.colorKeywords||{},m=b.valueKeywords||{},n=!!b.allowNested,o=null;return{startState:function(a){return{tokenize:d,baseIndent:a||0,stack:[],lastToken:null}},token:function(a,b){if(b.tokenize=b.tokenize||d,b.tokenize==d&&a.eatSpace())return null;var e=b.tokenize(a,b);e&&"string"!=typeof e&&(e=c(e[0],e[1]));var f=b.stack[b.stack.length-1];if("variable"==e)return"variable-definition"==o&&b.stack.push("propertyValue"),b.lastToken="variable-2";if("property"==e){var g=a.current().toLowerCase();"propertyValue"==f?e=m.hasOwnProperty(g)?"string-2":l.hasOwnProperty(g)?"keyword":"variable-2":"rule"==f?k.hasOwnProperty(g)||(e+=" error"):"block"==f?e=k.hasOwnProperty(g)?"property":l.hasOwnProperty(g)?"keyword":m.hasOwnProperty(g)?"string-2":"tag":f&&"@media{"!=f?"@media"==f?e=i[a.current()]?"attribute":/^(only|not)$/.test(g)?"keyword":"and"==g?"error":j.hasOwnProperty(g)?"error":"attribute error":"@mediaType"==f?e=i.hasOwnProperty(g)?"attribute":"and"==g?"operator":/^(only|not)$/.test(g)?"error":"error":"@mediaType("==f?k.hasOwnProperty(g)||(i.hasOwnProperty(g)?e="error":"and"==g?e="operator":/^(only|not)$/.test(g)?e="error":e+=" error"):e="@import"==f?"tag":"error":e="tag"}else"atom"==e?f&&"@media{"!=f&&"block"!=f?"propertyValue"==f?/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(a.current())||(e+=" error"):e="error":e="builtin":"@media"==f&&"{"==o&&(e="error");if("{"==o)if("@media"==f||"@mediaType"==f)b.stack[b.stack.length-1]="@media{";else{var h=n?"block":"rule";b.stack.push(h)}else"}"==o?("interpolation"==f&&(e="operator"),b.stack.pop(),"propertyValue"==f&&b.stack.pop()):"interpolation"==o?b.stack.push("interpolation"):"@media"==o?b.stack.push("@media"):"@import"==o?b.stack.push("@import"):"@media"==f&&/\b(keyword|attribute)\b/.test(e)?b.stack[b.stack.length-1]="@mediaType":"@mediaType"==f&&","==a.current()?b.stack[b.stack.length-1]="@media":"("==o?("@media"==f||"@mediaType"==f)&&(b.stack[b.stack.length-1]="@mediaType",b.stack.push("@mediaType(")):")"==o?"propertyValue"==f&&"@mediaType("==b.stack[b.stack.length-2]?(b.stack.pop(),b.stack.pop()):"@mediaType("==f&&b.stack.pop():":"==o&&"property"==b.lastToken?b.stack.push("propertyValue"):"propertyValue"==f&&";"==o?b.stack.pop():"@import"==f&&";"==o&&b.stack.pop();return b.lastToken=e},indent:function(a,b){var c=a.stack.length;return/^\}/.test(b)&&(c-="propertyValue"==a.stack[c-1]?2:1),a.baseIndent+c*g},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}}),function(){function a(a){for(var b={},c=0;c<a.length;++c)b[a[c]]=!0;return b}function b(a,b){for(var c,d=!1;null!=(c=a.next());){if(d&&"/"==c){b.tokenize=null;break}d="*"==c}return["comment","comment"]}var c=a(["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"]),d=a(["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"]),e=a(["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid-cell","grid-column","grid-column-align","grid-column-sizing","grid-column-span","grid-columns","grid-flow","grid-row","grid-row-align","grid-row-sizing","grid-row-span","grid-rows","grid-template","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","zoom","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-profile","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","kerning","text-anchor","writing-mode"]),f=a(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]),g=a(["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","auto","avoid","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break-all","break-word","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","cover","crop","cross","crosshair","currentcolor","cursive","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ew-resize","expanded","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-table","inset","inside","intrinsic","invert","italic","justify","kannada","katakana","katakana-iroha","khmer","landscape","lao","large","larger","left","level","lighter","line-through","linear","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","overlay","overline","padding","padding-box","painted","paused","persian","plus-darker","plus-lighter","pointer","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","relative","repeat","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","single","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"]);CodeMirror.defineMIME("text/css",{atMediaTypes:c,atMediaFeatures:d,propertyKeywords:e,colorKeywords:f,valueKeywords:g,hooks:{"<":function(a,b){function c(a,b){for(var c,d=0;null!=(c=a.next());){if(d>=2&&">"==c){b.tokenize=null;break}d="-"==c?d+1:0}return["comment","comment"]}return a.eat("!")?(b.tokenize=c,c(a,b)):void 0},"/":function(a,c){return a.eat("*")?(c.tokenize=b,b(a,c)):!1}},name:"css-base"}),CodeMirror.defineMIME("text/x-scss",{atMediaTypes:c,atMediaFeatures:d,propertyKeywords:e,colorKeywords:f,valueKeywords:g,allowNested:!0,hooks:{$:function(a){return a.match(/^[\w-]+/),":"==a.peek()?["variable","variable-definition"]:["variable","variable"]},"/":function(a,c){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(c.tokenize=b,b(a,c)):["operator","operator"]},"#":function(a){return a.eat("{")?["operator","interpolation"]:(a.eatWhile(/[\w\\\-]/),["atom","hash"])}},name:"css-base"})}(),CodeMirror.defineMode("htmlmixed",function(a,b){function c(a,b){var c=b.htmlState.tagName,d=g.token(a,b.htmlState);if("script"==c&&/\btag\b/.test(d)&&">"==a.current()){var j=a.string.slice(Math.max(0,a.pos-100),a.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);j=j?j[1]:"",j&&/[\"\']/.test(j.charAt(0))&&(j=j.slice(1,j.length-1));for(var k=0;k<i.length;++k){var l=i[k];if("string"==typeof l.matches?j==l.matches:l.matches.test(j)){l.mode&&(b.token=e,b.localMode=l.mode,b.localState=l.mode.startState&&l.mode.startState(g.indent(b.htmlState,"")));break}}}else"style"==c&&/\btag\b/.test(d)&&">"==a.current()&&(b.token=f,b.localMode=h,b.localState=h.startState(g.indent(b.htmlState,"")));return d}function d(a,b,c){var d,e=a.current(),f=e.search(b);return f>-1?a.backUp(e.length-f):(d=e.match(/<\/?$/))&&(a.backUp(e.length),a.match(b,!1)||a.match(e[0])),c}function e(a,b){return a.match(/^<\/\s*script\s*>/i,!1)?(b.token=c,b.localState=b.localMode=null,c(a,b)):d(a,/<\/\s*script\s*>/,b.localMode.token(a,b.localState))}function f(a,b){return a.match(/^<\/\s*style\s*>/i,!1)?(b.token=c,b.localState=b.localMode=null,c(a,b)):d(a,/<\/\s*style\s*>/,h.token(a,b.localState))}var g=CodeMirror.getMode(a,{name:"xml",htmlMode:!0}),h=CodeMirror.getMode(a,"css"),i=[],j=b&&b.scriptTypes;if(i.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:CodeMirror.getMode(a,"javascript")}),j)for(var k=0;k<j.length;++k){var l=j[k];i.push({matches:l.matches,mode:l.mode&&CodeMirror.getMode(a,l.mode)})}return i.push({matches:/./,mode:CodeMirror.getMode(a,"text/plain")}),{startState:function(){var a=g.startState();return{token:c,localMode:null,localState:null,htmlState:a}},copyState:function(a){if(a.localState)var b=CodeMirror.copyState(a.localMode,a.localState);return{token:a.token,localMode:a.localMode,localState:b,htmlState:CodeMirror.copyState(g,a.htmlState)}},token:function(a,b){return b.token(a,b)},indent:function(a,b){return!a.localMode||/^\s*<\//.test(b)?g.indent(a.htmlState,b):a.localMode.indent?a.localMode.indent(a.localState,b):CodeMirror.Pass},electricChars:"/{}:",innerMode:function(a){return{state:a.localState||a.htmlState,mode:a.localMode||g}}}},"xml","javascript","css"),CodeMirror.defineMIME("text/html","htmlmixed"),CodeMirror.defineMode("javascript",function(a,b){function c(a,b,c){return b.tokenize=c,c(a,b)}function d(a,b){for(var c,d=!1;null!=(c=a.next());){if(c==b&&!d)return!1;d=!d&&"\\"==c}return d}function e(a,b,c){return R=a,S=c,b}function f(a,b){var f=a.next();if('"'==f||"'"==f)return c(a,b,g(f));if(/[\[\]{}\(\),;\:\.]/.test(f))return e(f);if("0"==f&&a.eat(/x/i))return a.eatWhile(/[\da-f]/i),e("number","number");if(/\d/.test(f)||"-"==f&&a.eat(/\d/))return a.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),e("number","number");if("/"==f)return a.eat("*")?c(a,b,h):a.eat("/")?(a.skipToEnd(),e("comment","comment")):"operator"==b.lastType||"keyword c"==b.lastType||/^[\[{}\(,;:]$/.test(b.lastType)?(d(a,"/"),a.eatWhile(/[gimy]/),e("regexp","string-2")):(a.eatWhile(X),e("operator",null,a.current()));if("#"==f)return a.skipToEnd(),e("error","error");if(X.test(f))return a.eatWhile(X),e("operator",null,a.current());a.eatWhile(/[\w\$_]/);var i=a.current(),j=W.propertyIsEnumerable(i)&&W[i];return j&&"."!=b.lastType?e(j.type,j.style,i):e("variable","variable",i)}function g(a){return function(b,c){return d(b,a)||(c.tokenize=f),e("string","string")}}function h(a,b){for(var c,d=!1;c=a.next();){if("/"==c&&d){b.tokenize=f;break}d="*"==c}return e("comment","comment")}function i(a,b,c,d,e,f){this.indented=a,this.column=b,this.type=c,this.prev=e,this.info=f,null!=d&&(this.align=d)}function j(a,b){for(var c=a.localVars;c;c=c.next)if(c.name==b)return!0}function k(a,b,c,d,e){var f=a.cc;for(Z.state=a,Z.stream=e,Z.marked=null,Z.cc=f,a.lexical.hasOwnProperty("align")||(a.lexical.align=!0);;){var g=f.length?f.pop():U?u:t;if(g(c,d)){for(;f.length&&f[f.length-1].lex;)f.pop()();return Z.marked?Z.marked:"variable"==c&&j(a,d)?"variable-2":b}}}function l(){for(var a=arguments.length-1;a>=0;a--)Z.cc.push(arguments[a])}function m(){return l.apply(null,arguments),!0}function n(a){function b(b){for(var c=b;c;c=c.next)if(c.name==a)return!0;return!1}var c=Z.state;if(c.context){if(Z.marked="def",b(c.localVars))return;c.localVars={name:a,next:c.localVars}}else{if(b(c.globalVars))return;c.globalVars={name:a,next:c.globalVars}}}function o(){Z.state.context={prev:Z.state.context,vars:Z.state.localVars},Z.state.localVars=$}function p(){Z.state.localVars=Z.state.context.vars,Z.state.context=Z.state.context.prev}function q(a,b){var c=function(){var c=Z.state;c.lexical=new i(c.indented,Z.stream.column(),a,null,c.lexical,b)};return c.lex=!0,c}function r(){var a=Z.state;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function s(a){return function(b){return b==a?m():";"==a?l():m(arguments.callee)}}function t(a){return"var"==a?m(q("vardef"),I,s(";"),r):"keyword a"==a?m(q("form"),u,t,r):"keyword b"==a?m(q("form"),t,r):"{"==a?m(q("}"),F,r):";"==a?m():"if"==a?m(q("form"),u,t,r,K(Z.state.indented)):"function"==a?m(P):"for"==a?m(q("form"),s("("),q(")"),L,s(")"),r,t,r):"variable"==a?m(q("stat"),A):"switch"==a?m(q("form"),u,q("}","switch"),s("{"),F,r,r):"case"==a?m(u,s(":")):"default"==a?m(s(":")):"catch"==a?m(q("form"),o,s("("),Q,s(")"),t,r,p):l(q("stat"),u,s(";"),r)}function u(a){return w(a,y)}function v(a){return w(a,z)}function w(a,b){return Y.hasOwnProperty(a)?m(b):"function"==a?m(P):"keyword c"==a?m(x):"("==a?m(q(")"),x,s(")"),r,b):"operator"==a?m(u):"["==a?m(q("]"),E(v,"]"),r,b):"{"==a?m(q("}"),E(C,"}"),r,b):m()}function x(a){return a.match(/[;\}\)\],]/)?l():l(u)}function y(a,b){return","==a?m(u):z(a,b,y)}function z(a,b,c){return c||(c=z),"operator"==a?/\+\+|--/.test(b)?m(c):"?"==b?m(u,s(":"),u):m(u):";"!=a?"("==a?m(q(")","call"),E(v,")"),r,c):"."==a?m(B,c):"["==a?m(q("]"),u,s("]"),r,c):void 0:void 0}function A(a){return":"==a?m(r,t):l(y,s(";"),r)}function B(a){return"variable"==a?(Z.marked="property",m()):void 0}function C(a,b){if("variable"==a){if(Z.marked="property","get"==b||"set"==b)return m(D)}else("number"==a||"string"==a)&&(Z.marked=a+" property");return Y.hasOwnProperty(a)?m(s(":"),v):void 0}function D(a){return":"==a?m(u):"variable"!=a?m(s(":"),u):(Z.marked="property",m(P))}function E(a,b){function c(d){if(","==d){var e=Z.state.lexical;return"call"==e.info&&(e.pos=(e.pos||0)+1),m(a,c)}return d==b?m():m(s(b))}return function(d){return d==b?m():l(a,c)}}function F(a){return"}"==a?m():l(t,F)}function G(a){return":"==a?m(H):l()}function H(a){return"variable"==a?(Z.marked="variable-3",m()):l()}function I(a,b){return"variable"==a?(n(b),V?m(G,J):m(J)):l()}function J(a,b){return"="==b?m(v,J):","==a?m(I):void 0}function K(a){return function(b,c){return"keyword b"==b&&"else"==c?(Z.state.lexical=new i(a,0,"form",null,Z.state.lexical),m(t,r)):l()}}function L(a){return"var"==a?m(I,s(";"),N):";"==a?m(N):"variable"==a?m(M):l(u,s(";"),N)}function M(a,b){return"in"==b?m(u):m(y,N)}function N(a,b){return";"==a?m(O):"in"==b?m(u):l(u,s(";"),O)}function O(a){")"!=a&&m(u)}function P(a,b){return"variable"==a?(n(b),m(P)):"("==a?m(q(")"),o,E(Q,")"),r,t,p):void 0}function Q(a,b){return"variable"==a?(n(b),V?m(G):m()):void 0}var R,S,T=a.indentUnit,U=b.json,V=b.typescript,W=function(){function a(a){return{type:a,style:"keyword"}}var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),e=a("operator"),f={type:"atom",style:"atom"},g={"if":a("if"),"while":b,"with":b,"else":c,"do":c,"try":c,"finally":c,"return":d,"break":d,"continue":d,"new":d,"delete":d,"throw":d,"var":a("var"),"const":a("var"),let:a("var"),"function":a("function"),"catch":a("catch"),"for":a("for"),"switch":a("switch"),"case":a("case"),"default":a("default"),"in":e,"typeof":e,"instanceof":e,"true":f,"false":f,"null":f,undefined:f,NaN:f,Infinity:f,"this":a("this")};if(V){var h={type:"variable",style:"variable-3"},i={"interface":a("interface"),"class":a("class"),"extends":a("extends"),constructor:a("constructor"),"public":a("public"),"private":a("private"),"protected":a("protected"),"static":a("static"),"super":a("super"),string:h,number:h,bool:h,any:h};for(var j in i)g[j]=i[j]}return g}(),X=/[+\-*&%=<>!?|~^]/,Y={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0},Z={state:null,column:null,marked:null,cc:null},$={name:"this",next:{name:"arguments"}};return r.lex=!0,{startState:function(a){return{tokenize:f,lastType:null,cc:[],lexical:new i((a||0)-T,0,"block",!1),localVars:b.localVars,globalVars:b.globalVars,context:b.localVars&&{vars:b.localVars},indented:0}},token:function(a,b){if(a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation()),b.tokenize!=h&&a.eatSpace())return null;var c=b.tokenize(a,b);return"comment"==R?c:(b.lastType="operator"!=R||"++"!=S&&"--"!=S?R:"incdec",k(b,c,R,S,a))},indent:function(a,c){if(a.tokenize==h)return CodeMirror.Pass;if(a.tokenize!=f)return 0;var d=c&&c.charAt(0),e=a.lexical;"stat"==e.type&&"}"==d&&(e=e.prev);var g=e.type,i=d==g;return null!=b.statementIndent&&(")"==g&&e.prev&&"stat"==e.prev.type&&(e=e.prev),"stat"==e.type)?e.indented+b.statementIndent:"vardef"==g?e.indented+("operator"==a.lastType||","==a.lastType?4:0):"form"==g&&"{"==d?e.indented:"form"==g?e.indented+T:"stat"==g?e.indented+("operator"==a.lastType||","==a.lastType?T:0):"switch"!=e.info||i?e.align?e.column+(i?0:1):e.indented+(i?0:T):e.indented+(/^(?:case|default)\b/.test(c)?T:2*T)},electricChars:":{}",jsonMode:U}}),CodeMirror.defineMIME("text/javascript","javascript"),CodeMirror.defineMIME("text/ecmascript","javascript"),CodeMirror.defineMIME("application/javascript","javascript"),CodeMirror.defineMIME("application/ecmascript","javascript"),CodeMirror.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMode("xml",function(a,b){function c(a,b){function c(c){return b.tokenize=c,c(a,b)}var e=a.next();if("<"==e){if(a.eat("!"))return a.eat("[")?a.match("CDATA[")?c(f("atom","]]>")):null:a.match("--")?c(f("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),c(g(1))):null;if(a.eat("?"))return a.eatWhile(/[\w\._\-]/),b.tokenize=f("meta","?>"),"meta";var h=a.eat("/");t="";for(var i;i=a.eat(/[^\s\u00a0=<>\"\'\/?]/);)t+=i;return t?(u=h?"closeTag":"openTag",b.tokenize=d,"tag"):"error"}if("&"==e){var j;return j=a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),j?"atom":"error"}return a.eatWhile(/[^&<]/),null}function d(a,b){var d=a.next();return">"==d||"/"==d&&a.eat(">")?(b.tokenize=c,u=">"==d?"endTag":"selfcloseTag","tag"):"="==d?(u="equals",null):"<"==d?"error":/[\'\"]/.test(d)?(b.tokenize=e(d),b.stringStartCol=a.column(),b.tokenize(a,b)):(a.eatWhile(/[^\s\u00a0=<>\"\']/),"word")}function e(a){var b=function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=d;break}return"string"};return b.isInAttribute=!0,b}function f(a,b){return function(d,e){for(;!d.eol();){if(d.match(b)){e.tokenize=c;break}d.next()}return a}}function g(a){return function(b,d){for(var e;null!=(e=b.next());){if("<"==e)return d.tokenize=g(a+1),d.tokenize(b,d);if(">"==e){if(1==a){d.tokenize=c;break}return d.tokenize=g(a-1),d.tokenize(b,d)}}return"meta"}}function h(){for(var a=arguments.length-1;a>=0;a--)v.cc.push(arguments[a])}function i(){return h.apply(null,arguments),!0}function j(a,b){var c=B.doNotIndent.hasOwnProperty(a)||v.context&&v.context.noIndent;
-v.context={prev:v.context,tagName:a,indent:v.indented,startOfLine:b,noIndent:c}}function k(){v.context&&(v.context=v.context.prev)}function l(a){if("openTag"==a)return v.tagName=t,v.tagStart=w.column(),i(p,m(v.startOfLine));if("closeTag"==a){var b=!1;return v.context?v.context.tagName!=t&&(B.implicitlyClosed.hasOwnProperty(v.context.tagName.toLowerCase())&&k(),b=!v.context||v.context.tagName!=t):b=!0,b&&(x="error"),i(n(b))}return i()}function m(a){return function(b){var c=v.tagName;return v.tagName=v.tagStart=null,"selfcloseTag"==b||"endTag"==b&&B.autoSelfClosers.hasOwnProperty(c.toLowerCase())?(o(c.toLowerCase()),i()):"endTag"==b?(o(c.toLowerCase()),j(c,a),i()):i()}}function n(a){return function(b){return a&&(x="error"),"endTag"==b?(k(),i()):(x="error",i(arguments.callee))}}function o(a){for(var b;;){if(!v.context)return;if(b=v.context.tagName.toLowerCase(),!B.contextGrabbers.hasOwnProperty(b)||!B.contextGrabbers[b].hasOwnProperty(a))return;k()}}function p(a){return"word"==a?(x="attribute",i(q,p)):"endTag"==a||"selfcloseTag"==a?h():(x="error",i(p))}function q(a){return"equals"==a?i(r,p):(B.allowMissing?"word"==a&&(x="attribute"):x="error","endTag"==a||"selfcloseTag"==a?h():i())}function r(a){return"string"==a?i(s):"word"==a&&B.allowUnquoted?(x="string",i()):(x="error","endTag"==a||"selfCloseTag"==a?h():i())}function s(a){return"string"==a?i(s):h()}var t,u,v,w,x,y=a.indentUnit,z=b.multilineTagIndentFactor||1,A=b.multilineTagIndentPastTag||!0,B=b.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1},C=b.alignCDATA;return{startState:function(){return{tokenize:c,cc:[],indented:0,startOfLine:!0,tagName:null,tagStart:null,context:null}},token:function(a,b){if(!b.tagName&&a.sol()&&(b.startOfLine=!0,b.indented=a.indentation()),a.eatSpace())return null;x=u=t=null;var c=b.tokenize(a,b);if(b.type=u,(c||u)&&"comment"!=c)for(v=b,w=a;;){var d=b.cc.pop()||l;if(d(u||c))break}return b.startOfLine=!1,x||c},indent:function(a,b,e){var f=a.context;if(a.tokenize.isInAttribute)return a.stringStartCol+1;if(a.tokenize!=d&&a.tokenize!=c||f&&f.noIndent)return e?e.match(/^(\s*)/)[0].length:0;if(a.tagName)return A?a.tagStart+a.tagName.length+2:a.tagStart+y*z;if(C&&/<!\[CDATA\[/.test(b))return 0;for(f&&/^<\//.test(b)&&(f=f.prev);f&&!f.startOfLine;)f=f.prev;return f?f.indent+y:0},electricChars:"/",blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:b.htmlMode?"html":"xml",helperType:b.htmlMode?"html":"xml"}}),CodeMirror.defineMIME("text/xml","xml"),CodeMirror.defineMIME("application/xml","xml"),CodeMirror.mimeModes.hasOwnProperty("text/html")||CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:!0}),function(){window.DOM=document.find=function(a){return document.querySelectorAll(a)};var a=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","plaintext","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"];for(var b in a){var c=a[b];DOM[c]=function(a){var b=document.createElement(this.type);for(var c in a)b.setAttribute(c,a[c]);var d=[].slice.apply(arguments).slice(1);for(var c in d){var e=d[c];"object"!=typeof e&&(e=document.createTextNode(e)),b.appendChild(e)}return b}.bind({type:c})}}();var Markdown;Markdown="object"==typeof exports&&"function"==typeof require?exports:{},function(){function a(a){return a}function b(){return!1}function c(){}function d(){}c.prototype={chain:function(b,c){var d=this[b];if(!d)throw new Error("unknown hook "+b);this[b]=d===a?c:function(){var a=Array.prototype.slice.call(arguments,0);return a[0]=d.apply(null,a),c.apply(null,a)}},set:function(a,b){if(!this[a])throw new Error("unknown hook "+a);this[a]=b},addNoop:function(b){this[b]=a},addFalse:function(a){this[a]=b}},Markdown.HookCollection=c,d.prototype={set:function(a,b){this["s_"+a]=b},get:function(a){return this["s_"+a]}},Markdown.Converter=function(){function a(a){return a=a.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm,function(a,b,c,d,e,f){return b=b.toLowerCase(),I.set(b,x(c)),e?d:(f&&J.set(b,f.replace(/"/g,"&quot;")),"")})}function b(a){return a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,e),a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,e),a=a.replace(/\n[ ]{0,3}((<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,e),a=a.replace(/\n\n[ ]{0,3}(<!(--(?:|(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>[ \t]*(?=\n{2,}))/g,e),a=a.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,e)}function e(a,b){var c=b;return c=c.replace(/^\n+/,""),c=c.replace(/\n+$/g,""),c="\n\n~K"+(K.push(c)-1)+"K\n\n"}function f(a,c){a=H.preBlockGamut(a,M),a=n(a);var d="<hr />\n";return a=a.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,d),a=a.replace(/^[ ]{0,2}([ ]?-[ ]?){3,}[ \t]*$/gm,d),a=a.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm,d),a=o(a),a=q(a),a=v(a),a=H.postBlockGamut(a,M),a=b(a),a=w(a,c)}function g(a){return a=H.preSpanGamut(a),a=s(a),a=h(a),a=y(a),a=k(a),a=i(a),a=A(a),a=a.replace(/~P/g,"://"),a=x(a),a=u(a),a=a.replace(/ +\n/g," <br>\n"),a=H.postSpanGamut(a)}function h(a){var b=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--(?:|(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>)/gi;return a=a.replace(b,function(a){var b=a.replace(/(.)<\/?code>(?=.)/g,"$1`");return b=F(b,"!"==a.charAt(1)?"\\`*_/":"\\`*_")})}function i(a){return a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,j),a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?((?:\([^)]*\)|[^()\s])*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,j),a=a.replace(/(\[([^\[\]]+)\])()()()()()/g,j)}function j(a,b,c,d,e,f,g,h){void 0==h&&(h="");var i=b,j=c.replace(/:\/\//g,"~P"),k=d.toLowerCase(),m=e,n=h;if(""==m)if(""==k&&(k=j.toLowerCase().replace(/ ?\n/g," ")),m="#"+k,void 0!=I.get(k))m=I.get(k),void 0!=J.get(k)&&(n=J.get(k));else{if(!(i.search(/\(\s*\)$/m)>-1))return i;m=""}m=E(m),m=F(m,"*_");var o='<a href="'+m+'"';return""!=n&&(n=l(n),n=F(n,"*_"),o+=' title="'+n+'"'),o+=">"+j+"</a>"}function k(a){return a=a.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,m),a=a.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,m)}function l(a){return a.replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}function m(a,b,c,d,e,f,g,h){var i=b,j=c,k=d.toLowerCase(),m=e,n=h;if(n||(n=""),""==m){if(""==k&&(k=j.toLowerCase().replace(/ ?\n/g," ")),m="#"+k,void 0==I.get(k))return i;m=I.get(k),void 0!=J.get(k)&&(n=J.get(k))}j=F(l(j),"*_[]()"),m=F(m,"*_");var o='<img src="'+m+'" alt="'+j+'"';return n=l(n),n=F(n,"*_"),o+=' title="'+n+'"',o+=" />"}function n(a){return a=a.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(a,b){return"<h1>"+g(b)+"</h1>\n\n"}),a=a.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(a,b){return"<h2>"+g(b)+"</h2>\n\n"}),a=a.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(a,b,c){var d=b.length;return"<h"+d+">"+g(c)+"</h"+d+">\n\n"})}function o(a,b){a+="~0";var c=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return L?a=a.replace(c,function(a,c,d){var e=c,f=d.search(/[*+-]/g)>-1?"ul":"ol",g=p(e,f,b);return g=g.replace(/\s+$/,""),g="<"+f+">"+g+"</"+f+">\n"}):(c=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g,a=a.replace(c,function(a,b,c,d){var e=b,f=c,g=d.search(/[*+-]/g)>-1?"ul":"ol",h=p(f,g);return h=e+"<"+g+">\n"+h+"</"+g+">\n"})),a=a.replace(/~0/,"")}function p(a,b,c){L++,a=a.replace(/\n{2,}$/,"\n"),a+="~0";var d=N[b],e=new RegExp("(^[ \\t]*)("+d+")[ \\t]+([^\\r]+?(\\n+))(?=(~0|\\1("+d+")[ \\t]+))","gm"),h=!1;return a=a.replace(e,function(a,b,d,e){var i=e,j=/\n\n$/.test(i),k=j||i.search(/\n{2,}/)>-1;return k||h?i=f(C(i),!0):(i=o(C(i),!0),i=i.replace(/\n$/,""),c||(i=g(i))),h=j,"<li>"+i+"</li>\n"}),a=a.replace(/~0/g,""),L--,a}function q(a){return a+="~0",a=a.replace(/(?:\n\n|^\n?)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(a,b,c){var d=b,e=c;return d=t(C(d)),d=D(d),d=d.replace(/^\n+/g,""),d=d.replace(/\n+$/g,""),d="<pre><code>"+d+"\n</code></pre>","\n\n"+d+"\n\n"+e}),a=a.replace(/~0/,"")}function r(a){return a=a.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(K.push(a)-1)+"K\n\n"}function s(a){return a=a.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(a,b,c,d){var e=d;return e=e.replace(/^([ \t]*)/g,""),e=e.replace(/[ \t]*$/g,""),e=t(e),e=e.replace(/:\/\//g,"~P"),b+"<code>"+e+"</code>"})}function t(a){return a=a.replace(/&/g,"&amp;"),a=a.replace(/</g,"&lt;"),a=a.replace(/>/g,"&gt;"),a=F(a,"*_{}[]\\",!1)}function u(a){return a=a.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g,"$1<strong>$3</strong>$4"),a=a.replace(/([\W_]|^)(\*|_)(?=\S)([^\r\*_]*?\S)\2([\W_]|$)/g,"$1<em>$3</em>$4")}function v(a){return a=a.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(a,b){var c=b;return c=c.replace(/^[ \t]*>[ \t]?/gm,"~0"),c=c.replace(/~0/g,""),c=c.replace(/^[ \t]+$/gm,""),c=f(c),c=c.replace(/(^|\n)/g,"$1 "),c=c.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(a,b){var c=b;return c=c.replace(/^ /gm,"~0"),c=c.replace(/~0/g,"")}),r("<blockquote>\n"+c+"\n</blockquote>")})}function w(a,b){a=a.replace(/^\n+/g,""),a=a.replace(/\n+$/g,"");for(var c=a.split(/\n{2,}/g),d=[],e=/~K(\d+)K/,f=c.length,h=0;f>h;h++){var i=c[h];e.test(i)?d.push(i):/\S/.test(i)&&(i=g(i),i=i.replace(/^([ \t]*)/g,"<p>"),i+="</p>",d.push(i))}if(!b){f=d.length;for(var h=0;f>h;h++)for(var j=!0;j;)j=!1,d[h]=d[h].replace(/~K(\d+)K/g,function(a,b){return j=!0,K[b]})}return d.join("\n\n")}function x(a){return a=a.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;"),a=a.replace(/<(?![a-z\/?!]|~D)/gi,"&lt;")}function y(a){return a=a.replace(/\\(\\)/g,G),a=a.replace(/\\([`*_{}\[\]()>#+-.!])/g,G)}function z(a,b,c,d){if(b)return a;if(")"!==d.charAt(d.length-1))return"<"+c+d+">";for(var e=d.match(/[()]/g),f=0,g=0;g<e.length;g++)"("===e[g]?0>=f?f=1:f++:f--;var h="";if(0>f){var i=new RegExp("\\){1,"+-f+"}$");d=d.replace(i,function(a){return h=a,""})}if(h){var j=d.charAt(d.length-1);R.test(j)||(h=j+h,d=d.substr(0,d.length-1))}return"<"+c+d+">"+h}function A(a){a=a.replace(Q,z);var b=function(a,b){return'<a href="'+b+'">'+H.plainLinkText(b)+"</a>"};return a=a.replace(/<((https?|ftp):[^'">\s]+)>/gi,b)}function B(a){return a=a.replace(/~E(\d+)E/g,function(a,b){var c=parseInt(b);return String.fromCharCode(c)})}function C(a){return a=a.replace(/^(\t|[ ]{1,4})/gm,"~0"),a=a.replace(/~0/g,"")}function D(a){if(!/\t/.test(a))return a;var b,c=[" "," "," "," "],d=0;return a.replace(/[\n\t]/g,function(a,e){return"\n"===a?(d=e+1,a):(b=(e-d)%4,d=e+1,c[b])})}function E(a){if(!a)return"";var b=a.length;return a.replace(S,function(c,d){return"~D"==c?"%24":":"!=c||d!=b-1&&!/[0-9\/]/.test(a.charAt(d+1))?"%"+c.charCodeAt(0).toString(16):":"})}function F(a,b,c){var d="(["+b.replace(/([\[\]\\])/g,"\\$1")+"])";c&&(d="\\\\"+d);var e=new RegExp(d,"g");return a=a.replace(e,G)}function G(a,b){var c=b.charCodeAt(0);return"~E"+c+"E"}var H=this.hooks=new c;H.addNoop("plainLinkText"),H.addNoop("preConversion"),H.addNoop("postNormalization"),H.addNoop("preBlockGamut"),H.addNoop("postBlockGamut"),H.addNoop("preSpanGamut"),H.addNoop("postSpanGamut"),H.addNoop("postConversion");var I,J,K,L;this.makeHtml=function(c){if(I)throw new Error("Recursive call to converter.makeHtml");return I=new d,J=new d,K=[],L=0,c=H.preConversion(c),c=c.replace(/~/g,"~T"),c=c.replace(/\$/g,"~D"),c=c.replace(/\r\n/g,"\n"),c=c.replace(/\r/g,"\n"),c="\n\n"+c+"\n\n",c=D(c),c=c.replace(/^[ \t]+$/gm,""),c=H.postNormalization(c),c=b(c),c=a(c),c=f(c),c=B(c),c=c.replace(/~D/g,"$$"),c=c.replace(/~T/g,"~"),c=H.postConversion(c),K=J=I=null,c};var M=function(a){return f(a)},N={ol:"\\d+[.]",ul:"[*+-]"},O="[-A-Z0-9+&@#/%?=~_|[\\]()!:,.;]",P="[-A-Z0-9+&@#/%=~_|[\\])]",Q=new RegExp('(="|<)?\\b(https?|ftp)(://'+O+"*"+P+")(?=$|\\W)","gi"),R=new RegExp(P,"i"),S=/(?:["'*()[\]:]|~D)/g}}(),jQuery.fn.sticky=function(a){var b=this,c=a||b.offset().top;return jQuery(window).scroll(function(){b.hasScrolledPast()&&b.css({position:"fixed",top:"0px"}).addClass("stuck"),c>b.offset().top&&b.css({position:"absolute",top:c+"px"}).removeClass("stuck")}),b.parent().css("position","relative"),this},jQuery.fn.hasScrolledPast=function(){return this.offset().top<=jQuery(window).scrollTop()},jQuery.fn.scrollTo=function(a){a=a||800,$("html, body").animate({scrollTop:$(this).offset().top},a)},function(){var a=function(a,b){var c=[];for(var d in a)a.hasOwnProperty(d)&&c.push(b(a[d],d));return c},b=function(a,b,c){for(var d in a)a.hasOwnProperty(d)&&(c=b(c,a[d],d));return c},c=function(){var a={};for(var b in arguments){var c=arguments[b];for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}return a},d=function(a,b,d,e){d=d||function(){},e=c(a.toJSON(),e);var f={fetch:"GET",save:a.id?"PUT":"POST",destroy:"DELETE"},g=function(c){return a.set(c),a.trigger(b,a),d(void 0,c)};return a.trigger("before:"+b,a),a.URL?($.ajax({url:a.URL()+(a.id?"/"+a.id:""),type:f[b],data:e,error:function(b){return a.trigger("error",a,b.responseText),d(b.responseText)},success:function(a){return g(a),this}}),void 0):g(e)};xo={},xo.elementWrapper=$||function(a){return a},xo.view=Archetype.extend({view:void 0,schematic:void 0,initialize:function(a){return this.model=a,this.dom={},this.view&&this.once("created",this.appendTo.bind(this)),this},prependTo:function(a){return this.appendTo(a,!0)},appendTo:function(a,b){if(a.length&&(a=a[0]),this.schematic){var c;if("string"==typeof this.schematic){if(c=document.querySelector('[xo-schematic="'+this.schematic+'"]'),!c)throw'xo-view: Could not find schematic with name "'+this.schematic+'"';c=c.cloneNode(!0),c.removeAttribute("xo-schematic")}else c=this.schematic;this.dom.view=c.cloneNode(!0),b?a.insertBefore(this.dom.view,a.firstChild):a.appendChild(this.dom.view)}if(this.view&&(this.dom.view=document.querySelector('[xo-view="'+this.view+'"]'),!this.dom.view))throw"xo-view: Could not find view with name "+this.view;for(var d=this.dom.view.querySelectorAll("[xo-element]"),e=0;e<d.length;e++)this.dom[d[e].getAttribute("xo-element")]=xo.elementWrapper(d[e]);return this.dom.view=xo.elementWrapper(this.dom.view),this.render(),this.trigger("render"),this},remove:function(){return this.trigger("remove"),this.dom.view&&this.dom.view.remove(),this.off(),this},render:function(){return this}}),xo.model=Archetype.extend({URL:void 0,initialize:function(a){return this.set(a),this.on("destroy",this.off),this},set:function(a,b){var c={};c[a]=b;var d=!1;"object"==typeof a&&(c=a);for(var a in c){var e=c[a];this[a]!==e&&(this[a]=e,d=!0,this.trigger("change:"+a,e))}return d&&this.trigger("change"),this},onChange:function(a,b){if("object"==typeof a){for(var c in a)this.onChange(c,a[c]);return this}return this.on("change:"+a,b),b(this[a]),this},toJSON:function(){return JSON.parse(JSON.stringify(this))},save:function(a,b){return"function"==typeof a&&(b=a),d(this,"save",b,a),this},fetch:function(a){return d(this,"fetch",a),this},destroy:function(a){return d(this,"destroy",a),this}}),xo.collection=Archetype.extend({URL:void 0,model:xo.model,models:[],initialize:function(a){return this.set(a),this.URL=this.model.URL||this.URL,this.model.URL=this.model.URL||this.URL,this},set:function(a){this.models=[];for(var b in a)this.add(a[b]);return this},get:function(a){return b(this.models,function(b,c){return c.id===a&&(b=c),b})},remove:function(a){id=a.id||a;for(var b in this.models)id==this.models[b].id&&(this.trigger("remove",this.models[b]),this.models.splice(b,1));return this},add:function(a){return this.model.isPrototypeOf(a)||(a=this.model.create(a)),a.on("destroy",function(a){this.remove(a)}.bind(this)),this.models.push(a),this.trigger("add",a),a},each:function(b){return a(this.models,b)},toJSON:function(){return JSON.parse(JSON.stringify(this.models))},fetch:function(a){return d(this,"fetch",a),this},destroy:function(b){var c=this.models.length,d=this;return d.trigger("before:destroy"),a(this.models,function(a){a.destroy(function(){0===--c&&(d.trigger("destroy"),b&&b())})}),this},save:function(b){var c=this.models.length,d=this;return d.trigger("before:save"),a(this.models,function(a){a.save(function(){0===--c&&(d.trigger("save"),b&&b())})}),this}}),xo.router=Archetype.extend({routes:{},initialize:function(b){return a(b,function(a,b){this.add(b,a)}.bind(this)),window.addEventListener("hashchange",this.route),window.addEventListener("load",this.route),this},navigate:function(a){return window.location.hash=a,this},add:function(a,b){return a=a.replace("*","(.*?)").replace(/(\(\?)?:\w+/g,"([^/]+)")+"$",this.routes[a]=b,this},route:function(){var a=location.hash.slice(1)||"";for(var b in this.routes){var c=new RegExp(b).exec(a);c&&this.routes[b].apply(this,c.slice(1))}}})}(),CodeBlockComponent=xo.view.extend({schematic:DOM.div({"class":"codeblock"},DOM.div({"xo-element":"editor"}),DOM.div({"class":"codeblock__output","xo-element":"outputContainer",style:"display:none"},DOM.div({"xo-element":"output"}),DOM.div({"xo-element":"outputError","class":"codeblock__output__errorText",style:"display:none"})),DOM.div({"class":"codeblock__runButton btn green","xo-element":"runButton"},"Run"),DOM.div({style:"clear:both"})),render:function(a,b,c){var d=this;this.id="codeblock"+b,this.projectData=c,this.dom={view:$(this.schematic.cloneNode(!0))};for(var e=this.dom.view.find("[xo-element]"),f=0;f<e.length;f++)this.dom[e[f].getAttribute("xo-element")]=xo.elementWrapper(e[f]);return this.code=a.text(),"<"===this.code[0]&&(this.isHtml=!0),a.parent().replaceWith(this.dom.view),this.editor=CodeMirror(function(a){d.dom.editor[0].parentNode.replaceChild(a,d.dom.editor[0])},{value:d.code,mode:d.isHtml?"htmlmixed":"javascript",viewportMargin:1/0,lineNumbers:!0,matchBrackets:!0,tabMode:"indent"}),this.editor.setValue(this.code),setTimeout(function(){this.editor.refresh()}.bind(this),10),!this.projectData.runnable_code_blocks||this.isHtml?(this.dom.runButton.hide(),this.dom.outputContainer.hide(),this):(this.dom.runButton.click(function(){d.executeCodeBlock()}),this)},setExampleCode:function(a){return this.htmlExample=a,this},executeCodeBlock:function(){var self=this;this.dom.outputContainer.hide(),this.htmlExample?this.createExampleHtml(jQuery("<div>").append(this.htmlExample.editor.getValue())):this.createExampleHtml(jQuery("<div>"));try{eval('(function(){var example = $("#'+self.id+'");'+self.editor.getValue()+"})();")}catch(e){self.dom.outputContainer.show(),self.dom.output.hide(),self.dom.outputError.html(e.toString()).show()}return this},createExampleHtml:function(a){return this.projectData.show_html_example?(this.dom.output.replaceWith(a),this.dom.output=a,this.dom.output.show().attr("id",this.id),this.dom.outputError.hide(),this.dom.outputContainer.show(),this):this}}),IconComponent=xo.view.extend({schematic:DOM.a({target:"_blank","class":"project__icon card btn hint--bottom"},DOM.i({"xo-element":"iconElement"})),render:function(){return this.model.link&&("function"==typeof this.model.link?this.dom.view.attr("href",this.model.link()):this.dom.view.attr("href",this.model.link)),this.model.tooltip&&this.dom.view.attr("data-hint",this.model.tooltip),this.model.color&&this.dom.view.addClass(this.model.color),this.model.icon_class&&this.dom.iconElement.addClass(this.model.icon_class),this}}),SidebarView=xo.view.extend({view:"sideBar",render:function(){var a=this;return this.dom.view.sticky(150),this.dom.logo.click(function(){$("body").scrollTo()}),this.dom.logo.mouseover(function(){a.dom.view.hasClass("stuck")&&(a.dom.logoIcon.hide(),a.dom.logoUp.show())}).mouseout(function(){a.dom.logoIcon.show(),a.dom.logoUp.hide()}),this.dom.logo.addClass(this.model.icon_color),this.dom.logoIcon.addClass(this.model.icon_class),this},addNavItem:function(a,b,c){var d=$("<div></div>").appendTo(this.dom.nav);return d.addClass("sideBar__nav__item").addClass(c).html(a).click(function(){b.scrollTo()}),$(window).scroll(function(){b.hasScrolledPast()?d.addClass("scrolled"):d.removeClass("scrolled")}),this}});var _=_||{map:function(a,b){var c=[];for(var d in a)a.hasOwnProperty(d)&&c.push(b(a[d],d));return c}};Paintjob=xo.view.extend({view:"paintjob",render:function(){var a=this;return this.projectData=this.model,this.dom.spinner.hide(),this.projectData.local&&_.map(["user","repo","name","description"],function(b){a.projectData[b]=a.projectData[b]||a.projectData.local[b]}),this.dom.name.html(this.projectData.name),this.dom.description.html(this.projectData.description),this.sidebar=SidebarView.create(this.projectData),this.projectData.scripts&&this.fetchScripts(this.projectData.scripts),FontAwesomeFavicon(this.projectData.icon_class),document.title=this.projectData.name,this.fetchScripts(),this.buildDocumentation(this.projectData.readme),this.buildCodeBlocks(),this.buildNav(),this.buildIcons(),this.buildExample(),this},fetchScripts:function(){for(var a in this.projectData.scripts)$.ajax({url:this.projectData.urls.scripts+this.projectData.scripts[a],type:"GET",headers:{Accept:"application/vnd.github.raw"},success:function(a){a.content&&(a=Base64.decode(a.content));var b=document.createElement("script");b.type="text/javascript",b.appendChild(document.createTextNode(a)),b.text=a,document.body.appendChild(b)}});return this},buildDocumentation:function(a){var b=(new Markdown.Converter).makeHtml(a);return b=b.replace(/<h1>/g,'</div><div class="docblock"><h1>'),b=b.substring(b.indexOf('<div class="docblock"><h1>')),this.dom.documentation.html(b+"</div>"),this},buildCodeBlocks:function(){var a,b=this;return this.dom.documentation.find("pre code").each(function(c,d){var e=CodeBlockComponent.create().render($(d),c,b.projectData);e.isHtml?a=e:a&&e.setExampleCode(a)}),this},buildNav:function(){var a=this,b=["teal","orange","green","blue","red","purple","steel","yellow"];return this.dom.documentation.find(".docblock").each(function(c,d){var d=$(d),e=b[c%b.length];d.addClass(e),a.sidebar.addNavItem(d.find("h1").html(),d,e)}),this},buildExample:function(){return this.projectData.example_image&&this.dom.example.attr("src",this.projectData.example_image),this},buildIcons:function(){var a=this;return _.map(this.projectData.icons,function(b){IconComponent.create(b).appendTo(a.dom.iconContainer)}),this}});
+v.context={prev:v.context,tagName:a,indent:v.indented,startOfLine:b,noIndent:c}}function k(){v.context&&(v.context=v.context.prev)}function l(a){if("openTag"==a)return v.tagName=t,v.tagStart=w.column(),i(p,m(v.startOfLine));if("closeTag"==a){var b=!1;return v.context?v.context.tagName!=t&&(B.implicitlyClosed.hasOwnProperty(v.context.tagName.toLowerCase())&&k(),b=!v.context||v.context.tagName!=t):b=!0,b&&(x="error"),i(n(b))}return i()}function m(a){return function(b){var c=v.tagName;return v.tagName=v.tagStart=null,"selfcloseTag"==b||"endTag"==b&&B.autoSelfClosers.hasOwnProperty(c.toLowerCase())?(o(c.toLowerCase()),i()):"endTag"==b?(o(c.toLowerCase()),j(c,a),i()):i()}}function n(a){return function(b){return a&&(x="error"),"endTag"==b?(k(),i()):(x="error",i(arguments.callee))}}function o(a){for(var b;;){if(!v.context)return;if(b=v.context.tagName.toLowerCase(),!B.contextGrabbers.hasOwnProperty(b)||!B.contextGrabbers[b].hasOwnProperty(a))return;k()}}function p(a){return"word"==a?(x="attribute",i(q,p)):"endTag"==a||"selfcloseTag"==a?h():(x="error",i(p))}function q(a){return"equals"==a?i(r,p):(B.allowMissing?"word"==a&&(x="attribute"):x="error","endTag"==a||"selfcloseTag"==a?h():i())}function r(a){return"string"==a?i(s):"word"==a&&B.allowUnquoted?(x="string",i()):(x="error","endTag"==a||"selfCloseTag"==a?h():i())}function s(a){return"string"==a?i(s):h()}var t,u,v,w,x,y=a.indentUnit,z=b.multilineTagIndentFactor||1,A=b.multilineTagIndentPastTag||!0,B=b.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1},C=b.alignCDATA;return{startState:function(){return{tokenize:c,cc:[],indented:0,startOfLine:!0,tagName:null,tagStart:null,context:null}},token:function(a,b){if(!b.tagName&&a.sol()&&(b.startOfLine=!0,b.indented=a.indentation()),a.eatSpace())return null;x=u=t=null;var c=b.tokenize(a,b);if(b.type=u,(c||u)&&"comment"!=c)for(v=b,w=a;;){var d=b.cc.pop()||l;if(d(u||c))break}return b.startOfLine=!1,x||c},indent:function(a,b,e){var f=a.context;if(a.tokenize.isInAttribute)return a.stringStartCol+1;if(a.tokenize!=d&&a.tokenize!=c||f&&f.noIndent)return e?e.match(/^(\s*)/)[0].length:0;if(a.tagName)return A?a.tagStart+a.tagName.length+2:a.tagStart+y*z;if(C&&/<!\[CDATA\[/.test(b))return 0;for(f&&/^<\//.test(b)&&(f=f.prev);f&&!f.startOfLine;)f=f.prev;return f?f.indent+y:0},electricChars:"/",blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:b.htmlMode?"html":"xml",helperType:b.htmlMode?"html":"xml"}}),CodeMirror.defineMIME("text/xml","xml"),CodeMirror.defineMIME("application/xml","xml"),CodeMirror.mimeModes.hasOwnProperty("text/html")||CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:!0}),function(){window.DOM=document.find=function(a){return document.querySelectorAll(a)};var a=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","plaintext","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"];for(var b in a){var c=a[b];DOM[c]=function(a){var b=document.createElement(this.type);for(var c in a)b.setAttribute(c,a[c]);var d=[].slice.apply(arguments).slice(1);for(var c in d){var e=d[c];"object"!=typeof e&&(e=document.createTextNode(e)),b.appendChild(e)}return b}.bind({type:c})}}();var Markdown;Markdown="object"==typeof exports&&"function"==typeof require?exports:{},function(){function a(a){return a}function b(){return!1}function c(){}function d(){}c.prototype={chain:function(b,c){var d=this[b];if(!d)throw new Error("unknown hook "+b);this[b]=d===a?c:function(){var a=Array.prototype.slice.call(arguments,0);return a[0]=d.apply(null,a),c.apply(null,a)}},set:function(a,b){if(!this[a])throw new Error("unknown hook "+a);this[a]=b},addNoop:function(b){this[b]=a},addFalse:function(a){this[a]=b}},Markdown.HookCollection=c,d.prototype={set:function(a,b){this["s_"+a]=b},get:function(a){return this["s_"+a]}},Markdown.Converter=function(){function a(a){return a=a.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm,function(a,b,c,d,e,f){return b=b.toLowerCase(),I.set(b,x(c)),e?d:(f&&J.set(b,f.replace(/"/g,"&quot;")),"")})}function b(a){return a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,e),a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,e),a=a.replace(/\n[ ]{0,3}((<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,e),a=a.replace(/\n\n[ ]{0,3}(<!(--(?:|(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>[ \t]*(?=\n{2,}))/g,e),a=a.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,e)}function e(a,b){var c=b;return c=c.replace(/^\n+/,""),c=c.replace(/\n+$/g,""),c="\n\n~K"+(K.push(c)-1)+"K\n\n"}function f(a,c){a=H.preBlockGamut(a,M),a=n(a);var d="<hr />\n";return a=a.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,d),a=a.replace(/^[ ]{0,2}([ ]?-[ ]?){3,}[ \t]*$/gm,d),a=a.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm,d),a=o(a),a=q(a),a=v(a),a=H.postBlockGamut(a,M),a=b(a),a=w(a,c)}function g(a){return a=H.preSpanGamut(a),a=s(a),a=h(a),a=y(a),a=k(a),a=i(a),a=A(a),a=a.replace(/~P/g,"://"),a=x(a),a=u(a),a=a.replace(/ +\n/g," <br>\n"),a=H.postSpanGamut(a)}function h(a){var b=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--(?:|(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>)/gi;return a=a.replace(b,function(a){var b=a.replace(/(.)<\/?code>(?=.)/g,"$1`");return b=F(b,"!"==a.charAt(1)?"\\`*_/":"\\`*_")})}function i(a){return a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,j),a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?((?:\([^)]*\)|[^()\s])*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,j),a=a.replace(/(\[([^\[\]]+)\])()()()()()/g,j)}function j(a,b,c,d,e,f,g,h){void 0==h&&(h="");var i=b,j=c.replace(/:\/\//g,"~P"),k=d.toLowerCase(),m=e,n=h;if(""==m)if(""==k&&(k=j.toLowerCase().replace(/ ?\n/g," ")),m="#"+k,void 0!=I.get(k))m=I.get(k),void 0!=J.get(k)&&(n=J.get(k));else{if(!(i.search(/\(\s*\)$/m)>-1))return i;m=""}m=E(m),m=F(m,"*_");var o='<a href="'+m+'"';return""!=n&&(n=l(n),n=F(n,"*_"),o+=' title="'+n+'"'),o+=">"+j+"</a>"}function k(a){return a=a.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,m),a=a.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,m)}function l(a){return a.replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}function m(a,b,c,d,e,f,g,h){var i=b,j=c,k=d.toLowerCase(),m=e,n=h;if(n||(n=""),""==m){if(""==k&&(k=j.toLowerCase().replace(/ ?\n/g," ")),m="#"+k,void 0==I.get(k))return i;m=I.get(k),void 0!=J.get(k)&&(n=J.get(k))}j=F(l(j),"*_[]()"),m=F(m,"*_");var o='<img src="'+m+'" alt="'+j+'"';return n=l(n),n=F(n,"*_"),o+=' title="'+n+'"',o+=" />"}function n(a){return a=a.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(a,b){return"<h1>"+g(b)+"</h1>\n\n"}),a=a.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(a,b){return"<h2>"+g(b)+"</h2>\n\n"}),a=a.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(a,b,c){var d=b.length;return"<h"+d+">"+g(c)+"</h"+d+">\n\n"})}function o(a,b){a+="~0";var c=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return L?a=a.replace(c,function(a,c,d){var e=c,f=d.search(/[*+-]/g)>-1?"ul":"ol",g=p(e,f,b);return g=g.replace(/\s+$/,""),g="<"+f+">"+g+"</"+f+">\n"}):(c=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g,a=a.replace(c,function(a,b,c,d){var e=b,f=c,g=d.search(/[*+-]/g)>-1?"ul":"ol",h=p(f,g);return h=e+"<"+g+">\n"+h+"</"+g+">\n"})),a=a.replace(/~0/,"")}function p(a,b,c){L++,a=a.replace(/\n{2,}$/,"\n"),a+="~0";var d=N[b],e=new RegExp("(^[ \\t]*)("+d+")[ \\t]+([^\\r]+?(\\n+))(?=(~0|\\1("+d+")[ \\t]+))","gm"),h=!1;return a=a.replace(e,function(a,b,d,e){var i=e,j=/\n\n$/.test(i),k=j||i.search(/\n{2,}/)>-1;return k||h?i=f(C(i),!0):(i=o(C(i),!0),i=i.replace(/\n$/,""),c||(i=g(i))),h=j,"<li>"+i+"</li>\n"}),a=a.replace(/~0/g,""),L--,a}function q(a){return a+="~0",a=a.replace(/(?:\n\n|^\n?)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(a,b,c){var d=b,e=c;return d=t(C(d)),d=D(d),d=d.replace(/^\n+/g,""),d=d.replace(/\n+$/g,""),d="<pre><code>"+d+"\n</code></pre>","\n\n"+d+"\n\n"+e}),a=a.replace(/~0/,"")}function r(a){return a=a.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(K.push(a)-1)+"K\n\n"}function s(a){return a=a.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(a,b,c,d){var e=d;return e=e.replace(/^([ \t]*)/g,""),e=e.replace(/[ \t]*$/g,""),e=t(e),e=e.replace(/:\/\//g,"~P"),b+"<code>"+e+"</code>"})}function t(a){return a=a.replace(/&/g,"&amp;"),a=a.replace(/</g,"&lt;"),a=a.replace(/>/g,"&gt;"),a=F(a,"*_{}[]\\",!1)}function u(a){return a=a.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g,"$1<strong>$3</strong>$4"),a=a.replace(/([\W_]|^)(\*|_)(?=\S)([^\r\*_]*?\S)\2([\W_]|$)/g,"$1<em>$3</em>$4")}function v(a){return a=a.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(a,b){var c=b;return c=c.replace(/^[ \t]*>[ \t]?/gm,"~0"),c=c.replace(/~0/g,""),c=c.replace(/^[ \t]+$/gm,""),c=f(c),c=c.replace(/(^|\n)/g,"$1 "),c=c.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(a,b){var c=b;return c=c.replace(/^ /gm,"~0"),c=c.replace(/~0/g,"")}),r("<blockquote>\n"+c+"\n</blockquote>")})}function w(a,b){a=a.replace(/^\n+/g,""),a=a.replace(/\n+$/g,"");for(var c=a.split(/\n{2,}/g),d=[],e=/~K(\d+)K/,f=c.length,h=0;f>h;h++){var i=c[h];e.test(i)?d.push(i):/\S/.test(i)&&(i=g(i),i=i.replace(/^([ \t]*)/g,"<p>"),i+="</p>",d.push(i))}if(!b){f=d.length;for(var h=0;f>h;h++)for(var j=!0;j;)j=!1,d[h]=d[h].replace(/~K(\d+)K/g,function(a,b){return j=!0,K[b]})}return d.join("\n\n")}function x(a){return a=a.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;"),a=a.replace(/<(?![a-z\/?!]|~D)/gi,"&lt;")}function y(a){return a=a.replace(/\\(\\)/g,G),a=a.replace(/\\([`*_{}\[\]()>#+-.!])/g,G)}function z(a,b,c,d){if(b)return a;if(")"!==d.charAt(d.length-1))return"<"+c+d+">";for(var e=d.match(/[()]/g),f=0,g=0;g<e.length;g++)"("===e[g]?0>=f?f=1:f++:f--;var h="";if(0>f){var i=new RegExp("\\){1,"+-f+"}$");d=d.replace(i,function(a){return h=a,""})}if(h){var j=d.charAt(d.length-1);R.test(j)||(h=j+h,d=d.substr(0,d.length-1))}return"<"+c+d+">"+h}function A(a){a=a.replace(Q,z);var b=function(a,b){return'<a href="'+b+'">'+H.plainLinkText(b)+"</a>"};return a=a.replace(/<((https?|ftp):[^'">\s]+)>/gi,b)}function B(a){return a=a.replace(/~E(\d+)E/g,function(a,b){var c=parseInt(b);return String.fromCharCode(c)})}function C(a){return a=a.replace(/^(\t|[ ]{1,4})/gm,"~0"),a=a.replace(/~0/g,"")}function D(a){if(!/\t/.test(a))return a;var b,c=[" "," "," "," "],d=0;return a.replace(/[\n\t]/g,function(a,e){return"\n"===a?(d=e+1,a):(b=(e-d)%4,d=e+1,c[b])})}function E(a){if(!a)return"";var b=a.length;return a.replace(S,function(c,d){return"~D"==c?"%24":":"!=c||d!=b-1&&!/[0-9\/]/.test(a.charAt(d+1))?"%"+c.charCodeAt(0).toString(16):":"})}function F(a,b,c){var d="(["+b.replace(/([\[\]\\])/g,"\\$1")+"])";c&&(d="\\\\"+d);var e=new RegExp(d,"g");return a=a.replace(e,G)}function G(a,b){var c=b.charCodeAt(0);return"~E"+c+"E"}var H=this.hooks=new c;H.addNoop("plainLinkText"),H.addNoop("preConversion"),H.addNoop("postNormalization"),H.addNoop("preBlockGamut"),H.addNoop("postBlockGamut"),H.addNoop("preSpanGamut"),H.addNoop("postSpanGamut"),H.addNoop("postConversion");var I,J,K,L;this.makeHtml=function(c){if(I)throw new Error("Recursive call to converter.makeHtml");return I=new d,J=new d,K=[],L=0,c=H.preConversion(c),c=c.replace(/~/g,"~T"),c=c.replace(/\$/g,"~D"),c=c.replace(/\r\n/g,"\n"),c=c.replace(/\r/g,"\n"),c="\n\n"+c+"\n\n",c=D(c),c=c.replace(/^[ \t]+$/gm,""),c=H.postNormalization(c),c=b(c),c=a(c),c=f(c),c=B(c),c=c.replace(/~D/g,"$$"),c=c.replace(/~T/g,"~"),c=H.postConversion(c),K=J=I=null,c};var M=function(a){return f(a)},N={ol:"\\d+[.]",ul:"[*+-]"},O="[-A-Z0-9+&@#/%?=~_|[\\]()!:,.;]",P="[-A-Z0-9+&@#/%=~_|[\\])]",Q=new RegExp('(="|<)?\\b(https?|ftp)(://'+O+"*"+P+")(?=$|\\W)","gi"),R=new RegExp(P,"i"),S=/(?:["'*()[\]:]|~D)/g}}(),jQuery.fn.sticky=function(a){var b=this,c=a||b.offset().top;return jQuery(window).scroll(function(){b.hasScrolledPast()&&b.css({position:"fixed",top:"0px"}).addClass("stuck"),c>b.offset().top&&b.css({position:"absolute",top:c+"px"}).removeClass("stuck")}),b.parent().css("position","relative"),this},jQuery.fn.hasScrolledPast=function(){return this.offset().top<=jQuery(window).scrollTop()},jQuery.fn.scrollTo=function(a){a=a||800,$("html, body").animate({scrollTop:$(this).offset().top},a)},function(){var a=function(a,b){var c=[];for(var d in a)a.hasOwnProperty(d)&&c.push(b(a[d],d));return c},b=function(a,b,c){for(var d in a)a.hasOwnProperty(d)&&(c=b(c,a[d],d));return c},c=function(){var a={};for(var b in arguments){var c=arguments[b];for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}return a},d=function(a,b,d,e){d=d||function(){},e=c(a.toJSON(),e);var f={fetch:"GET",save:a.id?"PUT":"POST",destroy:"DELETE"},g=function(c){return a.set(c),a.trigger(b,a),d(void 0,c)};return a.trigger("before:"+b,a),a.URL?($.ajax({url:a.URL()+(a.id?"/"+a.id:""),type:f[b],data:e,error:function(b){return a.trigger("error",a,b.responseText),d(b.responseText)},success:function(a){return g(a),this}}),void 0):g(e)};xo={},xo.elementWrapper=$||function(a){return a},xo.view=Archetype.extend({view:void 0,schematic:void 0,initialize:function(a){return this.model=a,this.dom={},this.view&&this.once("created",this.appendTo.bind(this)),this},prependTo:function(a){return this.appendTo(a,!0)},appendTo:function(a,b){if(a.length&&(a=a[0]),this.schematic){var c;if("string"==typeof this.schematic){if(c=document.querySelector('[xo-schematic="'+this.schematic+'"]'),!c)throw'xo-view: Could not find schematic with name "'+this.schematic+'"';c=c.cloneNode(!0),c.removeAttribute("xo-schematic")}else c=this.schematic;this.dom.view=c.cloneNode(!0),b?a.insertBefore(this.dom.view,a.firstChild):a.appendChild(this.dom.view)}if(this.view&&(this.dom.view=document.querySelector('[xo-view="'+this.view+'"]'),!this.dom.view))throw"xo-view: Could not find view with name "+this.view;for(var d=this.dom.view.querySelectorAll("[xo-element]"),e=0;e<d.length;e++)this.dom[d[e].getAttribute("xo-element")]=xo.elementWrapper(d[e]);return this.dom.view=xo.elementWrapper(this.dom.view),this.render(),this.trigger("render"),this},remove:function(){return this.trigger("remove"),this.dom.view&&this.dom.view.remove(),this.off(),this},render:function(){return this}}),xo.model=Archetype.extend({URL:void 0,initialize:function(a){return this.set(a),this.on("destroy",this.off),this},set:function(a,b){var c={};c[a]=b;var d=!1;"object"==typeof a&&(c=a);for(var a in c){var e=c[a];this[a]!==e&&(this[a]=e,d=!0,this.trigger("change:"+a,e))}return d&&this.trigger("change"),this},onChange:function(a,b){if("object"==typeof a){for(var c in a)this.onChange(c,a[c]);return this}return this.on("change:"+a,b),b(this[a]),this},toJSON:function(){return JSON.parse(JSON.stringify(this))},save:function(a,b){return"function"==typeof a&&(b=a),d(this,"save",b,a),this},fetch:function(a){return d(this,"fetch",a),this},destroy:function(a){return d(this,"destroy",a),this}}),xo.collection=Archetype.extend({URL:void 0,model:xo.model,models:[],initialize:function(a){return this.set(a),this.URL=this.model.URL||this.URL,this.model.URL=this.model.URL||this.URL,this},set:function(a){this.models=[];for(var b in a)this.add(a[b]);return this},get:function(a){return b(this.models,function(b,c){return c.id===a&&(b=c),b})},remove:function(a){id=a.id||a;for(var b in this.models)id==this.models[b].id&&(this.trigger("remove",this.models[b]),this.models.splice(b,1));return this},add:function(a){return this.model.isPrototypeOf(a)||(a=this.model.create(a)),a.on("destroy",function(a){this.remove(a)}.bind(this)),this.models.push(a),this.trigger("add",a),a},each:function(b){return a(this.models,b)},toJSON:function(){return JSON.parse(JSON.stringify(this.models))},fetch:function(a){return d(this,"fetch",a),this},destroy:function(b){var c=this.models.length,d=this;return d.trigger("before:destroy"),a(this.models,function(a){a.destroy(function(){0===--c&&(d.trigger("destroy"),b&&b())})}),this},save:function(b){var c=this.models.length,d=this;return d.trigger("before:save"),a(this.models,function(a){a.save(function(){0===--c&&(d.trigger("save"),b&&b())})}),this}}),xo.router=Archetype.extend({routes:{},initialize:function(b){return a(b,function(a,b){this.add(b,a)}.bind(this)),window.addEventListener("hashchange",this.route),window.addEventListener("load",this.route),this},navigate:function(a){return window.location.hash=a,this},add:function(a,b){return a=a.replace("*","(.*?)").replace(/(\(\?)?:\w+/g,"([^/]+)")+"$",this.routes[a]=b,this},route:function(){var a=location.hash.slice(1)||"";for(var b in this.routes){var c=new RegExp(b).exec(a);c&&this.routes[b].apply(this,c.slice(1))}}})}(),CodeBlockComponent=xo.view.extend({schematic:DOM.div({"class":"codeblock"},DOM.div({"xo-element":"editor"}),DOM.div({"class":"codeblock__output","xo-element":"outputContainer",style:"display:none"},DOM.div({"xo-element":"output"}),DOM.div({"xo-element":"outputError","class":"codeblock__output__errorText",style:"display:none"})),DOM.div({"class":"codeblock__runButton btn green","xo-element":"runButton"},"Run"),DOM.div({style:"clear:both"})),render:function(a,b,c){var d=this;this.id="codeblock"+b,this.projectData=c,this.dom={view:$(this.schematic.cloneNode(!0))};for(var e=this.dom.view.find("[xo-element]"),f=0;f<e.length;f++)this.dom[e[f].getAttribute("xo-element")]=xo.elementWrapper(e[f]);return this.code=a.text(),"<"===this.code[0]&&(this.isHtml=!0),a.parent().replaceWith(this.dom.view),this.editor=CodeMirror(function(a){d.dom.editor[0].parentNode.replaceChild(a,d.dom.editor[0])},{value:d.code,mode:d.isHtml?"htmlmixed":"javascript",viewportMargin:1/0,lineNumbers:!0,matchBrackets:!0,tabMode:"indent"}),this.editor.setValue(this.code),setTimeout(function(){this.editor.refresh()}.bind(this),10),!this.projectData.runnable_code_blocks||this.isHtml?(this.dom.runButton.hide(),this.dom.outputContainer.hide(),this):(this.dom.runButton.click(function(){d.executeCodeBlock()}),this)},setExampleCode:function(a){return this.htmlExample=a,this},executeCodeBlock:function(){var self=this;this.dom.outputContainer.hide(),this.htmlExample?this.createExampleHtml(jQuery("<div>").append(this.htmlExample.editor.getValue())):this.createExampleHtml(jQuery("<div>"));try{eval('(function(){var example = $("#'+self.id+'");'+self.editor.getValue()+"})();")}catch(e){self.dom.outputContainer.show(),self.dom.output.hide(),self.dom.outputError.html(e.toString()).show()}return this},createExampleHtml:function(a){return this.projectData.show_html_example?(this.dom.output.replaceWith(a),this.dom.output=a,this.dom.output.show().attr("id",this.id),this.dom.outputError.hide(),this.dom.outputContainer.show(),this):this}}),IconComponent=xo.view.extend({schematic:DOM.a({target:"_blank","class":"project__icon card btn hint--bottom"},DOM.i({"xo-element":"iconElement"})),render:function(){return this.model.link&&("function"==typeof this.model.link?this.dom.view.attr("href",this.model.link()):this.dom.view.attr("href",this.model.link)),this.model.tooltip&&this.dom.view.attr("data-hint",this.model.tooltip),this.model.color&&this.dom.view.addClass(this.model.color),this.model.icon_class&&this.dom.iconElement.addClass(this.model.icon_class),this}}),SidebarView=xo.view.extend({view:"sideBar",render:function(){var a=this;return this.dom.view.sticky(150),this.dom.logo.click(function(){$("body").scrollTo()}),this.dom.logo.mouseover(function(){a.dom.view.hasClass("stuck")&&(a.dom.logoIcon.hide(),a.dom.logoUp.show())}).mouseout(function(){a.dom.logoIcon.show(),a.dom.logoUp.hide()}),this.dom.logo.addClass(this.model.icon_color),this.dom.logoIcon.addClass(this.model.icon_class),this},addNavItem:function(a,b,c){var d=$("<div></div>").appendTo(this.dom.nav);return d.addClass("sideBar__nav__item").addClass(c).html(a).click(function(){b.scrollTo()}),$(window).scroll(function(){b.hasScrolledPast()?d.addClass("scrolled"):d.removeClass("scrolled")}),this}});var _=_||{map:function(a,b){var c=[];for(var d in a)a.hasOwnProperty(d)&&c.push(b(a[d],d));return c}};Paintjob=xo.view.extend({view:"paintjob",render:function(){var a=this;return this.projectData=this.model,this.dom.spinner.hide(),this.projectData.local&&(_.map(["user","repo","description"],function(b){a.projectData[b]=a.projectData[b]||a.projectData.local[b]}),a.projectData.name=a.projectData.local.name||a.projectData.name),this.dom.name.html(this.projectData.name),this.dom.description.html(this.projectData.description),this.sidebar=SidebarView.create(this.projectData),this.projectData.scripts&&this.fetchScripts(this.projectData.scripts),FontAwesomeFavicon(this.projectData.icon_class),document.title=this.projectData.name,this.fetchScripts(),this.buildDocumentation(this.projectData.readme),this.buildCodeBlocks(),this.buildNav(),this.buildIcons(),this.buildExample(),this},fetchScripts:function(){for(var a in this.projectData.scripts)$.ajax({url:this.projectData.urls.scripts+this.projectData.scripts[a],type:"GET",headers:{Accept:"application/vnd.github.raw"},success:function(a){a.content&&(a=Base64.decode(a.content));var b=document.createElement("script");b.type="text/javascript",b.appendChild(document.createTextNode(a)),b.text=a,document.body.appendChild(b)}});return this},buildDocumentation:function(a){var b=(new Markdown.Converter).makeHtml(a);return b=b.replace(/<h1>/g,'</div><div class="docblock"><h1>'),b=b.substring(b.indexOf('<div class="docblock"><h1>')),this.dom.documentation.html(b+"</div>"),this},buildCodeBlocks:function(){var a,b=this;return this.dom.documentation.find("pre code").each(function(c,d){var e=CodeBlockComponent.create().render($(d),c,b.projectData);e.isHtml?a=e:a&&e.setExampleCode(a)}),this},buildNav:function(){var a=this,b=["teal","orange","green","blue","red","purple","steel","yellow"];return this.dom.documentation.find(".docblock").each(function(c,d){var d=$(d),e=b[c%b.length];d.addClass(e),a.sidebar.addNavItem(d.find("h1").html(),d,e)}),this},buildExample:function(){return this.projectData.example_image&&this.dom.example.attr("src",this.projectData.example_image),this},buildIcons:function(){var a=this;return _.map(this.projectData.icons,function(b){IconComponent.create(b).appendTo(a.dom.iconContainer)}),this}});
</script>
<!--
3  paintjob/js/paintjob.js
View
@@ -20,9 +20,10 @@ Paintjob = xo.view.extend({
if(this.projectData.local){
- _.map(['user','repo','name','description'], function(prop){
+ _.map(['user','repo','description'], function(prop){
self.projectData[prop] = self.projectData[prop] || self.projectData.local[prop];
});
+ self.projectData.name = self.projectData.local.name || self.projectData.name;
}
this.dom.name.html(this.projectData.name);
Please sign in to comment.
Something went wrong with that request. Please try again.