/* Mithril v0.1.9 http://github.com/lhorie/mithril.js (c) Leo Horie License: MIT */ Mithril=m=new function(a){function b(){var a=arguments,b="[object Object]"==u.call(a[1]),c=b?a[1]:{},d="class"in c?"class":"className",e=t[a[0]];if(void 0===e){t[a[0]]=e={tag:"div",attrs:{}};for(var f,h=[];f=v.exec(a[0]);)if(""==f[1])e.tag=f[2];else if("#"==f[1])e.attrs.id=f[2];else if("."==f[1])h.push(f[2]);else if("["==f[3][0]){var i=w.exec(f[3]);e.attrs[i[1]]=i[3]||!0}h.length>0&&(e.attrs[d]=h.join(" "))}e=g(e),e.attrs=g(e.attrs),e.children=b?a[2]:a[1];for(var j in c)e.attrs[j]=j==d?(e.attrs[j]||"")+" "+c[j]:c[j];return e}function c(b,g,h,i,j,k){if(null===g||void 0===g)return void(h&&e(h.nodes));if("retain"!==g.subtree){var l=u.call(h),m=u.call(g);if(l!=m&&(null!==h&&void 0!==h&&e(h.nodes),h=new g.constructor,h.nodes=[]),"[object Array]"==m){for(var n=[],o=h.length===g.length,p=0,q=0,r=0;q-1?new g.constructor(g):g,h.nodes=[t];else if(h.valueOf()!==g.valueOf()||i===!0){if(g.$trusted){var w=h.nodes[0],n=[w];if(w){for(;w=w.nextSibling;)n.push(w);e(n),t=f(b,j,g)}else b.innerHTML=g}else t=h.nodes[0],b.insertBefore(t,b.childNodes[j]||null),t.nodeValue=g;h=new g.constructor(g),h.nodes=[t]}else h.nodes.intact=!0}return h}}function d(b,c,d,e){for(var f in c){var g=c[f],i=d[f];if(!(f in d)||i!==g||b===a.document.activeElement){if(d[f]=g,"config"===f)continue;if("function"==typeof g&&0==f.indexOf("on"))b[f]=h(g,b);else if("style"===f)for(var j in g)(void 0===i||i[j]!==g[j])&&(b.style[j]=g[j]);else void 0!==e?"href"===f?b.setAttributeNS("http://www.w3.org/1999/xlink","href",g):"className"===f?b.setAttribute("class",g):b.setAttribute(f,g):f in b?b[f]=g:b.setAttribute(f,g)}}return d}function e(a){for(var b=0;b16)b.redraw();else{var c=a.cancelAnimationFrame||a.clearTimeout,d=a.requestAnimationFrame||a.setTimeout;c(F),F=d(b.redraw,0)}}function j(a,c,d){K={};for(var e in c){if(e==d)return!void b.module(a,c[e]);var f=new RegExp("^"+e.replace(/:[^\/]+/g,"([^\\/]+)")+"$");if(f.test(d))return!void d.replace(f,function(){for(var d=e.match(/:[^\/]+/g),f=[].slice.call(arguments,1,-2),g=0;g0&&("GET"==a.method?a.url=a.url+(a.url.indexOf("?")<0?"?":"&")+o(b):a.data=c(b)),a}function q(a,b){var c=a.match(/:[a-z]\w+/gi);if(c&&b)for(var d=0;de?y.push(b)-1:e,g=b==a.document||b==a.document.documentElement?x:b;z[f]=c(g,d,z[f],!1,0)},b.trust=function(a){return a=new String(a),a.$trusted=!0,a};var A=[],B=[],C=[],D=0,E=0,F=0;b.module=function(a,c){b.startComputation();var d=A.indexOf(a);0>d&&(d=A.length),A[d]=a,B[d]=c,C[d]=new c.controller,b.endComputation()},b.redraw=function(){for(var a=0;a