added new Todo ui. upgraded to NPM. removed bower deps. updated bower...

added new Todo ui. upgraded to NPM. removed bower deps. updated bower references to node references. minor fix in the template due to visual error in the Clear completed button.
parent c898a78d
node_modules/director/*
node_modules/director/build/*
!node_modules/director/build
!node_modules/director/build/director.js
node_modules/knockout/*
!node_modules/knockout/build
node_modules/knockout/build/*
!node_modules/knockout/build/output/
node_modules/knockout/build/output/*
!node_modules/knockout/build/output/knockout-latest.js
node_modules/todomvc-app-css/*
!node_modules/todomvc-app-css/index.css
node_modules/todomvc-common/*
!node_modules/todomvc-common/base.css
!node_modules/todomvc-common/base.js
{
"name": "todomvc-knockoutjs",
"version": "0.0.0",
"dependencies": {
"todomvc-common": "~0.3.0",
"component-knockout-passy": "~3.1.0",
"director": "~1.2.0"
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Knockout.js • TodoMVC</title> <title>Knockout.js • TodoMVC</title>
<link rel="stylesheet" href="bower_components/todomvc-common/base.css"> <link rel="stylesheet" href="node_modules/todomvc-common/base.css">
<link rel="stylesheet" href="node_modules/todomvc-app-css/index.css">
</head> </head>
<body> <body>
<section id="todoapp"> <section id="todoapp">
...@@ -41,9 +42,7 @@ ...@@ -41,9 +42,7 @@
<a data-bind="css: { selected: showMode() == 'completed' }" href="#/completed">Completed</a> <a data-bind="css: { selected: showMode() == 'completed' }" href="#/completed">Completed</a>
</li> </li>
</ul> </ul>
<button id="clear-completed" data-bind="visible: completedCount, click: removeCompleted"> <button id="clear-completed" data-bind="visible: completedCount, click: removeCompleted">Clear completed (<span data-bind="text: completedCount"></span>)</button>
Clear completed (<span data-bind="text: completedCount"></span>)
</button>
</footer> </footer>
</section> </section>
<footer id="info"> <footer id="info">
...@@ -51,9 +50,9 @@ ...@@ -51,9 +50,9 @@
<p>Written by <a href="https://github.com/ashish01/knockoutjs-todos">Ashish Sharma</a> and <a href="http://knockmeout.net">Ryan Niemeyer</a></p> <p>Written by <a href="https://github.com/ashish01/knockoutjs-todos">Ashish Sharma</a> and <a href="http://knockmeout.net">Ryan Niemeyer</a></p>
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p> <p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</footer> </footer>
<script src="bower_components/todomvc-common/base.js"></script> <script src="node_modules/todomvc-common/base.js"></script>
<script src="bower_components/component-knockout-passy/knockout.js"></script> <script src="node_modules/knockout/build/output/knockout-latest.js"></script>
<script src="bower_components/director/build/director.js"></script> <script src="node_modules/director/build/director.js"></script>
<script src="js/app.js"></script> <script src="js/app.js"></script>
</body> </body>
</html> </html>
// //
// Generated on Fri Dec 27 2013 12:02:11 GMT-0500 (EST) by Nodejitsu, Inc (Using Codesurgeon). // Generated on Tue Dec 16 2014 12:13:47 GMT+0100 (CET) by Charlie Robbins, Paolo Fragomeni & the Contributors (Using Codesurgeon).
// Version 1.2.2 // Version 1.2.6
// //
(function (exports) { (function (exports) {
...@@ -10,29 +10,11 @@ ...@@ -10,29 +10,11 @@
/* /*
* browser.js: Browser specific functionality for director. * browser.js: Browser specific functionality for director.
* *
* (C) 2011, Nodejitsu Inc. * (C) 2011, Charlie Robbins, Paolo Fragomeni, & the Contributors.
* MIT LICENSE * MIT LICENSE
* *
*/ */
if (!Array.prototype.filter) {
Array.prototype.filter = function(filter, that) {
var other = [], v;
for (var i = 0, n = this.length; i < n; i++) {
if (i in this && filter.call(that, v = this[i], i, this)) {
other.push(v);
}
}
return other;
};
}
if (!Array.isArray){
Array.isArray = function(obj) {
return Object.prototype.toString.call(obj) === '[object Array]';
};
}
var dloc = document.location; var dloc = document.location;
function dlocHashEmpty() { function dlocHashEmpty() {
...@@ -196,7 +178,8 @@ var Router = exports.Router = function (routes) { ...@@ -196,7 +178,8 @@ var Router = exports.Router = function (routes) {
}; };
Router.prototype.init = function (r) { Router.prototype.init = function (r) {
var self = this; var self = this
, routeTo;
this.handler = function(onChangeEvent) { this.handler = function(onChangeEvent) {
var newURL = onChangeEvent && onChangeEvent.newURL || window.location.hash; var newURL = onChangeEvent && onChangeEvent.newURL || window.location.hash;
var url = self.history === true ? self.getPath() : newURL.replace(/.*#/, ''); var url = self.history === true ? self.getPath() : newURL.replace(/.*#/, '');
...@@ -213,9 +196,16 @@ Router.prototype.init = function (r) { ...@@ -213,9 +196,16 @@ Router.prototype.init = function (r) {
} }
} }
else { else {
var routeTo = dlocHashEmpty() && r ? r : !dlocHashEmpty() ? dloc.hash.replace(/^#/, '') : null; if (this.convert_hash_in_init) {
if (routeTo) { // Use hash as route
window.history.replaceState({}, document.title, routeTo); routeTo = dlocHashEmpty() && r ? r : !dlocHashEmpty() ? dloc.hash.replace(/^#/, '') : null;
if (routeTo) {
window.history.replaceState({}, document.title, routeTo);
}
}
else {
// Use canonical url
routeTo = this.getPath();
} }
// Router has been initialized, but due to the chrome bug it will not // Router has been initialized, but due to the chrome bug it will not
...@@ -351,7 +341,7 @@ function paramifyString(str, params, mod) { ...@@ -351,7 +341,7 @@ function paramifyString(str, params, mod) {
} }
} }
} }
return mod === str ? "([._a-zA-Z0-9-]+)" : mod; return mod === str ? "([._a-zA-Z0-9-%()]+)" : mod;
} }
function regifyString(str, params) { function regifyString(str, params) {
...@@ -397,6 +387,8 @@ function terminator(routes, delimiter, start, stop) { ...@@ -397,6 +387,8 @@ function terminator(routes, delimiter, start, stop) {
return routes; return routes;
} }
var QUERY_SEPARATOR = /\?.*/;
Router.prototype.configure = function(options) { Router.prototype.configure = function(options) {
options = options || {}; options = options || {};
for (var i = 0; i < this.methods.length; i++) { for (var i = 0; i < this.methods.length; i++) {
...@@ -410,6 +402,7 @@ Router.prototype.configure = function(options) { ...@@ -410,6 +402,7 @@ Router.prototype.configure = function(options) {
this.resource = options.resource; this.resource = options.resource;
this.history = options.html5history && this.historySupport || false; this.history = options.html5history && this.historySupport || false;
this.run_in_init = this.history === true && options.run_handler_in_init !== false; this.run_in_init = this.history === true && options.run_handler_in_init !== false;
this.convert_hash_in_init = this.history === true && options.convert_hash_in_init !== false;
this.every = { this.every = {
after: options.after || null, after: options.after || null,
before: options.before || null, before: options.before || null,
...@@ -426,6 +419,7 @@ Router.prototype.param = function(token, matcher) { ...@@ -426,6 +419,7 @@ Router.prototype.param = function(token, matcher) {
this.params[token] = function(str) { this.params[token] = function(str) {
return str.replace(compiled, matcher.source || matcher); return str.replace(compiled, matcher.source || matcher);
}; };
return this;
}; };
Router.prototype.on = Router.prototype.route = function(method, path, route) { Router.prototype.on = Router.prototype.route = function(method, path, route) {
...@@ -453,8 +447,20 @@ Router.prototype.on = Router.prototype.route = function(method, path, route) { ...@@ -453,8 +447,20 @@ Router.prototype.on = Router.prototype.route = function(method, path, route) {
this.insert(method, this.scope.concat(path), route); this.insert(method, this.scope.concat(path), route);
}; };
Router.prototype.path = function(path, routesFn) {
var self = this, length = this.scope.length;
if (path.source) {
path = path.source.replace(/\\\//ig, "/");
}
path = path.split(new RegExp(this.delimiter));
path = terminator(path, this.delimiter);
this.scope = this.scope.concat(path);
routesFn.call(this, this);
this.scope.splice(length, path.length);
};
Router.prototype.dispatch = function(method, path, callback) { Router.prototype.dispatch = function(method, path, callback) {
var self = this, fns = this.traverse(method, path, this.routes, ""), invoked = this._invoked, after; var self = this, fns = this.traverse(method, path.replace(QUERY_SEPARATOR, ""), this.routes, ""), invoked = this._invoked, after;
this._invoked = true; this._invoked = true;
if (!fns || fns.length === 0) { if (!fns || fns.length === 0) {
this.last = []; this.last = [];
...@@ -495,7 +501,7 @@ Router.prototype.invoke = function(fns, thisArg, callback) { ...@@ -495,7 +501,7 @@ Router.prototype.invoke = function(fns, thisArg, callback) {
if (Array.isArray(fn)) { if (Array.isArray(fn)) {
return _asyncEverySeries(fn, apply, next); return _asyncEverySeries(fn, apply, next);
} else if (typeof fn == "function") { } else if (typeof fn == "function") {
fn.apply(thisArg, fns.captures.concat(next)); fn.apply(thisArg, (fns.captures || []).concat(next));
} }
}; };
_asyncEverySeries(fns, apply, function() { _asyncEverySeries(fns, apply, function() {
......
/*!
* Knockout JavaScript library v3.2.0
* (c) Steven Sanderson - http://knockoutjs.com/
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
*/
(function() {(function(n){var v=this||(0,eval)("this"),y=v.document,L=v.navigator,r=v.jQuery,D=v.JSON;(function(n){"function"===typeof require&&"object"===typeof exports&&"object"===typeof module?n(module.exports||exports,require):"function"===typeof define&&define.amd?define(["exports","require"],n):n(v.ko={})})(function(M,N){function H(a,d){return null===a||typeof a in Q?a===d:!1}function R(a,d){var c;return function(){c||(c=setTimeout(function(){c=n;a()},d))}}function S(a,d){var c;return function(){clearTimeout(c);
c=setTimeout(a,d)}}function I(b,d,c,e){a.d[b]={init:function(b,h,k,g,m){var l,s;a.s(function(){var g=a.a.c(h()),k=!c!==!g,z=!s;if(z||d||k!==l)z&&a.Y.la()&&(s=a.a.ia(a.f.childNodes(b),!0)),k?(z||a.f.T(b,a.a.ia(s)),a.Ca(e?e(m,g):m,b)):a.f.ja(b),l=k},null,{o:b});return{controlsDescendantBindings:!0}}};a.h.ha[b]=!1;a.f.Q[b]=!0}var a="undefined"!==typeof M?M:{};a.b=function(b,d){for(var c=b.split("."),e=a,f=0;f<c.length-1;f++)e=e[c[f]];e[c[c.length-1]]=d};a.A=function(a,d,c){a[d]=c};a.version="3.2.0";
a.b("version",a.version);a.a=function(){function b(a,b){for(var c in a)a.hasOwnProperty(c)&&b(c,a[c])}function d(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function c(a,b){a.__proto__=b;return a}var e={__proto__:[]}instanceof Array,f={},h={};f[L&&/Firefox\/2/i.test(L.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];f.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" ");b(f,function(a,b){if(b.length)for(var c=
0,d=b.length;c<d;c++)h[b[c]]=a});var k={propertychange:!0},g=y&&function(){for(var a=3,b=y.createElement("div"),c=b.getElementsByTagName("i");b.innerHTML="\x3c!--[if gt IE "+ ++a+"]><i></i><![endif]--\x3e",c[0];);return 4<a?a:n}();return{vb:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],u:function(a,b){for(var c=0,d=a.length;c<d;c++)b(a[c],c)},m:function(a,b){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(a,b);for(var c=0,d=a.length;c<d;c++)if(a[c]===
b)return c;return-1},qb:function(a,b,c){for(var d=0,g=a.length;d<g;d++)if(b.call(c,a[d],d))return a[d];return null},ua:function(m,b){var c=a.a.m(m,b);0<c?m.splice(c,1):0===c&&m.shift()},rb:function(m){m=m||[];for(var b=[],c=0,d=m.length;c<d;c++)0>a.a.m(b,m[c])&&b.push(m[c]);return b},Da:function(a,b){a=a||[];for(var c=[],d=0,g=a.length;d<g;d++)c.push(b(a[d],d));return c},ta:function(a,b){a=a||[];for(var c=[],d=0,g=a.length;d<g;d++)b(a[d],d)&&c.push(a[d]);return c},ga:function(a,b){if(b instanceof
Array)a.push.apply(a,b);else for(var c=0,d=b.length;c<d;c++)a.push(b[c]);return a},ea:function(b,c,d){var g=a.a.m(a.a.Xa(b),c);0>g?d&&b.push(c):d||b.splice(g,1)},xa:e,extend:d,za:c,Aa:e?c:d,G:b,na:function(a,b){if(!a)return a;var c={},d;for(d in a)a.hasOwnProperty(d)&&(c[d]=b(a[d],d,a));return c},Ka:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},oc:function(b){b=a.a.S(b);for(var c=y.createElement("div"),d=0,g=b.length;d<g;d++)c.appendChild(a.R(b[d]));return c},ia:function(b,c){for(var d=
0,g=b.length,e=[];d<g;d++){var f=b[d].cloneNode(!0);e.push(c?a.R(f):f)}return e},T:function(b,c){a.a.Ka(b);if(c)for(var d=0,g=c.length;d<g;d++)b.appendChild(c[d])},Lb:function(b,c){var d=b.nodeType?[b]:b;if(0<d.length){for(var g=d[0],e=g.parentNode,f=0,h=c.length;f<h;f++)e.insertBefore(c[f],g);f=0;for(h=d.length;f<h;f++)a.removeNode(d[f])}},ka:function(a,b){if(a.length){for(b=8===b.nodeType&&b.parentNode||b;a.length&&a[0].parentNode!==b;)a.shift();if(1<a.length){var c=a[0],d=a[a.length-1];for(a.length=
0;c!==d;)if(a.push(c),c=c.nextSibling,!c)return;a.push(d)}}return a},Nb:function(a,b){7>g?a.setAttribute("selected",b):a.selected=b},cb:function(a){return null===a||a===n?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},uc:function(a,b){a=a||"";return b.length>a.length?!1:a.substring(0,b.length)===b},cc:function(a,b){if(a===b)return!0;if(11===a.nodeType)return!1;if(b.contains)return b.contains(3===a.nodeType?a.parentNode:a);if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)&
16);for(;a&&a!=b;)a=a.parentNode;return!!a},Ja:function(b){return a.a.cc(b,b.ownerDocument.documentElement)},ob:function(b){return!!a.a.qb(b,a.a.Ja)},t:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},n:function(b,c,d){var e=g&&k[c];if(!e&&r)r(b).bind(c,d);else if(e||"function"!=typeof b.addEventListener)if("undefined"!=typeof b.attachEvent){var f=function(a){d.call(b,a)},h="on"+c;b.attachEvent(h,f);a.a.w.da(b,function(){b.detachEvent(h,f)})}else throw Error("Browser doesn't support addEventListener or attachEvent");
else b.addEventListener(c,d,!1)},oa:function(b,c){if(!b||!b.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var d;"input"===a.a.t(b)&&b.type&&"click"==c.toLowerCase()?(d=b.type,d="checkbox"==d||"radio"==d):d=!1;if(r&&!d)r(b).trigger(c);else if("function"==typeof y.createEvent)if("function"==typeof b.dispatchEvent)d=y.createEvent(h[c]||"HTMLEvents"),d.initEvent(c,!0,!0,v,0,0,0,0,0,!1,!1,!1,!1,0,b),b.dispatchEvent(d);else throw Error("The supplied element doesn't support dispatchEvent");
else if(d&&b.click)b.click();else if("undefined"!=typeof b.fireEvent)b.fireEvent("on"+c);else throw Error("Browser doesn't support triggering events");},c:function(b){return a.C(b)?b():b},Xa:function(b){return a.C(b)?b.v():b},Ba:function(b,c,d){if(c){var g=/\S+/g,e=b.className.match(g)||[];a.a.u(c.match(g),function(b){a.a.ea(e,b,d)});b.className=e.join(" ")}},bb:function(b,c){var d=a.a.c(c);if(null===d||d===n)d="";var g=a.f.firstChild(b);!g||3!=g.nodeType||a.f.nextSibling(g)?a.f.T(b,[b.ownerDocument.createTextNode(d)]):
g.data=d;a.a.fc(b)},Mb:function(a,b){a.name=b;if(7>=g)try{a.mergeAttributes(y.createElement("<input name='"+a.name+"'/>"),!1)}catch(c){}},fc:function(a){9<=g&&(a=1==a.nodeType?a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},dc:function(a){if(g){var b=a.style.width;a.style.width=0;a.style.width=b}},sc:function(b,c){b=a.a.c(b);c=a.a.c(c);for(var d=[],g=b;g<=c;g++)d.push(g);return d},S:function(a){for(var b=[],c=0,d=a.length;c<d;c++)b.push(a[c]);return b},xc:6===g,yc:7===g,L:g,xb:function(b,c){for(var d=
a.a.S(b.getElementsByTagName("input")).concat(a.a.S(b.getElementsByTagName("textarea"))),g="string"==typeof c?function(a){return a.name===c}:function(a){return c.test(a.name)},e=[],f=d.length-1;0<=f;f--)g(d[f])&&e.push(d[f]);return e},pc:function(b){return"string"==typeof b&&(b=a.a.cb(b))?D&&D.parse?D.parse(b):(new Function("return "+b))():null},eb:function(b,c,d){if(!D||!D.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");
return D.stringify(a.a.c(b),c,d)},qc:function(c,d,g){g=g||{};var e=g.params||{},f=g.includeFields||this.vb,h=c;if("object"==typeof c&&"form"===a.a.t(c))for(var h=c.action,k=f.length-1;0<=k;k--)for(var t=a.a.xb(c,f[k]),E=t.length-1;0<=E;E--)e[t[E].name]=t[E].value;d=a.a.c(d);var x=y.createElement("form");x.style.display="none";x.action=h;x.method="post";for(var n in d)c=y.createElement("input"),c.type="hidden",c.name=n,c.value=a.a.eb(a.a.c(d[n])),x.appendChild(c);b(e,function(a,b){var c=y.createElement("input");
c.type="hidden";c.name=a;c.value=b;x.appendChild(c)});y.body.appendChild(x);g.submitter?g.submitter(x):x.submit();setTimeout(function(){x.parentNode.removeChild(x)},0)}}}();a.b("utils",a.a);a.b("utils.arrayForEach",a.a.u);a.b("utils.arrayFirst",a.a.qb);a.b("utils.arrayFilter",a.a.ta);a.b("utils.arrayGetDistinctValues",a.a.rb);a.b("utils.arrayIndexOf",a.a.m);a.b("utils.arrayMap",a.a.Da);a.b("utils.arrayPushAll",a.a.ga);a.b("utils.arrayRemoveItem",a.a.ua);a.b("utils.extend",a.a.extend);a.b("utils.fieldsIncludedWithJsonPost",
a.a.vb);a.b("utils.getFormFields",a.a.xb);a.b("utils.peekObservable",a.a.Xa);a.b("utils.postJson",a.a.qc);a.b("utils.parseJson",a.a.pc);a.b("utils.registerEventHandler",a.a.n);a.b("utils.stringifyJson",a.a.eb);a.b("utils.range",a.a.sc);a.b("utils.toggleDomNodeCssClass",a.a.Ba);a.b("utils.triggerEvent",a.a.oa);a.b("utils.unwrapObservable",a.a.c);a.b("utils.objectForEach",a.a.G);a.b("utils.addOrRemoveItem",a.a.ea);a.b("unwrap",a.a.c);Function.prototype.bind||(Function.prototype.bind=function(a){var d=
this,c=Array.prototype.slice.call(arguments);a=c.shift();return function(){return d.apply(a,c.concat(Array.prototype.slice.call(arguments)))}});a.a.e=new function(){function a(b,h){var k=b[c];if(!k||"null"===k||!e[k]){if(!h)return n;k=b[c]="ko"+d++;e[k]={}}return e[k]}var d=0,c="__ko__"+(new Date).getTime(),e={};return{get:function(c,d){var e=a(c,!1);return e===n?n:e[d]},set:function(c,d,e){if(e!==n||a(c,!1)!==n)a(c,!0)[d]=e},clear:function(a){var b=a[c];return b?(delete e[b],a[c]=null,!0):!1},F:function(){return d++ +
c}}};a.b("utils.domData",a.a.e);a.b("utils.domData.clear",a.a.e.clear);a.a.w=new function(){function b(b,d){var g=a.a.e.get(b,c);g===n&&d&&(g=[],a.a.e.set(b,c,g));return g}function d(c){var e=b(c,!1);if(e)for(var e=e.slice(0),g=0;g<e.length;g++)e[g](c);a.a.e.clear(c);a.a.w.cleanExternalData(c);if(f[c.nodeType])for(e=c.firstChild;c=e;)e=c.nextSibling,8===c.nodeType&&d(c)}var c=a.a.e.F(),e={1:!0,8:!0,9:!0},f={1:!0,9:!0};return{da:function(a,c){if("function"!=typeof c)throw Error("Callback must be a function");
b(a,!0).push(c)},Kb:function(d,e){var g=b(d,!1);g&&(a.a.ua(g,e),0==g.length&&a.a.e.set(d,c,n))},R:function(b){if(e[b.nodeType]&&(d(b),f[b.nodeType])){var c=[];a.a.ga(c,b.getElementsByTagName("*"));for(var g=0,m=c.length;g<m;g++)d(c[g])}return b},removeNode:function(b){a.R(b);b.parentNode&&b.parentNode.removeChild(b)},cleanExternalData:function(a){r&&"function"==typeof r.cleanData&&r.cleanData([a])}}};a.R=a.a.w.R;a.removeNode=a.a.w.removeNode;a.b("cleanNode",a.R);a.b("removeNode",a.removeNode);a.b("utils.domNodeDisposal",
a.a.w);a.b("utils.domNodeDisposal.addDisposeCallback",a.a.w.da);a.b("utils.domNodeDisposal.removeDisposeCallback",a.a.w.Kb);(function(){a.a.ba=function(b){var d;if(r)if(r.parseHTML)d=r.parseHTML(b)||[];else{if((d=r.clean([b]))&&d[0]){for(b=d[0];b.parentNode&&11!==b.parentNode.nodeType;)b=b.parentNode;b.parentNode&&b.parentNode.removeChild(b)}}else{var c=a.a.cb(b).toLowerCase();d=y.createElement("div");c=c.match(/^<(thead|tbody|tfoot)/)&&[1,"<table>","</table>"]||!c.indexOf("<tr")&&[2,"<table><tbody>",
"</tbody></table>"]||(!c.indexOf("<td")||!c.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];b="ignored<div>"+c[1]+b+c[2]+"</div>";for("function"==typeof v.innerShiv?d.appendChild(v.innerShiv(b)):d.innerHTML=b;c[0]--;)d=d.lastChild;d=a.a.S(d.lastChild.childNodes)}return d};a.a.$a=function(b,d){a.a.Ka(b);d=a.a.c(d);if(null!==d&&d!==n)if("string"!=typeof d&&(d=d.toString()),r)r(b).html(d);else for(var c=a.a.ba(d),e=0;e<c.length;e++)b.appendChild(c[e])}})();a.b("utils.parseHtmlFragment",
a.a.ba);a.b("utils.setHtml",a.a.$a);a.D=function(){function b(c,d){if(c)if(8==c.nodeType){var f=a.D.Gb(c.nodeValue);null!=f&&d.push({bc:c,mc:f})}else if(1==c.nodeType)for(var f=0,h=c.childNodes,k=h.length;f<k;f++)b(h[f],d)}var d={};return{Ua:function(a){if("function"!=typeof a)throw Error("You can only pass a function to ko.memoization.memoize()");var b=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);d[b]=a;return"\x3c!--[ko_memo:"+
b+"]--\x3e"},Rb:function(a,b){var f=d[a];if(f===n)throw Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized.");try{return f.apply(null,b||[]),!0}finally{delete d[a]}},Sb:function(c,d){var f=[];b(c,f);for(var h=0,k=f.length;h<k;h++){var g=f[h].bc,m=[g];d&&a.a.ga(m,d);a.D.Rb(f[h].mc,m);g.nodeValue="";g.parentNode&&g.parentNode.removeChild(g)}},Gb:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:null}}}();a.b("memoization",a.D);a.b("memoization.memoize",a.D.Ua);
a.b("memoization.unmemoize",a.D.Rb);a.b("memoization.parseMemoText",a.D.Gb);a.b("memoization.unmemoizeDomNodeAndDescendants",a.D.Sb);a.La={throttle:function(b,d){b.throttleEvaluation=d;var c=null;return a.j({read:b,write:function(a){clearTimeout(c);c=setTimeout(function(){b(a)},d)}})},rateLimit:function(a,d){var c,e,f;"number"==typeof d?c=d:(c=d.timeout,e=d.method);f="notifyWhenChangesStop"==e?S:R;a.Ta(function(a){return f(a,c)})},notify:function(a,d){a.equalityComparer="always"==d?null:H}};var Q=
{undefined:1,"boolean":1,number:1,string:1};a.b("extenders",a.La);a.Pb=function(b,d,c){this.target=b;this.wa=d;this.ac=c;this.Cb=!1;a.A(this,"dispose",this.K)};a.Pb.prototype.K=function(){this.Cb=!0;this.ac()};a.P=function(){a.a.Aa(this,a.P.fn);this.M={}};var B={U:function(b,d,c){var e=this;c=c||"change";var f=new a.Pb(e,d?b.bind(d):b,function(){a.a.ua(e.M[c],f);e.nb&&e.nb()});e.va&&e.va(c);e.M[c]||(e.M[c]=[]);e.M[c].push(f);return f},notifySubscribers:function(b,d){d=d||"change";if(this.Ab(d))try{a.k.Ea();
for(var c=this.M[d].slice(0),e=0,f;f=c[e];++e)f.Cb||f.wa(b)}finally{a.k.end()}},Ta:function(b){var d=this,c=a.C(d),e,f,h;d.qa||(d.qa=d.notifySubscribers,d.notifySubscribers=function(a,b){b&&"change"!==b?"beforeChange"===b?d.kb(a):d.qa(a,b):d.lb(a)});var k=b(function(){c&&h===d&&(h=d());e=!1;d.Pa(f,h)&&d.qa(f=h)});d.lb=function(a){e=!0;h=a;k()};d.kb=function(a){e||(f=a,d.qa(a,"beforeChange"))}},Ab:function(a){return this.M[a]&&this.M[a].length},yb:function(){var b=0;a.a.G(this.M,function(a,c){b+=c.length});
return b},Pa:function(a,d){return!this.equalityComparer||!this.equalityComparer(a,d)},extend:function(b){var d=this;b&&a.a.G(b,function(b,e){var f=a.La[b];"function"==typeof f&&(d=f(d,e)||d)});return d}};a.A(B,"subscribe",B.U);a.A(B,"extend",B.extend);a.A(B,"getSubscriptionsCount",B.yb);a.a.xa&&a.a.za(B,Function.prototype);a.P.fn=B;a.Db=function(a){return null!=a&&"function"==typeof a.U&&"function"==typeof a.notifySubscribers};a.b("subscribable",a.P);a.b("isSubscribable",a.Db);a.Y=a.k=function(){function b(a){c.push(e);
e=a}function d(){e=c.pop()}var c=[],e,f=0;return{Ea:b,end:d,Jb:function(b){if(e){if(!a.Db(b))throw Error("Only subscribable things can act as dependencies");e.wa(b,b.Vb||(b.Vb=++f))}},B:function(a,c,g){try{return b(),a.apply(c,g||[])}finally{d()}},la:function(){if(e)return e.s.la()},ma:function(){if(e)return e.ma}}}();a.b("computedContext",a.Y);a.b("computedContext.getDependenciesCount",a.Y.la);a.b("computedContext.isInitial",a.Y.ma);a.b("computedContext.isSleeping",a.Y.zc);a.p=function(b){function d(){if(0<
arguments.length)return d.Pa(c,arguments[0])&&(d.X(),c=arguments[0],d.W()),this;a.k.Jb(d);return c}var c=b;a.P.call(d);a.a.Aa(d,a.p.fn);d.v=function(){return c};d.W=function(){d.notifySubscribers(c)};d.X=function(){d.notifySubscribers(c,"beforeChange")};a.A(d,"peek",d.v);a.A(d,"valueHasMutated",d.W);a.A(d,"valueWillMutate",d.X);return d};a.p.fn={equalityComparer:H};var F=a.p.rc="__ko_proto__";a.p.fn[F]=a.p;a.a.xa&&a.a.za(a.p.fn,a.P.fn);a.Ma=function(b,d){return null===b||b===n||b[F]===n?!1:b[F]===
d?!0:a.Ma(b[F],d)};a.C=function(b){return a.Ma(b,a.p)};a.Ra=function(b){return"function"==typeof b&&b[F]===a.p||"function"==typeof b&&b[F]===a.j&&b.hc?!0:!1};a.b("observable",a.p);a.b("isObservable",a.C);a.b("isWriteableObservable",a.Ra);a.b("isWritableObservable",a.Ra);a.aa=function(b){b=b||[];if("object"!=typeof b||!("length"in b))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");b=a.p(b);a.a.Aa(b,a.aa.fn);return b.extend({trackArrayChanges:!0})};
a.aa.fn={remove:function(b){for(var d=this.v(),c=[],e="function"!=typeof b||a.C(b)?function(a){return a===b}:b,f=0;f<d.length;f++){var h=d[f];e(h)&&(0===c.length&&this.X(),c.push(h),d.splice(f,1),f--)}c.length&&this.W();return c},removeAll:function(b){if(b===n){var d=this.v(),c=d.slice(0);this.X();d.splice(0,d.length);this.W();return c}return b?this.remove(function(c){return 0<=a.a.m(b,c)}):[]},destroy:function(b){var d=this.v(),c="function"!=typeof b||a.C(b)?function(a){return a===b}:b;this.X();
for(var e=d.length-1;0<=e;e--)c(d[e])&&(d[e]._destroy=!0);this.W()},destroyAll:function(b){return b===n?this.destroy(function(){return!0}):b?this.destroy(function(d){return 0<=a.a.m(b,d)}):[]},indexOf:function(b){var d=this();return a.a.m(d,b)},replace:function(a,d){var c=this.indexOf(a);0<=c&&(this.X(),this.v()[c]=d,this.W())}};a.a.u("pop push reverse shift sort splice unshift".split(" "),function(b){a.aa.fn[b]=function(){var a=this.v();this.X();this.sb(a,b,arguments);a=a[b].apply(a,arguments);this.W();
return a}});a.a.u(["slice"],function(b){a.aa.fn[b]=function(){var a=this();return a[b].apply(a,arguments)}});a.a.xa&&a.a.za(a.aa.fn,a.p.fn);a.b("observableArray",a.aa);a.La.trackArrayChanges=function(b){function d(){if(!c){c=!0;var d=b.notifySubscribers;b.notifySubscribers=function(a,b){b&&"change"!==b||++f;return d.apply(this,arguments)};var g=[].concat(b.v()||[]);e=null;b.U(function(c){c=[].concat(c||[]);if(b.Ab("arrayChange")){var d;if(!e||1<f)e=a.a.Fa(g,c,{sparse:!0});d=e;d.length&&b.notifySubscribers(d,
"arrayChange")}g=c;e=null;f=0})}}if(!b.sb){var c=!1,e=null,f=0,h=b.U;b.U=b.subscribe=function(a,b,c){"arrayChange"===c&&d();return h.apply(this,arguments)};b.sb=function(b,d,m){function l(a,b,c){return s[s.length]={status:a,value:b,index:c}}if(c&&!f){var s=[],h=b.length,p=m.length,z=0;switch(d){case "push":z=h;case "unshift":for(d=0;d<p;d++)l("added",m[d],z+d);break;case "pop":z=h-1;case "shift":h&&l("deleted",b[z],z);break;case "splice":d=Math.min(Math.max(0,0>m[0]?h+m[0]:m[0]),h);for(var h=1===
p?h:Math.min(d+(m[1]||0),h),p=d+p-2,z=Math.max(h,p),u=[],t=[],E=2;d<z;++d,++E)d<h&&t.push(l("deleted",b[d],d)),d<p&&u.push(l("added",m[E],d));a.a.wb(t,u);break;default:return}e=s}}}};a.s=a.j=function(b,d,c){function e(){a.a.G(v,function(a,b){b.K()});v={}}function f(){e();A=0;u=!0;q=!1}function h(){var a=g.throttleEvaluation;a&&0<=a?(clearTimeout(O),O=setTimeout(k,a)):g.ib?g.ib():k()}function k(b){if(p){if(E)throw Error("A 'pure' computed must not be called recursively");}else if(!u){if(J&&J()){if(!z){r();
return}}else z=!1;p=!0;if(x)try{var c={};a.k.Ea({wa:function(a,b){c[b]||(c[b]=1,++A)},s:g,ma:n});A=0;s=t.call(d)}finally{a.k.end(),p=!1}else try{var e=v,l=A;a.k.Ea({wa:function(a,b){u||(l&&e[b]?(v[b]=e[b],++A,delete e[b],--l):v[b]||(v[b]=a.U(h),++A))},s:g,ma:E?n:!A});v={};A=0;try{var m=d?t.call(d):t()}finally{a.k.end(),l&&a.a.G(e,function(a,b){b.K()}),q=!1}g.Pa(s,m)&&(g.notifySubscribers(s,"beforeChange"),s=m,!0!==b&&g.notifySubscribers(s))}finally{p=!1}A||r()}}function g(){if(0<arguments.length){if("function"===
typeof G)G.apply(d,arguments);else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}a.k.Jb(g);q&&k(!0);return s}function m(){q&&!A&&k(!0);return s}function l(){return q||0<A}var s,q=!0,p=!1,z=!1,u=!1,t=b,E=!1,x=!1;t&&"object"==typeof t?(c=t,t=c.read):(c=c||{},t||(t=c.read));if("function"!=typeof t)throw Error("Pass a function that returns the value of the ko.computed");var G=c.write,
w=c.disposeWhenNodeIsRemoved||c.o||null,C=c.disposeWhen||c.Ia,J=C,r=f,v={},A=0,O=null;d||(d=c.owner);a.P.call(g);a.a.Aa(g,a.j.fn);g.v=m;g.la=function(){return A};g.hc="function"===typeof c.write;g.K=function(){r()};g.Z=l;var y=g.Ta;g.Ta=function(a){y.call(g,a);g.ib=function(){g.kb(s);q=!0;g.lb(g)}};c.pure?(x=E=!0,g.va=function(){x&&(x=!1,k(!0))},g.nb=function(){g.yb()||(e(),x=q=!0)}):c.deferEvaluation&&(g.va=function(){m();delete g.va});a.A(g,"peek",g.v);a.A(g,"dispose",g.K);a.A(g,"isActive",g.Z);
a.A(g,"getDependenciesCount",g.la);w&&(z=!0,w.nodeType&&(J=function(){return!a.a.Ja(w)||C&&C()}));x||c.deferEvaluation||k();w&&l()&&w.nodeType&&(r=function(){a.a.w.Kb(w,r);f()},a.a.w.da(w,r));return g};a.jc=function(b){return a.Ma(b,a.j)};B=a.p.rc;a.j[B]=a.p;a.j.fn={equalityComparer:H};a.j.fn[B]=a.j;a.a.xa&&a.a.za(a.j.fn,a.P.fn);a.b("dependentObservable",a.j);a.b("computed",a.j);a.b("isComputed",a.jc);a.Ib=function(b,d){if("function"===typeof b)return a.s(b,d,{pure:!0});b=a.a.extend({},b);b.pure=
!0;return a.s(b,d)};a.b("pureComputed",a.Ib);(function(){function b(a,f,h){h=h||new c;a=f(a);if("object"!=typeof a||null===a||a===n||a instanceof Date||a instanceof String||a instanceof Number||a instanceof Boolean)return a;var k=a instanceof Array?[]:{};h.save(a,k);d(a,function(c){var d=f(a[c]);switch(typeof d){case "boolean":case "number":case "string":case "function":k[c]=d;break;case "object":case "undefined":var l=h.get(d);k[c]=l!==n?l:b(d,f,h)}});return k}function d(a,b){if(a instanceof Array){for(var c=
0;c<a.length;c++)b(c);"function"==typeof a.toJSON&&b("toJSON")}else for(c in a)b(c)}function c(){this.keys=[];this.hb=[]}a.Qb=function(c){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return b(c,function(b){for(var c=0;a.C(b)&&10>c;c++)b=b();return b})};a.toJSON=function(b,c,d){b=a.Qb(b);return a.a.eb(b,c,d)};c.prototype={save:function(b,c){var d=a.a.m(this.keys,b);0<=d?this.hb[d]=c:(this.keys.push(b),this.hb.push(c))},get:function(b){b=a.a.m(this.keys,
b);return 0<=b?this.hb[b]:n}}})();a.b("toJS",a.Qb);a.b("toJSON",a.toJSON);(function(){a.i={q:function(b){switch(a.a.t(b)){case "option":return!0===b.__ko__hasDomDataOptionValue__?a.a.e.get(b,a.d.options.Va):7>=a.a.L?b.getAttributeNode("value")&&b.getAttributeNode("value").specified?b.value:b.text:b.value;case "select":return 0<=b.selectedIndex?a.i.q(b.options[b.selectedIndex]):n;default:return b.value}},ca:function(b,d,c){switch(a.a.t(b)){case "option":switch(typeof d){case "string":a.a.e.set(b,a.d.options.Va,
n);"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__;b.value=d;break;default:a.a.e.set(b,a.d.options.Va,d),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===typeof d?d:""}break;case "select":if(""===d||null===d)d=n;for(var e=-1,f=0,h=b.options.length,k;f<h;++f)if(k=a.i.q(b.options[f]),k==d||""==k&&d===n){e=f;break}if(c||0<=e||d===n&&1<b.size)b.selectedIndex=e;break;default:if(null===d||d===n)d="";b.value=d}}}})();a.b("selectExtensions",a.i);a.b("selectExtensions.readValue",
a.i.q);a.b("selectExtensions.writeValue",a.i.ca);a.h=function(){function b(b){b=a.a.cb(b);123===b.charCodeAt(0)&&(b=b.slice(1,-1));var c=[],d=b.match(e),s,k,p=0;if(d){d.push(",");for(var z=0,u;u=d[z];++z){var t=u.charCodeAt(0);if(44===t){if(0>=p){s&&c.push(k?{key:s,value:k.join("")}:{unknown:s});s=k=p=0;continue}}else if(58===t){if(!k)continue}else if(47===t&&z&&1<u.length)(t=d[z-1].match(f))&&!h[t[0]]&&(b=b.substr(b.indexOf(u)+1),d=b.match(e),d.push(","),z=-1,u="/");else if(40===t||123===t||91===
t)++p;else if(41===t||125===t||93===t)--p;else if(!s&&!k){s=34===t||39===t?u.slice(1,-1):u;continue}k?k.push(u):k=[u]}}return c}var d=["true","false","null","undefined"],c=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,e=RegExp("\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|/(?:[^/\\\\]|\\\\.)*/w*|[^\\s:,/][^,\"'{}()/:[\\]]*[^\\s,\"'{}()/:[\\]]|[^\\s]","g"),f=/[\])"'A-Za-z0-9_$]+$/,h={"in":1,"return":1,"typeof":1},k={};return{ha:[],V:k,Wa:b,ya:function(g,m){function l(b,g){var m;if(!z){var u=
a.getBindingHandler(b);if(u&&u.preprocess&&!(g=u.preprocess(g,b,l)))return;if(u=k[b])m=g,0<=a.a.m(d,m)?m=!1:(u=m.match(c),m=null===u?!1:u[1]?"Object("+u[1]+")"+u[2]:m),u=m;u&&f.push("'"+b+"':function(_z){"+m+"=_z}")}h&&(g="function(){return "+g+" }");e.push("'"+b+"':"+g)}m=m||{};var e=[],f=[],h=m.valueAccessors,z=m.bindingParams,u="string"===typeof g?b(g):g;a.a.u(u,function(a){l(a.key||a.unknown,a.value)});f.length&&l("_ko_property_writers","{"+f.join(",")+" }");return e.join(",")},lc:function(a,
b){for(var c=0;c<a.length;c++)if(a[c].key==b)return!0;return!1},pa:function(b,c,d,e,f){if(b&&a.C(b))!a.Ra(b)||f&&b.v()===e||b(e);else if((b=c.get("_ko_property_writers"))&&b[d])b[d](e)}}}();a.b("expressionRewriting",a.h);a.b("expressionRewriting.bindingRewriteValidators",a.h.ha);a.b("expressionRewriting.parseObjectLiteral",a.h.Wa);a.b("expressionRewriting.preProcessBindings",a.h.ya);a.b("expressionRewriting._twoWayBindings",a.h.V);a.b("jsonExpressionRewriting",a.h);a.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",
a.h.ya);(function(){function b(a){return 8==a.nodeType&&h.test(f?a.text:a.nodeValue)}function d(a){return 8==a.nodeType&&k.test(f?a.text:a.nodeValue)}function c(a,c){for(var g=a,e=1,f=[];g=g.nextSibling;){if(d(g)&&(e--,0===e))return f;f.push(g);b(g)&&e++}if(!c)throw Error("Cannot find closing comment tag to match: "+a.nodeValue);return null}function e(a,b){var d=c(a,b);return d?0<d.length?d[d.length-1].nextSibling:a.nextSibling:null}var f=y&&"\x3c!--test--\x3e"===y.createComment("test").text,h=f?
/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,k=f?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,g={ul:!0,ol:!0};a.f={Q:{},childNodes:function(a){return b(a)?c(a):a.childNodes},ja:function(c){if(b(c)){c=a.f.childNodes(c);for(var d=0,g=c.length;d<g;d++)a.removeNode(c[d])}else a.a.Ka(c)},T:function(c,d){if(b(c)){a.f.ja(c);for(var g=c.nextSibling,e=0,f=d.length;e<f;e++)g.parentNode.insertBefore(d[e],g)}else a.a.T(c,d)},Hb:function(a,c){b(a)?a.parentNode.insertBefore(c,a.nextSibling):
a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)},Bb:function(c,d,g){g?b(c)?c.parentNode.insertBefore(d,g.nextSibling):g.nextSibling?c.insertBefore(d,g.nextSibling):c.appendChild(d):a.f.Hb(c,d)},firstChild:function(a){return b(a)?!a.nextSibling||d(a.nextSibling)?null:a.nextSibling:a.firstChild},nextSibling:function(a){b(a)&&(a=e(a));return a.nextSibling&&d(a.nextSibling)?null:a.nextSibling},gc:b,wc:function(a){return(a=(f?a.text:a.nodeValue).match(h))?a[1]:null},Fb:function(c){if(g[a.a.t(c)]){var l=
c.firstChild;if(l){do if(1===l.nodeType){var f;f=l.firstChild;var h=null;if(f){do if(h)h.push(f);else if(b(f)){var k=e(f,!0);k?f=k:h=[f]}else d(f)&&(h=[f]);while(f=f.nextSibling)}if(f=h)for(h=l.nextSibling,k=0;k<f.length;k++)h?c.insertBefore(f[k],h):c.appendChild(f[k])}while(l=l.nextSibling)}}}}})();a.b("virtualElements",a.f);a.b("virtualElements.allowedBindings",a.f.Q);a.b("virtualElements.emptyNode",a.f.ja);a.b("virtualElements.insertAfter",a.f.Bb);a.b("virtualElements.prepend",a.f.Hb);a.b("virtualElements.setDomNodeChildren",
a.f.T);(function(){a.J=function(){this.Yb={}};a.a.extend(a.J.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case 1:return null!=b.getAttribute("data-bind")||a.g.getComponentNameForNode(b);case 8:return a.f.gc(b);default:return!1}},getBindings:function(b,d){var c=this.getBindingsString(b,d),c=c?this.parseBindingsString(c,d,b):null;return a.g.mb(c,b,d,!1)},getBindingAccessors:function(b,d){var c=this.getBindingsString(b,d),c=c?this.parseBindingsString(c,d,b,{valueAccessors:!0}):null;return a.g.mb(c,
b,d,!0)},getBindingsString:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind");case 8:return a.f.wc(b);default:return null}},parseBindingsString:function(b,d,c,e){try{var f=this.Yb,h=b+(e&&e.valueAccessors||""),k;if(!(k=f[h])){var g,m="with($context){with($data||{}){return{"+a.h.ya(b,e)+"}}}";g=new Function("$context","$element",m);k=f[h]=g}return k(d,c)}catch(l){throw l.message="Unable to parse bindings.\nBindings value: "+b+"\nMessage: "+l.message,l;}}});a.J.instance=new a.J})();
a.b("bindingProvider",a.J);(function(){function b(a){return function(){return a}}function d(a){return a()}function c(b){return a.a.na(a.k.B(b),function(a,c){return function(){return b()[c]}})}function e(d,g,e){return"function"===typeof d?c(d.bind(null,g,e)):a.a.na(d,b)}function f(a,b){return c(this.getBindings.bind(this,a,b))}function h(b,c,d){var g,e=a.f.firstChild(c),l=a.J.instance,f=l.preprocessNode;if(f){for(;g=e;)e=a.f.nextSibling(g),f.call(l,g);e=a.f.firstChild(c)}for(;g=e;)e=a.f.nextSibling(g),
k(b,g,d)}function k(b,c,d){var g=!0,e=1===c.nodeType;e&&a.f.Fb(c);if(e&&d||a.J.instance.nodeHasBindings(c))g=m(c,null,b,d).shouldBindDescendants;g&&!s[a.a.t(c)]&&h(b,c,!e)}function g(b){var c=[],d={},g=[];a.a.G(b,function G(e){if(!d[e]){var l=a.getBindingHandler(e);l&&(l.after&&(g.push(e),a.a.u(l.after,function(c){if(b[c]){if(-1!==a.a.m(g,c))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+g.join(", "));G(c)}}),g.length--),c.push({key:e,zb:l}));d[e]=!0}});
return c}function m(b,c,e,l){var m=a.a.e.get(b,q);if(!c){if(m)throw Error("You cannot apply bindings multiple times to the same element.");a.a.e.set(b,q,!0)}!m&&l&&a.Ob(b,e);var h;if(c&&"function"!==typeof c)h=c;else{var k=a.J.instance,s=k.getBindingAccessors||f,p=a.j(function(){(h=c?c(e,b):s.call(k,b,e))&&e.I&&e.I();return h},null,{o:b});h&&p.Z()||(p=null)}var r;if(h){var v=p?function(a){return function(){return d(p()[a])}}:function(a){return h[a]},A=function(){return a.a.na(p?p():h,d)};A.get=function(a){return h[a]&&
d(v(a))};A.has=function(a){return a in h};l=g(h);a.a.u(l,function(c){var d=c.zb.init,g=c.zb.update,l=c.key;if(8===b.nodeType&&!a.f.Q[l])throw Error("The binding '"+l+"' cannot be used with virtual elements");try{"function"==typeof d&&a.k.B(function(){var a=d(b,v(l),A,e.$data,e);if(a&&a.controlsDescendantBindings){if(r!==n)throw Error("Multiple bindings ("+r+" and "+l+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");r=l}}),
"function"==typeof g&&a.j(function(){g(b,v(l),A,e.$data,e)},null,{o:b})}catch(f){throw f.message='Unable to process binding "'+l+": "+h[l]+'"\nMessage: '+f.message,f;}})}return{shouldBindDescendants:r===n}}function l(b){return b&&b instanceof a.N?b:new a.N(b)}a.d={};var s={script:!0};a.getBindingHandler=function(b){return a.d[b]};a.N=function(b,c,d,g){var e=this,l="function"==typeof b&&!a.C(b),f,m=a.j(function(){var f=l?b():b,h=a.a.c(f);c?(c.I&&c.I(),a.a.extend(e,c),m&&(e.I=m)):(e.$parents=[],e.$root=
h,e.ko=a);e.$rawData=f;e.$data=h;d&&(e[d]=h);g&&g(e,c,h);return e.$data},null,{Ia:function(){return f&&!a.a.ob(f)},o:!0});m.Z()&&(e.I=m,m.equalityComparer=null,f=[],m.Tb=function(b){f.push(b);a.a.w.da(b,function(b){a.a.ua(f,b);f.length||(m.K(),e.I=m=n)})})};a.N.prototype.createChildContext=function(b,c,d){return new a.N(b,this,c,function(a,b){a.$parentContext=b;a.$parent=b.$data;a.$parents=(b.$parents||[]).slice(0);a.$parents.unshift(a.$parent);d&&d(a)})};a.N.prototype.extend=function(b){return new a.N(this.I||
this.$data,this,null,function(c,d){c.$rawData=d.$rawData;a.a.extend(c,"function"==typeof b?b():b)})};var q=a.a.e.F(),p=a.a.e.F();a.Ob=function(b,c){if(2==arguments.length)a.a.e.set(b,p,c),c.I&&c.I.Tb(b);else return a.a.e.get(b,p)};a.ra=function(b,c,d){1===b.nodeType&&a.f.Fb(b);return m(b,c,l(d),!0)};a.Wb=function(b,c,d){d=l(d);return a.ra(b,e(c,d,b),d)};a.Ca=function(a,b){1!==b.nodeType&&8!==b.nodeType||h(l(a),b,!0)};a.pb=function(a,b){!r&&v.jQuery&&(r=v.jQuery);if(b&&1!==b.nodeType&&8!==b.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");
b=b||v.document.body;k(l(a),b,!0)};a.Ha=function(b){switch(b.nodeType){case 1:case 8:var c=a.Ob(b);if(c)return c;if(b.parentNode)return a.Ha(b.parentNode)}return n};a.$b=function(b){return(b=a.Ha(b))?b.$data:n};a.b("bindingHandlers",a.d);a.b("applyBindings",a.pb);a.b("applyBindingsToDescendants",a.Ca);a.b("applyBindingAccessorsToNode",a.ra);a.b("applyBindingsToNode",a.Wb);a.b("contextFor",a.Ha);a.b("dataFor",a.$b)})();(function(b){function d(d,g){var e=f.hasOwnProperty(d)?f[d]:b,l;e||(e=f[d]=new a.P,
c(d,function(a){h[d]=a;delete f[d];l?e.notifySubscribers(a):setTimeout(function(){e.notifySubscribers(a)},0)}),l=!0);e.U(g)}function c(a,b){e("getConfig",[a],function(c){c?e("loadComponent",[a,c],function(a){b(a)}):b(null)})}function e(c,d,f,l){l||(l=a.g.loaders.slice(0));var h=l.shift();if(h){var q=h[c];if(q){var p=!1;if(q.apply(h,d.concat(function(a){p?f(null):null!==a?f(a):e(c,d,f,l)}))!==b&&(p=!0,!h.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");
}else e(c,d,f,l)}else f(null)}var f={},h={};a.g={get:function(a,c){var e=h.hasOwnProperty(a)?h[a]:b;e?setTimeout(function(){c(e)},0):d(a,c)},tb:function(a){delete h[a]},jb:e};a.g.loaders=[];a.b("components",a.g);a.b("components.get",a.g.get);a.b("components.clearCachedDefinition",a.g.tb)})();(function(){function b(b,c,d,e){function h(){0===--u&&e(k)}var k={},u=2,t=d.template;d=d.viewModel;t?f(c,t,function(c){a.g.jb("loadTemplate",[b,c],function(a){k.template=a;h()})}):h();d?f(c,d,function(c){a.g.jb("loadViewModel",
[b,c],function(a){k[g]=a;h()})}):h()}function d(a,b,c){if("function"===typeof b)c(function(a){return new b(a)});else if("function"===typeof b[g])c(b[g]);else if("instance"in b){var e=b.instance;c(function(){return e})}else"viewModel"in b?d(a,b.viewModel,c):a("Unknown viewModel value: "+b)}function c(b){switch(a.a.t(b)){case "script":return a.a.ba(b.text);case "textarea":return a.a.ba(b.value);case "template":if(e(b.content))return a.a.ia(b.content.childNodes)}return a.a.ia(b.childNodes)}function e(a){return v.DocumentFragment?
a instanceof DocumentFragment:a&&11===a.nodeType}function f(a,b,c){"string"===typeof b.require?N||v.require?(N||v.require)([b.require],c):a("Uses require, but no AMD loader is present"):c(b)}function h(a){return function(b){throw Error("Component '"+a+"': "+b);}}var k={};a.g.register=function(b,c){if(!c)throw Error("Invalid configuration for "+b);if(a.g.Qa(b))throw Error("Component "+b+" is already registered");k[b]=c};a.g.Qa=function(a){return a in k};a.g.vc=function(b){delete k[b];a.g.tb(b)};a.g.ub=
{getConfig:function(a,b){b(k.hasOwnProperty(a)?k[a]:null)},loadComponent:function(a,c,d){var e=h(a);f(e,c,function(c){b(a,e,c,d)})},loadTemplate:function(b,d,g){b=h(b);if("string"===typeof d)g(a.a.ba(d));else if(d instanceof Array)g(d);else if(e(d))g(a.a.S(d.childNodes));else if(d.element)if(d=d.element,v.HTMLElement?d instanceof HTMLElement:d&&d.tagName&&1===d.nodeType)g(c(d));else if("string"===typeof d){var f=y.getElementById(d);f?g(c(f)):b("Cannot find element with ID "+d)}else b("Unknown element type: "+
d);else b("Unknown template value: "+d)},loadViewModel:function(a,b,c){d(h(a),b,c)}};var g="createViewModel";a.b("components.register",a.g.register);a.b("components.isRegistered",a.g.Qa);a.b("components.unregister",a.g.vc);a.b("components.defaultLoader",a.g.ub);a.g.loaders.push(a.g.ub);a.g.Ub=k})();(function(){function b(b,e){var f=b.getAttribute("params");if(f){var f=d.parseBindingsString(f,e,b,{valueAccessors:!0,bindingParams:!0}),f=a.a.na(f,function(d){return a.s(d,null,{o:b})}),h=a.a.na(f,function(d){return d.Z()?
a.s(function(){return a.a.c(d())},null,{o:b}):d.v()});h.hasOwnProperty("$raw")||(h.$raw=f);return h}return{$raw:{}}}a.g.getComponentNameForNode=function(b){b=a.a.t(b);return a.g.Qa(b)&&b};a.g.mb=function(c,d,f,h){if(1===d.nodeType){var k=a.g.getComponentNameForNode(d);if(k){c=c||{};if(c.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var g={name:k,params:b(d,f)};c.component=h?function(){return g}:g}}return c};var d=new a.J;9>a.a.L&&(a.g.register=
function(a){return function(b){y.createElement(b);return a.apply(this,arguments)}}(a.g.register),y.createDocumentFragment=function(b){return function(){var d=b(),f=a.g.Ub,h;for(h in f)f.hasOwnProperty(h)&&d.createElement(h);return d}}(y.createDocumentFragment))})();(function(){var b=0;a.d.component={init:function(d,c,e,f,h){function k(){var a=g&&g.dispose;"function"===typeof a&&a.call(g);m=null}var g,m;a.a.w.da(d,k);a.s(function(){var e=a.a.c(c()),f,q;"string"===typeof e?f=e:(f=a.a.c(e.name),q=a.a.c(e.params));
if(!f)throw Error("No component name specified");var p=m=++b;a.g.get(f,function(b){if(m===p){k();if(!b)throw Error("Unknown component '"+f+"'");var c=b.template;if(!c)throw Error("Component '"+f+"' has no template");c=a.a.ia(c);a.f.T(d,c);var c=q,e=b.createViewModel;b=e?e.call(b,c,{element:d}):c;c=h.createChildContext(b);g=b;a.Ca(c,d)}})},null,{o:d});return{controlsDescendantBindings:!0}}};a.f.Q.component=!0})();var P={"class":"className","for":"htmlFor"};a.d.attr={update:function(b,d){var c=a.a.c(d())||
{};a.a.G(c,function(c,d){d=a.a.c(d);var h=!1===d||null===d||d===n;h&&b.removeAttribute(c);8>=a.a.L&&c in P?(c=P[c],h?b.removeAttribute(c):b[c]=d):h||b.setAttribute(c,d.toString());"name"===c&&a.a.Mb(b,h?"":d.toString())})}};(function(){a.d.checked={after:["value","attr"],init:function(b,d,c){function e(){var e=b.checked,f=s?h():e;if(!a.Y.ma()&&(!g||e)){var k=a.k.B(d);m?l!==f?(e&&(a.a.ea(k,f,!0),a.a.ea(k,l,!1)),l=f):a.a.ea(k,f,e):a.h.pa(k,c,"checked",f,!0)}}function f(){var c=a.a.c(d());b.checked=
m?0<=a.a.m(c,h()):k?c:h()===c}var h=a.Ib(function(){return c.has("checkedValue")?a.a.c(c.get("checkedValue")):c.has("value")?a.a.c(c.get("value")):b.value}),k="checkbox"==b.type,g="radio"==b.type;if(k||g){var m=k&&a.a.c(d())instanceof Array,l=m?h():n,s=g||m;g&&!b.name&&a.d.uniqueName.init(b,function(){return!0});a.s(e,null,{o:b});a.a.n(b,"click",e);a.s(f,null,{o:b})}}};a.h.V.checked=!0;a.d.checkedValue={update:function(b,d){b.value=a.a.c(d())}}})();a.d.css={update:function(b,d){var c=a.a.c(d());"object"==
typeof c?a.a.G(c,function(c,d){d=a.a.c(d);a.a.Ba(b,c,d)}):(c=String(c||""),a.a.Ba(b,b.__ko__cssValue,!1),b.__ko__cssValue=c,a.a.Ba(b,c,!0))}};a.d.enable={update:function(b,d){var c=a.a.c(d());c&&b.disabled?b.removeAttribute("disabled"):c||b.disabled||(b.disabled=!0)}};a.d.disable={update:function(b,d){a.d.enable.update(b,function(){return!a.a.c(d())})}};a.d.event={init:function(b,d,c,e,f){var h=d()||{};a.a.G(h,function(h){"string"==typeof h&&a.a.n(b,h,function(b){var m,l=d()[h];if(l){try{var s=a.a.S(arguments);
e=f.$data;s.unshift(e);m=l.apply(e,s)}finally{!0!==m&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}!1===c.get(h+"Bubble")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};a.d.foreach={Eb:function(b){return function(){var d=b(),c=a.a.Xa(d);if(!c||"number"==typeof c.length)return{foreach:d,templateEngine:a.O.Oa};a.a.c(d);return{foreach:c.data,as:c.as,includeDestroyed:c.includeDestroyed,afterAdd:c.afterAdd,beforeRemove:c.beforeRemove,afterRender:c.afterRender,beforeMove:c.beforeMove,
afterMove:c.afterMove,templateEngine:a.O.Oa}}},init:function(b,d){return a.d.template.init(b,a.d.foreach.Eb(d))},update:function(b,d,c,e,f){return a.d.template.update(b,a.d.foreach.Eb(d),c,e,f)}};a.h.ha.foreach=!1;a.f.Q.foreach=!0;a.d.hasfocus={init:function(b,d,c){function e(e){b.__ko_hasfocusUpdating=!0;var g=b.ownerDocument;if("activeElement"in g){var f;try{f=g.activeElement}catch(h){f=g.body}e=f===b}g=d();a.h.pa(g,c,"hasfocus",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var f=
e.bind(null,!0),h=e.bind(null,!1);a.a.n(b,"focus",f);a.a.n(b,"focusin",f);a.a.n(b,"blur",h);a.a.n(b,"focusout",h)},update:function(b,d){var c=!!a.a.c(d());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===c||(c?b.focus():b.blur(),a.k.B(a.a.oa,null,[b,c?"focusin":"focusout"]))}};a.h.V.hasfocus=!0;a.d.hasFocus=a.d.hasfocus;a.h.V.hasFocus=!0;a.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,d){a.a.$a(b,d())}};I("if");I("ifnot",!1,!0);I("with",!0,!1,function(a,d){return a.createChildContext(d)});
var K={};a.d.options={init:function(b){if("select"!==a.a.t(b))throw Error("options binding applies only to SELECT elements");for(;0<b.length;)b.remove(0);return{controlsDescendantBindings:!0}},update:function(b,d,c){function e(){return a.a.ta(b.options,function(a){return a.selected})}function f(a,b,c){var d=typeof b;return"function"==d?b(a):"string"==d?a[b]:c}function h(c,d){if(s.length){var e=0<=a.a.m(s,a.i.q(d[0]));a.a.Nb(d[0],e);q&&!e&&a.k.B(a.a.oa,null,[b,"change"])}}var k=0!=b.length&&b.multiple?
b.scrollTop:null,g=a.a.c(d()),m=c.get("optionsIncludeDestroyed");d={};var l,s;s=b.multiple?a.a.Da(e(),a.i.q):0<=b.selectedIndex?[a.i.q(b.options[b.selectedIndex])]:[];g&&("undefined"==typeof g.length&&(g=[g]),l=a.a.ta(g,function(b){return m||b===n||null===b||!a.a.c(b._destroy)}),c.has("optionsCaption")&&(g=a.a.c(c.get("optionsCaption")),null!==g&&g!==n&&l.unshift(K)));var q=!1;d.beforeRemove=function(a){b.removeChild(a)};g=h;c.has("optionsAfterRender")&&(g=function(b,d){h(0,d);a.k.B(c.get("optionsAfterRender"),
null,[d[0],b!==K?b:n])});a.a.Za(b,l,function(d,e,g){g.length&&(s=g[0].selected?[a.i.q(g[0])]:[],q=!0);e=b.ownerDocument.createElement("option");d===K?(a.a.bb(e,c.get("optionsCaption")),a.i.ca(e,n)):(g=f(d,c.get("optionsValue"),d),a.i.ca(e,a.a.c(g)),d=f(d,c.get("optionsText"),g),a.a.bb(e,d));return[e]},d,g);a.k.B(function(){c.get("valueAllowUnset")&&c.has("value")?a.i.ca(b,a.a.c(c.get("value")),!0):(b.multiple?s.length&&e().length<s.length:s.length&&0<=b.selectedIndex?a.i.q(b.options[b.selectedIndex])!==
s[0]:s.length||0<=b.selectedIndex)&&a.a.oa(b,"change")});a.a.dc(b);k&&20<Math.abs(k-b.scrollTop)&&(b.scrollTop=k)}};a.d.options.Va=a.a.e.F();a.d.selectedOptions={after:["options","foreach"],init:function(b,d,c){a.a.n(b,"change",function(){var e=d(),f=[];a.a.u(b.getElementsByTagName("option"),function(b){b.selected&&f.push(a.i.q(b))});a.h.pa(e,c,"selectedOptions",f)})},update:function(b,d){if("select"!=a.a.t(b))throw Error("values binding applies only to SELECT elements");var c=a.a.c(d());c&&"number"==
typeof c.length&&a.a.u(b.getElementsByTagName("option"),function(b){var d=0<=a.a.m(c,a.i.q(b));a.a.Nb(b,d)})}};a.h.V.selectedOptions=!0;a.d.style={update:function(b,d){var c=a.a.c(d()||{});a.a.G(c,function(c,d){d=a.a.c(d);if(null===d||d===n||!1===d)d="";b.style[c]=d})}};a.d.submit={init:function(b,d,c,e,f){if("function"!=typeof d())throw Error("The value for a submit binding must be a function");a.a.n(b,"submit",function(a){var c,e=d();try{c=e.call(f.$data,b)}finally{!0!==c&&(a.preventDefault?a.preventDefault():
a.returnValue=!1)}})}};a.d.text={init:function(){return{controlsDescendantBindings:!0}},update:function(b,d){a.a.bb(b,d())}};a.f.Q.text=!0;(function(){if(v&&v.navigator)var b=function(a){if(a)return parseFloat(a[1])},d=v.opera&&v.opera.version&&parseInt(v.opera.version()),c=v.navigator.userAgent,e=b(c.match(/^(?:(?!chrome).)*version\/([^ ]*) safari/i)),f=b(c.match(/Firefox\/([^ ]*)/));if(10>a.a.L)var h=a.a.e.F(),k=a.a.e.F(),g=function(b){var c=this.activeElement;(c=c&&a.a.e.get(c,k))&&c(b)},m=function(b,
c){var d=b.ownerDocument;a.a.e.get(d,h)||(a.a.e.set(d,h,!0),a.a.n(d,"selectionchange",g));a.a.e.set(b,k,c)};a.d.textInput={init:function(b,c,g){function h(c,d){a.a.n(b,c,d)}function k(){var d=a.a.c(c());if(null===d||d===n)d="";v!==n&&d===v?setTimeout(k,4):b.value!==d&&(r=d,b.value=d)}function u(){x||(v=b.value,x=setTimeout(t,4))}function t(){clearTimeout(x);v=x=n;var d=b.value;r!==d&&(r=d,a.h.pa(c(),g,"textInput",d))}var r=b.value,x,v;10>a.a.L?(h("propertychange",function(a){"value"===a.propertyName&&
t()}),8==a.a.L&&(h("keyup",t),h("keydown",t)),8<=a.a.L&&(m(b,t),h("dragend",u))):(h("input",t),5>e&&"textarea"===a.a.t(b)?(h("keydown",u),h("paste",u),h("cut",u)):11>d?h("keydown",u):4>f&&(h("DOMAutoComplete",t),h("dragdrop",t),h("drop",t)));h("change",t);a.s(k,null,{o:b})}};a.h.V.textInput=!0;a.d.textinput={preprocess:function(a,b,c){c("textInput",a)}}})();a.d.uniqueName={init:function(b,d){if(d()){var c="ko_unique_"+ ++a.d.uniqueName.Zb;a.a.Mb(b,c)}}};a.d.uniqueName.Zb=0;a.d.value={after:["options",
"foreach"],init:function(b,d,c){if("input"!=b.tagName.toLowerCase()||"checkbox"!=b.type&&"radio"!=b.type){var e=["change"],f=c.get("valueUpdate"),h=!1,k=null;f&&("string"==typeof f&&(f=[f]),a.a.ga(e,f),e=a.a.rb(e));var g=function(){k=null;h=!1;var e=d(),g=a.i.q(b);a.h.pa(e,c,"value",g)};!a.a.L||"input"!=b.tagName.toLowerCase()||"text"!=b.type||"off"==b.autocomplete||b.form&&"off"==b.form.autocomplete||-1!=a.a.m(e,"propertychange")||(a.a.n(b,"propertychange",function(){h=!0}),a.a.n(b,"focus",function(){h=
!1}),a.a.n(b,"blur",function(){h&&g()}));a.a.u(e,function(c){var d=g;a.a.uc(c,"after")&&(d=function(){k=a.i.q(b);setTimeout(g,0)},c=c.substring(5));a.a.n(b,c,d)});var m=function(){var e=a.a.c(d()),g=a.i.q(b);if(null!==k&&e===k)setTimeout(m,0);else if(e!==g)if("select"===a.a.t(b)){var f=c.get("valueAllowUnset"),g=function(){a.i.ca(b,e,f)};g();f||e===a.i.q(b)?setTimeout(g,0):a.k.B(a.a.oa,null,[b,"change"])}else a.i.ca(b,e)};a.s(m,null,{o:b})}else a.ra(b,{checkedValue:d})},update:function(){}};a.h.V.value=
!0;a.d.visible={update:function(b,d){var c=a.a.c(d()),e="none"!=b.style.display;c&&!e?b.style.display="":!c&&e&&(b.style.display="none")}};(function(b){a.d[b]={init:function(d,c,e,f,h){return a.d.event.init.call(this,d,function(){var a={};a[b]=c();return a},e,f,h)}}})("click");a.H=function(){};a.H.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");};a.H.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock");};
a.H.prototype.makeTemplateSource=function(b,d){if("string"==typeof b){d=d||y;var c=d.getElementById(b);if(!c)throw Error("Cannot find template with ID "+b);return new a.r.l(c)}if(1==b.nodeType||8==b.nodeType)return new a.r.fa(b);throw Error("Unknown template type: "+b);};a.H.prototype.renderTemplate=function(a,d,c,e){a=this.makeTemplateSource(a,e);return this.renderTemplateSource(a,d,c)};a.H.prototype.isTemplateRewritten=function(a,d){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(a,
d).data("isRewritten")};a.H.prototype.rewriteTemplate=function(a,d,c){a=this.makeTemplateSource(a,c);d=d(a.text());a.text(d);a.data("isRewritten",!0)};a.b("templateEngine",a.H);a.fb=function(){function b(b,c,d,k){b=a.h.Wa(b);for(var g=a.h.ha,m=0;m<b.length;m++){var l=b[m].key;if(g.hasOwnProperty(l)){var s=g[l];if("function"===typeof s){if(l=s(b[m].value))throw Error(l);}else if(!s)throw Error("This template engine does not support the '"+l+"' binding within its templates");}}d="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+
a.h.ya(b,{valueAccessors:!0})+" } })()},'"+d.toLowerCase()+"')";return k.createJavaScriptEvaluatorBlock(d)+c}var d=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,c=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{ec:function(b,c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.fb.nc(b,c)},d)},nc:function(a,f){return a.replace(d,function(a,c,d,e,l){return b(l,c,d,f)}).replace(c,function(a,c){return b(c,
"\x3c!-- ko --\x3e","#comment",f)})},Xb:function(b,c){return a.D.Ua(function(d,k){var g=d.nextSibling;g&&g.nodeName.toLowerCase()===c&&a.ra(g,b,k)})}}}();a.b("__tr_ambtns",a.fb.Xb);(function(){a.r={};a.r.l=function(a){this.l=a};a.r.l.prototype.text=function(){var b=a.a.t(this.l),b="script"===b?"text":"textarea"===b?"value":"innerHTML";if(0==arguments.length)return this.l[b];var d=arguments[0];"innerHTML"===b?a.a.$a(this.l,d):this.l[b]=d};var b=a.a.e.F()+"_";a.r.l.prototype.data=function(c){if(1===
arguments.length)return a.a.e.get(this.l,b+c);a.a.e.set(this.l,b+c,arguments[1])};var d=a.a.e.F();a.r.fa=function(a){this.l=a};a.r.fa.prototype=new a.r.l;a.r.fa.prototype.text=function(){if(0==arguments.length){var b=a.a.e.get(this.l,d)||{};b.gb===n&&b.Ga&&(b.gb=b.Ga.innerHTML);return b.gb}a.a.e.set(this.l,d,{gb:arguments[0]})};a.r.l.prototype.nodes=function(){if(0==arguments.length)return(a.a.e.get(this.l,d)||{}).Ga;a.a.e.set(this.l,d,{Ga:arguments[0]})};a.b("templateSources",a.r);a.b("templateSources.domElement",
a.r.l);a.b("templateSources.anonymousTemplate",a.r.fa)})();(function(){function b(b,c,d){var e;for(c=a.f.nextSibling(c);b&&(e=b)!==c;)b=a.f.nextSibling(e),d(e,b)}function d(c,d){if(c.length){var e=c[0],f=c[c.length-1],h=e.parentNode,k=a.J.instance,n=k.preprocessNode;if(n){b(e,f,function(a,b){var c=a.previousSibling,d=n.call(k,a);d&&(a===e&&(e=d[0]||b),a===f&&(f=d[d.length-1]||c))});c.length=0;if(!e)return;e===f?c.push(e):(c.push(e,f),a.a.ka(c,h))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||
a.pb(d,b)});b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.D.Sb(b,[d])});a.a.ka(c,h)}}function c(a){return a.nodeType?a:0<a.length?a[0]:null}function e(b,e,f,k,q){q=q||{};var p=b&&c(b),p=p&&p.ownerDocument,n=q.templateEngine||h;a.fb.ec(f,n,p);f=n.renderTemplate(f,k,q,p);if("number"!=typeof f.length||0<f.length&&"number"!=typeof f[0].nodeType)throw Error("Template engine must return an array of DOM nodes");p=!1;switch(e){case "replaceChildren":a.f.T(b,f);p=!0;break;case "replaceNode":a.a.Lb(b,
f);p=!0;break;case "ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+e);}p&&(d(f,k),q.afterRender&&a.k.B(q.afterRender,null,[f,k.$data]));return f}function f(b,c,d){return a.C(b)?b():"function"===typeof b?b(c,d):b}var h;a.ab=function(b){if(b!=n&&!(b instanceof a.H))throw Error("templateEngine must inherit from ko.templateEngine");h=b};a.Ya=function(b,d,k,s,q){k=k||{};if((k.templateEngine||h)==n)throw Error("Set a template engine before calling renderTemplate");q=q||"replaceChildren";
if(s){var p=c(s);return a.j(function(){var h=d&&d instanceof a.N?d:new a.N(a.a.c(d)),n=f(b,h.$data,h),h=e(s,q,n,h,k);"replaceNode"==q&&(s=h,p=c(s))},null,{Ia:function(){return!p||!a.a.Ja(p)},o:p&&"replaceNode"==q?p.parentNode:p})}return a.D.Ua(function(c){a.Ya(b,d,k,c,"replaceNode")})};a.tc=function(b,c,h,k,q){function p(a,b){d(b,u);h.afterRender&&h.afterRender(b,a)}function r(a,c){u=q.createChildContext(a,h.as,function(a){a.$index=c});var d=f(b,a,u);return e(null,"ignoreTargetNode",d,u,h)}var u;
return a.j(function(){var b=a.a.c(c)||[];"undefined"==typeof b.length&&(b=[b]);b=a.a.ta(b,function(b){return h.includeDestroyed||b===n||null===b||!a.a.c(b._destroy)});a.k.B(a.a.Za,null,[k,b,r,h,p])},null,{o:k})};var k=a.a.e.F();a.d.template={init:function(b,c){var d=a.a.c(c());"string"==typeof d||d.name?a.f.ja(b):(d=a.f.childNodes(b),d=a.a.oc(d),(new a.r.fa(b)).nodes(d));return{controlsDescendantBindings:!0}},update:function(b,c,d,e,f){var h=c(),r;c=a.a.c(h);d=!0;e=null;"string"==typeof c?c={}:(h=
c.name,"if"in c&&(d=a.a.c(c["if"])),d&&"ifnot"in c&&(d=!a.a.c(c.ifnot)),r=a.a.c(c.data));"foreach"in c?e=a.tc(h||b,d&&c.foreach||[],c,b,f):d?(f="data"in c?f.createChildContext(r,c.as):f,e=a.Ya(h||b,f,c,b)):a.f.ja(b);f=e;(r=a.a.e.get(b,k))&&"function"==typeof r.K&&r.K();a.a.e.set(b,k,f&&f.Z()?f:n)}};a.h.ha.template=function(b){b=a.h.Wa(b);return 1==b.length&&b[0].unknown||a.h.lc(b,"name")?null:"This template engine does not support anonymous templates nested within its templates"};a.f.Q.template=!0})();
a.b("setTemplateEngine",a.ab);a.b("renderTemplate",a.Ya);a.a.wb=function(a,d,c){if(a.length&&d.length){var e,f,h,k,g;for(e=f=0;(!c||e<c)&&(k=a[f]);++f){for(h=0;g=d[h];++h)if(k.value===g.value){k.moved=g.index;g.moved=k.index;d.splice(h,1);e=h=0;break}e+=h}}};a.a.Fa=function(){function b(b,c,e,f,h){var k=Math.min,g=Math.max,m=[],l,n=b.length,q,p=c.length,r=p-n||1,u=n+p+1,t,v,x;for(l=0;l<=n;l++)for(v=t,m.push(t=[]),x=k(p,l+r),q=g(0,l-1);q<=x;q++)t[q]=q?l?b[l-1]===c[q-1]?v[q-1]:k(v[q]||u,t[q-1]||u)+
1:q+1:l+1;k=[];g=[];r=[];l=n;for(q=p;l||q;)p=m[l][q]-1,q&&p===m[l][q-1]?g.push(k[k.length]={status:e,value:c[--q],index:q}):l&&p===m[l-1][q]?r.push(k[k.length]={status:f,value:b[--l],index:l}):(--q,--l,h.sparse||k.push({status:"retained",value:c[q]}));a.a.wb(g,r,10*n);return k.reverse()}return function(a,c,e){e="boolean"===typeof e?{dontLimitMoves:e}:e||{};a=a||[];c=c||[];return a.length<=c.length?b(a,c,"added","deleted",e):b(c,a,"deleted","added",e)}}();a.b("utils.compareArrays",a.a.Fa);(function(){function b(b,
d,f,h,k){var g=[],m=a.j(function(){var l=d(f,k,a.a.ka(g,b))||[];0<g.length&&(a.a.Lb(g,l),h&&a.k.B(h,null,[f,l,k]));g.length=0;a.a.ga(g,l)},null,{o:b,Ia:function(){return!a.a.ob(g)}});return{$:g,j:m.Z()?m:n}}var d=a.a.e.F();a.a.Za=function(c,e,f,h,k){function g(b,d){w=s[d];t!==d&&(y[b]=w);w.Na(t++);a.a.ka(w.$,c);r.push(w);x.push(w)}function m(b,c){if(b)for(var d=0,e=c.length;d<e;d++)c[d]&&a.a.u(c[d].$,function(a){b(a,d,c[d].sa)})}e=e||[];h=h||{};var l=a.a.e.get(c,d)===n,s=a.a.e.get(c,d)||[],q=a.a.Da(s,
function(a){return a.sa}),p=a.a.Fa(q,e,h.dontLimitMoves),r=[],u=0,t=0,v=[],x=[];e=[];for(var y=[],q=[],w,C=0,B,D;B=p[C];C++)switch(D=B.moved,B.status){case "deleted":D===n&&(w=s[u],w.j&&w.j.K(),v.push.apply(v,a.a.ka(w.$,c)),h.beforeRemove&&(e[C]=w,x.push(w)));u++;break;case "retained":g(C,u++);break;case "added":D!==n?g(C,D):(w={sa:B.value,Na:a.p(t++)},r.push(w),x.push(w),l||(q[C]=w))}m(h.beforeMove,y);a.a.u(v,h.beforeRemove?a.R:a.removeNode);for(var C=0,l=a.f.firstChild(c),F;w=x[C];C++){w.$||a.a.extend(w,
b(c,f,w.sa,k,w.Na));for(u=0;p=w.$[u];l=p.nextSibling,F=p,u++)p!==l&&a.f.Bb(c,p,F);!w.ic&&k&&(k(w.sa,w.$,w.Na),w.ic=!0)}m(h.beforeRemove,e);m(h.afterMove,y);m(h.afterAdd,q);a.a.e.set(c,d,r)}})();a.b("utils.setDomNodeChildrenFromArrayMapping",a.a.Za);a.O=function(){this.allowTemplateRewriting=!1};a.O.prototype=new a.H;a.O.prototype.renderTemplateSource=function(b){var d=(9>a.a.L?0:b.nodes)?b.nodes():null;if(d)return a.a.S(d.cloneNode(!0).childNodes);b=b.text();return a.a.ba(b)};a.O.Oa=new a.O;a.ab(a.O.Oa);
a.b("nativeTemplateEngine",a.O);(function(){a.Sa=function(){var a=this.kc=function(){if(!r||!r.tmpl)return 0;try{if(0<=r.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(b,e,f){f=f||{};if(2>a)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var h=b.data("precompiled");h||(h=b.text()||"",h=r.template(null,"{{ko_with $item.koBindingContext}}"+h+"{{/ko_with}}"),b.data("precompiled",h));
b=[e.$data];e=r.extend({koBindingContext:e},f.templateOptions);e=r.tmpl(h,b,e);e.appendTo(y.createElement("div"));r.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){y.write("<script type='text/html' id='"+a+"'>"+b+"\x3c/script>")};0<a&&(r.tmpl.tag.ko_code={open:"__.push($1 || '');"},r.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};a.Sa.prototype=new a.H;var b=new a.Sa;0<b.kc&&a.ab(b);a.b("jqueryTmplTemplateEngine",
a.Sa)})()})})();})();
...@@ -12,104 +12,81 @@ button { ...@@ -12,104 +12,81 @@ button {
font-size: 100%; font-size: 100%;
vertical-align: baseline; vertical-align: baseline;
font-family: inherit; font-family: inherit;
font-weight: inherit;
color: inherit; color: inherit;
-webkit-appearance: none; -webkit-appearance: none;
-ms-appearance: none; -ms-appearance: none;
-o-appearance: none;
appearance: none; appearance: none;
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased;
-ms-font-smoothing: antialiased;
font-smoothing: antialiased;
} }
body { body {
font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif;
line-height: 1.4em; line-height: 1.4em;
background: #eaeaea url('bg.png'); background: #f5f5f5;
color: #4d4d4d; color: #4d4d4d;
width: 550px; min-width: 230px;
max-width: 550px;
margin: 0 auto; margin: 0 auto;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased; -moz-font-smoothing: antialiased;
-ms-font-smoothing: antialiased; -ms-font-smoothing: antialiased;
-o-font-smoothing: antialiased;
font-smoothing: antialiased; font-smoothing: antialiased;
font-weight: 300;
} }
button, button,
input[type="checkbox"] { input[type="checkbox"] {
outline: none; outline: none;
}
.hidden {
display: none;
} }
#todoapp { #todoapp {
background: #fff; background: #fff;
background: rgba(255, 255, 255, 0.9);
margin: 130px 0 40px 0; margin: 130px 0 40px 0;
border: 1px solid #ccc;
position: relative; position: relative;
border-top-left-radius: 2px; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2),
border-top-right-radius: 2px; 0 25px 50px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2),
0 25px 50px 0 rgba(0, 0, 0, 0.15);
}
#todoapp:before {
content: '';
border-left: 1px solid #f5d6d6;
border-right: 1px solid #f5d6d6;
width: 2px;
position: absolute;
top: 0;
left: 40px;
height: 100%;
} }
#todoapp input::-webkit-input-placeholder { #todoapp input::-webkit-input-placeholder {
font-style: italic; font-style: italic;
font-weight: 300;
color: #e6e6e6;
} }
#todoapp input::-moz-placeholder { #todoapp input::-moz-placeholder {
font-style: italic; font-style: italic;
color: #a9a9a9; font-weight: 300;
color: #e6e6e6;
}
#todoapp input::input-placeholder {
font-style: italic;
font-weight: 300;
color: #e6e6e6;
} }
#todoapp h1 { #todoapp h1 {
position: absolute; position: absolute;
top: -120px; top: -155px;
width: 100%; width: 100%;
font-size: 70px; font-size: 100px;
font-weight: bold; font-weight: 100;
text-align: center; text-align: center;
color: #b3b3b3; color: rgba(175, 47, 47, 0.15);
color: rgba(255, 255, 255, 0.3);
text-shadow: -1px -1px rgba(0, 0, 0, 0.2);
-webkit-text-rendering: optimizeLegibility; -webkit-text-rendering: optimizeLegibility;
-moz-text-rendering: optimizeLegibility; -moz-text-rendering: optimizeLegibility;
-ms-text-rendering: optimizeLegibility; -ms-text-rendering: optimizeLegibility;
-o-text-rendering: optimizeLegibility;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
} }
#header {
padding-top: 15px;
border-radius: inherit;
}
#header:before {
content: '';
position: absolute;
top: 0;
right: 0;
left: 0;
height: 15px;
z-index: 2;
border-bottom: 1px solid #6c615c;
background: #8d7d77;
background: -webkit-gradient(linear, left top, left bottom, from(rgba(132, 110, 100, 0.8)),to(rgba(101, 84, 76, 0.8)));
background: -webkit-linear-gradient(top, rgba(132, 110, 100, 0.8), rgba(101, 84, 76, 0.8));
background: linear-gradient(top, rgba(132, 110, 100, 0.8), rgba(101, 84, 76, 0.8));
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#9d8b83', EndColorStr='#847670');
border-top-left-radius: 1px;
border-top-right-radius: 1px;
}
#new-todo, #new-todo,
.edit { .edit {
position: relative; position: relative;
...@@ -117,6 +94,7 @@ input[type="checkbox"] { ...@@ -117,6 +94,7 @@ input[type="checkbox"] {
width: 100%; width: 100%;
font-size: 24px; font-size: 24px;
font-family: inherit; font-family: inherit;
font-weight: inherit;
line-height: 1.4em; line-height: 1.4em;
border: 0; border: 0;
outline: none; outline: none;
...@@ -124,29 +102,25 @@ input[type="checkbox"] { ...@@ -124,29 +102,25 @@ input[type="checkbox"] {
padding: 6px; padding: 6px;
border: 1px solid #999; border: 1px solid #999;
box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2);
-moz-box-sizing: border-box;
-ms-box-sizing: border-box; -ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased; -moz-font-smoothing: antialiased;
-ms-font-smoothing: antialiased; -ms-font-smoothing: antialiased;
-o-font-smoothing: antialiased;
font-smoothing: antialiased; font-smoothing: antialiased;
} }
#new-todo { #new-todo {
padding: 16px 16px 16px 60px; padding: 16px 16px 16px 60px;
border: none; border: none;
background: rgba(0, 0, 0, 0.02); background: rgba(0, 0, 0, 0.003);
z-index: 2; box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03);
box-shadow: none;
} }
#main { #main {
position: relative; position: relative;
z-index: 2; z-index: 2;
border-top: 1px dotted #adadad; border-top: 1px solid #e6e6e6;
} }
label[for='toggle-all'] { label[for='toggle-all'] {
...@@ -155,19 +129,19 @@ label[for='toggle-all'] { ...@@ -155,19 +129,19 @@ label[for='toggle-all'] {
#toggle-all { #toggle-all {
position: absolute; position: absolute;
top: -42px; top: -55px;
left: -4px; left: -12px;
width: 40px; width: 60px;
height: 34px;
text-align: center; text-align: center;
/* Mobile Safari */ border: none; /* Mobile Safari */
border: none;
} }
#toggle-all:before { #toggle-all:before {
content: '»'; content: '';
font-size: 28px; font-size: 22px;
color: #d9d9d9; color: #e6e6e6;
padding: 0 25px 7px; padding: 10px 27px 10px 27px;
} }
#toggle-all:checked:before { #toggle-all:checked:before {
...@@ -183,7 +157,7 @@ label[for='toggle-all'] { ...@@ -183,7 +157,7 @@ label[for='toggle-all'] {
#todo-list li { #todo-list li {
position: relative; position: relative;
font-size: 24px; font-size: 24px;
border-bottom: 1px dotted #ccc; border-bottom: 1px solid #ededed;
} }
#todo-list li:last-child { #todo-list li:last-child {
...@@ -215,28 +189,18 @@ label[for='toggle-all'] { ...@@ -215,28 +189,18 @@ label[for='toggle-all'] {
top: 0; top: 0;
bottom: 0; bottom: 0;
margin: auto 0; margin: auto 0;
/* Mobile Safari */ border: none; /* Mobile Safari */
border: none;
-webkit-appearance: none; -webkit-appearance: none;
-ms-appearance: none; -ms-appearance: none;
-o-appearance: none;
appearance: none; appearance: none;
} }
#todo-list li .toggle:after { #todo-list li .toggle:after {
content: '✔'; content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="-10 -18 100 135"><circle cx="50" cy="50" r="50" fill="none" stroke="#ededed" stroke-width="3"/></svg>');
/* 40 + a couple of pixels visual adjustment */
line-height: 43px;
font-size: 20px;
color: #d9d9d9;
text-shadow: 0 -1px 0 #bfbfbf;
} }
#todo-list li .toggle:checked:after { #todo-list li .toggle:checked:after {
color: #85ada7; content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="-10 -18 100 135"><circle cx="50" cy="50" r="50" fill="none" stroke="#bddad5" stroke-width="3"/><path fill="#5dc2af" d="M72 25L42 71 27 56l-4 4 20 20 34-52z"/></svg>');
text-shadow: 0 1px 0 #669991;
bottom: 1px;
position: relative;
} }
#todo-list li label { #todo-list li label {
...@@ -246,12 +210,11 @@ label[for='toggle-all'] { ...@@ -246,12 +210,11 @@ label[for='toggle-all'] {
margin-left: 45px; margin-left: 45px;
display: block; display: block;
line-height: 1.2; line-height: 1.2;
-webkit-transition: color 0.4s;
transition: color 0.4s; transition: color 0.4s;
} }
#todo-list li.completed label { #todo-list li.completed label {
color: #a9a9a9; color: #d9d9d9;
text-decoration: line-through; text-decoration: line-through;
} }
...@@ -264,21 +227,18 @@ label[for='toggle-all'] { ...@@ -264,21 +227,18 @@ label[for='toggle-all'] {
width: 40px; width: 40px;
height: 40px; height: 40px;
margin: auto 0; margin: auto 0;
font-size: 22px; font-size: 30px;
color: #a88a8a; color: #cc9a9a;
-webkit-transition: all 0.2s; margin-bottom: 11px;
transition: all 0.2s; transition: color 0.2s ease-out;
} }
#todo-list li .destroy:hover { #todo-list li .destroy:hover {
text-shadow: 0 0 1px #000, color: #af5b5e;
0 0 10px rgba(199, 107, 107, 0.8);
-webkit-transform: scale(1.3);
transform: scale(1.3);
} }
#todo-list li .destroy:after { #todo-list li .destroy:after {
content: ''; content: '×';
} }
#todo-list li:hover .destroy { #todo-list li:hover .destroy {
...@@ -295,29 +255,25 @@ label[for='toggle-all'] { ...@@ -295,29 +255,25 @@ label[for='toggle-all'] {
#footer { #footer {
color: #777; color: #777;
padding: 0 15px; padding: 10px 15px;
position: absolute;
right: 0;
bottom: -31px;
left: 0;
height: 20px; height: 20px;
z-index: 1;
text-align: center; text-align: center;
border-top: 1px solid #e6e6e6;
} }
#footer:before { #footer:before {
content: ''; content: '';
position: absolute; position: absolute;
right: 0; right: 0;
bottom: 31px; bottom: 0;
left: 0; left: 0;
height: 50px; height: 50px;
z-index: -1; overflow: hidden;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3), box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2),
0 6px 0 -3px rgba(255, 255, 255, 0.8), 0 8px 0 -3px #f6f6f6,
0 7px 1px -3px rgba(0, 0, 0, 0.3), 0 9px 1px -3px rgba(0, 0, 0, 0.2),
0 43px 0 -6px rgba(255, 255, 255, 0.8), 0 16px 0 -6px #f6f6f6,
0 44px 2px -6px rgba(0, 0, 0, 0.2); 0 17px 2px -6px rgba(0, 0, 0, 0.2);
} }
#todo-count { #todo-count {
...@@ -325,6 +281,10 @@ label[for='toggle-all'] { ...@@ -325,6 +281,10 @@ label[for='toggle-all'] {
text-align: left; text-align: left;
} }
#todo-count strong {
font-weight: 300;
}
#filters { #filters {
margin: 0; margin: 0;
padding: 0; padding: 0;
...@@ -339,49 +299,72 @@ label[for='toggle-all'] { ...@@ -339,49 +299,72 @@ label[for='toggle-all'] {
} }
#filters li a { #filters li a {
color: #83756f; color: inherit;
margin: 2px; margin: 3px;
padding: 3px 7px;
text-decoration: none; text-decoration: none;
border: 1px solid transparent;
border-radius: 3px;
}
#filters li a.selected,
#filters li a:hover {
border-color: rgba(175, 47, 47, 0.1);
} }
#filters li a.selected { #filters li a.selected {
font-weight: bold; border-color: rgba(175, 47, 47, 0.2);
} }
#clear-completed { #clear-completed,
html #clear-completed:active {
float: right; float: right;
position: relative; position: relative;
line-height: 20px; line-height: 20px;
text-decoration: none; text-decoration: none;
background: rgba(0, 0, 0, 0.1); cursor: pointer;
font-size: 11px; visibility: hidden;
padding: 0 10px; position: relative;
border-radius: 3px; }
box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.2);
#clear-completed::after {
visibility: visible;
content: 'Clear completed';
position: absolute;
right: 0;
white-space: nowrap;
} }
#clear-completed:hover { #clear-completed:hover::after {
background: rgba(0, 0, 0, 0.15); text-decoration: underline;
box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.3);
} }
#info { #info {
margin: 65px auto 0; margin: 65px auto 0;
color: #a6a6a6; color: #bfbfbf;
font-size: 12px; font-size: 10px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
text-align: center; text-align: center;
} }
#info p {
line-height: 1;
}
#info a { #info a {
color: inherit; color: inherit;
text-decoration: none;
font-weight: 400;
}
#info a:hover {
text-decoration: underline;
} }
/* /*
Hack to remove background from Mobile Safari. Hack to remove background from Mobile Safari.
Can't use it globally since it destroys checkboxes in Firefox and Opera Can't use it globally since it destroys checkboxes in Firefox
*/ */
@media screen and (-webkit-min-device-pixel-ratio:0) { @media screen and (-webkit-min-device-pixel-ratio:0) {
#toggle-all, #toggle-all,
#todo-list li .toggle { #todo-list li .toggle {
...@@ -393,10 +376,6 @@ label[for='toggle-all'] { ...@@ -393,10 +376,6 @@ label[for='toggle-all'] {
} }
#toggle-all { #toggle-all {
top: -56px;
left: -15px;
width: 65px;
height: 41px;
-webkit-transform: rotate(90deg); -webkit-transform: rotate(90deg);
transform: rotate(90deg); transform: rotate(90deg);
-webkit-appearance: none; -webkit-appearance: none;
...@@ -404,151 +383,12 @@ label[for='toggle-all'] { ...@@ -404,151 +383,12 @@ label[for='toggle-all'] {
} }
} }
.hidden { @media (max-width: 430px) {
display: none; #footer {
} height: 50px;
hr {
margin: 20px 0;
border: 0;
border-top: 1px dashed #C5C5C5;
border-bottom: 1px dashed #F7F7F7;
}
.learn a {
font-weight: normal;
text-decoration: none;
color: #b83f45;
}
.learn a:hover {
text-decoration: underline;
color: #787e7e;
}
.learn h3,
.learn h4,
.learn h5 {
margin: 10px 0;
font-weight: 500;
line-height: 1.2;
color: #000;
}
.learn h3 {
font-size: 24px;
}
.learn h4 {
font-size: 18px;
}
.learn h5 {
margin-bottom: 0;
font-size: 14px;
}
.learn ul {
padding: 0;
margin: 0 0 30px 25px;
}
.learn li {
line-height: 20px;
}
.learn p {
font-size: 15px;
font-weight: 300;
line-height: 1.3;
margin-top: 0;
margin-bottom: 0;
}
.quote {
border: none;
margin: 20px 0 60px 0;
}
.quote p {
font-style: italic;
}
.quote p:before {
content: '“';
font-size: 50px;
opacity: .15;
position: absolute;
top: -20px;
left: 3px;
}
.quote p:after {
content: '”';
font-size: 50px;
opacity: .15;
position: absolute;
bottom: -42px;
right: 3px;
}
.quote footer {
position: absolute;
bottom: -40px;
right: 0;
}
.quote footer img {
border-radius: 3px;
}
.quote footer a {
margin-left: 5px;
vertical-align: middle;
}
.speech-bubble {
position: relative;
padding: 10px;
background: rgba(0, 0, 0, .04);
border-radius: 5px;
}
.speech-bubble:after {
content: '';
position: absolute;
top: 100%;
right: 30px;
border: 13px solid transparent;
border-top-color: rgba(0, 0, 0, .04);
}
.learn-bar > .learn {
position: absolute;
width: 272px;
top: 8px;
left: -300px;
padding: 10px;
border-radius: 5px;
background-color: rgba(255, 255, 255, .6);
-webkit-transition-property: left;
transition-property: left;
-webkit-transition-duration: 500ms;
transition-duration: 500ms;
}
@media (min-width: 899px) {
.learn-bar {
width: auto;
margin: 0 0 0 300px;
}
.learn-bar > .learn {
left: 8px;
} }
.learn-bar #todoapp { #filters {
width: 550px; bottom: 10px;
margin: 130px auto 40px auto;
} }
} }
hr {
margin: 20px 0;
border: 0;
border-top: 1px dashed #c5c5c5;
border-bottom: 1px dashed #f7f7f7;
}
.learn a {
font-weight: normal;
text-decoration: none;
color: #b83f45;
}
.learn a:hover {
text-decoration: underline;
color: #787e7e;
}
.learn h3,
.learn h4,
.learn h5 {
margin: 10px 0;
font-weight: 500;
line-height: 1.2;
color: #000;
}
.learn h3 {
font-size: 24px;
}
.learn h4 {
font-size: 18px;
}
.learn h5 {
margin-bottom: 0;
font-size: 14px;
}
.learn ul {
padding: 0;
margin: 0 0 30px 25px;
}
.learn li {
line-height: 20px;
}
.learn p {
font-size: 15px;
font-weight: 300;
line-height: 1.3;
margin-top: 0;
margin-bottom: 0;
}
#issue-count {
display: none;
}
.quote {
border: none;
margin: 20px 0 60px 0;
}
.quote p {
font-style: italic;
}
.quote p:before {
content: '“';
font-size: 50px;
opacity: .15;
position: absolute;
top: -20px;
left: 3px;
}
.quote p:after {
content: '”';
font-size: 50px;
opacity: .15;
position: absolute;
bottom: -42px;
right: 3px;
}
.quote footer {
position: absolute;
bottom: -40px;
right: 0;
}
.quote footer img {
border-radius: 3px;
}
.quote footer a {
margin-left: 5px;
vertical-align: middle;
}
.speech-bubble {
position: relative;
padding: 10px;
background: rgba(0, 0, 0, .04);
border-radius: 5px;
}
.speech-bubble:after {
content: '';
position: absolute;
top: 100%;
right: 30px;
border: 13px solid transparent;
border-top-color: rgba(0, 0, 0, .04);
}
.learn-bar > .learn {
position: absolute;
width: 272px;
top: 8px;
left: -300px;
padding: 10px;
border-radius: 5px;
background-color: rgba(255, 255, 255, .6);
transition-property: left;
transition-duration: 500ms;
}
@media (min-width: 899px) {
.learn-bar {
width: auto;
padding-left: 300px;
}
.learn-bar > .learn {
left: 8px;
}
}
/* global _ */
(function () { (function () {
'use strict'; 'use strict';
/* jshint ignore:start */
// Underscore's Template Module // Underscore's Template Module
// Courtesy of underscorejs.org // Courtesy of underscorejs.org
var _ = (function (_) { var _ = (function (_) {
...@@ -114,6 +116,7 @@ ...@@ -114,6 +116,7 @@
if (location.hostname === 'todomvc.com') { if (location.hostname === 'todomvc.com') {
window._gaq = [['_setAccount','UA-31081062-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script')); window._gaq = [['_setAccount','UA-31081062-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'));
} }
/* jshint ignore:end */
function redirect() { function redirect() {
if (location.hostname === 'tastejs.github.io') { if (location.hostname === 'tastejs.github.io') {
...@@ -175,13 +178,17 @@ ...@@ -175,13 +178,17 @@
if (learnJSON.backend) { if (learnJSON.backend) {
this.frameworkJSON = learnJSON.backend; this.frameworkJSON = learnJSON.backend;
this.frameworkJSON.issueLabel = framework;
this.append({ this.append({
backend: true backend: true
}); });
} else if (learnJSON[framework]) { } else if (learnJSON[framework]) {
this.frameworkJSON = learnJSON[framework]; this.frameworkJSON = learnJSON[framework];
this.frameworkJSON.issueLabel = framework;
this.append(); this.append();
} }
this.fetchIssueCount();
} }
Learn.prototype.append = function (opts) { Learn.prototype.append = function (opts) {
...@@ -212,6 +219,26 @@ ...@@ -212,6 +219,26 @@
document.body.insertAdjacentHTML('afterBegin', aside.outerHTML); document.body.insertAdjacentHTML('afterBegin', aside.outerHTML);
}; };
Learn.prototype.fetchIssueCount = function () {
var issueLink = document.getElementById('issue-count-link');
if (issueLink) {
var url = issueLink.href.replace('https://github.com', 'https://api.github.com/repos');
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.onload = function (e) {
var parsedResponse = JSON.parse(e.target.responseText);
if (parsedResponse instanceof Array) {
var count = parsedResponse.length
if (count !== 0) {
issueLink.innerHTML = 'This app has ' + count + ' open issues';
document.getElementById('issue-count').style.display = 'inline';
}
}
};
xhr.send();
}
};
redirect(); redirect();
getFile('learn.json', Learn); getFile('learn.json', Learn);
})(); })();
{
"dependencies": {
"todomvc-app-css": "^1.0.0",
"knockout": "^3.1.0",
"todomvc-common": "^1.0.1",
"director": "^1.2.0"
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment