(function(){function n(n){return function(){return n}}(function(t){var u=this||eval("this"),r=u.document,e=u.navigator,i=u.jQuery,f=u.JSON;(function(n){"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?n(module.exports||exports):"function"==typeof define&&define.amd?define(["exports"],n):n(u.ko={})})(function(o){function c(n,t,i,r){s.d[n]={init:function(n){return s.a.f.set(n,a,{}),{controlsDescendantBindings:!0}},update:function(n,u,f,e,o){f=s.a.f.get(n,a),u=s.a.c(u()),e=!i!=!u;var h=!f.fb;(h||t||e!==f.vb)&&(h&&(f.fb=s.a.Oa(s.e.childNodes(n),!0)),e?(h||s.e.P(n,s.a.Oa(f.fb)),s.Ja(r?r(o,u):o,n)):s.e.ba(n),f.vb=e)}},s.g.S[n]=!1,s.e.L[n]=!0}function v(n,t,i){i&&t!==s.h.n(n)&&s.h.W(n,t),t!==s.h.n(n)&&s.q.I(s.a.Ga,null,[n,"change"])}var s="undefined"!=typeof o?o:{},y,h,l,a;s.b=function(n,t){for(var i=n.split("."),r=s,u=0;u<i.length-1;u++)r=r[i[u]];r[i[i.length-1]]=t},s.r=function(n,t,i){n[t]=i},s.version="2.3.0",s.b("version",s.version),s.a=function(){function o(n,t){for(var i in n)n.hasOwnProperty(i)&&t(i,n[i])}function h(n,t){if("input"!==s.a.u(n)||!n.type||"click"!=t.toLowerCase())return!1;var i=n.type;return"checkbox"==i||"radio"==i}var c={},l={},a,n;return c[e&&/Firefox\/2/i.test(e.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],c.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),o(c,function(n,t){if(t.length)for(var i=0,r=t.length;i<r;i++)l[t[i]]=n}),a={propertychange:!0},n=r&&function(){for(var n=3,i=r.createElement("div"),u=i.getElementsByTagName("i");i.innerHTML="<!--[if gt IE "+ ++n+"]><i></i><![endif]-->",u[0];);return 4<n?n:t}(),{Ta:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],p:function(n,t){for(var i=0,r=n.length;i<r;i++)t(n[i])},k:function(n,t){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(n,t);for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},La:function(n,t,i){for(var r=0,u=n.length;r<u;r++)if(t.call(i,n[r]))return n[r];return null},ka:function(n,t){var i=s.a.k(n,t);0<=i&&n.splice(i,1)},Ma:function(n){n=n||[];for(var i=[],t=0,r=n.length;t<r;t++)0>s.a.k(i,n[t])&&i.push(n[t]);return i},Z:function(n,t){n=n||[];for(var r=[],i=0,u=n.length;i<u;i++)r.push(t(n[i]));return r},Y:function(n,t){n=n||[];for(var r=[],i=0,u=n.length;i<u;i++)t(n[i])&&r.push(n[i]);return r},R:function(n,t){if(t instanceof Array)n.push.apply(n,t);else for(var i=0,r=t.length;i<r;i++)n.push(t[i]);return n},ja:function(n,t,i){var r=n.indexOf?n.indexOf(t):s.a.k(n,t);0>r?i&&n.push(t):i||n.splice(r,1)},extend:function(n,t){if(t)for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n},w:o,oa:function(n){for(;n.firstChild;)s.removeNode(n.firstChild)},Mb:function(n){n=s.a.N(n);for(var i=r.createElement("div"),t=0,u=n.length;t<u;t++)i.appendChild(s.H(n[t]));return i},Oa:function(n,t){for(var r,i=0,f=n.length,u=[];i<f;i++)r=n[i].cloneNode(!0),u.push(t?s.H(r):r);return u},P:function(n,t){if(s.a.oa(n),t)for(var i=0,r=t.length;i<r;i++)n.appendChild(t[i])},eb:function(n,t){var r=n.nodeType?[n]:n;if(0<r.length){for(var f=r[0],e=f.parentNode,i=0,u=t.length;i<u;i++)e.insertBefore(t[i],f);for(i=0,u=r.length;i<u;i++)s.removeNode(r[i])}},hb:function(t,i){7>n?t.setAttribute("selected",i):t.selected=i},F:function(n){return null===n||n===t?"":n.trim?n.trim():n.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Wb:function(n,t){for(var r,u=[],f=(n||"").split(t),i=0,e=f.length;i<e;i++)r=s.a.F(f[i]),""!==r&&u.push(r);return u},Tb:function(n,t){return n=n||"",t.length>n.length?!1:n.substring(0,t.length)===t},yb:function(n,t){if(t.compareDocumentPosition)return 16==(t.compareDocumentPosition(n)&16);for(;null!=n;){if(n==t)return!0;n=n.parentNode}return!1},aa:function(n){return s.a.yb(n,n.ownerDocument)},pb:function(n){return!!s.a.La(n,s.a.aa)},u:function(n){return n&&n.tagName&&n.tagName.toLowerCase()},o:function(t,r,u){var o=n&&a[r],f,e,c;if(o||"undefined"==typeof i)if(o||"function"!=typeof t.addEventListener)if("undefined"!=typeof t.attachEvent)f=function(n){u.call(t,n)},e="on"+r,t.attachEvent(e,f),s.a.C.ia(t,function(){t.detachEvent(e,f)});else throw Error("Browser doesn't support addEventListener or attachEvent");else t.addEventListener(r,u,!1);else h(t,r)&&(c=u,u=function(n,t){var i=this.checked;t&&(this.checked=!0!==t.sb),c.call(this,n),this.checked=i}),i(t).bind(r,u)},Ga:function(n,t){if(!n||!n.nodeType)throw Error("element must be a DOM node when calling triggerEvent");if("undefined"!=typeof i){var f=[];h(n,t)&&f.push({sb:n.checked}),i(n).trigger(t,f)}else if("function"==typeof r.createEvent)if("function"==typeof n.dispatchEvent)f=r.createEvent(l[t]||"HTMLEvents"),f.initEvent(t,!0,!0,u,0,0,0,0,0,!1,!1,!1,!1,0,n),n.dispatchEvent(f);else throw Error("The supplied element doesn't support dispatchEvent");else if("undefined"!=typeof n.fireEvent)h(n,t)&&(n.checked=!0!==n.checked),n.fireEvent("on"+t);else throw Error("Browser doesn't support triggering events");},c:function(n){return s.T(n)?n():n},ya:function(n){return s.T(n)?n.t():n},ga:function(n,t,i){if(t){var r=/\S+/g,u=n.className.match(r)||[];s.a.p(t.match(r),function(n){s.a.ja(u,n,i)}),n.className=u.join(" ")}},ib:function(n,i){var u=s.a.c(i),f;(null===u||u===t)&&(u=""),f=s.e.firstChild(n),!f||3!=f.nodeType||s.e.nextSibling(f)?s.e.P(n,[r.createTextNode(u)]):f.data=u,s.a.Bb(n)},gb:function(t,i){if(t.name=i,7>=n)try{t.mergeAttributes(r.createElement("<input name='"+t.name+"'/>"),!1)}catch(u){}},Bb:function(t){9<=n&&(t=1==t.nodeType?t:t.parentNode,t.style&&(t.style.zoom=t.style.zoom))},zb:function(t){if(n){var i=t.style.width;t.style.width=0,t.style.width=i}},Qb:function(n,t){n=s.a.c(n),t=s.a.c(t);for(var r=[],i=n;i<=t;i++)r.push(i);return r},N:function(n){for(var i=[],t=0,r=n.length;t<r;t++)i.push(n[t]);return i},Ub:6===n,Vb:7===n,ca:n,Ua:function(n,t){for(var r=s.a.N(n.getElementsByTagName("input")).concat(s.a.N(n.getElementsByTagName("textarea"))),f="string"==typeof t?function(n){return n.name===t}:function(n){return t.test(n.name)},u=[],i=r.length-1;0<=i;i--)f(r[i])&&u.push(r[i]);return u},Nb:function(n){return"string"==typeof n&&(n=s.a.F(n))?f&&f.parse?f.parse(n):new Function("return "+n)():null},Ca:function(n,t,i){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(s.a.c(n),t,i)},Ob:function(n,t,i){var v,e,h,f,u,c;i=i||{};var l=i.params||{},a=i.includeFields||this.Ta,v=n;if("object"==typeof n&&"form"===s.a.u(n))for(v=n.action,e=a.length-1;0<=e;e--)for(h=s.a.Ua(n,a[e]),f=h.length-1;0<=f;f--)l[h[f].name]=h[f].value;t=s.a.c(t),u=r.createElement("form"),u.style.display="none",u.action=v,u.method="post";for(c in t)n=r.createElement("input"),n.name=c,n.value=s.a.Ca(s.a.c(t[c])),u.appendChild(n);o(l,function(n,t){var i=r.createElement("input");i.name=n,i.value=t,u.appendChild(i)}),r.body.appendChild(u),i.submitter?i.submitter(u):u.submit(),setTimeout(function(){u.parentNode.removeChild(u)},0)}}}(),s.b("utils",s.a),s.b("utils.arrayForEach",s.a.p),s.b("utils.arrayFirst",s.a.La),s.b("utils.arrayFilter",s.a.Y),s.b("utils.arrayGetDistinctValues",s.a.Ma),s.b("utils.arrayIndexOf",s.a.k),s.b("utils.arrayMap",s.a.Z),s.b("utils.arrayPushAll",s.a.R),s.b("utils.arrayRemoveItem",s.a.ka),s.b("utils.extend",s.a.extend),s.b("utils.fieldsIncludedWithJsonPost",s.a.Ta),s.b("utils.getFormFields",s.a.Ua),s.b("utils.peekObservable",s.a.ya),s.b("utils.postJson",s.a.Ob),s.b("utils.parseJson",s.a.Nb),s.b("utils.registerEventHandler",s.a.o),s.b("utils.stringifyJson",s.a.Ca),s.b("utils.range",s.a.Qb),s.b("utils.toggleDomNodeCssClass",s.a.ga),s.b("utils.triggerEvent",s.a.Ga),s.b("utils.unwrapObservable",s.a.c),s.b("utils.objectForEach",s.a.w),s.b("utils.addOrRemoveItem",s.a.ja),s.b("unwrap",s.a.c),Function.prototype.bind||(Function.prototype.bind=function(n){var i=this,t=Array.prototype.slice.call(arguments);return n=t.shift(),function(){return i.apply(n,t.concat(Array.prototype.slice.call(arguments)))}}),s.a.f=new function(){var r=0,n="__ko__"+ +new Date,i={};return{get:function(n,i){var r=s.a.f.pa(n,!1);return r===t?t:r[i]},set:function(n,i,r){(r!==t||s.a.f.pa(n,!1)!==t)&&(s.a.f.pa(n,!0)[i]=r)},pa:function(u,f){var e=u[n];if(!e||"null"===e||!i[e]){if(!f)return t;e=u[n]="ko"+r++,i[e]={}}return i[e]},clear:function(t){var r=t[n];return r?(delete i[r],t[n]=null,!0):!1}}},s.b("utils.domData",s.a.f),s.b("utils.domData.clear",s.a.f.clear),s.a.C=new function(){function n(n,i){var r=s.a.f.get(n,u);return r===t&&i&&(r=[],s.a.f.set(n,u,r)),r}function r(t){var u=n(t,!1),e;if(u)for(u=u.slice(0),e=0;e<u.length;e++)u[e](t);if(s.a.f.clear(t),"function"==typeof i&&"function"==typeof i.cleanData&&i.cleanData([t]),f[t.nodeType])for(u=t.firstChild;t=u;)u=t.nextSibling,8===t.nodeType&&r(t)}var u="__ko_domNodeDisposal__"+ +new Date,e={1:!0,8:!0,9:!0},f={1:!0,9:!0};return{ia:function(t,i){if("function"!=typeof i)throw Error("Callback must be a function");n(t,!0).push(i)},cb:function(i,r){var f=n(i,!1);f&&(s.a.ka(f,r),0==f.length&&s.a.f.set(i,u,t))},H:function(n){var t,i,u;if(e[n.nodeType]&&(r(n),f[n.nodeType]))for(t=[],s.a.R(t,n.getElementsByTagName("*")),i=0,u=t.length;i<u;i++)r(t[i]);return n},removeNode:function(n){s.H(n),n.parentNode&&n.parentNode.removeChild(n)}}},s.H=s.a.C.H,s.removeNode=s.a.C.removeNode,s.b("cleanNode",s.H),s.b("removeNode",s.removeNode),s.b("utils.domNodeDisposal",s.a.C),s.b("utils.domNodeDisposal.addDisposeCallback",s.a.C.ia),s.b("utils.domNodeDisposal.removeDisposeCallback",s.a.C.cb),function(){s.a.xa=function(n){var t,f;if("undefined"!=typeof i){if(i.parseHTML)t=i.parseHTML(n)||[];else if((t=i.clean([n]))&&t[0]){for(n=t[0];n.parentNode&&11!==n.parentNode.nodeType;)n=n.parentNode;n.parentNode&&n.parentNode.removeChild(n)}}else{for(f=s.a.F(n).toLowerCase(),t=r.createElement("div"),f=f.match(/^<(thead|tbody|tfoot)/)&&[1,"<table>","</table>"]||!f.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!f.indexOf("<td")||!f.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""],n="ignored<div>"+f[1]+n+f[2]+"</div>","function"==typeof u.innerShiv?t.appendChild(u.innerShiv(n)):t.innerHTML=n;f[0]--;)t=t.lastChild;t=s.a.N(t.lastChild.childNodes)}return t},s.a.fa=function(n,r){if(s.a.oa(n),r=s.a.c(r),null!==r&&r!==t)if("string"!=typeof r&&(r=r.toString()),"undefined"!=typeof i)i(n).html(r);else for(var f=s.a.xa(r),u=0;u<f.length;u++)n.appendChild(f[u])}}(),s.b("utils.parseHtmlFragment",s.a.xa),s.b("utils.setHtml",s.a.fa),s.s=function(){function i(n,t){var r;if(n)if(8==n.nodeType)r=s.s.$a(n.nodeValue),null!=r&&t.push({xb:n,Kb:r});else if(1==n.nodeType)for(var r=0,u=n.childNodes,f=u.length;r<f;r++)i(u[r],t)}var n={};return{va:function(t){if("function"!=typeof t)throw Error("You can only pass a function to ko.memoization.memoize()");var i=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return n[i]=t,"<!--[ko_memo:"+i+"]-->"},mb:function(i,r){var u=n[i];if(u===t)throw Error("Couldn't find any memo with ID "+i+". Perhaps it's already been unmemoized.");try{return u.apply(null,r||[]),!0}finally{delete n[i]}},nb:function(n,t){var f=[],u,o,r,e;for(i(n,f),u=0,o=f.length;u<o;u++)r=f[u].xb,e=[r],t&&s.a.R(e,t),s.s.mb(f[u].Kb,e),r.nodeValue="",r.parentNode&&r.parentNode.removeChild(r)},$a:function(n){return(n=n.match(/^\[ko_memo\:(.*?)\]$/))?n[1]:null}}}(),s.b("memoization",s.s),s.b("memoization.memoize",s.s.va),s.b("memoization.unmemoize",s.s.mb),s.b("memoization.parseMemoText",s.s.$a),s.b("memoization.unmemoizeDomNodeAndDescendants",s.s.nb),s.Sa={throttle:function(n,t){n.throttleEvaluation=t;var i=null;return s.j({read:n,write:function(r){clearTimeout(i),i=setTimeout(function(){n(r)},t)}})},notify:function(t,i){return t.equalityComparer="always"==i?n(!1):s.m.fn.equalityComparer,t}},s.b("extenders",s.Sa),s.kb=function(n,t,i){this.target=n,this.la=t,this.wb=i,s.r(this,"dispose",this.B)},s.kb.prototype.B=function(){this.Hb=!0,this.wb()},s.V=function(){this.G={},s.a.extend(this,s.V.fn),s.r(this,"subscribe",this.Da),s.r(this,"extend",this.extend),s.r(this,"getSubscriptionsCount",this.Db)},s.V.fn={Da:function(n,t,i){i=i||"change";var r=new s.kb(this,t?n.bind(t):n,function(){s.a.ka(this.G[i],r)}.bind(this));return this.G[i]||(this.G[i]=[]),this.G[i].push(r),r},notifySubscribers:function(n,t){t=t||"change",this.G[t]&&s.q.I(function(){s.a.p(this.G[t].slice(0),function(t){t&&!0!==t.Hb&&t.la(n)})},this)},Db:function(){var n=0;return s.a.w(this.G,function(t,i){n+=i.length}),n},extend:function(n){var t=this;return n&&s.a.w(n,function(n,i){var r=s.Sa[n];"function"==typeof r&&(t=r(t,i))}),t}},s.Wa=function(n){return null!=n&&"function"==typeof n.Da&&"function"==typeof n.notifySubscribers},s.b("subscribable",s.V),s.b("isSubscribable",s.Wa),s.q=function(){var n=[];return{rb:function(t){n.push({la:t,Ra:[]})},end:function(){n.pop()},bb:function(t){if(!s.Wa(t))throw Error("Only subscribable things can act as dependencies");if(0<n.length){var i=n[n.length-1];!i||0<=s.a.k(i.Ra,t)||(i.Ra.push(t),i.la(t))}},I:function(t,i,r){try{return n.push(null),t.apply(i,r||[])}finally{n.pop()}}}}(),y={undefined:!0,boolean:!0,number:!0,string:!0},s.m=function(n){function t(){return 0<arguments.length?(t.equalityComparer&&t.equalityComparer(i,arguments[0])||(t.K(),i=arguments[0],t.J()),this):(s.q.bb(t),i)}var i=n;return s.V.call(t),t.t=function(){return i},t.J=function(){t.notifySubscribers(i)},t.K=function(){t.notifySubscribers(i,"beforeChange")},s.a.extend(t,s.m.fn),s.r(t,"peek",t.t),s.r(t,"valueHasMutated",t.J),s.r(t,"valueWillMutate",t.K),t},s.m.fn={equalityComparer:function(n,t){return null===n||typeof n in y?n===t:!1}},h=s.m.Pb="__ko_proto__",s.m.fn[h]=s.m,s.qa=function(n,i){return null===n||n===t||n[h]===t?!1:n[h]===i?!0:s.qa(n[h],i)},s.T=function(n){return s.qa(n,s.m)},s.Xa=function(n){return"function"==typeof n&&n[h]===s.m||"function"==typeof n&&n[h]===s.j&&n.Eb?!0:!1},s.b("observable",s.m),s.b("isObservable",s.T),s.b("isWriteableObservable",s.Xa),s.U=function(n){if(n=n||[],"object"!=typeof n||!("length"in n))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return n=s.m(n),s.a.extend(n,s.U.fn),n},s.U.fn={remove:function(n){for(var u,r=this.t(),i=[],f="function"==typeof n?n:function(t){return t===n},t=0;t<r.length;t++)u=r[t],f(u)&&(0===i.length&&this.K(),i.push(u),r.splice(t,1),t--);return i.length&&this.J(),i},removeAll:function(n){if(n===t){var i=this.t(),r=i.slice(0);return this.K(),i.splice(0,i.length),this.J(),r}return n?this.remove(function(t){return 0<=s.a.k(n,t)}):[]},destroy:function(n){var i=this.t(),r="function"==typeof n?n:function(t){return t===n},t;for(this.K(),t=i.length-1;0<=t;t--)r(i[t])&&(i[t]._destroy=!0);this.J()},destroyAll:function(i){return i===t?this.destroy(n(!0)):i?this.destroy(function(n){return 0<=s.a.k(i,n)}):[]},indexOf:function(n){var t=this();return s.a.k(t,n)},replace:function(n,t){var i=this.indexOf(n);0<=i&&(this.K(),this.t()[i]=t,this.J())}},s.a.p("pop push reverse shift sort splice unshift".split(" "),function(n){s.U.fn[n]=function(){var t=this.t();return this.K(),t=t[n].apply(t,arguments),this.J(),t}}),s.a.p(["slice"],function(n){s.U.fn[n]=function(){var t=this();return t[n].apply(t,arguments)}}),s.b("observableArray",s.U),s.j=function(i,r,u){function k(){s.a.p(e,function(n){n.B()}),e=[]}function nt(){var n=f.throttleEvaluation;n&&0<=n?(clearTimeout(w),w=setTimeout(a,n)):a()}function a(){var n,u,i;if(!y)if(l&&p())h();else{y=!0;try{for(n=s.a.Z(e,function(n){return n.target}),s.q.rb(function(i){var r;0<=(r=s.a.k(n,i))?n[r]=t:e.push(i.Da(nt))}),u=o.call(r),i=n.length-1;0<=i;i--)n[i]&&e.splice(i,1)[0].B();l=!0,f.notifySubscribers(c,"beforeChange"),c=u,f.notifySubscribers(c)}finally{s.q.end(),y=!1}e.length||h()}}function f(){if(0<arguments.length){if("function"==typeof b)b.apply(r,arguments);else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}return l||a(),s.q.bb(f),c}function d(){return!l||0<e.length}var c,l=!1,y=!1,o=i,g,p;if(o&&"object"==typeof o?(u=o,o=u.read):(u=u||{},o||(o=u.read)),"function"!=typeof o)throw Error("Pass a function that returns the value of the ko.computed");var b=u.write,v=u.disposeWhenNodeIsRemoved||u.$||null,p=u.disposeWhen||u.Qa||n(!1),h=k,e=[],w=null;return r||(r=u.owner),f.t=function(){return l||a(),c},f.Cb=function(){return e.length},f.Eb="function"==typeof u.write,f.B=function(){h()},f.ta=d,s.V.call(f),s.a.extend(f,s.j.fn),s.r(f,"peek",f.t),s.r(f,"dispose",f.B),s.r(f,"isActive",f.ta),s.r(f,"getDependenciesCount",f.Cb),!0!==u.deferEvaluation&&a(),v&&d()&&(h=function(){s.a.C.cb(v,h),k()},s.a.C.ia(v,h),g=p,p=function(){return!s.a.aa(v)||g()}),f},s.Gb=function(n){return s.qa(n,s.j)},o=s.m.Pb,s.j[o]=s.m,s.j.fn={},s.j.fn[o]=s.j,s.b("dependentObservable",s.j),s.b("computed",s.j),s.b("isComputed",s.Gb),function(){function n(u,f,e){if(e=e||new i,u=f(u),"object"!=typeof u||null===u||u===t||u instanceof Date||u instanceof String||u instanceof Number||u instanceof Boolean)return u;var o=u instanceof Array?[]:{};return e.save(u,o),r(u,function(i){var r=f(u[i]),s;switch(typeof r){case"boolean":case"number":case"string":case"function":o[i]=r;break;case"object":case"undefined":s=e.get(r),o[i]=s!==t?s:n(r,f,e)}}),o}function r(n,t){if(n instanceof Array){for(var i=0;i<n.length;i++)t(i);"function"==typeof n.toJSON&&t("toJSON")}else for(i in n)t(i)}function i(){this.keys=[],this.Ha=[]}s.lb=function(t){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return n(t,function(n){for(var t=0;s.T(n)&&10>t;t++)n=n();return n})},s.toJSON=function(n,t,i){return n=s.lb(n),s.a.Ca(n,t,i)},i.prototype={save:function(n,t){var i=s.a.k(this.keys,n);0<=i?this.Ha[i]=t:(this.keys.push(n),this.Ha.push(t))},get:function(n){return n=s.a.k(this.keys,n),0<=n?this.Ha[n]:t}}}(),s.b("toJS",s.lb),s.b("toJSON",s.toJSON),function(){s.h={n:function(n){switch(s.a.u(n)){case"option":return!0===n.__ko__hasDomDataOptionValue__?s.a.f.get(n,s.d.options.wa):7>=s.a.ca?n.getAttributeNode("value")&&n.getAttributeNode("value").specified?n.value:n.text:n.value;case"select":return 0<=n.selectedIndex?s.h.n(n.options[n.selectedIndex]):t;default:return n.value}},W:function(n,i){switch(s.a.u(n)){case"option":switch(typeof i){case"string":s.a.f.set(n,s.d.options.wa,t),"__ko__hasDomDataOptionValue__"in n&&delete n.__ko__hasDomDataOptionValue__,n.value=i;break;default:s.a.f.set(n,s.d.options.wa,i),n.__ko__hasDomDataOptionValue__=!0,n.value="number"==typeof i?i:""}break;case"select":""===i&&(i=t),(null===i||i===t)&&(n.selectedIndex=-1);for(var r=n.options.length-1;0<=r;r--)if(s.h.n(n.options[r])==i){n.selectedIndex=r;break}1<n.size||-1!==n.selectedIndex||(n.selectedIndex=0);break;default:(null===i||i===t)&&(i=""),n.value=i}}}}(),s.b("selectExtensions",s.h),s.b("selectExtensions.readValue",s.h.n),s.b("selectExtensions.writeValue",s.h.W),s.g=function(){function n(n,i){for(var r=null;n!=r;)r=n,n=n.replace(t,function(n,t){return i[t]});return n}var t=/\@ko_token_(\d+)\@/g,i=["true","false","null","undefined"],r=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i;return{S:[],da:function(t){var i=s.a.F(t),f,e,r,u;if(3>i.length)return[];for("{"===i.charAt(0)&&(i=i.substring(1,i.length-1)),t=[],f=null,r=0;r<i.length;r++)if(u=i.charAt(r),null===f)switch(u){case'"':case"'":case"/":f=r,e=u}else if(u==e&&"\\"!==i.charAt(r-1)){u=i.substring(f,r+1),t.push(u);var c="@ko_token_"+(t.length-1)+"@",i=i.substring(0,f)+c+i.substring(r+1),r=r-(u.length-c.length),f=null}e=f=null;for(var o=0,h=null,r=0;r<i.length;r++){if(u=i.charAt(r),null===f)switch(u){case"{":f=r,h=u,e="}";break;case"(":f=r,h=u,e=")";break;case"[":f=r,h=u,e="]"}u===h?o++:u===e&&(o--,0===o&&(u=i.substring(f,r+1),t.push(u),c="@ko_token_"+(t.length-1)+"@",i=i.substring(0,f)+c+i.substring(r+1),r-=u.length-c.length,f=null))}for(e=[],i=i.split(","),f=0,r=i.length;f<r;f++)o=i[f],h=o.indexOf(":"),0<h&&h<o.length-1?(u=o.substring(h+1),e.push({key:n(o.substring(0,h),t),value:n(u,t)})):e.push({unknown:n(o,t)});return e},ea:function(n){var e="string"==typeof n?s.g.da(n):n,f=[],t,h,o,u;for(n=[],h=0;t=e[h];h++)if(0<f.length&&f.push(","),t.key){n:{o=t.key,u=s.a.F(o);switch(u.length&&u.charAt(0)){case"'":case'"':break n;default:o="'"+u+"'"}}t=t.value,f.push(o),f.push(":"),f.push(t),t=s.a.F(t),0<=s.a.k(i,s.a.F(t).toLowerCase())?t=!1:(u=t.match(r),t=null===u?!1:u[1]?"Object("+u[1]+")"+u[2]:t),t&&(0<n.length&&n.push(", "),n.push(o+" : function(__ko_value) { "+t+" = __ko_value; }"))}else t.unknown&&f.push(t.unknown);return e=f.join(""),0<n.length&&(e=e+", '_ko_property_writers' : { "+n.join("")+" } "),e},Jb:function(n,t){for(var i=0;i<n.length;i++)if(s.a.F(n[i].key)==t)return!0;return!1},ha:function(n,t,i,r,u){n&&s.T(n)?!s.Xa(n)||u&&n.t()===r||n(r):(n=t()._ko_property_writers)&&n[i]&&n[i](r)}}}(),s.b("expressionRewriting",s.g),s.b("expressionRewriting.bindingRewriteValidators",s.g.S),s.b("expressionRewriting.parseObjectLiteral",s.g.da),s.b("expressionRewriting.preProcessBindings",s.g.ea),s.b("jsonExpressionRewriting",s.g),s.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",s.g.ea),function(){function n(n){return 8==n.nodeType&&(i?n.text:n.nodeValue).match(e)}function t(n){return 8==n.nodeType&&(i?n.text:n.nodeValue).match(o)}function u(i,r){for(var u=i,f=1,e=[];u=u.nextSibling;){if(t(u)&&(f--,0===f))return e;e.push(u),n(u)&&f++}if(!r)throw Error("Cannot find closing comment tag to match: "+i.nodeValue);return null}function f(n,t){var i=u(n,t);return i?0<i.length?i[i.length-1].nextSibling:n.nextSibling:null}var i=r&&"<!--test-->"===r.createComment("test").text,e=i?/^\x3c!--\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*--\x3e$/:/^\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*$/,o=i?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,h={ul:!0,ol:!0};s.e={L:{},childNodes:function(t){return n(t)?u(t):t.childNodes},ba:function(t){if(n(t)){t=s.e.childNodes(t);for(var i=0,r=t.length;i<r;i++)s.removeNode(t[i])}else s.a.oa(t)},P:function(t,i){if(n(t)){s.e.ba(t);for(var u=t.nextSibling,r=0,f=i.length;r<f;r++)u.parentNode.insertBefore(i[r],u)}else s.a.P(t,i)},ab:function(t,i){n(t)?t.parentNode.insertBefore(i,t.nextSibling):t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i)},Va:function(t,i,r){r?n(t)?t.parentNode.insertBefore(i,r.nextSibling):r.nextSibling?t.insertBefore(i,r.nextSibling):t.appendChild(i):s.e.ab(t,i)},firstChild:function(i){return n(i)?!i.nextSibling||t(i.nextSibling)?null:i.nextSibling:i.firstChild},nextSibling:function(i){return n(i)&&(i=f(i)),i.nextSibling&&t(i.nextSibling)?null:i.nextSibling},ob:function(t){return(t=n(t))?t[1]:null},Za:function(i){var o,r,u,e;if(h[s.a.u(i)]&&(o=i.firstChild,o))do if(1===o.nodeType){if(r=o.firstChild,u=null,r)do u?u.push(r):n(r)?(e=f(r,!0),e?r=e:u=[r]):t(r)&&(u=[r]);while(r=r.nextSibling);if(r=u)for(u=o.nextSibling,e=0;e<r.length;e++)u?i.insertBefore(r[e],u):i.appendChild(r[e])}while(o=o.nextSibling)}}}(),s.b("virtualElements",s.e),s.b("virtualElements.allowedBindings",s.e.L),s.b("virtualElements.emptyNode",s.e.ba),s.b("virtualElements.insertAfter",s.e.Va),s.b("virtualElements.prepend",s.e.ab),s.b("virtualElements.setDomNodeChildren",s.e.P),function(){s.M=function(){this.Na={}},s.a.extend(s.M.prototype,{nodeHasBindings:function(n){switch(n.nodeType){case 1:return null!=n.getAttribute("data-bind");case 8:return null!=s.e.ob(n);default:return!1}},getBindings:function(n,t){var i=this.getBindingsString(n,t);return i?this.parseBindingsString(i,t,n):null},getBindingsString:function(n){switch(n.nodeType){case 1:return n.getAttribute("data-bind");case 8:return s.e.ob(n);default:return null}},parseBindingsString:function(n,t,i){var r,u,f,e;try{return(r=this.Na[n])||(u=this.Na,e="with($context){with($data||{}){return{"+s.g.ea(n)+"}}}",f=new Function("$context","$element",e),r=u[n]=f),r(t,i)}catch(o){throw o.message="Unable to parse bindings.\nBindings value: "+n+"\nMessage: "+o.message,o;}}}),s.M.instance=new s.M}(),s.b("bindingProvider",s.M),function(){function n(n,t,r){for(var u=s.e.firstChild(t);t=u;)u=s.e.nextSibling(t),i(n,t,r)}function i(t,i,u){var e=!0,f=1===i.nodeType;f&&s.e.Za(i),(f&&u||s.M.instance.nodeHasBindings(i))&&(e=r(i,null,t,u).Sb),e&&n(t,i,!f)}function r(n,i,r,u){function c(n){return function(){return e[n]}}function l(){return e}var o=0,e,h,a=s.a.f.get(n,f);if(!i){if(a)throw Error("You cannot apply bindings multiple times to the same element.");s.a.f.set(n,f,!0)}return s.j(function(){var f=r&&r instanceof s.A?r:new s.A(s.a.c(r)),v=f.$data;!a&&u&&s.jb(n,f),(e=("function"==typeof i?i(f,n):i)||s.M.instance.getBindings(n,f))&&(0===o&&(o=1,s.a.w(e,function(i){var r=s.d[i];if(r&&8===n.nodeType&&!s.e.L[i])throw Error("The binding '"+i+"' cannot be used with virtual elements");if(r&&"function"==typeof r.init&&(r=r.init(n,c(i),l,v,f))&&r.controlsDescendantBindings){if(h!==t)throw Error("Multiple bindings ("+h+" and "+i+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");h=i}}),o=2),2===o&&s.a.w(e,function(t){var i=s.d[t];i&&"function"==typeof i.update&&i.update(n,c(t),l,v,f)}))},null,{$:n}),{Sb:h===t}}s.d={},s.A=function(n,t,i){t?(s.a.extend(this,t),this.$parentContext=t,this.$parent=t.$data,this.$parents=(t.$parents||[]).slice(0),this.$parents.unshift(this.$parent)):(this.$parents=[],this.$root=n,this.ko=s),this.$data=n,i&&(this[i]=n)},s.A.prototype.createChildContext=function(n,t){return new s.A(n,this,t)},s.A.prototype.extend=function(n){var t=s.a.extend(new s.A,this);return s.a.extend(t,n)};var f="__ko_boundElement";s.jb=function(n,t){if(2==arguments.length)s.a.f.set(n,"__ko_bindingContext__",t);else return s.a.f.get(n,"__ko_bindingContext__")},s.Ka=function(n,t,i){return 1===n.nodeType&&s.e.Za(n),r(n,t,i,!0)},s.Ja=function(t,i){1!==i.nodeType&&8!==i.nodeType||n(t,i,!0)},s.Ia=function(n,t){if(t&&1!==t.nodeType&&8!==t.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");t=t||u.document.body,i(n,t,!0)},s.na=function(n){switch(n.nodeType){case 1:case 8:var i=s.jb(n);if(i)return i;if(n.parentNode)return s.na(n.parentNode)}return t},s.ub=function(n){return(n=s.na(n))?n.$data:t},s.b("bindingHandlers",s.d),s.b("applyBindings",s.Ia),s.b("applyBindingsToDescendants",s.Ja),s.b("applyBindingsToNode",s.Ka),s.b("contextFor",s.na),s.b("dataFor",s.ub)}(),l={"class":"className","for":"htmlFor"},s.d.attr={update:function(n,i){var r=s.a.c(i())||{};s.a.w(r,function(i,r){r=s.a.c(r);var u=!1===r||null===r||r===t;u&&n.removeAttribute(i),8>=s.a.ca&&i in l?(i=l[i],u?n.removeAttribute(i):n[i]=r):u||n.setAttribute(i,r.toString()),"name"===i&&s.a.gb(n,u?"":r.toString())})}},s.d.checked={init:function(t,i,r){s.a.o(t,"click",function(){var u,n,f;if("checkbox"==t.type)u=t.checked;else if("radio"==t.type&&t.checked)u=t.value;else return;n=i(),f=s.a.c(n),"checkbox"==t.type&&f instanceof Array?s.a.ja(n,t.value,t.checked):s.g.ha(n,r,"checked",u,!0)}),"radio"!=t.type||t.name||s.d.uniqueName.init(t,n(!0))},update:function(n,t){var i=s.a.c(t());"checkbox"==n.type?n.checked=i instanceof Array?0<=s.a.k(i,n.value):i:"radio"==n.type&&(n.checked=n.value==i)}},s.d.css={update:function(n,t){var i=s.a.c(t());"object"==typeof i?s.a.w(i,function(t,i){i=s.a.c(i),s.a.ga(n,t,i)}):(i=String(i||""),s.a.ga(n,n.__ko__cssValue,!1),n.__ko__cssValue=i,s.a.ga(n,i,!0))}},s.d.enable={update:function(n,t){var i=s.a.c(t());i&&n.disabled?n.removeAttribute("disabled"):i||n.disabled||(n.disabled=!0)}},s.d.disable={update:function(n,t){s.d.enable.update(n,function(){return!s.a.c(t())})}},s.d.event={init:function(n,t,i,r){var u=t()||{};s.a.w(u,function(u){"string"==typeof u&&s.a.o(n,u,function(n){var e,o=t()[u],h,f;if(o){h=i();try{f=s.a.N(arguments),f.unshift(r),e=o.apply(r,f)}finally{!0!==e&&(n.preventDefault?n.preventDefault():n.returnValue=!1)}!1===h[u+"Bubble"]&&(n.cancelBubble=!0,n.stopPropagation&&n.stopPropagation())}})})}},s.d.foreach={Ya:function(n){return function(){var i=n(),t=s.a.ya(i);return!t||"number"==typeof t.length?{foreach:i,templateEngine:s.D.sa}:(s.a.c(i),{foreach:t.data,as:t.as,includeDestroyed:t.includeDestroyed,afterAdd:t.afterAdd,beforeRemove:t.beforeRemove,afterRender:t.afterRender,beforeMove:t.beforeMove,afterMove:t.afterMove,templateEngine:s.D.sa})}},init:function(n,t){return s.d.template.init(n,s.d.foreach.Ya(t))},update:function(n,t,i,r,u){return s.d.template.update(n,s.d.foreach.Ya(t),i,r,u)}},s.g.S.foreach=!1,s.e.L.foreach=!0,s.d.hasfocus={init:function(n,t,i){function r(r){var u,f;if(n.__ko_hasfocusUpdating=!0,u=n.ownerDocument,"activeElement"in u){try{f=u.activeElement}catch(e){f=u.body}r=f===n}u=t(),s.g.ha(u,i,"hasfocus",r,!0),n.__ko_hasfocusLastValue=r,n.__ko_hasfocusUpdating=!1}var u=r.bind(null,!0),f=r.bind(null,!1);s.a.o(n,"focus",u),s.a.o(n,"focusin",u),s.a.o(n,"blur",f),s.a.o(n,"focusout",f)},update:function(n,t){var i=!!s.a.c(t());n.__ko_hasfocusUpdating||n.__ko_hasfocusLastValue===i||(i?n.focus():n.blur(),s.q.I(s.a.Ga,null,[n,i?"focusin":"focusout"]))}},s.d.hasFocus=s.d.hasfocus,s.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(n,t){s.a.fa(n,t())}},a="__ko_withIfBindingData",c("if"),c("ifnot",!1,!0),c("with",!0,!1,function(n,t){return n.createChildContext(t)}),s.d.options={init:function(n){if("select"!==s.a.u(n))throw Error("options binding applies only to SELECT elements");for(;0<n.length;)n.remove(0);return{controlsDescendantBindings:!0}},update:function(n,i,u){function a(n,t,i){var r=typeof t;return"function"==r?t(n):"string"==r?n[t]:i}function y(n,t){if(e){var i=0<=s.a.k(e,s.h.n(t[0]));s.a.hb(t[0],i)}}var p=0==n.length,h=!p&&n.multiple?n.scrollTop:null,l;i=s.a.c(i());var f=u(),w=f.optionsIncludeDestroyed,c={},o,e;n.multiple?e=s.a.Z(n.selectedOptions||s.a.Y(n.childNodes,function(n){return n.tagName&&"option"===s.a.u(n)&&n.selected}),function(n){return s.h.n(n)}):0<=n.selectedIndex&&(e=[s.h.n(n.options[n.selectedIndex])]),i?("undefined"==typeof i.length&&(i=[i]),l=s.a.Y(i,function(n){return w||n===t||null===n||!s.a.c(n._destroy)}),"optionsCaption"in f&&(o=s.a.c(f.optionsCaption),null!==o&&o!==t&&l.unshift(c))):i=[],u=y,f.optionsAfterRender&&(u=function(n,i){y(0,i),s.q.I(f.optionsAfterRender,null,[i[0],n!==c?n:t])}),s.a.Aa(n,l,function(n,i,u){return u.length&&(e=u[0].selected&&[s.h.n(u[0])]),i=r.createElement("option"),n===c?(s.a.fa(i,o),s.h.W(i,t)):(u=a(n,f.optionsValue,n),s.h.W(i,s.a.c(u)),n=a(n,f.optionsText,u),s.a.ib(i,n)),[i]},null,u),e=null,p&&"value"in f&&v(n,s.a.ya(f.value),!0),s.a.zb(n),h&&20<Math.abs(h-n.scrollTop)&&(n.scrollTop=h)}},s.d.options.wa="__ko.optionValueDomData__",s.d.selectedOptions={init:function(n,t,i){s.a.o(n,"change",function(){var u=t(),r=[];s.a.p(n.getElementsByTagName("option"),function(n){n.selected&&r.push(s.h.n(n))}),s.g.ha(u,i,"selectedOptions",r)})},update:function(n,t){if("select"!=s.a.u(n))throw Error("values binding applies only to SELECT elements");var i=s.a.c(t());i&&"number"==typeof i.length&&s.a.p(n.getElementsByTagName("option"),function(n){var t=0<=s.a.k(i,s.h.n(n));s.a.hb(n,t)})}},s.d.style={update:function(n,t){var i=s.a.c(t()||{});s.a.w(i,function(t,i){i=s.a.c(i),n.style[t]=i||""})}},s.d.submit={init:function(n,t,i,r){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");s.a.o(n,"submit",function(i){var u,f=t();try{u=f.call(r,n)}finally{!0!==u&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}})}},s.d.text={update:function(n,t){s.a.ib(n,t())}},s.e.L.text=!0,s.d.uniqueName={init:function(n,t){if(t()){var i="ko_unique_"+ ++s.d.uniqueName.tb;s.a.gb(n,i)}}},s.d.uniqueName.tb=0,s.d.value={init:function(n,t,i){function f(){e=!1;var r=t(),u=s.h.n(n);s.g.ha(r,i,"value",u)}var r=["change"],u=i().valueUpdate,e=!1;u&&("string"==typeof u&&(u=[u]),s.a.R(r,u),r=s.a.Ma(r)),!s.a.ca||"input"!=n.tagName.toLowerCase()||"text"!=n.type||"off"==n.autocomplete||n.form&&"off"==n.form.autocomplete||-1!=s.a.k(r,"propertychange")||(s.a.o(n,"propertychange",function(){e=!0}),s.a.o(n,"blur",function(){e&&f()})),s.a.p(r,function(t){var i=f;s.a.Tb(t,"after")&&(i=function(){setTimeout(f,0)},t=t.substring(5)),s.a.o(n,t,i)})},update:function(n,t){var u="select"===s.a.u(n),r=s.a.c(t()),i=s.h.n(n);r!==i&&(i=function(){s.h.W(n,r)},i(),u&&setTimeout(i,0)),u&&0<n.length&&v(n,r,!1)}},s.d.visible={update:function(n,t){var i=s.a.c(t()),r="none"!=n.style.display;i&&!r?n.style.display="":!i&&r&&(n.style.display="none")}},function(n){s.d[n]={init:function(t,i,r,u){return s.d.event.init.call(this,t,function(){var t={};return t[n]=i(),t},r,u)}}}("click"),s.v=function(){},s.v.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");},s.v.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock");},s.v.prototype.makeTemplateSource=function(n,t){if("string"==typeof n){t=t||r;var i=t.getElementById(n);if(!i)throw Error("Cannot find template with ID "+n);return new s.l.i(i)}if(1==n.nodeType||8==n.nodeType)return new s.l.Q(n);throw Error("Unknown template type: "+n);},s.v.prototype.renderTemplate=function(n,t,i,r){return n=this.makeTemplateSource(n,r),this.renderTemplateSource(n,t,i)},s.v.prototype.isTemplateRewritten=function(n,t){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(n,t).data("isRewritten")},s.v.prototype.rewriteTemplate=function(n,t,i){n=this.makeTemplateSource(n,i),t=t(n.text()),n.text(t),n.data("isRewritten",!0)},s.b("templateEngine",s.v),s.Ea=function(){function n(n,t,i,r){var o,f,u,e;for(n=s.g.da(n),o=s.g.S,f=0;f<n.length;f++)if(u=n[f].key,o.hasOwnProperty(u))if(e=o[u],"function"==typeof e){if(u=e(n[f].value))throw Error(u);}else if(!e)throw Error("This template engine does not support the '"+u+"' binding within its templates");return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+s.g.ea(n)+" } })()},'"+i.toLowerCase()+"')",r.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{Ab:function(n,t,i){t.isTemplateRewritten(n,i)||t.rewriteTemplate(n,function(n){return s.Ea.Lb(n,t)},i)},Lb:function(r,u){return r.replace(t,function(t,i,r,f,e){return n(e,i,r,u)}).replace(i,function(t,i){return n(i,"<!-- ko -->","#comment",u)})},qb:function(n,t){return s.s.va(function(i,r){var u=i.nextSibling;u&&u.nodeName.toLowerCase()===t&&s.Ka(u,n,r)})}}}(),s.b("__tr_ambtns",s.Ea.qb),function(){s.l={},s.l.i=function(n){this.i=n},s.l.i.prototype.text=function(){var n=s.a.u(this.i),n="script"===n?"text":"textarea"===n?"value":"innerHTML",t;if(0==arguments.length)return this.i[n];t=arguments[0],"innerHTML"===n?s.a.fa(this.i,t):this.i[n]=t},s.l.i.prototype.data=function(n){if(1===arguments.length)return s.a.f.get(this.i,"templateSourceData_"+n);s.a.f.set(this.i,"templateSourceData_"+n,arguments[1])},s.l.Q=function(n){this.i=n},s.l.Q.prototype=new s.l.i,s.l.Q.prototype.text=function(){if(0==arguments.length){var n=s.a.f.get(this.i,"__ko_anon_template__")||{};return n.Fa===t&&n.ma&&(n.Fa=n.ma.innerHTML),n.Fa}s.a.f.set(this.i,"__ko_anon_template__",{Fa:arguments[0]})},s.l.i.prototype.nodes=function(){if(0==arguments.length)return(s.a.f.get(this.i,"__ko_anon_template__")||{}).ma;s.a.f.set(this.i,"__ko_anon_template__",{ma:arguments[0]})},s.b("templateSources",s.l),s.b("templateSources.domElement",s.l.i),s.b("templateSources.anonymousTemplate",s.l.Q)}(),function(){function r(n,t,i){var r;for(t=s.e.nextSibling(t);n&&(r=n)!==t;)n=s.e.nextSibling(r),1!==r.nodeType&&8!==r.nodeType||i(r)}function u(n,t){if(n.length){var i=n[0],u=n[n.length-1];r(i,u,function(n){s.Ia(t,n)}),r(i,u,function(n){s.s.nb(n,[t])})}}function n(n){return n.nodeType?n:0<n.length?n[0]:null}function f(t,r,f,e,o){o=o||{};var h=t&&n(t),h=h&&h.ownerDocument,c=o.templateEngine||i;if(s.Ea.Ab(f,c,h),f=c.renderTemplate(f,e,o,h),"number"!=typeof f.length||0<f.length&&"number"!=typeof f[0].nodeType)throw Error("Template engine must return an array of DOM nodes");h=!1;switch(r){case"replaceChildren":s.e.P(t,f),h=!0;break;case"replaceNode":s.a.eb(t,f),h=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+r);}return h&&(u(f,e),o.afterRender&&s.q.I(o.afterRender,null,[f,e.$data])),f}var i;s.Ba=function(n){if(n!=t&&!(n instanceof s.v))throw Error("templateEngine must inherit from ko.templateEngine");i=n},s.za=function(r,u,e,o,h){if(e=e||{},(e.templateEngine||i)==t)throw Error("Set a template engine before calling renderTemplate");if(h=h||"replaceChildren",o){var c=n(o);return s.j(function(){var t=u&&u instanceof s.A?u:new s.A(s.a.c(u)),i="function"==typeof r?r(t.$data,t):r,t=f(o,h,i,t,e);"replaceNode"==h&&(o=t,c=n(o))},null,{Qa:function(){return!c||!s.a.aa(c)},$:c&&"replaceNode"==h?c.parentNode:c})}return s.s.va(function(n){s.za(r,u,e,n,"replaceNode")})},s.Rb=function(n,i,r,e,o){function c(n,t){u(t,h),r.afterRender&&r.afterRender(t,n)}function l(t,i){h=o.createChildContext(s.a.c(t),r.as),h.$index=i;var u="function"==typeof n?n(t,h):n;return f(null,"ignoreTargetNode",u,h,r)}var h;return s.j(function(){var n=s.a.c(i)||[];"undefined"==typeof n.length&&(n=[n]),n=s.a.Y(n,function(n){return r.includeDestroyed||n===t||null===n||!s.a.c(n._destroy)}),s.q.I(s.a.Aa,null,[e,n,l,r,c])},null,{$:e})},s.d.template={init:function(n,t){var i=s.a.c(t());return"string"==typeof i||i.name||1!=n.nodeType&&8!=n.nodeType||(i=1==n.nodeType?n.childNodes:s.e.childNodes(n),i=s.a.Mb(i),new s.l.Q(n).nodes(i)),{controlsDescendantBindings:!0}},update:function(n,i,r,u,f){i=s.a.c(i()),r={},u=!0;var e,o=null;"string"!=typeof i&&(r=i,i=s.a.c(r.name),"if"in r&&(u=s.a.c(r["if"])),u&&"ifnot"in r&&(u=!s.a.c(r.ifnot)),e=s.a.c(r.data)),"foreach"in r?o=s.Rb(i||n,u&&r.foreach||[],r,n,f):u?(f="data"in r?f.createChildContext(e,r.as):f,o=s.za(i||n,f,r,n)):s.e.ba(n),f=o,(e=s.a.f.get(n,"__ko__templateComputedDomDataKey__"))&&"function"==typeof e.B&&e.B(),s.a.f.set(n,"__ko__templateComputedDomDataKey__",f&&f.ta()?f:t)}},s.g.S.template=function(n){return n=s.g.da(n),1==n.length&&n[0].unknown||s.g.Jb(n,"name")?null:"This template engine does not support anonymous templates nested within its templates"},s.e.L.template=!0}(),s.b("setTemplateEngine",s.Ba),s.b("renderTemplate",s.za),s.a.Pa=function(){function n(n,t,i,r,u){for(var o=Math.min,a=Math.max,s=[],l=n.length,f,h=t.length,c=h-l||1,b=l+h+1,v,p,w,y,e=0;e<=l;e++)for(p=v,s.push(v=[]),w=o(h,e+c),f=a(0,e-1);f<=w;f++)v[f]=f?e?n[e-1]===t[f-1]?p[f-1]:o(p[f]||b,v[f-1]||b)+1:f+1:e+1;for(o=[],a=[],c=[],e=l,f=h;e||f;)h=s[e][f]-1,f&&h===s[e][f-1]?a.push(o[o.length]={status:i,value:t[--f],index:f}):e&&h===s[e-1][f]?c.push(o[o.length]={status:r,value:n[--e],index:e}):(o.push({status:"retained",value:t[--f]}),--e);if(a.length&&c.length)for(n=10*l,t=i=0;(u||t<n)&&(y=a[i]);i++){for(r=0;s=c[r];r++)if(y.value===s.value){y.moved=s.index,s.moved=y.index,c.splice(r,1),t=r=0;break}t+=r}return o.reverse()}return function(t,i,r){return t=t||[],i=i||[],t.length<=i.length?n(t,i,"added","deleted",r):n(i,t,"deleted","added",r)}}(),s.b("utils.compareArrays",s.a.Pa),function(){function n(n){for(;n.length&&!s.a.aa(n[0]);)n.splice(0,1);if(1<n.length){for(var t=n[0],r=n[n.length-1],i=[t];t!==r;){if(t=t.nextSibling,!t)return;i.push(t)}Array.prototype.splice.apply(n,[0,n.length].concat(i))}return n}function i(i,r,u,f,e){var o=[];return i=s.j(function(){var t=r(u,e,n(o))||[];0<o.length&&(s.a.eb(o,t),f&&s.q.I(f,null,[u,t,e])),o.splice(0,o.length),s.a.R(o,t)},null,{$:i,Qa:function(){return!s.a.pb(o)}}),{O:o,j:i.ta()?i:t}}s.a.Aa=function(r,u,f,e,o){function rt(t,i){h=it[i],g!==i&&(tt[t]=h),h.ra(g++),n(h.O),d.push(h),p.push(h)}function w(n,t){if(n)for(var i=0,r=t.length;i<r;i++)t[i]&&s.a.p(t[i].O,function(r){n(r,i,t[i].X)})}var c,y,ut;u=u||[],e=e||{};var y=s.a.f.get(r,"setDomNodeChildrenFromArrayMapping_lastMappingResult")===t,it=s.a.f.get(r,"setDomNodeChildrenFromArrayMapping_lastMappingResult")||[],k=s.a.Z(it,function(n){return n.X}),a=s.a.Pa(k,u,e.dontLimitMoves),d=[],l=0,g=0,nt=[],p=[];u=[];for(var tt=[],k=[],h,c=0,b,v;b=a[c];c++)switch(v=b.moved,b.status){case"deleted":v===t&&(h=it[l],h.j&&h.j.B(),nt.push.apply(nt,n(h.O)),e.beforeRemove&&(u[c]=h,p.push(h))),l++;break;case"retained":rt(c,l++);break;case"added":v!==t?rt(c,v):(h={X:b.value,ra:s.m(g++)},d.push(h),p.push(h),y||(k[c]=h))}for(w(e.beforeMove,tt),s.a.p(nt,e.beforeRemove?s.H:s.removeNode),c=0,y=s.e.firstChild(r);h=p[c];c++){for(h.O||s.a.extend(h,i(r,f,h.X,o,h.ra)),l=0;a=h.O[l];y=a.nextSibling,ut=a,l++)a!==y&&s.e.Va(r,a,ut);!h.Fb&&o&&(o(h.X,h.O,h.ra),h.Fb=!0)}w(e.beforeRemove,u),w(e.afterMove,tt),w(e.afterAdd,k),s.a.f.set(r,"setDomNodeChildrenFromArrayMapping_lastMappingResult",d)}}(),s.b("utils.setDomNodeChildrenFromArrayMapping",s.a.Aa),s.D=function(){this.allowTemplateRewriting=!1},s.D.prototype=new s.v,s.D.prototype.renderTemplateSource=function(n){var t=(9>s.a.ca?0:n.nodes)?n.nodes():null;return t?s.a.N(t.cloneNode(!0).childNodes):(n=n.text(),s.a.xa(n))},s.D.sa=new s.D,s.Ba(s.D.sa),s.b("nativeTemplateEngine",s.D),function(){s.ua=function(){var n=this.Ib=function(){if("undefined"==typeof i||!i.tmpl)return 0;try{if(0<=i.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(n){}return 1}();this.renderTemplateSource=function(t,u,f){if(f=f||{},2>n)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var e=t.data("precompiled");return e||(e=t.text()||"",e=i.template(null,"{{ko_with $item.koBindingContext}}"+e+"{{/ko_with}}"),t.data("precompiled",e)),t=[u.$data],u=i.extend({koBindingContext:u},f.templateOptions),u=i.tmpl(e,t,u),u.appendTo(r.createElement("div")),i.fragments={},u},this.createJavaScriptEvaluatorBlock=function(n){return"{{ko_code ((function() { return "+n+" })()) }}"},this.addTemplate=function(n,t){r.write("<script type='text/html' id='"+n+"'>"+t+"<\/script>")},0<n&&(i.tmpl.tag.ko_code={open:"__.push($1 || '');"},i.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},s.ua.prototype=new s.v;var n=new s.ua;0<n.Ib&&s.Ba(n),s.b("jqueryTmplTemplateEngine",s.ua)}()})})()})(),ko.extenders.required=function(n,t){function i(i){n.hasError(i?!1:!0),n.validationMessage(i?"":t||"*")}return n.hasError=ko.observable(),n.validationMessage=ko.observable(),i(n()),n.subscribe(i),n},ko.extenders.alphaNumeric=function(n,t){function i(i){var r=i,u=/^[A-Za-z0-9 ]{3,20}$/;return u.test(r)?(n.validationMessage("success"),!0):(n.validationMessage(t),!1)}return n.hasError=ko.observable(),n.validationMessage=ko.observable(),i(n()),n.subscribe(i),n},ko.extenders.numeric=function(n){var t=ko.computed({read:n,write:function(t){var r=n(),i=parseInt(t)<0||parseInt(t)>100||isNaN(t)?r:parseFloat(+t);i==0&&(i=""),i!==r?n(i):t!==r&&n.notifySubscribers(i)}});return t(n()),t},ko.extenders.decimal=function(n,t){var i=ko.computed({read:n,write:function(i){var u=n(),f=Math.pow(10,t),e=isNaN(i)?0:parseFloat(+i),r=Math.round(e*f)/f;e==0&&(r=""),r!==u?n(r):i!==u&&n.notifySubscribers(r)}});return i(n()),i},function(n){n.observable.fn.revertable=function(){var n=this,t=n();return t||n.subscribe(function(){t=t||n()}),n.commit=function(){t=n()},n.revert=function(){n(t||"")},n.isDirty=function(){return n()!=t},n},n.revertableObservable=function(t){var r=n.observable(t),i=n.observable(t);return i.commit=function(){r(i())},i.revert=function(){i(r())},i.isDirty=function(){return r()===i()},i},n.observableArray.fn.distinct=function(t){var i=this;return i.index={},i.index[t]=n.observable({}),n.computed(function(){var r={};n.utils.arrayForEach(i(),function(i){var u=n.utils.unwrapObservable(i[t]);u&&(r[u]=r[u]||[],r[u].push(i))}),i.index[t](r)}),i},n.extenders.decimalCustom=function(n,t){return n.subscribe(function(i){var f=(i*Math.pow(10,t)/Math.pow(10,t)).toFixed(2),e=/^\s*-?[0-9]\d*(\.\d{1,2})?\s*$/,o=/^\d+$/,u,r;o.test(f)||e.test(f)?(u=i.split("."),r=u[0],r.length>7&&(r=u[0].substring(0,7)),u.length>1&&(r+="."+u[1].substring(0,t)),i.charAt(i.length-1)=="."&&r!=i&&(r+="."),i!=r&&n(r)):n("")}),n},n.bindingHandlers.stopBinding={init:function(){return{controlsDescendantBindings:!0}}},n.bindingHandlers.fadeVisible={init:function(t,i){var r=i();$(t).toggle(n.utils.unwrapObservable(r))},update:function(t,i){var r=i();n.utils.unwrapObservable(r)?$(t).fadeIn():$(t).fadeOut()}},n.bindingHandlers.watermark={init:function(t,i,r){var e=i(),o=r(),f=n.utils.unwrapObservable(e),u=$(t);setTimeout(function(){u.val(f)},0),u.focus(function(){u.val()===f&&u.val("")}).blur(function(){u.val()===""&&u.val(f)})}},n.bindingHandlers.datepicker={init:function(n,t,i){var u=i().datepickerOptions||{autoclose:!0,format:"mm/dd/yyyy",startView:"years"},r=t();$(n).datepicker(u).on("changeDate",function(n){r(moment(n.date).format("MM/DD/YYYY"))});$(n).change(function(){r($(this).attr("value"))})},update:function(t,i){var r=n.utils.unwrapObservable(i());r&&r.length!=0&&$(t).datepicker("setDate",new Date(r))}},n.bindingHandlers.birthdatepicker={init:function(n,t,i){var u=i().datepickerOptions||{autoclose:!0,format:"mm/dd/yyyy",endDate:"0",startView:"decade"},r=t();$(n).datepicker(u).on("changeDate",function(n){r(moment(n.date).format("MM/DD/YYYY"))});$(n).change(function(){r($(this).attr("value"))})},update:function(t,i){var r=n.utils.unwrapObservable(i());r&&r.length!=0&&$(t).datepicker("setDate",new Date(r))}},n.bindingHandlers.monthpicker={init:function(n,t,i){var u=i().datepickerOptions||{autoclose:!0,format:"mm/yyyy",startView:"month",minViewMode:"months"},r=t();$(n).datepicker(u).on("changeDate",function(n){r(moment(n.date).format("MM/YYYY"))});$(n).change(function(){r($(this).attr("value"))})},update:function(t,i){var r=n.utils.unwrapObservable(i());r||(r=APICore.Common.getMonthYear()),$(t).datepicker("setDate",new Date(r))}},n.bindingHandlers.timepicker={init:function(t,i,r){var u=r().timepickerOptions||{};$(t).timepicker(u).on("changeTime.timepicker",function(n){var t=i();t(n.time.value)});n.utils.domNodeDisposal.addDisposeCallback(t,function(){$(t).timepicker("remove")})},update:function(t,i){var r=n.utils.unwrapObservable(i()),u=$(t).timepicker("getTime");r-u!=0&&$(t).timepicker("setTime",r||"")}},n.bindingHandlers.file={init:function(t,i){$(t).change(function(){var t=this.files[0];n.isObservable(i())&&i()(t)})},update:function(t,i,r){var e=n.utils.unwrapObservable(i()),u=r(),f;u.fileBinaryData&&n.isObservable(u.fileBinaryData)&&(e?(f=new window.FileReader,f.onload=function(n){u.fileBinaryData(n.target.result)},f.readAsArrayBuffer(e)):u.fileBinaryData(null))}},n.extenders.required=function(t,i){function r(n){t.hasError(n?!1:!0),t.validationMessage(n?"":i||"*")}return t.hasError=n.observable(),t.validationMessage=n.observable(),r(t()),t.subscribe(r),t}}(ko),function(n){"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?n(require("knockout"),exports):"function"==typeof define&&define.amd?define(["knockout","exports"],n):n(ko,ko.mapping={})}(function(n,t){function y(n,i){for(var r in i)i.hasOwnProperty(r)&&i[r]&&(r&&n[r]&&"array"!==t.getType(n[r])?y(n[r],i[r]):n[r]=i[r])}function l(n,t){var i={};return y(i,n),y(i,t),i}function a(n,t){var f,i;for(options=l({},n),f=w.length-1;0<=f;f--)i=w[f],options[i]&&(options[""]instanceof Object||(options[""]={}),options[""][i]=options[i],delete options[i]);return t&&(options.ignore=u(t.ignore,options.ignore),options.include=u(t.include,options.include),options.copy=u(t.copy,options.copy)),options.ignore=u(options.ignore,r.ignore),options.include=u(options.include,r.include),options.copy=u(options.copy,r.copy),options.mappedProperties=options.mappedProperties||{},options}function u(i,r){return"array"!==t.getType(i)&&(i="undefined"===t.getType(i)?[]:[i]),"array"!==t.getType(r)&&(r="undefined"===t.getType(r)?[]:[r]),n.utils.arrayGetDistinctValues(i.concat(r))}function e(r,u,h,a,v,y){var yt="array"===t.getType(n.utils.unwrapObservable(u)),y=y||"",h,tt,nt,d,it,rt,st;t.isMapped(r)&&(tt=n.utils.unwrapObservable(r)[i],h=l(tt,h));var ct=function(){return h[a]&&h[a].create instanceof Function},lt=function(t){var i=c,r=n.dependentObservable;return n.dependentObservable=function(t,r,u){var o,e,f,t;return u=u||{},t&&"object"==typeof t&&(u=t),o=u.deferEvaluation,e=!1,u.deferEvaluation=!0,t=new p(t,r,u),o||(f=t,t=p({read:function(){return e||(n.utils.arrayRemoveItem(i,f),e=!0),f.apply(f,arguments)},write:f.hasWriteFunction&&function(n){return f(n)},deferEvaluation:!0}),i.push(t)),t},n.dependentObservable.fn=p.fn,n.computed=n.dependentObservable,t=h[a].create({data:t||u,parent:v}),n.dependentObservable=r,n.computed=n.dependentObservable,t},ot=function(){return h[a]&&h[a].update instanceof Function},ft=function(t,i){var r={data:i||u,parent:v,target:n.utils.unwrapObservable(t)};return n.isWriteableObservable(t)&&(r.observable=t),h[a].update(r)};if(tt=o.get(u))return tt;if(a=a||"",yt){var yt=[],ut=!1,w=function(n){return n};h[a]&&h[a].key&&(w=h[a].key,ut=!0),n.isObservable(r)||(r=n.observableArray([]),r.mappedRemove=function(n){var t=typeof n=="function"?n:function(t){return t===w(n)};return r.remove(function(n){return t(w(n))})},r.mappedRemoveAll=function(t){var i=f(t,w);return r.remove(function(t){return n.utils.arrayIndexOf(i,w(t))!=-1})},r.mappedDestroy=function(n){var t=typeof n=="function"?n:function(t){return t===w(n)};return r.destroy(function(n){return t(w(n))})},r.mappedDestroyAll=function(t){var i=f(t,w);return r.destroy(function(t){return n.utils.arrayIndexOf(i,w(t))!=-1})},r.mappedIndexOf=function(t){var i=f(r(),w),t=w(t);return n.utils.arrayIndexOf(i,t)},r.mappedCreate=function(t){if(r.mappedIndexOf(t)!==-1)throw Error("There already is an object with the key that you specified.");var i=ct()?lt(t):t;return ot()&&(t=ft(i,t),n.isWriteableObservable(i)?i(t):i=t),r.push(i),i}),tt=f(n.utils.unwrapObservable(r),w).sort(),nt=f(u,w),ut&&nt.sort();for(var ut=n.utils.compareArrays(tt,nt),tt={},et=n.utils.unwrapObservable(u),at={},vt=!0,nt=0,ht=et.length;nt<ht;nt++){if(d=w(et[nt]),void 0===d||d instanceof Object){vt=!1;break}at[d]=et[nt]}for(et=[],nt=0,ht=ut.length;nt<ht;nt++){d=ut[nt],rt=y+"["+nt+"]";switch(d.status){case"added":st=vt?at[d.value]:s(n.utils.unwrapObservable(u),d.value,w),it=e(void 0,st,h,a,r,rt),ct()||(it=n.utils.unwrapObservable(it)),rt=g(n.utils.unwrapObservable(u),st,tt),et[rt]=it,tt[rt]=!0;break;case"retained":st=vt?at[d.value]:s(n.utils.unwrapObservable(u),d.value,w),it=s(r,d.value,w),e(it,st,h,a,r,rt),rt=g(n.utils.unwrapObservable(u),st,tt),et[rt]=it,tt[rt]=!0;break;case"deleted":it=s(r,d.value,w)}yt.push({event:d.status,item:it})}r(et),h[a]&&h[a].arrayChanged&&n.utils.arrayForEach(yt,function(n){h[a].arrayChanged(n.event,n.item)})}else if(k(u)){if(r=n.utils.unwrapObservable(r),!r){if(ct())return ut=lt(),ot()&&(ut=ft(ut)),ut;if(ot())return ft(ut);r={}}ot()&&(r=ft(r)),o.save(u,r),b(u,function(t){var i=y.length?y+"."+t:t,f;-1==n.utils.arrayIndexOf(h.ignore,i)&&(-1!=n.utils.arrayIndexOf(h.copy,i)?r[t]=u[t]:(f=o.get(u[t])||e(r[t],u[t],h,t,r,i),n.isWriteableObservable(r[t])?r[t](n.utils.unwrapObservable(f)):r[t]=f,h.mappedProperties[i]=!0))})}else switch(t.getType(u)){case"function":ot()?n.isWriteableObservable(u)?(u(ft(u)),r=u):r=ft(u):r=u;break;default:n.isWriteableObservable(r)?ot()?r(ft(r)):r(n.utils.unwrapObservable(u)):(r=ct()?lt():n.observable(n.utils.unwrapObservable(u)),ot()&&r(ft(r)))}return r}function g(n,t,i){for(var r=0,u=n.length;r<u;r++)if(!0!==i[r]&&n[r]===t)return r;return null}function d(i,r){var u;return r&&(u=r(i)),"undefined"===t.getType(u)&&(u=i),n.utils.unwrapObservable(u)}function s(t,i,r){for(var f,t=n.utils.unwrapObservable(t),u=0,e=t.length;u<e;u++)if(f=t[u],d(f,r)===i)return f;throw Error("When calling ko.update*, the key '"+i+"' was not found!");}function f(t,i){return n.utils.arrayMap(n.utils.unwrapObservable(t),function(n){return i?d(n,i):n})}function b(n,i){if("array"===t.getType(n))for(var r=0;r<n.length;r++)i(r);else for(r in n)i(r)}function k(n){var i=t.getType(n);return("object"===i||"array"===i)&&null!==n}function tt(){var t=[],i=[];this.save=function(r,u){var f=n.utils.arrayIndexOf(t,r);0<=f?i[f]=u:(t.push(r),i.push(u))},this.get=function(r){return r=n.utils.arrayIndexOf(t,r),0<=r?i[r]:void 0}}function nt(){var n={},t=function(t){var i;try{i=JSON.stringify(t)}catch(r){i="$$$"}return t=n[i],void 0===t&&(t=new tt,n[i]=t),t};this.save=function(n,i){t(n).save(n,i)},this.get=function(n){return t(n).get(n)}}var i="__ko_mapping__",p=n.dependentObservable,v=0,c,o,w=["create","update","key","arrayChanged"],h={include:["_destroy"],ignore:[],copy:[]},r=h;t.isMapped=function(t){return(t=n.utils.unwrapObservable(t))&&t[i]},t.fromJS=function(n){var t,r,u;if(0==arguments.length)throw Error("When calling ko.fromJS, pass the object you want to convert.");return window.setTimeout(function(){v=0},0),v++||(c=[],o=new nt),2==arguments.length&&(arguments[1][i]?r=arguments[1]:t=arguments[1]),3==arguments.length&&(t=arguments[1],r=arguments[2]),r&&(t=l(t,r[i])),t=a(t),u=e(r,n,t),r&&(u=r),--v||window.setTimeout(function(){for(;c.length;){var n=c.pop();n&&n()}},0),u[i]=l(u[i],t),u},t.fromJSON=function(i){var r=n.utils.parseJson(i);return arguments[0]=r,t.fromJS.apply(this,arguments)},t.updateFromJS=function(){throw Error("ko.mapping.updateFromJS, use ko.mapping.fromJS instead. Please note that the order of parameters is different!");},t.updateFromJSON=function(){throw Error("ko.mapping.updateFromJSON, use ko.mapping.fromJSON instead. Please note that the order of parameters is different!");},t.toJS=function(u,f){if(r||t.resetDefaultOptions(),0==arguments.length)throw Error("When calling ko.mapping.toJS, pass the object you want to convert.");if("array"!==t.getType(r.ignore))throw Error("ko.mapping.defaultOptions().ignore should be an array.");if("array"!==t.getType(r.include))throw Error("ko.mapping.defaultOptions().include should be an array.");if("array"!==t.getType(r.copy))throw Error("ko.mapping.defaultOptions().copy should be an array.");return f=a(f,u[i]),t.visitModel(u,function(t){return n.utils.unwrapObservable(t)},f)},t.toJSON=function(i,r){var u=t.toJS(i,r);return n.utils.stringifyJson(u)},t.defaultOptions=function(){if(0<arguments.length)r=arguments[0];else return r},t.resetDefaultOptions=function(){r={include:h.include.slice(0),ignore:h.ignore.slice(0),copy:h.copy.slice(0)}},t.getType=function(n){if(n&&"object"==typeof n){if(n.constructor==(new Date).constructor)return"date";if("[object Array]"===Object.prototype.toString.call(n))return"array"}return typeof n},t.visitModel=function(r,u,f){var o,e,s;if(f=f||{},f.visitedObjects=f.visitedObjects||new nt,e=n.utils.unwrapObservable(r),k(e))f=a(f,e[i]),u(r,f.parentName),o="array"===t.getType(e)?[]:{};else return u(r,f.parentName);return f.visitedObjects.save(r,o),s=f.parentName,b(e,function(r){if(!(f.ignore&&-1!=n.utils.arrayIndexOf(f.ignore,r))){var h=e[r],c=f,l=s||"";if("array"===t.getType(e)?s&&(l+="["+r+"]"):(s&&(l+="."),l+=r),c.parentName=l,!(-1===n.utils.arrayIndexOf(f.copy,r)&&-1===n.utils.arrayIndexOf(f.include,r)&&e[i]&&e[i].mappedProperties&&!e[i].mappedProperties[r]&&"array"!==t.getType(e)))switch(t.getType(n.utils.unwrapObservable(h))){case"object":case"array":case"undefined":c=f.visitedObjects.get(h),o[r]="undefined"!==t.getType(c)?c:t.visitModel(h,u,f);break;default:o[r]=u(h,f.parentName)}}}),o}})