mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
knockoutjs replaced slow obj.__proto__ with Object.setPrototypeOf()
This commit is contained in:
parent
d49916731f
commit
5a0215987a
7 changed files with 100 additions and 157 deletions
|
|
@ -41,10 +41,6 @@ ko.utils = (() => {
|
||||||
source && Object.entries(source).forEach(prop => target[prop[0]] = prop[1]);
|
source && Object.entries(source).forEach(prop => target[prop[0]] = prop[1]);
|
||||||
return target;
|
return target;
|
||||||
},
|
},
|
||||||
setPrototypeOf = (obj, proto) => {
|
|
||||||
obj.__proto__ = proto;
|
|
||||||
return obj;
|
|
||||||
},
|
|
||||||
// For details on the pattern for changing node classes
|
// For details on the pattern for changing node classes
|
||||||
// see: https://github.com/knockout/knockout/issues/1597
|
// see: https://github.com/knockout/knockout/issues/1597
|
||||||
toggleDomNodeCssClass = (node, classNames, shouldHaveClass) => {
|
toggleDomNodeCssClass = (node, classNames, shouldHaveClass) => {
|
||||||
|
|
@ -56,8 +52,6 @@ ko.utils = (() => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var canSetPrototype = ({ __proto__: [] } instanceof Array);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
arrayRemoveItem: (array, itemToRemove) => {
|
arrayRemoveItem: (array, itemToRemove) => {
|
||||||
var index = array.indexOf(itemToRemove);
|
var index = array.indexOf(itemToRemove);
|
||||||
|
|
@ -69,14 +63,8 @@ ko.utils = (() => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
canSetPrototype: canSetPrototype,
|
|
||||||
|
|
||||||
extend: extend,
|
extend: extend,
|
||||||
|
|
||||||
setPrototypeOf: setPrototypeOf,
|
|
||||||
|
|
||||||
setPrototypeOfOrExtend: canSetPrototype ? setPrototypeOf : extend,
|
|
||||||
|
|
||||||
objectForEach: objectForEach,
|
objectForEach: objectForEach,
|
||||||
|
|
||||||
objectMap: (source, mapping, mappingOwner) => {
|
objectMap: (source, mapping, mappingOwner) => {
|
||||||
|
|
@ -614,7 +602,7 @@ ko.subscription.prototype.disposeWhenNodeIsRemoved = function (node) {
|
||||||
};
|
};
|
||||||
|
|
||||||
ko.subscribable = function () {
|
ko.subscribable = function () {
|
||||||
ko.utils.setPrototypeOfOrExtend(this, ko_subscribable_fn);
|
Object.setPrototypeOf(this, ko_subscribable_fn);
|
||||||
ko_subscribable_fn.init(this);
|
ko_subscribable_fn.init(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -774,9 +762,7 @@ ko.exportProperty(ko_subscribable_fn, 'getSubscriptionsCount', ko_subscribable_f
|
||||||
// For browsers that support proto assignment, we overwrite the prototype of each
|
// For browsers that support proto assignment, we overwrite the prototype of each
|
||||||
// observable instance. Since observables are functions, we need Function.prototype
|
// observable instance. Since observables are functions, we need Function.prototype
|
||||||
// to still be in the prototype chain.
|
// to still be in the prototype chain.
|
||||||
if (ko.utils.canSetPrototype) {
|
Object.setPrototypeOf(ko_subscribable_fn, Function.prototype);
|
||||||
ko.utils.setPrototypeOf(ko_subscribable_fn, Function.prototype);
|
|
||||||
}
|
|
||||||
|
|
||||||
ko.subscribable['fn'] = ko_subscribable_fn;
|
ko.subscribable['fn'] = ko_subscribable_fn;
|
||||||
|
|
||||||
|
|
@ -866,14 +852,10 @@ ko.observable = initialValue => {
|
||||||
observable[observableLatestValue] = initialValue;
|
observable[observableLatestValue] = initialValue;
|
||||||
|
|
||||||
// Inherit from 'subscribable'
|
// Inherit from 'subscribable'
|
||||||
if (!ko.utils.canSetPrototype) {
|
|
||||||
// 'subscribable' won't be on the prototype chain unless we put it there directly
|
|
||||||
ko.utils.extend(observable, ko.subscribable['fn']);
|
|
||||||
}
|
|
||||||
ko.subscribable['fn'].init(observable);
|
ko.subscribable['fn'].init(observable);
|
||||||
|
|
||||||
// Inherit from 'observable'
|
// Inherit from 'observable'
|
||||||
ko.utils.setPrototypeOfOrExtend(observable, observableFn);
|
Object.setPrototypeOf(observable, observableFn);
|
||||||
|
|
||||||
return observable;
|
return observable;
|
||||||
}
|
}
|
||||||
|
|
@ -895,9 +877,7 @@ var observableFn = {
|
||||||
|
|
||||||
// Note that for browsers that don't support proto assignment, the
|
// Note that for browsers that don't support proto assignment, the
|
||||||
// inheritance chain is created manually in the ko.observable constructor
|
// inheritance chain is created manually in the ko.observable constructor
|
||||||
if (ko.utils.canSetPrototype) {
|
Object.setPrototypeOf(observableFn, ko.subscribable['fn']);
|
||||||
ko.utils.setPrototypeOf(observableFn, ko.subscribable['fn']);
|
|
||||||
}
|
|
||||||
|
|
||||||
var protoProperty = ko.observable.protoProperty = '__ko_proto__';
|
var protoProperty = ko.observable.protoProperty = '__ko_proto__';
|
||||||
observableFn[protoProperty] = ko.observable;
|
observableFn[protoProperty] = ko.observable;
|
||||||
|
|
@ -927,7 +907,7 @@ ko.observableArray = initialValues => {
|
||||||
throw new Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");
|
throw new Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");
|
||||||
|
|
||||||
var result = ko.observable(initialValues);
|
var result = ko.observable(initialValues);
|
||||||
ko.utils.setPrototypeOfOrExtend(result, ko.observableArray['fn']);
|
Object.setPrototypeOf(result, ko.observableArray['fn']);
|
||||||
return result.extend({'trackArrayChanges':true});
|
return result.extend({'trackArrayChanges':true});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -979,9 +959,7 @@ ko.observableArray['fn'] = {
|
||||||
|
|
||||||
// Note that for browsers that don't support proto assignment, the
|
// Note that for browsers that don't support proto assignment, the
|
||||||
// inheritance chain is created manually in the ko.observableArray constructor
|
// inheritance chain is created manually in the ko.observableArray constructor
|
||||||
if (ko.utils.canSetPrototype) {
|
Object.setPrototypeOf(ko.observableArray['fn'], ko.observable['fn']);
|
||||||
ko.utils.setPrototypeOf(ko.observableArray['fn'], ko.observable['fn']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Populate ko.observableArray.fn with read/write functions from native arrays
|
// Populate ko.observableArray.fn with read/write functions from native arrays
|
||||||
// Important: Do not add any additional functions here that may reasonably be used to *read* data from the array
|
// Important: Do not add any additional functions here that may reasonably be used to *read* data from the array
|
||||||
|
|
@ -1233,14 +1211,10 @@ ko.computed = function (evaluatorFunctionOrOptions, evaluatorFunctionTarget, opt
|
||||||
computedObservable.hasWriteFunction = typeof writeFunction === "function";
|
computedObservable.hasWriteFunction = typeof writeFunction === "function";
|
||||||
|
|
||||||
// Inherit from 'subscribable'
|
// Inherit from 'subscribable'
|
||||||
if (!ko.utils.canSetPrototype) {
|
|
||||||
// 'subscribable' won't be on the prototype chain unless we put it there directly
|
|
||||||
ko.utils.extend(computedObservable, ko.subscribable['fn']);
|
|
||||||
}
|
|
||||||
ko.subscribable['fn'].init(computedObservable);
|
ko.subscribable['fn'].init(computedObservable);
|
||||||
|
|
||||||
// Inherit from 'computed'
|
// Inherit from 'computed'
|
||||||
ko.utils.setPrototypeOfOrExtend(computedObservable, computedFn);
|
Object.setPrototypeOf(computedObservable, computedFn);
|
||||||
|
|
||||||
if (options['pure']) {
|
if (options['pure']) {
|
||||||
state.pure = true;
|
state.pure = true;
|
||||||
|
|
@ -1659,9 +1633,7 @@ var deferEvaluationOverrides = {
|
||||||
|
|
||||||
// Note that for browsers that don't support proto assignment, the
|
// Note that for browsers that don't support proto assignment, the
|
||||||
// inheritance chain is created manually in the ko.computed constructor
|
// inheritance chain is created manually in the ko.computed constructor
|
||||||
if (ko.utils.canSetPrototype) {
|
Object.setPrototypeOf(computedFn, ko.subscribable['fn']);
|
||||||
ko.utils.setPrototypeOf(computedFn, ko.subscribable['fn']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the proto values for ko.computed
|
// Set the proto values for ko.computed
|
||||||
var protoProp = ko.observable.protoProperty; // == "__ko_proto__"
|
var protoProp = ko.observable.protoProperty; // == "__ko_proto__"
|
||||||
|
|
|
||||||
169
vendors/knockout/build/output/knockout-latest.js
vendored
169
vendors/knockout/build/output/knockout-latest.js
vendored
|
|
@ -4,88 +4,87 @@
|
||||||
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(D=>{function I(b,d){return null===b||typeof b in ha?b===d:!1}function G(b,d){var e;return()=>{e||(e=a.a.setTimeout(()=>{e=void 0;b()},d))}}function J(b,d){var e;return()=>{clearTimeout(e);e=a.a.setTimeout(b,d)}}function U(b,d){null!==d&&d.s&&d.s()}function Y(b,d){var e=this.zc,g=e[E];g.ea||(this.fb&&this.Ka[d]?(e.Nb(d,b,this.Ka[d]),this.Ka[d]=null,--this.fb):g.u[d]||e.Nb(d,b,g.v?{X:b}:e.nc(b)),b.oa&&b.rc())}var V=D.document,Z={},a="undefined"!==typeof Z?Z:{};a.m=(b,d)=>{b=b.split(".");for(var e=
|
(D=>{function I(c,b){return null===c||typeof c in ha?c===b:!1}function G(c,b){var d;return()=>{d||(d=a.a.setTimeout(()=>{d=void 0;c()},b))}}function J(c,b){var d;return()=>{clearTimeout(d);d=a.a.setTimeout(c,b)}}function U(c,b){null!==b&&b.s&&b.s()}function Y(c,b){var d=this.xc,f=d[E];f.ea||(this.cb&&this.Ja[b]?(d.Lb(b,c,this.Ja[b]),this.Ja[b]=null,--this.cb):f.u[b]||d.Lb(b,c,f.v?{X:c}:d.lc(c)),c.na&&c.pc())}var V=D.document,Z={},a="undefined"!==typeof Z?Z:{};a.m=(c,b)=>{c=c.split(".");for(var d=
|
||||||
a,g=0;g<b.length-1;g++)e=e[b[g]];e[b[b.length-1]]=d};a.Z=(b,d,e)=>{b[d]=e};a.version="3.5.1-sm";a.m("version",a.version);a.a=(()=>{const b=(h,l,c,f)=>Array.prototype[h].call(l,c,f),d=(h,l)=>{l&&Object.entries(l).forEach(c=>h[c[0]]=c[1]);return h},e=(h,l)=>{h.__proto__=l;return h};var g={__proto__:[]}instanceof Array;return{Ga:(h,l)=>{l=h.indexOf(l);0<l?h.splice(l,1):0===l&&h.shift()},ja:g,extend:d,setPrototypeOf:e,Ta:g?e:d,J:(h,l)=>h&&Object.entries(h).forEach(c=>l(c[0],c[1])),za:(h,l,c)=>{if(!h)return h;
|
a,f=0;f<c.length-1;f++)d=d[c[f]];d[c[c.length-1]]=b};a.Z=(c,b,d)=>{c[b]=d};a.version="3.5.1-sm";a.m("version",a.version);a.a=(()=>{const c=(b,d,f,k)=>Array.prototype[b].call(d,f,k);return{Fa:(b,d)=>{d=b.indexOf(d);0<d?b.splice(d,1):0===d&&b.shift()},extend:(b,d)=>{d&&Object.entries(d).forEach(f=>b[f[0]]=f[1]);return b},J:(b,d)=>b&&Object.entries(b).forEach(f=>d(f[0],f[1])),ya:(b,d,f)=>{if(!b)return b;var k={};Object.entries(b).forEach(l=>k[l[0]]=d.call(f,l[1],l[0],b));return k},gb:b=>{for(;b.firstChild;)a.removeNode(b.firstChild)},
|
||||||
var f={};Object.entries(h).forEach(k=>f[k[0]]=l.call(c,k[1],k[0],h));return f},ib:h=>{for(;h.firstChild;)a.removeNode(h.firstChild)},qb:h=>{var l=[...h],c=(l[0]&&l[0].ownerDocument||V).createElement("div");h.forEach(f=>c.append(a.ka(f)));return c},Ia:(h,l)=>b("map",h,l?c=>a.ka(c.cloneNode(!0)):c=>c.cloneNode(!0)),Aa:(h,l)=>{a.a.ib(h);l&&h.append.apply(h,l)},wa:(h,l)=>{if(h.length){for(l=8===l.nodeType&&l.parentNode||l;h.length&&h[0].parentNode!==l;)h.splice(0,1);for(;1<h.length&&h[h.length-1].parentNode!==
|
ob:b=>{var d=[...b],f=(d[0]&&d[0].ownerDocument||V).createElement("div");b.forEach(k=>f.append(a.ja(k)));return f},Ha:(b,d)=>c("map",b,d?f=>a.ja(f.cloneNode(!0)):f=>f.cloneNode(!0)),za:(b,d)=>{a.a.gb(b);d&&b.append.apply(b,d)},va:(b,d)=>{if(b.length){for(d=8===d.nodeType&&d.parentNode||d;b.length&&b[0].parentNode!==d;)b.splice(0,1);for(;1<b.length&&b[b.length-1].parentNode!==d;)b.length--;if(1<b.length){d=b[0];var f=b[b.length-1];for(b.length=0;d!==f;)b.push(d),d=d.nextSibling;b.push(f)}}return b},
|
||||||
l;)h.length--;if(1<h.length){l=h[0];var c=h[h.length-1];for(h.length=0;l!==c;)h.push(l),l=l.nextSibling;h.push(c)}}return h},xb:h=>null==h?"":h.trim?h.trim():h.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,""),Vc:(h,l)=>{h=h||"";return l.length>h.length?!1:h.substring(0,l.length)===l},Cc:(h,l)=>l.contains(1!==h.nodeType?h.parentNode:h),hb:h=>a.a.Cc(h,h.ownerDocument.documentElement),aa:h=>h&&h.tagName&&h.tagName.toLowerCase(),Tb:h=>a.onError?function(){try{return h.apply(this,arguments)}catch(l){throw a.onError&&
|
vb:b=>null==b?"":b.trim?b.trim():b.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,""),Tc:(b,d)=>{b=b||"";return d.length>b.length?!1:b.substring(0,d.length)===d},Ac:(b,d)=>d.contains(1!==b.nodeType?b.parentNode:b),fb:b=>a.a.Ac(b,b.ownerDocument.documentElement),aa:b=>b&&b.tagName&&b.tagName.toLowerCase(),Rb:b=>a.onError?function(){try{return b.apply(this,arguments)}catch(d){throw a.onError&&a.onError(d),d;}}:b,setTimeout:(b,d)=>setTimeout(a.a.Rb(b),d),Vb:b=>setTimeout(()=>{a.onError&&a.onError(b);throw b;
|
||||||
a.onError(l),l;}}:h,setTimeout:(h,l)=>setTimeout(a.a.Tb(h),l),Xb:h=>setTimeout(()=>{a.onError&&a.onError(h);throw h;},0),K:(h,l,c)=>{h.addEventListener(l,a.a.Tb(c),!1)},oc:(h,l)=>{if(!h||!h.nodeType)throw Error("element must be a DOM node when calling triggerEvent");h.dispatchEvent(new Event(l))},g:h=>a.O(h)?h():h,Pc:h=>a.O(h)?h.D():h,Cb:(h,l,c)=>{if(l){var f=c?"add":"remove";l.split(/\s+/).forEach(k=>h.classList[f](k))}},vb:(h,l)=>h.textContent=a.a.g(l)||""}})();a.m("utils",a.a);a.m("unwrap",a.a.g);
|
},0),K:(b,d,f)=>{b.addEventListener(d,a.a.Rb(f),!1)},mc:(b,d)=>{if(!b||!b.nodeType)throw Error("element must be a DOM node when calling triggerEvent");b.dispatchEvent(new Event(d))},g:b=>a.O(b)?b():b,Nc:b=>a.O(b)?b.D():b,Ab:(b,d,f)=>{if(d){var k=f?"add":"remove";d.split(/\s+/).forEach(l=>b.classList[k](l))}},tb:(b,d)=>b.textContent=a.a.g(d)||""}})();a.m("utils",a.a);a.m("unwrap",a.a.g);a.a.b=new function(){var c=0,b="__ko__"+Date.now(),d=(f,k)=>{var l=f[b];!l&&k&&(l=f[b]={});return l};return{get:(f,
|
||||||
a.a.b=new function(){var b=0,d="__ko__"+Date.now(),e=(g,h)=>{var l=g[d];!l&&h&&(l=g[d]={});return l};return{get:(g,h)=>(g=e(g,!1))&&g[h],set:(g,h,l)=>{(g=e(g,void 0!==l))&&(g[h]=l)},lb:(g,h,l)=>{g=e(g,!0);return g[h]||(g[h]=l)},clear:g=>g[d]?(delete g[d],!0):!1,W:()=>b++ +d}};a.a.N=new function(){function b(c,f){var k=a.a.b.get(c,g);void 0===k&&f&&(k=[],a.a.b.set(c,g,k));return k}function d(c){var f=b(c,!1);if(f){f=f.slice(0);for(var k=0;k<f.length;k++)f[k](c)}a.a.b.clear(c);l[c.nodeType]&&e(c.childNodes,
|
k)=>(f=d(f,!1))&&f[k],set:(f,k,l)=>{(f=d(f,void 0!==l))&&(f[k]=l)},jb:(f,k,l)=>{f=d(f,!0);return f[k]||(f[k]=l)},clear:f=>f[b]?(delete f[b],!0):!1,V:()=>c++ +b}};a.a.N=new function(){function c(e,g){var h=a.a.b.get(e,f);void 0===h&&g&&(h=[],a.a.b.set(e,f,h));return h}function b(e){var g=c(e,!1);if(g){g=g.slice(0);for(var h=0;h<g.length;h++)g[h](e)}a.a.b.clear(e);l[e.nodeType]&&d(e.childNodes,!0)}function d(e,g){for(var h=[],m,q=0;q<e.length;q++)if(!g||8===e[q].nodeType)if(b(h[h.length]=m=e[q]),e[q]!==
|
||||||
!0)}function e(c,f){for(var k=[],m,q=0;q<c.length;q++)if(!f||8===c[q].nodeType)if(d(k[k.length]=m=c[q]),c[q]!==m)for(;q--&&!k.includes(c[q]););}var g=a.a.b.W(),h={1:!0,8:!0,9:!0},l={1:!0,9:!0};return{ra:(c,f)=>{if("function"!=typeof f)throw Error("Callback must be a function");b(c,!0).push(f)},ub:(c,f)=>{var k=b(c,!1);k&&(a.a.Ga(k,f),0==k.length&&a.a.b.set(c,g,void 0))},ka:c=>{a.o.I(()=>{h[c.nodeType]&&(d(c),l[c.nodeType]&&e(c.getElementsByTagName("*")))});return c},removeNode:c=>{a.ka(c);c.parentNode&&
|
m)for(;q--&&!h.includes(e[q]););}var f=a.a.b.V(),k={1:!0,8:!0,9:!0},l={1:!0,9:!0};return{qa:(e,g)=>{if("function"!=typeof g)throw Error("Callback must be a function");c(e,!0).push(g)},sb:(e,g)=>{var h=c(e,!1);h&&(a.a.Fa(h,g),0==h.length&&a.a.b.set(e,f,void 0))},ja:e=>{a.o.I(()=>{k[e.nodeType]&&(b(e),l[e.nodeType]&&d(e.getElementsByTagName("*")))});return e},removeNode:e=>{a.ja(e);e.parentNode&&e.parentNode.removeChild(e)}}};a.ja=a.a.N.ja;a.removeNode=a.a.N.removeNode;a.m("utils.domNodeDisposal",a.a.N);
|
||||||
c.parentNode.removeChild(c)}}};a.ka=a.a.N.ka;a.removeNode=a.a.N.removeNode;a.m("utils.domNodeDisposal",a.a.N);a.m("utils.domNodeDisposal.addDisposeCallback",a.a.N.ra);(()=>{var b=[0,"",""],d=[1,"<table>","</table>"],e=[3,"<table><tbody><tr>","</tr></tbody></table>"],g=[1,"<select multiple='multiple'>","</select>"],h={thead:d,tbody:d,tfoot:d,tr:[2,"<table><tbody>","</tbody></table>"],td:e,th:e,option:g,optgroup:g};a.a.Sa=(l,c)=>{c||(c=V);var f=a.a.xb(l).toLowerCase();c=c.createElement("div");f=(f=
|
a.m("utils.domNodeDisposal.addDisposeCallback",a.a.N.qa);(()=>{var c=[0,"",""],b=[1,"<table>","</table>"],d=[3,"<table><tbody><tr>","</tr></tbody></table>"],f=[1,"<select multiple='multiple'>","</select>"],k={thead:b,tbody:b,tfoot:b,tr:[2,"<table><tbody>","</tbody></table>"],td:d,th:d,option:f,optgroup:f};a.a.Ra=(l,e)=>{e||(e=V);var g=a.a.vb(l).toLowerCase();e=e.createElement("div");g=(g=g.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&k[g[1]]||c;var h=g[0];for(e.innerHTML="<div>"+g[1]+l+g[2]+
|
||||||
f.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&h[f[1]]||b;var k=f[0];for(c.innerHTML="<div>"+f[1]+l+f[2]+"</div>";k--;)c=c.lastChild;return[...c.lastChild.childNodes]};a.a.Nc=(l,c)=>{l=a.a.Sa(l,c);return l.length&&l[0].parentElement||a.a.qb(l)};a.a.mc=(l,c)=>{a.a.ib(l);c=a.a.g(c);if(null!==c&&void 0!==c){"string"!=typeof c&&(c=c.toString());c=a.a.Sa(c,l.ownerDocument);for(var f=0;f<c.length;f++)l.appendChild(c[f])}}})();a.Ab=(()=>{function b(){if(e)for(var c=e,f=0,k;h<e;)if(k=d[h++]){if(h>
|
"</div>";h--;)e=e.lastChild;return[...e.lastChild.childNodes]};a.a.Lc=(l,e)=>{l=a.a.Ra(l,e);return l.length&&l[0].parentElement||a.a.ob(l)};a.a.kc=(l,e)=>{a.a.gb(l);e=a.a.g(e);if(null!==e&&void 0!==e){"string"!=typeof e&&(e=e.toString());e=a.a.Ra(e,l.ownerDocument);for(var g=0;g<e.length;g++)l.appendChild(e[g])}}})();a.yb=(()=>{function c(){if(d)for(var e=d,g=0,h;k<d;)if(h=b[k++]){if(k>e){if(5E3<=++g){k=d;a.a.Vb(Error("'Too much recursion' after processing "+g+" task groups."));break}e=d}try{h()}catch(m){a.a.Vb(m)}}k=
|
||||||
c){if(5E3<=++f){h=e;a.a.Xb(Error("'Too much recursion' after processing "+f+" task groups."));break}c=e}try{k()}catch(m){a.a.Xb(m)}}h=e=d.length=0}var d=[],e=0,g=1,h=0,l=(c=>{var f=V.createElement("div");(new MutationObserver(c)).observe(f,{attributes:!0});return()=>f.classList.toggle("foo")})(b);return{kc:c=>{e||l(b);d[e++]=c;return g++},cancel:c=>{c-=g-e;c>=h&&c<e&&(d[c]=null)}}})();a.m("tasks",a.Ab);a.jb={throttle:(b,d)=>{b.throttleEvaluation=d;var e=null;return a.i({read:b,write:g=>{clearTimeout(e);
|
d=b.length=0}var b=[],d=0,f=1,k=0,l=(e=>{var g=V.createElement("div");(new MutationObserver(e)).observe(g,{attributes:!0});return()=>g.classList.toggle("foo")})(c);return{ic:e=>{d||l(c);b[d++]=e;return f++},cancel:e=>{e-=f-d;e>=k&&e<d&&(b[e]=null)}}})();a.m("tasks",a.yb);a.hb={throttle:(c,b)=>{c.throttleEvaluation=b;var d=null;return a.i({read:c,write:f=>{clearTimeout(d);d=a.a.setTimeout(()=>c(f),b)}})},rateLimit:(c,b)=>{if("number"==typeof b)var d=b;else{d=b.timeout;var f=b.method}var k="function"==
|
||||||
e=a.a.setTimeout(()=>b(g),d)}})},rateLimit:(b,d)=>{if("number"==typeof d)var e=d;else{e=d.timeout;var g=d.method}var h="function"==typeof g?g:"notifyWhenChangesStop"==g?J:G;b.pb(l=>h(l,e,d))},notify:(b,d)=>{b.equalityComparer="always"==d?null:I}};var ha={undefined:1,"boolean":1,number:1,string:1};a.m("extenders",a.jb);a.yb=function(b,d,e){this.X=b;this.Eb=d;this.Fb=e;this.Ya=!1;this.Da=this.Za=null;a.Z(this,"dispose",this.s);a.Z(this,"disposeWhenNodeIsRemoved",this.j)};a.yb.prototype.s=function(){this.Ya||
|
typeof f?f:"notifyWhenChangesStop"==f?J:G;c.nb(l=>k(l,d,b))},notify:(c,b)=>{c.equalityComparer="always"==b?null:I}};var ha={undefined:1,"boolean":1,number:1,string:1};a.m("extenders",a.hb);a.wb=function(c,b,d){this.X=c;this.Cb=b;this.Db=d;this.Wa=!1;this.Ca=this.Xa=null;a.Z(this,"dispose",this.s);a.Z(this,"disposeWhenNodeIsRemoved",this.j)};a.wb.prototype.s=function(){this.Wa||(this.Ca&&a.a.N.sb(this.Xa,this.Ca),this.Wa=!0,this.Db(),this.X=this.Cb=this.Db=this.Xa=this.Ca=null)};a.wb.prototype.j=function(c){this.Xa=
|
||||||
(this.Da&&a.a.N.ub(this.Za,this.Da),this.Ya=!0,this.Fb(),this.X=this.Eb=this.Fb=this.Za=this.Da=null)};a.yb.prototype.j=function(b){this.Za=b;a.a.N.ra(b,this.Da=this.s.bind(this))};a.T=function(){a.a.Ta(this,O);O.Pa(this)};var O={Pa:b=>{b.L={change:[]};b.Lb=1},subscribe:function(b,d,e){var g=this;e=e||"change";var h=new a.yb(g,d?b.bind(d):b,()=>{a.a.Ga(g.L[e],h);g.Fa&&g.Fa(e)});g.sa&&g.sa(e);g.L[e]||(g.L[e]=[]);g.L[e].push(h);return h},notifySubscribers:function(b,d){d=d||"change";"change"===d&&this.Va();
|
c;a.a.N.qa(c,this.Ca=this.s.bind(this))};a.W=function(){Object.setPrototypeOf(this,O);O.Oa(this)};var O={Oa:c=>{c.L={change:[]};c.Jb=1},subscribe:function(c,b,d){var f=this;d=d||"change";var k=new a.wb(f,b?c.bind(b):c,()=>{a.a.Fa(f.L[d],k);f.Ea&&f.Ea(d)});f.ra&&f.ra(d);f.L[d]||(f.L[d]=[]);f.L[d].push(k);return k},notifySubscribers:function(c,b){b=b||"change";"change"===b&&this.Ta();if(this.wa(b)){b="change"===b&&this.nc||this.L[b].slice(0);try{a.o.Ob();for(var d=0,f;f=b[d];++d)f.Wa||f.Cb(c)}finally{a.o.end()}}},
|
||||||
if(this.xa(d)){d="change"===d&&this.pc||this.L[d].slice(0);try{a.o.Qb();for(var e=0,g;g=d[e];++e)g.Ya||g.Eb(b)}finally{a.o.end()}}},Na:function(){return this.Lb},Hc:function(b){return this.Na()!==b},Va:function(){++this.Lb},pb:function(b){var d=this,e=a.O(d),g,h,l,c,f;d.Ea||(d.Ea=d.notifySubscribers,d.notifySubscribers=function(m,q){q&&"change"!==q?"beforeChange"===q?this.Ib(m):this.Ea(m,q):this.Jb(m)});var k=b(()=>{d.oa=!1;e&&c===d&&(c=d.Gb?d.Gb():d());var m=h||f&&d.Ra(l,c);f=h=g=!1;m&&d.Ea(l=c)});
|
Ma:function(){return this.Jb},Fc:function(c){return this.Ma()!==c},Ta:function(){++this.Jb},nb:function(c){var b=this,d=a.O(b),f,k,l,e,g;b.Da||(b.Da=b.notifySubscribers,b.notifySubscribers=function(m,q){q&&"change"!==q?"beforeChange"===q?this.Gb(m):this.Da(m,q):this.Hb(m)});var h=c(()=>{b.na=!1;d&&e===b&&(e=b.Eb?b.Eb():b());var m=k||g&&b.Qa(l,e);g=k=f=!1;m&&b.Da(l=e)});b.Hb=(m,q)=>{q&&b.na||(g=!q);b.nc=b.L.change.slice(0);b.na=f=!0;e=m;h()};b.Gb=m=>{f||(l=m,b.Da(m,"beforeChange"))};b.Ib=()=>{g=!0};
|
||||||
d.Jb=(m,q)=>{q&&d.oa||(f=!q);d.pc=d.L.change.slice(0);d.oa=g=!0;c=m;k()};d.Ib=m=>{g||(l=m,d.Ea(m,"beforeChange"))};d.Kb=()=>{f=!0};d.rc=()=>{d.Ra(l,d.D(!0))&&(h=!0)}},xa:function(b){return this.L[b]&&this.L[b].length},Fc:function(b){if(b)return this.L[b]&&this.L[b].length||0;var d=0;a.a.J(this.L,(e,g)=>d+=g.length);return d},Ra:function(b,d){return!this.equalityComparer||!this.equalityComparer(b,d)},toString:()=>"[object Object]",extend:function(b){var d=this;b&&a.a.J(b,(e,g)=>{e=a.jb[e];"function"==
|
b.pc=()=>{b.Qa(l,b.D(!0))&&(k=!0)}},wa:function(c){return this.L[c]&&this.L[c].length},Dc:function(c){if(c)return this.L[c]&&this.L[c].length||0;var b=0;a.a.J(this.L,(d,f)=>b+=f.length);return b},Qa:function(c,b){return!this.equalityComparer||!this.equalityComparer(c,b)},toString:()=>"[object Object]",extend:function(c){var b=this;c&&a.a.J(c,(d,f)=>{d=a.hb[d];"function"==typeof d&&(b=d(b,f)||b)});return b}};a.Z(O,"init",O.Oa);a.Z(O,"subscribe",O.subscribe);a.Z(O,"extend",O.extend);a.Z(O,"getSubscriptionsCount",
|
||||||
typeof e&&(d=e(d,g)||d)});return d}};a.Z(O,"init",O.Pa);a.Z(O,"subscribe",O.subscribe);a.Z(O,"extend",O.extend);a.Z(O,"getSubscriptionsCount",O.Fc);a.a.ja&&a.a.setPrototypeOf(O,Function.prototype);a.T.fn=O;a.Jc=b=>null!=b&&"function"==typeof b.subscribe&&"function"==typeof b.notifySubscribers;a.ta=a.o=(()=>{function b(l){e.push(g);g=l}function d(){g=e.pop()}var e=[],g,h=0;return{Qb:b,end:d,jc:l=>{if(g){if(!a.Jc(l))throw Error("Only subscribable things can act as dependencies");g.wc.call(g.xc,l,l.qc||
|
O.Dc);Object.setPrototypeOf(O,Function.prototype);a.W.fn=O;a.Hc=c=>null!=c&&"function"==typeof c.subscribe&&"function"==typeof c.notifySubscribers;a.sa=a.o=(()=>{function c(l){d.push(f);f=l}function b(){f=d.pop()}var d=[],f,k=0;return{Ob:c,end:b,hc:l=>{if(f){if(!a.Hc(l))throw Error("Only subscribable things can act as dependencies");f.uc.call(f.vc,l,l.oc||(l.oc=++k))}},I:(l,e,g)=>{try{return c(),l.apply(e,g||[])}finally{b()}},La:()=>{if(f)return f.i.La()},ib:()=>{if(f)return f.i.ib()},lb:()=>{if(f)return f.lb},
|
||||||
(l.qc=++h))}},I:(l,c,f)=>{try{return b(),l.apply(c,f||[])}finally{d()}},Ma:()=>{if(g)return g.i.Ma()},kb:()=>{if(g)return g.i.kb()},nb:()=>{if(g)return g.nb},i:()=>{if(g)return g.i}}})();var P=Symbol("_latestValue");a.ga=b=>{function d(){if(0<arguments.length)return d.Ra(d[P],arguments[0])&&(d.Wa(),d[P]=arguments[0],d.Ca()),this;a.o.jc(d);return d[P]}d[P]=b;a.a.ja||a.a.extend(d,a.T.fn);a.T.fn.Pa(d);a.a.Ta(d,Q);return d};var Q={toJSON:function(){let b=this[P];return b.toJSON?b.toJSON():b},equalityComparer:I,
|
i:()=>{if(f)return f.i}}})();var P=Symbol("_latestValue");a.ga=c=>{function b(){if(0<arguments.length)return b.Qa(b[P],arguments[0])&&(b.Ua(),b[P]=arguments[0],b.Ba()),this;a.o.hc(b);return b[P]}b[P]=c;a.W.fn.Oa(b);Object.setPrototypeOf(b,Q);return b};var Q={toJSON:function(){let c=this[P];return c.toJSON?c.toJSON():c},equalityComparer:I,D:function(){return this[P]},Ba:function(){this.notifySubscribers(this[P],"spectate");this.notifySubscribers(this[P])},Ua:function(){this.notifySubscribers(this[P],
|
||||||
D:function(){return this[P]},Ca:function(){this.notifySubscribers(this[P],"spectate");this.notifySubscribers(this[P])},Wa:function(){this.notifySubscribers(this[P],"beforeChange")}};a.a.ja&&a.a.setPrototypeOf(Q,a.T.fn);var R=a.ga.sc="__ko_proto__";Q[R]=a.ga;a.O=b=>{if((b="function"==typeof b&&b[R])&&b!==Q[R]&&b!==a.i.fn[R])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!b};a.ec=b=>"function"==typeof b&&(b[R]===Q[R]||b[R]===a.i.fn[R]&&b.bc);
|
"beforeChange")}};Object.setPrototypeOf(Q,a.W.fn);var R=a.ga.qc="__ko_proto__";Q[R]=a.ga;a.O=c=>{if((c="function"==typeof c&&c[R])&&c!==Q[R]&&c!==a.i.fn[R])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!c};a.cc=c=>"function"==typeof c&&(c[R]===Q[R]||c[R]===a.i.fn[R]&&c.$b);a.m("observable",a.ga);a.m("isObservable",a.O);a.m("observable.fn",Q);a.Z(Q,"valueHasMutated",Q.Ba);a.la=c=>{c=c||[];if("object"!=typeof c||!("length"in c))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");
|
||||||
a.m("observable",a.ga);a.m("isObservable",a.O);a.m("observable.fn",Q);a.Z(Q,"valueHasMutated",Q.Ca);a.ma=b=>{b=b||[];if("object"!=typeof b||!("length"in b))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");b=a.ga(b);a.a.Ta(b,a.ma.fn);return b.extend({trackArrayChanges:!0})};a.ma.fn={remove:function(b){for(var d=this.D(),e=[],g="function"!=typeof b||a.O(b)?function(c){return c===b}:b,h=0;h<d.length;h++){var l=d[h];if(g(l)){0===e.length&&
|
c=a.ga(c);Object.setPrototypeOf(c,a.la.fn);return c.extend({trackArrayChanges:!0})};a.la.fn={remove:function(c){for(var b=this.D(),d=[],f="function"!=typeof c||a.O(c)?function(e){return e===c}:c,k=0;k<b.length;k++){var l=b[k];if(f(l)){0===d.length&&this.Ua();if(b[k]!==l)throw Error("Array modified during remove; cannot remove item");d.push(l);b.splice(k,1);k--}}d.length&&this.Ba();return d},removeAll:function(c){if(void 0===c){var b=this.D(),d=b.slice(0);this.Ua();b.splice(0,b.length);this.Ba();return d}return c?
|
||||||
this.Wa();if(d[h]!==l)throw Error("Array modified during remove; cannot remove item");e.push(l);d.splice(h,1);h--}}e.length&&this.Ca();return e},removeAll:function(b){if(void 0===b){var d=this.D(),e=d.slice(0);this.Wa();d.splice(0,d.length);this.Ca();return e}return b?this.remove(g=>b.includes(g)):[]},indexOf:function(b){return this().indexOf(b)}};a.a.ja&&a.a.setPrototypeOf(a.ma.fn,a.ga.fn);"pop push reverse shift sort splice unshift".split(" ").forEach(b=>{a.ma.fn[b]=function(){var d=this.D();this.Wa();
|
this.remove(f=>c.includes(f)):[]},indexOf:function(c){return this().indexOf(c)}};Object.setPrototypeOf(a.la.fn,a.ga.fn);"pop push reverse shift sort splice unshift".split(" ").forEach(c=>{a.la.fn[c]=function(){var b=this.D();this.Ua();this.Qb(b,c,arguments);var d=b[c].apply(b,arguments);this.Ba();return d===b?this:d}});["slice"].forEach(c=>{a.la.fn[c]=function(){var b=this();return b[c].apply(b,arguments)}});a.bc=c=>a.O(c)&&"function"==typeof c.remove&&"function"==typeof c.push;a.m("observableArray",
|
||||||
this.Sb(d,b,arguments);var e=d[b].apply(d,arguments);this.Ca();return e===d?this:e}});["slice"].forEach(b=>{a.ma.fn[b]=function(){var d=this();return d[b].apply(d,arguments)}});a.dc=b=>a.O(b)&&"function"==typeof b.remove&&"function"==typeof b.push;a.m("observableArray",a.ma);a.m("isObservableArray",a.dc);a.jb.trackArrayChanges=(b,d)=>{function e(){function p(){if(f){var u=[].concat(b.D()||[]);if(b.xa("arrayChange")){if(!h||1<f)h=a.a.Ub(k,u,b.cb);var x=h}k=u;h=null;f=0;x&&x.length&&b.notifySubscribers(x,
|
a.la);a.m("isObservableArray",a.bc);a.hb.trackArrayChanges=(c,b)=>{function d(){function p(){if(g){var u=[].concat(c.D()||[]);if(c.wa("arrayChange")){if(!k||1<g)k=a.a.Sb(h,u,c.ab);var x=k}h=u;k=null;g=0;x&&x.length&&c.notifySubscribers(x,"arrayChange")}}f?p():(f=!0,e=c.subscribe(()=>++g,null,"spectate"),h=[].concat(c.D()||[]),k=null,l=c.subscribe(p))}c.ab={};b&&"object"==typeof b&&a.a.extend(c.ab,b);c.ab.sparse=!0;if(!c.Qb){var f=!1,k=null,l,e,g=0,h,m=c.ra,q=c.Ea;c.ra=p=>{m&&m.call(c,p);"arrayChange"===
|
||||||
"arrayChange")}}g?p():(g=!0,c=b.subscribe(()=>++f,null,"spectate"),k=[].concat(b.D()||[]),h=null,l=b.subscribe(p))}b.cb={};d&&"object"==typeof d&&a.a.extend(b.cb,d);b.cb.sparse=!0;if(!b.Sb){var g=!1,h=null,l,c,f=0,k,m=b.sa,q=b.Fa;b.sa=p=>{m&&m.call(b,p);"arrayChange"===p&&e()};b.Fa=p=>{q&&q.call(b,p);"arrayChange"!==p||b.xa("arrayChange")||(l&&l.s(),c&&c.s(),c=l=null,g=!1,k=void 0)};b.Sb=(p,u,x)=>{function v(B,A,H){return w[w.length]={status:B,value:A,index:H}}if(g&&!f){var w=[],n=p.length,r=x.length,
|
p&&d()};c.Ea=p=>{q&&q.call(c,p);"arrayChange"!==p||c.wa("arrayChange")||(l&&l.s(),e&&e.s(),e=l=null,f=!1,h=void 0)};c.Qb=(p,u,x)=>{function v(B,A,H){return w[w.length]={status:B,value:A,index:H}}if(f&&!g){var w=[],n=p.length,r=x.length,t=0;switch(u){case "push":t=n;case "unshift":for(u=0;u<r;u++)v("added",x[u],t+u);break;case "pop":t=n-1;case "shift":n&&v("deleted",p[t],t);break;case "splice":u=Math.min(Math.max(0,0>x[0]?n+x[0]:x[0]),n);n=1===r?n:Math.min(u+(x[1]||0),n);r=u+r-2;t=Math.max(n,r);for(var y=
|
||||||
t=0;switch(u){case "push":t=n;case "unshift":for(u=0;u<r;u++)v("added",x[u],t+u);break;case "pop":t=n-1;case "shift":n&&v("deleted",p[t],t);break;case "splice":u=Math.min(Math.max(0,0>x[0]?n+x[0]:x[0]),n);n=1===r?n:Math.min(u+(x[1]||0),n);r=u+r-2;t=Math.max(n,r);for(var y=[],F=[],z=2;u<t;++u,++z)u<n&&F.push(v("deleted",p[u],u)),u<r&&y.push(v("added",x[z],u));a.a.$b(F,y);break;default:return}h=w}}}};var E=Symbol("_state");a.i=function(b,d,e){function g(){if(0<arguments.length){if("function"===typeof h)h.apply(l.La,
|
[],F=[],z=2;u<t;++u,++z)u<n&&F.push(v("deleted",p[u],u)),u<r&&y.push(v("added",x[z],u));a.a.Yb(F,y);break;default:return}k=w}}}};var E=Symbol("_state");a.i=function(c,b,d){function f(){if(0<arguments.length){if("function"===typeof k)k.apply(l.Ka,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}l.ea||a.o.hc(f);(l.$||l.v&&f.xa())&&f.U();return l.P}"object"===typeof c?
|
||||||
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}l.ea||a.o.jc(g);(l.$||l.v&&g.ya())&&g.V();return l.P}"object"===typeof b?e=b:(e=e||{},b&&(e.read=b));if("function"!=typeof e.read)throw Error("Pass a function that returns the value of the ko.computed");var h=e.write,l={P:void 0,fa:!0,$:!0,Qa:!1,zb:!1,ea:!1,tb:!1,v:!1,ic:e.read,La:d||e.owner,j:e.disposeWhenNodeIsRemoved||
|
d=c:(d=d||{},c&&(d.read=c));if("function"!=typeof d.read)throw Error("Pass a function that returns the value of the ko.computed");var k=d.write,l={P:void 0,fa:!0,$:!0,Pa:!1,xb:!1,ea:!1,rb:!1,v:!1,fc:d.read,Ka:b||d.owner,j:d.disposeWhenNodeIsRemoved||d.j||null,ta:d.disposeWhen||d.ta,eb:null,u:{},M:0,Xb:null};f[E]=l;f.$b="function"===typeof k;a.W.fn.Oa(f);Object.setPrototypeOf(f,W);d.pure?(l.rb=!0,l.v=!0,a.a.extend(f,ia)):d.deferEvaluation&&a.a.extend(f,ja);l.j&&(l.xb=!0,l.j.nodeType||(l.j=null));l.v||
|
||||||
e.j||null,ua:e.disposeWhen||e.ua,gb:null,u:{},M:0,Zb:null};g[E]=l;g.bc="function"===typeof h;a.a.ja||a.a.extend(g,a.T.fn);a.T.fn.Pa(g);a.a.Ta(g,W);e.pure?(l.tb=!0,l.v=!0,a.a.extend(g,ia)):e.deferEvaluation&&a.a.extend(g,ja);l.j&&(l.zb=!0,l.j.nodeType||(l.j=null));l.v||e.deferEvaluation||g.V();l.j&&g.da()&&a.a.N.ra(l.j,l.gb=function(){g.s()});return g};var W={equalityComparer:I,Ma:function(){return this[E].M},kb:function(){var b=[];a.a.J(this[E].u,(d,e)=>b[e.pa]=e.X);return b},mb:function(b){if(!this[E].M)return!1;
|
d.deferEvaluation||f.U();l.j&&f.da()&&a.a.N.qa(l.j,l.eb=function(){f.s()});return f};var W={equalityComparer:I,La:function(){return this[E].M},ib:function(){var c=[];a.a.J(this[E].u,(b,d)=>c[d.oa]=d.X);return c},kb:function(c){if(!this[E].M)return!1;var b=this.ib();return b.includes(c)?!0:!!b.find(d=>d.kb&&d.kb(c))},Lb:function(c,b,d){if(this[E].rb&&b===this)throw Error("A 'pure' computed must not be called recursively");this[E].u[c]=d;d.oa=this[E].M++;d.pa=b.Ma()},xa:function(){var c,b=this[E].u;
|
||||||
var d=this.kb();return d.includes(b)?!0:!!d.find(e=>e.mb&&e.mb(b))},Nb:function(b,d,e){if(this[E].tb&&d===this)throw Error("A 'pure' computed must not be called recursively");this[E].u[b]=e;e.pa=this[E].M++;e.qa=d.Na()},ya:function(){var b,d=this[E].u;for(b in d)if(Object.prototype.hasOwnProperty.call(d,b)){var e=d[b];if(this.na&&e.X.oa||e.X.Hc(e.qa))return!0}},Yc:function(){this.na&&!this[E].Qa&&this.na(!1)},da:function(){var b=this[E];return b.$||0<b.M},Zc:function(){this.oa?this[E].$&&(this[E].fa=
|
for(c in b)if(Object.prototype.hasOwnProperty.call(b,c)){var d=b[c];if(this.ma&&d.X.na||d.X.Fc(d.pa))return!0}},Wc:function(){this.ma&&!this[E].Pa&&this.ma(!1)},da:function(){var c=this[E];return c.$||0<c.M},Xc:function(){this.na?this[E].$&&(this[E].fa=!0):this.Wb()},lc:function(c){return c.subscribe(this.Wb,this)},Wb:function(){var c=this,b=c.throttleEvaluation;b&&0<=b?(clearTimeout(this[E].Xb),this[E].Xb=a.a.setTimeout(()=>c.U(!0),b)):c.ma?c.ma(!0):c.U(!0)},U:function(c){var b=this[E],d=b.ta,f=
|
||||||
!0):this.Yb()},nc:function(b){return b.subscribe(this.Yb,this)},Yb:function(){var b=this,d=b.throttleEvaluation;d&&0<=d?(clearTimeout(this[E].Zb),this[E].Zb=a.a.setTimeout(()=>b.V(!0),d)):b.na?b.na(!0):b.V(!0)},V:function(b){var d=this[E],e=d.ua,g=!1;if(!d.Qa&&!d.ea){if(d.j&&!a.a.hb(d.j)||e&&e()){if(!d.zb){this.s();return}}else d.zb=!1;d.Qa=!0;try{g=this.Ec(b)}finally{d.Qa=!1}return g}},Ec:function(b){var d=this[E],e=d.tb?void 0:!d.M;var g={zc:this,Ka:d.u,fb:d.M};a.o.Qb({xc:g,wc:Y,i:this,nb:e});d.u=
|
!1;if(!b.Pa&&!b.ea){if(b.j&&!a.a.fb(b.j)||d&&d()){if(!b.xb){this.s();return}}else b.xb=!1;b.Pa=!0;try{f=this.Cc(c)}finally{b.Pa=!1}return f}},Cc:function(c){var b=this[E],d=b.rb?void 0:!b.M;var f={xc:this,Ja:b.u,cb:b.M};a.o.Ob({vc:f,uc:Y,i:this,lb:d});b.u={};b.M=0;var k=this.Bc(b,f);b.M?f=this.Qa(b.P,k):(this.s(),f=!0);f&&(b.v?this.Ta():this.notifySubscribers(b.P,"beforeChange"),b.P=k,this.notifySubscribers(b.P,"spectate"),!b.v&&c&&this.notifySubscribers(b.P),this.Ib&&this.Ib());d&&this.notifySubscribers(b.P,
|
||||||
{};d.M=0;var h=this.Dc(d,g);d.M?g=this.Ra(d.P,h):(this.s(),g=!0);g&&(d.v?this.Va():this.notifySubscribers(d.P,"beforeChange"),d.P=h,this.notifySubscribers(d.P,"spectate"),!d.v&&b&&this.notifySubscribers(d.P),this.Kb&&this.Kb());e&&this.notifySubscribers(d.P,"awake");return g},Dc:(b,d)=>{try{var e=b.ic;return b.La?e.call(b.La):e()}finally{a.o.end(),d.fb&&!b.v&&a.a.J(d.Ka,U),b.fa=b.$=!1}},D:function(b){var d=this[E];(d.$&&(b||!d.M)||d.v&&this.ya())&&this.V();return d.P},pb:function(b){a.T.fn.pb.call(this,
|
"awake");return f},Bc:(c,b)=>{try{var d=c.fc;return c.Ka?d.call(c.Ka):d()}finally{a.o.end(),b.cb&&!c.v&&a.a.J(b.Ja,U),c.fa=c.$=!1}},D:function(c){var b=this[E];(b.$&&(c||!b.M)||b.v&&this.xa())&&this.U();return b.P},nb:function(c){a.W.fn.nb.call(this,c);this.Eb=function(){this[E].v||(this[E].fa?this.U():this[E].$=!1);return this[E].P};this.ma=function(b){this.Gb(this[E].P);this[E].$=!0;b&&(this[E].fa=!0);this.Hb(this,!b)}},s:function(){var c=this[E];!c.v&&c.u&&a.a.J(c.u,(b,d)=>d.s&&d.s());c.j&&c.eb&&
|
||||||
b);this.Gb=function(){this[E].v||(this[E].fa?this.V():this[E].$=!1);return this[E].P};this.na=function(d){this.Ib(this[E].P);this[E].$=!0;d&&(this[E].fa=!0);this.Jb(this,!d)}},s:function(){var b=this[E];!b.v&&b.u&&a.a.J(b.u,(d,e)=>e.s&&e.s());b.j&&b.gb&&a.a.N.ub(b.j,b.gb);b.u=void 0;b.M=0;b.ea=!0;b.fa=!1;b.$=!1;b.v=!1;b.j=void 0;b.ua=void 0;b.ic=void 0;this.bc||(b.La=void 0)}},ia={sa:function(b){var d=this,e=d[E];if(!e.ea&&e.v&&"change"==b){e.v=!1;if(e.fa||d.ya())e.u=null,e.M=0,d.V()&&d.Va();else{var g=
|
a.a.N.sb(c.j,c.eb);c.u=void 0;c.M=0;c.ea=!0;c.fa=!1;c.$=!1;c.v=!1;c.j=void 0;c.ta=void 0;c.fc=void 0;this.$b||(c.Ka=void 0)}},ia={ra:function(c){var b=this,d=b[E];if(!d.ea&&d.v&&"change"==c){d.v=!1;if(d.fa||b.xa())d.u=null,d.M=0,b.U()&&b.Ta();else{var f=[];a.a.J(d.u,(k,l)=>f[l.oa]=k);f.forEach((k,l)=>{var e=d.u[k],g=b.lc(e.X);g.oa=l;g.pa=e.pa;d.u[k]=g});b.xa()&&b.U()&&b.Ta()}d.ea||b.notifySubscribers(d.P,"awake")}},Ea:function(c){var b=this[E];b.ea||"change"!=c||this.wa("change")||(a.a.J(b.u,(d,f)=>
|
||||||
[];a.a.J(e.u,(h,l)=>g[l.pa]=h);g.forEach((h,l)=>{var c=e.u[h],f=d.nc(c.X);f.pa=l;f.qa=c.qa;e.u[h]=f});d.ya()&&d.V()&&d.Va()}e.ea||d.notifySubscribers(e.P,"awake")}},Fa:function(b){var d=this[E];d.ea||"change"!=b||this.xa("change")||(a.a.J(d.u,(e,g)=>{g.s&&(d.u[e]={X:g.X,pa:g.pa,qa:g.qa},g.s())}),d.v=!0,this.notifySubscribers(void 0,"asleep"))},Na:function(){var b=this[E];b.v&&(b.fa||this.ya())&&this.V();return a.T.fn.Na.call(this)}},ja={sa:function(b){"change"!=b&&"beforeChange"!=b||this.D()}};a.a.ja&&
|
{f.s&&(b.u[d]={X:f.X,oa:f.oa,pa:f.pa},f.s())}),b.v=!0,this.notifySubscribers(void 0,"asleep"))},Ma:function(){var c=this[E];c.v&&(c.fa||this.xa())&&this.U();return a.W.fn.Ma.call(this)}},ja={ra:function(c){"change"!=c&&"beforeChange"!=c||this.D()}};Object.setPrototypeOf(W,a.W.fn);W[a.ga.qc]=a.i;a.m("computed",a.i);a.m("computed.fn",W);a.Z(W,"dispose",W.s);a.Pc=c=>{if("function"===typeof c)return a.i(c,void 0,{pure:!0});c=a.a.extend({},c);c.pure=!0;return a.i(c,void 0)};(()=>{a.A={S:c=>{switch(a.a.aa(c)){case "option":return!0===
|
||||||
a.a.setPrototypeOf(W,a.T.fn);W[a.ga.sc]=a.i;a.m("computed",a.i);a.m("computed.fn",W);a.Z(W,"dispose",W.s);a.Rc=b=>{if("function"===typeof b)return a.i(b,void 0,{pure:!0});b=a.a.extend({},b);b.pure=!0;return a.i(b,void 0)};(()=>{a.A={S:b=>{switch(a.a.aa(b)){case "option":return!0===b.__ko__hasDomDataOptionValue__?a.a.b.get(b,a.c.options.sb):b.value;case "select":return 0<=b.selectedIndex?a.A.S(b.options[b.selectedIndex]):void 0;default:return b.value}},Xa:(b,d,e)=>{switch(a.a.aa(b)){case "option":"string"===
|
c.__ko__hasDomDataOptionValue__?a.a.b.get(c,a.c.options.qb):c.value;case "select":return 0<=c.selectedIndex?a.A.S(c.options[c.selectedIndex]):void 0;default:return c.value}},Va:(c,b,d)=>{switch(a.a.aa(c)){case "option":"string"===typeof b?(a.a.b.set(c,a.c.options.qb,void 0),delete c.__ko__hasDomDataOptionValue__,c.value=b):(a.a.b.set(c,a.c.options.qb,b),c.__ko__hasDomDataOptionValue__=!0,c.value="number"===typeof b?b:"");break;case "select":if(""===b||null===b)b=void 0;for(var f=-1,k=0,l=c.options.length,
|
||||||
typeof d?(a.a.b.set(b,a.c.options.sb,void 0),delete b.__ko__hasDomDataOptionValue__,b.value=d):(a.a.b.set(b,a.c.options.sb,d),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===typeof d?d:"");break;case "select":if(""===d||null===d)d=void 0;for(var g=-1,h=0,l=b.options.length,c;h<l;++h)if(c=a.A.S(b.options[h]),c==d||""===c&&void 0===d){g=h;break}if(e||0<=g||void 0===d&&1<b.size)b.selectedIndex=g;break;default:if(null===d||void 0===d)d="";b.value=d}}}})();a.H=(()=>{function b(f){f=a.a.xb(f);123===
|
e;k<l;++k)if(e=a.A.S(c.options[k]),e==b||""===e&&void 0===b){f=k;break}if(d||0<=f||void 0===b&&1<c.size)c.selectedIndex=f;break;default:if(null===b||void 0===b)b="";c.value=b}}}})();a.H=(()=>{function c(g){g=a.a.vb(g);123===g.charCodeAt(0)&&(g=g.slice(1,-1));g+="\n,";var h=[],m=g.match(f),q=[],p=0;if(1<m.length){for(var u=0,x;x=m[u];++u){var v=x.charCodeAt(0);if(44===v){if(0>=p){h.push(w&&q.length?{key:w,value:q.join("")}:{unknown:w||q.join("")});var w=p=0;q=[];continue}}else if(58===v){if(!p&&!w&&
|
||||||
f.charCodeAt(0)&&(f=f.slice(1,-1));f+="\n,";var k=[],m=f.match(g),q=[],p=0;if(1<m.length){for(var u=0,x;x=m[u];++u){var v=x.charCodeAt(0);if(44===v){if(0>=p){k.push(w&&q.length?{key:w,value:q.join("")}:{unknown:w||q.join("")});var w=p=0;q=[];continue}}else if(58===v){if(!p&&!w&&1===q.length){w=q.pop();continue}}else if(47===v&&1<x.length&&(47===x.charCodeAt(1)||42===x.charCodeAt(1)))continue;else 47===v&&u&&1<x.length?(v=m[u-1].match(h))&&!l[v[0]]&&(f=f.substr(f.indexOf(x)+1),m=f.match(g),u=-1,x=
|
1===q.length){w=q.pop();continue}}else if(47===v&&1<x.length&&(47===x.charCodeAt(1)||42===x.charCodeAt(1)))continue;else 47===v&&u&&1<x.length?(v=m[u-1].match(k))&&!l[v[0]]&&(g=g.substr(g.indexOf(x)+1),m=g.match(f),u=-1,x="/"):40===v||123===v||91===v?++p:41===v||125===v||93===v?--p:w||q.length||34!==v&&39!==v||(x=x.slice(1,-1));q.push(x)}if(0<p)throw Error("Unbalanced parentheses, braces, or brackets");}return h}var b=["true","false","null","undefined"],d=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,
|
||||||
"/"):40===v||123===v||91===v?++p:41===v||125===v||93===v?--p:w||q.length||34!==v&&39!==v||(x=x.slice(1,-1));q.push(x)}if(0<p)throw Error("Unbalanced parentheses, braces, or brackets");}return k}var d=["true","false","null","undefined"],e=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,g=/"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|`(?:\\.|[^`])*`|\/\*(?:[^*]|\*+[^*/])*\*+\/|\/\/.*\n|\/(?:\\.|[^/])+\/w*|[^\s:,/][^,"'`{}()/:[\]]*[^\s,"'`{}()/:[\]]|[^\s]/g,h=/[\])"'A-Za-z0-9_$]+$/,l={"in":1,"return":1,"typeof":1},
|
f=/"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|`(?:\\.|[^`])*`|\/\*(?:[^*]|\*+[^*/])*\*+\/|\/\/.*\n|\/(?:\\.|[^/])+\/w*|[^\s:,/][^,"'`{}()/:[\]]*[^\s,"'`{}()/:[\]]|[^\s]/g,k=/[\])"'A-Za-z0-9_$]+$/,l={"in":1,"return":1,"typeof":1},e={};return{$a:[],Sa:e,Mc:c,Oc:function(g,h){function m(v,w){if(!x){var n=a.getBindingHandler(v);if(n&&n.preprocess&&!(w=n.preprocess(w,v,m)))return;if(n=e[v]){var r=w;b.includes(r)?r=!1:(n=r.match(d),r=null===n?!1:n[1]?"Object("+n[1]+")"+n[2]:r);n=r}n&&p.push("'"+("string"==typeof e[v]?
|
||||||
c={};return{bb:[],Ua:c,Oc:b,Qc:function(f,k){function m(v,w){if(!x){var n=a.getBindingHandler(v);if(n&&n.preprocess&&!(w=n.preprocess(w,v,m)))return;if(n=c[v]){var r=w;d.includes(r)?r=!1:(n=r.match(e),r=null===n?!1:n[1]?"Object("+n[1]+")"+n[2]:r);n=r}n&&p.push("'"+("string"==typeof c[v]?c[v]:v)+"':function(_z){"+r+"=_z}")}u&&(w="function(){return "+w+" }");q.push("'"+v+"':"+w)}k=k||{};var q=[],p=[],u=k.valueAccessors,x=k.bindingParams;("string"===typeof f?b(f):f).forEach(v=>m(v.key||v.unknown,v.value));
|
e[v]:v)+"':function(_z){"+r+"=_z}")}u&&(w="function(){return "+w+" }");q.push("'"+v+"':"+w)}h=h||{};var q=[],p=[],u=h.valueAccessors,x=h.bindingParams;("string"===typeof g?c(g):g).forEach(v=>m(v.key||v.unknown,v.value));p.length&&m("_ko_property_writers","{"+p.join(",")+" }");return q.join(",")},Jc:(g,h)=>{for(var m=0;m<g.length;m++)if(g[m].key==h)return!0;return!1},Bb:(g,h,m,q,p)=>{if(g&&a.O(g))!a.cc(g)||p&&g.D()===q||g(q);else if((g=h.get("_ko_property_writers"))&&g[m])g[m](q)}}})();(()=>{function c(e){return 8==
|
||||||
p.length&&m("_ko_property_writers","{"+p.join(",")+" }");return q.join(",")},Lc:(f,k)=>{for(var m=0;m<f.length;m++)if(f[m].key==k)return!0;return!1},Db:(f,k,m,q,p)=>{if(f&&a.O(f))!a.ec(f)||p&&f.D()===q||f(q);else if((f=k.get("_ko_property_writers"))&&f[m])f[m](q)}}})();(()=>{function b(c){return 8==c.nodeType&&g.test(c.nodeValue)}function d(c){return 8==c.nodeType&&h.test(c.nodeValue)}function e(c,f){for(var k=c,m=1,q=[];k=k.nextSibling;){if(d(k)&&(a.a.b.set(k,l,!0),m--,0===m))return q;q.push(k);
|
e.nodeType&&f.test(e.nodeValue)}function b(e){return 8==e.nodeType&&k.test(e.nodeValue)}function d(e,g){for(var h=e,m=1,q=[];h=h.nextSibling;){if(b(h)&&(a.a.b.set(h,l,!0),m--,0===m))return q;q.push(h);c(h)&&m++}if(!g)throw Error("Cannot find closing comment tag to match: "+e.nodeValue);return null}var f=/^\s*ko(?:\s+([\s\S]+))?\s*$/,k=/^\s*\/ko\s*$/,l="__ko_matchedEndComment__";a.h={ha:{},childNodes:e=>c(e)?d(e):e.childNodes,ua:e=>{if(c(e)){e=d(e);for(var g=0,h=e.length;g<h;g++)a.removeNode(e[g])}else a.a.gb(e)},
|
||||||
b(k)&&m++}if(!f)throw Error("Cannot find closing comment tag to match: "+c.nodeValue);return null}var g=/^\s*ko(?:\s+([\s\S]+))?\s*$/,h=/^\s*\/ko\s*$/,l="__ko_matchedEndComment__";a.h={ha:{},childNodes:c=>b(c)?e(c):c.childNodes,va:c=>{if(b(c)){c=e(c);for(var f=0,k=c.length;f<k;f++)a.removeNode(c[f])}else a.a.ib(c)},Aa:(c,f)=>{if(b(c)){a.h.va(c);c=c.nextSibling;for(var k=0,m=f.length;k<m;k++)c.parentNode.insertBefore(f[k],c)}else a.a.Aa(c,f)},prepend:(c,f)=>{if(b(c)){var k=c.nextSibling;c=c.parentNode}else k=
|
za:(e,g)=>{if(c(e)){a.h.ua(e);e=e.nextSibling;for(var h=0,m=g.length;h<m;h++)e.parentNode.insertBefore(g[h],e)}else a.a.za(e,g)},prepend:(e,g)=>{if(c(e)){var h=e.nextSibling;e=e.parentNode}else h=e.firstChild;e.insertBefore(g,h)},ac:(e,g,h)=>{h?(h=h.nextSibling,c(e)&&(e=e.parentNode),e.insertBefore(g,h)):a.h.prepend(e,g)},firstChild:e=>{if(c(e))return!e.nextSibling||b(e.nextSibling)?null:e.nextSibling;if(e.firstChild&&b(e.firstChild))throw Error("Found invalid end comment, as the first child of "+
|
||||||
c.firstChild;c.insertBefore(f,k)},cc:(c,f,k)=>{k?(k=k.nextSibling,b(c)&&(c=c.parentNode),c.insertBefore(f,k)):a.h.prepend(c,f)},firstChild:c=>{if(b(c))return!c.nextSibling||d(c.nextSibling)?null:c.nextSibling;if(c.firstChild&&d(c.firstChild))throw Error("Found invalid end comment, as the first child of "+c);return c.firstChild},nextSibling:c=>{if(b(c)){var f=e(c,void 0);c=f?0<f.length?f[f.length-1].nextSibling:c.nextSibling:null}if(c.nextSibling&&d(c.nextSibling)){f=c.nextSibling;if(d(f)&&!a.a.b.get(f,
|
e);return e.firstChild},nextSibling:e=>{if(c(e)){var g=d(e,void 0);e=g?0<g.length?g[g.length-1].nextSibling:e.nextSibling:null}if(e.nextSibling&&b(e.nextSibling)){g=e.nextSibling;if(b(g)&&!a.a.b.get(g,l))throw Error("Found end comment without a matching opening comment, as child of "+e);return null}return e.nextSibling},Ec:c,Uc:e=>(e=e.nodeValue.match(f))?e[1]:null}})();(function(){a.Y=function(){this.tc={}};a.a.extend(a.Y.prototype,{nodeHasBindings:c=>{switch(c.nodeType){case 1:return null!=c.getAttribute("data-bind")||
|
||||||
l))throw Error("Found end comment without a matching opening comment, as child of "+c);return null}return c.nextSibling},Gc:b,Wc:c=>(c=c.nodeValue.match(g))?c[1]:null}})();(function(){a.Y=function(){this.vc={}};a.a.extend(a.Y.prototype,{nodeHasBindings:b=>{switch(b.nodeType){case 1:return null!=b.getAttribute("data-bind")||a.l.getComponentNameForNode(b);case 8:return a.h.Gc(b);default:return!1}},getBindings:function(b,d){var e=this.getBindingsString(b,d);e=e?this.parseBindingsString(e,d,b):null;return a.l.Mb(e,
|
a.l.getComponentNameForNode(c);case 8:return a.h.Ec(c);default:return!1}},getBindings:function(c,b){var d=this.getBindingsString(c,b);d=d?this.parseBindingsString(d,b,c):null;return a.l.Kb(d,c,b,!1)},getBindingAccessors:function(c,b){var d=this.getBindingsString(c,b);d=d?this.parseBindingsString(d,b,c,{valueAccessors:!0}):null;return a.l.Kb(d,c,b,!0)},getBindingsString:c=>{switch(c.nodeType){case 1:return c.getAttribute("data-bind");case 8:return a.h.Uc(c)}return null},parseBindingsString:function(c,
|
||||||
b,d,!1)},getBindingAccessors:function(b,d){var e=this.getBindingsString(b,d);e=e?this.parseBindingsString(e,d,b,{valueAccessors:!0}):null;return a.l.Mb(e,b,d,!0)},getBindingsString:b=>{switch(b.nodeType){case 1:return b.getAttribute("data-bind");case 8:return a.h.Wc(b)}return null},parseBindingsString:function(b,d,e,g){try{var h=this.vc,l=b+(g&&g.valueAccessors||""),c;if(!(c=h[l])){var f="with($context){with($data||{}){return{"+a.H.Qc(b,g)+"}}}";var k=new Function("$context","$element",f);c=h[l]=
|
b,d,f){try{var k=this.tc,l=c+(f&&f.valueAccessors||""),e;if(!(e=k[l])){var g="with($context){with($data||{}){return{"+a.H.Oc(c,f)+"}}}";var h=new Function("$context","$element",g);e=k[l]=h}return e(b,d)}catch(m){throw m.message="Unable to parse bindings.\nBindings value: "+c+"\nMessage: "+m.message,m;}}});a.Y.instance=new a.Y})();(()=>{function c(n){var r=(n=a.a.b.get(n,w))&&n.G;r&&(n.G=null,r.ec())}function b(n,r,t){this.node=n;this.Pb=r;this.Ga=[];this.B=!1;r.G||a.a.N.qa(n,c);t&&t.G&&(t.G.Ga.push(n),
|
||||||
k}return c(d,e)}catch(m){throw m.message="Unable to parse bindings.\nBindings value: "+b+"\nMessage: "+m.message,m;}}});a.Y.instance=new a.Y})();(()=>{function b(n){var r=(n=a.a.b.get(n,w))&&n.G;r&&(n.G=null,r.hc())}function d(n,r,t){this.node=n;this.Rb=r;this.Ha=[];this.B=!1;r.G||a.a.N.ra(n,b);t&&t.G&&(t.G.Ha.push(n),this.$a=t)}function e(n){return a.a.za(a.o.I(n),(r,t)=>()=>n()[t])}function g(n,r,t){return"function"===typeof n?e(n.bind(null,r,t)):a.a.za(n,y=>()=>y)}function h(n,r){return e(this.getBindings.bind(this,
|
this.Ya=t)}function d(n){return a.a.ya(a.o.I(n),(r,t)=>()=>n()[t])}function f(n,r,t){return"function"===typeof n?d(n.bind(null,r,t)):a.a.ya(n,y=>()=>y)}function k(n,r){return d(this.getBindings.bind(this,n,r))}function l(n,r){var t=a.h.firstChild(r);if(t){var y,F=a.Y.instance,z=F.preprocessNode;if(z){for(;y=t;)t=a.h.nextSibling(y),z.call(F,y);t=a.h.firstChild(r)}for(;y=t;)t=a.h.nextSibling(y),e(n,y)}a.f.notify(r,a.f.B)}function e(n,r){var t=n;if(1===r.nodeType||a.Y.instance.nodeHasBindings(r))t=h(r,
|
||||||
n,r))}function l(n,r){var t=a.h.firstChild(r);if(t){var y,F=a.Y.instance,z=F.preprocessNode;if(z){for(;y=t;)t=a.h.nextSibling(y),z.call(F,y);t=a.h.firstChild(r)}for(;y=t;)t=a.h.nextSibling(y),c(n,y)}a.f.notify(r,a.f.B)}function c(n,r){var t=n;if(1===r.nodeType||a.Y.instance.nodeHasBindings(r))t=k(r,null,n).bindingContextForDescendants;t&&!x[a.a.aa(r)]&&l(t,r)}function f(n){var r=[],t={},y=[];a.a.J(n,function B(z){if(!t[z]){var A=a.getBindingHandler(z);A&&(A.after&&(y.push(z),A.after.forEach(H=>{if(n[H]){if(y.includes(H))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+
|
null,n).bindingContextForDescendants;t&&!x[a.a.aa(r)]&&l(t,r)}function g(n){var r=[],t={},y=[];a.a.J(n,function B(z){if(!t[z]){var A=a.getBindingHandler(z);A&&(A.after&&(y.push(z),A.after.forEach(H=>{if(n[H]){if(y.includes(H))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+y.join(", "));B(H)}}),y.length--),r.push({key:z,Zb:A}));t[z]=!0}});return r}function h(n,r,t){var y=a.a.b.jb(n,w,{}),F=y.rc;if(!r){if(F)throw Error("You cannot apply bindings multiple times to the same element.");
|
||||||
y.join(", "));B(H)}}),y.length--),r.push({key:z,ac:A}));t[z]=!0}});return r}function k(n,r,t){var y=a.a.b.lb(n,w,{}),F=y.tc;if(!r){if(F)throw Error("You cannot apply bindings multiple times to the same element.");y.tc=!0}F||(y.context=t);y.rb||(y.rb={});if(r&&"function"!==typeof r)var z=r;else{var B=a.Y.instance,A=B.getBindingAccessors||h,H=a.i(()=>{if(z=r?r(t,n):A.call(B,n,t)){if(t[q])t[q]();if(t[u])t[u]()}return z},null,{j:n});z&&H.da()||(H=null)}var N=t,K;if(z){var L=H?C=>()=>H()[C]():C=>z[C];
|
y.rc=!0}F||(y.context=t);y.pb||(y.pb={});if(r&&"function"!==typeof r)var z=r;else{var B=a.Y.instance,A=B.getBindingAccessors||k,H=a.i(()=>{if(z=r?r(t,n):A.call(B,n,t)){if(t[q])t[q]();if(t[u])t[u]()}return z},null,{j:n});z&&H.da()||(H=null)}var N=t,K;if(z){var L=H?C=>()=>H()[C]():C=>z[C];function M(){return a.a.ya(H?H():z,C=>C())}M.get=C=>z[C]&&L(C)();M.has=C=>C in z;a.f.B in z&&a.f.subscribe(n,a.f.B,()=>{var C=z[a.f.B]();if(C){var S=a.h.childNodes(n);S.length&&C(S,a.Ub(S[0]))}});a.f.ca in z&&(N=a.f.ub(n,
|
||||||
function M(){return a.a.za(H?H():z,C=>C())}M.get=C=>z[C]&&L(C)();M.has=C=>C in z;a.f.B in z&&a.f.subscribe(n,a.f.B,()=>{var C=z[a.f.B]();if(C){var S=a.h.childNodes(n);S.length&&C(S,a.Wb(S[0]))}});a.f.ca in z&&(N=a.f.wb(n,t),a.f.subscribe(n,a.f.ca,()=>{var C=z[a.f.ca]();C&&a.h.firstChild(n)&&C(n)}));f(z).forEach(C=>{var S=C.ac.init,ca=C.ac.update,T=C.key;if(8===n.nodeType&&!a.h.ha[T])throw Error("The binding '"+T+"' cannot be used with virtual elements");try{"function"==typeof S&&a.o.I(()=>{var X=
|
t),a.f.subscribe(n,a.f.ca,()=>{var C=z[a.f.ca]();C&&a.h.firstChild(n)&&C(n)}));g(z).forEach(C=>{var S=C.Zb.init,ca=C.Zb.update,T=C.key;if(8===n.nodeType&&!a.h.ha[T])throw Error("The binding '"+T+"' cannot be used with virtual elements");try{"function"==typeof S&&a.o.I(()=>{var X=S(n,L(T),M,N.$data,N);if(X&&X.controlsDescendantBindings){if(void 0!==K)throw Error("Multiple bindings ("+K+" and "+T+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");
|
||||||
S(n,L(T),M,N.$data,N);if(X&&X.controlsDescendantBindings){if(void 0!==K)throw Error("Multiple bindings ("+K+" and "+T+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");K=T}}),"function"==typeof ca&&a.i(()=>ca(n,L(T),M,N.$data,N),null,{j:n})}catch(X){throw X.message='Unable to process binding "'+T+": "+z[T]+'"\nMessage: '+X.message,X;}})}y=void 0===K;return{shouldBindDescendants:y,bindingContextForDescendants:y&&N}}function m(n,
|
K=T}}),"function"==typeof ca&&a.i(()=>ca(n,L(T),M,N.$data,N),null,{j:n})}catch(X){throw X.message='Unable to process binding "'+T+": "+z[T]+'"\nMessage: '+X.message,X;}})}y=void 0===K;return{shouldBindDescendants:y,bindingContextForDescendants:y&&N}}function m(n,r){return n&&n instanceof a.T?n:new a.T(n,void 0,void 0,r)}var q=Symbol("_subscribable"),p=Symbol("_ancestorBindingInfo"),u=Symbol("_dataDependency");a.c={};var x={script:!0,textarea:!0,template:!0};a.getBindingHandler=n=>a.c[n];var v={};
|
||||||
r){return n&&n instanceof a.U?n:new a.U(n,void 0,void 0,r)}var q=Symbol("_subscribable"),p=Symbol("_ancestorBindingInfo"),u=Symbol("_dataDependency");a.c={};var x={script:!0,textarea:!0,template:!0};a.getBindingHandler=n=>a.c[n];var v={};a.U=function(n,r,t,y,F){function z(){var M=N?H():H,C=a.a.g(M);r?(a.a.extend(B,r),p in r&&(B[p]=r[p])):(B.$parents=[],B.$root=C,B.ko=a);B[q]=L;A?C=B.$data:(B.$rawData=M,B.$data=C);t&&(B[t]=C);y&&y(B,r,C);if(r&&r[q]&&!a.ta.i().mb(r[q]))r[q]();K&&(B[u]=K);return B.$data}
|
a.T=function(n,r,t,y,F){function z(){var M=N?H():H,C=a.a.g(M);r?(a.a.extend(B,r),p in r&&(B[p]=r[p])):(B.$parents=[],B.$root=C,B.ko=a);B[q]=L;A?C=B.$data:(B.$rawData=M,B.$data=C);t&&(B[t]=C);y&&y(B,r,C);if(r&&r[q]&&!a.sa.i().kb(r[q]))r[q]();K&&(B[u]=K);return B.$data}var B=this,A=n===v,H=A?void 0:n,N="function"==typeof H&&!a.O(H),K=F&&F.dataDependency;if(F&&F.exportDependencies)z();else{var L=a.Pc(z);L.D();L.da()?L.equalityComparer=null:B[q]=void 0}};a.T.prototype.createChildContext=function(n,r,
|
||||||
var B=this,A=n===v,H=A?void 0:n,N="function"==typeof H&&!a.O(H),K=F&&F.dataDependency;if(F&&F.exportDependencies)z();else{var L=a.Rc(z);L.D();L.da()?L.equalityComparer=null:B[q]=void 0}};a.U.prototype.createChildContext=function(n,r,t,y){!y&&r&&"object"==typeof r&&(y=r,r=y.as,t=y.extend);if(r&&y&&y.noChildContext){var F="function"==typeof n&&!a.O(n);return new a.U(v,this,null,z=>{t&&t(z);z[r]=F?n():n},y)}return new a.U(n,this,r,(z,B)=>{z.$parentContext=B;z.$parent=B.$data;z.$parents=(B.$parents||
|
t,y){!y&&r&&"object"==typeof r&&(y=r,r=y.as,t=y.extend);if(r&&y&&y.noChildContext){var F="function"==typeof n&&!a.O(n);return new a.T(v,this,null,z=>{t&&t(z);z[r]=F?n():n},y)}return new a.T(n,this,r,(z,B)=>{z.$parentContext=B;z.$parent=B.$data;z.$parents=(B.$parents||[]).slice(0);z.$parents.unshift(z.$parent);t&&t(z)},y)};a.T.prototype.extend=function(n,r){return new a.T(v,this,null,t=>a.a.extend(t,"function"==typeof n?n(t):n),r)};var w=a.a.b.V();b.prototype.ec=function(){this.Ya&&this.Ya.G&&this.Ya.G.zc(this.node)};
|
||||||
[]).slice(0);z.$parents.unshift(z.$parent);t&&t(z)},y)};a.U.prototype.extend=function(n,r){return new a.U(v,this,null,t=>a.a.extend(t,"function"==typeof n?n(t):n),r)};var w=a.a.b.W();d.prototype.hc=function(){this.$a&&this.$a.G&&this.$a.G.Bc(this.node)};d.prototype.Bc=function(n){a.a.Ga(this.Ha,n);!this.Ha.length&&this.B&&this.Vb()};d.prototype.Vb=function(){this.B=!0;this.Rb.G&&!this.Ha.length&&(this.Rb.G=null,a.a.N.ub(this.node,b),a.f.notify(this.node,a.f.ca),this.hc())};a.f={B:"childrenComplete",
|
b.prototype.zc=function(n){a.a.Fa(this.Ga,n);!this.Ga.length&&this.B&&this.Tb()};b.prototype.Tb=function(){this.B=!0;this.Pb.G&&!this.Ga.length&&(this.Pb.G=null,a.a.N.sb(this.node,c),a.f.notify(this.node,a.f.ca),this.ec())};a.f={B:"childrenComplete",ca:"descendantsComplete",subscribe:(n,r,t,y,F)=>{var z=a.a.b.jb(n,w,{});z.ka||(z.ka=new a.W);F&&F.notifyImmediately&&z.pb[r]&&a.o.I(t,y,[n]);return z.ka.subscribe(t,y,r)},notify:(n,r)=>{var t=a.a.b.get(n,w);if(t&&(t.pb[r]=!0,t.ka&&t.ka.notifySubscribers(n,
|
||||||
ca:"descendantsComplete",subscribe:(n,r,t,y,F)=>{var z=a.a.b.lb(n,w,{});z.la||(z.la=new a.T);F&&F.notifyImmediately&&z.rb[r]&&a.o.I(t,y,[n]);return z.la.subscribe(t,y,r)},notify:(n,r)=>{var t=a.a.b.get(n,w);if(t&&(t.rb[r]=!0,t.la&&t.la.notifySubscribers(n,r),r==a.f.B))if(t.G)t.G.Vb();else if(void 0===t.G&&t.la&&t.la.xa(a.f.ca))throw Error("descendantsComplete event not supported for bindings on this node");},wb:(n,r)=>{var t=a.a.b.lb(n,w,{});t.G||(t.G=new d(n,t,r[p]));return r[p]==t?r:r.extend(y=>
|
r),r==a.f.B))if(t.G)t.G.Tb();else if(void 0===t.G&&t.ka&&t.ka.wa(a.f.ca))throw Error("descendantsComplete event not supported for bindings on this node");},ub:(n,r)=>{var t=a.a.b.jb(n,w,{});t.G||(t.G=new b(n,t,r[p]));return r[p]==t?r:r.extend(y=>{y[p]=t})}};a.Sc=n=>(n=a.a.b.get(n,w))&&n.context;a.Za=(n,r,t)=>h(n,r,m(t));a.Vc=(n,r,t)=>{t=m(t);return a.Za(n,f(r,t,n),t)};a.Nb=(n,r)=>{1!==r.nodeType&&8!==r.nodeType||l(m(n),r)};a.Mb=function(n,r,t){if(2>arguments.length){if(r=V.body,!r)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?");
|
||||||
{y[p]=t})}};a.Uc=n=>(n=a.a.b.get(n,w))&&n.context;a.ab=(n,r,t)=>k(n,r,m(t));a.Xc=(n,r,t)=>{t=m(t);return a.ab(n,g(r,t,n),t)};a.Pb=(n,r)=>{1!==r.nodeType&&8!==r.nodeType||l(m(n),r)};a.Ob=function(n,r,t){if(2>arguments.length){if(r=V.body,!r)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?");}else if(!r||1!==r.nodeType&&8!==r.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");c(m(n,t),r)};
|
}else if(!r||1!==r.nodeType&&8!==r.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");e(m(n,t),r)};a.Ub=n=>(n=n&&[1,8].includes(n.nodeType)&&a.Sc(n))?n.$data:void 0;a.m("bindingHandlers",a.c);a.m("applyBindings",a.Mb);a.m("applyBindingAccessorsToNode",a.Za);a.m("dataFor",a.Ub)})();(()=>{function c(e,g){return Object.prototype.hasOwnProperty.call(e,g)?e[g]:void 0}function b(e,g){var h=c(k,e);if(h)h.subscribe(g);else{h=k[e]=new a.W;
|
||||||
a.Wb=n=>(n=n&&[1,8].includes(n.nodeType)&&a.Uc(n))?n.$data:void 0;a.m("bindingHandlers",a.c);a.m("applyBindings",a.Ob);a.m("applyBindingAccessorsToNode",a.ab);a.m("dataFor",a.Wb)})();(()=>{function b(c,f){return Object.prototype.hasOwnProperty.call(c,f)?c[f]:void 0}function d(c,f){var k=b(h,c);if(k)k.subscribe(f);else{k=h[c]=new a.T;k.subscribe(f);e(c,(q,p)=>{p=!(!p||!p.synchronous);l[c]={definition:q,Kc:p};delete h[c];m||p?k.notifySubscribers(q):a.Ab.kc(()=>k.notifySubscribers(q))});var m=!0}}function e(c,
|
h.subscribe(g);d(e,(q,p)=>{p=!(!p||!p.synchronous);l[e]={definition:q,Ic:p};delete k[e];m||p?h.notifySubscribers(q):a.yb.ic(()=>h.notifySubscribers(q))});var m=!0}}function d(e,g){f("getConfig",[e],h=>{h?f("loadComponent",[e,h],m=>g(m,h)):g(null,null)})}function f(e,g,h,m){m||(m=a.l.loaders.slice(0));var q=m.shift();if(q){var p=q[e];if(p){var u=!1;if(void 0!==p.apply(q,g.concat(function(x){u?h(null):null!==x?h(x):f(e,g,h,m)}))&&(u=!0,!q.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");
|
||||||
f){g("getConfig",[c],k=>{k?g("loadComponent",[c,k],m=>f(m,k)):f(null,null)})}function g(c,f,k,m){m||(m=a.l.loaders.slice(0));var q=m.shift();if(q){var p=q[c];if(p){var u=!1;if(void 0!==p.apply(q,f.concat(function(x){u?k(null):null!==x?k(x):g(c,f,k,m)}))&&(u=!0,!q.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else g(c,f,k,m)}else k(null)}var h={},l={};a.l={get:(c,f)=>{var k=b(l,c);k?k.Kc?a.o.I(()=>f(k.definition)):
|
}else f(e,g,h,m)}else h(null)}var k={},l={};a.l={get:(e,g)=>{var h=c(l,e);h?h.Ic?a.o.I(()=>g(h.definition)):a.yb.ic(()=>g(h.definition)):b(e,g)},wc:e=>delete l[e],Fb:f};a.l.loaders=[];a.m("components",a.l)})();(()=>{function c(e,g,h,m){var q={},p=2;g=h.template;h=h.viewModel;g?a.l.Fb("loadTemplate",[e,g],u=>{q.template=u;0===--p&&m(q)}):0===--p&&m(q);h?a.l.Fb("loadViewModel",[e,h],u=>{q[l]=u;0===--p&&m(q)}):0===--p&&m(q)}function b(e,g,h){if("function"===typeof g)h(q=>new g(q));else if("function"===
|
||||||
a.Ab.kc(()=>f(k.definition)):d(c,f)},yc:c=>delete l[c],Hb:g};a.l.loaders=[];a.m("components",a.l)})();(()=>{function b(c,f,k,m){var q={},p=2;f=k.template;k=k.viewModel;f?a.l.Hb("loadTemplate",[c,f],u=>{q.template=u;0===--p&&m(q)}):0===--p&&m(q);k?a.l.Hb("loadViewModel",[c,k],u=>{q[l]=u;0===--p&&m(q)}):0===--p&&m(q)}function d(c,f,k){if("function"===typeof f)k(q=>new f(q));else if("function"===typeof f[l])k(f[l]);else if("instance"in f){var m=f.instance;k(()=>m)}else"viewModel"in f?d(c,f.viewModel,
|
typeof g[l])h(g[l]);else if("instance"in g){var m=g.instance;h(()=>m)}else"viewModel"in g?b(e,g.viewModel,h):e("Unknown viewModel value: "+g)}function d(e){if("template"==a.a.aa(e)&&e.content instanceof DocumentFragment)return a.a.Ha(e.content.childNodes);throw"Template Source Element not a <template>";}function f(e){return g=>{throw Error("Component '"+e+"': "+g);}}var k={};a.l.register=(e,g)=>{if(!g)throw Error("Invalid configuration for "+e);if(a.l.mb(e))throw Error("Component "+e+" is already registered");
|
||||||
k):c("Unknown viewModel value: "+f)}function e(c){if("template"==a.a.aa(c)&&c.content instanceof DocumentFragment)return a.a.Ia(c.content.childNodes);throw"Template Source Element not a <template>";}function g(c){return f=>{throw Error("Component '"+c+"': "+f);}}var h={};a.l.register=(c,f)=>{if(!f)throw Error("Invalid configuration for "+c);if(a.l.ob(c))throw Error("Component "+c+" is already registered");h[c]=f};a.l.ob=c=>Object.prototype.hasOwnProperty.call(h,c);a.l.unregister=c=>{delete h[c];a.l.yc(c)};
|
k[e]=g};a.l.mb=e=>Object.prototype.hasOwnProperty.call(k,e);a.l.unregister=e=>{delete k[e];a.l.wc(e)};a.l.yc={getConfig:(e,g)=>{e=a.l.mb(e)?k[e]:null;g(e)},loadComponent:(e,g,h)=>{var m=f(e);c(e,m,g,h)},loadTemplate:(e,g,h)=>{e=f(e);if("string"===typeof g)h(a.a.Ra(g));else if(g instanceof Array)h(g);else if(g instanceof DocumentFragment)h([...g.childNodes]);else if(g.element)if(g=g.element,g instanceof HTMLElement)h(d(g));else if("string"===typeof g){var m=V.getElementById(g);m?h(d(m)):e("Cannot find element with ID "+
|
||||||
a.l.Ac={getConfig:(c,f)=>{c=a.l.ob(c)?h[c]:null;f(c)},loadComponent:(c,f,k)=>{var m=g(c);b(c,m,f,k)},loadTemplate:(c,f,k)=>{c=g(c);if("string"===typeof f)k(a.a.Sa(f));else if(f instanceof Array)k(f);else if(f instanceof DocumentFragment)k([...f.childNodes]);else if(f.element)if(f=f.element,f instanceof HTMLElement)k(e(f));else if("string"===typeof f){var m=V.getElementById(f);m?k(e(m)):c("Cannot find element with ID "+f)}else c("Unknown element type: "+f);else c("Unknown template value: "+f)},loadViewModel:(c,
|
g)}else e("Unknown element type: "+g);else e("Unknown template value: "+g)},loadViewModel:(e,g,h)=>b(f(e),g,h)};var l="createViewModel";a.m("components.register",a.l.register);a.l.loaders.push(a.l.yc)})();(()=>{function c(d,f){var k=d.getAttribute("params");return k?(f=b.parseBindingsString(k,f,d,{valueAccessors:!0,bindingParams:!0}),f=a.a.ya(f,l=>a.i(l,null,{j:d})),k=a.a.ya(f,l=>{var e=l.D();return l.da()?a.i({read:()=>a.a.g(l()),write:a.cc(e)&&(g=>l()(g)),j:d}):e}),Object.prototype.hasOwnProperty.call(k,
|
||||||
f,k)=>d(g(c),f,k)};var l="createViewModel";a.m("components.register",a.l.register);a.l.loaders.push(a.l.Ac)})();(()=>{function b(e,g){var h=e.getAttribute("params");return h?(g=d.parseBindingsString(h,g,e,{valueAccessors:!0,bindingParams:!0}),g=a.a.za(g,l=>a.i(l,null,{j:e})),h=a.a.za(g,l=>{var c=l.D();return l.da()?a.i({read:()=>a.a.g(l()),write:a.ec(c)&&(f=>l()(f)),j:e}):c}),Object.prototype.hasOwnProperty.call(h,"$raw")||(h.$raw=g),h):{$raw:{}}}a.l.getComponentNameForNode=e=>{var g=a.a.aa(e);if(a.l.ob(g)&&
|
"$raw")||(k.$raw=f),k):{$raw:{}}}a.l.getComponentNameForNode=d=>{var f=a.a.aa(d);if(a.l.mb(f)&&(-1!=f.indexOf("-")||"[object HTMLUnknownElement]"==""+d))return f};a.l.Kb=(d,f,k,l)=>{if(1===f.nodeType){var e=a.l.getComponentNameForNode(f);if(e){d=d||{};if(d.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var g={name:e,params:c(f,k)};d.component=l?()=>g:g}}return d};var b=new a.Y})();(()=>{function c(f,k,l){k=k.template;if(!k)throw Error("Component '"+
|
||||||
(-1!=g.indexOf("-")||"[object HTMLUnknownElement]"==""+e))return g};a.l.Mb=(e,g,h,l)=>{if(1===g.nodeType){var c=a.l.getComponentNameForNode(g);if(c){e=e||{};if(e.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var f={name:c,params:b(g,h)};e.component=l?()=>f:f}}return e};var d=new a.Y})();(()=>{function b(g,h,l){h=h.template;if(!h)throw Error("Component '"+g+"' has no template");g=a.a.Ia(h);a.h.Aa(l,g)}function d(g,h,l){var c=g.createViewModel;
|
f+"' has no template");f=a.a.Ha(k);a.h.za(l,f)}function b(f,k,l){var e=f.createViewModel;return e?e.call(f,k,l):k}var d=0;a.c.component={init:(f,k,l,e,g)=>{var h,m,q,p=()=>{var x=h&&h.dispose;"function"===typeof x&&x.call(h);q&&q.s();m=h=q=null},u=[...a.h.childNodes(f)];a.h.ua(f);a.a.N.qa(f,p);a.i(()=>{var x=a.a.g(k());if("string"===typeof x)var v=x;else{v=a.a.g(x.name);var w=a.a.g(x.params)}if(!v)throw Error("No component name specified");var n=a.f.ub(f,g),r=m=++d;a.l.get(v,t=>{if(m===r){p();if(!t)throw Error("Unknown component '"+
|
||||||
return c?c.call(g,h,l):h}var e=0;a.c.component={init:(g,h,l,c,f)=>{var k,m,q,p=()=>{var x=k&&k.dispose;"function"===typeof x&&x.call(k);q&&q.s();m=k=q=null},u=[...a.h.childNodes(g)];a.h.va(g);a.a.N.ra(g,p);a.i(()=>{var x=a.a.g(h());if("string"===typeof x)var v=x;else{v=a.a.g(x.name);var w=a.a.g(x.params)}if(!v)throw Error("No component name specified");var n=a.f.wb(g,f),r=m=++e;a.l.get(v,t=>{if(m===r){p();if(!t)throw Error("Unknown component '"+v+"'");b(v,t,g);var y=d(t,w,{element:g,templateNodes:u});
|
v+"'");c(v,t,f);var y=b(t,w,{element:f,templateNodes:u});t=n.createChildContext(y,{extend:F=>{F.$component=y;F.$componentTemplateNodes=u}});y&&y.koDescendantsComplete&&(q=a.f.subscribe(f,a.f.ca,y.koDescendantsComplete,y));h=y;a.Nb(t,f)}})},null,{j:f});return{controlsDescendantBindings:!0}}};a.h.ha.component=!0})();a.c.attr={update:(c,b)=>{b=a.a.g(b())||{};a.a.J(b,function(d,f){f=a.a.g(f);var k=d.indexOf(":");k="lookupNamespaceURI"in c&&0<k&&c.lookupNamespaceURI(d.substr(0,k));var l=!1===f||null===
|
||||||
t=n.createChildContext(y,{extend:F=>{F.$component=y;F.$componentTemplateNodes=u}});y&&y.koDescendantsComplete&&(q=a.f.subscribe(g,a.f.ca,y.koDescendantsComplete,y));k=y;a.Pb(t,g)}})},null,{j:g});return{controlsDescendantBindings:!0}}};a.h.ha.component=!0})();a.c.attr={update:(b,d)=>{d=a.a.g(d())||{};a.a.J(d,function(e,g){g=a.a.g(g);var h=e.indexOf(":");h="lookupNamespaceURI"in b&&0<h&&b.lookupNamespaceURI(e.substr(0,h));var l=!1===g||null===g||void 0===g;l?h?b.removeAttributeNS(h,e):b.removeAttribute(e):
|
f||void 0===f;l?k?c.removeAttributeNS(k,d):c.removeAttribute(d):f=f.toString();l||(k?c.setAttributeNS(k,d,f):c.setAttribute(d,f));"name"===d&&(c.name=l?"":f)})}};a.c.css={update:(c,b)=>{b=a.a.g(b());null!==b&&"object"==typeof b?a.a.J(b,(d,f)=>{f=a.a.g(f);a.a.Ab(c,d,f)}):(b=a.a.vb(b),a.a.Ab(c,c.__ko__cssValue,!1),c.__ko__cssValue=b,a.a.Ab(c,b,!0))}};a.c.enable={update:(c,b)=>{(b=a.a.g(b()))&&c.disabled?c.removeAttribute("disabled"):b||c.disabled||(c.disabled=!0)}};a.c.disable={update:(c,b)=>a.c.enable.update(c,
|
||||||
g=g.toString();l||(h?b.setAttributeNS(h,e,g):b.setAttribute(e,g));"name"===e&&(b.name=l?"":g)})}};a.c.css={update:(b,d)=>{d=a.a.g(d());null!==d&&"object"==typeof d?a.a.J(d,(e,g)=>{g=a.a.g(g);a.a.Cb(b,e,g)}):(d=a.a.xb(d),a.a.Cb(b,b.__ko__cssValue,!1),b.__ko__cssValue=d,a.a.Cb(b,d,!0))}};a.c.enable={update:(b,d)=>{(d=a.a.g(d()))&&b.disabled?b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!0)}};a.c.disable={update:(b,d)=>a.c.enable.update(b,()=>!a.a.g(d()))};a.c.event={init:(b,d,e,g,h)=>{var l=
|
()=>!a.a.g(b()))};a.c.event={init:(c,b,d,f,k)=>{var l=b()||{};a.a.J(l,e=>{"string"==typeof e&&a.a.K(c,e,function(g){var h=b()[e];if(h){try{f=k.$data;var m=h.apply(f,[f,...arguments])}finally{!0!==m&&g.preventDefault()}!1===d.get(e+"Bubble")&&(g.cancelBubble=!0,g.stopPropagation())}})})}};a.c.foreach={dc:c=>()=>{var b=c(),d=a.a.Nc(b);if(!d||"number"==typeof d.length)return{foreach:b};a.a.g(b);return{foreach:d.data,as:d.as,noChildContext:d.noChildContext,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd,
|
||||||
d()||{};a.a.J(l,c=>{"string"==typeof c&&a.a.K(b,c,function(f){var k=d()[c];if(k){try{g=h.$data;var m=k.apply(g,[g,...arguments])}finally{!0!==m&&f.preventDefault()}!1===e.get(c+"Bubble")&&(f.cancelBubble=!0,f.stopPropagation())}})})}};a.c.foreach={fc:b=>()=>{var d=b(),e=a.a.Pc(d);if(!e||"number"==typeof e.length)return{foreach:d};a.a.g(d);return{foreach:e.data,as:e.as,noChildContext:e.noChildContext,includeDestroyed:e.includeDestroyed,afterAdd:e.afterAdd,beforeRemove:e.beforeRemove,afterRender:e.afterRender,
|
beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove}},init:(c,b)=>a.c.template.init(c,a.c.foreach.dc(b)),update:(c,b,d,f,k)=>a.c.template.update(c,a.c.foreach.dc(b),d,f,k)};a.H.$a.foreach=!1;a.h.ha.foreach=!0;a.c.hasfocus={init:(c,b,d)=>{var f=l=>{c.__ko_hasfocusUpdating=!0;l=c.ownerDocument.activeElement===c;var e=b();a.H.Bb(e,d,"hasfocus",l,!0);c.__ko_hasfocusLastValue=l;c.__ko_hasfocusUpdating=!1},k=f.bind(null,!0);f=f.bind(null,!1);a.a.K(c,"focus",
|
||||||
beforeMove:e.beforeMove,afterMove:e.afterMove}},init:(b,d)=>a.c.template.init(b,a.c.foreach.fc(d)),update:(b,d,e,g,h)=>a.c.template.update(b,a.c.foreach.fc(d),e,g,h)};a.H.bb.foreach=!1;a.h.ha.foreach=!0;a.c.hasfocus={init:(b,d,e)=>{var g=l=>{b.__ko_hasfocusUpdating=!0;l=b.ownerDocument.activeElement===b;var c=d();a.H.Db(c,e,"hasfocus",l,!0);b.__ko_hasfocusLastValue=l;b.__ko_hasfocusUpdating=!1},h=g.bind(null,!0);g=g.bind(null,!1);a.a.K(b,"focus",h);a.a.K(b,"focusin",h);a.a.K(b,"blur",g);a.a.K(b,"focusout",
|
k);a.a.K(c,"focusin",k);a.a.K(c,"blur",f);a.a.K(c,"focusout",f);c.__ko_hasfocusLastValue=!1},update:(c,b)=>{b=!!a.a.g(b());c.__ko_hasfocusUpdating||c.__ko_hasfocusLastValue===b||(b?c.focus():c.blur())}};a.H.Sa.hasfocus=!0;a.c.hasFocus=a.c.hasfocus;a.H.Sa.hasFocus="hasfocus";a.c.html={init:()=>({controlsDescendantBindings:!0}),update:(c,b)=>a.a.kc(c,b())};(function(){function c(b,d,f){a.c[b]={init:(k,l,e,g,h)=>{var m,q,p={},u;if(d){g=e.get("as");var x=e.get("noChildContext");var v=!(g&&x);p={as:g,
|
||||||
g);b.__ko_hasfocusLastValue=!1},update:(b,d)=>{d=!!a.a.g(d());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===d||(d?b.focus():b.blur())}};a.H.Ua.hasfocus=!0;a.c.hasFocus=a.c.hasfocus;a.H.Ua.hasFocus="hasfocus";a.c.html={init:()=>({controlsDescendantBindings:!0}),update:(b,d)=>a.a.mc(b,d())};(function(){function b(d,e,g){a.c[d]={init:(h,l,c,f,k)=>{var m,q,p={},u;if(e){f=c.get("as");var x=c.get("noChildContext");var v=!(f&&x);p={as:f,noChildContext:x,exportDependencies:v}}var w=(u="render"==c.get("completeOn"))||
|
noChildContext:x,exportDependencies:v}}var w=(u="render"==e.get("completeOn"))||e.has(a.f.ca);a.i(()=>{var n=a.a.g(l()),r=!f!==!n,t=!q;if(v||r!==m){w&&(h=a.f.ub(k,h));if(r){if(!d||v)p.dataDependency=a.sa.i();var y=d?h.createChildContext("function"==typeof n?n:l,p):a.sa.La()?h.extend(null,p):h}t&&a.sa.La()&&(q=a.a.Ha(a.h.childNodes(k),!0));r?(t||a.h.za(k,a.a.Ha(q)),a.Nb(y,k)):(a.h.ua(k),u||a.f.notify(k,a.f.B));m=r}},null,{j:k});return{controlsDescendantBindings:!0}}};a.H.$a[b]=!1;a.h.ha[b]=!0}c("if");
|
||||||
c.has(a.f.ca);a.i(()=>{var n=a.a.g(l()),r=!g!==!n,t=!q;if(v||r!==m){w&&(k=a.f.wb(h,k));if(r){if(!e||v)p.dataDependency=a.ta.i();var y=e?k.createChildContext("function"==typeof n?n:l,p):a.ta.Ma()?k.extend(null,p):k}t&&a.ta.Ma()&&(q=a.a.Ia(a.h.childNodes(h),!0));r?(t||a.h.Aa(h,a.a.Ia(q)),a.Pb(y,h)):(a.h.va(h),u||a.f.notify(h,a.f.B));m=r}},null,{j:h});return{controlsDescendantBindings:!0}}};a.H.bb[d]=!1;a.h.ha[d]=!0}b("if");b("ifnot",!1,!0);b("with",!0)})();var aa={};a.c.options={init:b=>{if("select"!==
|
c("ifnot",!1,!0);c("with",!0)})();var aa={};a.c.options={init:c=>{if("select"!==a.a.aa(c))throw Error("options binding applies only to SELECT elements");for(;0<c.length;)c.remove(0);return{controlsDescendantBindings:!0}},update:(c,b,d)=>{function f(){return Array.from(c.options).filter(v=>v.selected)}function k(v,w,n){var r=typeof w;return"function"==r?w(v):"string"==r?v[w]:n}function l(v,w){u&&m?a.f.notify(c,a.f.B):q.length&&(v=q.includes(a.A.S(w[0])),w[0].selected=v,u&&!v&&a.o.I(a.a.mc,null,[c,
|
||||||
a.a.aa(b))throw Error("options binding applies only to SELECT elements");for(;0<b.length;)b.remove(0);return{controlsDescendantBindings:!0}},update:(b,d,e)=>{function g(){return Array.from(b.options).filter(v=>v.selected)}function h(v,w,n){var r=typeof w;return"function"==r?w(v):"string"==r?v[w]:n}function l(v,w){u&&m?a.f.notify(b,a.f.B):q.length&&(v=q.includes(a.A.S(w[0])),w[0].selected=v,u&&!v&&a.o.I(a.a.oc,null,[b,"change"]))}var c=b.multiple,f=0!=b.length&&c?b.scrollTop:null,k=a.a.g(d()),m=e.get("valueAllowUnset")&&
|
"change"]))}var e=c.multiple,g=0!=c.length&&e?c.scrollTop:null,h=a.a.g(b()),m=d.get("valueAllowUnset")&&d.has("value");b={};var q=[];m||(e?q=f().map(a.A.S):0<=c.selectedIndex&&q.push(a.A.S(c.options[c.selectedIndex])));if(h){"undefined"==typeof h.length&&(h=[h]);var p=h.filter(v=>v||null==v);d.has("optionsCaption")&&(h=a.a.g(d.get("optionsCaption")),null!==h&&void 0!==h&&p.unshift(aa))}var u=!1;b.beforeRemove=v=>c.removeChild(v);h=l;d.has("optionsAfterRender")&&"function"==typeof d.get("optionsAfterRender")&&
|
||||||
e.has("value");d={};var q=[];m||(c?q=g().map(a.A.S):0<=b.selectedIndex&&q.push(a.A.S(b.options[b.selectedIndex])));if(k){"undefined"==typeof k.length&&(k=[k]);var p=k.filter(v=>v||null==v);e.has("optionsCaption")&&(k=a.a.g(e.get("optionsCaption")),null!==k&&void 0!==k&&p.unshift(aa))}var u=!1;d.beforeRemove=v=>b.removeChild(v);k=l;e.has("optionsAfterRender")&&"function"==typeof e.get("optionsAfterRender")&&(k=(v,w)=>{l(v,w);a.o.I(e.get("optionsAfterRender"),null,[w[0],v!==aa?v:void 0])});a.a.lc(b,
|
(h=(v,w)=>{l(v,w);a.o.I(d.get("optionsAfterRender"),null,[w[0],v!==aa?v:void 0])});a.a.jc(c,p,function(v,w,n){n.length&&(q=!m&&n[0].selected?[a.A.S(n[0])]:[],u=!0);w=c.ownerDocument.createElement("option");v===aa?(a.a.tb(w,d.get("optionsCaption")),a.A.Va(w,void 0)):(n=k(v,d.get("optionsValue"),v),a.A.Va(w,a.a.g(n)),v=k(v,d.get("optionsText"),n),a.a.tb(w,v));return[w]},b,h);if(!m){var x;e?x=q.length&&f().length<q.length:x=q.length&&0<=c.selectedIndex?a.A.S(c.options[c.selectedIndex])!==q[0]:q.length||
|
||||||
p,function(v,w,n){n.length&&(q=!m&&n[0].selected?[a.A.S(n[0])]:[],u=!0);w=b.ownerDocument.createElement("option");v===aa?(a.a.vb(w,e.get("optionsCaption")),a.A.Xa(w,void 0)):(n=h(v,e.get("optionsValue"),v),a.A.Xa(w,a.a.g(n)),v=h(v,e.get("optionsText"),n),a.a.vb(w,v));return[w]},d,k);if(!m){var x;c?x=q.length&&g().length<q.length:x=q.length&&0<=b.selectedIndex?a.A.S(b.options[b.selectedIndex])!==q[0]:q.length||0<=b.selectedIndex;x&&a.o.I(a.a.oc,null,[b,"change"])}(m||a.ta.nb())&&a.f.notify(b,a.f.B);
|
0<=c.selectedIndex;x&&a.o.I(a.a.mc,null,[c,"change"])}(m||a.sa.lb())&&a.f.notify(c,a.f.B);g&&20<Math.abs(g-c.scrollTop)&&(c.scrollTop=g)}};a.c.options.qb=a.a.b.V();a.c.style={update:(c,b)=>{b=a.a.g(b()||{});a.a.J(b,(d,f)=>{f=a.a.g(f);if(null===f||void 0===f||!1===f)f="";if(/^--/.test(d))c.style.setProperty(d,f);else{d=d.replace(/-(\w)/g,(l,e)=>e.toUpperCase());var k=c.style[d];c.style[d]=f;f===k||c.style[d]!=k||isNaN(f)||(c.style[d]=f+"px")}})}};a.c.submit={init:(c,b,d,f,k)=>{if("function"!=typeof b())throw Error("The value for a submit binding must be a function");
|
||||||
f&&20<Math.abs(f-b.scrollTop)&&(b.scrollTop=f)}};a.c.options.sb=a.a.b.W();a.c.style={update:(b,d)=>{d=a.a.g(d()||{});a.a.J(d,(e,g)=>{g=a.a.g(g);if(null===g||void 0===g||!1===g)g="";if(/^--/.test(e))b.style.setProperty(e,g);else{e=e.replace(/-(\w)/g,(l,c)=>c.toUpperCase());var h=b.style[e];b.style[e]=g;g===h||b.style[e]!=h||isNaN(g)||(b.style[e]=g+"px")}})}};a.c.submit={init:(b,d,e,g,h)=>{if("function"!=typeof d())throw Error("The value for a submit binding must be a function");a.a.K(b,"submit",l=>
|
a.a.K(c,"submit",l=>{var e=b();try{var g=e.call(k.$data,c)}finally{!0!==g&&(l.preventDefault?l.preventDefault():l.returnValue=!1)}})}};a.c.text={init:()=>({controlsDescendantBindings:!0}),update:(c,b)=>a.a.tb(c,b())};a.h.ha.text=!0;a.c.textInput={init:(c,b,d)=>{var f=c.value,k,l,e=()=>{clearTimeout(k);l=k=void 0;var h=c.value;f!==h&&(f=h,a.H.Bb(b(),d,"textInput",h))},g=()=>{var h=a.a.g(b());if(null===h||void 0===h)h="";void 0!==l&&h===l?a.a.setTimeout(g,4):c.value!==h&&(c.value=h,f=c.value)};a.a.K(c,
|
||||||
{var c=d();try{var f=c.call(h.$data,b)}finally{!0!==f&&(l.preventDefault?l.preventDefault():l.returnValue=!1)}})}};a.c.text={init:()=>({controlsDescendantBindings:!0}),update:(b,d)=>a.a.vb(b,d())};a.h.ha.text=!0;a.c.textInput={init:(b,d,e)=>{var g=b.value,h,l,c=()=>{clearTimeout(h);l=h=void 0;var k=b.value;g!==k&&(g=k,a.H.Db(d(),e,"textInput",k))},f=()=>{var k=a.a.g(d());if(null===k||void 0===k)k="";void 0!==l&&k===l?a.a.setTimeout(f,4):b.value!==k&&(b.value=k,g=b.value)};a.a.K(b,"input",c);a.a.K(b,
|
"input",e);a.a.K(c,"change",e);a.a.K(c,"blur",e);a.i(g,null,{j:c})}};a.H.Sa.textInput=!0;a.c.textinput={preprocess:(c,b,d)=>d("textInput",c)};a.c.value={init:(c,b,d)=>{var f=a.a.aa(c),k="input"==f;if(!k||"checkbox"!=c.type&&"radio"!=c.type){var l=[],e=d.get("valueUpdate"),g=null;e&&("string"==typeof e?l=[e]:l=e?e.filter((p,u)=>e.indexOf(p)===u):[],a.a.Fa(l,"change"));var h=()=>{g=null;var p=b(),u=a.A.S(c);a.H.Bb(p,d,"value",u)};l.forEach(p=>{var u=h;a.a.Tc(p,"after")&&(u=()=>{g=a.A.S(c);a.a.setTimeout(h,
|
||||||
"change",c);a.a.K(b,"blur",c);a.i(f,null,{j:b})}};a.H.Ua.textInput=!0;a.c.textinput={preprocess:(b,d,e)=>e("textInput",b)};a.c.value={init:(b,d,e)=>{var g=a.a.aa(b),h="input"==g;if(!h||"checkbox"!=b.type&&"radio"!=b.type){var l=[],c=e.get("valueUpdate"),f=null;c&&("string"==typeof c?l=[c]:l=c?c.filter((p,u)=>c.indexOf(p)===u):[],a.a.Ga(l,"change"));var k=()=>{f=null;var p=d(),u=a.A.S(b);a.H.Db(p,e,"value",u)};l.forEach(p=>{var u=k;a.a.Vc(p,"after")&&(u=()=>{f=a.A.S(b);a.a.setTimeout(k,0)},p=p.substring(5));
|
0)},p=p.substring(5));a.a.K(c,p,u)});var m=k&&"file"==c.type?()=>{var p=a.a.g(b());null===p||void 0===p||""===p?c.value="":a.o.I(h)}:()=>{var p=a.a.g(b()),u=a.A.S(c);if(null!==g&&p===g)a.a.setTimeout(m,0);else if(p!==u||void 0===u)"select"===f?(u=d.get("valueAllowUnset"),a.A.Va(c,p,u),u||p===a.A.S(c)||a.o.I(h)):a.A.Va(c,p)};if("select"===f){var q;a.f.subscribe(c,a.f.B,()=>{q?d.get("valueAllowUnset")?m():h():(a.a.K(c,"change",h),q=a.i(m,null,{j:c}))},null,{notifyImmediately:!0})}else a.a.K(c,"change",
|
||||||
a.a.K(b,p,u)});var m=h&&"file"==b.type?()=>{var p=a.a.g(d());null===p||void 0===p||""===p?b.value="":a.o.I(k)}:()=>{var p=a.a.g(d()),u=a.A.S(b);if(null!==f&&p===f)a.a.setTimeout(m,0);else if(p!==u||void 0===u)"select"===g?(u=e.get("valueAllowUnset"),a.A.Xa(b,p,u),u||p===a.A.S(b)||a.o.I(k)):a.A.Xa(b,p)};if("select"===g){var q;a.f.subscribe(b,a.f.B,()=>{q?e.get("valueAllowUnset")?m():k():(a.a.K(b,"change",k),q=a.i(m,null,{j:b}))},null,{notifyImmediately:!0})}else a.a.K(b,"change",k),a.i(m,null,{j:b})}else a.ab(b,
|
h),a.i(m,null,{j:c})}else a.Za(c,{checkedValue:b})},update:()=>{}};a.H.Sa.value=!0;a.c.visible={update:(c,b)=>{b=a.a.g(b());var d="none"!=c.style.display;b&&!d?c.style.display="":d&&!b&&(c.style.display="none")}};a.c.hidden={update:(c,b)=>c.hidden=!!a.a.g(b())};(function(c){a.c[c]={init:function(b,d,f,k,l){return a.c.event.init.call(this,b,()=>({[c]:d()}),f,k,l)}}})("click");(()=>{a.F={};a.F.C=function(d){if(this.C=d)this.zb="template"==a.a.aa(d)&&d.content&&11===d.content.nodeType?3:4};a.F.C.prototype.text=
|
||||||
{checkedValue:d})},update:()=>{}};a.H.Ua.value=!0;a.c.visible={update:(b,d)=>{d=a.a.g(d());var e="none"!=b.style.display;d&&!e?b.style.display="":e&&!d&&(b.style.display="none")}};a.c.hidden={update:(b,d)=>b.hidden=!!a.a.g(d())};(function(b){a.c[b]={init:function(d,e,g,h,l){return a.c.event.init.call(this,d,()=>({[b]:e()}),g,h,l)}}})("click");(()=>{a.F={};a.F.C=function(e){if(this.C=e)this.Bb="template"==a.a.aa(e)&&e.content&&11===e.content.nodeType?3:4};a.F.C.prototype.text=function(){if(0==arguments.length)return this.C.innerHTML;
|
function(){if(0==arguments.length)return this.C.innerHTML;a.a.kc(this.C,arguments[0])};var c=a.a.b.V()+"_";a.F.C.prototype.data=function(d){if(1===arguments.length)return a.a.b.get(this.C,c+d);a.a.b.set(this.C,c+d,arguments[1])};var b=a.a.b.V();a.F.C.prototype.nodes=function(){var d=this.C;if(0==arguments.length){var f=a.a.b.get(d,b)||{},k=f.Ia||(3===this.zb?d.content:4===this.zb?d:void 0);if(!k||f.sc){var l=this.text();l&&l!==f.Aa&&(k=a.a.Lc(l,d.ownerDocument),a.a.b.set(d,b,{Ia:k,Aa:l,sc:!0}))}return k}f=
|
||||||
a.a.mc(this.C,arguments[0])};var b=a.a.b.W()+"_";a.F.C.prototype.data=function(e){if(1===arguments.length)return a.a.b.get(this.C,b+e);a.a.b.set(this.C,b+e,arguments[1])};var d=a.a.b.W();a.F.C.prototype.nodes=function(){var e=this.C;if(0==arguments.length){var g=a.a.b.get(e,d)||{},h=g.Ja||(3===this.Bb?e.content:4===this.Bb?e:void 0);if(!h||g.uc){var l=this.text();l&&l!==g.Ba&&(h=a.a.Nc(l,e.ownerDocument),a.a.b.set(e,d,{Ja:h,Ba:l,uc:!0}))}return h}g=arguments[0];void 0!==this.Bb&&this.text("");a.a.b.set(e,
|
arguments[0];void 0!==this.zb&&this.text("");a.a.b.set(d,b,{Ia:f})};a.F.ba=function(d){this.C=d};a.F.ba.prototype=new a.F.C;a.F.ba.prototype.constructor=a.F.ba;a.F.ba.prototype.text=function(){if(0==arguments.length){var d=a.a.b.get(this.C,b)||{};void 0===d.Aa&&d.Ia&&(d.Aa=d.Ia.innerHTML);return d.Aa}a.a.b.set(this.C,b,{Aa:arguments[0]})}})();(()=>{function c(e,g){if(e.length){var h=e[0],m=e[e.length-1],q=h.parentNode,p=a.Y.instance,u=p.preprocessNode;if(u){f(h,m,(x,v)=>{var w=x.previousSibling,n=
|
||||||
d,{Ja:g})};a.F.ba=function(e){this.C=e};a.F.ba.prototype=new a.F.C;a.F.ba.prototype.constructor=a.F.ba;a.F.ba.prototype.text=function(){if(0==arguments.length){var e=a.a.b.get(this.C,d)||{};void 0===e.Ba&&e.Ja&&(e.Ba=e.Ja.innerHTML);return e.Ba}a.a.b.set(this.C,d,{Ba:arguments[0]})}})();(()=>{function b(c,f){if(c.length){var k=c[0],m=c[c.length-1],q=k.parentNode,p=a.Y.instance,u=p.preprocessNode;if(u){g(k,m,(x,v)=>{var w=x.previousSibling,n=u.call(p,x);n&&(x===k&&(k=n[0]||v),x===m&&(m=n[n.length-
|
u.call(p,x);n&&(x===h&&(h=n[0]||v),x===m&&(m=n[n.length-1]||w))});e.length=0;if(!h)return;h===m?e.push(h):(e.push(h,m),a.a.va(e,q))}f(h,m,x=>{1!==x.nodeType&&8!==x.nodeType||a.Mb(g,x)});a.a.va(e,q)}}function b(e,g,h,m,q){q=q||{};var p=(e&&(e.nodeType?e:0<e.length?e[0]:null)||h||{}).ownerDocument;var u=p;if("string"==typeof h){u=u||V;u=u.getElementById(h);if(!u)throw Error("Cannot find template with ID "+h);h=new a.F.C(u)}else if([1,8].includes(h.nodeType))h=new a.F.ba(h);else throw Error("Unknown template type: "+
|
||||||
1]||w))});c.length=0;if(!k)return;k===m?c.push(k):(c.push(k,m),a.a.wa(c,q))}g(k,m,x=>{1!==x.nodeType&&8!==x.nodeType||a.Ob(f,x)});a.a.wa(c,q)}}function d(c,f,k,m,q){q=q||{};var p=(c&&(c.nodeType?c:0<c.length?c[0]:null)||k||{}).ownerDocument;var u=p;if("string"==typeof k){u=u||V;u=u.getElementById(k);if(!u)throw Error("Cannot find template with ID "+k);k=new a.F.C(u)}else if([1,8].includes(k.nodeType))k=new a.F.ba(k);else throw Error("Unknown template type: "+k);p=(u=k.Mc?k.Mc():null)?[...u.cloneNode(!0).childNodes]:
|
h);p=(u=h.Kc?h.Kc():null)?[...u.cloneNode(!0).childNodes]:a.a.Ra(h.text(),p);if("number"!=typeof p.length||0<p.length&&"number"!=typeof p[0].nodeType)throw Error("Template engine must return an array of DOM nodes");h=!1;switch(g){case "replaceChildren":a.h.za(e,p);h=!0;break;case "ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+g);}h&&(c(p,m),q.afterRender&&a.o.I(q.afterRender,null,[p,m[q.as||"$data"]]),"replaceChildren"==g&&a.f.notify(e,a.f.B));return p}function d(e,g,h){return a.O(e)?
|
||||||
a.a.Sa(k.text(),p);if("number"!=typeof p.length||0<p.length&&"number"!=typeof p[0].nodeType)throw Error("Template engine must return an array of DOM nodes");k=!1;switch(f){case "replaceChildren":a.h.Aa(c,p);k=!0;break;case "ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+f);}k&&(b(p,m),q.afterRender&&a.o.I(q.afterRender,null,[p,m[q.as||"$data"]]),"replaceChildren"==f&&a.f.notify(c,a.f.B));return p}function e(c,f,k){return a.O(c)?c():"function"===typeof c?c(f,k):c}var g=(c,f,k)=>
|
e():"function"===typeof e?e(g,h):e}var f=(e,g,h)=>{var m;for(g=a.h.nextSibling(g);e&&(m=e)!==g;)e=a.h.nextSibling(m),h(m,e)};a.Qc=function(e,g,h,m){h=h||{};var q=q||"replaceChildren";if(m){var p=m.nodeType?m:0<m.length?m[0]:null;return a.i(()=>{var u=g&&g instanceof a.T?g:new a.T(g,null,null,null,{exportDependencies:!0}),x=d(e,u.$data,u);b(m,q,x,u,h)},null,{ta:()=>!p||!a.a.fb(p),j:p})}console.log("no targetNodeOrNodeArray")};a.Rc=(e,g,h,m,q)=>{function p(t,y){a.o.I(a.a.jc,null,[m,t,v,h,w,y]);a.f.notify(m,
|
||||||
{var m;for(f=a.h.nextSibling(f);c&&(m=c)!==f;)c=a.h.nextSibling(m),k(m,c)};a.Sc=function(c,f,k,m){k=k||{};var q=q||"replaceChildren";if(m){var p=m.nodeType?m:0<m.length?m[0]:null;return a.i(()=>{var u=f&&f instanceof a.U?f:new a.U(f,null,null,null,{exportDependencies:!0}),x=e(c,u.$data,u);d(m,q,x,u,k)},null,{ua:()=>!p||!a.a.hb(p),j:p})}console.log("no targetNodeOrNodeArray")};a.Tc=(c,f,k,m,q)=>{function p(t,y){a.o.I(a.a.lc,null,[m,t,v,k,w,y]);a.f.notify(m,a.f.B)}var u,x=k.as,v=(t,y)=>{u=q.createChildContext(t,
|
a.f.B)}var u,x=h.as,v=(t,y)=>{u=q.createChildContext(t,{as:x,noChildContext:h.noChildContext,extend:F=>{F.$index=y;x&&(F[x+"Index"]=y)}});t=d(e,t,u);return b(m,"ignoreTargetNode",t,u,h)},w=(t,y)=>{c(y,u);h.afterRender&&h.afterRender(y,t);u=null},n=!1===h.includeDestroyed;if(n||h.beforeRemove||!a.bc(g))return a.i(()=>{var t=a.a.g(g)||[];"undefined"==typeof t.length&&(t=[t]);n&&(t=t.filter(y=>y||null==y));p(t)},null,{j:m});p(g.D());var r=g.subscribe(t=>{p(g(),t)},null,"arrayChange");r.j(m);return r};
|
||||||
{as:x,noChildContext:k.noChildContext,extend:F=>{F.$index=y;x&&(F[x+"Index"]=y)}});t=e(c,t,u);return d(m,"ignoreTargetNode",t,u,k)},w=(t,y)=>{b(y,u);k.afterRender&&k.afterRender(y,t);u=null},n=!1===k.includeDestroyed;if(n||k.beforeRemove||!a.dc(f))return a.i(()=>{var t=a.a.g(f)||[];"undefined"==typeof t.length&&(t=[t]);n&&(t=t.filter(y=>y||null==y));p(t)},null,{j:m});p(f.D());var r=f.subscribe(t=>{p(f(),t)},null,"arrayChange");r.j(m);return r};var h=a.a.b.W(),l=a.a.b.W();a.c.template={init:(c,f)=>
|
var k=a.a.b.V(),l=a.a.b.V();a.c.template={init:(e,g)=>{g=a.a.g(g());if("string"==typeof g||"name"in g)a.h.ua(e);else if("nodes"in g){g=g.nodes||[];if(a.O(g))throw Error('The "nodes" option must be a plain, non-observable array.');let h=g[0]&&g[0].parentNode;h&&a.a.b.get(h,l)||(h=a.a.ob(g),a.a.b.set(h,l,!0));(new a.F.ba(e)).nodes(h)}else if(g=a.h.childNodes(e),0<g.length)g=a.a.ob(g),(new a.F.ba(e)).nodes(g);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},
|
||||||
{f=a.a.g(f());if("string"==typeof f||"name"in f)a.h.va(c);else if("nodes"in f){f=f.nodes||[];if(a.O(f))throw Error('The "nodes" option must be a plain, non-observable array.');let k=f[0]&&f[0].parentNode;k&&a.a.b.get(k,l)||(k=a.a.qb(f),a.a.b.set(k,l,!0));(new a.F.ba(c)).nodes(k)}else if(f=a.h.childNodes(c),0<f.length)f=a.a.qb(f),(new a.F.ba(c)).nodes(f);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},update:(c,f,k,m,q)=>{var p=
|
update:(e,g,h,m,q)=>{var p=g();g=a.a.g(p);h=!0;m=null;"string"==typeof g?g={}:(p="name"in g?g.name:e,"if"in g&&(h=a.a.g(g["if"])),h&&"ifnot"in g&&(h=!a.a.g(g.ifnot)),h&&!p&&(h=!1));"foreach"in g?m=a.Rc(p,h&&g.foreach||[],g,e,q):h?(h=q,"data"in g&&(h=q.createChildContext(g.data,{as:g.as,noChildContext:g.noChildContext,exportDependencies:!0})),m=a.Qc(p,h,g,e)):a.h.ua(e);q=m;(g=a.a.b.get(e,k))&&"function"==typeof g.s&&g.s();a.a.b.set(e,k,!q||q.da&&!q.da()?void 0:q)}};a.H.$a.template=e=>{e=a.H.Mc(e);
|
||||||
f();f=a.a.g(p);k=!0;m=null;"string"==typeof f?f={}:(p="name"in f?f.name:c,"if"in f&&(k=a.a.g(f["if"])),k&&"ifnot"in f&&(k=!a.a.g(f.ifnot)),k&&!p&&(k=!1));"foreach"in f?m=a.Tc(p,k&&f.foreach||[],f,c,q):k?(k=q,"data"in f&&(k=q.createChildContext(f.data,{as:f.as,noChildContext:f.noChildContext,exportDependencies:!0})),m=a.Sc(p,k,f,c)):a.h.va(c);q=m;(f=a.a.b.get(c,h))&&"function"==typeof f.s&&f.s();a.a.b.set(c,h,!q||q.da&&!q.da()?void 0:q)}};a.H.bb.template=c=>{c=a.H.Oc(c);return 1==c.length&&c[0].unknown||
|
return 1==e.length&&e[0].unknown||a.H.Jc(e,"name")?null:"This template engine does not support anonymous templates nested within its templates"};a.h.ha.template=!0})();a.a.Yb=(c,b,d)=>{if(c.length&&b.length){var f,k,l,e,g;for(f=k=0;(!d||f<d)&&(e=c[k]);++k){for(l=0;g=b[l];++l)if(e.value===g.value){e.moved=g.index;g.moved=e.index;b.splice(l,1);f=l=0;break}f+=l}}};a.a.Sb=(()=>{function c(b,d,f,k,l){var e=Math.min,g=Math.max,h=[],m,q=b.length,p,u=d.length,x=u-q||1,v=q+u+1,w;for(m=0;m<=q;m++){var n=w;
|
||||||
a.H.Lc(c,"name")?null:"This template engine does not support anonymous templates nested within its templates"};a.h.ha.template=!0})();a.a.$b=(b,d,e)=>{if(b.length&&d.length){var g,h,l,c,f;for(g=h=0;(!e||g<e)&&(c=b[h]);++h){for(l=0;f=d[l];++l)if(c.value===f.value){c.moved=f.index;f.moved=c.index;d.splice(l,1);g=l=0;break}g+=l}}};a.a.Ub=(()=>{function b(d,e,g,h,l){var c=Math.min,f=Math.max,k=[],m,q=d.length,p,u=e.length,x=u-q||1,v=q+u+1,w;for(m=0;m<=q;m++){var n=w;k.push(w=[]);var r=c(u,m+x);for(p=
|
h.push(w=[]);var r=e(u,m+x);for(p=g(0,m-1);p<=r;p++)w[p]=p?m?b[m-1]===d[p-1]?n[p-1]:e(n[p]||v,w[p-1]||v)+1:p+1:m+1}e=[];g=[];x=[];m=q;for(p=u;m||p;)u=h[m][p]-1,p&&u===h[m][p-1]?g.push(e[e.length]={status:f,value:d[--p],index:p}):m&&u===h[m-1][p]?x.push(e[e.length]={status:k,value:b[--m],index:m}):(--p,--m,l.sparse||e.push({status:"retained",value:d[p]}));a.a.Yb(x,g,!l.dontLimitMoves&&10*q);return e.reverse()}return function(b,d,f){f="boolean"===typeof f?{dontLimitMoves:f}:f||{};b=b||[];d=d||[];return b.length<
|
||||||
f(0,m-1);p<=r;p++)w[p]=p?m?d[m-1]===e[p-1]?n[p-1]:c(n[p]||v,w[p-1]||v)+1:p+1:m+1}c=[];f=[];x=[];m=q;for(p=u;m||p;)u=k[m][p]-1,p&&u===k[m][p-1]?f.push(c[c.length]={status:g,value:e[--p],index:p}):m&&u===k[m-1][p]?x.push(c[c.length]={status:h,value:d[--m],index:m}):(--p,--m,l.sparse||c.push({status:"retained",value:e[p]}));a.a.$b(x,f,!l.dontLimitMoves&&10*q);return c.reverse()}return function(d,e,g){g="boolean"===typeof g?{dontLimitMoves:g}:g||{};d=d||[];e=e||[];return d.length<e.length?b(d,e,"added",
|
d.length?c(b,d,"added","deleted",f):c(d,b,"deleted","added",f)}})();(()=>{function c(f,k,l,e,g){var h=[],m=a.i(()=>{var q=k(l,g,a.a.va(h,f))||[];if(0<h.length){var p=h.nodeType?[h]:h;if(0<p.length){var u=p[0],x=u.parentNode,v;var w=0;for(v=q.length;w<v;w++)x.insertBefore(q[w],u);w=0;for(v=p.length;w<v;w++)a.removeNode(p[w])}e&&a.o.I(e,null,[l,q,g])}h.length=0;h.push(...q)},null,{j:f,ta:()=>!!h.find(a.a.fb)});return{R:h,bb:m.da()?m:void 0}}var b=a.a.b.V(),d=a.a.b.V();a.a.jc=(f,k,l,e,g,h)=>{function m(K){A=
|
||||||
"deleted",g):b(e,d,"deleted","added",g)}})();(()=>{function b(g,h,l,c,f){var k=[],m=a.i(()=>{var q=h(l,f,a.a.wa(k,g))||[];if(0<k.length){var p=k.nodeType?[k]:k;if(0<p.length){var u=p[0],x=u.parentNode,v;var w=0;for(v=q.length;w<v;w++)x.insertBefore(q[w],u);w=0;for(v=p.length;w<v;w++)a.removeNode(p[w])}c&&a.o.I(c,null,[l,q,f])}k.length=0;k.push(...q)},null,{j:g,ua:()=>!!k.find(a.a.hb)});return{R:k,eb:m.da()?m:void 0}}var d=a.a.b.W(),e=a.a.b.W();a.a.lc=(g,h,l,c,f,k)=>{function m(K){A={ia:K,Oa:a.ga(n++)};
|
{ia:K,Na:a.ga(n++)};v.push(A);x||z.push(A)}function q(K){A=u[K];n!==A.Na.D()&&F.push(A);A.Na(n++);a.a.va(A.R,f);v.push(A)}function p(K,L){if(K)for(var M=0,C=L.length;M<C;M++)L[M].R.forEach(S=>K(S,M,L[M].ia))}k=k||[];"undefined"==typeof k.length&&(k=[k]);e=e||{};var u=a.a.b.get(f,b),x=!u,v=[],w=0,n=0,r=[],t=[],y=[],F=[],z=[],B=0;if(x)k.forEach(m);else{if(!h||u&&u._countWaitingForRemove)h=Array.prototype.map.call(u,K=>K.ia),h=a.a.Sb(h,k,{dontLimitMoves:e.dontLimitMoves,sparse:!0});for(let K=0,L,M,C;L=
|
||||||
v.push(A);x||z.push(A)}function q(K){A=u[K];n!==A.Oa.D()&&F.push(A);A.Oa(n++);a.a.wa(A.R,g);v.push(A)}function p(K,L){if(K)for(var M=0,C=L.length;M<C;M++)L[M].R.forEach(S=>K(S,M,L[M].ia))}h=h||[];"undefined"==typeof h.length&&(h=[h]);c=c||{};var u=a.a.b.get(g,d),x=!u,v=[],w=0,n=0,r=[],t=[],y=[],F=[],z=[],B=0;if(x)h.forEach(m);else{if(!k||u&&u._countWaitingForRemove)k=Array.prototype.map.call(u,K=>K.ia),k=a.a.Ub(k,h,{dontLimitMoves:c.dontLimitMoves,sparse:!0});for(let K=0,L,M,C;L=k[K];K++)switch(M=
|
h[K];K++)switch(M=L.moved,C=L.index,L.status){case "deleted":for(;w<C;)q(w++);if(void 0===M){var A=u[w];A.bb&&(A.bb.s(),A.bb=void 0);a.a.va(A.R,f).length&&(e.beforeRemove&&(v.push(A),B++,A.ia===d?A=null:y.push(A)),A&&r.push.apply(r,A.R))}w++;break;case "added":for(;n<C;)q(w++);void 0!==M?(t.push(v.length),q(M)):m(L.value)}for(;n<k.length;)q(w++);v._countWaitingForRemove=B}a.a.b.set(f,b,v);p(e.beforeMove,F);r.forEach(e.beforeRemove?a.ja:a.removeNode);var H,N;B=f.ownerDocument.activeElement;if(t.length)for(;void 0!=
|
||||||
L.moved,C=L.index,L.status){case "deleted":for(;w<C;)q(w++);if(void 0===M){var A=u[w];A.eb&&(A.eb.s(),A.eb=void 0);a.a.wa(A.R,g).length&&(c.beforeRemove&&(v.push(A),B++,A.ia===e?A=null:y.push(A)),A&&r.push.apply(r,A.R))}w++;break;case "added":for(;n<C;)q(w++);void 0!==M?(t.push(v.length),q(M)):m(L.value)}for(;n<h.length;)q(w++);v._countWaitingForRemove=B}a.a.b.set(g,d,v);p(c.beforeMove,F);r.forEach(c.beforeRemove?a.ka:a.removeNode);var H,N;B=g.ownerDocument.activeElement;if(t.length)for(;void 0!=
|
(k=t.shift());){A=v[k];for(H=void 0;k;)if((N=v[--k].R)&&N.length){H=N[N.length-1];break}for(w=0;r=A.R[w];H=r,w++)a.h.ac(f,r,H)}for(k=0;A=v[k];k++){A.R||a.a.extend(A,c(f,l,A.ia,g,A.Na));for(w=0;r=A.R[w];H=r,w++)a.h.ac(f,r,H);!A.Gc&&g&&(g(A.ia,A.R,A.Na),A.Gc=!0,H=A.R[A.R.length-1])}B&&f.ownerDocument.activeElement!=B&&B.focus();p(e.beforeRemove,y);for(k=0;k<y.length;++k)y[k].ia=d;p(e.afterMove,F);p(e.afterAdd,z)}})();D.ko=Z})(this);
|
||||||
(h=t.shift());){A=v[h];for(H=void 0;h;)if((N=v[--h].R)&&N.length){H=N[N.length-1];break}for(w=0;r=A.R[w];H=r,w++)a.h.cc(g,r,H)}for(h=0;A=v[h];h++){A.R||a.a.extend(A,b(g,l,A.ia,f,A.Oa));for(w=0;r=A.R[w];H=r,w++)a.h.cc(g,r,H);!A.Ic&&f&&(f(A.ia,A.R,A.Oa),A.Ic=!0,H=A.R[A.R.length-1])}B&&g.ownerDocument.activeElement!=B&&B.focus();p(c.beforeRemove,y);for(h=0;h<y.length;++h)y[h].ia=e;p(c.afterMove,F);p(c.afterAdd,z)}})();D.ko=Z})(this);
|
|
||||||
|
|
|
||||||
|
|
@ -59,14 +59,10 @@ ko.computed = function (evaluatorFunctionOrOptions, evaluatorFunctionTarget, opt
|
||||||
computedObservable.hasWriteFunction = typeof writeFunction === "function";
|
computedObservable.hasWriteFunction = typeof writeFunction === "function";
|
||||||
|
|
||||||
// Inherit from 'subscribable'
|
// Inherit from 'subscribable'
|
||||||
if (!ko.utils.canSetPrototype) {
|
|
||||||
// 'subscribable' won't be on the prototype chain unless we put it there directly
|
|
||||||
ko.utils.extend(computedObservable, ko.subscribable['fn']);
|
|
||||||
}
|
|
||||||
ko.subscribable['fn'].init(computedObservable);
|
ko.subscribable['fn'].init(computedObservable);
|
||||||
|
|
||||||
// Inherit from 'computed'
|
// Inherit from 'computed'
|
||||||
ko.utils.setPrototypeOfOrExtend(computedObservable, computedFn);
|
Object.setPrototypeOf(computedObservable, computedFn);
|
||||||
|
|
||||||
if (options['pure']) {
|
if (options['pure']) {
|
||||||
state.pure = true;
|
state.pure = true;
|
||||||
|
|
@ -485,9 +481,7 @@ var deferEvaluationOverrides = {
|
||||||
|
|
||||||
// Note that for browsers that don't support proto assignment, the
|
// Note that for browsers that don't support proto assignment, the
|
||||||
// inheritance chain is created manually in the ko.computed constructor
|
// inheritance chain is created manually in the ko.computed constructor
|
||||||
if (ko.utils.canSetPrototype) {
|
Object.setPrototypeOf(computedFn, ko.subscribable['fn']);
|
||||||
ko.utils.setPrototypeOf(computedFn, ko.subscribable['fn']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the proto values for ko.computed
|
// Set the proto values for ko.computed
|
||||||
var protoProp = ko.observable.protoProperty; // == "__ko_proto__"
|
var protoProp = ko.observable.protoProperty; // == "__ko_proto__"
|
||||||
|
|
|
||||||
10
vendors/knockout/src/subscribables/observable.js
vendored
10
vendors/knockout/src/subscribables/observable.js
vendored
|
|
@ -23,14 +23,10 @@ ko.observable = initialValue => {
|
||||||
observable[observableLatestValue] = initialValue;
|
observable[observableLatestValue] = initialValue;
|
||||||
|
|
||||||
// Inherit from 'subscribable'
|
// Inherit from 'subscribable'
|
||||||
if (!ko.utils.canSetPrototype) {
|
|
||||||
// 'subscribable' won't be on the prototype chain unless we put it there directly
|
|
||||||
ko.utils.extend(observable, ko.subscribable['fn']);
|
|
||||||
}
|
|
||||||
ko.subscribable['fn'].init(observable);
|
ko.subscribable['fn'].init(observable);
|
||||||
|
|
||||||
// Inherit from 'observable'
|
// Inherit from 'observable'
|
||||||
ko.utils.setPrototypeOfOrExtend(observable, observableFn);
|
Object.setPrototypeOf(observable, observableFn);
|
||||||
|
|
||||||
return observable;
|
return observable;
|
||||||
}
|
}
|
||||||
|
|
@ -52,9 +48,7 @@ var observableFn = {
|
||||||
|
|
||||||
// Note that for browsers that don't support proto assignment, the
|
// Note that for browsers that don't support proto assignment, the
|
||||||
// inheritance chain is created manually in the ko.observable constructor
|
// inheritance chain is created manually in the ko.observable constructor
|
||||||
if (ko.utils.canSetPrototype) {
|
Object.setPrototypeOf(observableFn, ko.subscribable['fn']);
|
||||||
ko.utils.setPrototypeOf(observableFn, ko.subscribable['fn']);
|
|
||||||
}
|
|
||||||
|
|
||||||
var protoProperty = ko.observable.protoProperty = '__ko_proto__';
|
var protoProperty = ko.observable.protoProperty = '__ko_proto__';
|
||||||
observableFn[protoProperty] = ko.observable;
|
observableFn[protoProperty] = ko.observable;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ ko.observableArray = initialValues => {
|
||||||
throw new Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");
|
throw new Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");
|
||||||
|
|
||||||
var result = ko.observable(initialValues);
|
var result = ko.observable(initialValues);
|
||||||
ko.utils.setPrototypeOfOrExtend(result, ko.observableArray['fn']);
|
Object.setPrototypeOf(result, ko.observableArray['fn']);
|
||||||
return result.extend({'trackArrayChanges':true});
|
return result.extend({'trackArrayChanges':true});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -57,9 +57,7 @@ ko.observableArray['fn'] = {
|
||||||
|
|
||||||
// Note that for browsers that don't support proto assignment, the
|
// Note that for browsers that don't support proto assignment, the
|
||||||
// inheritance chain is created manually in the ko.observableArray constructor
|
// inheritance chain is created manually in the ko.observableArray constructor
|
||||||
if (ko.utils.canSetPrototype) {
|
Object.setPrototypeOf(ko.observableArray['fn'], ko.observable['fn']);
|
||||||
ko.utils.setPrototypeOf(ko.observableArray['fn'], ko.observable['fn']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Populate ko.observableArray.fn with read/write functions from native arrays
|
// Populate ko.observableArray.fn with read/write functions from native arrays
|
||||||
// Important: Do not add any additional functions here that may reasonably be used to *read* data from the array
|
// Important: Do not add any additional functions here that may reasonably be used to *read* data from the array
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ ko.subscription.prototype.disposeWhenNodeIsRemoved = function (node) {
|
||||||
};
|
};
|
||||||
|
|
||||||
ko.subscribable = function () {
|
ko.subscribable = function () {
|
||||||
ko.utils.setPrototypeOfOrExtend(this, ko_subscribable_fn);
|
Object.setPrototypeOf(this, ko_subscribable_fn);
|
||||||
ko_subscribable_fn.init(this);
|
ko_subscribable_fn.init(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -187,9 +187,7 @@ ko.exportProperty(ko_subscribable_fn, 'getSubscriptionsCount', ko_subscribable_f
|
||||||
// For browsers that support proto assignment, we overwrite the prototype of each
|
// For browsers that support proto assignment, we overwrite the prototype of each
|
||||||
// observable instance. Since observables are functions, we need Function.prototype
|
// observable instance. Since observables are functions, we need Function.prototype
|
||||||
// to still be in the prototype chain.
|
// to still be in the prototype chain.
|
||||||
if (ko.utils.canSetPrototype) {
|
Object.setPrototypeOf(ko_subscribable_fn, Function.prototype);
|
||||||
ko.utils.setPrototypeOf(ko_subscribable_fn, Function.prototype);
|
|
||||||
}
|
|
||||||
|
|
||||||
ko.subscribable['fn'] = ko_subscribable_fn;
|
ko.subscribable['fn'] = ko_subscribable_fn;
|
||||||
|
|
||||||
|
|
|
||||||
12
vendors/knockout/src/utils.js
vendored
12
vendors/knockout/src/utils.js
vendored
|
|
@ -7,10 +7,6 @@ ko.utils = (() => {
|
||||||
source && Object.entries(source).forEach(prop => target[prop[0]] = prop[1]);
|
source && Object.entries(source).forEach(prop => target[prop[0]] = prop[1]);
|
||||||
return target;
|
return target;
|
||||||
},
|
},
|
||||||
setPrototypeOf = (obj, proto) => {
|
|
||||||
obj.__proto__ = proto;
|
|
||||||
return obj;
|
|
||||||
},
|
|
||||||
// For details on the pattern for changing node classes
|
// For details on the pattern for changing node classes
|
||||||
// see: https://github.com/knockout/knockout/issues/1597
|
// see: https://github.com/knockout/knockout/issues/1597
|
||||||
toggleDomNodeCssClass = (node, classNames, shouldHaveClass) => {
|
toggleDomNodeCssClass = (node, classNames, shouldHaveClass) => {
|
||||||
|
|
@ -22,8 +18,6 @@ ko.utils = (() => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var canSetPrototype = ({ __proto__: [] } instanceof Array);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
arrayRemoveItem: (array, itemToRemove) => {
|
arrayRemoveItem: (array, itemToRemove) => {
|
||||||
var index = array.indexOf(itemToRemove);
|
var index = array.indexOf(itemToRemove);
|
||||||
|
|
@ -35,14 +29,8 @@ ko.utils = (() => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
canSetPrototype: canSetPrototype,
|
|
||||||
|
|
||||||
extend: extend,
|
extend: extend,
|
||||||
|
|
||||||
setPrototypeOf: setPrototypeOf,
|
|
||||||
|
|
||||||
setPrototypeOfOrExtend: canSetPrototype ? setPrototypeOf : extend,
|
|
||||||
|
|
||||||
objectForEach: objectForEach,
|
objectForEach: objectForEach,
|
||||||
|
|
||||||
objectMap: (source, mapping, mappingOwner) => {
|
objectMap: (source, mapping, mappingOwner) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue