0;j=u[e];e++)if(s.value===j.value){s.moved=j.index;j.moved=s.index;u.splice(e,1);b=e=0;break}b+=e}returng.reverse()}functionS(a,d,c,e,f){varf=f||{},g=a&&M(a),g=g&&g.ownerDocument,h=f.templateEngine||N;b.ya.ub(c,h,g);c=h.renderTemplate(c,e,f,g);("number"!=typeofc.length||0<c.length&&"number"!=typeofc[0].nodeType)&&i(Error("Template engine must return an array of DOM nodes"));g=q;switch(d){case"replaceChildren":b.e.N(a,c);g=l;break;case"replaceNode":b.a.Xa(a,c);g=l;break;case"ignoreTargetNode":break;
e[g];"function"===typeofh?(g=h(a[f].value))&&i(Error(g)):h||i(Error("This template engine does not support the '"+g+"' binding within its templates"))}}a="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+b.g.ba(a)+" } })()})";returnc.createJavaScriptEvaluatorBlock(a)+d}functionW(a,d,c,e){functionf(a){returnfunction(){returnj[a]}}functiong(){returnj}varh=0,j,k;b.j(function(){varm=c&&cinstanceofb.z?c:newb.z(b.a.d(c)),p=m.$data;e&&b.cb(a,m);if(j=("function"==typeofd?
d(m,a):d)||b.J.instance.getBindings(a,m)){if(0===h){h=1;for(varrinj){varu=b.c[r];u&&8===a.nodeType&&!b.e.I[r]&&i(Error("The binding '"+r+"' cannot be used with virtual elements"));if(u&&"function"==typeofu.init&&(u=(0,u.init)(a,f(r),g,p,m))&&u.controlsDescendantBindings)k!==H&&i(Error("Multiple bindings ("+k+" and "+r+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.")),k=r}h=2}if(2===h)for(rinj)(u=b.c[r])&&"function"==
typeofu.update&&(0,u.update)(a,f(r),g,p,m)}},n,{W:a});return{Mb:k===H}}functionX(a,d,c){vare=l,f=1===d.nodeType;f&&b.e.Sa(d);if(f&&c||b.J.instance.nodeHasBindings(d))e=W(d,n,a,c).Mb;e&&Y(a,d,!f)}functionY(a,d,c){for(vare=b.e.firstChild(d);d=e;)e=b.e.nextSibling(d),X(a,d,c)}functionZ(a,b){varc=$(a,b);returnc?0<c.length?c[c.length-1].nextSibling:a.nextSibling:n}function$(a,b){for(varc=a,e=1,f=[];c=c.nextSibling;){if(G(c)&&(e--,0===e))returnf;f.push(c);y(c)&&e++}b||i(Error("Cannot find closing comment tag to match: "+
d,function(a){c.call(b,a)}):i(Error("Browser doesn't support addEventListener or attachEvent"))},Aa:function(b,d){(!b||!b.nodeType)&&i(Error("element must be a DOM node when calling triggerEvent"));if("undefined"!=typeofE){varc=[];a(b,d)&&c.push({mb:b.checked});E(b).trigger(d,c)}else"function"==typeofx.createEvent?"function"==typeofb.dispatchEvent?(c=x.createEvent(e[d]||"HTMLEvents"),c.initEvent(d,l,l,w,0,0,0,0,0,q,q,q,q,0,b),b.dispatchEvent(c)):i(Error("The supplied element doesn't support dispatchEvent")):
"undefined"!=typeofb.fireEvent?(a(b,d)&&(b.checked=b.checked!==l),b.fireEvent("on"+d)):i(Error("Browser doesn't support triggering events"))},d:function(a){returnb.$(a)?a():a},ta:function(a){returnb.$(a)?a.t():a},da:function(a,d,c){if(d){vare=/[\w-]+/g,f=a.className.match(e)||[];b.a.o(d.match(e),function(a){vard=b.a.i(f,a);0<=d?c||f.splice(d,1):c&&f.push(a)});a.className=f.join("")}},bb:function(a,d){varc=b.a.d(d);if(c===n||c===H)c="";vare=b.e.firstChild(a);!e||3!=e.nodeType||b.e.nextSibling(e)?
m,Pb:7===m,Z:m,Na:function(a,d){for(varc=b.a.L(a.getElementsByTagName("input")).concat(b.a.L(a.getElementsByTagName("textarea"))),e="string"==typeofd?function(a){returna.name===d}:function(a){returnd.test(a.name)},f=[],g=c.length-1;0<=g;g--)e(c[g])&&f.push(c[g]);returnf},Hb:function(a){return"string"==typeofa&&(a=b.a.D(a))?w.JSON&&w.JSON.parse?w.JSON.parse(a):(newFunction("return "+a))():n},wa:function(a,d,c){("undefined"==typeofJSON||"undefined"==typeofJSON.stringify)&&i(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"));
c);e===H&&d&&(e=[],b.a.f.set(a,c,e));returne}functiond(c){vare=a(c,q);if(e)for(vare=e.slice(0),j=0;j<e.length;j++)e[j](c);b.a.f.clear(c);"function"==typeofE&&"function"==typeofE.cleanData&&E.cleanData([c]);if(f[c.nodeType])for(e=c.firstChild;c=e;)e=c.nextSibling,8===c.nodeType&&d(c)}varc="__ko_domNodeDisposal__"+(newDate).getTime(),e={1:l,8:l,9:l},f={1:l,9:l};return{Ba:function(b,d){"function"!=typeofd&&i(Error("Callback must be a function"));a(b,l).push(d)},Wa:function(d,e){varf=a(d,q);
a+c[2]+"</div>";for("function"==typeofw.innerShiv?d.appendChild(w.innerShiv(a)):d.innerHTML=a;c[0]--;)d=d.lastChild;d=b.a.L(d.lastChild.childNodes)}returnd};b.a.ca=function(a,d){b.a.ka(a);d=b.a.d(d);if(d!==n&&d!==H)if("string"!=typeofd&&(d=d.toString()),"undefined"!=typeofE)E(a).html(d);elsefor(varc=b.a.sa(d),e=0;e<c.length;e++)a.appendChild(c[e])};b.b("utils.parseHtmlFragment",b.a.sa);b.b("utils.setHtml",b.a.ca);varQ={};b.s={qa:function(a){"function"!=typeofa&&i(Error("You can only pass a function to ko.memoization.memoize()"));
varb=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);Q[b]=a;return"<\!--[ko_memo:"+b+"]--\>"},gb:function(a,b){varc=Q[a];c===H&&i(Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized."));try{returnc.apply(n,b||[]),l}finally{deleteQ[a]}},hb:function(a,d){varc=[];ba(a,c);for(vare=0,f=c.length;e<f;e++){varg=c[e].rb,h=[g];d&&b.a.P(h,d);b.s.gb(c[e].Eb,h);g.nodeValue="";g.parentNode&&g.parentNode.removeChild(g)}},
end:function(){B.pop()},Va:function(a){b.Pa(a)||i(Error("Only subscribable things can act as dependencies"));if(0<B.length){vard=B[B.length-1];d&&!(0<=b.a.i(d.Ka,a))&&(d.Ka.push(a),d.ha(a))}},K:function(a,b,c){try{returnB.push(n),a.apply(b,c||[])}finally{B.pop()}}};varla={undefined:l,"boolean":l,number:l,string:l};b.m=function(a){functiond(){if(0<arguments.length){if(!d.equalityComparer||!d.equalityComparer(c,arguments[0]))d.H(),c=arguments[0],d.G();returnthis}b.r.Va(d);returnc}varc=a;b.S.call(d);
a[D]===b.m||"function"==typeofa&&a[D]===b.j&&a.yb?l:q};b.b("observable",b.m);b.b("isObservable",b.$);b.b("isWriteableObservable",b.Qa);b.R=function(a){0==arguments.length&&(a=[]);a!==n&&(a!==H&&!("length"ina))&&i(Error("The argument passed when initializing an observable array must be an array, or null, or undefined."));vard=b.m(a);b.a.extend(d,b.R.fn);returnd};b.R.fn={remove:function(a){for(varb=this.t(),c=[],e="function"==typeofa?a:function(b){returnb===a},f=0;f<b.length;f++){varg=b[f];
i(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.")),this;m||g();b.r.Va(h);returnk}functionj(){return!m||0<z.length}vark,m=q,p=q,r=a;r&&"object"==typeofr?(c=r,r=c.read):(c=c||{},r||(r=c.read));"function"!=typeofr&&i(Error("Pass a function that returns the value of the ko.computed"));varu=c.write,F=c.disposeWhenNodeIsRemoved||c.W||n,v=c.disposeWhen||c.Ja||t(q),A=e,z=[],s=n;d||(d=c.owner);h.t=function(){m||
b.b("computed",b.j);b.b("isComputed",b.Ab);b.fb=function(a){0==arguments.length&&i(Error("When calling ko.toJS, pass the object you want to convert."));returnaa(a,function(a){for(varc=0;b.$(a)&&10>c;c++)a=a();returna})};b.toJSON=function(a,d,c){a=b.fb(a);returnb.a.wa(a,d,c)};b.b("toJS",b.fb);b.b("toJSON",b.toJSON);b.k={q:function(a){switch(b.a.u(a)){case"option":returna.__ko__hasDomDataOptionValue__===l?b.a.f.get(a,b.c.options.ra):7>=b.a.Z?a.getAttributeNode("value").specified?a.value:a.text:
"__ko_bindingContext__")};b.Ea=function(a,d,c){1===a.nodeType&&b.e.Sa(a);returnW(a,d,c,l)};b.Da=function(a,b){(1===b.nodeType||8===b.nodeType)&&Y(a,b,l)};b.Ca=function(a,b){b&&(1!==b.nodeType&&8!==b.nodeType)&&i(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node"));b=b||w.document.body;X(a,b,l)};b.ja=function(a){switch(a.nodeType){case1:case8:vard=b.cb(a);if(d)returnd;if(a.parentNode)returnb.ja(a.parentNode)}returnH};b.ob=function(a){return(a=
b.c.options={update:function(a,d,c){"select"!==b.a.u(a)&&i(Error("options binding applies only to SELECT elements"));for(vare=0==a.length,f=b.a.V(b.a.fa(a.childNodes,function(a){returna.tagName&&"option"===b.a.u(a)&&a.selected}),function(a){returnb.k.q(a)||a.innerText||a.textContent}),g=a.scrollTop,h=b.a.d(d());0<a.length;)b.A(a.options[0]),a.remove(0);if(h){varc=c(),j=c.optionsIncludeDestroyed;"number"!=typeofh.length&&(h=[h]);if(c.optionsCaption){vark=x.createElement("option");b.a.ca(k,c.optionsCaption);
b.c.selectedOptions={init:function(a,d,c){b.a.n(a,"change",function(){vare=d(),f=[];b.a.o(a.getElementsByTagName("option"),function(a){a.selected&&f.push(b.k.q(a))});b.g.ea(e,c,"value",f)})},update:function(a,d){"select"!=b.a.u(a)&&i(Error("values binding applies only to SELECT elements"));varc=b.a.d(d());c&&"number"==typeofc.length&&b.a.o(a.getElementsByTagName("option"),function(a){vard=0<=b.a.i(c,b.k.q(a));b.a.ab(a,d)})}};b.c.style={update:function(a,d){varc=b.a.d(d()||{}),e;for(einc)if("string"==
typeofe){varf=b.a.d(c[e]);a.style[e]=f||""}}};b.c.submit={init:function(a,d,c,e){"function"!=typeofd()&&i(Error("The value for a submit binding must be a function"));b.a.n(a,"submit",function(b){varc,h=d();try{c=h.call(e,a)}finally{c!==l&&(b.preventDefault?b.preventDefault():b.returnValue=q)}})}};b.c.text={update:function(a,d){b.a.bb(a,d())}};b.e.I.text=l;b.c.uniqueName={init:function(a,d){if(d()){varc="ko_unique_"+++b.c.uniqueName.nb;b.a.$a(a,c)}}};b.c.uniqueName.nb=0;b.c.value={init:function(a,
d,c){d.isTemplateRewritten(a,c)||d.rewriteTemplate(a,function(a){returnb.ya.Fb(a,d)},c)},Fb:function(a,b){returna.replace(pa,function(a,e,f,g,h,j,k){returnV(k,e,b)}).replace(qa,function(a,e){returnV(e,"<\!-- ko --\>",b)})},jb:function(a){returnb.s.qa(function(d,c){d.nextSibling&&b.Ea(d.nextSibling,a,c)})}};b.b("__tr_ambtns",b.ya.jb);b.l={};b.l.h=function(a){this.h=a};b.l.h.prototype.text=function(){vara=b.a.u(this.h),a="script"===a?"text":"textarea"===a?"value":"innerHTML";if(0==arguments.length)returnthis.h[a];
function(){if(0==arguments.length)return(b.a.f.get(this.h,"__ko_anon_template__")||{}).ia;b.a.f.set(this.h,"__ko_anon_template__",{ia:arguments[0]})};b.b("templateSources",b.l);b.b("templateSources.domElement",b.l.h);b.b("templateSources.anonymousTemplate",b.l.O);varN;b.va=function(a){a!=H&&!(ainstanceofb.v)&&i(Error("templateEngine must inherit from ko.templateEngine"));N=a};b.ua=function(a,d,c,e,f){c=c||{};(c.templateEngine||N)==H&&i(Error("Set a template engine before calling renderTemplate"));
b.g.Db(a,"name")?n:"This template engine does not support anonymous templates nested within its templates"};b.e.I.template=l;b.b("setTemplateEngine",b.va);b.b("renderTemplate",b.ua);b.a.Ia=function(a,b,c){a=a||[];b=b||[];returna.length<=b.length?R(a,b,"added","deleted",c):R(b,a,"deleted","added",c)};b.b("utils.compareArrays",b.a.Ia);b.a.Za=function(a,d,c,e,f){functiong(a,b){s=k[b];v!==b&&(A[a]=s);s.ma(v++);L(s.M);r.push(s);y.push(s)}functionh(a,c){if(a)for(vard=0,e=c.length;d<e;d++)c[d]&&b.a.o(c[d].M,
q};b.C.prototype=newb.v;b.C.prototype.renderTemplateSource=function(a){vard=!(9>b.a.Z)&&a.nodes?a.nodes():n;if(d)returnb.a.L(d.cloneNode(l).childNodes);a=a.text();returnb.a.sa(a)};b.C.na=newb.C;b.va(b.C.na);b.b("nativeTemplateEngine",b.C);b.pa=function(){vara=this.Cb=function(){if("undefined"==typeofE||!E.tmpl)return0;try{if(0<=E.tmpl.tag.tmpl.open.toString().indexOf("__"))return2}catch(a){}return1}();this.renderTemplateSource=function(b,c,e){e=e||{};2>a&&i(Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later."));
n:function(a,c,e){varf=i&&k[c];if(!f&&"undefined"!=typeofjQuery){if(b(a,c))varg=e,e=function(a,b){varc=this.checked;b&&(this.checked=b.fb!==p);g.call(this,a);this.checked=c};jQuery(a).bind(c,e)}else!f&&"function"==typeofa.addEventListener?a.addEventListener(c,e,t):"undefined"!=typeofa.attachEvent?a.attachEvent("on"+c,function(b){e.call(a,b)}):m(Error("Browser doesn't support addEventListener or attachEvent"))},va:function(a,c){(!a||!a.nodeType)&&m(Error("element must be a DOM node when calling triggerEvent"));
if("undefined"!=typeofjQuery){vare=[];b(a,c)&&e.push({fb:a.checked});jQuery(a).trigger(c,e)}else"function"==typeofdocument.createEvent?"function"==typeofa.dispatchEvent?(e=document.createEvent(f[c]||"HTMLEvents"),e.initEvent(c,p,p,window,0,0,0,0,0,t,t,t,t,0,a),a.dispatchEvent(e)):m(Error("The supplied element doesn't support dispatchEvent")):"undefined"!=typeofa.fireEvent?(b(a,c)&&(a.checked=a.checked!==p),a.fireEvent("on"+c)):m(Error("Browser doesn't support triggering events"))},d:function(b){returna.la(b)?
e,c){("undefined"==typeofJSON||"undefined"==typeofJSON.stringify)&&m(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"));returnJSON.stringify(a.a.d(b),e,c)},Cb:function(b,e,c){varc=c||{},f=c.params||{},g=c.includeFields||this.Ca,d=b;if("object"==typeofb&&"form"===a.a.o(b))for(vard=b.action,h=g.length-1;0<=h;h--)for(vark=a.a.Da(b,g[h]),
jQuery.cleanData([e]);if(g[e.nodeType])for(f=e.firstChild;e=f;)f=e.nextSibling,8===e.nodeType&&c(e)}vard="__ko_domNodeDisposal__"+(newDate).getTime(),f={1:p,8:p,9:p},g={1:p,9:p};return{wa:function(a,c){"function"!=typeofc&&m(Error("Callback must be a function"));b(a,p).push(c)},Ma:function(c,f){varg=b(c,t);g&&(a.a.ba(g,f),0==g.length&&a.a.f.set(c,d,n))},F:function(b){if(f[b.nodeType]&&(c(b),g[b.nodeType])){vard=[];a.a.N(d,b.getElementsByTagName("*"));for(varb=0,j=d.length;b<j;b++)c(d[b])}},
j;e++)c(d[e],g)}vard={};return{na:function(a){"function"!=typeofa&&m(Error("You can only pass a function to ko.memoization.memoize()"));varc=b()+b();d[c]=a;return"<\!--[ko_memo:"+c+"]--\>"},Va:function(a,b){varc=d[a];c===n&&m(Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized."));try{returnc.apply(s,b||[]),p}finally{deleted[a]}},Wa:function(b,d){vare=[];c(b,e);for(varh=0,j=e.length;h<j;h++){vark=e[h].jb,i=[k];d&&a.a.N(i,d);a.s.Va(e[h].yb,i);k.nodeValue="";k.parentNode&&
end:function(){b.pop()},La:function(c){a.Ga(c)||m(Error("Only subscribable things can act as dependencies"));if(0<b.length){vard=b[b.length-1];0<=a.a.j(d.Aa,c)||(d.Aa.push(c),d.ca(c))}}}}();varG={undefined:p,"boolean":p,number:p,string:p};a.m=function(b){functionc(){if(0<arguments.length){if(!c.equalityComparer||!c.equalityComparer(d,arguments[0]))c.I(),d=arguments[0],c.H();returnthis}a.U.La(c);returnd}vard=b;a.R.call(c);c.H=function(){c.notifySubscribers(d)};c.I=function(){c.notifySubscribers(d,
a.Ha);a.Q=function(b){0==arguments.length&&(b=[]);b!==s&&(b!==n&&!("length"inb))&&m(Error("The argument passed when initializing an observable array must be an array, or null, or undefined."));varc=a.m(b);a.a.extend(c,a.Q.fn);returnc};a.Q.fn={remove:function(a){for(varc=this(),d=[],f="function"==typeofa?a:function(c){returnc===a},g=0;g<c.length;g++){vare=c[g];f(e)&&(0===d.length&&this.I(),d.push(e),c.splice(g,1),g--)}d.length&&this.H();returnd},removeAll:function(b){if(b===n){varc=this(),
p;try{varb=a.a.T(v,function(a){returna.target});a.U.bb(function(c){vare;0<=(e=a.a.j(b,c))?b[e]=n:v.push(c.ta(g))});for(vare=q.call(c),f=b.length-1;0<=f;f--)b[f]&&v.splice(f,1)[0].A();i=p;h.notifySubscribers(k,"beforeChange");k=e}finally{a.U.end()}h.notifySubscribers(k);l=t}}functionh(){if(0<arguments.length)j.apply(h,arguments);elsereturni||e(),a.U.La(h),k}functionj(){"function"===typeofo?o.apply(c,arguments):m(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."))}
vark,i=t,l=t,q=b;q&&"object"==typeofq?(d=q,q=d.read):(d=d||{},q||(q=d.read));"function"!=typeofq&&m(Error("Pass a function that returns the value of the ko.computed"));varo=d.write;c||(c=d.owner);varv=[],u=f,r="object"==typeofd.disposeWhenNodeIsRemoved?d.disposeWhenNodeIsRemoved:s,w=d.disposeWhen||A(t);if(r){u=function(){a.a.G.Ma(r,arguments.callee);f()};a.a.G.wa(r,u);vary=w,w=function(){return!a.a.fa(r)||y()}}varx=s;h.nb=function(){returnv.length};h.pb="function"===typeofd.write;h.A=function(){u()};
d;break;case"object":case"undefined":vari=e.get(d);h[c]=i!==n?i:b(d,g,e)}});returnh}functionc(a,b){if(ainstanceofArray){for(varc=0;c<a.length;c++)b(c);"function"==typeofa.toJSON&&b("toJSON")}elsefor(cina)b(c)}functiond(){varb=[],c=[];this.save=function(e,d){varj=a.a.j(b,e);0<=j?c[j]=d:(b.push(e),c.push(d))};this.get=function(e){e=a.a.j(b,e);return0<=e?c[e]:n}}a.Ta=function(c){0==arguments.length&&m(Error("When calling ko.toJS, pass the object you want to convert."));returnb(c,function(b){for(varc=
a.g.ka);(function(){functionb(a){return8==a.nodeType&&(g?a.text:a.nodeValue).match(e)}functionc(a){return8==a.nodeType&&(g?a.text:a.nodeValue).match(h)}functiond(a,e){for(vard=a,f=1,g=[];d=d.nextSibling;){if(c(d)&&(f--,0===f))returng;g.push(d);b(d)&&f++}e||m(Error("Cannot find closing comment tag to match: "+a.nodeValue));returns}functionf(a,b){varc=d(a,b);returnc?0<c.length?c[c.length-1].nextSibling:a.nextSibling:s}varg="<\!--test--\>"===document.createComment("test").text,e=g?/^<\!--\s*ko\s+(.*\:.*)\s*--\>$/:
typeofc?c():c)||a.J.instance.getBindings(b,o)){if(0===i){i=1;for(varuinl){varr=a.c[u];r&&8===b.nodeType&&!a.e.C[u]&&m(Error("The binding '"+u+"' cannot be used with virtual elements"));if(r&&"function"==typeofr.init&&(r=(0,r.init)(b,j(u),k,v,o))&&r.controlsDescendantBindings)q!==n&&m(Error("Multiple bindings ("+q+" and "+u+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.")),q=u}i=2}if(2===i)for(uinl)(r=a.c[u])&&"function"==
"__ko_bindingContext__",c);elsereturna.a.f.get(b,"__ko_bindingContext__")};a.ya=function(b,c,e){1===b.nodeType&&a.e.Ia(b);returnd(b,c,e,p)};a.Ya=function(a,c){(1===c.nodeType||8===c.nodeType)&&b(a,c,p)};a.xa=function(a,b){b&&(1!==b.nodeType&&8!==b.nodeType)&&m(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node"));b=b||window.document.body;c(a,b,p)};a.ea=function(b){switch(b.nodeType){case1:case8:varc=a.Ra(b);if(c)returnc;if(b.parentNode)returna.ea(b.parentNode)}};
d();try{varq=a.a.L(arguments);q.unshift(f);e=i.apply(f,q)}finally{e!==p&&(b.preventDefault?b.preventDefault():b.returnValue=t)}l[g+"Bubble"]===t&&(b.cancelBubble=p,b.stopPropagation&&b.stopPropagation())}})})()}};a.c.submit={init:function(b,c,d,f){"function"!=typeofc()&&m(Error("The value for a submit binding must be a function"));a.a.n(b,"submit",function(a){vare,d=c();try{e=d.call(f,b)}finally{e!==p&&(a.preventDefault?a.preventDefault():a.returnValue=t)}})}};a.c.visible={update:function(b,c){vard=
0));d&&0<b.length&&B(b,f,t)}};a.c.options={update:function(b,c,d){"select"!==a.a.o(b)&&m(Error("options binding applies only to SELECT elements"));for(varf=0==b.length,g=a.a.T(a.a.aa(b.childNodes,function(b){returnb.tagName&&"option"===a.a.o(b)&&b.selected}),function(b){returna.k.r(b)||b.innerText||b.textContent}),e=b.scrollTop,h=a.a.d(c());0<b.length;)a.F(b.options[0]),b.remove(0);if(h){d=d();"number"!=typeofh.length&&(h=[h]);if(d.optionsCaption){varj=document.createElement("option");a.a.Y(j,
a.c.options.oa="__ko.optionValueDomData__";a.c.selectedOptions={Ea:function(b){for(varc=[],b=b.childNodes,d=0,f=b.length;d<f;d++){varg=b[d],e=a.a.o(g);"option"==e&&g.selected?c.push(a.k.r(g)):"optgroup"==e&&(g=a.c.selectedOptions.Ea(g),Array.prototype.splice.apply(c,[c.length,0].concat(g)))}returnc},init:function(b,c,d){a.a.n(b,"change",function(){varb=c(),g=a.c.selectedOptions.Ea(this);a.g.$(b,d,"value",g)})},update:function(b,c){"select"!=a.a.o(b)&&m(Error("values binding applies only to SELECT elements"));
update:function(b,c,d,f,g){returna.c.template.update(b,a.c.foreach.p(c),d,f,g)}};a.g.D.foreach=t;a.e.C.foreach=p;a.t=function(){};a.t.prototype.renderTemplateSource=function(){m(Error("Override renderTemplateSource"))};a.t.prototype.createJavaScriptEvaluatorBlock=function(){m(Error("Override createJavaScriptEvaluatorBlock"))};a.t.prototype.makeTemplateSource=function(b,c){if("string"==typeofb){varc=c||document,d=c.getElementById(b);d||m(Error("Cannot find template with ID "+b));returnnewa.l.i(d)}if(1==
p);!(d&&d!=document)&&"string"==typeofa&&(this.V=this.V||{},this.V[a]=p)};a.b("templateEngine",a.t);a.Z=function(){functionb(b,c,e){for(varb=a.g.W(b),d=a.g.D,j=0;j<b.length;j++){vark=b[j].key;if(d.hasOwnProperty(k)){vari=d[k];"function"===typeofi?(k=i(b[j].value))&&m(Error(k)):i||m(Error("This template engine does not support the '"+k+"' binding within its templates"))}}b="ko.templateRewriting.applyMemoizedBindingsToNextSibling(function() { return (function() { return { "+a.g.ka(b)+
" } })() })";returne.createJavaScriptEvaluatorBlock(b)+c}varc=/(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi,d=/<\!--\s*ko\b\s*([\s\S]*?)\s*--\>/g;return{mb:function(b,c,e){c.isTemplateRewritten(b,e)||c.rewriteTemplate(b,function(b){returna.Z.zb(b,c)},e)},zb:function(a,g){returna.replace(c,function(a,c,d,f,i,l,q){returnb(q,c,g)}).replace(d,function(a,c){returnb(c,"<\!-- ko --\>",g)})},Za:function(b){returna.s.na(function(c,
g;a.Z.mb(j,q,l);j=q.renderTemplate(j,k,i,l);("number"!=typeofj.length||0<j.length&&"number"!=typeofj[0].nodeType)&&m(Error("Template engine must return an array of DOM nodes"));l=t;switch(f){case"replaceChildren":a.e.X(b,j);l=p;break;case"replaceNode":a.a.Na(b,j);l=p;break;case"ignoreTargetNode":break;default:m(Error("Unknown renderMode: "+f))}l&&(c(j,k),i.afterRender&&i.afterRender(j,k.$data));returnj}varg;a.ra=function(b){b!=n&&!(binstanceofa.t)&&m(Error("templateEngine must inherit from ko.templateEngine"));
g=b};a.qa=function(b,c,j,k,i){j=j||{};(j.templateEngine||g)==n&&m(Error("Set a template engine before calling renderTemplate"));i=i||"replaceChildren";if(k){varl=d(k);returna.h(function(){varg=c&&cinstanceofa.z?c:newa.z(a.a.d(c)),o="function"==typeofb?b(g.$data):b,g=f(k,i,o,g,j);"replaceNode"==i&&(k=g,l=d(k))},s,{disposeWhen:function(){return!l||!a.a.fa(l)},disposeWhenNodeIsRemoved:l&&"replaceNode"==i?l.parentNode:l})}returna.s.na(function(d){a.qa(b,c,j,d,"replaceNode")})};a.Fb=function(b,
"function"==typeofc.A&&c.A();a.a.f.set(b,"__ko__templateSubscriptionDomDataKey__",g)}};a.g.D.template=function(b){b=a.g.W(b);return1==b.length&&b[0].unknown||a.g.wb(b,"name")?s:"This template engine does not support anonymous templates nested within its templates"};a.e.C.template=p})();a.b("setTemplateEngine",a.ra);a.b("renderTemplate",a.qa);(function(){a.a.O=function(b,c,d){if(d===n)returna.a.O(b,c,1)||a.a.O(b,c,10)||a.a.O(b,c,Number.MAX_VALUE);for(varb=b||[],c=c||[],f=b,g=c,e=[],h=0;h<=g.length;h++)e[h]=
if(c)returna.a.L(c.cloneNode(p).childNodes);b=b.text();returna.a.pa(b)};a.q.K=newa.q;a.ra(a.q.K);a.b("nativeTemplateEngine",a.q);(function(){a.ma=function(){vara=this.vb=function(){if("undefined"==typeofjQuery||!jQuery.tmpl)return0;try{if(0<=jQuery.tmpl.tag.tmpl.open.toString().indexOf("__"))return2}catch(a){}return1}();this.renderTemplateSource=function(b,f,g){g=g||{};2>a&&m(Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later."));vare=b.data("precompiled");