text: var Absurd=function(){var a={api:{},helpers:{},plugins:{},processors:{css:{plugins:{}},html:{plugins:{},helpers:{}},component:{plugins:{}}},ki:{}},b=function(a,b){!function c(){a.length>0&&a.shift().apply(b||{},[c].concat(Array.prototype.slice.call(arguments,0)))}()},d=function(a,b){var c;try{c=(b||document).querySelectorAll(a)}catch(d){c=document.querySelectorAll(a)}return c},e=function(a){var b=document.createElement("div");return b.innerHTML=a,b.childNodes[0]},f=function(a,b,c){return a.addEventListener?(a.addEventListener(b,c,!1),!0):a.attachEvent?a.attachEvent("on"+b,c):void 0},g=function(a){for(var b,c=a.childNodes,d=c.length,e=0,f=/^\s*$/;d>e;e++)b=c[e],3==b.nodeType?f.test(b.nodeValue)&&(a.removeChild(b),e--,d--):1==b.nodeType&&g(b);return a},h=function(b){return b.indexOf("css/CSS.js")>0?a.processors.css.CSS:b.indexOf("html/HTML.js")>0?a.processors.html.HTML:b.indexOf("component/Component.js")>0?a.processors.component.Component:"js-beautify"==b?{html:function(a){return a}}:"./helpers/PropAnalyzer"==b?a.processors.html.helpers.PropAnalyzer:"../../helpers/TransformUppercase"==b?a.helpers.TransformUppercase:"./helpers/TemplateEngine"==b?a.processors.html.helpers.TemplateEngine:"../helpers/Extend"==b?a.helpers.Extend:"../helpers/Clone"==b?a.helpers.Clone:function(){}},i="",j=function(){var a=[];return{on:function(b,c){return a[b]||(a[b]=[]),a[b].push(c),this},off:function(b,c){return a[b]?(c||(a[b]=[]),this):this},dispatch:function(b,c){if(a[b])for(var d=0;d<a[b].length;d++){var e=a[b][d];e(c)}return this[b]&&"function"==typeof this[b]&&this[b](c),this}}},k=function(c,h){var i=!1,j=!1,k=!1,l=a.helpers.Extend,m={},n=!1,o={events:{}},p=function(a){this.css?h.flush().add(this.css).compile(function(b,e){if(i)i.raw!==e&&(i.raw=e,i.element.innerHTML=e);else{var f=document.createElement("style");f.setAttribute("id",c+"-css"),f.setAttribute("type","text/css"),f.innerHTML=e,(d("head")||d("body"))[0].appendChild(f),i={raw:e,element:f}}a()}):a()},q=function(a){if(this.html)if("string"==typeof this.html){if(k===!1){var b=d(this.html);b.length>0&&(k=b[0]),j={"":k.outerHTML.replace(/&lt;/g,"<").replace(/&gt;/g,">")}}a()}else"object"==typeof this.html?(j=l({},this.html),k===!1?h.flush().morph("html").add(j).compile(function(b,c){k=e(c),a()},this):a()):a();else a()},r=function(a){j?h.flush().morph("html").add(j).compile(function(b,c){!function d(b,c){if("undefined"!=typeof b&&"undefined"!=typeof c&&!b.isEqualNode(c)){if(b.nodeName!==c.nodeName)return b.parentNode&&b.parentNode.replaceChild(c,b),a(),void 0;if(b.nodeValue!==c.nodeValue&&(b.nodeValue=c.nodeValue),b.attributes){for(var e,f,g=b.attributes,h=c.attributes,i={},j=0;j<g.length,e=g[j];j++){for(var k=0;k<h.length,f=h[k];k++)e.name===f.name&&(b.setAttribute(e.name,f.value),i[e.name]=!0);i[e.name]||b.removeAttribute(e.name)}for(var j=0;j<h.length,f=h[j];j++)i[f.name]||b.setAttribute(f.name,f.value)}if(b.childNodes.length>=c.childNodes.length)for(var j=0;j<b.childNodes.length;j++)c.childNodes[j]||c.appendChild(document.createTextNode("")),d(b.childNodes[j],c.childNodes[j]);else for(var j=0;j<c.childNodes.length;j++)b.appendChild(document.createTextNode("")),d(b.childNodes[j],c.childNodes[j])}}(g(k),g(e(c))),a()},this):a()},s=function(a){!n&&k&&this.get("parent")&&(n=!0,this.get("parent").appendChild(k)),a()},t=function(a){if(k){var b=this,c=function(a){var c=a.getAttribute("data-absurd-event");c=c.split(":"),c.length>=2&&(!o.events[c[0]]||o.events[c[0]].indexOf(a)<0)&&(o.events[c[0]]||(o.events[c[0]]=[]),o.events[c[0]].push(a),f(a,c[0],function(a){"function"==typeof b[c[1]]&&b[c[1]](a)}))};k.hasAttribute("data-absurd-event")&&c(k);for(var d=k.querySelectorAll?k.querySelectorAll("[data-absurd-event]"):[],e=0;e<d.length;e++)c(d[e])}a()},u={populate:function(a){b([p,q,r,s,t,function(){var b={css:i,html:{element:k}};this.dispatch("populated",b),a&&"function"==typeof a.callback&&a.callback(b)}],this)},set:function(a,b){return m[a]=b,this},get:function(a){return m[a]}};return u},l=function(b){var c={},d={},e=a.helpers.Extend;return c.register=function(a,c){return d[a]=e({},j(),k(a,b),c)},c.get=function(a){if(d[a])return d[a];throw new Error("There is no component with name '"+a+"'.")},c.remove=function(a){return d[a]?(delete d[a],!0):!1},c.list=function(){var a=[];for(var b in d)a.push(b);return a},c.flush=function(){return d={},c},c.broadcast=function(a){for(var b in d)d[b].dispatch(a);return c},c},m=function(){return function(b){var d=function(a,b){for(var c in b)hasOwnProperty.call(b,c)&&(a[c]=b[c]);return a},e={defaultProcessor:a.processors.css.CSS()},f={},g={},h={},i={};e.getRules=function(a){return"undefined"==typeof a?f:("undefined"==typeof f[a]&&(f[a]=[]),f[a])},e.getPlugins=function(){return h},e.getStorage=function(){return g},e.flush=function(){return f={},g=[],i={},e.defaultProcessor=a.processors.css.CSS(),e},e.import=function(){return e.callHooks("import",arguments)?e:e},e.addHook=function(a,b){i[a]||(i[a]=[]);for(var d=!1,e=0;c=i[a][e];e++)c===b&&(d=!0);d===!1?i[a].push(b):null},e.callHooks=function(a,b){if(i[a])for(var d=0;c=i[a][d];d++)if(c.apply(e,b)===!0)return!0;return!1},e.numOfAddedRules=0,e.components=l(e),e.compile=function(a,b){if(e.callHooks("compile",arguments))return e;var c={combineSelectors:!0,minify:!1,processor:e.defaultProcessor,keepCamelCase:!1,api:e};b=d(c,b||{}),b.processor(e.getRules(),a||function(){},b),e.flush()};for(var j in a.api)"compile"!==j&&(e[j]=a.api[j](e),e[j]=function(b){return function(){var c=a.api[b](e);return e.callHooks(b,arguments)?e:c.apply(e,arguments)}}(j));for(var k in a.plugins)e.plugin(k,a.plugins[k]());return"function"==typeof b&&b(e),e}};a.api.add=function(a){var b=(h("../helpers/Extend"),h("../helpers/Clone"),[]),c=function(b,c,e,f,g){var h=a.getPlugins()[c];if("undefined"!=typeof h){var i=h(a,e);return i&&d(b,i,f,g),!0}return!1},d=function(a,e,f,g){if(f=f||"mainstream",/, ?/g.test(a))for(var h=a.replace(/, /g,",").split(","),i=0;i<h.length,p=h[i];i++)d(p,e,f,g);else if("undefined"==typeof e.length||"object"!=typeof e){if(!c(null,a,e,f,g)){var j={},k=a,l={},m={};for(var n in e){var o=typeof e[n];"object"!==o&&"function"!==o?c(a,n,e[n],f,g)===!1&&(k="undefined"!=typeof g?g+" "+a:a,j[n]=e[n]):"object"===o?l[n]=e[n]:"function"===o&&(m[n]=e[n])}b.push({selector:k,props:j,stylesheet:f});for(var n in l)":"===n.charAt(0)?d(a+n,l[n],f,g):/&/g.test(n)?d(n.replace(/&/g,a),l[n],f,g):0===n.indexOf("@media")||0===n.indexOf("@supports")?d(a,l[n],n,g):0===a.indexOf("@media")||0===n.indexOf("@supports")?d(n,l[n],a,g):c(a,n,l[n],f,g)===!1&&d(n,l[n],f,(g?g+" ":"")+a);for(var n in m){var q={};q[n]=m[n](),d(a,q,f,g)}}}else for(var i=0;i<e.length,n=e[i];i++)d(a,n,f,g)},e=function(c,e){b=[],a.numOfAddedRules+=1;for(var f in c)d(f,c[f],e||"mainstream");for(var g=0;g<b.length;g++){var e=b[g].stylesheet,f=b[g].selector,h=b[g].props,i=a.getRules(e);if("object"==typeof i[f]){var j=i[f];for(var k in h)"object"!=typeof h[k]&&(j[k]=h[k])}else i[f]=h}return a};return e};var n=h("../helpers/Extend");a.api.compile=function(a){return function(){for(var b=null,c=null,d=null,e=0;e<arguments.length;e++)switch(typeof arguments[e]){case"function":c=arguments[e];break;case"string":b=arguments[e];break;case"object":d=arguments[e]}var f={combineSelectors:!0,minify:!1,keepCamelCase:!1,processor:a.defaultProcessor,api:a};d=n(f,d||{}),d.processor(a.getRules(),function(d,e){if(null!=b)try{s.writeFile(b,e,function(a){c(a,e)})}catch(d){c.apply({},arguments)}else c.apply({},arguments);a.flush()},d)}},a.api.compileFile=function(a){return a.compile};var q=function(a,b){a=String(a).replace(/[^0-9a-f]/gi,""),a.length<6&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),b=b||0;var c,d,e="#";for(d=0;3>d;d++)c=parseInt(a.substr(2*d,2),16),c=Math.round(Math.min(Math.max(0,c+c*b),255)).toString(16),e+=("00"+c).substr(c.length);return e};a.api.darken=function(){return function(a,b){return q(a,-(b/100))}},a.api.hook=function(a){return function(b,c){return a.addHook(b,c),a}};var q=function(a,b){a=String(a).replace(/[^0-9a-f]/gi,""),a.length<6&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),b=b||0;var c,d,e="#";for(d=0;3>d;d++)c=parseInt(a.substr(2*d,2),16),c=Math.round(Math.min(Math.max(0,c+c*b),255)).toString(16),e+=("00"+c).substr(c.length);return e};a.api.lighten=function(){return function(a,b){return q(a,b/100)}};var r={html:function(a){a.defaultProcessor=h(i+"/../processors/html/HTML.js")(),a.hook("add",function(b,c){return a.getRules(c||"mainstream").push(b),!0})},component:function(a){a.defaultProcessor=h(i+"/../processors/component/Component.js")(),a.hook("add",function(b){b instanceof Array||(b=[b]);for(var d=0;d<b.length,c=b[d];d++)a.getRules("mainstream").push(c);return!0})}};a.api.morph=function(a){return function(b){return r[b]&&(a.flush(),r[b](a)),a}},a.api.plugin=function(a){var b=function(b,c){return a.getPlugins()[b]=c,a};return b},a.api.raw=function(a){return function(b){var c={},d={},e="____raw_"+a.numOfAddedRules;return d[e]=b,c[e]=d,a.add(c),a}};{var s=h("fs");h("path")}a.api.rawImport=function(a){var b=function(b){var c=s.readFileSync(b,{encoding:"utf8"});a.raw(c)};return function(c){var d,e,f;if("string"==typeof c)b(c);else for(e=0,f=c.length;f>e;e++)d=c[e],b(d);return a}},a.api.register=function(a){return function(b,c){return a[b]=c,a}},a.api.storage=function(a){var b=a.getStorage(),c=function(d,e){if("undefined"!=typeof e)b[d]=e;else{if("object"!=typeof d){if(b[d])return b[d];throw new Error("There is no data in the storage associated with '"+d+"'")}for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&c(f,d[f])}return a};return c},a.helpers.Clone=function J(a){function b(a,b,c){var d,e,f={};for(d in b)e=b[d],d in a&&(a[d]===e||d in f&&f[d]===e)||(a[d]=c?c(e):e);return a}if(!a||"object"!=typeof a||"[object Function]"===Object.prototype.toString.call(a))return a;if(a.nodeType&&"cloneNode"in a)return a.cloneNode(!0);if(a instanceof Date)return new Date(a.getTime());if(a instanceof RegExp)return new RegExp(a);var c,d,e;if(a instanceof Array)for(c=[],d=0,e=a.length;e>d;++d)d in a&&c.push(J(a[d]));else c=a.constructor?new a.constructor:{};return b(c,a,J)},a.helpers.ColorLuminance=function(a,b){a=String(a).replace(/[^0-9a-f]/gi,""),a.length<6&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),b=b||0;var c,d,e="#";for(d=0;3>d;d++)c=parseInt(a.substr(2*d,2),16),c=Math.round(Math.min(Math.max(0,c+c*b),255)).toString(16),e+=("00"+c).substr(c.length);return e},a.helpers.Extend=function(){for(var a=function(a,b){for(var c in b)hasOwnProperty.call(b,c)&&(a[c]=b[c]);return a},b=arguments[0],c=1;c<arguments.length;c++)b=a(b,arguments[c]);return b},a.helpers.RequireUncached=function(a){return delete h.cache[h.resolve(a)],h(a)},a.helpers.TransformUppercase=function(a,b){for(var d="",e=0;c=a.charAt(e);e++)d+=b&&b.keepCamelCase===!0?c:c===c.toUpperCase()&&c.toLowerCase()!==c.toUpperCase()?"-"+c.toLowerCase():c;return d};var t=function(a,b,d){var e="",f="",g=[],j=d.api;cssPreprocessor=h(i+"/../css/CSS.js")(),htmlPreprocessor=h(i+"/../html/HTML.js")();for(var k=function(a){for(var b=0;b<g.length,component=g[b];b++)"function"==typeof component&&(component=component()),j.add(component.css?component.css:{});cssPreprocessor(j.getRules(),function(b,c){e+=c,a(b)},d)},l=function(b){var c=0,e=null,g=function(){if(c>a.length-1)return b(e),void 0;var h=a[c];"function"==typeof h&&(h=h()),j.morph("html").add(h.html?h.html:{}),htmlPreprocessor(j.getRules(),function(a,b){f+=b,c+=1,e=a,g()},d)};g()},m=function(a){for(var b in a)if("_include"===b)if(a[b]instanceof Array)for(var d=0;d<a[b].length,c=a[b][d];d++)"function"==typeof c&&(c=c()),g.push(c),m(c);else"function"==typeof a[b]&&(a[b]=a[b]()),g.push(a[b]),m(a[b]);else"object"==typeof a[b]&&m(a[b])},n=0;n<a.length,c=a[n];n++)"function"==typeof c&&(c=c()),g.push(c),m(c);j.flush(),k(function(a){j.morph("html"),l(function(c){b(a||c?{error:{css:a,html:c}}:null,e,f)})})};a.processors.component.Component=function(){var a=function(a,b,c){t(a.mainstream,b,c)};return a.type="component",a};var u="\n",w={combineSelectors:!0,minify:!1,keepCamelCase:!1},x=h("../../helpers/TransformUppercase"),y=function(a,b){var c="";for(var d in a)if(0===d.indexOf("____raw"))c+=a[d][d]+u;else{var e=d+" {"+u;for(var f in a[d]){var g=a[d][f];""===g&&(g='""'),e+="  "+x(f,b)+": "+g+";"+u}e+="}"+u,c+=e}return c},z=function(a){var b={};for(var c in a){var d=!1,e={};for(var f in a[c]){var g=a[c][f];g!==!1&&"object"!=typeof g&&(d=!0,e[f]=g)}d&&(b[c]=e)}return b},A=function(a){var b={},c={};for(var d in a){var e=a[d];for(var f in e){var g=e[f];b[f]||(b[f]={}),b[f][g]||(b[f][g]=[]),b[f][g].push(d)}}for(var f in b){var h=b[f];for(var g in h){var i=h[g];c[i.join(", ")]||(c[i.join(", ")]={});var d=c[i.join(", ")];d[f]=g}}return c},B=function(a){return a=a.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,""),a=a.replace(/ {2,}/g," "),a=a.replace(/ ([{:}]) /g,"$1"),a=a.replace(/([;,]) /g,"$1"),a=a.replace(/ !/g,"!")};a.processors.css.CSS=function(){var a=function(a,b,c){c=c||w;var d="";for(var e in a){var f=z(a[e]);f=c.combineSelectors?A(f):f,d+="mainstream"===e?y(f,c):e+" {"+u+y(f,c)+"}"+u}return c.minify?(d=B(d),b&&b(null,d)):b&&b(null,d),d};return a.type="css",a},a.processors.css.plugins.charset=function(){return function(a,b){"string"==typeof b?a.raw('@charset: "'+b+'";'):"object"==typeof b&&(b=b.charset.replace(/:/g,"").replace(/'/g,"").replace(/"/g,"").replace(/ /g,""),a.raw('@charset: "'+b+'";'))}},a.processors.css.plugins.document=function(){return function(a,b){if("object"==typeof b){var c="";if(c+="@"+b.vendor+"document",c+=" "+b.document,b.rules&&b.rules.length)for(var d=0;rule=b.rules[d];d++)a.handlecssrule(rule,c);else"undefined"!=typeof b.styles&&a.add(b.styles,c)}}},a.processors.css.plugins.keyframes=function(){return function(a,b){var c=h(i+"/../CSS.js")();if("object"==typeof b)if("undefined"!=typeof b.frames){var d="@keyframes "+b.name+" {\n";d+=c({mainstream:b.frames}),d+="}",a.raw(d+"\n"+d.replace("@keyframes","@-webkit-keyframes"))}else if("undefined"!=typeof b.keyframes){for(var d="@keyframes "+b.name+" {\n",e={},f=0;rule=b.keyframes[f];f++)if("keyframe"===rule.type)for(var g=e[rule.values]={},j=0;declaration=rule.declarations[j];j++)"declaration"===declaration.type&&(g[declaration.property]=declaration.value);d+=c({mainstream:e}),d+="}",a.raw(d+"\n"+d.replace("@keyframes","@-webkit-keyframes"))}}},a.processors.css.plugins.media=function(){return function(a,b){var c=h(i+"/../CSS.js")();if("object"==typeof b){for(var d="@media "+b.media+" {\n",e={},f=0;rule=b.rules[f];f++){var g=e[rule.selectors.toString()]={};if("rule"===rule.type)for(var j=0;declaration=rule.declarations[j];j++)"declaration"===declaration.type&&(g[declaration.property]=declaration.value)}d+=c({mainstream:e}),d+="}",a.raw(d)}}},a.processors.css.plugins.namespace=function(){return function(a,b){"string"==typeof b?a.raw('@namespace: "'+b+'";'):"object"==typeof b&&(b=b.namespace.replace(/: /g,"").replace(/'/g,"").replace(/"/g,"").replace(/ /g,"").replace(/:h/g,"h"),a.raw('@namespace: "'+b+'";'))}},a.processors.css.plugins.page=function(){return function(a,b){if("object"==typeof b){var c="";c+=b.selectors.length>0?"@page "+b.selectors.join(", ")+" {\n":"@page {\n";for(var d=0;declaration=b.declarations[d];d++)"declaration"==declaration.type&&(c+="  "+declaration.property+": "+declaration.value+";\n");c+="}",a.raw(c)}}},a.processors.css.plugins.supports=function(){return function(a,b){var c=h(i+"/../CSS.js")();if("object"==typeof b){for(var d="@supports "+b.supports+" {\n",e={},f=0;rule=b.rules[f];f++){var g=e[rule.selectors.toString()]={};if("rule"===rule.type)for(var j=0;declaration=rule.declarations[j];j++)"declaration"===declaration.type&&(g[declaration.property]=declaration.value)}d+=c({mainstream:e}),d+="}",a.raw(d)}}};var C=null,u="\n",w={},D=h("js-beautify").html,x=h("../../helpers/TransformUppercase"),E={},F=function(a){var b="";for(var c in C)if(c==a)for(var d=C[c].length,e=0;d>e;e++)b+=G("",C[c][e]);return b},G=function(a,b){var c="",d="",e="",f=h("./helpers/PropAnalyzer")(a);if(a=f.tag,""!=f.attrs&&(d+=" "+f.attrs),"string"==typeof b)return H(a,d,b);var g=function(a){""!=e&&(e+=u),e+=a};for(var i in b){var j=b[i];switch(i){case"_attrs":for(var k in j)d+="function"==typeof j[k]?" "+x(k,E)+'="'+j[k]()+'"':" "+x(k,E)+'="'+j[k]+'"';b[i]=!1;break;case"_":g(j),b[i]=!1;break;case"_tpl":if("string"==typeof j)g(F(j));else if(j instanceof Array){for(var l="",m=0;tpl=j[m];m++)l+=F(tpl),m<j.length-1&&(l+=u);g(l)}b[i]=!1;break;case"_include":var l="",n=function(a){"function"==typeof a&&(a=a()),a.css&&a.html&&(a=a.html),l+=G("",a)};if(j instanceof Array)for(var m=0;m<j.length,o=j[m];m++)n(o);else"object"==typeof j&&n(j);g(l),b[i]=!1}}for(var p in b){var j=b[p];if(j!==!1){var q=p;switch(typeof j){case"string":g(G(q,j));break;case"object":if(j.length&&j.length>0){for(var l="",m=0;v=j[m];m++)l+=G("","function"==typeof v?v():v),m<j.length-1&&(l+=u);g(G(q,l))}else g(G(q,j));break;case"function":g(G(q,j()))}}}return c+=""!=a?H(a,d,e):e},H=function(a,b,c){var d="";return""==a&&""==b&&""!=c?c:(a=""==a?"div":a,d+=""!==c?"<"+x(a,E)+b+">"+u+c+u+"</"+x(a,E)+">":"<"+x(a,E)+b+"/>")},I=function(a){return a=h("./helpers/TemplateEngine")(a.replace(/[\r\t\n]/g,""),E),E.minify?a:D(a,{indent_size:E.indentSize||4})};return a.processors.html.HTML=function(){var a=function(a,b,c){C=a,b=b||function(){},c=E=c||w;var d=I(F("mainstream"));return b(null,d),d};return a.type="html",a},a.processors.html.helpers.PropAnalyzer=function(a){for(var b={tag:"",attrs:""},d=(a.length,""),e=!1,f=[],g="",h=!1,i="",j=!1,k=0;c=a[k];k++)"["!==c||j?j?"]"!=c?i+=c:(j=!1,k-=1):"."!==c||e?e?"."!=c&&"#"!=c&&"["!=c&&"]"!=c?d+=c:(f.push(d),e=!1,d="",k-=1):"#"!==c||h?h?"."!=c&&"#"!=c&&"["!=c&&"]"!=c?g+=c:(h=!1,k-=1):"."!=c&&"#"!=c&&"["!=c&&"]"!=c&&(b.tag+=c):h=!0:e=!0:j=!0;""!=d&&f.push(d);for(var l="",k=0;cls=f[k];k++)l+=""===l?cls:" "+cls;return b.attrs+=""!=l?'class="'+l+'"':"",""!=g&&(b.attrs+=(""!=b.attrs?" ":"")+'id="'+g+'"'),""===b.tag&&""!=b.attrs&&(b.tag="div"),""!=i&&(b.attrs+=(""!=b.attrs?" ":"")+i),b},a.processors.html.helpers.TemplateEngine=function(a,b){for(var c=/<%(.+?)%>/g,d=/(^( )?(if|for|else|switch|case|break|{|}))(.*)?/g,e="var r=[];\n",f=0,g=function(a,b){return e+=b?a.match(d)?a+"\n":"r.push("+a+");\n":""!=a?'r.push("'+a.replace(/"/g,'\\"')+'");\n':"",g};match=c.exec(a);)g(a.slice(f,match.index))(match[1],!0),f=match.index+match[0].length;return g(a.substr(f,a.length-f)),e+='return r.join("");',new Function(e.replace(/[\r\t\n]/g,"")).apply(b)},m()}(window);