/*!
 * Knockout JavaScript library v3.5.0-pre
 * (c) The Knockout.js team - http://knockoutjs.com/
 * License: MIT (http://www.opensource.org/licenses/mit-license.php)
 */

(function() {(function(n){var y=this||(0,eval)("this"),t=y.document,M=y.navigator,v=y.jQuery,G=y.JSON;(function(n){"function"===typeof define&&define.amd?define(["exports","require"],n):"object"===typeof exports&&"object"===typeof module?n(module.exports||exports):n(y.ko={})})(function(N,O){function J(a,c){return null===a||typeof a in R?a===c:!1}function S(b,c){var d;return function(){d||(d=a.a.setTimeout(function(){d=n;b()},c))}}function T(b,c){var d;return function(){clearTimeout(d);d=a.a.setTimeout(b,c)}}function U(a,
c){c&&"change"!==c?"beforeChange"===c?this.Ub(a):this.Ua(a,c):this.Vb(a)}function V(a,c){null!==c&&c.o&&c.o()}function W(a,c){var d=this.Wc,e=d[r];e.da||(this.Ab&&this.$a[c]?(d.Yb(c,a,this.$a[c]),this.$a[c]=null,--this.Ab):e.F[c]||d.Yb(c,a,e.G?{sa:a}:d.Ic(a)),a.tb&&a.Rc())}function K(b,c,d,e){a.f[b]={init:function(b,h,g,k,l){var m,p;a.u(function(){var k=h(),g=a.a.c(k),g=!d!==!g,z=!p;if(z||c||g!==m)z&&a.Ha.Ma()&&(p=a.a.Ga(a.g.childNodes(b),!0)),g?(z||a.g.na(b,a.a.Ga(p)),a.Da(e?e(l,k):l,b)):a.g.Ja(b),
m=g},null,{l:b});return{controlsDescendantBindings:!0}}};a.j.Fa[b]=!1;a.g.$[b]=!0}var a="undefined"!==typeof N?N:{};a.b=function(b,c){for(var d=b.split("."),e=a,f=0;f<d.length-1;f++)e=e[d[f]];e[d[d.length-1]]=c};a.P=function(a,c,d){a[c]=d};a.version="3.5.0-pre";a.b("version",a.version);a.options={deferUpdates:!1,useOnlyNativeEvents:!1};a.Ia=function(){var a=!1,c=[];return{pause:function(){a=!0},yd:function(){a=!1;for(var d=0;d<c.length;d++)c[d]();c=[]},Ec:function(d){a?c.push(d):d()}}}();a.b("delaySync",
a.Ia);a.b("delaySync.pause",a.Ia.pause);a.b("delaySync.resume",a.Ia.yd);a.b("delaySync.run",a.Ia.Ec);a.a=function(){function b(a,b){for(var c in a)f.call(a,c)&&b(c,a[c])}function c(a,b){if(b)for(var c in b)f.call(b,c)&&(a[c]=b[c]);return a}function d(a,b){a.__proto__=b;return a}function e(b,c,d,e){var l=b[c].match(u)||[];a.a.D(d.match(u),function(b){a.a.Ca(l,b,e)});b[c]=l.join(" ")}var f=Object.prototype.hasOwnProperty,h={__proto__:[]}instanceof Array,g="function"===typeof Symbol,k={},l={};k[M&&/Firefox\/2/i.test(M.userAgent)?
"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];k.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" ");b(k,function(a,b){if(b.length)for(var c=0,d=b.length;c<d;c++)l[b[c]]=a});var m={propertychange:!0},p=t&&function(){for(var a=3,b=t.createElement("div"),c=b.getElementsByTagName("i");b.innerHTML="\x3c!--[if gt IE "+ ++a+"]><i></i><![endif]--\x3e",c[0];);return 4<a?a:n}(),u=/\S+/g,q;return{mc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],
D:function(a,b){for(var c=0,d=a.length;c<d;c++)b(a[c],c)},A:function(b,c,d){if(d){c=a.a.Qa(c);d=0;for(var e=b.length;d<e;d++)if(a.a.Qa(b[d])===c)return d}else{if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(b,c);d=0;for(e=b.length;d<e;d++)if(b[d]===c)return d}return-1},ac:function(a,b,c){for(var d=0,e=a.length;d<e;d++)if(b.call(c,a[d],d))return a[d];return null},Za:function(b,c){var d=a.a.A(b,c);0<d?b.splice(d,1):0===d&&b.shift()},bc:function(b){b=b||[];for(var c=
[],d=0,e=b.length;d<e;d++)0>a.a.A(c,b[d])&&c.push(b[d]);return c},ub:function(a,b){a=a||[];for(var c=[],d=0,e=a.length;d<e;d++)c.push(b(a[d],d));return c},Xa:function(a,b){a=a||[];for(var c=[],d=0,e=a.length;d<e;d++)b(a[d],d)&&c.push(a[d]);return c},Ya: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},Ca:function(b,c,d,e){var l=a.a.A(a.a.Qa(b),c,e);e&&!a.J(c)&&(c=a.T(c));0>l?d&&b.push(c):d||b.splice(l,1)},ua:h,extend:c,setPrototypeOf:d,
nb:h?d:c,L:b,Pa:function(a,b){if(!a)return a;var c={},d;for(d in a)f.call(a,d)&&(c[d]=b(a[d],d,a));return c},Db:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},vc:function(b){b=a.a.fa(b);for(var c=(b[0]&&b[0].ownerDocument||t).createElement("div"),d=0,e=b.length;d<e;d++)c.appendChild(a.ia(b[d]));return c},Ga:function(b,c){for(var d=0,e=b.length,l=[];d<e;d++){var f=b[d].cloneNode(!0);l.push(c?a.ia(f):f)}return l},na:function(b,c){a.a.Db(b);if(c)for(var d=0,e=c.length;d<e;d++)b.appendChild(c[d])},
Dc:function(b,c){var d=b.nodeType?[b]:b;if(0<d.length){for(var e=d[0],l=e.parentNode,f=0,m=c.length;f<m;f++)l.insertBefore(c[f],e);f=0;for(m=d.length;f<m;f++)a.removeNode(d[f])}},La:function(a,b){if(a.length){for(b=8===b.nodeType&&b.parentNode||b;a.length&&a[0].parentNode!==b;)a.splice(0,1);for(;1<a.length&&a[a.length-1].parentNode!==b;)a.length--;if(1<a.length){var c=a[0],d=a[a.length-1];for(a.length=0;c!==d;)a.push(c),c=c.nextSibling;a.push(d)}}return a},Gc:function(a,b){7>p?a.setAttribute("selected",
b):a.selected=b},pb:function(a){return null===a||a===n?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ad:function(a,b){a=a||"";return b.length>a.length?!1:a.substring(0,b.length)===b},ad:function(a,b){if(a===b)return!0;if(11===a.nodeType)return!1;if(b.contains)return b.contains(1!==a.nodeType?a.parentNode:a);if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)&16);for(;a&&a!=b;)a=a.parentNode;return!!a},Cb:function(b){return a.a.ad(b,b.ownerDocument.documentElement)},
Zb:function(b){return!!a.a.ac(b,a.a.Cb)},K:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},ec:function(b){return a.onError?function(){try{return b.apply(this,arguments)}catch(c){throw a.onError&&a.onError(c),c;}}:b},setTimeout:function(b,c){return setTimeout(a.a.ec(b),c)},jc:function(b){setTimeout(function(){a.onError&&a.onError(b);throw b;},0)},C:function(b,c,d){var e=a.a.ec(d);d=m[c];if(a.options.useOnlyNativeEvents||d||!v)if(d||"function"!=typeof b.addEventListener)if("undefined"!=typeof b.attachEvent){var l=
function(a){e.call(b,a)},f="on"+c;b.attachEvent(f,l);a.a.O.Ba(b,function(){b.detachEvent(f,l)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else b.addEventListener(c,e,!1);else q||(q="function"==typeof v(b).on?"on":"bind"),v(b)[q](c,e)},Ra:function(b,c){if(!b||!b.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var d;"input"===a.a.K(b)&&b.type&&"click"==c.toLowerCase()?(d=b.type,d="checkbox"==d||"radio"==d):d=!1;if(a.options.useOnlyNativeEvents||
!v||d)if("function"==typeof t.createEvent)if("function"==typeof b.dispatchEvent)d=t.createEvent(l[c]||"HTMLEvents"),d.initEvent(c,!0,!0,y,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");else v(b).trigger(c)},c:function(b){return a.J(b)?b():b},Cd:function(b){return a.J(b)?b:a.T(b)},
Qa:function(b){return a.J(b)?b.B():b},rb:function(b,c,d){var l;c&&("object"===typeof b.classList?(l=b.classList[d?"add":"remove"],a.a.D(c.match(u),function(a){l.call(b.classList,a)})):"string"===typeof b.className.baseVal?e(b.className,"baseVal",c,d):e(b,"className",c,d))},ob:function(b,c){var d=a.a.c(c);if(null===d||d===n)d="";var e=a.g.firstChild(b);!e||3!=e.nodeType||a.g.nextSibling(e)?a.g.na(b,[b.ownerDocument.createTextNode(d)]):e.data=d;a.a.fd(b)},Fc:function(a,b){a.name=b;if(7>=p)try{a.mergeAttributes(t.createElement("<input name='"+
a.name+"'/>"),!1)}catch(c){}},fd:function(a){9<=p&&(a=1==a.nodeType?a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},bd:function(a){if(p){var b=a.style.width;a.style.width=0;a.style.width=b}},vd:function(b,c){b=a.a.c(b);c=a.a.c(c);for(var d=[],e=b;e<=c;e++)d.push(e);return d},fa:function(a){for(var b=[],c=0,d=a.length;c<d;c++)b.push(a[c]);return b},hc:function(a){return g?Symbol(a):a},Ed:6===p,Fd:7===p,ca:p,oc:function(b,c){for(var d=a.a.fa(b.getElementsByTagName("input")).concat(a.a.fa(b.getElementsByTagName("textarea"))),
e="string"==typeof c?function(a){return a.name===c}:function(a){return c.test(a.name)},l=[],f=d.length-1;0<=f;f--)e(d[f])&&l.push(d[f]);return l},sd:function(b){return"string"==typeof b&&(b=a.a.pb(b))?G&&G.parse?G.parse(b):(new Function("return "+b))():null},Nb:function(b,c,d){if(!G||!G.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 G.stringify(a.a.c(b),c,d)},ud:function(c,d,e){e=e||{};var l=e.params||{},f=e.includeFields||this.mc,m=c;if("object"==typeof c&&"form"===a.a.K(c))for(var m=c.action,k=f.length-1;0<=k;k--)for(var h=a.a.oc(c,f[k]),g=h.length-1;0<=g;g--)l[h[g].name]=h[g].value;d=a.a.c(d);var p=t.createElement("form");p.style.display="none";p.action=m;p.method="post";for(var u in d)c=t.createElement("input"),c.type="hidden",c.name=u,c.value=a.a.Nb(a.a.c(d[u])),p.appendChild(c);b(l,function(a,b){var c=t.createElement("input");
c.type="hidden";c.name=a;c.value=b;p.appendChild(c)});t.body.appendChild(p);e.submitter?e.submitter(p):p.submit();setTimeout(function(){p.parentNode.removeChild(p)},0)}}}();a.b("utils",a.a);a.b("utils.arrayForEach",a.a.D);a.b("utils.arrayFirst",a.a.ac);a.b("utils.arrayFilter",a.a.Xa);a.b("utils.arrayGetDistinctValues",a.a.bc);a.b("utils.arrayIndexOf",a.a.A);a.b("utils.arrayMap",a.a.ub);a.b("utils.arrayPushAll",a.a.Ya);a.b("utils.arrayRemoveItem",a.a.Za);a.b("utils.extend",a.a.extend);a.b("utils.fieldsIncludedWithJsonPost",
a.a.mc);a.b("utils.getFormFields",a.a.oc);a.b("utils.peekObservable",a.a.Qa);a.b("utils.postJson",a.a.ud);a.b("utils.parseJson",a.a.sd);a.b("utils.registerEventHandler",a.a.C);a.b("utils.stringifyJson",a.a.Nb);a.b("utils.range",a.a.vd);a.b("utils.toggleDomNodeCssClass",a.a.rb);a.b("utils.triggerEvent",a.a.Ra);a.b("utils.unwrapObservable",a.a.c);a.b("utils.objectForEach",a.a.L);a.b("utils.addOrRemoveItem",a.a.Ca);a.b("utils.setTextContent",a.a.ob);a.b("unwrap",a.a.c);Function.prototype.bind||(Function.prototype.bind=
function(a){var c=this;if(1===arguments.length)return function(){return c.apply(a,arguments)};var d=Array.prototype.slice.call(arguments,1);return function(){var e=d.slice(0);e.push.apply(e,arguments);return c.apply(a,e)}});a.a.h=new function(){function a(b,h){var g=b[d];if(!g||"null"===g||!e[g]){if(!h)return n;g=b[d]="ko"+c++;e[g]={}}return e[g]}var c=0,d="__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[d];return b?(delete e[b],a[d]=null,!0):!1},S:function(){return c++ +d}}};a.b("utils.domData",a.a.h);a.b("utils.domData.clear",a.a.h.clear);a.a.O=new function(){function b(b,c){var e=a.a.h.get(b,d);e===n&&c&&(e=[],a.a.h.set(b,d,e));return e}function c(d){var e=b(d,!1);if(e)for(var e=e.slice(0),k=0;k<e.length;k++)e[k](d);a.a.h.clear(d);a.a.O.cleanExternalData(d);if(f[d.nodeType])for(e=d.firstChild;d=e;)e=d.nextSibling,8===d.nodeType&&c(d)}var d=a.a.h.S(),e={1:!0,8:!0,9:!0},
f={1:!0,9:!0};return{Ba:function(a,c){if("function"!=typeof c)throw Error("Callback must be a function");b(a,!0).push(c)},Cc:function(c,e){var f=b(c,!1);f&&(a.a.Za(f,e),0==f.length&&a.a.h.set(c,d,n))},ia:function(a){if(e[a.nodeType]&&(c(a),f[a.nodeType]))for(var b=a.getElementsByTagName("*"),d,l=0;l<b.length;l++)if(c(d=b[l]),b[l]!==d)throw Error("ko.cleanNode: An already cleaned node was removed from the document");return a},removeNode:function(b){a.ia(b);b.parentNode&&b.parentNode.removeChild(b)},
cleanExternalData:function(a){v&&"function"==typeof v.cleanData&&v.cleanData([a])}}};a.ia=a.a.O.ia;a.removeNode=a.a.O.removeNode;a.b("cleanNode",a.ia);a.b("removeNode",a.removeNode);a.b("utils.domNodeDisposal",a.a.O);a.b("utils.domNodeDisposal.addDisposeCallback",a.a.O.Ba);a.b("utils.domNodeDisposal.removeDisposeCallback",a.a.O.Cc);(function(){var b=[0,"",""],c=[1,"<table>","</table>"],d=[3,"<table><tbody><tr>","</tr></tbody></table>"],e=[1,"<select multiple='multiple'>","</select>"],f={thead:c,tbody:c,
tfoot:c,tr:[2,"<table><tbody>","</tbody></table>"],td:d,th:d,option:e,optgroup:e},h=8>=a.a.ca;a.a.xa=function(c,d){var e;if(v)if(v.parseHTML)e=v.parseHTML(c,d)||[];else{if((e=v.clean([c],d))&&e[0]){for(var m=e[0];m.parentNode&&11!==m.parentNode.nodeType;)m=m.parentNode;m.parentNode&&m.parentNode.removeChild(m)}}else{(e=d)||(e=t);var m=e.parentWindow||e.defaultView||y,p=a.a.pb(c).toLowerCase(),u=e.createElement("div"),q;q=(p=p.match(/^<([a-z]+)[ >]/))&&f[p[1]]||b;p=q[0];q="ignored<div>"+q[1]+c+q[2]+
"</div>";"function"==typeof m.innerShiv?u.appendChild(m.innerShiv(q)):(h&&e.appendChild(u),u.innerHTML=q,h&&u.parentNode.removeChild(u));for(;p--;)u=u.lastChild;e=a.a.fa(u.lastChild.childNodes)}return e};a.a.Lb=function(b,c){a.a.Db(b);c=a.a.c(c);if(null!==c&&c!==n)if("string"!=typeof c&&(c=c.toString()),v)v(b).html(c);else for(var d=a.a.xa(c,b.ownerDocument),e=0;e<d.length;e++)b.appendChild(d[e])}})();a.b("utils.parseHtmlFragment",a.a.xa);a.b("utils.setHtml",a.a.Lb);a.W=function(){function b(c,e){if(c)if(8==
c.nodeType){var f=a.W.xc(c.nodeValue);null!=f&&e.push({$c:c,qd:f})}else if(1==c.nodeType)for(var f=0,h=c.childNodes,g=h.length;f<g;f++)b(h[f],e)}var c={};return{Gb: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);c[b]=a;return"\x3c!--[ko_memo:"+b+"]--\x3e"},Lc:function(a,b){var f=c[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 c[a]}},Mc:function(c,e){var f=[];b(c,f);for(var h=0,g=f.length;h<g;h++){var k=f[h].$c,l=[k];e&&a.a.Ya(l,e);a.W.Lc(f[h].qd,l);k.nodeValue="";k.parentNode&&k.parentNode.removeChild(k)}},xc:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:null}}}();a.b("memoization",a.W);a.b("memoization.memoize",a.W.Gb);a.b("memoization.unmemoize",a.W.Lc);a.b("memoization.parseMemoText",a.W.xc);a.b("memoization.unmemoizeDomNodeAndDescendants",
a.W.Mc);a.ga=function(){function b(){if(f)for(var b=f,c=0,d;g<f;)if(d=e[g++]){if(g>b){if(5E3<=++c){g=f;a.a.jc(Error("'Too much recursion' after processing "+c+" task groups."));break}b=f}try{d()}catch(p){a.a.jc(p)}}}function c(){b();g=f=e.length=0}var d,e=[],f=0,h=1,g=0;y.MutationObserver?d=function(a){var b=t.createElement("div");(new MutationObserver(a)).observe(b,{attributes:!0});return function(){b.classList.toggle("foo")}}(c):d=t&&"onreadystatechange"in t.createElement("script")?function(a){var b=
t.createElement("script");b.onreadystatechange=function(){b.onreadystatechange=null;t.documentElement.removeChild(b);b=null;a()};t.documentElement.appendChild(b)}:function(a){setTimeout(a,0)};return{scheduler:d,mb:function(b){f||a.ga.scheduler(c);e[f++]=b;return h++},cancel:function(a){a=a-(h-f);a>=g&&a<f&&(e[a]=null)},resetForTesting:function(){var a=f-g;g=f=e.length=0;return a},zd:b}}();a.b("tasks",a.ga);a.b("tasks.schedule",a.ga.mb);a.b("tasks.runEarly",a.ga.zd);a.Ka={throttle:function(b,c){b.throttleEvaluation=
c;var d=null;return a.N({read:b,write:function(e){clearTimeout(d);d=a.a.setTimeout(function(){b(e)},c)}})},rateLimit:function(a,c){var d,e,f;"number"==typeof c?d=c:(d=c.timeout,e=c.method);a.sb=!1;f="notifyWhenChangesStop"==e?T:S;a.jb(function(a){return f(a,d)})},deferred:function(b,c){if(!0!==c)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");b.sb||(b.sb=!0,b.jb(function(c){var e,f=!1;return function(){if(!f){a.ga.cancel(e);
e=a.ga.mb(c);try{f=!0,b.notifySubscribers(n,"dirty")}finally{f=!1}}}}))},notify:function(a,c){a.equalityComparer="always"==c?null:J}};var R={undefined:1,"boolean":1,number:1,string:1};a.b("extenders",a.Ka);a.Jc=function(b,c,d){this.sa=b;this.vb=c;this.Zc=d;this.da=!1;a.P(this,"dispose",this.o)};a.Jc.prototype.o=function(){this.da=!0;this.Zc()};a.U=function(){a.a.nb(this,C);C.Fb(this)};var C={Fb:function(a){a.M={change:[]};a.Wb=1},subscribe:function(b,c,d){var e=this;d=d||"change";var f=new a.Jc(e,
c?b.bind(c):b,function(){a.a.Za(e.M[d],f);e.Va&&e.Va(d)});e.Ea&&e.Ea(d);e.M[d]||(e.M[d]=[]);e.M[d].push(f);return f},notifySubscribers:function(b,c){c=c||"change";"change"===c&&this.Rb();if(this.cb(c)){var d="change"===c&&this.Pc||this.M[c].slice(0);try{a.s.cc();for(var e=0,f;f=d[e];++e)f.da||f.vb(b)}finally{a.s.end()}}},bb:function(){return this.Wb},jd:function(a){return this.bb()!==a},Rb:function(){++this.Wb},jb:function(b){var c=this,d=a.J(c),e,f,h,g;c.Ua||(c.Ua=c.notifySubscribers,c.notifySubscribers=
U);var k=b(function(){c.tb=!1;d&&g===c&&(g=c.Sb?c.Sb():c());var a=f||c.gb(h,g);f=e=!1;a&&c.Ua(h=g)});c.Vb=function(a){c.Pc=c.M.change.slice(0);c.tb=e=!0;g=a;k()};c.Ub=function(a){e||(h=a,c.Ua(a,"beforeChange"))};c.Rc=function(){c.gb(h,c.B(!0))&&(f=!0)}},cb:function(a){return this.M[a]&&this.M[a].length},gd:function(b){if(b)return this.M[b]&&this.M[b].length||0;var c=0;a.a.L(this.M,function(a,b){"dirty"!==a&&(c+=b.length)});return c},gb:function(a,c){return!this.equalityComparer||!this.equalityComparer(a,
c)},extend:function(b){var c=this;b&&a.a.L(b,function(b,e){var f=a.Ka[b];"function"==typeof f&&(c=f(c,e)||c)});return c}};a.P(C,"subscribe",C.subscribe);a.P(C,"extend",C.extend);a.P(C,"getSubscriptionsCount",C.gd);a.a.ua&&a.a.setPrototypeOf(C,Function.prototype);a.U.fn=C;a.tc=function(a){return null!=a&&"function"==typeof a.subscribe&&"function"==typeof a.notifySubscribers};a.b("subscribable",a.U);a.b("isSubscribable",a.tc);a.Ha=a.s=function(){function b(a){d.push(e);e=a}function c(){e=d.pop()}var d=
[],e,f=0;return{cc:b,end:c,Bc:function(b){if(e){if(!a.tc(b))throw Error("Only subscribable things can act as dependencies");e.vb.call(e.Vc,b,b.Qc||(b.Qc=++f))}},I:function(a,d,e){try{return b(),a.apply(d,e||[])}finally{c()}},Ma:function(){if(e)return e.u.Ma()},hb:function(){if(e)return e.hb}}}();a.b("computedContext",a.Ha);a.b("computedContext.getDependenciesCount",a.Ha.Ma);a.b("computedContext.isInitial",a.Ha.hb);a.b("ignoreDependencies",a.Dd=a.s.I);var F=a.a.hc("_latestValue");a.T=function(b){function c(){if(0<
arguments.length)return c.gb(c[F],arguments[0])&&(c.qa(),c[F]=arguments[0],c.pa()),this;a.s.Bc(c);return c[F]}c[F]=b;a.a.ua||a.a.extend(c,a.U.fn);a.U.fn.Fb(c);a.a.nb(c,E);a.options.deferUpdates&&a.Ka.deferred(c,!0);return c};var E={equalityComparer:J,B:function(){return this[F]},pa:function(){this.notifySubscribers(this[F],"spectate");this.notifySubscribers(this[F])},qa:function(){this.notifySubscribers(this[F],"beforeChange")}};a.a.ua&&a.a.setPrototypeOf(E,a.U.fn);var I=a.T.Aa="__ko_proto__";E[I]=
a.T;a.J=function(b){if((b="function"==typeof b&&b[I])&&b!==a.T&&b!==a.u)throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!b};a.Na=function(b){return"function"==typeof b&&(b[I]===a.T||b[I]===a.u&&b.qc)};a.b("observable",a.T);a.b("isObservable",a.J);a.b("isWriteableObservable",a.Na);a.b("isWritableObservable",a.Na);a.b("observable.fn",E);a.P(E,"peek",E.B);a.P(E,"valueHasMutated",E.pa);a.P(E,"valueWillMutate",E.qa);a.wa=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.T(b);a.a.nb(b,a.wa.fn);return b.extend({trackArrayChanges:!0})};a.wa.fn={remove:function(b){for(var c=this.B(),d=[],e="function"!=typeof b||a.J(b)?function(a){return a===b}:b,f=0;f<c.length;f++){var h=c[f];e(h)&&(0===d.length&&this.qa(),d.push(h),c.splice(f,1),f--)}d.length&&this.pa();return d},removeAll:function(b){if(b===n){var c=this.B(),d=c.slice(0);this.qa();
c.splice(0,c.length);this.pa();return d}return b?this.remove(function(c){return 0<=a.a.A(b,c)}):[]},destroy:function(b){var c=this.B(),d="function"!=typeof b||a.J(b)?function(a){return a===b}:b;this.qa();for(var e=c.length-1;0<=e;e--)d(c[e])&&(c[e]._destroy=!0);this.pa()},destroyAll:function(b){return b===n?this.destroy(function(){return!0}):b?this.destroy(function(c){return 0<=a.a.A(b,c)}):[]},indexOf:function(b){var c=this();return a.a.A(c,b)},replace:function(a,c){var d=this.indexOf(a);0<=d&&(this.qa(),
this.B()[d]=c,this.pa())}};a.a.ua&&a.a.setPrototypeOf(a.wa.fn,a.T.fn);a.a.D("pop push reverse shift sort splice unshift".split(" "),function(b){a.wa.fn[b]=function(){var a=this.B();this.qa();this.dc(a,b,arguments);var d=a[b].apply(a,arguments);this.pa();return d===a?this:d}});a.a.D(["slice"],function(b){a.wa.fn[b]=function(){var a=this();return a[b].apply(a,arguments)}});a.b("observableArray",a.wa);a.Ka.trackArrayChanges=function(b,c){function d(){if(!e){e=!0;k=b.notifySubscribers;b.notifySubscribers=
function(a,b){b&&"change"!==b||++g;return k.apply(this,arguments)};var c=[].concat(b.B()||[]);f=null;h=b.subscribe(function(d){d=[].concat(d||[]);if(b.cb("arrayChange")){var e;if(!f||1<g)f=a.a.xb(c,d,b.wb);e=f}c=d;f=null;g=0;e&&e.length&&b.notifySubscribers(e,"arrayChange")})}}b.wb={};c&&"object"==typeof c&&a.a.extend(b.wb,c);b.wb.sparse=!0;if(!b.dc){var e=!1,f=null,h,g=0,k,l=b.Ea,m=b.Va;b.Ea=function(a){l&&l.call(b,a);"arrayChange"===a&&d()};b.Va=function(a){m&&m.call(b,a);"arrayChange"!==a||b.cb("arrayChange")||
(k&&(b.notifySubscribers=k,k=n),h.o(),e=!1)};b.dc=function(b,c,d){function l(a,b,c){return m[m.length]={status:a,value:b,index:c}}if(e&&!g){var m=[],k=b.length,h=d.length,H=0;switch(c){case "push":H=k;case "unshift":for(c=0;c<h;c++)l("added",d[c],H+c);break;case "pop":H=k-1;case "shift":k&&l("deleted",b[H],H);break;case "splice":c=Math.min(Math.max(0,0>d[0]?k+d[0]:d[0]),k);for(var k=1===h?k:Math.min(c+(d[1]||0),k),h=c+h-2,H=Math.max(k,h),n=[],r=[],w=2;c<H;++c,++w)c<k&&r.push(l("deleted",b[c],c)),
c<h&&n.push(l("added",d[w],c));a.a.nc(r,n);break;default:return}f=m}}}};var r=a.a.hc("_state");a.u=a.N=function(b,c,d){function e(){if(0<arguments.length){if("function"===typeof f)f.apply(h.ab,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.s.Bc(e);(h.ka||h.G&&e.eb())&&e.ea();return h.R}"object"===typeof b?d=b:(d=d||{},b&&(d.read=b));if("function"!=typeof d.read)throw Error("Pass a function that returns the value of the ko.computed");
var f=d.write,h={R:n,la:!0,ka:!0,fb:!1,Ob:!1,da:!1,lb:!1,G:!1,Ac:d.read,ab:c||d.owner,l:d.disposeWhenNodeIsRemoved||d.l||null,va:d.disposeWhen||d.va,Bb:null,F:{},V:0,lc:null};e[r]=h;e.qc="function"===typeof f;a.a.ua||a.a.extend(e,a.U.fn);a.U.fn.Fb(e);a.a.nb(e,A);d.pure?(h.lb=!0,h.G=!0,a.a.extend(e,Y)):d.deferEvaluation&&a.a.extend(e,Z);a.options.deferUpdates&&a.Ka.deferred(e,!0);h.l&&(h.Ob=!0,h.l.nodeType||(h.l=null));h.G||d.deferEvaluation||e.ea();h.l&&e.ja()&&a.a.O.Ba(h.l,h.Bb=function(){e.o()});
return e};var A={equalityComparer:J,Ma:function(){return this[r].V},Yb:function(a,c,d){if(this[r].lb&&c===this)throw Error("A 'pure' computed must not be called recursively");this[r].F[a]=d;d.Ta=this[r].V++;d.za=c.bb()},eb:function(){var a,c,d=this[r].F;for(a in d)if(Object.prototype.hasOwnProperty.call(d,a)&&(c=d[a],c.sa.jd(c.za)))return!0},pd:function(){this.Sa&&!this[r].fb&&this.Sa(!1)},ja:function(){var a=this[r];return a.ka||0<a.V},xd:function(){this.tb?this[r].ka&&(this[r].la=!0):this.kc()},
Ic:function(a){if(a.sb&&!this[r].l){var c=a.subscribe(this.pd,this,"dirty"),d=a.subscribe(this.xd,this);return{sa:a,o:function(){c.o();d.o()}}}return a.subscribe(this.kc,this)},kc:function(){var b=this,c=b.throttleEvaluation;c&&0<=c?(clearTimeout(this[r].lc),this[r].lc=a.a.setTimeout(function(){b.ea(!0)},c)):b.Sa?b.Sa(!0):b.ea(!0)},ea:function(b){var c=this[r],d=c.va,e=!1;if(!c.fb&&!c.da){if(c.l&&!a.a.Cb(c.l)||d&&d()){if(!c.Ob){this.o();return}}else c.Ob=!1;c.fb=!0;try{e=this.ed(b)}finally{c.fb=!1}c.V||
this.o();return e}},ed:function(b){var c=this[r],d=!1,e=c.lb?n:!c.V,f={Wc:this,$a:c.F,Ab:c.V};a.s.cc({Vc:f,vb:W,u:this,hb:e});c.F={};c.V=0;f=this.dd(c,f);this.gb(c.R,f)&&(c.G?this.Rb():this.notifySubscribers(c.R,"beforeChange"),c.R=f,this.notifySubscribers(c.R,"spectate"),!c.G&&b&&this.notifySubscribers(c.R),d=!0);e&&this.notifySubscribers(c.R,"awake");return d},dd:function(b,c){try{var d=b.Ac;return b.ab?d.call(b.ab):d()}finally{a.s.end(),c.Ab&&!b.G&&a.a.L(c.$a,V),b.la=b.ka=!1}},B:function(a){var c=
this[r];(c.ka&&(a||!c.V)||c.G&&this.eb())&&this.ea();return c.R},jb:function(b){a.U.fn.jb.call(this,b);this.Sb=function(){this[r].la&&this.ea();return this[r].R};this.Sa=function(a){this.Ub(this[r].R);this[r].ka=!0;a&&(this[r].la=!0);this.Vb(this)}},o:function(){var b=this[r];!b.G&&b.F&&a.a.L(b.F,function(a,b){b.o&&b.o()});b.l&&b.Bb&&a.a.O.Cc(b.l,b.Bb);b.F=n;b.V=0;b.da=!0;b.la=!1;b.ka=!1;b.G=!1;b.l=n;b.va=n;b.Ac=n;this.qc||(b.ab=n)}},Y={Ea:function(b){var c=this,d=c[r];if(!d.da&&d.G&&"change"==b){d.G=
!1;if(d.la||c.eb())d.F=null,d.V=0,c.ea()&&c.Rb();else{var e=[];a.a.L(d.F,function(a,b){e[b.Ta]=a});a.a.D(e,function(a,b){var e=d.F[a],k=c.Ic(e.sa);k.Ta=b;k.za=e.za;d.F[a]=k})}d.da||c.notifySubscribers(d.R,"awake")}},Va:function(b){var c=this[r];c.da||"change"!=b||this.cb("change")||(a.a.L(c.F,function(a,b){b.o&&(c.F[a]={sa:b.sa,Ta:b.Ta,za:b.za},b.o())}),c.G=!0,this.notifySubscribers(n,"asleep"))},bb:function(){var b=this[r];b.G&&(b.la||this.eb())&&this.ea();return a.U.fn.bb.call(this)}},Z={Ea:function(a){"change"!=
a&&"beforeChange"!=a||this.B()}};a.a.ua&&a.a.setPrototypeOf(A,a.U.fn);var P=a.T.Aa;A[P]=a.u;a.sc=function(b){return"function"==typeof b&&b[P]===a.u};a.ld=function(b){return a.sc(b)&&b[r]&&b[r].lb};a.b("computed",a.u);a.b("dependentObservable",a.u);a.b("isComputed",a.sc);a.b("isPureComputed",a.ld);a.b("computed.fn",A);a.P(A,"peek",A.B);a.P(A,"dispose",A.o);a.P(A,"isActive",A.ja);a.P(A,"getDependenciesCount",A.Ma);a.zc=function(b,c){if("function"===typeof b)return a.u(b,c,{pure:!0});b=a.a.extend({},
b);b.pure=!0;return a.u(b,c)};a.b("pureComputed",a.zc);(function(){function b(a,f,h){h=h||new d;a=f(a);if("object"!=typeof a||null===a||a===n||a instanceof RegExp||a instanceof Date||a instanceof String||a instanceof Number||a instanceof Boolean)return a;var g=a instanceof Array?[]:{};h.save(a,g);c(a,function(c){var d=f(a[c]);switch(typeof d){case "boolean":case "number":case "string":case "function":g[c]=d;break;case "object":case "undefined":var m=h.get(d);g[c]=m!==n?m:b(d,f,h)}});return g}function c(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 d(){this.keys=[];this.values=[]}a.Kc=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.J(b)&&10>c;c++)b=b();return b})};a.toJSON=function(b,c,d){b=a.Kc(b);return a.a.Nb(b,c,d)};d.prototype={constructor:d,save:function(b,c){var d=a.a.A(this.keys,b);0<=d?this.values[d]=c:(this.keys.push(b),
this.values.push(c))},get:function(b){b=a.a.A(this.keys,b);return 0<=b?this.values[b]:n}}})();a.b("toJS",a.Kc);a.b("toJSON",a.toJSON);(function(){a.m={H:function(b){switch(a.a.K(b)){case "option":return!0===b.__ko__hasDomDataOptionValue__?a.a.h.get(b,a.f.options.Hb):7>=a.a.ca?b.getAttributeNode("value")&&b.getAttributeNode("value").specified?b.value:b.text:b.value;case "select":return 0<=b.selectedIndex?a.m.H(b.options[b.selectedIndex]):n;default:return b.value}},ra:function(b,c,d){switch(a.a.K(b)){case "option":switch(typeof c){case "string":a.a.h.set(b,
a.f.options.Hb,n);"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__;b.value=c;break;default:a.a.h.set(b,a.f.options.Hb,c),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===typeof c?c:""}break;case "select":if(""===c||null===c)c=n;for(var e=-1,f=0,h=b.options.length,g;f<h;++f)if(g=a.m.H(b.options[f]),g==c||""===g&&c===n){e=f;break}if(d||0<=e||c===n&&1<b.size)b.selectedIndex=e;break;default:if(null===c||c===n)c="";b.value=c}}}})();a.b("selectExtensions",a.m);a.b("selectExtensions.readValue",
a.m.H);a.b("selectExtensions.writeValue",a.m.ra);a.j=function(){function b(b){b=a.a.pb(b);123===b.charCodeAt(0)&&(b=b.slice(1,-1));b+="\n,";var c=[],d=b.match(e),p,g=[],q=0;if(1<d.length)for(var z=0,B;B=d[z];++z){var x=B.charCodeAt(0);if(44===x){if(0>=q){c.push(p&&g.length?{key:p,value:g.join("")}:{unknown:p||g.join("")});p=q=0;g=[];continue}}else if(58===x){if(!q&&!p&&1===g.length){p=g.pop();continue}}else if(47===x&&1<B.length&&(47===B.charCodeAt(1)||42===B.charCodeAt(1)))continue;else 47===x&&
z&&1<B.length?(x=d[z-1].match(f))&&!h[x[0]]&&(b=b.substr(b.indexOf(B)+1),d=b.match(e),z=-1,B="/"):40===x||123===x||91===x?++q:41===x||125===x||93===x?--q:p||g.length||34!==x&&39!==x||(B=B.slice(1,-1));g.push(B)}return c}var c=["true","false","null","undefined"],d=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,e=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),
f=/[\])"'A-Za-z0-9_$]+$/,h={"in":1,"return":1,"typeof":1},g={};return{Fa:[],oa:g,Ib:b,kb:function(e,l){function f(b,e){var l;if(!z){var k=a.getBindingHandler(b);if(k&&k.preprocess&&!(e=k.preprocess(e,b,f)))return;if(k=g[b])l=e,0<=a.a.A(c,l)?l=!1:(k=l.match(d),l=null===k?!1:k[1]?"Object("+k[1]+")"+k[2]:l),k=l;k&&h.push("'"+b+"':function(_z){"+l+"=_z}")}q&&(e="function(){return "+e+" }");p.push("'"+b+"':"+e)}l=l||{};var p=[],h=[],q=l.valueAccessors,z=l.bindingParams,B="string"===typeof e?b(e):e;a.a.D(B,
function(a){f(a.key||a.unknown,a.value)});h.length&&f("_ko_property_writers","{"+h.join(",")+" }");return p.join(",")},od:function(a,b){for(var c=0;c<a.length;c++)if(a[c].key==b)return!0;return!1},ya:function(b,c,d,e,f){if(b&&a.J(b))!a.Na(b)||f&&b.B()===e||b(e);else if((b=c.get("_ko_property_writers"))&&b[d])b[d](e)}}}();a.b("expressionRewriting",a.j);a.b("expressionRewriting.bindingRewriteValidators",a.j.Fa);a.b("expressionRewriting.parseObjectLiteral",a.j.Ib);a.b("expressionRewriting.preProcessBindings",
a.j.kb);a.b("expressionRewriting._twoWayBindings",a.j.oa);a.b("jsonExpressionRewriting",a.j);a.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",a.j.kb);(function(){function b(a){return 8==a.nodeType&&h.test(f?a.text:a.nodeValue)}function c(a){return 8==a.nodeType&&g.test(f?a.text:a.nodeValue)}function d(a,d){for(var e=a,f=1,k=[];e=e.nextSibling;){if(c(e)&&(f--,0===f))return k;k.push(e);b(e)&&f++}if(!d)throw Error("Cannot find closing comment tag to match: "+a.nodeValue);return null}function e(a,
b){var c=d(a,b);return c?0<c.length?c[c.length-1].nextSibling:a.nextSibling:null}var f=t&&"\x3c!--test--\x3e"===t.createComment("test").text,h=f?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,g=f?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,k={ul:!0,ol:!0};a.g={$:{},childNodes:function(a){return b(a)?d(a):a.childNodes},Ja:function(c){if(b(c)){c=a.g.childNodes(c);for(var d=0,e=c.length;d<e;d++)a.removeNode(c[d])}else a.a.Db(c)},na:function(c,d){if(b(c)){a.g.Ja(c);for(var e=
c.nextSibling,f=0,k=d.length;f<k;f++)e.parentNode.insertBefore(d[f],e)}else a.a.na(c,d)},yc:function(a,c){b(a)?a.parentNode.insertBefore(c,a.nextSibling):a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)},rc:function(c,d,e){e?b(c)?c.parentNode.insertBefore(d,e.nextSibling):e.nextSibling?c.insertBefore(d,e.nextSibling):c.appendChild(d):a.g.yc(c,d)},firstChild:function(a){return b(a)?!a.nextSibling||c(a.nextSibling)?null:a.nextSibling:a.firstChild},nextSibling:function(a){b(a)&&(a=e(a));
return a.nextSibling&&c(a.nextSibling)?null:a.nextSibling},hd:b,Bd:function(a){return(a=(f?a.text:a.nodeValue).match(h))?a[1]:null},wc:function(d){if(k[a.a.K(d)]){var f=d.firstChild;if(f){do if(1===f.nodeType){var g;g=f.firstChild;var h=null;if(g){do if(h)h.push(g);else if(b(g)){var q=e(g,!0);q?g=q:h=[g]}else c(g)&&(h=[g]);while(g=g.nextSibling)}if(g=h)for(h=f.nextSibling,q=0;q<g.length;q++)h?d.insertBefore(g[q],h):d.appendChild(g[q])}while(f=f.nextSibling)}}}}})();a.b("virtualElements",a.g);a.b("virtualElements.allowedBindings",
a.g.$);a.b("virtualElements.emptyNode",a.g.Ja);a.b("virtualElements.insertAfter",a.g.rc);a.b("virtualElements.prepend",a.g.yc);a.b("virtualElements.setDomNodeChildren",a.g.na);(function(){a.ba=function(){this.Uc={}};a.a.extend(a.ba.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case 1:return null!=b.getAttribute("data-bind")||a.i.getComponentNameForNode(b);case 8:return a.g.hd(b);default:return!1}},getBindings:function(b,c){var d=this.getBindingsString(b,c),d=d?this.parseBindingsString(d,
c,b):null;return a.i.Xb(d,b,c,!1)},getBindingAccessors:function(b,c){var d=this.getBindingsString(b,c),d=d?this.parseBindingsString(d,c,b,{valueAccessors:!0}):null;return a.i.Xb(d,b,c,!0)},getBindingsString:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind");case 8:return a.g.Bd(b);default:return null}},parseBindingsString:function(b,c,d,e){try{var f=this.Uc,h=b+(e&&e.valueAccessors||""),g;if(!(g=f[h])){var k,l="with($context){with($data||{}){return{"+a.j.kb(b,e)+"}}}";k=new Function("$context",
"$element",l);g=f[h]=k}return g(c,d)}catch(m){throw m.message="Unable to parse bindings.\nBindings value: "+b+"\nMessage: "+m.message,m;}}});a.ba.instance=new a.ba})();a.b("bindingProvider",a.ba);(function(){function b(a){return function(){return a}}function c(a){return a()}function d(b){return a.a.Pa(a.s.I(b),function(a,c){return function(){return b()[c]}})}function e(c,e,f){return"function"===typeof c?d(c.bind(null,e,f)):a.a.Pa(c,b)}function f(a,b){return d(this.getBindings.bind(this,a,b))}function h(b,
c,d){var e,f=a.g.firstChild(c),l=a.ba.instance,m=l.preprocessNode;if(m){for(;e=f;)f=a.g.nextSibling(e),m.call(l,e);f=a.g.firstChild(c)}for(;e=f;)f=a.g.nextSibling(e),g(b,e,d)}function g(b,c,d){var e=!0,f=1===c.nodeType;f&&a.g.wc(c);if(f&&d||a.ba.instance.nodeHasBindings(c))e=l(c,null,b,d).shouldBindDescendants;e&&!p[a.a.K(c)]&&h(b,c,!f)}function k(b){var c=[],d={},e=[];a.a.L(b,function X(f){if(!d[f]){var l=a.getBindingHandler(f);l&&(l.after&&(e.push(f),a.a.D(l.after,function(c){if(b[c]){if(-1!==a.a.A(e,
c))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+e.join(", "));X(c)}}),e.length--),c.push({key:f,pc:l}));d[f]=!0}});return c}function l(b,d,e,l){var m=a.a.h.get(b,u);if(!d){if(m)throw Error("You cannot apply bindings multiple times to the same element.");a.a.h.set(b,u,!0)}!m&&l&&a.Hc(b,e);var g;if(d&&"function"!==typeof d)g=d;else{var h=a.ba.instance,p=h.getBindingAccessors||f,q=a.N(function(){(g=d?d(e,b):p.call(h,b,e))&&e.Z&&e.Z();return g},null,{l:b});
g&&q.ja()||(q=null)}var r;if(g){var t=function(){return a.a.Pa(q?q():g,c)},v=q?function(a){return function(){return c(q()[a])}}:function(a){return g[a]};t.get=function(a){return g[a]&&c(v(a))};t.has=function(a){return a in g};l=k(g);a.a.D(l,function(c){var d=c.pc.init,f=c.pc.update,l=c.key;if(8===b.nodeType&&!a.g.$[l])throw Error("The binding '"+l+"' cannot be used with virtual elements");try{"function"==typeof d&&a.s.I(function(){var a=d(b,v(l),t,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 f&&a.N(function(){f(b,v(l),t,e.$data,e)},null,{l:b})}catch(m){throw m.message='Unable to process binding "'+l+": "+g[l]+'"\nMessage: '+m.message,m;}})}return{shouldBindDescendants:r===n}}function m(b){return b&&b instanceof a.aa?b:new a.aa(b)}a.f={};var p={script:!0,textarea:!0,template:!0};a.getBindingHandler=
function(b){return a.f[b]};a.aa=function(b,c,d,e,f){function l(){var f=k?b():b,m=a.a.c(f);c?(c.Z&&c.Z(),a.a.extend(g,c),g.Z=p):(g.$parents=[],g.$root=m,g.ko=a);g.$rawData=f;g.$data=m;d&&(g[d]=m);e&&e(g,c,m);return g.$data}function m(){return h&&!a.a.Zb(h)}var g=this,k="function"==typeof b&&!a.J(b),h,p;f&&f.exportDependencies?l():(p=a.N(l,null,{va:m,l:!0}),p.ja()&&(g.Z=p,p.equalityComparer=null,h=[],p.Nc=function(b){h.push(b);a.a.O.Ba(b,function(b){a.a.Za(h,b);h.length||(p.o(),g.Z=p=n)})}))};a.aa.prototype.createChildContext=
function(b,c,d,e){return new a.aa(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)},e)};a.aa.prototype.extend=function(b){return new a.aa(this.Z||this.$data,this,null,function(c,d){c.$rawData=d.$rawData;a.a.extend(c,"function"==typeof b?b():b)})};a.aa.prototype.gc=function(a,b){return this.createChildContext(a,b,null,{exportDependencies:!0})};var u=a.a.h.S(),q=a.a.h.S();a.Hc=function(b,c){if(2==arguments.length)a.a.h.set(b,
q,c),c.Z&&c.Z.Nc(b);else return a.a.h.get(b,q)};a.Wa=function(b,c,d){1===b.nodeType&&a.g.wc(b);return l(b,c,m(d),!0)};a.Sc=function(b,c,d){d=m(d);return a.Wa(b,e(c,d,b),d)};a.Da=function(a,b){1!==b.nodeType&&8!==b.nodeType||h(m(a),b,!0)};a.$b=function(a,b){!v&&y.jQuery&&(v=y.jQuery);if(!b){if(b=y.document.body,!b)throw Error("ko.applyBindings: could not find window.document.body; has the document been loaded?");}else if(1!==b.nodeType&&8!==b.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");
g(m(a),b,!0)};a.zb=function(b){switch(b.nodeType){case 1:case 8:var c=a.Hc(b);if(c)return c;if(b.parentNode)return a.zb(b.parentNode)}return n};a.Yc=function(b){return(b=a.zb(b))?b.$data:n};a.b("bindingHandlers",a.f);a.b("applyBindings",a.$b);a.b("applyBindingsToDescendants",a.Da);a.b("applyBindingAccessorsToNode",a.Wa);a.b("applyBindingsToNode",a.Sc);a.b("contextFor",a.zb);a.b("dataFor",a.Yc)})();(function(b){function c(c,e){var l=Object.prototype.hasOwnProperty.call(f,c)?f[c]:b,m;l?l.subscribe(e):
(l=f[c]=new a.U,l.subscribe(e),d(c,function(b,d){var e=!(!d||!d.synchronous);h[c]={definition:b,md:e};delete f[c];m||e?l.notifySubscribers(b):a.ga.mb(function(){l.notifySubscribers(b)})}),m=!0)}function d(a,b){e("getConfig",[a],function(c){c?e("loadComponent",[a,c],function(a){b(a,c)}):b(null,null)})}function e(c,d,f,m){m||(m=a.i.loaders.slice(0));var h=m.shift();if(h){var u=h[c];if(u){var q=!1;if(u.apply(h,d.concat(function(a){q?f(null):null!==a?f(a):e(c,d,f,m)}))!==b&&(q=!0,!h.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");
}else e(c,d,f,m)}else f(null)}var f={},h={};a.i={get:function(d,e){var f=Object.prototype.hasOwnProperty.call(h,d)?h[d]:b;f?f.md?a.s.I(function(){e(f.definition)}):a.ga.mb(function(){e(f.definition)}):c(d,e)},fc:function(a){delete h[a]},Tb:e};a.i.loaders=[];a.b("components",a.i);a.b("components.get",a.i.get);a.b("components.clearCachedDefinition",a.i.fc)})();(function(){function b(b,c,d,e){function g(){0===--B&&e(h)}var h={},B=2,x=d.template;d=d.viewModel;x?f(c,x,function(c){a.i.Tb("loadTemplate",
[b,c],function(a){h.template=a;g()})}):g();d?f(c,d,function(c){a.i.Tb("loadViewModel",[b,c],function(a){h[k]=a;g()})}):g()}function c(a,b,d){if("function"===typeof b)d(function(a){return new b(a)});else if("function"===typeof b[k])d(b[k]);else if("instance"in b){var e=b.instance;d(function(){return e})}else"viewModel"in b?c(a,b.viewModel,d):a("Unknown viewModel value: "+b)}function d(b){switch(a.a.K(b)){case "script":return a.a.xa(b.text);case "textarea":return a.a.xa(b.value);case "template":if(e(b.content))return a.a.Ga(b.content.childNodes)}return a.a.Ga(b.childNodes)}
function e(a){return y.DocumentFragment?a instanceof DocumentFragment:a&&11===a.nodeType}function f(a,b,c){"string"===typeof b.require?O||y.require?(O||y.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 g={};a.i.register=function(b,c){if(!c)throw Error("Invalid configuration for "+b);if(a.i.ib(b))throw Error("Component "+b+" is already registered");g[b]=c};a.i.ib=function(a){return Object.prototype.hasOwnProperty.call(g,
a)};a.i.unregister=function(b){delete g[b];a.i.fc(b)};a.i.ic={getConfig:function(b,c){c(a.i.ib(b)?g[b]:null)},loadComponent:function(a,c,d){var e=h(a);f(e,c,function(c){b(a,e,c,d)})},loadTemplate:function(b,c,f){b=h(b);if("string"===typeof c)f(a.a.xa(c));else if(c instanceof Array)f(c);else if(e(c))f(a.a.fa(c.childNodes));else if(c.element)if(c=c.element,y.HTMLElement?c instanceof HTMLElement:c&&c.tagName&&1===c.nodeType)f(d(c));else if("string"===typeof c){var g=t.getElementById(c);g?f(d(g)):b("Cannot find element with ID "+
c)}else b("Unknown element type: "+c);else b("Unknown template value: "+c)},loadViewModel:function(a,b,d){c(h(a),b,d)}};var k="createViewModel";a.b("components.register",a.i.register);a.b("components.isRegistered",a.i.ib);a.b("components.unregister",a.i.unregister);a.b("components.defaultLoader",a.i.ic);a.i.loaders.push(a.i.ic);a.i.Oc=g})();(function(){function b(b,e){var f=b.getAttribute("params");if(f){var f=c.parseBindingsString(f,e,b,{valueAccessors:!0,bindingParams:!0}),f=a.a.Pa(f,function(c){return a.u(c,
null,{l:b})}),h=a.a.Pa(f,function(c){var e=c.B();return c.ja()?a.u({read:function(){return a.a.c(c())},write:a.Na(e)&&function(a){c()(a)},l:b}):e});Object.prototype.hasOwnProperty.call(h,"$raw")||(h.$raw=f);return h}return{$raw:{}}}a.i.getComponentNameForNode=function(b){var c=a.a.K(b);if(a.i.ib(c)&&(-1!=c.indexOf("-")||"[object HTMLUnknownElement]"==""+b||8>=a.a.ca&&b.tagName===c))return c};a.i.Xb=function(c,e,f,h){if(1===e.nodeType){var g=a.i.getComponentNameForNode(e);if(g){c=c||{};if(c.component)throw Error('Cannot use the "component" binding on a custom element matching a component');
var k={name:g,params:b(e,f)};c.component=h?function(){return k}:k}}return c};var c=new a.ba;9>a.a.ca&&(a.i.register=function(a){return function(b){return a.apply(this,arguments)}}(a.i.register),t.createDocumentFragment=function(b){return function(){var c=b(),f=a.i.Oc,h;for(h in f);return c}}(t.createDocumentFragment))})();(function(b){function c(b,c,d){c=c.template;if(!c)throw Error("Component '"+b+"' has no template");b=a.a.Ga(c);a.g.na(d,b)}function d(a,b,c,d){var e=a.createViewModel;return e?e.call(a,
d,{element:b,templateNodes:c}):d}var e=0;a.f.component={init:function(f,h,g,k,l){function m(){var a=p&&p.dispose;"function"===typeof a&&a.call(p);u=p=null}var p,u,q=a.a.fa(a.g.childNodes(f));a.a.O.Ba(f,m);a.u(function(){var g=a.a.c(h()),k,x;"string"===typeof g?k=g:(k=a.a.c(g.name),x=a.a.c(g.params));if(!k)throw Error("No component name specified");var n=u=++e;a.i.get(k,function(e){if(u===n){m();if(!e)throw Error("Unknown component '"+k+"'");c(k,e,f);var g=d(e,f,q,x);e=l.createChildContext(g,b,function(a){a.$component=
g;a.$componentTemplateNodes=q});p=g;a.Da(e,f)}})},null,{l:f});return{controlsDescendantBindings:!0}}};a.g.$.component=!0})();var Q={"class":"className","for":"htmlFor"};a.f.attr={update:function(b,c){var d=a.a.c(c())||{};a.a.L(d,function(c,d){d=a.a.c(d);var h=!1===d||null===d||d===n;h&&b.removeAttribute(c);8>=a.a.ca&&c in Q?(c=Q[c],h?b.removeAttribute(c):b[c]=d):h||b.setAttribute(c,d.toString());"name"===c&&a.a.Fc(b,h?"":d.toString())})}};(function(){a.f.checked={after:["value","attr"],init:function(b,
c,d){function e(){var e=b.checked,f=z?h():e;if(!a.Ha.hb()&&(!l||e)){var k=a.s.I(c);if(p){var m=u?k.B():k;q!==f?(e&&(a.a.Ca(m,f,!0,g),a.a.Ca(m,q,!1,g)),q=f):a.a.Ca(m,f,e,g);u&&a.Na(k)&&k(m)}else a.j.ya(k,d,"checked",f,!0)}}function f(){var d=a.a.c(c());p?b.checked=0<=a.a.A(d,h(),g):k?b.checked=d:b.checked=h()===d}var h=a.zc(function(){return d.has("checkedValue")?a.a.c(d.get("checkedValue")):d.has("value")?a.a.c(d.get("value")):b.value}),g=d.has("checkedArrayContainsObservables")&&d.get("checkedArrayContainsObservables"),
k="checkbox"==b.type,l="radio"==b.type;if(k||l){var m=c(),p=k&&a.a.c(m)instanceof Array,u=!(p&&m.push&&m.splice),q=p?h():n,z=l||p;l&&!b.name&&a.f.uniqueName.init(b,function(){return!0});a.u(e,null,{l:b});a.a.C(b,"click",e);a.u(f,null,{l:b});m=n}}};a.j.oa.checked=!0;a.f.checkedValue={update:function(b,c){b.value=a.a.c(c())}}})();a.f["class"]={update:function(b,c){var d=a.a.pb(a.a.c(c()));a.a.rb(b,b.__ko__cssValue,!1);b.__ko__cssValue=d;a.a.rb(b,d,!0)}};a.f.css={update:function(b,c){var d=a.a.c(c());
null!==d&&"object"==typeof d?a.a.L(d,function(c,d){d=a.a.c(d);a.a.rb(b,c,d)}):a.f["class"].update(b,c)}};a.f.enable={update:function(b,c){var d=a.a.c(c());d&&b.disabled?b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!0)}};a.f.disable={update:function(b,c){a.f.enable.update(b,function(){return!a.a.c(c())})}};a.f.event={init:function(b,c,d,e,f){var h=c()||{};a.a.L(h,function(g){"string"==typeof g&&a.a.C(b,g,function(b){var h,m=c()[g];if(m){try{var p=a.a.fa(arguments);e=f.$data;p.unshift(e);
h=m.apply(e,p)}finally{!0!==h&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}!1===d.get(g+"Bubble")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};a.f.foreach={uc:function(b){return function(){var c=b(),d=a.a.Qa(c);if(!d||"number"==typeof d.length)return{foreach:c,templateEngine:a.X.Aa};a.a.c(c);return{foreach:d.data,as:d.as,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd,beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,
templateEngine:a.X.Aa}}},init:function(b,c){return a.f.template.init(b,a.f.foreach.uc(c))},update:function(b,c,d,e,f){return a.f.template.update(b,a.f.foreach.uc(c),d,e,f)}};a.j.Fa.foreach=!1;a.g.$.foreach=!0;a.f.hasfocus={init:function(b,c,d){function e(e){b.__ko_hasfocusUpdating=!0;var f=b.ownerDocument;if("activeElement"in f){var h;try{h=f.activeElement}catch(m){h=f.body}e=h===b}f=c();a.j.ya(f,d,"hasfocus",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var f=e.bind(null,!0),h=e.bind(null,
!1);a.a.C(b,"focus",f);a.a.C(b,"focusin",f);a.a.C(b,"blur",h);a.a.C(b,"focusout",h)},update:function(b,c){var d=!!a.a.c(c());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===d||(d?b.focus():b.blur(),!d&&b.__ko_hasfocusLastValue&&b.ownerDocument.body.focus(),a.s.I(a.a.Ra,null,[b,d?"focusin":"focusout"]))}};a.j.oa.hasfocus=!0;a.f.hasFocus=a.f.hasfocus;a.j.oa.hasFocus=!0;a.f.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.Lb(b,c())}};K("if");K("ifnot",!1,!0);
K("with",!0,!1,function(a,c){return a.gc(c)});a.f.let={init:function(b,c,d,e,f){c=f.extend(c);a.Da(c,b);return{controlsDescendantBindings:!0}}};a.g.$.let=!0;var L={};a.f.options={init:function(b){if("select"!==a.a.K(b))throw Error("options binding applies only to SELECT elements");for(;0<b.length;)b.remove(0);return{controlsDescendantBindings:!0}},update:function(b,c,d){function e(){return a.a.Xa(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,e){if(z&&m)a.m.ra(b,a.a.c(d.get("value")),!0);else if(q.length){var f=0<=a.a.A(q,a.m.H(e[0]),!0);a.a.Gc(e[0],f);z&&!f&&a.s.I(a.a.Ra,null,[b,"change"])}}var g=b.multiple,k=0!=b.length&&g?b.scrollTop:null,l=a.a.c(c()),m=d.get("valueAllowUnset")&&d.has("value"),p=d.get("optionsIncludeDestroyed");c={};var u,q=[];m||(g?q=a.a.ub(e(),a.m.H):0<=b.selectedIndex&&q.push(a.m.H(b.options[b.selectedIndex])));l&&("undefined"==typeof l.length&&(l=[l]),u=a.a.Xa(l,function(b){return p||b===n||
null===b||!a.a.c(b._destroy)}),d.has("optionsCaption")&&(l=a.a.c(d.get("optionsCaption")),null!==l&&l!==n&&u.unshift(L)));var z=!1;c.beforeRemove=function(a){b.removeChild(a)};l=h;d.has("optionsAfterRender")&&"function"==typeof d.get("optionsAfterRender")&&(l=function(b,c){h(0,c);a.s.I(d.get("optionsAfterRender"),null,[c[0],b!==L?b:n])});a.a.Kb(b,u,function(c,e,g){g.length&&(q=!m&&g[0].selected?[a.m.H(g[0])]:[],z=!0);e=b.ownerDocument.createElement("option");c===L?(a.a.ob(e,d.get("optionsCaption")),
a.m.ra(e,n)):(g=f(c,d.get("optionsValue"),c),a.m.ra(e,a.a.c(g)),c=f(c,d.get("optionsText"),g),a.a.ob(e,c));return[e]},c,l);a.s.I(function(){if(m)a.m.ra(b,a.a.c(d.get("value")),!0);else{var c;g?c=q.length&&e().length<q.length:c=q.length&&0<=b.selectedIndex?a.m.H(b.options[b.selectedIndex])!==q[0]:q.length||0<=b.selectedIndex;c&&a.a.Ra(b,"change")}});a.a.bd(b);k&&20<Math.abs(k-b.scrollTop)&&(b.scrollTop=k)}};a.f.options.Hb=a.a.h.S();a.f.selectedOptions={after:["options","foreach"],init:function(b,c,
d){a.a.C(b,"change",function(){var e=c(),f=[];a.a.D(b.getElementsByTagName("option"),function(b){b.selected&&f.push(a.a.Cd(a.m.H(b)))});a.j.ya(e,d,"selectedOptions",f)})},update:function(b,c){if("select"!=a.a.K(b))throw Error("values binding applies only to SELECT elements");var d=a.a.c(c()),e=b.scrollTop;d&&"number"==typeof d.length&&a.a.D(b.getElementsByTagName("option"),function(b){var c=0<=a.a.A(d,a.m.H(b),!0);b.selected!=c&&a.a.Gc(b,c)});b.scrollTop=e}};a.j.oa.selectedOptions=!0;a.f.style={update:function(b,
c){var d=a.a.c(c()||{});a.a.L(d,function(c,d){d=a.a.c(d);if(null===d||d===n||!1===d)d="";b.style[c]=d})}};a.f.submit={init:function(b,c,d,e,f){if("function"!=typeof c())throw Error("The value for a submit binding must be a function");a.a.C(b,"submit",function(a){var d,e=c();try{d=e.call(f.$data,b)}finally{!0!==d&&(a.preventDefault?a.preventDefault():a.returnValue=!1)}})}};a.f.text={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.ob(b,c())}};a.g.$.text=!0;(function(){if(y&&
y.navigator){var b=function(a){if(a)return parseFloat(a[1])},c=y.navigator.userAgent,d,e,f,h;(d=y.opera&&y.opera.version&&parseInt(y.opera.version()))||b(c.match(/Chrome\/([^ ]+)/))||(e=b(c.match(/Version\/([^ ]+) Safari/)))||(f=b(c.match(/Firefox\/([^ ]+)/)))||(h=a.a.ca||b(c.match(/MSIE ([^ ]+)/)))||(h=b(c.match(/rv:([^ )]+)/)))}if(8<=h&&10>h)var g=a.a.h.S(),k=a.a.h.S(),l=function(b){var c=this.activeElement;(c=c&&a.a.h.get(c,k))&&c(b)},m=function(b,c){var d=b.ownerDocument;a.a.h.get(d,g)||(a.a.h.set(d,
g,!0),a.a.C(d,"selectionchange",l));a.a.h.set(b,k,c)};a.f.textInput={init:function(b,c,g){function k(c,d){a.a.C(b,c,d)}function l(){var d=a.a.c(c());if(null===d||d===n)d="";y!==n&&d===y?a.a.setTimeout(l,4):b.value!==d&&(t=d,b.value=d)}function x(){v||(y=b.value,v=a.a.setTimeout(r,4))}function r(){clearTimeout(v);y=v=n;var d=b.value;t!==d&&(t=d,a.j.ya(c(),g,"textInput",d))}var t=b.value,v,y,w=9==a.a.ca?x:r;h&&k("keypress",r);11>h&&k("propertychange",function(a){"value"===a.propertyName&&w(a)});8==
h&&(k("keyup",r),k("keydown",r));m&&(m(b,w),k("dragend",x));(!h||9<=h)&&k("input",w);5>e&&"textarea"===a.a.K(b)?(k("keydown",x),k("paste",x),k("cut",x)):11>d?k("keydown",x):4>f&&(k("DOMAutoComplete",r),k("dragdrop",r),k("drop",r));k("change",r);k("blur",r);a.u(l,null,{l:b})}};a.j.oa.textInput=!0;a.f.textinput={preprocess:function(a,b,c){c("textInput",a)}}})();a.f.uniqueName={init:function(b,c){if(c()){var d="ko_unique_"+ ++a.f.uniqueName.Xc;a.a.Fc(b,d)}}};a.f.uniqueName.Xc=0;a.f.using={init:function(b,
c,d,e,f){c=f.createChildContext(c);a.Da(c,b);return{controlsDescendantBindings:!0}}};a.g.$.using=!0;a.f.value={after:["options","foreach"],init:function(b,c,d){var e=a.a.K(b),f="input"==e;if(!f||"checkbox"!=b.type&&"radio"!=b.type){var h=["change"],g=d.get("valueUpdate"),k=!1,l=null;g&&("string"==typeof g&&(g=[g]),a.a.Ya(h,g),h=a.a.bc(h));var m=function(){l=null;k=!1;var e=c(),f=a.m.H(b);a.j.ya(e,d,"value",f)};!a.a.ca||!f||"text"!=b.type||"off"==b.autocomplete||b.form&&"off"==b.form.autocomplete||
-1!=a.a.A(h,"propertychange")||(a.a.C(b,"propertychange",function(){k=!0}),a.a.C(b,"focus",function(){k=!1}),a.a.C(b,"blur",function(){k&&m()}));a.a.D(h,function(c){var d=m;a.a.Ad(c,"after")&&(d=function(){l=a.m.H(b);a.a.setTimeout(m,0)},c=c.substring(5));a.a.C(b,c,d)});var p;p=f&&"file"==b.type?function(){var d=a.a.c(c());null===d||d===n||""===d?b.value="":m()}:function(){var f=a.a.c(c()),g=a.m.H(b);if(null!==l&&f===l)a.a.setTimeout(p,0);else if(f!==g)if("select"===e){var k=d.get("valueAllowUnset"),
h=function(){a.m.ra(b,f,k);a.j.ya(c(),d,"value",f)};a.Ia.Ec(function(){h();k||f===a.m.H(b)?a.a.setTimeout(h,0):a.s.I(a.a.Ra,null,[b,"change"])})}else a.m.ra(b,f)};a.u(p,null,{l:b})}else a.Wa(b,{checkedValue:c})},update:function(){}};a.j.oa.value=!0;a.f.visible={update:function(b,c){var d=a.a.c(c()),e="none"!=b.style.display;d&&!e?b.style.display="":!d&&e&&(b.style.display="none")}};(function(b){a.f[b]={init:function(c,d,e,f,h){return a.f.event.init.call(this,c,function(){var a={};a[b]=d();return a},
e,f,h)}}})("click");a.Y=function(){};a.Y.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");};a.Y.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock");};a.Y.prototype.makeTemplateSource=function(b,c){if("string"==typeof b){c=c||t;var d=c.getElementById(b);if(!d)throw Error("Cannot find template with ID "+b);return new a.w.v(d)}if(1==b.nodeType||8==b.nodeType)return new a.w.ha(b);throw Error("Unknown template type: "+
b);};a.Y.prototype.renderTemplate=function(a,c,d,e){a=this.makeTemplateSource(a,e);return this.renderTemplateSource(a,c,d,e)};a.Y.prototype.isTemplateRewritten=function(a,c){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(a,c).data("isRewritten")};a.Y.prototype.rewriteTemplate=function(a,c,d){a=this.makeTemplateSource(a,d);c=c(a.text());a.text(c);a.data("isRewritten",!0)};a.b("templateEngine",a.Y);a.Pb=function(){function b(b,c,d,g){b=a.j.Ib(b);for(var k=a.j.Fa,l=0;l<b.length;l++){var m=
b[l].key;if(Object.prototype.hasOwnProperty.call(k,m)){var p=k[m];if("function"===typeof p){if(m=p(b[l].value))throw Error(m);}else if(!p)throw Error("This template engine does not support the '"+m+"' binding within its templates");}}d="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+a.j.kb(b,{valueAccessors:!0})+" } })()},'"+d.toLowerCase()+"')";return g.createJavaScriptEvaluatorBlock(d)+c}var c=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,
d=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{cd:function(b,c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.Pb.rd(b,c)},d)},rd:function(a,f){return a.replace(c,function(a,c,d,e,m){return b(m,c,d,f)}).replace(d,function(a,c){return b(c,"\x3c!-- ko --\x3e","#comment",f)})},Tc:function(b,c){return a.W.Gb(function(d,g){var k=d.nextSibling;k&&k.nodeName.toLowerCase()===c&&a.Wa(k,b,g)})}}}();a.b("__tr_ambtns",a.Pb.Tc);(function(){a.w={};a.w.v=function(b){if(this.v=b){var c=
a.a.K(b);this.qb="script"===c?1:"textarea"===c?2:"template"==c&&b.content&&11===b.content.nodeType?3:4}};a.w.v.prototype.text=function(){var b=1===this.qb?"text":2===this.qb?"value":"innerHTML";if(0==arguments.length)return this.v[b];var c=arguments[0];"innerHTML"===b?a.a.Lb(this.v,c):this.v[b]=c};var b=a.a.h.S()+"_";a.w.v.prototype.data=function(c){if(1===arguments.length)return a.a.h.get(this.v,b+c);a.a.h.set(this.v,b+c,arguments[1])};var c=a.a.h.S();a.w.v.prototype.nodes=function(){var b=this.v;
if(0==arguments.length)return(a.a.h.get(b,c)||{}).yb||(3===this.qb?b.content:4===this.qb?b:n);a.a.h.set(b,c,{yb:arguments[0]})};a.w.ha=function(a){this.v=a};a.w.ha.prototype=new a.w.v;a.w.ha.prototype.constructor=a.w.ha;a.w.ha.prototype.text=function(){if(0==arguments.length){var b=a.a.h.get(this.v,c)||{};b.Qb===n&&b.yb&&(b.Qb=b.yb.innerHTML);return b.Qb}a.a.h.set(this.v,c,{Qb:arguments[0]})};a.b("templateSources",a.w);a.b("templateSources.domElement",a.w.v);a.b("templateSources.anonymousTemplate",
a.w.ha)})();(function(){function b(b,c,d){var e;for(c=a.g.nextSibling(c);b&&(e=b)!==c;)b=a.g.nextSibling(e),d(e,b)}function c(c,d){if(c.length){var e=c[0],f=c[c.length-1],g=e.parentNode,h=a.ba.instance,n=h.preprocessNode;if(n){b(e,f,function(a,b){var c=a.previousSibling,d=n.call(h,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.La(c,g))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.$b(d,b)});b(e,f,function(b){1!==b.nodeType&&
8!==b.nodeType||a.W.Mc(b,[d])});a.a.La(c,g)}}function d(a){return a.nodeType?a:0<a.length?a[0]:null}function e(b,e,f,g,u){u=u||{};var q=(b&&d(b)||f||{}).ownerDocument,n=u.templateEngine||h;a.Pb.cd(f,n,q);f=n.renderTemplate(f,g,u,q);if("number"!=typeof f.length||0<f.length&&"number"!=typeof f[0].nodeType)throw Error("Template engine must return an array of DOM nodes");q=!1;switch(e){case "replaceChildren":a.g.na(b,f);q=!0;break;case "replaceNode":a.a.Dc(b,f);q=!0;break;case "ignoreTargetNode":break;
default:throw Error("Unknown renderMode: "+e);}q&&(c(f,g),u.afterRender&&a.s.I(u.afterRender,null,[f,g.$data]));return f}function f(b,c,d){return a.J(b)?b():"function"===typeof b?b(c,d):b}var h;a.Mb=function(b){if(b!=n&&!(b instanceof a.Y))throw Error("templateEngine must inherit from ko.templateEngine");h=b};a.Jb=function(b,c,g,p,u){g=g||{};if((g.templateEngine||h)==n)throw Error("Set a template engine before calling renderTemplate");u=u||"replaceChildren";if(p){var q=d(p);return a.N(function(){var h=
c&&c instanceof a.aa?c:new a.aa(c,null,null,null,{exportDependencies:!0}),n=f(b,h.$data,h),h=e(p,u,n,h,g);"replaceNode"==u&&(p=h,q=d(p))},null,{va:function(){return!q||!a.a.Cb(q)},l:q&&"replaceNode"==u?q.parentNode:q})}return a.W.Gb(function(d){a.Jb(b,c,g,d,"replaceNode")})};a.wd=function(b,d,g,h,u){function q(a,b){c(b,t);g.afterRender&&g.afterRender(b,a);t=null}function r(a,c){t=u.createChildContext(a,g.as,function(a){a.$index=c});var d=f(b,a,t);return e(h,"ignoreTargetNode",d,t,g)}var t;return a.N(function(){var b=
a.a.c(d)||[];"undefined"==typeof b.length&&(b=[b]);b=a.a.Xa(b,function(b){return g.includeDestroyed||b===n||null===b||!a.a.c(b._destroy)});a.s.I(a.a.Kb,null,[h,b,r,g,q])},null,{l:h})};var g=a.a.h.S();a.f.template={init:function(b,c){var d=a.a.c(c());if("string"==typeof d||d.name)a.g.Ja(b);else{if("nodes"in d){d=d.nodes||[];if(a.J(d))throw Error('The "nodes" option must be a plain, non-observable array.');d=a.a.vc(d)}else d=a.g.childNodes(b),d=a.a.vc(d);(new a.w.ha(b)).nodes(d)}return{controlsDescendantBindings:!0}},
update:function(b,c,d,e,f){var h=c();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)));"foreach"in c?e=a.wd(h||b,d&&c.foreach||[],c,b,f):d?(f="data"in c?f.gc(c.data,c.as):f,e=a.Jb(h||b,f,c,b)):a.g.Ja(b);f=e;(c=a.a.h.get(b,g))&&"function"==typeof c.o&&c.o();a.a.h.set(b,g,f&&f.ja()?f:n)}};a.j.Fa.template=function(b){b=a.j.Ib(b);return 1==b.length&&b[0].unknown||a.j.od(b,"name")?null:"This template engine does not support anonymous templates nested within its templates"};
a.g.$.template=!0})();a.b("setTemplateEngine",a.Mb);a.b("renderTemplate",a.Jb);a.a.nc=function(a,c,d){if(a.length&&c.length){var e,f,h,g,k;for(e=f=0;(!d||e<d)&&(g=a[f]);++f){for(h=0;k=c[h];++h)if(g.value===k.value){g.moved=k.index;k.moved=g.index;c.splice(h,1);e=h=0;break}e+=h}}};a.a.xb=function(){function b(b,d,e,f,h){var g=Math.min,k=Math.max,l=[],m,p=b.length,n,q=d.length,r=q-p||1,t=p+q+1,x,v,y;for(m=0;m<=p;m++)for(v=x,l.push(x=[]),y=g(q,m+r),n=k(0,m-1);n<=y;n++)x[n]=n?m?b[m-1]===d[n-1]?v[n-1]:
g(v[n]||t,x[n-1]||t)+1:n+1:m+1;g=[];k=[];r=[];m=p;for(n=q;m||n;)q=l[m][n]-1,n&&q===l[m][n-1]?k.push(g[g.length]={status:e,value:d[--n],index:n}):m&&q===l[m-1][n]?r.push(g[g.length]={status:f,value:b[--m],index:m}):(--n,--m,h.sparse||g.push({status:"retained",value:d[n]}));a.a.nc(r,k,!h.dontLimitMoves&&10*p);return g.reverse()}return function(a,d,e){e="boolean"===typeof e?{dontLimitMoves:e}:e||{};a=a||[];d=d||[];return a.length<d.length?b(a,d,"added","deleted",e):b(d,a,"deleted","added",e)}}();a.b("utils.compareArrays",
a.a.xb);(function(){function b(b,c,d,g,k){var l=[],m=a.N(function(){var m=c(d,k,a.a.La(l,b))||[];0<l.length&&(a.a.Dc(l,m),g&&a.s.I(g,null,[d,m,k]));l.length=0;a.a.Ya(l,m)},null,{l:b,va:function(){return!a.a.Zb(l)}});return{ma:l,N:m.ja()?m:n}}var c=a.a.h.S(),d=a.a.h.S();a.a.Kb=function(e,f,h,g,k){function l(b,c){w=r[c];y!==c&&(E[b]=w);w.Eb(y++);a.a.La(w.ma,e);v.push(w);C.push(w)}function m(b,c){if(b)for(var d=0,e=c.length;d<e;d++)c[d]&&a.a.D(c[d].ma,function(a){b(a,d,c[d].ta)})}f=f||[];g=g||{};var p=
a.a.h.get(e,c)===n,r=a.a.h.get(e,c)||[],q=a.a.ub(r,function(a){return a.ta}),t=a.a.xb(q,f,g.dontLimitMoves),v=[],x=0,y=0,A=[],C=[];f=[];for(var E=[],q=[],w,D=0,F,G;F=t[D];D++)switch(G=F.moved,F.status){case "deleted":G===n&&(w=r[x],w.N&&(w.N.o(),w.N=n),a.a.La(w.ma,e).length&&(g.beforeRemove&&(v.push(w),C.push(w),w.ta===d?w=null:f[D]=w),w&&A.push.apply(A,w.ma)));x++;break;case "retained":l(D,x++);break;case "added":G!==n?l(D,G):(w={ta:F.value,Eb:a.T(y++)},v.push(w),C.push(w),p||(q[D]=w))}a.a.h.set(e,
c,v);m(g.beforeMove,E);a.a.D(A,g.beforeRemove?a.ia:a.removeNode);for(var D=0,p=a.g.firstChild(e),I;w=C[D];D++){w.ma||a.a.extend(w,b(e,h,w.ta,k,w.Eb));for(x=0;t=w.ma[x];p=t.nextSibling,I=t,x++)t!==p&&a.g.rc(e,t,I);!w.kd&&k&&(k(w.ta,w.ma,w.Eb),w.kd=!0)}m(g.beforeRemove,f);for(D=0;D<f.length;++D)f[D]&&(f[D].ta=d);m(g.afterMove,E);m(g.afterAdd,q)}})();a.b("utils.setDomNodeChildrenFromArrayMapping",a.a.Kb);a.X=function(){this.allowTemplateRewriting=!1};a.X.prototype=new a.Y;a.X.prototype.constructor=a.X;
a.X.prototype.renderTemplateSource=function(b,c,d,e){if(c=(9>a.a.ca?0:b.nodes)?b.nodes():null)return a.a.fa(c.cloneNode(!0).childNodes);b=b.text();return a.a.xa(b,e)};a.X.Aa=new a.X;a.Mb(a.X.Aa);a.b("nativeTemplateEngine",a.X);(function(){a.Oa=function(){var a=this.nd=function(){if(!v||!v.tmpl)return 0;try{if(0<=v.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(b,e,f,h){h=h||t;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 g=b.data("precompiled");g||(g=b.text()||"",g=v.template(null,"{{ko_with $item.koBindingContext}}"+g+"{{/ko_with}}"),b.data("precompiled",g));b=[e.$data];e=v.extend({koBindingContext:e},f.templateOptions);e=v.tmpl(g,b,e);e.appendTo(h.createElement("div"));v.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){t.write("<script type='text/html' id='"+a+"'>"+b+"\x3c/script>")};0<a&&(v.tmpl.tag.ko_code=
{open:"__.push($1 || '');"},v.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};a.Oa.prototype=new a.Y;a.Oa.prototype.constructor=a.Oa;var b=new a.Oa;0<b.nd&&a.Mb(b);a.b("jqueryTmplTemplateEngine",a.Oa)})()})})();})();
