A web browser extension that emulates Content Delivery Networks to improve your online privacy. It intercepts traffic, finds supported resources locally, and injects them into the environment. https://www.localcdn.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
66 KiB

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