/*! * knockout javascript library v3.2.0 * (c) steven sanderson - http://knockoutjs.com/ * license: mit (http://www.opensource.org/licenses/mit-license.php) */ (function() {(function(p){var s=this||(0,eval)("this"),v=s.document,l=s.navigator,w=s.jquery,d=s.json;(function(p){"function"===typeof require&&"object"===typeof exports&&"object"===typeof module?p(module.exports||exports,require):"function"===typeof define&&define.amd?define(["exports","require"],p):p(s.ko={})})(function(m,n){function h(a,d){return null===a||typeof a in r?a===d:!1}function s(a,d){var c;return function(){c||(c=settimeout(function(){c=p;a()},d))}}function t(a,d){var c;return function(){cleartimeout(c); c=settimeout(a,d)}}function i(b,d,c,e){a.d[b]={init:function(b,h,k,f,m){var l,q;a.s(function(){var f=a.a.c(h()),k=!c!==!f,z=!q;if(z||d||k!==l)z&&a.y.la()&&(q=a.a.ia(a.f.childnodes(b),!0)),k?(z||a.f.t(b,a.a.ia(q)),a.ca(e?e(m,f):m,b)):a.f.ja(b),l=k},null,{o:b});return{controlsdescendantbindings:!0}}};a.h.ha[b]=!1;a.f.q[b]=!0}var a="undefined"!==typeof m?m:{};a.b=function(b,d){for(var c=b.split("."),e=a,g=0;ga.a.m(b,m[c])&&b.push(m[c]);return b},da:function(a,b){a=a||[];for(var c=[],d=0,f=a.length;df?d&&b.push(c):d||b.splice(f,1)},xa:e,extend:d,za:c,aa:e?c:d,g:b,na:function(a,b){if(!a)return a;var c={},d;for(d in a)a.hasownproperty(d)&&(c[d]=b(a[d],d,a));return c},ka:function(b){for(;b.firstchild;)a.removenode(b.firstchild)},oc:function(b){b=a.a.s(b);for(var c=v.createelement("div"),d=0,f=b.length;df?a.setattribute("selected",b):a.selected=b},cb:function(a){return null===a||a===p?"":a.trim?a.trim():a.tostring().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},vc:function(a,b){a=a||"";return b.length>a.length?!1:a.substring(0,b.length)===b},cc:function(a,b){if(a===b)return!0;if(11===a.nodetype)return!1;if(b.contains)return b.contains(3===a.nodetype?a.parentnode:a);if(b.comparedocumentposition)return 16==(b.comparedocumentposition(a)& 16);for(;a&&a!=b;)a=a.parentnode;return!!a},ja:function(b){return a.a.cc(b,b.ownerdocument.documentelement)},ob:function(b){return!!a.a.qb(b,a.a.ja)},t:function(a){return a&&a.tagname&&a.tagname.tolowercase()},n:function(b,c,d){var e=f&&k[c];if(!e&&w)w(b).bind(c,d);else if(e||"function"!=typeof b.addeventlistener)if("undefined"!=typeof b.attachevent){var g=function(a){d.call(b,a)},h="on"+c;b.attachevent(h,g);a.a.w.da(b,function(){b.detachevent(h,g)})}else throw error("browser doesn't support addeventlistener or attachevent"); else b.addeventlistener(c,d,!1)},oa:function(b,c){if(!b||!b.nodetype)throw error("element must be a dom node when calling triggerevent");var d;"input"===a.a.t(b)&&b.type&&"click"==c.tolowercase()?(d=b.type,d="checkbox"==d||"radio"==d):d=!1;if(w&&!d)w(b).trigger(c);else if("function"==typeof v.createevent)if("function"==typeof b.dispatchevent)d=v.createevent(h[c]||"htmlevents"),d.initevent(c,!0,!0,s,0,0,0,0,0,!1,!1,!1,!1,0,b),b.dispatchevent(d);else throw error("the supplied element doesn't support dispatchevent"); else if(d&&b.click)b.click();else if("undefined"!=typeof b.fireevent)b.fireevent("on"+c);else throw error("browser doesn't support triggering events");},c:function(b){return a.c(b)?b():b},xa:function(b){return a.c(b)?b.v():b},ba:function(b,c,d){if(c){var f=/\s+/g,e=b.classname.match(f)||[];a.a.u(c.match(f),function(b){a.a.ea(e,b,d)});b.classname=e.join(" ")}},bb:function(b,c){var d=a.a.c(c);if(null===d||d===p)d="";var f=a.f.firstchild(b);!f||3!=f.nodetype||a.f.nextsibling(f)?a.f.t(b,[b.ownerdocument.createtextnode(d)]): f.data=d;a.a.fc(b)},mb:function(a,b){a.name=b;if(7>=f)try{a.mergeattributes(v.createelement(""),!1)}catch(c){}},fc:function(a){9<=f&&(a=1==a.nodetype?a:a.parentnode,a.style&&(a.style.zoom=a.style.zoom))},dc:function(a){if(f){var b=a.style.width;a.style.width=0;a.style.width=b}},sc:function(b,c){b=a.a.c(b);c=a.a.c(c);for(var d=[],f=b;f<=c;f++)d.push(f);return d},s:function(a){for(var b=[],c=0,d=a.length;c",""]||!c.indexof("", ""]||(!c.indexof("",""]||[0,"",""];b="ignored
"+c[1]+b+c[2]+"
";for("function"==typeof s.innershiv?d.appendchild(s.innershiv(b)):d.innerhtml=b;c[0]--;)d=d.lastchild;d=a.a.s(d.lastchild.childnodes)}return d};a.a.$a=function(b,d){a.a.ka(b);d=a.a.c(d);if(null!==d&&d!==p)if("string"!=typeof d&&(d=d.tostring()),w)w(b).html(d);else for(var c=a.a.ba(d),e=0;em[0]?h+m[0]:m[0]),h);for(var h=1===t?h:math.min(d+(m[1]||0), h),t=d+t-2,z=math.max(h,t),u=[],r=[],e=2;dc;c++)b=b();return b})};a.tojson=function(b,c,d){b=a.qb(b);return a.a.eb(b,c,d)};c.prototype={save:function(b,c){var d=a.a.m(this.keys,b);0<=d?this.hb[d]=c:(this.keys.push(b),this.hb.push(c))},get:function(b){b=a.a.m(this.keys,b);return 0<=b?this.hb[b]:p}}})(); a.b("tojs",a.qb);a.b("tojson",a.tojson);(function(){a.i={q:function(b){switch(a.a.t(b)){case "option":return!0===b.__ko__hasdomdataoptionvalue__?a.a.e.get(b,a.d.options.va):7>=a.a.l?b.getattributenode("value")&&b.getattributenode("value").specified?b.value:b.text:b.value;case "select":return 0<=b.selectedindex?a.i.q(b.options[b.selectedindex]):p;default:return b.value}},ca:function(b,d,c){switch(a.a.t(b)){case "option":switch(typeof d){case "string":a.a.e.set(b,a.d.options.va,p);"__ko__hasdomdataoptionvalue__"in b&&delete b.__ko__hasdomdataoptionvalue__;b.value=d;break;default:a.a.e.set(b,a.d.options.va,d),b.__ko__hasdomdataoptionvalue__=!0,b.value="number"===typeof d?d:""}break;case "select":if(""===d||null===d)d=p;for(var e=-1,g=0,h=b.options.length,k;g=t){k&&c.push(n?{key:k,value:n.join("")}:{unknown:k});k=n=t=0;continue}}else if(58===r){if(!n)continue}else if(47===r&&z&&1a.a.l&&(a.g.register=function(a){return function(b){v.createelement(b); return a.apply(this,arguments)}}(a.g.register),v.createdocumentfragment=function(b){return function(){var d=b(),g=a.g.ub,h;for(h in g)g.hasownproperty(h)&&d.createelement(h);return d}}(v.createdocumentfragment))})();(function(){var b=0;a.d.component={init:function(d,c,e,g,h){function k(){var a=f&&f.dispose;"function"===typeof a&&a.call(f);m=null}var f,m;a.a.w.da(d,k);a.s(function(){var e=a.a.c(c()),g,n;"string"===typeof e?g=e:(g=a.a.c(e.name),n=a.a.c(e.params));if(!g)throw error("no component name specified"); var t=m=++b;a.g.get(g,function(b){if(m===t){k();if(!b)throw error("unknown component '"+g+"'");var c=b.template;if(!c)throw error("component '"+g+"' has no template");c=a.a.ia(c);a.f.t(d,c);var c=n,e=b.createviewmodel;b=e?e.call(b,c,{element:d}):c;c=h.createchildcontext(b);f=b;a.ca(c,d)}})},null,{o:d});return{controlsdescendantbindings:!0}}};a.f.q.component=!0})();var q={"class":"classname","for":"htmlfor"};a.d.attr={update:function(b,d){var c=a.a.c(d())||{};a.a.g(c,function(c,d){d=a.a.c(d);var h= !1===d||null===d||d===p;h&&b.removeattribute(c);8>=a.a.l&&c in q?(c=q[c],h?b.removeattribute(c):b[c]=d):h||b.setattribute(c,d.tostring());"name"===c&&a.a.mb(b,h?"":d.tostring())})}};(function(){a.d.checked={after:["value","attr"],init:function(b,d,c){function e(){var e=b.checked,k=q?h():e;if(!a.y.ma()&&(!f||e)){var g=a.k.b(d);m?l!==k?(e&&(a.a.ea(g,k,!0),a.a.ea(g,l,!1)),l=k):a.a.ea(g,k,e):a.h.pa(g,c,"checked",k,!0)}}function g(){var c=a.a.c(d());b.checked=m?0<=a.a.m(c,h()):k?c:h()===c}var h=a.ib(function(){return c.has("checkedvalue")? a.a.c(c.get("checkedvalue")):c.has("value")?a.a.c(c.get("value")):b.value}),k="checkbox"==b.type,f="radio"==b.type;if(k||f){var m=k&&a.a.c(d())instanceof array,l=m?h():p,q=f||m;f&&!b.name&&a.d.uniquename.init(b,function(){return!0});a.s(e,null,{o:b});a.a.n(b,"click",e);a.s(g,null,{o:b})}}};a.h.v.checked=!0;a.d.checkedvalue={update:function(b,d){b.value=a.a.c(d())}}})();a.d.css={update:function(b,d){var c=a.a.c(d());"object"==typeof c?a.a.g(c,function(c,d){d=a.a.c(d);a.a.ba(b,c,d)}):(c=string(c||""), a.a.ba(b,b.__ko__cssvalue,!1),b.__ko__cssvalue=c,a.a.ba(b,c,!0))}};a.d.enable={update:function(b,d){var c=a.a.c(d());c&&b.disabled?b.removeattribute("disabled"):c||b.disabled||(b.disabled=!0)}};a.d.disable={update:function(b,d){a.d.enable.update(b,function(){return!a.a.c(d())})}};a.d.event={init:function(b,d,c,e,g){var h=d()||{};a.a.g(h,function(k){"string"==typeof k&&a.a.n(b,k,function(b){var h,l=d()[k];if(l){try{var q=a.a.s(arguments);e=g.$data;q.unshift(e);h=l.apply(e,q)}finally{!0!==h&&(b.preventdefault? b.preventdefault():b.returnvalue=!1)}!1===c.get(k+"bubble")&&(b.cancelbubble=!0,b.stoppropagation&&b.stoppropagation())}})})}};a.d.foreach={eb:function(b){return function(){var d=b(),c=a.a.xa(d);if(!c||"number"==typeof c.length)return{foreach:d,templateengine:a.o.oa};a.a.c(d);return{foreach:c.data,as:c.as,includedestroyed:c.includedestroyed,afteradd:c.afteradd,beforeremove:c.beforeremove,afterrender:c.afterrender,beforemove:c.beforemove,aftermove:c.aftermove,templateengine:a.o.oa}}},init:function(b, d){return a.d.template.init(b,a.d.foreach.eb(d))},update:function(b,d,c,e,g){return a.d.template.update(b,a.d.foreach.eb(d),c,e,g)}};a.h.ha.foreach=!1;a.f.q.foreach=!0;a.d.hasfocus={init:function(b,d,c){function e(e){b.__ko_hasfocusupdating=!0;var f=b.ownerdocument;if("activeelement"in f){var g;try{g=f.activeelement}catch(h){g=f.body}e=g===b}f=d();a.h.pa(f,c,"hasfocus",e,!0);b.__ko_hasfocuslastvalue=e;b.__ko_hasfocusupdating=!1}var g=e.bind(null,!0),h=e.bind(null,!1);a.a.n(b,"focus",g);a.a.n(b,"focusin", g);a.a.n(b,"blur",h);a.a.n(b,"focusout",h)},update:function(b,d){var c=!!a.a.c(d());b.__ko_hasfocusupdating||b.__ko_hasfocuslastvalue===c||(c?b.focus():b.blur(),a.k.b(a.a.oa,null,[b,c?"focusin":"focusout"]))}};a.h.v.hasfocus=!0;a.d.hasfocus=a.d.hasfocus;a.h.v.hasfocus=!0;a.d.html={init:function(){return{controlsdescendantbindings:!0}},update:function(b,d){a.a.$a(b,d())}};i("if");i("ifnot",!1,!0);i("with",!0,!1,function(a,d){return a.createchildcontext(d)});var k={};a.d.options={init:function(b){if("select"!== a.a.t(b))throw error("options binding applies only to select elements");for(;0a.a.l)var h=a.a.e.f(),k=a.a.e.f(),f=function(b){var c=this.activeelement;(c=c&&a.a.e.get(c,k))&&c(b)},m=function(b,c){var d=b.ownerdocument;a.a.e.get(d,h)||(a.a.e.set(d,h,!0),a.a.n(d,"selectionchange", f));a.a.e.set(b,k,c)};a.d.textinput={init:function(b,c,f){function k(c,d){a.a.n(b,c,d)}function h(){var d=a.a.c(c());if(null===d||d===p)d="";v!==p&&d===v?settimeout(h,4):b.value!==d&&(s=d,b.value=d)}function u(){y||(v=b.value,y=settimeout(r,4))}function r(){cleartimeout(y);v=y=p;var d=b.value;s!==d&&(s=d,a.h.pa(c(),f,"textinput",d))}var s=b.value,y,v;10>a.a.l?(k("propertychange",function(a){"value"===a.propertyname&&r()}),8==a.a.l&&(k("keyup",r),k("keydown",r)),8<=a.a.l&&(m(b,r),k("dragend",u))): (k("input",r),5>e&&"textarea"===a.a.t(b)?(k("keydown",u),k("paste",u),k("cut",u)):11>d?k("keydown",u):4>g&&(k("domautocomplete",r),k("dragdrop",r),k("drop",r)));k("change",r);a.s(h,null,{o:b})}};a.h.v.textinput=!0;a.d.textinput={preprocess:function(a,b,c){c("textinput",a)}}})();a.d.uniquename={init:function(b,d){if(d()){var c="ko_unique_"+ ++a.d.uniquename.zb;a.a.mb(b,c)}}};a.d.uniquename.zb=0;a.d.value={after:["options","foreach"],init:function(b,d,c){if("input"!=b.tagname.tolowercase()||"checkbox"!= b.type&&"radio"!=b.type){var e=["change"],g=c.get("valueupdate"),h=!1,k=null;g&&("string"==typeof g&&(g=[g]),a.a.ga(e,g),e=a.a.rb(e));var f=function(){k=null;h=!1;var e=d(),f=a.i.q(b);a.h.pa(e,c,"value",f)};!a.a.l||"input"!=b.tagname.tolowercase()||"text"!=b.type||"off"==b.autocomplete||b.form&&"off"==b.form.autocomplete||-1!=a.a.m(e,"propertychange")||(a.a.n(b,"propertychange",function(){h=!0}),a.a.n(b,"focus",function(){h=!1}),a.a.n(b,"blur",function(){h&&f()}));a.a.u(e,function(c){var d=f;a.a.vc(c, "after")&&(d=function(){k=a.i.q(b);settimeout(f,0)},c=c.substring(5));a.a.n(b,c,d)});var m=function(){var e=a.a.c(d()),f=a.i.q(b);if(null!==k&&e===k)settimeout(m,0);else if(e!==f)if("select"===a.a.t(b)){var g=c.get("valueallowunset"),f=function(){a.i.ca(b,e,g)};f();g||e===a.i.q(b)?settimeout(f,0):a.k.b(a.a.oa,null,[b,"change"])}else a.i.ca(b,e)};a.s(m,null,{o:b})}else a.ra(b,{checkedvalue:d})},update:function(){}};a.h.v.value=!0;a.d.visible={update:function(b,d){var c=a.a.c(d()),e="none"!=b.style.display; c&&!e?b.style.display="":!c&&e&&(b.style.display="none")}};(function(b){a.d[b]={init:function(d,c,e,g,h){return a.d.event.init.call(this,d,function(){var a={};a[b]=c();return a},e,g,h)}}})("click");a.h=function(){};a.h.prototype.rendertemplatesource=function(){throw error("override rendertemplatesource");};a.h.prototype.createjavascriptevaluatorblock=function(){throw error("override createjavascriptevaluatorblock");};a.h.prototype.maketemplatesource=function(b,d){if("string"==typeof b){d=d||v;var c= d.getelementbyid(b);if(!c)throw error("cannot find template with id "+b);return new a.r.l(c)}if(1==b.nodetype||8==b.nodetype)return new a.r.fa(b);throw error("unknown template type: "+b);};a.h.prototype.rendertemplate=function(a,d,c,e){a=this.maketemplatesource(a,e);return this.rendertemplatesource(a,d,c)};a.h.prototype.istemplaterewritten=function(a,d){return!1===this.allowtemplaterewriting?!0:this.maketemplatesource(a,d).data("isrewritten")};a.h.prototype.rewritetemplate=function(a,d,c){a=this.maketemplatesource(a, c);d=d(a.text());a.text(d);a.data("isrewritten",!0)};a.b("templateengine",a.h);a.fb=function(){function b(b,c,d,k){b=a.h.wa(b);for(var f=a.h.ha,m=0;ma.a.l?0:b.nodes)?b.nodes():null;if(d)return a.a.s(d.clonenode(!0).childnodes);b=b.text();return a.a.ba(b)};a.o.oa=new a.o;a.ab(a.o.oa);a.b("nativetemplateengine",a.o);(function(){a.sa=function(){var a=this.kc= function(){if(!w||!w.tmpl)return 0;try{if(0<=w.tmpl.tag.tmpl.open.tostring().indexof("__"))return 2}catch(a){}return 1}();this.rendertemplatesource=function(b,e,g){g=g||{};if(2>a)throw error("your version of jquery.tmpl is too old. please upgrade to jquery.tmpl 1.0.0pre or later.");var h=b.data("precompiled");h||(h=b.text()||"",h=w.template(null,"{{ko_with $item.kobindingcontext}}"+h+"{{/ko_with}}"),b.data("precompiled",h));b=[e.$data];e=w.extend({kobindingcontext:e},g.templateoptions);e=w.tmpl(h, b,e);e.appendto(v.createelement("div"));w.fragments={};return e};this.createjavascriptevaluatorblock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addtemplate=function(a,b){v.write("