@flarehr/superhero-super-selection 3.47.58708 → 3.50.59382
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 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e,n,t,r,o,i,u,s={},l=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(e,n){for(var t in n)e[t]=n[t];return e}function f(e){var n=e.parentNode;n&&n.removeChild(e)}function d(n,t,r){var o,i,u,s={};for(u in t)"key"==u?o=t[u]:"ref"==u?i=t[u]:s[u]=t[u];if(arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof n&&null!=n.defaultProps)for(u in n.defaultProps)void 0===s[u]&&(s[u]=n.defaultProps[u]);return h(n,s,o,i,null)}function h(e,r,o,i,u){var s={type:e,props:r,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==u?++t:u};return null==u&&null!=n.vnode&&n.vnode(s),s}function p(e){return e.children}function _(e,n){this.props=e,this.context=n}function m(e,n){if(null==n)return e.__?m(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?m(e):null}function g(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return g(e)}}function w(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!y.__r++||i!==n.debounceRendering)&&((i=n.debounceRendering)||o)(y)}function y(){for(var e;y.__r=r.length;)e=r.sort((function(e,n){return e.__v.__b-n.__v.__b})),r=[],e.some((function(e){var n,t,r,o,i,u;e.__d&&(i=(o=(n=e).__v).__e,(u=n.__P)&&(t=[],(r=a({},o)).__v=o.__v+1,T(u,o,r,n.__n,void 0!==u.ownerSVGElement,null!=o.__h?[i]:null,t,null==i?m(o):i,o.__h),O(t,o),o.__e!=i&&g(o)))}))}function v(e,n,t,r,o,i,u,c,a,f){var d,_,g,w,y,v,b,E=r&&r.__k||l,x=E.length;for(t.__k=[],d=0;d<n.length;d++)if(null!=(w=t.__k[d]=null==(w=n[d])||"boolean"==typeof w?null:"string"==typeof w||"number"==typeof w||"bigint"==typeof w?h(null,w,null,null,w):Array.isArray(w)?h(p,{children:w},null,null,null):w.__b>0?h(w.type,w.props,w.key,null,w.__v):w)){if(w.__=t,w.__b=t.__b+1,null===(g=E[d])||g&&w.key==g.key&&w.type===g.type)E[d]=void 0;else for(_=0;_<x;_++){if((g=E[_])&&w.key==g.key&&w.type===g.type){E[_]=void 0;break}g=null}T(e,w,g=g||s,o,i,u,c,a,f),y=w.__e,(_=w.ref)&&g.ref!=_&&(b||(b=[]),g.ref&&b.push(g.ref,null,w),b.push(_,w.__c||y,w)),null!=y?(null==v&&(v=y),"function"==typeof w.type&&w.__k===g.__k?w.__d=a=C(w,a,e):a=S(e,w,g,E,y,a),"function"==typeof t.type&&(t.__d=a)):a&&g.__e==a&&a.parentNode!=e&&(a=m(g))}for(t.__e=v,d=x;d--;)null!=E[d]&&("function"==typeof t.type&&null!=E[d].__e&&E[d].__e==t.__d&&(t.__d=m(r,d+1)),M(E[d],E[d]));if(b)for(d=0;d<b.length;d++)A(b[d],b[++d],b[++d])}function C(e,n,t){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,n="function"==typeof r.type?C(r,n,t):S(t,r,r,o,r.__e,n));return n}function b(e,n){return n=n||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){b(e,n)})):n.push(e)),n}function S(e,n,t,r,o,i){var u,s,l;if(void 0!==n.__d)u=n.__d,n.__d=void 0;else if(null==t||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),u=null;else{for(s=i,l=0;(s=s.nextSibling)&&l<r.length;l+=2)if(s==o)break e;e.insertBefore(o,i),u=i}return void 0!==u?u:o.nextSibling}function E(e,n,t){"-"===n[0]?e.setProperty(n,t):e[n]=null==t?"":"number"!=typeof t||c.test(n)?t:t+"px"}function x(e,n,t,r,o){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(n in r)t&&n in t||E(e.style,n,"");if(t)for(n in t)r&&t[n]===r[n]||E(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?r||e.addEventListener(n,i?I:k,i):e.removeEventListener(n,i?I:k,i);else if("dangerouslySetInnerHTML"!==n){if(o)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null!=t&&(!1!==t||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,t):e.removeAttribute(n))}}function k(e){this.l[e.type+!1](n.event?n.event(e):e)}function I(e){this.l[e.type+!0](n.event?n.event(e):e)}function T(e,t,r,o,i,u,s,l,c){var f,d,h,m,g,w,y,C,b,S,E,x=t.type;if(void 0!==t.constructor)return null;null!=r.__h&&(c=r.__h,l=t.__e=r.__e,t.__h=null,u=[l]),(f=n.__b)&&f(t);try{e:if("function"==typeof x){if(C=t.props,b=(f=x.contextType)&&o[f.__c],S=f?b?b.props.value:f.__:o,r.__c?y=(d=t.__c=r.__c).__=d.__E:("prototype"in x&&x.prototype.render?t.__c=d=new x(C,S):(t.__c=d=new _(C,S),d.constructor=x,d.render=P),b&&b.sub(d),d.props=C,d.state||(d.state={}),d.context=S,d.__n=o,h=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=x.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=a({},d.__s)),a(d.__s,x.getDerivedStateFromProps(C,d.__s))),m=d.props,g=d.state,h)null==x.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==x.getDerivedStateFromProps&&C!==m&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(C,S),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(C,d.__s,S)||t.__v===r.__v){d.props=C,d.state=d.__s,t.__v!==r.__v&&(d.__d=!1),d.__v=t,t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(C,d.__s,S),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(m,g,w)}))}d.context=S,d.props=C,d.state=d.__s,(f=n.__r)&&f(t),d.__d=!1,d.__v=t,d.__P=e,f=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(o=a(a({},o),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(w=d.getSnapshotBeforeUpdate(m,g)),E=null!=f&&f.type===p&&null==f.key?f.props.children:f,v(e,Array.isArray(E)?E:[E],t,r,o,i,u,s,l,c),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),y&&(d.__E=d.__=null),d.__e=!1}else null==u&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=N(r.__e,t,r,o,i,u,s,c);(f=n.diffed)&&f(t)}catch(e){t.__v=null,(c||null!=u)&&(t.__e=l,t.__h=!!c,u[u.indexOf(l)]=null),n.__e(e,t,r)}}function O(e,t){n.__c&&n.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){n.__e(e,t.__v)}}))}function N(n,t,r,o,i,u,l,c){var a,d,h,p=r.props,_=t.props,g=t.type,w=0;if("svg"===g&&(i=!0),null!=u)for(;w<u.length;w++)if((a=u[w])&&"setAttribute"in a==!!g&&(g?a.localName===g:3===a.nodeType)){n=a,u[w]=null;break}if(null==n){if(null===g)return document.createTextNode(_);n=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,_.is&&_),u=null,c=!1}if(null===g)p===_||c&&n.data===_||(n.data=_);else{if(u=u&&e.call(n.childNodes),d=(p=r.props||s).dangerouslySetInnerHTML,h=_.dangerouslySetInnerHTML,!c){if(null!=u)for(p={},w=0;w<n.attributes.length;w++)p[n.attributes[w].name]=n.attributes[w].value;(h||d)&&(h&&(d&&h.__html==d.__html||h.__html===n.innerHTML)||(n.innerHTML=h&&h.__html||""))}if(function(e,n,t,r,o){var i;for(i in t)"children"===i||"key"===i||i in n||x(e,i,null,t[i],r);for(i in n)o&&"function"!=typeof n[i]||"children"===i||"key"===i||"value"===i||"checked"===i||t[i]===n[i]||x(e,i,n[i],t[i],r)}(n,_,p,i,c),h)t.__k=[];else if(w=t.props.children,v(n,Array.isArray(w)?w:[w],t,r,o,i&&"foreignObject"!==g,u,l,u?u[0]:r.__k&&m(r,0),c),null!=u)for(w=u.length;w--;)null!=u[w]&&f(u[w]);c||("value"in _&&void 0!==(w=_.value)&&(w!==n.value||"progress"===g&&!w||"option"===g&&w!==p.value)&&x(n,"value",w,p.value,!1),"checked"in _&&void 0!==(w=_.checked)&&w!==n.checked&&x(n,"checked",w,p.checked,!1))}return n}function A(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(e){n.__e(e,r)}}function M(e,t,r){var o,i;if(n.unmount&&n.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||A(o,null,t)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){n.__e(e,t)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&M(o[i],t,"function"!=typeof e.type);r||null==e.__e||f(e.__e),e.__e=e.__d=void 0}function P(e,n,t){return this.constructor(e,t)}function D(t,r,o){var i,u,l;n.__&&n.__(t,r),u=(i="function"==typeof o)?null:o&&o.__k||r.__k,l=[],T(r,t=(!i&&o||r).__k=d(p,null,[t]),u||s,s,void 0!==r.ownerSVGElement,!i&&o?[o]:u?null:r.firstChild?e.call(r.childNodes):null,l,!i&&o?o:u?u.__e:r.firstChild,i),O(l,t)}function F(e,n){D(e,n,F)}function R(n,t,r){var o,i,u,s=a({},n.props);for(u in t)"key"==u?o=t[u]:"ref"==u?i=t[u]:s[u]=t[u];return arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):r),h(n.type,s,o||n.key,i||n.ref,null)}function U(){return(U=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function G(e){this.getChildContext=function(){return e.context};var n=e.children,t=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n.indexOf(t=i[r])>=0||(o[t]=e[t]);return o}(e,["context","children"]);return R(n,t)}function H(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=d(G,U({},this._props,{context:e.detail.context}),function e(n,t){if(3===n.nodeType)return n.data;if(1!==n.nodeType)return null;var r=[],o={},i=0,u=n.attributes,s=n.childNodes;for(i=u.length;i--;)"slot"!==u[i].name&&(o[u[i].name]=u[i].value,o[j(u[i].name)]=u[i].value);for(i=s.length;i--;){var l=e(s[i],null),c=s[i].slot;c?o[c]=d(B,{name:c},l):r[i]=l}var a=t?d(B,null,r):r;return d(t||n.nodeName.toLowerCase(),o,a)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?F:D)(this._vdom,this._root)}function j(e){return e.replace(/-(\w)/g,(function(e,n){return n?n.toUpperCase():""}))}function L(e,n,t){if(this._vdom){var r={};r[e]=t=null==t?void 0:t,r[j(e)]=t,this._vdom=R(this._vdom,r),D(this._vdom,this._root)}}function $(){D(this._vdom=null,this._root)}function B(e,n){var t=this;return d("slot",U({},e,{ref:function(e){e?(t.ref=e,t._listener||(t._listener=function(e){e.stopPropagation(),e.detail.context=n},e.addEventListener("_preact",t._listener))):t.ref.removeEventListener("_preact",t._listener)}}))}function W(e,n){!function(e,n,t,r){function o(){var n=Reflect.construct(HTMLElement,[],o);return n._vdomComponent=e,n._root=n,n}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=H,o.prototype.attributeChangedCallback=L,o.prototype.disconnectedCallback=$,t=t||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=t,t.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(n){this._vdom?this.attributeChangedCallback(e,null,n):(this._props||(this._props={}),this._props[e]=n,this.connectedCallback());var t=typeof n;null!=n&&"string"!==t&&"boolean"!==t&&"number"!==t||this.setAttribute(e,n)}})})),customElements.define(n||e.tagName||e.displayName||e.name,o)}(e,n)}e=l.slice,n={__e:function(e,n){for(var t,r,o;n=n.__;)if((t=n.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(e)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(e),o=t.__d),o)return t.__E=t}catch(n){e=n}throw e}},t=0,_.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),"function"==typeof e&&(e=e(a({},t),this.props)),e&&a(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),w(this))},_.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),w(this))},_.prototype.render=p,r=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,y.__r=0,u=0;var q,z,V,Z=0,J=[],Y=n.__b,X=n.__r,K=n.diffed,Q=n.__c,ee=n.unmount;function ne(e,t){n.__h&&n.__h(z,e,Z||t),Z=0;var r=z.__H||(z.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function te(e,n,t){var r=ne(q++,2);return r.t=e,r.__c||(r.__=[t?t(n):fe(void 0,n),function(e){var n=r.t(r.__[0],e);r.__[0]!==n&&(r.__=[n,r.__[1]],r.__c.setState({}))}],r.__c=z),r.__}function re(e,t){var r=ne(q++,3);!n.__s&&ae(r.__H,t)&&(r.__=e,r.__H=t,z.__H.__h.push(r))}function oe(e,t){var r=ne(q++,4);!n.__s&&ae(r.__H,t)&&(r.__=e,r.__H=t,z.__h.push(r))}function ie(e,n){var t=ne(q++,7);return ae(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function ue(){for(var e;e=J.shift();)if(e.__P)try{e.__H.__h.forEach(le),e.__H.__h.forEach(ce),e.__H.__h=[]}catch(t){e.__H.__h=[],n.__e(t,e.__v)}}n.__b=function(e){z=null,Y&&Y(e)},n.__r=function(e){X&&X(e),q=0;var n=(z=e.__c).__H;n&&(n.__h.forEach(le),n.__h.forEach(ce),n.__h=[])},n.diffed=function(e){K&&K(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==J.push(t)&&V===n.requestAnimationFrame||((V=n.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(r),se&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,100);se&&(n=requestAnimationFrame(t))})(ue)),z=null},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(le),e.__h=e.__h.filter((function(e){return!e.__||ce(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(r,e.__v)}})),Q&&Q(e,t)},n.unmount=function(e){ee&&ee(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{le(e)}catch(e){t=e}})),t&&n.__e(t,r.__v))};var se="function"==typeof requestAnimationFrame;function le(e){var n=z,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),z=n}function ce(e){var n=z;e.__c=e.__(),z=n}function ae(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function fe(e,n){return"function"==typeof n?n(e):n}function de(e,n){for(var t in n)e[t]=n[t];return e}function he(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var r in n)if("__source"!==r&&e[r]!==n[r])return!0;return!1}function pe(e){this.props=e}(pe.prototype=new _).isPureReactComponent=!0,pe.prototype.shouldComponentUpdate=function(e,n){return he(this.props,e)||he(this.state,n)};var _e=n.__b;n.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),_e&&_e(e)};var me="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,ge=function(e,n){return null==e?null:b(b(e).map(n))},we={map:ge,forEach:ge,count:function(e){return e?b(e).length:0},only:function(e){var n=b(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:b},ye=n.__e;n.__e=function(e,n,t){if(e.then)for(var r,o=n;o=o.__;)if((r=o.__c)&&r.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),r.__c(e,n);ye(e,n,t)};var ve=n.unmount;function Ce(){this.__u=0,this.t=null,this.__b=null}function be(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function Se(){this.u=null,this.o=null}n.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&!0===e.__h&&(e.type=null),ve&&ve(e)},(Ce.prototype=new _).__c=function(e,n){var t=n.__c,r=this;null==r.t&&(r.t=[]),r.t.push(t);var o=be(r.__v),i=!1,u=function(){i||(i=!0,t.__R=null,o?o(s):s())};t.__R=u;var s=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(n,t,r){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map((function(n){return e(n,t,r)})),n.__c&&n.__c.__P===t&&(n.__e&&r.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=r)),n}(e,e.__c.__P,e.__c.__O)}var n;for(r.setState({__e:r.__b=null});n=r.t.pop();)n.forceUpdate()}},l=!0===n.__h;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(u,u)},Ce.prototype.componentWillUnmount=function(){this.t=[]},Ce.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(n,t,r){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),n.__c.__H=null),null!=(n=de({},n)).__c&&(n.__c.__P===r&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map((function(n){return e(n,t,r)}))),n}(this.__b,t,r.__O=r.__P)}this.__b=null}var o=n.__e&&d(p,null,e.fallback);return o&&(o.__h=null),[d(p,null,n.__e?null:e.children),o]};var Ee=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.u=t=t[2]}};function xe(e){return this.getChildContext=function(){return e.context},e.children}function ke(e){var n=this,t=e.i;n.componentWillUnmount=function(){D(null,n.l),n.l=null,n.i=null},n.i&&n.i!==t&&n.componentWillUnmount(),e.__v?(n.l||(n.i=t,n.l={nodeType:1,parentNode:t,childNodes:[],appendChild:function(e){this.childNodes.push(e),n.i.appendChild(e)},insertBefore:function(e,t){this.childNodes.push(e),n.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),n.i.removeChild(e)}}),D(d(xe,{context:n.context},e.__v),n.l)):n.l&&n.componentWillUnmount()}(Se.prototype=new _).__e=function(e){var n=this,t=be(n.__v),r=n.o.get(e);return r[0]++,function(o){var i=function(){n.props.revealOrder?(r.push(o),Ee(n,e,r)):o()};t?t(i):i()}},Se.prototype.render=function(e){this.u=null,this.o=new Map;var n=b(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var t=n.length;t--;)this.o.set(n[t],this.u=[1,0,this.u]);return e.children},Se.prototype.componentDidUpdate=Se.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(n,t){Ee(e,t,n)}))};var Ie="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Te=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Oe="undefined"!=typeof document,Ne=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};_.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(_.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})}));var Ae=n.event;function Me(){}function Pe(){return this.cancelBubble}function De(){return this.defaultPrevented}n.event=function(e){return Ae&&(e=Ae(e)),e.persist=Me,e.isPropagationStopped=Pe,e.isDefaultPrevented=De,e.nativeEvent=e};var Fe,Re={configurable:!0,get:function(){return this.class}},Ue=n.vnode;n.vnode=function(e){var n=e.type,t=e.props,r=t;if("string"==typeof n){var o=-1===n.indexOf("-");for(var i in r={},t){var u=t[i];Oe&&"children"===i&&"noscript"===n||"value"===i&&"defaultValue"in t&&null==u||("defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===u?u="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+n)&&!Ne(t.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&Te.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===u&&(u=void 0),r[i]=u)}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=b(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=b(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,t.class!=t.className&&(Re.enumerable="className"in t,null!=t.className&&(r.class=t.className),Object.defineProperty(r,"className",Re))}e.$$typeof=Ie,Ue&&Ue(e)};var Ge=n.__r;n.__r=function(e){Ge&&Ge(e),Fe=e.__c};var He={ReactCurrentDispatcher:{current:{readContext:function(e){return Fe.__n[e.__c].props.value}}}};function je(e){return!!e&&e.$$typeof===Ie}const Le={useState:function(e){return Z=1,te(fe,e)},useReducer:te,useEffect:re,useLayoutEffect:oe,useRef:function(e){return Z=5,ie((function(){return{current:e}}),[])},useImperativeHandle:function(e,n,t){Z=6,oe((function(){"function"==typeof e?e(n()):e&&(e.current=n())}),null==t?t:t.concat(e))},useMemo:ie,useCallback:function(e,n){return Z=8,ie((function(){return e}),n)},useContext:function(e){var n=z.context[e.__c],t=ne(q++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(z)),n.props.value):e.__},useDebugValue:function(e,t){n.useDebugValue&&n.useDebugValue(t?t(e):e)},version:"17.0.2",Children:we,render:function(e,n,t){return null==n.__k&&(n.textContent=""),D(e,n),"function"==typeof t&&t(),e?e.__c:null},hydrate:function(e,n,t){return F(e,n),"function"==typeof t&&t(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(D(null,e),!0)},createPortal:function(e,n){return d(ke,{__v:e,i:n})},createElement:d,createContext:function(e,n){var t={__c:n="__cC"+u++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,r;return this.getChildContext||(t=[],(r={})[n]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some(w)},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t},createFactory:function(e){return d.bind(null,e)},cloneElement:function(e){return je(e)?R.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:p,isValidElement:je,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:_,PureComponent:pe,memo:function(e,n){function t(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!r:he(this.props,e)}function r(n){return this.shouldComponentUpdate=t,d(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:function(e){function n(n,t){var r=de({},n);return delete r.ref,e(r,(t=n.ref||t)&&("object"!=typeof t||"current"in t)?t:null)}return n.$$typeof=me,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n},flushSync:function(e,n){return e(n)},unstable_batchedUpdates:function(e,n){return e(n)},StrictMode:p,Suspense:Ce,SuspenseList:Se,lazy:function(e){var n,t,r;function o(o){if(n||(n=e()).then((function(e){t=e.default||e}),(function(e){r=e})),r)throw r;if(!t)throw n;return d(t,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:He};function $e(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function Be(e){return null!=e&&"function"==typeof e.Dispose}function We(e){Be(e)&&e.Dispose()}function qe(e,n){return Object.getPrototypeOf(e).constructor===Object.getPrototypeOf(n).constructor}class ze{constructor(e){this.iter=e}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this.iter.next();return this.current=e.value,!e.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function Ve(e){return"function"==typeof e.GetEnumerator?e.GetEnumerator():new ze(e[Symbol.iterator]())}function Ze(e){return{[Symbol.iterator](){return this},next(){const n=e["System.Collections.IEnumerator.MoveNext"]();return{done:!n,value:n?e["System.Collections.IEnumerator.get_Current"]():void 0}}}}function Je(e,n){let t=e.toString(10);for(;t.length<n;)t="0"+t;return t}function Ye(e){const n=e;return"number"==typeof n.offset?n.offset:1===e.kind?0:-6e4*e.getTimezoneOffset()}function Xe(e,n){return(e=e<0&&null!=n&&10!==n?4294967295+e+1:e).toString(n)}class Ke{static id(e){return Ke.idMap.has(e)||Ke.idMap.set(e,++Ke.count),Ke.idMap.get(e)}}function Qe(e){let n=0,t=5381;const r=e.length;for(;n<r;)t=33*t^e.charCodeAt(n++);return t}function en(e){return 2654435761*e|0}function nn(e){return 0===e.length?0:e.reduce(((e,n)=>(e<<5)+e^n))}function tn(e){if(null==e)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return en(e);case"string":return Qe(e);default:if(function(e){return"function"==typeof e.GetHashCode}(e))return e.GetHashCode();if($e(e))return function(e){const n=e.length,t=new Array(n);for(let r=0;r<n;r++)t[r]=tn(e[r]);return nn(t)}(e);if(e instanceof Date)return function(e){return e.getTime()}(e);if(Object.getPrototypeOf(e).constructor===Object){const n=Object.values(e).map((e=>tn(e)));return nn(n)}return en(Ke.id(e))}}function rn(e,n,t){if(null==e)return null==n;if(null==n)return!1;if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1;return!0}function on(e,n){return rn(e,n,un)}function un(e,n){return e===n||(null==e?null==n:null!=n&&"object"==typeof e&&(function(e){return"function"==typeof e.Equals}(e)?e.Equals(n):$e(e)?$e(n)&&on(e,n):e instanceof Date?n instanceof Date&&0===sn(e,n):Object.getPrototypeOf(e).constructor===Object&&function(e,n){const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;t.sort(),r.sort();for(let o=0;o<t.length;o++)if(t[o]!==r[o]||!un(e[t[o]],n[r[o]]))return!1;return!0}(e,n)))}function sn(e,n){let t,r;return"offset"in e&&"offset"in n?(t=e.getTime(),r=n.getTime()):(t=e.getTime()+Ye(e),r=n.getTime()+Ye(n)),t===r?0:t<r?-1:1}function ln(e,n){return e===n?0:e<n?-1:1}function cn(e,n){return function(e,n,t){if(null==e)return null==n?0:1;if(null==n)return-1;if(e.length!==n.length)return e.length<n.length?-1:1;for(let r=0,o=0;r<e.length;r++)if(o=t(e[r],n[r]),0!==o)return o;return 0}(e,n,an)}function an(e,n){return e===n?0:null==e?null==n?0:-1:null==n?1:"object"!=typeof e?e<n?-1:1:function(e){return"function"==typeof e.CompareTo}(e)?e.CompareTo(n):$e(e)?$e(n)?cn(e,n):-1:e instanceof Date?n instanceof Date?sn(e,n):-1:Object.getPrototypeOf(e).constructor===Object?function(e,n){const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return t.length<r.length?-1:1;t.sort(),r.sort();for(let o=0,i=0;o<t.length;o++){const u=t[o];if(u!==r[o])return u<r[o]?-1:1;if(i=an(e[u],n[u]),0!==i)return i}return 0}(e,n):-1}function fn(e,n,t){return e(n,t)>0?n:t}function dn(e){const n={};for(const t of e)n[t[0]]=t[1];return n}Ke.idMap=new WeakMap,Ke.count=0;const hn=Symbol("curried");function pn(e,n){if(null==n||n.length>1)return n;const t=(...t)=>{let r=n;for(let n=0;n<e;n++)r=r(t[n]);return r};return t[hn]=n,t}function _n(e,n,t){return r=>1===n?t(...e.concat([r])):_n(e.concat([r]),n-1,t)}function mn(e,n=0){if(null!=e&&"object"==typeof e){if("function"==typeof e.toString)return e.toString();if(Symbol.iterator in e)return function(e){let n=0,t="[";for(const r of e){if(0===n)t+=mn(r);else{if(100===n){t+="; ...";break}t+="; "+mn(r)}n++}return t+"]"}(e);{const t=Object.getPrototypeOf(e).constructor;return t===Object&&n<10?"{ "+Object.entries(e).map((([e,t])=>e+" = "+mn(t,n+1))).join("\n ")+" }":t.name}}return String(e)}class gn{get name(){return this.cases()[this.tag]}toJSON(){return 0===this.fields.length?this.name:[this.name].concat(this.fields)}toString(){return function(e,n){if(0===n.length)return e;{let t="",r=!0;return 1===n.length?(t=mn(n[0]),r=t.indexOf(" ")>=0):t=n.map((e=>mn(e))).join(", "),e+(r?" (":" ")+t+(r?")":"")}}(this.name,this.fields)}GetHashCode(){const e=this.fields.map((e=>tn(e)));return e.splice(0,0,en(this.tag)),nn(e)}Equals(e){return this===e||!!qe(this,e)&&this.tag===e.tag&&on(this.fields,e.fields)}CompareTo(e){return this===e?0:qe(this,e)?this.tag===e.tag?cn(this.fields,e.fields):this.tag<e.tag?-1:1:-1}}class wn{toJSON(){return function(e){const n={},t=Object.keys(e);for(let r=0;r<t.length;r++)n[t[r]]=e[t[r]];return n}(this)}toString(){return e=this,"{ "+Object.entries(e).map((([e,n])=>e+" = "+mn(n))).join("\n ")+" }";var e}GetHashCode(){return function(e){const n=Object.values(e).map((e=>tn(e)));return nn(n)}(this)}Equals(e){return function(e,n){if(e===n)return!0;if(qe(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++)if(!un(e[t[r]],n[t[r]]))return!1;return!0}return!1}(this,e)}CompareTo(e){return function(e,n){if(e===n)return 0;if(qe(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++){const o=an(e[t[r]],n[t[r]]);if(0!==o)return o}return 0}return-1}(this,e)}}class yn{constructor(e,n){"function"==typeof n?(this.getter=e,this.setter=n):(this.getter=()=>e,this.setter=n=>{e=n})}get contents(){return this.getter()}set contents(e){this.setter(e)}}class vn{constructor(e){this.value=e}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return tn(this.value)}Equals(e){return null!=e&&un(this.value,e instanceof vn?e.value:e)}CompareTo(e){return null==e?1:an(this.value,e instanceof vn?e.value:e)}}function Cn(e){return null==e||e instanceof vn?new vn(e):e}function bn(e){if(null==e)throw new Error("Option has no value");return e instanceof vn?e.value:e}function Sn(e,n){return null!=e?bn(e):n}function En(){return e=an,{Compare:(n,t)=>e(n,t)};var e}function xn(e,n){return"function"==typeof e?new e(n):new Array(n)}function kn(e,n,t,r){const o=0|n;return e.fill(r,o,o+t)}function In(e,n,t){const r=0|n.length,o=xn(t,r);for(let t=0;t<=r-1;t++)o[t]=e(n[t]);return o}function Tn(e,n,t){return t.reduce(e,n)}function On(e,n,t){if(null==n)return null==t;if(null==t)return!1;{let r=0,o=!0;const i=0|n.length,u=0|t.length;if(i>u)return!1;if(i<u)return!1;for(;r<i&&o;)o=e(n[r],t[r]),r=r+1|0;return o}}function Nn(e,n,t,r){return function(e,n,t,r){let o=r;n.length!==t.length&&function(){throw new Error("Arrays had different lengths")}();const i=0|n.length;for(let r=1;r<=i;r++)o=e(0,n[i-r],t[i-r],o);return o}(((n,t,r,o)=>e(t,r,o)),n,t,r)}function An(e){const n=e<0,t=(e=Math.abs(e))%36e5/6e4;return(n?"-":"+")+Je(~~(e/36e5),2)+":"+Je(t,2)}function Mn(e,n){const t=e.toISOString();return"first"===n?t.substring(0,t.indexOf("T")):t.substring(t.indexOf("T")+1,t.length-1)}function Pn(e,n,t){return n.replace(/(\w)\1*/g,(n=>{let r=Number.NaN;switch(n.substring(0,1)){case"y":const o=t?e.getUTCFullYear():e.getFullYear();r=n.length<4?o%100:o;break;case"M":r=(t?e.getUTCMonth():e.getMonth())+1;break;case"d":r=t?e.getUTCDate():e.getDate();break;case"H":r=t?e.getUTCHours():e.getHours();break;case"h":const i=t?e.getUTCHours():e.getHours();r=i>12?i%12:i;break;case"m":r=t?e.getUTCMinutes():e.getMinutes();break;case"s":r=t?e.getUTCSeconds():e.getSeconds();break;case"f":r=t?e.getUTCMilliseconds():e.getMilliseconds()}return Number.isNaN(r)?n:r<10&&n.length>1?"0"+r:""+r}))}function Dn(e,n,t){return null!=e.offset?function(e,n){var t,r,o;const i=new Date(e.getTime()+(null!==(t=e.offset)&&void 0!==t?t:0));if("string"!=typeof n)return i.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+An(null!==(r=e.offset)&&void 0!==r?r:0);if(1!==n.length)return Pn(i,n,!0);switch(n){case"D":case"d":return Mn(i,"first");case"T":case"t":return Mn(i,"second");case"O":case"o":return function(e,n){const t=e.toISOString();return t.substring(0,t.length-1)+An(n)}(i,null!==(o=e.offset)&&void 0!==o?o:0);default:throw new Error("Unrecognized Date print format")}}(e,n):function(e,n){const t=1===e.kind;if("string"!=typeof n)return t?e.toUTCString():e.toLocaleString();if(1!==n.length)return Pn(e,n,t);switch(n){case"D":case"d":return t?Mn(e,"first"):e.toLocaleDateString();case"T":case"t":return t?Mn(e,"second"):e.toLocaleTimeString();case"O":case"o":return function(e,n){if(n)return e.toISOString();{const n=null==e.kind||2===e.kind;return Je(e.getFullYear(),4)+"-"+Je(e.getMonth()+1,2)+"-"+Je(e.getDate(),2)+"T"+Je(e.getHours(),2)+":"+Je(e.getMinutes(),2)+":"+Je(e.getSeconds(),2)+"."+Je(e.getMilliseconds(),3)+(n?An(-6e4*e.getTimezoneOffset()):"")}}(e,t);default:throw new Error("Unrecognized Date print format")}}(e,n)}function Fn(e,n){const t=new Date(e);return t.kind=0|(null==n?0:n),t}function Rn(e){function n(){throw new Error(`The string is not a valid Date: ${e}`)}null!=e&&""!==e.trim()||n(),10===e.length&&"-"===e[4]&&"-"===e[7]&&(e+="T00:00:00");let t=new Date(e),r=null;if(isNaN(t.getTime())){const o=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(e);if(null!=o){let e,n=0;if(null!=o[2]){const e=o[2].split(":");n=3600*parseInt(e[0],10)+60*parseInt(e[1]||"0",10)+parseFloat(e[2]||"0"),null!=o[3]&&"PM"===o[3].toUpperCase()&&(n+=720)}if(null!=o[4]){if(null!=o[1])e=new Date(o[1]+" UTC");else{const n=new Date;e=new Date(n.getUTCFullYear()+"/"+(n.getUTCMonth()+1)+"/"+n.getUTCDate())}if("Z"===o[4])r="Z";else{let e=60*parseInt(o[5],10)+parseInt(o[6]||"0",10);"-"===o[4][0]&&(e*=-1),r=e,n-=60*e}}else if(null!=o[1])e=new Date(o[1]);else{const n=new Date;e=new Date(n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate())}t=new Date(e.getTime()+1e3*n),t=new Date(t.getTime()+6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))}else n();isNaN(t.getTime())&&n()}return[t,r]}function Un(e,n){try{return n.contents=function(e,n=!1){const[t,r]=Rn(e),o=null!=r?n&&"Z"===r?1:2:0;return Fn(t.getTime(),o)}(e),!0}catch(e){return!1}}const Gn=Symbol("numeric");function Hn(e){return"number"==typeof e||(null==e?void 0:e[Gn])}function jn(e,n){return"number"==typeof e?e*n:e[Gn]().multiply(n)}function Ln(e,n){return"number"==typeof e?e.toFixed(n):e[Gn]().toFixed(n)}function $n(e,n){return"number"==typeof e?e.toPrecision(n):e[Gn]().toPrecision(n)}function Bn(e,n){return"number"==typeof e?e.toExponential(n):e[Gn]().toExponential(n)}function Wn(e){return"number"==typeof e?(Number(e)>>>0).toString(16):e[Gn]().toHex()}function qn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function zn(e,n,t=0){if(e.lastIndex=t,!e.global)throw new Error("Non-global RegExp");let r=e.exec(n);const o=[];for(;null!==r;)o.push(r),r=e.exec(n);return o}const Vn=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,Zn=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function Jn(e,n){return function(e,n){return"number"==typeof e?e<n?-1:e>n?1:0:e.CompareTo(n)}(e,n)<0}function Yn(e){return{input:e,cont:(n=e,e=>{Vn.lastIndex=0;const t=[],r=[];let o=0,i=Vn.exec(n);for(;i;){const e=i.index+(i[1]||"").length;t.push(n.substring(o,e).replace(/%%/g,"%")),r.push(i),o=Vn.lastIndex,Vn.lastIndex-=1,i=Vn.exec(n)}return 0===t.length?e(n.replace(/%%/g,"%")):(t.push(n.substring(o).replace(/%%/g,"%")),et(e,t,r))})};var n}function Xn(e,n){return"string"==typeof n?e(n):n.cont(e)}function Kn(e){return Xn((e=>e),e)}function Qn(e,n,t,r,o){let i="";if(n=n||"",o=o||"",Hn(e))switch("x"!==o.toLowerCase()&&(Jn(e,0)?(e=jn(e,-1),i="-"):n.indexOf(" ")>=0?i=" ":n.indexOf("+")>=0&&(i="+")),r=null==r?null:parseInt(r,10),o){case"f":case"F":e=Ln(e,r=null!=r?r:6);break;case"g":case"G":e=null!=r?$n(e,r):$n(e);break;case"e":case"E":e=null!=r?Bn(e,r):Bn(e);break;case"x":e=Wn(e);break;case"X":e=Wn(e).toUpperCase();break;default:e=String(e)}else e=e instanceof Date?Dn(e):mn(e);if(t="number"==typeof t?t:parseInt(t,10),isNaN(t))e=i+e;else{const r=n.indexOf("0")>=0,o=n.indexOf("-")>=0,u=o||!r?" ":"0";e="0"===u?i+(e=tt(e,t-i.length,u,o)):tt(i+e,t,u,o)}return e}function et(e,n,t,r="",o=-1){return(...i)=>{let u=r;const s=n.slice(),l=t.slice();for(const e of i){const[,,n,t,r,i]=l[0];let c=t;if(o>=0)c=o,o=-1;else if("*"===c){if(e<0)throw new Error("Non-negative number required");o=e;continue}u+=s[0],u+=Qn(e,n,c,r,i),s.splice(0,1),l.splice(0,1)}return 0===l.length?(u+=s[0],e(u)):et(e,s,l,u,o)}}function nt(e,n){return Array.isArray(n)?n.join(e):Array.from(n).join(e)}function tt(e,n,t,r){t=t||" ",n-=e.length;for(let o=0;o<n;o++)e=r?e+t:t+e;return e}function rt(e,n,t,r){if(r="number"==typeof r?r:0,(t="number"==typeof t?t:void 0)&&t<0)throw new Error("Count cannot be less than zero");if(0===t)return[];const o=1==(1&r),i=2==(2&r);n=(n=n||[]).filter((e=>e)).map(qn),n=n.length>0?n:["\\s"];const u=[],s=new RegExp(n.join("|"),"g");let l=!0,c=0;do{const n=s.exec(e);if(null===n){const n=i?e.substring(c).trim():e.substring(c);(!o||n.length>0)&&u.push(n),l=!1}else{const r=i?e.substring(c,n.index).trim():e.substring(c,n.index);(!o||r.length>0)&&(null!=t&&u.length+1===t?(u.push(i?e.substring(c).trim():e.substring(c)),l=!1):u.push(r)),c=s.lastIndex}}while(l);return u}function ot(e,n,t){if(n+(t||0)>e.length)throw new Error("Invalid startIndex and/or length");return null!=t?e.substr(n,t):e.substr(n)}class it extends wn{constructor(e,n){super(),this.head=e,this.tail=n}toString(){return"["+nt("; ",this)+"]"}Equals(e){return this===e||((e,n)=>{e:for(;;){const t=e,r=n,o=[t.tail,r.tail];if(null!=o[0]){if(null!=o[1]){const i=o[0],u=o[1];if(un(t.head,r.head)){e=i,n=u;continue e}return!1}return!1}return null==o[1]}})(this,e)}GetHashCode(){return 0|((e,n,t)=>{for(;;){const r=e,o=n,i=t,u=i.tail;if(null==u)return 0|o;{const s=u;if(r>18)return 0|o;e=r+1,n=(o<<1)+tn(i.head)+631*r,t=s}}})(0,0,this)}toJSON(e){return Array.from(this)}CompareTo(e){return 0|((e,n)=>{e:for(;;){const t=e,r=n,o=[t.tail,r.tail];if(null!=o[0]){if(null!=o[1]){const i=o[0],u=o[1],s=0|an(t.head,r.head);if(0===s){e=i,n=u;continue e}return 0|s}return 1}return null!=o[1]?-1:0}})(this,e)}GetEnumerator(){return new ut(this)}[Symbol.iterator](){return Ze(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Ve(this)}}class ut{constructor(e){this.xs=e,this.it=this.xs,this.current=null}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this,n=e.it.tail;if(null!=n){const t=n;return e.current=e.it.head,e.it=t,!0}return!1}"System.Collections.IEnumerator.Reset"(){const e=this;e.it=e.xs,e.current=null}Dispose(){}}function st(){return new it(null,void 0)}function lt(e,n){return new it(e,n)}function ct(e){return null==e.tail}function at(e){if(null!=e.tail)return e.head;throw new Error("Collection was empty.\\nParameter name: list")}function ft(e){const n=e.tail;if(null!=n)return n;throw new Error("Collection was empty.\\nParameter name: list")}function dt(){return st()}function ht(e,n){return lt(e,n)}function pt(e){return lt(e,st())}function _t(e){return ct(e)}function mt(e){return at(e)}function gt(e){return ft(e)}function wt(e){const n=0|function(e){return 0|((e,n)=>{for(;;){const t=e,r=n.tail;if(null==r)return 0|t;e=t+1,n=r}})(0,e)}(e),t=kn(new Array(n),0,n,null);return((e,n)=>{for(;;){const r=e,o=n;if(ct(o))break;t[r]=at(o),e=r+1,n=ft(o)}})(0,e),t}function yt(e,n,t){let r=n,o=t;for(;!ct(o);)r=e(r,at(o)),o=ft(o);return r}function vt(e){return yt(((e,n)=>lt(n,e)),st(),e)}function Ct(e,n){yt(((n,t)=>{e(t)}),void 0,n)}function bt(e,n){let t=n;for(let n=e.length-1;n>=0;n--)t=lt(e[n],t);return t}function St(e){return bt(e,st())}function Et(e,n){return yt(((e,n)=>lt(n,e)),n,vt(e))}function xt(e,n){const t=st(),r=yt(((n,t)=>{let r;return r=new it(e(t),void 0),n.tail=r,r}),t,n),o=st();return r.tail=o,ft(t)}const kt="The input sequence has an insufficient number of elements.";function It(){throw new Error("Enumeration has not started. Call MoveNext.")}function Tt(){throw new Error("Enumeration already finished.")}class Ot{constructor(e){this.f=e}toString(){let e=0,n="seq [";const t=Ve(this);try{for(;e<4&&t["System.Collections.IEnumerator.MoveNext"]();)e>0&&(n+="; "),n+=mn(t["System.Collections.Generic.IEnumerator`1.get_Current"]()),e=e+1|0;return 4===e&&(n+="; ..."),n+"]"}finally{We(t)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return Ze(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}class Nt{constructor(e,n,t){this.current=e,this.next=n,this.dispose=t}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){!function(){throw new Error("Reset is not supported on this enumerator.")}()}Dispose(){this.dispose()}}function At(e,n,t){return new Nt(e,n,t)}function Mt(e,n,t){let r,o=!1,i=Cn(e());const u=()=>{if(null!=i){const e=bn(i);try{t(e)}finally{i=void 0}}},s=()=>{try{u()}finally{r=void 0}};return At((()=>(o||It(),null!=r?bn(r):Tt())),(()=>{if(o||(o=!0),null!=i){const e=bn(i);let t;try{t=n(e)}catch(e){throw s(),e}return null!=t?(r=t,!0):(s(),!1)}return!1}),u)}function Pt(e){return function(e){return new Ot(e)}(e)}function Dt(e){return n="source",null==e&&function(e){throw new Error(e)}(n),Ve(e);var n}function Ft(e){return Pt((()=>Ve(e())))}function Rt(e){return Pt((()=>function(e){let n,t,r,o=!1,i=!1;const u=()=>{if(i=!0,null!=t){const e=t;try{We(e)}finally{t=void 0}}if(null!=n){const e=n;try{We(e)}finally{n=void 0}}};return At((()=>(o?i&&Tt():It(),null!=r?bn(r):Tt())),(()=>{let s;if(o||(o=!0),i)return!1;{let o;for(;null==o;){const i=[n,t];if(null!=i[0])if(null!=i[1]){const e=i[1];if(e["System.Collections.IEnumerator.MoveNext"]())r=Cn(e["System.Collections.Generic.IEnumerator`1.get_Current"]()),o=!0;else try{We(e)}finally{t=void 0}}else{const e=i[0];e["System.Collections.IEnumerator.MoveNext"]()?(s=e["System.Collections.Generic.IEnumerator`1.get_Current"](),t=Ve(s)):(u(),o=!1)}else n=Ve(e)}return bn(o)}}),(()=>{i||u()}))}(e)))}function Ut(e){return Ft((()=>function(e,n){const t=xn(void 0,1);return t[0]=e,t}(e)))}function Gt(e,n,t){return Pt((()=>{let r=-1;return Mt(e,(e=>(r=r+1|0,n(r,e))),t)}))}function Ht(e,n){return Rt([e,n])}function jt(e,n,t){const r=Dt(n);try{let n=!1;for(;!n&&r["System.Collections.IEnumerator.MoveNext"]();)n=t.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}finally{We(r)}}function Lt(e,n,t){const r=Dt(t);try{let t=n;for(;r["System.Collections.IEnumerator.MoveNext"]();)t=e(t,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}finally{We(r)}}function $t(e,n){Lt(((n,t)=>{e(t)}),void 0,n)}function Bt(e,n){return t=()=>Dt(n),r=n=>n["System.Collections.IEnumerator.MoveNext"]()?Cn(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,o=We,Pt((()=>Mt(t,r,o)));var t,r,o}function Wt(e,n){return Pt((()=>{const t=Dt(n);try{for(let n=1;n<=e;n++)if(!t["System.Collections.IEnumerator.MoveNext"]())throw new Error(kt+"\\nParameter name: source");return function(e,n){return At((()=>n["System.Collections.Generic.IEnumerator`1.get_Current"]()),(()=>n["System.Collections.IEnumerator.MoveNext"]()),(()=>{try{We(n)}finally{e()}}))}((()=>{}),t)}catch(e){throw We(t),e}}))}Symbol.iterator;const qt=Le,zt=(e,n)=>{re((()=>{const n=e();return()=>{n.Dispose()}}),n)};function Vt(e,n,t,r){const o=qt.memo(e,pn(2,Sn(function(e,n){return null==n||1===n.length?n:hn in n?n[hn]:_n([],e,n)}(2,t),null)));var i;return $t((n=>{e.displayName=n}),null==(i=n)?[]:[bn(i)]),e=>{const n=function(e,n){if(null==e)return n;{const t=e;return n.key=t(n),n}}(r,e);return qt.createElement(o,n)}}function Zt(e){return{Dispose(){e()}}}function Jt(e){return qt.useState(e)}function Yt(e){var n;n=e,re((()=>{const e=n();return()=>{e.Dispose()}}))}function Xt(e,n){zt(e,n)}function Kt(e){!function(e,n){zt((n=>(e(),Zt((()=>{})))),[])}(e)}function Qt(e){return qt.useRef(e)}function er(e,n){const t=Sn(n,[]);return qt.useMemo(e,t)}function nr(e){const n=Qt(e),t=function(e,t){const r=Sn([],[]);return qt.useCallback((e=>n.current(e)),r)}();var r,o;return r=()=>{n.current=e},o=e=>(r(),Zt((()=>{}))),oe((()=>{const e=o();return()=>{e.Dispose()}})),t}class tr{constructor(e=!1){this._id=0,this._cancelled=e,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,e]of this._listeners)e()}}addListener(e){const n=this._id;return this._listeners.set(this._id++,e),n}removeListener(e){return this._listeners.delete(e)}register(e,n){const t=this,r=this.addListener(null==n?e:()=>e(n));return{Dispose(){t.removeListener(r)}}}}class rr extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,rr.prototype)}}class or{constructor(){this.callCount=0}static get maxTrampolineCallCount(){return 2e3}incrementAndCheck(){return this.callCount++>or.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function ir(e){return n=>{if(n.cancelToken.isCancelled)n.onCancel(new rr);else if(n.trampoline.incrementAndCheck())n.trampoline.hijack((()=>{try{e(n)}catch(e){n.onError(e)}}));else try{e(n)}catch(e){n.onError(e)}}}const ur=new class{Bind(e,n){return function(e,n){return ir((t=>{e({onSuccess:e=>{try{n(e)(t)}catch(e){t.onError(e)}},onError:t.onError,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})}))}(e,n)}Combine(e,n){return this.Bind(e,(()=>n))}Delay(e){return ir((n=>e()(n)))}For(e,n){const t=e[Symbol.iterator]();let r=t.next();return this.While((()=>!r.done),this.Delay((()=>{const e=n(r.value);return r=t.next(),e})))}Return(e){return function(e){return ir((n=>n.onSuccess(e)))}(e)}ReturnFrom(e){return e}TryFinally(e,n){return ir((t=>{e({onSuccess:e=>{n(),t.onSuccess(e)},onError:e=>{n(),t.onError(e)},onCancel:e=>{n(),t.onCancel(e)},cancelToken:t.cancelToken,trampoline:t.trampoline})}))}TryWith(e,n){return ir((t=>{e({onSuccess:t.onSuccess,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline,onError:e=>{try{n(e)(t)}catch(e){t.onError(e)}}})}))}Using(e,n){return this.TryFinally(n(e),(()=>e.Dispose()))}While(e,n){return e()?this.Bind(n,(()=>this.While(e,n))):this.Return(void 0)}Zero(){return ir((e=>e.onSuccess(void 0)))}};function sr(e){}const lr=new tr;function cr(e,n){return function(e,n){return function(e,n,t,r,o){"function"!=typeof n&&(o=n,n=void 0);const i=new or;e({onSuccess:n||sr,onError:t||sr,onCancel:r||sr,cancelToken:o||lr,trampoline:i})}(e,n)}(e,n)}class ar extends gn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function fr(e,n){const t=Qt(function(e){const n=new tr(!1);return n}());return Xt((()=>Zt((()=>{t.current.cancel()}))),[]),nr((r=>{var o;null!=(o=t.current)&&o.isCancelled||cr(ur.Delay((()=>ur.TryWith(ur.Delay((()=>(n(new ar(1)),ur.Bind(e(r),(e=>(n(new ar(2,e)),ur.Zero())))))),(e=>(n(new ar(3,e)),ur.Zero()))))),t.current)}))}function dr(e,n,t){Ct((t=>{try{t(n)}catch(n){e(n)}}),t)}function hr(){return dt()}class pr extends gn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Ok","Error"]}}function _r(e,n){return 0===n.tag?new pr(0,e(n.fields[0])):new pr(1,n.fields[0])}new class{constructor(){}};function mr(e,n){const t=function(e,n){return new pr(0,n)}(0,n);return ur.Return(t)}function gr(e,n){return ur.Delay(n)}new class{constructor(){}};class wr extends gn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class yr extends gn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Header"]}}class vr extends wn{constructor(e,n,t,r,o,i,u,s){super(),this.url=e,this.method=n,this.headers=t,this.withCredentials=r,this.overridenMimeType=o,this.overridenResponseType=i,this.timeout=u,this.content=s}}class Cr extends gn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class br extends wn{constructor(e,n,t,r,o){super(),this.statusCode=0|e,this.responseText=n,this.responseType=t,this.responseHeaders=r,this.content=o}}class Sr{constructor(e,n){this.k=e,this.v=n}}function Er(e,n){return new Sr(e,n)}function xr(e){return e.k}function kr(e){return e.v}class Ir extends Sr{constructor(e,n,t,r,o){super(e,n),this.left=t,this.right=r,this.h=0|o}}function Tr(e,n,t,r,o){return new Ir(e,n,t,r,o)}function Or(e){return e.left}function Nr(e){return e.right}function Ar(e){return e.h}function Mr(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof Ir){e=Mr(t+1,Or(o)),n=Nr(o);continue e}return t+1|0}return 0|t}}function Pr(e){return Mr(0,e)}function Dr(e,n,t,r){let o,i;if(null!=e){const n=e;o=n instanceof Ir?Ar(n):1}else o=0;if(null!=r){const e=r;i=e instanceof Ir?Ar(e):1}else i=0;const u=0|(o<i?i:o);return 0===u?Er(n,t):Tr(n,t,e,r,u+1)}function Fr(e,n,t,r){let o,i,u,s,l,c;if(null!=e){const n=e;l=n instanceof Ir?Ar(n):1}else l=0;if(null!=r){const e=r;c=e instanceof Ir?Ar(e):1}else c=0;if(c>l+2){const u=bn(r);if(u instanceof Ir){if(o=Or(u),(null!=o?(i=o,i instanceof Ir?Ar(i):1):0)>l+1){const r=bn(Or(u));if(r instanceof Ir)return Dr(Dr(e,n,t,Or(r)),xr(r),kr(r),Dr(Nr(r),xr(u),kr(u),Nr(u)));throw new Error("internal error: Map.rebalance")}return Dr(Dr(e,n,t,Or(u)),xr(u),kr(u),Nr(u))}throw new Error("internal error: Map.rebalance")}if(l>c+2){const o=bn(e);if(o instanceof Ir){if(u=Nr(o),(null!=u?(s=u,s instanceof Ir?Ar(s):1):0)>c+1){const e=bn(Nr(o));if(e instanceof Ir)return Dr(Dr(Or(o),xr(o),kr(o),Or(e)),xr(e),kr(e),Dr(Nr(e),n,t,r));throw new Error("internal error: Map.rebalance")}return Dr(Or(o),xr(o),kr(o),Dr(Nr(o),n,t,r))}throw new Error("internal error: Map.rebalance")}return Dr(e,n,t,r)}function Rr(e,n,t,r){if(null!=r){const o=r,i=0|e.Compare(n,xr(o));return o instanceof Ir?i<0?Fr(Rr(e,n,t,Or(o)),xr(o),kr(o),Nr(o)):0===i?Tr(n,t,Or(o),Nr(o),Ar(o)):Fr(Or(o),xr(o),kr(o),Rr(e,n,t,Nr(o))):i<0?Tr(n,t,void 0,r,2):0===i?Er(n,t):Tr(n,t,r,void 0,2)}return Er(n,t)}function Ur(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const u=i,s=0|r.Compare(o,xr(u));if(0===s)return Cn(kr(u));if(u instanceof Ir){e=r,n=o,t=s<0?Or(u):Nr(u);continue e}return}return}}function Gr(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof Ir){Gr(t,Or(o)),t(xr(o),kr(o)),e=t,n=Nr(o);continue e}t(xr(o),kr(o))}break}}function Hr(e,n){Gr(e,n)}function jr(e,n){if(null!=n){const t=n;if(t instanceof Ir){const n=jr(e,Or(t)),r=e(xr(t),kr(t)),o=jr(e,Nr(t));return Tr(xr(t),r,n,o,Ar(t))}return Er(xr(t),e(xr(t),kr(t)))}}function Lr(e,n){return jr(e,n)}function $r(e,n){let t;for(let r=0;r<=n.length-1;r++){const o=n[r];t=Rr(e,o[0],o[1],t)}return t}class Br extends wn{constructor(e,n){super(),this.stack=e,this.started=n}}function Wr(e){e:for(;;){const n=e;if(_t(n))return dt();{const t=gt(n),r=mt(n);if(null!=r){const o=r;if(o instanceof Ir){e=bt([Or(o),Er(xr(o),kr(o)),Nr(o)],t);continue e}return n}e=t;continue e}}}function qr(e){return new Br(Wr(pt(e)),!1)}function zr(e){if(e.started){const n=e.stack;if(_t(n))return function(){throw new Error("enumeration already finished")}();if(null!=mt(n)){const e=mt(n);if(e instanceof Ir)throw new Error("Please report error: Map iterator, unexpected stack for current");return[xr(e),kr(e)]}throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}function Vr(e){let n=qr(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>zr(n),"System.Collections.IEnumerator.get_Current":()=>zr(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(_t(n))return!1;if(null!=mt(n)){if(mt(n)instanceof Ir)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Wr(gt(n)),!_t(e.stack)}throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!_t(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=qr(e)},Dispose(){}}}class Zr{constructor(e,n){this.comparer=e,this.tree=n}GetHashCode(){return 0|function(e){const n=(e,n)=>(e<<1)+n+631;let t=0;const r=Ve(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();t=0|n(t,tn(e[0])),t=0|n(t,tn(e[1]))}}finally{We(r)}return 0|t}(this)}Equals(e){if(!(e instanceof Zr))return!1;{const n=Ve(this);try{const t=Ve(e);try{const e=()=>{const r=n["System.Collections.IEnumerator.MoveNext"]();if(r===t["System.Collections.IEnumerator.MoveNext"]()){if(r){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"](),o=t["System.Collections.Generic.IEnumerator`1.get_Current"]();return!(!un(r[0],o[0])||!un(r[1],o[1]))&&e()}return!0}return!1};return e()}finally{We(t)}}finally{We(n)}}}toString(){return"map ["+nt("; ",Bt((e=>function(e,...n){return"object"==typeof e&&n.length>0&&(e=n[0],n.shift()),e.replace(Zn,((e,t,r,o,i,u)=>{if(t<0||t>=n.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let s=n[t];if(Hn(s))switch(i=null==i?null:parseInt(i,10),o){case"f":case"F":s=Ln(s,i=null!=i?i:2);break;case"g":case"G":s=null!=i?$n(s,i):$n(s);break;case"e":case"E":s=null!=i?Bn(s,i):Bn(s);break;case"p":case"P":i=null!=i?i:2,s=Ln(jn(s,100),i)+" %";break;case"d":case"D":s=null!=i?tt(String(s),i,"0"):String(s);break;case"x":case"X":s=null!=i?tt(Wn(s),i,"0"):Wn(s),"X"===o&&(s=s.toUpperCase());break;default:if(u){let e="";s=u.replace(/([0#,]+)(\.[0#]+)?/,((n,t,r)=>{Jn(s,0)&&(s=jn(s,-1),e="-");const o=null!=r?r.length:0;if(s=Ln(s,Math.max(o-1,0)),t.indexOf(",")>0){const[e,n]=s.split("."),t=e.length%3,r=Math.floor(e.length/3);let o=t>0?e.substr(0,t)+(r>0?",":""):"";for(let n=0;n<r;n++)o+=e.substr(t+3*n,3)+(n<r-1?",":"");s=n?o+"."+n:o}const i=(t=t.replace(/,/g,"")).length>0&&"0"===t[0]?t.length:0;return tt(s,i-e.length+o,"0")})),s=e+s}}else s=s instanceof Date?Dn(s,u||o):mn(s);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(s=tt(String(s),Math.abs(r)," ",r<0)),s}))}("({0}, {1})",e[0],e[1])),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(e){return Array.from(this)}GetEnumerator(){return Vr(this.tree)}[Symbol.iterator](){return Ze(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Vr(this.tree)}CompareTo(e){const n=this;if(e instanceof Zr)return 0|function(e,n,t){const r=Dt(n);try{const n=Dt(t);try{let t=0,o=r["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]();for(;0===t&&o&&i;)t=0|e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),n["System.Collections.Generic.IEnumerator`1.get_Current"]()),0===t&&(o=r["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]());return 0|(0!==t?t:o?1:i?-1:0)}finally{We(n)}}finally{We(r)}}(((e,t)=>{const r=0|n.comparer.Compare(e[0],t[0]);return 0|(0!==r?r:an(e[1],t[1]))}),n,e);throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return Qr(this,e[0])&&un(Xr(this,e[0]),e[1])}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){!function(e,n,t){let r=t;Hr(((e,t)=>{n[r]=[e,t],r=r+1|0}),e)}(this.tree,e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Kr(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Kr(this)}get size(){return 0|Kr(this)}clear(){throw new Error("Map cannot be mutated")}delete(e){throw new Error("Map cannot be mutated")}entries(){return Bt((e=>[e[0],e[1]]),this)}get(e){return Xr(this,e)}has(e){return Qr(this,e)}keys(){return Bt((e=>e[0]),this)}set(e,n){throw new Error("Map cannot be mutated")}values(){return Bt((e=>e[1]),this)}forEach(e,n){const t=this;$t((n=>{e(n[1],n[0],t)}),t)}}function Jr(e,n){return new Zr(e,n)}function Yr(e){const n=En();return Jr(n,function(e,n){if($e(n))return $r(e,n);if(n instanceof it)return function(e,n){return yt(((n,t)=>Rr(e,t[0],t[1],n)),void 0,n)}(e,n);{const t=Ve(n);try{return function(e,n,t){for(;;){const r=e,o=n,i=t;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;{const u=i["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,n=Rr(r,u[0],u[1],o),t=i}}}(e,void 0,t)}finally{We(t)}}}(n,e))}function Xr(e,n){return function(e,n,t){const r=Ur(e,n,t);if(null==r)throw new Error;return bn(r)}(e.comparer,n,e.tree)}function Kr(e){return Pr(e.tree)}function Qr(e,n){return function(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const u=i,s=0|r.Compare(o,xr(u));if(u instanceof Ir){if(s<0){e=r,n=o,t=Or(u);continue e}if(0===s)return!0;e=r,n=o,t=Nr(u);continue e}return 0===s}return!1}}(e.comparer,n,e.tree)}function eo(){return Zr.empty}Zr.empty=Jr(En(),void 0);const no=new vr("",new wr(0),dt(),!1,void 0,void 0,void 0,new class extends gn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}(0));function to(e,n){return"string"!=typeof(t=n)||0===t.length?[n]:rt(n,[e],null,0);var t}function ro(e){return new vr(e,no.method,no.headers,no.withCredentials,no.overridenMimeType,no.overridenResponseType,no.timeout,no.content)}function oo(e,n){return new vr(n.url,e,n.headers,n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.timeout,n.content)}function io(e){return function(e){return ir((n=>e([n.onSuccess,n.onError,n.onCancel])))}((n=>{const t=new XMLHttpRequest;t.open(function(e){switch(e.tag){case 1:return"POST";case 3:return"PATCH";case 2:return"PUT";case 4:return"DELETE";case 6:return"OPTIONS";case 5:return"HEAD";default:return"GET"}}(e.method),e.url),t.onreadystatechange=()=>{let e,r,o,i,u,s;4===t.readyState&&n[0]((r=t.responseType,e=""===r||"text"===r?t.responseText:"",o=0|t.status,i=t.responseType,s=t.responseType,u=""===s||"text"===s?new Cr(0,t.responseText):new Cr("arraybuffer"===s?2:"blob"===s?1:3,t.response),new br(o,e,i,function(e){const n=En();return Jr(n,$r(n,e))}(function(e,n,t){const r=[];for(let t=0;t<=n.length-1;t++){const o=e(n[t]);if(null!=o){const e=bn(o);r.push(e)}}return r}((e=>{const n=St(to(":",e));return _t(n)?void 0:[mt(n).toLocaleLowerCase(),nt(":",gt(n)).trim()]}),to("\r\n",t.getAllResponseHeaders()))),u)))};const r=Ve(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();t.setRequestHeader(e.fields[0],e.fields[1])}}finally{We(r)}t.withCredentials=e.withCredentials;const o=e.overridenMimeType;if(null==o);else{const e=o;t.overrideMimeType(e)}const i=e.overridenResponseType;null==i||(1===i.tag?t.responseType="blob":2===i.tag?t.responseType="arraybuffer":t.responseType="text");const u=e.timeout;if(null==u);else{const e=0|u;t.timeout=0|e}const s=[e.method,e.content];0===s[0].tag?t.send(Cn(void 0)):1===s[1].tag||3===s[1].tag||2===s[1].tag?t.send(Cn(s[1].fields[0])):t.send(Cn(void 0))}))}new br(0,"","",eo(),new Cr(0,""));class uo extends gn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class so extends gn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class lo{constructor(){this.cache=new Map([])}}function co(){return new lo}function ao(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function fo(e,n){switch(e.tag){case 2:return function(e,n,t,r,o=0){if("string"==typeof e){const t=e;e=function(e,n=0){if(0!=(-276&n))throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Singleline and ECMAScript");let t="g";return t+=1&n?"i":"",t+=2&n?"m":"",t+=16&n?"s":"",new RegExp(e,t)}(n,null!=r?r:0),n=t,r=void 0}if("function"==typeof t)return r=null==r?-1:r,n.substring(0,o)+n.substring(o).replace(e,(function(){let e=arguments[0];if(r){r--;const n=[],o=arguments.length,i="string"!=typeof arguments[o-1];let u=i?o-3:o-2;for(let e=0;e<u;e++)n.push(arguments[e]);n.index=arguments[u++],n.input=arguments[u++],i&&(n.groups=arguments[u]),e=t(n)}return e}));if(t=t.replace(/\$0/g,(e=>"$&")).replace(/\${([^}]+)}/g,"$<$1>"),null!=r){let i;const u=n.substring(o),s=zn(e,u),l=zn.length>r?(i=s[r-1],u.substring(0,i.index+i[0].length)):u;return n.substring(0,o)+l.replace(e,t)+n.substring(o+l.length)}return n.replace(e,t)}(ao(n),"[A-Z]","_$0").toLowerCase();case 0:return n;default:return ao(n)}}co(),co();const ho=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,po=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,_o=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function mo(e,n){try{return n.contents=function(e){function n(e){return e.replace(po,"$1-$2-$3-$4-$5")}const t=e.trim().toLowerCase();if(ho.test(t))return function(e,...n){if(0===n.length)return e.trim();const t="["+qn(n.join(""))+"]+";return e.replace(new RegExp("^"+t),"").replace(new RegExp(t+"$"),"")}(t,"{","}","(",")");if(po.test(t))return n(t);if(_o.test(t))return n(t.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}(e),!0}catch(e){return!1}}var go;function wo(e,n){switch(n){case 8:return e?[0,255]:[-128,127];case 16:return e?[0,65535]:[-32768,32767];case 32:return e?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function yo(e,n,t,r,o){try{return o.contents=function(e,n,t,r,o){const i=function(e,n,t){const r=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(null!=r){const[,,e,o]=r;t=t||function(e,n){if(n&go.AllowHexSpecifier)return 16;switch(e){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}(e,n);const i=function(e){switch(e){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}(t);if(!i.test(o))return function(e,n){const[,t,r,o]=e;return{sign:t||"",prefix:r||"",digits:o,radix:n}}(r,t)}return null}(e,n,void 0);if(null!=i){let e=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(e)){const[n,o]=wo(!0,r);!t&&10!==i.radix&&e>=n&&e<=o&&(e=e<<32-r>>32-r);const[u,s]=wo(t,r);if(e>=u&&e<=s)return e}}throw new Error("Input string was not in a correct format.")}(e,n,t,r),!0}catch(e){return!1}}function vo(e,n){!function(e){if(null!=e&&0!==e){if(e%6e4!=0)throw new Error("Offset must be specified in whole minutes.");if(Math.abs(e/36e5)>14)throw new Error("Offset must be within plus or minus 14 hours.")}}(n);const t=new Date(e);return t.offset=null!=n?n:-6e4*(new Date).getTimezoneOffset(),t}function Co(e,n){try{return n.contents=function(e){const[n,t]=Rn(e),r=null==t?-6e4*n.getTimezoneOffset():"Z"===t?0:6e4*t;return vo(n.getTime(),r)}(e),!0}catch(e){return!1}}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(go||(go={}));var bo=null;try{bo=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(s){}function So(e,n,t){this.low=0|e,this.high=0|n,this.unsigned=!!t}function Eo(e){return!0===(e&&e.__isLong__)}So.prototype.GetHashCode=function(){let e=this.unsigned?1:0;return e=(e<<5)+e^this.high,e=(e<<5)+e^this.low,e},So.prototype.Equals=function(e){return Xo(this,e)},So.prototype.CompareTo=function(e){return ni(this,e)},So.prototype.toString=function(e){return Vo(this,e)},So.prototype.toJSON=function(){return Vo(this)},So.prototype[Gn]=function(){const e=this;return{multiply:n=>ii(e,n),toPrecision:n=>String(e)+(0).toPrecision(n).substr(1),toExponential:n=>String(e)+(0).toExponential(n).substr(1),toFixed:n=>String(e)+(0).toFixed(n).substr(1),toHex:()=>{return Vo(e.unsigned?e:function(e,n,t){return t?function(e,n){return new So(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)}(e,n):function(e,n){return new So(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)}(e,n)}((n=e,t?function(e){var n=e.high,t=e.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&n,n>>>8&255,n>>>16&255,n>>>24]}(n):function(e){var n=e.high,t=e.low;return[n>>>24,n>>>16&255,n>>>8&255,255&n,t>>>24,t>>>16&255,t>>>8&255,255&t]}(n)),!0),16);var n,t}}},So.prototype.__isLong__,Object.defineProperty(So.prototype,"__isLong__",{value:!0});var xo={},ko={};function Io(e,n){var t,r,o;return n?(o=0<=(e>>>=0)&&e<256)&&(r=ko[e])?r:(t=Oo(e,(0|e)<0?-1:0,!0),o&&(ko[e]=t),t):(o=-128<=(e|=0)&&e<128)&&(r=xo[e])?r:(t=Oo(e,e<0?-1:0,!1),o&&(xo[e]=t),t)}function To(e,n){if(isNaN(e))return n?Go:Uo;if(n){if(e<0)return Go;if(e>=Do)return Bo}else{if(e<=-Fo)return Wo;if(e+1>=Fo)return $o}return e<0?ti(To(-e,n)):Oo(e%Po|0,e/Po|0,n)}function Oo(e,n,t){return new So(e,n,t)}var No=Math.pow;function Ao(e,n,t){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return Uo;if("number"==typeof n?(t=n,n=!1):n=!!n,(t=t||10)<2||36<t)throw RangeError("radix");var r=e.indexOf("-");if(r>0)throw Error("interior hyphen");if(0===r)return ti(Ao(e.substring(1),n,t));for(var o=To(No(t,8)),i=Uo,u=0;u<e.length;u+=8){var s=Math.min(8,e.length-u),l=parseInt(e.substring(u,u+s),t);i=ri(s<8?ii(i,To(No(t,s))):i=ii(i,o),To(l))}return i.unsigned=n,i}function Mo(e,n){return"number"==typeof e?To(e,n):"string"==typeof e?Ao(e,n):Oo(e.low,e.high,"boolean"==typeof n?n:e.unsigned)}var Po=4294967296,Do=Po*Po,Fo=Do/2,Ro=Io(1<<24),Uo=Io(0),Go=Io(0,!0),Ho=Io(1),jo=Io(1,!0),Lo=Io(-1),$o=Oo(-1,2147483647,!1),Bo=Oo(-1,-1,!0),Wo=Oo(0,-2147483648,!1);function qo(e){return e.unsigned?e.low>>>0:e.low}function zo(e){return e.unsigned?(e.high>>>0)*Po+(e.low>>>0):e.high*Po+(e.low>>>0)}function Vo(e,n){if((n=n||10)<2||36<n)throw RangeError("radix");if(Zo(e))return"0";if(Jo(e)){if(Xo(e,Wo)){var t=To(n),r=ui(e,t),o=oi(ii(r,t),e);return Vo(r,n)+qo(o).toString(n)}return"-"+Vo(ti(e),n)}for(var i=To(No(n,6),e.unsigned),u=e,s="";;){var l=ui(u,i),c=(qo(oi(u,ii(l,i)))>>>0).toString(n);if(Zo(u=l))return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}}function Zo(e){return 0===e.high&&0===e.low}function Jo(e){return!e.unsigned&&e.high<0}function Yo(e){return 1==(1&e.low)}function Xo(e,n){return Eo(n)||(n=Mo(n)),(e.unsigned===n.unsigned||e.high>>>31!=1||n.high>>>31!=1)&&e.high===n.high&&e.low===n.low}function Ko(e,n){return ni(e,n)<0}function Qo(e,n){return ni(e,n)>0}function ei(e,n){return ni(e,n)>=0}function ni(e,n){if(Eo(n)||(n=Mo(n)),Xo(e,n))return 0;var t=Jo(e),r=Jo(n);return t&&!r?-1:!t&&r?1:e.unsigned?n.high>>>0>e.high>>>0||n.high===e.high&&n.low>>>0>e.low>>>0?-1:1:Jo(oi(e,n))?-1:1}function ti(e){return!e.unsigned&&Xo(e,Wo)?Wo:ri(function(e){return Oo(~e.low,~e.high,e.unsigned)}(e),Ho)}function ri(e,n){Eo(n)||(n=Mo(n));var t=e.high>>>16,r=65535&e.high,o=e.low>>>16,i=65535&e.low,u=n.high>>>16,s=65535&n.high,l=n.low>>>16,c=0,a=0,f=0,d=0;return f+=(d+=i+(65535&n.low))>>>16,a+=(f+=o+l)>>>16,c+=(a+=r+s)>>>16,c+=t+u,Oo((f&=65535)<<16|(d&=65535),(c&=65535)<<16|(a&=65535),e.unsigned)}function oi(e,n){return Eo(n)||(n=Mo(n)),ri(e,ti(n))}function ii(e,n){if(Zo(e))return e.unsigned?Go:Uo;if(Eo(n)||(n=Mo(n)),bo)return Oo(bo.mul(e.low,e.high,n.low,n.high),bo.get_high(),e.unsigned);if(Zo(n))return e.unsigned?Go:Uo;if(Xo(e,Wo))return Yo(n)?Wo:Uo;if(Xo(n,Wo))return Yo(e)?Wo:Uo;if(Jo(e))return Jo(n)?ii(ti(e),ti(n)):ti(ii(ti(e),n));if(Jo(n))return ti(ii(e,ti(n)));if(Ko(e,Ro)&&Ko(n,Ro))return To(zo(e)*zo(n),e.unsigned);var t=e.high>>>16,r=65535&e.high,o=e.low>>>16,i=65535&e.low,u=n.high>>>16,s=65535&n.high,l=n.low>>>16,c=65535&n.low,a=0,f=0,d=0,h=0;return d+=(h+=i*c)>>>16,f+=(d+=o*c)>>>16,d&=65535,f+=(d+=i*l)>>>16,a+=(f+=r*c)>>>16,f&=65535,a+=(f+=o*l)>>>16,f&=65535,a+=(f+=i*s)>>>16,a+=t*c+r*l+o*s+i*u,Oo((d&=65535)<<16|(h&=65535),(a&=65535)<<16|(f&=65535),e.unsigned)}function ui(e,n){if(Eo(n)||(n=Mo(n)),Zo(n))throw Error("division by zero");var t,r,o;if(bo)return e.unsigned||-2147483648!==e.high||-1!==n.low||-1!==n.high?Oo((e.unsigned?bo.div_u:bo.div_s)(e.low,e.high,n.low,n.high),bo.get_high(),e.unsigned):e;if(Zo(e))return e.unsigned?Go:Uo;if(e.unsigned){if(n.unsigned||(n=function(e){return e.unsigned?e:Oo(e.low,e.high,!0)}(n)),Qo(n,e))return Go;if(Qo(n,function(e,n){if(Eo(n)&&(n=qo(n)),0==(n&=63))return e;var t=e.high;return n<32?Oo(e.low>>>n|t<<32-n,t>>>n,e.unsigned):Oo(32===n?t:t>>>n-32,0,e.unsigned)}(e,1)))return jo;o=Go}else{if(Xo(e,Wo))return Xo(n,Ho)||Xo(n,Lo)?Wo:Xo(n,Wo)?Ho:Xo(t=function(e,n){return Eo(n)&&(n=qo(n)),0==(n&=63)?e:n<32?Oo(e.low<<n,e.high<<n|e.low>>>32-n,e.unsigned):Oo(0,e.low<<n-32,e.unsigned)}(ui(function(e,n){return Eo(n)&&(n=qo(n)),0==(n&=63)?e:n<32?Oo(e.low>>>n|e.high<<32-n,e.high>>n,e.unsigned):Oo(e.high>>n-32,e.high>=0?0:-1,e.unsigned)}(e,1),n),1),Uo)?Jo(n)?Ho:Lo:o=ri(t,ui(r=oi(e,ii(n,t)),n));if(Xo(n,Wo))return e.unsigned?Go:Uo;if(Jo(e))return Jo(n)?ui(ti(e),ti(n)):ti(ui(ti(e),n));if(Jo(n))return ti(ui(e,ti(n)));o=Uo}for(r=e;ei(r,n);){t=Math.max(1,Math.floor(zo(r)/zo(n)));for(var i=Math.ceil(Math.log(t)/Math.LN2),u=i<=48?1:No(2,i-48),s=To(t),l=ii(s,n);Jo(l)||Qo(l,r);)l=ii(s=To(t-=u,e.unsigned),n);Zo(s)&&(s=Ho),o=ri(o,s),r=oi(r,l)}return o}const si=ui,li=zo;function ci(e=0,n=0,t=0,r=0,o=0){switch(arguments.length){case 1:return ai(arguments[0]);case 3:e=0,n=arguments[0],t=arguments[1],r=arguments[2],o=0}return 864e5*e+36e5*n+6e4*t+1e3*r+o}function ai(e){return li(si(e,1e4))}function fi(e,n){try{return n.contents=function(e){const n=e.search("\\."),t=e.search("\\:");if(-1===n&&-1===t){const n=parseInt(e,0);if(isNaN(n))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return ci(n,0,0,0,0)}if(t>0){const n=/^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(e);if(null!=n&&null!=n[4]&&null!=n[5]){let t=0,r=0,o=0;const i=null!=n[1]&&"-"===n[1]?-1:1,u=+n[4],s=+n[5];if(null!=n[3]&&(t=+n[3]),null!=n[7]&&(o=+n[7]),null!=n[8])switch(n[8].length){case 1:r=100*+n[8];break;case 2:r=10*+n[8];break;case 3:r=+n[8];break;case 4:r=+n[8]/10;break;case 5:r=+n[8]/100;break;case 6:r=+n[8]/1e3;break;case 7:r=+n[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return i*ci(t,u,s,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch(e){return!1}}class di{constructor(e,n,t,r,o,i,u){this.fullname=e,this.generics=n,this.construct=t,this.parent=r,this.fields=o,this.cases=i,this.enumCases=u}toString(){return bi(this)}GetHashCode(){return pi(this)}Equals(e){return _i(this,e)}}function hi(e){return null!=e.generics?e.generics:[]}function pi(e){return nn([Qe(e.fullname),...hi(e).map(pi)])}function _i(e,n){return""===e.fullname?""===n.fullname&&rn(Ii(e),Ii(n),(([e,n],[t,r])=>e===t&&_i(n,r))):e.fullname===n.fullname&&rn(hi(e),hi(n),_i)}function mi(e,n,t,r){return new di(e,n,t,void 0,r)}function gi(e){return new di("Microsoft.FSharp.Core.FSharpOption`1",[e])}function wi(e){return new di("Microsoft.FSharp.Collections.FSharpList`1",[e])}const yi=new di("System.Object"),vi=(new di("Microsoft.FSharp.Core.Unit"),new di("System.Char"),new di("System.String"));function Ci(e){if(Array.isArray(e))return e[0];if(e instanceof di){const n=Si(e);if(null!=n)return Ci(n)+"[]";{const n=e.fullname.lastIndexOf(".");return-1===n?e.fullname:e.fullname.substr(n+1)}}return e.name}function bi(e){const n=Si(e);return null!=n?bi(n)+"[]":null==e.generics||0===e.generics.length?e.fullname:e.fullname+"["+e.generics.map((e=>bi(e))).join(",")+"]"}function Si(e){var n;return"[]"===e.fullname&&1===(null===(n=e.generics)||void 0===n?void 0:n.length)?e.generics[0]:void 0}function Ei(e){return null!=e.enumCases&&e.enumCases.length>0}function xi(e){if(Ei(e)&&null!=e.enumCases)return e.enumCases.map((e=>e[1]));throw new Error(`${e.fullname} is not an enum type`)}function ki(e,n){const t=parseInt(n,10);return function(e,n){if(null!=e.enumCases){if("string"==typeof n){for(const t of e.enumCases)if(t[0]===n)return t;throw new Error(`'${n}' was not found in ${e.fullname}`)}for(const t of e.enumCases)if(t[1]===n)return t;return["",n]}throw new Error(`${e.fullname} is not an enum type`)}(e,isNaN(t)?n:t)[1]}function Ii(e){if(null!=e.fields)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function Ti(e){return e.fullname.startsWith("System.Tuple")}function Oi(e,n){const t=(e.fields||[]).length;if(n.length!==t)throw new Error(`Expected an array of length ${t} but got ${n.length}`);return null!=e.declaringType.construct?new e.declaringType.construct(e.tag,...n):{}}new di("System.Boolean"),new di("System.SByte"),new di("System.Byte"),new di("System.Int16"),new di("System.UInt16"),new di("System.Int32"),new di("System.UInt32"),new di("System.Single"),new di("System.Double"),new di("System.Decimal");class Ni{constructor(e){this.k=e}}function Ai(e){return new Ni(e)}function Mi(e){return e.k}class Pi extends Ni{constructor(e,n,t,r){super(e),this.left=n,this.right=t,this.h=0|r}}function Di(e,n,t,r){return new Pi(e,n,t,r)}function Fi(e){return e.left}function Ri(e){return e.right}function Ui(e){return e.h}function Gi(e,n){e:for(;;){const t=e,r=n;if(null!=t){const o=t;if(o instanceof Pi){e=Fi(o),n=Gi(Ri(o),r+1);continue e}return r+1|0}return 0|r}}function Hi(e){return Gi(e,0)}function ji(e,n,t){let r,o;if(null!=e){const n=e;r=n instanceof Pi?Ui(n):1}else r=0;if(null!=t){const e=t;o=e instanceof Pi?Ui(e):1}else o=0;const i=0|(r<o?o:r);return 0===i?Ai(n):Di(n,e,t,i+1)}function Li(e,n,t){let r,o,i,u,s,l;if(null!=e){const n=e;s=n instanceof Pi?Ui(n):1}else s=0;if(null!=t){const e=t;l=e instanceof Pi?Ui(e):1}else l=0;if(l>s+2){const i=bn(t);if(i instanceof Pi){if(r=Fi(i),(null!=r?(o=r,o instanceof Pi?Ui(o):1):0)>s+1){const t=bn(Fi(i));if(t instanceof Pi)return ji(ji(e,n,Fi(t)),Mi(t),ji(Ri(t),Mi(i),Ri(i)));throw new Error("internal error: Set.rebalance")}return ji(ji(e,n,Fi(i)),Mi(i),Ri(i))}throw new Error("internal error: Set.rebalance")}if(s>l+2){const r=bn(e);if(r instanceof Pi){if(i=Ri(r),(null!=i?(u=i,u instanceof Pi?Ui(u):1):0)>l+1){const e=bn(Ri(r));if(e instanceof Pi)return ji(ji(Fi(r),Mi(r),Fi(e)),Mi(e),ji(Ri(e),n,t));throw new Error("internal error: Set.rebalance")}return ji(Fi(r),Mi(r),ji(Ri(r),n,t))}throw new Error("internal error: Set.rebalance")}return ji(e,n,t)}function $i(e,n,t){if(null!=t){const r=t,o=0|e.Compare(n,Mi(r));if(r instanceof Pi)return o<0?Li($i(e,n,Fi(r)),Mi(r),Ri(r)):0===o?t:Li(Fi(r),Mi(r),$i(e,n,Ri(r)));{const o=0|e.Compare(n,Mi(r));return o<0?Di(n,void 0,t,2):0===o?t:Di(n,t,void 0,2)}}return Ai(n)}function Bi(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const u=i,s=0|r.Compare(o,Mi(u));if(u instanceof Pi){if(s<0){e=r,n=o,t=Fi(u);continue e}if(0===s)return!0;e=r,n=o,t=Ri(u);continue e}return 0===s}return!1}}function Wi(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof Pi){Wi(t,Fi(o)),t(Mi(o)),e=t,n=Ri(o);continue e}t(Mi(o))}break}}class qi extends wn{constructor(e,n){super(),this.stack=e,this.started=n}}function zi(e){e:for(;;){const n=e;if(_t(n))return dt();{const t=mt(n),r=gt(n);if(null!=t){const o=t;if(o instanceof Pi){e=bt([Fi(o),Ai(Mi(o)),Ri(o)],r);continue e}return n}e=r;continue e}}}function Vi(e){return new qi(zi(pt(e)),!1)}function Zi(e){if(e.started){const n=e.stack;if(_t(n))return function(){throw new Error("Enumeration already started")}();if(null!=mt(n))return Mi(mt(n));throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function Ji(e){let n=Vi(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Zi(n),"System.Collections.IEnumerator.get_Current":()=>Zi(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(_t(n))return!1;if(null!=mt(n)){if(mt(n)instanceof Pi)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=zi(gt(n)),!_t(e.stack)}throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!_t(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=Vi(e)},Dispose(){}}}function Yi(e,n,t){return null==n?null==t?0:-1:null==t?1:0|function(e,n,t){e:for(;;){const r=e,o=n,i=t,u=[o,i];if(_t(u[0]))return _t(u[1])?0:-1;if(_t(u[1]))return 1;if(null!=mt(u[1]))if(null!=mt(u[0])){const s=mt(u[0]),l=mt(u[1]);if(s instanceof Pi)if(null==Fi(s)){if(!(l instanceof Pi)){const o=0|r.Compare(Mi(s),Mi(l));if(0!==o)return 0|o;e=r,n=ht(Ri(s),gt(u[0])),t=ht(void 0,gt(u[1]));continue e}if(null==Fi(l)){const o=0|r.Compare(Mi(s),Mi(l));if(0!==o)return 0|o;e=r,n=ht(Ri(s),gt(u[0])),t=ht(Ri(l),gt(u[1]));continue e}{const u=[o,i];let s,l,c,a,f;switch(_t(u[0])?_t(u[1])?s=2:null!=mt(u[1])?(s=1,a=gt(u[1]),f=mt(u[1])):s=2:null!=mt(u[0])?(s=0,l=gt(u[0]),c=mt(u[0])):_t(u[1])?s=2:null!=mt(u[1])?(s=1,a=gt(u[1]),f=mt(u[1])):s=2,s){case 0:if(c instanceof Pi){e=r,n=bt([Fi(c),Di(Mi(c),void 0,Ri(c),0)],l),t=i;continue e}e=r,n=bt([void 0,Ai(Mi(c))],l),t=i;continue e;case 1:if(f instanceof Pi){e=r,n=o,t=bt([Fi(f),Di(Mi(f),void 0,Ri(f),0)],a);continue e}e=r,n=o,t=bt([void 0,Ai(Mi(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const u=[o,i];let s,l,c,a,f;switch(_t(u[0])?_t(u[1])?s=2:null!=mt(u[1])?(s=1,a=gt(u[1]),f=mt(u[1])):s=2:null!=mt(u[0])?(s=0,l=gt(u[0]),c=mt(u[0])):_t(u[1])?s=2:null!=mt(u[1])?(s=1,a=gt(u[1]),f=mt(u[1])):s=2,s){case 0:if(c instanceof Pi){e=r,n=bt([Fi(c),Di(Mi(c),void 0,Ri(c),0)],l),t=i;continue e}e=r,n=bt([void 0,Ai(Mi(c))],l),t=i;continue e;case 1:if(f instanceof Pi){e=r,n=o,t=bt([Fi(f),Di(Mi(f),void 0,Ri(f),0)],a);continue e}e=r,n=o,t=bt([void 0,Ai(Mi(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(!(l instanceof Pi)){const o=0|r.Compare(Mi(s),Mi(l));if(0!==o)return 0|o;e=r,n=gt(u[0]),t=gt(u[1]);continue e}if(null==Fi(l)){const o=0|r.Compare(Mi(s),Mi(l));if(0!==o)return 0|o;e=r,n=ht(void 0,gt(u[0])),t=ht(Ri(l),gt(u[1]));continue e}{const u=[o,i];let s,l,c,a,f;switch(_t(u[0])?_t(u[1])?s=2:null!=mt(u[1])?(s=1,a=gt(u[1]),f=mt(u[1])):s=2:null!=mt(u[0])?(s=0,l=gt(u[0]),c=mt(u[0])):_t(u[1])?s=2:null!=mt(u[1])?(s=1,a=gt(u[1]),f=mt(u[1])):s=2,s){case 0:if(c instanceof Pi){e=r,n=bt([Fi(c),Di(Mi(c),void 0,Ri(c),0)],l),t=i;continue e}e=r,n=bt([void 0,Ai(Mi(c))],l),t=i;continue e;case 1:if(f instanceof Pi){e=r,n=o,t=bt([Fi(f),Di(Mi(f),void 0,Ri(f),0)],a);continue e}e=r,n=o,t=bt([void 0,Ai(Mi(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{mt(u[1]);const s=[o,i];let l,c,a,f,d;switch(_t(s[0])?_t(s[1])?l=2:null!=mt(s[1])?(l=1,f=gt(s[1]),d=mt(s[1])):l=2:null!=mt(s[0])?(l=0,c=gt(s[0]),a=mt(s[0])):_t(s[1])?l=2:null!=mt(s[1])?(l=1,f=gt(s[1]),d=mt(s[1])):l=2,l){case 0:if(a instanceof Pi){e=r,n=bt([Fi(a),Di(Mi(a),void 0,Ri(a),0)],c),t=i;continue e}e=r,n=bt([void 0,Ai(Mi(a))],c),t=i;continue e;case 1:if(d instanceof Pi){e=r,n=o,t=bt([Fi(d),Di(Mi(d),void 0,Ri(d),0)],f);continue e}e=r,n=o,t=bt([void 0,Ai(Mi(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==mt(u[0])){e=r,n=gt(u[0]),t=gt(u[1]);continue e}{mt(u[0]);const s=[o,i];let l,c,a,f,d;switch(_t(s[0])?_t(s[1])?l=2:null!=mt(s[1])?(l=1,f=gt(s[1]),d=mt(s[1])):l=2:null!=mt(s[0])?(l=0,c=gt(s[0]),a=mt(s[0])):_t(s[1])?l=2:null!=mt(s[1])?(l=1,f=gt(s[1]),d=mt(s[1])):l=2,l){case 0:if(a instanceof Pi){e=r,n=bt([Fi(a),Di(Mi(a),void 0,Ri(a),0)],c),t=i;continue e}e=r,n=bt([void 0,Ai(Mi(a))],c),t=i;continue e;case 1:if(d instanceof Pi){e=r,n=o,t=bt([Fi(d),Di(Mi(d),void 0,Ri(d),0)],f);continue e}e=r,n=o,t=bt([void 0,Ai(Mi(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,pt(n),pt(t))}function Xi(e,n,t){let r=t;Wi((e=>{n[r]=e,r=r+1|0}),e)}function Ki(e,n){if($e(n))return function(e,n){return Tn(((n,t)=>$i(e,t,n)),void 0,n)}(e,n);if(n instanceof it)return function(e,n){return yt(((n,t)=>$i(e,t,n)),void 0,n)}(e,n);{const t=Ve(n);try{return function(e,n,t){for(;;){const r=e,o=n,i=t;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;e=r,n=$i(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),o),t=i}}(e,void 0,t)}finally{We(t)}}}class Qi{constructor(e,n){this.comparer=e,this.tree=n}GetHashCode(){return 0|function(e){let n,t=0;const r=Ve(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();)t=0|(n=0|tn(r["System.Collections.Generic.IEnumerator`1.get_Current"]()),(t<<1)+n+631)}finally{We(r)}return 0|Math.abs(t)}(this)}Equals(e){return e instanceof Qi&&0===Yi(eu(this),nu(this),nu(e))}toString(){return"set ["+nt("; ",Bt((e=>mn(e)),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(e){return Array.from(this)}CompareTo(e){return 0|Yi(eu(this),nu(this),nu(e))}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return Bi(eu(this),e,nu(this))}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){Xi(nu(this),e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|tu(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|tu(this)}GetEnumerator(){return Ji(nu(this))}[Symbol.iterator](){return Ze(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Ji(nu(this))}get size(){return 0|tu(this)}add(e){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(e){throw new Error("Set cannot be mutated")}has(e){return function(e,n){return Bi(eu(e),n,nu(e))}(this,e)}keys(){return Bt((e=>e),this)}values(){return Bt((e=>e),this)}entries(){return Bt((e=>[e,e]),this)}forEach(e,n){const t=this;$t((n=>{e(n,n,t)}),t)}}function eu(e){return e.comparer}function nu(e){return e.tree}function tu(e){return Hi(nu(e))}function ru(e,n,t){try{return"Expecting "+e+" but instead got:"+(t?"\n":" ")+JSON.stringify(n,null,4)}catch(n){return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(t?"\n":" ")}}function ou(e,n,t){const r=n(e,t);if(1===r.tag){const e=r.fields[0];return new pr(1,function(e,n){const t=2===n.tag?ru(n.fields[0],n.fields[1],!0):1===n.tag?ru(n.fields[0],n.fields[1],!1)+"\nReason: "+n.fields[2]:3===n.tag?ru(n.fields[0],n.fields[1],!0):4===n.tag?ru(n.fields[0],n.fields[1],!0)+"\nNode `"+n.fields[2]+"` is unkown.":5===n.tag?"Expecting "+n.fields[0]+".\n"+JSON.stringify(n.fields[1],null,4):7===n.tag?"The following errors were found:\n\n"+nt("\n\n",n.fields[0]):6===n.tag?"The following `failure` occurred with the decoder: "+n.fields[0]:ru(n.fields[0],n.fields[1],!1);return 7===n.tag?t:"Error at: `"+e+"`\n"+t}(e[0],e[1]))}return new pr(0,r.fields[0])}function iu(e,n){try{return ou("$",e,JSON.parse(n))}catch(e){if(e instanceof SyntaxError)return new pr(1,"Given an invalid JSON: "+e.message);throw e}}const uu=e=>n=>{let t,r,o;const i="a sbyte",u=e,s=n;return"number"==typeof s?(t=s,isFinite(t)&&Math.floor(t)===t?-128<=t&&t<=127?new pr(0,(t+128&255)-128):(f=[u,new uo(1,i,t,"Value was either too large or too small for a sbyte")],new pr(1,f)):(a=[u,new uo(1,i,t,"Value is not an integral value")],new pr(1,a))):"string"==typeof s?(o=0,r=[yo(s,511,!1,8,new yn((()=>o),(e=>{o=0|e}))),o],r[0]?new pr(0,r[1]):(c=[u,new uo(0,i,s)],new pr(1,c))):(l=[u,new uo(0,i,s)],new pr(1,l));var l,c,a,f},su=e=>n=>{let t,r,o;const i="a byte",u=e,s=n;return"number"==typeof s?(t=s,isFinite(t)&&Math.floor(t)===t?0<=t&&t<=255?new pr(0,255&t):(f=[u,new uo(1,i,t,"Value was either too large or too small for a byte")],new pr(1,f)):(a=[u,new uo(1,i,t,"Value is not an integral value")],new pr(1,a))):"string"==typeof s?(o=0,r=[yo(s,511,!0,8,new yn((()=>o),(e=>{o=e}))),o],r[0]?new pr(0,r[1]):(c=[u,new uo(0,i,s)],new pr(1,c))):(l=[u,new uo(0,i,s)],new pr(1,l));var l,c,a,f},lu=e=>n=>{let t,r,o;const i="an int16",u=e,s=n;return"number"==typeof s?(t=s,isFinite(t)&&Math.floor(t)===t?-32768<=t&&t<=32767?new pr(0,(t+32768&65535)-32768):(f=[u,new uo(1,i,t,"Value was either too large or too small for "+i)],new pr(1,f)):(a=[u,new uo(1,i,t,"Value is not an integral value")],new pr(1,a))):"string"==typeof s?(o=0,r=[yo(s,511,!1,16,new yn((()=>o),(e=>{o=0|e}))),o],r[0]?new pr(0,r[1]):(c=[u,new uo(0,i,s)],new pr(1,c))):(l=[u,new uo(0,i,s)],new pr(1,l));var l,c,a,f},cu=e=>n=>{let t,r,o;const i="an uint16",u=e,s=n;return"number"==typeof s?(t=s,isFinite(t)&&Math.floor(t)===t?0<=t&&t<=65535?new pr(0,65535&t):(f=[u,new uo(1,i,t,"Value was either too large or too small for "+i)],new pr(1,f)):(a=[u,new uo(1,i,t,"Value is not an integral value")],new pr(1,a))):"string"==typeof s?(o=0,r=[yo(s,511,!0,16,new yn((()=>o),(e=>{o=e}))),o],r[0]?new pr(0,r[1]):(c=[u,new uo(0,i,s)],new pr(1,c))):(l=[u,new uo(0,i,s)],new pr(1,l));var l,c,a,f},au=e=>n=>{let t,r,o;const i="an int",u=e,s=n;return"number"==typeof s?(t=s,isFinite(t)&&Math.floor(t)===t?-2147483648<=t&&t<=2147483647?new pr(0,~~t):(f=[u,new uo(1,i,t,"Value was either too large or too small for an int")],new pr(1,f)):(a=[u,new uo(1,i,t,"Value is not an integral value")],new pr(1,a))):"string"==typeof s?(o=0,r=[yo(s,511,!1,32,new yn((()=>o),(e=>{o=0|e}))),o],r[0]?new pr(0,r[1]):(c=[u,new uo(0,i,s)],new pr(1,c))):(l=[u,new uo(0,i,s)],new pr(1,l));var l,c,a,f},fu=e=>n=>{let t,r,o;const i="an uint32",u=e,s=n;return"number"==typeof s?(t=s,isFinite(t)&&Math.floor(t)===t?0<=t&&t<=4294967295?new pr(0,t>>>0):(f=[u,new uo(1,i,t,"Value was either too large or too small for "+i)],new pr(1,f)):(a=[u,new uo(1,i,t,"Value is not an integral value")],new pr(1,a))):"string"==typeof s?(o=0,r=[yo(s,511,!0,32,new yn((()=>o),(e=>{o=e}))),o],r[0]?new pr(0,r[1]):(c=[u,new uo(0,i,s)],new pr(1,c))):(l=[u,new uo(0,i,s)],new pr(1,l));var l,c,a,f};function du(e,n,t,r){let o;const i=t+".["+Xe(e)+"]";if(Array.isArray(r)){const t=r;return e<t.length?n(i,t[e]):new pr(1,[i,new uo(5,"a longer array. Need index `"+Xe(e)+"` but there are only `"+(o=t.length,Xe(o)+"` entries"),r)])}return new pr(1,[i,new uo(0,"an array",r)])}function hu(e,n,t){if(Array.isArray(t)){let r=-1;return _r(vt,Tn(((t,o)=>{if(r=r+1|0,0===t.tag){const i=e(n+".["+Xe(r)+"]",o);return 0===i.tag?new pr(0,ht(i.fields[0],t.fields[0])):new pr(1,i.fields[0])}return t}),new pr(0,dt()),t))}return new pr(1,[n,new uo(0,"a list",t)])}function pu(e,n,t){if(Array.isArray(t)){let r=-1;const o=t;return Tn(((t,o)=>{if(r=r+1|0,0===t.tag){const i=t.fields[0],u=e(n+".["+Xe(r)+"]",o);return 0===u.tag?(i[r]=u.fields[0],new pr(0,i)):new pr(1,u.fields[0])}return t}),new pr(0,kn(new Array(o.length),0,o.length,null)),o)}return new pr(1,[n,new uo(0,"an array",t)])}function _u(e,n,t,r){const o=n(t,r);return 0===o.tag?e(o.fields[0],t,r):new pr(1,o.fields[0])}function mu(e,n){let t;const r=e;return t=e=>n=>du(0,r,e,n),e=>r=>_u(pn(3,(e=>{let t;const r=n;return t=e=>n=>du(1,r,e,n),n=>r=>_u(((n,t,r)=>new pr(0,[e,n])),pn(2,t),n,r)})),pn(2,t),e,r)}function gu(e){return Yr(e)}function wu(e){return function(e,n){return new Qi(e,n)}(n={Compare:an},Ki(n,e));var n}function yu(e,n,t,r){let o,i;return n.length!==r.length?new pr(1,[t,new uo(6,(o=0|r.length,i=0|n.length,Kn(Yn("Expected %i %s but got %i"))(i)(e)(o)))]):Nn(((e,n,r)=>0===r.tag?_r((e=>ht(e,r.fields[0])),n(t)(e)):r),r,n,new pr(0,dt()))}function vu(e,n,t,r,o,i){const u=function(e,n){return n.find((e=>Ci(e)===r))}(0,function(e){if(null!=e.cases)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}(t));if(null!=u){const t=u;return 0===i.length?new pr(0,Oi(t,[])):_r((e=>Oi(t,wt(e))),yu("union fields",In((t=>bu(e,n,!1,t[1])),function(e){return null==e.fields?[]:e.fields}(t)),o,i))}return new pr(1,[o,new uo(6,"Cannot find case "+r+" in "+bi(t))])}function Cu(e,n,t,r){const o=new yn(null),i=function(e,n,t){return function(e,n,t){return Jr(e.comparer,Rr(e.comparer,n,t,e.tree))}(t,e,n)}(bi(r),o,e);let u;if(function(e){return e instanceof di?null!=e.fields:e instanceof wn}(r)){const e=In((e=>[fo(n,Ci(e)),bu(i,n,!1,e[1])]),Ii(r));u=n=>t=>_r((e=>function(e,n){const t=Ii(e);if(t.length!==n.length)throw new Error(`Expected an array of length ${t.length} but got ${n.length}`);return null!=e.construct?new e.construct(...n):t.reduce(((e,[t,r],o)=>(e[t]=n[o],e)),{})}(r,wt(e))),function(e,n,t){return null===t||Object.getPrototypeOf(t||!1)!==Object.prototype?new pr(1,[n,new uo(0,"an object",t)]):function(e,n,t){return n.reduceRight(((n,t)=>e(t,n)),t)}(pn(2,(e=>{const r=e[0];return o=>0===o.tag?_r((e=>ht(e,o.fields[0])),e[1](n+"."+r)(t[r])):o})),e,new pr(0,dt()))}(e,n,t))}else if(function(e){return e instanceof di?null!=e.cases:e instanceof gn}(r))u=e=>t=>{if("string"==typeof t)return vu(i,n,r,t,e,[]);if(Array.isArray(t)){const o=t;return vu(i,n,r,o[0],e,o.slice(1,o.length))}return new pr(1,[e,new uo(0,"a string or array",t)])};else{if(!t){let e;const n=bi(r);throw e=Kn(Yn("Cannot generate auto decoder for %s. Please pass an extra decoder."))(n),new Error(e)}u=e=>n=>new pr(1,[e,new uo(2,"an extra coder for "+bi(r),n)])}return o.contents=u,u}function bu(e,n,t,r){let o,i,u;const s=bi(r),l=function(e,n){return Ur(e.comparer,n,e.tree)}(e,s);if(null==l){if(function(e){return null!=Si(e)}(r)){const t=bu(e,n,!1,Si(r));return e=>n=>pu(pn(2,t),e,n)}if(Ei(r)){const e=bi(function(e){var n;return null===(n=e.generics)||void 0===n?void 0:n[0]}(r));if("System.SByte"===e)return e=>n=>{const t=r,o=e,i=n,u=uu(o)(i);if(1===u.tag)return new pr(1,u.fields[0]);{const e=u.fields[0];return jt(e,xi(t),{Equals:(e,n)=>e===n,GetHashCode:en})?new pr(0,ki(t,e.toString())):new pr(1,[o,new uo(1,bi(t),i,"Unkown value provided for the enum")])}};if("System.Byte"===e)return e=>n=>{const t=r,o=e,i=n,u=su(o)(i);if(1===u.tag)return new pr(1,u.fields[0]);{const e=u.fields[0];return jt(e,xi(t),{Equals:(e,n)=>e===n,GetHashCode:en})?new pr(0,ki(t,e.toString())):new pr(1,[o,new uo(1,bi(t),i,"Unkown value provided for the enum")])}};if("System.Int16"===e)return e=>n=>{const t=r,o=e,i=n,u=lu(o)(i);if(1===u.tag)return new pr(1,u.fields[0]);{const e=u.fields[0];return jt(e,xi(t),{Equals:(e,n)=>e===n,GetHashCode:en})?new pr(0,ki(t,e.toString(s))):new pr(1,[o,new uo(1,bi(t),i,"Unkown value provided for the enum")])}var s};if("System.UInt16"===e)return e=>n=>{const t=r,o=e,i=n,u=cu(o)(i);if(1===u.tag)return new pr(1,u.fields[0]);{const e=u.fields[0];return jt(e,xi(t),{Equals:(e,n)=>e===n,GetHashCode:en})?new pr(0,ki(t,e.toString())):new pr(1,[o,new uo(1,bi(t),i,"Unkown value provided for the enum")])}};if("System.Int32"===e)return e=>n=>{const t=r,o=e,i=n,u=au(o)(i);if(1===u.tag)return new pr(1,u.fields[0]);{const e=u.fields[0];return jt(e,xi(t),{Equals:(e,n)=>e===n,GetHashCode:en})?new pr(0,ki(t,Xe(e))):new pr(1,[o,new uo(1,bi(t),i,"Unkown value provided for the enum")])}};if("System.UInt32"===e)return e=>n=>{const t=r,o=e,i=n,u=fu(o)(i);if(1===u.tag)return new pr(1,u.fields[0]);{const e=u.fields[0];return jt(e,xi(t),{Equals:(e,n)=>e===n,GetHashCode:en})?new pr(0,ki(t,e.toString())):new pr(1,[o,new uo(1,bi(t),i,"Unkown value provided for the enum")])}};{const e=bi(r),n=Xn((e=>{throw new Error(e)}),Yn("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the folluwing enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\nIf you can't use one of these types, please pass an extra decoder.\n "))(e);return e=>n(e)}}if(function(e){return null!=e.generics&&e.generics.length>0}(r)){if(Ti(r)){const t=In((t=>bu(e,n,!1,t)),function(e){if(Ti(e)&&null!=e.generics)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}(r));return e=>n=>Array.isArray(n)?_r((e=>wt(e)),yu("tuple elements",t,e,n)):new pr(1,[e,new uo(0,"an array",n)])}{const s=bi(function(e){return null==e.generics?e:new di(e.fullname,e.generics.map((()=>yi)))}(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===s)return o=bu(e,n,!0,hi(r)[0]),e=>n=>{return t=pn(2,o),r=e,null==(i=n)?new pr(0,void 0):_r(Cn,t(r,i));var t,r,i};if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===s)return i=bu(e,n,!1,hi(r)[0]),e=>n=>hu(pn(2,i),e,n);if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===s){const t=bu(e,n,!1,hi(r)[0]),o=bu(e,n,!1,hi(r)[1]);let i;const s=St([e=>n=>function(e,n,t,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new pr(1,[t,new uo(0,"an object",r)]):Lt(((o,i)=>{if(0===o.tag){const u=e(t,i);if(0===u.tag){const e=n(t+"."+i,r[i]);return 0===e.tag?new pr(0,ht([u.fields[0],e.fields[0]],o.fields[0])):new pr(1,e.fields[0])}return new pr(1,u.fields[0])}return o}),new pr(0,dt()),Object.keys(r))}(pn(2,t),pn(2,o),e,n),(u=mu(pn(2,t),pn(2,o)),e=>n=>hu(pn(2,u),e,n))]);return i=e=>n=>{return t=e,r=n,((e,n)=>{e:for(;;){const o=e,i=n;if(_t(o))return new pr(1,[t,new uo(7,i)]);{const u=ou(t,pn(2,mt(o)),r);if(1===u.tag){e=gt(o),n=Et(i,pt(u.fields[0]));continue e}return new pr(0,u.fields[0])}}})(s,dt());var t,r},e=>n=>function(e,n,t,r){const o=n(t,r);return 1===o.tag?new pr(1,o.fields[0]):new pr(0,e(o.fields[0]))}(gu,pn(2,i),e,n)}if("Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===s){const t=bu(e,n,!1,hi(r)[0]);return e=>n=>{const r=pu(pn(2,t),e,n);return 0===r.tag?new pr(0,wu(r.fields[0])):new pr(1,r.fields[0])}}return Cu(e,n,t,r)}}return"System.Boolean"===s?e=>n=>{return t=e,"boolean"==typeof(r=n)?new pr(0,r):new pr(1,[t,new uo(0,"a boolean",r)]);var t,r}:"Microsoft.FSharp.Core.Unit"===s?e=>n=>{return t=e,null==(r=n)?new pr(0,void 0):new pr(1,[t,new uo(0,"null",r)]);var t,r}:"System.String"===s?e=>n=>{return t=e,"string"==typeof(r=n)?new pr(0,r):new pr(1,[t,new uo(0,"a string",r)]);var t,r}:"System.SByte"===s?uu:"System.Byte"===s?su:"System.Int16"===s?lu:"System.UInt16"===s?cu:"System.Int32"===s?au:"System.UInt32"===s?fu:"System.Double"===s?e=>n=>{return t=e,"number"==typeof(r=n)?new pr(0,r):new pr(1,[t,new uo(0,"a float",r)]);var t,r}:"System.Single"===s?e=>n=>{return t=e,"number"==typeof(r=n)?new pr(0,r):new pr(1,[t,new uo(0,"a float32",r)]);var t,r}:"System.DateTime"===s?e=>n=>function(e,n){if("string"==typeof n){let r,o=Fn(-621355968e5,0);return r=[Un(n,new yn((()=>o),(e=>{o=e}))),o],r[0]?new pr(0,1===(t=r[1]).kind?t:Fn(t.getTime(),1)):new pr(1,[e,new uo(0,"a datetime",n)])}var t;return new pr(1,[e,new uo(0,"a datetime",n)])}(e,n):"System.DateTimeOffset"===s?e=>n=>function(e,n){if("string"==typeof n){let t,r=vo(-621355968e5,0);return t=[Co(n,new yn((()=>r),(e=>{r=e}))),r],t[0]?new pr(0,t[1]):new pr(1,[e,new uo(0,"a datetimeoffset",n)])}return new pr(1,[e,new uo(0,"a datetime",n)])}(e,n):"System.TimeSpan"===s?e=>n=>function(e,n){if("string"==typeof n){let t,r=0;return t=[fi(n,new yn((()=>r),(e=>{r=e}))),r],t[0]?new pr(0,t[1]):new pr(1,[e,new uo(0,"a timespan",n)])}return new pr(1,[e,new uo(0,"a timespan",n)])}(e,n):"System.Guid"===s?e=>n=>function(e,n){if("string"==typeof n){let t,r="00000000-0000-0000-0000-000000000000";return t=[mo(n,new yn((()=>r),(e=>{r=e}))),r],t[0]?new pr(0,t[1]):new pr(1,[e,new uo(0,"a guid",n)])}return new pr(1,[e,new uo(0,"a guid",n)])}(e,n):"System.Object"===s?e=>e=>new pr(0,e):Cu(e,n,t,r)}{const e=l;return n=>t=>e.contents(n)(t)}}function Su(e){return null!=e?(n=(e,n)=>new yn(n[1]),function(e,n){return Jr(e.comparer,Lr(n,e.tree))}(e.Coders,n)):eo();var n}function Eu(e,n,t){const r=Sn(n,new so(0));return bu(Su(t),r,!1,e)}class xu extends wn{constructor(e,n,t){super(),this.PartnerId=e,this.AccountId=n,this.Funds=t}}class ku extends wn{constructor(e,n){super(),this.PartnerFunds=e,this.AccountFunds=n}}class Iu extends wn{constructor(e){super(),this.DefaultFundUSI=e}}function Tu(e){return`${e}/super-selection/admin`}function Ou(e,n){return gr(0,(()=>{const t=(r=function(e){return new yr(0,"Authorization",e)}(Kn(Yn("Bearer %s"))(e)),new vr((o=n).url,o.method,Et(o.headers,pt(r)),o.withCredentials,o.overridenMimeType,o.overridenResponseType,o.timeout,o.content));var r,o;const i=(e=>{return n=e,ur.Bind(n,(e=>(e=>{return n=e,ur.Return(n);var n})(new pr(0,e))));var n})(io(t));return ur.Delay((()=>ur.Bind(i,(e=>{let n;const r=e;return 1===r.tag?ur.Return(new pr(1,r.fields[0])):ur.ReturnFrom((n=r.fields[0],429===n.statusCode||n.statusCode>=500?(o=io(t),ur.Bind(o,(e=>{return n=new pr(0,e),t=n,ur.Return(t);var n,t}))):mr(0,n)));var o}))))}))}function Nu(e,n,t,r){return gr(0,(()=>{let o;const i=Ou(n,oo(new wr(0),ro((o=Tu(e),`${o}/promoted-funds/${t}/${function(e){return null==e?null:bn(e)}(r)}`))));return ur.Delay((()=>ur.Bind(i,(e=>{let n;const t=e;return 1===t.tag?ur.Return(new pr(1,t.fields[0])):ur.ReturnFrom((n=t.fields[0],200===n.statusCode?(o=iu(pn(2,Eu(mi("SuperSelection.AdminUI.Dto.PromotedFunds",[],ku,(()=>[["PartnerFunds",wi(vi)],["AccountFunds",wi(vi)]])),new so(1),void 0)),n.responseText),ur.Return(o)):(r=new pr(1,"Unexpected response from backend"),ur.Return(r))));var r,o}))))}))}class Au extends gn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ColumnHeader"]}}function Mu(e){return e.fields[0]}class Pu extends gn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["RowCell"]}}function Du(e){return new Pu(0,e)}function Fu(e){return e.fields[0]}function Ru(e){return n=d("th",dn(St([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],["scope","col"],["children",e]]))),new Au(0,n);var n}function Uu(e,n){let t;return Du(d("td",dn(St([["className","px-6 py-4 whitespace-nowrap text-sm"],(t=[d("a",{className:"text-indigo-600 hover:text-indigo-900",children:n,href:e})],["children",qt.Children.toArray(Array.from(t))])]))))}function Gu(e,n){return Du(d("td",{className:nt(" ",Ht(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:n}))}function Hu(e,n){let t,r,o,i,u,s,l;return d("div",dn(St([["className","flex flex-col mt-4"],(t=[d("div",dn(St([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[d("div",dn(St([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(o=[d("div",dn(St([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(i=[d("table",dn(St([["className","min-w-full divide-y divide-gray-200"],(u=[d("thead",{className:"bg-gray-50",children:(s=Bt(Mu,e),d("tr",{children:qt.Children.toArray(Array.from(s))}))}),(c=(e,n)=>(n=>{let t;return d("tr",dn(St([["className",e%2==0?"bg-white":"bg-gray-50"],(t=Bt(Fu,n),["children",qt.Children.toArray(Array.from(t))])])))})(n),a=n,l=Gt((()=>Dt(a)),((e,n)=>n["System.Collections.IEnumerator.MoveNext"]()?Cn(c(e,n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),We),d("tbody",{children:qt.Children.toArray(Array.from(l))}))],["children",qt.Children.toArray(Array.from(u))])])))],["children",qt.Children.toArray(Array.from(i))])])))],["children",qt.Children.toArray(Array.from(o))])])))],["children",qt.Children.toArray(Array.from(r))])])))],["children",qt.Children.toArray(Array.from(t))])])));var c,a}const ju=(()=>{try{if("undefined"!=typeof window&&"function"==typeof window.addEventListener){const e={passive:!0};window.addEventListener("testPassiveEventSupport",(e=>{}),e),window.removeEventListener("testPassiveEventSupport",(e=>{}))}}catch(e){}return!1})();function Lu(e){return null!=(n=e)?Cn((e=>e.passive&&!ju?{capture:e.capture,once:e.once,passive:!1}:e)(bn(n))):void 0;var n}function $u(e){return null!=(n=e)?(e=>e.capture?{capture:!0}:void 0)(bn(n)):void 0;var n}function Bu(e,n){return 0===n.indexOf(e)?n:void 0}function Wu(e,n){return function(e,n){const t=e.lastIndexOf(n);return t>=0&&t===e.length-n.length}(n,e)?n:void 0}function qu(e,n){return function(e){return 1===e?e=>{let n,t,r,o,i,u;return n=Bu("/",e),null!=n?(t=n,"#"+t):(r=Bu("#/",e),null!=r?(o=r,o):(i=Bu("#",e),null!=i?(u=i,"#/"+ot(u,1,u.length-1)):"#/"+e))}:e=>{let n,t;return n=Bu("/",e),null!=n?(t=n,t):"/"+e}}(n)(nt("/",xt((e=>e.indexOf("?")>=0||0===e.indexOf("#")||0===e.indexOf("/")?e:encodeURIComponent(e)),e)))}function zu(e,n,t,r,o){const i=function(e,n,t,r){const o=0|an(e,t);if(0===o)throw new Error("The step of a range cannot be zero");const i=o>0;return t=>{const o=0|an(t,n);return i&&o<=0||!i&&o>=0?[t,r(t,e)]:void 0}}(n,t,r,o);return Ft((()=>{return n=i,t=e,Pt((()=>function(e,n){let t,r=n;return At((()=>{if(null!=t){const e=t[0];return t[1],e}return It()}),(()=>{if(t=e(r),null!=t){t[0];const e=t[1];return r=e,!0}return!1}),(()=>{}))}(n,t)));var n,t}))}Vt((e=>{const n=nr((n=>{const t=Sn(e.onUrlChanged,(e=>{}));!function(e,n,t){var r,o;n((r=2===e?window.location.pathname+window.location.search:window.location.hash,o=e,function(e,n){let t,r;const o=st();let i=o,u=n;for(;!ct(u);){let n=e(at(u));for(;!ct(n);)t=i,r=new it(at(n),void 0),t.tail=r,i=r,n=ft(n);u=ft(u)}const s=i,l=st();return s.tail=l,ft(o)}((e=>{if("string"!=typeof(n=e)||/^\s*$/.test(n))return dt();{const n=function(e,...n){return 0===n.length?e.trimEnd():e.replace(new RegExp("["+qn(n.join(""))+"]+$"),"")}(e,"#");if("?"===n)return dt();if(null!=Bu("?",n))return pt(n);{const e=n.split("?");if(On(((e,n)=>e===n),e,null)||1!==e.length){if(On(((e,n)=>e===n),e,null)||2!==e.length)return dt();if(""===e[1]){const n=e[0];return pt(decodeURIComponent(n))}{const n=e[0],t=e[1];return St([decodeURIComponent(n),"?"+t])}}{const n=e[0];return pt(decodeURIComponent(n))}}}var n}),St(rt(null!=Bu("#",r)?ot(r,1,r.length-1):1!==o||null==Wu("#",r)&&null==Wu("#/",r)?r:"",["/"],null,0)))))}(Sn(e.hashMode,1),t)}));if(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0){const e="hashchange",t=n,r=void 0,o=er((()=>Lu(r)),[r]),i=er((()=>$u(r)),[r]),u=er((()=>t),[t]);Yt(nr((()=>{if(null==o)window.addEventListener(e,u);else{const n=o;window.addEventListener(e,u,n)}return Zt((()=>{if(null==i)window.removeEventListener(e,u);else{const n=i;window.removeEventListener(e,u,n)}}))})))}else{const e="popstate",t=n,r=void 0,o=er((()=>Lu(r)),[r]),i=er((()=>$u(r)),[r]),u=er((()=>t),[t]);Yt(nr((()=>{if(null==o)window.addEventListener(e,u);else{const n=o;window.addEventListener(e,u,n)}return Zt((()=>{if(null==i)window.removeEventListener(e,u);else{const n=i;window.removeEventListener(e,u,n)}}))})))}const t="CUSTOM_NAVIGATION_EVENT",r=n,o=void 0,i=er((()=>Lu(o)),[o]),u=er((()=>$u(o)),[o]),s=er((()=>r),[r]);Yt(nr((()=>{if(null==i)window.addEventListener(t,s);else{const e=i;window.addEventListener(t,s,e)}return Zt((()=>{if(null==u)window.removeEventListener(t,s);else{const e=u;window.removeEventListener(t,s,e)}}))})));const l=e.application;return null==l?null:l}),void 0,void 0,void 0);class Vu extends gn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Writable","ReadWritable"]}}class Zu{constructor(e){this.state=new Vu(0,kn(new Array(fn(ln,e,10)),0,fn(ln,e,10),null),0)}}function Ju(e){const n=e.state;if(1===n.tag){const t=0|n.fields[1],r=0|n.fields[2],o=n.fields[0],i=(r+1)%o.length|0;return e.state=i===t?new Vu(0,o,t):new Vu(1,o,t,i),Cn(o[r])}}class Yu extends wn{constructor(e,n,t,r,o,i,u){super(),this.init=e,this.update=n,this.subscribe=t,this.view=r,this.setState=o,this.onError=i,this.syncDispatch=u}}function Xu(e,n){const t=n.init(e),r=t[0],o=new Zu(10);let i=!1,u=r;const s=function(e,n,t){if(null!=n){if(hn in n){n=n[hn];for(let e=0;e<t.length;e++)n=n(t[e]);return n}return _n(t,1,n)}}(0,n.syncDispatch,[e=>{if(i)!function(e,n){const t=e.state;if(1===t.tag){const i=0|t.fields[1],u=0|t.fields[2],s=t.fields[0];s[i]=n;const l=(i+1)%s.length|0;e.state=l===u?new Vu(1,(r=u,o=s,Array.from(Ft((()=>Ht(Wt(r,o),Ft((()=>{return Ht((e=r,n=o,Gt((()=>Dt(n)),((n,t)=>{if(n<e){if(t["System.Collections.IEnumerator.MoveNext"]())return Cn(t["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(kt+"\\nParameter name: source")}}),We)),Ft((()=>{return n=e=>Ut(null),e=o.length,t=zu(0,1,e,0,((e,n)=>e+n)),Ft((()=>Rt(Bt(n,t))));var e,n,t})));var e,n}))))))),s.length,0):new Vu(1,s,l,u)}else{const r=0|t.fields[1],o=t.fields[0];o[r]=n;const i=(r+1)%o.length|0;e.state=new Vu(1,o,i,r)}var r,o}(o,e);else{i=!0;let t=Cn(e);for(;null!=t;){const e=bn(t);try{const t=n.update(e,u),r=t[0];n.setState(r,s),dr((t=>{n.onError([Kn(Yn("Error in command while handling: %A"))(e),t])}),s,t[1]),u=r}catch(t){n.onError([Kn(Yn("Unable to process the message: %A"))(e),t])}t=Ju(o)}i=!1}}]);n.setState(r,s),dr((e=>{n.onError(["Error intitializing:",e])}),s,function(e){const n=st();let t=n;const r=e=>{t=yt(((e,n)=>{const t=new it(n,void 0);return e.tail=t,t}),t,e)};if($e(e))e.forEach(r);else if(e instanceof it)Ct(r,e);else{const n=Ve(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();)r(n["System.Collections.Generic.IEnumerator`1.get_Current"]())}finally{We(n)}}const o=t,i=st();return o.tail=i,ft(n)}(St([(()=>{try{return n.subscribe(r)}catch(e){return n.onError(["Unable to subscribe:",e]),hr()}})(),t[1]])))}class Ku{constructor(){this.hasDisposedOnce=!1,this.state=void 0,this.listener=void 0,this.dispatcher=void 0}}function Qu(){return new Ku}function es(e,n,t,r){Xu(n,function(e,n){return new Yu(n.init,n.update,n.subscribe,n.view,((e,n)=>{!function(e,n,t){e.state=Cn(n),e.dispatcher=t;const r=e.listener;null!=r&&r(n)}(t,e,n)}),n.onError,n.syncDispatch)}(0,e()));const o=function(e){return e.state}(t);if(null!=o)return bn(o);throw new Error("Elmish program has not initialized")}function ns(e,n){return function(e,n,t){const r=Jt(Qu)[0],o=Jt((()=>es(e,n,r))),i=o[1];return Xt((()=>(function(e){return e.hasDisposedOnce}(r)&&i(es(e,n,r)),Zt((()=>{!function(e){const n=e.state;if(null!=n){const e=bn(n);Be(e)&&We(e)}e.dispatcher=void 0,e.state=void 0,e.hasDisposedOnce=!0}(r)})))),Sn(t,[])),function(e,n){null==e.listener&&(e.listener=n)}(r,i),[o[0],e=>{!function(e,n){const t=e.dispatcher;null!=t&&t(n)}(r,e)}]}(e,void 0,n)}function ts(e,n,t){return ns((()=>function(e,n,t){return new Yu(e,n,(e=>hr()),t,((e,n)=>{t(e,n)}),(e=>{var n,t;n=e[0],t=e[1],console.error(Cn(n),t)}),pn(2,(e=>e)))}(e,n,((e,n)=>{}))),t)}function rs(){const e=pt(d("span",{children:["Please wait..."]}));return d("div",{children:qt.Children.toArray(Array.from(e))})}function os(e){const n=pt(d("span",{children:[e.error]}));return d("div",{children:qt.Children.toArray(Array.from(n))})}class is extends gn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LoadData"]}}class us extends wn{constructor(e){super(),this.PromotedFundOverrides=e}}function ss(){return[new us(new ar(0)),hr()]}function ls(e,n){return[new us(e.fields[0]),hr()]}const cs=St([Ru("Partner Id"),Ru("Account Id"),Ru("Promoted Funds")]);function as(e,n){return qu(St(["account-registry","partners",e,"accounts",n,"super-configuration"]),1)}function fs(e){return $e(n=Ft((()=>{let n;return Ht(Ut((n=[(t=e.PartnerId,qu(St(["account-registry","partners",t,"super-configuration"]),1)),e.PartnerId],Uu(n[0],n[1]))),Ft((()=>{let n,t,r;return Ht((n=e.AccountId,null==n?Ut(Gu(["text-gray-500"],"-")):(t=n,Ut((r=[as(e.PartnerId,t),t],Uu(r[0],r[1]))))),Ft((()=>Ut(Gu(["text-gray-500"],nt(", ",e.Funds))))))})));var t})))?St(n):n instanceof it?n:function(e){let n,t;if($e(e))return St(e);if(e instanceof it)return e;{const r=st();let o=r;const i=Ve(e);try{for(;i["System.Collections.IEnumerator.MoveNext"]();){const e=i["System.Collections.Generic.IEnumerator`1.get_Current"]();n=o,t=new it(e,void 0),n.tail=t,o=t}}finally{We(i)}const u=o,s=st();return u.tail=s,ft(r)}}(n);var n}function ds(e){let n;const t=ts(ss,ls);Kt(fr((()=>function(e){return n=e.backendUrl,t=e.accessToken,gr(0,(()=>{let e;const r=Ou(t,oo(new wr(0),ro((e=Tu(n),`${e}/promoted-funds`))));return ur.Delay((()=>ur.Bind(r,(e=>{let n;const t=e;return 1===t.tag?ur.Return(new pr(1,t.fields[0])):ur.ReturnFrom((n=t.fields[0],200===n.statusCode?(o=iu(pn(2,Eu(wi(mi("SuperSelection.AdminUI.Dto.PromotedFundOverride",[],xu,(()=>[["PartnerId",vi],["AccountId",gi(vi)],["Funds",wi(vi)]]))),new so(1),void 0)),n.responseText),ur.Return(o)):(r=new pr(1,"Unexpected response from backend"),ur.Return(r))));var r,o}))))}));var n,t}(e)),(e=>{t[1](new is(0,e))})));const r=t[0].PromotedFundOverrides;let o,i,u,s;switch(1===r.tag?o=0:2===r.tag?0===r.fields[0].tag?(o=3,s=r.fields[0].fields[0]):(o=1,i=r.fields[0].fields[0]):3===r.tag?(o=2,u=r.fields[0]):o=0,o){case 0:return d(rs,null);case 1:return d(os,{error:i});case 2:return d(os,{error:mn(u)});case 3:return d("div",dn(pt((n=[d("h2",{className:"text-xl text-gray-900",children:"Promoted Fund Overrides"}),d("p",{className:"mt-2 text-sm text-gray-700",children:"A list of all promoted fund overrides. This does not include accounts or partners that use the default configuration."}),Hu(cs,xt(fs,s))],["children",qt.Children.toArray(Array.from(n))]))))}}class hs extends wn{constructor(e,n){super(),this.PromotedFunds=e,this.Configuration=n}}class ps extends wn{constructor(e){super(),this.PromotedFunds=e}}class _s extends gn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Account","Partner"]}}class ms extends gn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LoadData"]}}class gs extends wn{constructor(e){super(),this.Data=e}}function ws(){return[new gs(new ar(0)),hr()]}function ys(e,n){return[new gs(e.fields[0]),hr()]}function vs(e){return d("label",{className:"block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2",children:e})}function Cs(e){return d("div",{className:"mt-1 sm:mt-0 sm:col-span-2",children:qt.Children.toArray([e])})}function bs(e,n){let t;return d("div",dn(St([["className","sm:grid sm:grid-cols-4 sm:gap-4 sm:items-start sm:border-b sm:border-gray-200 sm:py-5"],(t=[vs(e),Cs(n)],["children",qt.Children.toArray(Array.from(t))])])))}function Ss(e){return d("input",{type:"text",className:"max-w-lg block w-full shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:max-w-xs sm:text-sm border-gray-300 rounded-md",value:e,readOnly:!0})}function Es(e){const n=pt(d("div",{children:qt.Children.toArray(Array.from(e))}));return d("form",{children:qt.Children.toArray(Array.from(n))})}function xs(e){const n=e.accountId;return null==n?(t=e.backendUrl,r=e.accessToken,o=e.partnerId,gr(0,(()=>{return e=Nu(t,r,o,void 0),ur.Bind(e,(e=>(e=>{return n=e,ur.Return(n);var n})(_r((e=>new _s(1,new ps(e))),e))));var e}))):function(e,n,t,r){return gr(0,(()=>{const o=Nu(e,n,t,r);return ur.Delay((()=>ur.Bind(o,(t=>{const o=t;return 1===o.tag?ur.Return(new pr(1,o.fields[0])):ur.ReturnFrom((i=function(e,n,t){return gr(0,(()=>{let r;const o=Ou(n,oo(new wr(0),ro((r=Tu(e),`${r}/configurations/${t}`))));return ur.Delay((()=>ur.Bind(o,(e=>{let n,t;const r=e;return 1===r.tag?ur.Return(new pr(1,r.fields[0])):ur.ReturnFrom((n=r.fields[0],t=0|n.statusCode,200===t?(i=iu(pn(2,Eu(mi("SuperSelection.AdminUI.Dto.AccountConfiguration",[],Iu,(()=>[["DefaultFundUSI",gi(vi)]])),new so(1),void 0)),n.responseText),ur.Return(i)):404===t?mr(0,new Iu(void 0)):(o=new pr(1,"Unexpected response from backend"),ur.Return(o))));var o,i}))))}))}(e,n,r),ur.Bind(i,(e=>(e=>{return n=e,ur.Return(n);var n})(_r((e=>new _s(0,new hs(o.fields[0],e))),e))))));var i}))))}))}(e.backendUrl,e.accessToken,e.partnerId,n);var t,r,o}function ks(e){const n=[e.PartnerFunds,e.AccountFunds];let t,r;switch(_t(n[0])?_t(n[1])?t=0:(t=2,r=n[1]):_t(n[1])?t=1:(t=2,r=n[1]),t){case 0:return"australian-retirement-trust, slate";case 1:return nt(", ",n[0]);case 2:return nt(", ",r)}}function Is(e){const n=ts(ws,ys);Kt(fr((()=>xs(e)),(e=>{n[1](new ms(0,e))})));const t=n[0].Data;let r,o,i,u;switch(1===t.tag?r=0:2===t.tag?1===t.fields[0].tag?(r=2,i=t.fields[0].fields[0]):(r=1,o=t.fields[0].fields[0]):3===t.tag?(r=3,u=t.fields[0]):r=0,r){case 0:return d(rs,null);case 1:if(1===o.tag){const e=pt(Es([bs("Promoted Funds",Ss(ks(o.fields[0].PromotedFunds)))]));return d("div",{children:qt.Children.toArray(Array.from(e))})}{const e=o.fields[0];return Es([bs("Default USI",Ss(Sn(e.Configuration.DefaultFundUSI,"-"))),bs("Promoted Funds",Ss(ks(e.PromotedFunds)))])}case 2:return d(os,{error:i});case 3:return d(os,{error:mn(u)})}}W((e=>d(ds,e)),"superhero-super-selection"),W((e=>d(Is,e)),"superhero-super-configuration")})();
|
|
1
|
+
(()=>{"use strict";var e,n,t,r,o,i,s,u={},l=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(e,n){for(var t in n)e[t]=n[t];return e}function f(e){var n=e.parentNode;n&&n.removeChild(e)}function d(n,t,r){var o,i,s,u={};for(s in t)"key"==s?o=t[s]:"ref"==s?i=t[s]:u[s]=t[s];if(arguments.length>2&&(u.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof n&&null!=n.defaultProps)for(s in n.defaultProps)void 0===u[s]&&(u[s]=n.defaultProps[s]);return h(n,u,o,i,null)}function h(e,r,o,i,s){var u={type:e,props:r,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==s?++t:s};return null==s&&null!=n.vnode&&n.vnode(u),u}function m(e){return e.children}function p(e,n){this.props=e,this.context=n}function _(e,n){if(null==n)return e.__?_(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?_(e):null}function g(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return g(e)}}function w(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!y.__r++||i!==n.debounceRendering)&&((i=n.debounceRendering)||o)(y)}function y(){for(var e;y.__r=r.length;)e=r.sort((function(e,n){return e.__v.__b-n.__v.__b})),r=[],e.some((function(e){var n,t,r,o,i,s;e.__d&&(i=(o=(n=e).__v).__e,(s=n.__P)&&(t=[],(r=a({},o)).__v=o.__v+1,T(s,o,r,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[i]:null,t,null==i?_(o):i,o.__h),I(t,o),o.__e!=i&&g(o)))}))}function v(e,n,t,r,o,i,s,c,a,f){var d,p,g,w,y,v,b,S=r&&r.__k||l,E=S.length;for(t.__k=[],d=0;d<n.length;d++)if(null!=(w=t.__k[d]=null==(w=n[d])||"boolean"==typeof w?null:"string"==typeof w||"number"==typeof w||"bigint"==typeof w?h(null,w,null,null,w):Array.isArray(w)?h(m,{children:w},null,null,null):w.__b>0?h(w.type,w.props,w.key,null,w.__v):w)){if(w.__=t,w.__b=t.__b+1,null===(g=S[d])||g&&w.key==g.key&&w.type===g.type)S[d]=void 0;else for(p=0;p<E;p++){if((g=S[p])&&w.key==g.key&&w.type===g.type){S[p]=void 0;break}g=null}T(e,w,g=g||u,o,i,s,c,a,f),y=w.__e,(p=w.ref)&&g.ref!=p&&(b||(b=[]),g.ref&&b.push(g.ref,null,w),b.push(p,w.__c||y,w)),null!=y?(null==v&&(v=y),"function"==typeof w.type&&w.__k===g.__k?w.__d=a=C(w,a,e):a=x(e,w,g,S,y,a),"function"==typeof t.type&&(t.__d=a)):a&&g.__e==a&&a.parentNode!=e&&(a=_(g))}for(t.__e=v,d=E;d--;)null!=S[d]&&("function"==typeof t.type&&null!=S[d].__e&&S[d].__e==t.__d&&(t.__d=_(r,d+1)),M(S[d],S[d]));if(b)for(d=0;d<b.length;d++)O(b[d],b[++d],b[++d])}function C(e,n,t){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,n="function"==typeof r.type?C(r,n,t):x(t,r,r,o,r.__e,n));return n}function b(e,n){return n=n||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){b(e,n)})):n.push(e)),n}function x(e,n,t,r,o,i){var s,u,l;if(void 0!==n.__d)s=n.__d,n.__d=void 0;else if(null==t||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),s=null;else{for(u=i,l=0;(u=u.nextSibling)&&l<r.length;l+=2)if(u==o)break e;e.insertBefore(o,i),s=i}return void 0!==s?s:o.nextSibling}function S(e,n,t){"-"===n[0]?e.setProperty(n,t):e[n]=null==t?"":"number"!=typeof t||c.test(n)?t:t+"px"}function E(e,n,t,r,o){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(n in r)t&&n in t||S(e.style,n,"");if(t)for(n in t)r&&t[n]===r[n]||S(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?r||e.addEventListener(n,i?k:A,i):e.removeEventListener(n,i?k:A,i);else if("dangerouslySetInnerHTML"!==n){if(o)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null!=t&&(!1!==t||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,t):e.removeAttribute(n))}}function A(e){this.l[e.type+!1](n.event?n.event(e):e)}function k(e){this.l[e.type+!0](n.event?n.event(e):e)}function T(e,t,r,o,i,s,u,l,c){var f,d,h,_,g,w,y,C,b,x,S,E=t.type;if(void 0!==t.constructor)return null;null!=r.__h&&(c=r.__h,l=t.__e=r.__e,t.__h=null,s=[l]),(f=n.__b)&&f(t);try{e:if("function"==typeof E){if(C=t.props,b=(f=E.contextType)&&o[f.__c],x=f?b?b.props.value:f.__:o,r.__c?y=(d=t.__c=r.__c).__=d.__E:("prototype"in E&&E.prototype.render?t.__c=d=new E(C,x):(t.__c=d=new p(C,x),d.constructor=E,d.render=D),b&&b.sub(d),d.props=C,d.state||(d.state={}),d.context=x,d.__n=o,h=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=E.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=a({},d.__s)),a(d.__s,E.getDerivedStateFromProps(C,d.__s))),_=d.props,g=d.state,h)null==E.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==E.getDerivedStateFromProps&&C!==_&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(C,x),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(C,d.__s,x)||t.__v===r.__v){d.props=C,d.state=d.__s,t.__v!==r.__v&&(d.__d=!1),d.__v=t,t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),d.__h.length&&u.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(C,d.__s,x),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(_,g,w)}))}d.context=x,d.props=C,d.state=d.__s,(f=n.__r)&&f(t),d.__d=!1,d.__v=t,d.__P=e,f=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(o=a(a({},o),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(w=d.getSnapshotBeforeUpdate(_,g)),S=null!=f&&f.type===m&&null==f.key?f.props.children:f,v(e,Array.isArray(S)?S:[S],t,r,o,i,s,u,l,c),d.base=t.__e,t.__h=null,d.__h.length&&u.push(d),y&&(d.__E=d.__=null),d.__e=!1}else null==s&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=N(r.__e,t,r,o,i,s,u,c);(f=n.diffed)&&f(t)}catch(e){t.__v=null,(c||null!=s)&&(t.__e=l,t.__h=!!c,s[s.indexOf(l)]=null),n.__e(e,t,r)}}function I(e,t){n.__c&&n.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){n.__e(e,t.__v)}}))}function N(n,t,r,o,i,s,l,c){var a,d,h,m=r.props,p=t.props,g=t.type,w=0;if("svg"===g&&(i=!0),null!=s)for(;w<s.length;w++)if((a=s[w])&&"setAttribute"in a==!!g&&(g?a.localName===g:3===a.nodeType)){n=a,s[w]=null;break}if(null==n){if(null===g)return document.createTextNode(p);n=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,p.is&&p),s=null,c=!1}if(null===g)m===p||c&&n.data===p||(n.data=p);else{if(s=s&&e.call(n.childNodes),d=(m=r.props||u).dangerouslySetInnerHTML,h=p.dangerouslySetInnerHTML,!c){if(null!=s)for(m={},w=0;w<n.attributes.length;w++)m[n.attributes[w].name]=n.attributes[w].value;(h||d)&&(h&&(d&&h.__html==d.__html||h.__html===n.innerHTML)||(n.innerHTML=h&&h.__html||""))}if(function(e,n,t,r,o){var i;for(i in t)"children"===i||"key"===i||i in n||E(e,i,null,t[i],r);for(i in n)o&&"function"!=typeof n[i]||"children"===i||"key"===i||"value"===i||"checked"===i||t[i]===n[i]||E(e,i,n[i],t[i],r)}(n,p,m,i,c),h)t.__k=[];else if(w=t.props.children,v(n,Array.isArray(w)?w:[w],t,r,o,i&&"foreignObject"!==g,s,l,s?s[0]:r.__k&&_(r,0),c),null!=s)for(w=s.length;w--;)null!=s[w]&&f(s[w]);c||("value"in p&&void 0!==(w=p.value)&&(w!==n.value||"progress"===g&&!w||"option"===g&&w!==m.value)&&E(n,"value",w,m.value,!1),"checked"in p&&void 0!==(w=p.checked)&&w!==n.checked&&E(n,"checked",w,m.checked,!1))}return n}function O(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(e){n.__e(e,r)}}function M(e,t,r){var o,i;if(n.unmount&&n.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||O(o,null,t)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){n.__e(e,t)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&M(o[i],t,"function"!=typeof e.type);r||null==e.__e||f(e.__e),e.__e=e.__d=void 0}function D(e,n,t){return this.constructor(e,t)}function F(t,r,o){var i,s,l;n.__&&n.__(t,r),s=(i="function"==typeof o)?null:o&&o.__k||r.__k,l=[],T(r,t=(!i&&o||r).__k=d(m,null,[t]),s||u,u,void 0!==r.ownerSVGElement,!i&&o?[o]:s?null:r.firstChild?e.call(r.childNodes):null,l,!i&&o?o:s?s.__e:r.firstChild,i),I(l,t)}function U(e,n){F(e,n,U)}function P(n,t,r){var o,i,s,u=a({},n.props);for(s in t)"key"==s?o=t[s]:"ref"==s?i=t[s]:u[s]=t[s];return arguments.length>2&&(u.children=arguments.length>3?e.call(arguments,2):r),h(n.type,u,o||n.key,i||n.ref,null)}function R(){return(R=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function G(e){this.getChildContext=function(){return e.context};var n=e.children,t=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n.indexOf(t=i[r])>=0||(o[t]=e[t]);return o}(e,["context","children"]);return P(n,t)}function j(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=d(G,R({},this._props,{context:e.detail.context}),function e(n,t){if(3===n.nodeType)return n.data;if(1!==n.nodeType)return null;var r=[],o={},i=0,s=n.attributes,u=n.childNodes;for(i=s.length;i--;)"slot"!==s[i].name&&(o[s[i].name]=s[i].value,o[H(s[i].name)]=s[i].value);for(i=u.length;i--;){var l=e(u[i],null),c=u[i].slot;c?o[c]=d(B,{name:c},l):r[i]=l}var a=t?d(B,null,r):r;return d(t||n.nodeName.toLowerCase(),o,a)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?U:F)(this._vdom,this._root)}function H(e){return e.replace(/-(\w)/g,(function(e,n){return n?n.toUpperCase():""}))}function L(e,n,t){if(this._vdom){var r={};r[e]=t=null==t?void 0:t,r[H(e)]=t,this._vdom=P(this._vdom,r),F(this._vdom,this._root)}}function $(){F(this._vdom=null,this._root)}function B(e,n){var t=this;return d("slot",R({},e,{ref:function(e){e?(t.ref=e,t._listener||(t._listener=function(e){e.stopPropagation(),e.detail.context=n},e.addEventListener("_preact",t._listener))):t.ref.removeEventListener("_preact",t._listener)}}))}function V(e,n){!function(e,n,t,r){function o(){var n=Reflect.construct(HTMLElement,[],o);return n._vdomComponent=e,n._root=n,n}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=j,o.prototype.attributeChangedCallback=L,o.prototype.disconnectedCallback=$,t=t||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=t,t.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(n){this._vdom?this.attributeChangedCallback(e,null,n):(this._props||(this._props={}),this._props[e]=n,this.connectedCallback());var t=typeof n;null!=n&&"string"!==t&&"boolean"!==t&&"number"!==t||this.setAttribute(e,n)}})})),customElements.define(n||e.tagName||e.displayName||e.name,o)}(e,n)}e=l.slice,n={__e:function(e,n){for(var t,r,o;n=n.__;)if((t=n.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(e)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(e),o=t.__d),o)return t.__E=t}catch(n){e=n}throw e}},t=0,p.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),"function"==typeof e&&(e=e(a({},t),this.props)),e&&a(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),w(this))},p.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),w(this))},p.prototype.render=m,r=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,y.__r=0,s=0;var z,W,q,Z=0,J=[],Y=n.__b,X=n.__r,K=n.diffed,Q=n.__c,ee=n.unmount;function ne(e,t){n.__h&&n.__h(W,e,Z||t),Z=0;var r=W.__H||(W.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function te(e,n,t){var r=ne(z++,2);return r.t=e,r.__c||(r.__=[t?t(n):fe(void 0,n),function(e){var n=r.t(r.__[0],e);r.__[0]!==n&&(r.__=[n,r.__[1]],r.__c.setState({}))}],r.__c=W),r.__}function re(e,t){var r=ne(z++,3);!n.__s&&ae(r.__H,t)&&(r.__=e,r.__H=t,W.__H.__h.push(r))}function oe(e,t){var r=ne(z++,4);!n.__s&&ae(r.__H,t)&&(r.__=e,r.__H=t,W.__h.push(r))}function ie(e,n){var t=ne(z++,7);return ae(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function se(){for(var e;e=J.shift();)if(e.__P)try{e.__H.__h.forEach(le),e.__H.__h.forEach(ce),e.__H.__h=[]}catch(t){e.__H.__h=[],n.__e(t,e.__v)}}n.__b=function(e){W=null,Y&&Y(e)},n.__r=function(e){X&&X(e),z=0;var n=(W=e.__c).__H;n&&(n.__h.forEach(le),n.__h.forEach(ce),n.__h=[])},n.diffed=function(e){K&&K(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==J.push(t)&&q===n.requestAnimationFrame||((q=n.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(r),ue&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,100);ue&&(n=requestAnimationFrame(t))})(se)),W=null},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(le),e.__h=e.__h.filter((function(e){return!e.__||ce(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(r,e.__v)}})),Q&&Q(e,t)},n.unmount=function(e){ee&&ee(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{le(e)}catch(e){t=e}})),t&&n.__e(t,r.__v))};var ue="function"==typeof requestAnimationFrame;function le(e){var n=W,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),W=n}function ce(e){var n=W;e.__c=e.__(),W=n}function ae(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function fe(e,n){return"function"==typeof n?n(e):n}function de(e,n){for(var t in n)e[t]=n[t];return e}function he(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var r in n)if("__source"!==r&&e[r]!==n[r])return!0;return!1}function me(e){this.props=e}(me.prototype=new p).isPureReactComponent=!0,me.prototype.shouldComponentUpdate=function(e,n){return he(this.props,e)||he(this.state,n)};var pe=n.__b;n.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),pe&&pe(e)};var _e="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ge(e){function n(n,t){var r=de({},n);return delete r.ref,e(r,(t=n.ref||t)&&("object"!=typeof t||"current"in t)?t:null)}return n.$$typeof=_e,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}var we=function(e,n){return null==e?null:b(b(e).map(n))},ye={map:we,forEach:we,count:function(e){return e?b(e).length:0},only:function(e){var n=b(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:b},ve=n.__e;n.__e=function(e,n,t){if(e.then)for(var r,o=n;o=o.__;)if((r=o.__c)&&r.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),r.__c(e,n);ve(e,n,t)};var Ce=n.unmount;function be(){this.__u=0,this.t=null,this.__b=null}function xe(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function Se(){this.u=null,this.o=null}n.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&!0===e.__h&&(e.type=null),Ce&&Ce(e)},(be.prototype=new p).__c=function(e,n){var t=n.__c,r=this;null==r.t&&(r.t=[]),r.t.push(t);var o=xe(r.__v),i=!1,s=function(){i||(i=!0,t.__R=null,o?o(u):u())};t.__R=s;var u=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(n,t,r){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map((function(n){return e(n,t,r)})),n.__c&&n.__c.__P===t&&(n.__e&&r.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=r)),n}(e,e.__c.__P,e.__c.__O)}var n;for(r.setState({__e:r.__b=null});n=r.t.pop();)n.forceUpdate()}},l=!0===n.__h;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(s,s)},be.prototype.componentWillUnmount=function(){this.t=[]},be.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(n,t,r){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),n.__c.__H=null),null!=(n=de({},n)).__c&&(n.__c.__P===r&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map((function(n){return e(n,t,r)}))),n}(this.__b,t,r.__O=r.__P)}this.__b=null}var o=n.__e&&d(m,null,e.fallback);return o&&(o.__h=null),[d(m,null,n.__e?null:e.children),o]};var Ee=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.u=t=t[2]}};function Ae(e){return this.getChildContext=function(){return e.context},e.children}function ke(e){var n=this,t=e.i;n.componentWillUnmount=function(){F(null,n.l),n.l=null,n.i=null},n.i&&n.i!==t&&n.componentWillUnmount(),e.__v?(n.l||(n.i=t,n.l={nodeType:1,parentNode:t,childNodes:[],appendChild:function(e){this.childNodes.push(e),n.i.appendChild(e)},insertBefore:function(e,t){this.childNodes.push(e),n.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),n.i.removeChild(e)}}),F(d(Ae,{context:n.context},e.__v),n.l)):n.l&&n.componentWillUnmount()}(Se.prototype=new p).__e=function(e){var n=this,t=xe(n.__v),r=n.o.get(e);return r[0]++,function(o){var i=function(){n.props.revealOrder?(r.push(o),Ee(n,e,r)):o()};t?t(i):i()}},Se.prototype.render=function(e){this.u=null,this.o=new Map;var n=b(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var t=n.length;t--;)this.o.set(n[t],this.u=[1,0,this.u]);return e.children},Se.prototype.componentDidUpdate=Se.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(n,t){Ee(e,t,n)}))};var Te="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ie=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ne="undefined"!=typeof document,Oe=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};p.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(p.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})}));var Me=n.event;function De(){}function Fe(){return this.cancelBubble}function Ue(){return this.defaultPrevented}n.event=function(e){return Me&&(e=Me(e)),e.persist=De,e.isPropagationStopped=Fe,e.isDefaultPrevented=Ue,e.nativeEvent=e};var Pe,Re={configurable:!0,get:function(){return this.class}},Ge=n.vnode;n.vnode=function(e){var n=e.type,t=e.props,r=t;if("string"==typeof n){var o=-1===n.indexOf("-");for(var i in r={},t){var s=t[i];Ne&&"children"===i&&"noscript"===n||"value"===i&&"defaultValue"in t&&null==s||("defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===s?s="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+n)&&!Oe(t.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&Ie.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===s&&(s=void 0),r[i]=s)}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=b(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=b(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,t.class!=t.className&&(Re.enumerable="className"in t,null!=t.className&&(r.class=t.className),Object.defineProperty(r,"className",Re))}e.$$typeof=Te,Ge&&Ge(e)};var je=n.__r;n.__r=function(e){je&&je(e),Pe=e.__c};var He={ReactCurrentDispatcher:{current:{readContext:function(e){return Pe.__n[e.__c].props.value}}}};function Le(e){return!!e&&e.$$typeof===Te}const $e={useState:function(e){return Z=1,te(fe,e)},useReducer:te,useEffect:re,useLayoutEffect:oe,useRef:function(e){return Z=5,ie((function(){return{current:e}}),[])},useImperativeHandle:function(e,n,t){Z=6,oe((function(){"function"==typeof e?e(n()):e&&(e.current=n())}),null==t?t:t.concat(e))},useMemo:ie,useCallback:function(e,n){return Z=8,ie((function(){return e}),n)},useContext:function(e){var n=W.context[e.__c],t=ne(z++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(W)),n.props.value):e.__},useDebugValue:function(e,t){n.useDebugValue&&n.useDebugValue(t?t(e):e)},version:"17.0.2",Children:ye,render:function(e,n,t){return null==n.__k&&(n.textContent=""),F(e,n),"function"==typeof t&&t(),e?e.__c:null},hydrate:function(e,n,t){return U(e,n),"function"==typeof t&&t(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(F(null,e),!0)},createPortal:function(e,n){return d(ke,{__v:e,i:n})},createElement:d,createContext:function(e,n){var t={__c:n="__cC"+s++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,r;return this.getChildContext||(t=[],(r={})[n]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some(w)},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t},createFactory:function(e){return d.bind(null,e)},cloneElement:function(e){return Le(e)?P.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:m,isValidElement:Le,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:p,PureComponent:me,memo:function(e,n){function t(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!r:he(this.props,e)}function r(n){return this.shouldComponentUpdate=t,d(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:ge,flushSync:function(e,n){return e(n)},unstable_batchedUpdates:function(e,n){return e(n)},StrictMode:m,Suspense:be,SuspenseList:Se,lazy:function(e){var n,t,r;function o(o){if(n||(n=e()).then((function(e){t=e.default||e}),(function(e){r=e})),r)throw r;if(!t)throw n;return d(t,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:He};function Be(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function Ve(e){return"function"==typeof e.GetHashCode}function ze(e){return null!=e&&"function"==typeof e.Dispose}function We(e){ze(e)&&e.Dispose()}function qe(e,n){return Object.getPrototypeOf(e).constructor===Object.getPrototypeOf(n).constructor}class Ze{constructor(e){this.iter=e}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this.iter.next();return this.current=e.value,!e.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function Je(e){return"function"==typeof e.GetEnumerator?e.GetEnumerator():new Ze(e[Symbol.iterator]())}function Ye(e){return{[Symbol.iterator](){return this},next(){const n=e["System.Collections.IEnumerator.MoveNext"]();return{done:!n,value:n?e["System.Collections.IEnumerator.get_Current"]():void 0}}}}class Xe{constructor(e){this.factory=e,this.isValueCreated=!1}get Value(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}get IsValueCreated(){return this.isValueCreated}}function Ke(e,n){let t=e.toString(10);for(;t.length<n;)t="0"+t;return t}function Qe(e){const n=e;return"number"==typeof n.offset?n.offset:1===e.kind?0:-6e4*e.getTimezoneOffset()}function en(e,n){return(e=e<0&&null!=n&&10!==n?4294967295+e+1:e).toString(n)}class nn{static id(e){return nn.idMap.has(e)||nn.idMap.set(e,++nn.count),nn.idMap.get(e)}}function tn(e){let n=0,t=5381;const r=e.length;for(;n<r;)t=33*t^e.charCodeAt(n++);return t}function rn(e){return 2654435761*e|0}function on(e){return 0===e.length?0:e.reduce(((e,n)=>(e<<5)+e^n))}function sn(e){if(null==e)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return rn(e);case"string":return tn(e);default:if(Ve(e))return e.GetHashCode();if(Be(e))return function(e){const n=e.length,t=new Array(n);for(let r=0;r<n;r++)t[r]=sn(e[r]);return on(t)}(e);if(e instanceof Date)return function(e){return e.getTime()}(e);if(Object.getPrototypeOf(e).constructor===Object){const n=Object.values(e).map((e=>sn(e)));return on(n)}return rn(nn.id(e))}}function un(e){return null==e?0:Ve(e)?e.GetHashCode():rn(nn.id(e))}function ln(e,n,t){if(null==e)return null==n;if(null==n)return!1;if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1;return!0}function cn(e,n){return ln(e,n,an)}function an(e,n){return e===n||(null==e?null==n:null!=n&&"object"==typeof e&&(function(e){return"function"==typeof e.Equals}(e)?e.Equals(n):Be(e)?Be(n)&&cn(e,n):e instanceof Date?n instanceof Date&&0===fn(e,n):Object.getPrototypeOf(e).constructor===Object&&function(e,n){const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;t.sort(),r.sort();for(let o=0;o<t.length;o++)if(t[o]!==r[o]||!an(e[t[o]],n[r[o]]))return!1;return!0}(e,n)))}function fn(e,n){let t,r;return"offset"in e&&"offset"in n?(t=e.getTime(),r=n.getTime()):(t=e.getTime()+Qe(e),r=n.getTime()+Qe(n)),t===r?0:t<r?-1:1}function dn(e,n){return e===n?0:e<n?-1:1}function hn(e,n){return function(e,n,t){if(null==e)return null==n?0:1;if(null==n)return-1;if(e.length!==n.length)return e.length<n.length?-1:1;for(let r=0,o=0;r<e.length;r++)if(o=t(e[r],n[r]),0!==o)return o;return 0}(e,n,mn)}function mn(e,n){return e===n?0:null==e?null==n?0:-1:null==n?1:"object"!=typeof e?e<n?-1:1:function(e){return"function"==typeof e.CompareTo}(e)?e.CompareTo(n):Be(e)?Be(n)?hn(e,n):-1:e instanceof Date?n instanceof Date?fn(e,n):-1:Object.getPrototypeOf(e).constructor===Object?function(e,n){const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return t.length<r.length?-1:1;t.sort(),r.sort();for(let o=0,i=0;o<t.length;o++){const s=t[o];if(s!==r[o])return s<r[o]?-1:1;if(i=mn(e[s],n[s]),0!==i)return i}return 0}(e,n):-1}function pn(e,n,t){return e(n,t)>0?n:t}function _n(e){const n={};for(const t of e)n[t[0]]=t[1];return n}nn.idMap=new WeakMap,nn.count=0;const gn=Symbol("curried");function wn(e,n){if(null==n||n.length>1)return n;const t=(...t)=>{let r=n;for(let n=0;n<e;n++)r=r(t[n]);return r};return t[gn]=n,t}function yn(e,n,t){return r=>1===n?t(...e.concat([r])):yn(e.concat([r]),n-1,t)}function vn(e,n,t){if(null!=n){if(gn in n){n=n[gn];for(let e=0;e<t.length;e++)n=n(t[e]);return n}return yn(t,e,n)}}function Cn(e,n=0){if(null!=e&&"object"==typeof e){if("function"==typeof e.toString)return e.toString();if(Symbol.iterator in e)return function(e){let n=0,t="[";for(const r of e){if(0===n)t+=Cn(r);else{if(100===n){t+="; ...";break}t+="; "+Cn(r)}n++}return t+"]"}(e);{const t=Object.getPrototypeOf(e).constructor;return t===Object&&n<10?"{ "+Object.entries(e).map((([e,t])=>e+" = "+Cn(t,n+1))).join("\n ")+" }":t.name}}return String(e)}class bn{get name(){return this.cases()[this.tag]}toJSON(){return 0===this.fields.length?this.name:[this.name].concat(this.fields)}toString(){return function(e,n){if(0===n.length)return e;{let t="",r=!0;return 1===n.length?(t=Cn(n[0]),r=t.indexOf(" ")>=0):t=n.map((e=>Cn(e))).join(", "),e+(r?" (":" ")+t+(r?")":"")}}(this.name,this.fields)}GetHashCode(){const e=this.fields.map((e=>sn(e)));return e.splice(0,0,rn(this.tag)),on(e)}Equals(e){return this===e||!!qe(this,e)&&this.tag===e.tag&&cn(this.fields,e.fields)}CompareTo(e){return this===e?0:qe(this,e)?this.tag===e.tag?hn(this.fields,e.fields):this.tag<e.tag?-1:1:-1}}class xn{toJSON(){return function(e){const n={},t=Object.keys(e);for(let r=0;r<t.length;r++)n[t[r]]=e[t[r]];return n}(this)}toString(){return e=this,"{ "+Object.entries(e).map((([e,n])=>e+" = "+Cn(n))).join("\n ")+" }";var e}GetHashCode(){return function(e){const n=Object.values(e).map((e=>sn(e)));return on(n)}(this)}Equals(e){return function(e,n){if(e===n)return!0;if(qe(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++)if(!an(e[t[r]],n[t[r]]))return!1;return!0}return!1}(this,e)}CompareTo(e){return function(e,n){if(e===n)return 0;if(qe(e,n)){const t=Object.keys(e);for(let r=0;r<t.length;r++){const o=mn(e[t[r]],n[t[r]]);if(0!==o)return o}return 0}return-1}(this,e)}}class Sn{constructor(e,n){"function"==typeof n?(this.getter=e,this.setter=n):(this.getter=()=>e,this.setter=n=>{e=n})}get contents(){return this.getter()}set contents(e){this.setter(e)}}class En{constructor(e){this.value=e}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return sn(this.value)}Equals(e){return null!=e&&an(this.value,e instanceof En?e.value:e)}CompareTo(e){return null==e?1:mn(this.value,e instanceof En?e.value:e)}}function An(e){return null==e||e instanceof En?new En(e):e}function kn(e){if(null==e)throw new Error("Option has no value");return e instanceof En?e.value:e}function Tn(e){return null==e?[]:[kn(e)]}function In(e,n){return null!=e?kn(e):n}function Nn(e,n){return null!=n?An(e(kn(n))):void 0}function On(){return e=mn,{Compare:(n,t)=>e(n,t)};var e}function Mn(e,n){return"function"==typeof e?new e(n):new Array(n)}function Dn(e,n,t,r){const o=0|n;return e.fill(r,o,o+t)}function Fn(e,n,t){const r=0|n.length,o=Mn(t,r);for(let t=0;t<=r-1;t++)o[t]=e(n[t]);return o}function Un(e,n,t){return t.reduce(e,n)}function Pn(e,n,t){if(null==n)return null==t;if(null==t)return!1;{let r=0,o=!0;const i=0|n.length,s=0|t.length;if(i>s)return!1;if(i<s)return!1;for(;r<i&&o;)o=e(n[r],t[r]),r=r+1|0;return o}}function Rn(e,n,t,r){return function(e,n,t,r){let o=r;n.length!==t.length&&function(){throw new Error("Arrays had different lengths")}();const i=0|n.length;for(let r=1;r<=i;r++)o=e(0,n[i-r],t[i-r],o);return o}(((n,t,r,o)=>e(t,r,o)),n,t,r)}function Gn(e){const n=e<0,t=(e=Math.abs(e))%36e5/6e4;return(n?"-":"+")+Ke(~~(e/36e5),2)+":"+Ke(t,2)}function jn(e,n){const t=e.toISOString();return"first"===n?t.substring(0,t.indexOf("T")):t.substring(t.indexOf("T")+1,t.length-1)}function Hn(e,n,t){return n.replace(/(\w)\1*/g,(n=>{let r=Number.NaN;switch(n.substring(0,1)){case"y":const o=t?e.getUTCFullYear():e.getFullYear();r=n.length<4?o%100:o;break;case"M":r=(t?e.getUTCMonth():e.getMonth())+1;break;case"d":r=t?e.getUTCDate():e.getDate();break;case"H":r=t?e.getUTCHours():e.getHours();break;case"h":const i=t?e.getUTCHours():e.getHours();r=i>12?i%12:i;break;case"m":r=t?e.getUTCMinutes():e.getMinutes();break;case"s":r=t?e.getUTCSeconds():e.getSeconds();break;case"f":r=t?e.getUTCMilliseconds():e.getMilliseconds()}return Number.isNaN(r)?n:r<10&&n.length>1?"0"+r:""+r}))}function Ln(e,n,t){return null!=e.offset?function(e,n){var t,r,o;const i=new Date(e.getTime()+(null!==(t=e.offset)&&void 0!==t?t:0));if("string"!=typeof n)return i.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+Gn(null!==(r=e.offset)&&void 0!==r?r:0);if(1!==n.length)return Hn(i,n,!0);switch(n){case"D":case"d":return jn(i,"first");case"T":case"t":return jn(i,"second");case"O":case"o":return function(e,n){const t=e.toISOString();return t.substring(0,t.length-1)+Gn(n)}(i,null!==(o=e.offset)&&void 0!==o?o:0);default:throw new Error("Unrecognized Date print format")}}(e,n):function(e,n){const t=1===e.kind;if("string"!=typeof n)return t?e.toUTCString():e.toLocaleString();if(1!==n.length)return Hn(e,n,t);switch(n){case"D":case"d":return t?jn(e,"first"):e.toLocaleDateString();case"T":case"t":return t?jn(e,"second"):e.toLocaleTimeString();case"O":case"o":return function(e,n){if(n)return e.toISOString();{const n=null==e.kind||2===e.kind;return Ke(e.getFullYear(),4)+"-"+Ke(e.getMonth()+1,2)+"-"+Ke(e.getDate(),2)+"T"+Ke(e.getHours(),2)+":"+Ke(e.getMinutes(),2)+":"+Ke(e.getSeconds(),2)+"."+Ke(e.getMilliseconds(),3)+(n?Gn(-6e4*e.getTimezoneOffset()):"")}}(e,t);default:throw new Error("Unrecognized Date print format")}}(e,n)}function $n(e,n){const t=new Date(e);return t.kind=0|(null==n?0:n),t}function Bn(e){function n(){throw new Error(`The string is not a valid Date: ${e}`)}null!=e&&""!==e.trim()||n(),10===e.length&&"-"===e[4]&&"-"===e[7]&&(e+="T00:00:00");let t=new Date(e),r=null;if(isNaN(t.getTime())){const o=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(e);if(null!=o){let e,n=0;if(null!=o[2]){const e=o[2].split(":");n=3600*parseInt(e[0],10)+60*parseInt(e[1]||"0",10)+parseFloat(e[2]||"0"),null!=o[3]&&"PM"===o[3].toUpperCase()&&(n+=720)}if(null!=o[4]){if(null!=o[1])e=new Date(o[1]+" UTC");else{const n=new Date;e=new Date(n.getUTCFullYear()+"/"+(n.getUTCMonth()+1)+"/"+n.getUTCDate())}if("Z"===o[4])r="Z";else{let e=60*parseInt(o[5],10)+parseInt(o[6]||"0",10);"-"===o[4][0]&&(e*=-1),r=e,n-=60*e}}else if(null!=o[1])e=new Date(o[1]);else{const n=new Date;e=new Date(n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate())}t=new Date(e.getTime()+1e3*n),t=new Date(t.getTime()+6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))}else n();isNaN(t.getTime())&&n()}return[t,r]}function Vn(e,n){try{return n.contents=function(e,n=!1){const[t,r]=Bn(e),o=null!=r?n&&"Z"===r?1:2:0;return $n(t.getTime(),o)}(e),!0}catch(e){return!1}}const zn=Symbol("numeric");function Wn(e){return"number"==typeof e||(null==e?void 0:e[zn])}function qn(e,n){return"number"==typeof e?e*n:e[zn]().multiply(n)}function Zn(e,n){return"number"==typeof e?e.toFixed(n):e[zn]().toFixed(n)}function Jn(e,n){return"number"==typeof e?e.toPrecision(n):e[zn]().toPrecision(n)}function Yn(e,n){return"number"==typeof e?e.toExponential(n):e[zn]().toExponential(n)}function Xn(e){return"number"==typeof e?(Number(e)>>>0).toString(16):e[zn]().toHex()}function Kn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Qn(e,n,t=0){if(e.lastIndex=t,!e.global)throw new Error("Non-global RegExp");let r=e.exec(n);const o=[];for(;null!==r;)o.push(r),r=e.exec(n);return o}const et=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,nt=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function tt(e,n){return function(e,n){return"number"==typeof e?e<n?-1:e>n?1:0:e.CompareTo(n)}(e,n)<0}function rt(e){return{input:e,cont:(n=e,e=>{et.lastIndex=0;const t=[],r=[];let o=0,i=et.exec(n);for(;i;){const e=i.index+(i[1]||"").length;t.push(n.substring(o,e).replace(/%%/g,"%")),r.push(i),o=et.lastIndex,et.lastIndex-=1,i=et.exec(n)}return 0===t.length?e(n.replace(/%%/g,"%")):(t.push(n.substring(o).replace(/%%/g,"%")),lt(e,t,r))})};var n}function ot(e,n){return"string"==typeof n?e(n):n.cont(e)}function it(e){return ot((e=>e),e)}function st(e){return ot((e=>{throw new Error(e)}),e)}function ut(e,n,t,r,o){let i="";if(n=n||"",o=o||"",Wn(e))switch("x"!==o.toLowerCase()&&(tt(e,0)?(e=qn(e,-1),i="-"):n.indexOf(" ")>=0?i=" ":n.indexOf("+")>=0&&(i="+")),r=null==r?null:parseInt(r,10),o){case"f":case"F":e=Zn(e,r=null!=r?r:6);break;case"g":case"G":e=null!=r?Jn(e,r):Jn(e);break;case"e":case"E":e=null!=r?Yn(e,r):Yn(e);break;case"x":e=Xn(e);break;case"X":e=Xn(e).toUpperCase();break;default:e=String(e)}else e=e instanceof Date?Ln(e):Cn(e);if(t="number"==typeof t?t:parseInt(t,10),isNaN(t))e=i+e;else{const r=n.indexOf("0")>=0,o=n.indexOf("-")>=0,s=o||!r?" ":"0";e="0"===s?i+(e=at(e,t-i.length,s,o)):at(i+e,t,s,o)}return e}function lt(e,n,t,r="",o=-1){return(...i)=>{let s=r;const u=n.slice(),l=t.slice();for(const e of i){const[,,n,t,r,i]=l[0];let c=t;if(o>=0)c=o,o=-1;else if("*"===c){if(e<0)throw new Error("Non-negative number required");o=e;continue}s+=u[0],s+=ut(e,n,c,r,i),u.splice(0,1),l.splice(0,1)}return 0===l.length?(s+=u[0],e(s)):lt(e,u,l,s,o)}}function ct(e,n){return Array.isArray(n)?n.join(e):Array.from(n).join(e)}function at(e,n,t,r){t=t||" ",n-=e.length;for(let o=0;o<n;o++)e=r?e+t:t+e;return e}function ft(e,n,t,r){if(r="number"==typeof r?r:0,(t="number"==typeof t?t:void 0)&&t<0)throw new Error("Count cannot be less than zero");if(0===t)return[];const o=1==(1&r),i=2==(2&r);n=(n=n||[]).filter((e=>e)).map(Kn),n=n.length>0?n:["\\s"];const s=[],u=new RegExp(n.join("|"),"g");let l=!0,c=0;do{const n=u.exec(e);if(null===n){const n=i?e.substring(c).trim():e.substring(c);(!o||n.length>0)&&s.push(n),l=!1}else{const r=i?e.substring(c,n.index).trim():e.substring(c,n.index);(!o||r.length>0)&&(null!=t&&s.length+1===t?(s.push(i?e.substring(c).trim():e.substring(c)),l=!1):s.push(r)),c=u.lastIndex}}while(l);return s}function dt(e,n,t){if(n+(t||0)>e.length)throw new Error("Invalid startIndex and/or length");return null!=t?e.substr(n,t):e.substr(n)}class ht extends xn{constructor(e,n){super(),this.head=e,this.tail=n}toString(){return"["+ct("; ",this)+"]"}Equals(e){return this===e||((e,n)=>{e:for(;;){const t=e,r=n,o=[t.tail,r.tail];if(null!=o[0]){if(null!=o[1]){const i=o[0],s=o[1];if(an(t.head,r.head)){e=i,n=s;continue e}return!1}return!1}return null==o[1]}})(this,e)}GetHashCode(){return 0|((e,n,t)=>{for(;;){const r=e,o=n,i=t,s=i.tail;if(null==s)return 0|o;{const u=s;if(r>18)return 0|o;e=r+1,n=(o<<1)+sn(i.head)+631*r,t=u}}})(0,0,this)}toJSON(e){return Array.from(this)}CompareTo(e){return 0|((e,n)=>{e:for(;;){const t=e,r=n,o=[t.tail,r.tail];if(null!=o[0]){if(null!=o[1]){const i=o[0],s=o[1],u=0|mn(t.head,r.head);if(0===u){e=i,n=s;continue e}return 0|u}return 1}return null!=o[1]?-1:0}})(this,e)}GetEnumerator(){return new mt(this)}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Je(this)}}class mt{constructor(e){this.xs=e,this.it=this.xs,this.current=null}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this,n=e.it.tail;if(null!=n){const t=n;return e.current=e.it.head,e.it=t,!0}return!1}"System.Collections.IEnumerator.Reset"(){const e=this;e.it=e.xs,e.current=null}Dispose(){}}function pt(){return new ht(null,void 0)}function _t(e,n){return new ht(e,n)}function gt(e){return null==e.tail}function wt(e){if(null!=e.tail)return e.head;throw new Error("Collection was empty.\\nParameter name: list")}function yt(e){const n=e.tail;if(null!=n)return n;throw new Error("Collection was empty.\\nParameter name: list")}function vt(){return pt()}function Ct(e,n){return _t(e,n)}function bt(e){return _t(e,pt())}function xt(e){return gt(e)}function St(e){return wt(e)}function Et(e){return yt(e)}function At(e){const n=0|function(e){return 0|((e,n)=>{for(;;){const t=e,r=n.tail;if(null==r)return 0|t;e=t+1,n=r}})(0,e)}(e),t=Dn(new Array(n),0,n,null);return((e,n)=>{for(;;){const r=e,o=n;if(gt(o))break;t[r]=wt(o),e=r+1,n=yt(o)}})(0,e),t}function kt(e,n,t){let r=n,o=t;for(;!gt(o);)r=e(r,wt(o)),o=yt(o);return r}function Tt(e){return kt(((e,n)=>_t(n,e)),pt(),e)}function It(e,n){kt(((n,t)=>{e(t)}),void 0,n)}function Nt(e,n){let t=n;for(let n=e.length-1;n>=0;n--)t=_t(e[n],t);return t}function Ot(e){return Nt(e,pt())}function Mt(e,n){return kt(((e,n)=>_t(n,e)),n,Tt(e))}function Dt(e,n){const t=pt(),r=kt(((n,t)=>{let r;return r=new ht(e(t),void 0),n.tail=r,r}),t,n),o=pt();return r.tail=o,yt(t)}function Ft(e,n,t){return null!=function(e,n){return((n,t)=>{for(;;){const r=n,o=t;if(gt(o))return;if(e(wt(o)))return r;n=r+1,t=yt(o)}})(0,n)}((n=>t.Equals(e,n)),n)}const Ut="The input sequence has an insufficient number of elements.";function Pt(){throw new Error("Enumeration has not started. Call MoveNext.")}function Rt(){throw new Error("Enumeration already finished.")}class Gt{constructor(e){this.f=e}toString(){let e=0,n="seq [";const t=Je(this);try{for(;e<4&&t["System.Collections.IEnumerator.MoveNext"]();)e>0&&(n+="; "),n+=Cn(t["System.Collections.Generic.IEnumerator`1.get_Current"]()),e=e+1|0;return 4===e&&(n+="; ..."),n+"]"}finally{We(t)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}class jt{constructor(e,n,t){this.current=e,this.next=n,this.dispose=t}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){!function(){throw new Error("Reset is not supported on this enumerator.")}()}Dispose(){this.dispose()}}function Ht(e,n,t){return new jt(e,n,t)}function Lt(e,n,t){let r,o=!1,i=An(e());const s=()=>{if(null!=i){const e=kn(i);try{t(e)}finally{i=void 0}}},u=()=>{try{s()}finally{r=void 0}};return Ht((()=>(o||Pt(),null!=r?kn(r):Rt())),(()=>{if(o||(o=!0),null!=i){const e=kn(i);let t;try{t=n(e)}catch(e){throw u(),e}return null!=t?(r=t,!0):(u(),!1)}return!1}),s)}function $t(e){return function(e){return new Gt(e)}(e)}function Bt(e){return n="source",null==e&&function(e){throw new Error(e)}(n),Je(e);var n}function Vt(e){return $t((()=>Je(e())))}function zt(e){return $t((()=>function(e){let n,t,r,o=!1,i=!1;const s=()=>{if(i=!0,null!=t){const e=t;try{We(e)}finally{t=void 0}}if(null!=n){const e=n;try{We(e)}finally{n=void 0}}};return Ht((()=>(o?i&&Rt():Pt(),null!=r?kn(r):Rt())),(()=>{let u;if(o||(o=!0),i)return!1;{let o;for(;null==o;){const i=[n,t];if(null!=i[0])if(null!=i[1]){const e=i[1];if(e["System.Collections.IEnumerator.MoveNext"]())r=An(e["System.Collections.Generic.IEnumerator`1.get_Current"]()),o=!0;else try{We(e)}finally{t=void 0}}else{const e=i[0];e["System.Collections.IEnumerator.MoveNext"]()?(u=e["System.Collections.Generic.IEnumerator`1.get_Current"](),t=Je(u)):(s(),o=!1)}else n=Je(e)}return kn(o)}}),(()=>{i||s()}))}(e)))}function Wt(e){return Vt((()=>function(e,n){const t=Mn(void 0,1);return t[0]=e,t}(e)))}function qt(e){return Be(e)?Ot(e):e instanceof ht?e:function(e){let n,t;if(Be(e))return Ot(e);if(e instanceof ht)return e;{const r=pt();let o=r;const i=Je(e);try{for(;i["System.Collections.IEnumerator.MoveNext"]();){const e=i["System.Collections.Generic.IEnumerator`1.get_Current"]();n=o,t=new ht(e,void 0),n.tail=t,o=t}}finally{We(i)}const s=o,u=pt();return s.tail=u,yt(r)}}(e)}function Zt(e,n,t){return $t((()=>{let r=-1;return Lt(e,(e=>(r=r+1|0,n(r,e))),t)}))}function Jt(e,n){return zt([e,n])}function Yt(e,n,t){const r=Bt(n);try{let n=!1;for(;!n&&r["System.Collections.IEnumerator.MoveNext"]();)n=t.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}finally{We(r)}}function Xt(e,n,t){const r=Bt(t);try{let t=n;for(;r["System.Collections.IEnumerator.MoveNext"]();)t=e(t,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}finally{We(r)}}function Kt(e,n){Xt(((n,t)=>{e(t)}),void 0,n)}function Qt(e,n){return t=()=>Bt(n),r=n=>n["System.Collections.IEnumerator.MoveNext"]()?An(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,o=We,$t((()=>Lt(t,r,o)));var t,r,o}function er(e,n){return Zt((()=>Bt(n)),((n,t)=>t["System.Collections.IEnumerator.MoveNext"]()?An(e(n,t["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),We)}function nr(e,n){return $t((()=>{const t=Bt(n);try{for(let n=1;n<=e;n++)if(!t["System.Collections.IEnumerator.MoveNext"]())throw new Error(Ut+"\\nParameter name: source");return function(e,n){return Ht((()=>n["System.Collections.Generic.IEnumerator`1.get_Current"]()),(()=>n["System.Collections.IEnumerator.MoveNext"]()),(()=>{try{We(n)}finally{e()}}))}((()=>{}),t)}catch(e){throw We(t),e}}))}Symbol.iterator;const tr=$e,rr=(e,n)=>{re((()=>{const n=e();return()=>{n.Dispose()}}),n)};function or(e,n,t,r){const o=tr.memo(e,wn(2,In(function(e,n){return null==n||1===n.length?n:gn in n?n[gn]:yn([],e,n)}(2,t),null)));return Kt((n=>{e.displayName=n}),Tn(n)),e=>{const n=function(e,n){if(null==e)return n;{const t=e;return n.key=t(n),n}}(r,e);return tr.createElement(o,n)}}function ir(e){return{Dispose(){e()}}}function sr(e){return tr.useState(e)}function ur(e){var n;n=e,re((()=>{const e=n();return()=>{e.Dispose()}}))}function lr(e,n){rr(e,n)}function cr(e){!function(e,n){rr((n=>(e(),ir((()=>{})))),[])}(e)}function ar(e){return tr.useRef(e)}function fr(e,n){const t=In(n,[]);return tr.useMemo(e,t)}function dr(e){const n=ar(e),t=function(e,t){const r=In([],[]);return tr.useCallback((e=>n.current(e)),r)}();var r,o;return r=()=>{n.current=e},o=e=>(r(),ir((()=>{}))),oe((()=>{const e=o();return()=>{e.Dispose()}})),t}class hr{constructor(e=!1){this._id=0,this._cancelled=e,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,e]of this._listeners)e()}}addListener(e){const n=this._id;return this._listeners.set(this._id++,e),n}removeListener(e){return this._listeners.delete(e)}register(e,n){const t=this,r=this.addListener(null==n?e:()=>e(n));return{Dispose(){t.removeListener(r)}}}}class mr extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,mr.prototype)}}class pr{constructor(){this.callCount=0}static get maxTrampolineCallCount(){return 2e3}incrementAndCheck(){return this.callCount++>pr.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function _r(e){return n=>{if(n.cancelToken.isCancelled)n.onCancel(new mr);else if(n.trampoline.incrementAndCheck())n.trampoline.hijack((()=>{try{e(n)}catch(e){n.onError(e)}}));else try{e(n)}catch(e){n.onError(e)}}}const gr=new class{Bind(e,n){return function(e,n){return _r((t=>{e({onSuccess:e=>{try{n(e)(t)}catch(e){t.onError(e)}},onError:t.onError,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline})}))}(e,n)}Combine(e,n){return this.Bind(e,(()=>n))}Delay(e){return _r((n=>e()(n)))}For(e,n){const t=e[Symbol.iterator]();let r=t.next();return this.While((()=>!r.done),this.Delay((()=>{const e=n(r.value);return r=t.next(),e})))}Return(e){return function(e){return _r((n=>n.onSuccess(e)))}(e)}ReturnFrom(e){return e}TryFinally(e,n){return _r((t=>{e({onSuccess:e=>{n(),t.onSuccess(e)},onError:e=>{n(),t.onError(e)},onCancel:e=>{n(),t.onCancel(e)},cancelToken:t.cancelToken,trampoline:t.trampoline})}))}TryWith(e,n){return _r((t=>{e({onSuccess:t.onSuccess,onCancel:t.onCancel,cancelToken:t.cancelToken,trampoline:t.trampoline,onError:e=>{try{n(e)(t)}catch(e){t.onError(e)}}})}))}Using(e,n){return this.TryFinally(n(e),(()=>e.Dispose()))}While(e,n){return e()?this.Bind(n,(()=>this.While(e,n))):this.Return(void 0)}Zero(){return _r((e=>e.onSuccess(void 0)))}};function wr(e){}const yr=new hr;function vr(e,n){return function(e,n){return function(e,n,t,r,o){"function"!=typeof n&&(o=n,n=void 0);const i=new pr;e({onSuccess:n||wr,onError:t||wr,onCancel:r||wr,cancelToken:o||yr,trampoline:i})}(e,n)}(e,n)}class Cr extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function br(e,n){const t=ar(function(e){const n=new hr(!1);return n}());return lr((()=>ir((()=>{t.current.cancel()}))),[]),dr((r=>{var o;null!=(o=t.current)&&o.isCancelled||vr(gr.Delay((()=>gr.TryWith(gr.Delay((()=>(n(new Cr(1)),gr.Bind(e(r),(e=>(n(new Cr(2,e)),gr.Zero())))))),(e=>(n(new Cr(3,e)),gr.Zero()))))),t.current)}))}class xr{constructor(e,n,t,r,o,i,s){this.fullname=e,this.generics=n,this.construct=t,this.parent=r,this.fields=o,this.cases=i,this.enumCases=s}toString(){return Fr(this)}GetHashCode(){return Er(this)}Equals(e){return Ar(this,e)}}function Sr(e){return null!=e.generics?e.generics:[]}function Er(e){return on([tn(e.fullname),...Sr(e).map(Er)])}function Ar(e,n){return""===e.fullname?""===n.fullname&&ln(Vr(e),Vr(n),(([e,n],[t,r])=>e===t&&Ar(n,r))):e.fullname===n.fullname&&ln(Sr(e),Sr(n),Ar)}function kr(e,n,t,r){return new xr(e,n,t,void 0,r)}function Tr(...e){return new xr("",void 0,void 0,void 0,(()=>e))}function Ir(e){return new xr("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Nr(e){return new xr("Microsoft.FSharp.Collections.FSharpList`1",[e])}const Or=new xr("System.Object"),Mr=(new xr("Microsoft.FSharp.Core.Unit"),new xr("System.Char"),new xr("System.String"));function Dr(e){if(Array.isArray(e))return e[0];if(e instanceof xr){const n=Pr(e);if(null!=n)return Dr(n)+"[]";{const n=e.fullname.lastIndexOf(".");return-1===n?e.fullname:e.fullname.substr(n+1)}}return e.name}function Fr(e){const n=Pr(e);return null!=n?Fr(n)+"[]":null==e.generics||0===e.generics.length?e.fullname:e.fullname+"["+e.generics.map((e=>Fr(e))).join(",")+"]"}function Ur(e){return null!=Pr(e)}function Pr(e){var n;return"[]"===e.fullname&&1===(null===(n=e.generics)||void 0===n?void 0:n.length)?e.generics[0]:void 0}function Rr(e){return null!=e.generics&&e.generics.length>0}function Gr(e){return null!=e.enumCases&&e.enumCases.length>0}function jr(e){return null==e.generics?e:new xr(e.fullname,e.generics.map((()=>Or)))}function Hr(e){var n;return null===(n=e.generics)||void 0===n?void 0:n[0]}function Lr(e){if(Gr(e)&&null!=e.enumCases)return e.enumCases.map((e=>e[1]));throw new Error(`${e.fullname} is not an enum type`)}function $r(e,n){const t=parseInt(n,10);return function(e,n){if(null!=e.enumCases){if("string"==typeof n){for(const t of e.enumCases)if(t[0]===n)return t;throw new Error(`'${n}' was not found in ${e.fullname}`)}for(const t of e.enumCases)if(t[1]===n)return t;return["",n]}throw new Error(`${e.fullname} is not an enum type`)}(e,isNaN(t)?n:t)[1]}function Br(e){if(null!=e.cases)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function Vr(e){if(null!=e.fields)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function zr(e){if(Zr(e)&&null!=e.generics)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function Wr(e){return e instanceof xr?null!=e.cases:e instanceof bn}function qr(e){return e instanceof xr?null!=e.fields:e instanceof xn}function Zr(e){return e.fullname.startsWith("System.Tuple")}function Jr(e){return null==e.fields?[]:e.fields}function Yr(e,n){const t=(e.fields||[]).length;if(n.length!==t)throw new Error(`Expected an array of length ${t} but got ${n.length}`);return null!=e.declaringType.construct?new e.declaringType.construct(e.tag,...n):{}}new xr("System.Boolean"),new xr("System.SByte"),new xr("System.Byte"),new xr("System.Int16"),new xr("System.UInt16"),new xr("System.Int32"),new xr("System.UInt32"),new xr("System.Single"),new xr("System.Double"),new xr("System.Decimal");class Xr extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Ok","Error"]}}function Kr(e,n){return 0===n.tag?new Xr(0,e(n.fields[0])):new Xr(1,n.fields[0])}class Qr extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class eo extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class no{constructor(){this.cache=new Map([])}}function to(){return new no}function ro(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function oo(e,n){switch(e.tag){case 2:return function(e,n,t,r,o=0){if("string"==typeof e){const t=e;e=function(e,n=0){if(0!=(-276&n))throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Singleline and ECMAScript");let t="g";return t+=1&n?"i":"",t+=2&n?"m":"",t+=16&n?"s":"",new RegExp(e,t)}(n,null!=r?r:0),n=t,r=void 0}if("function"==typeof t)return r=null==r?-1:r,n.substring(0,o)+n.substring(o).replace(e,(function(){let e=arguments[0];if(r){r--;const n=[],o=arguments.length,i="string"!=typeof arguments[o-1];let s=i?o-3:o-2;for(let e=0;e<s;e++)n.push(arguments[e]);n.index=arguments[s++],n.input=arguments[s++],i&&(n.groups=arguments[s]),e=t(n)}return e}));if(t=t.replace(/\$0/g,(e=>"$&")).replace(/\${([^}]+)}/g,"$<$1>"),null!=r){let i;const s=n.substring(o),u=Qn(e,s),l=Qn.length>r?(i=u[r-1],s.substring(0,i.index+i[0].length)):s;return n.substring(0,o)+l.replace(e,t)+n.substring(o+l.length)}return n.replace(e,t)}(ro(n),"[A-Z]","_$0").toLowerCase();case 0:return n;default:return ro(n)}}to(),to();const io=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,so=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,uo=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function lo(e,n){try{return n.contents=function(e){function n(e){return e.replace(so,"$1-$2-$3-$4-$5")}const t=e.trim().toLowerCase();if(io.test(t))return function(e,...n){if(0===n.length)return e.trim();const t="["+Kn(n.join(""))+"]+";return e.replace(new RegExp("^"+t),"").replace(new RegExp(t+"$"),"")}(t,"{","}","(",")");if(so.test(t))return n(t);if(uo.test(t))return n(t.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}(e),!0}catch(e){return!1}}var co;function ao(e,n){switch(n){case 8:return e?[0,255]:[-128,127];case 16:return e?[0,65535]:[-32768,32767];case 32:return e?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function fo(e,n,t,r,o){try{return o.contents=function(e,n,t,r,o){const i=function(e,n,t){const r=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(null!=r){const[,,e,o]=r;t=t||function(e,n){if(n&co.AllowHexSpecifier)return 16;switch(e){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}(e,n);const i=function(e){switch(e){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}(t);if(!i.test(o))return function(e,n){const[,t,r,o]=e;return{sign:t||"",prefix:r||"",digits:o,radix:n}}(r,t)}return null}(e,n,void 0);if(null!=i){let e=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(e)){const[n,o]=ao(!0,r);!t&&10!==i.radix&&e>=n&&e<=o&&(e=e<<32-r>>32-r);const[s,u]=ao(t,r);if(e>=s&&e<=u)return e}}throw new Error("Input string was not in a correct format.")}(e,n,t,r),!0}catch(e){return!1}}function ho(e,n){!function(e){if(null!=e&&0!==e){if(e%6e4!=0)throw new Error("Offset must be specified in whole minutes.");if(Math.abs(e/36e5)>14)throw new Error("Offset must be within plus or minus 14 hours.")}}(n);const t=new Date(e);return t.offset=null!=n?n:-6e4*(new Date).getTimezoneOffset(),t}function mo(e,n){try{return n.contents=function(e){const[n,t]=Bn(e),r=null==t?-6e4*n.getTimezoneOffset():"Z"===t?0:6e4*t;return ho(n.getTime(),r)}(e),!0}catch(e){return!1}}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(co||(co={}));var po=null;try{po=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(u){}function _o(e,n,t){this.low=0|e,this.high=0|n,this.unsigned=!!t}function go(e){return!0===(e&&e.__isLong__)}_o.prototype.GetHashCode=function(){let e=this.unsigned?1:0;return e=(e<<5)+e^this.high,e=(e<<5)+e^this.low,e},_o.prototype.Equals=function(e){return Vo(this,e)},_o.prototype.CompareTo=function(e){return Zo(this,e)},_o.prototype.toString=function(e){return Ho(this,e)},_o.prototype.toJSON=function(){return Ho(this)},_o.prototype[zn]=function(){const e=this;return{multiply:n=>Ko(e,n),toPrecision:n=>String(e)+(0).toPrecision(n).substr(1),toExponential:n=>String(e)+(0).toExponential(n).substr(1),toFixed:n=>String(e)+(0).toFixed(n).substr(1),toHex:()=>{return Ho(e.unsigned?e:function(e,n,t){return t?function(e,n){return new _o(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)}(e,n):function(e,n){return new _o(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)}(e,n)}((n=e,t?function(e){var n=e.high,t=e.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&n,n>>>8&255,n>>>16&255,n>>>24]}(n):function(e){var n=e.high,t=e.low;return[n>>>24,n>>>16&255,n>>>8&255,255&n,t>>>24,t>>>16&255,t>>>8&255,255&t]}(n)),!0),16);var n,t}}},_o.prototype.__isLong__,Object.defineProperty(_o.prototype,"__isLong__",{value:!0});var wo={},yo={};function vo(e,n){var t,r,o;return n?(o=0<=(e>>>=0)&&e<256)&&(r=yo[e])?r:(t=bo(e,(0|e)<0?-1:0,!0),o&&(yo[e]=t),t):(o=-128<=(e|=0)&&e<128)&&(r=wo[e])?r:(t=bo(e,e<0?-1:0,!1),o&&(wo[e]=t),t)}function Co(e,n){if(isNaN(e))return n?Oo:No;if(n){if(e<0)return Oo;if(e>=ko)return Po}else{if(e<=-To)return Ro;if(e+1>=To)return Uo}return e<0?Jo(Co(-e,n)):bo(e%Ao|0,e/Ao|0,n)}function bo(e,n,t){return new _o(e,n,t)}var xo=Math.pow;function So(e,n,t){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return No;if("number"==typeof n?(t=n,n=!1):n=!!n,(t=t||10)<2||36<t)throw RangeError("radix");var r=e.indexOf("-");if(r>0)throw Error("interior hyphen");if(0===r)return Jo(So(e.substring(1),n,t));for(var o=Co(xo(t,8)),i=No,s=0;s<e.length;s+=8){var u=Math.min(8,e.length-s),l=parseInt(e.substring(s,s+u),t);i=Yo(u<8?Ko(i,Co(xo(t,u))):i=Ko(i,o),Co(l))}return i.unsigned=n,i}function Eo(e,n){return"number"==typeof e?Co(e,n):"string"==typeof e?So(e,n):bo(e.low,e.high,"boolean"==typeof n?n:e.unsigned)}var Ao=4294967296,ko=Ao*Ao,To=ko/2,Io=vo(1<<24),No=vo(0),Oo=vo(0,!0),Mo=vo(1),Do=vo(1,!0),Fo=vo(-1),Uo=bo(-1,2147483647,!1),Po=bo(-1,-1,!0),Ro=bo(0,-2147483648,!1);function Go(e){return e.unsigned?e.low>>>0:e.low}function jo(e){return e.unsigned?(e.high>>>0)*Ao+(e.low>>>0):e.high*Ao+(e.low>>>0)}function Ho(e,n){if((n=n||10)<2||36<n)throw RangeError("radix");if(Lo(e))return"0";if($o(e)){if(Vo(e,Ro)){var t=Co(n),r=Qo(e,t),o=Xo(Ko(r,t),e);return Ho(r,n)+Go(o).toString(n)}return"-"+Ho(Jo(e),n)}for(var i=Co(xo(n,6),e.unsigned),s=e,u="";;){var l=Qo(s,i),c=(Go(Xo(s,Ko(l,i)))>>>0).toString(n);if(Lo(s=l))return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}}function Lo(e){return 0===e.high&&0===e.low}function $o(e){return!e.unsigned&&e.high<0}function Bo(e){return 1==(1&e.low)}function Vo(e,n){return go(n)||(n=Eo(n)),(e.unsigned===n.unsigned||e.high>>>31!=1||n.high>>>31!=1)&&e.high===n.high&&e.low===n.low}function zo(e,n){return Zo(e,n)<0}function Wo(e,n){return Zo(e,n)>0}function qo(e,n){return Zo(e,n)>=0}function Zo(e,n){if(go(n)||(n=Eo(n)),Vo(e,n))return 0;var t=$o(e),r=$o(n);return t&&!r?-1:!t&&r?1:e.unsigned?n.high>>>0>e.high>>>0||n.high===e.high&&n.low>>>0>e.low>>>0?-1:1:$o(Xo(e,n))?-1:1}function Jo(e){return!e.unsigned&&Vo(e,Ro)?Ro:Yo(function(e){return bo(~e.low,~e.high,e.unsigned)}(e),Mo)}function Yo(e,n){go(n)||(n=Eo(n));var t=e.high>>>16,r=65535&e.high,o=e.low>>>16,i=65535&e.low,s=n.high>>>16,u=65535&n.high,l=n.low>>>16,c=0,a=0,f=0,d=0;return f+=(d+=i+(65535&n.low))>>>16,a+=(f+=o+l)>>>16,c+=(a+=r+u)>>>16,c+=t+s,bo((f&=65535)<<16|(d&=65535),(c&=65535)<<16|(a&=65535),e.unsigned)}function Xo(e,n){return go(n)||(n=Eo(n)),Yo(e,Jo(n))}function Ko(e,n){if(Lo(e))return e.unsigned?Oo:No;if(go(n)||(n=Eo(n)),po)return bo(po.mul(e.low,e.high,n.low,n.high),po.get_high(),e.unsigned);if(Lo(n))return e.unsigned?Oo:No;if(Vo(e,Ro))return Bo(n)?Ro:No;if(Vo(n,Ro))return Bo(e)?Ro:No;if($o(e))return $o(n)?Ko(Jo(e),Jo(n)):Jo(Ko(Jo(e),n));if($o(n))return Jo(Ko(e,Jo(n)));if(zo(e,Io)&&zo(n,Io))return Co(jo(e)*jo(n),e.unsigned);var t=e.high>>>16,r=65535&e.high,o=e.low>>>16,i=65535&e.low,s=n.high>>>16,u=65535&n.high,l=n.low>>>16,c=65535&n.low,a=0,f=0,d=0,h=0;return d+=(h+=i*c)>>>16,f+=(d+=o*c)>>>16,d&=65535,f+=(d+=i*l)>>>16,a+=(f+=r*c)>>>16,f&=65535,a+=(f+=o*l)>>>16,f&=65535,a+=(f+=i*u)>>>16,a+=t*c+r*l+o*u+i*s,bo((d&=65535)<<16|(h&=65535),(a&=65535)<<16|(f&=65535),e.unsigned)}function Qo(e,n){if(go(n)||(n=Eo(n)),Lo(n))throw Error("division by zero");var t,r,o;if(po)return e.unsigned||-2147483648!==e.high||-1!==n.low||-1!==n.high?bo((e.unsigned?po.div_u:po.div_s)(e.low,e.high,n.low,n.high),po.get_high(),e.unsigned):e;if(Lo(e))return e.unsigned?Oo:No;if(e.unsigned){if(n.unsigned||(n=function(e){return e.unsigned?e:bo(e.low,e.high,!0)}(n)),Wo(n,e))return Oo;if(Wo(n,function(e,n){if(go(n)&&(n=Go(n)),0==(n&=63))return e;var t=e.high;return n<32?bo(e.low>>>n|t<<32-n,t>>>n,e.unsigned):bo(32===n?t:t>>>n-32,0,e.unsigned)}(e,1)))return Do;o=Oo}else{if(Vo(e,Ro))return Vo(n,Mo)||Vo(n,Fo)?Ro:Vo(n,Ro)?Mo:Vo(t=function(e,n){return go(n)&&(n=Go(n)),0==(n&=63)?e:n<32?bo(e.low<<n,e.high<<n|e.low>>>32-n,e.unsigned):bo(0,e.low<<n-32,e.unsigned)}(Qo(function(e,n){return go(n)&&(n=Go(n)),0==(n&=63)?e:n<32?bo(e.low>>>n|e.high<<32-n,e.high>>n,e.unsigned):bo(e.high>>n-32,e.high>=0?0:-1,e.unsigned)}(e,1),n),1),No)?$o(n)?Mo:Fo:o=Yo(t,Qo(r=Xo(e,Ko(n,t)),n));if(Vo(n,Ro))return e.unsigned?Oo:No;if($o(e))return $o(n)?Qo(Jo(e),Jo(n)):Jo(Qo(Jo(e),n));if($o(n))return Jo(Qo(e,Jo(n)));o=No}for(r=e;qo(r,n);){t=Math.max(1,Math.floor(jo(r)/jo(n)));for(var i=Math.ceil(Math.log(t)/Math.LN2),s=i<=48?1:xo(2,i-48),u=Co(t),l=Ko(u,n);$o(l)||Wo(l,r);)l=Ko(u=Co(t-=s,e.unsigned),n);Lo(u)&&(u=Mo),o=Yo(o,u),r=Xo(r,l)}return o}const ei=Qo,ni=jo;function ti(e){return e<0?Math.ceil(e):Math.floor(e)}function ri(e=0,n=0,t=0,r=0,o=0){switch(arguments.length){case 1:return oi(arguments[0]);case 3:e=0,n=arguments[0],t=arguments[1],r=arguments[2],o=0}return 864e5*e+36e5*n+6e4*t+1e3*r+o}function oi(e){return ni(ei(e,1e4))}function ii(e,n){try{return n.contents=function(e){const n=e.search("\\."),t=e.search("\\:");if(-1===n&&-1===t){const n=parseInt(e,0);if(isNaN(n))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return ri(n,0,0,0,0)}if(t>0){const n=/^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(e);if(null!=n&&null!=n[4]&&null!=n[5]){let t=0,r=0,o=0;const i=null!=n[1]&&"-"===n[1]?-1:1,s=+n[4],u=+n[5];if(null!=n[3]&&(t=+n[3]),null!=n[7]&&(o=+n[7]),null!=n[8])switch(n[8].length){case 1:r=100*+n[8];break;case 2:r=10*+n[8];break;case 3:r=+n[8];break;case 4:r=+n[8]/10;break;case 5:r=+n[8]/100;break;case 6:r=+n[8]/1e3;break;case 7:r=+n[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return i*ri(t,s,u,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch(e){return!1}}class si{constructor(e,n){this.k=e,this.v=n}}function ui(e,n){return new si(e,n)}function li(e){return e.k}function ci(e){return e.v}class ai extends si{constructor(e,n,t,r,o){super(e,n),this.left=t,this.right=r,this.h=0|o}}function fi(e,n,t,r,o){return new ai(e,n,t,r,o)}function di(e){return e.left}function hi(e){return e.right}function mi(e){return e.h}function pi(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof ai){e=pi(t+1,di(o)),n=hi(o);continue e}return t+1|0}return 0|t}}function _i(e){return pi(0,e)}function gi(e,n,t,r){let o,i;if(null!=e){const n=e;o=n instanceof ai?mi(n):1}else o=0;if(null!=r){const e=r;i=e instanceof ai?mi(e):1}else i=0;const s=0|(o<i?i:o);return 0===s?ui(n,t):fi(n,t,e,r,s+1)}function wi(e,n,t,r){let o,i,s,u,l,c;if(null!=e){const n=e;l=n instanceof ai?mi(n):1}else l=0;if(null!=r){const e=r;c=e instanceof ai?mi(e):1}else c=0;if(c>l+2){const s=kn(r);if(s instanceof ai){if(o=di(s),(null!=o?(i=o,i instanceof ai?mi(i):1):0)>l+1){const r=kn(di(s));if(r instanceof ai)return gi(gi(e,n,t,di(r)),li(r),ci(r),gi(hi(r),li(s),ci(s),hi(s)));throw new Error("internal error: Map.rebalance")}return gi(gi(e,n,t,di(s)),li(s),ci(s),hi(s))}throw new Error("internal error: Map.rebalance")}if(l>c+2){const o=kn(e);if(o instanceof ai){if(s=hi(o),(null!=s?(u=s,u instanceof ai?mi(u):1):0)>c+1){const e=kn(hi(o));if(e instanceof ai)return gi(gi(di(o),li(o),ci(o),di(e)),li(e),ci(e),gi(hi(e),n,t,r));throw new Error("internal error: Map.rebalance")}return gi(di(o),li(o),ci(o),gi(hi(o),n,t,r))}throw new Error("internal error: Map.rebalance")}return gi(e,n,t,r)}function yi(e,n,t,r){if(null!=r){const o=r,i=0|e.Compare(n,li(o));return o instanceof ai?i<0?wi(yi(e,n,t,di(o)),li(o),ci(o),hi(o)):0===i?fi(n,t,di(o),hi(o),mi(o)):wi(di(o),li(o),ci(o),yi(e,n,t,hi(o))):i<0?fi(n,t,void 0,r,2):0===i?ui(n,t):fi(n,t,r,void 0,2)}return ui(n,t)}function vi(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,li(s));if(0===u)return An(ci(s));if(s instanceof ai){e=r,n=o,t=u<0?di(s):hi(s);continue e}return}return}}function Ci(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof ai){Ci(t,di(o)),t(li(o),ci(o)),e=t,n=hi(o);continue e}t(li(o),ci(o))}break}}function bi(e,n){Ci(e,n)}function xi(e,n){if(null!=n){const t=n;if(t instanceof ai){const n=xi(e,di(t)),r=e(li(t),ci(t)),o=xi(e,hi(t));return fi(li(t),r,n,o,mi(t))}return ui(li(t),e(li(t),ci(t)))}}function Si(e,n){return xi(e,n)}function Ei(e,n){let t;for(let r=0;r<=n.length-1;r++){const o=n[r];t=yi(e,o[0],o[1],t)}return t}class Ai extends xn{constructor(e,n){super(),this.stack=e,this.started=n}}function ki(e){e:for(;;){const n=e;if(xt(n))return vt();{const t=Et(n),r=St(n);if(null!=r){const o=r;if(o instanceof ai){e=Nt([di(o),ui(li(o),ci(o)),hi(o)],t);continue e}return n}e=t;continue e}}}function Ti(e){return new Ai(ki(bt(e)),!1)}function Ii(e){if(e.started){const n=e.stack;if(xt(n))return function(){throw new Error("enumeration already finished")}();if(null!=St(n)){const e=St(n);if(e instanceof ai)throw new Error("Please report error: Map iterator, unexpected stack for current");return[li(e),ci(e)]}throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}function Ni(e){let n=Ti(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Ii(n),"System.Collections.IEnumerator.get_Current":()=>Ii(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(xt(n))return!1;if(null!=St(n)){if(St(n)instanceof ai)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=ki(Et(n)),!xt(e.stack)}throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!xt(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=Ti(e)},Dispose(){}}}class Oi{constructor(e,n){this.comparer=e,this.tree=n}GetHashCode(){return 0|function(e){const n=(e,n)=>(e<<1)+n+631;let t=0;const r=Je(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();t=0|n(t,sn(e[0])),t=0|n(t,sn(e[1]))}}finally{We(r)}return 0|t}(this)}Equals(e){if(!(e instanceof Oi))return!1;{const n=Je(this);try{const t=Je(e);try{const e=()=>{const r=n["System.Collections.IEnumerator.MoveNext"]();if(r===t["System.Collections.IEnumerator.MoveNext"]()){if(r){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"](),o=t["System.Collections.Generic.IEnumerator`1.get_Current"]();return!(!an(r[0],o[0])||!an(r[1],o[1]))&&e()}return!0}return!1};return e()}finally{We(t)}}finally{We(n)}}}toString(){return"map ["+ct("; ",Qt((e=>function(e,...n){return"object"==typeof e&&n.length>0&&(e=n[0],n.shift()),e.replace(nt,((e,t,r,o,i,s)=>{if(t<0||t>=n.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let u=n[t];if(Wn(u))switch(i=null==i?null:parseInt(i,10),o){case"f":case"F":u=Zn(u,i=null!=i?i:2);break;case"g":case"G":u=null!=i?Jn(u,i):Jn(u);break;case"e":case"E":u=null!=i?Yn(u,i):Yn(u);break;case"p":case"P":i=null!=i?i:2,u=Zn(qn(u,100),i)+" %";break;case"d":case"D":u=null!=i?at(String(u),i,"0"):String(u);break;case"x":case"X":u=null!=i?at(Xn(u),i,"0"):Xn(u),"X"===o&&(u=u.toUpperCase());break;default:if(s){let e="";u=s.replace(/([0#,]+)(\.[0#]+)?/,((n,t,r)=>{tt(u,0)&&(u=qn(u,-1),e="-");const o=null!=r?r.length:0;if(u=Zn(u,Math.max(o-1,0)),t.indexOf(",")>0){const[e,n]=u.split("."),t=e.length%3,r=Math.floor(e.length/3);let o=t>0?e.substr(0,t)+(r>0?",":""):"";for(let n=0;n<r;n++)o+=e.substr(t+3*n,3)+(n<r-1?",":"");u=n?o+"."+n:o}const i=(t=t.replace(/,/g,"")).length>0&&"0"===t[0]?t.length:0;return at(u,i-e.length+o,"0")})),u=e+u}}else u=u instanceof Date?Ln(u,s||o):Cn(u);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(u=at(String(u),Math.abs(r)," ",r<0)),u}))}("({0}, {1})",e[0],e[1])),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(e){return Array.from(this)}GetEnumerator(){return Ni(this.tree)}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return Ni(this.tree)}CompareTo(e){const n=this;if(e instanceof Oi)return 0|function(e,n,t){const r=Bt(n);try{const n=Bt(t);try{let t=0,o=r["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]();for(;0===t&&o&&i;)t=0|e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),n["System.Collections.Generic.IEnumerator`1.get_Current"]()),0===t&&(o=r["System.Collections.IEnumerator.MoveNext"](),i=n["System.Collections.IEnumerator.MoveNext"]());return 0|(0!==t?t:o?1:i?-1:0)}finally{We(n)}}finally{We(r)}}(((e,t)=>{const r=0|n.comparer.Compare(e[0],t[0]);return 0|(0!==r?r:mn(e[1],t[1]))}),n,e);throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return Pi(this,e[0])&&an(Fi(this,e[0]),e[1])}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){!function(e,n,t){let r=t;bi(((e,t)=>{n[r]=[e,t],r=r+1|0}),e)}(this.tree,e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Ui(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Ui(this)}get size(){return 0|Ui(this)}clear(){throw new Error("Map cannot be mutated")}delete(e){throw new Error("Map cannot be mutated")}entries(){return Qt((e=>[e[0],e[1]]),this)}get(e){return Fi(this,e)}has(e){return Pi(this,e)}keys(){return Qt((e=>e[0]),this)}set(e,n){throw new Error("Map cannot be mutated")}values(){return Qt((e=>e[1]),this)}forEach(e,n){const t=this;Kt((n=>{e(n[1],n[0],t)}),t)}}function Mi(e,n){return new Oi(e,n)}function Di(e){const n=On();return Mi(n,function(e,n){if(Be(n))return Ei(e,n);if(n instanceof ht)return function(e,n){return kt(((n,t)=>yi(e,t[0],t[1],n)),void 0,n)}(e,n);{const t=Je(n);try{return function(e,n,t){for(;;){const r=e,o=n,i=t;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;{const s=i["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,n=yi(r,s[0],s[1],o),t=i}}}(e,void 0,t)}finally{We(t)}}}(n,e))}function Fi(e,n){return function(e,n,t){const r=vi(e,n,t);if(null==r)throw new Error;return kn(r)}(e.comparer,n,e.tree)}function Ui(e){return _i(e.tree)}function Pi(e,n){return function(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,li(s));if(s instanceof ai){if(u<0){e=r,n=o,t=di(s);continue e}if(0===u)return!0;e=r,n=o,t=hi(s);continue e}return 0===u}return!1}}(e.comparer,n,e.tree)}function Ri(e,n,t){return function(e,n,t){return Mi(e.comparer,yi(e.comparer,n,t,e.tree))}(t,e,n)}function Gi(e,n){return function(e,n){return vi(e.comparer,n,e.tree)}(n,e)}function ji(e,n){return function(e,n){return Mi(e.comparer,Si(n,e.tree))}(n,e)}function Hi(){return Oi.empty}Oi.empty=Mi(On(),void 0);class Li{constructor(e){this.k=e}}function $i(e){return new Li(e)}function Bi(e){return e.k}class Vi extends Li{constructor(e,n,t,r){super(e),this.left=n,this.right=t,this.h=0|r}}function zi(e,n,t,r){return new Vi(e,n,t,r)}function Wi(e){return e.left}function qi(e){return e.right}function Zi(e){return e.h}function Ji(e,n){e:for(;;){const t=e,r=n;if(null!=t){const o=t;if(o instanceof Vi){e=Wi(o),n=Ji(qi(o),r+1);continue e}return r+1|0}return 0|r}}function Yi(e){return Ji(e,0)}function Xi(e,n,t){let r,o;if(null!=e){const n=e;r=n instanceof Vi?Zi(n):1}else r=0;if(null!=t){const e=t;o=e instanceof Vi?Zi(e):1}else o=0;const i=0|(r<o?o:r);return 0===i?$i(n):zi(n,e,t,i+1)}function Ki(e,n,t){let r,o,i,s,u,l;if(null!=e){const n=e;u=n instanceof Vi?Zi(n):1}else u=0;if(null!=t){const e=t;l=e instanceof Vi?Zi(e):1}else l=0;if(l>u+2){const i=kn(t);if(i instanceof Vi){if(r=Wi(i),(null!=r?(o=r,o instanceof Vi?Zi(o):1):0)>u+1){const t=kn(Wi(i));if(t instanceof Vi)return Xi(Xi(e,n,Wi(t)),Bi(t),Xi(qi(t),Bi(i),qi(i)));throw new Error("internal error: Set.rebalance")}return Xi(Xi(e,n,Wi(i)),Bi(i),qi(i))}throw new Error("internal error: Set.rebalance")}if(u>l+2){const r=kn(e);if(r instanceof Vi){if(i=qi(r),(null!=i?(s=i,s instanceof Vi?Zi(s):1):0)>l+1){const e=kn(qi(r));if(e instanceof Vi)return Xi(Xi(Wi(r),Bi(r),Wi(e)),Bi(e),Xi(qi(e),n,t));throw new Error("internal error: Set.rebalance")}return Xi(Wi(r),Bi(r),Xi(qi(r),n,t))}throw new Error("internal error: Set.rebalance")}return Xi(e,n,t)}function Qi(e,n,t){if(null!=t){const r=t,o=0|e.Compare(n,Bi(r));if(r instanceof Vi)return o<0?Ki(Qi(e,n,Wi(r)),Bi(r),qi(r)):0===o?t:Ki(Wi(r),Bi(r),Qi(e,n,qi(r)));{const o=0|e.Compare(n,Bi(r));return o<0?zi(n,void 0,t,2):0===o?t:zi(n,t,void 0,2)}}return $i(n)}function es(e,n,t){e:for(;;){const r=e,o=n,i=t;if(null!=i){const s=i,u=0|r.Compare(o,Bi(s));if(s instanceof Vi){if(u<0){e=r,n=o,t=Wi(s);continue e}if(0===u)return!0;e=r,n=o,t=qi(s);continue e}return 0===u}return!1}}function ns(e,n){e:for(;;){const t=e,r=n;if(null!=r){const o=r;if(o instanceof Vi){ns(t,Wi(o)),t(Bi(o)),e=t,n=qi(o);continue e}t(Bi(o))}break}}class ts extends xn{constructor(e,n){super(),this.stack=e,this.started=n}}function rs(e){e:for(;;){const n=e;if(xt(n))return vt();{const t=St(n),r=Et(n);if(null!=t){const o=t;if(o instanceof Vi){e=Nt([Wi(o),$i(Bi(o)),qi(o)],r);continue e}return n}e=r;continue e}}}function os(e){return new ts(rs(bt(e)),!1)}function is(e){if(e.started){const n=e.stack;if(xt(n))return function(){throw new Error("Enumeration already started")}();if(null!=St(n))return Bi(St(n));throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function ss(e){let n=os(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>is(n),"System.Collections.IEnumerator.get_Current":()=>is(n),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const n=e.stack;if(xt(n))return!1;if(null!=St(n)){if(St(n)instanceof Vi)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=rs(Et(n)),!xt(e.stack)}throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!xt(e.stack)}(n),"System.Collections.IEnumerator.Reset"(){n=os(e)},Dispose(){}}}function us(e,n,t){return null==n?null==t?0:-1:null==t?1:0|function(e,n,t){e:for(;;){const r=e,o=n,i=t,s=[o,i];if(xt(s[0]))return xt(s[1])?0:-1;if(xt(s[1]))return 1;if(null!=St(s[1]))if(null!=St(s[0])){const u=St(s[0]),l=St(s[1]);if(u instanceof Vi)if(null==Wi(u)){if(!(l instanceof Vi)){const o=0|r.Compare(Bi(u),Bi(l));if(0!==o)return 0|o;e=r,n=Ct(qi(u),Et(s[0])),t=Ct(void 0,Et(s[1]));continue e}if(null==Wi(l)){const o=0|r.Compare(Bi(u),Bi(l));if(0!==o)return 0|o;e=r,n=Ct(qi(u),Et(s[0])),t=Ct(qi(l),Et(s[1]));continue e}{const s=[o,i];let u,l,c,a,f;switch(xt(s[0])?xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2:null!=St(s[0])?(u=0,l=Et(s[0]),c=St(s[0])):xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2,u){case 0:if(c instanceof Vi){e=r,n=Nt([Wi(c),zi(Bi(c),void 0,qi(c),0)],l),t=i;continue e}e=r,n=Nt([void 0,$i(Bi(c))],l),t=i;continue e;case 1:if(f instanceof Vi){e=r,n=o,t=Nt([Wi(f),zi(Bi(f),void 0,qi(f),0)],a);continue e}e=r,n=o,t=Nt([void 0,$i(Bi(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const s=[o,i];let u,l,c,a,f;switch(xt(s[0])?xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2:null!=St(s[0])?(u=0,l=Et(s[0]),c=St(s[0])):xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2,u){case 0:if(c instanceof Vi){e=r,n=Nt([Wi(c),zi(Bi(c),void 0,qi(c),0)],l),t=i;continue e}e=r,n=Nt([void 0,$i(Bi(c))],l),t=i;continue e;case 1:if(f instanceof Vi){e=r,n=o,t=Nt([Wi(f),zi(Bi(f),void 0,qi(f),0)],a);continue e}e=r,n=o,t=Nt([void 0,$i(Bi(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(!(l instanceof Vi)){const o=0|r.Compare(Bi(u),Bi(l));if(0!==o)return 0|o;e=r,n=Et(s[0]),t=Et(s[1]);continue e}if(null==Wi(l)){const o=0|r.Compare(Bi(u),Bi(l));if(0!==o)return 0|o;e=r,n=Ct(void 0,Et(s[0])),t=Ct(qi(l),Et(s[1]));continue e}{const s=[o,i];let u,l,c,a,f;switch(xt(s[0])?xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2:null!=St(s[0])?(u=0,l=Et(s[0]),c=St(s[0])):xt(s[1])?u=2:null!=St(s[1])?(u=1,a=Et(s[1]),f=St(s[1])):u=2,u){case 0:if(c instanceof Vi){e=r,n=Nt([Wi(c),zi(Bi(c),void 0,qi(c),0)],l),t=i;continue e}e=r,n=Nt([void 0,$i(Bi(c))],l),t=i;continue e;case 1:if(f instanceof Vi){e=r,n=o,t=Nt([Wi(f),zi(Bi(f),void 0,qi(f),0)],a);continue e}e=r,n=o,t=Nt([void 0,$i(Bi(f))],a);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{St(s[1]);const u=[o,i];let l,c,a,f,d;switch(xt(u[0])?xt(u[1])?l=2:null!=St(u[1])?(l=1,f=Et(u[1]),d=St(u[1])):l=2:null!=St(u[0])?(l=0,c=Et(u[0]),a=St(u[0])):xt(u[1])?l=2:null!=St(u[1])?(l=1,f=Et(u[1]),d=St(u[1])):l=2,l){case 0:if(a instanceof Vi){e=r,n=Nt([Wi(a),zi(Bi(a),void 0,qi(a),0)],c),t=i;continue e}e=r,n=Nt([void 0,$i(Bi(a))],c),t=i;continue e;case 1:if(d instanceof Vi){e=r,n=o,t=Nt([Wi(d),zi(Bi(d),void 0,qi(d),0)],f);continue e}e=r,n=o,t=Nt([void 0,$i(Bi(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==St(s[0])){e=r,n=Et(s[0]),t=Et(s[1]);continue e}{St(s[0]);const u=[o,i];let l,c,a,f,d;switch(xt(u[0])?xt(u[1])?l=2:null!=St(u[1])?(l=1,f=Et(u[1]),d=St(u[1])):l=2:null!=St(u[0])?(l=0,c=Et(u[0]),a=St(u[0])):xt(u[1])?l=2:null!=St(u[1])?(l=1,f=Et(u[1]),d=St(u[1])):l=2,l){case 0:if(a instanceof Vi){e=r,n=Nt([Wi(a),zi(Bi(a),void 0,qi(a),0)],c),t=i;continue e}e=r,n=Nt([void 0,$i(Bi(a))],c),t=i;continue e;case 1:if(d instanceof Vi){e=r,n=o,t=Nt([Wi(d),zi(Bi(d),void 0,qi(d),0)],f);continue e}e=r,n=o,t=Nt([void 0,$i(Bi(d))],f);continue e;case 2:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,bt(n),bt(t))}function ls(e,n,t){let r=t;ns((e=>{n[r]=e,r=r+1|0}),e)}function cs(e,n){if(Be(n))return function(e,n){return Un(((n,t)=>Qi(e,t,n)),void 0,n)}(e,n);if(n instanceof ht)return function(e,n){return kt(((n,t)=>Qi(e,t,n)),void 0,n)}(e,n);{const t=Je(n);try{return function(e,n,t){for(;;){const r=e,o=n,i=t;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;e=r,n=Qi(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),o),t=i}}(e,void 0,t)}finally{We(t)}}}class as{constructor(e,n){this.comparer=e,this.tree=n}GetHashCode(){return 0|function(e){let n,t=0;const r=Je(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();)t=0|(n=0|sn(r["System.Collections.Generic.IEnumerator`1.get_Current"]()),(t<<1)+n+631)}finally{We(r)}return 0|Math.abs(t)}(this)}Equals(e){return e instanceof as&&0===us(fs(this),ds(this),ds(e))}toString(){return"set ["+ct("; ",Qt((e=>Cn(e)),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(e){return Array.from(this)}CompareTo(e){return 0|us(fs(this),ds(this),ds(e))}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return es(fs(this),e,ds(this))}"System.Collections.Generic.ICollection`1.CopyToZ2E171D71"(e,n){ls(ds(this),e,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|hs(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|hs(this)}GetEnumerator(){return ss(ds(this))}[Symbol.iterator](){return Ye(this.GetEnumerator())}"System.Collections.IEnumerable.GetEnumerator"(){return ss(ds(this))}get size(){return 0|hs(this)}add(e){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(e){throw new Error("Set cannot be mutated")}has(e){return function(e,n){return es(fs(e),n,ds(e))}(this,e)}keys(){return Qt((e=>e),this)}values(){return Qt((e=>e),this)}entries(){return Qt((e=>[e,e]),this)}forEach(e,n){const t=this;Kt((n=>{e(n,n,t)}),t)}}function fs(e){return e.comparer}function ds(e){return e.tree}function hs(e){return Yi(ds(e))}function ms(e,n,t){try{return"Expecting "+e+" but instead got:"+(t?"\n":" ")+JSON.stringify(n,null,4)}catch(n){return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(t?"\n":" ")}}function ps(e,n,t){const r=n(e,t);if(1===r.tag){const e=r.fields[0];return new Xr(1,function(e,n){const t=2===n.tag?ms(n.fields[0],n.fields[1],!0):1===n.tag?ms(n.fields[0],n.fields[1],!1)+"\nReason: "+n.fields[2]:3===n.tag?ms(n.fields[0],n.fields[1],!0):4===n.tag?ms(n.fields[0],n.fields[1],!0)+"\nNode `"+n.fields[2]+"` is unkown.":5===n.tag?"Expecting "+n.fields[0]+".\n"+JSON.stringify(n.fields[1],null,4):7===n.tag?"The following errors were found:\n\n"+ct("\n\n",n.fields[0]):6===n.tag?"The following `failure` occurred with the decoder: "+n.fields[0]:ms(n.fields[0],n.fields[1],!1);return 7===n.tag?t:"Error at: `"+e+"`\n"+t}(e[0],e[1]))}return new Xr(0,r.fields[0])}function _s(e,n){try{return ps("$",e,JSON.parse(n))}catch(e){if(e instanceof SyntaxError)return new Xr(1,"Given an invalid JSON: "+e.message);throw e}}const gs=e=>n=>{let t,r,o;const i="a sbyte",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?-128<=t&&t<=127?new Xr(0,(t+128&255)-128):(f=[s,new Qr(1,i,t,"Value was either too large or too small for a sbyte")],new Xr(1,f)):(a=[s,new Qr(1,i,t,"Value is not an integral value")],new Xr(1,a))):"string"==typeof u?(o=0,r=[fo(u,511,!1,8,new Sn((()=>o),(e=>{o=0|e}))),o],r[0]?new Xr(0,r[1]):(c=[s,new Qr(0,i,u)],new Xr(1,c))):(l=[s,new Qr(0,i,u)],new Xr(1,l));var l,c,a,f},ws=e=>n=>{let t,r,o;const i="a byte",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?0<=t&&t<=255?new Xr(0,255&t):(f=[s,new Qr(1,i,t,"Value was either too large or too small for a byte")],new Xr(1,f)):(a=[s,new Qr(1,i,t,"Value is not an integral value")],new Xr(1,a))):"string"==typeof u?(o=0,r=[fo(u,511,!0,8,new Sn((()=>o),(e=>{o=e}))),o],r[0]?new Xr(0,r[1]):(c=[s,new Qr(0,i,u)],new Xr(1,c))):(l=[s,new Qr(0,i,u)],new Xr(1,l));var l,c,a,f},ys=e=>n=>{let t,r,o;const i="an int16",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?-32768<=t&&t<=32767?new Xr(0,(t+32768&65535)-32768):(f=[s,new Qr(1,i,t,"Value was either too large or too small for "+i)],new Xr(1,f)):(a=[s,new Qr(1,i,t,"Value is not an integral value")],new Xr(1,a))):"string"==typeof u?(o=0,r=[fo(u,511,!1,16,new Sn((()=>o),(e=>{o=0|e}))),o],r[0]?new Xr(0,r[1]):(c=[s,new Qr(0,i,u)],new Xr(1,c))):(l=[s,new Qr(0,i,u)],new Xr(1,l));var l,c,a,f},vs=e=>n=>{let t,r,o;const i="an uint16",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?0<=t&&t<=65535?new Xr(0,65535&t):(f=[s,new Qr(1,i,t,"Value was either too large or too small for "+i)],new Xr(1,f)):(a=[s,new Qr(1,i,t,"Value is not an integral value")],new Xr(1,a))):"string"==typeof u?(o=0,r=[fo(u,511,!0,16,new Sn((()=>o),(e=>{o=e}))),o],r[0]?new Xr(0,r[1]):(c=[s,new Qr(0,i,u)],new Xr(1,c))):(l=[s,new Qr(0,i,u)],new Xr(1,l));var l,c,a,f},Cs=e=>n=>{let t,r,o;const i="an int",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?-2147483648<=t&&t<=2147483647?new Xr(0,~~t):(f=[s,new Qr(1,i,t,"Value was either too large or too small for an int")],new Xr(1,f)):(a=[s,new Qr(1,i,t,"Value is not an integral value")],new Xr(1,a))):"string"==typeof u?(o=0,r=[fo(u,511,!1,32,new Sn((()=>o),(e=>{o=0|e}))),o],r[0]?new Xr(0,r[1]):(c=[s,new Qr(0,i,u)],new Xr(1,c))):(l=[s,new Qr(0,i,u)],new Xr(1,l));var l,c,a,f},bs=e=>n=>{let t,r,o;const i="an uint32",s=e,u=n;return"number"==typeof u?(t=u,isFinite(t)&&Math.floor(t)===t?0<=t&&t<=4294967295?new Xr(0,t>>>0):(f=[s,new Qr(1,i,t,"Value was either too large or too small for "+i)],new Xr(1,f)):(a=[s,new Qr(1,i,t,"Value is not an integral value")],new Xr(1,a))):"string"==typeof u?(o=0,r=[fo(u,511,!0,32,new Sn((()=>o),(e=>{o=e}))),o],r[0]?new Xr(0,r[1]):(c=[s,new Qr(0,i,u)],new Xr(1,c))):(l=[s,new Qr(0,i,u)],new Xr(1,l));var l,c,a,f};function xs(e,n,t,r){let o;const i=t+".["+en(e)+"]";if(Array.isArray(r)){const t=r;return e<t.length?n(i,t[e]):new Xr(1,[i,new Qr(5,"a longer array. Need index `"+en(e)+"` but there are only `"+(o=t.length,en(o)+"` entries"),r)])}return new Xr(1,[i,new Qr(0,"an array",r)])}function Ss(e,n,t){if(Array.isArray(t)){let r=-1;return Kr(Tt,Un(((t,o)=>{if(r=r+1|0,0===t.tag){const i=e(n+".["+en(r)+"]",o);return 0===i.tag?new Xr(0,Ct(i.fields[0],t.fields[0])):new Xr(1,i.fields[0])}return t}),new Xr(0,vt()),t))}return new Xr(1,[n,new Qr(0,"a list",t)])}function Es(e,n,t){if(Array.isArray(t)){let r=-1;const o=t;return Un(((t,o)=>{if(r=r+1|0,0===t.tag){const i=t.fields[0],s=e(n+".["+en(r)+"]",o);return 0===s.tag?(i[r]=s.fields[0],new Xr(0,i)):new Xr(1,s.fields[0])}return t}),new Xr(0,Dn(new Array(o.length),0,o.length,null)),o)}return new Xr(1,[n,new Qr(0,"an array",t)])}function As(e,n,t,r){const o=n(t,r);return 0===o.tag?e(o.fields[0],t,r):new Xr(1,o.fields[0])}function ks(e,n){let t;const r=e;return t=e=>n=>xs(0,r,e,n),e=>r=>As(wn(3,(e=>{let t;const r=n;return t=e=>n=>xs(1,r,e,n),n=>r=>As(((n,t,r)=>new Xr(0,[e,n])),wn(2,t),n,r)})),wn(2,t),e,r)}function Ts(e){return Di(e)}function Is(e){return function(e,n){return new as(e,n)}(n={Compare:mn},cs(n,e));var n}function Ns(e,n,t,r){let o,i;return n.length!==r.length?new Xr(1,[t,new Qr(6,(o=0|r.length,i=0|n.length,it(rt("Expected %i %s but got %i"))(i)(e)(o)))]):Rn(((e,n,r)=>0===r.tag?Kr((e=>Ct(e,r.fields[0])),n(t)(e)):r),r,n,new Xr(0,vt()))}function Os(e,n,t,r,o,i){const s=function(e,n){return n.find((e=>Dr(e)===r))}(0,Br(t));if(null!=s){const t=s;return 0===i.length?new Xr(0,Yr(t,[])):Kr((e=>Yr(t,At(e))),Ns("union fields",Fn((t=>Ds(e,n,!1,t[1])),Jr(t)),o,i))}return new Xr(1,[o,new Qr(6,"Cannot find case "+r+" in "+Fr(t))])}function Ms(e,n,t,r){const o=new Sn(null),i=Ri(Fr(r),o,e);let s;if(qr(r)){const e=Fn((e=>[oo(n,Dr(e)),Ds(i,n,!1,e[1])]),Vr(r));s=n=>t=>Kr((e=>function(e,n){const t=Vr(e);if(t.length!==n.length)throw new Error(`Expected an array of length ${t.length} but got ${n.length}`);return null!=e.construct?new e.construct(...n):t.reduce(((e,[t,r],o)=>(e[t]=n[o],e)),{})}(r,At(e))),function(e,n,t){return null===t||Object.getPrototypeOf(t||!1)!==Object.prototype?new Xr(1,[n,new Qr(0,"an object",t)]):function(e,n,t){return n.reduceRight(((n,t)=>e(t,n)),t)}(wn(2,(e=>{const r=e[0];return o=>0===o.tag?Kr((e=>Ct(e,o.fields[0])),e[1](n+"."+r)(t[r])):o})),e,new Xr(0,vt()))}(e,n,t))}else if(Wr(r))s=e=>t=>{if("string"==typeof t)return Os(i,n,r,t,e,[]);if(Array.isArray(t)){const o=t;return Os(i,n,r,o[0],e,o.slice(1,o.length))}return new Xr(1,[e,new Qr(0,"a string or array",t)])};else{if(!t){let e;const n=Fr(r);throw e=it(rt("Cannot generate auto decoder for %s. Please pass an extra decoder."))(n),new Error(e)}s=e=>n=>new Xr(1,[e,new Qr(2,"an extra coder for "+Fr(r),n)])}return o.contents=s,s}function Ds(e,n,t,r){let o,i,s;const u=Fr(r),l=Gi(u,e);if(null==l){if(Ur(r)){const t=Ds(e,n,!1,Pr(r));return e=>n=>Es(wn(2,t),e,n)}if(Gr(r)){const e=Fr(Hr(r));if("System.SByte"===e)return e=>n=>{const t=r,o=e,i=n,s=gs(o)(i);if(1===s.tag)return new Xr(1,s.fields[0]);{const e=s.fields[0];return Yt(e,Lr(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Xr(0,$r(t,e.toString())):new Xr(1,[o,new Qr(1,Fr(t),i,"Unkown value provided for the enum")])}};if("System.Byte"===e)return e=>n=>{const t=r,o=e,i=n,s=ws(o)(i);if(1===s.tag)return new Xr(1,s.fields[0]);{const e=s.fields[0];return Yt(e,Lr(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Xr(0,$r(t,e.toString())):new Xr(1,[o,new Qr(1,Fr(t),i,"Unkown value provided for the enum")])}};if("System.Int16"===e)return e=>n=>{const t=r,o=e,i=n,s=ys(o)(i);if(1===s.tag)return new Xr(1,s.fields[0]);{const e=s.fields[0];return Yt(e,Lr(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Xr(0,$r(t,e.toString(u))):new Xr(1,[o,new Qr(1,Fr(t),i,"Unkown value provided for the enum")])}var u};if("System.UInt16"===e)return e=>n=>{const t=r,o=e,i=n,s=vs(o)(i);if(1===s.tag)return new Xr(1,s.fields[0]);{const e=s.fields[0];return Yt(e,Lr(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Xr(0,$r(t,e.toString())):new Xr(1,[o,new Qr(1,Fr(t),i,"Unkown value provided for the enum")])}};if("System.Int32"===e)return e=>n=>{const t=r,o=e,i=n,s=Cs(o)(i);if(1===s.tag)return new Xr(1,s.fields[0]);{const e=s.fields[0];return Yt(e,Lr(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Xr(0,$r(t,en(e))):new Xr(1,[o,new Qr(1,Fr(t),i,"Unkown value provided for the enum")])}};if("System.UInt32"===e)return e=>n=>{const t=r,o=e,i=n,s=bs(o)(i);if(1===s.tag)return new Xr(1,s.fields[0]);{const e=s.fields[0];return Yt(e,Lr(t),{Equals:(e,n)=>e===n,GetHashCode:rn})?new Xr(0,$r(t,e.toString())):new Xr(1,[o,new Qr(1,Fr(t),i,"Unkown value provided for the enum")])}};{const e=Fr(r),n=st(rt("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the folluwing enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\nIf you can't use one of these types, please pass an extra decoder.\n "))(e);return e=>n(e)}}if(Rr(r)){if(Zr(r)){const t=Fn((t=>Ds(e,n,!1,t)),zr(r));return e=>n=>Array.isArray(n)?Kr((e=>At(e)),Ns("tuple elements",t,e,n)):new Xr(1,[e,new Qr(0,"an array",n)])}{const u=Fr(jr(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===u)return o=Ds(e,n,!0,Sr(r)[0]),e=>n=>{return t=wn(2,o),r=e,null==(i=n)?new Xr(0,void 0):Kr(An,t(r,i));var t,r,i};if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===u)return i=Ds(e,n,!1,Sr(r)[0]),e=>n=>Ss(wn(2,i),e,n);if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===u){const t=Ds(e,n,!1,Sr(r)[0]),o=Ds(e,n,!1,Sr(r)[1]);let i;const u=Ot([e=>n=>function(e,n,t,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new Xr(1,[t,new Qr(0,"an object",r)]):Xt(((o,i)=>{if(0===o.tag){const s=e(t,i);if(0===s.tag){const e=n(t+"."+i,r[i]);return 0===e.tag?new Xr(0,Ct([s.fields[0],e.fields[0]],o.fields[0])):new Xr(1,e.fields[0])}return new Xr(1,s.fields[0])}return o}),new Xr(0,vt()),Object.keys(r))}(wn(2,t),wn(2,o),e,n),(s=ks(wn(2,t),wn(2,o)),e=>n=>Ss(wn(2,s),e,n))]);return i=e=>n=>{return t=e,r=n,((e,n)=>{e:for(;;){const o=e,i=n;if(xt(o))return new Xr(1,[t,new Qr(7,i)]);{const s=ps(t,wn(2,St(o)),r);if(1===s.tag){e=Et(o),n=Mt(i,bt(s.fields[0]));continue e}return new Xr(0,s.fields[0])}}})(u,vt());var t,r},e=>n=>function(e,n,t,r){const o=n(t,r);return 1===o.tag?new Xr(1,o.fields[0]):new Xr(0,e(o.fields[0]))}(Ts,wn(2,i),e,n)}if("Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===u){const t=Ds(e,n,!1,Sr(r)[0]);return e=>n=>{const r=Es(wn(2,t),e,n);return 0===r.tag?new Xr(0,Is(r.fields[0])):new Xr(1,r.fields[0])}}return Ms(e,n,t,r)}}return"System.Boolean"===u?e=>n=>{return t=e,"boolean"==typeof(r=n)?new Xr(0,r):new Xr(1,[t,new Qr(0,"a boolean",r)]);var t,r}:"Microsoft.FSharp.Core.Unit"===u?e=>n=>{return t=e,null==(r=n)?new Xr(0,void 0):new Xr(1,[t,new Qr(0,"null",r)]);var t,r}:"System.String"===u?e=>n=>{return t=e,"string"==typeof(r=n)?new Xr(0,r):new Xr(1,[t,new Qr(0,"a string",r)]);var t,r}:"System.SByte"===u?gs:"System.Byte"===u?ws:"System.Int16"===u?ys:"System.UInt16"===u?vs:"System.Int32"===u?Cs:"System.UInt32"===u?bs:"System.Double"===u?e=>n=>{return t=e,"number"==typeof(r=n)?new Xr(0,r):new Xr(1,[t,new Qr(0,"a float",r)]);var t,r}:"System.Single"===u?e=>n=>{return t=e,"number"==typeof(r=n)?new Xr(0,r):new Xr(1,[t,new Qr(0,"a float32",r)]);var t,r}:"System.DateTime"===u?e=>n=>function(e,n){if("string"==typeof n){let r,o=$n(-621355968e5,0);return r=[Vn(n,new Sn((()=>o),(e=>{o=e}))),o],r[0]?new Xr(0,1===(t=r[1]).kind?t:$n(t.getTime(),1)):new Xr(1,[e,new Qr(0,"a datetime",n)])}var t;return new Xr(1,[e,new Qr(0,"a datetime",n)])}(e,n):"System.DateTimeOffset"===u?e=>n=>function(e,n){if("string"==typeof n){let t,r=ho(-621355968e5,0);return t=[mo(n,new Sn((()=>r),(e=>{r=e}))),r],t[0]?new Xr(0,t[1]):new Xr(1,[e,new Qr(0,"a datetimeoffset",n)])}return new Xr(1,[e,new Qr(0,"a datetime",n)])}(e,n):"System.TimeSpan"===u?e=>n=>function(e,n){if("string"==typeof n){let t,r=0;return t=[ii(n,new Sn((()=>r),(e=>{r=e}))),r],t[0]?new Xr(0,t[1]):new Xr(1,[e,new Qr(0,"a timespan",n)])}return new Xr(1,[e,new Qr(0,"a timespan",n)])}(e,n):"System.Guid"===u?e=>n=>function(e,n){if("string"==typeof n){let t,r="00000000-0000-0000-0000-000000000000";return t=[lo(n,new Sn((()=>r),(e=>{r=e}))),r],t[0]?new Xr(0,t[1]):new Xr(1,[e,new Qr(0,"a guid",n)])}return new Xr(1,[e,new Qr(0,"a guid",n)])}(e,n):"System.Object"===u?e=>e=>new Xr(0,e):Ms(e,n,t,r)}{const e=l;return n=>t=>e.contents(n)(t)}}function Fs(e,n,t){const r=In(n,new eo(0));return Ds(function(e){return null!=e?ji(((e,n)=>new Sn(n[1])),e.Coders):Hi()}(t),r,!1,e)}function Us(e,n,t){It((t=>{try{t(n)}catch(n){e(n)}}),t)}function Ps(){return vt()}function Rs(e){return bt(e)}class Gs extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["AccessRole"]}}function js(e){return new Gs(0,e)}function Hs(e){return Ft(new Gs(0,"SuperSelection.Access"),e,{Equals:an,GetHashCode:un})?An(void 0):void 0}function Ls(e){return Ft(new Gs(0,"SuperSelection.EditPanel"),e,{Equals:an,GetHashCode:un})?An(void 0):void 0}class $s extends xn{constructor(e,n){super(),this.UserName=e,this.Roles=n}}function Bs(e){let n;const t=ft(null==e?"":e,["."],null,0);if(Pn(((e,n)=>e===n),t,null)||3!==t.length)n=new Xr(1,"Failed to identify the user");else{let e;const o=t[1];e=atob(o),n=_s(wn(2,Fs(Tr(["Name",Mr],["Roles",(r=Mr,new xr("[]",[r]))]),new eo(1),void 0)),e)}var r;if(1===n.tag)return new $s(void 0,vt());{const e=n.fields[0];return new $s(e.Name,Dt(js,Ot(e.Roles)))}}class Vs extends xn{constructor(e,n){super(),this.PromotedFunds=e,this.Configuration=n}}class zs extends xn{constructor(e){super(),this.PromotedFunds=e}}class Ws extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Account","Partner"]}}class qs extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["DefaultUsi","PromotedFunds"]}}class Zs extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ResetModal","EditModal","Hidden"]}}class Js extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LoadData","ShowEditModal","ShowResetModal","CloseModal","UpdateDefaultUsi","UpdatePromotedFunds","ResetDefaultUsi","ResetPromotedFunds","PromotedFundsUpdate"]}}class Ys extends xn{constructor(e,n,t){super(),this.Data=e,this.User=n,this.ModalState=t}}class Xs extends xn{constructor(e,n,t){super(),this.UpdatePromotedFunds=e,this.DeletePromotedFunds=n,this.ReloadData=t}}new class{constructor(){}};function Ks(e,n){const t=function(e,n){return new Xr(0,n)}(0,n);return gr.Return(t)}function Qs(e,n){return gr.Delay(n)}new class{constructor(){}};class eu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class nu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Header"]}}class tu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class ru extends xn{constructor(e,n,t,r,o,i,s,u){super(),this.url=e,this.method=n,this.headers=t,this.withCredentials=r,this.overridenMimeType=o,this.overridenResponseType=i,this.timeout=s,this.content=u}}class ou extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class iu extends xn{constructor(e,n,t,r,o){super(),this.statusCode=0|e,this.responseText=n,this.responseType=t,this.responseHeaders=r,this.content=o}}const su=new ru("",new eu(0),vt(),!1,void 0,void 0,void 0,new tu(0));function uu(e,n){return"string"!=typeof(t=n)||0===t.length?[n]:ft(n,[e],null,0);var t}function lu(e){return new ru(e,su.method,su.headers,su.withCredentials,su.overridenMimeType,su.overridenResponseType,su.timeout,su.content)}function cu(e,n){return new ru(n.url,e,n.headers,n.withCredentials,n.overridenMimeType,n.overridenResponseType,n.timeout,n.content)}function au(e){return function(e){return _r((n=>e([n.onSuccess,n.onError,n.onCancel])))}((n=>{const t=new XMLHttpRequest;t.open(function(e){switch(e.tag){case 1:return"POST";case 3:return"PATCH";case 2:return"PUT";case 4:return"DELETE";case 6:return"OPTIONS";case 5:return"HEAD";default:return"GET"}}(e.method),e.url),t.onreadystatechange=()=>{let e,r,o,i,s,u;4===t.readyState&&n[0]((r=t.responseType,e=""===r||"text"===r?t.responseText:"",o=0|t.status,i=t.responseType,u=t.responseType,s=""===u||"text"===u?new ou(0,t.responseText):new ou("arraybuffer"===u?2:"blob"===u?1:3,t.response),new iu(o,e,i,function(e){const n=On();return Mi(n,Ei(n,e))}(function(e,n,t){const r=[];for(let t=0;t<=n.length-1;t++){const o=e(n[t]);if(null!=o){const e=kn(o);r.push(e)}}return r}((e=>{const n=Ot(uu(":",e));return xt(n)?void 0:[St(n).toLocaleLowerCase(),ct(":",Et(n)).trim()]}),uu("\r\n",t.getAllResponseHeaders()))),s)))};const r=Je(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();t.setRequestHeader(e.fields[0],e.fields[1])}}finally{We(r)}t.withCredentials=e.withCredentials;const o=e.overridenMimeType;if(null==o);else{const e=o;t.overrideMimeType(e)}const i=e.overridenResponseType;null==i||(1===i.tag?t.responseType="blob":2===i.tag?t.responseType="arraybuffer":t.responseType="text");const s=e.timeout;if(null==s);else{const e=0|s;t.timeout=0|e}const u=[e.method,e.content];0===u[0].tag?t.send(An(void 0)):1===u[1].tag||3===u[1].tag||2===u[1].tag?t.send(An(u[1].fields[0])):t.send(An(void 0))}))}new iu(0,"","",Hi(),new ou(0,""));class fu extends xn{constructor(e,n,t){super(),this.PartnerId=e,this.AccountId=n,this.Funds=t}}class du extends xn{constructor(e,n){super(),this.PartnerFunds=e,this.AccountFunds=n}}class hu extends xn{constructor(e){super(),this.DefaultFundUSI=e}}function mu(e){return e}function pu(e){return Array.from(e)}function _u(e){return Ln(e,"O")}function gu(e){return function(e,n="c",t){if(-1===["c","g","G"].indexOf(n))throw new Error("Custom formats are not supported");const r=Math.abs(function(e){return ti(e/864e5)}(e)),o=Math.abs(function(e){return ti(e%864e5/36e5)}(e)),i=Math.abs(function(e){return ti(e%36e5/6e4)}(e)),s=Math.abs(function(e){return ti(e%6e4/1e3)}(e)),u=Math.abs(function(e){return ti(e%1e3)}(e));return`${e<0?"-":""}${0!==r||"c"!==n&&"g"!==n?"c"===n?r+".":r+":":""}${"g"===n?o:Ke(o,2)}:${Ke(i,2)}:${Ke(s,2)}${0!==u||"c"!==n&&"g"!==n?"g"===n?"."+Ke(u,3):"."+function(e,n,t){let r=e.toString(10);for(;r.length<3;)r="0"+r;for(;r.length<7;)r+="0";return r}(u):""}`}(e)}function wu(){return null}function yu(e){return Ln(e,"O")}function vu(e,n,t,r){const o=new Sn(null),i=Ri(Fr(r),o,e);let s;if(qr(r)){const e=Fn((e=>{const r=oo(n,Dr(e)),o=Cu(i,n,t,e[1]);return n=>i=>{const s=function(e,n){return e[n[0]]}(n,e);return(!t||t&&null!=s)&&(i[r]=o(s)),i}}),Vr(r));s=n=>Xt(((e,t)=>t(n)(e)),{},e)}else{if(!Wr(r)){let e;const n=Fr(r);throw e=it(rt("Cannot generate auto encoder for %s. Please pass an extra encoder."))(n),new Error(e)}s=e=>{const o=function(e,n){const t=Br(n)[e.tag];if(null==t)throw new Error(`Cannot find case ${e.name} in union type`);return[t,e.fields]}(e,r),s=o[0],u=o[1],l=0|u.length;if(0===l)return Dr(s);{const e=0|l,r=Jr(s),o=Dn(new Array(e+1),0,e+1,null);o[0]=Dr(s);for(let s=1;s<=e;s++){const e=Cu(i,n,t,r[s-1][1]);o[s]=e(u[s-1])}return o}}}return o.contents=s,s}function Cu(e,n,t,r){const o=Fr(r),i=Gi(o,e);if(null==i){if(Ur(r)){const o=Cu(e,n,t,Pr(r));return e=>pu(Qt(o,e))}if(Gr(r)){const e=Fr(Hr(r));if("System.SByte"===e)return e=>e;if("System.Byte"===e)return e=>e;if("System.Int16"===e)return e=>e;if("System.UInt16"===e)return e=>e;if("System.Int32"===e)return e=>e;if("System.UInt32"===e)return e=>e;{const e=Fr(r);return st(rt("Cannot generate auto encoder for %s.\nThoth.Json.Net only support the folluwing enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\nIf you can't use one of these types, please pass an extra encoder.\n "))(e)}}if(Rr(r)){if(Zr(r)){const o=Fn((r=>Cu(e,n,t,r)),zr(r));return e=>pu(er(((e,n)=>o[e](n)),e))}{const o=Fr(jr(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===o){const o=new Xe((()=>{return o=Cu(e,n,t,Sr(r)[0]),e=>{return null!=(n=Nn(o,e))?kn(n):null;var n};var o}));return e=>null==e?null:o.Value(e)}if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===o||"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===o){const o=Cu(e,n,t,Sr(r)[0]);return e=>pu(Qt(o,e))}if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===o){const o=Sr(r)[0],i=Cu(e,n,t,Sr(r)[1]);if("System.String"===Fr(o)||"System.Guid"===Fr(o))return e=>Xt(((e,n)=>{const t=n;return e[t[0]]=i(t[1]),e}),{},e);{let r;const s=Cu(e,n,t,o);return r=s,e=>pu(Qt((e=>{const n=e;return[r(n[0]),i(n[1])]}),e))}}return vu(e,n,t,r)}}return"System.Boolean"===o?e=>e:"Microsoft.FSharp.Core.Unit"===o?wu:"System.String"===o?e=>e:"System.SByte"===o?e=>e:"System.Byte"===o?e=>e:"System.Int16"===o?e=>e:"System.UInt16"===o?e=>e:"System.Int32"===o?e=>e:"System.UInt32"===o?e=>e:"System.Double"===o?e=>e:"System.Single"===o?e=>e:"System.DateTime"===o?yu:"System.DateTimeOffset"===o?_u:"System.TimeSpan"===o?gu:"System.Guid"===o?mu:"System.Object"===o?e=>e:vu(e,n,t,r)}{const e=i;return n=>e.contents(n)}}function bu(e){return`${e}/super-selection/admin`}function xu(e,n){return Qs(0,(()=>{const t=(r=function(e){return new nu(0,"Authorization",e)}(it(rt("Bearer %s"))(e)),new ru((o=n).url,o.method,Mt(o.headers,bt(r)),o.withCredentials,o.overridenMimeType,o.overridenResponseType,o.timeout,o.content));var r,o;const i=(e=>{return n=e,gr.Bind(n,(e=>(e=>{return n=e,gr.Return(n);var n})(new Xr(0,e))));var n})(au(t));return gr.Delay((()=>gr.Bind(i,(e=>{let n;const r=e;return 1===r.tag?gr.Return(new Xr(1,r.fields[0])):gr.ReturnFrom((n=r.fields[0],429===n.statusCode||n.statusCode>=500?(o=au(t),gr.Bind(o,(e=>{return n=new Xr(0,e),t=n,gr.Return(t);var n,t}))):Ks(0,n)));var o}))))}))}function Su(e,n,t,r){return Qs(0,(()=>{let o;const i=xu(n,cu(new eu(0),lu((o=bu(e),`${o}/promoted-funds/${t}/${function(e){return null==e?null:kn(e)}(r)}`))));return gr.Delay((()=>gr.Bind(i,(e=>{let n;const t=e;return 1===t.tag?gr.Return(new Xr(1,t.fields[0])):gr.ReturnFrom((n=t.fields[0],200===n.statusCode?(o=_s(wn(2,Fs(kr("SuperSelection.AdminUI.Dto.PromotedFunds",[],du,(()=>[["PartnerFunds",Nr(Mr)],["AccountFunds",Nr(Mr)]])),new eo(1),void 0)),n.responseText),gr.Return(o)):(r=new Xr(1,"Unexpected response from backend"),gr.Return(r))));var r,o}))))}))}function Eu(e,n,t,r,o){return Qs(0,(()=>{let i;const s=(null==r?e=>`${e}/promoted-funds/${t}`:(i=r,e=>`${e}/promoted-funds/${t}/${i}`))(bu(e)),u=xu(n,cu(new eu(1),(l=new tu(1,function(e,n){return JSON.stringify(n,wn(2,null),An(e))}(0,function(e,n,t,r){const o=In(n,new eo(0)),i=In(void 0,!0);return Cu(function(e){return null!=e?ji(((e,n)=>new Sn(n[0])),e.Coders):Hi()}(void 0),o,i,e)}(Tr(["Funds",Nr(Mr)]),new eo(1))(o))),c=lu(s),new ru(c.url,c.method,c.headers,c.withCredentials,c.overridenMimeType,c.overridenResponseType,c.timeout,l))));var l,c;return gr.Delay((()=>gr.Bind(u,(e=>{let n;const t=e;return 1===t.tag?gr.Return(new Xr(1,t.fields[0])):gr.ReturnFrom((n=t.fields[0],200===n.statusCode?(o=new Xr(0,void 0),gr.Return(o)):(r=new Xr(1,n.responseText),gr.Return(r))));var r,o}))))}))}class Au extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ColumnHeader"]}}function ku(e){return e.fields[0]}class Tu extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["RowCell"]}}function Iu(e){return new Tu(0,e)}function Nu(e){return e.fields[0]}function Ou(e){return n=d("th",_n(Ot([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],["scope","col"],["children",e]]))),new Au(0,n);var n}function Mu(e,n){let t;return Iu(d("td",_n(Ot([["className","px-6 py-4 whitespace-nowrap text-sm"],(t=[d("a",{className:"text-indigo-600 hover:text-indigo-900",children:n,href:e})],["children",tr.Children.toArray(Array.from(t))])]))))}function Du(e,n){return Iu(d("td",{className:ct(" ",Jt(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:n}))}function Fu(e,n){let t,r,o,i,s,u,l;return d("div",_n(Ot([["className","flex flex-col mt-4"],(t=[d("div",_n(Ot([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[d("div",_n(Ot([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(o=[d("div",_n(Ot([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(i=[d("table",_n(Ot([["className","min-w-full divide-y divide-gray-200"],(s=[d("thead",{className:"bg-gray-50",children:(u=Qt(ku,e),d("tr",{children:tr.Children.toArray(Array.from(u))}))}),(l=er(((e,n)=>(n=>{let t;return d("tr",_n(Ot([["className",e%2==0?"bg-white":"bg-gray-50"],(t=Qt(Nu,n),["children",tr.Children.toArray(Array.from(t))])])))})(n)),n),d("tbody",{children:tr.Children.toArray(Array.from(l))}))],["children",tr.Children.toArray(Array.from(s))])])))],["children",tr.Children.toArray(Array.from(i))])])))],["children",tr.Children.toArray(Array.from(o))])])))],["children",tr.Children.toArray(Array.from(r))])])))],["children",tr.Children.toArray(Array.from(t))])])))}const Uu=(()=>{try{if("undefined"!=typeof window&&"function"==typeof window.addEventListener){const e={passive:!0};window.addEventListener("testPassiveEventSupport",(e=>{}),e),window.removeEventListener("testPassiveEventSupport",(e=>{}))}}catch(e){}return!1})();function Pu(e){return Nn((e=>e.passive&&!Uu?{capture:e.capture,once:e.once,passive:!1}:e),e)}function Ru(e){return null!=(n=e)?(e=>e.capture?{capture:!0}:void 0)(kn(n)):void 0;var n}function Gu(e,n){return 0===n.indexOf(e)?n:void 0}function ju(e,n){return function(e,n){const t=e.lastIndexOf(n);return t>=0&&t===e.length-n.length}(n,e)?n:void 0}function Hu(e,n){return function(e){return 1===e?e=>{let n,t,r,o,i,s;return n=Gu("/",e),null!=n?(t=n,"#"+t):(r=Gu("#/",e),null!=r?(o=r,o):(i=Gu("#",e),null!=i?(s=i,"#/"+dt(s,1,s.length-1)):"#/"+e))}:e=>{let n,t;return n=Gu("/",e),null!=n?(t=n,t):"/"+e}}(n)(ct("/",Dt((e=>e.indexOf("?")>=0||0===e.indexOf("#")||0===e.indexOf("/")?e:encodeURIComponent(e)),e)))}function Lu(e,n,t,r,o){const i=function(e,n,t,r){const o=0|mn(e,t);if(0===o)throw new Error("The step of a range cannot be zero");const i=o>0;return t=>{const o=0|mn(t,n);return i&&o<=0||!i&&o>=0?[t,r(t,e)]:void 0}}(n,t,r,o);return Vt((()=>{return n=i,t=e,$t((()=>function(e,n){let t,r=n;return Ht((()=>{if(null!=t){const e=t[0];return t[1],e}return Pt()}),(()=>{if(t=e(r),null!=t){t[0];const e=t[1];return r=e,!0}return!1}),(()=>{}))}(n,t)));var n,t}))}or((e=>{const n=dr((n=>{const t=In(e.onUrlChanged,(e=>{}));!function(e,n,t){var r,o;n((r=2===e?window.location.pathname+window.location.search:window.location.hash,o=e,function(e,n){let t,r;const o=pt();let i=o,s=n;for(;!gt(s);){let n=e(wt(s));for(;!gt(n);)t=i,r=new ht(wt(n),void 0),t.tail=r,i=r,n=yt(n);s=yt(s)}const u=i,l=pt();return u.tail=l,yt(o)}((e=>{if("string"!=typeof(n=e)||/^\s*$/.test(n))return vt();{const n=function(e,...n){return 0===n.length?e.trimEnd():e.replace(new RegExp("["+Kn(n.join(""))+"]+$"),"")}(e,"#");if("?"===n)return vt();if(null!=Gu("?",n))return bt(n);{const e=n.split("?");if(Pn(((e,n)=>e===n),e,null)||1!==e.length){if(Pn(((e,n)=>e===n),e,null)||2!==e.length)return vt();if(""===e[1]){const n=e[0];return bt(decodeURIComponent(n))}{const n=e[0],t=e[1];return Ot([decodeURIComponent(n),"?"+t])}}{const n=e[0];return bt(decodeURIComponent(n))}}}var n}),Ot(ft(null!=Gu("#",r)?dt(r,1,r.length-1):1!==o||null==ju("#",r)&&null==ju("#/",r)?r:"",["/"],null,0)))))}(In(e.hashMode,1),t)}));if(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0){const e="hashchange",t=n,r=void 0,o=fr((()=>Pu(r)),[r]),i=fr((()=>Ru(r)),[r]),s=fr((()=>t),[t]);ur(dr((()=>{if(null==o)window.addEventListener(e,s);else{const n=o;window.addEventListener(e,s,n)}return ir((()=>{if(null==i)window.removeEventListener(e,s);else{const n=i;window.removeEventListener(e,s,n)}}))})))}else{const e="popstate",t=n,r=void 0,o=fr((()=>Pu(r)),[r]),i=fr((()=>Ru(r)),[r]),s=fr((()=>t),[t]);ur(dr((()=>{if(null==o)window.addEventListener(e,s);else{const n=o;window.addEventListener(e,s,n)}return ir((()=>{if(null==i)window.removeEventListener(e,s);else{const n=i;window.removeEventListener(e,s,n)}}))})))}const t="CUSTOM_NAVIGATION_EVENT",r=n,o=void 0,i=fr((()=>Pu(o)),[o]),s=fr((()=>Ru(o)),[o]),u=fr((()=>r),[r]);ur(dr((()=>{if(null==i)window.addEventListener(t,u);else{const e=i;window.addEventListener(t,u,e)}return ir((()=>{if(null==s)window.removeEventListener(t,u);else{const e=s;window.removeEventListener(t,u,e)}}))})));const l=e.application;return null==l?null:l}),void 0,void 0,void 0);class $u extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Writable","ReadWritable"]}}class Bu{constructor(e){this.state=new $u(0,Dn(new Array(pn(dn,e,10)),0,pn(dn,e,10),null),0)}}function Vu(e){const n=e.state;if(1===n.tag){const t=0|n.fields[1],r=0|n.fields[2],o=n.fields[0],i=(r+1)%o.length|0;return e.state=i===t?new $u(0,o,t):new $u(1,o,t,i),An(o[r])}}class zu extends xn{constructor(e,n,t,r,o,i,s){super(),this.init=e,this.update=n,this.subscribe=t,this.view=r,this.setState=o,this.onError=i,this.syncDispatch=s}}function Wu(e,n){const t=n.init(e),r=t[0],o=new Bu(10);let i=!1,s=r;const u=vn(1,n.syncDispatch,[e=>{if(i)!function(e,n){const t=e.state;if(1===t.tag){const i=0|t.fields[1],s=0|t.fields[2],u=t.fields[0];u[i]=n;const l=(i+1)%u.length|0;e.state=l===s?new $u(1,(r=s,o=u,Array.from(Vt((()=>Jt(nr(r,o),Vt((()=>{return Jt((e=r,n=o,Zt((()=>Bt(n)),((n,t)=>{if(n<e){if(t["System.Collections.IEnumerator.MoveNext"]())return An(t["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(Ut+"\\nParameter name: source")}}),We)),Vt((()=>{return n=e=>Wt(null),e=o.length,t=Lu(0,1,e,0,((e,n)=>e+n)),Vt((()=>zt(Qt(n,t))));var e,n,t})));var e,n}))))))),u.length,0):new $u(1,u,l,s)}else{const r=0|t.fields[1],o=t.fields[0];o[r]=n;const i=(r+1)%o.length|0;e.state=new $u(1,o,i,r)}var r,o}(o,e);else{i=!0;let t=An(e);for(;null!=t;){const e=kn(t);try{const t=n.update(e,s),r=t[0];n.setState(r,u),Us((t=>{n.onError([it(rt("Error in command while handling: %A"))(e),t])}),u,t[1]),s=r}catch(t){n.onError([it(rt("Unable to process the message: %A"))(e),t])}t=Vu(o)}i=!1}}]);n.setState(r,u),Us((e=>{n.onError(["Error intitializing:",e])}),u,function(e){const n=pt();let t=n;const r=e=>{t=kt(((e,n)=>{const t=new ht(n,void 0);return e.tail=t,t}),t,e)};if(Be(e))e.forEach(r);else if(e instanceof ht)It(r,e);else{const n=Je(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();)r(n["System.Collections.Generic.IEnumerator`1.get_Current"]())}finally{We(n)}}const o=t,i=pt();return o.tail=i,yt(n)}(Ot([(()=>{try{return n.subscribe(r)}catch(e){return n.onError(["Unable to subscribe:",e]),Ps()}})(),t[1]])))}class qu{constructor(){this.hasDisposedOnce=!1,this.state=void 0,this.listener=void 0,this.dispatcher=void 0}}function Zu(){return new qu}function Ju(e,n,t,r){Wu(n,function(e,n){return new zu(n.init,n.update,n.subscribe,n.view,((e,n)=>{!function(e,n,t){e.state=An(n),e.dispatcher=t;const r=e.listener;null!=r&&r(n)}(t,e,n)}),n.onError,n.syncDispatch)}(0,e()));const o=function(e){return e.state}(t);if(null!=o)return kn(o);throw new Error("Elmish program has not initialized")}function Yu(e,n){return function(e,n,t){const r=sr(Zu)[0],o=sr((()=>Ju(e,n,r))),i=o[1];return lr((()=>(function(e){return e.hasDisposedOnce}(r)&&i(Ju(e,n,r)),ir((()=>{!function(e){const n=e.state;if(null!=n){const e=kn(n);ze(e)&&We(e)}e.dispatcher=void 0,e.state=void 0,e.hasDisposedOnce=!0}(r)})))),In(t,[])),function(e,n){null==e.listener&&(e.listener=n)}(r,i),[o[0],e=>{!function(e,n){const t=e.dispatcher;null!=t&&t(n)}(r,e)}]}(e,void 0,n)}function Xu(e,n,t){return Yu((()=>function(e,n,t){return new zu(e,n,(e=>Ps()),t,((e,n)=>{t(e,n)}),(e=>{var n,t;n=e[0],t=e[1],console.error(An(n),t)}),wn(2,(e=>e)))}(e,n,((e,n)=>{}))),t)}function Ku(){const e=bt(d("span",{children:["Please wait..."]}));return d("div",{children:tr.Children.toArray(Array.from(e))})}function Qu(e){const n=bt(d("span",{children:[e.error]}));return d("div",{children:tr.Children.toArray(Array.from(n))})}class el extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["LoadData"]}}class nl extends xn{constructor(e,n){super(),this.PromotedFundOverrides=e,this.User=n}}function tl(e,n){return[new nl(e.fields[0],n.User),Ps()]}const rl=Ot([Ou("Partner Id"),Ou("Account Id"),Ou("Promoted Funds")]);function ol(e,n){return Hu(Ot(["account-registry","partners",e,"accounts",n,"super-configuration"]),1)}function il(e){return qt(Vt((()=>{let n;return Jt(Wt((n=[(t=e.PartnerId,Hu(Ot(["account-registry","partners",t,"super-configuration"]),1)),e.PartnerId],Mu(n[0],n[1]))),Vt((()=>{let n,t,r;return Jt((n=e.AccountId,null==n?Wt(Du(["text-gray-500"],"-")):(t=n,Wt((r=[ol(e.PartnerId,t),t],Mu(r[0],r[1]))))),Vt((()=>Wt(Du(["text-gray-500"],ct(", ",e.Funds))))))})));var t})))}function sl(e){let n;const t=Xu((()=>{return n=e.accessToken,[new nl(new Cr(0),Bs(n)),Ps()];var n}),tl),r=t[0];if(cr(br((()=>function(e){return n=e.backendUrl,t=e.accessToken,Qs(0,(()=>{let e;const r=xu(t,cu(new eu(0),lu((e=bu(n),`${e}/promoted-funds`))));return gr.Delay((()=>gr.Bind(r,(e=>{let n,t;const r=e;return 1===r.tag?gr.Return(new Xr(1,r.fields[0])):gr.ReturnFrom((n=r.fields[0],t=0|n.statusCode,200===t?(s=_s(wn(2,Fs(Nr(kr("SuperSelection.AdminUI.Dto.PromotedFundOverride",[],fu,(()=>[["PartnerId",Mr],["AccountId",Ir(Mr)],["Funds",Nr(Mr)]]))),new eo(1),void 0)),n.responseText),gr.Return(s)):401===t?(i=new Xr(1,"You do not have the appropriate permissions to view this information"),gr.Return(i)):(o=new Xr(1,"Unexpected response from backend"),gr.Return(o))));var o,i,s}))))}));var n,t}(e)),(e=>{t[1](new el(0,e))}))),null==Hs(r.User.Roles))return d(Qu,{error:"You do not have the appropriate permissions to view this information"});{const e=r.PromotedFundOverrides;let t,o,i,s;switch(1===e.tag?t=0:2===e.tag?0===e.fields[0].tag?(t=3,s=e.fields[0].fields[0]):(t=1,o=e.fields[0].fields[0]):3===e.tag?(t=2,i=e.fields[0]):t=0,t){case 0:return d(Ku,null);case 1:return d(Qu,{error:o});case 2:return d(Qu,{error:Cn(i)});case 3:return d("div",_n(bt((n=[d("h2",{className:"text-xl text-gray-900",children:"Promoted Fund Overrides"}),d("p",{className:"mt-2 text-sm text-gray-700",children:"A list of all promoted fund overrides. This does not include accounts or partners that use the default configuration."}),Fu(rl,Dt(il,s))],["children",tr.Children.toArray(Array.from(n))]))))}}}function ul(e){return["strokeLinecap",e]}function ll(e){return["strokeLinejoin",e]}const cl=d("div",_n(Ot([["className",ct(" ",["mx-auto","flex-shrink-0","flex","items-center","justify-center","h-12","w-12","rounded-full","bg-red-100","sm:mx-0","sm:h-10","sm:w-10"])],(()=>{let e;const n=[d("svg",_n(Ot([["className",ct(" ",["h-6","w-6","text-red-600"])],["fill","none"],["stroke","currentColor"],["strokeWidth",2],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(e=bt(d("path",_n(Ot([ul("round"),ll("round"),["d","M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"]])))),["children",tr.Children.toArray(Array.from(e))])])))];return["children",tr.Children.toArray(Array.from(n))]})()]))),al=d("div",_n(Ot([["className",ct(" ",["mx-auto","flex-shrink-0","flex","items-center","justify-center","h-12","w-12","rounded-full","bg-indigo-100","sm:mx-0","sm:h-10","sm:w-10"])],(()=>{let e;const n=[d("svg",_n(Ot([["className",ct(" ",["h-6","w-6","text-indigo-600"])],["fill","none"],["stroke","currentColor"],["strokeWidth",2],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],(e=bt(d("path",_n(Ot([ul("round"),ll("round"),["d","M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"]])))),["children",tr.Children.toArray(Array.from(e))])])))];return["children",tr.Children.toArray(Array.from(n))]})()])));function fl(e,n,t){let r,o;return d("div",_n(Ot([["className","mt-2 w-full h-full"],(r=[d("div",_n(Ot([["className","h-30"],(o=[d("label",{className:"sr-only text-base",htmlFor:"field",children:n}),d("input",{type:"text",name:"field",id:"field",className:"shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-base border-gray-300 rounded-md",value:t,onChange:n=>{e(n.target.value)}})],["children",tr.Children.toArray(Array.from(o))])])))],["children",tr.Children.toArray(Array.from(r))])])))}function dl(e,n,t,r){let o;return d("div",_n(Ot([["className",ct(" ",["bg-gray-50","px-4","py-3","sm:px-6","sm:flex","sm:flex-row-reverse"])],(o=[d("button",{className:ct(" ",["w-full","inline-flex","justify-center","rounded-md","border","border-transparent","shadow-sm","px-4","py-2","bg-indigo-600","text-base","font-medium","text-white","hover:bg-indigo-700","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-indigo-500","sm:ml-3","sm:w-auto","sm:text-sm"]),type:"button",children:e,onClick:n}),d("button",{className:ct(" ",["mt-3","w-full","inline-flex","justify-center","rounded-md","border","border-gray-300","shadow-sm","px-4","py-2","bg-white","text-base","font-medium","text-gray-700","hover:bg-gray-50","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-indigo-500","sm:mt-0","sm:ml-3","sm:w-auto","sm:text-sm"]),type:"button",children:t,onClick:r})],["children",tr.Children.toArray(Array.from(o))])])))}function hl(e){let n,t,r,o,i,s,u;const l=(c=e.FieldValue,tr.useState(c));var c;const a=l[0];return d("div",_n(Ot([["className",ct(" ",["relative","z-10"])],["role",ct(" ",["dialog"])],(n=[d("div",{className:ct(" ",["fixed","inset-0","bg-gray-500","bg-opacity-75","transition-opacity"])}),d("div",_n(Ot([["className",ct(" ",["fixed","z-10","inset-0","overflow-y-auto"])],(t=[d("div",_n(Ot([["className",ct(" ",["flex","items-end","justify-center","min-h-screen","pt-4","px-4","pb-20","text-center","sm:block","sm:p-0"])],(r=[d("span",{className:ct(" ",["hidden","sm:inline-block","sm:align-middle","sm:h-screen"]),children:""}),d("div",_n(Ot([["className",ct(" ",["relative","inline-block","align-bottom","bg-white","rounded-lg","text-left","overflow-hidden","shadow-xl","transform","transition-all","sm:my-8","sm:align-middle","sm:max-w-lg","sm:w-full"])],(o=[d("div",_n(Ot([["className",ct(" ",["bg-white","px-4","pt-5","pb-4","sm:p-6","sm:pb-4"])],(i=[d("div",_n(Ot([["className",ct(" ",["sm:flex","sm:items-start"])],(s=[al,d("div",_n(Ot([["className",ct(" ",["mt-3","text-center","sm:mt-0","sm:ml-4","sm:text-left","w-full"])],(u=[(f=e.HeadingText,d("h3",{className:ct(" ",["text-lg","leading-6","font-medium","text-gray-900"]),id:"modal-title",children:f})),fl(l[1],e.FieldName,a)],["children",tr.Children.toArray(Array.from(u))])])))],["children",tr.Children.toArray(Array.from(s))])])))],["children",tr.Children.toArray(Array.from(i))])]))),dl(e.ConfirmAction.ActionText,vn(1,e.ConfirmAction.Action,[a]),e.CancelAction.ActionText,e.CancelAction.Action)],["children",tr.Children.toArray(Array.from(o))])])))],["children",tr.Children.toArray(Array.from(r))])])))],["children",tr.Children.toArray(Array.from(t))])])))],["children",tr.Children.toArray(Array.from(n))])])));var f}function ml(e,n){let t;return d("div",_n(Ot([["className",ct(" ",["bg-gray-50","px-4","py-3","sm:px-6","sm:flex","sm:flex-row-reverse"])],(t=[d("button",{className:ct(" ",["w-full","inline-flex","justify-center","rounded-md","border","border-transparent","shadow-sm","px-4","py-2","bg-red-600","text-base","font-medium","text-white","hover:bg-red-700","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-red-500","sm:ml-3","sm:w-auto","sm:text-sm"]),type:"button",children:e.ActionText,onClick:e.Action}),d("button",{className:ct(" ",["mt-3","w-full","inline-flex","justify-center","rounded-md","border","border-gray-300","shadow-sm","px-4","py-2","bg-white","text-base","font-medium","text-gray-700","hover:bg-gray-50","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-indigo-500","sm:mt-0","sm:ml-3","sm:w-auto","sm:text-sm"]),type:"button",children:n.ActionText,onClick:n.Action})],["children",tr.Children.toArray(Array.from(t))])])))}function pl(e){let n;return d("div",_n(Ot([["className","mt-2"],(n=[d("p",{className:ct(" ",["text-sm","text-gray-500"]),children:e})],["children",tr.Children.toArray(Array.from(n))])])))}function _l(e,n,t,r){let o,i,s,u;return d("div",_n(Ot([["className",ct(" ",["relative","inline-block","align-bottom","bg-white","rounded-lg","text-left","overflow-hidden","shadow-xl","transform","transition-all","sm:my-8","sm:align-middle","sm:max-w-lg","sm:w-full"])],(o=[d("div",_n(Ot([["className",ct(" ",["bg-white","px-4","pt-5","pb-4","sm:p-6","sm:pb-4"])],(i=[d("div",_n(Ot([["className",ct(" ",["sm:flex","sm:items-start"])],(s=[cl,d("div",_n(Ot([["className",ct(" ",["mt-3","text-center","sm:mt-0","sm:ml-4","sm:text-left"])],(u=[(l=e,d("h3",{className:ct(" ",["text-lg","leading-6","font-medium","text-gray-900"]),id:"modal-title",children:l})),pl(n)],["children",tr.Children.toArray(Array.from(u))])])))],["children",tr.Children.toArray(Array.from(s))])])))],["children",tr.Children.toArray(Array.from(i))])]))),ml(t,r)],["children",tr.Children.toArray(Array.from(o))])])));var l}function gl(e){let n,t,r;return d("div",_n(Ot([["className",ct(" ",["relative","z-10"])],["role",ct(" ",["dialog"])],(n=[d("div",{className:ct(" ",["fixed","inset-0","bg-gray-500","bg-opacity-75","transition-opacity"])}),d("div",_n(Ot([["className",ct(" ",["fixed","z-10","inset-0","overflow-y-auto"])],(t=[d("div",_n(Ot([["className",ct(" ",["flex","items-end","justify-center","min-h-screen","pt-4","px-4","pb-20","text-center","sm:block","sm:p-0"])],(r=[d("span",{className:ct(" ",["hidden","sm:inline-block","sm:align-middle","sm:h-screen"]),children:""}),_l(e.HeadingText,e.BodyText,e.ConfirmAction,e.CancelAction)],["children",tr.Children.toArray(Array.from(r))])])))],["children",tr.Children.toArray(Array.from(t))])])))],["children",tr.Children.toArray(Array.from(n))])])))}function wl(e,n){return e.replace(/[a-z]?[A-Z]/g,(e=>1===e.length?e.toLowerCase():e.charAt(0)+n+e.charAt(1).toLowerCase()))}function yl(e,n=0){const t={},r=n;function o(e){throw new Error("Cannot infer key and value of "+String(e))}function i(e,n,r){e=function(e,n){switch(n){case 1:return e.charAt(0).toLowerCase()+e.slice(1);case 2:return wl(e,"_");case 3:return wl(e,"_").toUpperCase();case 4:return wl(e,"-");default:return e}}(e,n),t[e]=r}for(let n of e){let e=0;if(null==n&&o(n),n instanceof bn){const t=n.cases()[n.tag];n=0===n.fields.length?t:[t].concat(n.fields),e=r}if(Array.isArray(n))switch(n.length){case 0:o(n);break;case 1:i(n[0],e,!0);break;case 2:const t=n[1];i(n[0],e,t);break;default:i(n[0],e,n.slice(1))}else"string"==typeof n?i(n,e,!0):o(n)}return t}const vl=ge((function(e,n){return d("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:n},e),d("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))})),Cl=ge((function(e,n){return d("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:n},e),d("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))}));class bl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Pencil","Trash"]}}class xl extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["ClassName"]}}function Sl(e,n){if(1===e.tag){const e=yl(n,1);return d(vl,e)}{const e=yl(n,1);return d(Cl,e)}}class El extends bn{constructor(e,...n){super(),this.tag=0|e,this.fields=n}cases(){return["Default","Inherited","Config"]}}function Al(e){switch(e.tag){case 1:return e.fields[0]+" (inherited)";case 2:return e.fields[0];default:return e.fields[0]+" (default)"}}function kl(e){switch(e.tag){case 1:default:return"";case 2:return e.fields[0]}}function Tl(e,n,t,r){return Qs(0,(()=>{const o=Su(e,n,t,r);return gr.Delay((()=>gr.Bind(o,(t=>{const o=t;return 1===o.tag?gr.Return(new Xr(1,o.fields[0])):gr.ReturnFrom((i=function(e,n,t){return Qs(0,(()=>{let r;const o=xu(n,cu(new eu(0),lu((r=bu(e),`${r}/configurations/${t}`))));return gr.Delay((()=>gr.Bind(o,(e=>{let n,t;const r=e;return 1===r.tag?gr.Return(new Xr(1,r.fields[0])):gr.ReturnFrom((n=r.fields[0],t=0|n.statusCode,200===t?(i=_s(wn(2,Fs(kr("SuperSelection.AdminUI.Dto.AccountConfiguration",[],hu,(()=>[["DefaultFundUSI",Ir(Mr)]])),new eo(1),void 0)),n.responseText),gr.Return(i)):404===t?Ks(0,new hu(void 0)):(o=new Xr(1,"Unexpected response from backend"),gr.Return(o))));var o,i}))))}))}(e,n,r),gr.Bind(i,(e=>(e=>{return n=e,gr.Return(n);var n})(Kr((e=>new Ws(0,new Vs(o.fields[0],e))),e))))));var i}))))}))}function Il(e,n,t){return Qs(0,(()=>{return r=Su(e,n,t,void 0),gr.Bind(r,(e=>(e=>{return n=e,gr.Return(n);var n})(Kr((e=>new Ws(1,new zs(e))),e))));var r}))}function Nl(e){return new Xs(((n,t)=>function(e,n,t){return gr.Delay((()=>gr.Bind(Eu(e.backendUrl,e.accessToken,e.partnerId,e.accountId,n),(e=>(t(new Js(8,e)),gr.Zero())))))}(e,n,t)),(n=>function(e,n){return gr.Delay((()=>{return gr.Bind((t=e.backendUrl,r=e.accessToken,o=e.partnerId,i=e.accountId,Qs(0,(()=>{let e;const n=xu(r,cu(new eu(4),lu((null==i?e=>`${e}/promoted-funds/${o}`:(e=i,n=>`${n}/promoted-funds/${o}/${e}`))(bu(t)))));return gr.Delay((()=>gr.Bind(n,(e=>{let n;const t=e;return 1===t.tag?gr.Return(new Xr(1,t.fields[0])):gr.ReturnFrom((n=t.fields[0],200===n.statusCode?(o=new Xr(0,void 0),gr.Return(o)):(r=new Xr(1,n.responseText),gr.Return(r))));var r,o}))))}))),(e=>(n(new Js(8,e)),gr.Zero())));var t,r,o,i}))}(e,n)),(n=>function(e,n){return gr.Delay((()=>{let t;return gr.Bind((t=e.accountId,null==t?Il(e.backendUrl,e.accessToken,e.partnerId):Tl(e.backendUrl,e.accessToken,e.partnerId,t)),(e=>(n(new Js(0,new Cr(2,e))),gr.Zero())))}))}(e,n)))}function Ol(e,n){return d(hl,{CancelAction:{Action:e=>{n(new Js(3))},ActionText:"Cancel"},ConfirmAction:{Action:(e,t)=>{n(new Js(5,e))},ActionText:"Save"},FieldName:"Promoted Funds",FieldValue:e,HeadingText:"Edit Promoted Funds"})}function Ml(e){return d(gl,{BodyText:"Are you sure you want to reset the current promoted funds? This action cannot be undone.",CancelAction:{Action:n=>{e(new Js(3))},ActionText:"Cancel"},ConfirmAction:{Action:n=>{e(new Js(7))},ActionText:"Reset"},HeadingText:"Reset Promoted Funds"})}function Dl(e,n,t,r){let o,i,s;const u=(e,n,t)=>{let r;return d("button",_n(Ot([["className",ct(" ",["mr-2","w-14","px-4","py-2","border","border-transparent","shadow-sm","font-medium","rounded-md","text-white","focus:outline-none","focus:ring-2","focus:ring-offset-2","sm:text-sm",`bg-${n}-600`,`hover:bg-${n}-700`,`focus:ring-${n}-500`])],["type","button"],["onClick",t],(r=[Sl(e,bt(new xl(0,"mr-3 flex-shrink-0 h-4 w-6")))],["children",tr.Children.toArray(Array.from(r))])])))},l=Ot(Tn(Nn((e=>u(new bl(0),"indigo",e)),t))),c=Ot(Tn(Nn((e=>u(new bl(1),"red",e)),r)));return d("div",_n(Ot([["className",ct(" ",["px-4","py-5","sm:grid","sm:grid-cols-5","sm:gap-4","sm:px-6"])],(o=[d("dt",{className:ct(" ",["text-sm","font-medium","text-gray-500"]),children:e}),d("dd",_n(Ot([["className",ct(" ",["mt-1","text-sm","text-gray-900","sm:mt-0","sm:col-span-2"])],(i=[d("span",{className:"flex-grow",children:n})],["children",tr.Children.toArray(Array.from(i))])]))),d("span",_n(Ot([["className","flex-grow"],(s=qt(Vt((()=>Jt(l,Vt((()=>c)))))),["children",tr.Children.toArray(Array.from(s))])])))],["children",tr.Children.toArray(Array.from(o))])])))}function Fl(e,n,t){return Dl("Default USI",n,null!=Ls(e)?e=>{t(new Js(1,new qs(0)))}:void 0,null!=Ls(e)?e=>{t(new Js(2,new qs(0)))}:void 0)}function Ul(e,n,t){return Dl("Promoted Funds",n,null!=Ls(e)?e=>{t(new Js(1,new qs(1)))}:void 0,null!=Ls(e)?e=>{t(new Js(2,new qs(1)))}:void 0)}function Pl(e){let n,t;const r=Xu((()=>{return n=e.accessToken,[new Ys(new Cr(0),Bs(n),new Zs(2)),Ps()];var n}),wn(2,(n=Nl(e),e=>t=>function(e,n,t){switch(n.tag){case 1:return[new Ys(t.Data,t.User,new Zs(1,n.fields[0])),Ps()];case 2:return[new Ys(t.Data,t.User,new Zs(0,n.fields[0])),Ps()];case 3:case 4:case 6:return[new Ys(t.Data,t.User,new Zs(2)),Ps()];case 5:{const r=Ot(Fn((e=>e.trim()),ft(n.fields[0],[","],null,0)));return[new Ys(t.Data,t.User,new Zs(2)),Rs((n=>{vr(e.UpdatePromotedFunds({Funds:r},n))}))]}case 7:return[new Ys(t.Data,t.User,new Zs(2)),Rs((n=>{vr(e.DeletePromotedFunds(n))}))];case 8:return[new Ys(new Cr(1),t.User,t.ModalState),Rs((n=>{vr(e.ReloadData(n))}))];default:return[new Ys(n.fields[0],t.User,t.ModalState),Ps()]}}(n,e,t)))),o=r[0],i=r[1];cr(br((()=>function(e){const n=e.accountId;return null==n?Il(e.backendUrl,e.accessToken,e.partnerId):Tl(e.backendUrl,e.accessToken,e.partnerId,n)}(e)),(e=>{i(new Js(0,e))})));const s=o.User.Roles;if(null==Hs(s))return d(Qu,{error:"You do not have the appropriate permissions to view this information"});{const e=o.Data;let n,r,u,l;switch(1===e.tag?n=0:2===e.tag?1===e.fields[0].tag?(n=2,u=e.fields[0].fields[0]):(n=1,r=e.fields[0].fields[0]):3===e.tag?(n=3,l=e.fields[0]):n=0,n){case 0:return d(Ku,null);case 1:if(1===r.tag){const e=qt(Vt((()=>{let e;const n=function(e){const n=e.PartnerFunds;return xt(n)?new El(0,"australian-retirement-trust, slate"):new El(2,ct(", ",n))}(r.fields[0].PromotedFunds);return Wt(d("div",_n(bt((e=qt(Vt((()=>{let e,t;return Jt(Wt(d("div",_n(bt((e=[(t=bt(Ul(s,Al(n),i)),d("dl",{children:tr.Children.toArray(Array.from(t))}))],["children",tr.Children.toArray(Array.from(e))]))))),Vt((()=>{const e=o.ModalState;switch(e.tag){case 1:return 1===e.fields[0].tag?Wt(Ol(kl(n),i)):Wt(null);case 2:return Wt(null);default:return 1===e.fields[0].tag?Wt(Ml(i)):Wt(null)}})))}))),["children",tr.Children.toArray(Array.from(e))])))))})));return d("div",{children:tr.Children.toArray(Array.from(e))})}{const e=r.fields[0],n=In(e.Configuration.DefaultFundUSI,"-"),u=function(e){const n=[e.PartnerFunds,e.AccountFunds];let t,r;switch(xt(n[0])?xt(n[1])?t=0:(t=2,r=n[1]):xt(n[1])?t=1:(t=2,r=n[1]),t){case 0:return new El(0,"australian-retirement-trust, slate");case 1:return new El(1,ct(", ",n[0]));case 2:return new El(2,ct(", ",r))}}(e.PromotedFunds);return d("div",_n(bt((t=qt(Vt((()=>{let e,t;return Jt(Wt(d("div",_n(bt((e=[(t=Ot([Fl(s,n,i),Ul(s,Al(u),i)]),d("dl",{children:tr.Children.toArray(Array.from(t))}))],["children",tr.Children.toArray(Array.from(e))]))))),Vt((()=>{const e=o.ModalState;switch(e.tag){case 1:return 1===e.fields[0].tag?Wt(Ol(kl(u),i)):Wt(function(e,n){return d(hl,{CancelAction:{Action:e=>{n(new Js(3))},ActionText:"Cancel"},ConfirmAction:{Action:(e,t)=>{n(new Js(4,e))},ActionText:"Save"},FieldName:"Default USI",FieldValue:e,HeadingText:"Edit Default USI"})}(n,i));case 2:return Wt(null);default:return 1===e.fields[0].tag?Wt(Ml(i)):Wt(function(e){return d(gl,{BodyText:"Are you sure you want to reset the current Default USI? This action cannot be undone.",CancelAction:{Action:n=>{e(new Js(3))},ActionText:"Cancel"},ConfirmAction:{Action:n=>{e(new Js(6))},ActionText:"Reset"},HeadingText:"Reset Default USI"})}(i))}})))}))),["children",tr.Children.toArray(Array.from(t))]))))}case 2:return d(Qu,{error:u});case 3:return d(Qu,{error:Cn(l)})}}}V((e=>d(sl,e)),"superhero-super-selection"),V((e=>d(Pl,e)),"superhero-super-configuration")})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flarehr/superhero-super-selection",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.50.59382",
|
|
4
4
|
"description": "Flare Superhero Super Selection Component",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"files": [
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"build": "dotnet fable ./ && webpack --mode production --node-env production"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
+
"@heroicons/react": "^1.0.6",
|
|
14
15
|
"preact": "^10.6.6",
|
|
15
16
|
"preact-custom-element": "^4.2.1"
|
|
16
17
|
},
|