function ViewModel(){function i(t){var i,r,e,u,f;if(n.result(t.status+": "+t.statusText),i=t.responseJSON,i){if(i.Message&&n.errors.push(i.Message),i.ModelState){r=i.ModelState;for(e in r)if(r.hasOwnProperty(e)&&(u=r[e],u.length))for(f=0;f<u.length;++f)n.errors.push(u[f])}i.error&&n.errors.push(i.error);i.error_description&&n.errors.push(i.error_description)}}var n=this,t="accessToken";n.result=ko.observable();n.user=ko.observable();n.registerEmail=ko.observable();n.registerPassword=ko.observable();n.registerPassword2=ko.observable();n.loginEmail=ko.observable();n.loginPassword=ko.observable();n.errors=ko.observableArray([]);n.callApi=function(){n.result("");n.errors.removeAll();var r=sessionStorage.getItem(t),u={};r&&(u.Authorization="Bearer "+r);$.ajax({type:"GET",url:"/api/values",headers:u}).done(function(t){n.result(t)}).fail(i)};n.register=function(){n.result("");n.errors.removeAll();var t={Email:n.registerEmail(),Password:n.registerPassword(),ConfirmPassword:n.registerPassword2()};$.ajax({type:"POST",url:"/api/Account/Register",contentType:"application/json; charset=utf-8",data:JSON.stringify(t)}).done(function(){n.result("Done!")}).fail(i)};n.login=function(){n.result("");n.errors.removeAll();var r={grant_type:"password",username:n.loginEmail(),password:n.loginPassword()};$.ajax({type:"POST",url:"/Token",data:r}).done(function(i){n.user(i.userName);sessionStorage.setItem(t,i.access_token)}).fail(i)};n.logout=function(){var r=sessionStorage.getItem(t),u={};r&&(u.Authorization="Bearer "+r);$.ajax({type:"POST",url:"/api/Account/Logout",headers:u}).done(function(){n.user("");sessionStorage.removeItem(t)}).fail(i)}}(function(){(function(n){var i=this||eval("this"),r=i.document,f=i.navigator,t=i.jQuery,u=i.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(i.ko={})})(function(e,o){function y(n,t){return null===n||typeof n in b?n===t:!1}function k(t,i){var r;return function(){r||(r=setTimeout(function(){r=n;t()},i))}}function d(n,t){var i;return function(){clearTimeout(i);i=setTimeout(n,t)}}function p(n,t,i,r){s.d[n]={init:function(n,u,f,e,o){var c,h;return s.s(function(){var l=s.a.c(u()),f=!i!=!l,e=!h;(e||t||f!==c)&&(e&&s.Y.la()&&(h=s.a.ia(s.f.childNodes(n),!0)),f?(e||s.f.T(n,s.a.ia(h)),s.Ca(r?r(o,l):o,n)):s.f.ja(n),c=f)},null,{o:n}),{controlsDescendantBindings:!0}}};s.h.ha[n]=!1;s.f.Q[n]=!0}var s="undefined"!=typeof e?e:{},b,l,h,c,a,w,v;s.b=function(n,t){for(var i=n.split("."),r=s,u=0;u<i.length-1;u++)r=r[i[u]];r[i[i.length-1]]=t};s.A=function(n,t,i){n[t]=i};s.version="3.2.0";s.b("version",s.version);s.a=function(){function o(n,t){for(var i in n)n.hasOwnProperty(i)&&t(i,n[i])}function c(n,t){if(t)for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n}function l(n,t){return n.__proto__=t,n}var a={__proto__:[]}instanceof Array,h={},v={},y,e;return h[f&&/Firefox\/2/i.test(f.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],h.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),o(h,function(n,t){if(t.length)for(var i=0,r=t.length;i<r;i++)v[t[i]]=n}),y={propertychange:!0},e=r&&function(){for(var t=3,i=r.createElement("div"),u=i.getElementsByTagName("i");i.innerHTML="<!--[if gt IE "+ ++t+"]><i><\/i><![endif]-->",u[0];);return 4<t?t:n}(),{vb:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],u:function(n,t){for(var i=0,r=n.length;i<r;i++)t(n[i],i)},m:function(n,t){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(n,t);for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},qb:function(n,t,i){for(var r=0,u=n.length;r<u;r++)if(t.call(i,n[r],r))return n[r];return null},ua:function(n,t){var i=s.a.m(n,t);0<i?n.splice(i,1):0===i&&n.shift()},rb:function(n){n=n||[];for(var i=[],t=0,r=n.length;t<r;t++)0>s.a.m(i,n[t])&&i.push(n[t]);return i},Da:function(n,t){n=n||[];for(var r=[],i=0,u=n.length;i<u;i++)r.push(t(n[i],i));return r},ta:function(n,t){n=n||[];for(var r=[],i=0,u=n.length;i<u;i++)t(n[i],i)&&r.push(n[i]);return r},ga:function(n,t){if(t instanceof Array)n.push.apply(n,t);else for(var i=0,r=t.length;i<r;i++)n.push(t[i]);return n},ea:function(n,t,i){var r=s.a.m(s.a.Xa(n),t);0>r?i&&n.push(t):i||n.splice(r,1)},xa:a,extend:c,za:l,Aa:a?l:c,G:o,na:function(n,t){if(!n)return n;var r={};for(var i in n)n.hasOwnProperty(i)&&(r[i]=t(n[i],i,n));return r},Ka:function(n){for(;n.firstChild;)s.removeNode(n.firstChild)},oc:function(n){n=s.a.S(n);for(var i=r.createElement("div"),t=0,u=n.length;t<u;t++)i.appendChild(s.R(n[t]));return i},ia:function(n,t){for(var r,i=0,f=n.length,u=[];i<f;i++)r=n[i].cloneNode(!0),u.push(t?s.R(r):r);return u},T:function(n,t){if(s.a.Ka(n),t)for(var i=0,r=t.length;i<r;i++)n.appendChild(t[i])},Lb:function(n,t){var r=n.nodeType?[n]:n;if(0<r.length){for(var f=r[0],e=f.parentNode,i=0,u=t.length;i<u;i++)e.insertBefore(t[i],f);for(i=0,u=r.length;i<u;i++)s.removeNode(r[i])}},ka:function(n,t){if(n.length){for(t=8===t.nodeType&&t.parentNode||t;n.length&&n[0].parentNode!==t;)n.shift();if(1<n.length){var i=n[0],r=n[n.length-1];for(n.length=0;i!==r;)if(n.push(i),i=i.nextSibling,!i)return;n.push(r)}}return n},Nb:function(n,t){7>e?n.setAttribute("selected",t):n.selected=t},cb:function(t){return null===t||t===n?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},vc:function(n,t){return n=n||"",t.length>n.length?!1:n.substring(0,t.length)===t},cc:function(n,t){if(n===t)return!0;if(11===n.nodeType)return!1;if(t.contains)return t.contains(3===n.nodeType?n.parentNode:n);if(t.compareDocumentPosition)return 16==(t.compareDocumentPosition(n)&16);for(;n&&n!=t;)n=n.parentNode;return!!n},Ja:function(n){return s.a.cc(n,n.ownerDocument.documentElement)},ob:function(n){return!!s.a.qb(n,s.a.Ja)},t:function(n){return n&&n.tagName&&n.tagName.toLowerCase()},n:function(n,i,r){var o=e&&y[i],u,f;if(!o&&t)t(n).bind(i,r);else if(o||"function"!=typeof n.addEventListener)if("undefined"!=typeof n.attachEvent)u=function(t){r.call(n,t)},f="on"+i,n.attachEvent(f,u),s.a.w.da(n,function(){n.detachEvent(f,u)});else throw Error("Browser doesn't support addEventListener or attachEvent");else n.addEventListener(i,r,!1)},oa:function(n,u){if(!n||!n.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var f;if("input"===s.a.t(n)&&n.type&&"click"==u.toLowerCase()?(f=n.type,f="checkbox"==f||"radio"==f):f=!1,t&&!f)t(n).trigger(u);else if("function"==typeof r.createEvent)if("function"==typeof n.dispatchEvent)f=r.createEvent(v[u]||"HTMLEvents"),f.initEvent(u,!0,!0,i,0,0,0,0,0,!1,!1,!1,!1,0,n),n.dispatchEvent(f);else throw Error("The supplied element doesn't support dispatchEvent");else if(f&&n.click)n.click();else if("undefined"!=typeof n.fireEvent)n.fireEvent("on"+u);else throw Error("Browser doesn't support triggering events");},c:function(n){return s.C(n)?n():n},Xa:function(n){return s.C(n)?n.v():n},Ba:function(n,t,i){if(t){var r=/\S+/g,u=n.className.match(r)||[];s.a.u(t.match(r),function(n){s.a.ea(u,n,i)});n.className=u.join(" ")}},bb:function(t,i){var r=s.a.c(i),u;(null===r||r===n)&&(r="");u=s.f.firstChild(t);!u||3!=u.nodeType||s.f.nextSibling(u)?s.f.T(t,[t.ownerDocument.createTextNode(r)]):u.data=r;s.a.fc(t)},Mb:function(n,t){if(n.name=t,7>=e)try{n.mergeAttributes(r.createElement("<input name='"+n.name+"'/>"),!1)}catch(i){}},fc:function(n){9<=e&&(n=1==n.nodeType?n:n.parentNode,n.style&&(n.style.zoom=n.style.zoom))},dc:function(n){if(e){var t=n.style.width;n.style.width=0;n.style.width=t}},sc:function(n,t){n=s.a.c(n);t=s.a.c(t);for(var r=[],i=n;i<=t;i++)r.push(i);return r},S:function(n){for(var i=[],t=0,r=n.length;t<r;t++)i.push(n[t]);return i},yc:6===e,zc:7===e,L:e,xb:function(n,t){for(var r=s.a.S(n.getElementsByTagName("input")).concat(s.a.S(n.getElementsByTagName("textarea"))),f="string"==typeof t?function(n){return n.name===t}:function(n){return t.test(n.name)},u=[],i=r.length-1;0<=i;i--)f(r[i])&&u.push(r[i]);return u},pc:function(n){return"string"==typeof n&&(n=s.a.cb(n))?u&&u.parse?u.parse(n):new Function("return "+n)():null},eb:function(n,t,i){if(!u||!u.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 u.stringify(s.a.c(n),t,i)},qc:function(n,t,i){var v,e,h,f,u,c;i=i||{};var l=i.params||{},a=i.includeFields||this.vb,v=n;if("object"==typeof n&&"form"===s.a.t(n))for(v=n.action,e=a.length-1;0<=e;e--)for(h=s.a.xb(n,a[e]),f=h.length-1;0<=f;f--)l[h[f].name]=h[f].value;t=s.a.c(t);u=r.createElement("form");u.style.display="none";u.action=v;u.method="post";for(c in t)n=r.createElement("input"),n.type="hidden",n.name=c,n.value=s.a.eb(s.a.c(t[c])),u.appendChild(n);o(l,function(n,t){var i=r.createElement("input");i.type="hidden";i.name=n;i.value=t;u.appendChild(i)});r.body.appendChild(u);i.submitter?i.submitter(u):u.submit();setTimeout(function(){u.parentNode.removeChild(u)},0)}}}();s.b("utils",s.a);s.b("utils.arrayForEach",s.a.u);s.b("utils.arrayFirst",s.a.qb);s.b("utils.arrayFilter",s.a.ta);s.b("utils.arrayGetDistinctValues",s.a.rb);s.b("utils.arrayIndexOf",s.a.m);s.b("utils.arrayMap",s.a.Da);s.b("utils.arrayPushAll",s.a.ga);s.b("utils.arrayRemoveItem",s.a.ua);s.b("utils.extend",s.a.extend);s.b("utils.fieldsIncludedWithJsonPost",s.a.vb);s.b("utils.getFormFields",s.a.xb);s.b("utils.peekObservable",s.a.Xa);s.b("utils.postJson",s.a.qc);s.b("utils.parseJson",s.a.pc);s.b("utils.registerEventHandler",s.a.n);s.b("utils.stringifyJson",s.a.eb);s.b("utils.range",s.a.sc);s.b("utils.toggleDomNodeCssClass",s.a.Ba);s.b("utils.triggerEvent",s.a.oa);s.b("utils.unwrapObservable",s.a.c);s.b("utils.objectForEach",s.a.G);s.b("utils.addOrRemoveItem",s.a.ea);s.b("unwrap",s.a.c);Function.prototype.bind||(Function.prototype.bind=function(n){var i=this,t=Array.prototype.slice.call(arguments);return n=t.shift(),function(){return i.apply(n,t.concat(Array.prototype.slice.call(arguments)))}});s.a.e=new function(){function r(r,f){var e=r[t];if(!e||"null"===e||!i[e]){if(!f)return n;e=r[t]="ko"+u++;i[e]={}}return i[e]}var u=0,t="__ko__"+(new Date).getTime(),i={};return{get:function(t,i){var u=r(t,!1);return u===n?n:u[i]},set:function(t,i,u){(u!==n||r(t,!1)!==n)&&(r(t,!0)[i]=u)},clear:function(n){var r=n[t];return r?(delete i[r],n[t]=null,!0):!1},F:function(){return u+++t}}};s.b("utils.domData",s.a.e);s.b("utils.domData.clear",s.a.e.clear);s.a.w=new function(){function i(t,i){var r=s.a.e.get(t,u);return r===n&&i&&(r=[],s.a.e.set(t,u,r)),r}function r(n){var t=i(n,!1),u;if(t)for(t=t.slice(0),u=0;u<t.length;u++)t[u](n);if(s.a.e.clear(n),s.a.w.cleanExternalData(n),f[n.nodeType])for(t=n.firstChild;n=t;)t=n.nextSibling,8===n.nodeType&&r(n)}var u=s.a.e.F(),e={1:!0,8:!0,9:!0},f={1:!0,9:!0};return{da:function(n,t){if("function"!=typeof t)throw Error("Callback must be a function");i(n,!0).push(t)},Kb:function(t,r){var f=i(t,!1);f&&(s.a.ua(f,r),0==f.length&&s.a.e.set(t,u,n))},R:function(n){var t,i,u;if(e[n.nodeType]&&(r(n),f[n.nodeType]))for(t=[],s.a.ga(t,n.getElementsByTagName("*")),i=0,u=t.length;i<u;i++)r(t[i]);return n},removeNode:function(n){s.R(n);n.parentNode&&n.parentNode.removeChild(n)},cleanExternalData:function(n){t&&"function"==typeof t.cleanData&&t.cleanData([n])}}};s.R=s.a.w.R;s.removeNode=s.a.w.removeNode;s.b("cleanNode",s.R);s.b("removeNode",s.removeNode);s.b("utils.domNodeDisposal",s.a.w);s.b("utils.domNodeDisposal.addDisposeCallback",s.a.w.da);s.b("utils.domNodeDisposal.removeDisposeCallback",s.a.w.Kb),function(){s.a.ba=function(n){var u,f;if(t){if(t.parseHTML)u=t.parseHTML(n)||[];else if((u=t.clean([n]))&&u[0]){for(n=u[0];n.parentNode&&11!==n.parentNode.nodeType;)n=n.parentNode;n.parentNode&&n.parentNode.removeChild(n)}}else{for(f=s.a.cb(n).toLowerCase(),u=r.createElement("div"),f=f.match(/^<(thead|tbody|tfoot)/)&&[1,"<table>","<\/table>"]||!f.indexOf("<tr")&&[2,"<table><tbody>","<\/tbody><\/table>"]||(!f.indexOf("<td")||!f.indexOf("<th"))&&[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"]||[0,"",""],n="ignored<div>"+f[1]+n+f[2]+"<\/div>","function"==typeof i.innerShiv?u.appendChild(i.innerShiv(n)):u.innerHTML=n;f[0]--;)u=u.lastChild;u=s.a.S(u.lastChild.childNodes)}return u};s.a.$a=function(i,r){if(s.a.Ka(i),r=s.a.c(r),null!==r&&r!==n)if("string"!=typeof r&&(r=r.toString()),t)t(i).html(r);else for(var f=s.a.ba(r),u=0;u<f.length;u++)i.appendChild(f[u])}}();s.b("utils.parseHtmlFragment",s.a.ba);s.b("utils.setHtml",s.a.$a);s.D=function(){function i(n,t){var r;if(n)if(8==n.nodeType)r=s.D.Gb(n.nodeValue),null!=r&&t.push({bc:n,mc:r});else if(1==n.nodeType)for(var r=0,u=n.childNodes,f=u.length;r<f;r++)i(u[r],t)}var t={};return{Ua:function(n){if("function"!=typeof n)throw Error("You can only pass a function to ko.memoization.memoize()");var i=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return t[i]=n,"<!--[ko_memo:"+i+"]-->"},Rb:function(i,r){var u=t[i];if(u===n)throw Error("Couldn't find any memo with ID "+i+". Perhaps it's already been unmemoized.");try{return u.apply(null,r||[]),!0}finally{delete t[i]}},Sb:function(n,t){var f=[],u,o,r,e;for(i(n,f),u=0,o=f.length;u<o;u++)r=f[u].bc,e=[r],t&&s.a.ga(e,t),s.D.Rb(f[u].mc,e),r.nodeValue="",r.parentNode&&r.parentNode.removeChild(r)},Gb:function(n){return(n=n.match(/^\[ko_memo\:(.*?)\]$/))?n[1]:null}}}();s.b("memoization",s.D);s.b("memoization.memoize",s.D.Ua);s.b("memoization.unmemoize",s.D.Rb);s.b("memoization.parseMemoText",s.D.Gb);s.b("memoization.unmemoizeDomNodeAndDescendants",s.D.Sb);s.La={throttle:function(n,t){n.throttleEvaluation=t;var i=null;return s.j({read:n,write:function(r){clearTimeout(i);i=setTimeout(function(){n(r)},t)}})},rateLimit:function(n,t){var i,r,u;"number"==typeof t?i=t:(i=t.timeout,r=t.method);u="notifyWhenChangesStop"==r?d:k;n.Ta(function(n){return u(n,i)})},notify:function(n,t){n.equalityComparer="always"==t?null:y}};b={undefined:1,boolean:1,number:1,string:1};s.b("extenders",s.La);s.Pb=function(n,t,i){this.target=n;this.wa=t;this.ac=i;this.Cb=!1;s.A(this,"dispose",this.K)};s.Pb.prototype.K=function(){this.Cb=!0;this.ac()};s.P=function(){s.a.Aa(this,s.P.fn);this.M={}};l="change";h={U:function(n,t,i){var r=this,u;return i=i||l,u=new s.Pb(r,t?n.bind(t):n,function(){s.a.ua(r.M[i],u);r.nb&&r.nb()}),r.va&&r.va(i),r.M[i]||(r.M[i]=[]),r.M[i].push(u),u},notifySubscribers:function(n,t){if(t=t||l,this.Ab(t))try{s.k.Ea();for(var u=this.M[t].slice(0),r=0,i;i=u[r];++r)i.Cb||i.wa(n)}finally{s.k.end()}},Ta:function(n){var t=this,e=s.C(t),r,u,i,f;t.qa||(t.qa=t.notifySubscribers,t.notifySubscribers=function(n,i){i&&i!==l?"beforeChange"===i?t.kb(n):t.qa(n,i):t.lb(n)});f=n(function(){e&&i===t&&(i=t());r=!1;t.Pa(u,i)&&t.qa(u=i)});t.lb=function(n){r=!0;i=n;f()};t.kb=function(n){r||(u=n,t.qa(n,"beforeChange"))}},Ab:function(n){return this.M[n]&&this.M[n].length},yb:function(){var n=0;return s.a.G(this.M,function(t,i){n+=i.length}),n},Pa:function(n,t){return!this.equalityComparer||!this.equalityComparer(n,t)},extend:function(n){var t=this;return n&&s.a.G(n,function(n,i){var r=s.La[n];"function"==typeof r&&(t=r(t,i)||t)}),t}};s.A(h,"subscribe",h.U);s.A(h,"extend",h.extend);s.A(h,"getSubscriptionsCount",h.yb);s.a.xa&&s.a.za(h,Function.prototype);s.P.fn=h;s.Db=function(n){return null!=n&&"function"==typeof n.U&&"function"==typeof n.notifySubscribers};s.b("subscribable",s.P);s.b("isSubscribable",s.Db);s.Y=s.k=function(){function t(t){r.push(n);n=t}function i(){n=r.pop()}var r=[],n,u=0;return{Ea:t,end:i,Jb:function(t){if(n){if(!s.Db(t))throw Error("Only subscribable things can act as dependencies");n.wa(t,t.Vb||(t.Vb=++u))}},B:function(n,r,u){try{return t(),n.apply(r,u||[])}finally{i()}},la:function(){if(n)return n.s.la()},ma:function(){if(n)return n.ma}}}();s.b("computedContext",s.Y);s.b("computedContext.getDependenciesCount",s.Y.la);s.b("computedContext.isInitial",s.Y.ma);s.b("computedContext.isSleeping",s.Y.Ac);s.p=function(n){function t(){return 0<arguments.length?(t.Pa(i,arguments[0])&&(t.X(),i=arguments[0],t.W()),this):(s.k.Jb(t),i)}var i=n;return s.P.call(t),s.a.Aa(t,s.p.fn),t.v=function(){return i},t.W=function(){t.notifySubscribers(i)},t.X=function(){t.notifySubscribers(i,"beforeChange")},s.A(t,"peek",t.v),s.A(t,"valueHasMutated",t.W),s.A(t,"valueWillMutate",t.X),t};s.p.fn={equalityComparer:y};c=s.p.rc="__ko_proto__";s.p.fn[c]=s.p;s.a.xa&&s.a.za(s.p.fn,s.P.fn);s.Ma=function(t,i){return null===t||t===n||t[c]===n?!1:t[c]===i?!0:s.Ma(t[c],i)};s.C=function(n){return s.Ma(n,s.p)};s.Ra=function(n){return"function"==typeof n&&n[c]===s.p||"function"==typeof n&&n[c]===s.j&&n.hc?!0:!1};s.b("observable",s.p);s.b("isObservable",s.C);s.b("isWriteableObservable",s.Ra);s.b("isWritableObservable",s.Ra);s.aa=function(n){if(n=n||[],"object"!=typeof n||!("length"in n))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return n=s.p(n),s.a.Aa(n,s.aa.fn),n.extend({trackArrayChanges:!0})};s.aa.fn={remove:function(n){for(var u,r=this.v(),i=[],f="function"!=typeof n||s.C(n)?function(t){return t===n}:n,t=0;t<r.length;t++)u=r[t],f(u)&&(0===i.length&&this.X(),i.push(u),r.splice(t,1),t--);return i.length&&this.W(),i},removeAll:function(t){if(t===n){var i=this.v(),r=i.slice(0);return this.X(),i.splice(0,i.length),this.W(),r}return t?this.remove(function(n){return 0<=s.a.m(t,n)}):[]},destroy:function(n){var i=this.v(),r="function"!=typeof n||s.C(n)?function(t){return t===n}:n,t;for(this.X(),t=i.length-1;0<=t;t--)r(i[t])&&(i[t]._destroy=!0);this.W()},destroyAll:function(t){return t===n?this.destroy(function(){return!0}):t?this.destroy(function(n){return 0<=s.a.m(t,n)}):[]},indexOf:function(n){var t=this();return s.a.m(t,n)},replace:function(n,t){var i=this.indexOf(n);0<=i&&(this.X(),this.v()[i]=t,this.W())}};s.a.u("pop push reverse shift sort splice unshift".split(" "),function(n){s.aa.fn[n]=function(){var t=this.v();return this.X(),this.sb(t,n,arguments),t=t[n].apply(t,arguments),this.W(),t}});s.a.u(["slice"],function(n){s.aa.fn[n]=function(){var t=this();return t[n].apply(t,arguments)}});s.a.xa&&s.a.za(s.aa.fn,s.p.fn);s.b("observableArray",s.aa);a="arrayChange";s.La.trackArrayChanges=function(n){function u(){var f,u;r||(r=!0,f=n.notifySubscribers,n.notifySubscribers=function(n,t){return t&&t!==l||++i,f.apply(this,arguments)},u=[].concat(n.v()||[]),t=null,n.U(function(r){if(r=[].concat(r||[]),n.Ab(a)){var f;(!t||1<i)&&(t=s.a.Fa(u,r,{sparse:!0}));f=t;f.length&&n.notifySubscribers(f,a)}u=r;t=null;i=0}))}if(!n.sb){var r=!1,t=null,i=0,f=n.U;n.U=n.subscribe=function(n,t,i){return i===a&&u(),f.apply(this,arguments)};n.sb=function(n,u,f){function c(n,t,i){return l[l.length]={status:n,value:t,index:i}}if(r&&!i){var l=[],e=n.length,h=f.length,o=0;switch(u){case"push":o=e;case"unshift":for(u=0;u<h;u++)c("added",f[u],o+u);break;case"pop":o=e-1;case"shift":e&&c("deleted",n[o],o);break;case"splice":u=Math.min(Math.max(0,0>f[0]?e+f[0]:f[0]),e);for(var e=1===h?e:Math.min(u+(f[1]||0),e),h=u+h-2,o=Math.max(e,h),a=[],v=[],y=2;u<o;++u,++y)u<e&&v.push(c("deleted",n[u],u)),u<h&&a.push(c("added",f[y],u));s.a.wb(v,a);break;default:return}t=l}}}};s.s=s.j=function(t,i,r){function nt(){s.a.G(l,function(n,t){t.K()});l={}}function tt(){nt();f=0;b=!0;h=!1}function ot(){var n=u.throttleEvaluation;n&&0<=n?(clearTimeout(ft),ft=setTimeout(a,n)):u.ib?u.ib():a()}function a(t){var a,r,c,d;if(p){if(k)throw Error("A 'pure' computed must not be called recursively");}else if(!b){if(g&&g()){if(!w){y();return}}else w=!1;if(p=!0,v)try{a={};s.k.Ea({wa:function(n,t){a[t]||(a[t]=1,++f)},s:u,ma:n});f=0;o=e.call(i)}finally{s.k.end();p=!1}else try{r=l;c=f;s.k.Ea({wa:function(n,t){b||(c&&r[t]?(l[t]=r[t],++f,delete r[t],--c):l[t]||(l[t]=n.U(ot),++f))},s:u,ma:k?n:!f});l={};f=0;try{d=i?e.call(i):e()}finally{s.k.end();c&&s.a.G(r,function(n,t){t.K()});h=!1}u.Pa(o,d)&&(u.notifySubscribers(o,"beforeChange"),o=d,!0!==t&&u.notifySubscribers(o))}finally{p=!1}f||y()}}function u(){if(0<arguments.length){if("function"==typeof ut)ut.apply(i,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}return s.k.Jb(u),h&&a(!0),o}function it(){return h&&!f&&a(!0),o}function rt(){return h||0<f}var o,h=!0,p=!1,w=!1,b=!1,e=t,k=!1,v=!1,et;if(e&&"object"==typeof e?(r=e,e=r.read):(r=r||{},e||(e=r.read)),"function"!=typeof e)throw Error("Pass a function that returns the value of the ko.computed");var ut=r.write,c=r.disposeWhenNodeIsRemoved||r.o||null,d=r.disposeWhen||r.Ia,g=d,y=tt,l={},f=0,ft=null;return i||(i=r.owner),s.P.call(u),s.a.Aa(u,s.j.fn),u.v=it,u.la=function(){return f},u.hc="function"==typeof r.write,u.K=function(){y()},u.Z=rt,et=u.Ta,u.Ta=function(n){et.call(u,n);u.ib=function(){u.kb(o);h=!0;u.lb(u)}},r.pure?(v=k=!0,u.va=function(){v&&(v=!1,a(!0))},u.nb=function(){u.yb()||(nt(),v=h=!0)}):r.deferEvaluation&&(u.va=function(){it();delete u.va}),s.A(u,"peek",u.v),s.A(u,"dispose",u.K),s.A(u,"isActive",u.Z),s.A(u,"getDependenciesCount",u.la),c&&(w=!0,c.nodeType&&(g=function(){return!s.a.Ja(c)||d&&d()})),v||r.deferEvaluation||a(),c&&rt()&&c.nodeType&&(y=function(){s.a.w.Kb(c,y);tt()},s.a.w.da(c,y)),u};s.jc=function(n){return s.Ma(n,s.j)};h=s.p.rc;s.j[h]=s.p;s.j.fn={equalityComparer:y};s.j.fn[h]=s.j;s.a.xa&&s.a.za(s.j.fn,s.P.fn);s.b("dependentObservable",s.j);s.b("computed",s.j);s.b("isComputed",s.jc);s.Ib=function(n,t){return"function"==typeof n?s.s(n,t,{pure:!0}):(n=s.a.extend({},n),n.pure=!0,s.s(n,t))};s.b("pureComputed",s.Ib),function(){function t(u,f,e){if(e=e||new i,u=f(u),"object"!=typeof u||null===u||u===n||u instanceof Date||u instanceof String||u instanceof Number||u instanceof Boolean)return u;var o=u instanceof Array?[]:{};return e.save(u,o),r(u,function(i){var r=f(u[i]),s;switch(typeof r){case"boolean":case"number":case"string":case"function":o[i]=r;break;case"object":case"undefined":s=e.get(r);o[i]=s!==n?s:t(r,f,e)}}),o}function r(n,t){if(n instanceof Array){for(var i=0;i<n.length;i++)t(i);"function"==typeof n.toJSON&&t("toJSON")}else for(i in n)t(i)}function i(){this.keys=[];this.hb=[]}s.Qb=function(n){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return t(n,function(n){for(var t=0;s.C(n)&&10>t;t++)n=n();return n})};s.toJSON=function(n,t,i){return n=s.Qb(n),s.a.eb(n,t,i)};i.prototype={save:function(n,t){var i=s.a.m(this.keys,n);0<=i?this.hb[i]=t:(this.keys.push(n),this.hb.push(t))},get:function(t){return t=s.a.m(this.keys,t),0<=t?this.hb[t]:n}}}();s.b("toJS",s.Qb);s.b("toJSON",s.toJSON),function(){s.i={q:function(t){switch(s.a.t(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?s.a.e.get(t,s.d.options.Va):7>=s.a.L?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?s.i.q(t.options[t.selectedIndex]):n;default:return t.value}},ca:function(t,i,r){switch(s.a.t(t)){case"option":switch(typeof i){case"string":s.a.e.set(t,s.d.options.Va,n);"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__;t.value=i;break;default:s.a.e.set(t,s.d.options.Va,i);t.__ko__hasDomDataOptionValue__=!0;t.value="number"==typeof i?i:""}break;case"select":(""===i||null===i)&&(i=n);for(var f=-1,u=0,o=t.options.length,e;u<o;++u)if(e=s.i.q(t.options[u]),e==i||""==e&&i===n){f=u;break}(r||0<=f||i===n&&1<t.size)&&(t.selectedIndex=f);break;default:(null===i||i===n)&&(i="");t.value=i}}}}();s.b("selectExtensions",s.i);s.b("selectExtensions.readValue",s.i.q);s.b("selectExtensions.writeValue",s.i.ca);s.h=function(){function n(n){var c,r,i;n=s.a.cb(n);123===n.charCodeAt(0)&&(n=n.slice(1,-1));var a=[],o=n.match(t),h,u,l=0;if(o)for(o.push(","),c=0;r=o[c];++c){if(i=r.charCodeAt(0),44===i){if(0>=l){h&&a.push(u?{key:h,value:u.join("")}:{unknown:h});h=u=l=0;continue}}else if(58===i){if(!u)continue}else if(47===i&&c&&1<r.length)(i=o[c-1].match(f))&&!e[i[0]]&&(n=n.substr(n.indexOf(r)+1),o=n.match(t),o.push(","),c=-1,r="/");else if(40===i||123===i||91===i)++l;else if(41===i||125===i||93===i)--l;else if(!h&&!u){h=34===i||39===i?r.slice(1,-1):r;continue}u?u.push(r):u=[r]}return a}var r=["true","false","null","undefined"],u=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,t=RegExp("\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|/(?:[^/\\\\]|\\\\.)*/w*|[^\\s:,/][^,\"'{}()/:[\\]]*[^\\s,\"'{}()/:[\\]]|[^\\s]","g"),f=/[\])"'A-Za-z0-9_$]+$/,e={"in":1,"return":1,"typeof":1},i={};return{ha:[],V:i,Wa:n,ya:function(t,f){function e(n,t){var a,f;if(!l){if(f=s.getBindingHandler(n),f&&f.preprocess&&!(t=f.preprocess(t,n,e)))return;(f=i[n])&&(a=t,0<=s.a.m(r,a)?a=!1:(f=a.match(u),a=null===f?!1:f[1]?"Object("+f[1]+")"+f[2]:a),f=a);f&&o.push("'"+n+"':function(_z){"+a+"=_z}")}c&&(t="function(){return "+t+" }");h.push("'"+n+"':"+t)}f=f||{};var h=[],o=[],c=f.valueAccessors,l=f.bindingParams,a="string"==typeof t?n(t):t;return s.a.u(a,function(n){e(n.key||n.unknown,n.value)}),o.length&&e("_ko_property_writers","{"+o.join(",")+" }"),h.join(",")},lc:function(n,t){for(var i=0;i<n.length;i++)if(n[i].key==t)return!0;return!1},pa:function(n,t,i,r,u){n&&s.C(n)?!s.Ra(n)||u&&n.v()===r||n(r):(n=t.get("_ko_property_writers"))&&n[i]&&n[i](r)}}}();s.b("expressionRewriting",s.h);s.b("expressionRewriting.bindingRewriteValidators",s.h.ha);s.b("expressionRewriting.parseObjectLiteral",s.h.Wa);s.b("expressionRewriting.preProcessBindings",s.h.ya);s.b("expressionRewriting._twoWayBindings",s.h.V);s.b("jsonExpressionRewriting",s.h);s.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",s.h.ya),function(){function n(n){return 8==n.nodeType&&e.test(t?n.text:n.nodeValue)}function i(n){return 8==n.nodeType&&o.test(t?n.text:n.nodeValue)}function u(t,r){for(var u=t,f=1,e=[];u=u.nextSibling;){if(i(u)&&(f--,0===f))return e;e.push(u);n(u)&&f++}if(!r)throw Error("Cannot find closing comment tag to match: "+t.nodeValue);return null}function f(n,t){var i=u(n,t);return i?0<i.length?i[i.length-1].nextSibling:n.nextSibling:null}var t=r&&"<!--test-->"===r.createComment("test").text,e=t?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,o=t?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,h={ul:!0,ol:!0};s.f={Q:{},childNodes:function(t){return n(t)?u(t):t.childNodes},ja:function(t){if(n(t)){t=s.f.childNodes(t);for(var i=0,r=t.length;i<r;i++)s.removeNode(t[i])}else s.a.Ka(t)},T:function(t,i){if(n(t)){s.f.ja(t);for(var u=t.nextSibling,r=0,f=i.length;r<f;r++)u.parentNode.insertBefore(i[r],u)}else s.a.T(t,i)},Hb:function(t,i){n(t)?t.parentNode.insertBefore(i,t.nextSibling):t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i)},Bb:function(t,i,r){r?n(t)?t.parentNode.insertBefore(i,r.nextSibling):r.nextSibling?t.insertBefore(i,r.nextSibling):t.appendChild(i):s.f.Hb(t,i)},firstChild:function(t){return n(t)?!t.nextSibling||i(t.nextSibling)?null:t.nextSibling:t.firstChild},nextSibling:function(t){return n(t)&&(t=f(t)),t.nextSibling&&i(t.nextSibling)?null:t.nextSibling},gc:n,xc:function(n){return(n=(t?n.text:n.nodeValue).match(e))?n[1]:null},Fb:function(t){var o,r,u,e;if(h[s.a.t(t)]&&(o=t.firstChild,o))do if(1===o.nodeType){if(r=o.firstChild,u=null,r)do u?u.push(r):n(r)?(e=f(r,!0),e?r=e:u=[r]):i(r)&&(u=[r]);while(r=r.nextSibling);if(r=u)for(u=o.nextSibling,e=0;e<r.length;e++)u?t.insertBefore(r[e],u):t.appendChild(r[e])}while(o=o.nextSibling)}}}();s.b("virtualElements",s.f);s.b("virtualElements.allowedBindings",s.f.Q);s.b("virtualElements.emptyNode",s.f.ja);s.b("virtualElements.insertAfter",s.f.Bb);s.b("virtualElements.prepend",s.f.Hb);s.b("virtualElements.setDomNodeChildren",s.f.T),function(){s.J=function(){this.Yb={}};s.a.extend(s.J.prototype,{nodeHasBindings:function(n){switch(n.nodeType){case 1:return null!=n.getAttribute("data-bind")||s.g.getComponentNameForNode(n);case 8:return s.f.gc(n);default:return!1}},getBindings:function(n,t){var i=this.getBindingsString(n,t),i=i?this.parseBindingsString(i,t,n):null;return s.g.mb(i,n,t,!1)},getBindingAccessors:function(n,t){var i=this.getBindingsString(n,t),i=i?this.parseBindingsString(i,t,n,{valueAccessors:!0}):null;return s.g.mb(i,n,t,!0)},getBindingsString:function(n){switch(n.nodeType){case 1:return n.getAttribute("data-bind");case 8:return s.f.xc(n);default:return null}},parseBindingsString:function(n,t,i,r){var u,f,e,h,c;try{return u=this.Yb,f=n+(r&&r.valueAccessors||""),(e=u[f])||(c="with($context){with($data||{}){return{"+s.h.ya(n,r)+"}}}",h=new Function("$context","$element",c),e=u[f]=h),e(t,i)}catch(o){throw o.message="Unable to parse bindings.\nBindings value: "+n+"\nMessage: "+o.message,o;}}});s.J.instance=new s.J}();s.b("bindingProvider",s.J),function(){function v(n){return function(){return n}}function u(n){return n()}function o(n){return s.a.na(s.k.B(n),function(t,i){return function(){return n()[i]}})}function y(n,t){return o(this.getBindings.bind(this,n,t))}function h(n,t,i){var r,u=s.f.firstChild(t),f=s.J.instance,e=f.preprocessNode;if(e){for(;r=u;)u=s.f.nextSibling(r),e.call(f,r);u=s.f.firstChild(t)}for(;r=u;)u=s.f.nextSibling(r),c(n,r,i)}function c(n,t,i){var u=!0,r=1===t.nodeType;r&&s.f.Fb(t);(r&&i||s.J.instance.nodeHasBindings(t))&&(u=l(t,null,n,i).shouldBindDescendants);u&&!a[s.a.t(t)]&&h(n,t,!r)}function p(n){var i=[],r={},t=[];return s.a.G(n,function u(f){if(!r[f]){var e=s.getBindingHandler(f);e&&(e.after&&(t.push(f),s.a.u(e.after,function(i){if(n[i]){if(-1!==s.a.m(t,i))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+t.join(", "));u(i)}}),t.length--),i.push({key:f,zb:e}));r[f]=!0}}),i}function l(t,i,r,e){var v=s.a.e.get(t,f),o,l,a,c;if(!i){if(v)throw Error("You cannot apply bindings multiple times to the same element.");s.a.e.set(t,f,!0)}if(!v&&e&&s.Ob(t,r),i&&"function"!=typeof i)o=i;else{var w=s.J.instance,b=w.getBindingAccessors||y,h=s.j(function(){return(o=i?i(r,t):b.call(w,t,r))&&r.I&&r.I(),o},null,{o:t});o&&h.Z()||(h=null)}return o&&(a=h?function(n){return function(){return u(h()[n])}}:function(n){return o[n]},c=function(){return s.a.na(h?h():o,u)},c.get=function(n){return o[n]&&u(a(n))},c.has=function(n){return n in o},e=p(o),s.a.u(e,function(i){var e=i.zb.init,h=i.zb.update,u=i.key;if(8===t.nodeType&&!s.f.Q[u])throw Error("The binding '"+u+"' cannot be used with virtual elements");try{"function"==typeof e&&s.k.B(function(){var i=e(t,a(u),c,r.$data,r);if(i&&i.controlsDescendantBindings){if(l!==n)throw Error("Multiple bindings ("+l+" and "+u+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");l=u}});"function"==typeof h&&s.j(function(){h(t,a(u),c,r.$data,r)},null,{o:t})}catch(f){throw f.message='Unable to process binding "'+u+": "+o[u]+'"\nMessage: '+f.message,f;}})),{shouldBindDescendants:l===n}}function r(n){return n&&n instanceof s.N?n:new s.N(n)}var a,f,e;s.d={};a={script:!0};s.getBindingHandler=function(n){return s.d[n]};s.N=function(t,i,r,u){var f=this,h="function"==typeof t&&!s.C(t),o,e=s.j(function(){var o=h?t():t,n=s.a.c(o);return i?(i.I&&i.I(),s.a.extend(f,i),e&&(f.I=e)):(f.$parents=[],f.$root=n,f.ko=s),f.$rawData=o,f.$data=n,r&&(f[r]=n),u&&u(f,i,n),f.$data},null,{Ia:function(){return o&&!s.a.ob(o)},o:!0});e.Z()&&(f.I=e,e.equalityComparer=null,o=[],e.Tb=function(t){o.push(t);s.a.w.da(t,function(t){s.a.ua(o,t);o.length||(e.K(),f.I=e=n)})})};s.N.prototype.createChildContext=function(n,t,i){return new s.N(n,this,t,function(n,t){n.$parentContext=t;n.$parent=t.$data;n.$parents=(t.$parents||[]).slice(0);n.$parents.unshift(n.$parent);i&&i(n)})};s.N.prototype.extend=function(n){return new s.N(this.I||this.$data,this,null,function(t,i){t.$rawData=i.$rawData;s.a.extend(t,"function"==typeof n?n():n)})};f=s.a.e.F();e=s.a.e.F();s.Ob=function(n,t){if(2==arguments.length)s.a.e.set(n,e,t),t.I&&t.I.Tb(n);else return s.a.e.get(n,e)};s.ra=function(n,t,i){return 1===n.nodeType&&s.f.Fb(n),l(n,t,r(i),!0)};s.Wb=function(n,t,i){return i=r(i),s.ra(n,"function"==typeof t?o(t.bind(null,i,n)):s.a.na(t,v),i)};s.Ca=function(n,t){1!==t.nodeType&&8!==t.nodeType||h(r(n),t,!0)};s.pb=function(n,u){if(!t&&i.jQuery&&(t=i.jQuery),u&&1!==u.nodeType&&8!==u.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");u=u||i.document.body;c(r(n),u,!0)};s.Ha=function(t){switch(t.nodeType){case 1:case 8:var i=s.Ob(t);if(i)return i;if(t.parentNode)return s.Ha(t.parentNode)}return n};s.$b=function(t){return(t=s.Ha(t))?t.$data:n};s.b("bindingHandlers",s.d);s.b("applyBindings",s.pb);s.b("applyBindingsToDescendants",s.Ca);s.b("applyBindingAccessorsToNode",s.ra);s.b("applyBindingsToNode",s.Wb);s.b("contextFor",s.Ha);s.b("dataFor",s.$b)}(),function(n){function u(t,u){var e=i.hasOwnProperty(t)?i[t]:n,o;e||(e=i[t]=new s.P,f(t,function(n){r[t]=n;delete i[t];o?e.notifySubscribers(n):setTimeout(function(){e.notifySubscribers(n)},0)}),o=!0);e.U(u)}function f(n,i){t("getConfig",[n],function(r){r?t("loadComponent",[n,r],function(n){i(n)}):i(null)})}function t(i,r,u,f){var e,o,h;if(f||(f=s.g.loaders.slice(0)),e=f.shift(),e)if(o=e[i],o){if(h=!1,o.apply(e,r.concat(function(n){h?u(null):null!==n?u(n):t(i,r,u,f)}))!==n&&(h=!0,!e.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else t(i,r,u,f);else u(null)}var i={},r={};s.g={get:function(t,i){var f=r.hasOwnProperty(t)?r[t]:n;f?setTimeout(function(){i(f)},0):u(t,i)},tb:function(n){delete r[n]},jb:t};s.g.loaders=[];s.b("components",s.g);s.b("components.get",s.g.get);s.b("components.clearCachedDefinition",s.g.tb)}(),function(){function l(n,i,r,f){function e(){0==--c&&f(o)}var o={},c=2,h=r.template;r=r.viewModel;h?u(i,h,function(t){s.g.jb("loadTemplate",[n,t],function(n){o.template=n;e()})}):e();r?u(i,r,function(i){s.g.jb("loadViewModel",[n,i],function(n){o[t]=n;e()})}):e()}function e(n,i,r){if("function"==typeof i)r(function(n){return new i(n)});else if("function"==typeof i[t])r(i[t]);else if("instance"in i){var u=i.instance;r(function(){return u})}else"viewModel"in i?e(n,i.viewModel,r):n("Unknown viewModel value: "+i)}function h(n){switch(s.a.t(n)){case"script":return s.a.ba(n.text);case"textarea":return s.a.ba(n.value);case"template":if(c(n.content))return s.a.ia(n.content.childNodes)}return s.a.ia(n.childNodes)}function c(n){return i.DocumentFragment?n instanceof DocumentFragment:n&&11===n.nodeType}function u(n,t,r){"string"==typeof t.require?o||i.require?(o||i.require)([t.require],r):n("Uses require, but no AMD loader is present"):r(t)}function f(n){return function(t){throw Error("Component '"+n+"': "+t);}}var n={},t;s.g.tc=function(t,i){if(!i)throw Error("Invalid configuration for "+t);if(s.g.Qa(t))throw Error("Component "+t+" is already registered");n[t]=i};s.g.Qa=function(t){return t in n};s.g.wc=function(t){delete n[t];s.g.tb(t)};s.g.ub={getConfig:function(t,i){i(n.hasOwnProperty(t)?n[t]:null)},loadComponent:function(n,t,i){var r=f(n);u(r,t,function(t){l(n,r,t,i)})},loadTemplate:function(n,t,u){if(n=f(n),"string"==typeof t)u(s.a.ba(t));else if(t instanceof Array)u(t);else if(c(t))u(s.a.S(t.childNodes));else if(t.element)if(t=t.element,i.HTMLElement?t instanceof HTMLElement:t&&t.tagName&&1===t.nodeType)u(h(t));else if("string"==typeof t){var e=r.getElementById(t);e?u(h(e)):n("Cannot find element with ID "+t)}else n("Unknown element type: "+t);else n("Unknown template value: "+t)},loadViewModel:function(n,t,i){e(f(n),t,i)}};t="createViewModel";s.b("components.register",s.g.tc);s.b("components.isRegistered",s.g.Qa);s.b("components.unregister",s.g.wc);s.b("components.defaultLoader",s.g.ub);s.g.loaders.push(s.g.ub);s.g.Ub=n}(),function(){function n(n,i){var r=n.getAttribute("params");if(r){var r=t.parseBindingsString(r,i,n,{valueAccessors:!0,bindingParams:!0}),r=s.a.na(r,function(t){return s.s(t,null,{o:n})}),u=s.a.na(r,function(t){return t.Z()?s.s(function(){return s.a.c(t())},null,{o:n}):t.v()});return u.hasOwnProperty("$raw")||(u.$raw=r),u}return{$raw:{}}}s.g.getComponentNameForNode=function(n){return n=s.a.t(n),s.g.Qa(n)&&n};s.g.mb=function(t,i,r,u){var f,e;if(1===i.nodeType&&(f=s.g.getComponentNameForNode(i),f)){if(t=t||{},t.component)throw Error('Cannot use the "component" binding on a custom element matching a component');e={name:f,params:n(i,r)};t.component=u?function(){return e}:e}return t};var t=new s.J;9>s.a.L&&(s.g.register=function(n){return function(t){return r.createElement(t),n.apply(this,arguments)}}(s.g.register),r.createDocumentFragment=function(n){return function(){var t=n(),i=s.g.Ub;for(var r in i)i.hasOwnProperty(r)&&t.createElement(r);return t}}(r.createDocumentFragment))}(),function(){var n=0;s.d.component={init:function(t,i,r,u,f){function h(){var n=e&&e.dispose;"function"==typeof n&&n.call(e);o=null}var e,o;return s.a.w.da(t,h),s.s(function(){var u=s.a.c(i()),r,c,l;if("string"==typeof u?r=u:(r=s.a.c(u.name),c=s.a.c(u.params)),!r)throw Error("No component name specified");l=o=++n;s.g.get(r,function(n){var i,u;if(o===l){if(h(),!n)throw Error("Unknown component '"+r+"'");if(i=n.template,!i)throw Error("Component '"+r+"' has no template");i=s.a.ia(i);s.f.T(t,i);i=c;u=n.createViewModel;n=u?u.call(n,i,{element:t}):i;i=f.createChildContext(n);e=n;s.Ca(i,t)}})},null,{o:t}),{controlsDescendantBindings:!0}}};s.f.Q.component=!0}();w={"class":"className","for":"htmlFor"};s.d.attr={update:function(t,i){var r=s.a.c(i())||{};s.a.G(r,function(i,r){r=s.a.c(r);var u=!1===r||null===r||r===n;u&&t.removeAttribute(i);8>=s.a.L&&i in w?(i=w[i],u?t.removeAttribute(i):t[i]=r):u||t.setAttribute(i,r.toString());"name"===i&&s.a.Mb(t,u?"":r.toString())})}},function(){s.d.checked={after:["value","attr"],init:function(t,i,r){function c(){var c=t.checked,n=a?u():c,o;s.Y.ma()||f&&!c||(o=s.k.B(i),e?h!==n?(c&&(s.a.ea(o,n,!0),s.a.ea(o,h,!1)),h=n):s.a.ea(o,n,c):s.h.pa(o,r,"checked",n,!0))}function l(){var n=s.a.c(i());t.checked=e?0<=s.a.m(n,u()):o?n:u()===n}var u=s.Ib(function(){return r.has("checkedValue")?s.a.c(r.get("checkedValue")):r.has("value")?s.a.c(r.get("value")):t.value}),o="checkbox"==t.type,f="radio"==t.type;if(o||f){var e=o&&s.a.c(i())instanceof Array,h=e?u():n,a=f||e;f&&!t.name&&s.d.uniqueName.init(t,function(){return!0});s.s(c,null,{o:t});s.a.n(t,"click",c);s.s(l,null,{o:t})}}};s.h.V.checked=!0;s.d.checkedValue={update:function(n,t){n.value=s.a.c(t())}}}();s.d.css={update:function(n,t){var i=s.a.c(t());"object"==typeof i?s.a.G(i,function(t,i){i=s.a.c(i);s.a.Ba(n,t,i)}):(i=String(i||""),s.a.Ba(n,n.__ko__cssValue,!1),n.__ko__cssValue=i,s.a.Ba(n,i,!0))}};s.d.enable={update:function(n,t){var i=s.a.c(t());i&&n.disabled?n.removeAttribute("disabled"):i||n.disabled||(n.disabled=!0)}};s.d.disable={update:function(n,t){s.d.enable.update(n,function(){return!s.a.c(t())})}};s.d.event={init:function(n,t,i,r,u){var f=t()||{};s.a.G(f,function(f){"string"==typeof f&&s.a.n(n,f,function(n){var o,h=t()[f],e;if(h){try{e=s.a.S(arguments);r=u.$data;e.unshift(r);o=h.apply(r,e)}finally{!0!==o&&(n.preventDefault?n.preventDefault():n.returnValue=!1)}!1===i.get(f+"Bubble")&&(n.cancelBubble=!0,n.stopPropagation&&n.stopPropagation())}})})}};s.d.foreach={Eb:function(n){return function(){var i=n(),t=s.a.Xa(i);return!t||"number"==typeof t.length?{foreach:i,templateEngine:s.O.Oa}:(s.a.c(i),{foreach:t.data,as:t.as,includeDestroyed:t.includeDestroyed,afterAdd:t.afterAdd,beforeRemove:t.beforeRemove,afterRender:t.afterRender,beforeMove:t.beforeMove,afterMove:t.afterMove,templateEngine:s.O.Oa})}},init:function(n,t){return s.d.template.init(n,s.d.foreach.Eb(t))},update:function(n,t,i,r,u){return s.d.template.update(n,s.d.foreach.Eb(t),i,r,u)}};s.h.ha.foreach=!1;s.f.Q.foreach=!0;s.d.hasfocus={init:function(n,t,i){function r(r){var u,f;if(n.__ko_hasfocusUpdating=!0,u=n.ownerDocument,"activeElement"in u){try{f=u.activeElement}catch(e){f=u.body}r=f===n}u=t();s.h.pa(u,i,"hasfocus",r,!0);n.__ko_hasfocusLastValue=r;n.__ko_hasfocusUpdating=!1}var u=r.bind(null,!0),f=r.bind(null,!1);s.a.n(n,"focus",u);s.a.n(n,"focusin",u);s.a.n(n,"blur",f);s.a.n(n,"focusout",f)},update:function(n,t){var i=!!s.a.c(t());n.__ko_hasfocusUpdating||n.__ko_hasfocusLastValue===i||(i?n.focus():n.blur(),s.k.B(s.a.oa,null,[n,i?"focusin":"focusout"]))}};s.h.V.hasfocus=!0;s.d.hasFocus=s.d.hasfocus;s.h.V.hasFocus=!0;s.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(n,t){s.a.$a(n,t())}};p("if");p("ifnot",!1,!0);p("with",!0,!1,function(n,t){return n.createChildContext(t)});v={};s.d.options={init:function(n){if("select"!==s.a.t(n))throw Error("options binding applies only to SELECT elements");for(;0<n.length;)n.remove(0);return{controlsDescendantBindings:!0}},update:function(t,i,r){function c(){return s.a.ta(t.options,function(n){return n.selected})}function l(n,t,i){var r=typeof t;return"function"==r?t(n):"string"==r?n[t]:i}function a(n,i){if(f.length){var r=0<=s.a.m(f,s.i.q(i[0]));s.a.Nb(i[0],r);h&&!r&&s.k.B(s.a.oa,null,[t,"change"])}}var e=0!=t.length&&t.multiple?t.scrollTop:null,u=s.a.c(i()),y=r.get("optionsIncludeDestroyed"),o,f,h;i={};f=t.multiple?s.a.Da(c(),s.i.q):0<=t.selectedIndex?[s.i.q(t.options[t.selectedIndex])]:[];u&&("undefined"==typeof u.length&&(u=[u]),o=s.a.ta(u,function(t){return y||t===n||null===t||!s.a.c(t._destroy)}),r.has("optionsCaption")&&(u=s.a.c(r.get("optionsCaption")),null!==u&&u!==n&&o.unshift(v)));h=!1;i.beforeRemove=function(n){t.removeChild(n)};u=a;r.has("optionsAfterRender")&&(u=function(t,i){a(0,i);s.k.B(r.get("optionsAfterRender"),null,[i[0],t!==v?t:n])});s.a.Za(t,o,function(i,u,e){return e.length&&(f=e[0].selected?[s.i.q(e[0])]:[],h=!0),u=t.ownerDocument.createElement("option"),i===v?(s.a.bb(u,r.get("optionsCaption")),s.i.ca(u,n)):(e=l(i,r.get("optionsValue"),i),s.i.ca(u,s.a.c(e)),i=l(i,r.get("optionsText"),e),s.a.bb(u,i)),[u]},i,u);s.k.B(function(){r.get("valueAllowUnset")&&r.has("value")?s.i.ca(t,s.a.c(r.get("value")),!0):(t.multiple?f.length&&c().length<f.length:f.length&&0<=t.selectedIndex?s.i.q(t.options[t.selectedIndex])!==f[0]:f.length||0<=t.selectedIndex)&&s.a.oa(t,"change")});s.a.dc(t);e&&20<Math.abs(e-t.scrollTop)&&(t.scrollTop=e)}};s.d.options.Va=s.a.e.F();s.d.selectedOptions={after:["options","foreach"],init:function(n,t,i){s.a.n(n,"change",function(){var u=t(),r=[];s.a.u(n.getElementsByTagName("option"),function(n){n.selected&&r.push(s.i.q(n))});s.h.pa(u,i,"selectedOptions",r)})},update:function(n,t){if("select"!=s.a.t(n))throw Error("values binding applies only to SELECT elements");var i=s.a.c(t());i&&"number"==typeof i.length&&s.a.u(n.getElementsByTagName("option"),function(n){var t=0<=s.a.m(i,s.i.q(n));s.a.Nb(n,t)})}};s.h.V.selectedOptions=!0;s.d.style={update:function(t,i){var r=s.a.c(i()||{});s.a.G(r,function(i,r){r=s.a.c(r);(null===r||r===n||!1===r)&&(r="");t.style[i]=r})}};s.d.submit={init:function(n,t,i,r,u){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");s.a.n(n,"submit",function(i){var r,f=t();try{r=f.call(u.$data,n)}finally{!0!==r&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}})}};s.d.text={init:function(){return{controlsDescendantBindings:!0}},update:function(n,t){s.a.bb(n,t())}};s.f.Q.text=!0,function(){if(i&&i.navigator)var t=function(n){if(n)return parseFloat(n[1])},e=i.opera&&i.opera.version&&parseInt(i.opera.version()),r=i.navigator.userAgent,o=t(r.match(/^(?:(?!chrome).)*version\/([^ ]*) safari/i)),h=t(r.match(/Firefox\/([^ ]*)/));if(10>s.a.L)var u=s.a.e.F(),f=s.a.e.F(),c=function(n){var t=this.activeElement;(t=t&&s.a.e.get(t,f))&&t(n)},l=function(n,t){var i=n.ownerDocument;s.a.e.get(i,u)||(s.a.e.set(i,u,!0),s.a.n(i,"selectionchange",c));s.a.e.set(n,f,t)};s.d.textInput={init:function(t,i,r){function u(n,i){s.a.n(t,n,i)}function p(){var r=s.a.c(i());(null===r||r===n)&&(r="");v!==n&&r===v?setTimeout(p,4):t.value!==r&&(y=r,t.value=r)}function c(){a||(v=t.value,a=setTimeout(f,4))}function f(){clearTimeout(a);v=a=n;var u=t.value;y!==u&&(y=u,s.h.pa(i(),r,"textInput",u))}var y=t.value,a,v;10>s.a.L?(u("propertychange",function(n){"value"===n.propertyName&&f()}),8==s.a.L&&(u("keyup",f),u("keydown",f)),8<=s.a.L&&(l(t,f),u("dragend",c))):(u("input",f),5>o&&"textarea"===s.a.t(t)?(u("keydown",c),u("paste",c),u("cut",c)):11>e?u("keydown",c):4>h&&(u("DOMAutoComplete",f),u("dragdrop",f),u("drop",f)));u("change",f);s.s(p,null,{o:t})}};s.h.V.textInput=!0;s.d.textinput={preprocess:function(n,t,i){i("textInput",n)}}}();s.d.uniqueName={init:function(n,t){if(t()){var i="ko_unique_"+ ++s.d.uniqueName.Zb;s.a.Mb(n,i)}}};s.d.uniqueName.Zb=0;s.d.value={after:["options","foreach"],init:function(n,t,i){var o,h;if("input"!=n.tagName.toLowerCase()||"checkbox"!=n.type&&"radio"!=n.type){var r=["change"],u=i.get("valueUpdate"),f=!1,e=null;u&&("string"==typeof u&&(u=[u]),s.a.ga(r,u),r=s.a.rb(r));o=function(){e=null;f=!1;var r=t(),u=s.i.q(n);s.h.pa(r,i,"value",u)};!s.a.L||"input"!=n.tagName.toLowerCase()||"text"!=n.type||"off"==n.autocomplete||n.form&&"off"==n.form.autocomplete||-1!=s.a.m(r,"propertychange")||(s.a.n(n,"propertychange",function(){f=!0}),s.a.n(n,"focus",function(){f=!1}),s.a.n(n,"blur",function(){f&&o()}));s.a.u(r,function(t){var i=o;s.a.vc(t,"after")&&(i=function(){e=s.i.q(n);setTimeout(o,0)},t=t.substring(5));s.a.n(n,t,i)});h=function(){var r=s.a.c(t()),u=s.i.q(n),f;null!==e&&r===e?setTimeout(h,0):r!==u&&("select"===s.a.t(n)?(f=i.get("valueAllowUnset"),u=function(){s.i.ca(n,r,f)},u(),f||r===s.i.q(n)?setTimeout(u,0):s.k.B(s.a.oa,null,[n,"change"])):s.i.ca(n,r))};s.s(h,null,{o:n})}else s.ra(n,{checkedValue:t})},update:function(){}};s.h.V.value=!0;s.d.visible={update:function(n,t){var i=s.a.c(t()),r="none"!=n.style.display;i&&!r?n.style.display="":!i&&r&&(n.style.display="none")}},function(n){s.d[n]={init:function(t,i,r,u,f){return s.d.event.init.call(this,t,function(){var t={};return t[n]=i(),t},r,u,f)}}}("click");s.H=function(){};s.H.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");};s.H.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock");};s.H.prototype.makeTemplateSource=function(n,t){if("string"==typeof n){t=t||r;var i=t.getElementById(n);if(!i)throw Error("Cannot find template with ID "+n);return new s.r.l(i)}if(1==n.nodeType||8==n.nodeType)return new s.r.fa(n);throw Error("Unknown template type: "+n);};s.H.prototype.renderTemplate=function(n,t,i,r){return n=this.makeTemplateSource(n,r),this.renderTemplateSource(n,t,i)};s.H.prototype.isTemplateRewritten=function(n,t){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(n,t).data("isRewritten")};s.H.prototype.rewriteTemplate=function(n,t,i){n=this.makeTemplateSource(n,i);t=t(n.text());n.text(t);n.data("isRewritten",!0)};s.b("templateEngine",s.H);s.fb=function(){function n(n,t,i,r){var o,f,u,e;for(n=s.h.Wa(n),o=s.h.ha,f=0;f<n.length;f++)if(u=n[f].key,o.hasOwnProperty(u))if(e=o[u],"function"==typeof e){if(u=e(n[f].value))throw Error(u);}else if(!e)throw Error("This template engine does not support the '"+u+"' binding within its templates");return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+s.h.ya(n,{valueAccessors:!0})+" } })()},'"+i.toLowerCase()+"')",r.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{ec:function(n,t,i){t.isTemplateRewritten(n,i)||t.rewriteTemplate(n,function(n){return s.fb.nc(n,t)},i)},nc:function(r,u){return r.replace(t,function(t,i,r,f,e){return n(e,i,r,u)}).replace(i,function(t,i){return n(i,"<!-- ko -->","#comment",u)})},Xb:function(n,t){return s.D.Ua(function(i,r){var u=i.nextSibling;u&&u.nodeName.toLowerCase()===t&&s.ra(u,n,r)})}}}();s.b("__tr_ambtns",s.fb.Xb),function(){var i,t;s.r={};s.r.l=function(n){this.l=n};s.r.l.prototype.text=function(){var n=s.a.t(this.l),n="script"===n?"text":"textarea"===n?"value":"innerHTML",t;if(0==arguments.length)return this.l[n];t=arguments[0];"innerHTML"===n?s.a.$a(this.l,t):this.l[n]=t};i=s.a.e.F()+"_";s.r.l.prototype.data=function(n){if(1===arguments.length)return s.a.e.get(this.l,i+n);s.a.e.set(this.l,i+n,arguments[1])};t=s.a.e.F();s.r.fa=function(n){this.l=n};s.r.fa.prototype=new s.r.l;s.r.fa.prototype.text=function(){if(0==arguments.length){var i=s.a.e.get(this.l,t)||{};return i.gb===n&&i.Ga&&(i.gb=i.Ga.innerHTML),i.gb}s.a.e.set(this.l,t,{gb:arguments[0]})};s.r.l.prototype.nodes=function(){if(0==arguments.length)return(s.a.e.get(this.l,t)||{}).Ga;s.a.e.set(this.l,t,{Ga:arguments[0]})};s.b("templateSources",s.r);s.b("templateSources.domElement",s.r.l);s.b("templateSources.anonymousTemplate",s.r.fa)}(),function(){function t(n,t,i){var r;for(t=s.f.nextSibling(t);n&&(r=n)!==t;)n=s.f.nextSibling(r),i(r,n)}function f(n,i){if(n.length){var r=n[0],u=n[n.length-1],f=r.parentNode,e=s.J.instance,o=e.preprocessNode;if(o){if(t(r,u,function(n,t){var f=n.previousSibling,i=o.call(e,n);i&&(n===r&&(r=i[0]||t),n===u&&(u=i[i.length-1]||f))}),n.length=0,!r)return;r===u?n.push(r):(n.push(r,u),s.a.ka(n,f))}t(r,u,function(n){1!==n.nodeType&&8!==n.nodeType||s.pb(i,n)});t(r,u,function(n){1!==n.nodeType&&8!==n.nodeType||s.D.Sb(n,[i])});s.a.ka(n,f)}}function i(n){return n.nodeType?n:0<n.length?n[0]:null}function e(n,t,u,e,o){o=o||{};var h=n&&i(n),h=h&&h.ownerDocument,c=o.templateEngine||r;if(s.fb.ec(u,c,h),u=c.renderTemplate(u,e,o,h),"number"!=typeof u.length||0<u.length&&"number"!=typeof u[0].nodeType)throw Error("Template engine must return an array of DOM nodes");h=!1;switch(t){case"replaceChildren":s.f.T(n,u);h=!0;break;case"replaceNode":s.a.Lb(n,u);h=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t);}return h&&(f(u,e),o.afterRender&&s.k.B(o.afterRender,null,[u,e.$data])),u}var r,u;s.ab=function(t){if(t!=n&&!(t instanceof s.H))throw Error("templateEngine must inherit from ko.templateEngine");r=t};s.Ya=function(t,u,f,o,h){if(f=f||{},(f.templateEngine||r)==n)throw Error("Set a template engine before calling renderTemplate");if(h=h||"replaceChildren",o){var c=i(o);return s.j(function(){var n=u&&u instanceof s.N?u:new s.N(s.a.c(u)),r=s.C(t)?t():"function"==typeof t?t(n.$data,n):t,n=e(o,h,r,n,f);"replaceNode"==h&&(o=n,c=i(o))},null,{Ia:function(){return!c||!s.a.Ja(c)},o:c&&"replaceNode"==h?c.parentNode:c})}return s.D.Ua(function(n){s.Ya(t,u,f,n,"replaceNode")})};s.uc=function(t,i,r,u,o){function c(n,t){f(t,h);r.afterRender&&r.afterRender(t,n)}function l(n,i){h=o.createChildContext(n,r.as,function(n){n.$index=i});var u=s.C(t)?t():"function"==typeof t?t(n,h):t;return e(null,"ignoreTargetNode",u,h,r)}var h;return s.j(function(){var t=s.a.c(i)||[];"undefined"==typeof t.length&&(t=[t]);t=s.a.ta(t,function(t){return r.includeDestroyed||t===n||null===t||!s.a.c(t._destroy)});s.k.B(s.a.Za,null,[u,t,l,r,c])},null,{o:u})};u=s.a.e.F();s.d.template={init:function(n,t){var i=s.a.c(t());return"string"==typeof i||i.name?s.f.ja(n):(i=s.f.childNodes(n),i=s.a.oc(i),new s.r.fa(n).nodes(i)),{controlsDescendantBindings:!0}},update:function(t,i,r,f,e){var h=i(),o;i=s.a.c(h);r=!0;f=null;"string"==typeof i?i={}:(h=i.name,"if"in i&&(r=s.a.c(i["if"])),r&&"ifnot"in i&&(r=!s.a.c(i.ifnot)),o=s.a.c(i.data));"foreach"in i?f=s.uc(h||t,r&&i.foreach||[],i,t,e):r?(e="data"in i?e.createChildContext(o,i.as):e,f=s.Ya(h||t,e,i,t)):s.f.ja(t);e=f;(o=s.a.e.get(t,u))&&"function"==typeof o.K&&o.K();s.a.e.set(t,u,e&&e.Z()?e:n)}};s.h.ha.template=function(n){return n=s.h.Wa(n),1==n.length&&n[0].unknown||s.h.lc(n,"name")?null:"This template engine does not support anonymous templates nested within its templates"};s.f.Q.template=!0}();s.b("setTemplateEngine",s.ab);s.b("renderTemplate",s.Ya);s.a.wb=function(n,t,i){if(n.length&&t.length)for(var o,r,f,e,u=o=0;(!i||u<i)&&(f=n[o]);++o){for(r=0;e=t[r];++r)if(f.value===e.value){f.moved=e.index;e.moved=f.index;t.splice(r,1);u=r=0;break}u+=r}};s.a.Fa=function(){function n(n,t,i,r,u){for(var o=Math.min,l=Math.max,a=[],c=n.length,f,h=t.length,v=h-c||1,w=c+h+1,y,p,b,e=0;e<=c;e++)for(p=y,a.push(y=[]),b=o(h,e+v),f=l(0,e-1);f<=b;f++)y[f]=f?e?n[e-1]===t[f-1]?p[f-1]:o(p[f]||w,y[f-1]||w)+1:f+1:e+1;for(o=[],l=[],v=[],e=c,f=h;e||f;)h=a[e][f]-1,f&&h===a[e][f-1]?l.push(o[o.length]={status:i,value:t[--f],index:f}):e&&h===a[e-1][f]?v.push(o[o.length]={status:r,value:n[--e],index:e}):(--f,--e,u.sparse||o.push({status:"retained",value:t[f]}));return s.a.wb(l,v,10*c),o.reverse()}return function(t,i,r){return r="boolean"==typeof r?{dontLimitMoves:r}:r||{},t=t||[],i=i||[],t.length<=i.length?n(t,i,"added","deleted",r):n(i,t,"deleted","added",r)}}();s.b("utils.compareArrays",s.a.Fa),function(){function i(t,i,r,u,f){var e=[],o=s.j(function(){var n=i(r,f,s.a.ka(e,t))||[];0<e.length&&(s.a.Lb(e,n),u&&s.k.B(u,null,[r,n,f]));e.length=0;s.a.ga(e,n)},null,{o:t,Ia:function(){return!s.a.ob(e)}});return{$:e,j:o.Z()?o:n}}var t=s.a.e.F();s.a.Za=function(r,u,f,e,o){function rt(n,t){h=k[t];nt!==t&&(it[n]=h);h.Na(nt++);s.a.ka(h.$,r);g.push(h);p.push(h)}function v(n,t){if(n)for(var i=0,r=t.length;i<r;i++)t[i]&&s.a.u(t[i].$,function(r){n(r,i,t[i].sa)})}var c,y,ut;u=u||[];e=e||{};var y=s.a.e.get(r,t)===n,k=s.a.e.get(r,t)||[],d=s.a.Da(k,function(n){return n.sa}),l=s.a.Fa(d,u,e.dontLimitMoves),g=[],a=0,nt=0,tt=[],p=[];u=[];for(var it=[],d=[],h,c=0,w,b;w=l[c];c++)switch(b=w.moved,w.status){case"deleted":b===n&&(h=k[a],h.j&&h.j.K(),tt.push.apply(tt,s.a.ka(h.$,r)),e.beforeRemove&&(u[c]=h,p.push(h)));a++;break;case"retained":rt(c,a++);break;case"added":b!==n?rt(c,b):(h={sa:w.value,Na:s.p(nt++)},g.push(h),p.push(h),y||(d[c]=h))}for(v(e.beforeMove,it),s.a.u(tt,e.beforeRemove?s.R:s.removeNode),c=0,y=s.f.firstChild(r);h=p[c];c++){for(h.$||s.a.extend(h,i(r,f,h.sa,o,h.Na)),a=0;l=h.$[a];y=l.nextSibling,ut=l,a++)l!==y&&s.f.Bb(r,l,ut);!h.ic&&o&&(o(h.sa,h.$,h.Na),h.ic=!0)}v(e.beforeRemove,u);v(e.afterMove,it);v(e.afterAdd,d);s.a.e.set(r,t,g)}}();s.b("utils.setDomNodeChildrenFromArrayMapping",s.a.Za);s.O=function(){this.allowTemplateRewriting=!1};s.O.prototype=new s.H;s.O.prototype.renderTemplateSource=function(n){var t=(9>s.a.L?0:n.nodes)?n.nodes():null;return t?s.a.S(t.cloneNode(!0).childNodes):(n=n.text(),s.a.ba(n))};s.O.Oa=new s.O;s.ab(s.O.Oa);s.b("nativeTemplateEngine",s.O),function(){s.Sa=function(){var n=this.kc=function(){if(!t||!t.tmpl)return 0;try{if(0<=t.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(n){}return 1}();this.renderTemplateSource=function(i,u,f){if(f=f||{},2>n)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var e=i.data("precompiled");return e||(e=i.text()||"",e=t.template(null,"{{ko_with $item.koBindingContext}}"+e+"{{/ko_with}}"),i.data("precompiled",e)),i=[u.$data],u=t.extend({koBindingContext:u},f.templateOptions),u=t.tmpl(e,i,u),u.appendTo(r.createElement("div")),t.fragments={},u};this.createJavaScriptEvaluatorBlock=function(n){return"{{ko_code ((function() { return "+n+" })()) }}"};this.addTemplate=function(n,t){r.write("<script type='text/html' id='"+n+"'>"+t+"<\/script>")};0<n&&(t.tmpl.tag.ko_code={open:"__.push($1 || '');"},t.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};s.Sa.prototype=new s.H;var n=new s.Sa;0<n.kc&&s.ab(n);s.b("jqueryTmplTemplateEngine",s.Sa)}()})})()})();var app=new ViewModel;ko.applyBindings(app)