@tko/build.reference 4.0.0-beta1.6 → 4.0.0-beta1.8

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.
@@ -1,17 +1,15 @@
1
- "use strict";// @tko/build.reference 🥊 4.0.0-beta1.6 IIFE
2
- var tko=(()=>{var ln=Object.defineProperty;var Ts=Object.getOwnPropertyDescriptor;var _s=Object.getOwnPropertyNames;var Is=Object.prototype.hasOwnProperty;var Ci=Math.pow;var dt=(r,e)=>{for(var t in e)ln(r,t,{get:e[t],enumerable:!0})},ks=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _s(e))!Is.call(r,i)&&i!==t&&ln(r,i,{get:()=>e[i],enumerable:!(n=Ts(e,i))||n.enumerable});return r};var Os=r=>ks(ln({},"__esModule",{value:!0}),r);var Ta={};dt(Ta,{default:()=>Na});var{isArray:Kt}=Array;function V(r,e,t){arguments.length>2&&(e=e.bind(t));for(let n=0,i=r.length;n<i;++n)e(r[n],n,r)}function q(r,e){return(Kt(r)?r:[...r]).indexOf(e)}function Br(r,e,t){return(Kt(r)?r:[...r]).find(e,t)}function pt(r=[],e,t){return arguments.length>2&&(e=e.bind(t)),r===null?[]:Array.from(r,e)}function ht(r,e){var t=q(r,e);t>0?r.splice(t,1):t===0&&r.shift()}function Bi(r=[]){let e=new Set;return r===null?[]:(Kt(r)?r:[...r]).filter(t=>e.has(t)?!1:e.add(t))}function Je(r,e,t){return arguments.length>2&&(e=e.bind(t)),r===null?[]:(Kt(r)?r:[...r]).filter(e)}function mt(r,e){if(Kt(e))r.push.apply(r,e);else for(var t=0,n=e.length;t<n;t++)r.push(e[t]);return r}function Me(r,e,t){var n=q(typeof r.peek=="function"?r.peek():r,e);n<0?t&&r.push(e):t||r.splice(n,1)}function fe(r){return Array.from(r)}function yi(r,e){r=typeof r=="function"?r():r,e=typeof e=="function"?e():e;for(var t=[],n=r;n<=e;n++)t.push(n);return t}function cn(r,e,t){if(r.length&&e.length){var n,i,u,s,o;for(n=i=0;(!t||n<t)&&(s=r[i]);++i){for(u=0;o=e[u];++u)if(s.value===o.value){s.moved=o.index,o.moved=s.index,e.splice(u,1),n=u=0;break}n+=u}}}var Fi="added",Ei="deleted";function gt(r,e,t){return t=typeof t=="boolean"?{dontLimitMoves:t}:t||{},r=r||[],e=e||[],r.length<e.length?bi(r,e,Fi,Ei,t):bi(e,r,Ei,Fi,t)}function bi(r,e,t,n,i){var u=Math.min,s=Math.max,o=[],a,l=r.length,d,m=e.length,h=m-l||1,p=l+m+1,C,B,v,R;for(a=0;a<=l;a++)for(B=C,o.push(C=[]),v=u(m,a+h),R=s(0,a-1),d=R;d<=v;d++)if(!d)C[d]=a+1;else if(!a)C[d]=d+1;else if(r[a-1]===e[d-1])C[d]=B[d-1];else{var x=B[d]||p,F=C[d-1]||p;C[d]=u(x,F)+1}var w=[],N,M=[],L=[];for(a=l,d=m;a||d;)N=o[a][d]-1,d&&N===o[a][d-1]?M.push(w[w.length]={status:t,value:e[--d],index:d}):a&&N===o[a-1][d]?L.push(w[w.length]={status:n,value:r[--a],index:a}):(--d,--a,i.sparse||w.push({status:"retained",value:e[d]}));return cn(L,M,!i.dontLimitMoves&&l*10),w.reverse()}var yr={deferUpdates:!1,useOnlyNativeEvents:!1,protoProperty:"__ko_proto__",defaultBindingAttribute:"data-bind",allowVirtualElements:!0,bindingGlobals:Object.create(null),bindingProviderInstance:null,createChildContextWithAs:!1,jQuery:globalThis.jQuery,Promise:globalThis.Promise,taskScheduler:null,debug:!1,global:globalThis,document:globalThis.document,filters:{},includeDestroyed:!1,foreachHidesDestroyed:!1,onError:function(r){throw r},set:function(r,e){yr[r]=e},getBindingHandler(){},cleanExternalData(){}};Object.defineProperty(yr,"$",{get:function(){return yr.jQuery}});var c=yr;function fn(r){return c.onError?(...e)=>{try{return r(...e)}catch(t){c.onError(t)}}:r}function dn(r){de(function(){throw r},0)}function de(r,e){return setTimeout(fn(r),e)}function xr(r,e){var t;return function(...n){t||(t=de(function(){t=void 0,r(...n)},e))}}function wr(r,e){var t;return function(...n){clearTimeout(t),t=de(()=>r(...n),e)}}var H=c.document&&function(){for(var r=3,e=c.document.createElement("div"),t=e.getElementsByTagName("i");e.innerHTML="<!--[if gt IE "+ ++r+"]><i></i><![endif]-->",t[0];);if(!r){let n=window.navigator.userAgent;return ua.match(/MSIE ([^ ]+)/)||ua.match(/rv:([^ )]+)/)}return r>4?r:void 0}();function J(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function Ge(r){return r===null?!1:typeof r=="object"||typeof r=="function"}function j(r,e){if(e)for(var t in e)J(e,t)&&(r[t]=e[t]);return r}function k(r,e){for(var t in r)J(r,t)&&e(t,r[t])}function ve(r,e,t){if(!r)return r;arguments.length>2&&(e=e.bind(t));var n={};for(var i in r)J(r,i)&&(n[i]=e(r[i],i,r));return n}function pn(r,e){return J(r,e)?r[e]:void 0}function Sr(r,e){if(e||(e=[]),!r||typeof r!="object"||r.constructor!==Object||e.indexOf(r)!==-1)return r;e.push(r);var t={};for(var n in r)J(r,n)&&(t[n]=Sr(r[n],e));return t}function xi(r){let e=new Set;return JSON.stringify(r,(t,n)=>e.has(n)?"...":(typeof n=="object"&&e.add(n),n))}function hn(r){return Ge(r)&&typeof r.then=="function"}function Ps(){try{return Object.defineProperty(function(){},"length",{}),!0}catch(r){return!1}}var Vs=Ps();function Nr(r,e){Vs&&Object.defineProperty(r,"length",e)}function Le(r){return r==null?"":r.trim?r.trim():r.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}function wi(r,e){return r=r||"",e.length>r.length?!1:r.substring(0,e.length)===e}function Si(r){return typeof r=="string"&&(r=Le(r),r)?JSON&&JSON.parse?JSON.parse(r):new Function("return "+r)():null}var Rs=typeof Symbol=="function";function ee(r){return Rs?Symbol(r):r}var mn=/\S+/g;function At(r,e,t){var n;!e||(typeof r.classList=="object"?(n=r.classList[t?"add":"remove"],V(e.match(mn),function(i){n.call(r.classList,i)})):typeof r.className.baseVal=="string"?Ni(r.className,"baseVal",e,t):Ni(r,"className",e,t))}function Ni(r,e,t,n){var i=r[e].match(mn)||[];V(t.match(mn),function(u){Me(i,u,n)}),r[e]=i.join(" ")}var Y=c.global&&c.global.jQuery;function gn(r,e){if(r===e)return!0;if(r.nodeType===11)return!1;if(e.contains)return e.contains(r.nodeType!==1?r.parentNode:r);if(e.compareDocumentPosition)return(e.compareDocumentPosition(r)&16)==16;for(;r&&r!=e;)r=r.parentNode;return!!r}function Qt(r){return gn(r,r.ownerDocument.documentElement)}function Ti(r){return!!Br(r,Qt)}function $(r){return r&&r.tagName&&r.tagName.toLowerCase()}function _i(r){return window.HTMLElement?r instanceof HTMLElement:r&&r.tagName&&r.nodeType===1}function An(r){return window.DocumentFragment?r instanceof DocumentFragment:r&&r.nodeType===11}var D={};dt(D,{clear:()=>Dn,get:()=>ze,getOrSet:()=>Hs,nextKey:()=>Jt,set:()=>Se});var $s=new Date().getTime(),qt=`__ko__${$s}`,Tr=Symbol("Knockout data"),_r,Ii=0,Ms={getDataForNode(r,e){let t=r[Tr];return!t&&e&&(t=r[Tr]={}),t},clear(r){return r[Tr]?(delete r[Tr],!0):!1}},Ls={getDataforNode(r,e){let t=r[qt];if(!(t&&t!=="null"&&_r[t])){if(!e)return;t=r[qt]="ko"+Ii++,_r[t]={}}return _r[t]},clear(r){let e=r[qt];return e?(delete _r[e],r[qt]=null,!0):!1}},{getDataForNode:vn,clear:Dn}=H?Ls:Ms;function Jt(){return Ii+++qt}function ze(r,e){let t=vn(r,!1);return t&&t[e]}function Se(r,e,t){var n=vn(r,t!==void 0);n&&(n[e]=t)}function Hs(r,e,t){let n=vn(r,!0);return n[e]||(n[e]=t)}var Cn=Jt(),js={1:!0,8:!0,9:!0},ki={1:!0,9:!0};function Fn(r,e){var t=ze(r,Cn);return t===void 0&&e&&(t=[],Se(r,Cn,t)),t}function Ws(r){Se(r,Cn,void 0)}function Oi(r){var e=Fn(r,!1);if(e){e=e.slice(0);for(let t=0;t<e.length;t++)e[t](r)}Dn(r);for(let t=0,n=vt.length;t<n;++t)vt[t](r);c.cleanExternalData&&c.cleanExternalData(r),ki[r.nodeType]&&Pi(r.childNodes,!0)}function Pi(r,e){let t=[],n;for(var i=0;i<r.length;i++)if((!e||r[i].nodeType===8)&&(Oi(t[t.length]=n=r[i]),r[i]!==n))for(;i--&&q(t,r[i])===-1;);}function pe(r,e){if(typeof e!="function")throw new Error("Callback must be a function");Fn(r,!0).push(e)}function Dt(r,e){var t=Fn(r,!1);t&&(ht(t,e),t.length===0&&Ws(r))}function te(r){return js[r.nodeType]&&(Oi(r),ki[r.nodeType]&&Pi(r.getElementsByTagName("*"))),r}function De(r){te(r),r.parentNode&&r.parentNode.removeChild(r)}var vt=[];function Vi(r){vt.push(r)}function Ri(r){let e=vt.indexOf(r);e>=0&&vt.splice(e,1)}function Us(r){var e=Y?Y.cleanData:null;e&&e([r])}vt.push(Us);var bn={},$i={},Ks=c.global.navigator&&/Firefox\/2/i.test(c.global.navigator.userAgent)?"KeyboardEvent":"UIEvents";bn[Ks]=["keyup","keydown","keypress"];bn.MouseEvents=["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"];k(bn,function(r,e){if(e.length)for(var t=0,n=e.length;t<n;t++)$i[e[t]]=r});function Qs(r,e){if($(r)!=="input"||!r.type||e.toLowerCase()!="click")return!1;var t=r.type;return t=="checkbox"||t=="radio"}var qs={propertychange:!0},En;function G(r,e,t,n=!1){let i=fn(t),u=H&&qs[e],s=Boolean(n);if(!c.useOnlyNativeEvents&&!u&&!s&&Y)En||(En=typeof Y(r).on=="function"?"on":"bind"),Y(r)[En](e,i);else if(!u&&typeof r.addEventListener=="function")r.addEventListener(e,i,n);else if(typeof r.attachEvent!="undefined"){let o=function(l){i.call(r,l)},a="on"+e;r.attachEvent(a,o),pe(r,function(){r.detachEvent(a,o)})}else throw new Error("Browser doesn't support addEventListener or attachEvent")}function Ye(r,e){if(!(r&&r.nodeType))throw new Error("element must be a DOM node when calling triggerEvent");var t=Qs(r,e);if(!c.useOnlyNativeEvents&&Y&&!t)Y(r).trigger(e);else if(typeof document.createEvent=="function")if(typeof r.dispatchEvent=="function"){var n=$i[e]||"HTMLEvents",i=document.createEvent(n);i.initEvent(e,!0,!0,c.global,0,0,0,0,0,!1,!1,!1,!1,0,r),r.dispatchEvent(i)}else throw new Error("The supplied element doesn't support dispatchEvent");else if(t&&r.click)r.click();else if(typeof r.fireEvent!="undefined")r.fireEvent("on"+e);else throw new Error("Browser doesn't support triggering events")}function Gt(r){for(var e=fe(r),t=e[0]&&e[0].ownerDocument||document,n=t.createElement("div"),i=0,u=e.length;i<u;i++)n.appendChild(te(e[i]));return n}function Ne(r,e){for(var t=0,n=r.length,i=[];t<n;t++){var u=r[t].cloneNode(!0);i.push(e?te(u):u)}return i}function Mi(r,e){if(zt(r),e)for(var t=0,n=e.length;t<n;t++)r.appendChild(e[t])}function Ir(r,e){var t=r.nodeType?[r]:r;if(t.length>0){for(var n=t[0],i=n.parentNode,u=0,s=e.length;u<s;u++)i.insertBefore(e[u],n);for(u=0,s=t.length;u<s;u++)De(t[u])}}function kr(r,e){if(r.name=e,H<=7)try{r.mergeAttributes(document.createElement("<input name='"+r.name+"'/>"),!1)}catch(t){}}function zt(r){for(;r.firstChild;)De(r.firstChild)}function Xe(r,e){if(r.length){for(e=e.nodeType===8&&e.parentNode||e;r.length&&r[0].parentNode!==e;)r.splice(0,1);for(;r.length>1&&r[r.length-1].parentNode!==e;)r.length--;if(r.length>1){var t=r[0],n=r[r.length-1];for(r.length=0;t!==n;)r.push(t),t=t.nextSibling;r.push(n)}}return r}function Or(r,e){H<7?r.setAttribute("selected",e):r.selected=e}function Li(r){if(H>=9){var e=r.nodeType==1?r:r.parentNode;e.style&&(e.style.zoom=e.style.zoom)}}function Hi(r){if(H){var e=r.style.width;r.style.width=0,r.style.width=e}}var A={};dt(A,{allowedBindings:()=>Ys,childNodes:()=>Ki,emptyNode:()=>Pr,endCommentRegex:()=>ji,firstChild:()=>Rr,getVirtualChildren:()=>yn,hasBindingValue:()=>Xs,insertAfter:()=>Zs,isEndComment:()=>He,isStartComment:()=>se,lastChild:()=>eo,nextSibling:()=>$r,normaliseVirtualElementDomStructure:()=>no,prepend:()=>Qi,previousSibling:()=>to,setDomNodeChildren:()=>Vr,startCommentRegex:()=>Bn,virtualNodeBindingValue:()=>ro});var Yt=c.document&&c.document.createComment("test").text==="<!--test-->",Bn=Yt?/^<!--\s*ko(?:\s+([\s\S]+))?\s*-->$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,ji=Yt?/^<!--\s*\/ko\s*-->$/:/^\s*\/ko\s*$/,Js={ul:!0,ol:!0};function se(r){return r.nodeType==8&&Bn.test(Yt?r.text:r.nodeValue)}function He(r){return r.nodeType==8&&ji.test(Yt?r.text:r.nodeValue)}function Gs(r){return He(r)&&!ze(r,Wi)}var Wi="__ko_matchedEndComment__";function yn(r,e){for(var t=r,n=1,i=[];t=t.nextSibling;){if(He(t)&&(Se(t,Wi,!0),n--,n===0))return i;i.push(t),se(t)&&n++}if(!e)throw new Error("Cannot find closing comment tag to match: "+r.nodeValue);return null}function Ui(r,e){var t=yn(r,e);return t?t.length>0?t[t.length-1].nextSibling:r.nextSibling:null}function zs(r){var e=r.firstChild,t=null;if(e)do if(t)t.push(e);else if(se(e)){var n=Ui(e,!0);n?e=n:t=[e]}else He(e)&&(t=[e]);while(e=e.nextSibling);return t}var Ys={},Xs=se;function Ki(r){return se(r)?yn(r):r.childNodes}function Pr(r){if(!se(r))zt(r);else for(var e=Ki(r),t=0,n=e.length;t<n;t++)De(e[t])}function Vr(r,e){if(!se(r))Mi(r,e);else{Pr(r);let i=r.nextSibling,u=i.parentNode;for(var t=0,n=e.length;t<n;++t)u.insertBefore(e[t],i)}}function Qi(r,e){se(r)?r.parentNode.insertBefore(e,r.nextSibling):r.firstChild?r.insertBefore(e,r.firstChild):r.appendChild(e)}function Zs(r,e,t){t?se(r)?r.parentNode.insertBefore(e,t.nextSibling):t.nextSibling?r.insertBefore(e,t.nextSibling):r.appendChild(e):Qi(r,e)}function Rr(r){if(!se(r)){if(r.firstChild&&He(r.firstChild))throw new Error("Found invalid end comment, as the first child of "+r.outerHTML);return r.firstChild}return!r.nextSibling||He(r.nextSibling)?null:r.nextSibling}function eo(r){let e=Rr(r),t;do t=e;while(e=$r(e));return t}function $r(r){if(se(r)&&(r=Ui(r)),r.nextSibling&&He(r.nextSibling)){if(Gs(r.nextSibling))throw Error("Found end comment without a matching opening comment, as next sibling of "+r.outerHTML);return null}else return r.nextSibling}function to(r){var e=0;do if(r.nodeType===8)if(se(r)){if(--e===0)return r}else He(r)&&e++;else if(e===0)return r;while(r=r.previousSibling)}function ro(r){var e=(Yt?r.text:r.nodeValue).match(Bn);return e?e[1]:null}function no(r){if(!!Js[$(r)]){var e=r.firstChild;if(e)do if(e.nodeType===1){var t=zs(e);if(t)for(var n=e.nextSibling,i=0;i<t.length;i++)n?r.insertBefore(t[i],n):r.appendChild(t[i])}while(e=e.nextSibling)}}var io=[0,"",""],Xt=[1,"<table>","</table>"],uo=[2,"<table><tbody>","</tbody></table>"],so=[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],qi=[3,"<table><tbody><tr>","</tr></tbody></table>"],Ji=[1,"<select multiple='multiple'>","</select>"],oo=[1,"<fieldset>","</fieldset>"],ao=[1,"<map>","</map>"],lo=[1,"<object>","</object>"],co={area:ao,col:so,colgroup:Xt,caption:Xt,legend:oo,thead:Xt,tbody:Xt,tfoot:Xt,tr:uo,td:qi,th:qi,option:Ji,optgroup:Ji,param:lo},Gi=c.document&&"content"in c.document.createElement("template");function fo(r){let e=r.match(/^(?:<!--.*?-->\s*?)*?<([a-z]+)[\s>]/);return e&&co[e[1]]||io}function po(r,e){e||(e=document);var t=e.parentWindow||e.defaultView||window,n=Le(r).toLowerCase(),i=e.createElement("div"),u=fo(n),s=u[0],o="ignored<div>"+u[1]+r+u[2]+"</div>";for(typeof t.innerShiv=="function"?i.appendChild(t.innerShiv(o)):i.innerHTML=o;s--;)i=i.lastChild;return fe(i.lastChild.childNodes)}function ho(r,e){e||(e=document);var t=e.createElement("template");return t.innerHTML=r,fe(t.content.childNodes)}function mo(r,e){if(Y.parseHTML)return Y.parseHTML(r,e)||[];var t=Y.clean([r],e);if(t&&t[0]){for(var n=t[0];n.parentNode&&n.parentNode.nodeType!==11;)n=n.parentNode;n.parentNode&&n.parentNode.removeChild(n)}return t}function Ce(r,e){return Gi?ho(r,e):Y?mo(r,e):po(r,e)}function zi(r,e){let t=Ce(r,e);return t.length&&t[0].parentElement||Gt(t)}function Ct(r,e){if(zt(r),typeof e=="function"&&(e=e()),e!=null)if(typeof e!="string"&&(e=e.toString()),Y&&!Gi)Y(r).html(e);else{var t=Ce(e,r.ownerDocument);if(r.nodeType===8)e===null?Pr(r):Vr(r,t);else for(var n=0;n<t.length;n++)r.appendChild(t[n])}}function Ze(r,e){var t=typeof e=="function"?e():e;t==null&&(t="");var n=Rr(r);!n||n.nodeType!=3||$r(n)?Vr(r,[r.ownerDocument.createTextNode(t)]):n.data=t,Li(r)}var Mr=Symbol("Knockout selectExtensions hasDomDataProperty"),O={optionValueDomDataKey:Jt(),readValue:function(r){switch($(r)){case"option":return r[Mr]===!0?ze(r,O.optionValueDomDataKey):r.value;case"select":return r.selectedIndex>=0?O.readValue(r.options[r.selectedIndex]):void 0;default:return r.value}},writeValue:function(r,e,t){switch($(r)){case"option":typeof e=="string"?(Se(r,O.optionValueDomDataKey,void 0),Mr in r&&delete r[Mr],r.value=e):(Se(r,O.optionValueDomDataKey,e),r[Mr]=!0,r.value=typeof e=="number"?e:"");break;case"select":(e===""||e===null)&&(e=void 0);var n=-1;for(let i=0,u=r.options.length,s;i<u;++i){s=O.readValue(r.options[i]);let o=s===e,a=s===""&&e===void 0,l=typeof e=="number"&&Number(s)===e;if(o||a||l){n=i;break}}(t||n>=0||e===void 0&&r.size>1)&&(r.selectedIndex=n);break;default:e==null&&(e=""),r.value=e;break}}};var et={};dt(et,{memoize:()=>Ao,parseMemoText:()=>eu,unmemoize:()=>Zi,unmemoizeDomNodeAndDescendants:()=>vo});var xn={};function Yi(){return((1+Math.random())*4294967296|0).toString(16).substring(1)}function go(){return Yi()+Yi()}function Xi(r,e){if(!!r){if(r.nodeType==8){var t=eu(r.nodeValue);t!=null&&e.push({domNode:r,memoId:t})}else if(r.nodeType==1)for(var n=0,i=r.childNodes,u=i.length;n<u;n++)Xi(i[n],e)}}function Ao(r){if(typeof r!="function")throw new Error("You can only pass a function to memoization.memoize()");var e=go();return xn[e]=r,"<!--[ko_memo:"+e+"]-->"}function Zi(r,e){var t=xn[r];if(t===void 0)throw new Error("Couldn't find any memo with ID "+r+". Perhaps it's already been unmemoized.");try{return t.apply(null,e||[]),!0}finally{delete xn[r]}}function vo(r,e){var t=[];Xi(r,t);for(var n=0,i=t.length;n<i;n++){var u=t[n].domNode,s=[u];e&&mt(s,e),Zi(t[n].memoId,s),u.nodeValue="",u.parentNode&&u.parentNode.removeChild(u)}}function eu(r){var e=r.match(/^\[ko_memo\:(.*?)\]$/);return e?e[1]:null}var Fe={};dt(Fe,{cancel:()=>Fo,resetForTesting:()=>Eo,runEarly:()=>ru,schedule:()=>Co});var Zt=[],oe=0,tu=1,je=0,Te=c.global;Te&&Te.MutationObserver&&!(Te.navigator&&Te.navigator.standalone)?c.taskScheduler=function(r){var e=Te.document.createElement("div");return new Te.MutationObserver(r).observe(e,{attributes:!0}),function(){e.classList.toggle("foo")}}(nu):Te&&Te.document&&"onreadystatechange"in Te.document.createElement("script")?c.taskScheduler=function(r){var e=document.createElement("script");e.onreadystatechange=function(){e.onreadystatechange=null,document.documentElement.removeChild(e),e=null,r()},document.documentElement.appendChild(e)}:c.taskScheduler=function(r){setTimeout(r,0)};function ru(){if(oe){for(var r=oe,e=0,t;je<oe;)if(t=Zt[je++]){if(je>r){if(++e>=5e3){je=oe,dn(Error("'Too much recursion' after processing "+e+" task groups."));break}r=oe}try{t()}catch(n){dn(n)}}}}function nu(){ru(),je=oe=Zt.length=0}function Do(){c.taskScheduler(nu)}function Co(r){return oe||Do(),Zt[oe++]=r,tu++}function Fo(r){var e=r-(tu-oe);e>=je&&e<oe&&(Zt[e]=null)}function Eo(){var r=oe-je;return je=oe=Zt.length=0,r}var b={};dt(b,{begin:()=>Lr,end:()=>Hr,getDependencies:()=>wo,getDependenciesCount:()=>xo,ignore:()=>yo,ignoreDependencies:()=>yo,isInitial:()=>So,registerDependency:()=>Sn});var wn=Symbol("Knockout Subscribable");function Ft(r){return r&&r[wn]||!1}var iu=[],ae,bo=0;function Bo(){return++bo}function Lr(r){iu.push(ae),ae=r}function Hr(){ae=iu.pop()}function Sn(r){if(ae){if(!Ft(r))throw new Error("Only subscribable things can act as dependencies");ae.callback.call(ae.callbackTarget,r,r._id||(r._id=Bo()))}}function yo(r,e,t){try{return Lr(),r.apply(e,t||[])}finally{Hr()}}function xo(){if(ae)return ae.computed.getDependenciesCount()}function wo(){if(ae)return ae.computed.getDependencies()}function So(){if(ae)return ae.isInitial}function er(r){r._deferUpdates||(r._deferUpdates=!0,r.limit(function(e){let t,n=!1;return function(){if(!n){Fe.cancel(t),t=Fe.schedule(e);try{n=!0,r.notifySubscribers(void 0,"dirty")}finally{n=!1}}}}))}var tr=class{constructor(e,t,n){this._target=e,this._callback=t.next,this._disposeCallback=n,this._isDisposed=!1,this._domNodeDisposalCallback=null}dispose(){this._domNodeDisposalCallback&&Dt(this._node,this._domNodeDisposalCallback),this._isDisposed=!0,this._disposeCallback()}disposeWhenNodeIsRemoved(e){this._node=e,pe(e,this._domNodeDisposalCallback=this.dispose.bind(this))}unsubscribe(){this.dispose()}get closed(){return this._isDisposed}};var No={undefined:1,boolean:1,number:1,string:1};function Et(r,e){var t=r===null||typeof r in No;return t?r===e:!1}function Nn(r){var e=this;return r&&k(r,function(t,n){var i=Ee[t];typeof i=="function"?e=i(e,n)||e:c.onError(new Error("Extender not found: "+t))}),e}function To(r,e){r.equalityComparer=e=="always"?null:Et}function _o(r,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.");er(r)}function Io(r,e){var t,n,i;typeof e=="number"?t=e:(t=e.timeout,n=e.method),r._deferUpdates=!1,i=n==="notifyWhenChangesStop"?wr:xr,r.limit(function(u){return i(u,t)})}var Ee={notify:To,deferred:_o,rateLimit:Io};var re=Symbol("Knockout latest value");Symbol.observable||(Symbol.observable=Symbol.for("@tko/Symbol.observable"));function z(){Object.setPrototypeOf(this,jr),jr.init(this)}var _e="change",jr={[wn]:!0,[Symbol.observable](){return this},init(r){r._subscriptions={change:[]},r._versionNumber=1},subscribe(r,e,t){let n=typeof r=="object"&&r.next;t=t||_e;let i=n?r:{next:e?r.bind(e):r},u=new tr(this,i,()=>{ht(this._subscriptions[t],u),this.afterSubscriptionRemove&&this.afterSubscriptionRemove(t)});return this.beforeSubscriptionAdd&&this.beforeSubscriptionAdd(t),this._subscriptions[t]||(this._subscriptions[t]=[]),this._subscriptions[t].push(u),n&&re in this&&i.next(this[re]),u},notifySubscribers(r,e){if(e=e||_e,e===_e&&this.updateVersion(),this.hasSubscriptionsForEvent(e)){let t=e===_e&&this._changeSubscriptions||[...this._subscriptions[e]];try{Lr();for(let n=0,i;i=t[n];++n)i._isDisposed||i._callback(r)}finally{Hr()}}},getVersion(){return this._versionNumber},hasChanged(r){return this.getVersion()!==r},updateVersion(){++this._versionNumber},hasSubscriptionsForEvent(r){return this._subscriptions[r]&&this._subscriptions[r].length},getSubscriptionsCount(r){if(r)return this._subscriptions[r]&&this._subscriptions[r].length||0;var e=0;return k(this._subscriptions,function(t,n){t!=="dirty"&&(e+=n.length)}),e},isDifferent(r,e){return!this.equalityComparer||!this.equalityComparer(r,e)},once(r){let e=this.subscribe(t=>{e.dispose(),r(t)})},when(r,e){let t=this.peek(),n=arguments.length>1,i=typeof r=="function"?r:u=>u===r;return i(t)?c.Promise.resolve(n?e:t):new c.Promise((u,s)=>{let o=this.subscribe(a=>{i(a)&&(o.dispose(),u(n?e:a))})})},yet(r,...e){let t=typeof r=="function"?r:i=>i===r,n=i=>!t(i);return this.when(n,...e)},next(){return new Promise(r=>this.once(r))},toString(){return"[object Object]"},extend:Nn};Object.setPrototypeOf(jr,Function.prototype);z.fn=jr;function T(r){function e(){return arguments.length>0?(e.isDifferent(e[re],arguments[0])&&(e.valueWillMutate(),e[re]=arguments[0],e.valueHasMutated()),this):(Sn(e),e[re])}return Nr(e,{value:void 0}),e[re]=r,z.fn.init(e),Object.setPrototypeOf(e,T.fn),c.deferUpdates&&er(e),e}T.fn={equalityComparer:Et,peek(){return this[re]},valueHasMutated(){this.notifySubscribers(this[re],"spectate"),this.notifySubscribers(this[re])},valueWillMutate(){this.notifySubscribers(this[re],"beforeChange")},modify(r,e=!0){return this(r(e?this.peek():this()))},isWriteable:!0};function ko(r,e){!e||e===_e?this._limitChange(r):e==="beforeChange"?this._limitBeforeChange(r):this._origNotifySubscribers(r,e)}z.fn.limit=function(e){var t=this,n=S(t),i="beforeChange",u,s,o,a,l;t._origNotifySubscribers||(t._origNotifySubscribers=t.notifySubscribers,t.notifySubscribers=ko);var d=e(function(){t._notificationIsPending=!1,n&&a===t&&(a=t._evalIfChanged?t._evalIfChanged():t());let m=s||l&&t.isDifferent(o,a);t._notifyNextChange=l=u=!1,m&&t._origNotifySubscribers(o=a)});Object.assign(t,{_limitChange(m,h){(!h||!t._notificationIsPending)&&(l=!h),t._changeSubscriptions=[...t._subscriptions[_e]],t._notificationIsPending=u=!0,a=m,d()},_limitBeforeChange(m){u||(o=m,t._origNotifySubscribers(m,i))},_notifyNextChangeIfValueIsDifferent(){t.isDifferent(o,t.peek(!0))&&(s=!0)},_recordUpdate(){l=!0}})};Object.setPrototypeOf(T.fn,z.fn);var uu=T.protoProperty=c.protoProperty;T.fn[uu]=T;T.observablePrototypes=new Set([T]);function S(r){let e=typeof r=="function"&&r[uu];if(e&&!T.observablePrototypes.has(e))throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e}function f(r){return S(r)?r():r}function bt(r){return S(r)?r.peek():r}function Z(r){return S(r)&&r.isWriteable}var Bt="arrayChange";function tt(r,e){if(r.compareArrayOptions={},e&&typeof e=="object"&&j(r.compareArrayOptions,e),r.compareArrayOptions.sparse=!0,r.cacheDiffForKnownOperation)return;let t=!1,n=null,i,u=0,s,o=r.beforeSubscriptionAdd,a=r.afterSubscriptionRemove;r.beforeSubscriptionAdd=function(m){o&&o.call(r,m),m===Bt&&l()},r.afterSubscriptionRemove=function(m){a&&a.call(r,m),m===Bt&&!r.hasSubscriptionsForEvent(Bt)&&(s&&(r.notifySubscribers=s,s=void 0),i&&i.dispose(),i=null,t=!1)};function l(){if(!t){t=!0,s=r.notifySubscribers,r.notifySubscribers=function(h,p){return(!p||p===_e)&&++u,s.apply(this,arguments)};var m=[].concat(r.peek()===void 0?[]:r.peek());n=null,i=r.subscribe(function(h){let p;h=[].concat(h||[]),r.hasSubscriptionsForEvent(Bt)&&(p=d(m,h)),m=h,n=null,u=0,p&&p.length&&r.notifySubscribers(p,Bt)})}}function d(m,h){return(!n||u>1)&&(n=tt.compareArrays(m,h,r.compareArrayOptions)),n}r.cacheDiffForKnownOperation=function(m,h,p){if(!t||u)return;var C=[],B=m.length,v=p.length,R=0;function x(U,$e,br){return C[C.length]={status:U,value:$e,index:br}}switch(h){case"push":R=B;case"unshift":for(let U=0;U<v;U++)x("added",p[U],R+U);break;case"pop":R=B-1;case"shift":B&&x("deleted",m[R],R);break;case"splice":var F=Math.min(Math.max(0,p[0]<0?B+p[0]:p[0]),B),w=v===1?B:Math.min(F+(p[1]||0),B),N=F+v-2,M=Math.max(w,N),L=[],ue=[];for(let U=F,$e=2;U<M;++U,++$e)U<w&&ue.push(x("deleted",m[U],U)),U<N&&L.push(x("added",p[$e],U));cn(ue,L);break;default:return}n=C}}tt.compareArrays=gt;Ee.trackArrayChanges=tt;function he(r){if(r=r||[],typeof r!="object"||!("length"in r))throw new Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");var e=T(r);return Object.setPrototypeOf(e,he.fn),tt(e),Nr(e,{get:()=>e().length}),e}function rr(r){return S(r)&&typeof r.remove=="function"&&typeof r.push=="function"}he.fn={remove(r){for(var e=this.peek(),t=[],n=typeof r=="function"&&!S(r)?r:function(s){return s===r},i=0;i<e.length;i++){var u=e[i];if(n(u)){if(t.length===0&&this.valueWillMutate(),e[i]!==u)throw Error("Array modified during remove; cannot remove item");t.push(u),e.splice(i,1),i--}}return t.length&&this.valueHasMutated(),t},removeAll(r){if(r===void 0){var e=this.peek(),t=e.slice(0);return this.valueWillMutate(),e.splice(0,e.length),this.valueHasMutated(),t}return r?this.remove(function(n){return q(r,n)>=0}):[]},destroy(r){var e=this.peek(),t=typeof r=="function"&&!S(r)?r:function(u){return u===r};this.valueWillMutate();for(var n=e.length-1;n>=0;n--){var i=e[n];t(i)&&(i._destroy=!0)}this.valueHasMutated()},destroyAll(r){return r===void 0?this.destroy(function(){return!0}):r?this.destroy(function(e){return q(r,e)>=0}):[]},indexOf(r){return q(this(),r)},replace(r,e){var t=this.indexOf(r);t>=0&&(this.valueWillMutate(),this.peek()[t]=e,this.valueHasMutated())},sorted(r){return[...this()].sort(r)},reversed(){return[...this()].reverse()},[Symbol.iterator]:function*(){yield*this()}};Object.setPrototypeOf(he.fn,T.fn);V(["pop","push","reverse","shift","sort","splice","unshift"],function(r){he.fn[r]=function(){var e=this.peek();this.valueWillMutate(),this.cacheDiffForKnownOperation(e,r,arguments);var t=e[r].apply(e,arguments);return this.valueHasMutated(),t===e?this:t}});V(["slice"],function(r){he.fn[r]=function(){var e=this();return e[r].apply(e,arguments)}});he.trackArrayChanges=tt;var Oo=10;function yt(r){if(arguments.length==0)throw new Error("When calling ko.toJS, pass the object you want to convert.");return su(r,function(e){for(var t=0;S(e)&&t<Oo;t++)e=e();return e})}function Tn(r,e,t){var n=yt(r);return JSON.stringify(n,e,t)}function su(r,e,t=new Map){r=e(r);var n=typeof r=="object"&&r!==null&&r!==void 0&&!(r instanceof RegExp)&&!(r instanceof Date)&&!(r instanceof String)&&!(r instanceof Number)&&!(r instanceof Boolean);if(!n)return r;var i=r instanceof Array?[]:{};return t.set(r,i),Po(r,function(u){var s=e(r[u]);switch(typeof s){case"boolean":case"number":case"string":case"function":i[u]=s;break;case"object":case"undefined":var o=t.get(s);i[u]=o!==void 0?o:su(s,e,t);break}}),i}function Po(r,e){if(r instanceof Array){for(var t=0;t<r.length;t++)e(t);typeof r.toJSON=="function"&&e("toJSON")}else for(var n in r)e(n)}var Vo=Math.pow;function _n(){}function Ro(r,e){for(;typeof e=="function";)e=e();return e}var g={"@":Ro,"#":(r,e)=>()=>f(e),"=>":_n,"!":function(e,t){return!t},"!!":function(e,t){return!!t},"++":function(e,t){return++t},"--":function(e,t){return--t},"**":function(e,t){return Vo(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},"==":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^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)}};g["@"].precedence=21;g["#"].precedence=21;g["."].precedence=19;g["["].precedence=19;g["?."].precedence=19;g["!"].precedence=16;g["!!"].precedence=16;g["++"].precedence=16;g["--"].precedence=16;g["&-"].precedence=16;g["**"].precedent=15;g["%"].precedence=14;g["*"].precedence=14;g["/"].precedence=14;g["+"].precedence=13;g["-"].precedence=13;g["|"].precedence=12;g["^"].precedence=11;g["&"].precedence=10;g["<"].precedence=11;g["<="].precedence=11;g[">"].precedence=11;g[">="].precedence=11;g["=="].precedence=10;g["!="].precedence=10;g["==="].precedence=10;g["!=="].precedence=10;g["&&"].precedence=6;g["||"].precedence=5;g["??"].precedence=5;g["&&"].earlyOut=r=>!r;g["||"].earlyOut=r=>r;g["??"].earlyOut=r=>r;g[","].precedence=2;g.call.precedence=1;g["=>"].precedence=1;var ou=Symbol("Node - Is Expression Or Identifier"),y=class{constructor(e,t,n){this.lhs=e,this.op=t,this.rhs=n}static get operators(){return g}get_leaf_value(e,t,n,i){return typeof e=="function"?f(e()):typeof e!="object"||e===null?e:e[y.isExpressionOrIdentifierSymbol]?f(e.get_value(void 0,t,n,i)):e}get_value(e,t,n,u){var u=this;if(u.op===_n)return(...l)=>{let d=t;return u.lhs&&(d=u.lhs.extendContext(t,l)),u.get_leaf_value(u.rhs,d,n,u)};let s=u.get_leaf_value(u.lhs,t,n,u),o=u.op.earlyOut;if(o&&o(s))return s;let a=u.get_leaf_value(u.rhs,t,n,u);return u.op(s,a,t,n)}static get isExpressionOrIdentifierSymbol(){return ou}get[ou](){return!0}static value_of(e,t,n,i){return e&&e[y.isExpressionOrIdentifierSymbol]?e.get_value(e,t,n,i):e}static create_root(e,t=!1){let n=[],i=[];for(let u=0;u<e.length;u+=2){n.push(e[u]);let s=e[u+1],o=(s==null?void 0:s.precedence)||0;for(;i.length&&o<=i[i.length-1].precedence;){let a=n.pop(),l=n.pop();n.push(new y(l,i.pop(),a))}i.push(s)}if(n.length!==1)throw new Error(`unexpected nodes remain in shunting yard output stack: ${n}`);return n[0]}};g["?"]=function(e,t,n,i,u){return y.value_of(e?t.yes:t.no,n,i,u)};g["?"].precedence=4;var We=class{constructor(e){this.nodes=e,this.root=y.create_root(e)}get_value(e,t,n,i){return this.root||(this.root=y.create_root(this.nodes)),this.root.get_value(e,t,n,i)}};We.prototype[y.isExpressionOrIdentifierSymbol]=!0;var be=class{constructor(e,t){this.parser=e,this.args=t}get_value(e,t,n,i){for(var u=[],s=0,o=this.args.length;s<o;++s)u.push(y.value_of(this.args[s],t,n,i));return u}get[y.isExpressionOrIdentifierSymbol](){return!0}};var au=/[\$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]/,lu=/[\$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 K=class{constructor(e,t,n){this.token=t,this.dereferences=n,this.parser=e}dereference(e,t,n,i){let u,s=this.dereferences||[],o=t.$data||{},a,l,d;for(l=0,d=s.length;l<d;++l)if(u=y.value_of(s[l],t,n,i),typeof e=="function"&&s[l]instanceof be)e=e.apply(a||o,u),a=e;else{if(e==null)return e;a=e,e=y.value_of(e[u],t,n,i)}return typeof e=="function"&&d>0&&a!==e&&!J(a,u)?e.bind(a):e}get_value(e,t,n,i){let u=e&&!(e instanceof K)?y.value_of(e,t,n,i)[this.token]:t.lookup(this.token,n,i);return this.dereference(u,t,n,i)}assign(e,t,n){Z(e[t])?e[t](n):S(e[t])||(e[t]=n)}set_value(e,t,n){let i=t.$data||{},u=this.dereferences||[],s=this.token,o,a,l;if(Ge(i)&&s in i)l=i;else if(s in t)l=t;else if(s in n)l=n;else throw new Error("Identifier::set_value -- The property '"+s+"' does not exist on the $data, $context, or globals.");if(a=u.length,a===0){this.assign(l,s,e);return}for(l=l[s],o=0;o<a-1;++o)s=u[o],s instanceof be?l=l():l=l[y.value_of(s)];if(u[o]===!0)throw new Error("Cannot assign a value to a function.");u[o]&&this.assign(l,y.value_of(u[o]),e)}static is_valid_start_char(e){return au.test(e)}static is_valid_continue_char(e){return lu.test(e)}get[y.isExpressionOrIdentifierSymbol](){return!0}};var rt=class{constructor(e,t){t instanceof We&&(t=t.root);try{this.names=rt.nodeTreeToNames(t)}catch(n){e.error(n)}}extendContext(e,t){if(this.names){let n={};return this.names.forEach((i,u)=>{n[i]=t[u]}),e.extend(n)}else return e}get[y.isExpressionOrIdentifierSymbol](){return!0}static nodeTreeToNames(e){let t=[];for(;e;)if(e instanceof K)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 y&&e.op===g[","]&&e.rhs instanceof K}};var xt=class{constructor(e,t){Object.assign(this,{yes:e,no:t})}get_value(){return this}get[y.isExpressionOrIdentifierSymbol](){return!0}};var cu={"'":"'",'"':'"',"`":"`","\\":"\\","/":"/",$:"$",b:"\b",f:"\f",n:`
3
- `,r:"\r",t:" "},Be=class{white(){for(var e=this.ch;e&&e<=" ";)e=this.next();return this.comment(e)}comment(e){if(e!=="/")return e;var t=this.at,n=this.lookahead();if(n==="/"){for(;e&&(e=this.next(),!(e===`
4
- `||e==="\r")););e=this.next()}else if(n==="*"){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){if(e instanceof Error)throw e;let[t,n]=e.name?[e.name,e.message]:[e,""],i=`
5
- ${t} ${n} of
6
- ${this.text}
1
+ // @tko/build.reference 🥊 4.0.0-beta1.8 IIFE
2
+ "use strict";var tko=(()=>{var jn=Object.defineProperty;var uo=Object.getOwnPropertyDescriptor;var ao=Object.getOwnPropertyNames;var lo=Object.prototype.hasOwnProperty;var Hn=(n,e)=>(e=Symbol[n])?e:Symbol.for("Symbol."+n),Un=n=>{throw TypeError(n)},oi=Math.pow;var Ye=(n,e)=>{for(var t in e)jn(n,t,{get:e[t],enumerable:!0})},co=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ao(e))!lo.call(n,i)&&i!==t&&jn(n,i,{get:()=>e[i],enumerable:!(r=uo(e,i))||r.enumerable});return n};var fo=n=>co(jn({},"__esModule",{value:!0}),n);var ui=(n,e,t)=>e.has(n)||Un("Cannot "+t);var Wn=(n,e,t)=>(ui(n,e,"read from private field"),t?t.call(n):e.get(n)),ai=(n,e,t)=>e.has(n)?Un("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),li=(n,e,t,r)=>(ui(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var Xe=(n,e,t)=>new Promise((r,i)=>{var s=a=>{try{u(t.next(a))}catch(l){i(l)}},o=a=>{try{u(t.throw(a))}catch(l){i(l)}},u=a=>a.done?r(a.value):Promise.resolve(a.value).then(s,o);u((t=t.apply(n,e)).next())}),po=function(n,e){this[0]=n,this[1]=e};var ne=n=>{var e=n[Hn("asyncIterator")],t=!1,r,i={};return e==null?(e=n[Hn("iterator")](),r=s=>i[s]=o=>e[s](o)):(e=e.call(n),r=s=>i[s]=o=>{if(t){if(t=!1,s==="throw")throw o;return o}return t=!0,{done:!1,value:new po(new Promise(u=>{var a=e[s](o);a instanceof Object||Un("Object expected"),u(a)}),1)}}),i[Hn("iterator")]=()=>i,r("next"),"throw"in e?r("throw"):i.throw=s=>{throw s},"return"in e&&r("return"),i};var Yu={};Ye(Yu,{default:()=>zu});var{isArray:_t}=Array;function P(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 U(n,e){return(_t(n)?n:[...n]).indexOf(e)}function un(n,e,t){return(_t(n)?n:[...n]).find(e,t)}function Ze(n,e,t){return arguments.length>2&&(e=e.bind(t)),n===null?[]:Array.from(n,e)}function et(n,e){let t=U(n,e);t>0?n.splice(t,1):t===0&&n.shift()}function pi(n){let e=new Set;return n===null?[]:(_t(n)?n:[...n]).filter(t=>e.has(t)?!1:e.add(t))}function Me(n,e,t){return arguments.length>2&&(e=e.bind(t)),n===null?[]:(_t(n)?n:[...n]).filter(e)}function tt(n,e){if(_t(e))n.push.apply(n,e);else for(let t=0,r=e.length;t<r;t++)n.push(e[t]);return n}function Te(n,e,t){let r=U(typeof n.peek=="function"?n.peek():n,e);r<0?t&&n.push(e):t||n.splice(r,1)}function ae(n){return Array.from(n)}function hi(n,e){let t=typeof n=="function"?n():n,r=typeof e=="function"?e():e,i=[];for(let s=t;s<=r;s++)i.push(s);return i}function Qn(n,e,t){if(n.length&&e.length){let r,i,s,o,u;for(r=i=0;(!t||r<t)&&(o=n[i]);++i){for(s=0;u=e[s];++s)if(o.value===u.value){o.moved=u.index,u.moved=o.index,e.splice(s,1),r=s=0;break}r+=s}}}var ci="added",di="deleted";function nt(n,e,t){return t=typeof t=="boolean"?{dontLimitMoves:t}:t||{},n=n||[],e=e||[],n.length<e.length?fi(n,e,ci,di,t):fi(e,n,di,ci,t)}function fi(n,e,t,r,i){let s=Math.min,o=Math.max,u=new Array,a,l=n.length,f,p=e.length,b=p-l||1,m=l+p+1,A,v,h,S;for(a=0;a<=l;a++)for(v=A,u.push(A=new Array),h=s(p,a+b),S=o(0,a-1),f=S;f<=h;f++)if(!f)A[f]=a+1;else if(!a)A[f]=f+1;else if(n[a-1]===e[f-1])A[f]=v[f-1];else{let _=v[f]||m,M=A[f-1]||m;A[f]=s(_,M)+1}let k=new Array,g,N=new Array,x=new Array;for(a=l,f=p;a||f;)g=u[a][f]-1,f&&g===u[a][f-1]?N.push(k[k.length]={status:t,value:e[--f],index:f}):a&&g===u[a-1][f]?x.push(k[k.length]={status:r,value:n[--a],index:a}):(--f,--a,i!=null&&i.sparse||k.push({status:"retained",value:e[f]}));return Qn(x,N,!i.dontLimitMoves&&l*10),k.reverse()}var Kn=class{constructor(){this.bindingStringPreparsers=[],this.knockoutInstance=null,this.deferUpdates=!1,this.useOnlyNativeEvents=!0,this.useTemplateTag=!0,this.protoProperty="__ko_proto__",this.defaultBindingAttribute="data-bind",this.allowVirtualElements=!0,this.bindingGlobals=Object.create(null),this.createChildContextWithAs=!1,this.disableJQueryUsage=!1,this.Promise=globalThis.Promise,this.taskScheduler=null,this.debug=!1,this.templateSizeLimit=4096,this.allowScriptTagsInTemplates=!1,this._sanitizeWarningLogged=!1,this.global=globalThis,this.document=globalThis.document,this.filters={},this.includeDestroyed=!1,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){}},ho=new Kn,c=ho;function qn(n){return c.onError?(...e)=>{try{return n(...e)}catch(t){c.onError(t)}}:n}function Jn(n){le(function(){throw n},0)}function le(n,e){return setTimeout(qn(n),e)}function an(n,e){let t;return function(...r){t||(t=le(function(){t=void 0,n(...r)},e))}}function ln(n,e){let t;return function(...r){clearTimeout(t),t=le(()=>n(...r),e)}}function J(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function Ot(n){return n===null?!1:typeof n=="object"||typeof n=="function"}function L(n,e){if(e)for(let t of Object.keys(e))J(e,t)&&(n[t]=e[t]);return n}function R(n,e){for(let t in n)J(n,t)&&e(t,n[t])}function he(n,e,t){if(!n)return n;arguments.length>2&&(e=e.bind(t));let r={};for(let i in n)J(n,i)&&(r[i]=e(n[i],i,n));return r}function Gn(n,e){return J(n,e)?n[e]:void 0}function zn(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)J(n,r)&&(t[r]=zn(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 Yn(n){return Ot(n)&&typeof n.then=="function"}function mo(){try{return Object.defineProperty(function(){},"length",{}),!0}catch(n){return!1}}var go=mo();function cn(n,e){go&&Object.defineProperty(n,"length",e)}function It(n){return n==null?"":n.trim?n.trim():n.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}function gi(n,e){return n=n||"",e.length>n.length?!1:n.substring(0,e.length)===e}function bi(n){return typeof n=="string"&&(n=It(n),n)?JSON.parse(n):null}var bo=typeof Symbol=="function";function G(n){return bo?Symbol(n):n}var Xn=/\S+/g;function rt(n,e,t){let r;e&&(typeof n.classList=="object"?(r=n.classList[t?"add":"remove"],P(e.match(Xn),function(i){r.call(n.classList,i)})):typeof n.className.baseVal=="string"?Ei(n.className,"baseVal",e,t):Ei(n,"className",e,t))}function Ei(n,e,t,r){let i=n[e].match(Xn)||[];P(t.match(Xn),function(s){Te(i,s,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 kt(n){return Zn(n,n.ownerDocument.documentElement)}function yi(n){return!!un(n,kt)}function V(n){return n&&n.tagName&&n.tagName.toLowerCase()}function Ai(n){return window.HTMLElement?n instanceof HTMLElement:n&&n.tagName&&n.nodeType===Node.ELEMENT_NODE}function er(n){return window.DocumentFragment?n instanceof DocumentFragment:n&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE}var tr={},Di={};tr.UIEvents=["keyup","keydown","keypress"];tr.MouseEvents=["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"];R(tr,function(n,e){if(e.length)for(let t=0,r=e.length;t<r;t++)Di[e[t]]=n});function Eo(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,r=!1){let i=qn(t),s=!!r,o=c.jQuery;if(!c.useOnlyNativeEvents&&!s&&o)o(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 yo(n){return typeof n.click=="function"}function Pe(n,e){if(!(n&&n.nodeType))throw new Error("element must be a DOM node when calling triggerEvent");let t=Eo(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=Di[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&&yo(n))n.click();else throw new Error("Browser doesn't support triggering events")}var D={};Ye(D,{clear:()=>ir,get:()=>Re,getOrSet:()=>Co,nextKey:()=>Mt,set:()=>xe});var Ao=new Date().getTime(),Do=`__ko__${Ao}`,dn=Symbol("Knockout data");var xo=0;function nr(n){return n!=="__proto__"&&n!=="constructor"&&n!=="prototype"}function rr(n,e){let t=n[dn];return!t&&e&&(t=n[dn]={}),t}function ir(n){return n[dn]?(delete n[dn],!0):!1}function Mt(){return xo+++Do}function Re(n,e){if(!nr(e))throw new Error("Unsafe key for DOM data: "+e);let t=rr(n,!1);return t&&t[e]}function xe(n,e,t){if(!nr(e))throw new Error("Unsafe key for DOM data: "+e);let r=rr(n,t!==void 0);r&&(r[e]=t)}function Co(n,e,t){if(!nr(e))throw new Error("Unsafe key for DOM data: "+e);let r=rr(n,!0);return r[e]||(r[e]=t)}var sr=Mt(),vo={1:!0,8:!0,9:!0},xi={1:!0,9:!0};function or(n,e){let t=Re(n,sr);return t===void 0&&e&&(t=new Array,xe(n,sr,t)),t}function Fo(n){xe(n,sr,void 0)}function Ci(n){let e=or(n,!1);if(e){e=e.slice(0);for(let t=0;t<e.length;t++)e[t](n)}ir(n);for(let t=0,r=it.length;t<r;++t)it[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)&&(Ci(t[t.length]=r=n[i]),n[i]!==r))for(;i--&&U(t,n[i])===-1;);}function Ce(n,e){if(typeof e!="function")throw new Error("Callback must be a function");or(n,!0).push(e)}function st(n,e){let t=or(n,!1);t&&(et(t,e),t.length===0&&Fo(n))}function z(n){return vo[n.nodeType]&&(Ci(n),xi[n.nodeType]&&n instanceof Element&&vi(n.getElementsByTagName("*"))),n}function me(n){n&&(z(n),n.parentNode&&n.parentNode.removeChild(n))}var it=new Array;function Fi(n){it.push(n)}function wi(n){let e=it.indexOf(n);e>=0&&it.splice(e,1)}function wo(n){let e=c.jQuery?c.jQuery.cleanData:null;e&&e([n])}it.push(wo);function Pt(n){let e=ae(n),r=(e[0]&&e[0].ownerDocument||document).createElement("div");for(let i=0,s=e.length;i<s;i++)r.appendChild(z(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?z(i):i)}return t}function Bi(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 r=t[0],i=r.parentNode;for(let s=0;s<e.length;s++)i==null||i.insertBefore(e[s],r);for(let s=0;s<t.length;s++)me(t[s])}}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],r=n[n.length-1];for(n.length=0;t!==r;)n.push(t),t=t.nextSibling;n.push(r)}}return n}function pn(n,e){n.selected=e}var y={};Ye(y,{allowedBindings:()=>So,childNodes:()=>_i,emptyNode:()=>hn,endCommentRegex:()=>Ni,firstChild:()=>gn,getVirtualChildren:()=>ar,hasBindingValue:()=>_o,insertAfter:()=>Oo,isEndComment:()=>Se,isStartComment:()=>re,lastChild:()=>Io,nextSibling:()=>bn,normaliseVirtualElementDomStructure:()=>Po,prepend:()=>Oi,previousSibling:()=>ko,setDomNodeChildren:()=>mn,startCommentRegex:()=>ur,virtualNodeBindingValue:()=>Mo});var ur=/^\s*ko(?:\s+([\s\S]+))?\s*$/,Ni=/^\s*\/ko\s*$/,Bo={ul:!0,ol:!0};function re(n){return n.nodeType===Node.COMMENT_NODE&&ur.test(n.nodeValue)}function Se(n){return n.nodeType===Node.COMMENT_NODE&&Ni.test(n.nodeValue)}function No(n){return Se(n)&&!Re(n,Ti)}var Ti="__ko_matchedEndComment__";function ar(n,e){let t=n,r=1,i=new Array;for(;t=t.nextSibling;){if(Se(t)&&(xe(t,Ti,!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 Si(n,e){let t=ar(n,e);return t?t.length>0?t[t.length-1].nextSibling:n.nextSibling:null}function To(n){let e=n.firstChild,t=null;if(e)do if(t)t.push(e);else if(re(e)){let r=Si(e,!0);r?e=r:t=[e]}else Se(e)&&(t=[e]);while(e=e.nextSibling);return t}var So=Object.create(null),_o=re;function _i(n){return re(n)?ar(n):n.childNodes}function hn(n){if(!re(n))Rt(n);else{let e=_i(n);for(let t=0,r=e.length;t<r;t++)me(e[t])}}function mn(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,s=e.length;i<s;++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 Oo(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 gn(n){if(!re(n)){if(n.firstChild&&Se(n.firstChild))throw new Error("Found invalid end comment, as the first child of "+n.outerHTML);return n.firstChild}return!n.nextSibling||Se(n.nextSibling)?null:n.nextSibling}function Io(n){let e=gn(n);if(!e)return null;let t;do t=e;while(e=bn(e));return t}function bn(n){if(re(n)&&(n=Si(n)),n.nextSibling&&Se(n.nextSibling)){if(No(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 ko(n){let e=0;do if(n.nodeType===Node.COMMENT_NODE)if(re(n)){if(--e===0)return n}else Se(n)&&e++;else if(e===0)return n;while(n=n.previousSibling)}function Mo(n){let e=n.nodeValue.match(ur);return e?e[1]:null}function Po(n){if(!Bo[V(n)])return;let e=n.firstChild;if(e)do if(e.nodeType===Node.ELEMENT_NODE){let t=To(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 Ii=c.useTemplateTag&&c.document&&"content"in c.document.createElement("template");function Ro(n,e){e||(e=document);let t=e.createElement("div");return t.innerHTML=n,ae(t.childNodes)}function Vo(n,e){e||(e=document);let t=e.createElement("template");return t.innerHTML=n,ae(t.content.childNodes)}function Lo(n,e){let t=c.jQuery;return t?t.parseHTML(n,e)||[]:[]}function ce(n,e){let t=ki(n);return Ii?Vo(t,e):c.jQuery?Lo(t,e):Ro(t,e)}var $o=/<script\b[^>]*>([\s\S]*?)<\/script[^>]*>/i;function ki(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&&$o.test(n))throw new Error("Script-tag in template detected.");return c.sanitizeHtmlTemplate(n)}function Mi(n,e){let t=ce(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&&!Ii){let r=ki(e);t(n).html(r)}else{let r;if(n.ownerDocument?r=ce(e,n.ownerDocument):r=ce(e),n.nodeType===Node.COMMENT_NODE)e===null?hn(n):mn(n,r);else for(let i=0;i<r.length;i++)n.appendChild(r[i])}}}function Le(n,e){let t=typeof e=="function"?e():e;t==null&&(t="");let r=gn(n);!r||r.nodeType!==Node.TEXT_NODE||bn(r)?mn(n,[n.ownerDocument.createTextNode(t)]):r.data=t}var En=Symbol("Knockout selectExtensions hasDomDataProperty"),O={optionValueDomDataKey:Mt(),readValue:function(n){switch(V(n)){case"option":return n[En]===!0?Re(n,O.optionValueDomDataKey):n.value;case"select":{let e=n;return e.selectedIndex>=0?O.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,O.optionValueDomDataKey,void 0),En in n&&delete n[En],n.value=e;else{let r=n;xe(n,O.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 s=0,o=i.options.length,u;s<o;++s){u=O.readValue(i.options[s]);let a=u===e,l=u===""&&e===void 0,f=typeof e=="number"&&Number(u)===e;if(a||l||f){r=s;break}}(t||r>=0||e===void 0&&i.size>1)&&(i.selectedIndex=r)}break;default:e==null&&(e=""),n.value=e;break}}};var $e={};Ye($e,{memoize:()=>jo,parseMemoText:()=>Li,unmemoize:()=>Vi,unmemoizeDomNodeAndDescendants:()=>Uo});var lr={};function Pi(){return((1+Math.random())*4294967296|0).toString(16).substring(1)}function Ho(){return Pi()+Pi()}function Ri(n,e){if(n){if(n.nodeType===Node.COMMENT_NODE){let r=Li(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++)Ri(r[t],e)}}function jo(n){if(typeof n!="function")throw new Error("You can only pass a function to memoization.memoize()");let e=Ho();return lr[e]=n,"<!--[ko_memo:"+e+"]-->"}function Vi(n,e){let t=lr[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 lr[n]}}function Uo(n,e){let t=new Array;Ri(n,t);for(let r=0,i=t.length;r<i;r++){let s=t[r].domNode,o=[s];e&&tt(o,e),Vi(t[r].memoId,o),s.nodeValue="",s.parentNode&&s.parentNode.removeChild(s)}}function Li(n){if(!n)return null;let e=n.match(/^\[ko_memo\:(.*?)\]$/);return e?e[1]:null}var ge={};Ye(ge,{cancel:()=>Ko,resetForTesting:()=>qo,runEarly:()=>Hi,schedule:()=>Qo});var Vt=new Array,ie=0,$i=1,_e=0,ut=c.global;ut&&ut.MutationObserver&&!(ut.navigator&&ut.navigator.standalone)?c.taskScheduler=(function(n){let e=ut.document.createElement("div");return new ut.MutationObserver(n).observe(e,{attributes:!0}),function(){e.classList.toggle("foo")}})(ji):c.taskScheduler=function(n){setTimeout(n,0)};function Hi(){if(ie){let n=ie,e=0;for(let t;_e<ie;)if(t=Vt[_e++]){if(_e>n){if(++e>=5e3){_e=ie,Jn(Error("'Too much recursion' after processing "+e+" task groups."));break}n=ie}try{t()}catch(r){Jn(r)}}}}function ji(){Hi(),_e=ie=Vt.length=0}function Wo(){c.taskScheduler(ji)}function Qo(n){return ie||Wo(),Vt[ie++]=n,$i++}function Ko(n){let e=n-($i-ie);e>=_e&&e<ie&&(Vt[e]=null)}function qo(){let n=ie-_e;return _e=ie=Vt.length=0,n}var C={};Ye(C,{begin:()=>yn,end:()=>An,getDependencies:()=>Xo,getDependenciesCount:()=>Yo,ignore:()=>zo,ignoreDependencies:()=>zo,isInitial:()=>Zo,registerDependency:()=>dr});var cr=Symbol("Knockout Subscribable");function at(n){return n&&n[cr]||!1}var Ui=new Array,se,Jo=0;function Go(){return++Jo}function yn(n){Ui.push(se),se=n}function An(){se=Ui.pop()}function dr(n){if(se){if(!at(n))throw new Error("Only subscribable things can act as dependencies");se.callback.call(se.callbackTarget,n,n._id||(n._id=Go()))}}function zo(n,e,t){try{return yn(),n.apply(e,t||[])}finally{An()}}function Yo(){if(se)return se.computed.getDependenciesCount()}function Xo(){if(se)return se.computed.getDependencies()}function Zo(){if(se)return se.isInitial}function Lt(n){n._deferUpdates||(n._deferUpdates=!0,n.limit(function(e){let t,r=!1;return function(){if(!r){ge.cancel(t),t=ge.schedule(e);try{r=!0,n.notifySubscribers(void 0,"dirty")}finally{r=!1}}}}))}var $t=class{constructor(e,t,r){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,Ce(e,this._domNodeDisposalCallback=this.dispose.bind(this))}unsubscribe(){this.dispose()}get closed(){return this._isDisposed}};var eu={undefined:1,boolean:1,number:1,string:1};function lt(n,e){return n===null||typeof n in eu?n===e:!1}function fr(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 tu(n,e){n.equalityComparer=e=="always"?null:lt}function nu(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.");Lt(n)}function ru(n,e){let t,r,i;typeof e=="number"?t=e:(t=e.timeout,r=e.method),n._deferUpdates=!1,i=r==="notifyWhenChangesStop"?ln:an,n.limit(function(s){return i(s,t)})}var be={notify:tu,deferred:nu,rateLimit:ru};var Y=Symbol("Knockout latest value");Symbol.observable||(Symbol.observable=Symbol.for("@tko/Symbol.observable"));var W=function(){Object.setPrototypeOf(this,Dn),Dn.init(this)},Fe="change",Dn={[cr]:!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||Fe;let i=r?n:{next:e?n.bind(e):n},s=new $t(this,i,()=>{et(this._subscriptions[t],s),this.afterSubscriptionRemove&&this.afterSubscriptionRemove(t)});return this.beforeSubscriptionAdd&&this.beforeSubscriptionAdd(t),this._subscriptions[t]||(this._subscriptions[t]=new Array),this._subscriptions[t].push(s),r&&Y in this&&i.next(this[Y]),s},notifySubscribers(n,e){if(e=e||Fe,e===Fe&&this.updateVersion(),this.hasSubscriptionsForEvent(e)){let t=e===Fe&&this._changeSubscriptions||[...this._subscriptions[e]];try{yn();for(let r=0,i;i=t[r];++r)i._isDisposed||i._callback(n)}finally{An()}}},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:s=>s===n;return i(t)?c.Promise.resolve(r?e:t):new c.Promise((s,o)=>{let u=this.subscribe(a=>{i(a)&&(u.dispose(),s(r?e:a))})})},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:fr};Object.setPrototypeOf(Dn,Function.prototype);W.fn=Dn;function w(n){function e(){return arguments.length>0?(e.isDifferent(e[Y],arguments[0])&&(e.valueWillMutate(),e[Y]=arguments[0],e.valueHasMutated()),this):(dr(e),e[Y])}return cn(e,{value:void 0}),e[Y]=n,W.fn.init(e),Object.setPrototypeOf(e,w.fn),c.deferUpdates&&Lt(e),e}w.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 iu(n,e){!e||e===Fe?this._limitChange(n):e==="beforeChange"?this._limitBeforeChange(n):this._origNotifySubscribers(n,e)}W.fn.limit=function(e){let t=this,r=T(t),i="beforeChange",s,o,u,a,l;t._origNotifySubscribers||(t._origNotifySubscribers=t.notifySubscribers,t.notifySubscribers=iu);let f=e(function(){t._notificationIsPending=!1,r&&a===t&&(a=t._evalIfChanged?t._evalIfChanged():t());let p=o||l&&t.isDifferent(u,a);t._notifyNextChange=l=s=!1,p&&t._origNotifySubscribers(u=a)});Object.assign(t,{_limitChange(p,b){(!b||!t._notificationIsPending)&&(l=!b),t._changeSubscriptions=[...t._subscriptions[Fe]],t._notificationIsPending=s=!0,a=p,f()},_limitBeforeChange(p){s||(u=p,t._origNotifySubscribers(p,i))},_notifyNextChangeIfValueIsDifferent(){t.isDifferent(u,t.peek(!0))&&(o=!0)},_recordUpdate(){l=!0}})};Object.setPrototypeOf(w.fn,W.fn);var Wi=w.protoProperty=c.protoProperty;w.fn[Wi]=w;w.observablePrototypes=new Set([w]);function T(n){let e=typeof n=="function"&&n[Wi];if(e&&!w.observablePrototypes.has(e))throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e}function d(n){return T(n)?n():n}function ct(n){return T(n)?n.peek():n}function K(n){return T(n)&&n.isWriteable}var dt="arrayChange";function He(n,e){if(n.compareArrayOptions={},e&&typeof e=="object"&&L(n.compareArrayOptions,e),n.compareArrayOptions.sparse=!0,n.cacheDiffForKnownOperation)return;let t=!1,r=null,i,s=0,o,u=n.beforeSubscriptionAdd,a=n.afterSubscriptionRemove;n.beforeSubscriptionAdd=function(p){u&&u.call(n,p),p===dt&&l()},n.afterSubscriptionRemove=function(p){a&&a.call(n,p),p===dt&&!n.hasSubscriptionsForEvent(dt)&&(o&&(n.notifySubscribers=o,o=void 0),i&&i.dispose(),i=null,t=!1)};function l(){if(t)return;t=!0,o=n.notifySubscribers,n.notifySubscribers=function(b,m){return(!m||m===Fe)&&++s,o.apply(this,arguments)};let p=new Array().concat(n.peek()===void 0?[]:n.peek());r=null,i=n.subscribe(function(b){let m;b=new Array().concat(b||[]),n.hasSubscriptionsForEvent(dt)&&(m=f(p,b)),p=b,r=null,s=0,m&&m.length&&n.notifySubscribers(m,dt)})}function f(p,b){return(!r||s>1)&&(r=He.compareArrays(p,b,n.compareArrayOptions)),r}n.cacheDiffForKnownOperation=function(p,b,m){if(!t||s)return;let A=new Array,v=p.length,h=m.length,S=0;function k(g,N,x){return A[A.length]={status:g,value:N,index:x}}switch(b){case"push":S=v;case"unshift":for(let g=0;g<h;g++)k("added",m[g],S+g);break;case"pop":S=v-1;case"shift":v&&k("deleted",p[S],S);break;case"splice":{let g=Math.min(Math.max(0,m[0]<0?v+m[0]:m[0]),v),N=h===1?v:Math.min(g+(m[1]||0),v),x=g+h-2,_=Math.max(N,x),M=new Array,j=new Array;for(let te=g,si=2;te<_;++te,++si)te<N&&j.push(k("deleted",p[te],te)),te<x&&M.push(k("added",m[si],te));Qn(j,M)}break;default:return}r=A}}He.compareArrays=nt;be.trackArrayChanges=He;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(w(n),de.fn);return He(e),cn(e,{get:()=>{var t;return(t=e())==null?void 0:t.length}}),e}function Ht(n){return T(n)&&typeof n.remove=="function"&&typeof n.push=="function"}de.fn={remove(n){let e=this.peek(),t=new Array,r=typeof n=="function"&&!T(n)?n:function(i){return i===n};for(let i=0;i<e.length;i++){let s=e[i];if(r(s)){if(t.length===0&&this.valueWillMutate(),e[i]!==s)throw Error("Array modified during remove; cannot remove item");t.push(s),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 U(n,e)>=0}):[]},destroy(n){let e=this.peek(),t=typeof n=="function"&&!T(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 U(n,e)>=0}):[]},indexOf(n){return U(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*ne(this())}};Object.setPrototypeOf(de.fn,w.fn);P(["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}});P(["slice"],function(n){de.fn[n]=function(){let e=this();return e[n].apply(e,arguments)}});de.trackArrayChanges=He;var su=10;function ft(n){if(arguments.length==0)throw new Error("When calling ko.toJS, pass the object you want to convert.");return Qi(n,function(e){for(let t=0;T(e)&&t<su;t++)e=e();return e})}function pr(n,e,t){let r=ft(n);return JSON.stringify(r,e,t)}function Qi(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),ou(n,function(s){let o=e(n[s]);switch(typeof o){case"boolean":case"number":case"string":case"function":i[s]=o;break;case"object":case"undefined":{let u=t.get(o);i[s]=u!==void 0?u:Qi(o,e,t)}break}}),i}function ou(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 hr(){}function uu(n,e){for(;typeof e=="function";)e=e();return e}var E={"@":uu,"#":(n,e)=>()=>d(e),"=>":hr,"!":function(e,t){return!t},"!!":function(e,t){return!!t},"++":function(e,t){return++t},"--":function(e,t){return--t},"**":function(e,t){return oi(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},"==":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^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;var Ki=Symbol("Node - Is Expression Or Identifier"),F=class n{constructor(e,t,r){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"?d(e()):typeof e!="object"||e===null?e:e[n.isExpressionOrIdentifierSymbol]?d(e.get_value(void 0,t,r,i)):e}get_value(e,t,r,s){var s=this;if(s.op===hr)return(...l)=>{let f=t;return s.lhs&&(f=s.lhs.extendContext(t,l)),s.get_leaf_value(s.rhs,f,r,s)};let o=s.get_leaf_value(s.lhs,t,r,s),u=s.op.earlyOut;if(u&&u(o))return o;let a=s.get_leaf_value(s.rhs,t,r,s);return s.op(o,a,t,r)}static get isExpressionOrIdentifierSymbol(){return Ki}get[Ki](){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 s=0;s<e.length;s+=2){r.push(e[s]);let o=e[s+1],u=(o==null?void 0:o.precedence)||0;for(;i.length&&u<=i[i.length-1].precedence;){let a=r.pop(),l=r.pop();r.push(new n(l,i.pop(),a))}i.push(o)}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,s){return F.value_of(e?t.yes:t.no,r,i,s)};E["?"].precedence=4;var Oe=class{constructor(e){this.nodes=e,this.root=F.create_root(e)}get_value(e,t,r,i){return this.root||(this.root=F.create_root(this.nodes)),this.root.get_value(e,t,r,i)}};Oe.prototype[F.isExpressionOrIdentifierSymbol]=!0;var Ee=class{constructor(e,t){this.parser=e,this.args=t}get_value(e,t,r,i){let s=new Array;for(let o=0,u=this.args.length;o<u;++o)s.push(F.value_of(this.args[o],t,r,i));return s}get[F.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]/,Ji=/[\$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){this.token=t,this.dereferences=r,this.parser=e}dereference(e,t,r,i){let s,o=this.dereferences||[],u=t.$data||{},a,l,f;for(l=0,f=o.length;l<f;++l)if(s=F.value_of(o[l],t,r,i),typeof e=="function"&&o[l]instanceof Ee)e=e.apply(a||u,s),a=e;else{if(e==null)return e;a=e,e=F.value_of(e[s],t,r,i)}return typeof e=="function"&&f>0&&a!==e&&!J(a,s)?e.bind(a):e}get_value(e,t,r,i){let s=e&&!(e instanceof n)?F.value_of(e,t,r,i)[this.token]:t.lookup(this.token,r,i);return this.dereference(s,t,r,i)}assign(e,t,r){K(e[t])?e[t](r):T(e[t])||(e[t]=r)}set_value(e,t,r){let i=t.$data||{},s=this.dereferences||[],o=this.token,u,a,l;if(Ot(i)&&o in i)l=i;else if(o in t)l=t;else if(o in r)l=r;else throw new Error("Identifier::set_value -- The property '"+o+"' does not exist on the $data, $context, or globals.");if(a=s.length,a===0){this.assign(l,o,e);return}for(l=l[o],u=0;u<a-1;++u)o=s[u],o instanceof Ee?l=l():l=l[F.value_of(o)];if(s[u]===!0)throw new Error("Cannot assign a value to a function.");s[u]&&this.assign(l,F.value_of(s[u]),e)}static is_valid_start_char(e){return qi.test(e)}static is_valid_continue_char(e){return Ji.test(e)}get[F.isExpressionOrIdentifierSymbol](){return!0}};var pt,mr=class mr{constructor(e,t){ai(this,pt);t instanceof Oe&&(t=t.root);try{li(this,pt,mr.nodeTreeToNames(t))}catch(r){e.error(r)}}extendContext(e,t){if(Wn(this,pt)){let r={};return Wn(this,pt).forEach((i,s)=>{r[i]=t[s]}),e.extend(r)}else return e}get[F.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 F&&e.op===E[","]&&e.rhs instanceof Q}};pt=new WeakMap;var jt=mr;var ht=class{constructor(e,t){Object.assign(this,{yes:e,no:t})}get_value(){return this}get[F.isExpressionOrIdentifierSymbol](){return!0}};var Gi={"'":"'",'"':'"',"`":"`","\\":"\\","/":"/",$:"$",b:"\b",f:"\f",n:`
3
+ `,r:"\r",t:" "},ye=class{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,r=this.lookahead();if(r==="/"){for(;e&&(e=this.next(),!(e===`
4
+ `||e==="\r")););e=this.next()}else if(r==="*"){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,r]=e.name?[e.name,e.message]:[e,""],i=`
5
+ ${t} ${r} of ${this.text}
7
6
  `+Array(this.at).join(" ")+`_/ \u{1F525} \\_
8
- `;throw new Error(i)}name(){var e="",t;this.white();var n=this.ch;for((n==="'"||n==='"')&&(t=n,n=this.next());n;){if(t&&n===t)return this.white(),n=this.next(),n!==":"&&n!==","&&this.error("Object name: "+e+" missing closing "+t),e;if(n===":"||n<=" "||n===","||n==="|")return e;e+=n,n=this.next()}return e}number(){let e,t="",n=this.ch;for(n==="-"&&(t="-",n=this.next("-"));n>="0"&&n<="9";)t+=n,n=this.next();if(n===".")for(t+=".",n=this.next();n&&n>="0"&&n<="9";)t+=n,n=this.next();if(n==="e"||n==="E")for(t+=n,n=this.next(),(n==="-"||n==="+")&&(t+=n,n=this.next());n>="0"&&n<="9";)t+=n,n=this.next();if(e=+t,!isFinite(e))c.onError(new Error("Bad number: "+e+" in "+t));else return e}objectAddValue(e,t,n){n&&n[y.isExpressionOrIdentifierSymbol]?Object.defineProperty(e,t,{get:()=>y.value_of(n,...this.currentContextGlobals),enumerable:!0}):Array.isArray(n)?Object.defineProperty(e,t,{get:()=>n.map(i=>y.value_of(i,...this.currentContextGlobals)),enumerable:!0}):e[t]=n}object(){let e,t={},n=this.ch;if(n==="{"){if(this.next("{"),n=this.white(),n==="}")return n=this.next("}"),t;for(;n;){if(n==='"'||n==="'"||n==="`"?e=this.string():e=this.name(),J(t,e)&&this.error('Duplicate key "'+e+'"'),this.white()===":")n=this.next(":"),this.objectAddValue(t,e,this.singleValueExpression());else{let i=new K(this,e,[]);this.objectAddValue(t,e,i)}if(n=this.white(),n==="}")return n=this.next("}"),t;if(this.next(","),n=this.white(),n==="}")return n=this.next("}"),t}}this.error("Bad object")}readString(e){let t="",n=[""],i=g["+"],u,s,o,a=e==="`",l=this.next();for(;l;){if(l===e)return l=this.next(),a&&n.push(i),n.push(t),n;if(l==="\\")if(l=this.next(),l==="u"){for(o=0,s=0;s<4&&(u=parseInt(l=this.next(),16),!!isFinite(u));s+=1)o=o*16+u;t+=String.fromCharCode(o)}else if(typeof cu[l]=="string")t+=cu[l];else break;else a&&l==="$"?(l=this.next(),l==="{"?(this.next("{"),n.push(i),n.push(t),n.push(i),n.push(this.expression()),t=""):t+="$"+l):t+=l;l=this.next()}this.error("Bad string")}string(){var e=this.ch;if(e==='"')return this.readString('"').join("");if(e==="'")return this.readString("'").join("");if(e==="`")return y.create_root(this.readString("`"));this.error("Bad string")}array(){let e=[],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()}}this.error("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="",n,i=this.white(),u=K.is_valid_start_char;for(;i&&!(u(i)||i<=" "||i===""||i==='"'||i==="'"||i==="{"||i==="("||i==="`"||i===")"||i<="9"&&i>="0"||!e.not_an_array&&i==="["||(t+=i,i=this.next(),i==="@"));)u=K.is_valid_continue_char;return t!==""&&(e.prefix&&t==="-"&&(t="&-"),n=g[t],n||this.error("Bad operator: '"+t+"'.")),n}filter(){let e=this.next(),t=[],n=function(s){return s},i=this.name();for(c.filters[i]||c.onError("Cannot find filter by the name of: "+i),e=this.white();e;){if(e===":"&&(e=this.next(),t.push(this.singleValueExpression("|"))),e==="|"){n=this.filter();break}if(e===",")break;e=this.white()}function u(s,o,a,l,d){for(var m=[s],h=0,p=t.length;h<p;++h)m.push(y.value_of(t[h],a,l,d));return n(c.filters[i].apply(a,m),o,a,l,d)}return u.precedence=1,u}expression(e=!1,t=!0){let n,i=[],u=this.white();for(;u&&(n=this.operator({prefix:!0}),n&&(i.push(void 0),i.push(n),u=this.white()),u==="("?(this.next(),i.push(this.expression()),this.next(")")):i.push(this.value()),u=this.white(),!(u===":"||u==="}"||u==="]"||u===")"||u===""||u==="`"||u==="|"&&e==="|"||u===","&&!t));){if(u==="|"&&this.lookahead()!=="|"&&e){i.push(this.filter()),i.push(void 0);break}if(n=this.operator({not_an_array:!0}),n===g["?"]){this.ternary(i);break}else n===g["."]||n===g["?."]?(i.push(n),i.push(this.member()),n=null):n===g["["]?(i.push(n),i.push(this.expression()),u=this.next("]"),n=null):n===g["=>"]?(i[i.length-1]=new rt(this,i[i.length-1]),i.push(n)):n&&i.push(n);if(u=this.white(),u==="]"||!n&&u==="(")break}if(i.length!==0){var s=this.dereferences();if(i.length===1&&!s.length)return i[0];for(var o=0,a=s.length;o<a;++o){var l=s[o];l.constructor===be?i.push(g.call):i.push(g["."]),i.push(l)}return new We(i)}}singleValueExpression(e){return this.expression(e,!1)}ternary(e){var t=new xt;t.yes=this.singleValueExpression(),this.next(":"),t.no=this.singleValueExpression(),e.push(g["?"]),e.push(t)}funcArguments(){let e=[],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(",")}this.error("Bad arguments to function")}member(){let e="",t=this.white(),n=K.is_valid_start_char;for(;t&&n(t);)e+=t,t=this.next(),n=K.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=[],n;for(;e&&(n=this.dereference(),n!==void 0);)t.push(n);return t}identifier(){let e="",t=K.is_valid_start_char,n=this.white();for(;n&&t(n);)e+=n,n=this.next(),t=K.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 K(this,e,this.dereferences())}readBindings(){let e,t={},n,i,u=this.ch;for(;u;)e=this.name(),n=this.white(),!n||n===","?(n?u=this.next(","):u="",t[e]=null):(e.indexOf(".")!==-1?(e=e.split("."),t[e[0]]=t[e[0]]||{},e.length!==2?c.onError("Binding "+e+" should have two parts (a.b)."):t[e[0]].constructor!==Object&&c.onError("Binding "+e[0]+"."+e[1]+" paired with a non-object."),u=this.next(":"),this.objectAddValue(t[e[0]],e[1],this.singleValueExpression(!0))):(u=this.next(":"),t[e]&&typeof t[e]=="object"&&t[e].constructor===Object?(i=this.singleValueExpression(!0),typeof i!="object"||i.constructor!==Object?c.onError("Expected plain object for "+e+" value."):j(t[e],i)):t[e]=this.singleValueExpression(!0)),this.white(),this.ch?u=this.next(","):u="");return t}valueAsAccessor(e,t,n,i){if(!e)return()=>e;if(typeof e=="function")return e;if(e[y.isExpressionOrIdentifierSymbol])return()=>y.value_of(e,t,n,i);if(Array.isArray(e))return()=>e.map(u=>y.value_of(u,t,n,i));if(typeof e!="function")return()=>Sr(e);throw new Error("Value has cannot be converted to accessor: "+e)}convertToAccessors(e,t,n,i){return k(e,(u,s)=>{s instanceof K?Object.defineProperty(e,u,{value:function(o,a){let l=s.get_value(void 0,t,n,i);if(arguments.length===0)return l;let d=o===l;if(!(a&&a.onlyIfChanged&&d))return s.set_value(o,t,n)}}):e[u]=this.valueAsAccessor(s,t,n,i)}),e}preparse(e=""){return(c.bindingStringPreparsers||[]).reduce((n,i)=>i(n),e.trim())}runParse(e,t){this.text=this.preparse(e),this.at=0,this.ch=" ";try{var n=t();return this.white(),this.ch&&this.error("Syntax Error"),n}catch(i){c.onError(i)}}parse(e,t={},n={},i){if(!e)return()=>null;this.currentContextGlobals=[t,n,i];let u=()=>this.readBindings(),s=this.runParse(e,u);return this.convertToAccessors(s,t,n,i)}parseExpression(e,t={},n={},i){if(!e)return()=>"";this.currentContextGlobals=[t,n,i];let u=()=>this.singleValueExpression(!0),s=this.runParse(e,u);return this.valueAsAccessor(s,t,n,i)}};var fu=",\"'`{}()/:[\\]",du=RegExp(['"(?:\\\\.|[^"])*"',"'(?:\\\\.|[^'])*'","`(?:\\\\.|[^`])*`","/\\*(?:[^*]|\\*+[^*/])*\\*+/",`//.*
9
- `,"/(?:\\\\.|[^/])+/\\w*","[^\\s:,/][^"+fu+"]*[^\\s"+fu+"]","[^\\s]"].join("|"),"g"),$o=/[\])"'A-Za-z0-9_$]+$/,Mo={in:1,return:1,typeof:1};function wt(r){var e=Le(r);e.charCodeAt(0)===123&&(e=e.slice(1,-1)),e+=`
10
- ,`;var t=[],n=e.match(du),i,u=[],s=0;if(n.length<=1)return[];for(var o=0,a;a=n[o];++o){var l=a.charCodeAt(0);if(l===44){if(s<=0){t.push(i&&u.length?{key:i,value:u.join("")}:{unknown:i||u.join("")}),i=s=0,u=[];continue}}else if(l===58){if(!s&&!i&&u.length===1){i=u.pop();continue}}else{if(l===47&&a.length>1&&(a.charCodeAt(1)===47||a.charCodeAt(1)===42))continue;if(l===47&&o&&a.length>1){var d=n[o-1].match($o);d&&!Mo[d[0]]&&(e=e.substr(e.indexOf(a)+1),n=e.match(du),o=-1,a="/")}else l===40||l===123||l===91?++s:l===41||l===125||l===93?--s:!i&&!u.length&&(l===34||l===39)&&(a=a.slice(1,-1))}u.push(a)}return t}var P=ee("_state"),Lo={dependencyTracking:null,dependenciesCount:0,isDisposed:!0,isStale:!1,isDirty:!1,isSleeping:!1,disposeWhenNodeIsRemoved:null,readFunction:null,_options:null};function _(r,e,t){if(typeof r=="object"?t=r:(t=t||{},r&&(t.read=r)),typeof t.read!="function")throw Error("Pass a function that returns the value of the computed");var n=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||t.disposeWhenNodeIsRemoved||null,disposeWhen:t.disposeWhen||t.disposeWhen,domNodeDisposalCallback:null,dependencyTracking:{},dependenciesCount:0,evaluationTimeoutInstance:null};function u(){if(arguments.length>0){if(typeof n=="function")n.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||b.registerDependency(u),(i.isDirty||i.isSleeping&&u.haveDependenciesChanged())&&u.evaluateImmediate(),i.latestValue}return u[P]=i,u.isWriteable=typeof n=="function",z.fn.init(u),Object.setPrototypeOf(u,_.fn),t.pure?(i.pure=!0,i.isSleeping=!0,j(u,Wo)):t.deferEvaluation&&j(u,Uo),c.deferUpdates&&Ee.deferred(u,!0),c.debug&&(u._options=t),i.disposeWhenNodeIsRemoved&&(i.suppressDisposalUntilDisposeWhenReturnsFalse=!0,i.disposeWhenNodeIsRemoved.nodeType||(i.disposeWhenNodeIsRemoved=null)),!i.isSleeping&&!t.deferEvaluation&&u.evaluateImmediate(),i.disposeWhenNodeIsRemoved&&u.isActive()&&pe(i.disposeWhenNodeIsRemoved,i.domNodeDisposalCallback=function(){u.dispose()}),u}function Ho(r,e){e!==null&&e.dispose&&e.dispose()}function jo(r,e){var t=this.computedObservable,n=t[P];n.isDisposed||(this.disposalCount&&this.disposalCandidates[e]?(t.addDependencyTracking(e,r,this.disposalCandidates[e]),this.disposalCandidates[e]=null,--this.disposalCount):n.dependencyTracking[e]||t.addDependencyTracking(e,r,n.isSleeping?{_target:r}:t.subscribeToDependency(r)),r._notificationIsPending&&r._notifyNextChangeIfValueIsDifferent())}_.fn={equalityComparer:Et,getDependenciesCount(){return this[P].dependenciesCount},getDependencies(){let r=this[P].dependencyTracking,e=[];return k(r,function(t,n){e[n._order]=n._target}),e},addDependencyTracking(r,e,t){if(this[P].pure&&e===this)throw Error("A 'pure' computed must not be called recursively");this[P].dependencyTracking[r]=t,t._order=this[P].dependenciesCount++,t._version=e.getVersion()},haveDependenciesChanged(){var r,e,t=this[P].dependencyTracking;for(r in t)if(J(t,r)&&(e=t[r],this._evalDelayed&&e._target._notificationIsPending||e._target.hasChanged(e._version)))return!0},markDirty(){this._evalDelayed&&!this[P].isBeingEvaluated&&this._evalDelayed(!1)},isActive(){let r=this[P];return r.isDirty||r.dependenciesCount>0},respondToChange(){this._notificationIsPending?this[P].isDirty&&(this[P].isStale=!0):this.evaluatePossiblyAsync()},subscribeToDependency(r){if(r._deferUpdates){var e=r.subscribe(this.markDirty,this,"dirty"),t=r.subscribe(this.respondToChange,this);return{_target:r,dispose(){e.dispose(),t.dispose()}}}else return r.subscribe(this.evaluatePossiblyAsync,this)},evaluatePossiblyAsync(){var r=this,e=r.throttleEvaluation;e&&e>=0?(clearTimeout(this[P].evaluationTimeoutInstance),this[P].evaluationTimeoutInstance=de(function(){r.evaluateImmediate(!0)},e)):r._evalDelayed?r._evalDelayed(!0):r.evaluateImmediate(!0)},evaluateImmediate(r){var e=this,t=e[P],n=t.disposeWhen,i=!1;if(!t.isBeingEvaluated&&!t.isDisposed){if(t.disposeWhenNodeIsRemoved&&!Qt(t.disposeWhenNodeIsRemoved)||n&&n()){if(!t.suppressDisposalUntilDisposeWhenReturnsFalse){e.dispose();return}}else t.suppressDisposalUntilDisposeWhenReturnsFalse=!1;t.isBeingEvaluated=!0;try{i=this.evaluateImmediate_CallReadWithDependencyDetection(r)}finally{t.isBeingEvaluated=!1}return i}},evaluateImmediate_CallReadWithDependencyDetection(r){var e=this,t=e[P],n=!1,i=t.pure?void 0:!t.dependenciesCount,u={computedObservable:e,disposalCandidates:t.dependencyTracking,disposalCount:t.dependenciesCount};b.begin({callbackTarget:u,callback:jo,computed:e,isInitial:i}),t.dependencyTracking={},t.dependenciesCount=0;var s=this.evaluateImmediate_CallReadThenEndDependencyDetection(t,u);return t.dependenciesCount?n=e.isDifferent(t.latestValue,s):(e.dispose(),n=!0),n&&(t.isSleeping?e.updateVersion():e.notifySubscribers(t.latestValue,"beforeChange"),t.latestValue=s,c.debug&&(e._latestValue=s),e.notifySubscribers(t.latestValue,"spectate"),!t.isSleeping&&r&&e.notifySubscribers(t.latestValue),e._recordUpdate&&e._recordUpdate()),i&&e.notifySubscribers(t.latestValue,"awake"),n},evaluateImmediate_CallReadThenEndDependencyDetection(r,e){try{var t=r.readFunction;return r.evaluatorFunctionTarget?t.call(r.evaluatorFunctionTarget):t()}finally{b.end(),e.disposalCount&&!r.isSleeping&&k(e.disposalCandidates,Ho),r.isStale=r.isDirty=!1}},peek(r){let e=this[P];return(e.isDirty&&(r||!e.dependenciesCount)||e.isSleeping&&this.haveDependenciesChanged())&&this.evaluateImmediate(),e.latestValue},get[re](){return this.peek()},limit(r){let e=this[P];z.fn.limit.call(this,r),Object.assign(this,{_evalIfChanged(){return this[P].isSleeping||(this[P].isStale?this.evaluateImmediate():this[P].isDirty=!1),e.latestValue},_evalDelayed(t){this._limitBeforeChange(e.latestValue),e.isDirty=!0,t&&(e.isStale=!0),this._limitChange(this,!t)}})},dispose(){var r=this[P];!r.isSleeping&&r.dependencyTracking&&k(r.dependencyTracking,function(e,t){t.dispose&&t.dispose()}),r.disposeWhenNodeIsRemoved&&r.domNodeDisposalCallback&&Dt(r.disposeWhenNodeIsRemoved,r.domNodeDisposalCallback),Object.assign(r,Lo)}};var Wo={beforeSubscriptionAdd(r){var e=this,t=e[P];if(!t.isDisposed&&t.isSleeping&&r==="change"){if(t.isSleeping=!1,t.isStale||e.haveDependenciesChanged())t.dependencyTracking=null,t.dependenciesCount=0,e.evaluateImmediate()&&e.updateVersion();else{var n=[];k(t.dependencyTracking,function(i,u){n[u._order]=i}),V(n,function(i,u){var s=t.dependencyTracking[i],o=e.subscribeToDependency(s._target);o._order=u,o._version=s._version,t.dependencyTracking[i]=o}),e.haveDependenciesChanged()&&e.evaluateImmediate()&&e.updateVersion()}t.isDisposed||e.notifySubscribers(t.latestValue,"awake")}},afterSubscriptionRemove(r){var e=this[P];!e.isDisposed&&r==="change"&&!this.hasSubscriptionsForEvent("change")&&(k(e.dependencyTracking,function(t,n){n.dispose&&(e.dependencyTracking[t]={_target:n._target,_order:n._order,_version:n._version},n.dispose())}),e.isSleeping=!0,this.notifySubscribers(void 0,"asleep"))},getVersion(){var r=this[P];return r.isSleeping&&(r.isStale||this.haveDependenciesChanged())&&this.evaluateImmediate(),z.fn.getVersion.call(this)}},Uo={beforeSubscriptionAdd(r){(r==="change"||r==="beforeChange")&&this.peek()}};Object.setPrototypeOf(_.fn,z.fn);var pu=T.protoProperty;_.fn[pu]=_;T.observablePrototypes.add(_);function St(r){return typeof r=="function"&&r[pu]===_}function In(r){return St(r)&&r[P]&&r[P].pure}function Ie(r,e){return typeof r=="function"?_(r,e,{pure:!0}):(r=j({},r),r.pure=!0,_(r,e))}function hu(r,e){r.throttleEvaluation=e;var t=null;return _({read:r,write:function(n){clearTimeout(t),t=setTimeout(function(){r(n)},e)}})}Ee.throttle=hu;var gu=Symbol("Knockout Proxied Object"),Au=Symbol("Knockout Proxied Observables");function Ko(r,e){return _({owner:r,read:e,write:e,pure:"pure"in e?e.pure:!0,deferEvaluation:"deferEvaluation"in e?e.deferEvaluation:!0}).extend({deferred:!0})}function vu(r,e,t,n){if(r[e])r[e](t);else{let i=Array.isArray(t)?he:typeof t=="function"?Ko.bind(null,n):T;r[e]=i(t)}}function mu(r,e,t){for(let n of Object.keys(e))vu(r,n,e[n],t);return e}function Wr(r){let e={[gu]:r};e[Au]=e;let t=new Proxy(function(){},{has(n,i){return i in e},get(n,i){return f(e[i])},set(n,i,u,s){return vu(e,i,u,t),r[i]=u,!0},deleteProperty(n){return delete e[n],delete r[n]},apply(n,i,[u]){return u?(mu(e,u,t),Object.assign(r,u)):r},getPrototypeOf(){return Object.getPrototypeOf(r)},setPrototypeOf(n,i){return Object.setPrototypeOf(r,i)},defineProperty(n,i,u){return Object.defineProperty(r,i,u)},preventExtensions(){return Object.preventExtensions(r)},isExtensible(){return Object.isExtensible(r)},ownKeys(){return[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)]}});return mu(e,r,t),t}function Du(r,e){return r[Au][e]}function Qo(r,e){return Du(r,e).peek()}function qo(r){return gu in r}Object.assign(Wr,{getObservable:Du,peek:Qo,isProxied:qo});function Jo(r,e,t){let n=Ie(r,e).extend({notify:"always"}),i=n.subscribe(u=>{u&&(i.dispose(),t(u))});return n.notifySubscribers(n.peek()),i}function kn(r,e,t){let n=Jo.bind(null,r,t);return e?n(e.bind(t)):new Promise(n)}var nr=ee("LifeCycle Subscriptions List"),Nt=ee("LifeCycle Anchor Node"),X=class{static mixInto(e){let t=e.prototype||e,n=X.prototype;for(let i of Object.getOwnPropertyNames(n))t[i]=n[i]}subscribe(e,t,n){typeof t=="string"&&(t=this[t]),this.addDisposable(e.subscribe(t,this,n))}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[Nt],this.addDisposable(_(e))}addEventListener(...e){let t=e[0].nodeType?e.shift():this[Nt],[n,i,u]=e,s=typeof i=="string"?this[i].bind(this):i;this.__addEventListener(t,n,s,u)}__addEventListener(e,t,n,i){e.addEventListener(t,n,i);function u(){e.removeEventListener(t,n)}pe(e,u),this.addDisposable({dispose:u})}anchorTo(e){"addDisposable"in e?(e.addDisposable(this),this[Nt]=null):(this[Nt]=e,pe(e,()=>this[Nt]===e&&this.dispose()))}dispose(){(this[nr]||[]).forEach(t=>t.dispose()),this[nr]=[],this[Nt]=null}addDisposable(e){let t=this[nr]||[];if(this[nr]||(this[nr]=t),typeof e.dispose!="function")throw new Error("Lifecycle::addDisposable argument missing `dispose`.");return t.push(e),e}};var Ur=Symbol("_ancestorBindingInfo"),Cu=D.nextKey(),Q={childrenComplete:"childrenComplete",descendantsComplete:"descendantsComplete",subscribe(r,e,t,n){let i=D.getOrSet(r,Cu,{});return i.eventSubscribable||(i.eventSubscribable=new z),i.eventSubscribable.subscribe(t,n,e)},notify(r,e){let t=D.get(r,Cu);t&&t.eventSubscribable&&t.eventSubscribable.notifySubscribers(r,e)}};var On=D.nextKey(),Ue=Symbol("Knockout Context Subscription"),Fu=Symbol("Knockout Parent Indicator");function ke(r,e,t,n,i){let u=this,s=r===Fu,o=s?void 0:r,a=typeof o=="function"&&!S(o);u.ko=c.knockoutInstance;let l,d;function m(){let h=a?o():o,p=f(h);return e?(e[Ue]&&e[Ue](),j(u,e),Ur in e&&(u[Ur]=e[Ur])):(u.$parents=[],u.$root=p),u[Ue]=d,s?p=u.$data:(u.$rawData=h,u.$data=p),t&&(u[t]=p),n&&n(u,e,p),u.$data}i&&i.exportDependencies?m():(d=Ie(m),d.peek(),d.isActive()?(u[Ue]=d,d.equalityComparer=null):u[Ue]=void 0)}Object.assign(ke.prototype,{lookup(r,e,t){switch(r){case"$element":return t;case"$context":return this;case"this":case"$data":return this.$data}let n=this.$data;if(Ge(n)&&r in n)return n[r];if(r in this)return this[r];if(r in e)return e[r];throw new Error(`The variable "${r}" was not found on $data, $context, or globals.`)},createChildContext(r,e,t,n){return new ke(r,this,e,function(i,u){i.$parentContext=u,i.$parent=u.$data,i.$parents=(u.$parents||[]).slice(0),i.$parents.unshift(i.$parent),t&&t(i)},n)},extend(r){return new ke(Fu,this,null,function(e,t){j(e,typeof r=="function"?r.call(e):r)})},createStaticChildContext(r,e){return this.createChildContext(r,e,null,{exportDependencies:!0})}});function Go(r){let e=D.get(r,On);return e&&e.context}function Oe(r){if(r&&(r.nodeType===1||r.nodeType===8))return Go(r)}function Kr(r){var e=Oe(r);return e?e.$data:void 0}var zo=(r,e,t)=>new Promise((n,i)=>{var u=a=>{try{o(t.next(a))}catch(l){i(l)}},s=a=>{try{o(t.throw(a))}catch(l){i(l)}},o=a=>a.done?n(a.value):Promise.resolve(a.value).then(u,s);o((t=t.apply(r,e)).next())}),Tt=class{constructor({asyncBindingsApplied:e,rootNode:t,bindingContext:n}){Object.assign(this,{rootNode:t,bindingContext:n,isSync:e.size===0,isComplete:this.isSync}),this.isSync||(this.completionPromise=this.completeWhenBindingsFinish(e))}completeWhenBindingsFinish(e){return zo(this,null,function*(){return yield Promise.all(e),this.isComplete=!0,this})}};var ne=class extends X{constructor(e){super();let{$element:t,valueAccessor:n,allBindings:i,$context:u}=e;Object.assign(this,{valueAccessor:n,allBindings:i,$element:t,$context:u,$data:u.$data}),this.anchorTo(t)}get value(){return this.valueAccessor()}set value(e){let t=this.valueAccessor();Z(t)?t(e):this.valueAccessor(e)}get controlsDescendants(){return!1}static get allowVirtualElements(){return!1}static get isBindingHandlerClass(){return!0}get bindingCompleted(){return!0}static registerAs(e,t=c.bindingProviderInstance){t.bindingHandlers.set(e,this)}},Eu=Symbol("Async Binding Resolved"),ie=class extends ne{constructor(e){super(e),this.bindingCompletion=new Promise(t=>{this[Eu]=t}),this.completeBinding=t=>this[Eu](t)}get bindingCompleted(){return this.bindingCompletion}};var Yo=c.global.WeakMap||Map,Pn=new Yo,nt=class extends ne{constructor(e){super(e);let t=this.handler;this.onError=e.onError,typeof t.dispose=="function"&&this.addDisposable(t);try{this.initReturn=t.init&&t.init(...this.legacyArgs)}catch(n){e.onError("init",n)}}onValueChange(){let e=this.handler;if(typeof e.update=="function")try{e.update(...this.legacyArgs)}catch(t){this.onError("update",t)}}get legacyArgs(){return[this.$element,this.valueAccessor,this.allBindings,this.$data,this.$context]}get controlsDescendants(){return(this.initReturn||this.handler||{}).controlsDescendantBindings}static getOrCreateFor(e,t){if(Pn.has(t))return Pn.get(t);let n=this.createFor(e,t);return Pn.set(t,n),n}static createFor(e,t){if(typeof t=="function"){let[n,i]=[t,t.dispose];return class extends nt{get handler(){let u=n.bind(this),s=i?i.bind(this):null;return{init:u,dispose:s}}static get after(){return t.after}static get allowVirtualElements(){return t.allowVirtualElements||A.allowedBindings[e]}}}if(typeof t=="object")return class extends nt{get handler(){return t}static get after(){return t.after}static get allowVirtualElements(){return t.allowVirtualElements||A.allowedBindings[e]}};throw new Error("The given handler is not an appropriate type.")}};var Xo={script:!0,textarea:!0,template:!0};function ur(){return c.bindingProviderInstance.instance||c.bindingProviderInstance}function Bu(r,e){return(r.FOR_NODE_TYPES||[1,3,8]).includes(e.nodeType)}function yu(r,e){if(!!r)return r.isBindingHandlerClass?r:nt.getOrCreateFor(e,r)}function Zo(r,e){if(!(!e||typeof e.getBindingHandler!="function"))return yu(e.getBindingHandler(r))}function ea(r){let e=c.getBindingHandler(r)||ur().bindingHandlers.get(r);return yu(e,r)}function ir(r){return r()}function xu(r,e,t){let n=A.firstChild(e);if(!n)return;let i,u=ur(),s=u.preprocessNode;if(s){for(;i=n;)n=A.nextSibling(i),s.call(u,i);n=A.firstChild(e)}for(;i=n;)n=A.nextSibling(i),Nu(r,i,t);Q.notify(e,Q.childrenComplete)}function wu(r){let e=ur();return Bu(e,r)&&e.nodeHasBindings(r)}function Su(r){return wu(r)||[...r.childNodes].some(e=>Su(e))}function Nu(r,e,t){var n=e.nodeType===1;n&&A.normaliseVirtualElementDomStructure(e);let i=n||wu(e),{shouldBindDescendants:u}=i?Tu(e,null,r,t):{shouldBindDescendants:!0};u&&!Xo[$(e)]&&xu(r,e,t)}function*ta(r,e){let t=[],n={},i=[];k(r,function u(s){if(!n[s]){let o=Zo(s,e)||ea(s);if(!o)return;o.after&&(i.push(s),V(o.after,function(a){if(!!r[a]){if(q(i,a)!==-1)throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+i.join(", "));u(a)}}),i.length--),t.push([s,o])}n[s]=!0});for(let u of t)yield u}function Tu(r,e,t,n){let i=D.getOrSet(r,On,{}),u=i.alreadyBound;if(!e){if(u)return Su(r)&&bu({during:"apply",errorCaptured:new Error("You cannot apply bindings multiple times to the same element."),element:r,bindingContext:t}),!1;i.alreadyBound=!0}u||(i.context=t);var s;if(e&&typeof e!="function")s=e;else{let h=ur(),p=h.getBindingAccessors;if(Bu(h,r)){var o=_(function(){return s=e?e(t,r):p.call(h,r,t),s&&t[Ue]&&t[Ue](),s},null,{disposeWhenNodeIsRemoved:r});(!s||!o.isActive())&&(o=null)}}var a;if(s){let h=function(){return ve(o?o():s,ir)};var l=h;let p=t.$component||{},C={};D.set(r,"bindingHandlers",C);let B=o?x=>function(F){let w=o()[x];return arguments.length===0?ir(w):w(F)}:x=>s[x];h.has=x=>x in s,h.get=x=>s[x]&&ir(B(x)),Q.childrenComplete in s&&Q.subscribe(r,Q.childrenComplete,()=>{let x=ir(s[Q.childrenComplete]);if(!x)return;let F=A.childNodes(r);F.length&&x(F,Kr(F[0]))});let v=ta(s,p),R=new Set;for(let[x,F]of v){let w=function(N,M){bu({during:N,errorCaptured:M,bindings:s,allBindings:h,bindingKey:x,bindingContext:t,element:r,valueAccessor:B(x)})};var d=w;if(r.nodeType===8&&!F.allowVirtualElements)throw new Error(`The binding '${x}' cannot be used with virtual elements`);try{let N=b.ignore(()=>new F({allBindings:h,$element:r,$context:t,onError:w,valueAccessor(...M){return B(x)(...M)}}));if(N.onValueChange&&b.ignore(()=>N.computed("onValueChange")),C[x]=N,N.controlsDescendants){if(a!==void 0)throw new Error("Multiple bindings ("+a+" and "+x+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");a=x}N.bindingCompleted instanceof Promise&&(n.add(N.bindingCompleted),R.add(N.bindingCompleted))}catch(N){w("creation",N)}}ra(r,s,R)}return{shouldBindDescendants:a===void 0}}function ra(r,e,t){let n=Q.descendantsComplete in e,i=A.firstChild(r),u=n&&ir(e[Q.descendantsComplete]),s=()=>{Q.notify(r,Q.descendantsComplete),u&&i&&u(r)};t.size?Promise.all(t).then(s):s()}function Qr(r,e){return r&&r instanceof ke?r:new ke(r,void 0,void 0,e)}function sr(r,e,t,n){return r.nodeType===1&&A.normaliseVirtualElementDomStructure(r),Tu(r,e,Qr(t),n)}function _u(r,e,t){let n=new Set,i=Qr(t),u=ur().makeBindingAccessors(e,i,r);return sr(r,u,i,n),new Tt({asyncBindingsApplied:n,rootNode:r,bindingContext:i})}function le(r,e){let t=new Set;if(e.nodeType===1||e.nodeType===8){let n=Qr(r);return xu(n,e,t),new Tt({asyncBindingsApplied:t,rootNode:e,bindingContext:n})}return new Tt({asyncBindingsApplied:t,rootNode:e})}function _t(r,e,t){let n=new Set;if(!c.jQuery===void 0&&c.jQuery&&(c.jQuery=c.jQuery),e){if(e.nodeType!==1&&e.nodeType!==8)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=Qr(r,t);return Nu(i,e,n),Promise.all(n)}function bu(r){var e,t;r.bindingKey?(e=r.errorCaptured,r.message='Unable to process binding "'+r.bindingKey+'" in binding "'+r.bindingKey+`"
11
- Message: `+(e.message?e.message:e)):e=r.errorCaptured;try{j(e,r)}catch(n){r.stack=e.stack,e=new Error(e.message?e.message:e),j(e,r)}c.onError(e)}function na(r,e,t,n,i){var u=[],s=_(function(){var o=e(t,i,Xe(u,r))||[];u.length>0&&(Ir(u,o),n&&b.ignore(n,null,[t,o,i])),u.length=0,mt(u,o)},null,{disposeWhenNodeIsRemoved:r,disposeWhen:function(){return!Ti(u)}});return{mappedNodes:u,dependentObservable:s.isActive()?s:void 0}}var Iu=D.nextKey(),ku=D.nextKey();function It(r,e,t,n,i,u){e=e||[],typeof e.length=="undefined"&&(e=[e]),n=n||{};let s=D.get(r,Iu),o=!s;var a=[],l=0,d=0,m=[],h=[],p=[],C=[],B=[],v;let R=0;function x(we){v={arrayEntry:we,indexObservable:T(d++)},a.push(v),h.push(v),o||B.push(v)}function F(we){v=s[we],d!==we&&C.push(v),v.indexObservable(d++),Xe(v.mappedNodes,r),a.push(v),h.push(v)}function w(we,an){if(we)for(var Ut=0,Ss=an.length;Ut<Ss;Ut++)V(an[Ut].mappedNodes,function(Ns){we(Ns,Ut,an[Ut].arrayEntry)})}if(o)V(e,x);else{if(!u||s&&s._countWaitingForRemove){var N=o?[]:pt(s,function(we){return we.arrayEntry}),M={dontLimitMoves:n.dontLimitMoves,sparse:!0};u=gt(N,e,M)}for(var L=0,ue,U,$e;ue=u[L];L++)switch(U=ue.moved,$e=ue.index,ue.status){case"deleted":for(;l<$e;)F(l++);U===void 0&&(v=s[l],v.dependentObservable&&(v.dependentObservable.dispose(),v.dependentObservable=void 0),Xe(v.mappedNodes,r).length&&(n.beforeRemove&&(a.push(v),h.push(v),R++,v.arrayEntry===ku?v=null:p.push(v)),v&&m.push.apply(m,v.mappedNodes))),l++;break;case"added":for(;d<$e;)F(l++);U!==void 0?F(U):x(ue.value);break}for(;d<e.length;)F(l++);a._countWaitingForRemove=R}D.set(r,Iu,a),w(n.beforeMove,C),V(m,n.beforeRemove?te:De),L=0;for(var br=A.firstChild(r),vi,Wt;v=h[L];L++){v.mappedNodes||j(v,na(r,t,v.arrayEntry,i,v.indexObservable));for(var Di=0;Wt=v.mappedNodes[Di];br=Wt.nextSibling,vi=Wt,Di++)Wt!==br&&A.insertAfter(r,Wt,vi);!v.initialized&&i&&(i(v.arrayEntry,v.mappedNodes,v.indexObservable),v.initialized=!0)}for(w(n.beforeRemove,p),L=0;L<p.length;++L)p[L].arrayEntry=ku;w(n.afterMove,C),w(n.afterAdd,B)}var ia=(r,e,t)=>new Promise((n,i)=>{var u=a=>{try{o(t.next(a))}catch(l){i(l)}},s=a=>{try{o(t.throw(a))}catch(l){i(l)}},o=a=>a.done?n(a.value):Promise.resolve(a.value).then(u,s);o((t=t.apply(r,e)).next())}),it=class extends ie{get controlsDescendants(){return!0}applyBindingsToDescendants(e,t){return ia(this,null,function*(){let n=le(e,this.$element);n.isSync?this.bindingCompletion=n:yield n.completionPromise,t&&t(n),this.completeBinding(n)})}};var Pu=1,Vu=2,Ru=3,$u=4;function Ke(r){if(this.domElement=r,!!r){var e=$(r);this.templateType=e==="script"?Pu:e==="textarea"?Vu:e=="template"&&r.content&&r.content.nodeType===11?Ru:$u}}Ke.prototype.text=function(){var r=this.templateType===Pu?"text":this.templateType===Vu?"value":"innerHTML";if(arguments.length==0)return this.domElement[r];var e=arguments[0];r==="innerHTML"?Ct(this.domElement,e):this.domElement[r]=e};var Ou=D.nextKey()+"_";Ke.prototype.data=function(r){if(arguments.length===1)return D.get(this.domElement,Ou+r);D.set(this.domElement,Ou+r,arguments[1])};var Mu=D.nextKey();function Lu(r){return D.get(r,Mu)||{}}function Vn(r,e){D.set(r,Mu,e)}Ke.prototype.nodes=function(){var r=this.domElement;if(arguments.length==0){let t=Lu(r),n=t.containerData||(this.templateType===Ru?r.content:this.templateType===$u?r:void 0);if(!n||t.alwaysCheckText){let i=this.text();i&&(n=zi(i,r.ownerDocument),this.text(""),Vn(r,{containerData:n,alwaysCheckText:!0}))}return n}else{var e=arguments[0];Vn(r,{containerData:e})}};function me(r){this.domElement=r}me.prototype=new Ke;me.prototype.constructor=me;me.prototype.text=function(){if(arguments.length==0){var r=Lu(this.domElement);return r.textData===void 0&&r.containerData&&(r.textData=r.containerData.innerHTML),r.textData}else{var e=arguments[0];Vn(this.domElement,{textData:e})}};function ut(){}j(ut.prototype,{renderTemplateSource:function(r,e,t,n){t.onError("Override renderTemplateSource")},createJavaScriptEvaluatorBlock:function(r){c.onError("Override createJavaScriptEvaluatorBlock")},makeTemplateSource:function(r,e){if(typeof r=="string"){e=e||document;var t=e.getElementById(r);return t||c.onError("Cannot find template with ID "+r),new Ke(t)}else{if(r.nodeType==1||r.nodeType==8)return new me(r);c.onError("Unknown template type: "+r)}},renderTemplate:function(r,e,t,n){var i=this.makeTemplateSource(r,n);return this.renderTemplateSource(i,e,t,n)}});var Mn,Hu=D.nextKey();function qr(r){if(r!==void 0&&!(r instanceof ut))throw new Error("templateEngine must inherit from ko.templateEngine");Mn=r}function Rn(r,e,t){let n,i=r,u=A.nextSibling(e);for(;i&&(n=i)!==u;)i=A.nextSibling(n),t(n,i)}function Wu(r,e,t){if(r.length){var n=r[0],i=r[r.length-1],u=n.parentNode,s=c.bindingProviderInstance,o=s.preprocessNode;if(o){if(Rn(n,i,function(a,l){var d=a.previousSibling,m=o.call(s,a);m&&(a===n&&(n=m[0]||l),a===i&&(i=m[m.length-1]||d))}),r.length=0,!n)return;n===i?r.push(n):(r.push(n,i),Xe(r,u))}Rn(n,i,function(a){(a.nodeType===1||a.nodeType===8)&&_t(e,a).then(t)}),Rn(n,i,function(a){(a.nodeType===1||a.nodeType===8)&&et.unmemoizeDomNodeAndDescendants(a,[e])}),Xe(r,u)}}function $n(r){return r.nodeType?r:r.length>0?r[0]:null}function Uu(r,e,t,n,i,u){i=i||{};var s=r&&$n(r),o=(s||t||{}).ownerDocument,a=i.templateEngine||Mn,l=a.renderTemplate(t,n,i,o);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");var d=!1;switch(e){case"replaceChildren":A.setDomNodeChildren(r,l),d=!0;break;case"replaceNode":Ir(r,l),d=!0;break;case"ignoreTargetNode":break;default:throw new Error("Unknown renderMode: "+e)}return d&&(Wu(l,n,u),i.afterRender&&b.ignore(i.afterRender,null,[l,n.$data]),e==="replaceChildren"&&Q.notify(r,Q.childrenComplete)),l}function Ku(r,e,t){return S(r)?r():typeof r=="function"?r(e,t):r}function Jr(r,e,t,n,i,u){if(t=t||{},(t.templateEngine||Mn)===void 0)throw new Error("Set a template engine before calling renderTemplate");if(i=i||"replaceChildren",n){var s=$n(n),o=function(){return!s||!Qt(s)},a=s&&i==="replaceNode"?s.parentNode:s;return _(function(){var l=e&&e instanceof ke?e:new ke(e,null,null,null,{exportDependencies:!0}),d=Ku(r,l.$data,l);let m=Uu(n,i,d,l,t,u);i==="replaceNode"&&(n=m,s=$n(n))},null,{disposeWhen:o,disposeWhenNodeIsRemoved:a})}else return et.memoize(function(l){Jr(r,e,t,l,"replaceNode")})}function Qu(r,e,t,n,i,u){var s;function o(h,p){t.as?c.createChildContextWithAs?s=i.createChildContext(h,t.as,B=>{B.$index=p}):s=i.extend({[t.as]:h,$index:p}):s=i.createChildContext(h,t.as,B=>{B.$index=p});var C=Ku(r,h,s);return Uu(n,"ignoreTargetNode",C,s,t,u)}var a=function(h,p){Wu(p,s,u),t.afterRender&&t.afterRender(p,h),s=null};function l(h,p){b.ignore(It,null,[n,h,o,t,a,p]),Q.notify(n,Q.childrenComplete)}let d=t.includeDestroyed===!1||c.foreachHidesDestroyed&&!t.includeDestroyed;if(!d&&!t.beforeRemove&&rr(e)){l(e.peek());var m=e.subscribe(function(h){l(e(),h)},null,"arrayChange");return m.disposeWhenNodeIsRemoved(n),m}else return _(function(){var h=f(e)||[];Symbol.iterator in h||(h=[h]),d&&(h=Je(h,function(C){return C==null||!f(C._destroy)})),l(h)},null,{disposeWhenNodeIsRemoved:n})}var ju=D.nextKey(),kt=class extends ie{constructor(e){super(e);let t=this.$element,n=f(this.value);D.set(t,"conditional",{elseChainSatisfied:T(!0)}),typeof n=="string"||n.name?this.bindNamedTemplate():"nodes"in n?this.bindNodeTemplate(n.nodes||[]):this.bindAnonymousTemplate()}bindNamedTemplate(){A.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||!D.get(t,Hu))&&(t=Gt(e),D.set(t,Hu,!0)),new me(this.$element).nodes(t)}bindAnonymousTemplate(){let e=A.childNodes(this.$element);if(e.length===0)throw new Error("Anonymous template defined, but no template content was provided.");let t=Gt(e);new me(this.$element).nodes(t)}onValueChange(){let e=this.$element,t=this.$context;var n=this.value,i=f(n),u=!0,s=null,o=D.get(e,"conditional").elseChainSatisfied,a;if(typeof i=="string"?(a=n,i={}):(a=i.name,"if"in i&&(u=f(i.if)),u&&"ifnot"in i&&(u=!f(i.ifnot))),"foreach"in i){var l=u&&i.foreach||[];s=Qu(a||e,l,i,e,t,this.completeBinding),o((f(l)||[]).length!==0)}else if(u){var d="data"in i?t.createStaticChildContext(i.data,i.as):t;s=Jr(a||e,d,i,e,void 0,this.completeBinding),o(!0)}else A.emptyNode(e),o(!1);this.disposeOldComputedAndStoreNewOne(e,s)}disposeOldComputedAndStoreNewOne(e,t){let n=D.get(e,ju);n&&typeof n.dispose=="function"&&n.dispose(),D.set(e,ju,t&&(!t.isActive||t.isActive())?t:void 0)}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};function ce(){}ce.prototype=new ut;ce.prototype.constructor=ce;ce.prototype.renderTemplateSource=function(r,e,t,n){var i=!(H<9),u=i?r.nodes:null,s=u?r.nodes():null;if(s)return fe(s.cloneNode(!0).childNodes);var o=r.text();return Ce(o,n)};ce.instance=new ce;qr(ce.instance);var Gr=class extends kt{get value(){let e=this.valueAccessor(),t=bt(e);return!t||typeof t.length=="number"?{foreach:e,templateEngine:ce.instance}:(f(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:ce.instance})}};var qu={foreach:Gr,template:kt};var Ju={addDisposeCallback:pe,removeDisposeCallback:Dt,removeNode:De,addCleaner:Vi,removeCleaner:Ri,get cleanExternalData(){return c.cleanExternalData},set cleanExternalData(r){c.set("cleanExternalData",r)}},sa=Object.assign({addOrRemoveItem:Me,arrayFilter:Je,arrayFirst:Br,arrayForEach:V,arrayGetDistinctValues:Bi,arrayIndexOf:q,arrayMap:pt,arrayPushAll:mt,arrayRemoveItem:ht,cloneNodes:Ne,compareArrays:gt,createSymbolOrString:ee,domData:D,domNodeDisposal:Ju,extend:j,filters:c.filters,objectForEach:k,objectMap:ve,parseHtmlFragment:Ce,parseJson:Si,parseObjectLiteral:wt,peekObservable:bt,range:yi,registerEventHandler:G,setDomNodeChildrenFromArrayMapping:It,setHtml:Ct,setTextContent:Ze,toggleDomNodeCssClass:At,triggerEvent:Ye,unwrapObservable:f}),Ln={cleanNode:te,dependencyDetection:b,computedContext:b,filters:c.filters,ignoreDependencies:b.ignore,memoization:et,options:c,removeNode:De,selectExtensions:O,tasks:Fe,utils:sa,LifeCycle:X,isObservable:S,isSubscribable:Ft,isWriteableObservable:Z,isWritableObservable:Z,observable:T,observableArray:he,isObservableArray:rr,peek:bt,subscribable:z,unwrap:f,toJS:yt,toJSON:Tn,proxy:Wr,computed:_,dependentObservable:_,isComputed:St,isPureComputed:In,pureComputed:Ie,when:kn,nativeTemplateEngine:ce,renderTemplate:Jr,setTemplateEngine:qr,templateEngine:ut,templateSources:{domElement:Ke,anonymousTemplate:me},applyBindingAccessorsToNode:sr,applyBindings:_t,applyBindingsToDescendants:le,applyBindingsToNode:_u,contextFor:Oe,dataFor:Kr,BindingHandler:ne,AsyncBindingHandler:ie,virtualElements:A,domNodeDisposal:Ju,bindingEvent:Q},or=class{constructor({provider:e,bindings:t,extenders:n,filters:i,options:u}){if(Object.assign(Ln.options,u,{filters:i,bindingProviderInstance:e}),e.setGlobals(Ln.options.bindingGlobals),Array.isArray(t))for(let s of t)e.bindingHandlers.set(s);else e.bindingHandlers.set(t);this.providedProperties={extenders:Object.assign(Ee,n),bindingHandlers:e.bindingHandlers,bindingProvider:e}}create(...e){let t=Object.assign({get getBindingHandler(){return c.getBindingHandler},set getBindingHandler(n){c.set("getBindingHandler",n)}},Ln,this.providedProperties,...e);return t.options.knockoutInstance=t,t}};var ar=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 W=class{constructor(e={}){if(this.constructor===W)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.bindingHandlers||new ar,this.globals=e.globals||{}}setGlobals(e){this.globals=e}get preemptive(){return!1}nodeHasBindings(){}getBindingAccessors(){}preprocessNode(e){}postProcess(){}get instance(){return this._overloadInstance||this}set instance(e){!e||e===this?this._overloadInstance=void 0:this._overloadInstance=new Hn(e,this)}makeAccessorsFromFunction(e){return ve(b.ignore(e),(t,n)=>()=>e()[n])}makeValueAccessor(e){return()=>e}makeBindingAccessors(e,t,n){return typeof e=="function"?this.makeAccessorsFromFunction(e.bind(null,t,n)):ve(e,this.makeValueAccessor)}},Hn=class extends W{get FOR_NODE_TYPES(){return[1,3,8]}constructor(e,t){super(),Object.assign(this,{providerObject:e}),this.bindingHandlers=e.bindingHandlers||t.bindingHandlers}getBindingsAndMakeAccessors(e,t){let n=this.providerObject.getBindings.bind(this.providerObject,e,t);return this.makeAccessorsFromFunction(n)}getBindingAccessors(e,t){return this.providerObject.getBindingAccessors?this.providerObject.getBindingAccessors(e,t):this.getBindingsAndMakeAccessors(e,t)}nodeHasBindings(e){return this.providerObject.nodeHasBindings(e)}preprocessNode(e){if(this.providerObject.preprocessNode)return this.providerObject.preprocessNode(e)}};var Qe=class extends W{*processBinding(e,t){let[n,i]=e.split("."),u=this.bindingHandlers.get(n);if(u&&u.preprocess){let s=[],o=(...a)=>s.push(a);t=u.preprocess(t,e,o);for(let[a,l]of s)yield*this.processBinding(a,l)}else i&&(t=`{${i}:${t}}`);yield`'${n}':${t}`}*generateBindingString(e){let t=typeof e=="string"?wt(e):e;for(let{key:n,unknown:i,value:u}of t)yield*this.processBinding(n||i,u)}preProcessBindings(e){return Array.from(this.generateBindingString(e)).join(",")}getBindingAccessors(e,t){let n=e&&this.getBindingString(e);if(!n)return;let i=this.preProcessBindings(n);return new Be().parse(i,t,this.globals,e)}getBindingString(){throw new Error("Overload getBindingString.")}};var Ot=class extends Qe{get FOR_NODE_TYPES(){return[1,8]}preprocessNode(e){if(e.tagName==="KO"){let t=e.parentNode,n=[...e.childNodes],i=[...this.genElementBindingStrings(e)].join(","),u=document.createComment("ko "+i),s=document.createComment("/ko");t.insertBefore(u,e);for(let o of n)t.insertBefore(o,e);return t.insertBefore(s,e),e.remove(),[u,...n,s]}}*genElementBindingStrings(e){for(let{name:t,value:n}of e.attributes)yield`${t.replace(/^ko-/,"")}: ${n}`}getBindingString(e){if(e.nodeType===document.COMMENT_NODE)return A.virtualNodeBindingValue(e)}nodeHasBindings(e){if(e.nodeType===document.COMMENT_NODE)return A.isStartComment(e)}};var Pt=class extends Qe{get FOR_NODE_TYPES(){return[1]}get BIND_ATTRIBUTE(){return"data-bind"}getBindingString(e){if(e.nodeType===document.ELEMENT_NODE)return e.getAttribute(this.BIND_ATTRIBUTE)}nodeHasBindings(e){if(e.nodeType===document.ELEMENT_NODE)return e.hasAttribute(this.BIND_ATTRIBUTE)}};var jn={},Wn={};function oa(r,e){var t=pn(jn,r),n;t?t.subscribe(e):(t=jn[r]=new z,t.subscribe(e),aa(r,function(i,u){var s=!!(u&&u.synchronous);Wn[r]={definition:i,isSynchronousComponent:s},delete jn[r],n||s?t.notifySubscribers(i):Fe.schedule(function(){t.notifySubscribers(i)})}),n=!0)}function aa(r,e){lr("getConfig",[r],function(t){t?lr("loadComponent",[r,t],function(n){e(n,t)}):e(null,null)})}function lr(r,e,t,n){n||(n=ge.loaders.slice(0));var i=n.shift();if(i){var u=i[r];if(u){var s=!1,o=u.apply(i,e.concat(function(a){s?t(null):a!==null?t(a):lr(r,e,t,n)}));if(o!==void 0&&(s=!0,!i.suppressLoaderExceptions))throw new Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else lr(r,e,t,n)}else t(null)}var ge={get(r,e){var t=pn(Wn,r);t?t.isSynchronousComponent?b.ignore(function(){e(t.definition)}):Fe.schedule(function(){e(t.definition)}):oa(r,e)},clearCachedDefinition(r){delete Wn[r]},_getFirstResultFromLoaders:lr,loaders:[]};var st={},zr=Symbol("Knockout View Model ViewModel factory");function Yr(r,e){if(!e)throw new Error("Invalid configuration for "+r);if(qn(r))throw new Error("Component "+r+" is already registered");let t=r.includes("-")&&r.toLowerCase()===r;!e.ignoreCustomElementWarning&&!t&&console.log(`
7
+ `;return new Error(i)}name(){let e="",t;this.white();let r=this.ch;for((r==="'"||r==='"')&&(t=r,r=this.next());r;){if(t&&r===t)return this.white(),r=this.next(),r!==":"&&r!==","&&this.error("Object name: "+e+" missing closing "+t),e;if(r===":"||r<=" "||r===","||r==="|")return e;e+=r,r=this.next()}return e}number(){let e,t="",r=this.ch;for(r==="-"&&(t="-",r=this.next("-"));r>="0"&&r<="9";)t+=r,r=this.next();if(r===".")for(t+=".",r=this.next();r&&r>="0"&&r<="9";)t+=r,r=this.next();if(r==="e"||r==="E")for(t+=r,r=this.next(),(r==="-"||r==="+")&&(t+=r,r=this.next());r>="0"&&r<="9";)t+=r,r=this.next();if(e=+t,!isFinite(e))c.onError(new Error("Bad number: "+e+" in "+t));else return e}objectAddValue(e,t,r){r&&r[F.isExpressionOrIdentifierSymbol]?Object.defineProperty(e,t,{get:()=>F.value_of(r,...this.currentContextGlobals),enumerable:!0}):Array.isArray(r)?Object.defineProperty(e,t,{get:()=>r.map(i=>F.value_of(i,...this.currentContextGlobals)),enumerable:!0}):e[t]=r}object(){let e,t={},r=this.ch;if(r==="{"){if(this.next("{"),r=this.white(),r==="}")return r=this.next("}"),t;for(;r;){if(r==='"'||r==="'"||r==="`"?e=this.string():e=this.name(),J(t,e)&&this.error('Duplicate key "'+e+'"'),this.white()===":")r=this.next(":"),this.objectAddValue(t,e,this.singleValueExpression());else{let i=new Q(this,e,[]);this.objectAddValue(t,e,i)}if(r=this.white(),r==="}")return r=this.next("}"),t;if(this.next(","),r=this.white(),r==="}")return r=this.next("}"),t}}throw this.createError("Bad object")}readString(e){let t="",r=[""],i=E["+"],s,o,u,a=e==="`",l=this.next();for(;l;){if(l===e)return l=this.next(),a&&r.push(i),r.push(t),r;if(l==="\\")if(l=this.next(),l==="u"){for(u=0,o=0;o<4&&(s=parseInt(l=this.next(),16),!!isFinite(s));o+=1)u=u*16+s;t+=String.fromCharCode(u)}else if(typeof Gi[l]=="string")t+=Gi[l];else break;else a&&l==="$"?(l=this.next(),l==="{"?(this.next("{"),r.push(i),r.push(t),r.push(i),r.push(this.expression()),t=""):t+="$"+l):t+=l;l=this.next()}throw this.createError("Bad string")}string(){var t,r;let e=this.ch;if(e==='"')return(t=this.readString('"'))==null?void 0:t.join("");if(e==="'")return(r=this.readString("'"))==null?void 0:r.join("");if(e==="`")return F.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="",r,i=this.white(),s=Q.is_valid_start_char;for(;i&&!(s(i)||i<=" "||i===""||i==='"'||i==="'"||i==="{"||i==="("||i==="`"||i===")"||i<="9"&&i>="0"||!e.not_an_array&&i==="["||(t+=i,i=this.next(),i==="@"));)s=Q.is_valid_continue_char;return t!==""&&(e.prefix&&t==="-"&&(t="&-"),r=E[t],r||this.error("Bad operator: '"+t+"'.")),r}filter(){let e=this.next(),t=new Array,r=function(o){return o},i=this.name();for(c.filters[i]||c.onError(new Error("Cannot find filter by the name of: "+i)),e=this.white();e;){if(e===":"&&(e=this.next(),t.push(this.singleValueExpression("|"))),e==="|"){r=this.filter();break}if(e===",")break;e=this.white()}function s(o,u,a,l,f){let p=[o];for(let b=0,m=t.length;b<m;++b)p.push(F.value_of(t[b],a,l,f));return r(c.filters[i].apply(a,p),u,a,l,f)}return s.precedence=1,s}expression(e=!1,t=!0){let r,i=new Array,s=this.white();for(;s&&(r=this.operator({prefix:!0}),r&&(i.push(void 0),i.push(r),s=this.white()),s==="("?(this.next(),i.push(this.expression()),this.next(")")):i.push(this.value()),s=this.white(),!(s===":"||s==="}"||s==="]"||s===")"||s===""||s==="`"||s==="|"&&e==="|"||s===","&&!t));){if(s==="|"&&this.lookahead()!=="|"&&e){i.push(this.filter()),i.push(void 0);break}if(r=this.operator({not_an_array:!0}),r===E["?"]){this.ternary(i);break}else r===E["."]||r===E["?."]?(i.push(r),i.push(this.member()),r=null):r===E["["]?(i.push(r),i.push(this.expression()),s=this.next("]"),r=null):r===E["=>"]?(i[i.length-1]=new jt(this,i[i.length-1]),i.push(r)):r&&i.push(r);if(s=this.white(),s==="]"||!r&&s==="(")break}if(i.length===0)return;let o=this.dereferences();if(i.length===1&&!o.length)return i[0];for(let u=0,a=o.length;u<a;++u){let l=o[u];l.constructor===Ee?i.push(E.call):i.push(E["."]),i.push(l)}return new Oe(i)}singleValueExpression(e=!1){return this.expression(e,!1)}ternary(e){let t=new ht;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 Ee(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(),r=Q.is_valid_start_char;for(;t&&r(t);)e+=t,t=this.next(),r=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,r;for(;e&&(r=this.dereference(),r!==void 0);)t.push(r);return t}identifier(){let e="",t=Q.is_valid_start_char,r=this.white();for(;r&&t(r);)e+=r,r=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={},r,i,s=this.ch;for(;s;)e=this.name(),r=this.white(),!r||r===","?(r?s=this.next(","):s="",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.")),s=this.next(":"),this.objectAddValue(t[e[0]],e[1],this.singleValueExpression(!0))):(s=this.next(":"),t[e]&&typeof t[e]=="object"&&t[e].constructor===Object?(i=this.singleValueExpression(!0),typeof i!="object"||i.constructor!==Object?c.onError(new Error("Expected plain object for "+e+" value.")):L(t[e],i)):t[e]=this.singleValueExpression(!0)),this.white(),this.ch?s=this.next(","):s="");return t}valueAsAccessor(e,t,r,i){if(!e)return()=>e;if(typeof e=="function")return e;if(e[F.isExpressionOrIdentifierSymbol])return()=>F.value_of(e,t,r,i);if(Array.isArray(e))return()=>e.map(s=>F.value_of(s,t,r,i));if(typeof e!="function")return()=>zn(e);throw new Error("Value has cannot be converted to accessor: "+e)}convertToAccessors(e,t,r,i){return R(e,(s,o)=>{o instanceof Q?Object.defineProperty(e,s,{value:function(u,a){let l=o.get_value(void 0,t,r,i);if(arguments.length===0)return l;let f=u===l;if(!(a&&a.onlyIfChanged&&f))return o.set_value(u,t,r)}}):e[s]=this.valueAsAccessor(o,t,r,i)}),e}preparse(e=""){return(c.bindingStringPreparsers||[]).reduce((r,i)=>i(r),e.trim())}runParse(e,t){this.text=this.preparse(e),this.at=0,this.ch=" ";try{let r=t();return this.white(),this.ch&&this.error("Syntax Error"),r}catch(r){c.onError(r)}}parse(e,t={},r={},i){if(!e)return()=>null;this.currentContextGlobals=[t,r,i];let s=()=>this.readBindings(),o=this.runParse(e,s);return this.convertToAccessors(o,t,r,i)}parseExpression(e,t={},r={},i){if(!e)return()=>"";this.currentContextGlobals=[t,r,i];let s=()=>this.singleValueExpression(!0),o=this.runParse(e,s);return this.valueAsAccessor(o,t,r,i)}};var zi=",\"'`{}()/:[\\]",Yi=RegExp(['"(?:\\\\.|[^"])*"',"'(?:\\\\.|[^'])*'","`(?:\\\\.|[^`])*`","/\\*(?:[^*]|\\*+[^*/])*\\*+/",`//.*
8
+ `,"/(?:\\\\.|[^/])+/\\w*","[^\\s:,/][^"+zi+"]*[^\\s"+zi+"]","[^\\s]"].join("|"),"g"),au=/[\])"'A-Za-z0-9_$]+$/,lu={in:1,return:1,typeof:1};function mt(n){let e=It(n);e.charCodeAt(0)===123&&(e=e.slice(1,-1)),e+=`
9
+ ,`;let t=new Array,r=e.match(Yi),i,s=new Array,o=0;if(r.length<=1)return[];for(let u=0,a;a=r[u];++u){let l=a.charCodeAt(0);if(l===44){if(o<=0){t.push(i&&s.length?{key:i,value:s.join("")}:{unknown:i||s.join("")}),i=o=0,s=new Array;continue}}else if(l===58){if(!o&&!i&&s.length===1){i=s.pop();continue}}else{if(l===47&&a.length>1&&(a.charCodeAt(1)===47||a.charCodeAt(1)===42))continue;if(l===47&&u&&a.length>1){let f=r[u-1].match(au);f&&!lu[f[0]]&&(e=e.substr(e.indexOf(a)+1),r=e.match(Yi),u=-1,a="/")}else l===40||l===123||l===91?++o:l===41||l===125||l===93?--o:!i&&!s.length&&(l===34||l===39)&&(a=a.slice(1,-1))}s.push(a)}return t}function gr(n,e,t){E[n]=e,Number.isInteger(t)&&(E[n].precedence=t)}var I=G("_state"),cu={dependencyTracking:null,dependenciesCount:0,isDisposed:!0,isStale:!1,isDirty:!1,isSleeping:!1,disposeWhenNodeIsRemoved:null,readFunction:null,_options:null};function B(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 s(){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||C.registerDependency(s),(i.isDirty||i.isSleeping&&s.haveDependenciesChanged())&&s.evaluateImmediate(),i.latestValue}return s[I]=i,s.isWriteable=typeof r=="function",W.fn.init(s),Object.setPrototypeOf(s,B.fn),t.pure?(i.pure=!0,i.isSleeping=!0,L(s,pu)):t.deferEvaluation&&L(s,hu),c.deferUpdates&&be.deferred(s,!0),c.debug&&(s._options=t),i.disposeWhenNodeIsRemoved&&(i.suppressDisposalUntilDisposeWhenReturnsFalse=!0,i.disposeWhenNodeIsRemoved.nodeType||(i.disposeWhenNodeIsRemoved=null)),!i.isSleeping&&!t.deferEvaluation&&s.evaluateImmediate(),i.disposeWhenNodeIsRemoved&&s.isActive()&&Ce(i.disposeWhenNodeIsRemoved,i.domNodeDisposalCallback=function(){s.dispose()}),s}function du(n,e){e!==null&&e.dispose&&e.dispose()}function fu(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())}B.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(J(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,t=e[I],r=t.disposeWhen,i=!1;if(!t.isBeingEvaluated&&!t.isDisposed){if(t.disposeWhenNodeIsRemoved&&!kt(t.disposeWhenNodeIsRemoved)||r&&r()){if(!t.suppressDisposalUntilDisposeWhenReturnsFalse){e.dispose();return}}else t.suppressDisposalUntilDisposeWhenReturnsFalse=!1;t.isBeingEvaluated=!0;try{i=this.evaluateImmediate_CallReadWithDependencyDetection(n)}finally{t.isBeingEvaluated=!1}return i}},evaluateImmediate_CallReadWithDependencyDetection(n){let e=this,t=e[I],r=!1,i=t.pure?void 0:!t.dependenciesCount,s={computedObservable:e,disposalCandidates:t.dependencyTracking,disposalCount:t.dependenciesCount};C.begin({callbackTarget:s,callback:fu,computed:e,isInitial:i}),t.dependencyTracking={},t.dependenciesCount=0;let o=this.evaluateImmediate_CallReadThenEndDependencyDetection(t,s);return t.dependenciesCount?r=e.isDifferent(t.latestValue,o):(e.dispose(),r=!0),r&&(t.isSleeping?e.updateVersion():e.notifySubscribers(t.latestValue,"beforeChange"),t.latestValue=o,c.debug&&(e._latestValue=o),e.notifySubscribers(t.latestValue,"spectate"),!t.isSleeping&&n&&e.notifySubscribers(t.latestValue),e._recordUpdate&&e._recordUpdate()),i&&e.notifySubscribers(t.latestValue,"awake"),r},evaluateImmediate_CallReadThenEndDependencyDetection(n,e){try{let t=n.readFunction;return n.evaluatorFunctionTarget?t.call(n.evaluatorFunctionTarget):t()}finally{C.end(),e.disposalCount&&!n.isSleeping&&R(e.disposalCandidates,du),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];W.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,cu)}};var pu={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,s){r[s._order]=i}),P(r,function(i,s){let o=t.dependencyTracking[i],u=e.subscribeToDependency(o._target);u._order=s,u._version=o._version,t.dependencyTracking[i]=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,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(),W.fn.getVersion.call(this)}},hu={beforeSubscriptionAdd(n){(n==="change"||n==="beforeChange")&&this.peek()}};Object.setPrototypeOf(B.fn,W.fn);var Xi=w.protoProperty;B.fn[Xi]=B;w.observablePrototypes.add(B);function gt(n){return typeof n=="function"&&n[Xi]===B}function br(n){return gt(n)&&n[I]&&n[I].pure}function we(n,e){if(typeof n=="function")return B(n,e,{pure:!0});{let t=n;return t=L({},t),t.pure=!0,B(t,e)}}function Zi(n,e){n.throttleEvaluation=e;let t;return B({read:n,write:function(r){clearTimeout(t),t=setTimeout(function(){n(r)},e)}})}var mu=be;mu.throttle=Zi;var ts=Symbol("Knockout Proxied Object"),ns=Symbol("Knockout Proxied Observables");function gu(n,e){return B({owner:n,read:e,write:e,pure:"pure"in e?e.pure:!0,deferEvaluation:"deferEvaluation"in e?e.deferEvaluation:!0}).extend({deferred:!0})}function rs(n,e,t,r){if(n[e])n[e](t);else{let i=Array.isArray(t)?de:typeof t=="function"?gu.bind(null,r):w;n[e]=i(t)}}function es(n,e,t){for(let r of Object.keys(e))rs(n,r,e[r],t);return e}function xn(n){let e={[ts]:n};e[ns]=e;let t=new Proxy(function(){},{has(r,i){return i in e},get(r,i){return d(e[i])},set(r,i,s,o){return rs(e,i,s,t),n[i]=s,!0},deleteProperty(r){return delete e[r],delete n[r]},apply(r,i,[s]){return s?(es(e,s,t),Object.assign(n,s)):n},getPrototypeOf(){return Object.getPrototypeOf(n)},setPrototypeOf(r,i){return Object.setPrototypeOf(n,i)},defineProperty(r,i,s){return Object.defineProperty(n,i,s)},preventExtensions(){return Object.preventExtensions(n)},isExtensible(){return Object.isExtensible(n)},ownKeys(){return[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)]}});return es(e,n,t),t}function is(n,e){return n[ns][e]}function bu(n,e){return is(n,e).peek()}function Eu(n){return ts in n}Object.assign(xn,{getObservable:is,peek:bu,isProxied:Eu});function yu(n,e,t){let r=we(n,e).extend({notify:"always"}),i=r.subscribe(s=>{s&&(i.dispose(),t(s))});return r.notifySubscribers(r.peek()),i}function Er(n,e,t){let r=yu.bind(null,n,t);return e?r(e.bind(t)):new Promise(r)}var Ut=G("LifeCycle Subscriptions List"),bt=G("LifeCycle Anchor Node"),X=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[bt],this.addDisposable(B(e))}addEventListener(...e){let t=e[0].nodeType?e.shift():this[bt],[r,i,s]=e,o=typeof i=="string"?this[i].bind(this):i;this.__addEventListener(t,r,o,s)}__addEventListener(e,t,r,i){e.addEventListener(t,r,i);function s(){e.removeEventListener(t,r)}Ce(e,s),this.addDisposable({dispose:s})}anchorTo(e){"addDisposable"in e?(e.addDisposable(this),this[bt]=null):(this[bt]=e,Ce(e,()=>this[bt]===e&&this.dispose()))}dispose(){(this[Ut]||[]).forEach(t=>t.dispose()),this[Ut]=new Array,this[bt]=null}addDisposable(e){let t=this[Ut]||[];if(this[Ut]||(this[Ut]=t),typeof e.dispose!="function")throw new Error("Lifecycle::addDisposable argument missing `dispose`.");return t.push(e),e}};var Cn=Symbol("_ancestorBindingInfo"),ss=D.nextKey(),$={childrenComplete:"childrenComplete",descendantsComplete:"descendantsComplete",subscribe(n,e,t,r){let i=D.getOrSet(n,ss,{});return i.eventSubscribable||(i.eventSubscribable=new W),i.eventSubscribable.subscribe(t,r,e)},notify(n,e){let t=D.get(n,ss);t&&t.eventSubscribable&&t.eventSubscribable.notifySubscribers(n,e)}};var yr=D.nextKey(),Ie=Symbol("Knockout Context Subscription"),os=Symbol("Knockout Parent Indicator"),Be=function(e,t,r,i,s){let o=this,u=e===os,a=u?void 0:e,l=typeof a=="function"&&!T(a);o.ko=c.knockoutInstance;let f;function p(){let b=l?a():a,m=d(b);return t?(t[Ie]&&t[Ie](),L(o,t),Cn in t&&(o[Cn]=t[Cn])):(o.$parents=new Array,o.$root=m),o[Ie]=f,u?m=o.$data:(o.$rawData=b,o.$data=m),r&&(o[r]=m),i&&i(o,t,m),o.$data}s&&s.exportDependencies?p():(f=we(p),f.peek(),f.isActive()?(o[Ie]=f,f.equalityComparer=null):o[Ie]=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(Ot(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,s){var o;i.$parentContext=s,i.$parent=s==null?void 0:s.$data,i.$parents=((o=s==null?void 0:s.$parents)!=null?o:[]).slice(0),i.$parents.unshift(i.$parent),t&&t(i)},r)},extend(n){return new Be(os,this,void 0,function(e,t){L(e,typeof n=="function"?n.call(e):n)})},createStaticChildContext(n,e){return this.createChildContext(n,e,null,{exportDependencies:!0})}});function Au(n){let e=D.get(n,yr);return e&&e.context}function Ne(n){if(n&&(n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.COMMENT_NODE))return Au(n)}function vn(n){let e=Ne(n);return e?e.$data:void 0}var Et=class{constructor({asyncBindingsApplied:e,rootNode:t,bindingContext:r}){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 Xe(this,null,function*(){return yield Promise.all(e),this.isComplete=!0,this})}};var Z=class extends X{constructor(e){super();let{$element:t,valueAccessor:r,allBindings:i,$context:s}=e;this.$element=t,this.valueAccessor=r,this.allBindings=i,this.$context=s,this.$data=s.$data,this.anchorTo(t)}get value(){return this.valueAccessor()}set value(e){let t=this.valueAccessor();K(t)?t(e):this.valueAccessor(e)}get controlsDescendants(){return!1}static get allowVirtualElements(){return!1}static get isBindingHandlerClass(){return!0}get bindingCompleted(){return!0}static registerAs(e,t=c.bindingProviderInstance){t.bindingHandlers.set(e,this)}static registerBindingHandler(e,t,r=c.bindingProviderInstance){r.bindingHandlers.set(t,e)}},us=Symbol("Async Binding Resolved"),ee=class extends Z{constructor(e){super(e),this.bindingCompletion=new Promise(t=>{this[us]=t}),this.completeBinding=t=>this[us](t)}get bindingCompleted(){return this.bindingCompletion}};var Du=c.global.WeakMap||Map,Ar=new Du,Fn=class n extends Z{get handler(){}constructor(e){super(e);let t=this.handler;this.onError=e.onError,typeof t.dispose=="function"&&this.addDisposable(t);try{this.initReturn=t.init&&t.init(...this.legacyArgs)}catch(r){e.onError("init",r)}}onValueChange(){let e=this.handler;if(typeof e.update=="function")try{e.update(...this.legacyArgs)}catch(t){this.onError("update",t)}}get legacyArgs(){return[this.$element,this.valueAccessor,this.allBindings,this.$data,this.$context]}get controlsDescendants(){return(this.initReturn||this.handler||{}).controlsDescendantBindings}static getOrCreateFor(e,t){if(Ar.has(t))return Ar.get(t);let r=this.createFor(e,t);return Ar.set(t,r),r}static createFor(e,t){if(typeof t=="function"){let[r,i]=[t,t.dispose];return class extends n{get handler(){let s=r.bind(this),o=i?i.bind(this):null;return{init:s,dispose:o}}static get after(){return t.after}static get allowVirtualElements(){return t.allowVirtualElements||y.allowedBindings[e]}}}if(typeof t=="object")return class extends n{get handler(){return t}static get after(){return t.after}static get allowVirtualElements(){return t.allowVirtualElements||y.allowedBindings[e]}};throw new Error("The given handler is not an appropriate type.")}};var xu={script:!0,textarea:!0,template:!0};function Qt(){return c.bindingProviderInstance.instance||c.bindingProviderInstance}function ls(n,e){return(n.FOR_NODE_TYPES||[Node.ELEMENT_NODE,Node.TEXT_NODE,Node.COMMENT_NODE]).includes(e.nodeType)}function cs(n,e){if(n)return n.isBindingHandlerClass?n:Fn.getOrCreateFor(e,n)}function Cu(n,e){if(!(!e||typeof e.getBindingHandler!="function"))return cs(e.getBindingHandler(n))}function vu(n){let e=c.getBindingHandler(n)||Qt().bindingHandlers.get(n);return cs(e,n)}function Wt(n){return n()}function ds(n,e,t){let r=y.firstChild(e);if(!r)return;let i,s=Qt(),o=s.preprocessNode;if(o){for(;i=r;)r=y.nextSibling(i),o.call(s,i);r=y.firstChild(e)}for(;i=r;)r=y.nextSibling(i),hs(n,i,t);$.notify(e,$.childrenComplete)}function fs(n){let e=Qt();return ls(e,n)&&e.nodeHasBindings(n)}function ps(n){return fs(n)||[...n.childNodes].some(e=>ps(e))}function hs(n,e,t){let r=e.nodeType===Node.ELEMENT_NODE;r&&y.normaliseVirtualElementDomStructure(e);let i=r||fs(e),{shouldBindDescendants:s}=i?ms(e,null,n,t):{shouldBindDescendants:!0};s&&!xu[V(e)]&&ds(n,e,t)}function*Fu(n,e){let t=[],r={},i=new Array;R(n,function s(o){if(!r[o]){let u=Cu(o,e)||vu(o);if(!u)return;u.after&&(i.push(o),P(u.after,function(a){if(n[a]){if(U(i,a)!==-1)throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+i.join(", "));s(a)}}),i.length--),t.push([o,u])}r[o]=!0});for(let s of t)yield s}function ms(n,e,t,r){let i=D.getOrSet(n,yr,{}),s=i.alreadyBound;if(!e){if(s)return ps(n)&&as({during:"apply",errorCaptured:new Error("You cannot apply bindings multiple times to the same element."),element:n,bindingContext:t}),!1;i.alreadyBound=!0}s||(i.context=t);let o=null,u=null;if(e&&typeof e!="function")o=e;else{let f=Qt(),p=f.getBindingAccessors;ls(f,n)&&(u=B(function(){return o=e?e(t,n):p.call(f,n,t),o&&t[Ie]&&t[Ie](),o},null,{disposeWhenNodeIsRemoved:n}),(!o||!u.isActive())&&(u=null))}let a;if(o){let f=t.$component||{},p={};D.set(n,"bindingHandlers",p);let b=u?h=>function(S){let k=u()[h];return arguments.length===0?Wt(k):k(S)}:h=>o[h],m=function(){return he(u?u():o,Wt)};m.has=h=>h in o,m.get=h=>o[h]&&Wt(b(h)),$.childrenComplete in o&&$.subscribe(n,$.childrenComplete,()=>{let h=Wt(o[$.childrenComplete]);if(!h)return;let S=y.childNodes(n);S.length&&h(S,vn(S[0]))},null);let A=Fu(o,f),v=new Set;for(let[h,S]of A){let k=function(g,N){as({during:g,errorCaptured:N,bindings:o,allBindings:m,bindingKey:h,bindingContext:t,element:n,valueAccessor:b(h)})};if(n.nodeType===Node.COMMENT_NODE&&!S.allowVirtualElements)throw new Error(`The binding '${h}' cannot be used with virtual elements`);try{let g=C.ignore(()=>new S({allBindings:m,$element:n,$context:t,onError:k,valueAccessor(...N){return b(h)(...N)}}));if(g.onValueChange&&C.ignore(()=>g.computed("onValueChange")),p[h]=g,g.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}g.bindingCompleted instanceof Promise&&(r.add(g.bindingCompleted),v.add(g.bindingCompleted))}catch(g){let N=g instanceof Error?g:new Error(String(g));k("creation",N)}}wu(n,o,v)}return{shouldBindDescendants:a===void 0}}function wu(n,e,t){let r=$.descendantsComplete in e,i=y.firstChild(n),s=r&&Wt(e[$.descendantsComplete]),o=()=>{$.notify(n,$.descendantsComplete),s&&i&&s(n)};t.size?Promise.all(t).then(o):o()}function wn(n,e){return n&&n instanceof Be?n:new Be(n,void 0,void 0,e)}function Kt(n,e,t,r){return n.nodeType===Node.ELEMENT_NODE&&y.normaliseVirtualElementDomStructure(n),ms(n,e,wn(t),r)}function gs(n,e,t){let r=new Set,i=wn(t),s=Qt().makeBindingAccessors(e,i,n);return Kt(n,s,i,r),new Et({asyncBindingsApplied:r,rootNode:n,bindingContext:i})}function oe(n,e){let t=new Set,r=wn(n);return e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.COMMENT_NODE?(ds(r,e,t),new Et({asyncBindingsApplied:t,rootNode:e,bindingContext:r})):new Et({asyncBindingsApplied:t,rootNode:e,bindingContext:r})}function yt(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=wn(n,t);return hs(i,e,r),Promise.all(r)}function as(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{L(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),L(e,n)}c.onError(e)}function Bu(n,e,t,r,i){let s=[],o=B(function(){let u=e(t,i,Ve(s,n))||[];s.length>0&&(fn(s,u),r&&C.ignore(r,null,[t,u,i])),s.length=0,tt(s,u)},null,{disposeWhenNodeIsRemoved:n,disposeWhen:function(){return!yi(s)}});return{mappedNodes:s,dependentObservable:o.isActive()?o:void 0}}var bs=D.nextKey(),Es=D.nextKey();function At(n,e,t,r,i,s){e=e||[],typeof e.length=="undefined"&&(e=[e]),r=r||{};let o=D.get(n,bs),u=!o,a=new Array,l=0,f=0,p=[],b=[],m=[],A=[],v=[],h,S=0;function k(x){h={arrayEntry:x,indexObservable:w(f++)},a.push(h),b.push(h),u||v.push(h)}function g(x){h=o[x],f!==x&&A.push(h),h.indexObservable(f++),Ve(h.mappedNodes,n),a.push(h),b.push(h)}function N(x,_){if(x)for(let M=0,j=_.length;M<j;M++)P(_[M].mappedNodes,function(te){x(te,M,_[M].arrayEntry)})}if(u)P(e,k);else{if(!s||o&&o._countWaitingForRemove){let x=Ze(o,function(M){return M.arrayEntry}),_={dontLimitMoves:r.dontLimitMoves,sparse:!0};s=nt(x,e,_)}for(let x=0,_,M,j;_=s[x];x++)switch(M=_.moved,j=_.index,_.status){case"deleted":for(;l<j;)g(l++);M===void 0&&(h=o[l],h.dependentObservable&&(h.dependentObservable.dispose(),h.dependentObservable=void 0),Ve(h.mappedNodes,n).length&&(r.beforeRemove&&(a.push(h),b.push(h),S++,h.arrayEntry===Es?h=null:m.push(h)),h!=null&&h.mappedNodes&&p.push.apply(p,h.mappedNodes))),l++;break;case"added":for(;f<j;)g(l++);M!==void 0?g(M):k(_.value);break}for(;f<e.length;)g(l++);a._countWaitingForRemove=S}D.set(n,bs,a),N(r.beforeMove,A),P(p,r.beforeRemove?z:me);for(let x=0,_=y.firstChild(n),M,j;h=b[x];x++){h.mappedNodes||L(h,Bu(n,t,h.arrayEntry,i,h.indexObservable));for(let te=0;j=h.mappedNodes[te];_=j.nextSibling,M=j,te++)j!==_&&y.insertAfter(n,j,M);!h.initialized&&i&&(i(h.arrayEntry,h.mappedNodes,h.indexObservable),h.initialized=!0)}N(r.beforeRemove,m);for(let x=0;x<m.length;++x)m[x].arrayEntry=Es;N(r.afterMove,A),N(r.afterAdd,v)}var je=class extends ee{get controlsDescendants(){return!0}applyBindingsToDescendants(e,t){return Xe(this,null,function*(){let r=oe(e,this.$element);r.isSync?this.bindingCompletion=r:yield r.completionPromise,t&&t(r),this.completeBinding(r)})}};var ys=1,As=2,Ds=3,Dr=4,Nu=5,xs=D.nextKey()+"_",Cs=D.nextKey();function vs(n){return D.get(n,Cs)||{}}function xr(n,e){D.set(n,Cs,e)}var Ue=class{constructor(e){if(this.domElement=e,e.nodeType===Node.COMMENT_NODE)this.templateType=Dr;else{let t=V(this.domElement);this.templateType=t==="script"?ys:t==="textarea"?As:t=="template"&&e.content&&e.content.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Ds:Dr}}text(e){let t=this.templateType===ys?"text":this.templateType===As?"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 D.get(this.domElement,xs+e);D.set(this.domElement,xs+e,t)}nodes(e){let t=this.domElement;if(arguments.length==0){let r=vs(t),i=r.containerData||(this.templateType===Ds?t.content:this.templateType===Dr?t:void 0);if(!i||r.alwaysCheckText){let s=this.text();s&&(i=Mi(s,t.ownerDocument),this.text(""),xr(t,{containerData:i,alwaysCheckText:!0}))}return i}else xr(t,{containerData:e})}},Ae=class extends Ue{constructor(e){super(e),this.templateType=Nu}text(e){if(arguments.length==0){let t=vs(this.domElement);return t.textData===void 0&&t.containerData&&(t.textData=t.containerData.innerHTML),t.textData}else xr(this.domElement,{textData:e})}};function We(){}L(We.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 Ue(t)}else{if(n.nodeType===Node.ELEMENT_NODE)return new Ae(n);if(n.nodeType===Node.COMMENT_NODE)return new Ae(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 Fr,Fs=D.nextKey();function Bn(n){if(n!==void 0&&!(n instanceof We))throw new Error("templateEngine must inherit from ko.templateEngine");Fr=n}function Cr(n,e,t){let r,i=n,s=y.nextSibling(e);for(;i&&(r=i)!==s;)i=y.nextSibling(r),t(r,i)}function Bs(n,e,t){if(n.length){let r=n[0],i=n[n.length-1],s=r.parentNode,o=c.bindingProviderInstance,u=o.preprocessNode;if(u){if(Cr(r,i,function(a,l){let f=a.previousSibling,p=u.call(o,a);p&&(a===r&&(r=p[0]||l),a===i&&(i=p[p.length-1]||f))}),n.length=0,!r)return;r===i?n.push(r):(n.push(r,i),Ve(n,s))}Cr(r,i,function(a){(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.COMMENT_NODE)&&yt(e,a).then(t)}),Cr(r,i,function(a){(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.COMMENT_NODE)&&$e.unmemoizeDomNodeAndDescendants(a,[e])}),Ve(n,s)}}function vr(n){return n.nodeType?n:n.length>0?n[0]:null}function Ns(n,e,t,r,i,s){i=i||{};let u=(n&&vr(n)||t||{}).ownerDocument,l=(i.templateEngine||Fr).renderTemplate(t,r,i,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 f=!1;switch(e){case"replaceChildren":y.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&&(Bs(l,r,s),i.afterRender&&C.ignore(i.afterRender,null,[l,r.$data]),e==="replaceChildren"&&$.notify(n,$.childrenComplete)),l}function Ts(n,e,t){return T(n)?n():typeof n=="function"?n(e,t):n}function Nn(n,e,t,r,i,s){if(t=t||{},(t.templateEngine||Fr)===void 0)throw new Error("Set a template engine before calling renderTemplate");if(i=i||"replaceChildren",r){let o=vr(r),u=function(){return!o||!kt(o)},a=o&&i==="replaceNode"?o.parentNode:o;return B(function(){let l=e&&e instanceof Be?e:new Be(e,void 0,void 0,void 0,{exportDependencies:!0}),f=Ts(n,l.$data,l),p=Ns(r,i,f,l,t,s);i==="replaceNode"&&(r=p,o=vr(r))},null,{disposeWhen:u,disposeWhenNodeIsRemoved:a})}else return $e.memoize(function(o){Nn(n,e,t,o,"replaceNode")})}function Ss(n,e,t,r,i,s){let o;function u(p,b){t.as?c.createChildContextWithAs?o=i.createChildContext(p,t.as,A=>{A.$index=b}):o=i.extend({[t.as]:p,$index:b}):o=i.createChildContext(p,t.as,A=>{A.$index=b});let m=Ts(n,p,o);return Ns(r,"ignoreTargetNode",m,o,t,s)}let a=function(p,b){Bs(b,o,s),t.afterRender&&t.afterRender(b,p),o=null};function l(p,b){C.ignore(At,null,[r,p,u,t,a,b]),$.notify(r,$.childrenComplete)}let f=t.includeDestroyed===!1||c.foreachHidesDestroyed&&!t.includeDestroyed;if(!f&&!t.beforeRemove&&Ht(e)){l(e.peek());let p=e.subscribe(function(b){l(e(),b)},null,"arrayChange");return p.disposeWhenNodeIsRemoved(r),p}else return B(function(){let p=d(e)||[];Symbol.iterator in p||(p=[p]),f&&(p=Me(p,function(m){return m==null||!d(m._destroy)})),l(p)},null,{disposeWhenNodeIsRemoved:r})}var ws=D.nextKey(),Dt=class extends ee{constructor(e){super(e);let t=this.$element,r=d(this.value);D.set(t,"conditional",{elseChainSatisfied:w(!0)}),typeof r=="string"||r.name?this.bindNamedTemplate():"nodes"in r?this.bindNodeTemplate(r.nodes||[]):this.bindAnonymousTemplate()}bindNamedTemplate(){y.emptyNode(this.$element)}bindNodeTemplate(e){if(T(e))throw new Error('The "nodes" option must be a plain, non-observable array.');let t=e[0]&&e[0].parentNode;(!t||!D.get(t,Fs))&&(t=Pt(e),D.set(t,Fs,!0)),new Ae(this.$element).nodes(t)}bindAnonymousTemplate(){let e=y.childNodes(this.$element);if(e.length===0)throw new Error("Anonymous template defined, but no template content was provided.");let t=Pt(e);new Ae(this.$element).nodes(t)}onValueChange(){let e=this.$element,t=this.$context,r=this.value,i=d(r),s=!0,o=null,u=D.get(e,"conditional").elseChainSatisfied,a;if(typeof i=="string"?(a=r,i={}):(a=i.name,"if"in i&&(s=d(i.if)),s&&"ifnot"in i&&(s=!d(i.ifnot))),"foreach"in i){let l=s&&i.foreach||[];o=Ss(a||e,l,i,e,t,this.completeBinding),u((d(l)||[]).length!==0)}else if(s){let l="data"in i?t.createStaticChildContext(i.data,i.as):t;o=Nn(a||e,l,i,e,void 0,this.completeBinding),u(!0)}else y.emptyNode(e),u(!1);this.disposeOldComputedAndStoreNewOne(e,o)}disposeOldComputedAndStoreNewOne(e,t){let r=D.get(e,ws);r&&typeof r.dispose=="function"&&r.dispose(),D.set(e,ws,t&&(!t.isActive||t.isActive())?t:void 0)}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};function ue(){}ue.prototype=new We;ue.prototype.constructor=ue;ue.prototype.renderTemplateSource=function(n,e,t,r){let i=n.nodes?n.nodes():null;if(i)return ae(i.cloneNode(!0).childNodes);{let s=n.text();return ce(s,r)}};ue.instance=new ue;Bn(ue.instance);var Tn=class extends Dt{get value(){let e=this.valueAccessor(),t=ct(e);return!t||typeof t.length=="number"?{foreach:e,templateEngine:ue.instance}:(d(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:ue.instance})}};var _s={foreach:Tn,template:Dt};var Os={addDisposeCallback:Ce,removeDisposeCallback:st,removeNode:me,addCleaner:Fi,removeCleaner:wi,get cleanExternalData(){return c.cleanExternalData},set cleanExternalData(n){c.set("cleanExternalData",n)}},Tu={addOrRemoveItem:Te,arrayFilter:Me,arrayFirst:un,arrayForEach:P,arrayGetDistinctValues:pi,arrayIndexOf:U,arrayMap:Ze,arrayPushAll:tt,arrayRemoveItem:et,cloneNodes:ve,compareArrays:nt,createSymbolOrString:G,domData:D,domNodeDisposal:Os,extend:L,filters:c.filters,objectForEach:R,objectMap:he,parseHtmlFragment:ce,parseJson:bi,parseObjectLiteral:mt,peekObservable:ct,range:hi,registerEventHandler:q,setDomNodeChildrenFromArrayMapping:At,setHtml:ot,setTextContent:Le,toggleDomNodeCssClass:rt,triggerEvent:Pe,unwrapObservable:d},wr={cleanNode:z,dependencyDetection:C,computedContext:C,filters:c.filters,ignoreDependencies:C.ignore,memoization:$e,options:c,removeNode:me,selectExtensions:O,tasks:ge,utils:Tu,LifeCycle:X,isObservable:T,isSubscribable:at,isWriteableObservable:K,isWritableObservable:K,observable:w,observableArray:de,isObservableArray:Ht,peek:ct,subscribable:W,unwrap:d,toJS:ft,toJSON:pr,proxy:xn,computed:B,dependentObservable:B,isComputed:gt,isPureComputed:br,pureComputed:we,when:Er,nativeTemplateEngine:ue,renderTemplate:Nn,setTemplateEngine:Bn,templateEngine:We,templateSources:{domElement:Ue,anonymousTemplate:Ae},applyBindingAccessorsToNode:Kt,applyBindings:yt,applyBindingsToDescendants:oe,applyBindingsToNode:gs,contextFor:Ne,dataFor:vn,BindingHandler:Z,AsyncBindingHandler:ee,virtualElements:y,domNodeDisposal:Os,bindingEvent:$},qt=class{constructor({provider:e,bindings:t,extenders:r,filters:i,options:s}){if(Object.assign(wr.options,s,{filters:i,bindingProviderInstance:e}),e.setGlobals(wr.options.bindingGlobals),Array.isArray(t))for(let o of t)e.bindingHandlers.set(o);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)}},wr,this.providedProperties,...e);return t.options.knockoutInstance=t,t}};var xt=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 H=class n{constructor(e){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 xt,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 Br(e,this)}makeAccessorsFromFunction(e){return he(C.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)):he(e,this.makeValueAccessor)}},Br=class extends H{get FOR_NODE_TYPES(){return[Node.ELEMENT_NODE,Node.TEXT_NODE,Node.COMMENT_NODE]}constructor(e,t){super(),Object.assign(this,{providerObject:e}),this.bindingHandlers=e.bindingHandlers||t.bindingHandlers}getBindingsAndMakeAccessors(e,t){let r=this.providerObject.getBindings.bind(this.providerObject,e,t);return this.makeAccessorsFromFunction(r)}getBindingAccessors(e,t){return this.providerObject.getBindingAccessors?this.providerObject.getBindingAccessors(e,t):this.getBindingsAndMakeAccessors(e,t)}nodeHasBindings(e){return this.providerObject.nodeHasBindings(e)}preprocessNode(e){return this.providerObject.preprocessNode?this.providerObject.preprocessNode(e):null}};var ke=class extends H{*processBinding(e,t){let[r,i]=e.split("."),s=this.bindingHandlers.get(r);if(s&&s.preprocess){let o=new Array,u=(...a)=>o.push(a);t=s.preprocess(t,e,u);for(let[a,l]of o)yield*ne(this.processBinding(a,l))}else i&&(t=`{${i}:${t}}`);yield`'${r}':${t}`}*generateBindingString(e){let t=typeof e=="string"?mt(e):e;for(let{key:r,unknown:i,value:s}of t)yield*ne(this.processBinding(r||i,s))}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 ye().parse(i,t,this.globals,e)}getBindingString(e){throw new Error("Overload getBindingString.")}};var Ct=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,r=[...e.childNodes],i=[...this.genElementBindingStrings(e)].join(","),s=document.createComment("ko "+i),o=document.createComment("/ko");t==null||t.insertBefore(s,e);for(let u of r)t==null||t.insertBefore(u,e);return t==null||t.insertBefore(o,e),e.remove(),[s,...r,o]}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?y.virtualNodeBindingValue(e):null}nodeHasBindings(e,t){return e.nodeType===Node.COMMENT_NODE?y.isStartComment(e):!1}};var vt=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 Nr={},Tr={};function Su(n,e){let t=Gn(Nr,n),r;t?t.subscribe(e):(t=Nr[n]=new W,t.subscribe(e),_u(n,function(i,s){let o=!!(s&&s.synchronous);Tr[n]={definition:i,isSynchronousComponent:o},delete Nr[n],r||o?t.notifySubscribers(i):ge.schedule(function(){t.notifySubscribers(i)})}),r=!0)}function _u(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=fe.loaders.slice(0));let i=r.shift();if(i){let s=i[n];if(s){let o=!1;if(s.apply(i,e.concat(function(a){o?t(null):a!==null?t(a):Jt(n,e,t,r)}))!==void 0&&(o=!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 fe={get(n,e){let t=Gn(Tr,n);t?t.isSynchronousComponent?C.ignore(function(){e(t.definition)}):ge.schedule(function(){e(t.definition)}):Su(n,e)},clearCachedDefinition(n){delete Tr[n]},_getFirstResultFromLoaders:Jt,loaders:new Array};var Qe={},Sn=Symbol("Knockout View Model ViewModel factory");function _n(n,e){if(!e)throw new Error("Invalid configuration for "+n);if(Ir(n))throw new Error("Component "+n+" is already registered");let t=n.includes("-")&&n.toLowerCase()===n;!e.ignoreCustomElementWarning&&!t&&console.log(`
12
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):
13
12
 
14
13
  ignoreCustomElementWarning: true
15
- `),st[r]=e}function qn(r){return J(st,r)}function zu(r){delete st[r],ge.clearCachedDefinition(r)}var Jn={getConfig:function(r,e){var t=J(st,r)?st[r]:null;e(t)},loadComponent:function(r,e,t){var n=Un(r);Qn(n,e,function(i){la(r,n,i,t)})},loadTemplate:function(r,e,t){ca(Un(r),e,t)},loadViewModel:function(r,e,t){Yu(Un(r),e,t)}},Kn="createViewModel";function la(r,e,t,n){var i={},u=2,s=function(){--u===0&&n(i)},o=t.template,a=t.viewModel;o?Qn(e,o,function(l){ge._getFirstResultFromLoaders("loadTemplate",[r,l],function(d){i.template=d,s()})}):s(),a?Qn(e,a,function(l){ge._getFirstResultFromLoaders("loadViewModel",[r,l],function(d){i[Kn]=d,s()})}):s()}function ca(r,e,t){if(typeof e=="string")t(Ce(e));else if(e instanceof Array)t(e);else if(An(e))t(fe(e.childNodes));else if(e.element){var n=e.element;if(_i(n))t(Gu(n));else if(typeof n=="string"){var i=document.getElementById(n);i?t(Gu(i)):r("Cannot find element with ID "+n)}else r("Unknown element type: "+n)}else e.elementName?t(e):r("Unknown template value: "+e)}function Yu(r,e,t){if(e[zr])t((...i)=>e[zr](...i));else if(typeof e=="function")t(function(i){return new e(i)});else if(typeof e[Kn]=="function")t(e[Kn]);else if("instance"in e){var n=e.instance;t(function(){return n})}else"viewModel"in e?Yu(r,e.viewModel,t):r("Unknown viewModel value: "+e)}function Gu(r){switch($(r)){case"script":return Ce(r.text);case"textarea":return Ce(r.value);case"template":if(An(r.content))return Ne(r.content.childNodes)}return Ne(r.childNodes)}function Qn(r,e,t){typeof e.require=="string"?window.amdRequire||window.require?(window.amdRequire||window.require)([e.require],t):r("Uses require, but no AMD loader is present"):t(e)}function Un(r){return function(e){throw new Error("Component '"+r+"': "+e)}}ge.loaders.push(Jn);var Xr=class extends X{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[zr](e,t){return new this(e,t)}static register(e=this.customElementName){let t=this,{template:n}=this,i=this.sync;Yr(e,{viewModel:t,template:n,synchronous:i})}};var ot={ComponentABC:Xr,get:ge.get,clearCachedDefinition:ge.clearCachedDefinition,register:Yr,isRegistered:qn,unregister:zu,defaultLoader:Jn,_allRegisteredComponents:st,get loaders(){return ge.loaders},set loaders(r){ge.loaders=r}};var Vt=class extends W{get FOR_NODE_TYPES(){return[1]}preprocessNode(e){if(e.tagName==="SLOT"){let t=e.parentNode,n=e.getAttribute("name")||"",i=document.createComment(`ko slot: "${n}"`),u=document.createComment("/ko");return t.insertBefore(i,e),t.insertBefore(u,e),t.removeChild(e),[i,u]}}nodeHasBindings(e){return Boolean(this.getComponentNameForNode(e))}getBindingAccessors(e,t){let n=this.getComponentNameForNode(e);return n?{component:()=>({name:n,params:this.getComponentParams(e,t)})}:void 0}getComponentNameForNode(e){if(e.nodeType!==e.ELEMENT_NODE)return;let t=$(e);if(ot.isRegistered(t)){let n=t.includes("-"),i=""+e=="[object HTMLUnknownElement]";if(n||i)return t}}getComponentParams(e,t){let n=new Be(e,t,this.globals),i=(e.getAttribute("params")||"").trim(),u=n.parse(i,t,e);if(!u||Object.keys(u).length===0)return{$raw:{}};let s=ve(u,a=>_(a,null,{disposeWhenNodeIsRemoved:e})),o=ve(s,a=>this.makeParamValue(e,a));return Object.assign({$raw:s},o)}makeParamValue(e,t){let n=t.peek();if(!t.isActive())return n;let i=Z(n);return _({read:()=>f(t()),write:i?u=>t()(u):null,disposeWhenNodeIsRemoved:e})}};var Rt=class extends W{get FOR_NODE_TYPES(){return[1]}get PREFIX(){return"ko-"}getBindingAttributesList(e){return 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 n of this.getBindingAttributesList(e))yield{[n.name.substr(this.PREFIX.length)]:()=>this.getValue(n.value,t,e)}}getValue(e,t,n){if(!e)return;let i=t.$data;switch(e){case"$element":return n;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 $t=class extends W{get FOR_NODE_TYPES(){return this.nodeTypes}constructor(e={}){super(e);let t=e.providers||[];this.nodeTypeMap={},this.nodeTypes=[],this.providers=[],t.forEach(n=>this.addProvider(n))}setGlobals(e){[this,...this.providers].forEach(t=>t.globals=e)}addProvider(e){this.providers.push(e),e.bindingHandlers=this.bindingHandlers,e.globals=this.globals;let t=this.nodeTypeMap;for(let n of e.FOR_NODE_TYPES)t[n]||(t[n]=[]),t[n].push(e);this.nodeTypes=Object.keys(this.nodeTypeMap).map(n=>parseInt(n,10))}providersFor(e){return this.nodeTypeMap[e.nodeType]||[]}nodeHasBindings(e){return this.providersFor(e).some(t=>t.nodeHasBindings(e))}preprocessNode(e){for(let t of this.providersFor(e)){let n=t.preprocessNode(e);if(n)return n}}*enumerateProviderBindings(e,t){for(let n of this.providersFor(e)){let i=n.getBindingAccessors(e,t);if(!!i&&(yield*Object.entries(i||{}),n.preemptive))return}}getBindingAccessors(e,t){let n={};for(let[i,u]of this.enumerateProviderBindings(e,t)){if(i in n)throw new Error(`The binding "${i}" is duplicated by multiple providers`);n[i]=u}return n}};var fa=/^([\s\S]*)}}([\s\S]*?)\{\{([\s\S]*)$/,da=/^([\s\S]*?)\{\{([\s\S]*)}}([\s\S]*)$/,pa=/^([^,"'{}()/:[\]\s]+)\s+([^\s:].*)/,Zr=class{constructor(e){this.text=e}trim(e){return e===null?"":e.trim()}},en=class extends Zr{asAttr(e,t,n){return new Be().parseExpression(this.text,e,t,n)()}*textNodeReplacement(e){let t=this.trim(this.text),n=e?e.ownerDocument:document,i=t[0],u=t[t.length-1];var s=!0,o;if(i==="#"){u==="/"?o=t.slice(1,-1):(o=t.slice(1),s=!1);let a=o.match(pa);a&&(o=a[1]+":"+a[2])}else i==="/"||(i==="{"&&u==="}"?o="html:"+this.trim(t.slice(1,-1)):o="text:"+this.trim(t));o&&(yield n.createComment("ko "+o)),s&&(yield n.createComment("/ko"))}},cr=class extends Zr{asAttr(){return this.text}*textNodeReplacement(){yield document.createTextNode(this.text.replace(/"/g,'\\"'))}};function*Xu(r){let e=r.match(fa);if(e){let[t,n,i]=e.slice(1);yield*Xu(t),yield new cr(n),yield new en(i)}else yield new en(r)}function*ha(r){if(!r)return;let[e,t,n]=r.slice(1);yield new cr(e),yield*Xu(t),yield new cr(n)}function*fr(r){for(let e of ha(r.match(da)))e.text&&(yield e)}var ma={value:"value",checked:"checked",class:"css"},Mt=class extends W{get FOR_NODE_TYPES(){return[1]}constructor(e={}){super(e),this.ATTRIBUTES_TO_SKIP=new Set(e.attributesToSkip||["data-bind"]),this.ATTRIBUTES_BINDING_MAP=e.attributesBindingMap||ma}*attributesToInterpolate(e){for(let t of Array.from(e))this.ATTRIBUTES_TO_SKIP.has(t.name)||t.specified&&t.value.includes("{{")&&(yield t)}nodeHasBindings(e){return!this.attributesToInterpolate(e.attributes).next().done}partsTogether(e,t,n,...i){if(e.length>1)return e.map(s=>f(s.asAttr(t,this.globals,n))).join("");let u=e[0].asAttr(t,this.globals);return i.length&&u(i[0]),u}attributeBinding(e,t){return[e,t]}*bindingParts(e,t){for(let n of this.attributesToInterpolate(e.attributes)){let i=Array.from(fr(n.value));i.length&&(yield this.attributeBinding(n.name,i))}}getPossibleDirectBinding(e){return this.ATTRIBUTES_BINDING_MAP[e]&&this.bindingHandlers.get(e)}*bindingObjects(e,t){for(let[n,i]of this.bindingParts(e,t)){let u=this.getPossibleDirectBinding(n),s=u?n:`attr.${n}`,o=u?(...a)=>this.partsTogether(i,t,e,...a):(...a)=>({[n]:this.partsTogether(i,t,e,...a)});e.removeAttribute(n),yield{[s]:o}}}getBindingAccessors(e,t){return Object.assign({},...this.bindingObjects(e,t))}};var Lt=class extends W{get FOR_NODE_TYPES(){return[3]}*textToNodes(e){let t=e.parentNode,n=t&&t.nodeName==="TEXTAREA";if(!(!(e.nodeValue&&e.nodeValue.includes("{{"))||n))for(let u of fr(e.nodeValue))yield*u.textNodeReplacement(e)}textInterpolation(e){let t=Array.from(this.textToNodes(e));if(t.length!==0){if(e.parentNode){let n=e.parentNode,i=t.length;for(let u=0;u<i;++u)n.insertBefore(t[u],e);n.removeChild(e)}return t}}preprocessNode(e){return this.textInterpolation(e)}};var Ae=Symbol("Knockout native bindings"),ye=class extends W{get FOR_NODE_TYPES(){return[1,3]}get preemptive(){return!0}nodeHasBindings(e){return e[Ae]?Object.keys(e[Ae]||{}).some(t=>t.startsWith("ko-")):!1}preprocessNode(e){return e[Ae]?e:null}onlyBindings([e]){return e.startsWith("ko-")}valueAsAccessor([e,t]){let n=e.replace(/^ko-/,""),i=S(t)?t:()=>t;return{[n]:i}}getBindingAccessors(e){let t=Object.entries(e[Ae]||{}).filter(this.onlyBindings);return t.length?Object.assign({},...t.map(this.valueAsAccessor)):null}static addValueToNode(e,t,n){let i=e[Ae]||(e[Ae]={});i[t]=n}static getNodeValues(e){return e[Ae]}};var Zu={update:function(r,e,t){var n=f(e())||{};k(n,function(i,u){u=f(u);var s=i.indexOf(":"),o=s>0&&r.lookupNamespaceURI(i.substr(0,s));let a=u===!1||u===null||u===void 0;a?o?r.removeAttributeNS(o,i):r.removeAttribute(i):(u=u.toString(),o?r.setAttributeNS(o,i,u):r.setAttribute(i,u)),i==="name"&&kr(r,a?"":u)})}};var es={after:["value","attr"],init:function(r,e,t){var n=Ie(function(){if(t.has("checkedValue"))return f(t.get("checkedValue"));if(m)return t.has("value")?f(t.get("value")):r.value});function i(){var p=r.checked,C=n();if(!b.isInitial()&&!(!p&&(o||b.getDependenciesCount()))){var B=b.ignore(e);if(l){var v=d?B.peek():B,R=h;h=C,R!==C?(p&&(Me(v,C,!0),Me(v,R,!1)),h=C):Me(v,C,p),d&&Z(B)&&B(v)}else s&&(C===void 0?C=p:p||(C=void 0)),e(C,{onlyIfChanged:!0})}}function u(){var p=p=f(e()),C=n();l?(r.checked=q(p,C)>=0,h=C):s&&C===void 0?r.checked=!!p:r.checked=n()===p}var s=r.type=="checkbox",o=r.type=="radio";if(!(!s&&!o)){var a=e(),l=s&&f(a)instanceof Array,d=!(l&&a.push&&a.splice),m=o||l,h=l?n():void 0;_(i,null,{disposeWhenNodeIsRemoved:r}),G(r,"click",i),_(u,null,{disposeWhenNodeIsRemoved:r}),a=void 0}}},ts={update:function(r,e){r.value=f(e())}};function ns(r){return{init:function(e,t,n,i,u){var s=function(){var o={};return o[r]=t(),o};tn.init.call(this,e,s,n,i,u)}}}function rs(r){return typeof r=="function"?{handler:r}:r||{}}var tn={init:function(r,e,t,n,i){var u=e()||{};k(u,function(s,o){let{passive:a,capture:l,once:d,debounce:m,throttle:h}=rs(o),p=(l||a||d)&&{capture:l,passive:a,once:d},C=(B,...v)=>{var R;let{handler:x,passive:F,bubble:w,preventDefault:N}=rs(e()[s]);try{if(x){let L=i.$data,ue=[L,B,...v];R=x.apply(L,ue)}}finally{N!==void 0?f(N)&&B.preventDefault():R!==!0&&(F||B.preventDefault())}let M=t.get(s+"Bubble")!==!1;(w===!1||!M)&&(B.cancelBubble=!0,B.stopPropagation&&B.stopPropagation())};m&&(C=wr(C,m)),h&&(C=xr(C,h)),G(r,s,C,p||!1)})}},is={init:tn.init,preprocess:function(r,e,t){t(e.replace("on.",""),"=>"+r)}};var us=ns("click");var dr={aliases:["class"],update:function(r,e){var t=f(e());t!==null&&typeof t=="object"?k(t,function(n,i){i=f(i),At(r,n,i)}):(t=Le(String(t||"")),At(r,r[dr.classesWrittenByBindingKey],!1),r[dr.classesWrittenByBindingKey]=t,At(r,t,!0))},classesWrittenByBindingKey:ee("__ko__cssValue")};var pr=class extends ne{onDescendantsComplete(){typeof this.value=="function"&&this.value(this.$element)}static get allowVirtualElements(){return!0}};var Gn={update:function(r,e){var t=f(e());t&&r.disabled?r.removeAttribute("disabled"):!t&&!r.disabled&&(r.disabled=!0)}},ss={update:function(r,e){Gn.update(r,function(){return!f(e())})}};var zn=ee("__ko_hasfocusUpdating"),Yn=ee("__ko_hasfocusLastValue"),Xn={init:function(r,e){var t=function(u){r[zn]=!0;var s=r.ownerDocument;if("activeElement"in s){var o;try{o=s.activeElement}catch(a){o=s.body}u=o===r}e(u,{onlyIfChanged:!0}),r[Yn]=u,r[zn]=!1},n=t.bind(null,!0),i=t.bind(null,!1);G(r,"focus",n),G(r,"focusin",n),G(r,"blur",i),G(r,"focusout",i)},update:function(r,e){var t=!!f(e());!r[zn]&&r[Yn]!==t&&(t?r.focus():r.blur(),!t&&r[Yn]&&r.ownerDocument.body.focus(),b.ignore(Ye,null,[r,t?"focusin":"focusout"]))}};var os={init:function(){return{controlsDescendantBindings:!0}},update:function(r,e){Ct(r,e())},allowVirtualElements:!0};var as={init:function(r,e,t,n,i){var u=i.extend(e);return le(u,r),{controlsDescendantBindings:!0}},allowVirtualElements:!0};var Zn={},ls={init:function(r){if($(r)!=="select")throw new Error("options binding applies only to SELECT elements");for(;r.length>0;)r.remove(0);return{controlsDescendantBindings:!0}},update:function(r,e,t){function n(){return Je(r.options,function(F){return F.selected})}var i=r.length==0,u=r.multiple,s=!i&&u?r.scrollTop:null,o=f(e()),a=t.get("valueAllowUnset")&&t.has("value"),l=t.get("optionsIncludeDestroyed"),d={},m,h,p=[];a||(u?p=pt(n(),O.readValue):r.selectedIndex>=0&&p.push(O.readValue(r.options[r.selectedIndex]))),o&&(typeof o.length=="undefined"&&(o=[o]),h=Je(o,function(F){return l||F===void 0||F===null||!f(F._destroy)}),t.has("optionsCaption")&&(m=f(t.get("optionsCaption")),m!=null&&h.unshift(Zn)));function C(F,w,N){var M=typeof w;return M==="function"?w(F):M=="string"?F[w]:N}var B=!1;function v(F,w,N){N.length&&(p=!a&&N[0].selected?[O.readValue(N[0])]:[],B=!0);var M=r.ownerDocument.createElement("option");if(F===Zn)Ze(M,t.get("optionsCaption")),O.writeValue(M,void 0);else{var L=C(F,t.get("optionsValue"),F);O.writeValue(M,f(L));var ue=C(F,t.get("optionsText"),L);Ze(M,ue)}return[M]}d.beforeRemove=function(F){r.removeChild(F)};function R(F,w){if(B&&a)O.writeValue(r,f(t.get("value")),!0);else if(p.length){var N=q(p,O.readValue(w[0]))>=0;Or(w[0],N),B&&!N&&b.ignore(Ye,null,[r,"change"])}}var x=R;t.has("optionsAfterRender")&&typeof t.get("optionsAfterRender")=="function"&&(x=function(F,w){R(F,w),b.ignore(t.get("optionsAfterRender"),null,[w[0],F!==Zn?F:void 0])}),It(r,h,v,d,x),b.ignore(function(){if(a)O.writeValue(r,f(t.get("value")),!0);else{var F;u?F=p.length&&n().length<p.length:F=p.length&&r.selectedIndex>=0?O.readValue(r.options[r.selectedIndex])!==p[0]:p.length||r.selectedIndex>=0,F&&Ye(r,"change")}}),Hi(r),s&&Math.abs(s-r.scrollTop)>20&&(r.scrollTop=s)}};var cs={after:["options","foreach"],init:function(r,e,t){G(r,"change",function(){var n=e(),i=[];V(r.getElementsByTagName("option"),function(u){u.selected&&i.push(O.readValue(u))}),e(i)})},update:function(r,e){if($(r)!="select")throw new Error("values binding applies only to SELECT elements");var t=f(e()),n=r.scrollTop;t&&typeof t.length=="number"&&V(r.getElementsByTagName("option"),function(i){var u=q(t,O.readValue(i))>=0;i.selected!=u&&Or(i,u)}),r.scrollTop=n}};var{jQueryInstance:fs}=c,ds={update:function(r,e){var t=f(e()||{});k(t,function(n,i){if(i=f(i),(i==null||i===!1)&&(i=""),fs)fs(r).css(n,i);else{n=n.replace(/-(\w)/g,(s,o)=>o.toUpperCase());let u=r.style[n];r.style[n]=i,i!==u&&r.style[n]===u&&!isNaN(i)&&(r.style[n]=i+"px")}})}};var ps={init:function(r,e,t,n,i){if(typeof e()!="function")throw new Error("The value for a submit binding must be a function");G(r,"submit",function(u){var s,o=e();try{s=o.call(i.$data,r)}finally{s!==!0&&(u.preventDefault?u.preventDefault():u.returnValue=!1)}})}};var hs={init:function(){return{controlsDescendantBindings:!0}},update:function(r,e){Ze(r,e())},allowVirtualElements:!0};var ms,ei,ti,at=class extends ne{get aliases(){return"textinput"}constructor(...e){super(...e),this.previousElementValue=this.$element.value,c.debug&&this.constructor._forceUpdateOn&&V(this.constructor._forceUpdateOn,t=>{t.slice(0,5)==="after"?this.addEventListener(t.slice(5),"deferUpdateModel"):this.addEventListener(t,"updateModel")});for(let t of this.eventsIndicatingSyncValueChange())this.addEventListener(t,"updateModel");for(let t of this.eventsIndicatingDeferValueChange())this.addEventListener(t,"deferUpdateModel");this.computed("updateView")}eventsIndicatingSyncValueChange(){return["input","change","blur"]}eventsIndicatingDeferValueChange(){return[]}updateModel(e){let t=this.$element;clearTimeout(this.timeoutHandle),this.elementValueBeforeEvent=this.timeoutHandle=void 0;let n=t.value;this.previousElementValue!==n&&(c.debug&&e&&(t._ko_textInputProcessedEvent=e.type),this.previousElementValue=n,this.value=n)}deferUpdateModel(e){let t=this.$element;if(!this.timeoutHandle){this.elementValueBeforeEvent=t.value;let n=c.debug?this.updateModel.bind(this,{type:e.type}):this.updateModel;this.timeoutHandle=de(n,4)}}updateView(){let e=f(this.value);e==null&&(e=""),this.elementValueBeforeEvent!==void 0&&e===this.elementValueBeforeEvent?setTimeout(this.updateView.bind(this),4):this.$element.value!==e&&(this.previousElementValue=e,this.$element.value=e,this.previousElementValue=this.$element.value)}},mr=class extends at{constructor(...e){super(...e),H<11&&this.addEventListener("propertychange",t=>t.propertyName==="value"&&this.updateModel(t)),H>=8&&H<10&&(this.watchForSelectionChangeEvent(),this.addEventListener("dragend","deferUpdateModel"))}eventsIndicatingSyncValueChange(){return[...super.eventsIndicatingValueChange(),"keypress"]}selectionChangeHandler(e){let t=this.activeElement,n=t&&D.get(t,selectionChangeHandlerName);n&&n(e)}watchForSelectionChangeEvent(e,t){let n=e.ownerDocument;D.get(n,selectionChangeRegisteredName)||(D.set(n,selectionChangeRegisteredName,!0),G(n,"selectionchange",this.selectionChangeHandler.bind(n))),D.set(e,selectionChangeHandlerName,handler)}},ri=class extends mr{updateModel(...e){this.deferUpdateModel(...e)}},ni=class extends mr{eventsIndicatingValueChange(){return[...super.eventsIndicatingValueChange(),"keyup","keydown"]}},ii=class extends at{eventsIndicatingDeferValueChange(){return["keydown","paste","cut"]}},ui=class extends at{eventsIndicatingDeferValueChange(){return["keydown"]}},si=class extends at{eventsIndicatingValueChange(){return[...super.eventsIndicatingSyncValueChange(),"DOMAutoComplete","dragdrop","drop"]}},hr=c.global;if(hr.navigator){let r=n=>n&&parseFloat(n[1]),e=hr.navigator.userAgent,t=e.match(/Chrome\/([^ ]+)/);ms=hr.opera&&hr.opera.version&&parseInt(hr.opera.version()),ei=r(e.match(/Version\/([^ ]+) Safari/)),ti=r(e.match(/Firefox\/([^ ]*)/))}var oi=H===8?ni:H===9?ri:H?mr:ei&&ei<5?ii:ms<11?ui:ti&&ti<4?si:at;var ai={init:function(r,e){if(e()){var t="ko_unique_"+ ++ai.currentIndex;kr(r,t)}},currentIndex:0};var rn=class extends ne{static get after(){return["options","foreach","template"]}constructor(...e){if(super(...e),this.isCheckboxOrRadio){sr(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.propertyChangeFired&&this.valueUpdateHandler())),V(this.eventsToCatch,t=>this.registerEvent(t)),this.isInput&&this.$element.type==="file"?this.updateFromModel=this.updateFromModelForFile:this.updateFromModel=this.updateFromModelForValue,this.computed("updateFromModel")}get eventsToCatch(){let e=this.allBindings.get("valueUpdate"),t=typeof e=="string"?[e]:e||[];return[...new Set(["change",...t])]}get isInput(){return $(this.$element)==="input"}get isCheckboxOrRadio(){let e=this.$element;return this.isInput&&(e.type=="checkbox"||e.type=="radio")}get ieAutoCompleteHackNeeded(){return H&&isInputElement&&this.$element.type=="text"&&this.$element.autocomplete!="off"&&(!this.$element.form||this.$element.form.autocomplete!="off")}valueUpdateHandler(){this.elementValueBeforeEvent=null,this.propertyChangedFired=!1,this.value=O.readValue(this.$element)}registerEvent(e){var t=this.valueUpdateHandler.bind(this);wi(e,"after")&&(t=()=>{this.elementValueBeforeEvent=O.readValue(this.$element),de(this.valueUpdateHandler.bind(this),0)},e=e.substring(5)),this.addEventListener(e,t)}updateFromModelForFile(){var e=f(this.value);e==null||e===""?this.$element.value="":b.ignore(this.valueUpdateHandler,this)}updateFromModelForValue(){let e=this.$element;var t=f(this.value),n=O.readValue(e);if(this.elementValueBeforeEvent!==null&&t===this.elementValueBeforeEvent){de(this.updateFromModel.bind(this),0);return}if(!(t===n&&n!==void 0))if($(e)==="select"){let i=this.allBindings.get("valueAllowUnset");O.writeValue(e,t,i),!i&&t!==O.readValue(e)&&b.ignore(this.valueUpdateHandler,this)}else O.writeValue(e,t)}};var li={update:function(r,e){var t=f(e()),n=r.style.display!=="none";t&&!n?r.style.display="":!t&&n&&(r.style.display="none")}},gs={update:function(r,e){li.update.call(this,r,()=>!f(e()))}};var As={init:function(r,e,t,n,i){var u=i.createChildContext(e);return le(u,r),{controlsDescendantBindings:!0}},allowVirtualElements:!0};var vs={attr:Zu,checked:es,checkedValue:ts,click:us,css:dr,class:dr,descendantsComplete:pr,enable:Gn,event:tn,disable:ss,hasfocus:Xn,hasFocus:Xn,hidden:gs,html:os,let:as,on:is,options:ls,selectedOptions:cs,style:ds,submit:ps,text:hs,textInput:oi,textinput:oi,uniqueName:ai,using:As,value:rn,visible:li};var ga=(r,e,t)=>new Promise((n,i)=>{var u=a=>{try{o(t.next(a))}catch(l){i(l)}},s=a=>{try{o(t.throw(a))}catch(l){i(l)}},o=a=>a.done?n(a.value):Promise.resolve(a.value).then(u,s);o((t=t.apply(r,e)).next())}),lt=class extends ie{constructor(e){super(e),this.hasElse=this.detectElse(this.$element);let t=this.completesElseChain=T();D.set(this.$element,"conditional",{elseChainSatisfied:t})}getIfElseNodes(){if(this.ifElseNodes)return this.ifElseNodes;if(b.getDependenciesCount()||this.hasElse)return this.cloneIfElseNodes(this.$element,this.hasElse)}render(){let e=!this.ifElseNodes,{shouldDisplay:t}=this.renderStatus();if(this.ifElseNodes=this.getIfElseNodes()||{},t){let n=e&&!this.hasElse;this.renderAndApplyBindings(this.ifElseNodes.ifNodes,n)}else this.hasElse?this.renderAndApplyBindings(this.ifElseNodes.elseNodes):A.emptyNode(this.$element)}renderAndApplyBindings(e,t){return ga(this,null,function*(){t||A.setDomNodeChildren(this.$element,Ne(e));let n=yield le(this.bindingContext,this.$element);this.completeBinding(n)})}get elseChainIsAlreadySatisfied(){return!1}isElseNode(e){return e.nodeType===8&&e.nodeValue.trim().toLowerCase()==="else"}detectElse(e){for(var t=A.childNodes(e),n=0,i=t.length;n<i;++n)if(this.isElseNode(t[n]))return!0;return!1}cloneIfElseNodes(e,t){let n=A.childNodes(e),i=[],u=[],s=i;for(var o=0,a=n.length;o<a;++o)t&&this.isElseNode(n[o])?(s=u,t=!1):s.push(te(n[o].cloneNode(!0)));return{ifNodes:i,elseNodes:u}}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};var ct=class extends lt{constructor(...e){super(...e),this.ifCondition=this.computed(()=>!!f(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 e=this.shouldDisplayIf();return this.elseChainIsAlreadySatisfied?(e=!1,this.completesElseChain(!0)):this.completesElseChain(e),{shouldDisplay:e}}},gr=class extends ct{shouldDisplayIf(){return!super.shouldDisplayIf()}};var nn=class extends lt{constructor(...e){super(...e),this.asOption=this.allBindings.get("as");let t=this.asOption&&!c.createChildContextWithAs?()=>Boolean(f(this.value)):()=>f(this.value);this.conditional=this.computed(t),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:Boolean(this.conditional())}}};var Ar=class extends ct{shouldDisplayIf(){return super.shouldDisplayIf()||this.value===void 0}get elseChainIsAlreadySatisfied(){return this._elseChain||(this._elseChain=this.readElseChain()),f(this._elseChain.elseChainSatisfied)}readElseChain(){let e=this.$element;do e=e.previousSibling;while(e&&e.nodeType!==1&&e.nodeType!==8);return e?(e.nodeType===8&&(e=A.previousSibling(e)),D.get(e,"conditional")||{}):!1}};var Ds={if:ct,with:nn,ifnot:gr,unless:gr,else:Ar,elseif:Ar};var Aa=9007199254740991;function va(r){return!!r&&typeof r=="object"&&r.constructor===Object}var Da=c.document&&typeof c.document.createDocumentFragment=="function";function Ca(r){var e=document.createElement("div"),t;return r.content?t=r.content:r.tagName==="SCRIPT"?(t=document.createElement("div"),t.innerHTML=r.text):t=r,V(A.childNodes(t),function(n){n&&e.insertBefore(n.cloneNode(!0),null)}),e}function Fa(r,e){return{status:"added",value:r,index:e}}var vr=ee("_ko_ffe_pending_delete_index"),Pe=class extends ie{constructor(e){super(e);let t={};va(this.value)&&Object.assign(t,this.value),this.as=t.as||this.allBindings.get("as"),this.data=t.data||(f(this.$context.$rawData)===this.value?this.$context.$rawData:this.value),this.container=A.isStartComment(this.$element)?this.$element.parentNode:this.$element,this.generateContext=this.createContextGenerator(this.as),this.$indexHasBeenRequested=!1,this.templateNode=Ca(t.templateNode||(t.name?document.getElementById(t.name).cloneNode(!0):this.$element)),["afterAdd","beforeRemove","afterQueueFlush","beforeQueueFlush"].forEach(i=>{this[i]=t[i]||this.allBindings.get(i)}),this.changeQueue=[],this.firstLastNodesList=[],this.indexesToDelete=[],this.rendering_queued=!1,this.pendingDeletes=[],this.isNotEmpty=T(Boolean(f(this.data).length)),D.set(this.$element,"conditional",{elseChainSatisfied:this.isNotEmpty}),A.emptyNode(this.$element);let n=f(this.data);n&&n.map?this.onArrayChange(n.map(Fa),!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(e,t){for(var n={added:[],deleted:[]},i=0,u=e.length;i<u;i++){if(n.added.length&&e[i].status==="added"){var s=n.added[n.added.length-1],o=s.isBatch?s.index+s.values.length-1:s.index;if(o+1===e[i].index){s.isBatch||(s={isBatch:!0,status:"added",index:s.index,values:[s.value]},n.added.splice(n.added.length-1,1,s)),s.values.push(e[i].value);continue}}n[e[i].status].push(e[i])}n.deleted.length>0&&(this.changeQueue.push.apply(this.changeQueue,n.deleted),this.changeQueue.push({status:"clearDeletedIndexes"})),this.changeQueue.push.apply(this.changeQueue,n.added),this.changeQueue.length>0&&!this.rendering_queued&&(this.rendering_queued=!0,t?this.processQueue():Pe.animateFrame.call(window,()=>this.processQueue()))}startQueueFlush(){typeof this.beforeQueueFlush=="function"&&this.beforeQueueFlush(this.changeQueue)}endQueueFlush(){typeof this.afterQueueFlush=="function"&&this.afterQueueFlush(this.changeQueue)}processQueue(){var e=!f(this.data).length,t=Aa;this.startQueueFlush(),V(this.changeQueue,n=>{typeof n.index=="number"&&(t=Math.min(t,n.index)),this[n.status](n)}),this.flushPendingDeletes(),this.rendering_queued=!1,this.$indexHasBeenRequested&&this.updateIndexes(t),this.endQueueFlush(),this.changeQueue=[],e!==!this.isNotEmpty()&&this.isNotEmpty(!e)}_first$indexRequest(e){this.$indexHasBeenRequested=!0;for(let t=0,n=this.firstLastNodesList.length;t<n;++t){let i=this.getContextStartingFrom(this.firstLastNodesList[t].first);i&&(i.$index=T(t))}return e.$index()}_contextExtensions(e){return Object.assign(e,{$list:this.data}),this.$indexHasBeenRequested?e.$index=e.$index||T():Object.defineProperty(e,"$index",{value:()=>this._first$indexRequest(e),configurable:!0,writable:!0}),e}createContextGenerator(e){let t=this.$context;return e?n=>this._contextExtensions(t.extend({[e]:n})):n=>t.createChildContext(n,null,i=>this._contextExtensions(i))}updateFirstLastNodesList(e,t){let n=t[0],i=t[t.length-1];this.firstLastNodesList.splice(e,0,{first:n,last:i})}added(e){var t=e.index,n=e.isBatch?e.values:[e.value],i=this.getLastNodeBeforeIndex(t);let u=[],s=[];for(var o,a=0,l=n.length;a<l;++a){var d=this.getPendingDeleteFor(n[a]);if(d&&d.nodesets.length)o=d.nodesets.pop(),this.updateFirstLastNodesList(t+a,o);else{var m=this.templateNode.cloneNode(!0);o=A.childNodes(m),this.updateFirstLastNodesList(t+a,o);let h=le(this.generateContext(n[a]),m);s.push(h)}u.push(...o)}typeof this.afterAdd=="function"?this.afterAdd({nodeOrArrayInserted:this.insertAllAfter(u,i),foreachInstance:this}):this.insertAllAfter(u,i),this.completeBinding(Promise.all(s))}getNodesForIndex(e){let t=[],n=this.firstLastNodesList[e].first,i=this.firstLastNodesList[e].last;for(t.push(n);n&&n!==i;)n=n.nextSibling,t.push(n);return t}getLastNodeBeforeIndex(e){return e<1||e-1>=this.firstLastNodesList.length?null:this.firstLastNodesList[e-1].last}activeChildElement(e){var t=document.activeElement;if(gn(t,e))return t}insertAllAfter(e,t){let n,i,u,s=null,o=this.$element;if(e.nodeType===void 0&&e.length===void 0)throw new Error("Expected a single node or a node array");if(e.nodeType!==void 0)return s=this.activeChildElement(e),A.insertAfter(o,e,t),[e];if(e.length===1)s=this.activeChildElement(e[0]),A.insertAfter(o,e[0],t);else if(Da){for(n=document.createDocumentFragment(),u=0,i=e.length;u!==i;++u)s=s||this.activeChildElement(e[u]),n.appendChild(e[u]);A.insertAfter(o,n,t)}else for(u=e.length-1;u>=0;--u){s=s||this.activeChildElement(e[u]);var a=e[u];if(!a)break;A.insertAfter(o,a,t)}return s&&s.focus(),e}shouldDelayDeletion(e){return e&&(typeof e=="object"||typeof e=="function")}getPendingDeleteFor(e){var t=e&&e[vr];return t===void 0?null:this.pendingDeletes[t]}getOrCreatePendingDeleteFor(e){var t=this.getPendingDeleteFor(e);return t||(t={data:e,nodesets:[]},e[vr]=this.pendingDeletes.length,this.pendingDeletes.push(t),t)}deleted(e){this.shouldDelayDeletion(e.value)?this.getOrCreatePendingDeleteFor(e.value).nodesets.push(this.getNodesForIndex(e.index)):this.removeNodes(this.getNodesForIndex(e.index)),this.indexesToDelete.push(e.index)}removeNodes(e){if(!e.length)return;function t(){for(var i=e[0].parentNode,u=e.length-1;u>=0;--u)te(e[u]),i.removeChild(e[u])}if(this.beforeRemove){var n=this.beforeRemove({nodesToRemove:e,foreachInstance:this})||{};typeof n.then=="function"&&n.then(t,c.onError)}else t()}flushPendingDeletes(){for(let t=0,n=this.pendingDeletes.length;t!==n;++t){for(var e=this.pendingDeletes[t];e.nodesets.length;)this.removeNodes(e.nodesets.pop());e.data&&e.data[vr]!==void 0&&delete e.data[vr]}this.pendingDeletes=[]}clearDeletedIndexes(){for(let e=this.indexesToDelete.length-1;e>=0;--e)this.firstLastNodesList.splice(this.indexesToDelete[e],1);this.indexesToDelete=[]}updateIndexes(e){let t;for(let n=e,i=this.firstLastNodesList.length;n<i;++n)t=this.getContextStartingFrom(this.firstLastNodesList[n].first),t&&t.$index(n)}getContextStartingFrom(e){let t;for(;e;){if(t=Oe(e),t)return t;e=e.nextSibling}}static setSync(e){let t=c.global;e?Pe.animateFrame=function(n){n()}:Pe.animateFrame=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(n){return t.setTimeout(n,1e3/60)}}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}static get ForEach(){return this}static get PENDING_DELETE_INDEX_SYM(){return vr}};var ci={foreach:Pe};Pe.setSync(!1);var Ea=25,ba=1e3,di=[],fi=null;function Cs(r){di.push(r),Fs()}function Fs(){!fi&&di.length&&(fi=setTimeout(Ba,Ea))}function Ba(){fi=null;let r=di.splice(0,ba);for(let e of r)te(e);Fs()}var Ht=Symbol("Knockout - Original JSX"),un={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 Es(r){return r&&typeof r[Symbol.iterator]=="function"}var Ve=class extends X{constructor(e,t,n=null,i,u){super();let s=t.nodeType===8,o=this.getParentTarget(t);if(S(e))if(e.extend({trackArrayChanges:!0}),this.subscribe(e,this.observableArrayChange,"arrayChange"),n)this.adoptedInsertBefore=!0;else{let d=s?t.nextSibling:null;n=this.createComment("O"),o.insertBefore(n,d)}s&&!n&&(n=t.nextSibling,this.adoptedInsertBefore=!0),this.anchorTo(n||t),Object.assign(this,{insertBefore:n,noInitialBinding:u,parentNode:t,parentNodeTarget:o,xmlns:i,nodeArrayOrObservableAtIndex:[],subscriptionsForNode:new Map});let a=f(e);(St(e)||a!=null)&&this.observableArrayChange(this.createInitialAdditions(a)),this.noInitialBinding=!1}getParentTarget(e){return"content"in e?e.content:e.nodeType===8?e.parentNode:e}remove(){this.dispose()}dispose(){super.dispose();let e=this.insertBefore;e&&this.parentNodeTarget===e.parentNode&&!this.adoptedInsertBefore&&this.parentNodeTarget.removeChild(e),this.removeAllPriorNodes(),Object.assign(this,{parentNode:null,parentNodeTarget:null,insertBefore:null,nodeArrayOrObservableAtIndex:[]});for(let n of this.subscriptionsForNode.values())n.forEach(i=>i.dispose());this.subscriptionsForNode.clear()}createInitialAdditions(e){let t="added";return typeof possibleIteratable=="object"&&posibleIterable!==null&&Symbol.iterator in e&&(e=[...e]),Array.isArray(e)?e.map((n,i)=>({index:i,status:t,value:n})):[{status:t,index:0,value:e}]}observableArrayChange(e){let t=[],n=[];for(let i in e){let u=e[i];u.status==="added"?t.push([u.index,u.value]):n.unshift([u.index,u.value])}n.forEach(i=>this.delChange(...i)),t.forEach(i=>this.addChange(...i))}addChange(e,t){this.nodeArrayOrObservableAtIndex.splice(e,0,this.injectNode(t,this.lastNodeFor(e)))}injectNode(e,t){let n;if(S(e)){let{parentNode:i,xmlns:u}=this;n=[new Ve(e,i,t,u,this.noInitialBinding)]}else if(typeof e!="string"&&Es(e)){n=[];for(let i of e)n.unshift(this.injectNode(i,t))}else{let i=Oe(this.parentNode),u="content"in this.parentNode,s=i&&!u&&!this.noInitialBinding;Array.isArray(e)?n=e.map(o=>this.anyToNode(o)):n=[this.anyToNode(e)];for(let o of n)this.parentNodeTarget.insertBefore(o,t),s&&this.canApplyBindings(o)&&_t(i,o)}return n}canApplyBindings(e){return e.nodeType===1||e.nodeType===8}delChange(e){this.removeNodeArrayOrObservable(this.nodeArrayOrObservableAtIndex[e]),this.nodeArrayOrObservableAtIndex.splice(e,1)}getSubscriptionsForNode(e){if(!this.subscriptionsForNode.has(e)){let t=[];return this.subscriptionsForNode.set(e,t),t}return this.subscriptionsForNode.get(e)}isJsx(e){return typeof e.elementName=="string"&&"children"in e&&"attributes"in e}anyToNode(e){if(hn(e))return this.futureJsxNode(e);switch(typeof e){case"object":if(e instanceof Error)return this.createComment(e.toString());if(e===null)return this.createComment(String(e));if(e instanceof Node)return this.cloneJSXorMoveNode(e);if(Symbol.iterator in e)return e;break;case"function":return this.anyToNode(e());case"undefined":case"symbol":return this.createComment(String(e));case"string":return this.createTextNode(e);case"boolean":case"number":case"bigint":default:return this.createTextNode(String(e))}return this.isJsx(e)?this.jsxToNode(e):this.createComment(xi(e))}createComment(e){let t=document.createComment(e);return t[Ae]=!0,t}createTextNode(e){let t=document.createTextNode(e);return t[Ae]=!0,t}cloneJSXorMoveNode(e){return Ht in e?this.jsxToNode(e[Ht]):e}jsxToNode(e){let t=e.attributes.xmlns||un[e.elementName]||this.xmlns,n=document.createElementNS(t||un.html,e.elementName);return n[Ht]=e,S(e.attributes)&&this.getSubscriptionsForNode(n).push(e.attributes.subscribe(u=>{this.updateAttributes(n,f(u))})),this.updateAttributes(n,f(e.attributes)),this.addDisposable(new Ve(e.children,n,null,t,this.noInitialBinding)),n}futureJsxNode(e){let t=T();e.then(t).catch(i=>t(i instanceof Error?i:Error(i)));let n=new Ve(t,this.parentNode,null,this.xmlns,this.noInitialBinding);return this.addDisposable(n),n.insertBefore}updateAttributes(e,t){let n=this.getSubscriptionsForNode(e),i=new Set([...e.attributes].map(u=>u.name));for(let[u,s]of Object.entries(t||{}))i.delete(u),S(s)&&n.push(s.subscribe(o=>this.setNodeAttribute(e,u,s))),this.setNodeAttribute(e,u,s);for(let u of i)this.setNodeAttribute(e,u,void 0)}getNamespaceOfAttribute(e){let[t,...n]=e.split(":");return t==="xmlns"||n.length&&un[t]?un[t]:null}setNodeAttribute(e,t,n){let i=f(n);if(ye.addValueToNode(e,t,n),i===void 0)e.removeAttributeNS(null,t);else if(hn(n))Promise.resolve(n).then(u=>this.setNodeAttribute(e,t,u));else{let u=this.getNamespaceOfAttribute(t);e.setAttributeNS(u,t,String(i))}}lastNodeFor(e){let t=this.nodeArrayOrObservableAtIndex[e]||[],[n]=t.slice(-1),i=n instanceof Ve?n.insertBefore:n||this.insertBefore;return i&&i.parentNode?i:null}removeAllPriorNodes(){let{nodeArrayOrObservableAtIndex:e}=this;for(;e.length;)this.removeNodeArrayOrObservable(e.pop())}removeNodeArrayOrObservable(e){for(let t of e){if(t instanceof Ve){t.dispose();continue}let n=t;delete n[Ht],this.detachAndDispose(n);let i=this.subscriptionsForNode.get(n);i&&(i.forEach(u=>u.dispose()),this.subscriptionsForNode.delete(n))}}detachAndDispose(e){if(Es(e))for(let t of e)this.detachAndDispose(t);else e.remove();Cs(e)}},Dr=Ve;function pi(r){if(S(r))return!0;let e=f(r);return e?e.elementName?!0:!(!Array.isArray(e)||!e.length||e[0]instanceof window.Node):!1}function hi(r){return r[Ht]}function mi(r,e,...t){return r===sn?t:{elementName:r,attributes:e||{},children:[...t]}}var sn=Symbol("JSX Fragment");var ya=0,Cr=class extends it{constructor(e){super(e),this.originalChildNodes=fe(A.childNodes(this.$element)),this.computed("computeApplyComponent")}cloneTemplateIntoElement(e,t,n){if(!t)throw new Error("Component '"+e+"' has no template");if(pi(t))A.emptyNode(n),this.addDisposable(new Dr(t,n,null,void 0,!0));else{let i=Ne(t);A.setDomNodeChildren(n,i)}}createViewModel(e,t,n,i){let u=e.createViewModel;return u?u.call(e,i,{element:t,templateNodes:n}):i}makeTemplateSlotNodes(e){return Object.assign({},...this.genSlotsByName(e))}*genSlotsByName(e){for(let t of e){if(t.nodeType!==1)continue;let n=t.getAttribute("slot");!n||(yield{[n]:t})}}computeApplyComponent(){let e=f(this.value),t,n;if(typeof e=="string"?t=e:(t=f(e.name),n=ye.getNodeValues(this.$element)||f(e.params)),this.latestComponentName=t,!t)throw new Error("No component name specified");this.loadingOperationId=this.currentLoadingOperationId=++ya,ot.get(t,i=>this.applyComponentDefinition(t,n,i))}makeChildBindingContext(e){let t=n=>Object.assign(n,{$component:e,$componentTemplateNodes:this.originalChildNodes,$componentTemplateSlotNodes:this.makeTemplateSlotNodes(this.originalChildNodes)});return this.$context.createChildContext(e,void 0,t)}applyComponentDefinition(e,t,n){if(this.currentLoadingOperationId!==this.loadingOperationId||this.latestComponentName!==e)return;this.cleanUpState();let i=this.$element;if(!n)throw new Error("Unknown component '"+e+"'");n.template&&this.cloneTemplateIntoElement(e,n.template,i);let u=this.createViewModel(n,i,this.originalChildNodes,t);this.childBindingContext=this.makeChildBindingContext(u);let s=u&&u.template;if(!s&&!n.template)throw new Error("Component '"+e+"' has no template");n.template||this.cloneTemplateIntoElement(e,s,i),u instanceof X&&u.anchorTo(this.$element),this.currentViewModel=u;let o=this.onBindingComplete.bind(this,u);this.applyBindingsToDescendants(this.childBindingContext,o)}onBindingComplete(e,t){e&&e.koDescendantsComplete&&e.koDescendantsComplete(this.$element),this.completeBinding(t)}cleanUpState(){let e=this.currentViewModel,t=e&&e.dispose;typeof t=="function"&&t.call(e),this.currentViewModel=null,this.currentLoadingOperationId=null}dispose(){this.cleanUpState(),super.dispose()}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};var Fr=class extends it{constructor(...e){super(...e);let t=this.getSlot(this.value),n=Oe(t),i=this.$context.extend({$slotContext:n,$slotData:n&&n.$data});this.replaceSlotWithNode(this.$element,t),this.applyBindingsToDescendants(i)}replaceSlotWithNode(e,t){let n=this.cloneNodeFromOriginal(t);A.emptyNode(e),this.addDisposable(new Dr(n,e,void 0,void 0,!0))}cloneNodeFromOriginal(e){if(!e)return[];let t=hi(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(n=>!n.getAttribute||!n.getAttribute("slot"))}static get allowVirtualElements(){return!0}};var bs={component:Cr,slot:Fr};var on=String.prototype,Re={};Re.uppercase=function(r){return on.toUpperCase.call(f(r))};Re.lowercase=function(r){return on.toLowerCase.call(f(r))};Re.default=function(r,e){return r=f(r),typeof r=="function"?r:typeof r=="string"?on.trim.call(r)===""?e:r:r==null||r.length==0?e:r};Re.replace=function(r,e,t){return on.replace.call(f(r),e,t)};Re.fit=function(r,e,t,n){if(r=f(r),e&&(""+r).length>e)switch(t=""+(t||"..."),e=e-t.length,r=""+r,n){case"left":return t+r.slice(-e);case"middle":var i=Math.ceil(e/2);return r.substr(0,i)+t+r.slice(i-e);default:return r.substr(0,e)+t}else return r};Re.json=function(r,e,t){return JSON.stringify(yt(r),t,e)};Re.number=function(r){return(+f(r)).toLocaleString()};function gi(){}function xa(r,e){for(;typeof e=="function";)e=e();return e}var E={"@":xa,"#":(r,e)=>()=>f(e),"=>":gi,"!":function(e,t){return!t},"!!":function(e,t){return!!t},"++":function(e,t){return++t},"--":function(e,t){return--t},"**":function(e,t){return Ci(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},"==":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^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["**"].precedent=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=r=>!r;E["||"].earlyOut=r=>r;E["??"].earlyOut=r=>r;E[","].precedence=2;E.call.precedence=1;E["=>"].precedence=1;var Bs=Symbol("Node - Is Expression Or Identifier"),I=class{constructor(e,t,n){this.lhs=e,this.op=t,this.rhs=n}static get operators(){return E}get_leaf_value(e,t,n,i){return typeof e=="function"?f(e()):typeof e!="object"||e===null?e:e[I.isExpressionOrIdentifierSymbol]?f(e.get_value(void 0,t,n,i)):e}get_value(e,t,n,u){var u=this;if(u.op===gi)return(...l)=>{let d=t;return u.lhs&&(d=u.lhs.extendContext(t,l)),u.get_leaf_value(u.rhs,d,n,u)};let s=u.get_leaf_value(u.lhs,t,n,u),o=u.op.earlyOut;if(o&&o(s))return s;let a=u.get_leaf_value(u.rhs,t,n,u);return u.op(s,a,t,n)}static get isExpressionOrIdentifierSymbol(){return Bs}get[Bs](){return!0}static value_of(e,t,n,i){return e&&e[I.isExpressionOrIdentifierSymbol]?e.get_value(e,t,n,i):e}static create_root(e,t=!1){let n=[],i=[];for(let u=0;u<e.length;u+=2){n.push(e[u]);let s=e[u+1],o=(s==null?void 0:s.precedence)||0;for(;i.length&&o<=i[i.length-1].precedence;){let a=n.pop(),l=n.pop();n.push(new I(l,i.pop(),a))}i.push(s)}if(n.length!==1)throw new Error(`unexpected nodes remain in shunting yard output stack: ${n}`);return n[0]}};E["?"]=function(e,t,n,i,u){return I.value_of(e?t.yes:t.no,n,i,u)};E["?"].precedence=4;var ft=class{constructor(e){this.nodes=e,this.root=I.create_root(e)}get_value(e,t,n,i){return this.root||(this.root=I.create_root(this.nodes)),this.root.get_value(e,t,n,i)}};ft.prototype[I.isExpressionOrIdentifierSymbol]=!0;var qe=class{constructor(e,t){this.parser=e,this.args=t}get_value(e,t,n,i){for(var u=[],s=0,o=this.args.length;s<o;++s)u.push(I.value_of(this.args[s],t,n,i));return u}get[I.isExpressionOrIdentifierSymbol](){return!0}};var ys=/[\$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]/,xs=/[\$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 xe=class{constructor(e,t,n){this.token=t,this.dereferences=n,this.parser=e}dereference(e,t,n,i){let u,s=this.dereferences||[],o=t.$data||{},a,l,d;for(l=0,d=s.length;l<d;++l)if(u=I.value_of(s[l],t,n,i),typeof e=="function"&&s[l]instanceof qe)e=e.apply(a||o,u),a=e;else{if(e==null)return e;a=e,e=I.value_of(e[u],t,n,i)}return typeof e=="function"&&d>0&&a!==e&&!J(a,u)?e.bind(a):e}get_value(e,t,n,i){let u=e&&!(e instanceof xe)?I.value_of(e,t,n,i)[this.token]:t.lookup(this.token,n,i);return this.dereference(u,t,n,i)}assign(e,t,n){Z(e[t])?e[t](n):S(e[t])||(e[t]=n)}set_value(e,t,n){let i=t.$data||{},u=this.dereferences||[],s=this.token,o,a,l;if(Ge(i)&&s in i)l=i;else if(s in t)l=t;else if(s in n)l=n;else throw new Error("Identifier::set_value -- The property '"+s+"' does not exist on the $data, $context, or globals.");if(a=u.length,a===0){this.assign(l,s,e);return}for(l=l[s],o=0;o<a-1;++o)s=u[o],s instanceof qe?l=l():l=l[I.value_of(s)];if(u[o]===!0)throw new Error("Cannot assign a value to a function.");u[o]&&this.assign(l,I.value_of(u[o]),e)}static is_valid_start_char(e){return ys.test(e)}static is_valid_continue_char(e){return xs.test(e)}get[I.isExpressionOrIdentifierSymbol](){return!0}};var jt=class{constructor(e,t){t instanceof ft&&(t=t.root);try{this.names=jt.nodeTreeToNames(t)}catch(n){e.error(n)}}extendContext(e,t){if(this.names){let n={};return this.names.forEach((i,u)=>{n[i]=t[u]}),e.extend(n)}else return e}get[I.isExpressionOrIdentifierSymbol](){return!0}static nodeTreeToNames(e){let t=[];for(;e;)if(e instanceof xe)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 I&&e.op===E[","]&&e.rhs instanceof xe}};var Er=class{constructor(e,t){Object.assign(this,{yes:e,no:t})}get_value(){return this}get[I.isExpressionOrIdentifierSymbol](){return!0}};var ws=",\"'`{}()/:[\\]",Og=RegExp(['"(?:\\\\.|[^"])*"',"'(?:\\\\.|[^'])*'","`(?:\\\\.|[^`])*`","/\\*(?:[^*]|\\*+[^*/])*\\*+/",`//.*
16
- `,"/(?:\\\\.|[^/])+/\\w*","[^\\s:,/][^"+ws+"]*[^\\s"+ws+"]","[^\\s]"].join("|"),"g");function Ai(r,e,t){E[r]=e,Number.isInteger(t)&&(E[r].precedence=t)}Ai("==",(r,e)=>r===e);Ai("!=",(r,e)=>r!==e);var wa=new or({filters:Re,provider:new $t({providers:[new Vt,new ye,new Mt,new Lt,new Pt,new Ot,new Rt]}),bindings:[vs,qu,Ds,ci,bs,{each:ci.foreach}]}),Sa="4.0.0-beta1.6",Na=wa.create({jsx:{createElement:mi,Fragment:sn},components:ot,version:Sa,Component:ot.ComponentABC});return Os(Ta);})();
14
+ `),Qe[n]=e}function Ir(n){return J(Qe,n)}function ks(n){delete Qe[n],fe.clearCachedDefinition(n)}var kr={getConfig(n,e){let t=J(Qe,n)?Qe[n]:null;e(t)},loadComponent(n,e,t){let r=Sr(n);Or(r,e,function(i){Ou(n,r,i,t)})},loadTemplate(n,e,t){Iu(Sr(n),e,t)},loadViewModel(n,e,t){Ms(Sr(n),e,t)}},_r="createViewModel";function Ou(n,e,t,r){let i={},s=function(){--a===0&&r(i)},o=t.template,u=t.viewModel,a=2;o?Or(e,o,function(l){fe._getFirstResultFromLoaders("loadTemplate",[n,l],function(f){i.template=f,s()})}):s(),u?Or(e,u,function(l){fe._getFirstResultFromLoaders("loadViewModel",[n,l],function(f){i[_r]=f,s()})}):s()}function Iu(n,e,t){if(typeof e=="string")t(ce(e));else if(e instanceof Array)t(e);else if(er(e))t(ae(e.childNodes));else if(e.element){let r=e.element;if(Ai(r))t(Is(r));else if(typeof r=="string"){let i=document.getElementById(r);i?t(Is(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 Ms(n,e,t){if(e[Sn])t((...r)=>e[Sn](...r));else if(typeof e=="function")t(function(r){return new e(r)});else if(typeof e[_r]=="function")t(e[_r]);else if("instance"in e){let r=e.instance;t(function(){return r})}else"viewModel"in e?Ms(n,e.viewModel,t):n("Unknown viewModel value: "+e)}function Is(n){switch(V(n)){case"script":return ce(n.text);case"textarea":return ce(n.value);case"template":if(er(n.content))return ve(n.content.childNodes)}return ve(n.childNodes)}function Or(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)}}fe.loaders.push(kr);var On=class extends X{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[Sn](e,t){return new this(e,t)}static register(e=this.customElementName){let t=this,{template:r}=this,i=this.sync;_n(e,{viewModel:t,template:r,synchronous:i})}};var Ke={ComponentABC:On,get:fe.get,clearCachedDefinition:fe.clearCachedDefinition,register:_n,isRegistered:Ir,unregister:ks,defaultLoader:kr,_allRegisteredComponents:Qe,get loaders(){return fe.loaders},set loaders(n){fe.loaders=n}};var Ft=class extends H{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}"`),s=document.createComment("/ko");if(!t)throw Error("Missing parent node");return t.insertBefore(i,e),t.insertBefore(s,e),t.removeChild(e),[i,s]}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(Ke.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 ye(e,t,this.globals),i=(e.getAttribute("params")||"").trim(),s=r.parse(i,t,void 0,e);if(!s||Object.keys(s).length===0)return{$raw:{}};let o=he(s,a=>B(a,null,{disposeWhenNodeIsRemoved:e})),u=he(o,a=>this.makeParamValue(e,a));return Object.assign({$raw:o},u)}makeParamValue(e,t){let r=t.peek();if(!t.isActive())return r;let i=K(r);return B({read:()=>d(t()),write:i?s=>t()(s):void 0,disposeWhenNodeIsRemoved:e})}};var wt=class extends H{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 Bt=class extends H{get FOR_NODE_TYPES(){return this.nodeTypes}constructor(e){super(e);let t=(e==null?void 0:e.providers)||[];this.nodeTypeMap={},this.nodeTypes=[],this.providers=[],t.forEach(r=>this.addProvider(r))}setGlobals(e){[this,...this.providers].forEach(t=>t.globals=e)}addProvider(e){this.providers.push(e),e.bindingHandlers=this.bindingHandlers,e.globals=this.globals;let t=this.nodeTypeMap;for(let r of e.FOR_NODE_TYPES)t[r]||(t[r]=new Array),t[r].push(e);this.nodeTypes=Object.keys(this.nodeTypeMap).map(r=>parseInt(r,10))}providersFor(e){return this.nodeTypeMap[e.nodeType]||[]}nodeHasBindings(e,t){return this.providersFor(e).some(r=>r.nodeHasBindings(e))}preprocessNode(e){for(let t of this.providersFor(e)){let r=t.preprocessNode(e);if(r)return r}return null}*enumerateProviderBindings(e,t){for(let r of this.providersFor(e)){let i=r.getBindingAccessors(e,t);if(i&&(yield*ne(Object.entries(i||{})),r.preemptive))return}}getBindingAccessors(e,t){let r={};for(let[i,s]of this.enumerateProviderBindings(e,t)){if(i in r)throw new Error(`The binding "${i}" is duplicated by multiple providers`);r[i]=s}return r}};var ku=/^([\s\S]*)}}([\s\S]*?)\{\{([\s\S]*)$/,Mu=/^([\s\S]*?)\{\{([\s\S]*)}}([\s\S]*)$/,Pu=/^([^,"'{}()/:[\]\s]+)\s+([^\s:].*)/,In=class{constructor(e){this.text=e}trim(e){return e===null?"":e.trim()}},kn=class extends In{asAttr(e,t,r){return new ye().parseExpression(this.text,e,t,r)()}*textNodeReplacement(e){let t=this.trim(this.text),r=e?e.ownerDocument:document,i=t[0],s=t[t.length-1],o=!0,u;if(i==="#"){s==="/"?u=t.slice(1,-1):(u=t.slice(1),o=!1);let a=u.match(Pu);a&&(u=a[1]+":"+a[2])}else i==="/"||(i==="{"&&s==="}"?u="html:"+this.trim(t.slice(1,-1)):u="text:"+this.trim(t));u&&(yield r.createComment("ko "+u)),o&&(yield r.createComment("/ko"))}},Gt=class extends In{asAttr(){return this.text}*textNodeReplacement(){yield document.createTextNode(this.text.replace(/"/g,'\\"'))}};function*Ps(n){let e=n.match(ku);if(e){let[t,r,i]=e.slice(1);yield*ne(Ps(t)),yield new Gt(r),yield new kn(i)}else yield new kn(n)}function*Ru(n){if(!n)return;let[e,t,r]=n.slice(1);yield new Gt(e),yield*ne(Ps(t)),yield new Gt(r)}function*zt(n){for(let e of Ru(n==null?void 0:n.match(Mu)))e.text&&(yield e)}var Vu={value:"value",checked:"checked",class:"css"},Nt=class extends H{get FOR_NODE_TYPES(){return[Node.ELEMENT_NODE]}constructor(e=null){super(e),this.ATTRIBUTES_TO_SKIP=new Set((e==null?void 0:e.attributesToSkip)||["data-bind"]),this.ATTRIBUTES_BINDING_MAP=(e==null?void 0:e.attributesBindingMap)||Vu}*attributesToInterpolate(e){for(let t of Array.from(e))this.ATTRIBUTES_TO_SKIP.has(t.name)||t.specified&&t.value.includes("{{")&&(yield t)}nodeHasBindings(e){return e instanceof Element?!this.attributesToInterpolate(e.attributes).next().done:!1}partsTogether(e,t,r,...i){if(e.length>1)return e.map(o=>d(o.asAttr(t,this.globals,r))).join("");let s=e[0].asAttr(t,this.globals);return i.length&&s(i[0]),s}attributeBinding(e,t){return[e,t]}*bindingParts(e,t){for(let r of this.attributesToInterpolate(e.attributes)){let i=Array.from(zt(r.value));i.length&&(yield this.attributeBinding(r.name,i))}}getPossibleDirectBinding(e){return this.ATTRIBUTES_BINDING_MAP[e]&&this.bindingHandlers.get(e)}*bindingObjects(e,t){for(let[r,i]of this.bindingParts(e,t)){let s=this.getPossibleDirectBinding(r),o=s?r:`attr.${r}`,u=s?(...a)=>this.partsTogether(i,t,e,...a):(...a)=>({[r]:this.partsTogether(i,t,e,...a)});e.removeAttribute(r),yield{[o]:u}}}getBindingAccessors(e,t){return e instanceof Element?(t===void 0&&(t={}),Object.assign({},...this.bindingObjects(e,t))):!1}};var Tt=class extends H{get FOR_NODE_TYPES(){return[Node.TEXT_NODE]}*textToNodes(e){let t=e.parentNode,r=t&&t.nodeName==="TEXTAREA";if(!(!(e.nodeValue&&e.nodeValue.includes("{{"))||r))for(let s of zt(e.nodeValue))yield*ne(s.textNodeReplacement(e))}textInterpolation(e){let t=Array.from(this.textToNodes(e));if(t.length===0)return null;if(e.parentNode){let r=e.parentNode,i=t.length;for(let s=0;s<i;++s)r.insertBefore(t[s],e);r.removeChild(e)}return t}preprocessNode(e){return this.textInterpolation(e)}};var pe=Symbol("Knockout native bindings"),De=class extends H{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(r=>r.startsWith("ko-")):!1}preprocessNode(e){return e[pe]?[e]:null}onlyBindings([e]){return e.startsWith("ko-")}valueAsAccessor([e,t]){let r=e.replace(/^ko-/,""),i=T(t)?t:()=>t;return{[r]:i}}getBindingAccessors(e,t){let r=Object.entries(e[pe]||{}).filter(this.onlyBindings);return r.length?Object.assign({},...r.map(this.valueAsAccessor)):null}static addValueToNode(e,t,r){let i=e[pe]||(e[pe]={});i[t]=r}static getNodeValues(e){return e[pe]}};var Rs={update:function(n,e,t){let r=d(e())||{};R(r,function(i,s){s=d(s);let o=i.indexOf(":"),u=o>0&&n.lookupNamespaceURI(i.substr(0,o)),a=s===!1||s===null||s===void 0;a?u?n.removeAttributeNS(u,i):n.removeAttribute(i):(s=s.toString(),u?n.setAttributeNS(u,i,s):n.setAttribute(i,s)),i==="name"&&(n.name=a?"":s)})}};var Vs={after:["value","attr"],init:function(n,e,t){let r=we(function(){if(t.has("checkedValue"))return d(t.get("checkedValue"));if(p)return t.has("value")?d(t.get("value")):n.value});function i(){let m=n.checked,A=r();if(C.isInitial()||!m&&(u||C.getDependenciesCount()))return;let v=C.ignore(e);if(l){let h=f?v.peek():v,S=b;b=A,S!==A?(m&&(Te(h,A,!0),Te(h,S,!1)),b=A):Te(h,A,m),f&&K(v)&&v(h)}else{o&&(A===void 0?A=m:m||(A=void 0));let h=e(A,{onlyIfChanged:!0});K(h)&&h.peek()!==A&&h(A)}}function s(){let m=d(e()),A=r();l?(n.checked=U(m,A)>=0,b=A):o&&A===void 0?n.checked=!!m:n.checked=r()===m}let o=n.type=="checkbox",u=n.type=="radio";if(!o&&!u)return;let a=e(),l=o&&d(a)instanceof Array,f=!(l&&a.push&&a.splice),p=u||l,b=l?r():void 0;B(i,null,{disposeWhenNodeIsRemoved:n}),q(n,"click",i),B(s,null,{disposeWhenNodeIsRemoved:n}),a=void 0}},Ls={update:function(n,e){n.value=d(e())}};function Hs(n){return{init:function(e,t,r,i,s){let o=function(){let u={};return u[n]=t(),u};Mn.init.call(this,e,o,r,i,s)}}}function $s(n){return typeof n=="function"?{handler:n}:n||{}}var Mn={init:function(n,e,t,r,i){let s=e()||{};R(s,function(o,u){let{passive:a,capture:l,once:f,debounce:p,throttle:b}=$s(u),m=(l||a||f)&&{capture:l,passive:a,once:f},A=(v,...h)=>{let S,{handler:k,passive:g,bubble:N,preventDefault:x}=$s(e()[o]);try{if(k){let M=i.$data,j=[M,v,...h];S=k.apply(M,j)}}finally{x!==void 0?d(x)&&v.preventDefault():S!==!0&&(g||v.preventDefault())}let _=t.get(o+"Bubble")!==!1;(N===!1||!_)&&(v.cancelBubble=!0,v.stopPropagation&&v.stopPropagation())};p&&(A=ln(A,p)),b&&(A=an(A,b)),q(n,o,A,m||!1)})}},js={init:Mn.init,preprocess:function(n,e,t){t(e.replace("on.",""),"=>"+n)}};var Us=Hs("click");var Yt={aliases:["class"],update:function(n,e){let t=d(e());t!==null&&typeof t=="object"?R(t,function(r,i){i=d(i),rt(n,r,i)}):(t=It(String(t||"")),rt(n,n[Yt.classesWrittenByBindingKey],!1),n[Yt.classesWrittenByBindingKey]=t,rt(n,t,!0))},classesWrittenByBindingKey:G("__ko__cssValue")};var Xt=class extends Z{onDescendantsComplete(){typeof this.value=="function"&&this.value(this.$element)}static get allowVirtualElements(){return!0}};var Mr={update:function(n,e){let t=d(e());t&&n.disabled?n.removeAttribute("disabled"):!t&&!n.disabled&&(n.disabled=!0)}},Ws={update:function(n,e){Mr.update(n,function(){return!d(e())})}};var Pr=G("__ko_hasfocusUpdating"),Rr=G("__ko_hasfocusLastValue"),Vr={init:function(n,e,t){let r=function(o){n[Pr]=!0;let u=n.ownerDocument;if("activeElement"in u){let l;try{l=u.activeElement}catch(f){l=u.body}o=l===n}let a=e(o,{onlyIfChanged:!0});K(a)&&a.peek()!==o&&a(o),n[Rr]=o,n[Pr]=!1},i=r.bind(null,!0),s=r.bind(null,!1);q(n,"focus",i),q(n,"focusin",i),q(n,"blur",s),q(n,"focusout",s)},update:function(n,e){let t=!!d(e());!n[Pr]&&n[Rr]!==t&&(t?n.focus():n.blur(),!t&&n[Rr]&&n.ownerDocument.body.focus(),C.ignore(Pe,null,[n,t?"focusin":"focusout"]))}};var Qs={init:function(){return{controlsDescendantBindings:!0}},update:function(n,e){ot(n,e())},allowVirtualElements:!0};var Ks={init:function(n,e,t,r,i){let s=i.extend(e);return oe(s,n),{controlsDescendantBindings:!0}},allowVirtualElements:!0};var Lr={},qs={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 Me(n.options,function(g){return g.selected})}let i=n.length==0,s=n.multiple,o=!i&&s?n.scrollTop:null,u=d(e()),a=t.get("valueAllowUnset")&&t.has("value"),l=t.get("optionsIncludeDestroyed"),f={},p,b,m=new Array;a||(s?m=Ze(r(),O.readValue):n.selectedIndex>=0&&m.push(O.readValue(n.options[n.selectedIndex]))),u&&(typeof u.length=="undefined"&&(u=[u]),b=Me(u,function(g){return l||g===void 0||g===null||!d(g._destroy)}),t.has("optionsCaption")&&(p=d(t.get("optionsCaption")),p!=null&&b.unshift(Lr)));function A(g,N,x){let _=typeof N;return _==="function"?N(g):_=="string"?g[N]:x}let v=!1;function h(g,N,x){x.length&&(m=!a&&x[0].selected?[O.readValue(x[0])]:[],v=!0);let _=n.ownerDocument.createElement("option");if(g===Lr)Le(_,t.get("optionsCaption")),O.writeValue(_,void 0);else{let M=A(g,t.get("optionsValue"),g);O.writeValue(_,d(M));let j=A(g,t.get("optionsText"),M);Le(_,j)}return[_]}f.beforeRemove=function(g){n.removeChild(g)};function S(g,N){if(v&&a)O.writeValue(n,d(t.get("value")),!0);else if(m.length){let x=U(m,O.readValue(N[0]))>=0;pn(N[0],x),v&&!x&&C.ignore(Pe,null,[n,"change"])}}let k=S;t.has("optionsAfterRender")&&typeof t.get("optionsAfterRender")=="function"&&(k=function(g,N){S(g,N),C.ignore(t.get("optionsAfterRender"),null,[N[0],g!==Lr?g:void 0])}),At(n,b,h,f,k),C.ignore(function(){if(a)O.writeValue(n,d(t.get("value")),!0);else{let g;s?g=m.length&&r().length<m.length:g=m.length&&n.selectedIndex>=0?O.readValue(n.options[n.selectedIndex])!==m[0]:m.length||n.selectedIndex>=0,g&&Pe(n,"change")}}),o&&Math.abs(o-n.scrollTop)>20&&(n.scrollTop=o)}};var Js={after:["options","foreach"],init:function(n,e,t){q(n,"change",function(){let r=e(),i=new Array;P(n.getElementsByTagName("option"),function(s){s.selected&&i.push(O.readValue(s))}),e(i)})},update:function(n,e){if(V(n)!="select")throw new Error("values binding applies only to SELECT elements");let t=d(e()),r=n.scrollTop;t&&typeof t.length=="number"&&P(n.getElementsByTagName("option"),function(i){let s=U(t,O.readValue(i))>=0;i.selected!=s&&pn(i,s)}),n.scrollTop=r}};var Gs={update:function(n,e){let t=d(e()||{});R(t,function(r,i){if(i=d(i),(i==null||i===!1)&&(i=""),c.jQuery)jQuery(n).css(r,i);else{r=r.replace(/-(\w)/g,(o,u)=>u.toUpperCase());let s=n.style[r];n.style[r]=i,i!==s&&n.style[r]===s&&!isNaN(i)&&(n.style[r]=i+"px")}})}};var zs={init:function(n,e,t,r,i){if(typeof e()!="function")throw new Error("The value for a submit binding must be a function");q(n,"submit",function(s){let o,u=e();try{o=u.call(i.$data,n)}finally{o!==!0&&(s.preventDefault?s.preventDefault():s.returnValue=!1)}})}};var Ys={init:function(){return{controlsDescendantBindings:!0}},update:function(n,e){Le(n,e())},allowVirtualElements:!0};var Jr=/MSIE ([^ ;]+)|rv:([^ )]+)/,$r,Hr,jr,Ur,qe=class extends Z{get aliases(){return"textinput"}constructor(...e){super(...e),this.previousElementValue=this.$element.value,c.debug&&this.constructor._forceUpdateOn&&P(this.constructor._forceUpdateOn,t=>{t.slice(0,5)==="after"?this.addEventListener(t.slice(5),"deferUpdateModel"):this.addEventListener(t,"updateModel")});for(let t of this.eventsIndicatingSyncValueChange())this.addEventListener(t,"updateModel");for(let t of this.eventsIndicatingDeferValueChange())this.addEventListener(t,"deferUpdateModel");this.computed("updateView")}eventsIndicatingSyncValueChange(){return["input","change","blur"]}eventsIndicatingDeferValueChange(){return[]}updateModel(e){let t=this.$element;clearTimeout(this.timeoutHandle),this.elementValueBeforeEvent=this.timeoutHandle=void 0;let r=t.value;this.previousElementValue!==r&&(c.debug&&e&&(t._ko_textInputProcessedEvent=e.type),this.previousElementValue=r,this.value=r)}deferUpdateModel(e){let t=this.$element;if(!this.timeoutHandle){this.elementValueBeforeEvent=t.value;let r=c.debug?this.updateModel.bind(this,{type:e.type}):this.updateModel;this.timeoutHandle=le(r,4)}}updateView(){let e=d(this.value);e==null&&(e=""),this.elementValueBeforeEvent!==void 0&&e===this.elementValueBeforeEvent?setTimeout(this.updateView.bind(this),4):this.$element.value!==e&&(this.previousElementValue=e,this.$element.value=e,this.previousElementValue=this.$element.value)}},Wr=class extends qe{eventsIndicatingSyncValueChange(){return[...super.eventsIndicatingSyncValueChange(),"keypress"]}},Qr=class extends qe{eventsIndicatingDeferValueChange(){return["keydown","paste","cut"]}},Kr=class extends qe{eventsIndicatingDeferValueChange(){return["keydown"]}},qr=class extends qe{eventsIndicatingValueChange(){return[...super.eventsIndicatingSyncValueChange(),"DOMAutoComplete","dragdrop","drop"]}},Zt=c.global;if(Zt.navigator){let n=r=>r&&parseFloat(r[1]),e=Zt.navigator.userAgent;if(!e.match(/Chrome\/([^ ]+)/)){$r=Zt.opera&&Zt.opera.version&&parseInt(Zt.opera.version()),Hr=n(e.match(/Version\/([^ ]+) Safari/)),jr=n(e.match(/Firefox\/([^ ]*)/));let r=e.match(Jr);Ur=r&&(parseFloat(r[1])||parseFloat(r[2]))}}var Gr=Ur&&Ur<=11?Wr:Hr&&Hr<5?Qr:$r&&$r<11?Kr:jr&&jr<4?qr:qe;var zr={init:function(n,e){if(e()){let t="ko_unique_"+ ++zr.currentIndex;n.name=t}},currentIndex:0};var Pn=class extends Z{static get after(){return["options","foreach","template"]}constructor(...e){if(super(...e),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.propertyChangeFired&&this.valueUpdateHandler())),P(this.eventsToCatch,t=>this.registerEvent(t)),this.isInput&&this.$element.type==="file"?this.updateFromModel=this.updateFromModelForFile:this.updateFromModel=this.updateFromModelForValue,this.computed("updateFromModel")}get eventsToCatch(){let e=this.allBindings.get("valueUpdate"),t=typeof e=="string"?[e]:e||[];return[...new Set(["change",...t])]}get isInput(){return V(this.$element)==="input"}get isCheckboxOrRadio(){let e=this.$element;return this.isInput&&(e.type=="checkbox"||e.type=="radio")}get ieAutoCompleteHackNeeded(){return this.isInput&&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=O.readValue(this.$element)}registerEvent(e){let t=this.valueUpdateHandler.bind(this);gi(e,"after")&&(t=()=>{this.elementValueBeforeEvent=O.readValue(this.$element),le(this.valueUpdateHandler.bind(this),0)},e=e.substring(5)),this.addEventListener(e,t)}updateFromModelForFile(){let e=d(this.value);e==null||e===""?this.$element.value="":C.ignore(this.valueUpdateHandler,this)}updateFromModelForValue(){let e=this.$element,t=d(this.value),r=O.readValue(e);if(this.elementValueBeforeEvent!==null&&t===this.elementValueBeforeEvent){le(this.updateFromModel.bind(this),0);return}if(!(t===r&&r!==void 0))if(V(e)==="select"){let i=this.allBindings.get("valueAllowUnset");O.writeValue(e,t,i),!i&&t!==O.readValue(e)&&C.ignore(this.valueUpdateHandler,this)}else O.writeValue(e,t)}};var Yr={update:function(n,e){let t=d(e()),r=n.style.display!=="none";t&&!r?n.style.display="":!t&&r&&(n.style.display="none")}},Xs={update:function(n,e){Yr.update.call(this,n,()=>!d(e()))}};var Zs={init:function(n,e,t,r,i){let s=i.createChildContext(e);return oe(s,n),{controlsDescendantBindings:!0}},allowVirtualElements:!0};var eo={attr:Rs,checked:Vs,checkedValue:Ls,click:Us,css:Yt,class:Yt,descendantsComplete:Xt,enable:Mr,event:Mn,disable:Ws,hasfocus:Vr,hasFocus:Vr,hidden:Xs,html:Qs,let:Ks,on:js,options:qs,selectedOptions:Js,style:Gs,submit:zs,text:Ys,textInput:Gr,textinput:Gr,uniqueName:zr,using:Zs,value:Pn,visible:Yr};var Je=class extends ee{get bindingContext(){throw new Error("bindingContext() must be implemented in the child class")}constructor(e){super(e),this.hasElse=this.detectElse(this.$element);let t=this.completesElseChain=w();D.set(this.$element,"conditional",{elseChainSatisfied:t})}getIfElseNodes(){if(this.ifElseNodes)return this.ifElseNodes;if(C.getDependenciesCount()||this.hasElse)return this.cloneIfElseNodes(this.$element,this.hasElse)}renderStatus(){throw new Error("renderStatus() must be implemented in the child class")}render(){let e=!this.ifElseNodes,{shouldDisplay:t}=this.renderStatus();if(this.ifElseNodes=this.getIfElseNodes()||{},t){let r=e&&!this.hasElse;this.renderAndApplyBindings(this.ifElseNodes.ifNodes,r)}else this.hasElse?this.renderAndApplyBindings(this.ifElseNodes.elseNodes):y.emptyNode(this.$element)}renderAndApplyBindings(e,t){return Xe(this,null,function*(){t||y.setDomNodeChildren(this.$element,ve(e));let r=yield oe(this.bindingContext,this.$element);this.completeBinding(r)})}get elseChainIsAlreadySatisfied(){return!1}isElseNode(e){return e.nodeType===Node.COMMENT_NODE&&e.nodeValue.trim().toLowerCase()==="else"}detectElse(e){let t=y.childNodes(e);for(let r=0,i=t.length;r<i;++r)if(this.isElseNode(t[r]))return!0;return!1}cloneIfElseNodes(e,t){let r=y.childNodes(e),i=new Array,s=new Array,o=i;for(let u=0,a=r.length;u<a;++u)t&&this.isElseNode(r[u])?(o=s,t=!1):o.push(z(r[u].cloneNode(!0)));return{ifNodes:i,elseNodes:s}}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};var Ge=class extends Je{constructor(...e){super(...e),this.ifCondition=this.computed(()=>!!d(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 e=this.shouldDisplayIf();return this.elseChainIsAlreadySatisfied?(e=!1,this.completesElseChain(!0)):this.completesElseChain(e),{shouldDisplay:e}}},en=class extends Ge{shouldDisplayIf(){return!super.shouldDisplayIf()}};var Rn=class extends Je{constructor(...e){super(...e),this.asOption=this.allBindings.get("as");let t=this.asOption&&!c.createChildContextWithAs?()=>!!d(this.value):()=>d(this.value);this.conditional=this.computed(t),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 tn=class extends Ge{shouldDisplayIf(){return super.shouldDisplayIf()||this.value===void 0}get elseChainIsAlreadySatisfied(){return this._elseChain||(this._elseChain=this.readElseChain()),d(this._elseChain.elseChainSatisfied)}readElseChain(){let e=this.$element;do e=e.previousSibling;while(e&&e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.COMMENT_NODE);return e?(e.nodeType===Node.COMMENT_NODE&&(e=y.previousSibling(e)),D.get(e,"conditional")||{}):!1}};var to={if:Ge,with:Rn,ifnot:en,unless:en,else:tn,elseif:tn};var Lu=9007199254740991;function $u(n){return!!n&&typeof n=="object"&&n.constructor===Object}var Hu=c.document&&typeof c.document.createDocumentFragment=="function";function ju(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,P(y.childNodes(t),function(r){r&&e.insertBefore(r.cloneNode(!0),null)}),e}function Uu(n,e){return{status:"added",value:n,index:e}}var nn=G("_ko_ffe_pending_delete_index"),rn=class n extends ee{constructor(e){var i;super(e);let t={};$u(this.value)&&Object.assign(t,this.value),this.as=t.as||this.allBindings.get("as"),this.data=t.data||(d(this.$context.$rawData)===this.value?this.$context.$rawData:this.value),this.container=y.isStartComment(this.$element)?this.$element.parentNode:this.$element,this.generateContext=this.createContextGenerator(this.as),this.$indexHasBeenRequested=!1,this.templateNode=ju(t.templateNode||(t.name?(i=document.getElementById(t.name))==null?void 0:i.cloneNode(!0):this.$element)),["afterAdd","beforeRemove","afterQueueFlush","beforeQueueFlush"].forEach(s=>{this[s]=t[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=w(!!d(this.data).length),D.set(this.$element,"conditional",{elseChainSatisfied:this.isNotEmpty}),y.emptyNode(this.$element);let r=d(this.data);r&&r.map?this.onArrayChange(r.map(Uu),!0):this.completeBinding(),T(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(e,t){let r={added:[],deleted:[]};for(let i=0,s=e.length;i<s;i++){if(r.added.length&&e[i].status==="added"){let o=r.added[r.added.length-1];if((o.isBatch?o.index+o.values.length-1:o.index)+1===e[i].index){o.isBatch||(o={isBatch:!0,status:"added",index:o.index,values:[o.value]},r.added.splice(r.added.length-1,1,o)),o.values.push(e[i].value);continue}}r[e[i].status].push(e[i])}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,t?this.processQueue():n.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 e=!d(this.data).length,t=Lu;this.startQueueFlush(),P(this.changeQueue,r=>{typeof r.index=="number"&&(t=Math.min(t,r.index)),this[r.status](r)}),this.flushPendingDeletes(),this.rendering_queued=!1,this.$indexHasBeenRequested&&this.updateIndexes(t),this.endQueueFlush(),this.changeQueue=new Array,e!==!this.isNotEmpty()&&this.isNotEmpty(!e)}_first$indexRequest(e){this.$indexHasBeenRequested=!0;for(let t=0,r=this.firstLastNodesList.length;t<r;++t){let i=this.getContextStartingFrom(this.firstLastNodesList[t].first);i&&(i.$index=w(t))}return e.$index()}_contextExtensions(e){return Object.assign(e,{$list:this.data}),this.$indexHasBeenRequested?e.$index=e.$index||w():Object.defineProperty(e,"$index",{value:()=>this._first$indexRequest(e),configurable:!0,writable:!0}),e}createContextGenerator(e){let t=this.$context;return e?r=>this._contextExtensions(t.extend({[e]:r})):r=>t.createChildContext(r,void 0,i=>this._contextExtensions(i))}updateFirstLastNodesList(e,t){let r=t[0],i=t[t.length-1];this.firstLastNodesList.splice(e,0,{first:r,last:i})}added(e){let t=e.index,r=e.isBatch?e.values:[e.value],i=this.getLastNodeBeforeIndex(t),s=[],o=new Array,u;for(let a=0,l=r.length;a<l;++a){let f=this.getPendingDeleteFor(r[a]);if(f&&f.nodesets.length)u=f.nodesets.pop(),this.updateFirstLastNodesList(t+a,u);else{let p=this.templateNode.cloneNode(!0);u=y.childNodes(p),this.updateFirstLastNodesList(t+a,u);let b=oe(this.generateContext(r[a]),p);o.push(b)}s.push(...u)}typeof this.afterAdd=="function"?this.afterAdd({nodeOrArrayInserted:this.insertAllAfter(s,i),foreachInstance:this}):this.insertAllAfter(s,i),this.completeBinding(Promise.all(o))}getNodesForIndex(e){let t=new Array,r=this.firstLastNodesList[e].first,i=this.firstLastNodesList[e].last;for(t.push(r);r&&r!==i;)r=r.nextSibling,t.push(r);return t}getLastNodeBeforeIndex(e){return e<1||e-1>=this.firstLastNodesList.length?null:this.firstLastNodesList[e-1].last}activeChildElement(e){let t=document.activeElement;return Zn(t,e)?t:null}insertAllAfter(e,t){let r,i,s,o=null,u=this.$element;if(e.nodeType===void 0&&e.length===void 0)throw new Error("Expected a single node or a node array");if(e.nodeType!==void 0)return o=this.activeChildElement(e),y.insertAfter(u,e,t),[e];if(e.length===1)o=this.activeChildElement(e[0]),y.insertAfter(u,e[0],t);else if(Hu){for(r=document.createDocumentFragment(),s=0,i=e.length;s!==i;++s)o=o||this.activeChildElement(e[s]),r.appendChild(e[s]);y.insertAfter(u,r,t)}else for(s=e.length-1;s>=0;--s){o=o||this.activeChildElement(e[s]);let a=e[s];if(!a)break;y.insertAfter(u,a,t)}return o&&o.focus(),e}shouldDelayDeletion(e){return e&&(typeof e=="object"||typeof e=="function")}getPendingDeleteFor(e){let t=e&&e[nn];return t===void 0?null:this.pendingDeletes[t]}getOrCreatePendingDeleteFor(e){let t=this.getPendingDeleteFor(e);return t||(t={data:e,nodesets:[]},e[nn]=this.pendingDeletes.length,this.pendingDeletes.push(t),t)}deleted(e){this.shouldDelayDeletion(e.value)?this.getOrCreatePendingDeleteFor(e.value).nodesets.push(this.getNodesForIndex(e.index)):this.removeNodes(this.getNodesForIndex(e.index)),this.indexesToDelete.push(e.index)}removeNodes(e){if(!e.length)return;function t(){let r=e[0].parentNode;for(let i=e.length-1;i>=0;--i)z(e[i]),r.removeChild(e[i])}if(this.beforeRemove){let r=this.beforeRemove({nodesToRemove:e,foreachInstance:this})||{};typeof r.then=="function"&&r.then(t,c.onError)}else t()}flushPendingDeletes(){for(let e=0,t=this.pendingDeletes.length;e!==t;++e){let r=this.pendingDeletes[e];for(;r.nodesets.length;)this.removeNodes(r.nodesets.pop());r.data&&r.data[nn]!==void 0&&delete r.data[nn]}this.pendingDeletes=new Array}clearDeletedIndexes(){for(let e=this.indexesToDelete.length-1;e>=0;--e)this.firstLastNodesList.splice(this.indexesToDelete[e],1);this.indexesToDelete=new Array}updateIndexes(e){let t;for(let r=e,i=this.firstLastNodesList.length;r<i;++r)t=this.getContextStartingFrom(this.firstLastNodesList[r].first),t&&t.$index(r)}getContextStartingFrom(e){let t;for(;e;){if(t=Ne(e),t)return t;e=e.nextSibling}}static setSync(e){let t=c.global;e?n.animateFrame=function(r){r()}:n.animateFrame=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(r){return t.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 nn}};var Xr={foreach:rn};rn.setSync(!1);var Wu=25,Qu=1e3,ei=new Array,Zr=null;function no(n){ei.push(n),ro()}function ro(){!Zr&&ei.length&&(Zr=setTimeout(Ku,Wu))}function Ku(){Zr=null;let n=ei.splice(0,Qu);for(let e of n)z(e);ro()}var St=Symbol("Knockout - Original JSX"),Vn={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 io(n){return n&&typeof n[Symbol.iterator]=="function"}var ti=class n extends X{constructor(e,t,r=null,i,s){super();let o=t.nodeType===Node.COMMENT_NODE,u=this.getParentTarget(t);if(T(e))if(e.extend({trackArrayChanges:!0}),this.subscribe(e,this.observableArrayChange,"arrayChange"),r)this.adoptedInsertBefore=!0;else{let f=o?t.nextSibling:null;r=this.createComment("O"),u==null||u.insertBefore(r,f)}o&&!r&&(r=t.nextSibling,this.adoptedInsertBefore=!0),this.anchorTo(r||t),Object.assign(this,{insertBefore:r,noInitialBinding:s,parentNode:t,parentNodeTarget:u,xmlns:i,nodeArrayOrObservableAtIndex:[],subscriptionsForNode:new Map});let a=d(e);(gt(e)||a!=null)&&this.observableArrayChange(this.createInitialAdditions(a)),this.noInitialBinding=!1}getParentTarget(e){return"content"in e?e.content:e.nodeType===Node.COMMENT_NODE?e.parentNode:e}remove(){this.dispose()}dispose(){var r;super.dispose();let e=this.insertBefore;e&&this.parentNodeTarget===e.parentNode&&!this.adoptedInsertBefore&&((r=this.parentNodeTarget)==null||r.removeChild(e)),this.removeAllPriorNodes(),Object.assign(this,{parentNode:null,parentNodeTarget:null,insertBefore:null,nodeArrayOrObservableAtIndex:[]});for(let i of this.subscriptionsForNode.values())i.forEach(s=>s.dispose());this.subscriptionsForNode.clear()}createInitialAdditions(e){let t="added";return typeof e=="object"&&e!==null&&Symbol.iterator in e&&(e=[...e]),Array.isArray(e)?e.map((r,i)=>({index:i,status:t,value:r})):[{status:t,index:0,value:e}]}observableArrayChange(e){let t=[],r=[];for(let i in e){let s=e[i];s.status==="added"?t.push([s.index,s.value]):r.unshift([s.index,s.value])}r.forEach(i=>this.delChange(...i)),t.forEach(i=>this.addChange(...i))}addChange(e,t){this.nodeArrayOrObservableAtIndex.splice(e,0,this.injectNode(t,this.lastNodeFor(e)))}injectNode(e,t){var i;let r;if(T(e)){let{parentNode:s,xmlns:o}=this;r=[new n(e,s,t,o,this.noInitialBinding)]}else if(typeof e!="string"&&io(e)){r=new Array;for(let s of e)r.unshift(this.injectNode(s,t))}else{let s=Ne(this.parentNode),o="content"in this.parentNode,u=s&&!o&&!this.noInitialBinding;Array.isArray(e)?r=e.map(a=>this.anyToNode(a)):r=[this.anyToNode(e)];for(let a of r)(i=this.parentNodeTarget)==null||i.insertBefore(a,t),u&&this.canApplyBindings(a)&&yt(s,a)}return r}canApplyBindings(e){return e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.COMMENT_NODE}delChange(e,t){this.removeNodeArrayOrObservable(this.nodeArrayOrObservableAtIndex[e]),this.nodeArrayOrObservableAtIndex.splice(e,1)}getSubscriptionsForNode(e){if(!this.subscriptionsForNode.has(e)){let t=new Array;return this.subscriptionsForNode.set(e,t),t}return this.subscriptionsForNode.get(e)}isJsx(e){return typeof e.elementName=="string"&&"children"in e&&"attributes"in e}anyToNode(e){if(Yn(e))return this.futureJsxNode(e);switch(typeof e){case"object":if(e instanceof Error)return this.createComment(e.toString());if(e===null)return this.createComment(String(e));if(e instanceof Node)return this.cloneJSXorMoveNode(e);if(Symbol.iterator in e)return e;break;case"function":return this.anyToNode(e());case"undefined":case"symbol":return this.createComment(String(e));case"string":return this.createTextNode(e);default:return this.createTextNode(String(e))}return this.isJsx(e)?this.jsxToNode(e):this.createComment(mi(e))}createComment(e){let t=document.createComment(e);return t[pe]=!0,t}createTextNode(e){let t=document.createTextNode(e);return t[pe]=!0,t}cloneJSXorMoveNode(e){return St in e?this.jsxToNode(e[St]):e}jsxToNode(e){let t=e.attributes.xmlns||Vn[e.elementName]||this.xmlns,r=document.createElementNS(t||Vn.html,e.elementName);return r[St]=e,T(e.attributes)&&this.getSubscriptionsForNode(r).push(e.attributes.subscribe(s=>{this.updateAttributes(r,d(s))})),this.updateAttributes(r,d(e.attributes)),this.addDisposable(new n(e.children,r,null,t,this.noInitialBinding)),r}futureJsxNode(e){let t=w();e.then(t).catch(i=>t(i instanceof Error?i:Error(i)));let r=new n(t,this.parentNode,null,this.xmlns,this.noInitialBinding);return this.addDisposable(r),r.insertBefore}updateAttributes(e,t){let r=this.getSubscriptionsForNode(e),i=new Set([...e.attributes].map(s=>s.name));for(let[s,o]of Object.entries(t||{}))i.delete(s),T(o)&&r.push(o.subscribe(u=>this.setNodeAttribute(e,s,o))),this.setNodeAttribute(e,s,o);for(let s of i)this.setNodeAttribute(e,s,void 0)}getNamespaceOfAttribute(e){let[t,...r]=e.split(":");return t==="xmlns"||r.length&&Vn[t]?Vn[t]:null}setNodeAttribute(e,t,r){let i=d(r);if(De.addValueToNode(e,t,r),i===void 0)e.removeAttributeNS(null,t);else if(Yn(r))Promise.resolve(r).then(s=>this.setNodeAttribute(e,t,s));else{let s=this.getNamespaceOfAttribute(t);e.setAttributeNS(s,t,String(i))}}lastNodeFor(e){let t=this.nodeArrayOrObservableAtIndex[e]||[],[r]=t.slice(-1),i=r instanceof n?r.insertBefore:r||this.insertBefore;return i&&i.parentNode?i:null}removeAllPriorNodes(){let{nodeArrayOrObservableAtIndex:e}=this;for(;e.length;)this.removeNodeArrayOrObservable(e.pop())}removeNodeArrayOrObservable(e){for(let t of e){if(t instanceof n){t.dispose();continue}let r=t;delete r[St],this.detachAndDispose(r);let i=this.subscriptionsForNode.get(r);i&&(i.forEach(s=>s.dispose()),this.subscriptionsForNode.delete(r))}}detachAndDispose(e){if(io(e))for(let t of e)this.detachAndDispose(t);else e.remove();no(e)}},ze=ti;function ni(n){if(T(n))return!0;let e=d(n);return e?e.elementName?!0:!(!Array.isArray(e)||!e.length||e[0]instanceof window.Node):!1}function ri(n){return n[St]}function ii(n,e,...t){return n===Ln?t:{elementName:n,attributes:e||{},children:[...t]}}var Ln=Symbol("JSX Fragment");var qu=0,sn=class extends je{constructor(e){super(e),this.originalChildNodes=ae(y.childNodes(this.$element)),this.computed("computeApplyComponent")}cloneTemplateIntoElement(e,t,r){if(!t)throw new Error("Component '"+e+"' has no template");if(ni(t))y.emptyNode(r),this.addDisposable(new ze(t,r,null,void 0,!0));else{let i=ve(t);y.setDomNodeChildren(r,i)}}createViewModel(e,t,r,i){let s=e.createViewModel;return s?s.call(e,i,{element:t,templateNodes:r}):i}makeTemplateSlotNodes(e){return Object.assign({},...this.genSlotsByName(e))}*genSlotsByName(e){for(let t of e){if(t.nodeType!==Node.ELEMENT_NODE)continue;let r=t.getAttribute("slot");r&&(yield{[r]:t})}}computeApplyComponent(){let e=d(this.value),t,r;if(typeof e=="string"?t=e:(t=d(e.name),r=De.getNodeValues(this.$element)||d(e.params)),this.latestComponentName=t,!t)throw new Error("No component name specified");this.loadingOperationId=this.currentLoadingOperationId=++qu,Ke.get(t,i=>this.applyComponentDefinition(t,r,i))}makeChildBindingContext(e){let t=r=>Object.assign(r,{$component:e,$componentTemplateNodes:this.originalChildNodes,$componentTemplateSlotNodes:this.makeTemplateSlotNodes(this.originalChildNodes)});return this.$context.createChildContext(e,void 0,t)}applyComponentDefinition(e,t,r){if(this.currentLoadingOperationId!==this.loadingOperationId||this.latestComponentName!==e)return;this.cleanUpState();let i=this.$element;if(!r)throw new Error("Unknown component '"+e+"'");r.template&&this.cloneTemplateIntoElement(e,r.template,i);let s=this.createViewModel(r,i,this.originalChildNodes,t);this.childBindingContext=this.makeChildBindingContext(s);let o=s&&s.template;if(!o&&!r.template)throw new Error("Component '"+e+"' has no template");r.template||this.cloneTemplateIntoElement(e,o,i),s instanceof X&&s.anchorTo(this.$element),this.currentViewModel=s;let u=this.onBindingComplete.bind(this,s);this.applyBindingsToDescendants(this.childBindingContext,u)}onBindingComplete(e,t){e&&e.koDescendantsComplete&&e.koDescendantsComplete(this.$element),this.completeBinding(t)}cleanUpState(){let e=this.currentViewModel,t=e&&e.dispose;typeof t=="function"&&t.call(e),this.currentViewModel=null,this.currentLoadingOperationId=null}dispose(){this.cleanUpState(),super.dispose()}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};var on=class extends je{constructor(e){super(e);let t=this.getSlot(this.value),r=Ne(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);y.emptyNode(e),this.addDisposable(new ze(r,e,void 0,void 0,!0))}cloneNodeFromOriginal(e){if(!e)return[];let t=ri(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 so={component:sn,slot:on};var $n=String.prototype,oo={uppercase:function(n){return $n.toUpperCase.call(d(n))},lowercase:function(n){return $n.toLowerCase.call(d(n))},default:function(n,e){return n=d(n),typeof n=="function"?n:typeof n=="string"?$n.trim.call(n)===""?e:n:n==null||n.length==0?e:n},replace:function(n,e,t){return $n.replace.call(d(n),e,t)},fit:function(n,e,t,r){if(n=d(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(ft(n),t,e)},number:function(n){return(+d(n)).toLocaleString()}};gr("==",(n,e)=>n===e);gr("!=",(n,e)=>n!==e);var Ju=new qt({filters:oo,extenders:{},options:{},provider:new Bt({providers:[new Ft,new De,new Nt,new Tt,new vt,new Ct,new wt]}),bindings:[eo,_s,to,Xr,so,{each:Xr.foreach}]}),Gu="4.0.0-beta1.8",zu=Ju.create({jsx:{createElement:ii,Fragment:Ln,render(n){let e=document.createDocumentFragment(),t=new ze(n,e);return{node:e.childNodes.length===1?e.firstChild:e,dispose:()=>t.dispose()}}},components:Ke,version:Gu,Component:Ke.ComponentABC});return fo(Yu);})();
17
15
  (typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global).tko = tko.default