(function(){function g(a){throw a;}var i=void 0,j=!0,k=null,l=!1,n,o=this;function aa(){}
function ba(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function q(a){return a!==i}function r(a){return"array"==ba(a)}function s(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function ca(a){return"number"==typeof a}function u(a){return"function"==ba(a)}function x(a){var b=typeof a;return"object"==b&&a!=k||"function"==b}function y(a){return a[da]||(a[da]=++ea)}
var da="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),ea=0;function fa(a,b,c){return a.call.apply(a.bind,arguments)}function ga(a,b,c){a||g(Error());if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}
function z(a,b,c){z=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?fa:ga;return z.apply(k,arguments)}var ha=Date.now||function(){return+new Date};function A(a,b){function c(){}c.prototype=b.prototype;a.d=b.prototype;a.prototype=new c;a.prototype.constructor=a};function ia(){}ia.prototype.ob=l;ia.prototype.o=function(){this.ob||(this.ob=j,this.j())};ia.prototype.j=function(){this.Tb&&ja.apply(k,this.Tb)};function ja(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];s(d)?ja.apply(k,d):d&&"function"==typeof d.o&&d.o()}};function ka(a,b){for(var c=1;c<arguments.length;c++)var d=(""+arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}function la(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}var ma=/^[a-zA-Z0-9\-_.!~*'()]*$/;function na(a){if(!oa.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(pa,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(qa,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(ra,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(sa,"&quot;"));return a}var pa=/&/g,qa=/</g,ra=/>/g,sa=/\"/g,oa=/[&<>\"]/;var B=Array.prototype,C=B.indexOf?function(a,b,c){return B.indexOf.call(a,b,c)}:function(a,b,c){c=c==k?0:0>c?Math.max(0,a.length+c):c;if(t(a))return!t(b)||1!=b.length?-1:a.indexOf(b,c);for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},D=B.forEach?function(a,b,c){B.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=t(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},ta=B.filter?function(a,b,c){return B.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,h=t(a)?a.split(""):
a,m=0;m<d;m++)if(m in h){var p=h[m];b.call(c,p,m,a)&&(e[f++]=p)}return e},E=B.map?function(a,b,c){return B.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=t(a)?a.split(""):a,h=0;h<d;h++)h in f&&(e[h]=b.call(c,f[h],h,a));return e};function ua(a,b,c){var d={};if(a.reduce)return c?a.reduce(z(b,c),d):a.reduce(b,d);var e=d;D(a,function(d,h){e=b.call(c,e,d,h,a)});return e}
var va=B.some?function(a,b,c){return B.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=t(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return j;return l};function wa(a,b){var c=xa(a,b);return 0>c?k:t(a)?a.charAt(c):a[c]}function xa(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(i,d[e],e,a))return e;return-1}function ya(a,b){for(var c=t(a)?a.split(""):a,d=a.length-1;0<=d;d--)if(d in c&&b.call(i,c[d],d,a))return d;return-1}
function za(a,b){0<=C(a,b)||a.push(b)}function Aa(a,b,c){Ba(a,c,0,b)}function Ca(a,b){var c=C(a,b);0<=c&&B.splice.call(a,c,1)}function F(a,b){var c=xa(a,b);return 0<=c?(B.splice.call(a,c,1),j):l}function Da(a){return B.concat.apply(B,arguments)}function G(a){if(r(a))return Da(a);for(var b=[],c=0,d=a.length;c<d;c++)b[c]=a[c];return b}
function Ea(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c],e;if(r(d)||(e=s(d))&&d.hasOwnProperty("callee"))a.push.apply(a,d);else if(e)for(var f=a.length,h=d.length,m=0;m<h;m++)a[f+m]=d[m];else a.push(d)}}function Ba(a,b,c,d){B.splice.apply(a,H(arguments,1))}function H(a,b,c){return 2>=arguments.length?B.slice.call(a,b):B.slice.call(a,b,c)}
function Fa(a){for(var b={},c=0,d=0;d<a.length;){var e=a[d++],f=x(e)?"o"+y(e):(typeof e).charAt(0)+e;Object.prototype.hasOwnProperty.call(b,f)||(b[f]=j,a[c++]=e)}a.length=c}function Ga(a,b){if(!s(a)||!s(b)||a.length!=b.length)return l;for(var c=a.length,d=Ha,e=0;e<c;e++)if(!d(a[e],b[e]))return l;return j}function Ha(a,b){return a===b}function Ia(a){for(var b=[],c=0;c<arguments.length;c++){var d=arguments[c];r(d)?b.push.apply(b,Ia.apply(k,d)):b.push(d)}return b};var Ja,Ka,La,Ma;function Na(){return o.navigator?o.navigator.userAgent:k}function Oa(){return o.navigator}Ma=La=Ka=Ja=l;var Pa;if(Pa=Na()){var Qa=Oa();Ja=0==Pa.indexOf("Opera");Ka=!Ja&&-1!=Pa.indexOf("MSIE");(La=!Ja&&-1!=Pa.indexOf("WebKit"))&&Pa.indexOf("Mobile");Ma=!Ja&&!La&&"Gecko"==Qa.product}var Ra=Ja,I=Ka,J=Ma,L=La,Ta,Ua=Oa();Ta=Ua&&Ua.platform||"";Ta.indexOf("Mac");Ta.indexOf("Win");Ta.indexOf("Linux");Oa()&&(Oa().appVersion||"").indexOf("X11");var Va;
a:{var Wa="",Xa;if(Ra&&o.opera)var Ya=o.opera.version,Wa="function"==typeof Ya?Ya():Ya;else if(J?Xa=/rv\:([^\);]+)(\)|;)/:I?Xa=/MSIE\s+([^\);]+)(\)|;)/:L&&(Xa=/WebKit\/(\S+)/),Xa)var Za=Xa.exec(Na()),Wa=Za?Za[1]:"";if(I){var $a,ab=o.document;$a=ab?ab.documentMode:i;if($a>parseFloat(Wa)){Va=""+$a;break a}}Va=Wa}var bb={};
function M(a){var b;if(!(b=bb[a])){b=0;for(var c=la(""+Va).split("."),d=la(""+a).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var h=c[f]||"",m=d[f]||"",p=RegExp("(\\d*)(\\D*)","g"),v=RegExp("(\\d*)(\\D*)","g");do{var K=p.exec(h)||["","",""],w=v.exec(m)||["","",""];if(0==K[0].length&&0==w[0].length)break;b=((0==K[1].length?0:parseInt(K[1],10))<(0==w[1].length?0:parseInt(w[1],10))?-1:(0==K[1].length?0:parseInt(K[1],10))>(0==w[1].length?0:parseInt(w[1],10))?1:0)||((0==K[2].length)<(0==
w[2].length)?-1:(0==K[2].length)>(0==w[2].length)?1:0)||(K[2]<w[2]?-1:K[2]>w[2]?1:0)}while(0==b)}b=bb[a]=0<=b}return b}var cb={};function db(){return cb[9]||(cb[9]=I&&!!document.documentMode&&9<=document.documentMode)};!I||db();var eb=!I||db();I&&M("8");!L||M("528");J&&M("1.9b")||I&&M("8")||Ra&&M("9.5")||L&&M("528");!J||M("8");function O(a,b){this.type=a;this.currentTarget=this.target=b}A(O,ia);O.prototype.j=function(){delete this.type;delete this.target;delete this.currentTarget};O.prototype.H=l;O.prototype.za=j;O.prototype.stopPropagation=function(){this.H=j};function fb(a){fb[" "](a);return a}fb[" "]=aa;function gb(a,b){a&&this.ta(a,b)}A(gb,O);n=gb.prototype;n.target=k;n.relatedTarget=k;n.offsetX=0;n.offsetY=0;n.clientX=0;n.clientY=0;n.screenX=0;n.screenY=0;n.button=0;n.keyCode=0;n.charCode=0;n.ctrlKey=l;n.altKey=l;n.shiftKey=l;n.metaKey=l;n.Q=k;
n.ta=function(a,b){var c=this.type=a.type;O.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(J){var e;a:{try{fb(d.nodeName);e=j;break a}catch(f){}e=l}e||(d=k)}}else"mouseover"==c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);this.relatedTarget=d;this.offsetX=L||a.offsetX!==i?a.offsetX:a.layerX;this.offsetY=L||a.offsetY!==i?a.offsetY:a.layerY;this.clientX=a.clientX!==i?a.clientX:a.pageX;this.clientY=a.clientY!==i?a.clientY:a.pageY;this.screenX=a.screenX||
0;this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.state=a.state;this.Q=a;delete this.za;delete this.H};n.stopPropagation=function(){gb.d.stopPropagation.call(this);this.Q.stopPropagation?this.Q.stopPropagation():this.Q.cancelBubble=j};
n.j=function(){gb.d.j.call(this);this.relatedTarget=this.currentTarget=this.target=this.Q=k};function hb(){}var ib=0;n=hb.prototype;n.key=0;n.W=l;n.kb=l;n.ta=function(a,b,c,d,e,f){u(a)?this.sb=j:a&&a.handleEvent&&u(a.handleEvent)?this.sb=l:g(Error("Invalid listener argument"));this.fa=a;this.wb=b;this.src=c;this.type=d;this.capture=!!e;this.ba=f;this.kb=l;this.key=++ib;this.W=l};n.handleEvent=function(a){return this.sb?this.fa.call(this.ba||this.src,a):this.fa.handleEvent.call(this.fa,a)};function P(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function jb(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d}function kb(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function lb(a,b){var c;(c=b in a)&&delete a[b];return c}function mb(a,b,c){b in a&&g(Error('The object already contains the key "'+b+'"'));a[b]=c}function nb(a,b,c){a[b]=c}function ob(a){var b={},c;for(c in a)b[c]=a[c];return b}
function pb(a){var b=ba(a);if("object"==b||"array"==b){if(a.Rb)return a.Rb();var b="array"==b?[]:{},c;for(c in a)b[c]=pb(a[c]);return b}return a}var qb="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");function rb(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<qb.length;f++)c=qb[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var sb={},Q={},R={},tb={};
function S(a,b,c,d,e){if(b){if(r(b)){for(var f=0;f<b.length;f++)S(a,b[f],c,d,e);return k}var d=!!d,h=Q;b in h||(h[b]={u:0,t:0});h=h[b];d in h||(h[d]={u:0,t:0},h.u++);var h=h[d],m=y(a),p;h.t++;if(h[m]){p=h[m];for(f=0;f<p.length;f++)if(h=p[f],h.fa==c&&h.ba==e){if(h.W)break;return p[f].key}}else p=h[m]=[],h.u++;f=ub();f.src=a;h=new hb;h.ta(c,f,a,b,d,e);c=h.key;f.key=c;p.push(h);sb[c]=h;R[m]||(R[m]=[]);R[m].push(h);a.addEventListener?(a==o||!a.nb)&&a.addEventListener(b,f,d):a.attachEvent(b in tb?tb[b]:
tb[b]="on"+b,f);return c}g(Error("Invalid event type"))}function ub(){var a=vb,b=eb?function(c){return a.call(b.src,b.key,c)}:function(c){c=a.call(b.src,b.key,c);if(!c)return c};return b}function wb(a,b,c,d,e){if(r(b))for(var f=0;f<b.length;f++)wb(a,b[f],c,d,e);else{d=!!d;a:{f=Q;if(b in f&&(f=f[b],d in f&&(f=f[d],a=y(a),f[a]))){a=f[a];break a}a=k}if(a)for(f=0;f<a.length;f++)if(a[f].fa==c&&a[f].capture==d&&a[f].ba==e){xb(a[f].key);break}}}
function xb(a){if(!sb[a])return l;var b=sb[a];if(b.W)return l;var c=b.src,d=b.type,e=b.wb,f=b.capture;c.removeEventListener?(c==o||!c.nb)&&c.removeEventListener(d,e,f):c.detachEvent&&c.detachEvent(d in tb?tb[d]:tb[d]="on"+d,e);c=y(c);e=Q[d][f][c];if(R[c]){var h=R[c];Ca(h,b);0==h.length&&delete R[c]}b.W=j;e.tb=j;yb(d,f,c,e);delete sb[a];return j}
function yb(a,b,c,d){if(!d.ua&&d.tb){for(var e=0,f=0;e<d.length;e++)d[e].W?d[e].wb.src=k:(e!=f&&(d[f]=d[e]),f++);d.length=f;d.tb=l;0==f&&(delete Q[a][b][c],Q[a][b].u--,0==Q[a][b].u&&(delete Q[a][b],Q[a].u--),0==Q[a].u&&delete Q[a])}}function zb(a){var b,c=0,d=b==k;b=!!b;if(a==k)P(R,function(a){for(var e=a.length-1;0<=e;e--){var f=a[e];if(d||b==f.capture)xb(f.key),c++}});else if(a=y(a),R[a])for(var a=R[a],e=a.length-1;0<=e;e--){var f=a[e];if(d||b==f.capture)xb(f.key),c++}}
function Ab(a,b,c,d,e){var f=1,b=y(b);if(a[b]){a.t--;a=a[b];a.ua?a.ua++:a.ua=1;try{for(var h=a.length,m=0;m<h;m++){var p=a[m];p&&!p.W&&(f&=Bb(p,e)!==l)}}finally{a.ua--,yb(c,d,b,a)}}return Boolean(f)}function Bb(a,b){var c=a.handleEvent(b);a.kb&&xb(a.key);return c}
function vb(a,b){if(!sb[a])return j;var c=sb[a],d=c.type,e=Q;if(!(d in e))return j;var e=e[d],f,h;if(!eb){var m;if(!(m=b))a:{m=["window","event"];for(var p=o;f=m.shift();)if(p[f]!=k)p=p[f];else{m=k;break a}m=p}f=m;m=j in e;p=l in e;if(m){if(0>f.keyCode||f.returnValue!=i)return j;a:{var v=l;if(0==f.keyCode)try{f.keyCode=-1;break a}catch(K){v=j}if(v||f.returnValue==i)f.returnValue=j}}v=new gb;v.ta(f,this);f=j;try{if(m){for(var w=[],Sa=v.currentTarget;Sa;Sa=Sa.parentNode)w.push(Sa);h=e[j];h.t=h.u;for(var N=
w.length-1;!v.H&&0<=N&&h.t;N--)v.currentTarget=w[N],f&=Ab(h,w[N],d,j,v);if(p){h=e[l];h.t=h.u;for(N=0;!v.H&&N<w.length&&h.t;N++)v.currentTarget=w[N],f&=Ab(h,w[N],d,l,v)}}else f=Bb(c,v)}finally{w&&(w.length=0),v.o()}return f}d=new gb(b,this);try{f=Bb(c,d)}finally{d.o()}return f};function T(){}A(T,ia);n=T.prototype;n.nb=j;n.wa=k;n.cb=function(a){this.wa=a};n.addEventListener=function(a,b,c,d){S(this,a,b,c,d)};n.removeEventListener=function(a,b,c,d){wb(this,a,b,c,d)};
n.dispatchEvent=function(a){var b=a.type||a,c=Q;if(b in c){if(t(a))a=new O(a,this);else if(a instanceof O)a.target=a.target||this;else{var d=a,a=new O(b,this);rb(a,d)}var d=1,e,c=c[b],b=j in c,f;if(b){e=[];for(f=this;f;f=f.wa)e.push(f);f=c[j];f.t=f.u;for(var h=e.length-1;!a.H&&0<=h&&f.t;h--)a.currentTarget=e[h],d&=Ab(f,e[h],a.type,j,a)&&a.za!=l}if(l in c)if(f=c[l],f.t=f.u,b)for(h=0;!a.H&&h<e.length&&f.t;h++)a.currentTarget=e[h],d&=Ab(f,e[h],a.type,l,a)&&a.za!=l;else for(e=this;!a.H&&e&&f.t;e=e.wa)a.currentTarget=
e,d&=Ab(f,e,a.type,l,a)&&a.za!=l;a=Boolean(d)}else a=j;return a};n.j=function(){T.d.j.call(this);zb(this);this.wa=k};function Cb(a,b){this.da=a||1;this.la=b||Db;this.Ka=z(this.kc,this);this.Ra=ha()}A(Cb,T);Cb.prototype.enabled=l;var Db=o.window;n=Cb.prototype;n.l=k;n.setInterval=function(a){this.da=a;this.l&&this.enabled?(this.stop(),this.start()):this.l&&this.stop()};n.kc=function(){if(this.enabled){var a=ha()-this.Ra;0<a&&a<0.8*this.da?this.l=this.la.setTimeout(this.Ka,this.da-a):(this.dispatchEvent(Eb),this.enabled&&(this.l=this.la.setTimeout(this.Ka,this.da),this.Ra=ha()))}};
n.start=function(){this.enabled=j;this.l||(this.l=this.la.setTimeout(this.Ka,this.da),this.Ra=ha())};n.stop=function(){this.enabled=l;this.l&&(this.la.clearTimeout(this.l),this.l=k)};n.j=function(){Cb.d.j.call(this);this.stop();delete this.la};var Eb="tick";var Fb,Gb=!I||db();!J&&!I||I&&db()||J&&M("1.9.1");I&&M("9");function Hb(a){return(a=a.className)&&"function"==typeof a.split?a.split(/\s+/):[]}function Ib(a,b){var c=Hb(a),d=H(arguments,1),e;e=c;for(var f=0,h=0;h<d.length;h++)0<=C(e,d[h])||(e.push(d[h]),f++);e=f==d.length;a.className=c.join(" ");return e}function Jb(a,b){for(var c=Hb(a),d=H(arguments,1),e=c,f=0,h=0;h<e.length;h++)0<=C(d,e[h])&&(Ba(e,h--,1),f++);a.className=c.join(" ")};function Kb(a){return a?new Lb(Mb(a)):Fb||(Fb=new Lb)}function Nb(a){return t(a)?document.getElementById(a):a}function Ob(a,b,c){return Pb(a,b,c)}function Qb(a,b){var c=b||document;return c.querySelectorAll&&c.querySelector&&(!L||"CSS1Compat"==document.compatMode||M("528"))?c.querySelectorAll("."+a):c.getElementsByClassName?c.getElementsByClassName(a):Pb("*",a,b)}
function Pb(a,b,c){c=c||document;a=a&&"*"!=a?a.toUpperCase():"";if(c.querySelectorAll&&c.querySelector&&(!L||"CSS1Compat"==document.compatMode||M("528"))&&(a||b))return c.querySelectorAll(a+(b?"."+b:""));if(b&&c.getElementsByClassName){c=c.getElementsByClassName(b);if(a){for(var d={},e=0,f=0,h;h=c[f];f++)a==h.nodeName&&(d[e++]=h);d.length=e;return d}return c}c=c.getElementsByTagName(a||"*");if(b){d={};for(f=e=0;h=c[f];f++)a=h.className,"function"==typeof a.split&&0<=C(a.split(/\s+/),b)&&(d[e++]=h);
d.length=e;return d}return c}function Rb(a,b){P(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in Sb?a.setAttribute(Sb[d],b):0==d.lastIndexOf("aria-",0)?a.setAttribute(d,b):a[d]=b})}var Sb={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder",maxlength:"maxLength",type:"type"};
function Tb(a,b,c,d){function e(c){c&&b.appendChild(t(c)?a.createTextNode(c):c)}for(;d<c.length;d++){var f=c[d];s(f)&&!(x(f)&&0<f.nodeType)?D(Ub(f)?G(f):f,e):e(f)}}function Vb(a){var b=document,c=b.createElement("div");I?(c.innerHTML="<br>"+a,c.removeChild(c.firstChild)):c.innerHTML=a;if(1==c.childNodes.length)return c.removeChild(c.firstChild);for(a=b.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);return a}function Wb(a,b){Tb(Mb(a),a,arguments,1)}
function Xb(a){for(var b;b=a.firstChild;)a.removeChild(b)}function Yb(a){a&&a.parentNode&&a.parentNode.removeChild(a)}function Zb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}function Mb(a){return 9==a.nodeType?a:a.ownerDocument||a.document}
function Ub(a){if(a&&"number"==typeof a.length){if(x(a))return"function"==typeof a.item||"string"==typeof a.item;if(u(a))return"function"==typeof a.item}return l}function Lb(a){this.P=a||o.document||document}n=Lb.prototype;n.v=function(a){return t(a)?this.P.getElementById(a):a};
n.O=function(a,b,c){var d=this.P,e=arguments,f=e[0],h=e[1];if(!Gb&&h&&(h.name||h.type)){f=["<",f];h.name&&f.push(' name="',na(h.name),'"');if(h.type){f.push(' type="',na(h.type),'"');var m={};rb(m,h);h=m;delete h.type}f.push(">");f=f.join("")}f=d.createElement(f);h&&(t(h)?f.className=h:r(h)?Ib.apply(k,[f].concat(h)):Rb(f,h));2<e.length&&Tb(d,f,e,2);return f};n.createElement=function(a){return this.P.createElement(a)};n.createTextNode=function(a){return this.P.createTextNode(a)};
n.appendChild=function(a,b){a.appendChild(b)};n.contains=Zb;function $b(a){this.Wb=a;this.Qa=[]}A($b,ia);var ac=[];function bc(a,b,c,d,e){r(c)||(ac[0]=c,c=ac);for(var f=0;f<c.length;f++)a.Qa.push(S(b,c[f],d||a,e||l,a.Wb||a));return a}function cc(a){D(a.Qa,xb);a.Qa.length=0}$b.prototype.j=function(){$b.d.j.call(this);cc(this)};$b.prototype.handleEvent=function(){g(Error("EventHandler.handleEvent not implemented"))};function dc(){O.call(this,"navigate")}A(dc,O);function U(a,b,c,d){a&&!b&&g(Error("Can't use invisible history without providing a blank page."));var e;c?e=c:(e="history_state"+ec,document.write(ka(fc,e,e)),e=Nb(e));this.ra=e;this.i=c?Mb(c)?Mb(c).parentWindow||Mb(c).defaultView:window:window;this.Kb=this.i.location.href.split("#")[0];this.sa=b;I&&!b&&(this.sa="https"==window.location.protocol?"https:///":'javascript:""');this.l=new Cb(gc);this.Y=!a;this.J=new $b(this);if(a||I&&!hc)d?a=d:(a="history_iframe"+ec,b=this.sa?'src="'+na(this.sa)+'"':
"",document.write(ka(ic,a,b)),a=Nb(a)),this.T=a,this.Fb=j;I&&!hc&&(bc(this.J,this.i,"load",this.dc),this.Cb=this.Pa=l);this.Y?jc(this,this.z(),j):kc(this,this.ra.value);ec++}A(U,T);U.prototype.B=l;U.prototype.U=l;U.prototype.ea=k;var hc=I&&8<=document.documentMode||J&&M("1.9.2")||L&&M("532.1");n=U.prototype;n.ga=k;n.j=function(){U.d.j.call(this);this.J.o();this.X(l)};
n.X=function(a){if(a!=this.B)if(I&&!hc&&!this.Pa)this.Cb=a;else if(a)if(Ra?bc(this.J,this.i.document,lc,this.gc):J&&bc(this.J,this.i,"pageshow",this.fc),hc&&this.Y)bc(this.J,this.i,"hashchange",this.ec),this.B=j,this.dispatchEvent(new dc(this.z()));else{if(!I||this.Pa)bc(this.J,this.l,Eb,z(this.Pb,this,j)),this.B=j,I||(this.ea=this.z()),this.l.start(),this.dispatchEvent(new dc(this.z()))}else this.B=l,cc(this.J),this.l.stop()};n.dc=function(){this.Pa=j;this.ra.value&&kc(this,this.ra.value,j);this.X(this.Cb)};
n.fc=function(a){a.Q.persisted&&(this.X(l),this.X(j))};n.ec=function(){var a=mc(this.i);a!=this.ea&&nc(this,a)};n.z=function(){return this.ga!=k?this.ga:this.Y?mc(this.i):oc(this)||""};function mc(a){var a=a.location.href,b=a.indexOf("#");return 0>b?"":a.substring(b+1)}function jc(a,b,c){var d=a.i.location,a=a.Kb,e=-1!=d.href.indexOf("#");if(I||e||b)a+="#"+b;a!=d.href&&(c?d.replace(a):d.href=a)}
function kc(a,b,c){if(a.Fb||b!=oc(a))if(a.Fb=l,b=""+b,b=!ma.test(b)?encodeURIComponent(b):b,I){var d=a.T.contentDocument||a.T.contentWindow.document;d.open("text/html",c?"replace":i);d.write(ka(pc,na(a.i.document.title),b));d.close()}else if(b=a.sa+"#"+b,a=a.T.contentWindow)c?a.location.replace(b):a.location.href=b}
function oc(a){if(I)return a=a.T.contentDocument||a.T.contentWindow.document,a.body?decodeURIComponent(a.body.innerHTML.replace(/\+/g," ")):k;var b=a.T.contentWindow;if(b){var c;try{var d=mc(b);c=decodeURIComponent(d.replace(/\+/g," "))}catch(e){return a.U||(a.U!=j&&a.l.setInterval(qc),a.U=j),k}a.U&&(a.U!=l&&a.l.setInterval(gc),a.U=l);return c||k}return k}
n.Pb=function(){if(this.Y){var a=mc(this.i);a!=this.ea&&nc(this,a)}if(!this.Y||I&&!hc)if(a=oc(this)||"",this.ga==k||a==this.ga)this.ga=k,a!=this.ea&&nc(this,a)};function nc(a,b){a.ea=a.ra.value=b;a.Y?(I&&!hc&&kc(a,b),jc(a,b)):kc(a,b);a.dispatchEvent(new dc(a.z()))}n.gc=function(){this.l.stop();this.l.start()};
var lc=["mousedown","keydown","mousemove"],pc="<title>%s</title><body>%s</body>",ic='<iframe id="%s" style="display:none" %s></iframe>',fc='<input type="text" name="%s" id="%s" style="display:none">',ec=0,gc=150,qc=1E4;function rc(a,b){this.i=a||window;this.Db=b||k;S(this.i,"popstate",this.V,l,this);S(this.i,"hashchange",this.V,l,this)}A(rc,T);n=rc.prototype;n.B=l;n.Da=j;n.vb="/";n.X=function(a){a!=this.B&&(this.B=a)&&this.dispatchEvent(new dc(this.z()))};n.z=function(){if(this.Da){var a=this.i.location.href,b=a.indexOf("#");return 0>b?"":a.substring(b+1)}return this.Db?this.Db.qc(this.vb,this.i.location):this.i.location.pathname.substr(this.vb.length)};
n.j=function(){wb(this.i,"popstate",this.V,l,this);this.Da&&wb(this.i,"hashchange",this.V,l,this)};n.Bb=function(a){this.Da!=a&&(a?S(this.i,"hashchange",this.V,l,this):wb(this.i,"hashchange",this.V,l,this),this.Da=a)};n.V=function(){this.B&&this.dispatchEvent(new dc(this.z()))};function sc(a,b,c,d){var e=window;this.ca=e.history&&e.history.pushState?new rc:new U(!(!b||!a),b,c,d);this.ca.Bb&&this.ca.Bb(!a);S(this.ca,"navigate",this.cc,l,this);this.yb=[];this.qa="";this.ca.X(j)}A(sc,T);
sc.prototype.ja=function(a,b,c){t(a)&&(a=RegExp("^"+(""+a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08").replace(/\\:\w+/g,"(\\w+)").replace(/\\\*/g,"(.*)").replace(/\\\[/g,"(").replace(/\\\]/g,")?").replace(/\\\{/g,"(?:").replace(/\\\}/g,")?")+"$"));a={ja:a,Ob:b,Sb:c};tc(a,this.qa);this.yb.push(a)};function tc(a,b){var c=a.ja.exec(b);c&&a.Ob.apply(a.Sb,c)}
sc.prototype.cc=function(){var a=this.ca.z();a!=this.qa&&(this.dispatchEvent({type:"routeExpired",pc:this.qa,nc:a}),this.qa=a,D(this.yb||[],function(b){tc(b,a)},this))};function uc(){}(function(a){a.pb=function(){return a.Zb||(a.Zb=new a)}})(uc);uc.prototype.ac=0;uc.pb();function vc(a){this.aa=a||Kb()}A(vc,T);n=vc.prototype;n.Xb=uc.pb();n.S=k;n.g=l;n.f=k;n.c=k;n.s=k;n.b=k;n.m=k;n.Gb=l;function wc(a){return a.S||(a.S=":"+(a.Xb.ac++).toString(36))}n.v=function(){return this.f};n.ab=function(a){this.f=a};function xc(a,b){a==b&&g(Error("Unable to set parent component"));b&&a.s&&a.S&&a.s.m&&a.S&&a.S in a.s.m&&a.s.m[a.S]&&a.s!=b&&g(Error("Unable to set parent component"));a.s=b;vc.d.cb.call(a,b)}n.getParent=function(){return this.s};
n.cb=function(a){this.s&&this.s!=a&&g(Error("Method not supported"));vc.d.cb.call(this,a)};n.O=function(){this.f=this.aa.createElement("div")};function yc(a,b,c){a.g&&g(Error("Component already rendered"));a.f||a.O();b?b.insertBefore(a.f,c||k):a.aa.P.body.appendChild(a.f);(!a.s||a.s.g)&&a.C()}n.C=function(){this.g=j;zc(this,function(a){!a.g&&a.v()&&a.C()})};function Ac(a){zc(a,function(a){a.g&&Ac(a)});a.R&&cc(a.R);a.g=l}
n.j=function(){vc.d.j.call(this);this.g&&Ac(this);this.R&&(this.R.o(),delete this.R);zc(this,function(a){a.o()});!this.Gb&&this.f&&Yb(this.f);this.s=this.c=this.f=this.m=this.b=k};n.bb=function(a){this.c=a};
n.Z=function(a,b,c){a.g&&(c||!this.g)&&g(Error("Component already rendered"));(0>b||b>(this.b?this.b.length:0))&&g(Error("Child component index out of bounds"));if(!this.m||!this.b)this.m={},this.b=[];a.getParent()==this?(this.m[wc(a)]=a,Ca(this.b,a)):mb(this.m,wc(a),a);xc(a,this);Aa(this.b,a,b);a.g&&this.g&&a.getParent()==this?(c=this.D(),c.insertBefore(a.v(),c.childNodes[b]||k)):c?(this.f||this.O(),b=this.b?this.b[b+1]||k:k,yc(a,this.D(),b?b.f:k)):this.g&&!a.g&&a.f&&a.C()};n.D=function(){return this.f};
function zc(a,b){a.b&&D(a.b,b,i)}n.removeChild=function(a,b){if(a){var c=t(a)?a:wc(a),a=this.m&&c?(c in this.m?this.m[c]:i)||k:k;c&&a&&(lb(this.m,c),Ca(this.b,a),b&&(Ac(a),a.f&&Yb(a.f)),xc(a,k))}a||g(Error("Child is not in parent component"));return a};function V(a){V.d.constructor.apply(this,H(arguments,1));this.r={Sa:{},F:{}};this.ia=[];this.na=[];this.bb(a);this.xa=this.pa=k}A(V,vc);n=V.prototype;n.ab=function(a){V.d.ab.call(this,a);this.pa||(this.pa=a)};n.D=function(){return this.pa||V.d.D.call(this)};
n.bb=function(a,b){this.c&&D(E(this.ia,function(a){return a.id}),this.Eb,this);V.d.bb.call(this,a);D(this.ia,function(a){var d=a.K.apply(this,a.Hb);a.bound=d;a.k=d.k;a.a=z(this.a,this,d.id);a.id=d.id;!b&&!(0<=C([this.gb,this.ib,this.jb],a.K))&&a.k()},this)};n.remove=function(){Yb(this.v());this.o()};
n.Ub=function(a,b){this.r.F[a]&&D(this.r.F[a],function(a){if(!b.H&&(!a.zb.length||va(a.zb,function(a){if(u(a))return a(b);if(a=wa(W(this,a),function(a){return Zb(a,b.target)}))b.target=a;return a},this)))a.K.call(a.ba,b),a.stop&&b.stopPropagation()},this)};
function Bc(a,b,c,d,e,f,h){var m=["blur","focus"];a.r||(a.r={Sa:{},F:{}});a.r.F[b]||(a.r.F[b]=[]);a.r.Sa[b]||(a.r.Sa[b]=bc(a.R||(a.R=new $b(a)),a.v(),b,z(a.Ub,a,b),0<=C(m,b)));q(d)||(d=[]);d={zb:r(d)?d:[d],K:c,Ca:k,ba:e||a,hc:f||50,stop:h};d.Ca=y(d);Aa(a.r.F[b],d,ya(a.r.F[b],function(a){return a.hc<=(f||50)})+1);var p={k:z(function(a){var d=this.v();a&&(d=a);c.call(e||this,new O(b,d));return p},a),id:d.Ca,Wa:z(a.Wa,a,d.Ca)};return p}n.click=function(a,b,c,d,e){return Bc(this,"click",a,b,c,d,e)};
n.Wa=function(a){x(a)&&a.id&&(a=a.id);P(this.r.F,function(b){F(b,function(b){return b.Ca==a})})};function W(a,b){var c;c=c||a.v();if(!b)return[c];if(r(b))return c=Ia(E(b,function(a){return W(this,a)},a)),Fa(c),c;"-"==b.charAt(0)&&(b="."+b.substring(1));return"."==b.charAt(0)?Qb(b.substring(1),c)||[]:"#"==b.charAt(0)?[Nb(b.substring(1))]:G(Ob(la(b.replace(/\..*/,"")),0<b.indexOf(".")?b.replace(/.*\./,""):k,c))}function Cc(a){var b=Dc,c=Nb("todo-list");c&&(a.pa=c);return a.Ta(z(a.Jb,a,b,i)).k()}
n.Jb=function(a,b){var c=this.c.w(),d=this.b||[],e=E(d,function(a){return a.c}),f=ta(d,function(a){return!(0<=C(c,a.c))});0==d.length?D(c,function(b){this.Z(new a(b),this.b?this.b.length:0,j)},this):(D(f,function(a){this.removeChild(a,j);a.o()},this),D(c,function(b,c){if(0<=C(e,b))f=wa(d,function(a){return a.c==b}),(this.b?this.b[c]||k:k)!=f&&this.Z(f,c);else{var f=new a(b);f.O();this.Z(f,c,j)}},this));b&&b.call(this,this.D())};
n.Ib=function(a,b){var c=H(arguments,2)[0];if(a.M){var d={};a.data&&P(a.data,function(a,b){d[b]=u(a)?a(this):b},this);d.n=this.c.get(a.e);var e=a.M(d);D(W(this,b),function(a){"INPUT"==a.tagName&&"checkbox"!=a.getAttribute("type")?a.value!=e&&(a.value=e):"SELECT"==a.tagName?D(a.options,function(a){a.selected=a.value==e}):(Xb(a),Wb(a,Vb(e)))},this)}D(W(this,b),function(b){"INPUT"==b.tagName&&"checkbox"==b.getAttribute("type")&&(b.checked=this.c.get(a.e[0]))},this);if(q(a.Xa)){var f=a.Xa;D(W(this,b),
function(b){var d=f;c?Ib(b,d):Jb(b,d);a.bc&&(d=a.bc,!c?Ib(b,d):Jb(b,d))})}a.I&&(r(a.I)?D(W(this,b),function(b){D(a.I,function(d){d==a.Ma(c)?Ib(b,d):Jb(b,d)},this)},this):D(W(this,b),function(b){P(a.I,function(d,e){e==a.Ma(c)?Ib(b,d):Jb(b,d)},this)},this));a.show&&D(W(this,b),function(b){var d=a.show(c);b.style.display=d?"":"none"});if(a.A){var h={};h[a.A]=this.c.get(a.e[0]);D(W(this,b),function(b){q(h[a.A])?Rb(b,h):b.removeAttribute(a.A)})}a.jc&&a.jc.apply(this,E(a.e,function(){return this.c.get("key")},
this))};
function X(a,b,c){t(c)&&(c={M:c});if(t(c.M)){var d=c.M,e=d.match(/\{\$([^}]*)\}/g)||[],e=E(e,function(a){return a.substring(2,a.length-1)});c.M=function(a){var b=d;P(a.n,function(a,c){b=b.replace(RegExp("\\{\\$"+c+"\\}","g"),a)});return b};c.e=c.e||[];Ea(c.e,e);Fa(c.e)}c.I&&(c.Ma||(c.Ma=function(a){return a}),t(c.I)&&(c.I=[c.I]));c.show&&(c.e||(c.e=[]),t(c.show)&&Aa(c.e,c.show,0),u(c.show)||(c.show=function(a){return a}));r(c.e)||(c.e=[c.e]);var f=[];q(c.oc)||f.push(Bc(a,"blur",function(a){"INPUT"==a.target.tagName&&
"text"==a.target.getAttribute("type")?this.c.set(c.e[0],a.target.value):"SELECT"==a.target.tagName&&this.c.set(c.e[0],a.target.options[a.target.selectedIndex].value)},b));q(c.ub)||f.push(a.click(function(a){c.Xa?(this.c.set(c.e[0],!(0<=C(Hb(a.target),c.Xa))),a.stopPropagation()):"INPUT"==a.target.tagName&&"checkbox"==a.target.getAttribute("type")&&(this.c.set(c.e[0],a.target.checked),a.stopPropagation())},b,a,30));e=a.bind(c.e,function(){this.Ib.apply(this,Da([c,b],G(arguments)))}).k();e={id:y(f),
Nb:f,bound:e,k:e.k,a:z(function(){this.a(y(f))},a)};a.na.push(e)}n.bind=function(a,b,c){return Y(this,this.Mb,H(arguments,0))};n.Mb=function(a,b,c){return this.c.bind(a,b,c||this)};n.Ha=function(a,b){return Y(this,this.Lb,H(arguments,0))};n.Lb=function(a,b){return this.c.Ha(a,b||this)};n.fb=function(a,b){return Y(this,this.gb,H(arguments,0))};n.gb=function(a,b){return this.c.fb(a,b||this)};n.hb=function(a,b){return Y(this,this.ib,H(arguments,0))};n.ib=function(a,b){return this.c.hb(a,b||this)};
n.Ia=function(a,b){return Y(this,this.jb,H(arguments,0))};n.jb=function(a,b){return this.c.Ia(a,b||this)};function Y(a,b,c){var d=b.apply(a,c||[]),b={id:d.id,bound:d,k:d.k,a:z(a.a,a,d.id),K:b,Hb:c||[]};a.ia.push(b);return b}n.ma=function(a,b){return Y(this,this.N,H(arguments,0))};n.N=function(a,b){return this.c.ma(a,b||this)};n.Ta=function(a,b){return Y(this,this.G,H(arguments,0))};n.G=function(a,b){return this.c.Ta(a,b||this)};
n.a=function(a){F(this.ia,function(b){x(b)&&(b=b.id);return b==(a.id||a)});var b=wa(this.na,function(b){return b.id==(a.id||a)});b&&(D(b.Nb,function(a){this.Wa(a)},this),a=b.bound);Ca(this.na,b);return this.Eb(a)};n.Eb=function(a){return this.c.a(a)};n.j=function(){D(G(this.ia),function(a){a.a()},this);D(G(this.na),function(a){a.a()});V.d.j.call(this);this.r=k};
n.Z=function(a,b,c){if(I&&!M(9))V.d.Z.call(this,a,b,c);else{a.g&&(c||!this.g)&&g(Error("Component already rendered"));(0>b||b>(this.b?this.b.length:0))&&g(Error("Child component index out of bounds"));if(!this.m||!this.b)this.m={},this.b=[];a.getParent()==this?(nb(this.m,wc(a),a),Ca(this.b,a)):mb(this.m,wc(a),a);xc(a,this);Aa(this.b,a,b);if(c&&(!a.Yb||!this.Yb||a.getParent!=this)){this.f||this.O();var d=this.b?this.b[b+1]||k:k;yc(a,this.D(),d?d.f:k)}if(a.g&&this.g&&a.getParent()==this){var e=this.D();
this.xa?D(this.b,function(a,b){this.xa(e,a,b)},this):e.insertBefore(a.v(),e.childNodes[b]||k)}else!c&&this.g&&!a.g&&a.f&&a.f.parentNode&&a.C()}};n.removeChild=function(a,b){var c=V.d.removeChild.call(this,a,b);this.xa&&D(this.b,function(a,b){this.xa(this.D(),a,b)},this);return c};I&&M(8);function Ec(){var a=Fc,b=(new Lb(k)||Kb()).createElement("DIV");b.innerHTML=a(Gc,i,i);return 1==b.childNodes.length&&(a=b.firstChild,1==a.nodeType)?a:b}var Gc={};"ScriptEngine"in o&&"JScript"==o.ScriptEngine()&&(o.ScriptEngineMajorVersion(),o.ScriptEngineMinorVersion(),o.ScriptEngineBuildVersion());var Hc={"\x00":"&#0;",'"':"&quot;","&":"&amp;","'":"&#39;","<":"&lt;",">":"&gt;","\t":"&#9;","\n":"&#10;","\x0B":"&#11;","\u000c":"&#12;","\r":"&#13;"," ":"&#32;","-":"&#45;","/":"&#47;","=":"&#61;","`":"&#96;","\u0085":"&#133;","\u00a0":"&#160;","\u2028":"&#8232;","\u2029":"&#8233;"};function Ic(a){return Hc[a]}var Jc=/[\x00\x22\x26\x27\x3c\x3e]/g;function Fc(){return'<li><div class="view"><input class="toggle" type="checkbox"><label></label><button class="destroy"></button></div><input class="edit" type="text"></li>'}function Kc(a){return"<strong>"+("object"===typeof a.n.active&&a.n.active&&0===a.n.active.mc?a.n.active.content:(""+a.n.active).replace(Jc,Ic))+"</strong> item"+(1!=a.n.active?"s":"")+" left"};function Dc(a){V.call(this,a)}A(Dc,V);Dc.prototype.O=function(){this.ab(Ec())};Dc.prototype.C=function(){var a=this.c;X(this,".toggle","{$completed}");this.click(function(){a.o()},".destroy");X(this,"label","{$title}");var b=W(this,".edit")[0];Bc(this,"dblclick",function(){Ib(this.v(),"editing");b.focus()},".view");Bc(this,"keyup",function(a){13===a.keyCode&&a.target.blur()});Bc(this,"blur",function(){Jb(this.v(),"editing")});X(this,".edit","{$title}")};function Lc(a){V.call(this,a)}A(Lc,V);
Lc.prototype.C=function(){Lc.d.C.call(this);var a=this.c;Bc(this,"keyup",this.Vb,".todo-entry");X(this,"#clear-completed",{M:"Clear completed ({$completed})",ub:j,show:j});this.click(function(){D(a.w("completed"),function(a){a.o()})},".clear-completed");X(this,".toggle-all",{e:"allDone"});X(this,"ul",{e:"filter",I:["active","completed","none"]});X(this,"#todo-count",{M:Kc,e:"active"});X(this,["#main","footer"],{show:"total",ub:j});var b=Cc(this).k;this.bind("filter",b);this.ma(b)};
Lc.prototype.Vb=function(a){var b=a.target;if(13===a.keyCode){var c=la(b.value);c&&(a=this.c,c=new a.Va({title:c}),a.add(c,i,i),b.value="")}};function Mc(a){a=""+a;if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x10-\x1f\x80-\x9f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}g(Error("Invalid JSON string: "+a))}function Nc(){this.ya=i}function Oc(a,b){var c=[];Pc(a,b,c);return c.join("")}
function Pc(a,b,c){switch(typeof b){case "string":Qc(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if(r(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Pc(a,a.ya?a.ya.call(b,""+f,e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Qc(f,c),c.push(":"),
Pc(a,a.ya?a.ya.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:g(Error("Unknown type: "+typeof b))}}var Rc={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Sc=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
function Qc(a,b){b.push('"',a.replace(Sc,function(a){if(a in Rc)return Rc[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Rc[a]=e+b.toString(16)}),'"')};function Z(a){var b={schema:{},sync:k,attr:{}};a||(a={});a.attr=a.attr||{};P(a,function(c,d){q(b[d])||(a.attr[d]=c)});P(b,function(c,d){b[d]=a[d]||b[d]});this.q={};this.L={};this.h=b.schema||{};this.ka=b.sync;this.oa=[];this.Ja={};this.Ya=[];this.qb=aa;S(this,"change",this.La,l,this);this.Qb=""+y(this);this.set(b.attr);this.dispatchEvent("load")}A(Z,T);
function Tc(a,b){var c=b;if(t(b)){var d={number:ca,string:t,array:s};return function(a){d[b.toLowerCase()](a)||g(new Uc);return a}}if(c.exec)return z(function(a,b){a.exec(b)===k&&g(new Uc);return b},a,b);u(c)&&kb(c.prototype).length&&(c=function(a){x(a)||g(new Uc);var c=Object.getPrototypeOf(a).constructor;if(Object.getPrototypeOf(a).constructor==b)return a;for(;c.d;)if(c=c.d.constructor,c==b)return a;g(new Uc)});return c}n=Z.prototype;
n.eb=function(){var a=ob(this.q);D(kb(a),function(b){q(a[b])||delete a[b]});return a};n.get=function(a,b){if(r(a))return ua(a,function(a,c){a[c]=this.get(c,b);return a},this);if(this.h[a]&&this.h[a].get){var c=this.h[a].get.apply(this,E(this.h[a].ic||[],function(c){if(c===a)return this.q[a];c=this.get(c);return q(c)?c:b},this));return q(c)?c:b}return q(this.q[a])?this.q[a]:b};
n.set=function(a,b,c){var d=l;if(t(a)){var e={};e[a]=b;a=e}else c=b;P(a,function(a,b){if(q(a))try{this.q[b]=this.h[b]&&this.h[b].set?Tc(this,this.h[b].set).call(this,a,c):a;var e=this.h[b];if(q(e)&&u(e.Oa)){var p=e.Oa;u(p)&&!p(this.get(b),Vc(this,b))&&(d=j)}else this.get(b)!==Vc(this,b)&&(d=j)}catch(v){v.$b?this.qb(v):g(v)}else this.q[b]=a,this.L[b]!=this.q[b]&&(d=j)},this);return d?(c||(this.dispatchEvent("change"),this.L=pb(this.q),this.q=jb(this.q,function(a){return q(a)})),j):l};
n.$=function(){this.dispatchEvent("change");this.L=pb(this.q)};function Vc(a,b){return a.h[b]&&a.h[b].get?a.h[b].get.apply(a,E(a.h[b].ic||[],function(a){return a===b?this.L[b]:Vc(this,a)},a)):a.L[b]}function Wc(a,b){a.h.title=a.h.title||{};a.h.title.set=z(b,a)}
function Xc(a){var b=kb(jb(a.h,function(a,b){var e=this.h[b];if(e.Oa)return!e.Oa(Vc(this,b),this.get(b));e=Vc(this,b);return r(e)?!Ga(e,this.get(b)):Vc(this,b)!=this.get(b)},a));Ea(b,kb(jb(a.q,function(a,b){return q(this.h[b])?l:r(a)?!Ga(a,this.L[b]):a!==this.L[b]},a)));return b}n.o=function(a,b){a&&Yc(this.ka,this,b);this.dispatchEvent("unload");D(G(this.Ya),function(a){a(this)},this);this.j()};function Zc(a,b){a.qb=b}
n.save=function(a){this.ka&&(!q(this.get("id"))?this.ka.create(this,a):this.ka.update(this,a))};n.La=function(){var a=Xc(this);D(this.oa,function(b){va(b.A,function(b){return 0<=C(a,b)})&&b.K.apply(b.rb,Da(E(b.A,function(a){return this.get(a)},this)))},this);a.length&&P(this.Ja,function(a){a(this)},this)};n.Ia=function(a,b){var a=z(a,b||this),c=y(a);this.Ya.push(a);var d={k:function(){a();return d},id:c,a:z(this.a,this,c)};return d};
n.bind=function(a,b,c){t(a)&&(a=[a]);var d={A:a,K:b,rb:c||this};d.Na=y(d);this.oa.push(d);var e={k:z(function(){var d=E(a,function(a){return this.get(a)},this);d.push(this);b.apply(c||this,d);return e},this),id:d.Na,a:z(this.a,this,d.Na)};return e};n.a=function(a){x(a)&&a.id&&(a=a.id);return F(this.oa,function(b){return b.Na==a})||lb(this.Ja,a)||F(this.Ya,function(b){return y(b)==a})};
n.Ha=function(a,b){var c=z(a,b||this),d=y(c);this.Ja[""+d]=c;var a=z(a,b||this,this),e={k:function(){a();return e},id:d,a:z(this.a,this,d)};return e};function Uc(){this.$b=j}A(Uc,Error);function $c(a){var a=a||{},b={comparator:a.comparator||k,modelType:a.modelType||Z,models:a.models||[]};lb(a,"comparator");lb(a,"modelType");lb(a,"models");this.p=[];this.lb=b.comparator;this.Ua=[];this.Ga=[];this.Fa=[];this.Ea=[];this.$a=[];this.Za=[];this.G=l;this.Va=b.modelType;Z.call(this,a);D(b.models,function(a){this.add(a,i,j)},this)}A($c,Z);n=$c.prototype;
n.sort=function(a){var b=l;if(this.lb){var c=this.lb;this.p.sort(function(a,e){var f=c(a.n,e.n);0<f&&(b=j);return f});this.G=this.G||b}a||this.dispatchEvent("change")};
n.add=function(a,b,c){ca(b)&&0>b&&(b=this.p.length+b);var d=0,e=l;r(a)||(a=[a]);D(a,function(c){c instanceof Z||(c=new this.Va(c));if(!wa(this.p,function(a){return a.n==c})){this.N=this.G=e=j;var h=c.Ha(z(function(){this.N=j;this.sort()},this)),m=c.Ia(function(){this.remove(a)},this);Aa(this.p,{n:c,lc:m,$:h},ca(b)?b+d:this.p.length);d+=1;za(this.Fa,c)}},this);this.length=this.p.length;this.sort(j);e&&!c&&this.$();return e};
n.remove=function(a,b){r(a)||(a=[a]);var c=l;D(a,function(a){var b=wa(this.p,function(b){return b.n==a});b&&(this.N=this.G=j,a.a(b.lc),a.a(b.$),Ca(this.p,b),c=j,za(this.$a,{n:a,id:a.get("id")||a.Qb}))},this);this.length=this.p.length;c&&this.sort(j);c&&!b&&this.$();return c};n.w=function(a){if(t(a))var b=a,a=function(a){return a.get(b)};var c=E(this.p,function(a){return a.n});return a?ta(c,a):c};n.indexOf=function(a){return C(this.w(),a)};
n.Ta=function(a,b){var c=z(a,b||this);this.Ua.push(c);var c=y(c),a=z(a,b||this,this),d={k:function(){a();return d},id:c,a:z(this.a,this,c)};return d};n.ma=function(a,b){var c=z(a,b||this);this.Ga.push(c);var c=y(c),a=z(a,b||this,this),d={k:function(){a();return d},id:c,a:z(this.a,this,c)};return d};n.fb=function(a,b){var c=z(a,b||this);this.Ea.push(c);var c=y(c),a=z(a,b||this,this),d={k:function(){a();return d},id:c,a:z(this.a,this,c)};return d};
n.hb=function(a,b){var c=z(a,b||this);this.Za.push(c);var c=y(c),a=z(a,b||this,this),d={k:function(){a();return d},id:c,a:z(this.a,this,c)};return d};n.a=function(a){x(a)&&a.id&&(a=a.id);return F(this.Ua,function(b){return y(b)==a})||F(this.Ga,function(b){return y(b)==a})||F(this.Za,function(b){return y(b)==a})||F(this.Ea,function(b){return y(b)==a})||$c.d.a.call(this,a)};
n.La=function(){$c.d.La.call(this);this.G&&(D(G(this.Ua),function(a){a(this)},this),this.G=l);this.N&&(D(G(this.Ga),function(a){a(this)},this),this.h&&P(this.h,function(a,b){a.va&&D(this.oa,function(a){0<=C(a.A,b)&&a.K.apply(a.rb,Da(E(a.A,function(a){return this.get(a)},this)))},this)},this),this.N=l);D(this.Za,function(a){D(this.$a,function(b){a(b.n,b.id)})},this);this.$a=[];D(this.Ea,function(a){D(this.Fa,function(b){a(b)})},this);this.Fa=[]};function ad(){};function bd(a){this.ha=a;this.Ab=new Nc}n=bd.prototype;n.ha=k;n.Ab=k;n.set=function(a,b){q(b)?this.ha.set(a,Oc(this.Ab,b)):this.ha.remove(a)};n.get=function(a){a=this.ha.get(a);if(a!==k)try{return Mc(a)}catch(b){g("Storage: Invalid value was encountered")}};n.remove=function(a){this.ha.remove(a)};function cd(){}A(cd,ad);function dd(a){this.Aa=a}A(dd,cd);dd.prototype.set=function(a,b){try{this.Aa.setItem(a,b)}catch(c){g("Storage mechanism: Quota exceeded")}};dd.prototype.get=function(a){a=this.Aa.getItem(a);if(t(a)||a===k)return a;g("Storage mechanism: Invalid value was encountered")};dd.prototype.remove=function(a){this.Aa.removeItem(a)};function ed(){var a=k;try{a=window.localStorage||k}catch(b){}this.Aa=a}A(ed,dd);function fd(){this.Ba=new bd(new ed)}fd.prototype.create=function(a,b){var c;this.mb=this.mb||0;c=this.mb++ +"|"+parseInt((new Date).getTime(),36);a.set("id",c);u(b)&&b.call(a,a)};fd.prototype.xb=function(a,b){a.set(this.Ba.get(a.get("id")));u(b)&&b.call(a,a)};fd.prototype.update=function(a,b){this.Ba.set(a.get("id"),a.eb());u(b)&&b.call(a,a)};function Yc(a,b,c){a.Ba.remove(b.get("id"));u(c)&&c.call(b,b)};function gd(){fd.call(this)}A(gd,fd);gd.prototype.xb=function(a){var b=this.Ba.get(a.get("id"))||[];D(b,function(b){b=new a.Va(b);a.add(b,i,j)});a.$()};function hd(a){Z.call(this,a);Wc(this,function(a){a=la(a);a.length||g(new Uc);return a});Zc(this,function(){this.o()})}A(hd,Z);function id(){$c.call(this,{id:"todos-plastronjs",sync:new gd,schema:{completed:{get:function(){return this.w("completed").length},va:j},allDone:{get:function(){return this.p.length==this.w("completed").length},set:function(a){D(this.w("none"),function(b){b.set("completed",a)})},va:j},active:{get:function(){return this.p.length-this.w("completed").length},va:j},total:{get:function(){return this.p.length},va:j}},modelType:hd});this.ka.xb(this,i);this.ma(this.save)}A(id,$c);
var jd={none:function(){return j},active:function(a){return!a.get("completed")},completed:function(a){return a.get("completed")}};id.prototype.w=function(a){return id.d.w.call(this,jd[a||this.get("filter")])};id.prototype.eb=function(){return E(this.w("none"),function(a){return a.eb()})};var kd=new id,$=new Lc(kd),ld=Nb("todoapp");$.g&&g(Error("Component already rendered"));if(ld){$.Gb=j;if(!$.aa||$.aa.P!=Mb(ld))$.aa=Kb(ld);$.f=ld;$.C()}else g(Error("Invalid element to decorate"));var md=new sc;md.ja("{/}",function(){kd.set("filter","none")});md.ja("/active",function(){kd.set("filter","active")});md.ja("/completed",function(){kd.set("filter","completed")});})();