UNPKG

survey-angular

Version:

survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.

11 lines 2.13 MB
/*! * surveyjs - Survey JavaScript library v1.12.50 * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/ * License: MIT (http://www.opensource.org/licenses/mit-license.php) */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("survey-angular",[],t):"object"==typeof exports?exports["survey-angular"]=t():e.Survey=t()}(this,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=225)}([function(e,t,n){var o,i,r; /*! * Knockout JavaScript library v3.5.1 * (c) The Knockout.js team - http://knockoutjs.com/ * License: MIT (http://www.opensource.org/licenses/mit-license.php) */!function(a){var s=this||(0,eval)("this"),l=s.document,u=s.navigator,c=s.jQuery,p=s.JSON;c||"undefined"==typeof jQuery||(c=jQuery),function(a){i=[t,n],void 0===(r="function"==typeof(o=a)?o.apply(t,i):o)||(e.exports=r)}((function(e,t){function n(e,t){return(null===e||typeof e in C)&&e===t}function o(e,t){var n;return function(){n||(n=x.a.setTimeout((function(){n=a,e()}),t))}}function i(e,t){var n;return function(){clearTimeout(n),n=x.a.setTimeout(e,t)}}function r(e,t){t&&"change"!==t?"beforeChange"===t?this.pc(e):this.gb(e,t):this.qc(e)}function d(e,t){null!==t&&t.s&&t.s()}function h(e,t){var n=this.qd,o=n[_];o.ra||(this.Qb&&this.mb[t]?(n.uc(t,e,this.mb[t]),this.mb[t]=null,--this.Qb):o.I[t]||n.uc(t,e,o.J?{da:e}:n.$c(e)),e.Ja&&e.gd())}var m,g,f,y,v,b,x=void 0!==e?e:{};x.b=function(e,t){for(var n=e.split("."),o=x,i=0;i<n.length-1;i++)o=o[n[i]];o[n[n.length-1]]=t},x.L=function(e,t,n){e[t]=n},x.version="3.5.1",x.b("version",x.version),x.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},x.a=function(){function e(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 o(e,t,n,o){var i=e[t].match(v)||[];x.a.D(n.match(v),(function(e){x.a.Na(i,e,o)})),e[t]=i.join(" ")}var i=Object.prototype.hasOwnProperty,r={__proto__:[]}instanceof Array,d="function"==typeof Symbol,h={},m={};h[u&&/Firefox\/2/i.test(u.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],h.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),e(h,(function(e,t){if(t.length)for(var n=0,o=t.length;n<o;n++)m[t[n]]=e}));var g,f={propertychange:!0},y=l&&function(){for(var e=3,t=l.createElement("div"),n=t.getElementsByTagName("i");t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e",n[0];);return 4<e?e:a}(),v=/\S+/g;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(e,t,n){for(var o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e)},A:"function"==typeof Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t)}:function(e,t){for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},Lb:function(e,t,n){for(var o=0,i=e.length;o<i;o++)if(t.call(n,e[o],o,e))return e[o];return a},Pa:function(e,t){var n=x.a.A(e,t);0<n?e.splice(n,1):0===n&&e.shift()},wc:function(e){var t=[];return e&&x.a.D(e,(function(e){0>x.a.A(t,e)&&t.push(e)})),t},Mb:function(e,t,n){var o=[];if(e)for(var i=0,r=e.length;i<r;i++)o.push(t.call(n,e[i],i));return o},jb:function(e,t,n){var o=[];if(e)for(var i=0,r=e.length;i<r;i++)t.call(n,e[i],i)&&o.push(e[i]);return o},Nb:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var n=0,o=t.length;n<o;n++)e.push(t[n]);return e},Na:function(e,t,n){var o=x.a.A(x.a.bc(e),t);0>o?n&&e.push(t):n||e.splice(o,1)},Ba:r,extend:t,setPrototypeOf:n,Ab:r?n:t,P:e,Ga:function(e,t,n){if(!e)return e;var o,r={};for(o in e)i.call(e,o)&&(r[o]=t.call(n,e[o],o,e));return r},Tb:function(e){for(;e.firstChild;)x.removeNode(e.firstChild)},Yb:function(e){for(var t=((e=x.a.la(e))[0]&&e[0].ownerDocument||l).createElement("div"),n=0,o=e.length;n<o;n++)t.appendChild(x.oa(e[n]));return t},Ca:function(e,t){for(var n=0,o=e.length,i=[];n<o;n++){var r=e[n].cloneNode(!0);i.push(t?x.oa(r):r)}return i},va:function(e,t){if(x.a.Tb(e),t)for(var n=0,o=t.length;n<o;n++)e.appendChild(t[n])},Xc:function(e,t){var n=e.nodeType?[e]:e;if(0<n.length){for(var o=n[0],i=o.parentNode,r=0,a=t.length;r<a;r++)i.insertBefore(t[r],o);for(r=0,a=n.length;r<a;r++)x.removeNode(n[r])}},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],o=e[e.length-1];for(e.length=0;n!==o;)e.push(n),n=n.nextSibling;e.push(o)}}return e},Zc:function(e,t){7>y?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 x.a.vd(e,e.ownerDocument.documentElement)},kd:function(e){return!!x.a.Lb(e,x.a.Sb)},R:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Ac:function(e){return x.onError?function(){try{return e.apply(this,arguments)}catch(e){throw x.onError&&x.onError(e),e}}:e},setTimeout:function(e,t){return setTimeout(x.a.Ac(e),t)},Gc:function(e){setTimeout((function(){throw x.onError&&x.onError(e),e}),0)},B:function(e,t,n){var o=x.a.Ac(n);if(n=f[t],x.options.useOnlyNativeEvents||n||!c)if(n||"function"!=typeof e.addEventListener){if(void 0===e.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var i=function(t){o.call(e,t)},r="on"+t;e.attachEvent(r,i),x.a.K.za(e,(function(){e.detachEvent(r,i)}))}else e.addEventListener(t,o,!1);else g||(g="function"==typeof c(e).on?"on":"bind"),c(e)[g](t,o)},Fb:function(e,t){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var n;if(n=!("input"!==x.a.R(e)||!e.type||"click"!=t.toLowerCase())&&("checkbox"==(n=e.type)||"radio"==n),x.options.useOnlyNativeEvents||!c||n)if("function"==typeof l.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(n=l.createEvent(m[t]||"HTMLEvents")).initEvent(t,!0,!0,s,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(n)}else if(n&&e.click)e.click();else{if(void 0===e.fireEvent)throw Error("Browser doesn't support triggering events");e.fireEvent("on"+t)}else c(e).trigger(t)},f:function(e){return x.O(e)?e():e},bc:function(e){return x.O(e)?e.v():e},Eb:function(e,t,n){var i;t&&("object"==typeof e.classList?(i=e.classList[n?"add":"remove"],x.a.D(t.match(v),(function(t){i.call(e.classList,t)}))):"string"==typeof e.className.baseVal?o(e.className,"baseVal",t,n):o(e,"className",t,n))},Bb:function(e,t){var n=x.a.f(t);null!==n&&n!==a||(n="");var o=x.h.firstChild(e);!o||3!=o.nodeType||x.h.nextSibling(o)?x.h.va(e,[e.ownerDocument.createTextNode(n)]):o.data=n,x.a.Ad(e)},Yc:function(e,t){if(e.name=t,7>=y)try{var n=e.name.replace(/[&<>'"]/g,(function(e){return"&#"+e.charCodeAt(0)+";"}));e.mergeAttributes(l.createElement("<input name='"+n+"'/>"),!1)}catch(e){}},Ad:function(e){9<=y&&(e=1==e.nodeType?e:e.parentNode).style&&(e.style.zoom=e.style.zoom)},wd:function(e){if(y){var t=e.style.width;e.style.width=0,e.style.width=t}},Pd:function(e,t){e=x.a.f(e),t=x.a.f(t);for(var n=[],o=e;o<=t;o++)n.push(o);return n},la:function(e){for(var t=[],n=0,o=e.length;n<o;n++)t.push(e[n]);return t},Da:function(e){return d?Symbol(e):e},Zd:6===y,$d:7===y,W:y,Lc:function(e,t){for(var n=x.a.la(e.getElementsByTagName("input")).concat(x.a.la(e.getElementsByTagName("textarea"))),o="string"==typeof t?function(e){return e.name===t}:function(e){return t.test(e.name)},i=[],r=n.length-1;0<=r;r--)o(n[r])&&i.push(n[r]);return i},Nd:function(e){return"string"==typeof e&&(e=x.a.Db(e))?p&&p.parse?p.parse(e):new Function("return "+e)():null},hc:function(e,t,n){if(!p||!p.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 p.stringify(x.a.f(e),t,n)},Od:function(t,n,o){var i=(o=o||{}).params||{},r=o.includeFields||this.Jc,a=t;if("object"==typeof t&&"form"===x.a.R(t)){a=t.action;for(var s=r.length-1;0<=s;s--)for(var u=x.a.Lc(t,r[s]),c=u.length-1;0<=c;c--)i[u[c].name]=u[c].value}n=x.a.f(n);var p=l.createElement("form");for(var d in p.style.display="none",p.action=a,p.method="post",n)(t=l.createElement("input")).type="hidden",t.name=d,t.value=x.a.hc(x.a.f(n[d])),p.appendChild(t);e(i,(function(e,t){var n=l.createElement("input");n.type="hidden",n.name=e,n.value=t,p.appendChild(n)})),l.body.appendChild(p),o.submitter?o.submitter(p):p.submit(),setTimeout((function(){p.parentNode.removeChild(p)}),0)}}}(),x.b("utils",x.a),x.b("utils.arrayForEach",x.a.D),x.b("utils.arrayFirst",x.a.Lb),x.b("utils.arrayFilter",x.a.jb),x.b("utils.arrayGetDistinctValues",x.a.wc),x.b("utils.arrayIndexOf",x.a.A),x.b("utils.arrayMap",x.a.Mb),x.b("utils.arrayPushAll",x.a.Nb),x.b("utils.arrayRemoveItem",x.a.Pa),x.b("utils.cloneNodes",x.a.Ca),x.b("utils.createSymbolOrString",x.a.Da),x.b("utils.extend",x.a.extend),x.b("utils.fieldsIncludedWithJsonPost",x.a.Jc),x.b("utils.getFormFields",x.a.Lc),x.b("utils.objectMap",x.a.Ga),x.b("utils.peekObservable",x.a.bc),x.b("utils.postJson",x.a.Od),x.b("utils.parseJson",x.a.Nd),x.b("utils.registerEventHandler",x.a.B),x.b("utils.stringifyJson",x.a.hc),x.b("utils.range",x.a.Pd),x.b("utils.toggleDomNodeCssClass",x.a.Eb),x.b("utils.triggerEvent",x.a.Fb),x.b("utils.unwrapObservable",x.a.f),x.b("utils.objectForEach",x.a.P),x.b("utils.addOrRemoveItem",x.a.Na),x.b("utils.setTextContent",x.a.Bb),x.b("unwrap",x.a.f),Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(1===arguments.length)return function(){return t.apply(e,arguments)};var n=Array.prototype.slice.call(arguments,1);return function(){var o=n.slice(0);return o.push.apply(o,arguments),t.apply(e,o)}}),x.a.g=new function(){var e,t,n=0,o="__ko__"+(new Date).getTime(),i={};return x.a.W?(e=function(e,t){var r=e[o];if(!r||"null"===r||!i[r]){if(!t)return a;r=e[o]="ko"+n++,i[r]={}}return i[r]},t=function(e){var t=e[o];return!!t&&(delete i[t],e[o]=null,!0)}):(e=function(e,t){var n=e[o];return!n&&t&&(n=e[o]={}),n},t=function(e){return!!e[o]&&(delete e[o],!0)}),{get:function(t,n){var o=e(t,!1);return o&&o[n]},set:function(t,n,o){(t=e(t,o!==a))&&(t[n]=o)},Ub:function(t,n,o){return(t=e(t,!0))[n]||(t[n]=o)},clear:t,Z:function(){return n+++o}}},x.b("utils.domData",x.a.g),x.b("utils.domData.clear",x.a.g.clear),x.a.K=new function(){function e(e,t){var n=x.a.g.get(e,o);return n===a&&t&&(n=[],x.a.g.set(e,o,n)),n}function t(t){if(o=e(t,!1))for(var o=o.slice(0),i=0;i<o.length;i++)o[i](t);x.a.g.clear(t),x.a.K.cleanExternalData(t),r[t.nodeType]&&n(t.childNodes,!0)}function n(e,n){for(var o,i=[],r=0;r<e.length;r++)if((!n||8===e[r].nodeType)&&(t(i[i.length]=o=e[r]),e[r]!==o))for(;r--&&-1==x.a.A(i,e[r]););}var o=x.a.g.Z(),i={1:!0,8:!0,9:!0},r={1:!0,9:!0};return{za:function(t,n){if("function"!=typeof n)throw Error("Callback must be a function");e(t,!0).push(n)},yb:function(t,n){var i=e(t,!1);i&&(x.a.Pa(i,n),0==i.length&&x.a.g.set(t,o,a))},oa:function(e){return x.u.G((function(){i[e.nodeType]&&(t(e),r[e.nodeType]&&n(e.getElementsByTagName("*")))})),e},removeNode:function(e){x.oa(e),e.parentNode&&e.parentNode.removeChild(e)},cleanExternalData:function(e){c&&"function"==typeof c.cleanData&&c.cleanData([e])}}},x.oa=x.a.K.oa,x.removeNode=x.a.K.removeNode,x.b("cleanNode",x.oa),x.b("removeNode",x.removeNode),x.b("utils.domNodeDisposal",x.a.K),x.b("utils.domNodeDisposal.addDisposeCallback",x.a.K.za),x.b("utils.domNodeDisposal.removeDisposeCallback",x.a.K.yb),m=[0,"",""],v={thead:g=[1,"<table>","</table>"],tbody:g,tfoot:g,tr:[2,"<table><tbody>","</tbody></table>"],td:f=[3,"<table><tbody><tr>","</tr></tbody></table>"],th:f,option:y=[1,"<select multiple='multiple'>","</select>"],optgroup:y},b=8>=x.a.W,x.a.ua=function(e,t){var n;if(c){if(c.parseHTML)n=c.parseHTML(e,t)||[];else if((n=c.clean([e],t))&&n[0]){for(var o=n[0];o.parentNode&&11!==o.parentNode.nodeType;)o=o.parentNode;o.parentNode&&o.parentNode.removeChild(o)}}else{(n=t)||(n=l),o=n.parentWindow||n.defaultView||s;var i,r=x.a.Db(e).toLowerCase(),a=n.createElement("div");for(i=(r=r.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&v[r[1]]||m,r=i[0],i="ignored<div>"+i[1]+e+i[2]+"</div>","function"==typeof o.innerShiv?a.appendChild(o.innerShiv(i)):(b&&n.body.appendChild(a),a.innerHTML=i,b&&a.parentNode.removeChild(a));r--;)a=a.lastChild;n=x.a.la(a.lastChild.childNodes)}return n},x.a.Md=function(e,t){var n=x.a.ua(e,t);return n.length&&n[0].parentElement||x.a.Yb(n)},x.a.fc=function(e,t){if(x.a.Tb(e),null!==(t=x.a.f(t))&&t!==a)if("string"!=typeof t&&(t=t.toString()),c)c(e).html(t);else for(var n=x.a.ua(t,e.ownerDocument),o=0;o<n.length;o++)e.appendChild(n[o])},x.b("utils.parseHtmlFragment",x.a.ua),x.b("utils.setHtml",x.a.fc),x.aa=function(){var e={};return{Xb:function(t){if("function"!=typeof t)throw Error("You can only pass a function to ko.memoization.memoize()");var n=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return e[n]=t,"\x3c!--[ko_memo:"+n+"]--\x3e"},bd:function(t,n){var o=e[t];if(o===a)throw Error("Couldn't find any memo with ID "+t+". Perhaps it's already been unmemoized.");try{return o.apply(null,n||[]),!0}finally{delete e[t]}},cd:function(e,t){var n=[];!function e(t,n){if(t)if(8==t.nodeType)null!=(o=x.aa.Uc(t.nodeValue))&&n.push({ud:t,Kd:o});else if(1==t.nodeType)for(var o=0,i=t.childNodes,r=i.length;o<r;o++)e(i[o],n)}(e,n);for(var o=0,i=n.length;o<i;o++){var r=n[o].ud,a=[r];t&&x.a.Nb(a,t),x.aa.bd(n[o].Kd,a),r.nodeValue="",r.parentNode&&r.parentNode.removeChild(r)}},Uc:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:null}}}(),x.b("memoization",x.aa),x.b("memoization.memoize",x.aa.Xb),x.b("memoization.unmemoize",x.aa.bd),x.b("memoization.parseMemoText",x.aa.Uc),x.b("memoization.unmemoizeDomNodeAndDescendants",x.aa.cd),x.na=function(){function e(){if(o)for(var e,t=o,i=0;r<o;)if(e=n[r++]){if(r>t){if(5e3<=++i){r=o,x.a.Gc(Error("'Too much recursion' after processing "+i+" task groups."));break}t=o}try{e()}catch(e){x.a.Gc(e)}}}function t(){e(),r=o=n.length=0}var n=[],o=0,i=1,r=0;return{scheduler:s.MutationObserver?function(e){var t=l.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(t):l&&"onreadystatechange"in l.createElement("script")?function(e){var t=l.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,l.documentElement.removeChild(t),t=null,e()},l.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},zb:function(e){return o||x.na.scheduler(t),n[o++]=e,i++},cancel:function(e){(e-=i-o)>=r&&e<o&&(n[e]=null)},resetForTesting:function(){var e=o-r;return r=o=n.length=0,e},Sd:e}}(),x.b("tasks",x.na),x.b("tasks.schedule",x.na.zb),x.b("tasks.runEarly",x.na.Sd),x.Ta={throttle:function(e,t){e.throttleEvaluation=t;var n=null;return x.$({read:e,write:function(o){clearTimeout(n),n=x.a.setTimeout((function(){e(o)}),t)}})},rateLimit:function(e,t){var n,r,a;"number"==typeof t?n=t:(n=t.timeout,r=t.method),e.Hb=!1,a="function"==typeof r?r:"notifyWhenChangesStop"==r?i:o,e.ub((function(e){return a(e,n,t)}))},deferred:function(e,t){if(!0!==t)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");e.Hb||(e.Hb=!0,e.ub((function(t){var n,o=!1;return function(){if(!o){x.na.cancel(n),n=x.na.zb(t);try{o=!0,e.notifySubscribers(a,"dirty")}finally{o=!1}}}})))},notify:function(e,t){e.equalityComparer="always"==t?null:n}};var C={undefined:1,boolean:1,number:1,string:1};x.b("extenders",x.Ta),x.ic=function(e,t,n){this.da=e,this.lc=t,this.mc=n,this.Ib=!1,this.fb=this.Jb=null,x.L(this,"dispose",this.s),x.L(this,"disposeWhenNodeIsRemoved",this.l)},x.ic.prototype.s=function(){this.Ib||(this.fb&&x.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},x.ic.prototype.l=function(e){this.Jb=e,x.a.K.za(e,this.fb=this.s.bind(this))},x.T=function(){x.a.Ab(this,w),w.qb(this)};var w={qb:function(e){e.U={change:[]},e.sc=1},subscribe:function(e,t,n){var o=this;n=n||"change";var i=new x.ic(o,t?e.bind(t):e,(function(){x.a.Pa(o.U[n],i),o.hb&&o.hb(n)}));return o.Qa&&o.Qa(n),o.U[n]||(o.U[n]=[]),o.U[n].push(i),i},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{x.u.xc();for(var o,i=0;o=n[i];++i)o.Ib||o.lc(e)}finally{x.u.end()}}},ob:function(){return this.sc},Dd:function(e){return this.ob()!==e},Gb:function(){++this.sc},ub:function(e){var t,n,o,i,a,s=this,l=x.O(s);s.gb||(s.gb=s.notifySubscribers,s.notifySubscribers=r);var u=e((function(){s.Ja=!1,l&&i===s&&(i=s.nc?s.nc():s());var e=n||a&&s.sb(o,i);a=n=t=!1,e&&s.gb(o=i)}));s.qc=function(e,n){n&&s.Ja||(a=!n),s.ed=s.U.change.slice(0),s.Ja=t=!0,i=e,u()},s.pc=function(e){t||(o=e,s.gb(e,"beforeChange"))},s.rc=function(){a=!0},s.gd=function(){s.sb(o,s.v(!0))&&(n=!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 t=0;return x.a.P(this.U,(function(e,n){"dirty"!==e&&(t+=n.length)})),t},sb:function(e,t){return!this.equalityComparer||!this.equalityComparer(e,t)},toString:function(){return"[object Object]"},extend:function(e){var t=this;return e&&x.a.P(e,(function(e,n){var o=x.Ta[e];"function"==typeof o&&(t=o(t,n)||t)})),t}};x.L(w,"init",w.qb),x.L(w,"subscribe",w.subscribe),x.L(w,"extend",w.extend),x.L(w,"getSubscriptionsCount",w.Bd),x.a.Ba&&x.a.setPrototypeOf(w,Function.prototype),x.T.fn=w,x.Qc=function(e){return null!=e&&"function"==typeof e.subscribe&&"function"==typeof e.notifySubscribers},x.b("subscribable",x.T),x.b("isSubscribable",x.Qc),x.S=x.u=function(){function e(e){o.push(n),n=e}function t(){n=o.pop()}var n,o=[],i=0;return{xc:e,end:t,cc:function(e){if(n){if(!x.Qc(e))throw Error("Only subscribable things can act as dependencies");n.od.call(n.pd,e,e.fd||(e.fd=++i))}},G:function(n,o,i){try{return e(),n.apply(o,i||[])}finally{t()}},qa:function(){if(n)return n.o.qa()},Va:function(){if(n)return n.o.Va()},Ya:function(){if(n)return n.Ya},o:function(){if(n)return n.o}}}(),x.b("computedContext",x.S),x.b("computedContext.getDependenciesCount",x.S.qa),x.b("computedContext.getDependencies",x.S.Va),x.b("computedContext.isInitial",x.S.Ya),x.b("computedContext.registerDependency",x.S.cc),x.b("ignoreDependencies",x.Yd=x.u.G);var P=x.a.Da("_latestValue");x.ta=function(e){function t(){return 0<arguments.length?(t.sb(t[P],arguments[0])&&(t.ya(),t[P]=arguments[0],t.xa()),this):(x.u.cc(t),t[P])}return t[P]=e,x.a.Ba||x.a.extend(t,x.T.fn),x.T.fn.qb(t),x.a.Ab(t,k),x.options.deferUpdates&&x.Ta.deferred(t,!0),t};var k={equalityComparer:n,v:function(){return this[P]},xa:function(){this.notifySubscribers(this[P],"spectate"),this.notifySubscribers(this[P])},ya:function(){this.notifySubscribers(this[P],"beforeChange")}};x.a.Ba&&x.a.setPrototypeOf(k,x.T.fn);var V=x.ta.Ma="__ko_proto__";k[V]=x.ta,x.O=function(e){if((e="function"==typeof e&&e[V])&&e!==k[V]&&e!==x.o.fn[V])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e},x.Za=function(e){return"function"==typeof e&&(e[V]===k[V]||e[V]===x.o.fn[V]&&e.Nc)},x.b("observable",x.ta),x.b("isObservable",x.O),x.b("isWriteableObservable",x.Za),x.b("isWritableObservable",x.Za),x.b("observable.fn",k),x.L(k,"peek",k.v),x.L(k,"valueHasMutated",k.xa),x.L(k,"valueWillMutate",k.ya),x.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=x.ta(e),x.a.Ab(e,x.Ha.fn),e.extend({trackArrayChanges:!0})},x.Ha.fn={remove:function(e){for(var t=this.v(),n=[],o="function"!=typeof e||x.O(e)?function(t){return t===e}:e,i=0;i<t.length;i++){var r=t[i];if(o(r)){if(0===n.length&&this.ya(),t[i]!==r)throw Error("Array modified during remove; cannot remove item");n.push(r),t.splice(i,1),i--}}return n.length&&this.xa(),n},removeAll:function(e){if(e===a){var t=this.v(),n=t.slice(0);return this.ya(),t.splice(0,t.length),this.xa(),n}return e?this.remove((function(t){return 0<=x.a.A(e,t)})):[]},destroy:function(e){var t=this.v(),n="function"!=typeof e||x.O(e)?function(t){return t===e}:e;this.ya();for(var o=t.length-1;0<=o;o--){var i=t[o];n(i)&&(i._destroy=!0)}this.xa()},destroyAll:function(e){return e===a?this.destroy((function(){return!0})):e?this.destroy((function(t){return 0<=x.a.A(e,t)})):[]},indexOf:function(e){var t=this();return x.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()}},x.a.Ba&&x.a.setPrototypeOf(x.Ha.fn,x.ta.fn),x.a.D("pop push reverse shift sort splice unshift".split(" "),(function(e){x.Ha.fn[e]=function(){var t=this.v();this.ya(),this.zc(t,e,arguments);var n=t[e].apply(t,arguments);return this.xa(),n===t?this:n}})),x.a.D(["slice"],(function(e){x.Ha.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}})),x.Pc=function(e){return x.O(e)&&"function"==typeof e.remove&&"function"==typeof e.push},x.b("observableArray",x.Ha),x.b("isObservableArray",x.Pc),x.Ta.trackArrayChanges=function(e,t){function n(){function t(){if(u){var t,n=[].concat(e.v()||[]);e.Wa("arrayChange")&&((!l||1<u)&&(l=x.a.Pb(r,n,e.Ob)),t=l),r=n,l=null,u=0,t&&t.length&&e.notifySubscribers(t,"arrayChange")}}s?t():(s=!0,i=e.subscribe((function(){++u}),null,"spectate"),r=[].concat(e.v()||[]),l=null,o=e.subscribe(t))}if(e.Ob={},t&&"object"==typeof t&&x.a.extend(e.Ob,t),e.Ob.sparse=!0,!e.zc){var o,i,r,s=!1,l=null,u=0,c=e.Qa,p=e.hb;e.Qa=function(t){c&&c.call(e,t),"arrayChange"===t&&n()},e.hb=function(t){p&&p.call(e,t),"arrayChange"!==t||e.Wa("arrayChange")||(o&&o.s(),i&&i.s(),i=o=null,s=!1,r=a)},e.zc=function(e,t,n){function o(e,t,n){return i[i.length]={status:e,value:t,index:n}}if(s&&!u){var i=[],r=e.length,a=n.length,c=0;switch(t){case"push":c=r;case"unshift":for(t=0;t<a;t++)o("added",n[t],c+t);break;case"pop":c=r-1;case"shift":r&&o("deleted",e[c],c);break;case"splice":t=Math.min(Math.max(0,0>n[0]?r+n[0]:n[0]),r),r=1===a?r:Math.min(t+(n[1]||0),r),a=t+a-2,c=Math.max(r,a);for(var p=[],d=[],h=2;t<c;++t,++h)t<r&&d.push(o("deleted",e[t],t)),t<a&&p.push(o("added",n[h],t));x.a.Kc(d,p);break;default:return}l=i}}}};var _=x.a.Da("_state");x.o=x.$=function(e,t,n){function o(){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(r.nb,arguments),this}return r.ra||x.u.cc(o),(r.ka||r.J&&o.Xa())&&o.ha(),r.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,r={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 o[_]=r,o.Nc="function"==typeof i,x.a.Ba||x.a.extend(o,x.T.fn),x.T.fn.qb(o),x.a.Ab(o,T),n.pure?(r.wb=!0,r.J=!0,x.a.extend(o,S)):n.deferEvaluation&&x.a.extend(o,E),x.options.deferUpdates&&x.Ta.deferred(o,!0),r.l&&(r.jc=!0,r.l.nodeType||(r.l=null)),r.J||n.deferEvaluation||o.ha(),r.l&&o.ja()&&x.a.K.za(r.l,r.Rb=function(){o.s()}),o};var T={equalityComparer:n,qa:function(){return this[_].V},Va:function(){var e=[];return x.a.P(this[_].I,(function(t,n){e[n.Ka]=n.da})),e},Vb:function(e){if(!this[_].V)return!1;var t=this.Va();return-1!==x.a.A(t,e)||!!x.a.Lb(t,(function(t){return t.Vb&&t.Vb(e)}))},uc:function(e,t,n){if(this[_].wb&&t===this)throw Error("A 'pure' computed must not be called recursively");this[_].I[e]=n,n.Ka=this[_].V++,n.La=t.ob()},Xa:function(){var e,t,n=this[_].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[_].rb&&this.Ia(!1)},ja:function(){var e=this[_];return e.ka||0<e.V},Rd:function(){this.Ja?this[_].ka&&(this[_].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[_].Ic),this[_].Ic=x.a.setTimeout((function(){e.ha(!0)}),t)):e.Ia?e.Ia(!0):e.ha(!0)},ha:function(e){var t=this[_],n=t.Sa,o=!1;if(!t.rb&&!t.ra){if(t.l&&!x.a.Sb(t.l)||n&&n()){if(!t.jc)return void this.s()}else t.jc=!1;t.rb=!0;try{o=this.zd(e)}finally{t.rb=!1}return o}},zd:function(e){var t=this[_],n=!1,o=t.wb?a:!t.V;n={qd:this,mb:t.I,Qb:t.V},x.u.xc({pd:n,od:h,o:this,Ya:o}),t.I={},t.V=0;var i=this.yd(t,n);return t.V?n=this.sb(t.X,i):(this.s(),n=!0),n&&(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()),o&&this.notifySubscribers(t.X,"awake"),n},yd:function(e,t){try{var n=e.Wc;return e.nb?n.call(e.nb):n()}finally{x.u.end(),t.Qb&&!e.J&&x.a.P(t.mb,d),e.sa=e.ka=!1}},v:function(e){var t=this[_];return(t.ka&&(e||!t.V)||t.J&&this.Xa())&&this.ha(),t.X},ub:function(e){x.T.fn.ub.call(this,e),this.nc=function(){return this[_].J||(this[_].sa?this.ha():this[_].ka=!1),this[_].X},this.Ia=function(e){this.pc(this[_].X),this[_].ka=!0,e&&(this[_].sa=!0),this.qc(this,!e)}},s:function(){var e=this[_];!e.J&&e.I&&x.a.P(e.I,(function(e,t){t.s&&t.s()})),e.l&&e.Rb&&x.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)}},S={Qa:function(e){var t=this,n=t[_];if(!n.ra&&n.J&&"change"==e){if(n.J=!1,n.sa||t.Xa())n.I=null,n.V=0,t.ha()&&t.Gb();else{var o=[];x.a.P(n.I,(function(e,t){o[t.Ka]=e})),x.a.D(o,(function(e,o){var i=n.I[e],r=t.$c(i.da);r.Ka=o,r.La=i.La,n.I[e]=r})),t.Xa()&&t.ha()&&t.Gb()}n.ra||t.notifySubscribers(n.X,"awake")}},hb:function(e){var t=this[_];t.ra||"change"!=e||this.Wa("change")||(x.a.P(t.I,(function(e,n){n.s&&(t.I[e]={da:n.da,Ka:n.Ka,La:n.La},n.s())})),t.J=!0,this.notifySubscribers(a,"asleep"))},ob:function(){var e=this[_];return e.J&&(e.sa||this.Xa())&&this.ha(),x.T.fn.ob.call(this)}},E={Qa:function(e){"change"!=e&&"beforeChange"!=e||this.v()}};x.a.Ba&&x.a.setPrototypeOf(T,x.T.fn);var R=x.ta.Ma;T[R]=x.o,x.Oc=function(e){return"function"==typeof e&&e[R]===T[R]},x.Fd=function(e){return x.Oc(e)&&e[_]&&e[_].wb},x.b("computed",x.o),x.b("dependentObservable",x.o),x.b("isComputed",x.Oc),x.b("isPureComputed",x.Fd),x.b("computed.fn",T),x.L(T,"peek",T.v),x.L(T,"dispose",T.s),x.L(T,"isActive",T.ja),x.L(T,"getDependenciesCount",T.qa),x.L(T,"getDependencies",T.Va),x.xb=function(e,t){return"function"==typeof e?x.o(e,t,{pure:!0}):((e=x.a.extend({},e)).pure=!0,x.o(e,t))},x.b("pureComputed",x.xb),function(){function e(n,o,i){if(i=i||new t,"object"!=typeof(n=o(n))||null===n||n===a||n instanceof RegExp||n instanceof Date||n instanceof String||n instanceof Number||n instanceof Boolean)return n;var r=n instanceof Array?[]:{};return i.save(n,r),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)}(n,(function(t){var s=o(n[t]);switch(typeof s){case"boolean":case"number":case"string":case"function":r[t]=s;break;case"object":case"undefined":var l=i.get(s);r[t]=l!==a?l:e(s,o,i)}})),r}function t(){this.keys=[],this.values=[]}x.ad=function(t){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return e(t,(function(e){for(var t=0;x.O(e)&&10>t;t++)e=e();return e}))},x.toJSON=function(e,t,n){return e=x.ad(e),x.a.hc(e,t,n)},t.prototype={constructor:t,save:function(e,t){var n=x.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=x.a.A(this.keys,e))?this.values[e]:a}}}(),x.b("toJS",x.ad),x.b("toJSON",x.toJSON),x.Wd=function(e,t,n){function o(t){var o=x.xb(e,n).extend({ma:"always"}),i=o.subscribe((function(e){e&&(i.s(),t(e))}));return o.notifySubscribers(o.v()),i}return"function"!=typeof Promise||t?o(t.bind(n)):new Promise(o)},x.b("when",x.Wd),x.w={M:function(e){switch(x.a.R(e)){case"option":return!0===e.__ko__hasDomDataOptionValue__?x.a.g.get(e,x.c.options.$b):7>=x.a.W?e.getAttributeNode("value")&&e.getAttributeNode("value").specified?e.value:e.text:e.value;case"select":return 0<=e.selectedIndex?x.w.M(e.options[e.selectedIndex]):a;default:return e.value}},cb:function(e,t,n){switch(x.a.R(e)){case"option":"string"==typeof t?(x.a.g.set(e,x.c.options.$b,a),"__ko__hasDomDataOptionValue__"in e&&delete e.__ko__hasDomDataOptionValue__,e.value=t):(x.a.g.set(e,x.c.options.$b,t),e.__ko__hasDomDataOptionValue__=!0,e.value="number"==typeof t?t:"");break;case"select":""!==t&&null!==t||(t=a);for(var o,i=-1,r=0,s=e.options.length;r<s;++r)if((o=x.w.M(e.options[r]))==t||""===o&&t===a){i=r;break}(n||0<=i||t===a&&1<e.size)&&(e.selectedIndex=i,6===x.a.W&&x.a.setTimeout((function(){e.selectedIndex=i}),0));break;default:null!==t&&t!==a||(t=""),e.value=t}}},x.b("selectExtensions",x.w),x.b("selectExtensions.readValue",x.w.M),x.b("selectExtensions.writeValue",x.w.cb),x.m=function(){function e(e){123===(e=x.a.Db(e)).charCodeAt(0)&&(e=e.slice(1,-1));var t,n=[],a=(e+="\n,").match(o),s=[],l=0;if(1<a.length){for(var u,c=0;u=a[c];++c){var p=u.charCodeAt(0);if(44===p){if(0>=l){n.push(t&&s.length?{key:t,value:s.join("")}:{unknown:t||s.join("")}),t=l=0,s=[];continue}}else if(58===p){if(!l&&!t&&1===s.length){t=s.pop();continue}}else{if(47===p&&1<u.length&&(47===u.charCodeAt(1)||42===u.charCodeAt(1)))continue;47===p&&c&&1<u.length?(p=a[c-1].match(i))&&!r[p[0]]&&(a=(e=e.substr(e.indexOf(u)+1)).match(o),c=-1,u="/"):40===p||123===p||91===p?++l:41===p||125===p||93===p?--l:t||s.length||34!==p&&39!==p||(u=u.slice(1,-1))}s.push(u)}if(0<l)throw Error("Unbalanced parentheses, braces, or brackets")}return n}var t=["true","false","null","undefined"],n=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,o=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),i=/[\])"'A-Za-z0-9_$]+$/,r={in:1,return:1,typeof:1},a={};return{Ra:[],wa:a,ac:e,vb:function(o,i){function r(e,o){var i;if(!c){var p=x.getBindingHandler(e);if(p&&p.preprocess&&!(o=p.preprocess(o,e,r)))return;(p=a[e])&&(i=o,0<=x.a.A(t,i)?i=!1:(p=i.match(n),i=null!==p&&(p[1]?"Object("+p[1]+")"+p[2]:i)),p=i),p&&l.push("'"+("string"==typeof a[e]?a[e]:e)+"':function(_z){"+i+"=_z}")}u&&(o="function(){return "+o+" }"),s.push("'"+e+"':"+o)}var s=[],l=[],u=(i=i||{}).valueAccessors,c=i.bindingParams,p="string"==typeof o?e(o):o;return x.a.D(p,(function(e){r(e.key||e.unknown,e.value)})),l.length&&r("_ko_property_writers","{"+l.join(",")+" }"),s.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,o,i){e&&x.O(e)?!x.Za(e)||i&&e.v()===o||e(o):(e=t.get("_ko_property_writers"))&&e[n]&&e[n](o)}}}(),x.b("expressionRewriting",x.m),x.b("expressionRewriting.bindingRewriteValidators",x.m.Ra),x.b("expressionRewriting.parseObjectLiteral",x.m.ac),x.b("expressionRewriting.preProcessBindings",x.m.vb),x.b("expressionRewriting._twoWayBindings",x.m.wa),x.b("jsonExpressionRewriting",x.m),x.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",x.m.vb),function(){function e(e){return 8==e.nodeType&&r.test(i?e.text:e.nodeValue)}function t(e){return 8==e.nodeType&&a.test(i?e.text:e.nodeValue)}function n(n,o){for(var i=n,r=1,a=[];i=i.nextSibling;){if(t(i)&&(x.a.g.set(i,u,!0),0==--r))return a;a.push(i),e(i)&&r++}if(!o)throw Error("Cannot find closing comment tag to match: "+n.nodeValue);return null}function o(e,t){var o=n(e,t);return o?0<o.length?o[o.length-1].nextSibling:e.nextSibling:null}var i=l&&"\x3c!--test--\x3e"===l.createComment("test").text,r=i?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,a=i?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,s={ul:!0,ol:!0},u="__ko_matchedEndComment__";x.h={ea:{},childNodes:function(t){return e(t)?n(t):t.childNodes},Ea:function(t){if(e(t))for(var n=0,o=(t=x.h.childNodes(t)).length;n<o;n++)x.removeNode(t[n]);else x.a.Tb(t)},va:function(t,n){if(e(t)){x.h.Ea(t);for(var o=t.nextSibling,i=0,r=n.length;i<r;i++)o.parentNode.insertBefore(n[i],o)}else x.a.va(t,n)},Vc:function(t,n){var o;e(t)?(o=t.nextSibling,t=t.parentNode):o=t.firstChild,o?n!==o&&t.insertBefore(n,o):t.appendChild(n)},Wb:function(t,n,o){o?(o=o.nextSibling,e(t)&&(t=t.parentNode),o?n!==o&&t.insertBefore(n,o):t.appendChild(n)):x.h.Vc(t,n)},firstChild:function(n){if(e(n))return!n.nextSibling||t(n.nextSibling)?null:n.nextSibling;if(n.firstChild&&t(n.firstChild))throw Error("Found invalid end comment, as the first child of "+n);return n.firstChild},nextSibling:function(n){if(e(n)&&(n=o(n)),n.nextSibling&&t(n.nextSibling)){var i=n.nextSibling;if(t(i)&&!x.a.g.get(i,u))throw Error("Found end comment without a matching opening comment, as child of "+n);return null}return n.nextSibling},Cd:e,Vd:function(e){return(e=(i?e.text:e.nodeValue).match(r))?e[1]:null},Sc:function(n){if(s[x.a.R(n)]){var i=n.firstChild;if(i)do{if(1===i.nodeType){var r,a=null;if(r=i.firstChild)do{if(a)a.push(r);else if(e(r)){var l=o(r,!0);l?r=l:a=[r]}else t(r)&&(a=[r])}while(r=r.nextSibling);if(r=a)for(a=i.nextSibling,l=0;l<r.length;l++)a?n.insertBefore(r[l],a):n.appendChild(r[l])}}while(i=i.nextSibling)}}}}(),x.b("virtualElements",x.h),x.b("virtualElements.allowedBindings",x.h.ea),x.b("virtualElements.emptyNode",x.h.Ea),x.b("virtualElements.insertAfter",x.h.Wb),x.b("virtualElements.prepend",x.h.Vc),x.b("virtualElements.setDomNodeChildren",x.h.va),x.ga=function(){this.nd={}},x.a.extend(x.ga.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return null!=e.getAttribute("data-bind")||x.j.getComponentNameForNode(e);case 8:return x.h.Cd(e);default:return!1}},getBindings:function(e,t){var n=(n=this.getBindingsString(e,t))?this.parseBindingsString(n,t,e):null;return x.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 x.j.tc(n,e,t,!0)},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return x.h.Vd(e);default:return null}},parseBindingsString:function(e,t,n,o){try{var i,r=this.nd,a=e+(o&&o.valueAccessors||"");if(!(i=r[a])){var s,l="with($context){with($data||{}){return{"+x.m.vb(e,o)+"}}}";s=new Function("$context","$element",l),i=r[a]=s}return i(t,n)}catch(t){throw t.message="Unable to parse bindings.\nBindings value: "+e+"\nMessage: "+t.message,t}}}),x.ga.instance=new x.ga,x.b("bindingProvider",x.ga),function(){function e(e){var t=(e=x.a.g.get(e,C))&&e.N;t&&(e.N=null,t.Tc())}function t(t,n,o){this.node=t,this.yc=n,this.kb=[],this.H=!1,n.N||x.a.K.za(t,e),o&&o.N&&(o.N.kb.push(t),this.Kb=o)}function n(e){return function(){return e}}function o(e){return e()}function i(e){return x.a.Ga(x.u.G(e),(function(t,n){return function(){return e()[n]}}))}function r(e,t,o){return"function"==typeof e?i(e.bind(null,t,o)):x.a.Ga(e,n)}function u(e,t){return i(this.getBindings.bind(this,e,t))}function p(e,t){var n=x.h.firstChild(t);if(n){var o,i=x.ga.instance,r=i.preprocessNode;if(r){for(;o=n;)n=x.h.nextSibling(o),r.call(i,o);n=x.h.firstChild(t)}for(;o=n;)n=x.h.nextSibling(o),d(e,o)}x.i.ma(t,x.i.H)}function d(e,t){var n=e,o=1===t.nodeType;o&&x.h.Sc(t),(o||x.ga.instance.nodeHasBindings(t))&&(n=h(t,null,e).bindingContextForDescendants),n&&!v[x.a.R(t)]&&p(n,t)}function h(e,t,n){var i,r=x.a.g.Ub(e,C,{}),s=r.hd;if(!t){if(s)throw Error("You cannot apply bindings multiple times to the same element.");r.hd=!0}if(s||(r.context=n),r.Zb||(r.Zb={}),t&&"function"!=typeof t)i=t;else{var l=x.ga.instance,c=l.getBindingAccessors||u,p=x.$((function(){return(i=t?t(n,e):c.call(l,e,n))&&(n[g]&&n[g](),n[y]&&n[y]()),i}),null,{l:e});i&&p.ja()||(p=null)}var d,h=n;if(i){var m=function(){return x.a.Ga(p?p():i,o)},f=p?function(e){return function(){return o(p()[e])}}:function(e){return i[e]};m.get=function(e){return i[e]&&o(f(e))},m.has=function(e){return e in i},x.i.H in i&&x.i.subscribe(e,x.i.H,(function(){var t=(0,i[x.i.H])();if(t){var n=x.h.childNodes(e);n.length&&t(n,x.Ec(n[0]))}})),x.i.pa in i&&(h=x.i.Cb(e,n),x.i.subscribe(e,x.i.pa,(function(){var t=(0,i[x.i.pa])();t&&x.h.firstChild(e)&&t(e)}))),r=function(e){var t=[],n={},o=[];return x.a.P(e,(function i(r){if(!n[r]){var a=x.getBindingHandler(r);a&&(a.after&&(o.push(r),x.a.D(a.after,(function(t){if(e[t]){if(-1!==x.a.A(o,t))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+o.join(", "));i(t)}})),o.length--),t.push({key:r,Mc:a})),n[r]=!0}})),t}(i),x.a.D(r,(function(t){var n=t.Mc.init,o=t.Mc.update,r=t.key;if(8===e.nodeType&&!x.h.ea[r])throw Error("The binding '"+r+"' cannot be used with virtual elements");try{"function"==typeof n&&x.u.G((function(){var t=n(e,f(r),m,h.$data,h);if(t&&t.controlsDescendantBindings){if(d!==a)throw Error("Multiple bindings ("+d+" and "+r+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");d=r}})),"function"==typeof o&&x.$((function(){o(e,f(r),m,h.$data,h)}),null,{l:e})}catch(e){throw e.message='Unable to process binding "'+r+": "+i[r]+'"\nMessage: '+e.message,e}}))}return{shouldBindDescendants:r=d===a,bindingContextForDescendants:r&&h}}function m(e,t){return e&&e instanceof x.fa?e:new x.fa(e,a,a,t)}var g=x.a.Da("_subscribable"),f=x.a.Da("_ancestorBindingInfo"),y=x.a.Da("_dataDependency");x.c={};var v={script:!0,textarea:!0,template:!0};x.getBindingHandler=function(e){return x.c[e]};var b={};x.fa=function(e,t,n,o,i){function r(){var e=p?c():c,i=x.a.f(e);return t?(x.a.extend(l,t),f in t&&(l[f]=t[f])):(l.$parents=[],l.$root=i,l.ko=x),l[g]=s,u?i=l.$data:(l.$rawData=e,l.$data=i),n&&(l[n]=i),o&&o(l,t,i),t&&t[g]&&!x.S.o().Vb(t[g])&&t[g](),d&&(l[y]=d),l.$data}var s,l=this,u=e===b,c=u?a:e,p="function"==typeof c&&!x.O(c),d=i&&i.dataDependency;i&&i.exportDependencies?r():((s=x.xb(r)).v(),s.ja()?s.equalityComparer=null:l[g]=a)},x.fa.prototype.createChildContext=function(e,t,n,o){if(!o&&t&&"object"==typeof t&&(t=(o=t).as,n=o.extend),t&&o&&o.noChildContext){var i="function"==typeof e&&!x.O(e);return new x.fa(b,this,null,(function(o){n&&n(o),o[t]=i?e():e}),o)}return new x.fa(e,this,t,(function(e,t){e.$parentContext=t,e.$parent=t.$data,e.$parents=(t.$parents||[]).slice(0),e.$parents.unshift(e.$parent),n&&n(e)}),o)},x.fa.prototype.extend=function(e,t){return new x.fa(b,this,null,(function(t){x.a.extend(t,"function"==typeof e?e(t):e)}),t)};var C=x.a.g.Z();t.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},t.prototype.sd=function(e){x.a.Pa(this.kb,e),!this.kb.length&&this.H&&this.Cc()},t.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,x.a.K.yb(this.node,e),x.i.ma(this.node,x.i.pa),this.Tc())},x.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(e,t,n,o,i){var r=x.a.g.Ub(e,C,{});return r.Fa||(r.Fa=new x.T),i&&i.notifyImmediately&&r.Zb[t]&&x.u.G(n,o,[e]),r.Fa.subscribe(n,o,t)},ma:function(e,t){var n=x.a.g.get(e,C);if(n&&(n.Zb[t]=!0,n.Fa&&n.Fa.notifySubscribers(e,t),t==x.i.H))if(n.N)n.N.Cc();else if(n.N===a&&n.Fa&&n.Fa.Wa(x.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")},Cb:function(e,n){var o=x.a.g.Ub(e,C,{});return o.N||(o.N=new t(e,o,n[f])),n[f]==o?n:n.extend((function(e){e[f]=o}))}},x.Td=function(e){return(e=x.a.g.get(e,C))&&e.context},x.ib=function(e,t,n){return 1===e.nodeType&&x.h.Sc(e),h(e,t,m(n))},x.ld=function(e,t,n){return n=m(n),x.ib(e,r(t,n,e),n)},x.Oa=function(e,t){1!==t.nodeType&&8!==t.nodeType||p(m(e),t)},x.vc=function(e,t,n){if(!c&&s.jQuery&&(c=s.jQuery),2>arguments.length){if(!(t=l.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else 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");d(m(e,n),t)},x.Dc=function(e){return!e||1!==e.nodeType&&8!==e.nodeType?a:x.Td(e)},x.Ec=function(e){return(e=x.Dc(e))?e.$data:a},x.b("bindingHandlers",x.c),x.b("bindingEvent",x.i),x.b("bindingEvent.subscribe",x.i.subscribe),x.b("bindingEvent.startPossiblyAsyncContentBinding",x.i.Cb),x.b("applyBindings",x.vc),x.b("applyBindingsToDescendants",x.Oa),x.b("applyBindingAccessorsToNode",x.ib),x.b("applyBindingsToNode",x.ld),x.b("contextFor",x.Dc),x.b("dataFor",x.Ec)}(),function(e){function t(t,o){var a,s=Object.prototype.hasOwnProperty.call(i,t)?i[t]:e;s?s.subscribe(o):((s=i[t]=new x.T).subscribe(o),n(t,(function(e,n){var o=!(!n||!n.synchronous);r[t]={definition:e,Gd:o},delete i[t],a||o?s.notifySubscribers(e):x.na.zb((function(){s.notifySubscribers(e)}))})),a=!0)}function n(e,t){o("getConfig",[e],(function(n){n?o("loadComponent",[e,n],(function(e){t(e,n)})):t(null,null)}))}function o(t,n,i,r){r||(r=x.j.loaders.slice(0));var a=r.shift();if(a){var s=a[t];if(s){var l=!1;if(s.apply(a,n.concat((function(e){l?i(null):null!==e?i(e):o(t,n,i,r)})))!==e&&(l=!0,!a.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else o(t,n,i,r)}else i(null)}var i={},r={};x.j={get:function(n,o){var i=Object.prototype.hasOwnProperty.call(r,n)?r[n]:e;i?i.Gd?x.u.G((function(){o(i.definition)})):x.na.zb((function(){o(i.definition)})):t(n,o)},Bc:function(e){delete r[e]},oc:o},x.j.loaders=[],x.b("components",x.j),x.b("components.get",x.j.get),x.b("components.clearCachedDefinition",x.j.Bc)}(),function(){function e(e,t,n,o){function r(){0==--s&&o(a)}var a={},s=2,l=n.template;n=n.viewModel,l?i(t,l,(function(t){x.j.oc("loadTemplate",[e,t],(function(e){a.template=e,r()}))})):r(),n?i(t,n,(function(t){x.j.oc("loadViewModel",[e,t],(function(e){a[u]=e,r()}))})):r()}function n(e){switch(x.a.R(e)){case"script":return x.a.ua(e.text);case"textarea":return x.a.ua(e.value);case"template":if(o(e.content))return x.a.Ca(e.content.childNodes)}return x.a.Ca(e.childNodes)}function o(e){return s.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function i(e,n,o){"string"==typeof n.require?t||s.require?(t||s.require)([n.require],(function(e){e&&"object"==typeof e&&e.Xd&&e.default&&(e=e.default),o(e)})):e("Uses require, but no AMD loader is present"):o(n)}function r(e){return function(t){throw Error("Component '"+e+"': "+t)}}var a={};x.j.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(x.j.tb(e))throw Error("Component "+e+" is already registered");a[e]=t},x.j.tb=function(e){return Object.prototype.hasOwnProperty.call(a,e)},x.j.unregister=function(e){delete a[e],x.j.Bc(e)},x.j.Fc={getConfig:function(e,t){t(x.j.tb(e)?a[e]:null)},loadComponent:function(t,n,o){var a=r(t);i(a,n,(function(n){e(t,a,n,o)}))},loadTemplate:function(e,t,i){if(e=r(e),"string"==typeof t)i(x.a.ua(t));else if(t instanceof Array)i(t);else if(o(t))i(x.a.la(t.childNodes));else if(t.element)if(t=t.element,s.HTMLElement?t instanceof HTMLElement:t&&t.tagName&&1===t.nodeType)i(n(t));else if("string"==typeof t){var a=l.getElementById(t);a?i(n(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,o){if("function"==typeof n)o((function(e){return new n(e)}));else if("function"==typeof n[u])o(n[u]);else if("instance"in n){var i=n.instance;o((function(){return i}))}else"viewModel"in n?e(t,n.viewModel,o):t("Unknown viewModel value: "+n)}(r(e),t,n)}};var u="createViewModel";x.b("components.register",x.j.register),x.b("components.isRegistered",x.j.tb),x.b("components.unregister",x.j.unregister),x.b("components.defaultLoader",x.j.Fc),x.j.loaders.push(x.j.Fc),x.j.dd=a}(),function(){function e(e,n){if(o=e.getAttribute("params")){var o=t.parseBindingsString(o,n,e,{valueAccessors:!0,bindingParams:!0}),i=(o=x.a.Ga(o,(function(t){return x.o(t,null,{l:e})})),x.a.Ga(o,(function(t){var n=t.v();return t.ja()?x.o({read:function(){return x.a.f(t())},write:x.Za(n)&&function(e){t()(e)},l:e}):n})));return Object.prototype.hasOwnProperty.call(i,"$raw")||(i.$raw=o),i}return{$raw:{}}}x.j.getComponentNameForNode=function(e){var t=x.a.R(e);if(x.j.tb(t)&&(-1!=t.indexOf("-")||"[object HTMLUnknownElement]"==""+e||8>=x.a.W&&e.tagName===t))return t},x.j.tc=function(t,n,o,i){if(1===n.nodeType){var r=x.j.getComponentNameForNode(n);if(r){if((t=t||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var a={name:r,params:e(n,o)};t.component=i?function(){return a}:a}}return t};var t=new x.ga;9>x.a.W&&(x.j.register=function(e){return function(t){return e.apply(this,arguments)}}(x.j.register),l.createDocumentFragment=function(e){return function(){var t,n=e(),o=x.j.dd;for(t in o);return n}}(l.createDocumentFragment))}(),function(){var e=0;x.c.component={init:function(t,n,o,i,r){function a(){var e=s&&s.dispose;"function"==typeof e&&e.call(s),u&&u.s(),l=s=u=null}var s,l,u,c=x.a.la(x.h.childNodes(t));return x.h.Ea(t),x.a.K.za(t,a),x.o((function(){var o,i,p=x.a.f(n());if("string"==typeof p?o=p:(o=x.a.f(p.name),i=x.a.f(p.params)),!o)throw Error("No component name specified");var d=x.i.Cb(t,r),h=l=++e;x.j.get(o,(function(e){if(l===h){if(a(),!e)throw Error("Unknown component '"+o+"'");!function(e,t,n){if(!(t=t.template))throw Error("Component '"+e+"' has no template");e=x.a.Ca(t),x.h.va(n,e)}(o,e,t);var n=function(e,t,n){var o=e.createViewModel;return o?o.call(e,t,n):t}(e,i,{element:t,templateNodes:c});e=d.createChildContext(n,{extend:function(e){e.$component=n,e.$componentTemplateNodes=c}}),n&&n.koDescendantsComplete&&(u=x.i.subscribe(t,x.i.pa,n.koDescendantsComplete,n)),s=n,x.Oa(e,t)}}))}),null,{l:t}),{controlsDescendantBindings:!0}}},x.h.ea.component=!0}();var I={class:"className",for:"htmlFor"};x.c.attr={update:function(e,t){var n=x.a.f(t())||{};x.a.P(n,(function(t,n){n=x.a.f(n);var o=t.indexOf(":"),i=(o="lookupNamespaceURI"in e&&0<o&&e.lookupNamespaceURI(t.substr(0,o)),!1===n||null===n||n===a);i?o?e.removeAttributeNS(o,t):e.removeAttribute(t):n=n.toString(),8>=x.a.W&&t in I?(t=I[t],i?e.removeAttribute(t):e[t]=n):i||(o?e.setAttributeNS(o,t,n):e.setAttribute(t,n)),"name"===t&&x.a.Yc(e,i?"":n)}))}},x.c.checked={after:["value","attr"],init:function(e,t,n){function o(){var o=e.checked,l=i();if(!x.S.Ya()&&(o||!s&&!x.S.qa())){var p=x.u.G(t);if(u){var h=c?p.v():p,m=d;d=l,m!==l?o&&(x.a.Na(h,l,!0),x.a.Na(h,m,!1)):x.a.Na(h,l,o),c&&x.Za(p)&&p(h)}else r&&(l===a?l=o:o||(l=a)),x.m.eb(p,n,"checked",l,!0)}}var i=x.xb((function(){return n.has("checkedValue")?x.a.f(n.get("checkedValue")):p?n.has("value")?x.a.f(n.get("value")):e.value:void 0})),r="checkbox"==e.type,s="radio"==e.type;if(r||s){var l=t(),u=r&&x.a.f(l)instanceof Array,c=!(u&&l.push&&l.splice),p=s||u,d=u?i():a;s&&!e.name&&x.c.uniqueName.init(e,(function(){return!0})),x.o(o,null,{l:e}),x.a.B(e,"click",o),x.o((function(){var n=x.a.f(t()),o=i();u?(e.checked=0<=x.a.A(n,o),d=o):e.checked=r&&o===a?!!n:i()===n}),null,{l:e}),l=a}}},x.m.wa.checked=!0,x.c.checkedValue={update:function(e,t){e.value=x.a.f(t())}},x.c.class={update:function(e,t){var n=x.a.Db(x.a.f(t()));x.a.Eb(e,e.__ko__cssValue,!1),e.__ko__cssValue=n,x.a.Eb(e,n,!0)}},x.c.css={update:function(e,t){var n=x.a.f(t());null!==n&&"object"==typeof n?x.a.P(n,(function(t,n){n=x.a.f(n),x.a.Eb(e,t,n)})):x.c.class.update(e,t)}},x.c.enable={update:function(e,t){var n=x.a.f(t());n&&e.disabled?e.removeAttribute("disabled"):n||e.disabled||(e.disabled=!0)}},x.c.disable={update:function(e,t){x.c.enable.update(e,(function(){return!x.a.f(t())}))}},x.c.event={init:function(e,t,n,o,i){var r=t()||{};x.a.P(r,(function(r){"string"==typeof r&&x.a.B(e,r,(function(e){var a,s=t()[r];if(s){try{var l=x.a.la(arguments);o=i.$data,l.unshift(o),a=s.apply(o,l)}finally{!0!==a&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===n.get(r+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}}))}))}},x.c.foreach={Rc:function(e){return function(){var t=e(),n=x.a.bc(t);return n&&"number"!=typeof n.length?(x.a.f(t),{foreach:n.data,as:n.as,noChildContext:n.noChildContext,includeDestroyed:n.includeDestroyed,afterAdd:n.afterAdd,beforeRemove:n.beforeRemove,afterRender:n.afterRender,beforeMove:n.beforeMove,afterMove:n.afterMove,templateEngine:x.ba.Ma}):{foreach:t,templateEngine:x.ba.Ma}}},init:function(e,t){return x.c.template.init(e,x.c.foreach.Rc(t))},update:function(e,t,n,o,i){return x.c.template.update(e,x.c.foreach.Rc(t),n,o,i)}},x.m.Ra.foreach=!1,x.h.ea.foreach=!0,x.c.hasfocus={init:function(e,t,n){function o(o){e.__ko_hasfocusUpdating=!