@tko/build.knockout 4.0.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +288 -307
- package/dist/browser.js.map +4 -4
- package/dist/browser.min.js +10 -10
- package/dist/browser.min.js.map +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +25 -18
- package/dist/common.js +0 -3
- package/dist/common.js.map +0 -7
package/dist/browser.min.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
// @tko/build.knockout 🥊 4.0
|
|
2
|
-
"use strict";var ko=(()=>{var sn=Object.defineProperty;var as=Object.getOwnPropertyDescriptor;var us=Object.getOwnPropertyNames;var ls=Object.prototype.hasOwnProperty;var Vn=(n,e)=>(e=Symbol[n])?e:Symbol.for("Symbol."+n),Hn=n=>{throw TypeError(n)},ii=Math.pow,ds=(n,e,t)=>e in n?sn(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Ye=(n,e)=>{for(var t in e)sn(n,t,{get:e[t],enumerable:!0})},cs=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of us(e))!ls.call(n,i)&&i!==t&&sn(n,i,{get:()=>e[i],enumerable:!(r=as(e,i))||r.enumerable});return n};var ps=n=>cs(sn({},"__esModule",{value:!0}),n);var d=(n,e,t)=>ds(n,typeof e!="symbol"?e+"":e,t),oi=(n,e,t)=>e.has(n)||Hn("Cannot "+t);var $n=(n,e,t)=>(oi(n,e,"read from private field"),t?t.call(n):e.get(n)),si=(n,e,t)=>e.has(n)?Hn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),ai=(n,e,t,r)=>(oi(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var Ze=(n,e,t)=>new Promise((r,i)=>{var o=u=>{try{a(t.next(u))}catch(l){i(l)}},s=u=>{try{a(t.throw(u))}catch(l){i(l)}},a=u=>u.done?r(u.value):Promise.resolve(u.value).then(o,s);a((t=t.apply(n,e)).next())}),fs=function(n,e){this[0]=n,this[1]=e};var Le=n=>{var e=n[Vn("asyncIterator")],t=!1,r,i={};return e==null?(e=n[Vn("iterator")](),r=o=>i[o]=s=>e[o](s)):(e=e.call(n),r=o=>i[o]=s=>{if(t){if(t=!1,o==="throw")throw s;return s}return t=!0,{done:!1,value:new fs(new Promise(a=>{var u=e[o](s);u instanceof Object||Hn("Object expected"),a(u)}),1)}}),i[Vn("iterator")]=()=>i,r("next"),"throw"in e?r("throw"):i.throw=o=>{throw o},"return"in e&&r("return"),i};var Ga={};Ye(Ga,{default:()=>Ja});var{isArray:Ot}=Array;function L(n,e,t){arguments.length>2&&(e=e.bind(t));for(let r=0,i=n.length;r<i;++r)e(n[r],r,n)}function W(n,e){return(Ot(n)?n:[...n]).indexOf(e)}function an(n,e,t){return(Ot(n)?n:[...n]).find(e,t)}function et(n,e,t){return arguments.length>2&&(e=e.bind(t)),n===null?[]:Array.from(n,e)}function tt(n,e){let t=W(n,e);t>0?n.splice(t,1):t===0&&n.shift()}function ci(n){let e=new Set;return n===null?[]:(Ot(n)?n:[...n]).filter(t=>e.has(t)?!1:e.add(t))}function Re(n,e,t){return arguments.length>2&&(e=e.bind(t)),n===null?[]:(Ot(n)?n:[...n]).filter(e)}function nt(n,e){if(Ot(e))n.push.apply(n,e);else for(let t=0,r=e.length;t<r;t++)n.push(e[t]);return n}function Ne(n,e,t){let r=W(typeof n.peek=="function"?n.peek():n,e);r<0?t&&n.push(e):t||n.splice(r,1)}function ue(n){return Array.from(n)}function pi(n,e){let t=typeof n=="function"?n():n,r=typeof e=="function"?e():e,i=[];for(let o=t;o<=r;o++)i.push(o);return i}function jn(n,e,t){if(n.length&&e.length){let r,i,o,s,a;for(r=i=0;(!t||r<t)&&(s=n[i]);++i){for(o=0;a=e[o];++o)if(s.value===a.value){s.moved=a.index,a.moved=s.index,e.splice(o,1),r=o=0;break}r+=o}}}var ui="added",li="deleted";function rt(n,e,t){return t=typeof t=="boolean"?{dontLimitMoves:t}:t||{},n=n||[],e=e||[],n.length<e.length?di(n,e,ui,li,t):di(e,n,li,ui,t)}function di(n,e,t,r,i){let o=Math.min,s=Math.max,a=new Array,u,l=n.length,f,m=e.length,b=m-l||1,g=l+m+1,x,T,h,O;for(u=0;u<=l;u++)for(T=x,a.push(x=new Array),h=o(m,u+b),O=s(0,u-1),f=O;f<=h;f++)if(!f)x[f]=u+1;else if(!u)x[f]=f+1;else if(n[u-1]===e[f-1])x[f]=T[f-1];else{let k=T[f]||g,P=x[f-1]||g;x[f]=o(k,P)+1}let M=new Array,y,w=new Array,v=new Array;for(u=l,f=m;u||f;)y=a[u][f]-1,f&&y===a[u][f-1]?w.push(M[M.length]={status:t,value:e[--f],index:f}):u&&y===a[u-1][f]?v.push(M[M.length]={status:r,value:n[--u],index:u}):(--f,--u,i!=null&&i.sparse||M.push({status:"retained",value:e[f]}));return jn(v,w,!i.dontLimitMoves&&l*10),M.reverse()}var un=class{constructor(){d(this,"bindingStringPreparsers",[]);d(this,"knockoutInstance",null);d(this,"deferUpdates",!1);d(this,"useOnlyNativeEvents",!0);d(this,"useTemplateTag",!0);d(this,"protoProperty","__ko_proto__");d(this,"defaultBindingAttribute","data-bind");d(this,"allowVirtualElements",!0);d(this,"bindingGlobals",Object.create(null));d(this,"bindingProviderInstance");d(this,"createChildContextWithAs",!1);d(this,"disableJQueryUsage",!1);d(this,"_jQuery");d(this,"Promise",globalThis.Promise);d(this,"taskScheduler",null);d(this,"debug",!1);d(this,"templateSizeLimit",4096);d(this,"allowScriptTagsInTemplates",!1);d(this,"_sanitizeWarningLogged",!1);d(this,"global",globalThis);d(this,"document",globalThis.document);d(this,"filters",{});d(this,"includeDestroyed",!1);d(this,"foreachHidesDestroyed",!1)}get jQuery(){var e;if(!this.disableJQueryUsage)return(e=this._jQuery)!=null?e:globalThis.jQuery}set jQuery(e){e?(this._jQuery=e,this.disableJQueryUsage=!1):(this.disableJQueryUsage=!0,this._jQuery=void 0)}sanitizeHtmlTemplate(e){return this._sanitizeWarningLogged||(console.warn("WARNING -- You don't have a HTML sanitizer configured. Please configure options.sanitizeHtmlTemplate to avoid XSS vulnerabilities."),this._sanitizeWarningLogged=!0),e}onError(e,t=!0){if(t)throw e;return e}set(e,t){this[e]=t}getBindingHandler(e){return null}cleanExternalData(e,t){}},fi=new un;function Wn(n,e){var r;let t=e.default;Object.defineProperty(fi,n,{get(){return t},set(i){var o;t=i,(o=e.set)==null||o.call(e,i)},enumerable:!0,configurable:!0}),(r=e.set)==null||r.call(e,t)}var c=fi;function Un(n){return c.onError?(...e)=>{try{return n(...e)}catch(t){c.onError(t)}}:n}function qn(n){le(function(){throw n},0)}function le(n,e){return setTimeout(Un(n),e)}function ln(n,e){let t;return function(...r){t||(t=le(function(){t=void 0,n(...r)},e))}}function dn(n,e){let t;return function(...r){clearTimeout(t),t=le(()=>n(...r),e)}}function G(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function kt(n){return n===null?!1:typeof n=="object"||typeof n=="function"}function H(n,e){if(e)for(let t of Object.keys(e))G(e,t)&&(n[t]=e[t]);return n}function R(n,e){for(let t in n)G(n,t)&&e(t,n[t])}function me(n,e,t){if(!n)return n;arguments.length>2&&(e=e.bind(t));let r={};for(let i in n)G(n,i)&&(r[i]=e(n[i],i,n));return r}function Qn(n,e){return G(n,e)?n[e]:void 0}function Kn(n,e){if(e||(e=new Array),!n||typeof n!="object"||n.constructor!==Object||e.indexOf(n)!==-1)return n;e.push(n);let t={};for(let r in n)G(n,r)&&(t[r]=Kn(n[r],e));return t}function mi(n){let e=new Set;return JSON.stringify(n,(t,r)=>e.has(r)?"...":(typeof r=="object"&&e.add(r),r))}function Jn(n){return kt(n)&&typeof n.then=="function"}function ms(){try{return Object.defineProperty(function(){},"length",{}),!0}catch(n){return!1}}var hs=ms();function cn(n,e){hs&&Object.defineProperty(n,"length",e)}function _t(n){return n==null?"":n.trim?n.trim():n.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}function hi(n,e){return n=n||"",e.length>n.length?!1:n.substring(0,e.length)===e}function gi(n){return typeof n=="string"&&(n=_t(n),n)?JSON.parse(n):null}var gs=typeof Symbol=="function";function z(n){return gs?Symbol(n):n}var Gn=/\S+/g;function it(n,e,t){let r;e&&(typeof n.classList=="object"?(r=n.classList[t?"add":"remove"],L(e.match(Gn),function(i){r.call(n.classList,i)})):typeof n.className.baseVal=="string"?yi(n.className,"baseVal",e,t):yi(n,"className",e,t))}function yi(n,e,t,r){let i=n[e].match(Gn)||[];L(t.match(Gn),function(o){Ne(i,o,r)}),n[e]=i.join(" ")}function zn(n,e){if(n===e)return!0;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(e.contains)return e.contains(n.nodeType!==Node.ELEMENT_NODE?n.parentNode:n);if(e.compareDocumentPosition)return(e.compareDocumentPosition(n)&16)==16;let t=n;for(;t&&t!=e;)t=t.parentNode;return!!t}function It(n){return zn(n,n.ownerDocument.documentElement)}function bi(n){return!!an(n,It)}function V(n){return n&&n.tagName&&n.tagName.toLowerCase()}function Ei(n){return window.HTMLElement?n instanceof HTMLElement:n&&n.tagName&&n.nodeType===Node.ELEMENT_NODE}function Xn(n){return window.DocumentFragment?n instanceof DocumentFragment:n&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE}var Yn={},Ci={};Yn.UIEvents=["keyup","keydown","keypress"];Yn.MouseEvents=["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"];R(Yn,function(n,e){if(e.length)for(let t=0,r=e.length;t<r;t++)Ci[e[t]]=n});function ys(n,e){if(V(n)!=="input"||!n.type||e.toLowerCase()!="click")return!1;let t=n.type;return t=="checkbox"||t=="radio"}function K(n,e,t,r=!1){let i=Un(t),o=!!r,s=c.jQuery;if(!c.useOnlyNativeEvents&&!o&&s)s(n).on(e,i);else if(typeof n.addEventListener=="function")n.addEventListener(e,i,r);else throw new Error("Browser doesn't support addEventListener")}function bs(n){return typeof n.click=="function"}function Ve(n,e){if(!(n&&n.nodeType))throw new Error("element must be a DOM node when calling triggerEvent");let t=ys(n,e);if(!c.useOnlyNativeEvents&&c.jQuery&&!t)c.jQuery(n).trigger(e);else if(typeof document.createEvent=="function")if(typeof n.dispatchEvent=="function"){let r=Ci[e]||"HTMLEvents",i=document.createEvent(r);i.initEvent(e,!0,!0,c.global,0,0,0,0,0,!1,!1,!1,!1,0,n),n.dispatchEvent(i)}else throw new Error("The supplied element doesn't support dispatchEvent");else if(t&&bs(n))n.click();else throw new Error("Browser doesn't support triggering events")}var A={};Ye(A,{clear:()=>tr,get:()=>He,getOrSet:()=>As,nextKey:()=>Mt,set:()=>xe});var Es=new Date().getTime(),Cs=`__ko__${Es}`,pn=Symbol("Knockout data");var xs=0;function Zn(n){return n!=="__proto__"&&n!=="constructor"&&n!=="prototype"}function er(n,e){let t=n[pn];return!t&&e&&(t=n[pn]={}),t}function tr(n){return n[pn]?(delete n[pn],!0):!1}function Mt(){return xs+++Cs}function He(n,e){if(!Zn(e))throw new Error("Unsafe key for DOM data: "+e);let t=er(n,!1);return t&&t[e]}function xe(n,e,t){if(!Zn(e))throw new Error("Unsafe key for DOM data: "+e);let r=er(n,t!==void 0);r&&(r[e]=t)}function As(n,e,t){if(!Zn(e))throw new Error("Unsafe key for DOM data: "+e);let r=er(n,!0);return r[e]||(r[e]=t)}var nr=Mt(),vs={1:!0,8:!0,9:!0},xi={1:!0,9:!0};function rr(n,e){let t=He(n,nr);return t===void 0&&e&&(t=new Array,xe(n,nr,t)),t}function Ds(n){xe(n,nr,void 0)}function Ai(n){let e=rr(n,!1);if(e){e=e.slice(0);for(let t=0;t<e.length;t++)e[t](n)}tr(n);for(let t=0,r=ot.length;t<r;++t)ot[t](n);c.cleanExternalData&&c.cleanExternalData(n),xi[n.nodeType]&&vi(n.childNodes,!0)}function vi(n,e){let t=new Array,r;for(let i=0;i<n.length;i++)if((!e||n[i].nodeType===Node.COMMENT_NODE)&&(Ai(t[t.length]=r=n[i]),n[i]!==r))for(;i--&&W(t,n[i])===-1;);}function Ae(n,e){if(typeof e!="function")throw new Error("Callback must be a function");rr(n,!0).push(e)}function st(n,e){let t=rr(n,!1);t&&(tt(t,e),t.length===0&&Ds(n))}function X(n){return vs[n.nodeType]&&(Ai(n),xi[n.nodeType]&&n instanceof Element&&vi(n.getElementsByTagName("*"))),n}function he(n){n&&(X(n),n.parentNode&&n.parentNode.removeChild(n))}var ot=new Array;function Di(n){ot.push(n)}function Ti(n){let e=ot.indexOf(n);e>=0&&ot.splice(e,1)}function Ts(n){let e=c.jQuery?c.jQuery.cleanData:null;e&&e([n])}ot.push(Ts);function Pt(n){let e=ue(n),r=(e[0]&&e[0].ownerDocument||document).createElement("div");for(let i=0,o=e.length;i<o;i++)r.appendChild(X(e[i]));return r}function ve(n,e){let t=new Array;for(let r=0;r<n.length;r++){let i=n[r].cloneNode(!0);t.push(e?X(i):i)}return t}function Bi(n,e){if(Lt(n),e)for(let t=0;t<e.length;t++)n.appendChild(e[t])}function fn(n,e){let t=Array.isArray(n)?n:[n];if(t.length>0){let r=t[0],i=r.parentNode;for(let o=0;o<e.length;o++)i==null||i.insertBefore(e[o],r);for(let o=0;o<t.length;o++)he(t[o])}}function Lt(n){for(;n.firstChild;)he(n.firstChild)}function $e(n,e){if(n.length){for(e=e.nodeType===Node.COMMENT_NODE&&e.parentNode||e;n.length&&n[0].parentNode!==e;)n.splice(0,1);for(;n.length>1&&n[n.length-1].parentNode!==e;)n.length--;if(n.length>1){let t=n[0],r=n[n.length-1];for(n.length=0;t!==r;)n.push(t),t=t.nextSibling;n.push(r)}}return n}function mn(n,e){n.selected=e}var C={};Ye(C,{allowedBindings:()=>ws,childNodes:()=>Si,emptyNode:()=>hn,endCommentRegex:()=>Fi,firstChild:()=>yn,getVirtualChildren:()=>or,hasBindingValue:()=>Ss,insertAfter:()=>Os,isEndComment:()=>we,isStartComment:()=>re,lastChild:()=>ks,nextSibling:()=>bn,normaliseVirtualElementDomStructure:()=>Ms,prepend:()=>Oi,previousSibling:()=>_s,setDomNodeChildren:()=>gn,startCommentRegex:()=>ir,virtualNodeBindingValue:()=>Is});var ir=/^\s*ko(?:\s+([\s\S]+))?\s*$/,Fi=/^\s*\/ko\s*$/,Bs={ul:!0,ol:!0};function re(n){return n.nodeType===Node.COMMENT_NODE&&ir.test(n.nodeValue)}function we(n){return n.nodeType===Node.COMMENT_NODE&&Fi.test(n.nodeValue)}function Fs(n){return we(n)&&!He(n,Ni)}var Ni="__ko_matchedEndComment__";function or(n,e){let t=n,r=1,i=new Array;for(;t=t.nextSibling;){if(we(t)&&(xe(t,Ni,!0),r--,r===0))return i;i.push(t),re(t)&&r++}if(!e)throw new Error("Cannot find closing comment tag to match: "+n.nodeValue);return null}function wi(n,e){let t=or(n,e);return t?t.length>0?t[t.length-1].nextSibling:n.nextSibling:null}function Ns(n){let e=n.firstChild,t=null;if(e)do if(t)t.push(e);else if(re(e)){let r=wi(e,!0);r?e=r:t=[e]}else we(e)&&(t=[e]);while(e=e.nextSibling);return t}var ws=Object.create(null),Ss=re;function Si(n){return re(n)?or(n):n.childNodes}function hn(n){if(!re(n))Lt(n);else{let e=Si(n);for(let t=0,r=e.length;t<r;t++)he(e[t])}}function gn(n,e){if(!re(n))Bi(n,e);else{hn(n);let t=n.nextSibling;if(t&&t.parentNode){let r=t.parentNode;for(let i=0,o=e.length;i<o;++i)r.insertBefore(e[i],t)}}}function Oi(n,e){var t;re(n)?(t=n.parentNode)==null||t.insertBefore(e,n.nextSibling):n.firstChild?n.insertBefore(e,n.firstChild):n.appendChild(e)}function Os(n,e,t){var r;t?re(n)?(r=n.parentNode)==null||r.insertBefore(e,t.nextSibling):t.nextSibling?n.insertBefore(e,t.nextSibling):n.appendChild(e):Oi(n,e)}function yn(n){if(!re(n)){if(n.firstChild&&we(n.firstChild))throw new Error("Found invalid end comment, as the first child of "+n.outerHTML);return n.firstChild}return!n.nextSibling||we(n.nextSibling)?null:n.nextSibling}function ks(n){let e=yn(n);if(!e)return null;let t;do t=e;while(e=bn(e));return t}function bn(n){if(re(n)&&(n=wi(n)),n.nextSibling&&we(n.nextSibling)){if(Fs(n.nextSibling))throw Error("Found end comment without a matching opening comment, as next sibling of "+n.outerHTML);return null}else return n.nextSibling}function _s(n){let e=0;do if(n.nodeType===Node.COMMENT_NODE)if(re(n)){if(--e===0)return n}else we(n)&&e++;else if(e===0)return n;while(n=n.previousSibling)}function Is(n){let e=n.nodeValue.match(ir);return e?e[1]:null}function Ms(n){if(!Bs[V(n)])return;let e=n.firstChild;if(e)do if(e.nodeType===Node.ELEMENT_NODE){let t=Ns(e);if(t){let r=e.nextSibling;for(let i=0;i<t.length;i++)r?n.insertBefore(t[i],r):n.appendChild(t[i])}}while(e=e.nextSibling)}var ki=c.useTemplateTag&&c.document&&"content"in c.document.createElement("template");function Ps(n,e){e||(e=document);let t=e.createElement("div");return t.innerHTML=n,ue(t.childNodes)}function Ls(n,e){e||(e=document);let t=e.createElement("template");return t.innerHTML=n,ue(t.content.childNodes)}function Rs(n,e){let t=c.jQuery;return t?t.parseHTML(n,e)||[]:[]}function de(n,e){let t=_i(n);return ki?Ls(t,e):c.jQuery?Rs(t,e):Ps(t,e)}var Vs=/<script\b[^>]*>([\s\S]*?)<\/script[^>]*>/i;function _i(n){if(!n)return"";if(c.templateSizeLimit>0&&n.length>c.templateSizeLimit)throw new Error("Template is too long. Please configure the 'templateSizeLimit'");if(!c.allowScriptTagsInTemplates&&Vs.test(n))throw new Error("Script-tag in template detected.");return c.sanitizeHtmlTemplate(n)}function Ii(n,e){let t=de(n,e);return t.length&&t[0].parentElement||Pt(t)}function at(n,e){if(Lt(n),typeof e=="function"&&(e=e()),e!=null){typeof e!="string"&&(e=e.toString());let t=c.jQuery;if(t&&!ki){let r=_i(e);t(n).html(r)}else{let r;if(n.ownerDocument?r=de(e,n.ownerDocument):r=de(e),n.nodeType===Node.COMMENT_NODE)e===null?hn(n):gn(n,r);else for(let i=0;i<r.length;i++)n.appendChild(r[i])}}}function je(n,e){let t=typeof e=="function"?e():e;t==null&&(t="");let r=yn(n);!r||r.nodeType!==Node.TEXT_NODE||bn(r)?gn(n,[n.ownerDocument.createTextNode(t)]):r.data=t}var En=Symbol("Knockout selectExtensions hasDomDataProperty"),_={optionValueDomDataKey:Mt(),readValue:function(n){switch(V(n)){case"option":return n[En]===!0?He(n,_.optionValueDomDataKey):n.value;case"select":{let e=n;return e.selectedIndex>=0?_.readValue(e.options[e.selectedIndex]):void 0}default:return n.value}},writeValue:function(n,e,t){switch(V(n)){case"option":if(typeof e=="string")xe(n,_.optionValueDomDataKey,void 0),En in n&&delete n[En],n.value=e;else{let r=n;xe(n,_.optionValueDomDataKey,e),r[En]=!0,r.value=typeof e=="number"?e:""}break;case"select":{(e===""||e===null)&&(e=void 0);let r=-1,i=n;for(let o=0,s=i.options.length,a;o<s;++o){a=_.readValue(i.options[o]);let u=a===e,l=a===""&&e===void 0,f=typeof e=="number"&&Number(a)===e;if(u||l||f){r=o;break}}(t||r>=0||e===void 0&&i.size>1)&&(i.selectedIndex=r)}break;default:e==null&&(e=""),n.value=e;break}}};var We={};Ye(We,{memoize:()=>$s,parseMemoText:()=>Ri,unmemoize:()=>Li,unmemoizeDomNodeAndDescendants:()=>js});var sr={};function Mi(){return((1+Math.random())*4294967296|0).toString(16).substring(1)}function Hs(){return Mi()+Mi()}function Pi(n,e){if(n){if(n.nodeType===Node.COMMENT_NODE){let r=Ri(n.nodeValue);r!=null&&e.push({domNode:n,memoId:r})}else if(n.nodeType===Node.ELEMENT_NODE)for(let t=0,r=n.childNodes,i=r.length;t<i;t++)Pi(r[t],e)}}function $s(n){if(typeof n!="function")throw new Error("You can only pass a function to memoization.memoize()");let e=Hs();return sr[e]=n,"<!--[ko_memo:"+e+"]-->"}function Li(n,e){let t=sr[n];if(t===void 0)throw new Error("Couldn't find any memo with ID "+n+". Perhaps it's already been unmemoized.");try{return t.apply(null,e||[]),!0}finally{delete sr[n]}}function js(n,e){let t=new Array;Pi(n,t);for(let r=0,i=t.length;r<i;r++){let o=t[r].domNode,s=[o];e&&nt(s,e),Li(t[r].memoId,s),o.nodeValue="",o.parentNode&&o.parentNode.removeChild(o)}}function Ri(n){if(!n)return null;let e=n.match(/^\[ko_memo\:(.*?)\]$/);return e?e[1]:null}var ye={};Ye(ye,{cancel:()=>Qs,resetForTesting:()=>Ks,runEarly:()=>Hi,schedule:()=>qs});var Rt=new Array,ie=0,Vi=1,Se=0,ge=c.global;ge&&typeof ge.queueMicrotask=="function"?c.taskScheduler=n=>ge.queueMicrotask(n):ge&&ge.MutationObserver&&ge.document&&!(ge.navigator&&ge.navigator.standalone)?c.taskScheduler=(function(){let n=null,e=!1,t=ge.document.createElement("div");return new ge.MutationObserver(function(){let r=n;n=null,r==null||r()}).observe(t,{attributes:!0}),function(r){n=r,e=!e,t.setAttribute("data-task-scheduler",e?"1":"0")}})():c.taskScheduler=n=>setTimeout(n,0);function Hi(){if(ie){let n=ie,e=0;for(let t;Se<ie;)if(t=Rt[Se++]){if(Se>n){if(++e>=5e3){Se=ie,qn(Error("'Too much recursion' after processing "+e+" task groups."));break}n=ie}try{t()}catch(r){qn(r)}}}}function Ws(){Hi(),Se=ie=Rt.length=0}function Us(){c.taskScheduler(Ws)}function qs(n){return ie||Us(),Rt[ie++]=n,Vi++}function Qs(n){let e=n-(Vi-ie);e>=Se&&e<ie&&(Rt[e]=null)}function Ks(){let n=ie-Se;return Se=ie=Rt.length=0,n}var D={};Ye(D,{begin:()=>Cn,end:()=>xn,getDependencies:()=>Ys,getDependenciesCount:()=>Xs,ignore:()=>zs,ignoreDependencies:()=>zs,isInitial:()=>Zs,registerDependency:()=>ur});var ar=Symbol("Knockout Subscribable");function ut(n){return n&&n[ar]||!1}var $i=new Array,oe,Js=0;function Gs(){return++Js}function Cn(n){$i.push(oe),oe=n}function xn(){oe=$i.pop()}function ur(n){if(oe){if(!ut(n))throw new Error("Only subscribable things can act as dependencies");oe.callback.call(oe.callbackTarget,n,n._id||(n._id=Gs()))}}function zs(n,e,t){try{return Cn(),n.apply(e,t||[])}finally{xn()}}function Xs(){if(oe)return oe.computed.getDependenciesCount()}function Ys(){if(oe)return oe.computed.getDependencies()}function Zs(){if(oe)return oe.isInitial}function Vt(n){n._deferUpdates||(n._deferUpdates=!0,n.limit(function(e){let t,r=!1;return function(){if(!r){ye.cancel(t),t=ye.schedule(e);try{r=!0,n.notifySubscribers(void 0,"dirty")}finally{r=!1}}}}))}var Ht=class{constructor(e,t,r){d(this,"_disposeCallback");d(this,"_target");d(this,"_callback");d(this,"_isDisposed");d(this,"_domNodeDisposalCallback");d(this,"_node");this._target=e,this._callback=t.next,this._disposeCallback=r,this._isDisposed=!1,this._domNodeDisposalCallback=null}dispose(){this._domNodeDisposalCallback&&st(this._node,this._domNodeDisposalCallback),this._isDisposed=!0,this._disposeCallback()}disposeWhenNodeIsRemoved(e){this._node=e,Ae(e,this._domNodeDisposalCallback=this.dispose.bind(this))}unsubscribe(){this.dispose()}get closed(){return this._isDisposed}};var ea={undefined:1,boolean:1,number:1,string:1};function lt(n,e){return n===null||typeof n in ea?n===e:!1}function lr(n){let e=this;return n&&R(n,function(t,r){let i=be[t];typeof i=="function"?e=i(e,r)||e:c.onError(new Error("Extender not found: "+t))}),e}function ta(n,e){n.equalityComparer=e=="always"?null:lt}function na(n,e){if(e!==!0)throw new Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");Vt(n)}function ra(n,e){let t,r,i;typeof e=="number"?t=e:(t=e.timeout,r=e.method),n._deferUpdates=!1,i=r==="notifyWhenChangesStop"?dn:ln,n.limit(function(o){return i(o,t)})}var be={notify:ta,deferred:na,rateLimit:ra};var Y=Symbol("Knockout latest value");Symbol.observable||(Symbol.observable=Symbol.for("@tko/Symbol.observable"));var U=function(){Object.setPrototypeOf(this,An),An.init(this)},De="change",An={[ar]:!0,[Symbol.observable](){return this},init(n){n._subscriptions={change:[]},n._versionNumber=1},subscribe(n,e,t){let r=typeof n=="object"&&n.next;t=t||De;let i=r?n:{next:e?n.bind(e):n},o=new Ht(this,i,()=>{tt(this._subscriptions[t],o),this.afterSubscriptionRemove&&this.afterSubscriptionRemove(t)});return this.beforeSubscriptionAdd&&this.beforeSubscriptionAdd(t),this._subscriptions[t]||(this._subscriptions[t]=new Array),this._subscriptions[t].push(o),r&&Y in this&&i.next(this[Y]),o},notifySubscribers(n,e){if(e=e||De,e===De&&this.updateVersion(),this.hasSubscriptionsForEvent(e)){let t=e===De&&this._changeSubscriptions||[...this._subscriptions[e]];try{Cn();for(let r=0,i;i=t[r];++r)i._isDisposed||i._callback(n)}finally{xn()}}},getVersion(){return this._versionNumber},hasChanged(n){return this.getVersion()!==n},updateVersion(){++this._versionNumber},hasSubscriptionsForEvent(n){return this._subscriptions[n]&&this._subscriptions[n].length},getSubscriptionsCount(n){if(n)return this._subscriptions[n]&&this._subscriptions[n].length||0;{let e=0;return R(this._subscriptions,function(t,r){t!=="dirty"&&(e+=r.length)}),e}},isDifferent(n,e){return!this.equalityComparer||!this.equalityComparer(n,e)},once(n){let e=this.subscribe(t=>{e.dispose(),n(t)})},when(n,e){let t=this.peek(),r=arguments.length>1,i=typeof n=="function"?n:o=>o===n;return i(t)?c.Promise.resolve(r?e:t):new c.Promise((o,s)=>{let a=this.subscribe(u=>{i(u)&&(a.dispose(),o(r?e:u))})})},yet(n,...e){let t=typeof n=="function"?n:i=>i===n,r=i=>!t(i);return this.when(r,...e)},next(){return new Promise(n=>this.once(n))},toString(){return"[object Object]"},extend:lr};Object.setPrototypeOf(An,Function.prototype);U.fn=An;function F(n){function e(){return arguments.length>0?(e.isDifferent(e[Y],arguments[0])&&(e.valueWillMutate(),e[Y]=arguments[0],e.valueHasMutated()),this):(ur(e),e[Y])}return cn(e,{value:void 0}),e[Y]=n,U.fn.init(e),Object.setPrototypeOf(e,F.fn),c.deferUpdates&&Vt(e),e}F.fn={equalityComparer:lt,peek(){return this[Y]},valueHasMutated(){this.notifySubscribers(this[Y],"spectate"),this.notifySubscribers(this[Y])},valueWillMutate(){this.notifySubscribers(this[Y],"beforeChange")},modify(n,e=!0){this(n(e?this.peek():this()))},isWriteable:!0};function ia(n,e){!e||e===De?this._limitChange(n):e==="beforeChange"?this._limitBeforeChange(n):this._origNotifySubscribers(n,e)}U.fn.limit=function(e){let t=this,r=S(t),i="beforeChange",o,s,a,u,l;t._origNotifySubscribers||(t._origNotifySubscribers=t.notifySubscribers,t.notifySubscribers=ia);let f=e(function(){t._notificationIsPending=!1,r&&u===t&&(u=t._evalIfChanged?t._evalIfChanged():t());let m=s||l&&t.isDifferent(a,u);t._notifyNextChange=l=o=!1,m&&t._origNotifySubscribers(a=u)});Object.assign(t,{_limitChange(m,b){(!b||!t._notificationIsPending)&&(l=!b),t._changeSubscriptions=[...t._subscriptions[De]],t._notificationIsPending=o=!0,u=m,f()},_limitBeforeChange(m){o||(a=m,t._origNotifySubscribers(m,i))},_notifyNextChangeIfValueIsDifferent(){t.isDifferent(a,t.peek(!0))&&(s=!0)},_recordUpdate(){l=!0}})};Object.setPrototypeOf(F.fn,U.fn);var ji=F.protoProperty=c.protoProperty;F.fn[ji]=F;F.observablePrototypes=new Set([F]);function S(n){let e=typeof n=="function"&&n[ji];if(e&&!F.observablePrototypes.has(e))throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e}function p(n){return S(n)?n():n}function dt(n){return S(n)?n.peek():n}function Q(n){return S(n)&&n.isWriteable}var ct="arrayChange";function Ue(n,e){if(n.compareArrayOptions={},e&&typeof e=="object"&&H(n.compareArrayOptions,e),n.compareArrayOptions.sparse=!0,n.cacheDiffForKnownOperation)return;let t=!1,r=null,i,o=0,s,a=n.beforeSubscriptionAdd,u=n.afterSubscriptionRemove;n.beforeSubscriptionAdd=function(m){a&&a.call(n,m),m===ct&&l()},n.afterSubscriptionRemove=function(m){u&&u.call(n,m),m===ct&&!n.hasSubscriptionsForEvent(ct)&&(s&&(n.notifySubscribers=s,s=void 0),i&&i.dispose(),i=null,t=!1)};function l(){if(t)return;t=!0,s=n.notifySubscribers,n.notifySubscribers=function(b,g){return(!g||g===De)&&++o,s.apply(this,arguments)};let m=new Array().concat(n.peek()===void 0?[]:n.peek());r=null,i=n.subscribe(function(b){let g;b=new Array().concat(b||[]),n.hasSubscriptionsForEvent(ct)&&(g=f(m,b)),m=b,r=null,o=0,g&&g.length&&n.notifySubscribers(g,ct)})}function f(m,b){return(!r||o>1)&&(r=Ue.compareArrays(m,b,n.compareArrayOptions)),r}n.cacheDiffForKnownOperation=function(m,b,g){if(!t||o)return;let x=new Array,T=m.length,h=g.length,O=0;function M(y,w,v){return x[x.length]={status:y,value:w,index:v}}switch(b){case"push":O=T;case"unshift":for(let y=0;y<h;y++)M("added",g[y],O+y);break;case"pop":O=T-1;case"shift":T&&M("deleted",m[O],O);break;case"splice":{let y=Math.min(Math.max(0,g[0]<0?T+g[0]:g[0]),T),w=h===1?T:Math.min(y+(g[1]||0),T),v=y+h-2,k=Math.max(w,v),P=new Array,j=new Array;for(let ne=y,ri=2;ne<k;++ne,++ri)ne<w&&j.push(M("deleted",m[ne],ne)),ne<v&&P.push(M("added",g[ri],ne));jn(j,P)}break;default:return}r=x}}Ue.compareArrays=rt;be.trackArrayChanges=Ue;function ce(n){if(n=n||[],typeof n!="object"||!("length"in n))throw new Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");let e=Object.setPrototypeOf(F(n),ce.fn);return Ue(e),cn(e,{get:()=>{var t;return(t=e())==null?void 0:t.length}}),e}function $t(n){return S(n)&&typeof n.remove=="function"&&typeof n.push=="function"}ce.fn={remove(n){let e=this.peek(),t=new Array,r=typeof n=="function"&&!S(n)?n:function(i){return i===n};for(let i=0;i<e.length;i++){let o=e[i];if(r(o)){if(t.length===0&&this.valueWillMutate(),e[i]!==o)throw Error("Array modified during remove; cannot remove item");t.push(o),e.splice(i,1),i--}}return t.length&&this.valueHasMutated(),t},removeAll(n){if(n===void 0){let e=this.peek(),t=e.slice(0);return this.valueWillMutate(),e.splice(0,e.length),this.valueHasMutated(),t}return n?this.remove(function(e){return W(n,e)>=0}):[]},destroy(n){let e=this.peek(),t=typeof n=="function"&&!S(n)?n:function(r){return r===n};this.valueWillMutate();for(let r=e.length-1;r>=0;r--){let i=e[r];t(i)&&(i._destroy=!0)}this.valueHasMutated()},destroyAll(n){return n===void 0?this.destroy(function(){return!0}):n?this.destroy(function(e){return W(n,e)>=0}):[]},indexOf(n){return W(this(),n)},replace(n,e){let t=this.indexOf(n);t>=0&&(this.valueWillMutate(),this.peek()[t]=e,this.valueHasMutated())},sorted(n){return[...this()].sort(n)},reversed(){return[...this()].reverse()},[Symbol.iterator]:function*(){yield*Le(this())}};Object.setPrototypeOf(ce.fn,F.fn);L(["pop","push","reverse","shift","sort","splice","unshift"],function(n){ce.fn[n]=function(){let e=this.peek();this.valueWillMutate(),this.cacheDiffForKnownOperation(e,n,arguments);let t=e[n].apply(e,arguments);return this.valueHasMutated(),t===e?this:t}});L(["slice"],function(n){ce.fn[n]=function(){let e=this();return e[n].apply(e,arguments)}});ce.trackArrayChanges=Ue;var oa=10;function pt(n){if(arguments.length==0)throw new Error("When calling ko.toJS, pass the object you want to convert.");return Wi(n,function(e){for(let t=0;S(e)&&t<oa;t++)e=e();return e})}function dr(n,e,t){let r=pt(n);return JSON.stringify(r,e,t)}function Wi(n,e,t=new Map){if(n=e(n),!(typeof n=="object"&&n!==null&&n!==void 0&&!(n instanceof RegExp)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof Number)&&!(n instanceof Boolean)))return n;let i=n instanceof Array?[]:{};return t.set(n,i),sa(n,function(o){let s=e(n[o]);switch(typeof s){case"boolean":case"number":case"string":case"function":i[o]=s;break;case"object":case"undefined":{let a=t.get(s);i[o]=a!==void 0?a:Wi(s,e,t)}break}}),i}function sa(n,e){if(n instanceof Array){for(let t=0;t<n.length;t++)e(t);typeof n.toJSON=="function"&&e("toJSON")}else for(let t in n)e(t)}function cr(){}function aa(n,e){for(;typeof e=="function";)e=e();return e}function pr(n,e){return n==e}pr.precedence=10;function fr(n,e){return n!=e}fr.precedence=10;function mr(n,e){return n===e}mr.precedence=10;function hr(n,e){return n!==e}hr.precedence=10;var E={"@":aa,"#":(n,e)=>()=>p(e),"=>":cr,"!":function(e,t){return!t},"!!":function(e,t){return!!t},"++":function(e,t){return++t},"--":function(e,t){return--t},"**":function(e,t){return ii(e,t)},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return(e||0)-(t||0)},"&-":function(e,t){return-1*t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":pr,"!=":fr,"===":mr,"!==":hr,"&":function(e,t){return e&t},"^":function(e,t){return e^t},"|":function(e,t){return e|t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"??":function(e,t){return e!=null?e:t},".":function(e,t){return e==null?void 0:e[t]},"?.":function(e,t){return e==null?void 0:e[t]},"[":function(e,t){return e==null?void 0:e[t]},",":function(e,t){return t},call:function(e,t){return e.apply(null,t)}};E["@"].precedence=21;E["#"].precedence=21;E["."].precedence=19;E["["].precedence=19;E["?."].precedence=19;E["!"].precedence=16;E["!!"].precedence=16;E["++"].precedence=16;E["--"].precedence=16;E["&-"].precedence=16;E["**"].precedence=15;E["%"].precedence=14;E["*"].precedence=14;E["/"].precedence=14;E["+"].precedence=13;E["-"].precedence=13;E["|"].precedence=12;E["^"].precedence=11;E["&"].precedence=10;E["<"].precedence=11;E["<="].precedence=11;E[">"].precedence=11;E[">="].precedence=11;E["=="].precedence=10;E["!="].precedence=10;E["==="].precedence=10;E["!=="].precedence=10;E["&&"].precedence=6;E["||"].precedence=5;E["??"].precedence=5;E["&&"].earlyOut=n=>!n;E["||"].earlyOut=n=>n;E["??"].earlyOut=n=>n;E[","].precedence=2;E.call.precedence=1;E["=>"].precedence=1;Wn("strictEquality",{default:!1,set(n){E["=="]=n?mr:pr,E["!="]=n?hr:fr}});var Ui=Symbol("Node - Is Expression Or Identifier"),B=class n{constructor(e,t,r){d(this,"lhs");d(this,"op");d(this,"rhs");this.lhs=e,this.op=t,this.rhs=r}static get operators(){return E}get_leaf_value(e,t,r,i){return typeof e=="function"?p(e()):typeof e!="object"||e===null?e:e[n.isExpressionOrIdentifierSymbol]?p(e.get_value(void 0,t,r,i)):e}get_value(e,t,r,i){if(this.op===cr)return(...u)=>{let l=t;return this.lhs&&(l=this.lhs.extendContext(t,u)),this.get_leaf_value(this.rhs,l,r,this)};let o=this.get_leaf_value(this.lhs,t,r,this),s=this.op.earlyOut;if(s&&s(o))return o;let a=this.get_leaf_value(this.rhs,t,r,this);return this.op(o,a,t,r)}static get isExpressionOrIdentifierSymbol(){return Ui}get[Ui](){return!0}static value_of(e,t,r,i){return e&&e[n.isExpressionOrIdentifierSymbol]?e.get_value(e,t,r,i):e}static create_root(e,t=!1){let r=new Array,i=new Array;for(let o=0;o<e.length;o+=2){r.push(e[o]);let s=e[o+1],a=(s==null?void 0:s.precedence)||0;for(;i.length&&a<=i[i.length-1].precedence;){let u=r.pop(),l=r.pop();r.push(new n(l,i.pop(),u))}i.push(s)}if(r.length!==1)throw new Error(`unexpected nodes remain in shunting yard output stack: ${r}`);return r[0]}};E["?"]=function(e,t,r,i,o){return B.value_of(e?t.yes:t.no,r,i,o)};E["?"].precedence=4;var Oe=class{constructor(e){d(this,"nodes");d(this,"root");this.nodes=e,this.root=B.create_root(e)}get_value(e,t,r,i){return this.root||(this.root=B.create_root(this.nodes)),this.root.get_value(e,t,r,i)}};Oe.prototype[B.isExpressionOrIdentifierSymbol]=!0;var Ee=class{constructor(e,t){d(this,"parser");d(this,"args");this.parser=e,this.args=t}get_value(e,t,r,i){let o=new Array;for(let s=0,a=this.args.length;s<a;++s)o.push(B.value_of(this.args[s],t,r,i));return o}get[B.isExpressionOrIdentifierSymbol](){return!0}};var qi=/[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,Qi=/[\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/;var q=class n{constructor(e,t,r){d(this,"token");d(this,"dereferences");d(this,"parser");this.token=t,this.dereferences=r,this.parser=e}dereference(e,t,r,i){let o,s=this.dereferences||[],a=t.$data||{},u,l,f;for(l=0,f=s.length;l<f;++l)if(o=B.value_of(s[l],t,r,i),typeof e=="function"&&s[l]instanceof Ee)e=e.apply(u||a,o),u=e;else{if(e==null)return e;u=e,e=B.value_of(e[o],t,r,i)}return typeof e=="function"&&f>0&&u!==e&&!G(u,o)?e.bind(u):e}get_value(e,t,r,i){let o=e&&!(e instanceof n)?B.value_of(e,t,r,i)[this.token]:t.lookup(this.token,r,i);return this.dereference(o,t,r,i)}assign(e,t,r){Q(e[t])?e[t](r):S(e[t])||(e[t]=r)}set_value(e,t,r){let i=t.$data||{},o=this.dereferences||[],s=this.token,a,u,l;if(kt(i)&&s in i)l=i;else if(s in t)l=t;else if(s in r)l=r;else throw new Error("Identifier::set_value -- The property '"+s+"' does not exist on the $data, $context, or globals.");if(u=o.length,u===0){this.assign(l,s,e);return}for(l=l[s],a=0;a<u-1;++a)s=o[a],s instanceof Ee?l=l():l=l[B.value_of(s)];if(o[a]===!0)throw new Error("Cannot assign a value to a function.");o[a]&&this.assign(l,B.value_of(o[a]),e)}static is_valid_start_char(e){return qi.test(e)}static is_valid_continue_char(e){return Qi.test(e)}get[B.isExpressionOrIdentifierSymbol](){return!0}};var ft,gr=class gr{constructor(e,t){si(this,ft);t instanceof Oe&&(t=t.root);try{ai(this,ft,gr.nodeTreeToNames(t))}catch(r){e.error(r)}}extendContext(e,t){if($n(this,ft)){let r={};return $n(this,ft).forEach((i,o)=>{r[i]=t[o]}),e.extend(r)}else return e}get[B.isExpressionOrIdentifierSymbol](){return!0}static nodeTreeToNames(e){let t=new Array;for(;e;)if(e instanceof q)t.push(e.token),e=null;else if(this.isCommaNode(e))t.push(e.rhs.token),e=e.lhs;else throw new Error(`only simple identifiers allowed in lambda parameter list but found ${JSON.stringify(e,null,2)}`);return t.reverse(),t}static isCommaNode(e){return e instanceof B&&e.op===E[","]&&e.rhs instanceof q}};ft=new WeakMap;var jt=gr;var mt=class{constructor(e,t){d(this,"yes");d(this,"no");Object.assign(this,{yes:e,no:t})}get_value(){return this}get[B.isExpressionOrIdentifierSymbol](){return!0}};var Ki={"'":"'",'"':'"',"`":"`","\\":"\\","/":"/",$:"$",b:"\b",f:"\f",n:`
|
|
3
|
-
`,r:"\r",t:" "},
|
|
4
|
-
`||e==="\r")););e=this.next()}else if(
|
|
5
|
-
${t} ${
|
|
1
|
+
// @tko/build.knockout 🥊 4.1.0 IIFE
|
|
2
|
+
"use strict";var ko=(()=>{var un=Object.defineProperty;var ns=Object.getOwnPropertyDescriptor;var is=Object.getOwnPropertyNames;var rs=Object.prototype.hasOwnProperty;var Vn=(n,e)=>(e=Symbol[n])?e:Symbol.for("Symbol."+n),Hn=n=>{throw TypeError(n)},Yi=Math.pow,os=(n,e,t)=>e in n?un(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ze=(n,e)=>{for(var t in e)un(n,t,{get:e[t],enumerable:!0})},ss=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of is(e))!rs.call(n,r)&&r!==t&&un(n,r,{get:()=>e[r],enumerable:!(i=ns(e,r))||i.enumerable});return n};var us=n=>ss(un({},"__esModule",{value:!0}),n);var d=(n,e,t)=>os(n,typeof e!="symbol"?e+"":e,t),Zi=(n,e,t)=>e.has(n)||Hn("Cannot "+t);var $n=(n,e,t)=>(Zi(n,e,"read from private field"),t?t.call(n):e.get(n)),er=(n,e,t)=>e.has(n)?Hn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),tr=(n,e,t,i)=>(Zi(n,e,"write to private field"),i?i.call(n,t):e.set(n,t),t);var Ge=(n,e,t)=>new Promise((i,r)=>{var o=a=>{try{u(t.next(a))}catch(l){r(l)}},s=a=>{try{u(t.throw(a))}catch(l){r(l)}},u=a=>a.done?i(a.value):Promise.resolve(a.value).then(o,s);u((t=t.apply(n,e)).next())}),as=function(n,e){this[0]=n,this[1]=e};var Me=n=>{var e=n[Vn("asyncIterator")],t=!1,i,r={};return e==null?(e=n[Vn("iterator")](),i=o=>r[o]=s=>e[o](s)):(e=e.call(n),i=o=>r[o]=s=>{if(t){if(t=!1,o==="throw")throw s;return s}return t=!0,{done:!1,value:new as(new Promise(u=>{var a=e[o](s);a instanceof Object||Hn("Object expected"),u(a)}),1)}}),r[Vn("iterator")]=()=>r,i("next"),"throw"in e?i("throw"):r.throw=o=>{throw o},"return"in e&&i("return"),r};var $u={};ze($u,{default:()=>Hu});var{isArray:Ot}=Array;function L(n,e,t){arguments.length>2&&(e=e.bind(t));for(let i=0,r=n.length;i<r;++i)e(n[i],i,n)}function W(n,e){return(Ot(n)?n:[...n]).indexOf(e)}function an(n,e,t){return(Ot(n)?n:[...n]).find(e,t)}function Xe(n,e,t){return arguments.length>2&&(e=e.bind(t)),n===null?[]:Array.from(n,e)}function Ye(n,e){let t=W(n,e);t>0?n.splice(t,1):t===0&&n.shift()}function or(n){let e=new Set;return n===null?[]:(Ot(n)?n:[...n]).filter(t=>e.has(t)?!1:e.add(t))}function Pe(n,e,t){return arguments.length>2&&(e=e.bind(t)),n===null?[]:(Ot(n)?n:[...n]).filter(e)}function Ze(n,e){if(Ot(e))n.push.apply(n,e);else for(let t=0,i=e.length;t<i;t++)n.push(e[t]);return n}function et(n,e,t){let i=W(typeof n.peek=="function"?n.peek():n,e);i<0?t&&n.push(e):t||n.splice(i,1)}function ue(n){return Array.from(n)}function sr(n,e){let t=typeof n=="function"?n():n,i=typeof e=="function"?e():e,r=[];for(let o=t;o<=i;o++)r.push(o);return r}function jn(n,e,t){if(n.length&&e.length){let i,r,o,s,u;for(i=r=0;(!t||i<t)&&(s=n[r]);++r){for(o=0;u=e[o];++o)if(s.value===u.value){s.moved=u.index,u.moved=s.index,e.splice(o,1),i=o=0;break}i+=o}}}var nr="added",ir="deleted";function tt(n,e,t){return t=typeof t=="boolean"?{dontLimitMoves:t}:t||{},n=n||[],e=e||[],n.length<e.length?rr(n,e,nr,ir,t):rr(e,n,ir,nr,t)}function rr(n,e,t,i,r){let o=Math.min,s=Math.max,u=new Array,a,l=n.length,p,f=e.length,y=f-l||1,g=l+f+1,x,N,h,O;for(a=0;a<=l;a++)for(N=x,u.push(x=new Array),h=o(f,a+y),O=s(0,a-1),p=O;p<=h;p++)if(!p)x[p]=a+1;else if(!a)x[p]=p+1;else if(n[a-1]===e[p-1])x[p]=N[p-1];else{let k=N[p]||g,P=x[p-1]||g;x[p]=o(k,P)+1}let M=new Array,b,w=new Array,v=new Array;for(a=l,p=f;a||p;)b=u[a][p]-1,p&&b===u[a][p-1]?w.push(M[M.length]={status:t,value:e[--p],index:p}):a&&b===u[a-1][p]?v.push(M[M.length]={status:i,value:n[--a],index:a}):(--p,--a,r!=null&&r.sparse||M.push({status:"retained",value:e[p]}));return jn(v,w,!r.dontLimitMoves&&l*10),M.reverse()}var ln=class{constructor(){d(this,"bindingStringPreparsers",[]);d(this,"knockoutInstance",null);d(this,"deferUpdates",!1);d(this,"useOnlyNativeEvents",!0);d(this,"useTemplateTag",!0);d(this,"protoProperty","__ko_proto__");d(this,"defaultBindingAttribute","data-bind");d(this,"allowVirtualElements",!0);d(this,"bindingGlobals",Object.create(null));d(this,"bindingProviderInstance");d(this,"createChildContextWithAs",!1);d(this,"disableJQueryUsage",!1);d(this,"_jQuery");d(this,"Promise",globalThis.Promise);d(this,"taskScheduler",null);d(this,"debug",!1);d(this,"templateSizeLimit",4096);d(this,"allowScriptTagsInTemplates",!1);d(this,"_sanitizeWarningLogged",!1);d(this,"global",globalThis);d(this,"document",globalThis.document);d(this,"filters",{});d(this,"includeDestroyed",!1);d(this,"foreachHidesDestroyed",!1)}get jQuery(){var e;if(!this.disableJQueryUsage)return(e=this._jQuery)!=null?e:globalThis.jQuery}set jQuery(e){e?(this._jQuery=e,this.disableJQueryUsage=!1):(this.disableJQueryUsage=!0,this._jQuery=void 0)}sanitizeHtmlTemplate(e){return this._sanitizeWarningLogged||(console.warn("WARNING -- You don't have a HTML sanitizer configured. Please configure options.sanitizeHtmlTemplate to avoid XSS vulnerabilities."),this._sanitizeWarningLogged=!0),e}onError(e,t=!0){if(t)throw e;return e}set(e,t){this[e]=t}getBindingHandler(e){return null}cleanExternalData(e,t){}},ur=new ln;function kt(n,e){var i;let t=e.default;Object.defineProperty(ur,n,{get(){return t},set(r){var o;t=r,(o=e.set)==null||o.call(e,r)},enumerable:!0,configurable:!0}),(i=e.set)==null||i.call(e,t)}var c=ur;function Wn(n){return c.onError?(...e)=>{try{return n(...e)}catch(t){c.onError(t)}}:n}function Un(n){ae(function(){throw n},0)}function ae(n,e){return setTimeout(Wn(n),e)}function dn(n,e){let t;return function(...i){t||(t=ae(function(){t=void 0,n(...i)},e))}}function cn(n,e){let t;return function(...i){clearTimeout(t),t=ae(()=>n(...i),e)}}function ar(n){return Symbol(n)}function G(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function _t(n){return n===null?!1:typeof n=="object"||typeof n=="function"}function H(n,e){if(e)for(let t of Object.keys(e))G(e,t)&&(n[t]=e[t]);return n}function R(n,e){for(let t in n)G(n,t)&&e(t,n[t])}function fe(n,e,t){if(!n)return n;arguments.length>2&&(e=e.bind(t));let i={};for(let r in n)G(n,r)&&(i[r]=e(n[r],r,n));return i}function qn(n,e){return G(n,e)?n[e]:void 0}function Kn(n,e){if(e||(e=new Array),!n||typeof n!="object"||n.constructor!==Object||e.indexOf(n)!==-1)return n;e.push(n);let t={};for(let i in n)G(n,i)&&(t[i]=Kn(n[i],e));return t}function lr(n){let e=new Set;return JSON.stringify(n,(t,i)=>e.has(i)?"...":(typeof i=="object"&&e.add(i),i))}function Qn(n){return _t(n)&&typeof n.then=="function"}function dr(n){if(typeof n=="string"){let e=n.trim();if(e)return JSON.parse(e)}return null}var ls=/\S+/g;function nt(n,e,t){if(!e)return;let i=e.match(ls);if(!i)return;let r=t?"add":"remove";for(let o of i)n.classList[r](o)}function Jn(n,e){if(n===e)return!0;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(e.contains)return e.contains(n.nodeType!==Node.ELEMENT_NODE?n.parentNode:n);if(e.compareDocumentPosition)return(e.compareDocumentPosition(n)&16)==16;let t=n;for(;t&&t!=e;)t=t.parentNode;return!!t}function It(n){return Jn(n,n.ownerDocument.documentElement)}function cr(n){return!!an(n,It)}function V(n){return n&&n.tagName&&n.tagName.toLowerCase()}function pr(n){return window.HTMLElement?n instanceof HTMLElement:n&&n.tagName&&n.nodeType===Node.ELEMENT_NODE}function zn(n){return window.DocumentFragment?n instanceof DocumentFragment:n&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE}var Gn={},fr={};Gn.UIEvents=["keyup","keydown","keypress"];Gn.MouseEvents=["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"];R(Gn,function(n,e){if(e.length)for(let t=0,i=e.length;t<i;t++)fr[e[t]]=n});function ds(n,e){if(V(n)!=="input"||!n.type||e.toLowerCase()!="click")return!1;let t=n.type;return t=="checkbox"||t=="radio"}function Q(n,e,t,i=!1){let r=Wn(t),o=!!i,s=c.jQuery;if(!c.useOnlyNativeEvents&&!o&&s)s(n).on(e,r);else if(typeof n.addEventListener=="function")n.addEventListener(e,r,i);else throw new Error("Browser doesn't support addEventListener")}function cs(n){return typeof n.click=="function"}function Re(n,e){if(!(n&&n.nodeType))throw new Error("element must be a DOM node when calling triggerEvent");let t=ds(n,e);if(!c.useOnlyNativeEvents&&c.jQuery&&!t){c.jQuery(n).trigger(e);return}if(typeof n.dispatchEvent!="function"){if(t&&cs(n)){n.click();return}throw new Error("The supplied element doesn't support dispatchEvent")}let i=fr[e]||"HTMLEvents",r=c.global,o;i==="MouseEvents"&&typeof MouseEvent=="function"?o=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:r,relatedTarget:n}):i==="UIEvents"&&typeof KeyboardEvent=="function"?o=new KeyboardEvent(e,{bubbles:!0,cancelable:!0,view:r}):o=new Event(e,{bubbles:!0,cancelable:!0}),n.dispatchEvent(o)}var A={};ze(A,{clear:()=>Zn,get:()=>Le,getOrSet:()=>hs,nextKey:()=>Mt,set:()=>Ce});var ps=new Date().getTime(),fs=`__ko__${ps}`,pn=Symbol("Knockout data");var ms=0;function Xn(n){return n!=="__proto__"&&n!=="constructor"&&n!=="prototype"}function Yn(n,e){let t=n[pn];return!t&&e&&(t=n[pn]={}),t}function Zn(n){return n[pn]?(delete n[pn],!0):!1}function Mt(){return ms+++fs}function Le(n,e){if(!Xn(e))throw new Error("Unsafe key for DOM data: "+e);let t=Yn(n,!1);return t&&t[e]}function Ce(n,e,t){if(!Xn(e))throw new Error("Unsafe key for DOM data: "+e);let i=Yn(n,t!==void 0);i&&(i[e]=t)}function hs(n,e,t){if(!Xn(e))throw new Error("Unsafe key for DOM data: "+e);let i=Yn(n,!0);return i[e]||(i[e]=t)}var ei=Mt(),gs={1:!0,8:!0,9:!0},mr={1:!0,9:!0};function ti(n,e){let t=Le(n,ei);return t===void 0&&e&&(t=new Array,Ce(n,ei,t)),t}function ys(n){Ce(n,ei,void 0)}function hr(n){let e=ti(n,!1);if(e){e=e.slice(0);for(let t=0;t<e.length;t++)e[t](n)}Zn(n);for(let t=0,i=it.length;t<i;++t)it[t](n);c.cleanExternalData&&c.cleanExternalData(n),mr[n.nodeType]&&gr(n.childNodes,!0)}function gr(n,e){let t=new Array,i;for(let r=0;r<n.length;r++)if((!e||n[r].nodeType===Node.COMMENT_NODE)&&(hr(t[t.length]=i=n[r]),n[r]!==i))for(;r--&&W(t,n[r])===-1;);}function xe(n,e){if(typeof e!="function")throw new Error("Callback must be a function");ti(n,!0).push(e)}function rt(n,e){let t=ti(n,!1);t&&(Ye(t,e),t.length===0&&ys(n))}function J(n){return gs[n.nodeType]&&(hr(n),mr[n.nodeType]&&n instanceof Element&&gr(n.getElementsByTagName("*"))),n}function me(n){n&&(J(n),n.parentNode&&n.parentNode.removeChild(n))}var it=new Array;function yr(n){it.push(n)}function br(n){let e=it.indexOf(n);e>=0&&it.splice(e,1)}function bs(n){let e=c.jQuery?c.jQuery.cleanData:null;e&&e([n])}it.push(bs);function Pt(n){let e=ue(n),i=(e[0]&&e[0].ownerDocument||document).createElement("div");for(let r=0,o=e.length;r<o;r++)i.appendChild(J(e[r]));return i}function Ae(n,e){let t=new Array;for(let i=0;i<n.length;i++){let r=n[i].cloneNode(!0);t.push(e?J(r):r)}return t}function Er(n,e){if(Rt(n),e)for(let t=0;t<e.length;t++)n.appendChild(e[t])}function fn(n,e){let t=Array.isArray(n)?n:[n];if(t.length>0){let i=t[0],r=i.parentNode;for(let o=0;o<e.length;o++)r==null||r.insertBefore(e[o],i);for(let o=0;o<t.length;o++)me(t[o])}}function Rt(n){for(;n.firstChild;)me(n.firstChild)}function Ve(n,e){if(n.length){for(e=e.nodeType===Node.COMMENT_NODE&&e.parentNode||e;n.length&&n[0].parentNode!==e;)n.splice(0,1);for(;n.length>1&&n[n.length-1].parentNode!==e;)n.length--;if(n.length>1){let t=n[0],i=n[n.length-1];for(n.length=0;t!==i;)n.push(t),t=t.nextSibling;n.push(i)}}return n}function mn(n,e){n.selected=e}var C={};ze(C,{allowedBindings:()=>As,childNodes:()=>vr,emptyNode:()=>hn,endCommentRegex:()=>Cr,firstChild:()=>yn,getVirtualChildren:()=>ii,hasBindingValue:()=>vs,insertAfter:()=>Ds,isEndComment:()=>Fe,isStartComment:()=>ne,lastChild:()=>Ts,nextSibling:()=>bn,normaliseVirtualElementDomStructure:()=>Ns,prepend:()=>Dr,previousSibling:()=>Bs,setDomNodeChildren:()=>gn,startCommentRegex:()=>ni,virtualNodeBindingValue:()=>Fs});var ni=/^\s*ko(?:\s+([\s\S]+))?\s*$/,Cr=/^\s*\/ko\s*$/,Es={ul:!0,ol:!0};function ne(n){return n.nodeType===Node.COMMENT_NODE&&ni.test(n.nodeValue)}function Fe(n){return n.nodeType===Node.COMMENT_NODE&&Cr.test(n.nodeValue)}function Cs(n){return Fe(n)&&!Le(n,xr)}var xr="__ko_matchedEndComment__";function ii(n,e){let t=n,i=1,r=new Array;for(;t=t.nextSibling;){if(Fe(t)&&(Ce(t,xr,!0),i--,i===0))return r;r.push(t),ne(t)&&i++}if(!e)throw new Error("Cannot find closing comment tag to match: "+n.nodeValue);return null}function Ar(n,e){let t=ii(n,e);return t?t.length>0?t[t.length-1].nextSibling:n.nextSibling:null}function xs(n){let e=n.firstChild,t=null;if(e)do if(t)t.push(e);else if(ne(e)){let i=Ar(e,!0);i?e=i:t=[e]}else Fe(e)&&(t=[e]);while(e=e.nextSibling);return t}var As=Object.create(null),vs=ne;function vr(n){return ne(n)?ii(n):n.childNodes}function hn(n){if(!ne(n))Rt(n);else{let e=vr(n);for(let t=0,i=e.length;t<i;t++)me(e[t])}}function gn(n,e){if(!ne(n))Er(n,e);else{hn(n);let t=n.nextSibling;if(t&&t.parentNode){let i=t.parentNode;for(let r=0,o=e.length;r<o;++r)i.insertBefore(e[r],t)}}}function Dr(n,e){var t;ne(n)?(t=n.parentNode)==null||t.insertBefore(e,n.nextSibling):n.firstChild?n.insertBefore(e,n.firstChild):n.appendChild(e)}function Ds(n,e,t){var i;t?ne(n)?(i=n.parentNode)==null||i.insertBefore(e,t.nextSibling):t.nextSibling?n.insertBefore(e,t.nextSibling):n.appendChild(e):Dr(n,e)}function yn(n){if(!ne(n)){if(n.firstChild&&Fe(n.firstChild))throw new Error("Found invalid end comment, as the first child of "+n.outerHTML);return n.firstChild}return!n.nextSibling||Fe(n.nextSibling)?null:n.nextSibling}function Ts(n){let e=yn(n);if(!e)return null;let t;do t=e;while(e=bn(e));return t}function bn(n){if(ne(n)&&(n=Ar(n)),n.nextSibling&&Fe(n.nextSibling)){if(Cs(n.nextSibling))throw Error("Found end comment without a matching opening comment, as next sibling of "+n.outerHTML);return null}else return n.nextSibling}function Bs(n){let e=0;do if(n.nodeType===Node.COMMENT_NODE)if(ne(n)){if(--e===0)return n}else Fe(n)&&e++;else if(e===0)return n;while(n=n.previousSibling)}function Fs(n){let e=n.nodeValue.match(ni);return e?e[1]:null}function Ns(n){if(!Es[V(n)])return;let e=n.firstChild;if(e)do if(e.nodeType===Node.ELEMENT_NODE){let t=xs(e);if(t){let i=e.nextSibling;for(let r=0;r<t.length;r++)i?n.insertBefore(t[r],i):n.appendChild(t[r])}}while(e=e.nextSibling)}var Tr=c.useTemplateTag&&c.document&&"content"in c.document.createElement("template");function ws(n,e){e||(e=document);let t=e.createElement("div");return t.innerHTML=n,ue(t.childNodes)}function Ss(n,e){e||(e=document);let t=e.createElement("template");return t.innerHTML=n,ue(t.content.childNodes)}function Os(n,e){let t=c.jQuery;return t?t.parseHTML(n,e)||[]:[]}function le(n,e){let t=Br(n);return Tr?Ss(t,e):c.jQuery?Os(t,e):ws(t,e)}var ks=/<script\b[^>]*>([\s\S]*?)<\/script[^>]*>/i;function Br(n){if(!n)return"";if(c.templateSizeLimit>0&&n.length>c.templateSizeLimit)throw new Error("Template is too long. Please configure the 'templateSizeLimit'");if(!c.allowScriptTagsInTemplates&&ks.test(n))throw new Error("Script-tag in template detected.");return c.sanitizeHtmlTemplate(n)}function Fr(n,e){let t=le(n,e);return t.length&&t[0].parentElement||Pt(t)}function ot(n,e){if(Rt(n),typeof e=="function"&&(e=e()),e!=null){typeof e!="string"&&(e=e.toString());let t=c.jQuery;if(t&&!Tr){let i=Br(e);t(n).html(i)}else{let i;if(n.ownerDocument?i=le(e,n.ownerDocument):i=le(e),n.nodeType===Node.COMMENT_NODE)e===null?hn(n):gn(n,i);else for(let r=0;r<i.length;r++)n.appendChild(i[r])}}}function He(n,e){let t=typeof e=="function"?e():e;t==null&&(t="");let i=yn(n);!i||i.nodeType!==Node.TEXT_NODE||bn(i)?gn(n,[n.ownerDocument.createTextNode(t)]):i.data=t}var En=Symbol("Knockout selectExtensions hasDomDataProperty"),_={optionValueDomDataKey:Mt(),readValue:function(n){switch(V(n)){case"option":return n[En]===!0?Le(n,_.optionValueDomDataKey):n.value;case"select":{let e=n;return e.selectedIndex>=0?_.readValue(e.options[e.selectedIndex]):void 0}default:return n.value}},writeValue:function(n,e,t){switch(V(n)){case"option":if(typeof e=="string")Ce(n,_.optionValueDomDataKey,void 0),En in n&&delete n[En],n.value=e;else{let i=n;Ce(n,_.optionValueDomDataKey,e),i[En]=!0,i.value=typeof e=="number"?e:""}break;case"select":{(e===""||e===null)&&(e=void 0);let i=-1,r=n;for(let o=0,s=r.options.length,u;o<s;++o){u=_.readValue(r.options[o]);let a=u===e,l=u===""&&e===void 0,p=typeof e=="number"&&Number(u)===e;if(a||l||p){i=o;break}}(t||i>=0||e===void 0&&r.size>1)&&(r.selectedIndex=i)}break;default:e==null&&(e=""),n.value=e;break}}};var $e={};ze($e,{memoize:()=>Is,parseMemoText:()=>Or,unmemoize:()=>Sr,unmemoizeDomNodeAndDescendants:()=>Ms});var ri={};function Nr(){return((1+Math.random())*4294967296|0).toString(16).substring(1)}function _s(){return Nr()+Nr()}function wr(n,e){if(n){if(n.nodeType===Node.COMMENT_NODE){let i=Or(n.nodeValue);i!=null&&e.push({domNode:n,memoId:i})}else if(n.nodeType===Node.ELEMENT_NODE)for(let t=0,i=n.childNodes,r=i.length;t<r;t++)wr(i[t],e)}}function Is(n){if(typeof n!="function")throw new Error("You can only pass a function to memoization.memoize()");let e=_s();return ri[e]=n,"<!--[ko_memo:"+e+"]-->"}function Sr(n,e){let t=ri[n];if(t===void 0)throw new Error("Couldn't find any memo with ID "+n+". Perhaps it's already been unmemoized.");try{return t.apply(null,e||[]),!0}finally{delete ri[n]}}function Ms(n,e){let t=new Array;wr(n,t);for(let i=0,r=t.length;i<r;i++){let o=t[i].domNode,s=[o];e&&Ze(s,e),Sr(t[i].memoId,s),o.nodeValue="",o.parentNode&&o.parentNode.removeChild(o)}}function Or(n){if(!n)return null;let e=n.match(/^\[ko_memo\:(.*?)\]$/);return e?e[1]:null}var ge={};ze(ge,{cancel:()=>Vs,resetForTesting:()=>Hs,runEarly:()=>Ir,schedule:()=>Ls});var Lt=new Array,ie=0,_r=1,Ne=0,he=c.global,kr;he&&typeof he.queueMicrotask=="function"?c.taskScheduler=n=>he.queueMicrotask(n):he!=null&&he.MutationObserver&&he.document&&!((kr=he.navigator)!=null&&kr.standalone)?c.taskScheduler=(function(){let n=null,e=!1,t=he.document.createElement("div");return new he.MutationObserver(function(){let i=n;n=null,i==null||i()}).observe(t,{attributes:!0}),function(i){n=i,e=!e,t.setAttribute("data-task-scheduler",e?"1":"0")}})():c.taskScheduler=n=>setTimeout(n,0);function Ir(){if(ie){let n=ie,e=0;for(let t;Ne<ie;)if(t=Lt[Ne++]){if(Ne>n){if(++e>=5e3){Ne=ie,Un(Error("'Too much recursion' after processing "+e+" task groups."));break}n=ie}try{t()}catch(i){Un(i)}}}}function Ps(){Ir(),Ne=ie=Lt.length=0}function Rs(){c.taskScheduler(Ps)}function Ls(n){return ie||Rs(),Lt[ie++]=n,_r++}function Vs(n){let e=n-(_r-ie);e>=Ne&&e<ie&&(Lt[e]=null)}function Hs(){let n=ie-Ne;return Ne=ie=Lt.length=0,n}var D={};ze(D,{begin:()=>Cn,end:()=>xn,getDependencies:()=>qs,getDependenciesCount:()=>Us,ignore:()=>Ws,ignoreDependencies:()=>Ws,isInitial:()=>Ks,registerDependency:()=>si});var oi=Symbol("Knockout Subscribable");function st(n){return n&&n[oi]||!1}var Mr=new Array,re,$s=0;function js(){return++$s}function Cn(n){Mr.push(re),re=n}function xn(){re=Mr.pop()}function si(n){if(re){if(!st(n))throw new Error("Only subscribable things can act as dependencies");re.callback.call(re.callbackTarget,n,n._id||(n._id=js()))}}function Ws(n,e,t){try{return Cn(),n.apply(e,t||[])}finally{xn()}}function Us(){if(re)return re.computed.getDependenciesCount()}function qs(){if(re)return re.computed.getDependencies()}function Ks(){if(re)return re.isInitial}function Vt(n){n._deferUpdates||(n._deferUpdates=!0,n.limit(function(e){let t,i=!1;return function(){if(!i){ge.cancel(t),t=ge.schedule(e);try{i=!0,n.notifySubscribers(void 0,"dirty")}finally{i=!1}}}}))}var Ht=class{constructor(e,t,i){d(this,"_disposeCallback");d(this,"_target");d(this,"_callback");d(this,"_isDisposed");d(this,"_domNodeDisposalCallback");d(this,"_node");this._target=e,this._callback=t.next,this._disposeCallback=i,this._isDisposed=!1,this._domNodeDisposalCallback=null}dispose(){this._domNodeDisposalCallback&&rt(this._node,this._domNodeDisposalCallback),this._isDisposed=!0,this._disposeCallback()}disposeWhenNodeIsRemoved(e){this._node=e,xe(e,this._domNodeDisposalCallback=this.dispose.bind(this))}unsubscribe(){this.dispose()}get closed(){return this._isDisposed}};var Qs={undefined:1,boolean:1,number:1,string:1};function ut(n,e){return n===null||typeof n in Qs?n===e:!1}function ui(n){let e=this;return n&&R(n,function(t,i){let r=ye[t];typeof r=="function"?e=r(e,i)||e:c.onError(new Error("Extender not found: "+t))}),e}function Js(n,e){n.equalityComparer=e=="always"?null:ut}function zs(n,e){if(e!==!0)throw new Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");Vt(n)}function Gs(n,e){let t,i,r;typeof e=="number"?t=e:(t=e.timeout,i=e.method),n._deferUpdates=!1,r=i==="notifyWhenChangesStop"?cn:dn,n.limit(function(o){return r(o,t)})}var ye={notify:Js,deferred:zs,rateLimit:Gs};var X=Symbol("Knockout latest value");Symbol.observable||(Symbol.observable=Symbol.for("@tko/Symbol.observable"));var U=function(){Object.setPrototypeOf(this,An),An.init(this)},ve="change",An={[oi]:!0,[Symbol.observable](){return this},init(n){n._subscriptions={change:[]},n._versionNumber=1},subscribe(n,e,t){let i=typeof n=="object"&&n.next;t=t||ve;let r=i?n:{next:e?n.bind(e):n},o=new Ht(this,r,()=>{Ye(this._subscriptions[t],o),this.afterSubscriptionRemove&&this.afterSubscriptionRemove(t)});return this.beforeSubscriptionAdd&&this.beforeSubscriptionAdd(t),this._subscriptions[t]||(this._subscriptions[t]=new Array),this._subscriptions[t].push(o),i&&X in this&&r.next(this[X]),o},notifySubscribers(n,e){if(e=e||ve,e===ve&&this.updateVersion(),this.hasSubscriptionsForEvent(e)){let t=e===ve&&this._changeSubscriptions||[...this._subscriptions[e]];try{Cn();for(let i=0,r;r=t[i];++i)r._isDisposed||r._callback(n)}finally{xn()}}},getVersion(){return this._versionNumber},hasChanged(n){return this.getVersion()!==n},updateVersion(){++this._versionNumber},hasSubscriptionsForEvent(n){return this._subscriptions[n]&&this._subscriptions[n].length},getSubscriptionsCount(n){if(n)return this._subscriptions[n]&&this._subscriptions[n].length||0;{let e=0;return R(this._subscriptions,function(t,i){t!=="dirty"&&(e+=i.length)}),e}},isDifferent(n,e){return!this.equalityComparer||!this.equalityComparer(n,e)},once(n){let e=this.subscribe(t=>{e.dispose(),n(t)})},when(n,e){let t=this.peek(),i=arguments.length>1,r=typeof n=="function"?n:o=>o===n;return r(t)?c.Promise.resolve(i?e:t):new c.Promise((o,s)=>{let u=this.subscribe(a=>{r(a)&&(u.dispose(),o(i?e:a))})})},yet(n,...e){let t=typeof n=="function"?n:r=>r===n,i=r=>!t(r);return this.when(i,...e)},next(){return new Promise(n=>this.once(n))},toString(){return"[object Object]"},extend:ui};Object.setPrototypeOf(An,Function.prototype);U.fn=An;function B(n){function e(){return arguments.length>0?(e.isDifferent(e[X],arguments[0])&&(e.valueWillMutate(),e[X]=arguments[0],e.valueHasMutated()),this):(si(e),e[X])}return Object.defineProperty(e,"length",{value:void 0}),e[X]=n,U.fn.init(e),Object.setPrototypeOf(e,B.fn),c.deferUpdates&&Vt(e),e}B.fn={equalityComparer:ut,peek(){return this[X]},valueHasMutated(){this.notifySubscribers(this[X],"spectate"),this.notifySubscribers(this[X])},valueWillMutate(){this.notifySubscribers(this[X],"beforeChange")},modify(n,e=!0){this(n(e?this.peek():this()))},isWriteable:!0};function Xs(n,e){!e||e===ve?this._limitChange(n):e==="beforeChange"?this._limitBeforeChange(n):this._origNotifySubscribers(n,e)}U.fn.limit=function(e){let t=this,i=S(t),r="beforeChange",o,s,u,a,l;t._origNotifySubscribers||(t._origNotifySubscribers=t.notifySubscribers,t.notifySubscribers=Xs);let p=e(function(){t._notificationIsPending=!1,i&&a===t&&(a=t._evalIfChanged?t._evalIfChanged():t());let f=s||l&&t.isDifferent(u,a);t._notifyNextChange=l=o=!1,f&&t._origNotifySubscribers(u=a)});Object.assign(t,{_limitChange(f,y){(!y||!t._notificationIsPending)&&(l=!y),t._changeSubscriptions=[...t._subscriptions[ve]],t._notificationIsPending=o=!0,a=f,p()},_limitBeforeChange(f){o||(u=f,t._origNotifySubscribers(f,r))},_notifyNextChangeIfValueIsDifferent(){t.isDifferent(u,t.peek(!0))&&(s=!0)},_recordUpdate(){l=!0}})};Object.setPrototypeOf(B.fn,U.fn);var Pr=B.protoProperty=c.protoProperty;B.fn[Pr]=B;B.observablePrototypes=new Set([B]);function S(n){let e=typeof n=="function"&&n[Pr];if(e&&!B.observablePrototypes.has(e))throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e}function m(n){return S(n)?n():n}function at(n){return S(n)?n.peek():n}function K(n){return S(n)&&n.isWriteable}var lt="arrayChange";function je(n,e){if(n.compareArrayOptions={},e&&typeof e=="object"&&H(n.compareArrayOptions,e),n.compareArrayOptions.sparse=!0,n.cacheDiffForKnownOperation)return;let t=!1,i=null,r,o=0,s,u=n.beforeSubscriptionAdd,a=n.afterSubscriptionRemove;n.beforeSubscriptionAdd=function(f){u&&u.call(n,f),f===lt&&l()},n.afterSubscriptionRemove=function(f){a&&a.call(n,f),f===lt&&!n.hasSubscriptionsForEvent(lt)&&(s&&(n.notifySubscribers=s,s=void 0),r&&r.dispose(),r=null,t=!1)};function l(){if(t)return;t=!0,s=n.notifySubscribers,n.notifySubscribers=function(y,g){return(!g||g===ve)&&++o,s.apply(this,arguments)};let f=new Array().concat(n.peek()===void 0?[]:n.peek());i=null,r=n.subscribe(function(y){let g;y=new Array().concat(y||[]),n.hasSubscriptionsForEvent(lt)&&(g=p(f,y)),f=y,i=null,o=0,g&&g.length&&n.notifySubscribers(g,lt)})}function p(f,y){return(!i||o>1)&&(i=je.compareArrays(f,y,n.compareArrayOptions)),i}n.cacheDiffForKnownOperation=function(f,y,g){if(!t||o)return;let x=new Array,N=f.length,h=g.length,O=0;function M(b,w,v){return x[x.length]={status:b,value:w,index:v}}switch(y){case"push":O=N;case"unshift":for(let b=0;b<h;b++)M("added",g[b],O+b);break;case"pop":O=N-1;case"shift":N&&M("deleted",f[O],O);break;case"splice":{let b=Math.min(Math.max(0,g[0]<0?N+g[0]:g[0]),N),w=h===1?N:Math.min(b+(g[1]||0),N),v=b+h-2,k=Math.max(w,v),P=new Array,j=new Array;for(let te=b,Xi=2;te<k;++te,++Xi)te<w&&j.push(M("deleted",f[te],te)),te<v&&P.push(M("added",g[Xi],te));jn(j,P)}break;default:return}i=x}}je.compareArrays=tt;ye.trackArrayChanges=je;function de(n){if(n=n||[],typeof n!="object"||!("length"in n))throw new Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");let e=Object.setPrototypeOf(B(n),de.fn);return je(e),Object.defineProperty(e,"length",{get:()=>{var t;return(t=e())==null?void 0:t.length}}),e}function $t(n){return S(n)&&typeof n.remove=="function"&&typeof n.push=="function"}de.fn={remove(n){let e=this.peek(),t=new Array,i=typeof n=="function"&&!S(n)?n:function(r){return r===n};for(let r=0;r<e.length;r++){let o=e[r];if(i(o)){if(t.length===0&&this.valueWillMutate(),e[r]!==o)throw Error("Array modified during remove; cannot remove item");t.push(o),e.splice(r,1),r--}}return t.length&&this.valueHasMutated(),t},removeAll(n){if(n===void 0){let e=this.peek(),t=e.slice(0);return this.valueWillMutate(),e.splice(0,e.length),this.valueHasMutated(),t}return n?this.remove(function(e){return W(n,e)>=0}):[]},destroy(n){let e=this.peek(),t=typeof n=="function"&&!S(n)?n:function(i){return i===n};this.valueWillMutate();for(let i=e.length-1;i>=0;i--){let r=e[i];t(r)&&(r._destroy=!0)}this.valueHasMutated()},destroyAll(n){return n===void 0?this.destroy(function(){return!0}):n?this.destroy(function(e){return W(n,e)>=0}):[]},indexOf(n){return W(this(),n)},replace(n,e){let t=this.indexOf(n);t>=0&&(this.valueWillMutate(),this.peek()[t]=e,this.valueHasMutated())},sorted(n){return[...this()].sort(n)},reversed(){return[...this()].reverse()},[Symbol.iterator]:function*(){yield*Me(this())}};Object.setPrototypeOf(de.fn,B.fn);L(["pop","push","reverse","shift","sort","splice","unshift"],function(n){de.fn[n]=function(){let e=this.peek();this.valueWillMutate(),this.cacheDiffForKnownOperation(e,n,arguments);let t=e[n].apply(e,arguments);return this.valueHasMutated(),t===e?this:t}});L(["slice"],function(n){de.fn[n]=function(){let e=this();return e[n].apply(e,arguments)}});de.trackArrayChanges=je;var Ys=10;function dt(n){if(arguments.length==0)throw new Error("When calling ko.toJS, pass the object you want to convert.");return Rr(n,function(e){for(let t=0;S(e)&&t<Ys;t++)e=e();return e})}function ai(n,e,t){let i=dt(n);return JSON.stringify(i,e,t)}function Rr(n,e,t=new Map){if(n=e(n),!(typeof n=="object"&&n!==null&&n!==void 0&&!(n instanceof RegExp)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof Number)&&!(n instanceof Boolean)))return n;let r=n instanceof Array?[]:{};return t.set(n,r),Zs(n,function(o){let s=e(n[o]);switch(typeof s){case"boolean":case"number":case"string":case"function":r[o]=s;break;case"object":case"undefined":{let u=t.get(s);r[o]=u!==void 0?u:Rr(s,e,t)}break}}),r}function Zs(n,e){if(n instanceof Array){for(let t=0;t<n.length;t++)e(t);typeof n.toJSON=="function"&&e("toJSON")}else for(let t in n)e(t)}function li(){}function eu(n,e){for(;typeof e=="function";)e=e();return e}function di(n,e){return n==e}di.precedence=8;function ci(n,e){return n!=e}ci.precedence=8;function pi(n,e){return n===e}pi.precedence=8;function fi(n,e){return n!==e}fi.precedence=8;var E={"@":eu,"#":(n,e)=>()=>m(e),"=>":li,"!":function(e,t){return!t},"!!":function(e,t){return!!t},"++":function(e,t){return++t},"--":function(e,t){return--t},"**":function(e,t){return Yi(e,t)},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return(e||0)-(t||0)},"&-":function(e,t){return-1*t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":di,"!=":ci,"===":pi,"!==":fi,"&":function(e,t){return e&t},"^":function(e,t){return e^t},"|":function(e,t){return e|t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"??":function(e,t){return e!=null?e:t},".":function(e,t){return e==null?void 0:e[t]},"?.":function(e,t){return e==null?void 0:e[t]},"[":function(e,t){return e==null?void 0:e[t]},",":function(e,t){return t},call:function(e,t){return e.apply(null,t)}};E["@"].precedence=21;E["#"].precedence=21;E["."].precedence=17;E["["].precedence=17;E["?."].precedence=17;E["!"].precedence=14;E["!!"].precedence=14;E["++"].precedence=14;E["--"].precedence=14;E["&-"].precedence=14;E["**"].precedence=13;E["%"].precedence=12;E["*"].precedence=12;E["/"].precedence=12;E["+"].precedence=11;E["-"].precedence=11;E["<"].precedence=9;E["<="].precedence=9;E[">"].precedence=9;E[">="].precedence=9;E["=="].precedence=8;E["!="].precedence=8;E["==="].precedence=8;E["!=="].precedence=8;E["&"].precedence=7;E["^"].precedence=6;E["|"].precedence=5;E["&&"].precedence=4;E["||"].precedence=3;E["??"].precedence=3;E["&&"].earlyOut=n=>!n;E["||"].earlyOut=n=>n;E["??"].earlyOut=n=>n!=null;E["=>"].precedence=2;E[","].precedence=1;E.call.precedence=1;kt("strictEquality",{default:!1,set(n){E["=="]=n?pi:di,E["!="]=n?fi:ci}});var Lr=Symbol("Node - Is Expression Or Identifier"),T=class n{constructor(e,t,i){d(this,"lhs");d(this,"op");d(this,"rhs");this.lhs=e,this.op=t,this.rhs=i}static get operators(){return E}get_leaf_value(e,t,i,r){return typeof e=="function"?m(e()):typeof e!="object"||e===null?e:e[n.isExpressionOrIdentifierSymbol]?m(e.get_value(void 0,t,i,r)):e}get_value(e,t,i,r){if(this.op===li)return(...a)=>{let l=t;return this.lhs&&(l=this.lhs.extendContext(t,a)),this.get_leaf_value(this.rhs,l,i,this)};let o=this.get_leaf_value(this.lhs,t,i,this),s=this.op.earlyOut;if(s&&s(o))return o;let u=this.get_leaf_value(this.rhs,t,i,this);return this.op(o,u,t,i)}static get isExpressionOrIdentifierSymbol(){return Lr}get[Lr](){return!0}static value_of(e,t,i,r){return e&&e[n.isExpressionOrIdentifierSymbol]?e.get_value(e,t,i,r):e}static create_root(e,t=!1){let i=new Array,r=new Array;for(let o=0;o<e.length;o+=2){i.push(e[o]);let s=e[o+1],u=(s==null?void 0:s.precedence)||0;for(;r.length&&u<=r[r.length-1].precedence;){let a=i.pop(),l=i.pop();i.push(new n(l,r.pop(),a))}r.push(s)}if(i.length!==1)throw new Error(`unexpected nodes remain in shunting yard output stack: ${i}`);return i[0]}};E["?"]=function(e,t,i,r,o){return T.value_of(e?t.yes:t.no,i,r,o)};E["?"].precedence=4;var we=class{constructor(e){d(this,"nodes");d(this,"root");this.nodes=e,this.root=T.create_root(e)}get_value(e,t,i,r){return this.root||(this.root=T.create_root(this.nodes)),this.root.get_value(e,t,i,r)}};we.prototype[T.isExpressionOrIdentifierSymbol]=!0;var be=class{constructor(e,t){d(this,"parser");d(this,"args");this.parser=e,this.args=t}get_value(e,t,i,r){let o=new Array;for(let s=0,u=this.args.length;s<u;++s)o.push(T.value_of(this.args[s],t,i,r));return o}get[T.isExpressionOrIdentifierSymbol](){return!0}};var Vr=/[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,Hr=/[\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/;var q=class n{constructor(e,t,i){d(this,"token");d(this,"dereferences");d(this,"parser");this.token=t,this.dereferences=i,this.parser=e}dereference(e,t,i,r){let o,s=this.dereferences||[],u=t.$data||{},a,l,p;for(l=0,p=s.length;l<p;++l)if(o=T.value_of(s[l],t,i,r),typeof e=="function"&&s[l]instanceof be)e=e.apply(a||u,o),a=e;else{if(e==null)return e;a=e,e=T.value_of(e[o],t,i,r)}return typeof e=="function"&&p>0&&a!==e&&!G(a,o)?e.bind(a):e}get_value(e,t,i,r){let o=e&&!(e instanceof n)?T.value_of(e,t,i,r)[this.token]:t.lookup(this.token,i,r);return this.dereference(o,t,i,r)}assign(e,t,i){K(e[t])?e[t](i):S(e[t])||(e[t]=i)}set_value(e,t,i){let r=t.$data||{},o=this.dereferences||[],s=this.token,u,a,l;if(_t(r)&&s in r)l=r;else if(s in t)l=t;else if(s in i)l=i;else throw new Error("Identifier::set_value -- The property '"+s+"' does not exist on the $data, $context, or globals.");if(a=o.length,a===0){this.assign(l,s,e);return}for(l=l[s],u=0;u<a-1;++u)s=o[u],s instanceof be?l=l():l=l[T.value_of(s)];if(o[u]===!0)throw new Error("Cannot assign a value to a function.");o[u]&&this.assign(l,T.value_of(o[u]),e)}static is_valid_start_char(e){return Vr.test(e)}static is_valid_continue_char(e){return Hr.test(e)}get[T.isExpressionOrIdentifierSymbol](){return!0}};var ct,mi=class mi{constructor(e,t){er(this,ct);t instanceof we&&(t=t.root);try{tr(this,ct,mi.nodeTreeToNames(t))}catch(i){e.error(i)}}extendContext(e,t){if($n(this,ct)){let i={};return $n(this,ct).forEach((r,o)=>{i[r]=t[o]}),e.extend(i)}else return e}get[T.isExpressionOrIdentifierSymbol](){return!0}static nodeTreeToNames(e){let t=new Array;for(;e;)if(e instanceof q)t.push(e.token),e=null;else if(this.isCommaNode(e))t.push(e.rhs.token),e=e.lhs;else throw new Error(`only simple identifiers allowed in lambda parameter list but found ${JSON.stringify(e,null,2)}`);return t.reverse(),t}static isCommaNode(e){return e instanceof T&&e.op===E[","]&&e.rhs instanceof q}};ct=new WeakMap;var jt=mi;var pt=class{constructor(e,t){d(this,"yes");d(this,"no");Object.assign(this,{yes:e,no:t})}get_value(){return this}get[T.isExpressionOrIdentifierSymbol](){return!0}};var $r={"'":"'",'"':'"',"`":"`","\\":"\\","/":"/",$:"$",b:"\b",f:"\f",n:`
|
|
3
|
+
`,r:"\r",t:" "},Se=class{constructor(){d(this,"ch");d(this,"at");d(this,"text");d(this,"currentContextGlobals")}white(){let e=this.ch;for(;e&&e<=" ";)e=this.next();return this.comment(e)}comment(e){if(e!=="/")return e;let t=this.at,i=this.lookahead();if(i==="/"){for(;e&&(e=this.next(),!(e===`
|
|
4
|
+
`||e==="\r")););e=this.next()}else if(i==="*"){for(;e;)if(e=this.next(),e==="*"&&this.lookahead()==="/"){this.next();break}return e||this.error("Unclosed comment, starting at character "+t),this.next(),this.white()}return e}next(e){return e&&e!==this.ch&&this.error("Expected '"+e+"' but got '"+this.ch+"'"),this.ch=this.text.charAt(this.at),this.at+=1,this.ch}lookahead(){return this.text[this.at]}error(e){throw e instanceof Error?e:this.createError(e)}createError(e){let[t,i]=e.name?[e.name,e.message]:[e,""],r=`
|
|
5
|
+
${t} ${i} of ${this.text}
|
|
6
6
|
`+Array(this.at).join(" ")+`_/ \u{1F525} \\_
|
|
7
|
-
`;return new Error(
|
|
8
|
-
`,"/(?:\\\\.|[^/])+/\\w*","[^\\s:,/][^"+
|
|
9
|
-
,`;let t=new Array,r=e.match(Gi),i,o=new Array,s=0;if(r.length<=1)return[];for(let a=0,u;u=r[a];++a){let l=u.charCodeAt(0);if(l===44){if(s<=0){t.push(i&&o.length?{key:i,value:o.join("")}:{unknown:i||o.join("")}),i=s=0,o=new Array;continue}}else if(l===58){if(!s&&!i&&o.length===1){i=o.pop();continue}}else{if(l===47&&u.length>1&&(u.charCodeAt(1)===47||u.charCodeAt(1)===42))continue;if(l===47&&a&&u.length>1){let f=r[a-1].match(ua);f&&!la[f[0]]&&(e=e.substr(e.indexOf(u)+1),r=e.match(Gi),a=-1,u="/")}else l===40||l===123||l===91?++s:l===41||l===125||l===93?--s:!i&&!o.length&&(l===34||l===39)&&(u=u.slice(1,-1))}o.push(u)}return t}var I=z("_state"),da={dependencyTracking:null,dependenciesCount:0,isDisposed:!0,isStale:!1,isDirty:!1,isSleeping:!1,disposeWhenNodeIsRemoved:null,readFunction:null,_options:null};function N(n,e,t){if(typeof n=="object"?t=n:(t=t||{},n&&(t.read=n)),typeof(t==null?void 0:t.read)!="function")throw Error("Pass a function that returns the value of the computed");let r=t.write,i={latestValue:void 0,isStale:!0,isDirty:!0,isBeingEvaluated:!1,suppressDisposalUntilDisposeWhenReturnsFalse:!1,isDisposed:!1,pure:!1,isSleeping:!1,readFunction:t.read,evaluatorFunctionTarget:e||t.owner,disposeWhenNodeIsRemoved:t.disposeWhenNodeIsRemoved||null,disposeWhen:t.disposeWhen,domNodeDisposalCallback:null,dependencyTracking:{},dependenciesCount:0,evaluationTimeoutInstance:null};function o(){if(arguments.length>0){if(typeof r=="function")r.apply(i.evaluatorFunctionTarget,arguments);else throw new Error("Cannot write a value to a computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}else return i.isDisposed||D.registerDependency(o),(i.isDirty||i.isSleeping&&o.haveDependenciesChanged())&&o.evaluateImmediate(),i.latestValue}return o[I]=i,o.isWriteable=typeof r=="function",U.fn.init(o),Object.setPrototypeOf(o,N.fn),t.pure?(i.pure=!0,i.isSleeping=!0,H(o,fa)):t.deferEvaluation&&H(o,ma),c.deferUpdates&&be.deferred(o,!0),c.debug&&(o._options=t),i.disposeWhenNodeIsRemoved&&(i.suppressDisposalUntilDisposeWhenReturnsFalse=!0,i.disposeWhenNodeIsRemoved.nodeType||(i.disposeWhenNodeIsRemoved=null)),!i.isSleeping&&!t.deferEvaluation&&o.evaluateImmediate(),i.disposeWhenNodeIsRemoved&&o.isActive()&&Ae(i.disposeWhenNodeIsRemoved,i.domNodeDisposalCallback=function(){o.dispose()}),o}function ca(n,e){e!==null&&e.dispose&&e.dispose()}function pa(n,e){let t=this.computedObservable,r=t[I];r.isDisposed||(this.disposalCount&&this.disposalCandidates[e]?(t.addDependencyTracking(e,n,this.disposalCandidates[e]),this.disposalCandidates[e]=null,--this.disposalCount):r.dependencyTracking[e]||t.addDependencyTracking(e,n,r.isSleeping?{_target:n}:t.subscribeToDependency(n)),n._notificationIsPending&&n._notifyNextChangeIfValueIsDifferent())}N.fn={equalityComparer:lt,getDependenciesCount(){return this[I].dependenciesCount},getDependencies(){let n=this[I].dependencyTracking,e=new Array;return R(n,function(t,r){e[r._order]=r._target}),e},addDependencyTracking(n,e,t){if(this[I].pure&&e===this)throw Error("A 'pure' computed must not be called recursively");this[I].dependencyTracking[n]=t,t._order=this[I].dependenciesCount++,t._version=e.getVersion()},haveDependenciesChanged(){let n,e,t=this[I].dependencyTracking;for(n in t)if(G(t,n)&&(e=t[n],this._evalDelayed&&e._target._notificationIsPending||e._target.hasChanged(e._version)))return!0;return!1},markDirty(){this._evalDelayed&&!this[I].isBeingEvaluated&&this._evalDelayed(!1)},isActive(){let n=this[I];return n.isDirty||n.dependenciesCount>0},respondToChange(){this._notificationIsPending?this[I].isDirty&&(this[I].isStale=!0):this.evaluatePossiblyAsync()},subscribeToDependency(n){if(n._deferUpdates){let e=n.subscribe(this.markDirty,this,"dirty"),t=n.subscribe(this.respondToChange,this);return{_target:n,dispose(){e.dispose(),t.dispose()}}}else return n.subscribe(this.evaluatePossiblyAsync,this)},evaluatePossiblyAsync(){let n=this,e=n.throttleEvaluation;e&&e>=0?(clearTimeout(this[I].evaluationTimeoutInstance),this[I].evaluationTimeoutInstance=le(function(){n.evaluateImmediate(!0)},e)):n._evalDelayed?n._evalDelayed(!0):n.evaluateImmediate(!0)},evaluateImmediate(n){let e=this[I],t=e.disposeWhen,r=!1;if(!e.isBeingEvaluated&&!e.isDisposed){if(e.disposeWhenNodeIsRemoved&&!It(e.disposeWhenNodeIsRemoved)||t&&t()){if(!e.suppressDisposalUntilDisposeWhenReturnsFalse){this.dispose();return}}else e.suppressDisposalUntilDisposeWhenReturnsFalse=!1;e.isBeingEvaluated=!0;try{r=this.evaluateImmediate_CallReadWithDependencyDetection(n)}finally{e.isBeingEvaluated=!1}return r}},evaluateImmediate_CallReadWithDependencyDetection(n){let e=this[I],t=!1,r=e.pure?void 0:!e.dependenciesCount,i={computedObservable:this,disposalCandidates:e.dependencyTracking,disposalCount:e.dependenciesCount};D.begin({callbackTarget:i,callback:pa,computed:this,isInitial:r}),e.dependencyTracking={},e.dependenciesCount=0;let o=this.evaluateImmediate_CallReadThenEndDependencyDetection(e,i);return e.dependenciesCount?t=this.isDifferent(e.latestValue,o):(this.dispose(),t=!0),t&&(e.isSleeping?this.updateVersion():this.notifySubscribers(e.latestValue,"beforeChange"),e.latestValue=o,c.debug&&(this._latestValue=o),this.notifySubscribers(e.latestValue,"spectate"),!e.isSleeping&&n&&this.notifySubscribers(e.latestValue),this._recordUpdate&&this._recordUpdate()),r&&this.notifySubscribers(e.latestValue,"awake"),t},evaluateImmediate_CallReadThenEndDependencyDetection(n,e){try{let t=n.readFunction;return n.evaluatorFunctionTarget?t.call(n.evaluatorFunctionTarget):t()}finally{D.end(),e.disposalCount&&!n.isSleeping&&R(e.disposalCandidates,ca),n.isStale=n.isDirty=!1}},peek(n){let e=this[I];return(e.isDirty&&(n||!e.dependenciesCount)||e.isSleeping&&this.haveDependenciesChanged())&&this.evaluateImmediate(),e.latestValue},get[Y](){return this.peek()},limit(n){let e=this[I];U.fn.limit.call(this,n),Object.assign(this,{_evalIfChanged(){return this[I].isSleeping||(this[I].isStale?this.evaluateImmediate():this[I].isDirty=!1),e.latestValue},_evalDelayed(t){this._limitBeforeChange(e.latestValue),e.isDirty=!0,t&&(e.isStale=!0),this._limitChange(this,!t)}})},dispose(){let n=this[I];!n.isSleeping&&n.dependencyTracking&&R(n.dependencyTracking,function(e,t){t.dispose&&t.dispose()}),n.disposeWhenNodeIsRemoved&&n.domNodeDisposalCallback&&st(n.disposeWhenNodeIsRemoved,n.domNodeDisposalCallback),Object.assign(n,da)}};var fa={beforeSubscriptionAdd(n){let e=this,t=e[I];if(!t.isDisposed&&t.isSleeping&&n==="change"){if(t.isSleeping=!1,t.isStale||e.haveDependenciesChanged())t.dependencyTracking=null,t.dependenciesCount=0,e.evaluateImmediate()&&e.updateVersion();else{let r=new Array;R(t.dependencyTracking,function(i,o){r[o._order]=i}),L(r,function(i,o){let s=t.dependencyTracking[i],a=e.subscribeToDependency(s._target);a._order=o,a._version=s._version,t.dependencyTracking[i]=a}),e.haveDependenciesChanged()&&e.evaluateImmediate()&&e.updateVersion()}t.isDisposed||e.notifySubscribers(t.latestValue,"awake")}},afterSubscriptionRemove(n){let e=this[I];!e.isDisposed&&n==="change"&&!this.hasSubscriptionsForEvent("change")&&(R(e.dependencyTracking,function(t,r){r.dispose&&(e.dependencyTracking[t]={_target:r._target,_order:r._order,_version:r._version},r.dispose())}),e.isSleeping=!0,this.notifySubscribers(void 0,"asleep"))},getVersion(){let n=this[I];return n.isSleeping&&(n.isStale||this.haveDependenciesChanged())&&this.evaluateImmediate(),U.fn.getVersion.call(this)}},ma={beforeSubscriptionAdd(n){(n==="change"||n==="beforeChange")&&this.peek()}};Object.setPrototypeOf(N.fn,U.fn);var zi=F.protoProperty;N.fn[zi]=N;F.observablePrototypes.add(N);function gt(n){return typeof n=="function"&&n[zi]===N}function yr(n){return gt(n)&&n[I]&&n[I].pure}function Te(n,e){if(typeof n=="function")return N(n,e,{pure:!0});{let t=n;return t=H({},t),t.pure=!0,N(t,e)}}function Xi(n,e){n.throttleEvaluation=e;let t;return N({read:n,write:function(r){clearTimeout(t),t=setTimeout(function(){n(r)},e)}})}var ha=be;ha.throttle=Xi;var Zi=Symbol("Knockout Proxied Object"),eo=Symbol("Knockout Proxied Observables");function ga(n,e){return N({owner:n,read:e,write:e,pure:"pure"in e?e.pure:!0,deferEvaluation:"deferEvaluation"in e?e.deferEvaluation:!0}).extend({deferred:!0})}function to(n,e,t,r){if(n[e])n[e](t);else{let i=Array.isArray(t)?ce:typeof t=="function"?ga.bind(null,r):F;n[e]=i(t)}}function Yi(n,e,t){for(let r of Object.keys(e))to(n,r,e[r],t);return e}function vn(n){let e={[Zi]:n};e[eo]=e;let t=new Proxy(function(){},{has(r,i){return i in e},get(r,i){return p(e[i])},set(r,i,o,s){return to(e,i,o,t),n[i]=o,!0},deleteProperty(r){return delete e[r],delete n[r]},apply(r,i,[o]){return o?(Yi(e,o,t),Object.assign(n,o)):n},getPrototypeOf(){return Object.getPrototypeOf(n)},setPrototypeOf(r,i){return Object.setPrototypeOf(n,i)},defineProperty(r,i,o){return Object.defineProperty(n,i,o)},preventExtensions(){return Object.preventExtensions(n)},isExtensible(){return Object.isExtensible(n)},ownKeys(){return[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)]}});return Yi(e,n,t),t}function no(n,e){return n[eo][e]}function ya(n,e){return no(n,e).peek()}function ba(n){return Zi in n}Object.assign(vn,{getObservable:no,peek:ya,isProxied:ba});function Ea(n,e,t){let r=Te(n,e).extend({notify:"always"}),i=r.subscribe(o=>{o&&(i.dispose(),t(o))});return r.notifySubscribers(r.peek()),i}function br(n,e,t){let r=Ea.bind(null,n,t);return e?r(e.bind(t)):new Promise(r)}var Wt=z("LifeCycle Subscriptions List"),yt=z("LifeCycle Anchor Node"),Z=class n{static mixInto(e){let t=e.prototype||e,r=n.prototype;for(let i of Object.getOwnPropertyNames(r))t[i]=r[i]}subscribe(e,t,r){typeof t=="string"&&(t=this[t]),this.addDisposable(e.subscribe(t,this,r))}computed(e){if(typeof e=="string"&&(e={read:this[e],write:this[e]}),typeof e=="object")e=Object.assign({owner:this},e);else if(typeof e=="function"){let t=Object.getPrototypeOf(this);t&&t[e.name]===e&&(e=e.bind(this)),e={read:e,write:e}}else throw new Error("LifeCycle::computed not given a valid type.");return e.disposeWhenNodeIsRemoved=this[yt],this.addDisposable(N(e))}addEventListener(...e){let t=e[0].nodeType?e.shift():this[yt],[r,i,o]=e,s=typeof i=="string"?this[i].bind(this):i;this.__addEventListener(t,r,s,o)}__addEventListener(e,t,r,i){e.addEventListener(t,r,i);function o(){e.removeEventListener(t,r)}Ae(e,o),this.addDisposable({dispose:o})}anchorTo(e){"addDisposable"in e?(e.addDisposable(this),this[yt]=null):(this[yt]=e,Ae(e,()=>this[yt]===e&&this.dispose()))}dispose(){(this[Wt]||[]).forEach(t=>t.dispose()),this[Wt]=new Array,this[yt]=null}addDisposable(e){let t=this[Wt]||[];if(this[Wt]||(this[Wt]=t),typeof e.dispose!="function")throw new Error("Lifecycle::addDisposable argument missing `dispose`.");return t.push(e),e}};var Dn=Symbol("_ancestorBindingInfo"),ro=A.nextKey(),$={childrenComplete:"childrenComplete",descendantsComplete:"descendantsComplete",subscribe(n,e,t,r){let i=A.getOrSet(n,ro,{});return i.eventSubscribable||(i.eventSubscribable=new U),i.eventSubscribable.subscribe(t,r,e)},notify(n,e){let t=A.get(n,ro);t&&t.eventSubscribable&&t.eventSubscribable.notifySubscribers(n,e)}};var Er=A.nextKey(),_e=Symbol("Knockout Context Subscription"),io=Symbol("Knockout Parent Indicator"),Be=function(e,t,r,i,o){let s=this,a=e===io,u=a?void 0:e,l=typeof u=="function"&&!S(u);s.ko=c.knockoutInstance;let f;function m(){let b=l?u():u,g=p(b);return t?(t[_e]&&t[_e](),H(s,t),Dn in t&&(s[Dn]=t[Dn])):(s.$parents=new Array,s.$root=g),s[_e]=f,a?g=s.$data:(s.$rawData=b,s.$data=g),r&&(s[r]=g),i&&i(s,t,g),s.$data}o&&o.exportDependencies?m():(f=Te(m),f.peek(),f.isActive()?(s[_e]=f,f.equalityComparer=null):s[_e]=void 0)};Object.assign(Be.prototype,{lookup(n,e,t){switch(n){case"$element":return t;case"$context":return this;case"this":case"$data":return this.$data}let r=this.$data;if(kt(r)&&n in r)return r[n];if(n in this)return this[n];if(n in e)return e[n];throw new Error(`The variable "${n}" was not found on $data, $context, or globals.`)},createChildContext(n,e,t,r){return new Be(n,this,e,function(i,o){var s;i.$parentContext=o,i.$parent=o==null?void 0:o.$data,i.$parents=((s=o==null?void 0:o.$parents)!=null?s:[]).slice(0),i.$parents.unshift(i.$parent),t&&t(i)},r)},extend(n){return new Be(io,this,void 0,function(e,t){H(e,typeof n=="function"?n.call(e):n)})},createStaticChildContext(n,e){return this.createChildContext(n,e,null,{exportDependencies:!0})}});function Ca(n){let e=A.get(n,Er);return e&&e.context}function Fe(n){if(n&&(n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.COMMENT_NODE))return Ca(n)}function Tn(n){let e=Fe(n);return e?e.$data:void 0}var bt=class{constructor({asyncBindingsApplied:e,rootNode:t,bindingContext:r}){d(this,"isSync");d(this,"isComplete");d(this,"completionPromise");d(this,"rootNode");d(this,"bindingContext");this.rootNode=t,this.bindingContext=r,this.isSync=e.size===0,this.isComplete=this.isSync,this.isSync||(this.completionPromise=this.completeWhenBindingsFinish(e))}completeWhenBindingsFinish(e){return Ze(this,null,function*(){return yield Promise.all(e),this.isComplete=!0,this})}};var ee=class extends Z{constructor(t){super();d(this,"after");d(this,"init");d(this,"update");d(this,"options");d(this,"preprocess");d(this,"$context");d(this,"$element");d(this,"$data");d(this,"bindingCompletion");d(this,"valueAccessor");d(this,"completeBinding");d(this,"allBindings");let{$element:r,valueAccessor:i,allBindings:o,$context:s}=t;this.$element=r,this.valueAccessor=i,this.allBindings=o,this.$context=s,this.$data=s.$data,this.anchorTo(r)}get value(){return this.valueAccessor()}set value(t){let r=this.valueAccessor();Q(r)?r(t):this.valueAccessor(t)}get controlsDescendants(){return!1}static get allowVirtualElements(){return!1}static get isBindingHandlerClass(){return!0}get bindingCompleted(){return!0}static registerAs(t,r=c.bindingProviderInstance){r.bindingHandlers.set(t,this)}static registerBindingHandler(t,r,i=c.bindingProviderInstance){i.bindingHandlers.set(r,t)}},oo=Symbol("Async Binding Resolved"),te=class extends ee{constructor(e){super(e),this.bindingCompletion=new Promise(t=>{this[oo]=t}),this.completeBinding=t=>this[oo](t)}get bindingCompleted(){return this.bindingCompletion}};var xa=c.global.WeakMap||Map,Cr=new xa,Bn=class n extends ee{constructor(t){super(t);d(this,"initReturn");d(this,"onError");let r=this.handler;this.onError=t.onError,typeof r.dispose=="function"&&this.addDisposable(r);try{this.initReturn=r.init&&r.init(...this.legacyArgs)}catch(i){t.onError("init",i)}}get handler(){}onValueChange(){let t=this.handler;if(typeof t.update=="function")try{t.update(...this.legacyArgs)}catch(r){this.onError("update",r)}}get legacyArgs(){return[this.$element,this.valueAccessor,this.allBindings,this.$data,this.$context]}get controlsDescendants(){return(this.initReturn||this.handler||{}).controlsDescendantBindings}static getOrCreateFor(t,r){if(Cr.has(r))return Cr.get(r);let i=this.createFor(t,r);return Cr.set(r,i),i}static createFor(t,r){if(typeof r=="function"){let[i,o]=[r,r.dispose];return class extends n{get handler(){let s=i.bind(this),a=o?o.bind(this):null;return{init:s,dispose:a}}static get after(){return r.after}static get allowVirtualElements(){return r.allowVirtualElements||C.allowedBindings[t]}}}if(typeof r=="object")return class extends n{get handler(){return r}static get after(){return r.after}static get allowVirtualElements(){return r.allowVirtualElements||C.allowedBindings[t]}};throw new Error("The given handler is not an appropriate type.")}};var Aa={script:!0,textarea:!0,template:!0};function qt(){return c.bindingProviderInstance.instance||c.bindingProviderInstance}function ao(n,e){return(n.FOR_NODE_TYPES||[Node.ELEMENT_NODE,Node.TEXT_NODE,Node.COMMENT_NODE]).includes(e.nodeType)}function uo(n,e){if(n)return n.isBindingHandlerClass?n:Bn.getOrCreateFor(e,n)}function va(n,e){if(!(!e||typeof e.getBindingHandler!="function"))return uo(e.getBindingHandler(n))}function Da(n){let e=c.getBindingHandler(n)||qt().bindingHandlers.get(n);return uo(e,n)}function Ut(n){return n()}function lo(n,e,t){let r=C.firstChild(e);if(!r)return;let i,o=qt(),s=o.preprocessNode;if(s){for(;i=r;)r=C.nextSibling(i),s.call(o,i);r=C.firstChild(e)}for(;i=r;)r=C.nextSibling(i),fo(n,i,t);$.notify(e,$.childrenComplete)}function co(n){let e=qt();return ao(e,n)&&e.nodeHasBindings(n)}function po(n){return co(n)||[...n.childNodes].some(e=>po(e))}function fo(n,e,t){let r=e.nodeType===Node.ELEMENT_NODE;r&&C.normaliseVirtualElementDomStructure(e);let i=r||co(e),{shouldBindDescendants:o}=i?mo(e,null,n,t):{shouldBindDescendants:!0};o&&!Aa[V(e)]&&lo(n,e,t)}function*Ta(n,e){let t=[],r={},i=new Array;R(n,function o(s){if(!r[s]){let a=va(s,e)||Da(s);if(!a)return;a.after&&(i.push(s),L(a.after,function(u){if(n[u]){if(W(i,u)!==-1)throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+i.join(", "));o(u)}}),i.length--),t.push([s,a])}r[s]=!0});for(let o of t)yield o}function mo(n,e,t,r){let i=A.getOrSet(n,Er,{}),o=i.alreadyBound;if(!e){if(o)return po(n)&&so({during:"apply",errorCaptured:new Error("You cannot apply bindings multiple times to the same element."),element:n,bindingContext:t}),!1;i.alreadyBound=!0}o||(i.context=t);let s=null,a=null;if(e&&typeof e!="function")s=e;else{let f=qt(),m=f.getBindingAccessors;ao(f,n)&&(a=N(function(){return s=e?e(t,n):m.call(f,n,t),s&&t[_e]&&t[_e](),s},null,{disposeWhenNodeIsRemoved:n}),(!s||!a.isActive())&&(a=null))}let u;if(s){let f=t.$component||{},m={};A.set(n,"bindingHandlers",m);let b=a?h=>function(O){let M=a()[h];return arguments.length===0?Ut(M):M(O)}:h=>s[h],g=function(){return me(a?a():s,Ut)};g.has=h=>h in s,g.get=h=>s[h]&&Ut(b(h)),$.childrenComplete in s&&$.subscribe(n,$.childrenComplete,()=>{let h=Ut(s[$.childrenComplete]);if(!h)return;let O=C.childNodes(n);O.length&&h(O,Tn(O[0]))},null);let x=Ta(s,f),T=new Set;for(let[h,O]of x){let M=function(y,w){so({during:y,errorCaptured:w,bindings:s,allBindings:g,bindingKey:h,bindingContext:t,element:n,valueAccessor:b(h)})};if(n.nodeType===Node.COMMENT_NODE&&!O.allowVirtualElements)throw new Error(`The binding '${h}' cannot be used with virtual elements`);try{let y=D.ignore(()=>new O({allBindings:g,$element:n,$context:t,onError:M,valueAccessor(...w){return b(h)(...w)}}));if(y.onValueChange&&D.ignore(()=>y.computed("onValueChange")),m[h]=y,y.controlsDescendants){if(u!==void 0)throw new Error("Multiple bindings ("+u+" and "+h+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");u=h}y.bindingCompleted instanceof Promise&&(r.add(y.bindingCompleted),T.add(y.bindingCompleted))}catch(y){let w=y instanceof Error?y:new Error(String(y));M("creation",w)}}Ba(n,s,T)}return{shouldBindDescendants:u===void 0}}function Ba(n,e,t){let r=$.descendantsComplete in e,i=C.firstChild(n),o=r&&Ut(e[$.descendantsComplete]),s=()=>{$.notify(n,$.descendantsComplete),o&&i&&o(n)};t.size?Promise.all(t).then(s):s()}function Fn(n,e){return n&&n instanceof Be?n:new Be(n,void 0,void 0,e)}function Qt(n,e,t,r){return n.nodeType===Node.ELEMENT_NODE&&C.normaliseVirtualElementDomStructure(n),mo(n,e,Fn(t),r)}function ho(n,e,t){let r=new Set,i=Fn(t),o=qt().makeBindingAccessors(e,i,n);return Qt(n,o,i,r),new bt({asyncBindingsApplied:r,rootNode:n,bindingContext:i})}function se(n,e){let t=new Set,r=Fn(n);return e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.COMMENT_NODE?(lo(r,e,t),new bt({asyncBindingsApplied:t,rootNode:e,bindingContext:r})):new bt({asyncBindingsApplied:t,rootNode:e,bindingContext:r})}function Et(n,e,t){let r=new Set;if(e){if(e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.COMMENT_NODE)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node")}else if(e=window.document.body,!e)throw Error("ko.applyBindings: could not find window.document.body; has the document been loaded?");let i=Fn(n,t);return fo(i,e,r),Promise.all(r)}function so(n){let e;n.bindingKey?(e=n.errorCaptured,n.message='Unable to process binding "'+n.bindingKey+'" in binding "'+n.bindingKey+`"
|
|
10
|
-
Message: `+(e.message?e.message:e)):e=n.errorCaptured;try{H(e,n)}catch(t){n.stack=e.stack;let r=e.message||String(e),i=e.name;e=new Error(r),i&&i!=="Error"&&(e.name=i),H(e,n)}c.onError(e)}function Fa(n,e,t,r,i){let o=[],s=N(function(){let a=e(t,i,$e(o,n))||[];o.length>0&&(fn(o,a),r&&D.ignore(r,null,[t,a,i])),o.length=0,nt(o,a)},null,{disposeWhenNodeIsRemoved:n,disposeWhen:function(){return!bi(o)}});return{mappedNodes:o,dependentObservable:s.isActive()?s:void 0}}var go=A.nextKey(),yo=A.nextKey();function Ct(n,e,t,r,i,o){e=e||[],typeof e.length=="undefined"&&(e=[e]),r=r||{};let s=A.get(n,go),a=!s,u=new Array,l=0,f=0,m=[],b=[],g=[],x=[],T=[],h,O=0;function M(v){h={arrayEntry:v,indexObservable:F(f++)},u.push(h),b.push(h),a||T.push(h)}function y(v){h=s[v],f!==v&&x.push(h),h.indexObservable(f++),$e(h.mappedNodes,n),u.push(h),b.push(h)}function w(v,k){if(v)for(let P=0,j=k.length;P<j;P++)L(k[P].mappedNodes,function(ne){v(ne,P,k[P].arrayEntry)})}if(a)L(e,M);else{if(!o||s&&s._countWaitingForRemove){let v=et(s,function(P){return P.arrayEntry}),k={dontLimitMoves:r.dontLimitMoves,sparse:!0};o=rt(v,e,k)}for(let v=0,k,P,j;k=o[v];v++)switch(P=k.moved,j=k.index,k.status){case"deleted":for(;l<j;)y(l++);P===void 0&&(h=s[l],h.dependentObservable&&(h.dependentObservable.dispose(),h.dependentObservable=void 0),$e(h.mappedNodes,n).length&&(r.beforeRemove&&(u.push(h),b.push(h),O++,h.arrayEntry===yo?h=null:g.push(h)),h!=null&&h.mappedNodes&&m.push.apply(m,h.mappedNodes))),l++;break;case"added":for(;f<j;)y(l++);P!==void 0?y(P):M(k.value);break}for(;f<e.length;)y(l++);u._countWaitingForRemove=O}A.set(n,go,u),w(r.beforeMove,x),L(m,r.beforeRemove?X:he);for(let v=0,k=C.firstChild(n),P,j;h=b[v];v++){h.mappedNodes||H(h,Fa(n,t,h.arrayEntry,i,h.indexObservable));for(let ne=0;j=h.mappedNodes[ne];k=j.nextSibling,P=j,ne++)j!==k&&C.insertAfter(n,j,P);!h.initialized&&i&&(i(h.arrayEntry,h.mappedNodes,h.indexObservable),h.initialized=!0)}w(r.beforeRemove,g);for(let v=0;v<g.length;++v)g[v].arrayEntry=yo;w(r.afterMove,x),w(r.afterAdd,T)}var qe=class extends te{get controlsDescendants(){return!0}applyBindingsToDescendants(e,t){return Ze(this,null,function*(){let r=se(e,this.$element);r.isSync?this.bindingCompletion=r:yield r.completionPromise,t&&t(r),this.completeBinding(r)})}};var bo=1,Eo=2,Co=3,xr=4,Na=5,xo=A.nextKey()+"_",Ao=A.nextKey();function vo(n){return A.get(n,Ao)||{}}function Ar(n,e){A.set(n,Ao,e)}var Qe=class{constructor(e){d(this,"domElement");d(this,"templateType");if(this.domElement=e,e.nodeType===Node.COMMENT_NODE)this.templateType=xr;else{let t=V(this.domElement);this.templateType=t==="script"?bo:t==="textarea"?Eo:t=="template"&&e.content&&e.content.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Co:xr}}text(e){let t=this.templateType===bo?"text":this.templateType===Eo?"value":"innerHTML";if(arguments.length==0)return this.domElement[t];t==="innerHTML"?at(this.domElement,e):this.domElement[t]=e}data(e,t){if(arguments.length===1)return A.get(this.domElement,xo+e);A.set(this.domElement,xo+e,t)}nodes(e){let t=this.domElement;if(arguments.length==0){let r=vo(t),i=r.containerData||(this.templateType===Co?t.content:this.templateType===xr?t:void 0);if(!i||r.alwaysCheckText){let o=this.text();o&&(i=Ii(o,t.ownerDocument),this.text(""),Ar(t,{containerData:i,alwaysCheckText:!0}))}return i}else Ar(t,{containerData:e})}},Ce=class extends Qe{constructor(e){super(e),this.templateType=Na}text(e){if(arguments.length==0){let t=vo(this.domElement);return t.textData===void 0&&t.containerData&&(t.textData=t.containerData.innerHTML),t.textData}else Ar(this.domElement,{textData:e})}};function Ke(){}H(Ke.prototype,{renderTemplateSource(n,e,t,r){t.onError("Override renderTemplateSource")},createJavaScriptEvaluatorBlock(n){c.onError(new Error("Override createJavaScriptEvaluatorBlock"))},makeTemplateSource(n,e){if(typeof n=="string"){e=e||document;let t=e.getElementById(n);if(!t)throw c.onError(new Error("Cannot find template with ID "+n),!1);return new Qe(t)}else{if(n.nodeType===Node.ELEMENT_NODE)return new Ce(n);if(n.nodeType===Node.COMMENT_NODE)return new Ce(n);throw c.onError(new Error("Unknown template type: "+n),!1)}},renderTemplate(n,e,t,r){let i=this.makeTemplateSource(n,r);return this.renderTemplateSource(i,e,t,r)}});var Tr,Do=A.nextKey();function Nn(n){if(n!==void 0&&!(n instanceof Ke))throw new Error("templateEngine must inherit from ko.templateEngine");Tr=n}function vr(n,e,t){let r,i=n,o=C.nextSibling(e);for(;i&&(r=i)!==o;)i=C.nextSibling(r),t(r,i)}function Bo(n,e,t){if(n.length){let r=n[0],i=n[n.length-1],o=r.parentNode,s=c.bindingProviderInstance,a=s.preprocessNode;if(a){if(vr(r,i,function(u,l){let f=u.previousSibling,m=a.call(s,u);m&&(u===r&&(r=m[0]||l),u===i&&(i=m[m.length-1]||f))}),n.length=0,!r)return;r===i?n.push(r):(n.push(r,i),$e(n,o))}vr(r,i,function(u){(u.nodeType===Node.ELEMENT_NODE||u.nodeType===Node.COMMENT_NODE)&&Et(e,u).then(t)}),vr(r,i,function(u){(u.nodeType===Node.ELEMENT_NODE||u.nodeType===Node.COMMENT_NODE)&&We.unmemoizeDomNodeAndDescendants(u,[e])}),$e(n,o)}}function Dr(n){return n.nodeType?n:n.length>0?n[0]:null}function Fo(n,e,t,r,i,o){i=i||{};let a=(n&&Dr(n)||t||{}).ownerDocument,l=(i.templateEngine||Tr).renderTemplate(t,r,i,a);if(typeof l.length!="number"||l.length>0&&typeof l[0].nodeType!="number")throw new Error("Template engine must return an array of DOM nodes");let f=!1;switch(e){case"replaceChildren":C.setDomNodeChildren(n,l),f=!0;break;case"replaceNode":fn(n,l),f=!0;break;case"ignoreTargetNode":break;default:throw new Error("Unknown renderMode: "+e)}return f&&(Bo(l,r,o),i.afterRender&&D.ignore(i.afterRender,null,[l,r.$data]),e==="replaceChildren"&&$.notify(n,$.childrenComplete)),l}function No(n,e,t){return S(n)?n():typeof n=="function"?n(e,t):n}function wn(n,e,t,r,i,o){if(t=t||{},(t.templateEngine||Tr)===void 0)throw new Error("Set a template engine before calling renderTemplate");if(i=i||"replaceChildren",r){let s=Dr(r),a=function(){return!s||!It(s)},u=s&&i==="replaceNode"?s.parentNode:s;return N(function(){let l=e&&e instanceof Be?e:new Be(e,void 0,void 0,void 0,{exportDependencies:!0}),f=No(n,l.$data,l),m=Fo(r,i,f,l,t,o);i==="replaceNode"&&(r=m,s=Dr(r))},null,{disposeWhen:a,disposeWhenNodeIsRemoved:u})}else return We.memoize(function(s){wn(n,e,t,s,"replaceNode")})}function wo(n,e,t,r,i,o){let s;function a(m,b){t.as?c.createChildContextWithAs?s=i.createChildContext(m,t.as,x=>{x.$index=b}):s=i.extend({[t.as]:m,$index:b}):s=i.createChildContext(m,t.as,x=>{x.$index=b});let g=No(n,m,s);return Fo(r,"ignoreTargetNode",g,s,t,o)}let u=function(m,b){Bo(b,s,o),t.afterRender&&t.afterRender(b,m),s=null};function l(m,b){D.ignore(Ct,null,[r,m,a,t,u,b]),$.notify(r,$.childrenComplete)}let f=t.includeDestroyed===!1||c.foreachHidesDestroyed&&!t.includeDestroyed;if(!f&&!t.beforeRemove&&$t(e)){l(e.peek());let m=e.subscribe(function(b){l(e(),b)},null,"arrayChange");return m.disposeWhenNodeIsRemoved(r),m}else return N(function(){let m=p(e)||[];Symbol.iterator in m||(m=[m]),f&&(m=Re(m,function(g){return g==null||!p(g._destroy)})),l(m)},null,{disposeWhenNodeIsRemoved:r})}var To=A.nextKey(),xt=class extends te{constructor(e){super(e);let t=this.$element,r=p(this.value);A.set(t,"conditional",{elseChainSatisfied:F(!0)}),typeof r=="string"||r.name?this.bindNamedTemplate():"nodes"in r?this.bindNodeTemplate(r.nodes||[]):this.bindAnonymousTemplate()}bindNamedTemplate(){C.emptyNode(this.$element)}bindNodeTemplate(e){if(S(e))throw new Error('The "nodes" option must be a plain, non-observable array.');let t=e[0]&&e[0].parentNode;(!t||!A.get(t,Do))&&(t=Pt(e),A.set(t,Do,!0)),new Ce(this.$element).nodes(t)}bindAnonymousTemplate(){let e=C.childNodes(this.$element);if(e.length===0)throw new Error("Anonymous template defined, but no template content was provided.");let t=Pt(e);new Ce(this.$element).nodes(t)}onValueChange(){let e=this.$element,t=this.$context,r=this.value,i=p(r),o=!0,s=null,a=A.get(e,"conditional").elseChainSatisfied,u;if(typeof i=="string"?(u=r,i={}):(u=i.name,"if"in i&&(o=p(i.if)),o&&"ifnot"in i&&(o=!p(i.ifnot))),"foreach"in i){let l=o&&i.foreach||[];s=wo(u||e,l,i,e,t,this.completeBinding),a((p(l)||[]).length!==0)}else if(o){let l="data"in i?t.createStaticChildContext(i.data,i.as):t;s=wn(u||e,l,i,e,void 0,this.completeBinding),a(!0)}else C.emptyNode(e),a(!1);this.disposeOldComputedAndStoreNewOne(e,s)}disposeOldComputedAndStoreNewOne(e,t){let r=A.get(e,To);r&&typeof r.dispose=="function"&&r.dispose(),A.set(e,To,t&&(!t.isActive||t.isActive())?t:void 0)}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};function ae(){}ae.prototype=new Ke;ae.prototype.constructor=ae;ae.prototype.renderTemplateSource=function(n,e,t,r){let i=n.nodes?n.nodes():null;if(i)return ue(i.cloneNode(!0).childNodes);{let o=n.text();return de(o,r)}};ae.instance=new ae;Nn(ae.instance);var Sn=class extends xt{get value(){let e=this.valueAccessor(),t=dt(e);return!t||typeof t.length=="number"?{foreach:e,templateEngine:ae.instance}:(p(e),{foreach:t.data,as:t.as,includeDestroyed:t.includeDestroyed,afterAdd:t.afterAdd,beforeRemove:t.beforeRemove,afterRender:t.afterRender,beforeMove:t.beforeMove,afterMove:t.afterMove,templateEngine:ae.instance})}};var So={foreach:Sn,template:xt};var Oo={addDisposeCallback:Ae,removeDisposeCallback:st,removeNode:he,addCleaner:Di,removeCleaner:Ti,get cleanExternalData(){return c.cleanExternalData},set cleanExternalData(n){c.set("cleanExternalData",n)}},wa={addOrRemoveItem:Ne,arrayFilter:Re,arrayFirst:an,arrayForEach:L,arrayGetDistinctValues:ci,arrayIndexOf:W,arrayMap:et,arrayPushAll:nt,arrayRemoveItem:tt,cloneNodes:ve,compareArrays:rt,createSymbolOrString:z,domData:A,domNodeDisposal:Oo,extend:H,filters:c.filters,objectForEach:R,objectMap:me,parseHtmlFragment:de,parseJson:gi,parseObjectLiteral:ht,peekObservable:dt,range:pi,registerEventHandler:K,setDomNodeChildrenFromArrayMapping:Ct,setHtml:at,setTextContent:je,toggleDomNodeCssClass:it,triggerEvent:Ve,unwrapObservable:p},Br={cleanNode:X,dependencyDetection:D,computedContext:D,filters:c.filters,ignoreDependencies:D.ignore,memoization:We,options:c,removeNode:he,selectExtensions:_,tasks:ye,utils:wa,LifeCycle:Z,isObservable:S,isSubscribable:ut,isWriteableObservable:Q,isWritableObservable:Q,observable:F,observableArray:ce,isObservableArray:$t,peek:dt,subscribable:U,unwrap:p,toJS:pt,toJSON:dr,proxy:vn,computed:N,dependentObservable:N,isComputed:gt,isPureComputed:yr,pureComputed:Te,when:br,nativeTemplateEngine:ae,renderTemplate:wn,setTemplateEngine:Nn,templateEngine:Ke,templateSources:{domElement:Qe,anonymousTemplate:Ce},applyBindingAccessorsToNode:Qt,applyBindings:Et,applyBindingsToDescendants:se,applyBindingsToNode:ho,contextFor:Fe,dataFor:Tn,BindingHandler:ee,AsyncBindingHandler:te,virtualElements:C,domNodeDisposal:Oo,bindingEvent:$},Kt=class{constructor({provider:e,bindings:t,extenders:r,filters:i,options:o}){d(this,"providedProperties");if(Object.assign(Br.options,o,{filters:i,bindingProviderInstance:e}),e.setGlobals(Br.options.bindingGlobals),Array.isArray(t))for(let s of t)e.bindingHandlers.set(s);else e.bindingHandlers.set(t);this.providedProperties={extenders:Object.assign(be,r),bindingHandlers:e.bindingHandlers,bindingProvider:e}}create(...e){let t=Object.assign({get getBindingHandler(){return c.getBindingHandler},set getBindingHandler(r){c.set("getBindingHandler",r)}},Br,this.providedProperties,...e);return t.options.knockoutInstance=t,t}};var At=class{set(e,t){typeof e=="string"?this[e]=t:typeof e=="object"?(t!==void 0&&c.onError(new Error("Given extraneous `value` parameter (first param should be a string, but it was an object)."+e)),Object.assign(this,e)):c.onError(new Error("Given a bad binding handler type: "+e))}get(e){let[t]=e.split(".");return this[t]}};var J=class n{constructor(e){d(this,"bindingHandlers");d(this,"globals");d(this,"_overloadInstance");if(this.constructor===n)throw new Error("Provider is an abstract base class.");if(!("FOR_NODE_TYPES"in this))throw new Error("Providers must have FOR_NODE_TYPES property");this.bindingHandlers=(e==null?void 0:e.bindingHandlers)||new At,this.globals=(e==null?void 0:e.globals)||{}}get FOR_NODE_TYPES(){throw new Error("Providers must override FOR_NODE_TYPES property")}setGlobals(e){this.globals=e}get preemptive(){return!1}nodeHasBindings(e,t){return!1}getBindingAccessors(e,t){return Object.create(null)}preprocessNode(e){return[e]}postProcess(){}get instance(){return this._overloadInstance||this}set instance(e){!e||e===this?this._overloadInstance=void 0:this._overloadInstance=new Fr(e,this)}makeAccessorsFromFunction(e){return me(D.ignore(e),(t,r)=>()=>e()[r])}makeValueAccessor(e){return()=>e}makeBindingAccessors(e,t,r){return typeof e=="function"?this.makeAccessorsFromFunction(e.bind(null,t,r)):me(e,this.makeValueAccessor)}},Fr=class extends J{constructor(t,r){super();d(this,"providerObject");Object.assign(this,{providerObject:t}),this.bindingHandlers=t.bindingHandlers||r.bindingHandlers}get FOR_NODE_TYPES(){return[Node.ELEMENT_NODE,Node.TEXT_NODE,Node.COMMENT_NODE]}getBindingsAndMakeAccessors(t,r){let i=this.providerObject.getBindings.bind(this.providerObject,t,r);return this.makeAccessorsFromFunction(i)}getBindingAccessors(t,r){return this.providerObject.getBindingAccessors?this.providerObject.getBindingAccessors(t,r):this.getBindingsAndMakeAccessors(t,r)}nodeHasBindings(t){return this.providerObject.nodeHasBindings(t)}preprocessNode(t){return this.providerObject.preprocessNode?this.providerObject.preprocessNode(t):null}};var Ie=class extends J{*processBinding(e,t){let[r,i]=e.split("."),o=this.bindingHandlers.get(r);if(o&&o.preprocess){let s=new Array,a=(...u)=>s.push(u);t=o.preprocess(t,e,a);for(let[u,l]of s)yield*Le(this.processBinding(u,l))}else i&&(t=`{${i}:${t}}`);yield`'${r}':${t}`}*generateBindingString(e){let t=typeof e=="string"?ht(e):e;for(let{key:r,unknown:i,value:o}of t)yield*Le(this.processBinding(r||i,o))}preProcessBindings(e){return Array.from(this.generateBindingString(e)).join(",")}getBindingAccessors(e,t){let r=e&&this.getBindingString(e);if(!r)return;let i=this.preProcessBindings(r);return new ke().parse(i,t,this.globals,e)}getBindingString(e){throw new Error("Overload getBindingString.")}};var vt=class extends Ie{get FOR_NODE_TYPES(){return[Node.ELEMENT_NODE,Node.COMMENT_NODE]}preprocessNode(e){if(e instanceof Element&&e.tagName==="KO"){let t=e.parentNode,r=[...e.childNodes],i=[...this.genElementBindingStrings(e)].join(","),o=document.createComment("ko "+i),s=document.createComment("/ko");t==null||t.insertBefore(o,e);for(let a of r)t==null||t.insertBefore(a,e);return t==null||t.insertBefore(s,e),e.remove(),[o,...r,s]}return null}*genElementBindingStrings(e){for(let{name:t,value:r}of e.attributes)yield`${t.replace(/^ko-/,"")}: ${r}`}getBindingString(e){return e.nodeType===Node.COMMENT_NODE?C.virtualNodeBindingValue(e):null}nodeHasBindings(e,t){return e.nodeType===Node.COMMENT_NODE?C.isStartComment(e):!1}};var Dt=class extends Ie{get FOR_NODE_TYPES(){return[Node.ELEMENT_NODE]}get BIND_ATTRIBUTE(){return"data-bind"}getBindingString(e){return e.nodeType===Node.ELEMENT_NODE?e.getAttribute(this.BIND_ATTRIBUTE):null}nodeHasBindings(e,t){return e.nodeType===Node.ELEMENT_NODE?e.hasAttribute(this.BIND_ATTRIBUTE):!1}};var Nr={},wr={};function Sa(n,e){let t=Qn(Nr,n),r;t?t.subscribe(e):(t=Nr[n]=new U,t.subscribe(e),Oa(n,function(i,o){let s=!!(o&&o.synchronous);wr[n]={definition:i,isSynchronousComponent:s},delete Nr[n],r||s?t.notifySubscribers(i):ye.schedule(function(){t.notifySubscribers(i)})}),r=!0)}function Oa(n,e){Jt("getConfig",[n],function(t){t?Jt("loadComponent",[n,t],function(r){e(r,t)}):e(null,null)})}function Jt(n,e,t,r){r||(r=pe.loaders.slice(0));let i=r.shift();if(i){let o=i[n];if(o){let s=!1;if(o.apply(i,e.concat(function(u){s?t(null):u!==null?t(u):Jt(n,e,t,r)}))!==void 0&&(s=!0,!i.suppressLoaderExceptions))throw new Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else Jt(n,e,t,r)}else t(null)}var pe={get(n,e){let t=Qn(wr,n);t?t.isSynchronousComponent?D.ignore(function(){e(t.definition)}):ye.schedule(function(){e(t.definition)}):Sa(n,e)},clearCachedDefinition(n){delete wr[n]},_getFirstResultFromLoaders:Jt,loaders:new Array};var Je={},On=Symbol("Knockout View Model ViewModel factory");function kn(n,e){if(!e)throw new Error("Invalid configuration for "+n);if(_r(n))throw new Error("Component "+n+" is already registered");let t=n.includes("-")&&n.toLowerCase()===n;!e.ignoreCustomElementWarning&&!t&&console.log(`
|
|
7
|
+
`;return new Error(r)}name(){let e="",t;this.white();let i=this.ch;for((i==="'"||i==='"')&&(t=i,i=this.next());i;){if(t&&i===t)return this.white(),i=this.next(),i!==":"&&i!==","&&this.error("Object name: "+e+" missing closing "+t),e;if(i===":"||i<=" "||i===","||i==="|")return e;e+=i,i=this.next()}return e}number(){let e,t="",i=this.ch;for(i==="-"&&(t="-",i=this.next("-"));i>="0"&&i<="9";)t+=i,i=this.next();if(i===".")for(t+=".",i=this.next();i&&i>="0"&&i<="9";)t+=i,i=this.next();if(i==="e"||i==="E")for(t+=i,i=this.next(),(i==="-"||i==="+")&&(t+=i,i=this.next());i>="0"&&i<="9";)t+=i,i=this.next();if(e=+t,!isFinite(e))c.onError(new Error("Bad number: "+e+" in "+t));else return e}objectAddValue(e,t,i){i&&i[T.isExpressionOrIdentifierSymbol]?Object.defineProperty(e,t,{get:()=>T.value_of(i,...this.currentContextGlobals),enumerable:!0}):Array.isArray(i)?Object.defineProperty(e,t,{get:()=>i.map(r=>T.value_of(r,...this.currentContextGlobals)),enumerable:!0}):e[t]=i}object(){let e,t={},i=this.ch;if(i==="{"){if(this.next("{"),i=this.white(),i==="}")return i=this.next("}"),t;for(;i;){if(i==='"'||i==="'"||i==="`"?e=this.string():e=this.name(),G(t,e)&&this.error('Duplicate key "'+e+'"'),this.white()===":")i=this.next(":"),this.objectAddValue(t,e,this.singleValueExpression());else{let r=new q(this,e,[]);this.objectAddValue(t,e,r)}if(i=this.white(),i==="}")return i=this.next("}"),t;if(this.next(","),i=this.white(),i==="}")return i=this.next("}"),t}}throw this.createError("Bad object")}readString(e){let t="",i=[""],r=E["+"],o,s,u,a=e==="`",l=this.next();for(;l;){if(l===e)return l=this.next(),a&&i.push(r),i.push(t),i;if(l==="\\")if(l=this.next(),l==="u"){for(u=0,s=0;s<4&&(o=parseInt(l=this.next(),16),!!isFinite(o));s+=1)u=u*16+o;t+=String.fromCharCode(u)}else if(typeof $r[l]=="string")t+=$r[l];else break;else a&&l==="$"?(l=this.next(),l==="{"?(this.next("{"),i.push(r),i.push(t),i.push(r),i.push(this.expression()),t=""):t+="$"+l):t+=l;l=this.next()}throw this.createError("Bad string")}string(){var t,i;let e=this.ch;if(e==='"')return(t=this.readString('"'))==null?void 0:t.join("");if(e==="'")return(i=this.readString("'"))==null?void 0:i.join("");if(e==="`")return T.create_root(this.readString("`"));this.error("Bad string")}array(){let e=new Array,t=this.ch;if(t==="["){if(t=this.next("["),this.white(),t==="]")return t=this.next("]"),e;for(;t;){if(e.push(this.singleValueExpression()),t=this.white(),t==="]")return t=this.next("]"),e;this.next(","),t=this.white()}}throw this.createError("Bad array")}value(){this.white();let e=this.ch;switch(e){case"{":return this.object();case"[":return this.array();case'"':case"'":case"`":return this.string();case"-":return this.number();default:return e>="0"&&e<="9"?this.number():this.identifier()}}operator(e){let t="",i,r=this.white(),o=q.is_valid_start_char;for(;r&&!(o(r)||r<=" "||r===""||r==='"'||r==="'"||r==="{"||r==="("||r==="`"||r===")"||r<="9"&&r>="0"||!e.not_an_array&&r==="["||(t+=r,r=this.next(),r==="@"));)o=q.is_valid_continue_char;return t!==""&&(e.prefix&&t==="-"&&(t="&-"),i=E[t],i||this.error("Bad operator: '"+t+"'.")),i}filter(){let e=this.next(),t=new Array,i=function(s){return s},r=this.name();for(c.filters[r]||c.onError(new Error("Cannot find filter by the name of: "+r)),e=this.white();e;){if(e===":"&&(e=this.next(),t.push(this.singleValueExpression("|"))),e==="|"){i=this.filter();break}if(e===",")break;e=this.white()}function o(s,u,a,l,p){let f=[s];for(let y=0,g=t.length;y<g;++y)f.push(T.value_of(t[y],a,l,p));return i(c.filters[r].apply(a,f),u,a,l,p)}return o.precedence=1,o}expression(e=!1,t=!0){let i,r=new Array,o=this.white();for(;o&&(i=this.operator({prefix:!0}),i&&(r.push(void 0),r.push(i),o=this.white()),o==="("?(this.next(),r.push(this.expression()),this.next(")")):r.push(this.value()),o=this.white(),!(o===":"||o==="}"||o==="]"||o===")"||o===""||o==="`"||o==="|"&&e==="|"||o===","&&!t));){if(o==="|"&&this.lookahead()!=="|"&&e){r.push(this.filter()),r.push(void 0);break}if(i=this.operator({not_an_array:!0}),i===E["?"]){this.ternary(r);break}else i===E["."]||i===E["?."]?(r.push(i),r.push(this.member()),i=null):i===E["["]?(r.push(i),r.push(this.expression()),o=this.next("]"),i=null):i===E["=>"]?(r[r.length-1]=new jt(this,r[r.length-1]),r.push(i)):i&&r.push(i);if(o=this.white(),o==="]"||!i&&o==="(")break}if(r.length===0)return;let s=this.dereferences();if(r.length===1&&!s.length)return r[0];for(let u=0,a=s.length;u<a;++u){let l=s[u];l.constructor===be?r.push(E.call):r.push(E["."]),r.push(l)}return new we(r)}singleValueExpression(e=!1){return this.expression(e,!1)}ternary(e){let t=new pt;t.yes=this.singleValueExpression(),this.next(":"),t.no=this.singleValueExpression(),e.push(E["?"]),e.push(t)}funcArguments(){let e=new Array,t=this.next("(");for(;t;){if(t=this.white(),t===")")return this.next(")"),new be(this,e);e.push(this.singleValueExpression()),t=this.white(),t!==")"&&this.next(",")}throw this.createError("Bad arguments to function")}member(){let e="",t=this.white(),i=q.is_valid_start_char;for(;t&&i(t);)e+=t,t=this.next(),i=q.is_valid_continue_char;return e}dereference(){let e,t=this.white();for(;t;){if(t==="(")return this.funcArguments();if(t==="[")return this.next("["),e=this.expression(),this.white(),this.next("]"),e;if(t===".")return this.next("."),this.member();break}}dereferences(){let e=this.white(),t=new Array,i;for(;e&&(i=this.dereference(),i!==void 0);)t.push(i);return t}identifier(){let e="",t=q.is_valid_start_char,i=this.white();for(;i&&t(i);)e+=i,i=this.next(),t=q.is_valid_continue_char;switch(e){case"true":return!0;case"false":return!1;case"null":return null;case"undefined":return;case"function":throw new Error("Knockout: Anonymous functions are no longer supported, but `=>` lambdas are. In: "+this.text)}return new q(this,e,this.dereferences())}readBindings(){let e,t={},i,r,o=this.ch;for(;o;)e=this.name(),i=this.white(),!i||i===","?(i?o=this.next(","):o="",t[e]=null):(e.indexOf(".")!==-1?(e=e.split("."),t[e[0]]=t[e[0]]||{},e.length!==2?c.onError(new Error("Binding "+e+" should have two parts (a.b).")):t[e[0]].constructor!==Object&&c.onError(new Error("Binding "+e[0]+"."+e[1]+" paired with a non-object.")),o=this.next(":"),this.objectAddValue(t[e[0]],e[1],this.singleValueExpression(!0))):(o=this.next(":"),t[e]&&typeof t[e]=="object"&&t[e].constructor===Object?(r=this.singleValueExpression(!0),typeof r!="object"||r.constructor!==Object?c.onError(new Error("Expected plain object for "+e+" value.")):H(t[e],r)):t[e]=this.singleValueExpression(!0)),this.white(),this.ch?o=this.next(","):o="");return t}valueAsAccessor(e,t,i,r){if(!e)return()=>e;if(typeof e=="function")return e;if(e[T.isExpressionOrIdentifierSymbol])return()=>T.value_of(e,t,i,r);if(Array.isArray(e))return()=>e.map(o=>T.value_of(o,t,i,r));if(typeof e!="function")return()=>Kn(e);throw new Error("Value has cannot be converted to accessor: "+e)}convertToAccessors(e,t,i,r){return R(e,(o,s)=>{s instanceof q?Object.defineProperty(e,o,{value:function(u,a){let l=s.get_value(void 0,t,i,r);if(arguments.length===0)return l;let p=u===l;if(!(a&&a.onlyIfChanged&&p))return s.set_value(u,t,i)}}):e[o]=this.valueAsAccessor(s,t,i,r)}),e}preparse(e=""){return(c.bindingStringPreparsers||[]).reduce((i,r)=>r(i),e.trim())}runParse(e,t){this.text=this.preparse(e),this.at=0,this.ch=" ";try{let i=t();return this.white(),this.ch&&this.error("Syntax Error"),i}catch(i){c.onError(i)}}parse(e,t={},i={},r){if(!e)return()=>null;this.currentContextGlobals=[t,i,r];let o=()=>this.readBindings(),s=this.runParse(e,o);return this.convertToAccessors(s,t,i,r)}parseExpression(e,t={},i={},r){if(!e)return()=>"";this.currentContextGlobals=[t,i,r];let o=()=>this.singleValueExpression(!0),s=this.runParse(e,o);return this.valueAsAccessor(s,t,i,r)}};var jr=",\"'`{}()/:[\\]",Wr=RegExp(['"(?:\\\\.|[^"])*"',"'(?:\\\\.|[^'])*'","`(?:\\\\.|[^`])*`","/\\*(?:[^*]|\\*+[^*/])*\\*+/",`//.*
|
|
8
|
+
`,"/(?:\\\\.|[^/])+/\\w*","[^\\s:,/][^"+jr+"]*[^\\s"+jr+"]","[^\\s]"].join("|"),"g"),tu=/[\])"'A-Za-z0-9_$]+$/,nu={in:1,return:1,typeof:1};function ft(n){var u,a;let e=String(n!=null?n:"").trim();e.charCodeAt(0)===123&&(e=e.slice(1,-1)),e+=`
|
|
9
|
+
,`;let t=new Array,i=(u=e.match(Wr))!=null?u:[],r,o=new Array,s=0;if(i.length<=1)return[];for(let l=0,p;p=i[l];++l){let f=p.charCodeAt(0);if(f===44){if(s<=0){t.push(r&&o.length?{key:r,value:o.join("")}:{unknown:r||o.join("")}),r=s=0,o=new Array;continue}}else if(f===58){if(!s&&!r&&o.length===1){r=o.pop();continue}}else{if(f===47&&p.length>1&&(p.charCodeAt(1)===47||p.charCodeAt(1)===42))continue;if(f===47&&l&&p.length>1){let y=i[l-1].match(tu);y&&!nu[y[0]]&&(e=e.substring(e.indexOf(p)+1),i=(a=e.match(Wr))!=null?a:[],l=-1,p="/")}else f===40||f===123||f===91?++s:f===41||f===125||f===93?--s:!r&&!o.length&&(f===34||f===39)&&(p=p.slice(1,-1))}o.push(p)}return t}var I=Symbol("_state"),iu={dependencyTracking:null,dependenciesCount:0,isDisposed:!0,isStale:!1,isDirty:!1,isSleeping:!1,disposeWhenNodeIsRemoved:null,readFunction:null,_options:null};function F(n,e,t){if(typeof n=="object"?t=n:(t=t||{},n&&(t.read=n)),typeof(t==null?void 0:t.read)!="function")throw Error("Pass a function that returns the value of the computed");let i=t.write,r={latestValue:void 0,isStale:!0,isDirty:!0,isBeingEvaluated:!1,suppressDisposalUntilDisposeWhenReturnsFalse:!1,isDisposed:!1,pure:!1,isSleeping:!1,readFunction:t.read,evaluatorFunctionTarget:e||t.owner,disposeWhenNodeIsRemoved:t.disposeWhenNodeIsRemoved||null,disposeWhen:t.disposeWhen,domNodeDisposalCallback:null,dependencyTracking:{},dependenciesCount:0,evaluationTimeoutInstance:null};function o(){if(arguments.length>0){if(typeof i=="function")i.apply(r.evaluatorFunctionTarget,arguments);else throw new Error("Cannot write a value to a computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}else return r.isDisposed||D.registerDependency(o),(r.isDirty||r.isSleeping&&o.haveDependenciesChanged())&&o.evaluateImmediate(),r.latestValue}return o[I]=r,o.isWriteable=typeof i=="function",U.fn.init(o),Object.setPrototypeOf(o,F.fn),t.pure?(r.pure=!0,r.isSleeping=!0,H(o,su)):t.deferEvaluation&&H(o,uu),c.deferUpdates&&ye.deferred(o,!0),c.debug&&(o._options=t),r.disposeWhenNodeIsRemoved&&(r.suppressDisposalUntilDisposeWhenReturnsFalse=!0,r.disposeWhenNodeIsRemoved.nodeType||(r.disposeWhenNodeIsRemoved=null)),!r.isSleeping&&!t.deferEvaluation&&o.evaluateImmediate(),r.disposeWhenNodeIsRemoved&&o.isActive()&&xe(r.disposeWhenNodeIsRemoved,r.domNodeDisposalCallback=function(){o.dispose()}),o}function ru(n,e){e!==null&&e.dispose&&e.dispose()}function ou(n,e){let t=this.computedObservable,i=t[I];i.isDisposed||(this.disposalCount&&this.disposalCandidates[e]?(t.addDependencyTracking(e,n,this.disposalCandidates[e]),this.disposalCandidates[e]=null,--this.disposalCount):i.dependencyTracking[e]||t.addDependencyTracking(e,n,i.isSleeping?{_target:n}:t.subscribeToDependency(n)),n._notificationIsPending&&n._notifyNextChangeIfValueIsDifferent())}F.fn={equalityComparer:ut,getDependenciesCount(){return this[I].dependenciesCount},getDependencies(){let n=this[I].dependencyTracking,e=new Array;return R(n,function(t,i){e[i._order]=i._target}),e},addDependencyTracking(n,e,t){if(this[I].pure&&e===this)throw Error("A 'pure' computed must not be called recursively");this[I].dependencyTracking[n]=t,t._order=this[I].dependenciesCount++,t._version=e.getVersion()},haveDependenciesChanged(){let n,e,t=this[I].dependencyTracking;for(n in t)if(G(t,n)&&(e=t[n],this._evalDelayed&&e._target._notificationIsPending||e._target.hasChanged(e._version)))return!0;return!1},markDirty(){this._evalDelayed&&!this[I].isBeingEvaluated&&this._evalDelayed(!1)},isActive(){let n=this[I];return n.isDirty||n.dependenciesCount>0},respondToChange(){this._notificationIsPending?this[I].isDirty&&(this[I].isStale=!0):this.evaluatePossiblyAsync()},subscribeToDependency(n){if(n._deferUpdates){let e=n.subscribe(this.markDirty,this,"dirty"),t=n.subscribe(this.respondToChange,this);return{_target:n,dispose(){e.dispose(),t.dispose()}}}else return n.subscribe(this.evaluatePossiblyAsync,this)},evaluatePossiblyAsync(){let n=this,e=n.throttleEvaluation;e&&e>=0?(clearTimeout(this[I].evaluationTimeoutInstance),this[I].evaluationTimeoutInstance=ae(function(){n.evaluateImmediate(!0)},e)):n._evalDelayed?n._evalDelayed(!0):n.evaluateImmediate(!0)},evaluateImmediate(n){let e=this[I],t=e.disposeWhen,i=!1;if(!e.isBeingEvaluated&&!e.isDisposed){if(e.disposeWhenNodeIsRemoved&&!It(e.disposeWhenNodeIsRemoved)||t&&t()){if(!e.suppressDisposalUntilDisposeWhenReturnsFalse){this.dispose();return}}else e.suppressDisposalUntilDisposeWhenReturnsFalse=!1;e.isBeingEvaluated=!0;try{i=this.evaluateImmediate_CallReadWithDependencyDetection(n)}finally{e.isBeingEvaluated=!1}return i}},evaluateImmediate_CallReadWithDependencyDetection(n){let e=this[I],t=!1,i=e.pure?void 0:!e.dependenciesCount,r={computedObservable:this,disposalCandidates:e.dependencyTracking,disposalCount:e.dependenciesCount};D.begin({callbackTarget:r,callback:ou,computed:this,isInitial:i}),e.dependencyTracking={},e.dependenciesCount=0;let o=this.evaluateImmediate_CallReadThenEndDependencyDetection(e,r);return e.dependenciesCount?t=this.isDifferent(e.latestValue,o):(this.dispose(),t=!0),t&&(e.isSleeping?this.updateVersion():this.notifySubscribers(e.latestValue,"beforeChange"),e.latestValue=o,c.debug&&(this._latestValue=o),this.notifySubscribers(e.latestValue,"spectate"),!e.isSleeping&&n&&this.notifySubscribers(e.latestValue),this._recordUpdate&&this._recordUpdate()),i&&this.notifySubscribers(e.latestValue,"awake"),t},evaluateImmediate_CallReadThenEndDependencyDetection(n,e){try{let t=n.readFunction;return n.evaluatorFunctionTarget?t.call(n.evaluatorFunctionTarget):t()}finally{D.end(),e.disposalCount&&!n.isSleeping&&R(e.disposalCandidates,ru),n.isStale=n.isDirty=!1}},peek(n){let e=this[I];return(e.isDirty&&(n||!e.dependenciesCount)||e.isSleeping&&this.haveDependenciesChanged())&&this.evaluateImmediate(),e.latestValue},get[X](){return this.peek()},limit(n){let e=this[I];U.fn.limit.call(this,n),Object.assign(this,{_evalIfChanged(){return this[I].isSleeping||(this[I].isStale?this.evaluateImmediate():this[I].isDirty=!1),e.latestValue},_evalDelayed(t){this._limitBeforeChange(e.latestValue),e.isDirty=!0,t&&(e.isStale=!0),this._limitChange(this,!t)}})},dispose(){let n=this[I];!n.isSleeping&&n.dependencyTracking&&R(n.dependencyTracking,function(e,t){t.dispose&&t.dispose()}),n.disposeWhenNodeIsRemoved&&n.domNodeDisposalCallback&&rt(n.disposeWhenNodeIsRemoved,n.domNodeDisposalCallback),Object.assign(n,iu)}};var su={beforeSubscriptionAdd(n){let e=this,t=e[I];if(!t.isDisposed&&t.isSleeping&&n==="change"){if(t.isSleeping=!1,t.isStale||e.haveDependenciesChanged())t.dependencyTracking=null,t.dependenciesCount=0,e.evaluateImmediate()&&e.updateVersion();else{let i=new Array;R(t.dependencyTracking,function(r,o){i[o._order]=r}),L(i,function(r,o){let s=t.dependencyTracking[r],u=e.subscribeToDependency(s._target);u._order=o,u._version=s._version,t.dependencyTracking[r]=u}),e.haveDependenciesChanged()&&e.evaluateImmediate()&&e.updateVersion()}t.isDisposed||e.notifySubscribers(t.latestValue,"awake")}},afterSubscriptionRemove(n){let e=this[I];!e.isDisposed&&n==="change"&&!this.hasSubscriptionsForEvent("change")&&(R(e.dependencyTracking,function(t,i){i.dispose&&(e.dependencyTracking[t]={_target:i._target,_order:i._order,_version:i._version},i.dispose())}),e.isSleeping=!0,this.notifySubscribers(void 0,"asleep"))},getVersion(){let n=this[I];return n.isSleeping&&(n.isStale||this.haveDependenciesChanged())&&this.evaluateImmediate(),U.fn.getVersion.call(this)}},uu={beforeSubscriptionAdd(n){(n==="change"||n==="beforeChange")&&this.peek()}};Object.setPrototypeOf(F.fn,U.fn);var Ur=B.protoProperty;F.fn[Ur]=F;B.observablePrototypes.add(F);function mt(n){return typeof n=="function"&&n[Ur]===F}function hi(n){return mt(n)&&n[I]&&n[I].pure}function De(n,e){if(typeof n=="function")return F(n,e,{pure:!0});{let t=n;return t=H({},t),t.pure=!0,F(t,e)}}function qr(n,e){n.throttleEvaluation=e;let t;return F({read:n,write:function(i){clearTimeout(t),t=setTimeout(function(){n(i)},e)}})}var au=ye;au.throttle=qr;var Qr=Symbol("Knockout Proxied Object"),Jr=Symbol("Knockout Proxied Observables");function lu(n,e){return F({owner:n,read:e,write:e,pure:"pure"in e?e.pure:!0,deferEvaluation:"deferEvaluation"in e?e.deferEvaluation:!0}).extend({deferred:!0})}function zr(n,e,t,i){if(n[e])n[e](t);else{let r=Array.isArray(t)?de:typeof t=="function"?lu.bind(null,i):B;n[e]=r(t)}}function Kr(n,e,t){for(let i of Object.keys(e))zr(n,i,e[i],t);return e}function vn(n){let e={[Qr]:n};e[Jr]=e;let t=new Proxy(function(){},{has(i,r){return r in e},get(i,r){return m(e[r])},set(i,r,o,s){return zr(e,r,o,t),n[r]=o,!0},deleteProperty(i,r){return delete e[r],delete n[r]},apply(i,r,[o]){return o?(Kr(e,o,t),Object.assign(n,o)):n},getPrototypeOf(){return Object.getPrototypeOf(n)},setPrototypeOf(i,r){return Object.setPrototypeOf(n,r)},defineProperty(i,r,o){return Object.defineProperty(n,r,o)},preventExtensions(){return Object.preventExtensions(n)},isExtensible(){return Object.isExtensible(n)},ownKeys(){return[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)]}});return Kr(e,n,t),t}function Gr(n,e){return n[Jr][e]}function du(n,e){return Gr(n,e).peek()}function cu(n){return Qr in n}Object.assign(vn,{getObservable:Gr,peek:du,isProxied:cu});function pu(n,e,t){let i=De(n,e).extend({notify:"always"}),r=i.subscribe(o=>{o&&(r.dispose(),t(o))});return i.notifySubscribers(i.peek()),r}function gi(n,e,t){let i=pu.bind(null,n,t);return e?i(e.bind(t)):new Promise(i)}var Wt=Symbol("LifeCycle Subscriptions List"),ht=Symbol("LifeCycle Anchor Node"),Y=class n{static mixInto(e){let t=e.prototype||e,i=n.prototype;for(let r of Object.getOwnPropertyNames(i))t[r]=i[r]}subscribe(e,t,i){typeof t=="string"&&(t=this[t]),this.addDisposable(e.subscribe(t,this,i))}computed(e){if(typeof e=="string"&&(e={read:this[e],write:this[e]}),typeof e=="object")e=Object.assign({owner:this},e);else if(typeof e=="function"){let t=Object.getPrototypeOf(this);t&&t[e.name]===e&&(e=e.bind(this)),e={read:e,write:e}}else throw new Error("LifeCycle::computed not given a valid type.");return e.disposeWhenNodeIsRemoved=this[ht],this.addDisposable(F(e))}addEventListener(...e){let t=e[0].nodeType?e.shift():this[ht],[i,r,o]=e,s=typeof r=="string"?this[r].bind(this):r;this.__addEventListener(t,i,s,o)}__addEventListener(e,t,i,r){e.addEventListener(t,i,r);function o(){e.removeEventListener(t,i,r)}xe(e,o),this.addDisposable({dispose:o})}anchorTo(e){"addDisposable"in e?(e.addDisposable(this),this[ht]=null):(this[ht]=e,xe(e,()=>this[ht]===e&&this.dispose()))}dispose(){(this[Wt]||[]).forEach(t=>t.dispose()),this[Wt]=new Array,this[ht]=null}addDisposable(e){let t=this[Wt]||[];if(this[Wt]||(this[Wt]=t),typeof e.dispose!="function")throw new Error("Lifecycle::addDisposable argument missing `dispose`.");return t.push(e),e}};var Dn=Symbol("_ancestorBindingInfo"),Xr=A.nextKey(),$={childrenComplete:"childrenComplete",descendantsComplete:"descendantsComplete",subscribe(n,e,t,i){let r=A.getOrSet(n,Xr,{});return r.eventSubscribable||(r.eventSubscribable=new U),r.eventSubscribable.subscribe(t,i,e)},notify(n,e){let t=A.get(n,Xr);t&&t.eventSubscribable&&t.eventSubscribable.notifySubscribers(n,e)}};var yi=A.nextKey(),Oe=Symbol("Knockout Context Subscription"),Yr=Symbol("Knockout Parent Indicator"),Te=function(e,t,i,r,o){let s=this,u=e===Yr,a=u?void 0:e,l=typeof a=="function"&&!S(a);s.ko=c.knockoutInstance;let p;function f(){let y=l?a():a,g=m(y);return t?(t[Oe]&&t[Oe](),H(s,t),Dn in t&&(s[Dn]=t[Dn])):(s.$parents=new Array,s.$root=g),s[Oe]=p,u?g=s.$data:(s.$rawData=y,s.$data=g),i&&(s[i]=g),r&&r(s,t,g),s.$data}o&&o.exportDependencies?f():(p=De(f),p.peek(),p.isActive()?(s[Oe]=p,p.equalityComparer=null):s[Oe]=void 0)};Object.assign(Te.prototype,{lookup(n,e,t){switch(n){case"$element":return t;case"$context":return this;case"this":case"$data":return this.$data}let i=this.$data;if(_t(i)&&n in i)return i[n];if(n in this)return this[n];if(n in e)return e[n];throw new Error(`The variable "${n}" was not found on $data, $context, or globals.`)},createChildContext(n,e,t,i){return new Te(n,this,e,function(r,o){var s;r.$parentContext=o,r.$parent=o==null?void 0:o.$data,r.$parents=((s=o==null?void 0:o.$parents)!=null?s:[]).slice(0),r.$parents.unshift(r.$parent),t&&t(r)},i)},extend(n){return new Te(Yr,this,void 0,function(e,t){H(e,typeof n=="function"?n.call(e):n)})},createStaticChildContext(n,e){return this.createChildContext(n,e,null,{exportDependencies:!0})}});function fu(n){let e=A.get(n,yi);return e&&e.context}function Be(n){if(n&&(n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.COMMENT_NODE))return fu(n)}function Tn(n){let e=Be(n);return e?e.$data:void 0}var gt=class{constructor({asyncBindingsApplied:e,rootNode:t,bindingContext:i}){d(this,"isSync");d(this,"isComplete");d(this,"completionPromise");d(this,"rootNode");d(this,"bindingContext");this.rootNode=t,this.bindingContext=i,this.isSync=e.size===0,this.isComplete=this.isSync,this.isSync||(this.completionPromise=this.completeWhenBindingsFinish(e))}completeWhenBindingsFinish(e){return Ge(this,null,function*(){return yield Promise.all(e),this.isComplete=!0,this})}};var Z=class extends Y{constructor(t){super();d(this,"after");d(this,"init");d(this,"update");d(this,"options");d(this,"preprocess");d(this,"$context");d(this,"$element");d(this,"$data");d(this,"bindingCompletion");d(this,"valueAccessor");d(this,"completeBinding");d(this,"allBindings");let{$element:i,valueAccessor:r,allBindings:o,$context:s}=t;this.$element=i,this.valueAccessor=r,this.allBindings=o,this.$context=s,this.$data=s.$data,this.anchorTo(i)}get value(){return this.valueAccessor()}set value(t){let i=this.valueAccessor();K(i)?i(t):this.valueAccessor(t)}get controlsDescendants(){return!1}static get allowVirtualElements(){return!1}static get isBindingHandlerClass(){return!0}get bindingCompleted(){return!0}static registerAs(t,i=c.bindingProviderInstance){i.bindingHandlers.set(t,this)}static registerBindingHandler(t,i,r=c.bindingProviderInstance){r.bindingHandlers.set(i,t)}},Zr=Symbol("Async Binding Resolved"),ee=class extends Z{constructor(e){super(e),this.bindingCompletion=new Promise(t=>{this[Zr]=t}),this.completeBinding=t=>this[Zr](t)}get bindingCompleted(){return this.bindingCompletion}};var mu=c.global.WeakMap||Map,bi=new mu,Bn=class n extends Z{constructor(t){super(t);d(this,"initReturn");d(this,"onError");let i=this.handler;this.onError=t.onError,typeof i.dispose=="function"&&this.addDisposable(i);try{this.initReturn=i.init&&i.init(...this.legacyArgs)}catch(r){t.onError("init",r)}}get handler(){}onValueChange(){let t=this.handler;if(typeof t.update=="function")try{t.update(...this.legacyArgs)}catch(i){this.onError("update",i)}}get legacyArgs(){return[this.$element,this.valueAccessor,this.allBindings,this.$data,this.$context]}get controlsDescendants(){return(this.initReturn||this.handler||{}).controlsDescendantBindings}static getOrCreateFor(t,i){if(bi.has(i))return bi.get(i);let r=this.createFor(t,i);return bi.set(i,r),r}static createFor(t,i){if(typeof i=="function"){let[r,o]=[i,i.dispose];return class extends n{get handler(){let s=r.bind(this),u=o?o.bind(this):null;return{init:s,dispose:u}}static get after(){return i.after}static get allowVirtualElements(){return i.allowVirtualElements||C.allowedBindings[t]}}}if(typeof i=="object")return class extends n{get handler(){return i}static get after(){return i.after}static get allowVirtualElements(){return i.allowVirtualElements||C.allowedBindings[t]}};throw new Error("The given handler is not an appropriate type.")}};var hu={script:!0,textarea:!0,template:!0};function qt(){return c.bindingProviderInstance.instance||c.bindingProviderInstance}function to(n,e){return(n.FOR_NODE_TYPES||[Node.ELEMENT_NODE,Node.TEXT_NODE,Node.COMMENT_NODE]).includes(e.nodeType)}function no(n,e){if(n)return n.isBindingHandlerClass?n:Bn.getOrCreateFor(e,n)}function gu(n,e){if(!(!e||typeof e.getBindingHandler!="function"))return no(e.getBindingHandler(n))}function yu(n){let e=c.getBindingHandler(n)||qt().bindingHandlers.get(n);return no(e,n)}function Ut(n){return n()}function io(n,e,t){let i=C.firstChild(e);if(!i)return;let r,o=qt(),s=o.preprocessNode;if(s){for(;r=i;)i=C.nextSibling(r),s.call(o,r);i=C.firstChild(e)}for(;r=i;)i=C.nextSibling(r),so(n,r,t);$.notify(e,$.childrenComplete)}function ro(n){let e=qt();return to(e,n)&&e.nodeHasBindings(n)}function oo(n){return ro(n)||[...n.childNodes].some(e=>oo(e))}function so(n,e,t){let i=e.nodeType===Node.ELEMENT_NODE;i&&C.normaliseVirtualElementDomStructure(e);let r=i||ro(e),{shouldBindDescendants:o}=r?uo(e,null,n,t):{shouldBindDescendants:!0};o&&!hu[V(e)]&&io(n,e,t)}function*bu(n,e){let t=[],i={},r=new Array;R(n,function o(s){if(!i[s]){let u=gu(s,e)||yu(s);if(!u)return;u.after&&(r.push(s),L(u.after,function(a){if(n[a]){if(W(r,a)!==-1)throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+r.join(", "));o(a)}}),r.length--),t.push([s,u])}i[s]=!0});for(let o of t)yield o}function uo(n,e,t,i){let r=A.getOrSet(n,yi,{}),o=r.alreadyBound;if(!e){if(o)return oo(n)&&eo({during:"apply",errorCaptured:new Error("You cannot apply bindings multiple times to the same element."),element:n,bindingContext:t}),!1;r.alreadyBound=!0}o||(r.context=t);let s=null,u=null;if(e&&typeof e!="function")s=e;else{let p=qt(),f=p.getBindingAccessors;to(p,n)&&(u=F(function(){return s=e?e(t,n):f.call(p,n,t),s&&t[Oe]&&t[Oe](),s},null,{disposeWhenNodeIsRemoved:n}),(!s||!u.isActive())&&(u=null))}let a;if(s){let p=t.$component||{},f={};A.set(n,"bindingHandlers",f);let y=u?h=>function(O){let M=u()[h];return arguments.length===0?Ut(M):M(O)}:h=>s[h],g=function(){return fe(u?u():s,Ut)};g.has=h=>h in s,g.get=h=>s[h]&&Ut(y(h)),$.childrenComplete in s&&$.subscribe(n,$.childrenComplete,()=>{let h=Ut(s[$.childrenComplete]);if(!h)return;let O=C.childNodes(n);O.length&&h(O,Tn(O[0]))},null);let x=bu(s,p),N=new Set;for(let[h,O]of x){let M=function(b,w){eo({during:b,errorCaptured:w,bindings:s,allBindings:g,bindingKey:h,bindingContext:t,element:n,valueAccessor:y(h)})};if(n.nodeType===Node.COMMENT_NODE&&!O.allowVirtualElements)throw new Error(`The binding '${h}' cannot be used with virtual elements`);try{let b=D.ignore(()=>new O({allBindings:g,$element:n,$context:t,onError:M,valueAccessor(...w){return y(h)(...w)}}));if(b.onValueChange&&D.ignore(()=>b.computed("onValueChange")),f[h]=b,b.controlsDescendants){if(a!==void 0)throw new Error("Multiple bindings ("+a+" and "+h+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");a=h}b.bindingCompleted instanceof Promise&&(i.add(b.bindingCompleted),N.add(b.bindingCompleted))}catch(b){let w=b instanceof Error?b:new Error(String(b));M("creation",w)}}Eu(n,s,N)}return{shouldBindDescendants:a===void 0}}function Eu(n,e,t){let i=$.descendantsComplete in e,r=C.firstChild(n),o=i&&Ut(e[$.descendantsComplete]),s=()=>{$.notify(n,$.descendantsComplete),o&&r&&o(n)};t.size?Promise.all(t).then(s):s()}function Fn(n,e){return n&&n instanceof Te?n:new Te(n,void 0,void 0,e)}function Kt(n,e,t,i){return n.nodeType===Node.ELEMENT_NODE&&C.normaliseVirtualElementDomStructure(n),uo(n,e,Fn(t),i)}function ao(n,e,t){let i=new Set,r=Fn(t),o=qt().makeBindingAccessors(e,r,n);return Kt(n,o,r,i),new gt({asyncBindingsApplied:i,rootNode:n,bindingContext:r})}function oe(n,e){let t=new Set,i=Fn(n);return e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.COMMENT_NODE?(io(i,e,t),new gt({asyncBindingsApplied:t,rootNode:e,bindingContext:i})):new gt({asyncBindingsApplied:t,rootNode:e,bindingContext:i})}function yt(n,e,t){let i=new Set;if(e){if(e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.COMMENT_NODE)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node")}else if(e=window.document.body,!e)throw Error("ko.applyBindings: could not find window.document.body; has the document been loaded?");let r=Fn(n,t);return so(r,e,i),Promise.all(i)}function eo(n){let e;n.bindingKey?(e=n.errorCaptured,n.message='Unable to process binding "'+n.bindingKey+'" in binding "'+n.bindingKey+`"
|
|
10
|
+
Message: `+(e.message?e.message:e)):e=n.errorCaptured;try{H(e,n)}catch(t){n.stack=e.stack;let i=e.message||String(e),r=e.name;e=new Error(i),r&&r!=="Error"&&(e.name=r),H(e,n)}c.onError(e)}function Cu(n,e,t,i,r){let o=[],s=F(function(){let u=e(t,r,Ve(o,n))||[];o.length>0&&(fn(o,u),i&&D.ignore(i,null,[t,u,r])),o.length=0,Ze(o,u)},null,{disposeWhenNodeIsRemoved:n,disposeWhen:function(){return!cr(o)}});return{mappedNodes:o,dependentObservable:s.isActive()?s:void 0}}var lo=A.nextKey(),co=A.nextKey();function bt(n,e,t,i,r,o){e=e||[],typeof e.length=="undefined"&&(e=[e]),i=i||{};let s=A.get(n,lo),u=!s,a=new Array,l=0,p=0,f=[],y=[],g=[],x=[],N=[],h,O=0;function M(v){h={arrayEntry:v,indexObservable:B(p++)},a.push(h),y.push(h),u||N.push(h)}function b(v){h=s[v],p!==v&&x.push(h),h.indexObservable(p++),Ve(h.mappedNodes,n),a.push(h),y.push(h)}function w(v,k){if(v)for(let P=0,j=k.length;P<j;P++)L(k[P].mappedNodes,function(te){v(te,P,k[P].arrayEntry)})}if(u)L(e,M);else{if(!o||s&&s._countWaitingForRemove){let v=Xe(s,function(P){return P.arrayEntry}),k={dontLimitMoves:i.dontLimitMoves,sparse:!0};o=tt(v,e,k)}for(let v=0,k,P,j;k=o[v];v++)switch(P=k.moved,j=k.index,k.status){case"deleted":for(;l<j;)b(l++);P===void 0&&(h=s[l],h.dependentObservable&&(h.dependentObservable.dispose(),h.dependentObservable=void 0),Ve(h.mappedNodes,n).length&&(i.beforeRemove&&(a.push(h),y.push(h),O++,h.arrayEntry===co?h=null:g.push(h)),h!=null&&h.mappedNodes&&f.push.apply(f,h.mappedNodes))),l++;break;case"added":for(;p<j;)b(l++);P!==void 0?b(P):M(k.value);break}for(;p<e.length;)b(l++);a._countWaitingForRemove=O}A.set(n,lo,a),w(i.beforeMove,x),L(f,i.beforeRemove?J:me);for(let v=0,k=C.firstChild(n),P,j;h=y[v];v++){h.mappedNodes||H(h,Cu(n,t,h.arrayEntry,r,h.indexObservable));for(let te=0;j=h.mappedNodes[te];k=j.nextSibling,P=j,te++)j!==k&&C.insertAfter(n,j,P);!h.initialized&&r&&(r(h.arrayEntry,h.mappedNodes,h.indexObservable),h.initialized=!0)}w(i.beforeRemove,g);for(let v=0;v<g.length;++v)g[v].arrayEntry=co;w(i.afterMove,x),w(i.afterAdd,N)}var We=class extends ee{get controlsDescendants(){return!0}applyBindingsToDescendants(e,t){return Ge(this,null,function*(){let i=oe(e,this.$element);i.isSync?this.bindingCompletion=i:yield i.completionPromise,t&&t(i),this.completeBinding(i)})}};var po=1,fo=2,mo=3,Ei=4,xu=5,ho=A.nextKey()+"_",go=A.nextKey();function yo(n){return A.get(n,go)||{}}function Ci(n,e){A.set(n,go,e)}var Ue=class{constructor(e){d(this,"domElement");d(this,"templateType");if(this.domElement=e,e.nodeType===Node.COMMENT_NODE)this.templateType=Ei;else{let t=V(this.domElement);this.templateType=t==="script"?po:t==="textarea"?fo:t=="template"&&e.content&&e.content.nodeType===Node.DOCUMENT_FRAGMENT_NODE?mo:Ei}}text(e){let t=this.templateType===po?"text":this.templateType===fo?"value":"innerHTML";if(arguments.length==0)return this.domElement[t];t==="innerHTML"?ot(this.domElement,e):this.domElement[t]=e}data(e,t){if(arguments.length===1)return A.get(this.domElement,ho+e);A.set(this.domElement,ho+e,t)}nodes(e){let t=this.domElement;if(arguments.length==0){let i=yo(t),r=i.containerData||(this.templateType===mo?t.content:this.templateType===Ei?t:void 0);if(!r||i.alwaysCheckText){let o=this.text();o&&(r=Fr(o,t.ownerDocument),this.text(""),Ci(t,{containerData:r,alwaysCheckText:!0}))}return r}else Ci(t,{containerData:e})}},Ee=class extends Ue{constructor(e){super(e),this.templateType=xu}text(e){if(arguments.length==0){let t=yo(this.domElement);return t.textData===void 0&&t.containerData&&(t.textData=t.containerData.innerHTML),t.textData}else Ci(this.domElement,{textData:e})}};function qe(){}H(qe.prototype,{renderTemplateSource(n,e,t,i){t.onError("Override renderTemplateSource")},createJavaScriptEvaluatorBlock(n){c.onError(new Error("Override createJavaScriptEvaluatorBlock"))},makeTemplateSource(n,e){if(typeof n=="string"){e=e||document;let t=e.getElementById(n);if(!t)throw c.onError(new Error("Cannot find template with ID "+n),!1);return new Ue(t)}else{if(n.nodeType===Node.ELEMENT_NODE)return new Ee(n);if(n.nodeType===Node.COMMENT_NODE)return new Ee(n);throw c.onError(new Error("Unknown template type: "+n),!1)}},renderTemplate(n,e,t,i){let r=this.makeTemplateSource(n,i);return this.renderTemplateSource(r,e,t,i)}});var vi,bo=A.nextKey();function Nn(n){if(n!==void 0&&!(n instanceof qe))throw new Error("templateEngine must inherit from ko.templateEngine");vi=n}function xi(n,e,t){let i,r=n,o=C.nextSibling(e);for(;r&&(i=r)!==o;)r=C.nextSibling(i),t(i,r)}function Co(n,e,t){if(n.length){let i=n[0],r=n[n.length-1],o=i.parentNode,s=c.bindingProviderInstance,u=s.preprocessNode;if(u){if(xi(i,r,function(a,l){let p=a.previousSibling,f=u.call(s,a);f&&(a===i&&(i=f[0]||l),a===r&&(r=f[f.length-1]||p))}),n.length=0,!i)return;i===r?n.push(i):(n.push(i,r),Ve(n,o))}xi(i,r,function(a){(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.COMMENT_NODE)&&yt(e,a).then(t)}),xi(i,r,function(a){(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.COMMENT_NODE)&&$e.unmemoizeDomNodeAndDescendants(a,[e])}),Ve(n,o)}}function Ai(n){return n.nodeType?n:n.length>0?n[0]:null}function xo(n,e,t,i,r,o){r=r||{};let u=(n&&Ai(n)||t||{}).ownerDocument,l=(r.templateEngine||vi).renderTemplate(t,i,r,u);if(typeof l.length!="number"||l.length>0&&typeof l[0].nodeType!="number")throw new Error("Template engine must return an array of DOM nodes");let p=!1;switch(e){case"replaceChildren":C.setDomNodeChildren(n,l),p=!0;break;case"replaceNode":fn(n,l),p=!0;break;case"ignoreTargetNode":break;default:throw new Error("Unknown renderMode: "+e)}return p&&(Co(l,i,o),r.afterRender&&D.ignore(r.afterRender,null,[l,i.$data]),e==="replaceChildren"&&$.notify(n,$.childrenComplete)),l}function Ao(n,e,t){return S(n)?n():typeof n=="function"?n(e,t):n}function wn(n,e,t,i,r,o){if(t=t||{},(t.templateEngine||vi)===void 0)throw new Error("Set a template engine before calling renderTemplate");if(r=r||"replaceChildren",i){let s=Ai(i),u=function(){return!s||!It(s)},a=s&&r==="replaceNode"?s.parentNode:s;return F(function(){let l=e&&e instanceof Te?e:new Te(e,void 0,void 0,void 0,{exportDependencies:!0}),p=Ao(n,l.$data,l),f=xo(i,r,p,l,t,o);r==="replaceNode"&&(i=f,s=Ai(i))},null,{disposeWhen:u,disposeWhenNodeIsRemoved:a})}else return $e.memoize(function(s){wn(n,e,t,s,"replaceNode")})}function vo(n,e,t,i,r,o){let s;function u(f,y){t.as?c.createChildContextWithAs?s=r.createChildContext(f,t.as,x=>{x.$index=y}):s=r.extend({[t.as]:f,$index:y}):s=r.createChildContext(f,t.as,x=>{x.$index=y});let g=Ao(n,f,s);return xo(i,"ignoreTargetNode",g,s,t,o)}let a=function(f,y){Co(y,s,o),t.afterRender&&t.afterRender(y,f),s=null};function l(f,y){D.ignore(bt,null,[i,f,u,t,a,y]),$.notify(i,$.childrenComplete)}let p=t.includeDestroyed===!1||c.foreachHidesDestroyed&&!t.includeDestroyed;if(!p&&!t.beforeRemove&&$t(e)){l(e.peek());let f=e.subscribe(function(y){l(e(),y)},null,"arrayChange");return f.disposeWhenNodeIsRemoved(i),f}else return F(function(){let f=m(e)||[];Symbol.iterator in f||(f=[f]),p&&(f=Pe(f,function(g){return g==null||!m(g._destroy)})),l(f)},null,{disposeWhenNodeIsRemoved:i})}var Eo=A.nextKey(),Et=class extends ee{constructor(e){super(e);let t=this.$element,i=m(this.value);A.set(t,"conditional",{elseChainSatisfied:B(!0)}),typeof i=="string"||i.name?this.bindNamedTemplate():"nodes"in i?this.bindNodeTemplate(i.nodes||[]):this.bindAnonymousTemplate()}bindNamedTemplate(){C.emptyNode(this.$element)}bindNodeTemplate(e){if(S(e))throw new Error('The "nodes" option must be a plain, non-observable array.');let t=e[0]&&e[0].parentNode;(!t||!A.get(t,bo))&&(t=Pt(e),A.set(t,bo,!0)),new Ee(this.$element).nodes(t)}bindAnonymousTemplate(){let e=C.childNodes(this.$element);if(e.length===0)throw new Error("Anonymous template defined, but no template content was provided.");let t=Pt(e);new Ee(this.$element).nodes(t)}onValueChange(){let e=this.$element,t=this.$context,i=this.value,r=m(i),o=!0,s=null,u=A.get(e,"conditional").elseChainSatisfied,a;if(typeof r=="string"?(a=i,r={}):(a=r.name,"if"in r&&(o=m(r.if)),o&&"ifnot"in r&&(o=!m(r.ifnot))),"foreach"in r){let l=o&&r.foreach||[];s=vo(a||e,l,r,e,t,this.completeBinding),u((m(l)||[]).length!==0)}else if(o){let l="data"in r?t.createStaticChildContext(r.data,r.as):t;s=wn(a||e,l,r,e,void 0,this.completeBinding),u(!0)}else C.emptyNode(e),u(!1);this.disposeOldComputedAndStoreNewOne(e,s)}disposeOldComputedAndStoreNewOne(e,t){let i=A.get(e,Eo);i&&typeof i.dispose=="function"&&i.dispose(),A.set(e,Eo,t&&(!t.isActive||t.isActive())?t:void 0)}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};function se(){}se.prototype=new qe;se.prototype.constructor=se;se.prototype.renderTemplateSource=function(n,e,t,i){let r=n.nodes?n.nodes():null;if(r)return ue(r.cloneNode(!0).childNodes);{let o=n.text();return le(o,i)}};se.instance=new se;Nn(se.instance);var Sn=class extends Et{get value(){let e=this.valueAccessor(),t=at(e);return!t||typeof t.length=="number"?{foreach:e,templateEngine:se.instance}:(m(e),{foreach:t.data,as:t.as,includeDestroyed:t.includeDestroyed,afterAdd:t.afterAdd,beforeRemove:t.beforeRemove,afterRender:t.afterRender,beforeMove:t.beforeMove,afterMove:t.afterMove,templateEngine:se.instance})}};var Do={foreach:Sn,template:Et};var To={addDisposeCallback:xe,removeDisposeCallback:rt,removeNode:me,addCleaner:yr,removeCleaner:br,get cleanExternalData(){return c.cleanExternalData},set cleanExternalData(n){c.set("cleanExternalData",n)}},Au={addOrRemoveItem:et,arrayFilter:Pe,arrayFirst:an,arrayForEach:L,arrayGetDistinctValues:or,arrayIndexOf:W,arrayMap:Xe,arrayPushAll:Ze,arrayRemoveItem:Ye,cloneNodes:Ae,compareArrays:tt,createSymbolOrString:ar,domData:A,domNodeDisposal:To,extend:H,filters:c.filters,objectForEach:R,objectMap:fe,parseHtmlFragment:le,parseJson:dr,parseObjectLiteral:ft,peekObservable:at,range:sr,registerEventHandler:Q,setDomNodeChildrenFromArrayMapping:bt,setHtml:ot,setTextContent:He,toggleDomNodeCssClass:nt,triggerEvent:Re,unwrapObservable:m},Di={cleanNode:J,dependencyDetection:D,computedContext:D,filters:c.filters,ignoreDependencies:D.ignore,memoization:$e,options:c,removeNode:me,selectExtensions:_,tasks:ge,utils:Au,LifeCycle:Y,isObservable:S,isSubscribable:st,isWriteableObservable:K,isWritableObservable:K,observable:B,observableArray:de,isObservableArray:$t,peek:at,subscribable:U,unwrap:m,toJS:dt,toJSON:ai,proxy:vn,computed:F,dependentObservable:F,isComputed:mt,isPureComputed:hi,pureComputed:De,when:gi,nativeTemplateEngine:se,renderTemplate:wn,setTemplateEngine:Nn,templateEngine:qe,templateSources:{domElement:Ue,anonymousTemplate:Ee},applyBindingAccessorsToNode:Kt,applyBindings:yt,applyBindingsToDescendants:oe,applyBindingsToNode:ao,contextFor:Be,dataFor:Tn,BindingHandler:Z,AsyncBindingHandler:ee,virtualElements:C,domNodeDisposal:To,bindingEvent:$},Qt=class{constructor({provider:e,bindings:t,extenders:i,filters:r,options:o}){d(this,"providedProperties");if(Object.assign(Di.options,o,{filters:r,bindingProviderInstance:e}),e.setGlobals(Di.options.bindingGlobals),Array.isArray(t))for(let s of t)e.bindingHandlers.set(s);else e.bindingHandlers.set(t);this.providedProperties={extenders:Object.assign(ye,i),bindingHandlers:e.bindingHandlers,bindingProvider:e}}create(...e){let t=Object.assign({get getBindingHandler(){return c.getBindingHandler},set getBindingHandler(i){c.set("getBindingHandler",i)}},Di,this.providedProperties,...e);return t.options.knockoutInstance=t,t}};var Ct=class{set(e,t){typeof e=="string"?this[e]=t:typeof e=="object"?(t!==void 0&&c.onError(new Error("Given extraneous `value` parameter (first param should be a string, but it was an object)."+e)),Object.assign(this,e)):c.onError(new Error("Given a bad binding handler type: "+e))}get(e){let[t]=e.split(".");return this[t]}};var z=class n{constructor(e){d(this,"bindingHandlers");d(this,"globals");d(this,"_overloadInstance");if(this.constructor===n)throw new Error("Provider is an abstract base class.");if(!("FOR_NODE_TYPES"in this))throw new Error("Providers must have FOR_NODE_TYPES property");this.bindingHandlers=(e==null?void 0:e.bindingHandlers)||new Ct,this.globals=(e==null?void 0:e.globals)||{}}get FOR_NODE_TYPES(){throw new Error("Providers must override FOR_NODE_TYPES property")}setGlobals(e){this.globals=e}get preemptive(){return!1}nodeHasBindings(e,t){return!1}getBindingAccessors(e,t){return Object.create(null)}preprocessNode(e){return[e]}postProcess(){}get instance(){return this._overloadInstance||this}set instance(e){!e||e===this?this._overloadInstance=void 0:this._overloadInstance=new Ti(e,this)}makeAccessorsFromFunction(e){return fe(D.ignore(e),(t,i)=>()=>e()[i])}makeValueAccessor(e){return()=>e}makeBindingAccessors(e,t,i){return typeof e=="function"?this.makeAccessorsFromFunction(e.bind(null,t,i)):fe(e,this.makeValueAccessor)}},Ti=class extends z{constructor(t,i){super();d(this,"providerObject");Object.assign(this,{providerObject:t}),this.bindingHandlers=t.bindingHandlers||i.bindingHandlers}get FOR_NODE_TYPES(){return[Node.ELEMENT_NODE,Node.TEXT_NODE,Node.COMMENT_NODE]}getBindingsAndMakeAccessors(t,i){let r=this.providerObject.getBindings.bind(this.providerObject,t,i);return this.makeAccessorsFromFunction(r)}getBindingAccessors(t,i){return this.providerObject.getBindingAccessors?this.providerObject.getBindingAccessors(t,i):this.getBindingsAndMakeAccessors(t,i)}nodeHasBindings(t){return this.providerObject.nodeHasBindings(t)}preprocessNode(t){return this.providerObject.preprocessNode?this.providerObject.preprocessNode(t):null}};var ke=class extends z{*processBinding(e,t){let[i,r]=e.split("."),o=this.bindingHandlers.get(i);if(o&&o.preprocess){let s=new Array,u=(...a)=>s.push(a);t=o.preprocess(t,e,u);for(let[a,l]of s)yield*Me(this.processBinding(a,l))}else r&&(t=`{${r}:${t}}`);yield`'${i}':${t}`}*generateBindingString(e){let t=typeof e=="string"?ft(e):e;for(let{key:i,unknown:r,value:o}of t)yield*Me(this.processBinding(i||r,o))}preProcessBindings(e){return Array.from(this.generateBindingString(e)).join(",")}getBindingAccessors(e,t){let i=e&&this.getBindingString(e);if(!i)return;let r=this.preProcessBindings(i);return new Se().parse(r,t,this.globals,e)}getBindingString(e){throw new Error("Overload getBindingString.")}};var xt=class extends ke{get FOR_NODE_TYPES(){return[Node.ELEMENT_NODE,Node.COMMENT_NODE]}preprocessNode(e){if(e instanceof Element&&e.tagName==="KO"){let t=e.parentNode,i=[...e.childNodes],r=[...this.genElementBindingStrings(e)].join(","),o=document.createComment("ko "+r),s=document.createComment("/ko");t==null||t.insertBefore(o,e);for(let u of i)t==null||t.insertBefore(u,e);return t==null||t.insertBefore(s,e),e.remove(),[o,...i,s]}return null}*genElementBindingStrings(e){for(let{name:t,value:i}of e.attributes)yield`${t.replace(/^ko-/,"")}: ${i}`}getBindingString(e){return e.nodeType===Node.COMMENT_NODE?C.virtualNodeBindingValue(e):null}nodeHasBindings(e,t){return e.nodeType===Node.COMMENT_NODE?C.isStartComment(e):!1}};var At=class extends ke{get FOR_NODE_TYPES(){return[Node.ELEMENT_NODE]}get BIND_ATTRIBUTE(){return"data-bind"}getBindingString(e){return e.nodeType===Node.ELEMENT_NODE?e.getAttribute(this.BIND_ATTRIBUTE):null}nodeHasBindings(e,t){return e.nodeType===Node.ELEMENT_NODE?e.hasAttribute(this.BIND_ATTRIBUTE):!1}};var Bi={},Fi={};function vu(n,e){let t=qn(Bi,n),i;t?t.subscribe(e):(t=Bi[n]=new U,t.subscribe(e),Du(n,function(r,o){let s=!!(o&&o.synchronous);Fi[n]={definition:r,isSynchronousComponent:s},delete Bi[n],i||s?t.notifySubscribers(r):ge.schedule(function(){t.notifySubscribers(r)})}),i=!0)}function Du(n,e){Jt("getConfig",[n],function(t){t?Jt("loadComponent",[n,t],function(i){e(i,t)}):e(null,null)})}function Jt(n,e,t,i){i||(i=ce.loaders.slice(0));let r=i.shift();if(r){let o=r[n];if(o){let s=!1;if(o.apply(r,e.concat(function(a){s?t(null):a!==null?t(a):Jt(n,e,t,i)}))!==void 0&&(s=!0,!r.suppressLoaderExceptions))throw new Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else Jt(n,e,t,i)}else t(null)}var ce={get(n,e){let t=qn(Fi,n);t?t.isSynchronousComponent?D.ignore(function(){e(t.definition)}):ge.schedule(function(){e(t.definition)}):vu(n,e)},clearCachedDefinition(n){delete Fi[n]},_getFirstResultFromLoaders:Jt,loaders:new Array};var Ke={},On=Symbol("Knockout View Model ViewModel factory");function kn(n,e){if(!e)throw new Error("Invalid configuration for "+n);if(Oi(n))throw new Error("Component "+n+" is already registered");let t=n.includes("-")&&n.toLowerCase()===n;!e.ignoreCustomElementWarning&&!t&&console.log(`
|
|
11
11
|
\u{1F94A} Knockout warning: components for custom elements must be lowercase and contain a dash. To ignore this warning, add to the 'config' of .register(componentName, config):
|
|
12
12
|
|
|
13
13
|
ignoreCustomElementWarning: true
|
|
14
|
-
`),Je[n]=e}function _r(n){return G(Je,n)}function _o(n){delete Je[n],pe.clearCachedDefinition(n)}var Ir={getConfig(n,e){let t=G(Je,n)?Je[n]:null;e(t)},loadComponent(n,e,t){let r=Sr(n);kr(r,e,function(i){ka(n,r,i,t)})},loadTemplate(n,e,t){_a(Sr(n),e,t)},loadViewModel(n,e,t){Io(Sr(n),e,t)}},Or="createViewModel";function ka(n,e,t,r){let i={},o=function(){--u===0&&r(i)},s=t.template,a=t.viewModel,u=2;s?kr(e,s,function(l){pe._getFirstResultFromLoaders("loadTemplate",[n,l],function(f){i.template=f,o()})}):o(),a?kr(e,a,function(l){pe._getFirstResultFromLoaders("loadViewModel",[n,l],function(f){i[Or]=f,o()})}):o()}function _a(n,e,t){if(typeof e=="string")t(de(e));else if(e instanceof Array)t(e);else if(Xn(e))t(ue(e.childNodes));else if(e.element){let r=e.element;if(Ei(r))t(ko(r));else if(typeof r=="string"){let i=document.getElementById(r);i?t(ko(i)):n("Cannot find element with ID "+r)}else n("Unknown element type: "+r)}else e.elementName?t(e):n("Unknown template value: "+e)}function Io(n,e,t){if(e[On])t((...r)=>e[On](...r));else if(typeof e=="function")t(function(r){return new e(r)});else if(typeof e[Or]=="function")t(e[Or]);else if("instance"in e){let r=e.instance;t(function(){return r})}else"viewModel"in e?Io(n,e.viewModel,t):n("Unknown viewModel value: "+e)}function ko(n){switch(V(n)){case"script":return de(n.text);case"textarea":return de(n.value);case"template":if(Xn(n.content))return ve(n.content.childNodes)}return ve(n.childNodes)}function kr(n,e,t){typeof e.require=="string"?window.amdRequire||window.require?(window.amdRequire||window.require)([e.require],t):n("Uses require, but no AMD loader is present"):t(e)}function Sr(n){return function(e){throw new Error("Component '"+n+"': "+e)}}pe.loaders.push(Ir);var _n=class extends Z{static get customElementName(){return this.name.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}static get template(){if(!("template"in this.prototype))return{element:this.element}}static get element(){throw new Error("[ComponentABC] `element` must be overloaded.")}static get sync(){return!0}static[On](e,t){return new this(e,t)}static register(e=this.customElementName){let t=this,{template:r}=this,i=this.sync;kn(e,{viewModel:t,template:r,synchronous:i})}};var Me={ComponentABC:_n,get:pe.get,clearCachedDefinition:pe.clearCachedDefinition,register:kn,isRegistered:_r,unregister:_o,defaultLoader:Ir,_allRegisteredComponents:Je,get loaders(){return pe.loaders},set loaders(n){pe.loaders=n}};var Tt=class extends J{get FOR_NODE_TYPES(){return[Node.ELEMENT_NODE]}preprocessNode(e){if(e instanceof Element&&e.tagName==="SLOT"){let t=e.parentNode,r=e.getAttribute("name")||"",i=document.createComment(`ko slot: "${r}"`),o=document.createComment("/ko");if(!t)throw Error("Missing parent node");return t.insertBefore(i,e),t.insertBefore(o,e),t.removeChild(e),[i,o]}return null}nodeHasBindings(e){return!!this.getComponentNameForNode(e)}getBindingAccessors(e,t){let r=this.getComponentNameForNode(e);return r?{component:()=>({name:r,params:this.getComponentParams(e,t)})}:Object.create(null)}getComponentNameForNode(e){if(!(e instanceof Element)||e.nodeType!==Node.ELEMENT_NODE)return null;let t=V(e);if(Me.isRegistered(t)){let r=t.includes("-"),i=""+e=="[object HTMLUnknownElement]";if(r||i)return t}return null}getComponentParams(e,t){if(!(e instanceof Element))return{$raw:{}};let r=new ke(e,t,this.globals),i=(e.getAttribute("params")||"").trim(),o=r.parse(i,t,void 0,e);if(!o||Object.keys(o).length===0)return{$raw:{}};let s=me(o,u=>N(u,null,{disposeWhenNodeIsRemoved:e})),a=me(s,u=>this.makeParamValue(e,u));return Object.assign({$raw:s},a)}makeParamValue(e,t){let r=t.peek();if(!t.isActive())return r;let i=Q(r);return N({read:()=>p(t()),write:i?o=>t()(o):void 0,disposeWhenNodeIsRemoved:e})}};var Bt=class extends J{get FOR_NODE_TYPES(){return[Node.ELEMENT_NODE]}get PREFIX(){return"ko-"}getBindingAttributesList(e){return e instanceof Element?e.hasAttributes()?Array.from(e.attributes).filter(t=>t.name.startsWith(this.PREFIX)):[]:[]}nodeHasBindings(e){return this.getBindingAttributesList(e).length>0}getBindingAccessors(e,t){return Object.assign({},...this.handlersFromAttributes(e,t))}*handlersFromAttributes(e,t){for(let r of this.getBindingAttributesList(e))yield{[r.name.substring(this.PREFIX.length)]:()=>this.getValue(r.value,t,e)}}getValue(e,t,r){if(!e)return;let i=t.$data;switch(e){case"$element":return r;case"$context":return t;case"this":case"$data":return t.$data}if(i instanceof Object&&e in i)return i[e];if(e in t)return t[e];if(e in this.globals)return this.globals[e];throw new Error(`The variable '${e}' not found.`)}};var Ft=class extends J{constructor(t){super(t);d(this,"nodeTypes");d(this,"nodeTypeMap");d(this,"providers");let r=(t==null?void 0:t.providers)||[];this.nodeTypeMap={},this.nodeTypes=[],this.providers=[],r.forEach(i=>this.addProvider(i))}get FOR_NODE_TYPES(){return this.nodeTypes}setGlobals(t){[this,...this.providers].forEach(r=>r.globals=t)}addProvider(t){this.providers.push(t),t.bindingHandlers=this.bindingHandlers,t.globals=this.globals;let r=this.nodeTypeMap;for(let i of t.FOR_NODE_TYPES)r[i]||(r[i]=new Array),r[i].push(t);this.nodeTypes=Object.keys(this.nodeTypeMap).map(i=>parseInt(i,10))}providersFor(t){return this.nodeTypeMap[t.nodeType]||[]}nodeHasBindings(t,r){return this.providersFor(t).some(i=>i.nodeHasBindings(t))}preprocessNode(t){for(let r of this.providersFor(t)){let i=r.preprocessNode(t);if(i)return i}return null}*enumerateProviderBindings(t,r){for(let i of this.providersFor(t)){let o=i.getBindingAccessors(t,r);if(o&&(yield*Le(Object.entries(o||{})),i.preemptive))return}}getBindingAccessors(t,r){let i={};for(let[o,s]of this.enumerateProviderBindings(t,r)){if(o in i)throw new Error(`The binding "${o}" is duplicated by multiple providers`);i[o]=s}return i}};var Mo={update:function(n,e,t){let r=p(e())||{};R(r,function(i,o){o=p(o);let s=i.indexOf(":"),a=s>0&&n.lookupNamespaceURI(i.substr(0,s)),u=o===!1||o===null||o===void 0;u?a?n.removeAttributeNS(a,i):n.removeAttribute(i):(o=o.toString(),a?n.setAttributeNS(a,i,o):n.setAttribute(i,o)),i==="name"&&(n.name=u?"":o)})}};var Po={after:["value","attr"],init:function(n,e,t){let r=Te(function(){if(t.has("checkedValue"))return p(t.get("checkedValue"));if(m)return t.has("value")?p(t.get("value")):n.value});function i(){let g=n.checked,x=r();if(D.isInitial()||!g&&(a||D.getDependenciesCount()))return;let T=D.ignore(e);if(l){let h=f?T.peek():T,O=b;b=x,O!==x?(g&&(Ne(h,x,!0),Ne(h,O,!1)),b=x):Ne(h,x,g),f&&Q(T)&&T(h)}else{s&&(x===void 0?x=g:g||(x=void 0));let h=e(x,{onlyIfChanged:!0});Q(h)&&h.peek()!==x&&h(x)}}function o(){let g=p(e()),x=r();l?(n.checked=W(g,x)>=0,b=x):s&&x===void 0?n.checked=!!g:n.checked=r()===g}let s=n.type=="checkbox",a=n.type=="radio";if(!s&&!a)return;let u=e(),l=s&&p(u)instanceof Array,f=!(l&&u.push&&u.splice),m=a||l,b=l?r():void 0;N(i,null,{disposeWhenNodeIsRemoved:n}),K(n,"click",i),N(o,null,{disposeWhenNodeIsRemoved:n}),u=void 0}},Lo={update:function(n,e){n.value=p(e())}};function Vo(n){return{init:function(e,t,r,i,o){let s=function(){let a={};return a[n]=t(),a};In.init.call(this,e,s,r,i,o)}}}function Ro(n){return typeof n=="function"?{handler:n}:n||{}}var In={init:function(n,e,t,r,i){let o=e()||{};R(o,function(s,a){let{passive:u,capture:l,once:f,debounce:m,throttle:b}=Ro(a),g=(l||u||f)&&{capture:l,passive:u,once:f},x=(T,...h)=>{let O,{handler:M,passive:y,bubble:w,preventDefault:v}=Ro(e()[s]);try{if(M){let P=i.$data,j=[P,T,...h];O=M.apply(P,j)}}finally{v!==void 0?p(v)&&T.preventDefault():O!==!0&&(y||T.preventDefault())}let k=t.get(s+"Bubble")!==!1;(w===!1||!k)&&(T.cancelBubble=!0,T.stopPropagation&&T.stopPropagation())};m&&(x=dn(x,m)),b&&(x=ln(x,b)),K(n,s,x,g||!1)})}},Ho={init:In.init,preprocess:function(n,e,t){t(e.replace("on.",""),"=>"+n)}};var $o=Vo("click");var Gt={aliases:["class"],update:function(n,e){let t=p(e());t!==null&&typeof t=="object"?R(t,function(r,i){i=p(i),it(n,r,i)}):(t=_t(String(t||"")),it(n,n[Gt.classesWrittenByBindingKey],!1),n[Gt.classesWrittenByBindingKey]=t,it(n,t,!0))},classesWrittenByBindingKey:z("__ko__cssValue")};var zt=class extends ee{onDescendantsComplete(){typeof this.value=="function"&&this.value(this.$element)}static get allowVirtualElements(){return!0}};var Mr={update:function(n,e){let t=p(e());t&&n.disabled?n.removeAttribute("disabled"):!t&&!n.disabled&&(n.disabled=!0)}},jo={update:function(n,e){Mr.update(n,function(){return!p(e())})}};var Pr=z("__ko_hasfocusUpdating"),Lr=z("__ko_hasfocusLastValue"),Rr={init:function(n,e,t){let r=function(s){n[Pr]=!0;let a=n.ownerDocument;if("activeElement"in a){let l;try{l=a.activeElement}catch(f){l=a.body}s=l===n}let u=e(s,{onlyIfChanged:!0});Q(u)&&u.peek()!==s&&u(s),n[Lr]=s,n[Pr]=!1},i=r.bind(null,!0),o=r.bind(null,!1);K(n,"focus",i),K(n,"focusin",i),K(n,"blur",o),K(n,"focusout",o)},update:function(n,e){let t=!!p(e());!n[Pr]&&n[Lr]!==t&&(t?n.focus():n.blur(),!t&&n[Lr]&&n.ownerDocument.body.focus(),D.ignore(Ve,null,[n,t?"focusin":"focusout"]))}};var Wo={init:function(){return{controlsDescendantBindings:!0}},update:function(n,e){at(n,e())},allowVirtualElements:!0};var Uo={init:function(n,e,t,r,i){let o=i.extend(e);return se(o,n),{controlsDescendantBindings:!0}},allowVirtualElements:!0};var Vr={},qo={init:function(n){if(V(n)!=="select")throw new Error("options binding applies only to SELECT elements");for(;n.length>0;)n.remove(0);return{controlsDescendantBindings:!0}},update:function(n,e,t){function r(){return Re(n.options,function(y){return y.selected})}let i=n.length==0,o=n.multiple,s=!i&&o?n.scrollTop:null,a=p(e()),u=t.get("valueAllowUnset")&&t.has("value"),l=t.get("optionsIncludeDestroyed"),f={},m,b,g=new Array;u||(o?g=et(r(),_.readValue):n.selectedIndex>=0&&g.push(_.readValue(n.options[n.selectedIndex]))),a&&(typeof a.length=="undefined"&&(a=[a]),b=Re(a,function(y){return l||y===void 0||y===null||!p(y._destroy)}),t.has("optionsCaption")&&(m=p(t.get("optionsCaption")),m!=null&&b.unshift(Vr)));function x(y,w,v){let k=typeof w;return k==="function"?w(y):k=="string"?y[w]:v}let T=!1;function h(y,w,v){v.length&&(g=!u&&v[0].selected?[_.readValue(v[0])]:[],T=!0);let k=n.ownerDocument.createElement("option");if(y===Vr)je(k,t.get("optionsCaption")),_.writeValue(k,void 0);else{let P=x(y,t.get("optionsValue"),y);_.writeValue(k,p(P));let j=x(y,t.get("optionsText"),P);je(k,j)}return[k]}f.beforeRemove=function(y){n.removeChild(y)};function O(y,w){if(T&&u)_.writeValue(n,p(t.get("value")),!0);else if(g.length){let v=W(g,_.readValue(w[0]))>=0;mn(w[0],v),T&&!v&&D.ignore(Ve,null,[n,"change"])}}let M=O;t.has("optionsAfterRender")&&typeof t.get("optionsAfterRender")=="function"&&(M=function(y,w){O(y,w),D.ignore(t.get("optionsAfterRender"),null,[w[0],y!==Vr?y:void 0])}),Ct(n,b,h,f,M),D.ignore(function(){if(u)_.writeValue(n,p(t.get("value")),!0);else{let y;o?y=g.length&&r().length<g.length:y=g.length&&n.selectedIndex>=0?_.readValue(n.options[n.selectedIndex])!==g[0]:g.length||n.selectedIndex>=0,y&&Ve(n,"change")}}),s&&Math.abs(s-n.scrollTop)>20&&(n.scrollTop=s)}};var Qo={after:["options","foreach"],init:function(n,e,t){K(n,"change",function(){let r=e(),i=new Array;L(n.getElementsByTagName("option"),function(o){o.selected&&i.push(_.readValue(o))}),e(i)})},update:function(n,e){if(V(n)!="select")throw new Error("values binding applies only to SELECT elements");let t=p(e()),r=n.scrollTop;t&&typeof t.length=="number"&&L(n.getElementsByTagName("option"),function(i){let o=W(t,_.readValue(i))>=0;i.selected!=o&&mn(i,o)}),n.scrollTop=r}};var Ko={update:function(n,e){let t=p(e()||{});R(t,function(r,i){if(i=p(i),(i==null||i===!1)&&(i=""),c.jQuery)jQuery(n).css(r,i);else{r=r.replace(/-(\w)/g,(s,a)=>a.toUpperCase());let o=n.style[r];n.style[r]=i,i!==o&&n.style[r]===o&&!isNaN(i)&&(n.style[r]=i+"px")}})}};var Jo={init:function(n,e,t,r,i){if(typeof e()!="function")throw new Error("The value for a submit binding must be a function");K(n,"submit",function(o){let s,a=e();try{s=a.call(i.$data,n)}finally{s!==!0&&(o.preventDefault?o.preventDefault():o.returnValue=!1)}})}};var Go={init:function(){return{controlsDescendantBindings:!0}},update:function(n,e){je(n,e())},allowVirtualElements:!0};var Jr=/MSIE ([^ ;]+)|rv:([^ )]+)/,Hr,$r,jr,Wr,Ge=class extends ee{constructor(...t){super(...t);d(this,"previousElementValue");d(this,"elementValueBeforeEvent");d(this,"timeoutHandle");this.previousElementValue=this.$inputElement.value,c.debug&&this.constructor._forceUpdateOn&&L(this.constructor._forceUpdateOn,r=>{r.slice(0,5)==="after"?this.addEventListener(r.slice(5),"deferUpdateModel"):this.addEventListener(r,"updateModel")});for(let r of this.eventsIndicatingSyncValueChange())this.addEventListener(r,"updateModel");for(let r of this.eventsIndicatingDeferValueChange())this.addEventListener(r,"deferUpdateModel");this.computed("updateView")}get aliases(){return"textinput"}get $inputElement(){return this.$element}eventsIndicatingSyncValueChange(){return["input","change","blur"]}eventsIndicatingDeferValueChange(){return[]}updateModel(t){let r=this.$inputElement;clearTimeout(this.timeoutHandle),this.elementValueBeforeEvent=this.timeoutHandle=void 0;let i=r.value;this.previousElementValue!==i&&(c.debug&&t&&(r._ko_textInputProcessedEvent=t.type),this.previousElementValue=i,this.value=i)}deferUpdateModel(t){let r=this.$inputElement;if(!this.timeoutHandle){this.elementValueBeforeEvent=r.value;let i=c.debug?this.updateModel.bind(this,{type:t.type}):this.updateModel;this.timeoutHandle=le(i,4)}}updateView(){let t=p(this.value);t==null&&(t=""),this.elementValueBeforeEvent!==void 0&&t===this.elementValueBeforeEvent?setTimeout(this.updateView.bind(this),4):this.$inputElement.value!==t&&(this.previousElementValue=t,this.$inputElement.value=t,this.previousElementValue=this.$inputElement.value)}},Ur=class extends Ge{eventsIndicatingSyncValueChange(){return[...super.eventsIndicatingSyncValueChange(),"keypress"]}},qr=class extends Ge{eventsIndicatingDeferValueChange(){return["keydown","paste","cut"]}},Qr=class extends Ge{eventsIndicatingDeferValueChange(){return["keydown"]}},Kr=class extends Ge{eventsIndicatingValueChange(){return[...super.eventsIndicatingSyncValueChange(),"DOMAutoComplete","dragdrop","drop"]}},Xt=c.global;if(Xt.navigator){let n=r=>r&&parseFloat(r[1]),e=Xt.navigator.userAgent;if(!e.match(/Chrome\/([^ ]+)/)){Hr=Xt.opera&&Xt.opera.version&&parseInt(Xt.opera.version()),$r=n(e.match(/Version\/([^ ]+) Safari/)),jr=n(e.match(/Firefox\/([^ ]*)/));let r=e.match(Jr);Wr=r&&(parseFloat(r[1])||parseFloat(r[2]))}}var Gr=Wr&&Wr<=11?Ur:$r&&$r<5?qr:Hr&&Hr<11?Qr:jr&&jr<4?Kr:Ge;var zr={init:function(n,e){if(e()){let t="ko_unique_"+ ++zr.currentIndex;n.name=t}},currentIndex:0};var Mn=class extends ee{constructor(...t){super(...t);d(this,"elementValueBeforeEvent");d(this,"propertyChangedFired");d(this,"updateFromModel");if(this.isCheckboxOrRadio){Qt(this.$element,{checkedValue:this.valueAccessor});return}this.propertyChangedFired=!1,this.elementValueBeforeEvent=null,this.ieAutoCompleteHackNeeded&&(this.addEventListener("propertyChange",()=>this.propertyChangedFired=!0),this.addEventListener("focus",()=>this.propertyChangedFired=!1),this.addEventListener("blur",()=>this.propertyChangedFired&&this.valueUpdateHandler())),L(this.eventsToCatch,r=>this.registerEvent(r)),this.isInput(this.$element)&&this.$element.type==="file"?this.updateFromModel=this.updateFromModelForFile:this.updateFromModel=this.updateFromModelForValue,this.computed("updateFromModel")}static get after(){return["options","foreach","template"]}get eventsToCatch(){let t=this.allBindings.get("valueUpdate"),r=typeof t=="string"?[t]:t||[];return[...new Set(["change",...r])]}isInput(t){return V(this.$element)==="input"}get isCheckboxOrRadio(){let t=this.$element;return this.isInput(t)&&(t.type=="checkbox"||t.type=="radio")}get ieAutoCompleteHackNeeded(){return this.isInput(this.$element)&&this.$element.type=="text"&&this.$element.autocomplete!="off"&&(!this.$element.form||this.$element.form.autocomplete!="off")&&Jr.test(window.navigator.userAgent)}valueUpdateHandler(){this.elementValueBeforeEvent=null,this.propertyChangedFired=!1,this.value=_.readValue(this.$element)}registerEvent(t){let r=this.valueUpdateHandler.bind(this);hi(t,"after")&&(r=()=>{this.elementValueBeforeEvent=_.readValue(this.$element),le(this.valueUpdateHandler.bind(this),0)},t=t.substring(5)),this.addEventListener(t,r)}updateFromModelForFile(){let t=p(this.value);t==null||t===""?this.$element.value="":D.ignore(this.valueUpdateHandler,this)}updateFromModelForValue(){let t=this.$element,r=p(this.value),i=_.readValue(t);if(this.elementValueBeforeEvent!==null&&r===this.elementValueBeforeEvent){le(this.updateFromModel.bind(this),0);return}if(!(r===i&&i!==void 0))if(V(t)==="select"){let o=this.allBindings.get("valueAllowUnset");_.writeValue(t,r,o),!o&&r!==_.readValue(t)&&D.ignore(this.valueUpdateHandler,this)}else _.writeValue(t,r)}};var Xr={update:function(n,e){let t=p(e()),r=n.style.display!=="none";t&&!r?n.style.display="":!t&&r&&(n.style.display="none")}},zo={update:function(n,e){Xr.update.call(this,n,()=>!p(e()))}};var Xo={init:function(n,e,t,r,i){let o=i.createChildContext(e);return se(o,n),{controlsDescendantBindings:!0}},allowVirtualElements:!0};var Yo={attr:Mo,checked:Po,checkedValue:Lo,click:$o,css:Gt,class:Gt,descendantsComplete:zt,enable:Mr,event:In,disable:jo,hasfocus:Rr,hasFocus:Rr,hidden:zo,html:Wo,let:Uo,on:Ho,options:qo,selectedOptions:Qo,style:Ko,submit:Jo,text:Go,textInput:Gr,textinput:Gr,uniqueName:zr,using:Xo,value:Mn,visible:Xr};var ze=class extends te{constructor(t){super(t);d(this,"completesElseChain");d(this,"hasElse");d(this,"ifElseNodes");this.hasElse=this.detectElse(this.$element);let r=this.completesElseChain=F();A.set(this.$element,"conditional",{elseChainSatisfied:r})}get bindingContext(){throw new Error("bindingContext() must be implemented in the child class")}getIfElseNodes(){if(this.ifElseNodes)return this.ifElseNodes;if(D.getDependenciesCount()||this.hasElse)return this.cloneIfElseNodes(this.$element,this.hasElse)}renderStatus(){throw new Error("renderStatus() must be implemented in the child class")}render(){let t=!this.ifElseNodes,{shouldDisplay:r}=this.renderStatus();if(this.ifElseNodes=this.getIfElseNodes()||{},r){let i=t&&!this.hasElse;this.renderAndApplyBindings(this.ifElseNodes.ifNodes,i)}else this.hasElse?this.renderAndApplyBindings(this.ifElseNodes.elseNodes):C.emptyNode(this.$element)}renderAndApplyBindings(t,r){return Ze(this,null,function*(){r||C.setDomNodeChildren(this.$element,ve(t));let i=yield se(this.bindingContext,this.$element);this.completeBinding(i)})}get elseChainIsAlreadySatisfied(){return!1}isElseNode(t){return t.nodeType===Node.COMMENT_NODE&&t.nodeValue.trim().toLowerCase()==="else"}detectElse(t){let r=C.childNodes(t);for(let i=0,o=r.length;i<o;++i)if(this.isElseNode(r[i]))return!0;return!1}cloneIfElseNodes(t,r){let i=C.childNodes(t),o=new Array,s=new Array,a=o;for(let u=0,l=i.length;u<l;++u)r&&this.isElseNode(i[u])?(a=s,r=!1):a.push(X(i[u].cloneNode(!0)));return{ifNodes:o,elseNodes:s}}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};var Xe=class extends ze{constructor(...t){super(...t);d(this,"ifCondition");this.ifCondition=this.computed(()=>!!p(this.value)),this.computed("render")}shouldDisplayIf(){return this.ifCondition()}get bindingContext(){return this.ifCondition.isActive()?this.$context.extend(()=>(this.ifCondition(),null)):this.$context}renderStatus(){let t=this.shouldDisplayIf();return this.elseChainIsAlreadySatisfied?(t=!1,this.completesElseChain(!0)):this.completesElseChain(t),{shouldDisplay:t}}},Yt=class extends Xe{shouldDisplayIf(){return!super.shouldDisplayIf()}};var Pn=class extends ze{constructor(...t){super(...t);d(this,"asOption");d(this,"conditional");this.asOption=this.allBindings.get("as");let r=this.asOption&&!c.createChildContextWithAs?()=>!!p(this.value):()=>p(this.value);this.conditional=this.computed(r),this.computed("render")}get bindingContext(){return this.asOption?c.createChildContextWithAs?this.$context.createChildContext(this.value,this.asOption):this.$context.extend({[this.asOption]:this.value}):this.$context.createChildContext(this.valueAccessor)}renderStatus(){return{shouldDisplay:!!this.conditional()}}};var Zt=class extends Xe{constructor(){super(...arguments);d(this,"_elseChain")}shouldDisplayIf(){return super.shouldDisplayIf()||this.value===void 0}get elseChainIsAlreadySatisfied(){return this._elseChain||(this._elseChain=this.readElseChain()),p(this._elseChain.elseChainSatisfied)}readElseChain(){let t=this.$element;do t=t.previousSibling;while(t&&t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.COMMENT_NODE);return t?(t.nodeType===Node.COMMENT_NODE&&(t=C.previousSibling(t)),A.get(t,"conditional")||{}):!1}};var Zo={if:Xe,with:Pn,ifnot:Yt,unless:Yt,else:Zt,elseif:Zt};var Ia=9007199254740991;function Ma(n){return!!n&&typeof n=="object"&&n.constructor===Object}var Pa=c.document&&typeof c.document.createDocumentFragment=="function";function La(n){let e=document.createElement("div"),t;return n.content?t=n.content:n.tagName==="SCRIPT"?(t=document.createElement("div"),t.innerHTML=n.text):t=n,L(C.childNodes(t),function(r){r&&e.insertBefore(r.cloneNode(!0),null)}),e}function Ra(n,e){return{status:"added",value:n,index:e}}var en=z("_ko_ffe_pending_delete_index"),Nt=class Nt extends te{constructor(t){var o;super(t);d(this,"afterAdd");d(this,"as");d(this,"beforeRemove");d(this,"container");d(this,"changeSubs");d(this,"data");d(this,"generateContext");d(this,"$indexHasBeenRequested");d(this,"templateNode");d(this,"changeQueue");d(this,"firstLastNodesList");d(this,"indexesToDelete");d(this,"isNotEmpty");d(this,"rendering_queued");d(this,"pendingDeletes");d(this,"afterQueueFlush");d(this,"beforeQueueFlush");let r={};Ma(this.value)&&Object.assign(r,this.value),this.as=r.as||this.allBindings.get("as"),this.data=r.data||(p(this.$context.$rawData)===this.value?this.$context.$rawData:this.value),this.container=C.isStartComment(this.$element)?this.$element.parentNode:this.$element,this.generateContext=this.createContextGenerator(this.as),this.$indexHasBeenRequested=!1,this.templateNode=La(r.templateNode||(r.name?(o=document.getElementById(r.name))==null?void 0:o.cloneNode(!0):this.$element)),["afterAdd","beforeRemove","afterQueueFlush","beforeQueueFlush"].forEach(s=>{this[s]=r[s]||this.allBindings.get(s)}),this.changeQueue=new Array,this.firstLastNodesList=new Array,this.indexesToDelete=new Array,this.rendering_queued=!1,this.pendingDeletes=new Array,this.isNotEmpty=F(!!p(this.data).length),A.set(this.$element,"conditional",{elseChainSatisfied:this.isNotEmpty}),C.emptyNode(this.$element);let i=p(this.data);i&&i.map?this.onArrayChange(i.map(Ra),!0):this.completeBinding(),S(this.data)&&(this.data.indexOf||(this.data=this.data.extend({trackArrayChanges:!0})),this.changeSubs=this.data.subscribe(this.onArrayChange,this,"arrayChange"))}dispose(){this.changeSubs&&this.changeSubs.dispose(),this.flushPendingDeletes()}onArrayChange(t,r){let i={added:[],deleted:[]};for(let o=0,s=t.length;o<s;o++){if(i.added.length&&t[o].status==="added"){let a=i.added[i.added.length-1];if((a.isBatch?a.index+a.values.length-1:a.index)+1===t[o].index){a.isBatch||(a={isBatch:!0,status:"added",index:a.index,values:[a.value]},i.added.splice(i.added.length-1,1,a)),a.values.push(t[o].value);continue}}i[t[o].status].push(t[o])}i.deleted.length>0&&(this.changeQueue.push.apply(this.changeQueue,i.deleted),this.changeQueue.push({status:"clearDeletedIndexes"})),this.changeQueue.push.apply(this.changeQueue,i.added),this.changeQueue.length>0&&!this.rendering_queued&&(this.rendering_queued=!0,r?this.processQueue():Nt.animateFrame.call(window,()=>this.processQueue()))}startQueueFlush(){typeof this.beforeQueueFlush=="function"&&this.beforeQueueFlush(this.changeQueue)}endQueueFlush(){typeof this.afterQueueFlush=="function"&&this.afterQueueFlush(this.changeQueue)}processQueue(){let t=!p(this.data).length,r=Ia;this.startQueueFlush(),L(this.changeQueue,i=>{typeof i.index=="number"&&(r=Math.min(r,i.index)),this[i.status](i)}),this.flushPendingDeletes(),this.rendering_queued=!1,this.$indexHasBeenRequested&&this.updateIndexes(r),this.endQueueFlush(),this.changeQueue=new Array,t!==!this.isNotEmpty()&&this.isNotEmpty(!t)}_first$indexRequest(t){this.$indexHasBeenRequested=!0;for(let r=0,i=this.firstLastNodesList.length;r<i;++r){let o=this.getContextStartingFrom(this.firstLastNodesList[r].first);o&&(o.$index=F(r))}return t.$index()}_contextExtensions(t){return Object.assign(t,{$list:this.data}),this.$indexHasBeenRequested?t.$index=t.$index||F():Object.defineProperty(t,"$index",{value:()=>this._first$indexRequest(t),configurable:!0,writable:!0}),t}createContextGenerator(t){let r=this.$context;return t?i=>this._contextExtensions(r.extend({[t]:i})):i=>r.createChildContext(i,void 0,o=>this._contextExtensions(o))}updateFirstLastNodesList(t,r){let i=r[0],o=r[r.length-1];this.firstLastNodesList.splice(t,0,{first:i,last:o})}added(t){let r=t.index,i=t.isBatch?t.values:[t.value],o=this.getLastNodeBeforeIndex(r),s=[],a=new Array,u;for(let l=0,f=i.length;l<f;++l){let m=this.getPendingDeleteFor(i[l]);if(m&&m.nodesets.length)u=m.nodesets.pop(),this.updateFirstLastNodesList(r+l,u);else{let b=this.templateNode.cloneNode(!0);u=C.childNodes(b),this.updateFirstLastNodesList(r+l,u);let g=se(this.generateContext(i[l]),b);a.push(g)}s.push(...u)}typeof this.afterAdd=="function"?this.afterAdd({nodeOrArrayInserted:this.insertAllAfter(s,o),foreachInstance:this}):this.insertAllAfter(s,o),this.completeBinding(Promise.all(a))}getNodesForIndex(t){let r=new Array,i=this.firstLastNodesList[t].first,o=this.firstLastNodesList[t].last;for(r.push(i);i&&i!==o;)i=i.nextSibling,r.push(i);return r}getLastNodeBeforeIndex(t){return t<1||t-1>=this.firstLastNodesList.length?null:this.firstLastNodesList[t-1].last}activeChildElement(t){let r=document.activeElement;return zn(r,t)?r:null}insertAllAfter(t,r){let i,o,s,a=null,u=this.$element;if(t.nodeType===void 0&&t.length===void 0)throw new Error("Expected a single node or a node array");if(t.nodeType!==void 0)return a=this.activeChildElement(t),C.insertAfter(u,t,r),[t];if(t.length===1)a=this.activeChildElement(t[0]),C.insertAfter(u,t[0],r);else if(Pa){for(i=document.createDocumentFragment(),s=0,o=t.length;s!==o;++s)a=a||this.activeChildElement(t[s]),i.appendChild(t[s]);C.insertAfter(u,i,r)}else for(s=t.length-1;s>=0;--s){a=a||this.activeChildElement(t[s]);let l=t[s];if(!l)break;C.insertAfter(u,l,r)}return a&&a.focus(),t}shouldDelayDeletion(t){return t&&(typeof t=="object"||typeof t=="function")}getPendingDeleteFor(t){let r=t&&t[en];return r===void 0?null:this.pendingDeletes[r]}getOrCreatePendingDeleteFor(t){let r=this.getPendingDeleteFor(t);return r||(r={data:t,nodesets:[]},t[en]=this.pendingDeletes.length,this.pendingDeletes.push(r),r)}deleted(t){this.shouldDelayDeletion(t.value)?this.getOrCreatePendingDeleteFor(t.value).nodesets.push(this.getNodesForIndex(t.index)):this.removeNodes(this.getNodesForIndex(t.index)),this.indexesToDelete.push(t.index)}removeNodes(t){if(!t.length)return;function r(){let i=t[0].parentNode;for(let o=t.length-1;o>=0;--o)X(t[o]),i.removeChild(t[o])}if(this.beforeRemove){let i=this.beforeRemove({nodesToRemove:t,foreachInstance:this})||{};typeof i.then=="function"&&i.then(r,c.onError)}else r()}flushPendingDeletes(){for(let t=0,r=this.pendingDeletes.length;t!==r;++t){let i=this.pendingDeletes[t];for(;i.nodesets.length;)this.removeNodes(i.nodesets.pop());i.data&&i.data[en]!==void 0&&delete i.data[en]}this.pendingDeletes=new Array}clearDeletedIndexes(){for(let t=this.indexesToDelete.length-1;t>=0;--t)this.firstLastNodesList.splice(this.indexesToDelete[t],1);this.indexesToDelete=new Array}updateIndexes(t){let r;for(let i=t,o=this.firstLastNodesList.length;i<o;++i)r=this.getContextStartingFrom(this.firstLastNodesList[i].first),r&&r.$index(i)}getContextStartingFrom(t){let r;for(;t;){if(r=Fe(t),r)return r;t=t.nextSibling}}static setSync(t){let r=c.global;t?Nt.animateFrame=function(i){i()}:Nt.animateFrame=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(i){return r.setTimeout(i,1e3/60)}}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}static get ForEach(){return this}static get PENDING_DELETE_INDEX_SYM(){return en}};d(Nt,"animateFrame");var tn=Nt;var es={foreach:tn};tn.setSync(!1);var fe=Symbol("Knockout native bindings"),Pe=class extends J{get FOR_NODE_TYPES(){return[Node.ELEMENT_NODE,Node.TEXT_NODE]}get preemptive(){return!0}nodeHasBindings(e,t){return e[fe]?Object.keys(e[fe]||{}).some(r=>r.startsWith("ko-")):!1}preprocessNode(e){return e[fe]?[e]:null}onlyBindings([e]){return e.startsWith("ko-")}valueAsAccessor([e,t]){let r=e.replace(/^ko-/,""),i=S(t)?t:()=>t;return{[r]:i}}getBindingAccessors(e,t){let r=Object.entries(e[fe]||{}).filter(this.onlyBindings);return r.length?Object.assign({},...r.map(this.valueAsAccessor)):null}static addValueToNode(e,t,r){let i=e[fe]||(e[fe]={});i[t]=r}static getNodeValues(e){return e[fe]}};var Va=25,Ha=1e3,Zr=new Array,Yr=null;function ts(n){Zr.push(n),ns()}function ns(){!Yr&&Zr.length&&(Yr=setTimeout($a,Va))}function $a(){Yr=null;let n=Zr.splice(0,Ha);for(let e of n)X(e);ns()}var wt=Symbol("Knockout - Original JSX"),Ln={svg:"http://www.w3.org/2000/svg",html:"http://www.w3.org/1999/xhtml",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"};function rs(n){return n&&typeof n[Symbol.iterator]=="function"}var ei=class n extends Z{constructor(t,r,i=null,o,s){super();d(this,"adoptedInsertBefore");d(this,"noInitialBinding");d(this,"insertBefore");d(this,"parentNode");d(this,"parentNodeTarget");d(this,"subscriptionsForNode");d(this,"nodeArrayOrObservableAtIndex");d(this,"xmlns");let a=r.nodeType===Node.COMMENT_NODE,u=this.getParentTarget(r);if(S(t))if(t.extend({trackArrayChanges:!0}),this.subscribe(t,this.observableArrayChange,"arrayChange"),i)this.adoptedInsertBefore=!0;else{let m=a?r.nextSibling:null;i=this.createComment("O"),u==null||u.insertBefore(i,m)}a&&!i&&(i=r.nextSibling,this.adoptedInsertBefore=!0),this.anchorTo(i||r),Object.assign(this,{insertBefore:i,noInitialBinding:s,parentNode:r,parentNodeTarget:u,xmlns:o,nodeArrayOrObservableAtIndex:[],subscriptionsForNode:new Map});let l=p(t);(gt(t)||l!=null)&&this.observableArrayChange(this.createInitialAdditions(l)),this.noInitialBinding=!1}getParentTarget(t){return"content"in t?t.content:t.nodeType===Node.COMMENT_NODE?t.parentNode:t}remove(){this.dispose()}dispose(){var i;super.dispose();let t=this.insertBefore;t&&this.parentNodeTarget===t.parentNode&&!this.adoptedInsertBefore&&((i=this.parentNodeTarget)==null||i.removeChild(t)),this.removeAllPriorNodes(),Object.assign(this,{parentNode:null,parentNodeTarget:null,insertBefore:null,nodeArrayOrObservableAtIndex:[]});for(let o of this.subscriptionsForNode.values())o.forEach(s=>s.dispose());this.subscriptionsForNode.clear()}createInitialAdditions(t){let r="added";return typeof t=="object"&&t!==null&&Symbol.iterator in t&&(t=[...t]),Array.isArray(t)?t.map((i,o)=>({index:o,status:r,value:i})):[{status:r,index:0,value:t}]}observableArrayChange(t){let r=[],i=[];for(let o in t){let s=t[o];s.status==="added"?r.push([s.index,s.value]):i.unshift([s.index,s.value])}i.forEach(o=>this.delChange(...o)),r.forEach(o=>this.addChange(...o))}addChange(t,r){this.nodeArrayOrObservableAtIndex.splice(t,0,this.injectNode(r,this.lastNodeFor(t)))}injectNode(t,r){var o;let i;if(S(t)){let{parentNode:s,xmlns:a}=this;i=[new n(t,s,r,a,this.noInitialBinding)]}else if(typeof t!="string"&&rs(t)){i=new Array;for(let s of t)i.unshift(this.injectNode(s,r))}else{let s=Fe(this.parentNode),a="content"in this.parentNode,u=s&&!a&&!this.noInitialBinding;Array.isArray(t)?i=t.map(l=>this.anyToNode(l)):i=[this.anyToNode(t)];for(let l of i)(o=this.parentNodeTarget)==null||o.insertBefore(l,r),u&&this.canApplyBindings(l)&&Et(s,l)}return i}canApplyBindings(t){return t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.COMMENT_NODE}delChange(t,r){this.removeNodeArrayOrObservable(this.nodeArrayOrObservableAtIndex[t]),this.nodeArrayOrObservableAtIndex.splice(t,1)}getSubscriptionsForNode(t){if(!this.subscriptionsForNode.has(t)){let r=new Array;return this.subscriptionsForNode.set(t,r),r}return this.subscriptionsForNode.get(t)}isJsx(t){return typeof t.elementName=="string"&&"children"in t&&"attributes"in t}anyToNode(t){if(Jn(t))return this.futureJsxNode(t);switch(typeof t){case"object":if(t instanceof Error)return this.createComment(t.toString());if(t===null)return this.createComment(String(t));if(t instanceof Node)return this.cloneJSXorMoveNode(t);if(Symbol.iterator in t)return t;break;case"function":return this.anyToNode(t());case"undefined":case"symbol":return this.createComment(String(t));case"string":return this.createTextNode(t);default:return this.createTextNode(String(t))}return this.isJsx(t)?this.jsxToNode(t):this.createComment(mi(t))}createComment(t){let r=document.createComment(t);return r[fe]=!0,r}createTextNode(t){let r=document.createTextNode(t);return r[fe]=!0,r}cloneJSXorMoveNode(t){return wt in t?this.jsxToNode(t[wt]):t}jsxToNode(t){let r=t.attributes.xmlns||Ln[t.elementName]||this.xmlns,i=document.createElementNS(r||Ln.html,t.elementName);return i[wt]=t,S(t.attributes)&&this.getSubscriptionsForNode(i).push(t.attributes.subscribe(s=>{this.updateAttributes(i,p(s))})),this.updateAttributes(i,p(t.attributes)),this.addDisposable(new n(t.children,i,null,r,this.noInitialBinding)),i}futureJsxNode(t){let r=F();t.then(r).catch(o=>r(o instanceof Error?o:Error(o)));let i=new n(r,this.parentNode,null,this.xmlns,this.noInitialBinding);return this.addDisposable(i),i.insertBefore}updateAttributes(t,r){let i=this.getSubscriptionsForNode(t),o=new Set([...t.attributes].map(s=>s.name));for(let[s,a]of Object.entries(r||{}))o.delete(s),S(a)&&i.push(a.subscribe(u=>this.setNodeAttribute(t,s,a))),this.setNodeAttribute(t,s,a);for(let s of o)this.setNodeAttribute(t,s,void 0)}getNamespaceOfAttribute(t){let[r,...i]=t.split(":");return r==="xmlns"||i.length&&Ln[r]?Ln[r]:null}setNodeAttribute(t,r,i){let o=p(i);if(Pe.addValueToNode(t,r,i),o===void 0)t.removeAttributeNS(null,r);else if(Jn(i))Promise.resolve(i).then(s=>this.setNodeAttribute(t,r,s));else{let s=this.getNamespaceOfAttribute(r);t.setAttributeNS(s,r,String(o))}}lastNodeFor(t){let r=this.nodeArrayOrObservableAtIndex[t]||[],[i]=r.slice(-1),o=i instanceof n?i.insertBefore:i||this.insertBefore;return o&&o.parentNode?o:null}removeAllPriorNodes(){let{nodeArrayOrObservableAtIndex:t}=this;for(;t.length;)this.removeNodeArrayOrObservable(t.pop())}removeNodeArrayOrObservable(t){for(let r of t){if(r instanceof n){r.dispose();continue}let i=r;delete i[wt],this.detachAndDispose(i);let o=this.subscriptionsForNode.get(i);o&&(o.forEach(s=>s.dispose()),this.subscriptionsForNode.delete(i))}}detachAndDispose(t){if(rs(t))for(let r of t)this.detachAndDispose(r);else t.remove();ts(t)}},nn=ei;function ti(n){if(S(n))return!0;let e=p(n);return e?e.elementName?!0:!(!Array.isArray(e)||!e.length||e[0]instanceof window.Node):!1}function ni(n){return n[wt]}var ja=0,rn=class extends qe{constructor(t){super(t);d(this,"childBindingContext");d(this,"currentLoadingOperationId");d(this,"currentViewModel");d(this,"latestComponentName");d(this,"loadingOperationId");d(this,"originalChildNodes");this.originalChildNodes=ue(C.childNodes(this.$element)),this.computed("computeApplyComponent")}cloneTemplateIntoElement(t,r,i){if(!r)throw new Error("Component '"+t+"' has no template");if(ti(r))C.emptyNode(i),this.addDisposable(new nn(r,i,null,void 0,!0));else{let o=ve(r);C.setDomNodeChildren(i,o)}}createViewModel(t,r,i,o){let s=t.createViewModel;return s?s.call(t,o,{element:r,templateNodes:i}):o}makeTemplateSlotNodes(t){return Object.assign({},...this.genSlotsByName(t))}*genSlotsByName(t){for(let r of t){if(r.nodeType!==Node.ELEMENT_NODE)continue;let i=r.getAttribute("slot");i&&(yield{[i]:r})}}computeApplyComponent(){let t=p(this.value),r,i;if(typeof t=="string"?r=t:(r=p(t.name),i=Pe.getNodeValues(this.$element)||p(t.params)),this.latestComponentName=r,!r)throw new Error("No component name specified");this.loadingOperationId=this.currentLoadingOperationId=++ja,Me.get(r,o=>this.applyComponentDefinition(r,i,o))}makeChildBindingContext(t){let r=i=>Object.assign(i,{$component:t,$componentTemplateNodes:this.originalChildNodes,$componentTemplateSlotNodes:this.makeTemplateSlotNodes(this.originalChildNodes)});return this.$context.createChildContext(t,void 0,r)}applyComponentDefinition(t,r,i){if(this.currentLoadingOperationId!==this.loadingOperationId||this.latestComponentName!==t)return;this.cleanUpState();let o=this.$element;if(!i)throw new Error("Unknown component '"+t+"'");i.template&&this.cloneTemplateIntoElement(t,i.template,o);let s=this.createViewModel(i,o,this.originalChildNodes,r);this.childBindingContext=this.makeChildBindingContext(s);let a=s&&s.template;if(!a&&!i.template)throw new Error("Component '"+t+"' has no template");i.template||this.cloneTemplateIntoElement(t,a,o),s instanceof Z&&s.anchorTo(this.$element),this.currentViewModel=s;let u=this.onBindingComplete.bind(this,s);this.applyBindingsToDescendants(this.childBindingContext,u)}onBindingComplete(t,r){t&&t.koDescendantsComplete&&t.koDescendantsComplete(this.$element),this.completeBinding(r)}cleanUpState(){let t=this.currentViewModel,r=t&&t.dispose;typeof r=="function"&&r.call(t),this.currentViewModel=null,this.currentLoadingOperationId=null}dispose(){this.cleanUpState(),super.dispose()}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};var on=class extends qe{constructor(e){super(e);let t=this.getSlot(this.value),r=Fe(t),i=this.$context.extend({$slotContext:r,$slotData:r&&r.$data});this.replaceSlotWithNode(this.$element,t),this.applyBindingsToDescendants(i)}replaceSlotWithNode(e,t){let r=this.cloneNodeFromOriginal(t);C.emptyNode(e),this.addDisposable(new nn(r,e,void 0,void 0,!0))}cloneNodeFromOriginal(e){if(!e)return[];let t=ni(e);return t?t.children:"content"in e?[...document.importNode(e.content,!0).childNodes]:(Array.isArray(e)?e:[e]).map(i=>i.cloneNode(!0))}getSlot(e){let{$componentTemplateSlotNodes:t}=this.$context;return e?t[e]:t[""]||[...this.$context.$componentTemplateNodes].filter(r=>!r.getAttribute||!r.getAttribute("slot"))}static get allowVirtualElements(){return!0}};var is={component:rn,slot:on};var Rn=String.prototype,os={uppercase:function(n){return Rn.toUpperCase.call(p(n))},lowercase:function(n){return Rn.toLowerCase.call(p(n))},default:function(n,e){return n=p(n),typeof n=="function"?n:typeof n=="string"?Rn.trim.call(n)===""?e:n:n==null||n.length==0?e:n},replace:function(n,e,t){return Rn.replace.call(p(n),e,t)},fit:function(n,e,t,r){if(n=p(n),e&&(""+n).length>e)switch(t=""+(t||"..."),e=e-t.length,n=""+n,r){case"left":return t+n.slice(-e);case"middle":{let i=Math.ceil(e/2);return n.substr(0,i)+t+n.slice(i-e)}default:return n.substr(0,e)+t}else return n},json:function(n,e,t){return JSON.stringify(pt(n),t,e)},number:function(n){return(+p(n)).toLocaleString()}};var Wa=/\bfunction\s*\(([^)]*)\)\s*\{\s*(?:(return\s)?([^}]+?)[;\s]*)?\}/g;function St(n){return n.replace(Wa,(e,t,r,i)=>{i&&!r&&(i+=" && undefined");let o=`(${t.trim()}) => ${i}`;return St.silent||console.log(`Knockout: Replace "${e}" with "${o}"`),o})}St.silent=!1;var ss=new Dt,Ua={preProcessBindings:n=>ss.preProcessBindings(n)},qa=new Ft({providers:[new Tt,ss,new vt,new Bt]}),Qa=new Kt({provider:qa,bindings:[Yo,So,Zo,is,{each:es.foreach}],extenders:{},filters:os,options:{bindingGlobals:c.global,bindingStringPreparsers:[St]}}),Ka="4.0.1",Ja=Qa.create({version:Ka,components:Me,Component:Me.ComponentABC,expressionRewriting:Ua});return ps(Ga);})();
|
|
14
|
+
`),Ke[n]=e}function Oi(n){return G(Ke,n)}function Fo(n){delete Ke[n],ce.clearCachedDefinition(n)}var ki={getConfig(n,e){let t=G(Ke,n)?Ke[n]:null;e(t)},loadComponent(n,e,t){let i=Ni(n);Si(i,e,function(r){Tu(n,i,r,t)})},loadTemplate(n,e,t){Bu(Ni(n),e,t)},loadViewModel(n,e,t){No(Ni(n),e,t)}},wi="createViewModel";function Tu(n,e,t,i){let r={},o=function(){--a===0&&i(r)},s=t.template,u=t.viewModel,a=2;s?Si(e,s,function(l){ce._getFirstResultFromLoaders("loadTemplate",[n,l],function(p){r.template=p,o()})}):o(),u?Si(e,u,function(l){ce._getFirstResultFromLoaders("loadViewModel",[n,l],function(p){r[wi]=p,o()})}):o()}function Bu(n,e,t){if(typeof e=="string")t(le(e));else if(e instanceof Array)t(e);else if(zn(e))t(ue(e.childNodes));else if(e.element){let i=e.element;if(pr(i))t(Bo(i));else if(typeof i=="string"){let r=document.getElementById(i);r?t(Bo(r)):n("Cannot find element with ID "+i)}else n("Unknown element type: "+i)}else e.elementName?t(e):n("Unknown template value: "+e)}function No(n,e,t){if(e[On])t((...i)=>e[On](...i));else if(typeof e=="function")t(function(i){return new e(i)});else if(typeof e[wi]=="function")t(e[wi]);else if("instance"in e){let i=e.instance;t(function(){return i})}else"viewModel"in e?No(n,e.viewModel,t):n("Unknown viewModel value: "+e)}function Bo(n){switch(V(n)){case"script":return le(n.text);case"textarea":return le(n.value);case"template":if(zn(n.content))return Ae(n.content.childNodes)}return Ae(n.childNodes)}function Si(n,e,t){typeof e.require=="string"?window.amdRequire||window.require?(window.amdRequire||window.require)([e.require],t,function(r){var s;let o=(s=r==null?void 0:r.message)!=null?s:String(r||"");n("Failed to load AMD module: "+e.require+(o?" \u2014 "+o:""))}):n("Uses require, but no AMD loader is present"):t(e)}function Ni(n){return function(e){throw new Error("Component '"+n+"': "+e)}}ce.loaders.push(ki);var _n=class extends Y{static get customElementName(){return this.name.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}static get template(){if("template"in this.prototype)return;let e=this.element;return e?{element:e}:void 0}static get element(){}static get sync(){return!0}static[On](e,t){return new this(e,t)}static register(e=this.customElementName){let t=this,{template:i}=this,r=this.sync;kn(e,{viewModel:t,template:i,synchronous:r})}};var _e={ComponentABC:_n,get:ce.get,clearCachedDefinition:ce.clearCachedDefinition,register:kn,isRegistered:Oi,unregister:Fo,defaultLoader:ki,_allRegisteredComponents:Ke,get loaders(){return ce.loaders},set loaders(n){ce.loaders=n}};var vt=class extends z{get FOR_NODE_TYPES(){return[Node.ELEMENT_NODE]}preprocessNode(e){if(e instanceof Element&&e.tagName==="SLOT"){let t=e.parentNode,i=e.getAttribute("name")||"",r=document.createComment(`ko slot: "${i}"`),o=document.createComment("/ko");if(!t)throw Error("Missing parent node");return t.insertBefore(r,e),t.insertBefore(o,e),t.removeChild(e),[r,o]}return null}nodeHasBindings(e){return!!this.getComponentNameForNode(e)}getBindingAccessors(e,t){let i=this.getComponentNameForNode(e);return i?{component:()=>({name:i,params:this.getComponentParams(e,t)})}:Object.create(null)}getComponentNameForNode(e){if(!(e instanceof Element)||e.nodeType!==Node.ELEMENT_NODE)return null;let t=V(e);if(_e.isRegistered(t)){let i=t.includes("-"),r=Object.prototype.toString.call(e)==="[object HTMLUnknownElement]";if(i||r)return t}return null}getComponentParams(e,t){if(!(e instanceof Element))return{$raw:{}};let i=new Se(e,t,this.globals),r=(e.getAttribute("params")||"").trim(),o=i.parse(r,t,void 0,e);if(!o||Object.keys(o).length===0)return{$raw:{}};let s=fe(o,a=>F(a,null,{disposeWhenNodeIsRemoved:e})),u=fe(s,a=>this.makeParamValue(e,a));return Object.assign({$raw:s},u)}makeParamValue(e,t){let i=t.peek();if(!t.isActive())return i;let r=K(i);return F({read:()=>m(t()),write:r?o=>t()(o):void 0,disposeWhenNodeIsRemoved:e})}};var Dt=class extends z{get FOR_NODE_TYPES(){return[Node.ELEMENT_NODE]}get PREFIX(){return"ko-"}getBindingAttributesList(e){return e instanceof Element?e.hasAttributes()?Array.from(e.attributes).filter(t=>t.name.startsWith(this.PREFIX)):[]:[]}nodeHasBindings(e){return this.getBindingAttributesList(e).length>0}getBindingAccessors(e,t){return Object.assign({},...this.handlersFromAttributes(e,t))}*handlersFromAttributes(e,t){for(let i of this.getBindingAttributesList(e))yield{[i.name.substring(this.PREFIX.length)]:()=>this.getValue(i.value,t,e)}}getValue(e,t,i){if(!e)return;let r=t.$data;switch(e){case"$element":return i;case"$context":return t;case"this":case"$data":return t.$data}if(r instanceof Object&&e in r)return r[e];if(e in t)return t[e];if(e in this.globals)return this.globals[e];throw new Error(`The variable '${e}' not found.`)}};var Tt=class extends z{constructor(t){super(t);d(this,"nodeTypes");d(this,"nodeTypeMap");d(this,"providers");let i=(t==null?void 0:t.providers)||[];this.nodeTypeMap={},this.nodeTypes=[],this.providers=[],i.forEach(r=>this.addProvider(r))}get FOR_NODE_TYPES(){return this.nodeTypes}setGlobals(t){[this,...this.providers].forEach(i=>i.globals=t)}addProvider(t){this.providers.push(t),t.bindingHandlers=this.bindingHandlers,t.globals=this.globals;let i=this.nodeTypeMap;for(let r of t.FOR_NODE_TYPES)i[r]||(i[r]=new Array),i[r].push(t);this.nodeTypes=Object.keys(this.nodeTypeMap).map(r=>parseInt(r,10))}providersFor(t){return this.nodeTypeMap[t.nodeType]||[]}nodeHasBindings(t,i){return this.providersFor(t).some(r=>r.nodeHasBindings(t))}preprocessNode(t){for(let i of this.providersFor(t)){let r=i.preprocessNode(t);if(r)return r}return null}*enumerateProviderBindings(t,i){for(let r of this.providersFor(t)){let o=r.getBindingAccessors(t,i);if(o&&(yield*Me(Object.entries(o||{})),r.preemptive))return}}getBindingAccessors(t,i){let r={};for(let[o,s]of this.enumerateProviderBindings(t,i)){if(o in r)throw new Error(`The binding "${o}" is duplicated by multiple providers`);r[o]=s}return r}};var wo={update:function(n,e,t){let i=m(e())||{};R(i,function(r,o){o=m(o);let s=r.indexOf(":"),u=s>0&&n.lookupNamespaceURI(r.substring(0,s)),a=o===!1||o===null||o===void 0;a?u?n.removeAttributeNS(u,r):n.removeAttribute(r):(o=o.toString(),u?n.setAttributeNS(u,r,o):n.setAttribute(r,o)),r==="name"&&(n.name=a?"":o)})}};var So={after:["value","attr"],init:function(n,e,t){let i=De(function(){if(t.has("checkedValue"))return m(t.get("checkedValue"));if(f)return t.has("value")?m(t.get("value")):n.value});function r(){let g=n.checked,x=i();if(D.isInitial()||!g&&(u||D.getDependenciesCount()))return;let N=D.ignore(e);if(l){let h=p?N.peek():N,O=y;y=x,O!==x?(g&&(et(h,x,!0),et(h,O,!1)),y=x):et(h,x,g),p&&K(N)&&N(h)}else{s&&(x===void 0?x=g:g||(x=void 0));let h=e(x,{onlyIfChanged:!0});K(h)&&h.peek()!==x&&h(x)}}function o(){let g=m(e()),x=i();l?(n.checked=W(g,x)>=0,y=x):s&&x===void 0?n.checked=!!g:n.checked=i()===g}let s=n.type=="checkbox",u=n.type=="radio";if(!s&&!u)return;let a=e(),l=s&&m(a)instanceof Array,p=!(l&&a.push&&a.splice),f=u||l,y=l?i():void 0;F(r,null,{disposeWhenNodeIsRemoved:n}),Q(n,"click",r),F(o,null,{disposeWhenNodeIsRemoved:n}),a=void 0}},Oo={update:function(n,e){n.value=m(e())}};function _o(n){return{init:function(e,t,i,r,o){let s=function(){let u={};return u[n]=t(),u};In.init.call(this,e,s,i,r,o)}}}function ko(n){return typeof n=="function"?{handler:n}:n||{}}var In={init:function(n,e,t,i,r){let o=e()||{};R(o,function(s,u){let{passive:a,capture:l,once:p,debounce:f,throttle:y}=ko(u),g=(l||a||p)&&{capture:l,passive:a,once:p},x=(N,...h)=>{let O,{handler:M,passive:b,bubble:w,preventDefault:v}=ko(e()[s]);try{if(M){let P=r.$data,j=[P,N,...h];O=M.apply(P,j)}}finally{v!==void 0?m(v)&&N.preventDefault():O!==!0&&(b||N.preventDefault())}let k=t.get(s+"Bubble")!==!1;(w===!1||!k)&&N.stopPropagation()};f&&(x=cn(x,f)),y&&(x=dn(x,y)),Q(n,s,x,g||!1)})}},Io={init:In.init,preprocess:function(n,e,t){t(e.replace("on.",""),"=>"+n)}};var Mo=_o("click");var zt={aliases:["class"],update:function(n,e){let t=m(e());t!==null&&typeof t=="object"?R(t,function(i,r){r=m(r),nt(n,i,r)}):(t=String(t!=null?t:"").trim(),nt(n,n[zt.classesWrittenByBindingKey],!1),n[zt.classesWrittenByBindingKey]=t,nt(n,t,!0))},classesWrittenByBindingKey:Symbol("__ko__cssValue")};var Gt=class extends Z{onDescendantsComplete(){typeof this.value=="function"&&this.value(this.$element)}static get allowVirtualElements(){return!0}};var _i={update:function(n,e){let t=m(e());t&&n.disabled?n.removeAttribute("disabled"):!t&&!n.disabled&&(n.disabled=!0)}},Po={update:function(n,e){_i.update(n,function(){return!m(e())})}};var Ii=Symbol("__ko_hasfocusUpdating"),Mi=Symbol("__ko_hasfocusLastValue"),Pi={init:function(n,e,t){let i=function(s){n[Ii]=!0;let u=n.ownerDocument;if("activeElement"in u){let l;try{l=u.activeElement}catch(p){l=u.body}s=l===n}let a=e(s,{onlyIfChanged:!0});K(a)&&a.peek()!==s&&a(s),n[Mi]=s,n[Ii]=!1},r=i.bind(null,!0),o=i.bind(null,!1);Q(n,"focus",r),Q(n,"focusin",r),Q(n,"blur",o),Q(n,"focusout",o)},update:function(n,e){let t=!!m(e());!n[Ii]&&n[Mi]!==t&&(t?n.focus():n.blur(),!t&&n[Mi]&&n.ownerDocument.body.focus(),D.ignore(Re,null,[n,t?"focusin":"focusout"]))}};var Ro={init:function(){return{controlsDescendantBindings:!0}},update:function(n,e){ot(n,e())},allowVirtualElements:!0};var Lo={init:function(n,e,t,i,r){let o=r.extend(e);return oe(o,n),{controlsDescendantBindings:!0}},allowVirtualElements:!0};var Ri={},Vo={init:function(n){if(V(n)!=="select")throw new Error("options binding applies only to SELECT elements");for(;n.length>0;)n.remove(0);return{controlsDescendantBindings:!0}},update:function(n,e,t){function i(){return Pe(n.options,function(b){return b.selected})}let r=n.length==0,o=n.multiple,s=!r&&o?n.scrollTop:null,u=m(e()),a=t.get("valueAllowUnset")&&t.has("value"),l=t.get("optionsIncludeDestroyed"),p={},f,y,g=new Array;a||(o?g=Xe(i(),_.readValue):n.selectedIndex>=0&&g.push(_.readValue(n.options[n.selectedIndex]))),u&&(typeof u.length=="undefined"&&(u=[u]),y=Pe(u,function(b){return l||b===void 0||b===null||!m(b._destroy)}),t.has("optionsCaption")&&(f=m(t.get("optionsCaption")),f!=null&&y.unshift(Ri)));function x(b,w,v){let k=typeof w;return k==="function"?w(b):k=="string"?b[w]:v}let N=!1;function h(b,w,v){v.length&&(g=!a&&v[0].selected?[_.readValue(v[0])]:[],N=!0);let k=n.ownerDocument.createElement("option");if(b===Ri)He(k,t.get("optionsCaption")),_.writeValue(k,void 0);else{let P=x(b,t.get("optionsValue"),b);_.writeValue(k,m(P));let j=x(b,t.get("optionsText"),P);He(k,j)}return[k]}p.beforeRemove=function(b){n.removeChild(b)};function O(b,w){if(N&&a)_.writeValue(n,m(t.get("value")),!0);else if(g.length){let v=W(g,_.readValue(w[0]))>=0;mn(w[0],v),N&&!v&&D.ignore(Re,null,[n,"change"])}}let M=O;t.has("optionsAfterRender")&&typeof t.get("optionsAfterRender")=="function"&&(M=function(b,w){O(b,w),D.ignore(t.get("optionsAfterRender"),null,[w[0],b!==Ri?b:void 0])}),bt(n,y,h,p,M),D.ignore(function(){if(a)_.writeValue(n,m(t.get("value")),!0);else{let b;o?b=g.length&&i().length<g.length:b=g.length&&n.selectedIndex>=0?_.readValue(n.options[n.selectedIndex])!==g[0]:g.length||n.selectedIndex>=0,b&&Re(n,"change")}}),s&&Math.abs(s-n.scrollTop)>20&&(n.scrollTop=s)}};var Ho={after:["options","foreach"],init:function(n,e,t){Q(n,"change",function(){let i=e(),r=new Array;L(n.getElementsByTagName("option"),function(o){o.selected&&r.push(_.readValue(o))}),e(r)})},update:function(n,e){if(V(n)!="select")throw new Error("values binding applies only to SELECT elements");let t=m(e()),i=n.scrollTop;t&&typeof t.length=="number"&&L(n.getElementsByTagName("option"),function(r){let o=W(t,_.readValue(r))>=0;r.selected!=o&&mn(r,o)}),n.scrollTop=i}};var $o={update:function(n,e){let t=m(e()||{});R(t,function(i,r){if(r=m(r),(r==null||r===!1)&&(r=""),c.jQuery)c.jQuery(n).css(i,r);else{i=i.replace(/-(\w)/g,(s,u)=>u.toUpperCase());let o=n.style[i];n.style[i]=r,r!==o&&n.style[i]===o&&!isNaN(r)&&(n.style[i]=r+"px")}})}};var jo={init:function(n,e,t,i,r){if(typeof e()!="function")throw new Error("The value for a submit binding must be a function");Q(n,"submit",function(o){let s,u=e();try{s=u.call(r.$data,n)}finally{s!==!0&&(o.preventDefault?o.preventDefault():o.returnValue=!1)}})}};var Wo={init:function(){return{controlsDescendantBindings:!0}},update:function(n,e){He(n,e())},allowVirtualElements:!0};var Ui=/MSIE ([^ ;]+)|rv:([^ )]+)/,Li,Vi,Hi,Bt=class extends Z{constructor(...t){super(...t);d(this,"previousElementValue");d(this,"elementValueBeforeEvent");d(this,"timeoutHandle");this.previousElementValue=this.$inputElement.value,c.debug&&this.constructor._forceUpdateOn&&L(this.constructor._forceUpdateOn,i=>{i.slice(0,5)==="after"?this.addEventListener(i.slice(5),"deferUpdateModel"):this.addEventListener(i,"updateModel")});for(let i of this.eventsIndicatingSyncValueChange())this.addEventListener(i,"updateModel");for(let i of this.eventsIndicatingDeferValueChange())this.addEventListener(i,"deferUpdateModel");this.computed("updateView")}get aliases(){return"textinput"}get $inputElement(){return this.$element}eventsIndicatingSyncValueChange(){return["input","change","blur"]}eventsIndicatingDeferValueChange(){return[]}updateModel(t){let i=this.$inputElement;clearTimeout(this.timeoutHandle),this.elementValueBeforeEvent=this.timeoutHandle=void 0;let r=i.value;this.previousElementValue!==r&&(c.debug&&t&&(i._ko_textInputProcessedEvent=t.type),this.previousElementValue=r,this.value=r)}deferUpdateModel(t){let i=this.$inputElement;if(!this.timeoutHandle){this.elementValueBeforeEvent=i.value;let r=c.debug?this.updateModel.bind(this,{type:t.type}):this.updateModel;this.timeoutHandle=ae(r,4)}}updateView(){let t=m(this.value);t==null&&(t=""),this.elementValueBeforeEvent!==void 0&&t===this.elementValueBeforeEvent?setTimeout(this.updateView.bind(this),4):this.$inputElement.value!==t&&(this.previousElementValue=t,this.$inputElement.value=t,this.previousElementValue=this.$inputElement.value)}},$i=class extends Bt{eventsIndicatingSyncValueChange(){return[...super.eventsIndicatingSyncValueChange(),"keypress"]}},ji=class extends Bt{eventsIndicatingDeferValueChange(){return["keydown","paste","cut"]}},Wi=class extends Bt{eventsIndicatingDeferValueChange(){return["keydown"]}},Xt=c.global;if(Xt.navigator){let n=i=>i&&parseFloat(i[1]),e=Xt.navigator.userAgent;if(!e.match(/Chrome\/([^ ]+)/)){Li=Xt.opera&&Xt.opera.version&&parseInt(Xt.opera.version()),Vi=n(e.match(/Version\/([^ ]+) Safari/));let i=e.match(Ui);Hi=i&&(parseFloat(i[1])||parseFloat(i[2]))}}var qi=Hi&&Hi<=11?$i:Vi&&Vi<5?ji:Li&&Li<11?Wi:Bt;var Ki={init:function(n,e){if(e()){let t="ko_unique_"+ ++Ki.currentIndex;n.name=t}},currentIndex:0};var Mn=class extends Z{constructor(...t){super(...t);d(this,"elementValueBeforeEvent");d(this,"propertyChangedFired");d(this,"updateFromModel");if(this.isCheckboxOrRadio){Kt(this.$element,{checkedValue:this.valueAccessor});return}this.propertyChangedFired=!1,this.elementValueBeforeEvent=null,this.ieAutoCompleteHackNeeded&&(this.addEventListener("propertyChange",()=>this.propertyChangedFired=!0),this.addEventListener("focus",()=>this.propertyChangedFired=!1),this.addEventListener("blur",()=>this.propertyChangedFired&&this.valueUpdateHandler())),L(this.eventsToCatch,i=>this.registerEvent(i)),this.isInput(this.$element)&&this.$element.type==="file"?this.updateFromModel=this.updateFromModelForFile:this.updateFromModel=this.updateFromModelForValue,this.computed("updateFromModel")}static get after(){return["options","foreach","template"]}get eventsToCatch(){let t=this.allBindings.get("valueUpdate"),i=typeof t=="string"?[t]:t||[];return[...new Set(["change",...i])]}isInput(t){return V(this.$element)==="input"}get isCheckboxOrRadio(){let t=this.$element;return this.isInput(t)&&(t.type=="checkbox"||t.type=="radio")}get ieAutoCompleteHackNeeded(){return this.isInput(this.$element)&&this.$element.type=="text"&&this.$element.autocomplete!="off"&&(!this.$element.form||this.$element.form.autocomplete!="off")&&Ui.test(window.navigator.userAgent)}valueUpdateHandler(){this.elementValueBeforeEvent=null,this.propertyChangedFired=!1,this.value=_.readValue(this.$element)}registerEvent(t){let i=this.valueUpdateHandler.bind(this);t.startsWith("after")&&(i=()=>{this.elementValueBeforeEvent=_.readValue(this.$element),ae(this.valueUpdateHandler.bind(this),0)},t=t.substring(5)),this.addEventListener(t,i)}updateFromModelForFile(){let t=m(this.value);t==null||t===""?this.$element.value="":D.ignore(this.valueUpdateHandler,this)}updateFromModelForValue(){let t=this.$element,i=m(this.value),r=_.readValue(t);if(this.elementValueBeforeEvent!==null&&i===this.elementValueBeforeEvent){ae(this.updateFromModel.bind(this),0);return}if(!(i===r&&r!==void 0))if(V(t)==="select"){let o=this.allBindings.get("valueAllowUnset");_.writeValue(t,i,o),!o&&i!==_.readValue(t)&&D.ignore(this.valueUpdateHandler,this)}else _.writeValue(t,i)}};var Qi={update:function(n,e){let t=m(e()),i=n.style.display!=="none";t&&!i?n.style.display="":!t&&i&&(n.style.display="none")}},Uo={update:function(n,e){Qi.update.call(this,n,()=>!m(e()))}};var qo={init:function(n,e,t,i,r){let o=r.createChildContext(e);return oe(o,n),{controlsDescendantBindings:!0}},allowVirtualElements:!0};var Ko={attr:wo,checked:So,checkedValue:Oo,click:Mo,css:zt,class:zt,descendantsComplete:Gt,enable:_i,event:In,disable:Po,hasfocus:Pi,hasFocus:Pi,hidden:Uo,html:Ro,let:Lo,on:Io,options:Vo,selectedOptions:Ho,style:$o,submit:jo,text:Wo,textInput:qi,textinput:qi,uniqueName:Ki,using:qo,value:Mn,visible:Qi};var Qe=class extends ee{constructor(t){super(t);d(this,"completesElseChain");d(this,"hasElse");d(this,"ifElseNodes");this.hasElse=this.detectElse(this.$element);let i=this.completesElseChain=B();A.set(this.$element,"conditional",{elseChainSatisfied:i})}get bindingContext(){throw new Error("bindingContext() must be implemented in the child class")}getIfElseNodes(){if(this.ifElseNodes)return this.ifElseNodes;if(D.getDependenciesCount()||this.hasElse)return this.cloneIfElseNodes(this.$element,this.hasElse)}renderStatus(){throw new Error("renderStatus() must be implemented in the child class")}render(){let t=!this.ifElseNodes,{shouldDisplay:i}=this.renderStatus();if(this.ifElseNodes=this.getIfElseNodes()||{},i){let r=t&&!this.hasElse;this.renderAndApplyBindings(this.ifElseNodes.ifNodes,r)}else this.hasElse?this.renderAndApplyBindings(this.ifElseNodes.elseNodes):C.emptyNode(this.$element)}renderAndApplyBindings(t,i){return Ge(this,null,function*(){i||C.setDomNodeChildren(this.$element,Ae(t));let r=yield oe(this.bindingContext,this.$element);this.completeBinding(r)})}get elseChainIsAlreadySatisfied(){return!1}isElseNode(t){return t.nodeType===Node.COMMENT_NODE&&t.nodeValue.trim().toLowerCase()==="else"}detectElse(t){let i=C.childNodes(t);for(let r=0,o=i.length;r<o;++r)if(this.isElseNode(i[r]))return!0;return!1}cloneIfElseNodes(t,i){let r=C.childNodes(t),o=new Array,s=new Array,u=o;for(let a=0,l=r.length;a<l;++a)i&&this.isElseNode(r[a])?(u=s,i=!1):u.push(J(r[a].cloneNode(!0)));return{ifNodes:o,elseNodes:s}}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};var Je=class extends Qe{constructor(...t){super(...t);d(this,"ifCondition");this.ifCondition=this.computed(()=>!!m(this.value)),this.computed("render")}shouldDisplayIf(){return this.ifCondition()}get bindingContext(){return this.ifCondition.isActive()?this.$context.extend(()=>(this.ifCondition(),null)):this.$context}renderStatus(){let t=this.shouldDisplayIf();return this.elseChainIsAlreadySatisfied?(t=!1,this.completesElseChain(!0)):this.completesElseChain(t),{shouldDisplay:t}}},Yt=class extends Je{shouldDisplayIf(){return!super.shouldDisplayIf()}};var Pn=class extends Qe{constructor(...t){super(...t);d(this,"asOption");d(this,"conditional");this.asOption=this.allBindings.get("as");let i=this.asOption&&!c.createChildContextWithAs?()=>!!m(this.value):()=>m(this.value);this.conditional=this.computed(i),this.computed("render")}get bindingContext(){return this.asOption?c.createChildContextWithAs?this.$context.createChildContext(this.value,this.asOption):this.$context.extend({[this.asOption]:this.value}):this.$context.createChildContext(this.valueAccessor)}renderStatus(){return{shouldDisplay:!!this.conditional()}}};var Zt=class extends Je{constructor(){super(...arguments);d(this,"_elseChain")}shouldDisplayIf(){return super.shouldDisplayIf()||this.value===void 0}get elseChainIsAlreadySatisfied(){return this._elseChain||(this._elseChain=this.readElseChain()),m(this._elseChain.elseChainSatisfied)}readElseChain(){let t=this.$element;do t=t.previousSibling;while(t&&t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.COMMENT_NODE);return t?(t.nodeType===Node.COMMENT_NODE&&(t=C.previousSibling(t)),A.get(t,"conditional")||{}):!1}};var Qo={if:Je,with:Pn,ifnot:Yt,unless:Yt,else:Zt,elseif:Zt};var Fu=Number.MAX_SAFE_INTEGER;function Nu(n){return!!n&&typeof n=="object"&&n.constructor===Object}var wu=c.document&&typeof c.document.createDocumentFragment=="function";function Su(n){let e=document.createElement("div"),t;return n.content?t=n.content:n.tagName==="SCRIPT"?(t=document.createElement("div"),t.innerHTML=n.text):t=n,L(C.childNodes(t),function(i){i&&e.insertBefore(i.cloneNode(!0),null)}),e}function Ou(n,e){return{status:"added",value:n,index:e}}var en=Symbol("_ko_ffe_pending_delete_index"),Ft=class Ft extends ee{constructor(t){var o;super(t);d(this,"afterAdd");d(this,"as");d(this,"beforeRemove");d(this,"container");d(this,"changeSubs");d(this,"data");d(this,"generateContext");d(this,"$indexHasBeenRequested");d(this,"templateNode");d(this,"changeQueue");d(this,"firstLastNodesList");d(this,"indexesToDelete");d(this,"isNotEmpty");d(this,"rendering_queued");d(this,"pendingDeletes");d(this,"afterQueueFlush");d(this,"beforeQueueFlush");let i={};Nu(this.value)&&Object.assign(i,this.value),this.as=i.as||this.allBindings.get("as"),this.data=i.data||(m(this.$context.$rawData)===this.value?this.$context.$rawData:this.value),this.container=C.isStartComment(this.$element)?this.$element.parentNode:this.$element,this.generateContext=this.createContextGenerator(this.as),this.$indexHasBeenRequested=!1,this.templateNode=Su(i.templateNode||(i.name?(o=document.getElementById(i.name))==null?void 0:o.cloneNode(!0):this.$element)),["afterAdd","beforeRemove","afterQueueFlush","beforeQueueFlush"].forEach(s=>{this[s]=i[s]||this.allBindings.get(s)}),this.changeQueue=new Array,this.firstLastNodesList=new Array,this.indexesToDelete=new Array,this.rendering_queued=!1,this.pendingDeletes=new Array,this.isNotEmpty=B(!!m(this.data).length),A.set(this.$element,"conditional",{elseChainSatisfied:this.isNotEmpty}),C.emptyNode(this.$element);let r=m(this.data);r&&r.map?this.onArrayChange(r.map(Ou),!0):this.completeBinding(),S(this.data)&&(this.data.indexOf||(this.data=this.data.extend({trackArrayChanges:!0})),this.changeSubs=this.data.subscribe(this.onArrayChange,this,"arrayChange"))}dispose(){this.changeSubs&&this.changeSubs.dispose(),this.flushPendingDeletes()}onArrayChange(t,i){let r={added:[],deleted:[]};for(let o=0,s=t.length;o<s;o++){if(r.added.length&&t[o].status==="added"){let u=r.added[r.added.length-1];if((u.isBatch?u.index+u.values.length-1:u.index)+1===t[o].index){u.isBatch||(u={isBatch:!0,status:"added",index:u.index,values:[u.value]},r.added.splice(r.added.length-1,1,u)),u.values.push(t[o].value);continue}}r[t[o].status].push(t[o])}r.deleted.length>0&&(this.changeQueue.push.apply(this.changeQueue,r.deleted),this.changeQueue.push({status:"clearDeletedIndexes"})),this.changeQueue.push.apply(this.changeQueue,r.added),this.changeQueue.length>0&&!this.rendering_queued&&(this.rendering_queued=!0,i?this.processQueue():Ft.animateFrame.call(window,()=>this.processQueue()))}startQueueFlush(){typeof this.beforeQueueFlush=="function"&&this.beforeQueueFlush(this.changeQueue)}endQueueFlush(){typeof this.afterQueueFlush=="function"&&this.afterQueueFlush(this.changeQueue)}processQueue(){let t=!m(this.data).length,i=Fu;this.startQueueFlush(),L(this.changeQueue,r=>{typeof r.index=="number"&&(i=Math.min(i,r.index)),this[r.status](r)}),this.flushPendingDeletes(),this.rendering_queued=!1,this.$indexHasBeenRequested&&this.updateIndexes(i),this.endQueueFlush(),this.changeQueue=new Array,t!==!this.isNotEmpty()&&this.isNotEmpty(!t)}_first$indexRequest(t){this.$indexHasBeenRequested=!0;for(let i=0,r=this.firstLastNodesList.length;i<r;++i){let o=this.getContextStartingFrom(this.firstLastNodesList[i].first);o&&(o.$index=B(i))}return t.$index()}_contextExtensions(t){return Object.assign(t,{$list:this.data}),this.$indexHasBeenRequested?t.$index=t.$index||B():Object.defineProperty(t,"$index",{value:()=>this._first$indexRequest(t),configurable:!0,writable:!0}),t}createContextGenerator(t){let i=this.$context;return t?r=>this._contextExtensions(i.extend({[t]:r})):r=>i.createChildContext(r,void 0,o=>this._contextExtensions(o))}updateFirstLastNodesList(t,i){let r=i[0],o=i[i.length-1];this.firstLastNodesList.splice(t,0,{first:r,last:o})}added(t){let i=t.index,r=t.isBatch?t.values:[t.value],o=this.getLastNodeBeforeIndex(i),s=[],u=new Array,a;for(let l=0,p=r.length;l<p;++l){let f=this.getPendingDeleteFor(r[l]);if(f&&f.nodesets.length)a=f.nodesets.pop(),this.updateFirstLastNodesList(i+l,a);else{let y=this.templateNode.cloneNode(!0);a=C.childNodes(y),this.updateFirstLastNodesList(i+l,a);let g=oe(this.generateContext(r[l]),y);u.push(g)}s.push(...a)}typeof this.afterAdd=="function"?this.afterAdd({nodeOrArrayInserted:this.insertAllAfter(s,o),foreachInstance:this}):this.insertAllAfter(s,o),this.completeBinding(Promise.all(u))}getNodesForIndex(t){let i=new Array,r=this.firstLastNodesList[t].first,o=this.firstLastNodesList[t].last;for(i.push(r);r&&r!==o;)r=r.nextSibling,i.push(r);return i}getLastNodeBeforeIndex(t){return t<1||t-1>=this.firstLastNodesList.length?null:this.firstLastNodesList[t-1].last}activeChildElement(t){let i=document.activeElement;return Jn(i,t)?i:null}insertAllAfter(t,i){let r,o,s,u=null,a=this.$element;if(t.nodeType===void 0&&t.length===void 0)throw new Error("Expected a single node or a node array");if(t.nodeType!==void 0)return u=this.activeChildElement(t),C.insertAfter(a,t,i),[t];if(t.length===1)u=this.activeChildElement(t[0]),C.insertAfter(a,t[0],i);else if(wu){for(r=document.createDocumentFragment(),s=0,o=t.length;s!==o;++s)u=u||this.activeChildElement(t[s]),r.appendChild(t[s]);C.insertAfter(a,r,i)}else for(s=t.length-1;s>=0;--s){u=u||this.activeChildElement(t[s]);let l=t[s];if(!l)break;C.insertAfter(a,l,i)}return u&&u.focus(),t}shouldDelayDeletion(t){return t&&(typeof t=="object"||typeof t=="function")}getPendingDeleteFor(t){let i=t&&t[en];return i===void 0?null:this.pendingDeletes[i]}getOrCreatePendingDeleteFor(t){let i=this.getPendingDeleteFor(t);return i||(i={data:t,nodesets:[]},t[en]=this.pendingDeletes.length,this.pendingDeletes.push(i),i)}deleted(t){this.shouldDelayDeletion(t.value)?this.getOrCreatePendingDeleteFor(t.value).nodesets.push(this.getNodesForIndex(t.index)):this.removeNodes(this.getNodesForIndex(t.index)),this.indexesToDelete.push(t.index)}removeNodes(t){if(!t.length)return;function i(){let r=t[0].parentNode;for(let o=t.length-1;o>=0;--o)J(t[o]),r.removeChild(t[o])}if(this.beforeRemove){let r=this.beforeRemove({nodesToRemove:t,foreachInstance:this})||{};typeof r.then=="function"&&r.then(i,c.onError)}else i()}flushPendingDeletes(){for(let t=0,i=this.pendingDeletes.length;t!==i;++t){let r=this.pendingDeletes[t];for(;r.nodesets.length;)this.removeNodes(r.nodesets.pop());r.data&&r.data[en]!==void 0&&delete r.data[en]}this.pendingDeletes=new Array}clearDeletedIndexes(){for(let t=this.indexesToDelete.length-1;t>=0;--t)this.firstLastNodesList.splice(this.indexesToDelete[t],1);this.indexesToDelete=new Array}updateIndexes(t){let i;for(let r=t,o=this.firstLastNodesList.length;r<o;++r)i=this.getContextStartingFrom(this.firstLastNodesList[r].first),i&&i.$index(r)}getContextStartingFrom(t){let i;for(;t;){if(i=Be(t),i)return i;t=t.nextSibling}}static setSync(t){let i=c.global;t?Ft.animateFrame=function(r){r()}:Ft.animateFrame=i.requestAnimationFrame||i.webkitRequestAnimationFrame||i.mozRequestAnimationFrame||i.msRequestAnimationFrame||function(r){return i.setTimeout(r,1e3/60)}}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}static get ForEach(){return this}static get PENDING_DELETE_INDEX_SYM(){return en}};d(Ft,"animateFrame");var tn=Ft;var Jo={foreach:tn};tn.setSync(!1);var pe=Symbol("Knockout native bindings"),Ie=class extends z{get FOR_NODE_TYPES(){return[Node.ELEMENT_NODE,Node.TEXT_NODE]}get preemptive(){return!0}nodeHasBindings(e,t){return e[pe]?Object.keys(e[pe]||{}).some(i=>i.startsWith("ko-")):!1}preprocessNode(e){return e[pe]?[e]:null}onlyBindings([e]){return e.startsWith("ko-")}valueAsAccessor([e,t]){let i=e.replace(/^ko-/,""),r=S(t)?t:()=>t;return{[i]:r}}getBindingAccessors(e,t){let i=Object.entries(e[pe]||{}).filter(this.onlyBindings);return i.length?Object.assign({},...i.map(this.valueAsAccessor)):null}static addValueToNode(e,t,i){let r=e[pe]||(e[pe]={});r[t]=i}static getNodeValues(e){return e[pe]}};var ku=25,nn=new Array,Nt=null;kt("jsxCleanBatchSize",{default:1e3});function zo(n){nn.push(n),c.jsxCleanBatchSize===0?Xo():Go()}function Go(){!Nt&&nn.length&&(Nt=setTimeout(_u,ku))}function _u(){Nt=null;let n=Math.trunc(c.jsxCleanBatchSize);if(!Number.isFinite(n)||n<=0){Xo();return}let e=nn.splice(0,n);for(let t of e)J(t);Go()}function Xo(){for(Nt!==null&&(clearTimeout(Nt),Nt=null);nn.length;)for(let n of nn.splice(0))J(n)}var wt=Symbol("Knockout - Original JSX"),Rn={svg:"http://www.w3.org/2000/svg",html:"http://www.w3.org/1999/xhtml",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"};function Yo(n){return n&&typeof n[Symbol.iterator]=="function"}var Ji=class n extends Y{constructor(t,i,r=null,o,s){super();d(this,"adoptedInsertBefore");d(this,"noInitialBinding");d(this,"insertBefore");d(this,"parentNode");d(this,"parentNodeTarget");d(this,"subscriptionsForNode");d(this,"nodeArrayOrObservableAtIndex");d(this,"xmlns");let u=i.nodeType===Node.COMMENT_NODE,a=this.getParentTarget(i);if(S(t))if(t.extend({trackArrayChanges:!0}),this.subscribe(t,this.observableArrayChange,"arrayChange"),r)this.adoptedInsertBefore=!0;else{let f=u?i.nextSibling:null;r=this.createComment("O"),a==null||a.insertBefore(r,f)}u&&!r&&(r=i.nextSibling,this.adoptedInsertBefore=!0),this.anchorTo(r||i),Object.assign(this,{insertBefore:r,noInitialBinding:s,parentNode:i,parentNodeTarget:a,xmlns:o,nodeArrayOrObservableAtIndex:[],subscriptionsForNode:new Map});let l=m(t);(mt(t)||l!=null)&&this.observableArrayChange(this.createInitialAdditions(l)),this.noInitialBinding=!1}getParentTarget(t){return"content"in t?t.content:t.nodeType===Node.COMMENT_NODE?t.parentNode:t}remove(){this.dispose()}dispose(){var r;super.dispose();let t=this.insertBefore;t&&this.parentNodeTarget===t.parentNode&&!this.adoptedInsertBefore&&((r=this.parentNodeTarget)==null||r.removeChild(t)),this.removeAllPriorNodes(),Object.assign(this,{parentNode:null,parentNodeTarget:null,insertBefore:null,nodeArrayOrObservableAtIndex:[]});for(let o of this.subscriptionsForNode.values())o.forEach(s=>s.dispose());this.subscriptionsForNode.clear()}createInitialAdditions(t){let i="added";return typeof t=="object"&&t!==null&&Symbol.iterator in t&&(t=[...t]),Array.isArray(t)?t.map((r,o)=>({index:o,status:i,value:r})):[{status:i,index:0,value:t}]}observableArrayChange(t){let i=[],r=[];for(let o in t){let s=t[o];s.status==="added"?i.push([s.index,s.value]):r.unshift([s.index,s.value])}r.forEach(o=>this.delChange(...o)),i.forEach(o=>this.addChange(...o))}addChange(t,i){this.nodeArrayOrObservableAtIndex.splice(t,0,this.injectNode(i,this.lastNodeFor(t)))}injectNode(t,i){var o;let r;if(S(t)){let{parentNode:s,xmlns:u}=this;r=[new n(t,s,i,u,this.noInitialBinding)]}else if(typeof t!="string"&&Yo(t)){r=new Array;for(let s of t)r.unshift(this.injectNode(s,i))}else{let s=Be(this.parentNode),u="content"in this.parentNode,a=s&&!u&&!this.noInitialBinding;Array.isArray(t)?r=t.map(l=>this.anyToNode(l)):r=[this.anyToNode(t)];for(let l of r)(o=this.parentNodeTarget)==null||o.insertBefore(l,i),a&&this.canApplyBindings(l)&&yt(s,l)}return r}canApplyBindings(t){return t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.COMMENT_NODE}delChange(t,i){this.removeNodeArrayOrObservable(this.nodeArrayOrObservableAtIndex[t]),this.nodeArrayOrObservableAtIndex.splice(t,1)}getSubscriptionsForNode(t){if(!this.subscriptionsForNode.has(t)){let i=new Array;return this.subscriptionsForNode.set(t,i),i}return this.subscriptionsForNode.get(t)}isJsx(t){return typeof t.elementName=="string"&&"children"in t&&"attributes"in t}anyToNode(t){if(Qn(t))return this.futureJsxNode(t);switch(typeof t){case"object":if(t instanceof Error)return this.createComment(t.toString());if(t===null)return this.createComment(String(t));if(t instanceof Node)return this.cloneJSXorMoveNode(t);if(Symbol.iterator in t)return t;break;case"function":return this.anyToNode(t());case"undefined":case"symbol":return this.createComment(String(t));case"string":return this.createTextNode(t);default:return this.createTextNode(String(t))}return this.isJsx(t)?this.jsxToNode(t):this.createComment(lr(t))}createComment(t){let i=document.createComment(t);return i[pe]=!0,i}createTextNode(t){let i=document.createTextNode(t);return i[pe]=!0,i}cloneJSXorMoveNode(t){return wt in t?this.jsxToNode(t[wt]):t}jsxToNode(t){let i=t.attributes.xmlns||Rn[t.elementName]||this.xmlns,r=document.createElementNS(i||Rn.html,t.elementName);return r[wt]=t,S(t.attributes)&&this.getSubscriptionsForNode(r).push(t.attributes.subscribe(s=>{this.updateAttributes(r,m(s))})),this.updateAttributes(r,m(t.attributes)),this.addDisposable(new n(t.children,r,null,i,this.noInitialBinding)),r}futureJsxNode(t){let i=B();t.then(i).catch(o=>i(o instanceof Error?o:Error(o)));let r=new n(i,this.parentNode,null,this.xmlns,this.noInitialBinding);return this.addDisposable(r),r.insertBefore}updateAttributes(t,i){let r=this.getSubscriptionsForNode(t),o=new Set([...t.attributes].map(s=>s.name));for(let[s,u]of Object.entries(i||{}))o.delete(s),S(u)&&r.push(u.subscribe(a=>this.setNodeAttribute(t,s,u))),this.setNodeAttribute(t,s,u);for(let s of o)this.setNodeAttribute(t,s,void 0)}getNamespaceOfAttribute(t){let[i,...r]=t.split(":");return i==="xmlns"||r.length&&Rn[i]?Rn[i]:null}setNodeAttribute(t,i,r){let o=m(r);if(Ie.addValueToNode(t,i,r),o===void 0)t.removeAttributeNS(null,i);else if(Qn(r))Promise.resolve(r).then(s=>this.setNodeAttribute(t,i,s));else{let s=this.getNamespaceOfAttribute(i);t.setAttributeNS(s,i,String(o))}}lastNodeFor(t){let i=this.nodeArrayOrObservableAtIndex[t]||[],[r]=i.slice(-1),o=r instanceof n?r.insertBefore:r||this.insertBefore;return o&&o.parentNode?o:null}removeAllPriorNodes(){let{nodeArrayOrObservableAtIndex:t}=this;for(;t.length;)this.removeNodeArrayOrObservable(t.pop())}removeNodeArrayOrObservable(t){for(let i of t){if(i instanceof n){i.dispose();continue}let r=i;delete r[wt],this.detachAndDispose(r);let o=this.subscriptionsForNode.get(r);o&&(o.forEach(s=>s.dispose()),this.subscriptionsForNode.delete(r))}}detachAndDispose(t){if(Yo(t))for(let i of t)this.detachAndDispose(i);else t.remove();zo(t)}},rn=Ji;function zi(n){if(S(n))return!0;let e=m(n);return e?e.elementName?!0:!(!Array.isArray(e)||!e.length||e[0]instanceof window.Node):!1}function Gi(n){return n[wt]}var Iu=0,on=class extends We{constructor(t){super(t);d(this,"childBindingContext");d(this,"currentLoadingOperationId");d(this,"currentViewModel");d(this,"latestComponentName");d(this,"loadingOperationId");d(this,"originalChildNodes");this.originalChildNodes=ue(C.childNodes(this.$element)),this.computed("computeApplyComponent")}hasMeaningfulChildren(){return this.originalChildNodes.some(t=>{var i;return t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&((i=t.nodeValue)!=null?i:"").trim().length>0})}cloneTemplateIntoElement(t,i,r){if(!i)throw new Error("Component '"+t+"' has no template");if(zi(i))C.emptyNode(r),this.addDisposable(new rn(i,r,null,void 0,!0));else{let o=Ae(i);C.setDomNodeChildren(r,o)}}createViewModel(t,i,r,o){let s=t.createViewModel;return s?s.call(t,o,{element:i,templateNodes:r}):o}makeTemplateSlotNodes(t){return Object.assign({},...this.genSlotsByName(t))}*genSlotsByName(t){for(let i of t){if(i.nodeType!==Node.ELEMENT_NODE)continue;let r=i.getAttribute("slot");r&&(yield{[r]:i})}}computeApplyComponent(){let t=m(this.value),i,r;if(typeof t=="string"?i=t:(i=m(t.name),r=Ie.getNodeValues(this.$element)||m(t.params)),this.latestComponentName=i,!i)throw new Error("No component name specified");this.loadingOperationId=this.currentLoadingOperationId=++Iu,_e.get(i,o=>this.applyComponentDefinition(i,r,o))}makeChildBindingContext(t){let i=r=>Object.assign(r,{$component:t,$componentTemplateNodes:this.originalChildNodes,$componentTemplateSlotNodes:this.makeTemplateSlotNodes(this.originalChildNodes)});return this.$context.createChildContext(t,void 0,i)}applyComponentDefinition(t,i,r){if(this.currentLoadingOperationId!==this.loadingOperationId||this.latestComponentName!==t)return;this.cleanUpState();let o=this.$element;if(!r)throw new Error("Unknown component '"+t+"'");r.template&&this.cloneTemplateIntoElement(t,r.template,o);let s=this.createViewModel(r,o,this.originalChildNodes,i);this.childBindingContext=this.makeChildBindingContext(s);let u=s&&s.template;if(!r.template)if(u)this.cloneTemplateIntoElement(t,u,o);else if(this.hasMeaningfulChildren())this.cloneTemplateIntoElement(t,this.originalChildNodes,o);else throw new Error("Component '"+t+"' has no template");s instanceof Y&&s.anchorTo(this.$element),this.currentViewModel=s;let a=this.onBindingComplete.bind(this,s);this.applyBindingsToDescendants(this.childBindingContext,a)}onBindingComplete(t,i){t&&t.koDescendantsComplete&&t.koDescendantsComplete(this.$element),this.completeBinding(i)}cleanUpState(){let t=this.currentViewModel,i=t&&t.dispose;typeof i=="function"&&i.call(t),this.currentViewModel=null,this.currentLoadingOperationId=null}dispose(){this.cleanUpState(),super.dispose()}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};var sn=class extends We{constructor(e){super(e);let t=this.getSlot(this.value),i=Be(t),r=this.$context.extend({$slotContext:i,$slotData:i&&i.$data});this.replaceSlotWithNode(this.$element,t),this.applyBindingsToDescendants(r)}replaceSlotWithNode(e,t){let i=this.cloneNodeFromOriginal(t);C.emptyNode(e),this.addDisposable(new rn(i,e,void 0,void 0,!0))}cloneNodeFromOriginal(e){if(!e)return[];let t=Gi(e);return t?t.children:"content"in e?[...document.importNode(e.content,!0).childNodes]:(Array.isArray(e)?e:[e]).map(r=>r.cloneNode(!0))}getSlot(e){let{$componentTemplateSlotNodes:t}=this.$context;return e?t[e]:t[""]||[...this.$context.$componentTemplateNodes].filter(i=>!i.getAttribute||!i.getAttribute("slot"))}static get allowVirtualElements(){return!0}};var Zo={component:on,slot:sn};var Ln=String.prototype,es={uppercase:function(n){return Ln.toUpperCase.call(m(n))},lowercase:function(n){return Ln.toLowerCase.call(m(n))},default:function(n,e){return n=m(n),typeof n=="function"?n:typeof n=="string"?Ln.trim.call(n)===""?e:n:n==null||n.length==0?e:n},replace:function(n,e,t){return Ln.replace.call(m(n),e,t)},fit:function(n,e,t,i){if(n=m(n),e&&(""+n).length>e)switch(t=""+(t||"..."),e=e-t.length,n=""+n,i){case"left":return t+n.slice(-e);case"middle":{let r=Math.ceil(e/2);return n.substring(0,r)+t+n.slice(r-e)}default:return n.substring(0,e)+t}else return n},json:function(n,e,t){return JSON.stringify(dt(n),t,e)},number:function(n){return(+m(n)).toLocaleString()}};var Mu=/\bfunction\s*\(([^)]*)\)\s*\{\s*(?:(return\s)?([^}]+?)[;\s]*)?\}/g;function St(n){return n.replace(Mu,(e,t,i,r)=>{r&&!i&&(r+=" && undefined");let o=`(${t.trim()}) => ${r}`;return St.silent||console.log(`Knockout: Replace "${e}" with "${o}"`),o})}St.silent=!1;var ts=new At,Pu={preProcessBindings:n=>ts.preProcessBindings(n)},Ru=new Tt({providers:[new vt,ts,new xt,new Dt]}),Lu=new Qt({provider:Ru,bindings:[Ko,Do,Qo,Zo,{each:Jo.foreach}],extenders:{},filters:es,options:{bindingGlobals:c.global,bindingStringPreparsers:[St]}}),Vu="4.1.0",Hu=Lu.create({version:Vu,components:_e,Component:_e.ComponentABC,expressionRewriting:Pu});return us($u);})();
|
|
15
15
|
(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global).ko = ko.default
|