@flarehr/superhero-super-selection 5.50.9011 → 5.52.9712

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,2 +1,45 @@
1
- /*! For license information please see superhero-super-selection.js.LICENSE.txt */
2
- (()=>{"use strict";var e={299:(e,t,n)=>{n.r(t),n.d(t,{Children:()=>V,Component:()=>u.uA,Fragment:()=>u.FK,PureComponent:()=>$,StrictMode:()=>Fe,Suspense:()=>J,SuspenseList:()=>K,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>ve,cloneElement:()=>ke,createContext:()=>u.q6,createElement:()=>u.n,createFactory:()=>Ce,createPortal:()=>ne,createRef:()=>u._3,default:()=>He,findDOMNode:()=>Ie,flushSync:()=>Ne,forwardRef:()=>j,hydrate:()=>le,isElement:()=>Pe,isFragment:()=>Ee,isMemo:()=>xe,isValidElement:()=>Se,lazy:()=>Y,memo:()=>H,render:()=>ae,startTransition:()=>Me,unmountComponentAtNode:()=>Ae,unstable_batchedUpdates:()=>Te,useCallback:()=>x,useContext:()=>k,useDebugValue:()=>A,useDeferredValue:()=>Oe,useEffect:()=>v,useErrorBoundary:()=>I,useId:()=>T,useImperativeHandle:()=>S,useInsertionEffect:()=>Ue,useLayoutEffect:()=>b,useMemo:()=>E,useReducer:()=>y,useRef:()=>C,useState:()=>g,useSyncExternalStore:()=>Re,useTransition:()=>De,version:()=>be});var r,o,s,i,u=n(172),c=0,a=[],l=u.fF,f=l.__b,d=l.__r,h=l.diffed,m=l.__c,p=l.unmount,_=l.__;function w(e,t){l.__h&&l.__h(o,e,c||t),c=0;var n=o.__H||(o.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function g(e){return c=1,y(P,e)}function y(e,t,n){var s=w(r++,2);if(s.t=e,!s.__c&&(s.__=[n?n(t):P(void 0,t),function(e){var t=s.__N?s.__N[0]:s.__[0],n=s.t(t,e);t!==n&&(s.__N=[n,s.__[1]],s.__c.setState({}))}],s.__c=o,!o.u)){var i=function(e,t,n){if(!s.__c.__H)return!0;var r=s.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!u||u.call(this,e,t,n);var o=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&s.__c.props===e)&&(!u||u.call(this,e,t,n))};o.u=!0;var u=o.shouldComponentUpdate,c=o.componentWillUpdate;o.componentWillUpdate=function(e,t,n){if(this.__e){var r=u;u=void 0,i(e,t,n),u=r}c&&c.call(this,e,t,n)},o.shouldComponentUpdate=i}return s.__N||s.__}function v(e,t){var n=w(r++,3);!l.__s&&U(n.__H,t)&&(n.__=e,n.i=t,o.__H.__h.push(n))}function b(e,t){var n=w(r++,4);!l.__s&&U(n.__H,t)&&(n.__=e,n.i=t,o.__h.push(n))}function C(e){return c=5,E((function(){return{current:e}}),[])}function S(e,t,n){c=6,b((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function E(e,t){var n=w(r++,7);return U(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function x(e,t){return c=8,E((function(){return e}),t)}function k(e){var t=o.context[e.__c],n=w(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(o)),t.props.value):e.__}function A(e,t){l.useDebugValue&&l.useDebugValue(t?t(e):e)}function I(e){var t=w(r++,10),n=g();return t.__=e,o.componentDidCatch||(o.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function T(){var e=w(r++,11);if(!e.__){for(var t=o.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function N(){for(var e;e=a.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(O),e.__H.__h.forEach(D),e.__H.__h=[]}catch(t){e.__H.__h=[],l.__e(t,e.__v)}}l.__b=function(e){o=null,f&&f(e)},l.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_&&_(e,t)},l.__r=function(e){d&&d(e),r=0;var t=(o=e.__c).__H;t&&(s===o?(t.__h=[],o.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(O),t.__h.forEach(D),t.__h=[],r=0)),s=o},l.diffed=function(e){h&&h(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==a.push(t)&&i===l.requestAnimationFrame||((i=l.requestAnimationFrame)||M)(N)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),s=o=null},l.__c=function(e,t){t.some((function(e){try{e.__h.forEach(O),e.__h=e.__h.filter((function(e){return!e.__||D(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],l.__e(n,e.__v)}})),m&&m(e,t)},l.unmount=function(e){p&&p(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{O(e)}catch(e){t=e}})),n.__H=void 0,t&&l.__e(t,n.__v))};var F="function"==typeof requestAnimationFrame;function M(e){var t,n=function(){clearTimeout(r),F&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);F&&(t=requestAnimationFrame(n))}function O(e){var t=o,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),o=t}function D(e){var t=o;e.__c=e.__(),o=t}function U(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function P(e,t){return"function"==typeof t?t(e):t}function R(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function $(e,t){this.props=e,this.context=t}function H(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:R(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,u.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}($.prototype=new u.uA).isPureReactComponent=!0,$.prototype.shouldComponentUpdate=function(e,t){return R(this.props,e)||R(this.state,t)};var B=u.fF.__b;u.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),B&&B(e)};var L="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function j(e){function t(t){if(!("ref"in t))return e(t,null);var n=t.ref;delete t.ref;var r=e(t,n);return t.ref=n,r}return t.$$typeof=L,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var G=function(e,t){return null==e?null:(0,u.v2)((0,u.v2)(e).map(t))},V={map:G,forEach:G,count:function(e){return e?(0,u.v2)(e).length:0},only:function(e){var t=(0,u.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:u.v2},W=u.fF.__e;u.fF.__e=function(e,t,n,r){if(e.then)for(var o,s=t;s=s.__;)if((o=s.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);W(e,t,n,r)};var z=u.fF.unmount;function q(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return q(e,t,n)}))),e}function Z(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Z(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function J(){this.__u=0,this.t=null,this.__b=null}function X(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Y(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,u.n)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function K(){this.u=null,this.o=null}u.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),z&&z(e)},(J.prototype=new u.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=X(r.__v),s=!1,i=function(){s||(s=!0,n.__R=null,o?o(u):u())};n.__R=i;var u=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Z(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},J.prototype.componentWillUnmount=function(){this.t=[]},J.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=q(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&(0,u.n)(u.FK,null,e.fallback);return o&&(o.__u&=-33),[(0,u.n)(u.FK,null,t.__a?null:e.children),o]};var Q=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ee(e){return this.getChildContext=function(){return e.context},e.children}function te(e){var t=this,n=e.i;t.componentWillUnmount=function(){(0,u.XX)(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),(0,u.XX)((0,u.n)(ee,{context:t.context},e.__v),t.l)}function ne(e,t){var n=(0,u.n)(te,{__v:e,i:t});return n.containerInfo=t,n}(K.prototype=new u.uA).__a=function(e){var t=this,n=X(t.__v),r=t.o.get(e);return r[0]++,function(o){var s=function(){t.props.revealOrder?(r.push(o),Q(t,e,r)):o()};n?n(s):s()}},K.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,u.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},K.prototype.componentDidUpdate=K.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Q(e,n,t)}))};var re="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,se=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ie=/[A-Z0-9]/g,ue="undefined"!=typeof document,ce=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ae(e,t,n){return null==t.__k&&(t.textContent=""),(0,u.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function le(e,t,n){return(0,u.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}u.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(u.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var fe=u.fF.event;function de(){}function he(){return this.cancelBubble}function me(){return this.defaultPrevented}u.fF.event=function(e){return fe&&(e=fe(e)),e.persist=de,e.isPropagationStopped=he,e.isDefaultPrevented=me,e.nativeEvent=e};var pe,_e={enumerable:!1,configurable:!0,get:function(){return this.class}},we=u.fF.vnode;u.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var s in t){var i=t[s];if(!("value"===s&&"defaultValue"in t&&null==i||ue&&"children"===s&&"noscript"===n||"class"===s||"className"===s)){var c=s.toLowerCase();"defaultValue"===s&&"value"in t&&null==t.value?s="value":"download"===s&&!0===i?i="":"translate"===c&&"no"===i?i=!1:"o"===c[0]&&"n"===c[1]?"ondoubleclick"===c?s="ondblclick":"onchange"!==c||"input"!==n&&"textarea"!==n||ce(t.type)?"onfocus"===c?s="onfocusin":"onblur"===c?s="onfocusout":se.test(s)&&(s=c):c=s="oninput":o&&oe.test(s)?s=s.replace(ie,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===c&&r[s=c]&&(s="oninputCapture"),r[s]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,u.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,u.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",_e)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=re,we&&we(e)};var ge=u.fF.__r;u.fF.__r=function(e){ge&&ge(e),pe=e.__c};var ye=u.fF.diffed;u.fF.diffed=function(e){ye&&ye(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),pe=null};var ve={ReactCurrentDispatcher:{current:{readContext:function(e){return pe.__n[e.__c].props.value},useCallback:x,useContext:k,useDebugValue:A,useDeferredValue:Oe,useEffect:v,useId:T,useImperativeHandle:S,useInsertionEffect:Ue,useLayoutEffect:b,useMemo:E,useReducer:y,useRef:C,useState:g,useSyncExternalStore:Re,useTransition:De}}},be="18.3.1";function Ce(e){return u.n.bind(null,e)}function Se(e){return!!e&&e.$$typeof===re}function Ee(e){return Se(e)&&e.type===u.FK}function xe(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function ke(e){return Se(e)?u.Ob.apply(null,arguments):e}function Ae(e){return!!e.__k&&((0,u.XX)(null,e),!0)}function Ie(e){return e&&(e.base||1===e.nodeType&&e)||null}var Te=function(e,t){return e(t)},Ne=function(e,t){return e(t)},Fe=u.FK;function Me(e){e()}function Oe(e){return e}function De(){return[!1,Me]}var Ue=b,Pe=Se;function Re(e,t){var n=t(),r=g({h:{__:n,v:t}}),o=r[0].h,s=r[1];return b((function(){o.__=n,o.v=t,$e(o)&&s({h:o})}),[e,n,t]),v((function(){return $e(o)&&s({h:o}),e((function(){$e(o)&&s({h:o})}))}),[e]),n}function $e(e){var t,n,r=e.v,o=e.__;try{var s=r();return!((t=o)===(n=s)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var He={useState:g,useId:T,useReducer:y,useEffect:v,useLayoutEffect:b,useInsertionEffect:Ue,useTransition:De,useDeferredValue:Oe,useSyncExternalStore:Re,startTransition:Me,useRef:C,useImperativeHandle:S,useMemo:E,useCallback:x,useContext:k,useDebugValue:A,version:"18.3.1",Children:V,render:ae,hydrate:le,unmountComponentAtNode:Ae,createPortal:ne,createElement:u.n,createContext:u.q6,createFactory:Ce,cloneElement:ke,createRef:u._3,Fragment:u.FK,isValidElement:Se,isElement:Pe,isFragment:Ee,isMemo:xe,findDOMNode:Ie,Component:u.uA,PureComponent:$,memo:H,forwardRef:j,flushSync:Ne,unstable_batchedUpdates:Te,StrictMode:Fe,Suspense:J,SuspenseList:K,lazy:Y,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ve}},172:(e,t,n)=>{n.d(t,{FK:()=>S,Ob:()=>W,Qv:()=>V,XX:()=>G,_3:()=>C,fF:()=>o,h:()=>v,n:()=>v,q6:()=>z,uA:()=>E,v2:()=>M});var r,o,s,i,u,c,a,l,f,d,h,m={},p=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w=Array.isArray;function g(e,t){for(var n in t)e[n]=t[n];return e}function y(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function v(e,t,n){var o,s,i,u={};for(i in t)"key"==i?o=t[i]:"ref"==i?s=t[i]:u[i]=t[i];if(arguments.length>2&&(u.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===u[i]&&(u[i]=e.defaultProps[i]);return b(e,u,o,s,null)}function b(e,t,n,r,i){var u={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++s:i,__i:-1,__u:0};return null==i&&null!=o.vnode&&o.vnode(u),u}function C(){return{current:null}}function S(e){return e.children}function E(e,t){this.props=e,this.context=t}function x(e,t){if(null==t)return e.__?x(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?x(e):null}function k(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return k(e)}}function A(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!I.__r++||u!==o.debounceRendering)&&((u=o.debounceRendering)||c)(I)}function I(){var e,t,n,r,s,u,c,l;for(i.sort(a);e=i.shift();)e.__d&&(t=i.length,r=void 0,u=(s=(n=e).__v).__e,c=[],l=[],n.__P&&((r=g({},s)).__v=s.__v+1,o.vnode&&o.vnode(r),R(n.__P,r,s,n.__n,n.__P.namespaceURI,32&s.__u?[u]:null,c,null==u?x(s):u,!!(32&s.__u),l),r.__v=s.__v,r.__.__k[r.__i]=r,$(c,r,l),r.__e!=u&&k(r)),i.length>t&&i.sort(a));I.__r=0}function T(e,t,n,r,o,s,i,u,c,a,l){var f,d,h,_,w,g=r&&r.__k||p,y=t.length;for(n.__d=c,N(n,t,g),c=n.__d,f=0;f<y;f++)null!=(h=n.__k[f])&&(d=-1===h.__i?m:g[h.__i]||m,h.__i=f,R(e,h,d,o,s,i,u,c,a,l),_=h.__e,h.ref&&d.ref!=h.ref&&(d.ref&&B(d.ref,null,h),l.push(h.ref,h.__c||_,h)),null==w&&null!=_&&(w=_),65536&h.__u||d.__k===h.__k?c=F(h,c,e):"function"==typeof h.type&&void 0!==h.__d?c=h.__d:_&&(c=_.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=c,n.__e=w}function N(e,t,n){var r,o,s,i,u,c=t.length,a=n.length,l=a,f=0;for(e.__k=[],r=0;r<c;r++)null!=(o=t[r])&&"boolean"!=typeof o&&"function"!=typeof o?(i=r+f,(o=e.__k[r]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?b(null,o,null,null,null):w(o)?b(S,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?b(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,-1!==(u=o.__i=O(o,n,i,l))&&(l--,(s=n[u])&&(s.__u|=131072)),null==s||null===s.__v?(-1==u&&f--,"function"!=typeof o.type&&(o.__u|=65536)):u!==i&&(u==i-1?f--:u==i+1?f++:(u>i?f--:f++,o.__u|=65536))):o=e.__k[r]=null;if(l)for(r=0;r<a;r++)null!=(s=n[r])&&0==(131072&s.__u)&&(s.__e==e.__d&&(e.__d=x(s)),L(s,s))}function F(e,t,n){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=F(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=x(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function M(e,t){return t=t||[],null==e||"boolean"==typeof e||(w(e)?e.some((function(e){M(e,t)})):t.push(e)),t}function O(e,t,n,r){var o=e.key,s=e.type,i=n-1,u=n+1,c=t[n];if(null===c||c&&o==c.key&&s===c.type&&0==(131072&c.__u))return n;if(r>(null!=c&&0==(131072&c.__u)?1:0))for(;i>=0||u<t.length;){if(i>=0){if((c=t[i])&&0==(131072&c.__u)&&o==c.key&&s===c.type)return i;i--}if(u<t.length){if((c=t[u])&&0==(131072&c.__u)&&o==c.key&&s===c.type)return u;u++}}return-1}function D(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||_.test(t)?n:n+"px"}function U(e,t,n,r,o){var s;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||D(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||D(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])s=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=l,e.addEventListener(t,s?d:f,s)):e.removeEventListener(t,s?d:f,s);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function P(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=l++;else if(t.t<n.u)return;return n(o.event?o.event(t):t)}}}function R(e,t,n,r,s,i,u,c,a,l){var f,d,h,m,p,_,y,v,b,C,x,k,A,I,N,F,M=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(a=!!(32&n.__u),i=[c=t.__e=n.__e]),(f=o.__b)&&f(t);e:if("function"==typeof M)try{if(v=t.props,b="prototype"in M&&M.prototype.render,C=(f=M.contextType)&&r[f.__c],x=f?C?C.props.value:f.__:r,n.__c?y=(d=t.__c=n.__c).__=d.__E:(b?t.__c=d=new M(v,x):(t.__c=d=new E(v,x),d.constructor=M,d.render=j),C&&C.sub(d),d.props=v,d.state||(d.state={}),d.context=x,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),b&&null==d.__s&&(d.__s=d.state),b&&null!=M.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=g({},d.__s)),g(d.__s,M.getDerivedStateFromProps(v,d.__s))),m=d.props,p=d.state,d.__v=t,h)b&&null==M.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),b&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(b&&null==M.getDerivedStateFromProps&&v!==m&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(v,x),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(v,d.__s,x)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=v,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[],d.__h.length&&u.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(v,d.__s,x),b&&null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(m,p,_)}))}if(d.context=x,d.props=v,d.__P=e,d.__e=!1,A=o.__r,I=0,b){for(d.state=d.__s,d.__d=!1,A&&A(t),f=d.render(d.props,d.state,d.context),N=0;N<d._sb.length;N++)d.__h.push(d._sb[N]);d._sb=[]}else do{d.__d=!1,A&&A(t),f=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++I<25);d.state=d.__s,null!=d.getChildContext&&(r=g(g({},r),d.getChildContext())),b&&!h&&null!=d.getSnapshotBeforeUpdate&&(_=d.getSnapshotBeforeUpdate(m,p)),T(e,w(F=null!=f&&f.type===S&&null==f.key?f.props.children:f)?F:[F],t,n,r,s,i,u,c,a,l),d.base=t.__e,t.__u&=-161,d.__h.length&&u.push(d),y&&(d.__E=d.__=null)}catch(e){if(t.__v=null,a||null!=i){for(t.__u|=a?160:128;c&&8===c.nodeType&&c.nextSibling;)c=c.nextSibling;i[i.indexOf(c)]=null,t.__e=c}else t.__e=n.__e,t.__k=n.__k;o.__e(e,t,n)}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=H(n.__e,t,n,r,s,i,u,a,l);(f=o.diffed)&&f(t)}function $(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)B(n[r],n[++r],n[++r]);o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function H(e,t,n,s,i,u,c,a,l){var f,d,h,p,_,g,v,b=n.props,C=t.props,S=t.type;if("svg"===S?i="http://www.w3.org/2000/svg":"math"===S?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=u)for(f=0;f<u.length;f++)if((_=u[f])&&"setAttribute"in _==!!S&&(S?_.localName===S:3===_.nodeType)){e=_,u[f]=null;break}if(null==e){if(null===S)return document.createTextNode(C);e=document.createElementNS(i,S,C.is&&C),a&&(o.__m&&o.__m(t,u),a=!1),u=null}if(null===S)b===C||a&&e.data===C||(e.data=C);else{if(u=u&&r.call(e.childNodes),b=n.props||m,!a&&null!=u)for(b={},f=0;f<e.attributes.length;f++)b[(_=e.attributes[f]).name]=_.value;for(f in b)if(_=b[f],"children"==f);else if("dangerouslySetInnerHTML"==f)h=_;else if(!(f in C)){if("value"==f&&"defaultValue"in C||"checked"==f&&"defaultChecked"in C)continue;U(e,f,null,_,i)}for(f in C)_=C[f],"children"==f?p=_:"dangerouslySetInnerHTML"==f?d=_:"value"==f?g=_:"checked"==f?v=_:a&&"function"!=typeof _||b[f]===_||U(e,f,_,b[f],i);if(d)a||h&&(d.__html===h.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(h&&(e.innerHTML=""),T(e,w(p)?p:[p],t,n,s,"foreignObject"===S?"http://www.w3.org/1999/xhtml":i,u,c,u?u[0]:n.__k&&x(n,0),a,l),null!=u)for(f=u.length;f--;)y(u[f]);a||(f="value","progress"===S&&null==g?e.removeAttribute("value"):void 0!==g&&(g!==e[f]||"progress"===S&&!g||"option"===S&&g!==b[f])&&U(e,f,g,b[f],i),f="checked",void 0!==v&&v!==e[f]&&U(e,f,v,b[f],i))}return e}function B(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){o.__e(e,n)}}function L(e,t,n){var r,s;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||B(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&L(r[s],t,n||"function"!=typeof e.type);n||y(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function j(e,t,n){return this.constructor(e,n)}function G(e,t,n){var s,i,u,c;o.__&&o.__(e,t),i=(s="function"==typeof n)?null:n&&n.__k||t.__k,u=[],c=[],R(t,e=(!s&&n||t).__k=v(S,null,[e]),i||m,m,t.namespaceURI,!s&&n?[n]:i?null:t.firstChild?r.call(t.childNodes):null,u,!s&&n?n:i?i.__e:t.firstChild,s,c),$(u,e,c)}function V(e,t){G(e,t,V)}function W(e,t,n){var o,s,i,u,c=g({},e.props);for(i in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)"key"==i?o=t[i]:"ref"==i?s=t[i]:c[i]=void 0===t[i]&&void 0!==u?u[i]:t[i];return arguments.length>2&&(c.children=arguments.length>3?r.call(arguments,2):n),b(e.type,c,o||e.key,s||e.ref,null)}function z(e,t){var n={__c:t="__cC"+h++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.forEach((function(e){e.__e=!0,A(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=p.slice,o={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&null!=s.getDerivedStateFromError&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(t){e=t}throw e}},s=0,E.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=g({},this.state),"function"==typeof e&&(e=e(g({},n),this.props)),e&&g(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),A(this))},E.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),A(this))},E.prototype.render=S,i=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,a=function(e,t){return e.__v.__b-t.__v.__b},I.__r=0,l=0,f=P(!1),d=P(!0),h=0},63:(e,t,n)=>{var r=n(299),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=r.useState,i=r.useEffect,u=r.useLayoutEffect,c=r.useDebugValue;function a(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=s({inst:{value:n,getSnapshot:t}}),o=r[0].inst,l=r[1];return u((function(){o.value=n,o.getSnapshot=t,a(o)&&l({inst:o})}),[e,n,t]),i((function(){return a(o)&&l({inst:o}),e((function(){a(o)&&l({inst:o})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},888:(e,t,n)=>{e.exports=n(63)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r=n(172);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var s=["context","children"];function i(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(e,t){if(null==e)return{};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)t.indexOf(n=s[r])>=0||(o[n]=e[n]);return o}(e,s);return(0,r.Ob)(t,n)}function u(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=(0,r.h)(i,o({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var o=[],s={},i=0,u=t.attributes,a=t.childNodes;for(i=u.length;i--;)"slot"!==u[i].name&&(s[u[i].name]=u[i].value,s[c(u[i].name)]=u[i].value);for(i=a.length;i--;){var l=e(a[i],null),d=a[i].slot;d?s[d]=(0,r.h)(f,{name:d},l):o[i]=l}var h=n?(0,r.h)(f,null,o):o;return(0,r.h)(n||t.nodeName.toLowerCase(),s,h)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?r.Qv:r.XX)(this._vdom,this._root)}function c(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function a(e,t,n){if(this._vdom){var o={};o[e]=n=null==n?void 0:n,o[c(e)]=n,this._vdom=(0,r.Ob)(this._vdom,o),(0,r.XX)(this._vdom,this._root)}}function l(){(0,r.XX)(this._vdom=null,this._root)}function f(e,t){var n=this;return(0,r.h)("slot",o({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function d(e,t){!function(e,t,n,r){function o(){var t=Reflect.construct(HTMLElement,[],o);return t._vdomComponent=e,t._root=t,t}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=u,o.prototype.attributeChangedCallback=a,o.prototype.disconnectedCallback=l,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,o)}(e,t)}var h=n(299);function m(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function p(e){return null!=e&&"function"==typeof e.GetHashCode}function _(e){return null!=e&&"function"==typeof e.Dispose}function w(e){_(e)&&e.Dispose()}function g(e,t){return Object.getPrototypeOf(e)?.constructor===Object.getPrototypeOf(t)?.constructor}Symbol.iterator;class y{constructor(e){this.iter=e,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.iter.next();return this.current=e.value,!e.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function v(e){return null!=(t=e)&&"function"==typeof t.GetEnumerator?e.GetEnumerator():new y(e[Symbol.iterator]());var t}function b(e){return{next(){const t=e["System.Collections.IEnumerator.MoveNext"]();return{done:!t,value:t?e["System.Collections.Generic.IEnumerator`1.get_Current"]():void 0}}}}class C{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 S(e,t){return e.toString(10).padStart(t,"0")}function E(e){const t=e;return"number"==typeof t.offset?t.offset:1===e.kind?0:-6e4*e.getTimezoneOffset()}function x(e,t){return(e=e<0&&null!=t&&10!==t?65535+e+1:e).toString(t)}function k(e,t){return(e=e<0&&null!=t&&10!==t?4294967295+e+1:e).toString(t)}class A{static id(e){return A.idMap.has(e)||A.idMap.set(e,++A.count),A.idMap.get(e)}}function I(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=33*n^e.charCodeAt(t++);return n}function T(e){return 2654435761*e|0}function N(e){return I(e.toString(32))}function F(e){let t=0;const n=e.length;for(let r=0;r<n;r++)t=(t<<5)+t^e[r];return t}function M(e){if(null==e)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return T(e);case"bigint":return N(e);case"string":return I(e);default:return p(e)?e.GetHashCode():m(e)?function(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=M(e[r]);return F(n)}(e):e instanceof Date?function(e){return e.getTime()}(e):Object.getPrototypeOf(e)?.constructor===Object?F(Object.values(e).map((e=>M(e)))):T(A.id(e))}}function O(e){return function(e){return p(e)?e.GetHashCode():function(e){if(null==e)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return T(e);case"bigint":return N(e);case"string":return I(e);default:return T(A.id(e))}}(e)}(e)}function D(e,t,n){if(null==e)return null==t;if(null==t)return!1;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function U(e,t){return D(e,t,P)}function P(e,t){return e===t||(null==e?null==t:null!=t&&(function(e){return null!=e&&"function"==typeof e.Equals}(e)?e.Equals(t):m(e)?m(t)&&U(e,t):"object"==typeof e&&(e instanceof Date?t instanceof Date&&0===R(e,t):Object.getPrototypeOf(e)?.constructor===Object&&function(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;n.sort(),r.sort();for(let o=0;o<n.length;o++)if(n[o]!==r[o]||!P(e[n[o]],t[r[o]]))return!1;return!0}(e,t))))}function R(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+E(e),r=t.getTime()+E(t)),n===r?0:n<r?-1:1}function $(e,t){return e===t?0:e<t?-1:1}function H(e,t){return function(e,t,n){if(null==e)return null==t?0:1;if(null==t)return-1;if(e.length!==t.length)return e.length<t.length?-1:1;for(let r=0,o=0;r<e.length;r++)if(o=n(e[r],t[r]),0!==o)return o;return 0}(e,t,B)}function B(e,t){return e===t?0:null==e?null==t?0:-1:null==t?1:function(e){return null!=e&&"function"==typeof e.CompareTo}(e)?e.CompareTo(t):m(e)?m(t)?H(e,t):-1:"object"!=typeof e?e<t?-1:1:e instanceof Date?t instanceof Date?R(e,t):-1:Object.getPrototypeOf(e)?.constructor===Object?function(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return n.length<r.length?-1:1;n.sort(),r.sort();for(let o=0,s=0;o<n.length;o++){const i=n[o];if(i!==r[o])return i<r[o]?-1:1;if(s=B(e[i],t[i]),0!==s)return s}return 0}(e,t):-1}function L(e){const t={};for(const n of e)t[n[0]]=n[1];return t}A.idMap=new WeakMap,A.count=0;const j=new WeakMap;function G(e){if(null==e)return null;const t=(t,n)=>e(t)(n);return j.set(t,e),t}function V(e){return j.get(e)??(t=>n=>e(t,n))}function W(e){if(null==e)return null;const t=(t,n,r)=>e(t)(n)(r);return j.set(t,e),t}function z(e){return j.get(e)??(t=>n=>r=>e(t,n,r))}function q(e,t=0){if(null!=e&&"object"==typeof e){if("function"==typeof e.toString)return e.toString();if(Symbol.iterator in e)return function(e){let t=0,n="[";for(const r of e){if(0===t)n+=q(r);else{if(100===t){n+="; ...";break}n+="; "+q(r)}t++}return n+"]"}(e);{const n=Object.getPrototypeOf(e)?.constructor;return n===Object&&t<10?"{ "+Object.entries(e).map((([e,n])=>e+" = "+q(n,t+1))).join("\n ")+" }":n?.name??""}}return String(e)}class Z{get name(){return this.cases()[this.tag]}toJSON(){return 0===this.fields.length?this.name:[this.name].concat(this.fields)}toString(){return function(e,t){if(0===t.length)return e;{let n,r=!0;return 1===t.length?(n=q(t[0]),r=n.indexOf(" ")>=0):n=t.map((e=>q(e))).join(", "),e+(r?" (":" ")+n+(r?")":"")}}(this.name,this.fields)}GetHashCode(){const e=this.fields.map((e=>M(e)));return e.splice(0,0,T(this.tag)),F(e)}Equals(e){return this===e||!!g(this,e)&&this.tag===e.tag&&U(this.fields,e.fields)}CompareTo(e){return this===e?0:g(this,e)?this.tag===e.tag?H(this.fields,e.fields):this.tag<e.tag?-1:1:-1}}class J{toJSON(){return function(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}(this)}toString(){return e=this,"{ "+Object.entries(e).map((([e,t])=>e+" = "+q(t))).join("\n ")+" }";var e}GetHashCode(){return e=this,F(Object.values(e).map((e=>M(e))));var e}Equals(e){return function(e,t){if(e===t)return!0;if(g(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!P(e[n[r]],t[n[r]]))return!1;return!0}return!1}(this,e)}CompareTo(e){return function(e,t){if(e===t)return 0;if(g(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=B(e[n[r]],t[n[r]]);if(0!==o)return o}return 0}return-1}(this,e)}}class X{get contents(){return this.getter()}set contents(e){this.setter(e)}constructor(e,t){"function"==typeof t?(this.getter=e,this.setter=t):(this.getter=()=>e,this.setter=t=>{e=t})}}class Y{constructor(e){this.message=e}}function K(e){return(t=e)instanceof Y||t instanceof Error||function(e){return e instanceof Promise}(e)?e:new Error(String(e));var t}class Q{constructor(e){this.value=e}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return M(this.value)}Equals(e){return null!=e&&P(this.value,e instanceof Q?e.value:e)}CompareTo(e){return null==e?1:B(this.value,e instanceof Q?e.value:e)}}function ee(e){if(null==e)throw new Error("Option has no value");return e instanceof Q?e.value:e}function te(e){return e instanceof Q?e.value:e}function ne(e){return null==e||e instanceof Q?new Q(e):e}function re(e){return null==e?[]:[ee(e)]}function oe(e,t){return null!=e?ee(e):t}function se(e,t){return null!=t?ne(e(ee(t))):void 0}const ie=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ue=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ce=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ae=["January","February","March","April","May","June","July","August","September","October","November","December"];function le(e,t,n){let r=0,o=t;for(;o<e.length&&e[o]===n;)o++,r++;return r}function fe(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function de(e,t){let n=t;const r=e[t];let o="",s=!1;for(;t<e.length;){const n=e[++t];if(n===r){s=!0;break}if("\\"===n){if(!(t<e.length))throw new Error("Invalid string format");o+=e[++t]}else o+=n}if(!s)throw new Error(`Invalid string format could not find matching quote for ${r}`);return[o,t-n+1]}function he(e,t,n){let r=0,o=0,s="";const i=n?ge(e.getTime(),1):e;for(;r<t.length;){const e=t[r];switch(e){case"d":switch(o=le(t,r,"d"),r+=o,o){case 1:s+=Ce(i);break;case 2:s+=S(Ce(i),2);break;case 3:s+=ie[Ie(i)];break;case 4:s+=ue[Ie(i)]}break;case"f":if(o=le(t,r,"f"),r+=o,o<=3){const e=10**(3-o);s+=S(Math.floor(Ee(i)/e),o)}else o<=7&&(s+=(""+Ee(i)).padEnd(o,"0"));break;case"F":if(o=le(t,r,"F"),r+=o,o<=3){const e=10**(3-o),t=Math.floor(Ee(i)/e);0!=t&&(s+=S(t,o))}else if(o<=7){const e=Ee(i);0!=e&&(s+=S(e,3))}break;case"g":o=le(t,r,"g"),r+=o,o<=2&&(s+="A.D.");break;case"h":switch(o=le(t,r,"h"),r+=o,o){case 1:s+=Se(i)%12;break;case 2:s+=S(Se(i)%12,2)}break;case"H":switch(o=le(t,r,"H"),r+=o,o){case 1:s+=Se(i);break;case 2:s+=S(Se(i),2)}break;case"K":if(o=le(t,r,"K"),r+=o,1===o)switch(me(i)){case 1:s+="Z";break;case 2:s+=pe(-6e4*i.getTimezoneOffset())}break;case"m":switch(o=le(t,r,"m"),r+=o,o){case 1:s+=xe(i);break;case 2:s+=S(xe(i),2)}break;case"M":switch(o=le(t,r,"M"),r+=o,o){case 1:s+=ke(i);break;case 2:s+=S(ke(i),2);break;case 3:s+=ce[ke(i)-1];break;case 4:s+=ae[ke(i)-1]}break;case"s":switch(o=le(t,r,"s"),r+=o,o){case 1:s+=Ae(i);break;case 2:s+=S(Ae(i),2)}break;case"t":switch(o=le(t,r,"t"),r+=o,o){case 1:s+=i.getHours()<12?"A":"P";break;case 2:s+=i.getHours()<12?"AM":"PM"}break;case"y":switch(o=le(t,r,"y"),r+=o,o){case 1:s+=i.getFullYear()%100;break;case 2:s+=S(i.getFullYear()%100,2);break;case 3:s+=S(i.getFullYear(),3);break;case 4:s+=S(i.getFullYear(),4);break;case 5:s+=S(i.getFullYear(),5)}break;case"z":o=le(t,r,"z"),r+=o;let u="";switch(me(i)){case 1:u="+00:00";break;case 2:u=pe(-6e4*i.getTimezoneOffset());break;case 0:u=pe(-6e4*be(i).getTimezoneOffset())}const c="-"===u[0]?"-":"+",a=parseInt(u.substring(1,3),10),l=parseInt(u.substring(4,6),10);switch(o){case 1:s+=`${c}${a}`;break;case 2:s+=`${c}${S(a,2)}`;break;default:s+=`${c}${S(a,2)}:${S(l,2)}`}break;case":":s+=":",r++;break;case"/":s+="/",r++;break;case"'":case'"':const[f,d]=de(t,r);s+=f,r+=d;break;case"%":const h=fe(t,r);if(!(h>=0&&h!=="%".charCodeAt(0)))throw new Error("Invalid format string");r+=2,s+=he(i,String.fromCharCode(h),n);break;case"\\":const m=fe(t,r);if(!(m>=0))throw new Error("Invalid format string");r+=2,s+=String.fromCharCode(m);break;default:r++,s+=e}}return s}function me(e){return e.kind||0}function pe(e){const t=e<0,n=(e=Math.abs(e))%36e5/6e4;return(t?"-":"+")+S(~~(e/36e5),2)+":"+S(n,2)}function _e(e,t){const n=e.toISOString();return"first"===t?n.substring(0,n.indexOf("T")):n.substring(n.indexOf("T")+1,n.length-1)}function we(e,t,n){return null!=e.offset?function(e,t){const n=new Date(e.getTime()+(e.offset??0));if("string"!=typeof t)return n.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+pe(e.offset??0);if(1!==t.length)return he(n,t,!0);switch(t){case"D":case"d":return _e(n,"first");case"T":case"t":return _e(n,"second");case"O":case"o":return function(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+pe(t)}(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}}(e,t):function(e,t){const n=1===e.kind;if("string"!=typeof t)return n?e.toUTCString():e.toLocaleString();if(1!==t.length)return he(e,t,n);switch(t){case"D":case"d":return n?_e(e,"first"):e.toLocaleDateString();case"T":case"t":return n?_e(e,"second"):e.toLocaleTimeString();case"O":case"o":return function(e,t){if(t)return e.toISOString();{const t=null==e.kind||2===e.kind;return S(e.getFullYear(),4)+"-"+S(e.getMonth()+1,2)+"-"+S(e.getDate(),2)+"T"+S(e.getHours(),2)+":"+S(e.getMinutes(),2)+":"+S(e.getSeconds(),2)+"."+S(e.getMilliseconds(),3)+(t?pe(-6e4*e.getTimezoneOffset()):"")}}(e,n);default:throw new Error("Unrecognized Date print format")}}(e,t)}function ge(e,t){const n=new Date(e);return n.kind=0|(null==t?0:t),n}function ye(e){function t(){throw new Error(`The string is not a valid Date: ${e}`)}null!=e&&""!==e.trim()||t(),10===e.length&&"-"===e[4]&&"-"===e[7]&&(e+="T00:00:00");let n=new Date(e),r=null;if(isNaN(n.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,t=0;if(null!=o[2]){const e=o[2].split(":"),n=parseInt(e[0],10);t=3600*n+60*parseInt(e[1]||"0",10)+parseFloat(e[2]||"0"),null!=o[3]&&"PM"===o[3].toUpperCase()&&n<12&&(t+=720)}if(null!=o[4]){if(null!=o[1])e=new Date(o[1]+" UTC");else{const t=new Date;e=new Date(t.getUTCFullYear()+"/"+(t.getUTCMonth()+1)+"/"+t.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,t-=60*e}}else if(null!=o[1])e=new Date(o[1]);else{const t=new Date;e=new Date(t.getFullYear()+"/"+(t.getMonth()+1)+"/"+t.getDate())}n=new Date(e.getTime()+1e3*t),n=new Date(n.getTime()+6e4*(n.getTimezoneOffset()-e.getTimezoneOffset()))}else t();isNaN(n.getTime())&&t()}return[n,r]}function ve(e,t){try{return t.contents=function(e,t=!1){const[n,r]=ye(e),o=null!=r?t&&"Z"===r?1:2:0;return ge(n.getTime(),o)}(e),!0}catch(e){return!1}}function be(e){return 2===e.kind?e:ge(e.getTime(),2)}function Ce(e){return 1===e.kind?e.getUTCDate():e.getDate()}function Se(e){return 1===e.kind?e.getUTCHours():e.getHours()}function Ee(e){return 1===e.kind?e.getUTCMilliseconds():e.getMilliseconds()}function xe(e){return 1===e.kind?e.getUTCMinutes():e.getMinutes()}function ke(e){return(1===e.kind?e.getUTCMonth():e.getMonth())+1}function Ae(e){return 1===e.kind?e.getUTCSeconds():e.getSeconds()}function Ie(e){return 1===e.kind?e.getUTCDay():e.getDay()}const Te=Symbol("numeric");function Ne(e){return"number"==typeof e||"bigint"==typeof e||e?.[Te]}function Fe(e,t){return"number"==typeof e?e*t:"bigint"==typeof e?e*BigInt(t):e[Te]().multiply(t)}function Me(e,t){return"number"==typeof e?e.toFixed(t):"bigint"==typeof e?e:e[Te]().toFixed(t)}function Oe(e,t){return"number"==typeof e?e.toPrecision(t):"bigint"==typeof e?e:e[Te]().toPrecision(t)}function De(e,t){return"number"==typeof e?e.toExponential(t):"bigint"==typeof e?e:e[Te]().toExponential(t)}function Ue(e){return"number"==typeof e?(Number(e)>>>0).toString(16):"bigint"==typeof e?BigInt.asUintN(64,e).toString(16):e[Te]().toHex()}function Pe(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Re(e,t,n=0){if(null==t)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=n;const r=[];let o,s=-1;for(;null!=(o=e.exec(t));)o.index===s?e.lastIndex++:(s=o.index,r.push(o));return r}const $e=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,He=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function Be(e,t){return function(e,t){return"number"==typeof e||"bigint"==typeof e?e<t?-1:e>t?1:0:e.CompareTo(t)}(e,t)<0}function Le(e){return{input:e,cont:(t=e,e=>{$e.lastIndex=0;const n=[],r=[];let o=0,s=$e.exec(t);for(;s;){const e=s.index+(s[1]||"").length;n.push(t.substring(o,e).replace(/%%/g,"%")),r.push(s),o=$e.lastIndex,$e.lastIndex-=1,s=$e.exec(t)}return 0===n.length?e(t.replace(/%%/g,"%")):(n.push(t.substring(o).replace(/%%/g,"%")),ze(e,n,r))})};var t}function je(e,t){return"string"==typeof t?e(t):t.cont(e)}function Ge(e){return je((e=>e),e)}function Ve(e){return je((e=>{throw new Error(e)}),e)}function We(e,t,n,r,o){let s="";if(t=t||"",o=o||"",Ne(e))switch("x"!==o.toLowerCase()&&(Be(e,0)?(e=Fe(e,-1),s="-"):t.indexOf(" ")>=0?s=" ":t.indexOf("+")>=0&&(s="+")),r=null==r?null:parseInt(r,10),o){case"f":case"F":e=Me(e,r=null!=r?r:6);break;case"g":case"G":e=null!=r?Oe(e,r):Oe(e);break;case"e":case"E":e=null!=r?De(e,r):De(e);break;case"x":e=Ue(e);break;case"X":e=Ue(e).toUpperCase();break;default:e=String(e)}else e=e instanceof Date?we(e):q(e);if(n="number"==typeof n?n:parseInt(n,10),isNaN(n))e=s+e;else{const r=t.indexOf("0")>=0,o=t.indexOf("-")>=0,i=o||!r?" ":"0";e="0"===i?s+(e=Ze(e,n-s.length,i,o)):Ze(s+e,n,i,o)}return e}function ze(e,t,n,r="",o=-1){return(...s)=>{let i=r;const u=t.slice(),c=n.slice();for(const e of s){const[,,t,n,r,s]=c[0];let a=n;if(o>=0)a=o,o=-1;else if("*"===a){if(e<0)throw new Error("Non-negative number required");o=e;continue}i+=u[0],i+=We(e,t,a,r,s),u.splice(0,1),c.splice(0,1)}return 0===c.length?(i+=u[0],e(i)):ze(e,u,c,i,o)}}function qe(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function Ze(e,t,n,r){n=n||" ",t-=e.length;for(let o=0;o<t;o++)e=r?e+n:n+e;return e}function Je(e,t,n){return Ze(e,t,n)}function Xe(e,t,n,r){if(r="number"==typeof r?r:0,(n="number"==typeof n?n:void 0)&&n<0)throw new Error("Count cannot be less than zero");if(0===n)return[];const o=1==(1&r),s=2==(2&r);t=(t=(t=t||[]).filter((e=>e)).map(Pe)).length>0?t:["\\s"];const i=[],u=new RegExp(t.join("|"),"g");let c=!0,a=0;do{const t=u.exec(e);if(null===t){const t=s?e.substring(a).trim():e.substring(a);(!o||t.length>0)&&i.push(t),c=!1}else{const r=s?e.substring(a,t.index).trim():e.substring(a,t.index);(!o||r.length>0)&&(null!=n&&i.length+1===n?(i.push(s?e.substring(a).trim():e.substring(a)),c=!1):i.push(r)),a=u.lastIndex}}while(c);return i}function Ye(e,t,n){if(t+(n||0)>e.length)throw new Error("Invalid startIndex and/or length");return null!=n?e.substr(t,n):e.substr(t)}const Ke="Collection was empty.";function Qe(e,t){return"function"==typeof e?new e(t):new Array(t)}function et(e,t,n,r){const o=0|t;return e.fill(r,o,o+n)}function tt(e,t,n){const r=0|t.length,o=Qe(n,r);for(let n=0;n<=r-1;n++)st(o,n,e(ot(n,t)));return o}function nt(e,t,n){const r=e;return n.reduce(r,t)}function rt(e,t,n){if(null==t)return null==n;if(null==n)return!1;{let r=0,o=!0;const s=0|t.length,i=0|n.length;if(s>i)return!1;if(s<i)return!1;for(;r<s&&o;)o=e(ot(r,t),ot(r,n)),r=r+1|0;return o}}function ot(e,t){if(e<0||e>=t.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");return t[e]}function st(e,t,n){if(t<0||t>=e.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");e[t]=n}function it(e,t,n){return t.reduceRight(((t,n)=>e(n,t)),n)}class ut extends J{constructor(e,t){super(),this.head=e,this.tail=t}toString(){return"["+qe("; ",this)+"]"}Equals(e){return this===e||((e,t)=>{e:for(;;){const n=e,r=t,o=n.tail,s=r.tail;if(null!=o){if(null!=s){const i=ee(o),u=ee(s);if(P(n.head,r.head)){e=i,t=u;continue e}return!1}return!1}return null==s}})(this,e)}GetHashCode(){return 0|((e,t,n)=>{for(;;){const r=e,o=t,s=n,i=s.tail;if(null==i)return 0|o;{const u=ee(i);if(r>18)return 0|o;e=r+1,t=(o<<1)+M(s.head)+631*r,n=u}}})(0,0,this)}toJSON(){return Array.from(this)}CompareTo(e){return 0|((e,t)=>{e:for(;;){const n=e,r=t,o=n.tail,s=r.tail;if(null!=o){if(null!=s){const i=ee(o),u=ee(s),c=0|B(n.head,r.head);if(0===c){e=i,t=u;continue e}return 0|c}return 1}return null!=s?-1:0}})(this,e)}GetEnumerator(){return new ct(this)}[Symbol.iterator](){return b(v(this))}"System.Collections.IEnumerable.GetEnumerator"(){return v(this)}}class ct{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,t=e.it.tail;if(null!=t){const n=ee(t);return e.current=e.it.head,e.it=n,!0}return!1}"System.Collections.IEnumerator.Reset"(){const e=this;e.it=e.xs,e.current=null}Dispose(){}}function at(){return new ut(null,void 0)}function lt(e,t){return new ut(e,t)}function ft(e){return null==e.tail}function dt(e){if(null!=e.tail)return e.head;throw new Error(Ke+"\\nParameter name: list")}function ht(e){const t=e.tail;if(null!=t)return ee(t);throw new Error(Ke+"\\nParameter name: list")}function mt(){return at()}function pt(e,t){return lt(e,t)}function _t(e){return lt(e,at())}function wt(e){return ft(e)}function gt(e){return dt(e)}function yt(e){return ht(e)}function vt(e){const t=0|function(e){return 0|((e,t)=>{for(;;){const n=e,r=t.tail;if(null==r)return 0|n;e=n+1,t=ee(r)}})(0,e)}(e),n=et(new Array(t),0,t,null);return((e,t)=>{for(;;){const r=e,o=t;if(ft(o))break;st(n,r,dt(o)),e=r+1,t=ht(o)}})(0,e),n}function bt(e,t,n){let r=t,o=n;for(;!ft(o);)r=e(r,gt(o)),o=ht(o);return r}function Ct(e){return bt(((e,t)=>lt(t,e)),at(),e)}function St(e,t){bt(((t,n)=>{e(n)}),void 0,t)}function Et(e,t){let n=t;for(let t=e.length-1;t>=0;t--)n=lt(ot(t,e),n);return n}function xt(e){return Et(e,at())}function kt(e,t){return bt(((e,t)=>lt(t,e)),t,Ct(e))}function At(e,t){const n=at(),r=bt(((t,n)=>{const r=new ut(e(n),void 0);return t.tail=r,r}),n,t),o=at();return r.tail=o,ht(n)}function It(e,t){return function(e,t){return(t=>{e:for(;;){const n=t;if(ft(n))return;{const r=e(dt(n));if(null==r){t=ht(n);continue e}return r}}})(t)}((t=>e(t)?ne(t):void 0),t)}function Tt(e,t){const n=at(),r=bt(((t,n)=>{if(e(n)){const e=new ut(n,void 0);return t.tail=e,e}return t}),n,t),o=at();return r.tail=o,ht(n)}function Nt(e,t,n){return null!=function(e,t){return((t,n)=>{for(;;){const r=t,o=n;if(ft(o))return;if(e(dt(o)))return r;t=r+1,n=ht(o)}})(0,t)}((t=>n.Equals(e,t)),t)}const Ft="Enumeration already finished.",Mt="Enumeration has not started. Call MoveNext.",Ot="The input sequence has an insufficient number of elements.";function Dt(){throw new Error(Mt)}function Ut(){throw new Error(Ft)}class Pt{constructor(e){this.f=e}toString(){let e=0,t="seq [";const n=v(this);try{for(;e<4&&n["System.Collections.IEnumerator.MoveNext"]();)e>0&&(t+="; "),t+=q(n["System.Collections.Generic.IEnumerator`1.get_Current"]()),e=e+1|0;return 4===e&&(t+="; ..."),t+"]"}finally{w(n)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return b(v(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}class Rt{constructor(e,t,n){this.current=e,this.next=t,this.dispose=n}"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 $t(e,t,n){return new Rt(e,t,n)}function Ht(e,t,n){let r,o=!1,s=ne(e());const i=()=>{if(null!=s){const e=ee(s);try{n(e)}finally{s=void 0}}},u=()=>{try{i()}finally{r=void 0}};return $t((()=>(o||Dt(),null!=r?ee(r):Ut())),(()=>{if(o||(o=!0),null!=s){const e=ee(s);let n;try{n=t(e)}catch(e){throw u(),e}return null!=n?(r=n,!0):(u(),!1)}return!1}),i)}function Bt(e){return function(e){return new Pt(e)}(e)}function Lt(e){return t="source",null==e&&function(e){throw new Error(e)}(t),v(e);var t}function jt(e){return Bt((()=>v(e())))}function Gt(e){return Bt((()=>function(e){let t,n,r,o=!1,s=!1;const i=()=>{if(s=!0,null!=n){const e=ee(n);try{w(e)}finally{n=void 0}}if(null!=t){const e=ee(t);try{w(e)}finally{t=void 0}}};return $t((()=>(o?s&&Ut():Dt(),null!=r?ee(r):Ut())),(()=>{let u;if(o||(o=!0),s)return!1;{let o;for(;null==o;){const s=t;if(null!=s)if(null!=n){const e=ee(n);if(e["System.Collections.IEnumerator.MoveNext"]())r=ne(e["System.Collections.Generic.IEnumerator`1.get_Current"]()),o=!0;else try{w(e)}finally{n=void 0}}else{const e=ee(s);e["System.Collections.IEnumerator.MoveNext"]()?(u=e["System.Collections.Generic.IEnumerator`1.get_Current"](),n=v(u)):(i(),o=!1)}else t=v(e)}return ee(o)}}),(()=>{s||i()}))}(e)))}function Vt(e){return jt((()=>function(e,t){const n=Qe(void 0,1);return st(n,0,e),n}(e)))}function Wt(e){return m(e)?xt(e):e instanceof ut?e:function(e){let t,n;if(m(e))return xt(e);if(e instanceof ut)return e;{const r=at();let o=r;const s=v(e);try{for(;s["System.Collections.IEnumerator.MoveNext"]();){const e=s["System.Collections.Generic.IEnumerator`1.get_Current"]();t=o,n=new ut(e,void 0),t.tail=n,o=n}}finally{w(s)}const i=o,u=at();return i.tail=u,ht(r)}}(e)}function zt(e,t,n){return Bt((()=>{let r=-1;return Ht(e,(e=>(r=r+1|0,t(r,e))),n)}))}function qt(e,t){return Gt([e,t])}function Zt(e,t,n){const r=Lt(t);try{let t=!1;for(;!t&&r["System.Collections.IEnumerator.MoveNext"]();)t=n.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}finally{w(r)}}function Jt(e,t,n){const r=Lt(n);try{let n=t;for(;r["System.Collections.IEnumerator.MoveNext"]();)n=e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}finally{w(r)}}function Xt(e,t){Jt(((t,n)=>{e(n)}),void 0,t)}function Yt(e,t){return n=()=>Lt(t),r=t=>t["System.Collections.IEnumerator.MoveNext"]()?ne(e(t["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,o=e=>{w(e)},Bt((()=>Ht(n,r,o)));var n,r,o}function Kt(e,t){return zt((()=>Lt(t)),((t,n)=>n["System.Collections.IEnumerator.MoveNext"]()?ne(e(t,n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),(e=>{w(e)}))}function Qt(e){return jt((()=>function(e){return e.slice().reverse()}(function(e){return e instanceof ut?vt(e):Array.from(e)}(e))))}function en(e,t){return Bt((()=>{const n=Lt(t);try{for(let t=1;t<=e;t++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(Ot+"\\nParameter name: source");return function(e,t){return $t((()=>t["System.Collections.Generic.IEnumerator`1.get_Current"]()),(()=>t["System.Collections.IEnumerator.MoveNext"]()),(()=>{try{w(t)}finally{e()}}))}((()=>{}),n)}catch(e){throw w(n),e}}))}Symbol.iterator;class tn{constructor(e,t){this.k=e,this.v=t}}function nn(e,t){return new tn(e,t)}function rn(e){return e.k}function on(e){return e.v}class sn extends tn{constructor(e,t,n,r,o){super(e,t),this.left=n,this.right=r,this.h=0|o}}function un(e,t,n,r,o){return new sn(e,t,n,r,o)}function cn(e){return e.left}function an(e){return e.right}function ln(e){return e.h}function fn(e,t){e:for(;;){const n=e;if(null!=t){const r=ee(t);if(r instanceof sn){const o=r;e=fn(n+1,cn(o)),t=an(o);continue e}return n+1|0}return 0|n}}function dn(e){return fn(0,e)}function hn(e,t,n,r){let o,s,i,u;if(null!=e){const t=ee(e);i=t instanceof sn?(o=t,ln(o)):1}else i=0;if(null!=r){const e=ee(r);u=e instanceof sn?(s=e,ln(s)):1}else u=0;const c=0|(i<u?u:i);return 0===c?nn(t,n):un(t,n,e,r,c+1)}function mn(e,t,n,r){let o,s,i,u,c,a,l,f,d,h;if(null!=e){const t=ee(e);d=t instanceof sn?(o=t,ln(o)):1}else d=0;if(null!=r){const e=ee(r);h=e instanceof sn?(s=e,ln(s)):1}else h=0;if(h>d+2){const o=ee(r);if(o instanceof sn){const r=o;if(i=cn(r),(null!=i?(u=ee(i),u instanceof sn?(c=u,ln(c)):1):0)>d+1){const o=ee(cn(r));if(o instanceof sn){const s=o;return hn(hn(e,t,n,cn(s)),rn(s),on(s),hn(an(s),rn(r),on(r),an(r)))}throw new Error("internal error: Map.rebalance")}return hn(hn(e,t,n,cn(r)),rn(r),on(r),an(r))}throw new Error("internal error: Map.rebalance")}if(d>h+2){const o=ee(e);if(o instanceof sn){const e=o;if(a=an(e),(null!=a?(l=ee(a),l instanceof sn?(f=l,ln(f)):1):0)>h+1){const o=ee(an(e));if(o instanceof sn){const s=o;return hn(hn(cn(e),rn(e),on(e),cn(s)),rn(s),on(s),hn(an(s),t,n,r))}throw new Error("internal error: Map.rebalance")}return hn(cn(e),rn(e),on(e),hn(an(e),t,n,r))}throw new Error("internal error: Map.rebalance")}return hn(e,t,n,r)}function pn(e,t,n,r){if(null!=r){const o=ee(r),s=0|e.Compare(t,rn(o));if(o instanceof sn){const r=o;return s<0?mn(pn(e,t,n,cn(r)),rn(r),on(r),an(r)):0===s?un(t,n,cn(r),an(r),ln(r)):mn(cn(r),rn(r),on(r),pn(e,t,n,an(r)))}return s<0?un(t,n,void 0,r,2):0===s?nn(t,n):un(t,n,r,void 0,2)}return nn(t,n)}function _n(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const s=ee(n),i=0|r.Compare(o,rn(s));if(0===i)return ne(on(s));if(s instanceof sn){const u=s;e=r,t=o,n=i<0?cn(u):an(u);continue e}return}return}}function wn(e){if(null!=e){const t=ee(e);if(t instanceof sn){const e=t;if(null==cn(e))return[rn(e),on(e),an(e)];{const t=wn(cn(e));return[t[0],t[1],hn(t[2],rn(e),on(e),an(e))]}}return[rn(t),on(t),void 0]}throw new Error("internal error: Map.spliceOutSuccessor")}function gn(e,t,n,r){if(null!=r){const o=ee(r);if(o instanceof sn){const r=o,s=0|e.Compare(t,rn(r));if(s<0)return mn(gn(e,t,n,cn(r)),rn(r),on(r),an(r));if(0===s){const e=n(ne(on(r)));if(null!=e)return un(t,ee(e),cn(r),an(r),ln(r));if(null==cn(r))return an(r);if(null==an(r))return cn(r);{const e=wn(an(r));return hn(cn(r),e[0],e[1],e[2])}}return mn(cn(r),rn(r),on(r),gn(e,t,n,an(r)))}{const s=0|e.Compare(t,rn(o));if(s<0){const e=n(void 0);return null!=e?un(t,ee(e),void 0,r,2):r}if(0===s){const e=n(ne(on(o)));return null!=e?nn(t,ee(e)):void 0}{const e=n(void 0);return null!=e?un(t,ee(e),r,void 0,2):r}}}{const e=n(void 0);return null!=e?nn(t,ee(e)):r}}function yn(e,t){e:for(;;){const n=e;if(null!=t){const r=ee(t);if(r instanceof sn){const o=r;yn(n,cn(o)),n(rn(o),on(o)),e=n,t=an(o);continue e}n(rn(r),on(r))}break}}function vn(e,t){yn(e,t)}function bn(e,t){e:for(;;){const n=e;if(null!=t){const r=ee(t);if(r instanceof sn){const o=r,s=bn(n,cn(o));if(null==s){const r=n(rn(o),on(o));if(null==r){e=n,t=an(o);continue e}return r}return s}return n(rn(r),on(r))}return}}function Cn(e,t){return bn(e,t)}function Sn(e,t){if(null!=t){const n=ee(t);if(n instanceof sn){const t=n,r=Sn(e,cn(t)),o=e(rn(t),on(t)),s=Sn(e,an(t));return un(rn(t),o,r,s,ln(t))}return nn(rn(n),e(rn(n),on(n)))}}function En(e,t){return Sn(e,t)}function xn(e,t){if(m(t))return function(e,t){let n;for(let r=0;r<=t.length-1;r++){const o=ot(r,t);n=pn(e,o[0],o[1],n)}return n}(e,t);if(t instanceof ut)return function(e,t){return bt(((t,n)=>pn(e,n[0],n[1],t)),void 0,t)}(e,t);{const n=v(t);try{return function(e,t,n){for(;;){const r=e,o=t,s=n;if(!s["System.Collections.IEnumerator.MoveNext"]())return o;{const i=s["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,t=pn(r,i[0],i[1],o),n=s}}}(e,void 0,n)}finally{w(n)}}}class kn extends J{constructor(e,t){super(),this.stack=e,this.started=t}}function An(e){e:for(;;){const t=e;if(wt(t))return mt();{const n=yt(t),r=gt(t);if(null!=r){const o=ee(r);if(o instanceof sn){const t=o;e=Et([cn(t),nn(rn(t),on(t)),an(t)],n);continue e}return t}e=n;continue e}}}function In(e){return new kn(An(_t(e)),!1)}function Tn(e){if(e.started){const t=e.stack;if(wt(t))return function(){throw new Error("enumeration already finished")}();if(null!=gt(t)){const e=ee(gt(t));if(e instanceof sn)throw new Error("Please report error: Map iterator, unexpected stack for current");return[rn(e),on(e)]}throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}function Nn(e){let t=In(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Tn(t),"System.Collections.IEnumerator.get_Current":()=>Tn(t),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const t=e.stack;if(wt(t))return!1;if(null!=gt(t)){if(ee(gt(t))instanceof sn)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=An(yt(t)),!wt(e.stack)}throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!wt(e.stack)}(t),"System.Collections.IEnumerator.Reset"(){t=In(e)},Dispose(){}}}class Fn{constructor(e,t){this.comparer=e,this.tree=t}GetHashCode(){return 0|function(e){const t=(e,t)=>(e<<1)+t+631;let n=0;const r=v(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=0|t(n,M(e[0])),n=0|t(n,M(e[1]))}}finally{w(r)}return 0|n}(this)}Equals(e){if(!(e instanceof Fn))return!1;{const t=e,n=v(this);try{const e=v(t);try{const t=()=>{const r=n["System.Collections.IEnumerator.MoveNext"]();if(r===e["System.Collections.IEnumerator.MoveNext"]()){if(r){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"](),o=e["System.Collections.Generic.IEnumerator`1.get_Current"]();return!(!P(r[0],o[0])||!P(r[1],o[1]))&&t()}return!0}return!1};return t()}finally{w(e)}}finally{w(n)}}}toString(){return"map ["+qe("; ",Yt((e=>function(e,...t){let n;return"object"==typeof e?(n=String(t[0]),t.shift()):n=e,n.replace(He,((e,n,r,o,s,i)=>{if(n<0||n>=t.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let u=t[n];if(Ne(u))switch(s=null==s?null:parseInt(s,10),o){case"f":case"F":u=Me(u,s=null!=s?s:2);break;case"g":case"G":u=null!=s?Oe(u,s):Oe(u);break;case"e":case"E":u=null!=s?De(u,s):De(u);break;case"p":case"P":s=null!=s?s:2,u=Me(Fe(u,100),s)+" %";break;case"d":case"D":u=null!=s?Je(String(u),s,"0"):String(u);break;case"x":case"X":u=null!=s?Je(Ue(u),s,"0"):Ue(u),"X"===o&&(u=u.toUpperCase());break;default:if(i){let e="";u=i.replace(/([0#,]+)(\.[0#]+)?/,((t,n,r)=>{Be(u,0)&&(u=Fe(u,-1),e="-"),r=null==r?"":r.substring(1),u=Me(u,Math.max(r.length,0));let[o,s]=u.split(".");s||(s=""),o=Je(o,n.replace(/,/g,"").replace(/^#+/,"").length,"0");const i=r.replace(/#+$/,"").length;if(i>s.length?s=function(e,t,n){return Ze(e,t,"0",!0)}(s,i):i<s.length&&(s=s.substring(0,i)+s.substring(i).replace(/0+$/,"")),n.indexOf(",")>0){const e=o.length%3,t=Math.floor(o.length/3);let n=e>0?o.substr(0,e)+(t>0?",":""):"";for(let r=0;r<t;r++)n+=o.substr(e+3*r,3)+(r<t-1?",":"");o=n}return s.length>0?o+"."+s:o})),u=e+u}}else u=u instanceof Date?we(u,i||o):q(u);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(u=Ze(String(u),Math.abs(r)," ",r<0)),u}))}("({0}, {1})",e[0],e[1])),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){return Array.from(this)}GetEnumerator(){return Nn(this.tree)}[Symbol.iterator](){return b(v(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Nn(this.tree)}CompareTo(e){const t=this;if(e instanceof Fn)return 0|function(e,t,n){const r=Lt(t);try{const t=Lt(n);try{let n=0,o=r["System.Collections.IEnumerator.MoveNext"](),s=t["System.Collections.IEnumerator.MoveNext"]();for(;0===n&&o&&s;)n=0|e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),t["System.Collections.Generic.IEnumerator`1.get_Current"]()),0===n&&(o=r["System.Collections.IEnumerator.MoveNext"](),s=t["System.Collections.IEnumerator.MoveNext"]());return 0|(0!==n?n:o?1:s?-1:0)}finally{w(t)}}finally{w(r)}}(((e,n)=>{const r=0|t.comparer.Compare(e[0],n[0]);return 0|(0!==r?r:B(e[1],n[1]))}),t,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 Un(this,e[0])&&P(On(this,e[0]),e[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(e,t){!function(e,t,n){let r=n;vn(((e,n)=>{st(t,r,[e,n]),r=r+1|0}),e)}(this.tree,e,t)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Dn(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Dn(this)}get size(){return 0|Dn(this)}clear(){throw new Error("Map cannot be mutated")}delete(e){throw new Error("Map cannot be mutated")}entries(){return Yt((e=>[e[0],e[1]]),this)}get(e){return On(this,e)}has(e){return Un(this,e)}keys(){return Yt((e=>e[0]),this)}set(e,t){throw new Error("Map cannot be mutated")}values(){return Yt((e=>e[1]),this)}forEach(e,t){const n=this;Xt((t=>{e(t[1],t[0],n)}),n)}}function Mn(e,t){return new Fn(e,t)}function On(e,t){return function(e,t,n){const r=_n(e,t,n);if(null==r)throw new Error;return ee(r)}(e.comparer,t,e.tree)}function Dn(e){return dn(e.tree)}function Un(e,t){return function(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const s=ee(n),i=0|r.Compare(o,rn(s));if(s instanceof sn){const u=s;if(i<0){e=r,t=o,n=cn(u);continue e}if(0===i)return!0;e=r,t=o,n=an(u);continue e}return 0===i}return!1}}(e.comparer,t,e.tree)}function Pn(e,t){return _n(e.comparer,t,e.tree)}function Rn(e,t,n){return function(e,t,n){return Mn(e.comparer,pn(e.comparer,t,n,e.tree))}(n,e,t)}function $n(e,t,n){return function(e,t,n){return Mn(e.comparer,gn(e.comparer,t,n,e.tree))}(n,e,t)}function Hn(e,t){return Pn(t,e)}function Bn(e,t){return r=e,Mn((n=t).comparer,En(r,n.tree));var n,r}function Ln(e){return function(e){return Mn(e,void 0)}(e)}class jn{constructor(e,t,n,r){this.declaringType=e,this.tag=t,this.name=n,this.fields=r}}class Gn{constructor(e,t,n,r,o,s,i){this.fullname=e,this.generics=t,this.construct=n,this.parent=r,this.fields=o,this.cases=s,this.enumCases=i}toString(){return tr(this)}GetHashCode(){return Wn(this)}Equals(e){return zn(this,e)}}function Vn(e){return null!=e.generics?e.generics:[]}function Wn(e){return F([I(e.fullname),...Vn(e).map(Wn)])}function zn(e,t){return""===e.fullname?""===t.fullname&&D(fr(e),fr(t),(([e,t],[n,r])=>e===n&&zn(t,r))):e.fullname===t.fullname&&D(Vn(e),Vn(t),zn)}function qn(e,t,n,r){return new Gn(e,t,n,void 0,r)}function Zn(...e){return new Gn("",void 0,void 0,void 0,(()=>e))}function Jn(e){return new Gn("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Xn(e){return new Gn("Microsoft.FSharp.Collections.FSharpList`1",[e])}const Yn=new Gn("System.Object"),Kn=(new Gn("Microsoft.FSharp.Core.Unit"),new Gn("System.Char"),new Gn("System.String")),Qn=new Gn("System.Boolean");function er(e){if(Array.isArray(e))return e[0];if(e instanceof Gn){const t=rr(e);if(null!=t)return er(t)+"[]";{const t=e.fullname.lastIndexOf(".");return-1===t?e.fullname:e.fullname.substr(t+1)}}return e.name}function tr(e){const t=rr(e);return null!=t?tr(t)+"[]":null==e.generics||0===e.generics.length?e.fullname:e.fullname+"["+e.generics.map((e=>tr(e))).join(",")+"]"}function nr(e){return null!=rr(e)}function rr(e){return"[]"===e.fullname&&1===e.generics?.length?e.generics[0]:void 0}function or(e){return null!=e.generics&&e.generics.length>0}function sr(e){return null!=e.enumCases&&e.enumCases.length>0}function ir(e){return null==e.generics?e:new Gn(e.fullname,e.generics.map((()=>Yn)))}function ur(e){return e.generics?.[0]}function cr(e){if(sr(e)&&null!=e.enumCases)return e.enumCases.map((e=>e[1]));throw new Error(`${e.fullname} is not an enum type`)}function ar(e,t){const n=parseInt(t,10);return function(e,t){if(null!=e.enumCases){if("string"==typeof t){for(const n of e.enumCases)if(n[0]===t)return n;throw new Error(`'${t}' was not found in ${e.fullname}`)}for(const n of e.enumCases)if(n[1]===t)return n;return["",t]}throw new Error(`${e.fullname} is not an enum type`)}(e,isNaN(n)?t:n)[1]}function lr(e){if(null!=e.cases)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function fr(e){if(null!=e.fields)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function dr(e){if(pr(e)&&null!=e.generics)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function hr(e){return e instanceof Gn?null!=e.cases:e instanceof Z}function mr(e){return e instanceof Gn?null!=e.fields:e instanceof J}function pr(e){return e.fullname.startsWith("System.Tuple")}function _r(e){return null==e.fields?[]:e.fields}function wr(e){return new gr(1,[e])}new Gn("System.SByte"),new Gn("System.Byte"),new Gn("System.Int16"),new Gn("System.UInt16"),new Gn("System.Int32"),new Gn("System.UInt32"),new Gn("System.Int64"),new Gn("System.UInt64"),new Gn("System.Int128"),new Gn("System.UInt128"),new Gn("System.IntPtr"),new Gn("System.UIntPtr"),new Gn("System.Half"),new Gn("System.Single"),new Gn("System.Double"),new Gn("System.Decimal"),new Gn("System.Numerics.BigInteger");class gr extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Ok","Error"]}}function yr(e,t){return 0===t.tag?(n=e(t.fields[0]),new gr(0,[n])):wr(t.fields[0]);var n}class vr extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class br extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class Cr{constructor(){this.cache=new Map([])}}function Sr(){return new Cr}function Er(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function xr(e,t){switch(e.tag){case 2:return function(e,t,n,r,o=0){if("string"==typeof e){const n=e;e=function(e,t=0){if(0!=(-284&t))throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let n="gu";return n+=1&t?"i":"",n+=2&t?"m":"",n+=16&t?"s":"",new RegExp(e,n)}(t,r??0),t=n,r=void 0}if("function"==typeof n)return r=null==r?-1:r,t.substring(0,o)+t.substring(o).replace(e,(function(){let e=arguments[0];if(r){r--;const t=[],o=arguments.length,s="string"!=typeof arguments[o-1];let i=s?o-3:o-2;for(let e=0;e<i;e++)t.push(arguments[e]);t.index=arguments[i++],t.input=arguments[i++],s&&(t.groups=arguments[i]),e=n(t)}return e}));if(n=n.replace(/\$0/g,(e=>"$&")).replace(/\${([^}]+)}/g,"$<$1>"),null!=r){let s;const i=t.substring(o),u=Re(e,i),c=Re.length>r?(s=u[r-1],i.substring(0,s.index+s[0].length)):i;return t.substring(0,o)+c.replace(e,n)+t.substring(o+c.length)}return t.replace(e,n)}(Er(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return Er(t)}}Sr(),Sr();const kr=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,Ar=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,Ir=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function Tr(e,t){try{return t.contents=function(e){function t(e){return e.replace(Ar,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if(kr.test(n))return function(e,...t){if(0===t.length)return e.trim();const n="["+Pe(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}(n,"{","}","(",")");if(Ar.test(n))return t(n);if(Ir.test(n))return t(n.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}(e),!0}catch{return!1}}var Nr;function Fr(e,t){switch(t){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 Mr(e,t,n,r,o){try{return o.contents=function(e,t,n,r,o){const s=function(e,t,n){const r=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(null!=r){const[,,e,o]=r;n=n||function(e,t){if(t&Nr.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,t);const s=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.")}}(n);if(!s.test(o))return function(e,t){const[,n,r,o]=e;return{sign:n||"",prefix:r||"",digits:o,radix:t}}(r,n)}return null}(e,t,void 0);if(null!=s){let e=Number.parseInt(s.sign+s.digits,s.radix);if(!Number.isNaN(e)){const[t,o]=Fr(!0,r);!n&&10!==s.radix&&e>=t&&e<=o&&(e=e<<32-r>>32-r);const[i,u]=Fr(n,r);if(e>=i&&e<=u)return e}}throw new Error(`The input string ${e} was not in a correct format.`)}(e,t,n,r),!0}catch{return!1}}function Or(e,t){!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.")}}(t);const n=new Date(e);return n.offset=null!=t?t:-6e4*(new Date).getTimezoneOffset(),n}function Dr(e,t){try{return t.contents=function(e){const[t,n]=ye(e),r=null==n?-6e4*t.getTimezoneOffset():"Z"===n?0:6e4*n;return Or(t.getTime(),r)}(e),!0}catch(e){return!1}}function Ur(e){return e<0?Math.ceil(e):Math.floor(e)}function Pr(e=0,t=0,n=0,r=0,o=0){switch(arguments.length){case 1:return Number(BigInt(arguments[0])/10000n);case 3:e=0,t=arguments[0],n=arguments[1],r=arguments[2],o=0}return 864e5*e+36e5*t+6e4*n+1e3*r+o}function Rr(e,t){try{return t.contents=function(e){const t=e.search("\\."),n=e.search("\\:");if(-1===t&&-1===n){const t=parseInt(e,0);if(isNaN(t))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return Pr(t,0,0,0,0)}if(n>0){const t=/^(-?)((\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!=t&&null!=t[4]&&null!=t[5]){let n=0,r=0,o=0;const s=null!=t[1]&&"-"===t[1]?-1:1,i=+t[4],u=+t[5];if(null!=t[3]&&(n=+t[3]),null!=t[7]&&(o=+t[7]),null!=t[8])switch(t[8].length){case 1:r=100*+t[8];break;case 2:r=10*+t[8];break;case 3:r=+t[8];break;case 4:r=+t[8]/10;break;case 5:r=+t[8]/100;break;case 6:r=+t[8]/1e3;break;case 7:r=+t[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return s*Pr(n,i,u,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch{return!1}}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(Nr||(Nr={}));class $r{constructor(e){this.k=e}}function Hr(e){return new $r(e)}function Br(e){return e.k}class Lr extends $r{constructor(e,t,n,r){super(e),this.left=t,this.right=n,this.h=0|r}}function jr(e,t,n,r){return new Lr(e,t,n,r)}function Gr(e){return e.left}function Vr(e){return e.right}function Wr(e){return e.h}function zr(e,t){e:for(;;){const n=t;if(null!=e){const r=ee(e);if(r instanceof Lr){const o=r;e=Gr(o),t=zr(Vr(o),n+1);continue e}return n+1|0}return 0|n}}function qr(e){return zr(e,0)}function Zr(e,t,n){let r,o,s,i;if(null!=e){const t=ee(e);s=t instanceof Lr?(r=t,Wr(r)):1}else s=0;if(null!=n){const e=ee(n);i=e instanceof Lr?(o=e,Wr(o)):1}else i=0;const u=0|(s<i?i:s);return 0===u?Hr(t):jr(t,e,n,u+1)}function Jr(e,t,n){let r,o,s,i,u,c,a,l,f,d;if(null!=e){const t=ee(e);f=t instanceof Lr?(r=t,Wr(r)):1}else f=0;if(null!=n){const e=ee(n);d=e instanceof Lr?(o=e,Wr(o)):1}else d=0;if(d>f+2){const r=ee(n);if(r instanceof Lr){const n=r;if(s=Gr(n),(null!=s?(i=ee(s),i instanceof Lr?(u=i,Wr(u)):1):0)>f+1){const r=ee(Gr(n));if(r instanceof Lr){const o=r;return Zr(Zr(e,t,Gr(o)),Br(o),Zr(Vr(o),Br(n),Vr(n)))}throw new Error("internal error: Set.rebalance")}return Zr(Zr(e,t,Gr(n)),Br(n),Vr(n))}throw new Error("internal error: Set.rebalance")}if(f>d+2){const r=ee(e);if(r instanceof Lr){const e=r;if(c=Vr(e),(null!=c?(a=ee(c),a instanceof Lr?(l=a,Wr(l)):1):0)>d+1){const r=ee(Vr(e));if(r instanceof Lr){const o=r;return Zr(Zr(Gr(e),Br(e),Gr(o)),Br(o),Zr(Vr(o),t,n))}throw new Error("internal error: Set.rebalance")}return Zr(Gr(e),Br(e),Zr(Vr(e),t,n))}throw new Error("internal error: Set.rebalance")}return Zr(e,t,n)}function Xr(e,t,n){if(null!=n){const r=ee(n),o=0|e.Compare(t,Br(r));if(r instanceof Lr){const s=r;return o<0?Jr(Xr(e,t,Gr(s)),Br(s),Vr(s)):0===o?n:Jr(Gr(s),Br(s),Xr(e,t,Vr(s)))}{const o=0|e.Compare(t,Br(r));return o<0?jr(t,void 0,n,2):0===o?n:jr(t,n,void 0,2)}}return Hr(t)}function Yr(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const s=ee(n),i=0|r.Compare(o,Br(s));if(s instanceof Lr){const u=s;if(i<0){e=r,t=o,n=Gr(u);continue e}if(0===i)return!0;e=r,t=o,n=Vr(u);continue e}return 0===i}return!1}}function Kr(e,t){e:for(;;){const n=e;if(null!=t){const r=ee(t);if(r instanceof Lr){const o=r;Kr(n,Gr(o)),n(Br(o)),e=n,t=Vr(o);continue e}n(Br(r))}break}}class Qr extends J{constructor(e,t){super(),this.stack=e,this.started=t}}function eo(e){e:for(;;){const t=e;if(wt(t))return mt();{const n=gt(t),r=yt(t);if(null!=n){const o=ee(n);if(o instanceof Lr){const t=o;e=Et([Gr(t),Hr(Br(t)),Vr(t)],r);continue e}return t}e=r;continue e}}}function to(e){return new Qr(eo(_t(e)),!1)}function no(e){if(e.started){const t=e.stack;if(wt(t))return function(){throw new Error("Enumeration already started")}();if(null!=gt(t))return Br(ee(gt(t)));throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function ro(e){let t=to(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>no(t),"System.Collections.IEnumerator.get_Current":()=>no(t),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const t=e.stack;if(wt(t))return!1;if(null!=gt(t)){if(ee(gt(t))instanceof Lr)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=eo(yt(t)),!wt(e.stack)}throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!wt(e.stack)}(t),"System.Collections.IEnumerator.Reset"(){t=to(e)},Dispose(){}}}function oo(e,t,n){return null==t?null==n?0:-1:null==n?1:0|function(e,t,n){e:for(;;){const r=e,o=t,s=n;if(wt(o))return wt(s)?0:-1;if(wt(s))return 1;if(null!=gt(s))if(null!=gt(o)){const i=ee(gt(o)),u=ee(gt(s));if(i instanceof Lr){const c=i;if(null==Gr(c)){if(!(u instanceof Lr)){const i=0|r.Compare(Br(c),Br(u));if(0!==i)return 0|i;e=r,t=pt(Vr(c),yt(o)),n=pt(void 0,yt(s));continue e}{const i=u;if(null==Gr(i)){const u=0|r.Compare(Br(c),Br(i));if(0!==u)return 0|u;e=r,t=pt(Vr(c),yt(o)),n=pt(Vr(i),yt(s));continue e}{let i,u,c,a,l;switch(wt(o)?wt(s)?i=2:null!=gt(s)?(i=1,a=yt(s),l=ee(gt(s))):i=2:null!=gt(o)?(i=0,u=yt(o),c=ee(gt(o))):wt(s)?i=2:null!=gt(s)?(i=1,a=yt(s),l=ee(gt(s))):i=2,i){case 0:if(c instanceof Lr){const o=c;e=r,t=Et([Gr(o),jr(Br(o),void 0,Vr(o),0)],u),n=s;continue e}e=r,t=Et([void 0,Hr(Br(c))],u),n=s;continue e;case 1:if(l instanceof Lr){const s=l;e=r,t=o,n=Et([Gr(s),jr(Br(s),void 0,Vr(s),0)],a);continue e}e=r,t=o,n=Et([void 0,Hr(Br(l))],a);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{let i,u,c,a,l;switch(wt(o)?wt(s)?i=2:null!=gt(s)?(i=1,a=yt(s),l=ee(gt(s))):i=2:null!=gt(o)?(i=0,u=yt(o),c=ee(gt(o))):wt(s)?i=2:null!=gt(s)?(i=1,a=yt(s),l=ee(gt(s))):i=2,i){case 0:if(c instanceof Lr){const o=c;e=r,t=Et([Gr(o),jr(Br(o),void 0,Vr(o),0)],u),n=s;continue e}e=r,t=Et([void 0,Hr(Br(c))],u),n=s;continue e;case 1:if(l instanceof Lr){const s=l;e=r,t=o,n=Et([Gr(s),jr(Br(s),void 0,Vr(s),0)],a);continue e}e=r,t=o,n=Et([void 0,Hr(Br(l))],a);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{if(!(u instanceof Lr)){const c=0|r.Compare(Br(i),Br(u));if(0!==c)return 0|c;e=r,t=yt(o),n=yt(s);continue e}{const c=u;if(null==Gr(c)){const u=0|r.Compare(Br(i),Br(c));if(0!==u)return 0|u;e=r,t=pt(void 0,yt(o)),n=pt(Vr(c),yt(s));continue e}{let i,u,c,a,l;switch(wt(o)?wt(s)?i=2:null!=gt(s)?(i=1,a=yt(s),l=ee(gt(s))):i=2:null!=gt(o)?(i=0,u=yt(o),c=ee(gt(o))):wt(s)?i=2:null!=gt(s)?(i=1,a=yt(s),l=ee(gt(s))):i=2,i){case 0:if(c instanceof Lr){const o=c;e=r,t=Et([Gr(o),jr(Br(o),void 0,Vr(o),0)],u),n=s;continue e}e=r,t=Et([void 0,Hr(Br(c))],u),n=s;continue e;case 1:if(l instanceof Lr){const s=l;e=r,t=o,n=Et([Gr(s),jr(Br(s),void 0,Vr(s),0)],a);continue e}e=r,t=o,n=Et([void 0,Hr(Br(l))],a);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}}}else{let i,u,c,a,l;switch(ee(gt(s)),wt(o)?wt(s)?i=2:null!=gt(s)?(i=1,a=yt(s),l=ee(gt(s))):i=2:null!=gt(o)?(i=0,u=yt(o),c=ee(gt(o))):wt(s)?i=2:null!=gt(s)?(i=1,a=yt(s),l=ee(gt(s))):i=2,i){case 0:if(c instanceof Lr){const o=c;e=r,t=Et([Gr(o),jr(Br(o),void 0,Vr(o),0)],u),n=s;continue e}e=r,t=Et([void 0,Hr(Br(c))],u),n=s;continue e;case 1:if(l instanceof Lr){const s=l;e=r,t=o,n=Et([Gr(s),jr(Br(s),void 0,Vr(s),0)],a);continue e}e=r,t=o,n=Et([void 0,Hr(Br(l))],a);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==gt(o)){e=r,t=yt(o),n=yt(s);continue e}{let i,u,c,a,l;switch(ee(gt(o)),wt(o)?wt(s)?i=2:null!=gt(s)?(i=1,a=yt(s),l=ee(gt(s))):i=2:null!=gt(o)?(i=0,u=yt(o),c=ee(gt(o))):wt(s)?i=2:null!=gt(s)?(i=1,a=yt(s),l=ee(gt(s))):i=2,i){case 0:if(c instanceof Lr){const o=c;e=r,t=Et([Gr(o),jr(Br(o),void 0,Vr(o),0)],u),n=s;continue e}e=r,t=Et([void 0,Hr(Br(c))],u),n=s;continue e;case 1:if(l instanceof Lr){const s=l;e=r,t=o,n=Et([Gr(s),jr(Br(s),void 0,Vr(s),0)],a);continue e}e=r,t=o,n=Et([void 0,Hr(Br(l))],a);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,_t(t),_t(n))}function so(e,t,n){let r=n;Kr((e=>{st(t,r,e),r=r+1|0}),e)}function io(e,t){if(m(t))return function(e,t){return nt(((t,n)=>Xr(e,n,t)),void 0,t)}(e,t);if(t instanceof ut)return function(e,t){return bt(((t,n)=>Xr(e,n,t)),void 0,t)}(e,t);{const n=v(t);try{return function(e,t,n){for(;;){const r=e,o=t,s=n;if(!s["System.Collections.IEnumerator.MoveNext"]())return o;e=r,t=Xr(r,s["System.Collections.Generic.IEnumerator`1.get_Current"](),o),n=s}}(e,void 0,n)}finally{w(n)}}}class uo{constructor(e,t){this.comparer=e,this.tree=t}GetHashCode(){return 0|function(e){let t=0;const n=v(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();)t=(t<<1)+M(n["System.Collections.Generic.IEnumerator`1.get_Current"]())+631|0}finally{w(n)}return 0|Math.abs(t)}(this)}Equals(e){let t;return e instanceof uo&&(t=e,0===oo(ao(this),lo(this),lo(t)))}toString(){return"set ["+qe("; ",Yt((e=>q(e)),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){return Array.from(this)}CompareTo(e){return 0|oo(ao(this),lo(this),lo(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 Yr(ao(this),e,lo(this))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(e,t){so(lo(this),e,t)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|ho(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|ho(this)}GetEnumerator(){return ro(lo(this))}[Symbol.iterator](){return b(v(this))}"System.Collections.IEnumerable.GetEnumerator"(){return ro(lo(this))}get size(){return 0|ho(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 mo(this,e)}keys(){return Yt((e=>e),this)}values(){return Yt((e=>e),this)}entries(){return Yt((e=>[e,e]),this)}forEach(e,t){const n=this;Xt((t=>{e(t,t,n)}),n)}}function co(e,t){return new uo(e,t)}function ao(e){return e.comparer}function lo(e){return e.tree}function fo(e){return co(e,void 0)}function ho(e){return qr(lo(e))}function mo(e,t){return Yr(ao(e),t,lo(e))}function po(e,t){return mo(t,e)}function _o(e,t){return function(e,t){return co(ao(e),Xr(ao(e),t,lo(e)))}(t,e)}function wo(e,t,n){try{return"Expecting "+e+" but instead got:"+(n?"\n":" ")+JSON.stringify(t,null,4)}catch(t){return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(n?"\n":" ")}}function go(e,t){const n=2===t.tag?wo(t.fields[0],t.fields[1],!0):1===t.tag?wo(t.fields[0],t.fields[1],!1)+"\nReason: "+t.fields[2]:3===t.tag?wo(t.fields[0],t.fields[1],!0):4===t.tag?wo(t.fields[0],t.fields[1],!0)+"\nNode `"+t.fields[2]+"` is unkown.":5===t.tag?"Expecting "+t.fields[0]+".\n"+JSON.stringify(t.fields[1],null,4):7===t.tag?"The following errors were found:\n\n"+qe("\n\n",t.fields[0]):6===t.tag?"The following `failure` occurred with the decoder: "+t.fields[0]:wo(t.fields[0],t.fields[1],!1);return 7===t.tag?n:"Error at: `"+e+"`\n"+n}function yo(e,t,n){const r=t(e,n);if(1===r.tag){const e=r.fields[0];return new gr(1,[go(e[0],e[1])])}return new gr(0,[r.fields[0]])}function vo(e,t){try{return yo("$",e,JSON.parse(t))}catch(e){if(e instanceof SyntaxError)return new gr(1,["Given an invalid JSON: "+e.message]);throw e}}function bo(e,t){return"string"==typeof t?new gr(0,[t]):new gr(1,[[e,new vr(0,["a string",t])]])}const Co=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-128<=e&&e<=127?new gr(0,[(e+128&255)-128]):new gr(1,[[n,new vr(1,["a sbyte",e,"Value was either too large or too small for a sbyte"])]]):new gr(1,[[n,new vr(1,["a sbyte",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Mr(r,511,!1,8,new X((()=>t),(e=>{t=0|e}))),t],e[0]?new gr(0,[e[1]]):new gr(1,[[n,new vr(0,["a sbyte",r])]])}return new gr(1,[[n,new vr(0,["a sbyte",r])]])},So=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=255?new gr(0,[255&e]):new gr(1,[[n,new vr(1,["a byte",e,"Value was either too large or too small for a byte"])]]):new gr(1,[[n,new vr(1,["a byte",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Mr(r,511,!0,8,new X((()=>t),(e=>{t=e}))),t],e[0]?new gr(0,[e[1]]):new gr(1,[[n,new vr(0,["a byte",r])]])}return new gr(1,[[n,new vr(0,["a byte",r])]])},Eo=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-32768<=e&&e<=32767?new gr(0,[(e+32768&65535)-32768]):new gr(1,[[n,new vr(1,["an int16",e,"Value was either too large or too small for an int16"])]]):new gr(1,[[n,new vr(1,["an int16",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Mr(r,511,!1,16,new X((()=>t),(e=>{t=0|e}))),t],e[0]?new gr(0,[e[1]]):new gr(1,[[n,new vr(0,["an int16",r])]])}return new gr(1,[[n,new vr(0,["an int16",r])]])},xo=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=65535?new gr(0,[65535&e]):new gr(1,[[n,new vr(1,["an uint16",e,"Value was either too large or too small for an uint16"])]]):new gr(1,[[n,new vr(1,["an uint16",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Mr(r,511,!0,16,new X((()=>t),(e=>{t=e}))),t],e[0]?new gr(0,[e[1]]):new gr(1,[[n,new vr(0,["an uint16",r])]])}return new gr(1,[[n,new vr(0,["an uint16",r])]])},ko=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-2147483648<=e&&e<=2147483647?new gr(0,[~~e]):new gr(1,[[n,new vr(1,["an int",e,"Value was either too large or too small for an int"])]]):new gr(1,[[n,new vr(1,["an int",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Mr(r,511,!1,32,new X((()=>t),(e=>{t=0|e}))),t],e[0]?new gr(0,[e[1]]):new gr(1,[[n,new vr(0,["an int",r])]])}return new gr(1,[[n,new vr(0,["an int",r])]])},Ao=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=4294967295?new gr(0,[e>>>0]):new gr(1,[[n,new vr(1,["an uint32",e,"Value was either too large or too small for an uint32"])]]):new gr(1,[[n,new vr(1,["an uint32",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Mr(r,511,!0,32,new X((()=>t),(e=>{t=e}))),t],e[0]?new gr(0,[e[1]]):new gr(1,[[n,new vr(0,["an uint32",r])]])}return new gr(1,[[n,new vr(0,["an uint32",r])]])};function Io(e,t,n,r){let o;const s=n+".["+k(e)+"]";if(Array.isArray(r)){const n=r;return e<n.length?t(s,ot(e,n)):new gr(1,[[s,new vr(5,["a longer array. Need index `"+k(e)+"` but there are only `"+(o=n.length,k(o)+"` entries"),r])]])}return new gr(1,[[s,new vr(0,["an array",r])]])}function To(e,t,n){if(Array.isArray(n)){let r=-1;return yr(Ct,nt(((n,o)=>{if(r=r+1|0,0===n.tag){const s=e(t+".["+k(r)+"]",o);return 0===s.tag?new gr(0,[pt(s.fields[0],n.fields[0])]):new gr(1,[s.fields[0]])}return n}),new gr(0,[mt()]),n))}return new gr(1,[[t,new vr(0,["a list",n])]])}function No(e,t,n){if(Array.isArray(n)){let r=-1;const o=n;return nt(((n,o)=>{if(r=r+1|0,0===n.tag){const s=n.fields[0],i=e(t+".["+k(r)+"]",o);return 0===i.tag?(st(s,r,i.fields[0]),new gr(0,[s])):new gr(1,[i.fields[0]])}return n}),new gr(0,[et(new Array(o.length),0,o.length,null)]),o)}return new gr(1,[[t,new vr(0,["an array",n])]])}function Fo(e,t,n,r){const o=t(n,r);return 0===o.tag?e(o.fields[0],n,r):new gr(1,[o.fields[0]])}function Mo(e,t){let n;const r=e;return n=e=>t=>Io(0,r,e,t),e=>r=>Fo(W((e=>{let n;const r=t;return n=e=>t=>Io(1,r,e,t),t=>r=>Fo(((t,n,r)=>new gr(0,[[e,t]])),G(n),t,r)})),G(n),e,r)}function Oo(e){return Mn(t={Compare:B},xn(t,e));var t}function Do(e,t,n,r){let o;const s=t.length+e|0;if(s!==r.length)return new gr(1,[[n,new vr(6,[(o=0|r.length,Ge(Le("Expected array of length %i but got %i"))(s)(o))])]]);{let o=new gr(0,[mt()]);for(let s=e;s<=r.length-1;s++)if(0===o.tag){const i=o.fields[0],u=Ge(Le("%s[%i]"))(n)(s),c=ot(s-e,t),a=ot(s,r);o=yr((e=>pt(e,i)),c(u)(a))}return yr(Ct,o)}}function Uo(e,t,n,r,o,s){const i=function(e,t){return t.find((e=>er(e)===r))}(0,lr(n));if(null!=i){const n=i,r=tt((n=>Ro(e,t,!1,n[1])),_r(n));return yr((e=>function(e,t){const n=(e.fields||[]).length;if(t.length!==n)throw new Error(`Expected an array of length ${n} but got ${t.length}`);const r=e.declaringType.construct;return null==r?{}:e.declaringType.cases&&1==e.declaringType.cases().length?new r(...t):new r(e.tag,t)}(n,vt(e))),0===r.length&&s.length<=1?new gr(0,[mt()]):Do(1,r,o,s))}return new gr(1,[[o,new vr(6,["Cannot find case "+r+" in "+tr(n)])]])}function Po(e,t,n,r){let o;const s=new X(null);let i;const u=tr(r);let c;if(i=""===u?e:Rn(u,s,e),mr(r)){const e=tt((e=>[xr(t,er(e)),Ro(i,t,!1,e[1])]),fr(r));c=t=>n=>yr((e=>function(e,t){const n=fr(e);if(n.length!==t.length)throw new Error(`Expected an array of length ${n.length} but got ${t.length}`);return null!=e.construct?new e.construct(...t):n.reduce(((e,[n,r],o)=>(e[n]=t[o],e)),{})}(r,vt(e))),function(e,t,n){return null===n||Object.getPrototypeOf(n||!1)!==Object.prototype?new gr(1,[[t,new vr(0,["an object",n])]]):it(((e,r)=>{const o=e[0];return 0===r.tag?yr((e=>pt(e,r.fields[0])),e[1](t+"."+o)(n[o])):r}),e,new gr(0,[mt()]))}(e,t,n))}else if(hr(r))c=e=>n=>{if("string"==typeof n)return Uo(i,t,r,n,e,[]);if(Array.isArray(n)){const u=n;return o=n=>Uo(i,t,r,n,e,u),0===(s=bo(e+"[0]",ot(0,u))).tag?o(s.fields[0]):wr(s.fields[0])}return new gr(1,[[e,new vr(0,["a string or array",n])]]);var o,s};else{if(!n)throw new Error((o=tr(r),Ge(Le("Cannot generate auto decoder for %s. Please pass an extra decoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(o)));c=e=>t=>new gr(1,[[e,new vr(2,["an extra coder for "+tr(r),t])]])}return s.contents=c,c}function Ro(e,t,n,r){let o,s,i,u;const c=tr(r),a=Hn(c,e);if(null!=a){const e=a;return t=>n=>e.contents(t)(n)}if(nr(r)){const n=Ro(e,t,!1,rr(r));return e=>t=>No(G(n),e,t)}if(sr(r))switch(tr(ur(r))){case"System.SByte":return e=>t=>{const n=r,o=e,s=t,i=Co(o)(s);if(1===i.tag)return new gr(1,[i.fields[0]]);{const e=0|i.fields[0];return Zt(e,cr(n),{Equals:(e,t)=>e===t,GetHashCode:T})?new gr(0,[ar(n,e.toString())]):new gr(1,[[o,new vr(1,[tr(n),s,"Unkown value provided for the enum"])]])}};case"System.Byte":return e=>t=>{const n=r,o=e,s=t,i=So(o)(s);if(1===i.tag)return new gr(1,[i.fields[0]]);{const e=i.fields[0];return Zt(e,cr(n),{Equals:(e,t)=>e===t,GetHashCode:T})?new gr(0,[ar(n,e.toString())]):new gr(1,[[o,new vr(1,[tr(n),s,"Unkown value provided for the enum"])]])}};case"System.Int16":return e=>t=>{const n=r,o=e,s=t,i=Eo(o)(s);if(1===i.tag)return new gr(1,[i.fields[0]]);{const e=0|i.fields[0];return Zt(e,cr(n),{Equals:(e,t)=>e===t,GetHashCode:T})?new gr(0,[ar(n,x(e))]):new gr(1,[[o,new vr(1,[tr(n),s,"Unkown value provided for the enum"])]])}};case"System.UInt16":return e=>t=>{const n=r,o=e,s=t,i=xo(o)(s);if(1===i.tag)return new gr(1,[i.fields[0]]);{const e=i.fields[0];return Zt(e,cr(n),{Equals:(e,t)=>e===t,GetHashCode:T})?new gr(0,[ar(n,e.toString())]):new gr(1,[[o,new vr(1,[tr(n),s,"Unkown value provided for the enum"])]])}};case"System.Int32":return e=>t=>{const n=r,o=e,s=t,i=ko(o)(s);if(1===i.tag)return new gr(1,[i.fields[0]]);{const e=0|i.fields[0];return Zt(e,cr(n),{Equals:(e,t)=>e===t,GetHashCode:T})?new gr(0,[ar(n,k(e))]):new gr(1,[[o,new vr(1,[tr(n),s,"Unkown value provided for the enum"])]])}};case"System.UInt32":return e=>t=>{const n=r,o=e,s=t,i=Ao(o)(s);if(1===i.tag)return new gr(1,[i.fields[0]]);{const e=i.fields[0];return Zt(e,cr(n),{Equals:(e,t)=>e===t,GetHashCode:T})?new gr(0,[ar(n,e.toString())]):new gr(1,[[o,new vr(1,[tr(n),s,"Unkown value provided for the enum"])]])}};default:{const e=tr(r),t=Ve(Le("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the following 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=>t(e)}}else if(or(r)){if(pr(r)){const n=tt((n=>Ro(e,t,!1,n)),dr(r));return e=>t=>Array.isArray(t)?yr((e=>vt(e)),Do(0,n,e,t)):new gr(1,[[e,new vr(0,["an array",t])]])}switch(tr(ir(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return o=Ro(e,t,!0,ot(0,Vn(r))),e=>t=>{return n=G(o),r=e,null==(s=t)?new gr(0,[void 0]):yr(ne,n(r,s));var n,r,s};case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return s=Ro(e,t,!1,ot(0,Vn(r))),e=>t=>To(G(s),e,t);case"System.Collections.Generic.IEnumerable`1[System.Object]":return i=Ro(e,t,!1,ot(0,Vn(r))),e=>t=>function(e,t,n){if(Array.isArray(n)){let r=-1;return yr(Qt,nt(((n,o)=>{if(r=r+1|0,0===n.tag){const s=e(t+".["+k(r)+"]",o);return 0===s.tag?new gr(0,[qt([s.fields[0]],n.fields[0])]):new gr(1,[s.fields[0]])}return n}),new gr(0,[[]]),n))}return new gr(1,[[t,new vr(0,["a seq",n])]])}(G(i),e,t);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const n=Ro(e,t,!1,ot(0,Vn(r))),o=Ro(e,t,!1,ot(1,Vn(r)));let s;const i=xt([e=>t=>function(e,t,n,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new gr(1,[[n,new vr(0,["an object",r])]]):Jt(((o,s)=>{if(0===o.tag){const i=e(n,s);if(0===i.tag){const e=t(n+"."+s,r[s]);return 0===e.tag?new gr(0,[pt([i.fields[0],e.fields[0]],o.fields[0])]):new gr(1,[e.fields[0]])}return new gr(1,[i.fields[0]])}return o}),new gr(0,[mt()]),Object.keys(r))}(G(n),G(o),e,t),(u=Mo(G(n),G(o)),e=>t=>To(G(u),e,t))]);return s=e=>t=>{return n=e,r=t,((e,t)=>{e:for(;;){const o=e,s=t;if(wt(o))return new gr(1,[[n,new vr(7,[s])]]);{const i=yo(n,G(gt(o)),r);if(1===i.tag){e=yt(o),t=kt(s,_t(i.fields[0]));continue e}return new gr(0,[i.fields[0]])}}})(i,mt());var n,r},e=>t=>function(e,t,n,r){const o=t(n,r);return 1===o.tag?new gr(1,[o.fields[0]]):new gr(0,[e(o.fields[0])])}(Oo,G(s),e,t)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const n=Ro(e,t,!1,ot(0,Vn(r)));return e=>t=>{const r=No(G(n),e,t);return 0===r.tag?new gr(0,[(o=r.fields[0],co(s={Compare:B},io(s,o)))]):new gr(1,[r.fields[0]]);var o,s}}default:return Po(e,t,n,r)}}else switch(c){case"System.Boolean":return e=>t=>{return n=e,"boolean"==typeof(r=t)?new gr(0,[r]):new gr(1,[[n,new vr(0,["a boolean",r])]]);var n,r};case"Microsoft.FSharp.Core.Unit":return e=>t=>{return n=e,null==(r=t)?new gr(0,[void 0]):new gr(1,[[n,new vr(0,["null",r])]]);var n,r};case"System.String":return e=>t=>bo(e,t);case"System.Char":return e=>t=>function(e,t){if("string"==typeof t){const n=t;return 1===n.length?new gr(0,[n[0]]):new gr(1,[[e,new vr(0,["a single character string",t])]])}return new gr(1,[[e,new vr(0,["a char",t])]])}(e,t);case"System.SByte":return Co;case"System.Byte":return So;case"System.Int16":return Eo;case"System.UInt16":return xo;case"System.Int32":return ko;case"System.UInt32":return Ao;case"System.Double":return e=>t=>{return n=e,"number"==typeof(r=t)?new gr(0,[r]):new gr(1,[[n,new vr(0,["a float",r])]]);var n,r};case"System.Single":return e=>t=>{return n=e,"number"==typeof(r=t)?new gr(0,[r]):new gr(1,[[n,new vr(0,["a float32",r])]]);var n,r};case"System.DateTime":return e=>t=>function(e,t){if("string"==typeof t){let r,o=ge(-621355968e5,1);return r=[ve(t,new X((()=>o),(e=>{o=e}))),o],r[0]?new gr(0,[(n=r[1],1===n.kind?n:ge(n.getTime(),1))]):new gr(1,[[e,new vr(0,["a datetime",t])]])}var n;return new gr(1,[[e,new vr(0,["a datetime",t])]])}(e,t);case"System.DateTimeOffset":return e=>t=>function(e,t){if("string"==typeof t){let n,r=Or(-621355968e5,0);return n=[Dr(t,new X((()=>r),(e=>{r=e}))),r],n[0]?new gr(0,[n[1]]):new gr(1,[[e,new vr(0,["a datetimeoffset",t])]])}return new gr(1,[[e,new vr(0,["a datetime",t])]])}(e,t);case"System.TimeSpan":return e=>t=>function(e,t){if("string"==typeof t){let n,r=0;return n=[Rr(t,new X((()=>r),(e=>{r=e}))),r],n[0]?new gr(0,[n[1]]):new gr(1,[[e,new vr(0,["a timespan",t])]])}return new gr(1,[[e,new vr(0,["a timespan",t])]])}(e,t);case"System.Guid":return e=>t=>function(e,t){if("string"==typeof t){let n,r="00000000-0000-0000-0000-000000000000";return n=[Tr(t,new X((()=>r),(e=>{r=e}))),r],n[0]?new gr(0,[n[1]]):new gr(1,[[e,new vr(0,["a guid",t])]])}return new gr(1,[[e,new vr(0,["a guid",t])]])}(e,t);case"System.Object":return e=>e=>new gr(0,[e]);default:return Po(e,t,n,r)}}function $o(e,t,n){const r=oe(t,new br(0,[]));return Ro(function(e){return null!=e?Bn(((e,t)=>new X(t[1])),e.Coders):Ln({Compare:$})}(n),r,!1,e)}class Ho extends J{constructor(e,t,n){super(),this.PartnerId=e,this.AccountId=t,this.Funds=n}}class Bo extends J{constructor(e,t){super(),this.PartnerFunds=e,this.AccountFunds=t}}class Lo extends J{constructor(e,t){super(),this.DefaultFundUSI=e,this.FeatureSet=t}}class jo extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Basic","Promoted"]}}function Go(){return function(e,t,n,r){const o=new Gn("SuperSelection.AdminUI.Dto.FeatureSet",[],n,void 0,void 0,(()=>{const e=n.prototype.cases();return[[],[]].map(((t,n)=>new jn(o,n,e[n],t)))}));return o}(0,0,jo)}class Vo extends J{constructor(e,t){super(),this.Partner=e,this.Account=t}}class Wo extends J{constructor(e,t){super(),this.PartnerId=e,this.Name=t}}class zo extends J{constructor(e,t){super(),this.AccountId=e,this.Name=t}}class qo extends J{constructor(e,t,n,r){super(),this.Id=e,this.PartnerId=t,this.Enabled=n,this.Editor=r}}class Zo extends Z{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["AccessRole"]}}function Jo(e){return new Zo(e)}function Xo(e){return Nt(new Zo("SuperSelection.Access"),e,{Equals:P,GetHashCode:O})?ne(void 0):void 0}function Yo(e){return Nt(new Zo("SuperSelection.EditPanel"),e,{Equals:P,GetHashCode:O})?ne(void 0):void 0}class Ko extends J{constructor(e,t){super(),this.UserName=e,this.Roles=t}}function Qo(e){let t;const n=Xe(null==e?"":e,["."],void 0,0);if(rt(((e,t)=>e===t),n,null)||3!==n.length)t=new gr(1,["Failed to identify the user"]);else{let e;const o=ot(1,n);e=atob(o),t=vo(G($o(Zn(["Name",Kn],["Roles",(r=Kn,new Gn("[]",[r]))]),new br(1,[]),void 0)),e)}var r;if(1===t.tag)return new Ko(void 0,mt());{const e=t.fields[0];return new Ko(e.Name,At(Jo,xt(e.Roles)))}}class es extends J{constructor(e,t){super(),this.PromotedFunds=e,this.Configuration=t}}class ts extends Z{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["PartnerId"]}}class ns extends Z{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["AccountId"]}}const rs=h.default,os=(e,t)=>{(0,h.useEffect)((()=>{const t=e();return()=>{t.Dispose()}}),t)},ss=e=>{(0,h.useLayoutEffect)((()=>{const t=e();return()=>{t.Dispose()}}))};function is(e){return{Dispose(){e()}}}function us(e){const t=rs.useRef(!1);!function(e,t){os((t=>(e(),is((()=>{})))),[])}((()=>{t.current||(t.current=!0,e())}))}function cs(e){const t=rs.useRef(void 0),n=rs.useRef(!1),r=rs.useRef(!1);n.current&&(r.current=!0),function(e,t){os(e,t)}((()=>{let o;return n.current?o=void 0:(n.current=!0,t.current=ne(e()),o=r.current?t.current:void 0),{Dispose(){Xt((e=>{w(e)}),re(o))}}}),[])}function as(e){return rs.useRef(e)}function ls(e){const t=as(e),n=function(e,n){const r=oe([],[]);return rs.useCallback((e=>t.current(e)),r)}();var r;return r=()=>{t.current=e},ss((e=>(r(),is((()=>{}))))),n}class fs{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 t=this._id;return this._listeners.set(this._id++,e),t}removeListener(e){return this._listeners.delete(e)}register(e,t){const n=this,r=this.addListener(null==t?e:()=>e(t));return{Dispose(){n.removeListener(r)}}}Dispose(){}}class ds extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,ds.prototype)}}class hs{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>hs.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function ms(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new ds);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack((()=>{try{e(t)}catch(e){t.onError(K(e))}}));else try{e(t)}catch(e){t.onError(K(e))}}}const ps=new class{Bind(e,t){return function(e,t){return ms((n=>{e({onSuccess:e=>{try{t(e)(n)}catch(e){n.onError(K(e))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})}))}(e,t)}Combine(e,t){return this.Bind(e,(()=>t))}Delay(e){return ms((t=>e()(t)))}For(e,t){const n=e[Symbol.iterator]();let r=n.next();return this.While((()=>!r.done),this.Delay((()=>{const e=t(r.value);return r=n.next(),e})))}Return(e){return function(e){return ms((t=>t.onSuccess(e)))}(e)}ReturnFrom(e){return e}TryFinally(e,t){return ms((n=>{e({onSuccess:e=>{t(),n.onSuccess(e)},onError:e=>{t(),n.onError(e)},onCancel:e=>{t(),n.onCancel(e)},cancelToken:n.cancelToken,trampoline:n.trampoline})}))}TryWith(e,t){return ms((n=>{e({onSuccess:n.onSuccess,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline,onError:e=>{try{t(e)(n)}catch(e){n.onError(K(e))}}})}))}Using(e,t){return this.TryFinally(t(e),(()=>e.Dispose()))}While(e,t){return e()?this.Bind(t,(()=>this.While(e,t))):this.Return(void 0)}Zero(){return ms((e=>e.onSuccess(void 0)))}};function _s(e){}const ws=new fs;function gs(e,t){return function(e,t){return function(e,t,n,r,o){"function"!=typeof t&&(o=t,t=void 0);const s=new hs;e({onSuccess:t||_s,onError:n||_s,onCancel:r||_s,cancelToken:o||ws,trampoline:s})}(e,t)}(e,t)}class ys extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function vs(e,t){const n=as(function(e){const t=new fs(!1);return t}());return cs((()=>is((()=>{n.current.cancel()})))),ls((r=>{var o;null!=(o=n.current)&&o.isCancelled||gs(ps.Delay((()=>ps.TryWith(ps.Delay((()=>(t(new ys(1,[])),ps.Bind(e(r),(e=>(t(new ys(2,[e])),ps.Zero())))))),(e=>(t(new ys(3,[e])),ps.Zero()))))),n.current)}))}class bs extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class Cs extends Z{constructor(e,t){super(),this.tag=0,this.fields=[e,t]}cases(){return["Header"]}}class Ss extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Empty","Text","Binary","Form"]}}class Es extends J{constructor(e,t,n,r,o,s,i,u){super(),this.url=e,this.method=t,this.headers=n,this.withCredentials=r,this.overridenMimeType=o,this.overridenResponseType=s,this.timeout=i,this.content=u}}class xs extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class ks extends J{constructor(e,t,n,r,o,s){super(),this.statusCode=0|e,this.responseText=t,this.responseType=n,this.responseUrl=r,this.responseHeaders=o,this.content=s}}const As=new Es("",new bs(0,[]),mt(),!1,void 0,void 0,void 0,new Ss(0,[]));function Is(e,t){return"string"!=typeof(n=t)||0===n.length?new Array(0):Xe(t,[e],void 0,0);var n}function Ts(e){return new Es(e,As.method,As.headers,As.withCredentials,As.overridenMimeType,As.overridenResponseType,As.timeout,As.content)}function Ns(e,t){return new Es(t.url,e,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function Fs(e,t){return new Es(t.url,t.method,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,e)}function Ms(e){return t=t=>{const n=new XMLHttpRequest;n.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),n.onreadystatechange=()=>{let e,r,o,s,i,u,c;var a,l;4===n.readyState&&t[0]((r=n.responseType,e=""===r||"text"===r?n.responseText:"",o=0|n.status,s=n.responseType,u=n.responseType,i=""===u||"text"===u?new xs(0,[n.responseText]):new xs("arraybuffer"===u?2:"blob"===u?1:3,[n.response]),a=function(e,t,n){const r=[];for(let n=0;n<=t.length-1;n++){const o=e(ot(n,t));if(null!=o){const e=ee(o);r.push(e)}}return P(n,null)?r:tt((e=>e),r,n)}((e=>{const t=xt(Is(":",e));return wt(t)?void 0:[gt(t).toLocaleLowerCase(),qe(":",yt(t)).trim()]}),Is("\r\n",n.getAllResponseHeaders())),c=Mn(l={Compare:$},xn(l,a)),new ks(o,e,s,n.responseURL,c,i)))};const r=v(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n.setRequestHeader(e.fields[0],e.fields[1])}}finally{w(r)}n.withCredentials=e.withCredentials;const o=e.overridenMimeType;if(null==o);else{const e=o;n.overrideMimeType(e)}const s=e.overridenResponseType;if(null==s);else switch(s.tag){case 1:n.responseType="blob";break;case 2:n.responseType="arraybuffer";break;default:n.responseType="text"}const i=e.timeout;if(null==i);else{const e=0|i;n.timeout=0|e}const u=e.content;switch(u.tag){case 1:case 3:case 2:n.send(ne(u.fields[0]));break;default:n.send()}},ms((e=>t([e.onSuccess,e.onError,e.onCancel])));var t}function Os(e){return e}new ks(0,"","","",Ln({Compare:$}),new xs(0,[""]));const Ds=null;function Us(e){return Array.from(e)}function Ps(e){return we(e,"O")}function Rs(e){return function(e,t="c",n){if(-1===["c","g","G"].indexOf(t))throw new Error("Custom formats are not supported");const r=Math.abs(function(e){return Ur(e/864e5)}(e)),o=Math.abs(function(e){return Ur(e%864e5/36e5)}(e)),s=Math.abs(function(e){return Ur(e%36e5/6e4)}(e)),i=Math.abs(function(e){return Ur(e%6e4/1e3)}(e)),u=Math.abs(function(e){return Ur(e%1e3)}(e));return`${e<0?"-":""}${0!==r||"c"!==t&&"g"!==t?"c"===t?r+".":r+":":""}${"g"===t?o:S(o,2)}:${S(s,2)}:${S(i,2)}${0!==u||"c"!==t&&"g"!==t?"g"===t?"."+S(u,3):"."+function(e,t,n){return e.toString(10).padStart(3,"0").padEnd(7,"0")}(u):""}`}(e)}function $s(){return null}function Hs(e){return we(e,"O")}function Bs(e,t){return JSON.stringify(t,void 0,ne(e))}function Ls(e,t,n,r){let o;const s=new X(null);let i;const u=tr(r);let c;if(i=""===u?e:Rn(u,s,e),mr(r)){const e=tt((e=>{const r=xr(t,er(e)),o=js(i,t,n,e[1]);return t=>s=>{const i=t[e[0]];return(!n||n&&null!=i)&&(s[r]=o(i)),s}}),fr(r));c=t=>Jt(((e,n)=>n(t)(e)),{},e)}else{if(!hr(r))throw new Error((o=tr(r),Ge(Le("Cannot generate auto encoder for %s. Please pass an extra encoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(o)));c=e=>{const o=function(e,t){const n=lr(t)[e.tag];if(null==n)throw new Error(`Cannot find case ${e.name} in union type`);return[n,e.fields]}(e,r),s=o[0],u=o[1],c=0|u.length;if(0===c)return er(s);{const e=0|c,r=_r(s),o=et(new Array(e+1),0,e+1,null);st(o,0,er(s));for(let s=1;s<=e;s++)st(o,s,js(i,t,n,ot(s-1,r)[1])(ot(s-1,u)));return o}}}return s.contents=c,c}function js(e,t,n,r){const o=tr(r),s=Hn(o,e);if(null!=s){const e=s;return t=>e.contents(t)}if(nr(r)){const o=js(e,t,n,rr(r));return e=>Us(Yt(o,e))}if(sr(r))switch(tr(ur(r))){case"System.SByte":return e=>e;case"System.Byte":return e=>e;case"System.Int16":return e=>e;case"System.UInt16":return e=>e;case"System.Int32":return e=>e;case"System.UInt32":return e=>e;default:{const e=tr(r);return Ve(Le("Cannot generate auto encoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\n\nIf you can't use one of these types, please pass an extra encoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders\n "))(e)}}else{if(or(r)){if(pr(r)){const o=tt((r=>js(e,t,n,r)),dr(r));return e=>Us(Kt(((e,t)=>ot(e,o)(t)),e))}{const o=tr(ir(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===o){const o=new C((()=>{return o=js(e,t,n,ot(0,Vn(r))),e=>{return n=()=>Ds,null!=(t=se(o,e))?ee(t):n();var t,n};var o}));return e=>null==e?Ds:o.Value(e)}if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===o||"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===o||"System.Collections.Generic.IEnumerable`1[System.Object]"===o){const o=js(e,t,n,ot(0,Vn(r)));return e=>Us(Yt(o,e))}if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===o){const o=ot(0,Vn(r)),s=js(e,t,n,ot(1,Vn(r)));if("System.String"===tr(o)||"System.Guid"===tr(o))return e=>Jt(((e,t)=>{const n=t;return e[n[0]]=s(n[1]),e}),{},e);{let r;const i=js(e,t,n,o);return r=i,e=>Us(Yt((e=>{const t=e;return[r(t[0]),s(t[1])]}),e))}}return Ls(e,t,n,r)}}switch(o){case"System.Boolean":return e=>e;case"Microsoft.FSharp.Core.Unit":return $s;case"System.String":return e=>e;case"System.Char":return e=>e;case"System.SByte":return e=>e;case"System.Byte":return e=>e;case"System.Int16":return e=>e;case"System.UInt16":return e=>e;case"System.Int32":return e=>e;case"System.UInt32":return e=>e;case"System.Double":return e=>e;case"System.Single":return e=>e;case"System.DateTime":return Hs;case"System.DateTimeOffset":return Ps;case"System.TimeSpan":return Rs;case"System.Guid":return Os;case"System.Object":return e=>e;default:return Ls(e,t,n,r)}}}function Gs(e,t,n,r){const o=oe(t,new br(0,[])),s=oe(r,!0);return js(function(e){return null!=e?Bn(((e,t)=>new X(t[0])),e.Coders):Ln({Compare:$})}(n),o,s,e)}function Vs(e){return`${e}/super-selection/admin`}function Ws(e,t){return ps.Delay((()=>{const n=(r=function(e){return new Cs("Authorization",e)}(Ge(Le("Bearer %s"))(e)),new Es((o=t).url,o.method,kt(o.headers,_t(r)),o.withCredentials,o.overridenMimeType,o.overridenResponseType,o.timeout,o.content));var r,o;let s;const i=Ms(n);return s=ps.Bind(i,(e=>ps.Return(new gr(0,[e])))),ps.Bind(s,(e=>{const t=e;if(1===t.tag)return ps.Return(new gr(1,[t.fields[0]]));{const e=t.fields[0];if(429===e.statusCode||e.statusCode>=500){const e=Ms(n);return ps.Bind(e,(e=>ps.Return(new gr(0,[e]))))}return ps.Return(new gr(0,[e]))}}))}))}function zs(e,t){return ps.Delay((()=>{const n=Ws(t,Ns(new bs(0,[]),Ts(`${Vs(e)}/promoted-funds`)));return ps.Bind(n,(e=>{const t=e;if(1===t.tag)return ps.Return(new gr(1,[t.fields[0]]));{const e=t.fields[0];switch(0|e.statusCode){case 200:{const t=vo(G($o(Xn(qn("SuperSelection.AdminUI.Dto.PromotedFundOverride",[],Ho,(()=>[["PartnerId",Kn],["AccountId",Jn(Kn)],["Funds",Xn(Kn)]]))),new br(1,[]),void 0)),e.responseText);return ps.Return(t)}case 401:return ps.Return(new gr(1,["You do not have the appropriate permissions to view this information"]));default:return ps.Return(new gr(1,["Unexpected response from backend"]))}}}))}))}function qs(e,t,n,r){return ps.Delay((()=>{let o;const s=Ws(t,Ns(new bs(0,[]),Ts((null==r?e=>`${e}/promoted-funds/${n}`:(o=r,e=>`${e}/promoted-funds/${n}/${o}`))(Vs(e)))));return ps.Bind(s,(e=>{const t=e;if(1===t.tag)return ps.Return(new gr(1,[t.fields[0]]));{const e=t.fields[0];if(200===e.statusCode){const t=vo(G($o(qn("SuperSelection.AdminUI.Dto.PromotedFunds",[],Bo,(()=>[["PartnerFunds",Xn(Kn)],["AccountFunds",Xn(Kn)]])),new br(1,[]),void 0)),e.responseText);return ps.Return(t)}return ps.Return(new gr(1,["Unexpected response from backend"]))}}))}))}function Zs(e,t,n,r){return ps.Delay((()=>{let o;const s=Ws(t,Ns(new bs(4,[]),Ts((null==r?e=>`${e}/promoted-funds/${n}`:(o=r,e=>`${e}/promoted-funds/${n}/${o}`))(Vs(e)))));return ps.Bind(s,(e=>{const t=e;if(1===t.tag)return ps.Return(new gr(1,[t.fields[0]]));{const e=t.fields[0];return 200===e.statusCode?ps.Return(new gr(0,[void 0])):ps.Return(new gr(1,[e.responseText]))}}))}))}function Js(e,t,n){St((n=>{try{n(t)}catch(t){e(t)}}),n)}function Xs(){return mt()}function Ys(e){return _t(e)}class Ks extends Z{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["ColumnHeader"]}}function Qs(e){return e.fields[0]}class ei extends Z{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["RowCell"]}}function ti(e){return new ei(e)}function ni(e){return e.fields[0]}function ri(e){return t=(0,h.createElement)("th",L(xt([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],["scope","col"],["children",e]]))),new Ks(t);var t}function oi(e,t){let n;return ti((0,h.createElement)("td",L(xt([["className","px-6 py-4 whitespace-nowrap text-sm"],(n=[(0,h.createElement)("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})],["children",rs.Children.toArray(Array.from(n))])]))))}function si(e,t){return ti((0,h.createElement)("td",{className:qe(" ",qt(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:t}))}function ii(e,t){return t.startsWith(e)?t:void 0}function ui(e,t){return t.endsWith(e)?t:void 0}function ci(e,t){return function(e){return 1===e?e=>{let t,n,r,o,s,i;return t=ii("/",e),null!=t?(n=t,"#"+n):(r=ii("#/",e),null!=r?(o=r,o):(s=ii("#",e),null!=s?(i=s,"#/"+Ye(i,1,i.length-1)):"#/"+e))}:e=>{let t,n;return t=ii("/",e),null!=t?(n=t,n):"/"+e}}(t)(qe("/",At((e=>e.indexOf("?")>=0||e.startsWith("#")||e.startsWith("/")?e:encodeURIComponent(e)),e)))}!function(e,t,n,r){rs.memo(e,G(oe(se(V,n),null)));Xt((t=>{e.displayName=t}),re(t))}((e=>{const t=ls((t=>{const n=oe(e.onUrlChanged,(e=>{}));!function(e,t,n){var r,o;t((r=2===e?window.location.pathname+window.location.search:window.location.hash,o=e,function(e,t){let n,r;const o=at();let s=o,i=t;for(;!ft(i);){let t=e(dt(i));for(;!ft(t);)n=s,r=new ut(dt(t),void 0),n.tail=r,s=r,t=ht(t);i=ht(i)}const u=s,c=at();return u.tail=c,ht(o)}((e=>{if("string"!=typeof(t=e)||/^\s*$/.test(t))return mt();{const t=function(e,...t){return 0===t.length?e.trimEnd():e.replace(new RegExp("["+Pe(t.join(""))+"]+$"),"")}(e,"#");if("?"===t)return mt();if(null!=ii("?",t))return _t(t);{const e=t.split("?");if(rt(((e,t)=>e===t),e,null)||1!==e.length){if(rt(((e,t)=>e===t),e,null)||2!==e.length)return mt();if(""===ot(1,e)){const t=ot(0,e);return _t(decodeURIComponent(t))}{const t=ot(0,e),n=ot(1,e);return xt([decodeURIComponent(t),"?"+n])}}{const t=ot(0,e);return _t(decodeURIComponent(t))}}}var t}),xt(Xe(null!=ii("#",r)?Ye(r,1,r.length-1):1!==o||null==ui("#",r)&&null==ui("#/",r)?r:"",["/"],void 0,0)))))}(oe(e.hashMode,1),n)}));cs((()=>(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.addEventListener("hashchange",t):window.addEventListener("popstate",t),window.addEventListener("CUSTOM_NAVIGATION_EVENT",t),is((()=>{window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.removeEventListener("hashchange",t):window.removeEventListener("popstate",t),window.removeEventListener("CUSTOM_NAVIGATION_EVENT",t)}))))),us((()=>{const e=document.createEvent("CustomEvent");e.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(e)}));const n=e.application;return null==n?null:n}),void 0,te(void 0),te(void 0));const ai={None:0,LowerFirst:1,SnakeCase:2,SnakeCaseAllCaps:3,KebabCase:4};function li(e,t){return e.replace(/[a-z]?[A-Z]/g,(e=>1===e.length?e.toLowerCase():e.charAt(0)+t+e.charAt(1).toLowerCase()))}function fi(e,t=ai.None){const n={},r=t;function o(e){throw new Error("Cannot infer key and value of "+String(e))}function s(e,t,r){e=function(e,t){switch(t){case ai.LowerFirst:return e.charAt(0).toLowerCase()+e.slice(1);case ai.SnakeCase:return li(e,"_");case ai.SnakeCaseAllCaps:return li(e,"_").toUpperCase();case ai.KebabCase:return li(e,"-");case ai.None:default:return e}}(e,t),n[e]=r}for(let t of e){let e=ai.None;if(null==t&&o(t),t instanceof Z){const n=t.cases()[t.tag];t=0===t.fields.length?n:[n].concat(t.fields),e=r}if(Array.isArray(t))switch(t.length){case 0:o(t);break;case 1:s(t[0],e,!0);break;case 2:const n=t[1];s(t[0],e,n);break;default:s(t[0],e,t.slice(1))}else"string"==typeof t?s(t,e,!0):o(t)}return n}const di=h.forwardRef((function(e,t){return h.createElement("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:t},e),h.createElement("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"}))})),hi=h.forwardRef((function(e,t){return h.createElement("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:t},e),h.createElement("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 mi extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Pencil","Trash"]}}class pi extends Z{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["ClassName"]}}function _i(e,t){if(1===e.tag){const e=fi(t,1);return h.createElement(di,e)}{const e=fi(t,1);return h.createElement(hi,e)}}class wi extends J{constructor(e,t){super(),this.Text=e,this.Action=t}}class gi extends J{constructor(e,t){super(),this.Text=e,this.Action=t}}class yi extends J{constructor(e,t){super(),this.Text=e,this.Action=t}}function vi(e,t){return new wi(e.Text,V(e.Action)(t))}function bi(e,t,n){let r;return(0,h.createElement)("button",L(xt([["className",qe(" ",["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-${t}-600`,`hover:bg-${t}-700`,`focus:ring-${t}-500`])],["type","button"],["onClick",n],(r=[_i(e,_t(new pi("mr-3 flex-shrink-0 h-4 w-6")))],["children",rs.Children.toArray(Array.from(r))])])))}const Ci=e=>bi(new mi(0,[]),"indigo",e),Si=e=>bi(new mi(1,[]),"red",e);function Ei(e,t){return(0,h.createElement)("button",{className:qe(" ",["w-full","inline-flex","justify-center","rounded-md","border","border-transparent","shadow-sm","px-4","py-2","text-base","font-medium","text-white","focus:outline-none","focus:ring-2","focus:ring-offset-2","sm:ml-3","sm:w-auto","sm:text-sm",`focus:ring-${e}-500`,`bg-${e}-600`,`hover:bg-${e}-700`]),type:"button",children:t.Text,onClick:t.Action})}function xi(e){return(0,h.createElement)("button",{className:qe(" ",["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:e.Text,onClick:e.Action})}function ki(e){return["strokeLinecap",e]}function Ai(e){return["strokeLinejoin",e]}const Ii=(0,h.createElement)("div",L(xt([["className",qe(" ",["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,t;const n=[(0,h.createElement)("svg",L(xt([["className",qe(" ",["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=_t((0,h.createElement)("path",L(xt([ki("round"),Ai("round"),(t="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",["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",rs.Children.toArray(Array.from(e))])])))];return["children",rs.Children.toArray(Array.from(n))]})()]))),Ti=(0,h.createElement)("div",L(xt([["className",qe(" ",["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 t=[(0,h.createElement)("svg",L(xt([["className",qe(" ",["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=_t((0,h.createElement)("path",L(xt([ki("round"),Ai("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",rs.Children.toArray(Array.from(e))])])))];return["children",rs.Children.toArray(Array.from(t))]})()])));function Ni(e,t){let n;return(0,h.createElement)("div",L(xt([["className",qe(" ",["bg-gray-50","px-4","py-3","sm:px-6","sm:flex","sm:flex-row-reverse"])],(n=[Ei("red",e),xi(t)],["children",rs.Children.toArray(Array.from(n))])])))}function Fi(e){let t;return(0,h.createElement)("div",L(xt([["className","mt-2"],(t=[(0,h.createElement)("p",{className:qe(" ",["text-sm","text-gray-500"]),children:e})],["children",rs.Children.toArray(Array.from(t))])])))}function Mi(e,t,n,r){let o,s,i,u;return(0,h.createElement)("div",L(xt([["className",qe(" ",["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=[(0,h.createElement)("div",L(xt([["className",qe(" ",["bg-white","px-4","pt-5","pb-4","sm:p-6","sm:pb-4"])],(s=[(0,h.createElement)("div",L(xt([["className",qe(" ",["sm:flex","sm:items-start"])],(i=[Ii,(0,h.createElement)("div",L(xt([["className",qe(" ",["mt-3","text-center","sm:mt-0","sm:ml-4","sm:text-left"])],(u=[(c=e,(0,h.createElement)("h3",{className:qe(" ",["text-lg","leading-6","font-medium","text-gray-900"]),id:"modal-title",children:c})),Fi(t)],["children",rs.Children.toArray(Array.from(u))])])))],["children",rs.Children.toArray(Array.from(i))])])))],["children",rs.Children.toArray(Array.from(s))])]))),Ni(n,r)],["children",rs.Children.toArray(Array.from(o))])])));var c}function Oi(e){let t,n,r;return(0,h.createElement)("div",L(xt([["className",qe(" ",["relative","z-10"])],["role",qe(" ",["dialog"])],(t=[(0,h.createElement)("div",{className:qe(" ",["fixed","inset-0","bg-gray-500","bg-opacity-75","transition-opacity"])}),(0,h.createElement)("div",L(xt([["className",qe(" ",["fixed","z-10","inset-0","overflow-y-auto"])],(n=[(0,h.createElement)("div",L(xt([["className",qe(" ",["flex","min-h-full","items-end","justify-center","p-4","text-center","sm:items-center","sm:p-0"])],(r=[(0,h.createElement)("span",{className:qe(" ",["hidden","sm:inline-block","sm:align-middle","sm:h-screen"]),children:"​"}),Mi(e.HeadingText,e.BodyText,e.ConfirmAction,e.CancelAction)],["children",rs.Children.toArray(Array.from(r))])])))],["children",rs.Children.toArray(Array.from(n))])])))],["children",rs.Children.toArray(Array.from(t))])])))}function Di(e){return qe("/",e)}function Ui(e,t,n){try{w(n)}catch(n){e(["Error stopping subscription: "+Di(t),n])}}function Pi(e,t){St((t=>{Ui(e,t[0],t[1])}),t)}function Ri(e,t,n,r,o,s){return St((t=>{!function(e,t){const n=new Error("Duplicate SubId");e(["Duplicate SubId: "+Di(t),n])}(e,t)}),n),St((t=>{Ui(e,t[0],t[1])}),r),kt(o,function(n,r){const o=at(),s=bt(((n,r)=>{const o=function(e,t,n,r){try{return[n,r(t)]}catch(t){return void e(["Error starting subscription: "+Di(n),t])}}(e,t,(s=r)[0],s[1]);var s;if(null==o)return n;{const e=new ut(ee(o),void 0);return n.tail=e,e}}),o,r),i=at();return s.tail=i,ht(o)}(0,s))}function $i(e){return t=(e,t)=>{return n=e[0],r=e[1],o=t[0],s=t[1],i=t[2],po(n,s)?[pt(n,o),s,i]:[o,_o(n,s),pt([n,r],i)];var n,r,o,s,i},n=e,r=[mt(),(o={Compare:B},fo(o)),mt()],it(t,vt(n),r);var t,n,r,o}const Hi=mt();function Bi(e,t){const n=co(r={Compare:B},io(r,At((e=>e[0]),e)));var r;const o=$i(t),s=o[1],i=o[0];if(n.Equals(s))return[i,mt(),e,mt()];{const t=function(e,t){const n=at(),r=at(),o=n,i=bt(((e,t)=>{let n,r;const o=e[0],i=e[1];return(e=>po(e[0],s))(t)?[(n=new ut(t,void 0),o.tail=n,n),i]:[o,(r=new ut(t,void 0),i.tail=r,r)]}),[o,r],t),u=at();i[0].tail=u;const c=at();return i[1].tail=c,[ht(o),ht(r)]}(0,e);return[i,t[1],t[0],Tt((e=>!po(e[0],n)),o[2])]}}function Li(e,t){return e>t?e:t}function ji(e,t,n,r,o){const s=function(e,t,n,r){const o=0|B(e,n);if(0===o)throw new Error("The step of a range cannot be zero");const s=o>0;return n=>{const o=0|B(n,t);return s&&o<=0||!s&&o>=0?[n,r(n,e)]:void 0}}(t,n,r,o);return jt((()=>{return t=s,n=e,Bt((()=>function(e,t){let n,r=t;return $t((()=>{if(null!=n){const e=ee(n)[0];return ee(n)[1],e}return Dt()}),(()=>{if(n=e(r),null!=n){ee(n)[0];const e=ee(n)[1];return r=e,!0}return!1}),(()=>{}))}(t,n)));var t,n}))}class Gi extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Writable","ReadWritable"]}}class Vi{constructor(e){this.state=new Gi(0,[et(new Array(Li(e,10)),0,Li(e,10),null),0])}}function Wi(e){const t=e.state;if(1===t.tag){const n=0|t.fields[1],r=0|t.fields[2],o=t.fields[0],s=(r+1)%o.length|0;return e.state=s===n?new Gi(0,[o,n]):new Gi(1,[o,n,s]),ne(ot(r,o))}}class zi extends J{constructor(e,t,n,r,o,s,i){super(),this.init=e,this.update=t,this.subscribe=n,this.view=r,this.setState=o,this.onError=s,this.termination=i}}function qi(e,t,n){return new zi(e,t,(e=>mt()),n,G((e=>{const t=V(n)(e);return e=>{t(e)}})),(e=>{var t,n;t=e[0],n=e[1],console.error(ne(t),n)}),[e=>!1,e=>{}])}function Zi(e,t,n){let r;const o=n.init(t),s=o[0],i=n.subscribe(s),u=n.termination,c=new Vi(10);let a=!1,l=s,f=Hi,d=!1;const h=V(e)((e=>{d||(function(e,t){const n=e.state;if(1===n.tag){const s=0|n.fields[1],i=0|n.fields[2],u=n.fields[0];st(u,s,t);const c=(s+1)%u.length|0;e.state=new Gi(1,c===i?[(r=i,o=u,Array.from(jt((()=>qt(en(r,o),jt((()=>{return qt((e=r,t=o,zt((()=>Lt(t)),((t,n)=>{if(t<e){if(n["System.Collections.IEnumerator.MoveNext"]())return ne(n["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(Ot+"\\nParameter name: source")}}),(e=>{w(e)}))),jt((()=>{return t=e=>Vt(null),e=o.length,n=ji(0,1,e,0,((e,t)=>e+t)),jt((()=>Gt(Yt(t,n))));var e,t,n})));var e,t}))))))),u.length,0]:[u,c,i])}else{const r=0|n.fields[1],o=n.fields[0];st(o,r,t);const s=(r+1)%o.length|0;e.state=new Gi(1,[o,s,r])}var r,o}(c,e),a||(a=!0,m(),a=!1))})),m=()=>{let e,t=Wi(c);for(;!d&&null!=t;){const r=ee(t);if(u[0](r))Pi(n.onError,f),u[1](l),d=!0;else{const o=n.update(r,l),s=o[0],i=n.subscribe(s);n.setState(s,h),Js((e=>{n.onError([Ge(Le("Error handling the message: %A"))(r),e])}),h,o[1]),l=s,e=Bi(f,i),f=Ri(n.onError,h,e[0],e[1],e[2],e[3]),t=Wi(c)}}};a=!0,n.setState(s,h),Js((e=>{n.onError([Ge(Le("Error intitializing:")),e])}),h,o[1]),r=Bi(f,i),f=Ri(n.onError,h,r[0],r[1],r[2],r[3]),m(),a=!1}var Ji=n(888);class Xi{constructor(e,t,n){this.arg=t,this.dependencies=n;const r=e(),o=[];let s;this.finalDispatch=void 0;const i=function(e){return e.init}(r)(this.arg);let u=i[0],c=i[1];s=[[u,e=>{const t=this.finalDispatch;null==t?o.push(e):t(e)},!1,o],c],this.state=s[0],this.cmd=s[1],this.subscribe=e=>{let t=!1;const n=_(this.state[0]);return function(e,t){Zi(G((e=>e)),e,t)}(this.arg,function(e,t){return new zi(t.init,t.update,t.subscribe,t.view,e,t.onError,t.termination)}(((t,n)=>{const r=this.state;this.finalDispatch=n,this.state=[t,r[1],!0,o],t!==r[0]&&e()}),function(e,r,o,s,i,u,c){const a=V(e)(c.init),l=z(r)(V(c.update)),f=z(o)(V(c.view)),d=z(s)(V(c.setState));return new zi(a,G(l),V(i)(c.subscribe),G(f),G(d),c.onError,(h=c.termination,[e=>!!h[0](e)||n&&t,e=>{const t=e;_(t)?w(t):h[1](e)}]));var h}(((e,t)=>{const n=this.cmd;return this.cmd=Xs(),[this.state[0],n]}),((e,t,n)=>e(t)(this.state[0])),W((e=>e)),W((e=>e)),G((e=>e)),0,r))),()=>{t=!0}}}}function Yi(e,t,n){return new Xi(e,t,n)}function Ki(e,t,n){const r=(0,h.useState)((()=>Yi(e,t,n))),o=r[0];var s,i,u;i=t,u=n,P((s=o).arg,i)&&P(s.dependencies,u)||r[1](Yi(e,t,n));const c=(0,Ji.useSyncExternalStore)(function(e){return e.subscribe}(o),(()=>function(e){return e.state}(o))),a=c[2],l=c[3],f=c[1];return(0,h.useEffect)((()=>{if(a&&l.length>0){let t=v(l);try{for(;t["System.Collections.IEnumerator.MoveNext"]();){const e=t["System.Collections.Generic.IEnumerator`1.get_Current"]();setTimeout((()=>{f(e)}))}}finally{w(t)}m(e=l)?e.splice(0):e.clear()}var e}),[a,l]),[c[0],f]}function Qi(){const e=_t((0,h.createElement)("span",{children:["Please wait..."]}));return(0,h.createElement)("div",{children:rs.Children.toArray(Array.from(e))})}function eu(e){const t=e.error,n=_t((0,h.createElement)("span",{children:[t]}));return(0,h.createElement)("div",{children:rs.Children.toArray(Array.from(n))})}class tu extends J{constructor(e,t){super(),this.PartnerId=e,this.AccountId=t}}class nu extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["LoadData","LoadDetail","ShowResetModal","CloseModal","ResetPromotedFunds","Reload"]}}class ru extends J{constructor(e,t,n,r){super(),this.PromotedFundOverrides=e,this.FundLookup=t,this.User=n,this.ModalState=r}}class ou extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["ShowModal","Hidden"]}}function su(e,t,n){if(null==t);else{const r=t;gs(function(e,t,n,r){const o=[t,n];return ps.Delay((()=>{let t;const n=o[1];return t=null==n?void 0:n.fields[0],ps.Bind((s=e.backendUrl,i=e.accessToken,u=o[0].fields[0],c=t,ps.Delay((()=>{let e;const t=Ws(i,Ns(new bs(0,[]),Ts((null==c?e=>`${e}/account-registry/${u}`:(e=c,t=>`${t}/account-registry/${u}/${e}`))(Vs(s)))));return ps.Bind(t,(e=>{const t=e;if(1===t.tag)return ps.Return(new gr(1,[t.fields[0]]));{const e=t.fields[0];if(200===e.statusCode){const t=vo(G($o(qn("SuperSelection.AdminUI.Dto.PromotedFundDetail",[],Vo,(()=>[["Partner",qn("SuperSelection.AdminUI.Dto.PartnerDetail",[],Wo,(()=>[["PartnerId",Kn],["Name",Kn]]))],["Account",Jn(qn("SuperSelection.AdminUI.Dto.AccountDetail",[],zo,(()=>[["AccountId",Kn],["Name",Kn]])))]])),new br(1,[]),void 0)),e.responseText);return ps.Return(t)}return ps.Return(new gr(1,["Unexpected response from backend"]))}}))}))),(e=>(r(new nu(1,[o,new ys(2,[e])])),ps.Zero())));var s,i,u,c}))}(e,r[0],r[1],n))}}function iu(e){const t=(n=(e,t)=>P(t,new ys(0,[]))?ne(e):void 0,Cn(n,e.tree));var n;if(null==t)return[e,void 0];{const n=ee(t);return[$n(n,(e=>{let t;return null==e?void 0:(t=e,new ys(1,[]))}),e),ne(n)]}}function uu(e){let t;return[[new ts(e.PartnerId),(t=e.AccountId,null==t?void 0:new ns(t))],new ys(0,[])]}function cu(e,t,n){let r,o,s,i,u,c,a;switch(t.tag){case 1:r=2,i=t.fields[1],u=t.fields[0];break;case 2:r=3,c=t.fields[0];break;case 3:r=4;break;case 4:r=5,a=t.fields[0];break;case 5:r=6;break;default:2===t.fields[0].tag&&0===t.fields[0].fields[0].tag?(r=0,o=t.fields[0].fields[0].fields[0]):(r=1,s=t.fields[0])}switch(r){case 0:return function(e,t,n){const r=iu(Mn(o={Compare:H},xn(o,At(uu,n))));var o;return[new ru(new ys(2,[new gr(0,[n])]),r[0],t.User,t.ModalState),Ys((t=>{su(e,r[1],t)}))]}(e,n,o);case 1:return[new ru(s,n.FundLookup,n.User,n.ModalState),Xs()];case 2:return function(e,t,n,r,o){const s=iu($n([n,r],(e=>null!=e?o:void 0),t.FundLookup));return[new ru(t.PromotedFundOverrides,s[0],t.User,t.ModalState),Ys((t=>{su(e,s[1],t)}))]}(e,n,u[0],u[1],i);case 3:return[new ru(n.PromotedFundOverrides,n.FundLookup,n.User,new ou(0,[c])),Xs()];case 4:return[new ru(n.PromotedFundOverrides,n.FundLookup,n.User,new ou(1,[])),Xs()];case 5:return[new ru(new ys(1,[]),n.FundLookup,n.User,new ou(1,[])),Ys((t=>{!function(e,t,n,r){gs(function(e,t,n,r){return ps.Delay((()=>ps.Bind(Zs(e.backendUrl,e.accessToken,t,n),(e=>(r(new nu(5,[])),ps.Zero())))))}(e,t,n,r))}(e,a.PartnerId,a.AccountId,t)}))];default:return[new ru(new ys(1,[]),n.FundLookup,n.User,n.ModalState),Ys((t=>{!function(e,t){gs(function(e,t){return ps.Delay((()=>ps.Bind(zs(e.backendUrl,e.accessToken),(e=>(t(new nu(0,[new ys(2,[e])])),ps.Zero())))))}(e,t))}(e,t)}))]}}const au=xt([ri("Partner"),ri("Account"),ri("Promoted Funds"),ri("")]);function lu(e,t){return ci(xt(["account-registry","partners",e,"accounts",t,"super-configuration"]),1)}function fu(e){let t;const n=Ki((()=>qi((()=>{return t=e.accessToken,[new ru(new ys(0,[]),Ln({Compare:H}),Qo(t),new ou(1,[])),Xs()];var t}),((t,n)=>cu(e,t,n)),((e,t)=>{}))),void 0,void 0),r=n[0],o=n[1];if(us(vs((()=>function(e){return zs(e.backendUrl,e.accessToken)}(e)),(e=>{o(new nu(0,[e]))}))),null==Xo(r.User.Roles))return(0,h.createElement)(eu,{error:"You do not have the appropriate permissions to view this information"});{const e=r.PromotedFundOverrides;let n,s,i,u;switch(e.tag){case 2:0===e.fields[0].tag?(n=3,u=e.fields[0].fields[0]):(n=1,s=e.fields[0].fields[0]);break;case 3:n=2,i=e.fields[0];break;default:n=0}switch(n){case 0:return(0,h.createElement)(Qi,null);case 1:return(0,h.createElement)(eu,{error:s});case 2:{const e=q(i);return(0,h.createElement)(eu,{error:e})}default:return(0,h.createElement)("div",L(_t((t=Wt(jt((()=>qt(Vt((0,h.createElement)("h2",{className:"text-xl text-gray-900",children:"Promoted Fund Overrides"})),jt((()=>{let e;return qt(Vt((0,h.createElement)("p",L(xt([["className","mt-2 text-sm text-gray-700"],(e="A list of all promoted fund overrides. This does not include accounts or partners that use the default configuration.",["children","A list of all promoted fund overrides. This does not include accounts or partners that use the default configuration."])])))),jt((()=>qt(Vt(function(e,t){let n,r,o,s,i,u,c;return(0,h.createElement)("div",L(xt([["className","flex flex-col mt-4"],(n=[(0,h.createElement)("div",L(xt([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[(0,h.createElement)("div",L(xt([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(o=[(0,h.createElement)("div",L(xt([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(s=[(0,h.createElement)("table",L(xt([["className","min-w-full divide-y divide-gray-200"],(i=[(0,h.createElement)("thead",{className:"bg-gray-50",children:(u=Yt(Qs,e),(0,h.createElement)("tr",{children:rs.Children.toArray(Array.from(u))}))}),(c=Kt(((e,t)=>(t=>{let n;return(0,h.createElement)("tr",L(xt([["className",e%2==0?"bg-white":"bg-gray-50"],(n=Yt(ni,t),["children",rs.Children.toArray(Array.from(n))])])))})(t)),t),(0,h.createElement)("tbody",{children:rs.Children.toArray(Array.from(c))}))],["children",rs.Children.toArray(Array.from(i))])])))],["children",rs.Children.toArray(Array.from(s))])])))],["children",rs.Children.toArray(Array.from(o))])])))],["children",rs.Children.toArray(Array.from(r))])])))],["children",rs.Children.toArray(Array.from(n))])])))}(au,At((e=>function(e,t,n){return Wt(jt((()=>{let r;const o=function(e,t){const n=Pn(e,[new ts(t.PartnerId),(r=t.AccountId,se((e=>new ns(e)),r))]);var r;let o,s;if(null!=n&&2===n.tag&&0===n.fields[0].tag?(o=0,s=n.fields[0].fields[0]):o=1,0===o)return s}(e,n),s=function(e,t){let n;return oe((n=t,null==n?void 0:n.Partner.Name),e)}(n.PartnerId,o),i=function(e,t){let n,r;return n=t,null==(o=null==n?void 0:(r=n.Account,null==r?void 0:r.Name))?e:o;var o}(n.AccountId,o);return qt(Vt((r=[(u=n.PartnerId,ci(xt(["account-registry","partners",u,"super-configuration"]),1)),s],oi(r[0],r[1]))),jt((()=>{let e,r,o,s;return qt((e=n.AccountId,null!=e&&null!=i?(r=e,o=i,Vt((s=[lu(n.PartnerId,r),o],oi(s[0],s[1])))):Vt(si(["text-gray-500"],"-"))),jt((()=>qt(Vt(si(["text-gray-500"],qe(", ",n.Funds))),jt((()=>{return Vt((e=Si((e=>{t(new nu(2,[new tu(n.PartnerId,n.AccountId)]))})),ti((0,h.createElement)("td",{className:qe(" ",["flex justify-center py-2"]),children:rs.Children.toArray([e])}))));var e}))))))})));var u})))}(r.FundLookup,o,e)),u))),jt((()=>{const e=r.ModalState;return 0===e.tag?Vt(function(e,t){let n;return(0,h.createElement)(Oi,{BodyText:`Are you sure you want to reset the current promoted funds for ${n=e.AccountId,null==n?`Partner: ${e.PartnerId}`:`Account: ${n}`}? This action cannot be undone.`,CancelAction:new gi("Cancel",(e=>{t(new nu(3,[]))})),ConfirmAction:new wi("Reset",(n=>{t(new nu(4,[e]))})),HeadingText:"Reset Promoted Funds"})}(e.fields[0],o)):Vt(null)}))))))})))))),["children",rs.Children.toArray(Array.from(t))]))))}}}class du extends J{constructor(e,t,n){super(),this.Id=e,this.PartnerId=t,this.Enabled=n}}const hu=xt(["BringYourOwnFundCustomStep","FeaturedFunds"]);class mu extends J{constructor(e,t){super(),this.PromotedFunds=e,this.FeatureFlags=t}}class pu extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Account","Partner"]}}class _u extends J{constructor(e,t,n){super(),this.Data=e,this.User=t,this.ModalState=n}}class wu extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["ResetModal","EditModal","Hidden"]}}class gu extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["DefaultUsi","FeatureSet","PromotedFunds","FeatureFlag"]}}class yu extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["LoadData","ShowEditModal","ShowResetModal","ShowFeatureFlagModal","EnableFeatureFlag","DisableFeatureFlag","CloseModal","UpdateDefaultUsi","UpdateFeatureSet","UpdatePromotedFunds","ResetDefaultUsi","ResetPromotedFunds","PromotedFundsUpdate","FeatureFlagUpdate"]}}class vu extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Default","Inherited","Config"]}}function bu(e){switch(e.tag){case 1:return e.fields[0]+" (inherited)";case 2:return e.fields[0];default:return e.fields[0]+" (default)"}}function Cu(e){switch(e.tag){case 1:default:return"";case 2:return e.fields[0]}}class Su extends J{constructor(e,t,n,r,o,s){super(),this.UpdatePromotedFunds=e,this.DeletePromotedFunds=t,this.UpdateDefaultFundUsi=n,this.UpdateFeatureSet=r,this.UpdateFeatureFlag=o,this.ReloadData=s}}class Eu extends Z{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["TextInput","Select"]}}function xu(e,t,n,r){let o,s;return(0,h.createElement)("div",L(xt([["className","mt-2 w-full h-full"],(o=[(0,h.createElement)("div",L(xt([["className","h-30"],(s=Wt(jt((()=>qt(Vt((0,h.createElement)("label",{className:"sr-only text-base",htmlFor:"field",children:t})),jt((()=>{let t,o,s;const i=r;return 1===i.tag?Vt((0,h.createElement)("select",L(xt([["name","field"],["id","field"],(t="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-base border-gray-300 rounded-md",["className","shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-base border-gray-300 rounded-md"]),["value",n],["onChange",t=>{e(t.target.value)}],(o=At((e=>(0,h.createElement)("option",{value:e,children:e})),i.fields[0]),["children",rs.Children.toArray(Array.from(o))])])))):Vt((0,h.createElement)("input",L(xt([["type","text"],["name","field"],["id","field"],(s="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-base border-gray-300 rounded-md",["className","shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-base border-gray-300 rounded-md"]),["value",n],["onChange",t=>{e(t.target.value)}]]))))})))))),["children",rs.Children.toArray(Array.from(s))])])))],["children",rs.Children.toArray(Array.from(o))])])))}function ku(e,t){let n;return(0,h.createElement)("div",L(xt([["className",qe(" ",["bg-gray-50","px-4","py-3","sm:px-6","sm:flex","sm:flex-row-reverse"])],(n=[Ei("indigo",e),xi(t)],["children",rs.Children.toArray(Array.from(n))])])))}function Au(e){let t,n,r,o,s,i,u;const c=(a=e.FieldValue,rs.useState(a));var a;const l=c[0],f=vi(e.ConfirmAction,l);return(0,h.createElement)("div",L(xt([["className",qe(" ",["relative","z-10"])],["role",qe(" ",["dialog"])],(t=[(0,h.createElement)("div",{className:qe(" ",["fixed","inset-0","bg-gray-500","bg-opacity-75","transition-opacity"])}),(0,h.createElement)("div",L(xt([["className",qe(" ",["fixed","z-10","inset-0","overflow-y-auto"])],(n=[(0,h.createElement)("div",L(xt([["className",qe(" ",["flex","min-h-full","items-end","justify-center","p-4","text-center","sm:items-center","sm:p-0"])],(r=[(0,h.createElement)("span",{className:qe(" ",["hidden","sm:inline-block","sm:align-middle","sm:h-screen"]),children:"​"}),(0,h.createElement)("div",L(xt([["className",qe(" ",["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=[(0,h.createElement)("div",L(xt([["className",qe(" ",["bg-white","px-4","pt-5","pb-4","sm:p-6","sm:pb-4"])],(s=[(0,h.createElement)("div",L(xt([["className",qe(" ",["sm:flex","sm:items-start"])],(i=[Ti,(0,h.createElement)("div",L(xt([["className",qe(" ",["mt-3","text-center","sm:mt-0","sm:ml-4","sm:text-left","w-full"])],(u=[(d=e.HeadingText,(0,h.createElement)("h3",{className:qe(" ",["text-lg","leading-6","font-medium","text-gray-900"]),id:"modal-title",children:d})),xu(c[1],e.FieldName,l,e.FieldType)],["children",rs.Children.toArray(Array.from(u))])])))],["children",rs.Children.toArray(Array.from(i))])])))],["children",rs.Children.toArray(Array.from(s))])]))),ku(f,e.CancelAction)],["children",rs.Children.toArray(Array.from(o))])])))],["children",rs.Children.toArray(Array.from(r))])])))],["children",rs.Children.toArray(Array.from(n))])])))],["children",rs.Children.toArray(Array.from(t))])])));var d}function Iu(e){let t,n,r,o;return(0,h.createElement)("div",L(xt([["className","mt-2 w-full h-full"],(t=[(0,h.createElement)("div",L(xt([["className","h-30"],(n=[(0,h.createElement)("p",L(xt([(r="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-base border-gray-300 rounded-md",["className","shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-base border-gray-300 rounded-md"]),["value",e]]))),(0,h.createElement)("div",L(xt([["className","mt-2"],(o=[(0,h.createElement)("p",{className:"text-sm text-gray-500",children:e})],["children",rs.Children.toArray(Array.from(o))])])))],["children",rs.Children.toArray(Array.from(n))])])))],["children",rs.Children.toArray(Array.from(t))])])))}function Tu(e,t){let n;return(0,h.createElement)("div",L(xt([["className",qe(" ",["bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"])],(n=[Ei("indigo",e),xi(t)],["children",rs.Children.toArray(Array.from(n))])])))}function Nu(e){let t,n,r,o,s,i,u,c;const a=vi(e.ConfirmAction,"");return(0,h.createElement)("div",L(xt([["className","relative z-10"],["role",qe(" ",["dialog"])],(t=[(0,h.createElement)("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"}),(0,h.createElement)("div",L(xt([["className","fixed z-10 inset-0 overflow-y-auto"],(n=[(0,h.createElement)("div",L(xt([["className","flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"],(r=[(0,h.createElement)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen",children:"​"}),(0,h.createElement)("div",L(xt([(o="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",["className","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"]),(s=[(0,h.createElement)("div",L(xt([["className","bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"],(i=[(0,h.createElement)("div",L(xt([["className","sm:flex sm:items-start"],(u=[Ti,(0,h.createElement)("div",L(xt([["className","mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"],(c=[(l=e.HeadingText,(0,h.createElement)("h3",{className:qe(" ",["text-lg leading-6 font-medium text-gray-900"]),id:"modal-title",children:l})),Iu(e.Subtext)],["children",rs.Children.toArray(Array.from(c))])])))],["children",rs.Children.toArray(Array.from(u))])])))],["children",rs.Children.toArray(Array.from(i))])]))),Tu(a,e.CancelAction)],["children",rs.Children.toArray(Array.from(s))])])))],["children",rs.Children.toArray(Array.from(r))])])))],["children",rs.Children.toArray(Array.from(n))])])))],["children",rs.Children.toArray(Array.from(t))])])));var l}function Fu(e,t){return(0,h.createElement)(Au,{CancelAction:new gi("Cancel",(e=>{t(new yu(6,[]))})),ConfirmAction:new yi("Save",((e,n)=>{t(new yu(9,[e]))})),FieldName:"Promoted Funds",FieldType:new Eu(0,[]),FieldValue:e,HeadingText:"Edit Promoted Funds"})}function Mu(e,t){const n=e.Enabled?["Disable",e=>new yu(5,[e])]:["Enable",e=>new yu(4,[e])],r=n[0];return(0,h.createElement)(Nu,{CancelAction:new gi("Cancel",(e=>{t(new yu(6,[]))})),ConfirmAction:new yi(r,((r,o)=>{t(n[1](e))})),HeadingText:e.Id,Subtext:`This will ${r.toLocaleLowerCase()} the ${e.Id} feature`})}function Ou(e){return(0,h.createElement)(Oi,{BodyText:"Are you sure you want to reset the current promoted funds? This action cannot be undone.",CancelAction:new gi("Cancel",(t=>{e(new yu(6,[]))})),ConfirmAction:new wi("Reset",(t=>{e(new yu(11,[]))})),HeadingText:"Reset Promoted Funds"})}function Du(e,t){gs(e.ReloadData(t))}function Uu(e,t,n,r){return ps.Delay((()=>{const o=qs(e,t,n,r);return ps.Bind(o,(n=>{const o=n;if(1===o.tag)return ps.Return(new gr(1,[o.fields[0]]));{const n=function(e,t,n){return ps.Delay((()=>{const r=Ws(t,Ns(new bs(0,[]),Ts(`${Vs(e)}/configurations/${n}`)));return ps.Bind(r,(e=>{const t=e;if(1===t.tag)return ps.Return(new gr(1,[t.fields[0]]));{const e=t.fields[0];switch(0|e.statusCode){case 200:{const t=vo(G($o(qn("SuperSelection.AdminUI.Dto.AccountConfiguration",[],Lo,(()=>[["DefaultFundUSI",Jn(Kn)],["FeatureSet",Go()]])),new br(1,[]),void 0)),e.responseText);return ps.Return(t)}case 404:{const e=new gr(0,[new Lo(void 0,new jo(1,[]))]);return ps.Return(e)}default:return ps.Return(new gr(1,["Unexpected response from backend"]))}}}))}))}(e,t,r);return ps.Bind(n,(e=>{let t;const n=e;return t=1===n.tag?new gr(1,[n.fields[0]]):new gr(0,[new pu(0,[new es(o.fields[0],n.fields[0])])]),ps.Return(t)}))}}))}))}function Pu(e,t,n){return ps.Delay((()=>{const r=qs(e,t,n,void 0);return ps.Bind(r,(r=>{const o=r;if(1===o.tag)return ps.Return(new gr(1,[o.fields[0]]));{const r=function(e,t,n){return ps.Delay((()=>{const r=Ws(t,Ns(new bs(0,[]),Ts(`${Vs(e)}/partner/${n}/feature-flags`)));return ps.Bind(r,(e=>{const t=e;if(1===t.tag)return ps.Return(new gr(1,[t.fields[0]]));{const e=t.fields[0];switch(0|e.statusCode){case 200:{let t;const n=vo(G($o(Zn(["Items",Xn(qn("SuperSelection.AdminUI.Dto.FeatureFlag",[],qo,(()=>[["Id",Kn],["PartnerId",Kn],["Enabled",Qn],["Editor",Kn]])))]),new br(1,[]),void 0)),e.responseText);return t=ps.Return(n),ps.Bind(t,(e=>{let t;const n=e;return t=1===n.tag?new gr(1,[n.fields[0]]):new gr(0,[n.fields[0].Items]),ps.Return(t)}))}case 404:return ps.Return(new gr(0,[mt()]));default:return ps.Return(new gr(1,["Unexpected response from backend"]))}}}))}))}(e,t,n);return ps.Bind(r,(e=>{let t;const r=e;var s,i;return t=1===r.tag?new gr(1,[r.fields[0]]):new gr(0,[new pu(1,[new mu(o.fields[0],(s=n,i=r.fields[0],At((e=>{const t=It((t=>t.Id===e),i);if(null==t)return new du(e,s,!1);{const e=t;return new du(e.Id,s,e.Enabled)}}),hu)))])]),ps.Return(t)}))}}))}))}function Ru(e){return new Su(((t,n)=>function(e,t,n){return ps.Delay((()=>ps.Bind(function(e,t,n,r,o){return ps.Delay((()=>{let s;const i=(null==r?e=>`${e}/promoted-funds/${n}`:(s=r,e=>`${e}/promoted-funds/${n}/${s}`))(Vs(e)),u=Ws(t,Ns(new bs(1,[]),Fs(new Ss(1,[Bs(0,Gs(Zn(["Funds",Xn(Kn)]),new br(1,[]),void 0,void 0)(o))]),Ts(i))));return ps.Bind(u,(e=>{const t=e;if(1===t.tag)return ps.Return(new gr(1,[t.fields[0]]));{const e=t.fields[0];return 200===e.statusCode?ps.Return(new gr(0,[void 0])):ps.Return(new gr(1,[e.responseText]))}}))}))}(e.backendUrl,e.accessToken,e.partnerId,e.accountId,t),(e=>(n(new yu(12,[e])),ps.Zero())))))}(e,t,n)),(t=>function(e,t){return ps.Delay((()=>ps.Bind(Zs(e.backendUrl,e.accessToken,e.partnerId,e.accountId),(e=>(t(new yu(12,[e])),ps.Zero())))))}(e,t)),((t,n)=>function(e,t,n){return ps.Delay((()=>{const r=e.accountId;if(null==r)return ps.Zero();{const o=r;return ps.Bind(function(e,t,n,r){return ps.Delay((()=>{let o;const s=Ws(t,Ns(new bs(2,[]),Fs(new Ss(1,[(o={DefaultFundUsi:r},Bs(0,Gs(Zn(["DefaultFundUsi",Kn]),new br(1,[]),void 0,void 0)(o)))]),Ts(`${Vs(e)}/configurations/${n}/default-fund-usi`))));return ps.Bind(s,(e=>{const t=e;return 1===t.tag?ps.Return(new gr(1,[t.fields[0]])):200===t.fields[0].statusCode?ps.Return(new gr(0,[void 0])):ps.Return(new gr(1,["Unexpected response from backend"]))}))}))}(e.backendUrl,e.accessToken,o,t),(e=>(n(new yu(12,[e])),ps.Zero())))}}))}(e,t,n)),((t,n)=>function(e,t,n){return ps.Delay((()=>{const r=e.accountId;if(null==r)return ps.Zero();{const o=r;return ps.Bind(function(e,t,n,r){return ps.Delay((()=>{let o;const s=Ws(t,Ns(new bs(2,[]),Fs(new Ss(1,[(o={FeatureSet:r},Bs(0,Gs(Zn(["FeatureSet",Go()]),new br(1,[]),void 0,void 0)(o)))]),Ts(`${Vs(e)}/configurations/${n}/feature-set`))));return ps.Bind(s,(e=>{const t=e;return 1===t.tag?ps.Return(new gr(1,[t.fields[0]])):200===t.fields[0].statusCode?ps.Return(new gr(0,[void 0])):ps.Return(new gr(1,["Unexpected response from backend"]))}))}))}(e.backendUrl,e.accessToken,o,t),(e=>(n(new yu(12,[e])),ps.Zero())))}}))}(e,t,n)),((t,n)=>function(e,t,n,r){return ps.Delay((()=>ps.Bind(function(e,t,n,r,o){return ps.Delay((()=>{let s;const i=`${Vs(e)}/partner/${n}/feature-flags/${r}`,u=Ws(t,Ns(new bs(2,[]),Fs(new Ss(1,[(s={Enabled:o,PartnerId:n},Bs(0,Gs(Zn(["Enabled",Qn],["PartnerId",Kn]),new br(1,[]),void 0,void 0)(s)))]),Ts(i))));return ps.Bind(u,(e=>{const t=e;if(1===t.tag)return ps.Return(new gr(1,[t.fields[0]]));{const e=t.fields[0];return 200===e.statusCode?ps.Return(new gr(0,[void 0])):ps.Return(new gr(1,[e.responseText]))}}))}))}(e.backendUrl,e.accessToken,e.partnerId,t,n),(e=>(r(new yu(13,[e])),ps.Zero())))))}(e,t[0],t[1],n)),(t=>function(e,t){return ps.Delay((()=>{let n;return ps.Bind((n=e.accountId,null==n?Pu(e.backendUrl,e.accessToken,e.partnerId):Uu(e.backendUrl,e.accessToken,e.partnerId,n)),(e=>(t(new yu(0,[new ys(2,[e])])),ps.Zero())))}))}(e,t)))}function $u(e,t,n,r){let o,s,i,u,c;const a=xt(re((o=n,null==o?void 0:Ci(o)))),l=xt(re((s=r,null==s?void 0:Si(s))));return(0,h.createElement)("div",L(xt([["className",qe(" ",["px-4","py-5","sm:grid","sm:grid-cols-5","sm:gap-4","sm:px-6"])],(i=[(0,h.createElement)("dt",{className:qe(" ",["text-sm","font-medium","text-gray-500"]),children:e}),(0,h.createElement)("dd",L(xt([["className",qe(" ",["mt-1","text-sm","text-gray-900","sm:mt-0","sm:col-span-2"])],(u=[(0,h.createElement)("span",{className:"flex-grow",children:t})],["children",rs.Children.toArray(Array.from(u))])]))),(0,h.createElement)("span",L(xt([["className","flex-grow"],(c=Wt(jt((()=>qt(a,jt((()=>l)))))),["children",rs.Children.toArray(Array.from(c))])])))],["children",rs.Children.toArray(Array.from(i))])])))}function Hu(e,t,n){return $u("Default USI",t,null!=(r=e,Nt(new Zo("SuperSelection.ChangeDefaultFund"),r,{Equals:P,GetHashCode:O})?ne(void 0):void 0)?e=>{n(new yu(1,[new gu(0,[])]))}:void 0,void 0);var r}function Bu(e,t,n){const r=null!=(o=e,Nt(new Zo("SuperSelection.ChangeFeatureSet"),o,{Equals:P,GetHashCode:O})?ne(void 0):void 0)?e=>{n(new yu(1,[new gu(1,[])]))}:void 0;var o;return $u("Feature Set",q(t),r,void 0)}function Lu(e,t,n){return $u("Funds",t,null!=Yo(e)?e=>{n(new yu(1,[new gu(2,[])]))}:void 0,null!=Yo(e)?e=>{n(new yu(2,[new gu(2,[])]))}:void 0)}function ju(e){let t;return(0,h.createElement)("div",L(xt([["className",qe(" ",["px-4 py-4 sm:px-0"])],(t=[(0,h.createElement)("h3",{className:qe(" ",["text-lg font-semibold leading-7 text-gray-900"]),children:e})],["children",rs.Children.toArray(Array.from(t))])])))}function Gu(e){let t,n;const r=Ru(e);n=e=>t=>function(e,t,n){switch(t.tag){case 1:return[new _u(n.Data,n.User,new wu(1,[t.fields[0]])),Xs()];case 2:return[new _u(n.Data,n.User,new wu(0,[t.fields[0]])),Xs()];case 6:case 10:return[new _u(n.Data,n.User,new wu(2,[])),Xs()];case 7:return[new _u(n.Data,n.User,new wu(2,[])),Ys((n=>{gs(e.UpdateDefaultFundUsi(t.fields[0],n))}))];case 8:return[new _u(n.Data,n.User,new wu(2,[])),Ys((n=>{gs(e.UpdateFeatureSet(t.fields[0],n))}))];case 9:{const r=xt(tt((e=>e.trim()),Xe(t.fields[0],[","],void 0,0)));return[new _u(n.Data,n.User,new wu(2,[])),Ys((t=>{gs(e.UpdatePromotedFunds({Funds:r},t))}))]}case 11:return[new _u(n.Data,n.User,new wu(2,[])),Ys((t=>{gs(e.DeletePromotedFunds(t))}))];case 12:return[new _u(new ys(1,[]),n.User,n.ModalState),Ys((t=>{Du(e,t)}))];case 3:return[new _u(n.Data,n.User,new wu(1,[new gu(3,[t.fields[0]])])),Xs()];case 4:return[new _u(n.Data,n.User,new wu(2,[])),Ys((n=>{gs(e.UpdateFeatureFlag([t.fields[0].Id,!0],n))}))];case 5:return[new _u(n.Data,n.User,new wu(2,[])),Ys((n=>{gs(e.UpdateFeatureFlag([t.fields[0].Id,!1],n))}))];case 13:return[new _u(new ys(1,[]),n.User,n.ModalState),Ys((t=>{Du(e,t)}))];default:return[new _u(t.fields[0],n.User,n.ModalState),Xs()]}}(r,e,t);const o=Ki((()=>qi((()=>{return t=e.accessToken,[new _u(new ys(0,[]),Qo(t),new wu(2,[])),Xs()];var t}),G(n),((e,t)=>{}))),void 0,void 0),s=o[0],i=o[1];us(vs((()=>function(e){const t=e.accountId;return null==t?Pu(e.backendUrl,e.accessToken,e.partnerId):Uu(e.backendUrl,e.accessToken,e.partnerId,t)}(e)),(e=>{i(new yu(0,[e]))})));const u=s.User.Roles;if(null==Xo(u))return(0,h.createElement)(eu,{error:"You do not have the appropriate permissions to view this information"});{const e=s.Data;let n,r,o,c;switch(e.tag){case 2:1===e.fields[0].tag?(n=2,o=e.fields[0].fields[0]):(n=1,r=e.fields[0].fields[0]);break;case 3:n=3,c=e.fields[0];break;default:n=0}switch(n){case 0:return(0,h.createElement)(Qi,null);case 1:if(1===r.tag){const e=r.fields[0],t=Wt(jt((()=>{let t;const n=function(e){const t=e.PartnerFunds;return wt(t)?new vu(0,["mercermychoice"]):new vu(2,[qe(", ",t)])}(e.PromotedFunds),r=Wt(jt((()=>Yt((e=>function(e,t,n){let r,o,s;const i=null!=Yo(e)?e=>{n(new yu(3,[t]))}:e=>{},u=!(null!=Yo(e)),c=(0,h.createElement)("button",L(xt([["className",qe(" ",Wt(jt((()=>qt(Vt("relative inline-flex h-6 w-11 gap-4 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2"),jt((()=>qt(Vt(u?"cursor-not-allowed":""),jt((()=>t.Enabled?Vt("bg-indigo-600"):Vt("bg-gray-300")))))))))))],["role",qe(" ",["switch"])],["type","button"],["onClick",i],(r=[(0,h.createElement)("span",{className:qe(" ",Wt(jt((()=>qt(Vt("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"),jt((()=>t.Enabled?Vt("translate-x-5"):Vt("translate-x-0"))))))))})],["children",rs.Children.toArray(Array.from(r))])])));return(0,h.createElement)("div",L(xt([["className",qe(" ",["px-4 py-5 sm:grid sm:grid-cols-5 sm:gap-4 sm:px-6"])],(o=[(0,h.createElement)("dt",{className:qe(" ",["text-sm font-medium text-gray-500"]),children:t.Id}),(0,h.createElement)("dd",L(xt([["className",qe(" ",["mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"])],(s=[(0,h.createElement)("span",{className:"flex-grow",children:rs.Children.toArray([c])})],["children",rs.Children.toArray(Array.from(s))])])))],["children",rs.Children.toArray(Array.from(o))])])))}(u,e,i)),e.FeatureFlags))));return Vt((0,h.createElement)("div",L(_t((t=Wt(jt((()=>{let e,t,o;return qt(Vt((0,h.createElement)("div",L(_t((e=[ju("Promoted Funds"),(t=_t(Lu(u,bu(n),i)),(0,h.createElement)("dl",{children:rs.Children.toArray(Array.from(t))})),ju("Feature Flags"),(o=Wt(jt((()=>r))),(0,h.createElement)("dl",{children:rs.Children.toArray(Array.from(o))}))],["children",rs.Children.toArray(Array.from(e))]))))),jt((()=>{const e=s.ModalState;switch(e.tag){case 1:{const t=e.fields[0];return 1===t.tag?Vt(null):2===t.tag?Vt(Fu(Cu(n),i)):3===t.tag?Vt(Mu(t.fields[0],i)):Vt(null)}case 2:return Vt(null);default:{const t=e.fields[0];return 1===t.tag?Vt(null):2===t.tag?Vt(Ou(i)):(t.tag,Vt(null))}}})))}))),["children",rs.Children.toArray(Array.from(t))])))))})));return(0,h.createElement)("div",{children:rs.Children.toArray(Array.from(t))})}{const e=r.fields[0],n=oe(e.Configuration.DefaultFundUSI,"-"),o=oe(e.Configuration.DefaultFundUSI,""),c=function(e){const t=e.PartnerFunds,n=e.AccountFunds;let r,o;switch(wt(t)?wt(n)?r=0:(r=2,o=n):wt(n)?r=1:(r=2,o=n),r){case 0:return new vu(0,["mercermychoice"]);case 1:return new vu(1,[qe(", ",t)]);default:return new vu(2,[qe(", ",o)])}}(e.PromotedFunds);return(0,h.createElement)("div",L(_t((t=Wt(jt((()=>{let t,r;return qt(Vt((0,h.createElement)("div",L(_t((t=[(r=xt([Hu(u,n,i),Bu(u,e.Configuration.FeatureSet,i),Lu(u,bu(c),i)]),(0,h.createElement)("dl",{children:rs.Children.toArray(Array.from(r))}))],["children",rs.Children.toArray(Array.from(t))]))))),jt((()=>{const t=s.ModalState;switch(t.tag){case 1:{const n=t.fields[0];return 1===n.tag?Vt(function(e,t){return(0,h.createElement)(Au,{CancelAction:new gi("Cancel",(e=>{t(new yu(6,[]))})),ConfirmAction:new yi("Save",((e,n)=>{t(new yu(8,[new jo("Basic"===e?0:1,[])]))})),FieldName:"Feature Set",FieldType:new Eu(1,[xt(["Promoted","Basic"])]),FieldValue:q(e),HeadingText:"Change Feature Set"})}(e.Configuration.FeatureSet,i)):2===n.tag?Vt(Fu(Cu(c),i)):3===n.tag?Vt(Mu(n.fields[0],i)):Vt(function(e,t){return(0,h.createElement)(Au,{CancelAction:new gi("Cancel",(e=>{t(new yu(6,[]))})),ConfirmAction:new yi("Save",((e,n)=>{t(new yu(7,[e]))})),FieldName:"Default USI",FieldType:new Eu(0,[]),FieldValue:e,HeadingText:"Edit Default USI"})}(o,i))}case 2:return Vt(null);default:{const e=t.fields[0];return 1===e.tag?Vt(null):2===e.tag?Vt(Ou(i)):3===e.tag?Vt(null):Vt(function(e){return(0,h.createElement)(Oi,{BodyText:"Are you sure you want to reset the current Default USI? This action cannot be undone.",CancelAction:new gi("Cancel",(t=>{e(new yu(6,[]))})),ConfirmAction:new wi("Reset",(t=>{e(new yu(10,[]))})),HeadingText:"Reset Default USI"})}(i))}}})))}))),["children",rs.Children.toArray(Array.from(t))]))))}case 2:return(0,h.createElement)(eu,{error:o});default:{const e=q(c);return(0,h.createElement)(eu,{error:e})}}}}d((e=>(0,h.createElement)(fu,e)),"superhero-super-selection"),d((e=>(0,h.createElement)(Gu,e)),"superhero-super-configuration")})();
1
+ var dn,I,oi,ft,Do,si,$r,Wr,Mr,Ir,ii,un={},ai=[],Eu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Zn=Array.isArray;function Xe(e,t){for(var n in t)e[n]=t[n];return e}function ui(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function p(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?dn.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return rn(e,i,r,o,null)}function rn(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++oi,__i:-1,__u:0};return o==null&&I.vnode!=null&&I.vnode(s),s}function li(){return{current:null}}function Le(e){return e.children}function Ve(e,t){this.props=e,this.context=t}function Ut(e,t){if(t==null)return e.__?Ut(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Ut(e):null}function ci(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return ci(e)}}function Rr(e){(!e.__d&&(e.__d=!0)&&ft.push(e)&&!Nn.__r++||Do!==I.debounceRendering)&&((Do=I.debounceRendering)||si)(Nn)}function Nn(){var e,t,n,r,o,s,i,a;for(ft.sort($r);e=ft.shift();)e.__d&&(t=ft.length,r=void 0,s=(o=(n=e).__v).__e,i=[],a=[],n.__P&&((r=Xe({},o)).__v=o.__v+1,I.vnode&&I.vnode(r),qr(n.__P,r,o,n.__n,n.__P.namespaceURI,32&o.__u?[s]:null,i,s??Ut(o),!!(32&o.__u),a),r.__v=o.__v,r.__.__k[r.__i]=r,hi(i,r,a),r.__e!=s&&ci(r)),ft.length>t&&ft.sort($r));Nn.__r=0}function fi(e,t,n,r,o,s,i,a,u,l,f){var c,m,h,_,y,g=r&&r.__k||ai,b=t.length;for(n.__d=u,Au(n,t,g),u=n.__d,c=0;c<b;c++)(h=n.__k[c])!=null&&(m=h.__i===-1?un:g[h.__i]||un,h.__i=c,qr(e,h,m,o,s,i,a,u,l,f),_=h.__e,h.ref&&m.ref!=h.ref&&(m.ref&&Zr(m.ref,null,h),f.push(h.ref,h.__c||_,h)),y==null&&_!=null&&(y=_),65536&h.__u||m.__k===h.__k?u=di(h,u,e):typeof h.type=="function"&&h.__d!==void 0?u=h.__d:_&&(u=_.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=u,n.__e=y}function Au(e,t,n){var r,o,s,i,a,u=t.length,l=n.length,f=l,c=0;for(e.__k=[],r=0;r<u;r++)(o=t[r])!=null&&typeof o!="boolean"&&typeof o!="function"?(i=r+c,(o=e.__k[r]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?rn(null,o,null,null,null):Zn(o)?rn(Le,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?rn(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(a=o.__i=Tu(o,n,i,f))!==-1&&(f--,(s=n[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&c--,typeof o.type!="function"&&(o.__u|=65536)):a!==i&&(a==i-1?c--:a==i+1?c++:(a>i?c--:c++,o.__u|=65536))):o=e.__k[r]=null;if(f)for(r=0;r<l;r++)(s=n[r])!=null&&!(131072&s.__u)&&(s.__e==e.__d&&(e.__d=Ut(s)),mi(s,s))}function di(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=di(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Ut(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function et(e,t){return t=t||[],e==null||typeof e=="boolean"||(Zn(e)?e.some(function(n){et(n,t)}):t.push(e)),t}function Tu(e,t,n,r){var o=e.key,s=e.type,i=n-1,a=n+1,u=t[n];if(u===null||u&&o==u.key&&s===u.type&&!(131072&u.__u))return n;if(r>(u!=null&&!(131072&u.__u)?1:0))for(;i>=0||a<t.length;){if(i>=0){if((u=t[i])&&!(131072&u.__u)&&o==u.key&&s===u.type)return i;i--}if(a<t.length){if((u=t[a])&&!(131072&u.__u)&&o==u.key&&s===u.type)return a;a++}}return-1}function Po(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Eu.test(t)?n:n+"px"}function kn(e,t,n,r,o){var s;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Po(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Po(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")s=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=Wr,e.addEventListener(t,s?Ir:Mr,s)):e.removeEventListener(t,s?Ir:Mr,s);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Oo(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Wr++;else if(t.t<n.u)return;return n(I.event?I.event(t):t)}}}function qr(e,t,n,r,o,s,i,a,u,l){var f,c,m,h,_,y,g,b,S,M,X,ue,ie,Et,ye,yr,Be=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),s=[a=t.__e=n.__e]),(f=I.__b)&&f(t);e:if(typeof Be=="function")try{if(b=t.props,S="prototype"in Be&&Be.prototype.render,M=(f=Be.contextType)&&r[f.__c],X=f?M?M.props.value:f.__:r,n.__c?g=(c=t.__c=n.__c).__=c.__E:(S?t.__c=c=new Be(b,X):(t.__c=c=new Ve(b,X),c.constructor=Be,c.render=$u),M&&M.sub(c),c.props=b,c.state||(c.state={}),c.context=X,c.__n=r,m=c.__d=!0,c.__h=[],c._sb=[]),S&&c.__s==null&&(c.__s=c.state),S&&Be.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Xe({},c.__s)),Xe(c.__s,Be.getDerivedStateFromProps(b,c.__s))),h=c.props,_=c.state,c.__v=t,m)S&&Be.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),S&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(S&&Be.getDerivedStateFromProps==null&&b!==h&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(b,X),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(b,c.__s,X)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(c.props=b,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Sn){Sn&&(Sn.__=t)}),ue=0;ue<c._sb.length;ue++)c.__h.push(c._sb[ue]);c._sb=[],c.__h.length&&i.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(b,c.__s,X),S&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(h,_,y)})}if(c.context=X,c.props=b,c.__P=e,c.__e=!1,ie=I.__r,Et=0,S){for(c.state=c.__s,c.__d=!1,ie&&ie(t),f=c.render(c.props,c.state,c.context),ye=0;ye<c._sb.length;ye++)c.__h.push(c._sb[ye]);c._sb=[]}else do c.__d=!1,ie&&ie(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++Et<25);c.state=c.__s,c.getChildContext!=null&&(r=Xe(Xe({},r),c.getChildContext())),S&&!m&&c.getSnapshotBeforeUpdate!=null&&(y=c.getSnapshotBeforeUpdate(h,_)),fi(e,Zn(yr=f!=null&&f.type===Le&&f.key==null?f.props.children:f)?yr:[yr],t,n,r,o,s,i,a,u,l),c.base=t.__e,t.__u&=-161,c.__h.length&&i.push(c),g&&(c.__E=c.__=null)}catch(Sn){if(t.__v=null,u||s!=null){for(t.__u|=u?160:128;a&&a.nodeType===8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else t.__e=n.__e,t.__k=n.__k;I.__e(Sn,t,n)}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Fu(n.__e,t,n,r,o,s,i,u,l);(f=I.diffed)&&f(t)}function hi(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Zr(n[r],n[++r],n[++r]);I.__c&&I.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){I.__e(s,o.__v)}})}function Fu(e,t,n,r,o,s,i,a,u){var l,f,c,m,h,_,y,g=n.props,b=t.props,S=t.type;if(S==="svg"?o="http://www.w3.org/2000/svg":S==="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((h=s[l])&&"setAttribute"in h==!!S&&(S?h.localName===S:h.nodeType===3)){e=h,s[l]=null;break}}if(e==null){if(S===null)return document.createTextNode(b);e=document.createElementNS(o,S,b.is&&b),a&&(I.__m&&I.__m(t,s),a=!1),s=null}if(S===null)g===b||a&&e.data===b||(e.data=b);else{if(s=s&&dn.call(e.childNodes),g=n.props||un,!a&&s!=null)for(g={},l=0;l<e.attributes.length;l++)g[(h=e.attributes[l]).name]=h.value;for(l in g)if(h=g[l],l!="children"){if(l=="dangerouslySetInnerHTML")c=h;else if(!(l in b)){if(l=="value"&&"defaultValue"in b||l=="checked"&&"defaultChecked"in b)continue;kn(e,l,null,h,o)}}for(l in b)h=b[l],l=="children"?m=h:l=="dangerouslySetInnerHTML"?f=h:l=="value"?_=h:l=="checked"?y=h:a&&typeof h!="function"||g[l]===h||kn(e,l,h,g[l],o);if(f)a||c&&(f.__html===c.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(c&&(e.innerHTML=""),fi(e,Zn(m)?m:[m],t,n,r,S==="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&Ut(n,0),a,u),s!=null)for(l=s.length;l--;)ui(s[l]);a||(l="value",S==="progress"&&_==null?e.removeAttribute("value"):_!==void 0&&(_!==e[l]||S==="progress"&&!_||S==="option"&&_!==g[l])&&kn(e,l,_,g[l],o),l="checked",y!==void 0&&y!==e[l]&&kn(e,l,y,g[l],o))}return e}function Zr(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){I.__e(o,n)}}function mi(e,t,n){var r,o;if(I.unmount&&I.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Zr(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){I.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&mi(r[o],t,n||typeof e.type!="function");n||ui(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function $u(e,t,n){return this.constructor(e,n)}function ut(e,t,n){var r,o,s,i;I.__&&I.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],qr(t,e=(!r&&n||t).__k=p(Le,null,[e]),o||un,un,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?dn.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,i),hi(s,e,i)}function Jr(e,t){ut(e,t,Jr)}function Yr(e,t,n){var r,o,s,i,a=Xe({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?r=t[s]:s=="ref"?o=t[s]:a[s]=t[s]===void 0&&i!==void 0?i[s]:t[s];return arguments.length>2&&(a.children=arguments.length>3?dn.call(arguments,2):n),rn(e.type,a,r||e.key,o||e.ref,null)}function pi(e,t){var n={__c:t="__cC"+ii++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,s;return this.getChildContext||(o=new Set,(s={})[t]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(i){this.props.value!==i.value&&o.forEach(function(a){a.__e=!0,Rr(a)})},this.sub=function(i){o.add(i);var a=i.componentWillUnmount;i.componentWillUnmount=function(){o&&o.delete(i),a&&a.call(i)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}dn=ai.slice,I={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},oi=0,Ve.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Xe({},this.state),typeof e=="function"&&(e=e(Xe({},n),this.props)),e&&Xe(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Rr(this))},Ve.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Rr(this))},Ve.prototype.render=Le,ft=[],si=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$r=function(e,t){return e.__v.__b-t.__v.__b},Nn.__r=0,Wr=0,Mr=Oo(!1),Ir=Oo(!0),ii=0;function Kr(){return(Kr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Mu=["context","children"];function Iu(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var s,i,a={},u=Object.keys(r);for(i=0;i<u.length;i++)o.indexOf(s=u[i])>=0||(a[s]=r[s]);return a}(e,Mu);return Yr(t,n)}function Ru(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=p(Iu,Kr({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],s={},i=0,a=n.attributes,u=n.childNodes;for(i=a.length;i--;)a[i].name!=="slot"&&(s[a[i].name]=a[i].value,s[_i(a[i].name)]=a[i].value);for(i=u.length;i--;){var l=t(u[i],null),f=u[i].slot;f?s[f]=p(Uo,{name:f},l):o[i]=l}var c=r?p(Uo,null,o):o;return p(r||n.nodeName.toLowerCase(),s,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Jr:ut)(this._vdom,this._root)}function _i(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Nu(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[_i(e)]=n,this._vdom=Yr(this._vdom,r),ut(this._vdom,this._root)}}function Du(){ut(this._vdom=null,this._root)}function Uo(e,t){var n=this;return p("slot",Kr({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function Pu(e,t,n,r){function o(){var s=Reflect.construct(HTMLElement,[],o);return s._vdomComponent=e,s._root=s,s}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=Ru,o.prototype.attributeChangedCallback=Nu,o.prototype.disconnectedCallback=Du,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(s){Object.defineProperty(o.prototype,s,{get:function(){return this._vdom.props[s]},set:function(i){this._vdom?this.attributeChangedCallback(s,null,i):(this._props||(this._props={}),this._props[s]=i,this.connectedCallback());var a=typeof i;i!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(s,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function gi(e,t){Pu(e,t)}var tt,L,br,Vo,Vt=0,wi=[],ee=I,Ho=ee.__b,Bo=ee.__r,Lo=ee.diffed,jo=ee.__c,zo=ee.unmount,Go=ee.__;function bt(e,t){ee.__h&&ee.__h(L,e,Vt||t),Vt=0;var n=L.__H||(L.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Wt(e){return Vt=1,Jn(yi,e)}function Jn(e,t,n){var r=bt(tt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):yi(void 0,t),function(a){var u=r.__N?r.__N[0]:r.__[0],l=r.t(u,a);u!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=L,!L.u)){var o=function(a,u,l){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(m){return!!m.__c});if(f.every(function(m){return!m.__N}))return!s||s.call(this,a,u,l);var c=!1;return f.forEach(function(m){if(m.__N){var h=m.__[0];m.__=m.__N,m.__N=void 0,h!==m.__[0]&&(c=!0)}}),!(!c&&r.__c.props===a)&&(!s||s.call(this,a,u,l))};L.u=!0;var s=L.shouldComponentUpdate,i=L.componentWillUpdate;L.componentWillUpdate=function(a,u,l){if(this.__e){var f=s;s=void 0,o(a,u,l),s=f}i&&i.call(this,a,u,l)},L.shouldComponentUpdate=o}return r.__N||r.__}function qt(e,t){var n=bt(tt++,3);!ee.__s&&oo(n.__H,t)&&(n.__=e,n.i=t,L.__H.__h.push(n))}function vt(e,t){var n=bt(tt++,4);!ee.__s&&oo(n.__H,t)&&(n.__=e,n.i=t,L.__h.push(n))}function Xr(e){return Vt=5,hn(function(){return{current:e}},[])}function Qr(e,t,n){Vt=6,vt(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function hn(e,t){var n=bt(tt++,7);return oo(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function eo(e,t){return Vt=8,hn(function(){return e},t)}function to(e){var t=L.context[e.__c],n=bt(tt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(L)),t.props.value):e.__}function no(e,t){ee.useDebugValue&&ee.useDebugValue(t?t(e):e)}function Ou(e){var t=bt(tt++,10),n=Wt();return t.__=e,L.componentDidCatch||(L.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function ro(){var e=bt(tt++,11);if(!e.__){for(var t=L.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Uu(){for(var e;e=wi.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Mn),e.__H.__h.forEach(Nr),e.__H.__h=[]}catch(t){e.__H.__h=[],ee.__e(t,e.__v)}}ee.__b=function(e){L=null,Ho&&Ho(e)},ee.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Go&&Go(e,t)},ee.__r=function(e){Bo&&Bo(e),tt=0;var t=(L=e.__c).__H;t&&(br===L?(t.__h=[],L.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(Mn),t.__h.forEach(Nr),t.__h=[],tt=0)),br=L},ee.diffed=function(e){Lo&&Lo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(wi.push(t)!==1&&Vo===ee.requestAnimationFrame||((Vo=ee.requestAnimationFrame)||Vu)(Uu)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),br=L=null},ee.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Mn),n.__h=n.__h.filter(function(r){return!r.__||Nr(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],ee.__e(r,n.__v)}}),jo&&jo(e,t)},ee.unmount=function(e){zo&&zo(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Mn(r)}catch(o){t=o}}),n.__H=void 0,t&&ee.__e(t,n.__v))};var Wo=typeof requestAnimationFrame=="function";function Vu(e){var t,n=function(){clearTimeout(r),Wo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Wo&&(t=requestAnimationFrame(n))}function Mn(e){var t=L,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),L=t}function Nr(e){var t=L;e.__c=e.__(),L=t}function oo(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function yi(e,t){return typeof t=="function"?t(e):t}function Dr(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Dn(e,t){this.props=e,this.context=t}function bi(e,t){function n(o){var s=this.props.ref,i=s==o.ref;return!i&&s&&(s.call?s(null):s.current=null),t?!t(this.props,o)||!i:Dr(this.props,o)}function r(o){return this.shouldComponentUpdate=n,p(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Dn.prototype=new Ve).isPureReactComponent=!0,Dn.prototype.shouldComponentUpdate=function(e,t){return Dr(this.props,e)||Dr(this.state,t)};var qo=I.__b;I.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),qo&&qo(e)};var Hu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Yn(e){function t(n){if(!("ref"in n))return e(n,null);var r=n.ref;delete n.ref;var o=e(n,r);return n.ref=r,o}return t.$$typeof=Hu,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Zo=function(e,t){return e==null?null:et(et(e).map(t))},vi={map:Zo,forEach:Zo,count:function(e){return e?et(e).length:0},only:function(e){var t=et(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:et},Bu=I.__e;I.__e=function(e,t,n,r){if(e.then){for(var o,s=t;s=s.__;)if((o=s.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}Bu(e,t,n,r)};var Jo=I.unmount;function xi(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=function(r,o){for(var s in o)r[s]=o[s];return r}({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return xi(r,t,n)})),e}function Ci(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Ci(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function on(){this.__u=0,this.t=null,this.__b=null}function Si(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ki(e){var t,n,r;function o(s){if(t||(t=e()).then(function(i){n=i.default||i},function(i){r=i}),r)throw r;if(!n)throw t;return p(n,s)}return o.displayName="Lazy",o.__f=!0,o}function Mt(){this.u=null,this.o=null}I.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Jo&&Jo(e)},(on.prototype=new Ve).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=Si(r.__v),s=!1,i=function(){s||(s=!0,n.__R=null,o?o(a):a())};n.__R=i;var a=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Ci(u,u.__c.__P,u.__c.__O)}var l;for(r.setState({__a:r.__b=null});l=r.t.pop();)l.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},on.prototype.componentWillUnmount=function(){this.t=[]},on.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=xi(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&p(Le,null,e.fallback);return o&&(o.__u&=-33),[p(Le,null,t.__a?null:e.children),o]};var Yo=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Lu(e){return this.getChildContext=function(){return e.context},e.children}function ju(e){var t=this,n=e.i;t.componentWillUnmount=function(){ut(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),ut(p(Lu,{context:t.context},e.__v),t.l)}function Ei(e,t){var n=p(ju,{__v:e,i:t});return n.containerInfo=t,n}(Mt.prototype=new Ve).__a=function(e){var t=this,n=Si(t.__v),r=t.o.get(e);return r[0]++,function(o){var s=function(){t.props.revealOrder?(r.push(o),Yo(t,e,r)):o()};n?n(s):s()}},Mt.prototype.render=function(e){this.u=null,this.o=new Map;var t=et(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Mt.prototype.componentDidUpdate=Mt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Yo(e,n,t)})};var Ai=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,zu=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Gu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Wu=/[A-Z0-9]/g,qu=typeof document<"u",Zu=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ti(e,t,n){return t.__k==null&&(t.textContent=""),ut(e,t),typeof n=="function"&&n(),e?e.__c:null}function Fi(e,t,n){return Jr(e,t),typeof n=="function"&&n(),e?e.__c:null}Ve.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ve.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ko=I.event;function Ju(){}function Yu(){return this.cancelBubble}function Ku(){return this.defaultPrevented}I.event=function(e){return Ko&&(e=Ko(e)),e.persist=Ju,e.isPropagationStopped=Yu,e.isDefaultPrevented=Ku,e.nativeEvent=e};var so,Xu={enumerable:!1,configurable:!0,get:function(){return this.class}},Xo=I.vnode;I.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={},s=r.indexOf("-")===-1;for(var i in n){var a=n[i];if(!(i==="value"&&"defaultValue"in n&&a==null||qu&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var u=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&a===!0?a="":u==="translate"&&a==="no"?a=!1:u[0]==="o"&&u[1]==="n"?u==="ondoubleclick"?i="ondblclick":u!=="onchange"||r!=="input"&&r!=="textarea"||Zu(n.type)?u==="onfocus"?i="onfocusin":u==="onblur"?i="onfocusout":Gu.test(i)&&(i=u):u=i="oninput":s&&zu.test(i)?i=i.replace(Wu,"-$&").toLowerCase():a===null&&(a=void 0),u==="oninput"&&o[i=u]&&(i="oninputCapture"),o[i]=a}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=et(n.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=et(n.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Xu)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=Ai,Xo&&Xo(e)};var Qo=I.__r;I.__r=function(e){Qo&&Qo(e),so=e.__c};var es=I.diffed;I.diffed=function(e){es&&es(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),so=null};var $i={ReactCurrentDispatcher:{current:{readContext:function(e){return so.__n[e.__c].props.value},useCallback:eo,useContext:to,useDebugValue:no,useDeferredValue:ao,useEffect:qt,useId:ro,useImperativeHandle:Qr,useInsertionEffect:lo,useLayoutEffect:vt,useMemo:hn,useReducer:Jn,useRef:Xr,useState:Wt,useSyncExternalStore:co,useTransition:uo}}},Qu="18.3.1";function Mi(e){return p.bind(null,e)}function mn(e){return!!e&&e.$$typeof===Ai}function Ii(e){return mn(e)&&e.type===Le}function Ri(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ni(e){return mn(e)?Yr.apply(null,arguments):e}function Di(e){return!!e.__k&&(ut(null,e),!0)}function Pi(e){return e&&(e.base||e.nodeType===1&&e)||null}var Oi=function(e,t){return e(t)},Ui=function(e,t){return e(t)},Vi=Le;function io(e){e()}function ao(e){return e}function uo(){return[!1,io]}var lo=vt,Hi=mn;function co(e,t){var n=t(),r=Wt({h:{__:n,v:t}}),o=r[0].h,s=r[1];return vt(function(){o.__=n,o.v=t,vr(o)&&s({h:o})},[e,n,t]),qt(function(){return vr(o)&&s({h:o}),e(function(){vr(o)&&s({h:o})})},[e]),n}function vr(e){var t,n,r=e.v,o=e.__;try{var s=r();return!((t=o)===(n=s)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var Bi={useState:Wt,useId:ro,useReducer:Jn,useEffect:qt,useLayoutEffect:vt,useInsertionEffect:lo,useTransition:uo,useDeferredValue:ao,useSyncExternalStore:co,startTransition:io,useRef:Xr,useImperativeHandle:Qr,useMemo:hn,useCallback:eo,useContext:to,useDebugValue:no,version:"18.3.1",Children:vi,render:Ti,hydrate:Fi,unmountComponentAtNode:Di,createPortal:Ei,createElement:p,createContext:pi,createFactory:Mi,cloneElement:Ni,createRef:li,Fragment:Le,isValidElement:mn,isElement:Hi,isFragment:Ii,isMemo:Ri,findDOMNode:Pi,Component:Ve,PureComponent:Dn,memo:bi,forwardRef:Yn,flushSync:Ui,unstable_batchedUpdates:Oi,StrictMode:Vi,Suspense:on,SuspenseList:Mt,lazy:ki,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$i};const el=Object.freeze(Object.defineProperty({__proto__:null,Children:vi,Component:Ve,Fragment:Le,PureComponent:Dn,StrictMode:Vi,Suspense:on,SuspenseList:Mt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$i,cloneElement:Ni,createContext:pi,createElement:p,createFactory:Mi,createPortal:Ei,createRef:li,default:Bi,findDOMNode:Pi,flushSync:Ui,forwardRef:Yn,hydrate:Fi,isElement:Hi,isFragment:Ii,isMemo:Ri,isValidElement:mn,lazy:ki,memo:bi,render:Ti,startTransition:io,unmountComponentAtNode:Di,unstable_batchedUpdates:Oi,useCallback:eo,useContext:to,useDebugValue:no,useDeferredValue:ao,useEffect:qt,useErrorBoundary:Ou,useId:ro,useImperativeHandle:Qr,useInsertionEffect:lo,useLayoutEffect:vt,useMemo:hn,useReducer:Jn,useRef:Xr,useState:Wt,useSyncExternalStore:co,useTransition:uo,version:Qu},Symbol.toStringTag,{value:"Module"}));function je(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function tl(e){return e!=null&&typeof e.GetEnumerator=="function"}function nl(e){return e!=null&&typeof e.CompareTo=="function"}function rl(e){return e!=null&&typeof e.Equals=="function"}function Li(e){return e!=null&&typeof e.GetHashCode=="function"}function Pr(e){return e!=null&&typeof e.Dispose=="function"}function G(e){Pr(e)&&e.Dispose()}function te(){return null}function Pn(e,t){var n,r;return((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===((r=Object.getPrototypeOf(t))==null?void 0:r.constructor)}class ol{constructor(t){this.iter=t,this.current=te()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this.iter.next();return this.current=t.value,!t.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function ae(e){return tl(e)?e.GetEnumerator():new ol(e[Symbol.iterator]())}function Kn(e){return{next(){const t=e["System.Collections.IEnumerator.MoveNext"](),n=t?e["System.Collections.Generic.IEnumerator`1.get_Current"]():void 0;return{done:!t,value:n}}}}class sl{constructor(t){this.factory=t,this.isValueCreated=!1}get Value(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}get IsValueCreated(){return this.isValueCreated}}function O(e,t){return e.toString(10).padStart(t,"0")}function il(e,t,n){return e.toString(10).padStart(t,"0").padEnd(n,"0")}function ts(e){const t=e;return typeof t.offset=="number"?t.offset:e.kind===1?0:e.getTimezoneOffset()*-6e4}function al(e,t){return e=e<0&&t!=null&&t!==10?65535+e+1:e,e.toString(t)}function mt(e,t){return e=e<0&&t!=null&&t!==10?4294967295+e+1:e,e.toString(t)}class Qe{static id(t){return Qe.idMap.has(t)||Qe.idMap.set(t,++Qe.count),Qe.idMap.get(t)}}Qe.idMap=new WeakMap;Qe.count=0;function Xn(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=n*33^e.charCodeAt(t++);return n}function Oe(e){return e*2654435761|0}function ji(e){return Xn(e.toString(32))}function pn(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const o=e[r];t=(t<<5)+t^o}return t}function ul(e){if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Oe(e);case"bigint":return ji(e);case"string":return Xn(e);default:return Oe(Qe.id(e))}}function ll(e){return Li(e)?e.GetHashCode():ul(e)}function cl(e){return e.getTime()}function fl(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=nt(e[r]);return pn(n)}function nt(e){var t;if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Oe(e);case"bigint":return ji(e);case"string":return Xn(e);default:{if(Li(e))return e.GetHashCode();if(je(e))return fl(e);if(e instanceof Date)return cl(e);if(((t=Object.getPrototypeOf(e))==null?void 0:t.constructor)===Object){const n=Object.values(e).map(r=>nt(r));return pn(n)}else return Oe(Qe.id(e))}}}function Qn(e){return ll(e)}function Or(e,t,n){if(e==null)return t==null;if(t==null||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function zi(e,t){return Or(e,t,de)}function dl(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;n.sort(),r.sort();for(let o=0;o<n.length;o++)if(n[o]!==r[o]||!de(e[n[o]],t[r[o]]))return!1;return!0}function de(e,t){var n;return e===t?!0:e==null?t==null:t==null?!1:rl(e)?e.Equals(t):je(e)?je(t)&&zi(e,t):typeof e!="object"?!1:e instanceof Date?t instanceof Date&&Gi(e,t)===0:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object&&dl(e,t)}function Gi(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+ts(e),r=t.getTime()+ts(t)),n===r?0:n<r?-1:1}function er(e,t){return e===t?0:e<t?-1:1}function hl(e,t,n){if(e==null)return t==null?0:1;if(t==null)return-1;if(e.length!==t.length)return e.length<t.length?-1:1;for(let r=0,o=0;r<e.length;r++)if(o=n(e[r],t[r]),o!==0)return o;return 0}function tr(e,t){return hl(e,t,Me)}function ml(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return n.length<r.length?-1:1;n.sort(),r.sort();for(let o=0,s=0;o<n.length;o++){const i=n[o];if(i!==r[o])return i<r[o]?-1:1;if(s=Me(e[i],t[i]),s!==0)return s}return 0}function Me(e,t){var n;return e===t?0:e==null?t==null?0:-1:t==null?1:nl(e)?e.CompareTo(t):je(e)?je(t)?tr(e,t):-1:typeof e!="object"?e<t?-1:1:e instanceof Date?t instanceof Date?Gi(e,t):-1:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object?ml(e,t):-1}function k(e){const t={};for(const n of e)t[n[0]]=n[1];return t}function pl(e){je(e)?e.splice(0):e.clear()}const nr=new WeakMap;function U(e){if(e==null)return null;const t=(n,r)=>e(n)(r);return nr.set(t,e),t}function Ke(e){return nr.get(e)??(t=>n=>e(t,n))}function Ur(e){if(e==null)return null;const t=(n,r,o)=>e(n)(r)(o);return nr.set(t,e),t}function xr(e){return nr.get(e)??(t=>n=>r=>e(t,n,r))}function _l(e){let t=0,n="[";for(const r of e){if(t===0)n+=_e(r);else if(t===100){n+="; ...";break}else n+="; "+_e(r);t++}return n+"]"}function _e(e,t=0){var n;if(e!=null&&typeof e=="object"){if(typeof e.toString=="function")return e.toString();if(Symbol.iterator in e)return _l(e);{const r=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor;return r===Object&&t<10?"{ "+Object.entries(e).map(([o,s])=>o+" = "+_e(s,t+1)).join(`
2
+ `)+" }":(r==null?void 0:r.name)??""}}return String(e)}function gl(e,t){if(t.length===0)return e;{let n,r=!0;return t.length===1?(n=_e(t[0]),r=n.indexOf(" ")>=0):n=t.map(o=>_e(o)).join(", "),e+(r?" (":" ")+n+(r?")":"")}}class H{get name(){return this.cases()[this.tag]}toJSON(){return this.fields.length===0?this.name:[this.name].concat(this.fields)}toString(){return gl(this.name,this.fields)}GetHashCode(){const t=this.fields.map(n=>nt(n));return t.splice(0,0,Oe(this.tag)),pn(t)}Equals(t){return this===t?!0:Pn(this,t)&&this.tag===t.tag?zi(this.fields,t.fields):!1}CompareTo(t){return this===t?0:Pn(this,t)?this.tag===t.tag?tr(this.fields,t.fields):this.tag<t.tag?-1:1:-1}}function wl(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}function yl(e){return"{ "+Object.entries(e).map(([t,n])=>t+" = "+_e(n)).join(`
3
+ `)+" }"}function bl(e){const t=Object.values(e).map(n=>nt(n));return pn(t)}function vl(e,t){if(e===t)return!0;if(Pn(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!de(e[n[r]],t[n[r]]))return!1;return!0}else return!1}function xl(e,t){if(e===t)return 0;if(Pn(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=Me(e[n[r]],t[n[r]]);if(o!==0)return o}return 0}else return-1}class q{toJSON(){return wl(this)}toString(){return yl(this)}GetHashCode(){return bl(this)}Equals(t){return vl(this,t)}CompareTo(t){return xl(this,t)}}class Ie{get contents(){return this.getter()}set contents(t){this.setter(t)}constructor(t,n){typeof n=="function"?(this.getter=t,this.setter=n):(this.getter=()=>t,this.setter=r=>{t=r})}}class Cl{constructor(t){this.message=t}}function Sl(e){return e instanceof Cl||e instanceof Error}function kl(e){return e instanceof Promise}function On(e){return Sl(e)||kl(e)?e:new Error(String(e))}const Zt=Symbol("numeric");function Wi(e){return typeof e=="number"||typeof e=="bigint"||(e==null?void 0:e[Zt])}function El(e,t){return typeof e=="number"||typeof e=="bigint"?e<t?-1:e>t?1:0:e.CompareTo(t)}function Vr(e,t){return typeof e=="number"?e*t:typeof e=="bigint"?e*BigInt(t):e[Zt]().multiply(t)}function In(e,t){return typeof e=="number"?e.toFixed(t):typeof e=="bigint"?e:e[Zt]().toFixed(t)}function Un(e,t){return typeof e=="number"?e.toPrecision(t):typeof e=="bigint"?e:e[Zt]().toPrecision(t)}function Vn(e,t){return typeof e=="number"?e.toExponential(t):typeof e=="bigint"?e:e[Zt]().toExponential(t)}function Hn(e){return typeof e=="number"?(Number(e)>>>0).toString(16):typeof e=="bigint"?BigInt.asUintN(64,e).toString(16):e[Zt]().toHex()}class Al{constructor(t,n,r,o){this.declaringType=t,this.tag=n,this.name=r,this.fields=o}}class ke{constructor(t,n,r,o,s,i,a){this.fullname=t,this.generics=n,this.construct=r,this.parent=o,this.fields=s,this.cases=i,this.enumCases=a}toString(){return z(this)}GetHashCode(){return qi(this)}Equals(t){return Hr(this,t)}}function Se(e){return e.generics!=null?e.generics:[]}function qi(e){const t=Xn(e.fullname),n=Se(e).map(qi);return pn([t,...n])}function Hr(e,t){return e.fullname===""?t.fullname===""&&Or(ln(e),ln(t),([n,r],[o,s])=>n===o&&Hr(r,s)):e.fullname===t.fullname&&Or(Se(e),Se(t),Hr)}function xt(e,t,n,r){return new ke(e,t,n,void 0,r)}function Jt(...e){return new ke("",void 0,void 0,void 0,()=>e)}function Tl(e,t,n,r){const o=new ke(e,t,n,void 0,void 0,()=>{const s=n.prototype.cases();return r().map((i,a)=>new Al(o,a,s[a],i))});return o}function fo(e){return new ke("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Ht(e){return new ke("Microsoft.FSharp.Collections.FSharpList`1",[e])}function Fl(e){return new ke("[]",[e])}const $l=new ke("System.Object"),ce=new ke("System.String"),Zi=new ke("System.Boolean");function Rt(e){if(Array.isArray(e))return e[0];if(e instanceof ke){const t=_n(e);if(t!=null)return Rt(t)+"[]";{const n=e.fullname.lastIndexOf(".");return n===-1?e.fullname:e.fullname.substr(n+1)}}else return e.name}function z(e){const t=_n(e);return t!=null?z(t)+"[]":e.generics==null||e.generics.length===0?e.fullname:e.fullname+"["+e.generics.map(n=>z(n)).join(",")+"]"}function Ji(e){return _n(e)!=null}function _n(e){var t;return e.fullname==="[]"&&((t=e.generics)==null?void 0:t.length)===1?e.generics[0]:void 0}function Yi(e){return e.generics!=null&&e.generics.length>0}function ho(e){return e.enumCases!=null&&e.enumCases.length>0}function Ki(e){return e.generics==null?e:new ke(e.fullname,e.generics.map(()=>$l))}function Xi(e){var t;return(t=e.generics)==null?void 0:t[0]}function At(e){if(ho(e)&&e.enumCases!=null)return e.enumCases.map(t=>t[1]);throw new Error(`${e.fullname} is not an enum type`)}function Ml(e,t){if(e.enumCases!=null)if(typeof t=="string"){for(const n of e.enumCases)if(n[0]===t)return n;throw new Error(`'${t}' was not found in ${e.fullname}`)}else{for(const n of e.enumCases)if(n[1]===t)return n;return["",t]}else throw new Error(`${e.fullname} is not an enum type`)}function Tt(e,t){const n=parseInt(t,10);return Ml(e,isNaN(n)?t:n)[1]}function Qi(e){if(e.cases!=null)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function ln(e){if(e.fields!=null)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function ea(e){if(mo(e)&&e.generics!=null)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function ta(e){return e instanceof ke?e.cases!=null:e instanceof H}function na(e){return e instanceof ke?e.fields!=null:e instanceof q}function mo(e){return e.fullname.startsWith("System.Tuple")}function Il(e,t){const r=Qi(t)[e.tag];if(r==null)throw new Error(`Cannot find case ${e.name} in union type`);return[r,e.fields]}function ra(e){return e.fields==null?[]:e.fields}function Rl(e,t){return e[t[0]]}function Nl(e,t){const n=(e.fields||[]).length;if(t.length!==n)throw new Error(`Expected an array of length ${n} but got ${t.length}`);const r=e.declaringType.construct;return r==null?{}:(e.declaringType.cases?e.declaringType.cases().length==1:!1)?new r(...t):new r(e.tag,t)}function Dl(e,t){const n=ln(e);if(n.length!==t.length)throw new Error(`Expected an array of length ${n.length} but got ${t.length}`);return e.construct!=null?new e.construct(...t):n.reduce((r,[o,s],i)=>(r[o]=t[i],r),{})}function Pl(e,t){return e}class _t{constructor(t){this.value=t}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return nt(this.value)}Equals(t){return t==null?!1:de(this.value,t instanceof _t?t.value:t)}CompareTo(t){return t==null?1:Me(this.value,t instanceof _t?t.value:t)}}function v(e){if(e==null)throw new Error("Option has no value");return e instanceof _t?e.value:e}function ns(e){return e instanceof _t?e.value:e}function K(e){return e==null||e instanceof _t?new _t(e):e}function Bn(e){return e==null?[]:[v(e)]}function ze(e,t){return e!=null?v(e):t}function Ol(e,t){return e!=null?v(e):t()}function Ul(e,t){return e??t()}function po(e,t){return t!=null?K(e(v(t))):void 0}const Vl=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Hl=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Bl=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ll=["January","February","March","April","May","June","July","August","September","October","November","December"];function be(e,t,n){let r=0,o=t;for(;o<e.length&&e[o]===n;)o++,r++;return r}function rs(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function jl(e,t){let n=t;const r=e[t];let o="",s=!1;for(;t<e.length;){t++;const i=e[t];if(i===r){s=!0;break}else if(i==="\\")if(t<e.length)t++,o+=e[t];else throw new Error("Invalid string format");else o+=i}if(!s)throw new Error(`Invalid string format could not find matching quote for ${r}`);return[o,t-n+1]}function _o(e,t,n){let r=0,o=0,s="";const i=n?gn(e.getTime(),1):e;for(;r<t.length;){const a=t[r];switch(a){case"d":switch(o=be(t,r,"d"),r+=o,o){case 1:s+=ss(i);break;case 2:s+=O(ss(i),2);break;case 3:s+=Vl[us(i)];break;case 4:s+=Hl[us(i)];break}break;case"f":if(o=be(t,r,"f"),r+=o,o<=3){const g=10**(3-o);s+=O(Math.floor(An(i)/g),o)}else o<=7&&(s+=(""+An(i)).padEnd(o,"0"));break;case"F":if(o=be(t,r,"F"),r+=o,o<=3){const g=10**(3-o),b=Math.floor(An(i)/g);b!=0&&(s+=O(b,o))}else if(o<=7){const g=An(i);g!=0&&(s+=O(g,3))}break;case"g":o=be(t,r,"g"),r+=o,o<=2&&(s+="A.D.");break;case"h":switch(o=be(t,r,"h"),r+=o,o){case 1:s+=En(i)%12;break;case 2:s+=O(En(i)%12,2);break}break;case"H":switch(o=be(t,r,"H"),r+=o,o){case 1:s+=En(i);break;case 2:s+=O(En(i),2);break}break;case"K":switch(o=be(t,r,"K"),r+=o,o){case 1:switch(os(i)){case 1:s+="Z";break;case 2:s+=Nt(i.getTimezoneOffset()*-6e4);break}break}break;case"m":switch(o=be(t,r,"m"),r+=o,o){case 1:s+=is(i);break;case 2:s+=O(is(i),2);break}break;case"M":switch(o=be(t,r,"M"),r+=o,o){case 1:s+=Tn(i);break;case 2:s+=O(Tn(i),2);break;case 3:s+=Bl[Tn(i)-1];break;case 4:s+=Ll[Tn(i)-1];break}break;case"s":switch(o=be(t,r,"s"),r+=o,o){case 1:s+=as(i);break;case 2:s+=O(as(i),2);break}break;case"t":switch(o=be(t,r,"t"),r+=o,o){case 1:s+=i.getHours()<12?"A":"P";break;case 2:s+=i.getHours()<12?"AM":"PM";break}break;case"y":switch(o=be(t,r,"y"),r+=o,o){case 1:s+=i.getFullYear()%100;break;case 2:s+=O(i.getFullYear()%100,2);break;case 3:s+=O(i.getFullYear(),3);break;case 4:s+=O(i.getFullYear(),4);break;case 5:s+=O(i.getFullYear(),5);break}break;case"z":o=be(t,r,"z"),r+=o;let u="";switch(os(i)){case 1:u="+00:00";break;case 2:u=Nt(i.getTimezoneOffset()*-6e4);break;case 0:u=Nt(Xl(i).getTimezoneOffset()*-6e4);break}const l=u[0]==="-"?"-":"+",f=parseInt(u.substring(1,3),10),c=parseInt(u.substring(4,6),10);switch(o){case 1:s+=`${l}${f}`;break;case 2:s+=`${l}${O(f,2)}`;break;default:s+=`${l}${O(f,2)}:${O(c,2)}`;break}break;case":":s+=":",r++;break;case"/":s+="/",r++;break;case"'":case'"':const[m,h]=jl(t,r);s+=m,r+=h;break;case"%":const _=rs(t,r);if(_>=0&&_!==37)r+=2,s+=_o(i,String.fromCharCode(_),n);else throw new Error("Invalid format string");break;case"\\":const y=rs(t,r);if(y>=0)r+=2,s+=String.fromCharCode(y);else throw new Error("Invalid format string");break;default:r++,s+=a;break}}return s}function os(e){return e.kind||0}function Nt(e){const t=e<0;e=Math.abs(e);const n=~~(e/36e5),r=e%36e5/6e4;return(t?"-":"+")+O(n,2)+":"+O(r,2)}function Ln(e,t){const n=e.toISOString();return t==="first"?n.substring(0,n.indexOf("T")):n.substring(n.indexOf("T")+1,n.length-1)}function zl(e,t){if(t)return e.toISOString();{const n=e.kind==null?!0:e.kind===2;return O(e.getFullYear(),4)+"-"+O(e.getMonth()+1,2)+"-"+O(e.getDate(),2)+"T"+O(e.getHours(),2)+":"+O(e.getMinutes(),2)+":"+O(e.getSeconds(),2)+"."+O(e.getMilliseconds(),3)+(n?Nt(e.getTimezoneOffset()*-6e4):"")}}function Gl(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+Nt(t)}function Wl(e,t){const n=new Date(e.getTime()+(e.offset??0));if(typeof t!="string")return n.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+Nt(e.offset??0);if(t.length===1)switch(t){case"D":case"d":return Ln(n,"first");case"T":case"t":return Ln(n,"second");case"O":case"o":return Gl(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}else return _o(n,t,!0)}function ql(e,t){const n=e.kind===1;if(typeof t!="string")return n?e.toUTCString():e.toLocaleString();if(t.length===1)switch(t){case"D":case"d":return n?Ln(e,"first"):e.toLocaleDateString();case"T":case"t":return n?Ln(e,"second"):e.toLocaleTimeString();case"O":case"o":return zl(e,n);default:throw new Error("Unrecognized Date print format")}else return _o(e,t,n)}function rr(e,t,n){return e.offset!=null?Wl(e,t):ql(e,t)}function gn(e,t){const n=new Date(e);return n.kind=(t??0)|0,n}function Zl(){return gn(-621355968e5,1)}function oa(e){function t(){throw new Error(`The string is not a valid Date: ${e}`)}(e==null||e.trim()==="")&&t(),e.length===10&&e[4]==="-"&&e[7]==="-"&&(e+="T00:00:00");let n=new Date(e),r=null;if(isNaN(n.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(o!=null){let s,i=0;if(o[2]!=null){const a=o[2].split(":"),u=parseInt(a[0],10);i=u*3600+parseInt(a[1]||"0",10)*60+parseFloat(a[2]||"0"),o[3]!=null&&o[3].toUpperCase()==="PM"&&u<12&&(i+=720)}if(o[4]!=null){if(o[1]!=null)s=new Date(o[1]+" UTC");else{const a=new Date;s=new Date(a.getUTCFullYear()+"/"+(a.getUTCMonth()+1)+"/"+a.getUTCDate())}if(o[4]==="Z")r="Z";else{let a=parseInt(o[5],10)*60+parseInt(o[6]||"0",10);o[4][0]==="-"&&(a*=-1),r=a,i-=a*60}}else if(o[1]!=null)s=new Date(o[1]);else{const a=new Date;s=new Date(a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate())}n=new Date(s.getTime()+i*1e3),n=new Date(n.getTime()+(n.getTimezoneOffset()-s.getTimezoneOffset())*6e4)}else t();isNaN(n.getTime())&&t()}return[n,r]}function Jl(e,t=!1){const[n,r]=oa(e),o=r!=null?t&&r==="Z"?1:2:0;return gn(n.getTime(),o)}function Yl(e,t){try{return t.contents=Jl(e),!0}catch{return!1}}function Kl(e){return e.kind===1?e:gn(e.getTime(),1)}function Xl(e){return e.kind===2?e:gn(e.getTime(),2)}function ss(e){return e.kind===1?e.getUTCDate():e.getDate()}function En(e){return e.kind===1?e.getUTCHours():e.getHours()}function An(e){return e.kind===1?e.getUTCMilliseconds():e.getMilliseconds()}function is(e){return e.kind===1?e.getUTCMinutes():e.getMinutes()}function Tn(e){return(e.kind===1?e.getUTCMonth():e.getMonth())+1}function as(e){return e.kind===1?e.getUTCSeconds():e.getSeconds()}function us(e){return e.kind===1?e.getUTCDay():e.getDay()}function Ql(e,t=0){if(t&-284)throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let n="gu";return n+=t&1?"i":"",n+=t&2?"m":"",n+=t&16?"s":"",new RegExp(e,n)}function go(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function ls(e,t,n=0){if(t==null)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=n;const r=[];let o,s=-1;for(;(o=e.exec(t))!=null;)o.index===s?e.lastIndex++:(s=o.index,r.push(o));return r}function ec(e,t,n,r,o=0){function s(){let i=arguments[0];if(r){r--;const a=[],u=arguments.length,l=typeof arguments[u-1]!="string";let f=l?u-3:u-2;for(let c=0;c<f;c++)a.push(arguments[c]);a.index=arguments[f++],a.input=arguments[f++],l&&(a.groups=arguments[f]),i=n(a)}return i}if(typeof e=="string"){const i=e;e=Ql(t,r??0),t=i,r=void 0}if(typeof n=="function")return r=r??-1,t.substring(0,o)+t.substring(o).replace(e,s);if(n=n.replace(/\$0/g,i=>"$&").replace(/\${([^}]+)}/g,"$<$1>"),r!=null){let i;const a=t.substring(o),u=ls(e,a),l=ls.length>r?(i=u[r-1],a.substring(0,i.index+i[0].length)):a;return t.substring(0,o)+l.replace(e,n)+t.substring(o+l.length)}else return t.replace(e,n)}const tn=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,tc=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function sa(e,t){return El(e,t)<0}function rt(e){return{input:e,cont:rc(e)}}function ia(e,t){return typeof t=="string"?e(t):t.cont(e)}function gt(e){return ia(t=>t,e)}function aa(e){return ia(t=>{throw new Error(t)},e)}function nc(e,t,n,r,o){let s="";if(t=t||"",o=o||"",Wi(e))switch(o.toLowerCase()!=="x"&&(sa(e,0)?(e=Vr(e,-1),s="-"):t.indexOf(" ")>=0?s=" ":t.indexOf("+")>=0&&(s="+")),r=r==null?null:parseInt(r,10),o){case"f":case"F":r=r??6,e=In(e,r);break;case"g":case"G":e=r!=null?Un(e,r):Un(e);break;case"e":case"E":e=r!=null?Vn(e,r):Vn(e);break;case"x":e=Hn(e);break;case"X":e=Hn(e).toUpperCase();break;default:e=String(e);break}else e instanceof Date?e=rr(e):e=_e(e);if(n=typeof n=="number"?n:parseInt(n,10),isNaN(n))e=s+e;else{const i=t.indexOf("0")>=0,a=t.indexOf("-")>=0,u=a||!i?" ":"0";u==="0"?(e=cn(e,n-s.length,u,a),e=s+e):e=cn(s+e,n,u,a)}return e}function ua(e,t,n,r="",o=-1){return(...s)=>{let i=r;const a=t.slice(),u=n.slice();for(const l of s){const[,,f,c,m,h]=u[0];let _=c;if(o>=0)_=o,o=-1;else if(_==="*"){if(l<0)throw new Error("Non-negative number required");o=l;continue}i+=a[0],i+=nc(l,f,_,m,h),a.splice(0,1),u.splice(0,1)}return u.length===0?(i+=a[0],e(i)):ua(e,a,u,i,o)}}function rc(e){return t=>{tn.lastIndex=0;const n=[],r=[];let o=0,s=tn.exec(e);for(;s;){const i=s.index+(s[1]||"").length;n.push(e.substring(o,i).replace(/%%/g,"%")),r.push(s),o=tn.lastIndex,tn.lastIndex-=1,s=tn.exec(e)}return n.length===0?t(e.replace(/%%/g,"%")):(n.push(e.substring(o).replace(/%%/g,"%")),ua(t,n,r))}}function oc(e,...t){let n;return n=e,n.replace(tc,(r,o,s,i,a,u)=>{if(o<0||o>=t.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let l=t[o];if(Wi(l))switch(a=a==null?null:parseInt(a,10),i){case"f":case"F":a=a??2,l=In(l,a);break;case"g":case"G":l=a!=null?Un(l,a):Un(l);break;case"e":case"E":l=a!=null?Vn(l,a):Vn(l);break;case"p":case"P":a=a??2,l=In(Vr(l,100),a)+" %";break;case"d":case"D":l=a!=null?Cr(String(l),a,"0"):String(l);break;case"x":case"X":l=a!=null?Cr(Hn(l),a,"0"):Hn(l),i==="X"&&(l=l.toUpperCase());break;default:if(u){let f="";l=u.replace(/([0#,]+)(\.[0#]+)?/,(c,m,h)=>{sa(l,0)&&(l=Vr(l,-1),f="-"),h=h==null?"":h.substring(1),l=In(l,Math.max(h.length,0));let[_,y]=l.split(".");y||(y="");const g=m.replace(/,/g,"").replace(/^#+/,"").length;_=Cr(_,g,"0");const b=h.replace(/#+$/,"").length;if(b>y.length?y=ac(y,b,"0"):b<y.length&&(y=y.substring(0,b)+y.substring(b).replace(/0+$/,"")),m.indexOf(",")>0){const S=_.length%3,M=Math.floor(_.length/3);let X=S>0?_.substr(0,S)+(M>0?",":""):"";for(let ue=0;ue<M;ue++)X+=_.substr(S+ue*3,3)+(ue<M-1?",":"");_=X}return y.length>0?_+"."+y:_}),l=f+l}}else l instanceof Date?l=rr(l,u||i):l=_e(l);return s=parseInt((s||" ").substring(1),10),isNaN(s)||(l=cn(String(l),Math.abs(s)," ",s<0)),l})}function sc(e){return typeof e!="string"||e.length===0}function ic(e){return typeof e!="string"||/^\s*$/.test(e)}function E(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function cn(e,t,n,r){n=n||" ",t=t-e.length;for(let o=0;o<t;o++)e=r?e+n:n+e;return e}function Cr(e,t,n){return cn(e,t,n)}function ac(e,t,n){return cn(e,t,n,!0)}function or(e,t,n,r){if(n=typeof n=="number"?n:void 0,r=typeof r=="number"?r:0,n&&n<0)throw new Error("Count cannot be less than zero");if(n===0)return[];const o=(r&1)===1,s=(r&2)===2;t=t||[],t=t.filter(f=>f).map(go),t=t.length>0?t:["\\s"];const i=[],a=new RegExp(t.join("|"),"g");let u=!0,l=0;do{const f=a.exec(e);if(f===null){const c=s?e.substring(l).trim():e.substring(l);(!o||c.length>0)&&i.push(c),u=!1}else{const c=s?e.substring(l,f.index).trim():e.substring(l,f.index);(!o||c.length>0)&&(n!=null&&i.length+1===n?(i.push(s?e.substring(l).trim():e.substring(l)),u=!1):i.push(c)),l=a.lastIndex}}while(u);return i}function uc(e,...t){if(t.length===0)return e.trim();const n="["+go(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}function lc(e,...t){return t.length===0?e.trimEnd():e.replace(new RegExp("["+go(t.join(""))+"]+$"),"")}function la(e,t,n){if(t+(n||0)>e.length)throw new Error("Invalid startIndex and/or length");return n!=null?e.substr(t,n):e.substr(t)}const ca="Collection was empty.";function fa(e,t){return new Array(t)}function cs(e,t){return e>t?e:t}function sr(e,t,n,r){const o=t|0;return e.fill(r,o,o+n)}function Ct(e,t,n){const r=t.length|0,o=fa(n,r);for(let s=0;s<=r-1;s++)Ge(o,s,e(V(s,t)));return o}function cc(e,t){const n=fa(t,1);return Ge(n,0,e),n}function fc(e){return e.slice().reverse()}function dc(e,t){return t.find(e)}function hc(e,t,n){const r=[];for(let o=0;o<=t.length-1;o++){const s=e(V(o,t));if(s!=null){const i=v(s);r.push(i)}}return de(n,te())?r:Ct(o=>o,r,n)}function ir(e,t,n){const r=e;return n.reduce(r,t)}function Br(e,t,n){return t==null}function V(e,t){if(e<0||e>=t.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");return t[e]}function Ge(e,t,n){if(t<0||t>=e.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");e[t]=n}function da(e,t,n){return t.reduceRight((r,o)=>e(o,r),n)}class we extends q{constructor(t,n){super(),this.head=t,this.tail=n}toString(){return"["+E("; ",this)+"]"}Equals(t){const n=this;return n===t?!0:((o,s)=>{e:for(;;){const i=o,a=s,u=i.tail,l=a.tail;if(u!=null)if(l!=null){const f=v(u),c=v(l);if(de(i.head,a.head)){o=f,s=c;continue e}else return!1}else return!1;else return l==null}})(n,t)}GetHashCode(){return((r,o,s)=>{e:for(;;){const i=r,a=o,u=s,l=u.tail;if(l!=null){const f=v(l);if(i>18)return a|0;r=i+1,o=(a<<1)+nt(u.head)+631*i,s=f;continue e}else return a|0}})(0,0,this)|0}toJSON(){const t=this;return Array.from(t)}CompareTo(t){return((o,s)=>{e:for(;;){const i=o,a=s,u=i.tail,l=a.tail;if(u!=null)if(l!=null){const f=v(u),c=v(l),m=Me(i.head,a.head)|0;if(m===0){o=f,s=c;continue e}else return m|0}else return 1;else return l!=null?-1:0}})(this,t)|0}GetEnumerator(){return pc(this)}[Symbol.iterator](){return Kn(ae(this))}"System.Collections.IEnumerable.GetEnumerator"(){return ae(this)}}class mc{constructor(t){this.xs=t,this.it=this.xs,this.current=te()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this,n=t.it.tail;if(n!=null){const r=v(n);return t.current=t.it.head,t.it=r,!0}else return!1}"System.Collections.IEnumerator.Reset"(){const t=this;t.it=t.xs,t.current=te()}Dispose(){}}function pc(e){return new mc(e)}function le(){return new we(te(),void 0)}function wn(e,t){return new we(e,t)}function wt(e){return e.tail==null}function _c(e){return((n,r)=>{e:for(;;){const o=n,i=r.tail;if(i!=null){n=o+1,r=v(i);continue e}else return o|0}})(0,e)|0}function Bt(e){if(e.tail!=null)return e.head;throw new Error(ca+"\\nParameter name: list")}function ge(e){const t=e.tail;if(t!=null)return v(t);throw new Error(ca+"\\nParameter name: list")}function se(){return le()}function Te(e,t){return wn(e,t)}function oe(e){return wn(e,le())}function R(e){return wt(e)}function T(e){return Bt(e)}function D(e){return ge(e)}function yn(e){const t=_c(e)|0,n=sr(new Array(t),0,t,null);return((o,s)=>{e:for(;;){const i=o,a=s;if(!wt(a)){Ge(n,i,Bt(a)),o=i+1,s=ge(a);continue e}break}})(0,e),n}function st(e,t,n){let r=t,o=n;for(;!wt(o);)r=e(r,T(o)),o=ge(o);return r}function wo(e){return st((t,n)=>wn(n,t),le(),e)}function gc(e,t,n){return da(e,yn(t),n)}function jn(e,t){st((n,r)=>{e(r)},void 0,t)}function Q(e,t){let n=t;for(let r=e.length-1;r>=0;r--)n=wn(V(r,e),n);return n}function C(e){return Q(e,le())}function wc(e){let t,n;if(je(e))return C(e);if(e instanceof we)return e;{const r=le();let o=r;const s=ae(e);try{for(;s["System.Collections.IEnumerator.MoveNext"]();){const u=s["System.Collections.Generic.IEnumerator`1.get_Current"]();o=(t=o,n=new we(u,void 0),t.tail=n,n)}}finally{G(s)}const i=o,a=le();return i.tail=a,ge(r)}}function yo(e,t){return st((n,r)=>wn(r,n),t,wo(e))}function yc(e,t){let n,r;const o=le();let s=o,i=t;for(;!wt(i);){let l=e(Bt(i));for(;!wt(l);)s=(n=s,r=new we(Bt(l),void 0),n.tail=r,r),l=ge(l);i=ge(i)}const a=s,u=le();return a.tail=u,ge(o)}function St(e,t){const n=le(),r=st((s,i)=>{const a=new we(e(i),void 0);return s.tail=a,a},n,t),o=le();return r.tail=o,ge(n)}function bc(e,t){return(r=>{e:for(;;){const o=r;if(wt(o))return;{const s=e(Bt(o));if(s==null){r=ge(o);continue e}else return s}}})(t)}function vc(e,t){return bc(n=>e(n)?K(n):void 0,t)}function xc(e,t){return((r,o)=>{e:for(;;){const s=r,i=o;if(wt(i))return;if(e(Bt(i)))return s;r=s+1,o=ge(i);continue e}})(0,t)}function Cc(e,t){const n=le(),r=st((s,i)=>{if(e(i)){const a=new we(i,void 0);return s.tail=a,a}else return s},n,t),o=le();return r.tail=o,ge(n)}function Sc(e,t){const n=le(),r=le(),o=n,s=st((u,l)=>{let f,c;const m=u[0],h=u[1];return e(l)?[(f=new we(l,void 0),m.tail=f,f),h]:[m,(c=new we(l,void 0),h.tail=c,c)]},[o,r],t),i=le();s[0].tail=i;const a=le();return s[1].tail=a,[ge(o),ge(r)]}function kc(e,t){const n=le(),r=st((s,i)=>{const a=e(i);if(a==null)return s;{const u=new we(v(a),void 0);return s.tail=u,u}},n,t),o=le();return r.tail=o,ge(n)}function ar(e,t,n){return xc(r=>n.Equals(e,r),t)!=null}function Ec(e){throw new Error(e)}const Ac="Enumeration already finished.",Tc="Enumeration has not started. Call MoveNext.",ha="The input sequence has an insufficient number of elements.",Fc="Reset is not supported on this enumerator.";function $c(){throw new Error(Fc)}function bo(){throw new Error(Tc)}function Lr(){throw new Error(Ac)}class Mc{constructor(t){this.f=t}toString(){const t=this;let n=0,r="seq [";const o=ae(t);try{for(;n<4&&o["System.Collections.IEnumerator.MoveNext"]();)n>0&&(r=r+"; "),r=r+_e(o["System.Collections.Generic.IEnumerator`1.get_Current"]()),n=n+1|0;return n===4&&(r=r+"; ..."),r+"]"}finally{G(o)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return Kn(ae(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}function Ic(e){return new Mc(e)}class Rc{constructor(t,n,r){this.current=t,this.next=n,this.dispose=r}"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"(){$c()}Dispose(){this.dispose()}}function ur(e,t,n){return new Rc(e,t,n)}function Nc(e){let t,n,r=!1,o=!1,s;const i=()=>{if(o=!0,n!=null){const a=v(n);try{G(a)}finally{n=void 0}}if(t!=null){const a=v(t);try{G(a)}finally{t=void 0}}};return ur(()=>(r?o&&Lr():bo(),s!=null?v(s):Lr()),()=>{let a;if(r||(r=!0),o)return!1;{let u;for(;u==null;){const l=t,f=n;if(l!=null)if(f!=null){const c=v(f);if(c["System.Collections.IEnumerator.MoveNext"]())s=K(c["System.Collections.Generic.IEnumerator`1.get_Current"]()),u=!0;else try{G(c)}finally{n=void 0}}else{const c=v(l);c["System.Collections.IEnumerator.MoveNext"]()?n=(a=c["System.Collections.Generic.IEnumerator`1.get_Current"](),ae(a)):(i(),u=!1)}else t=ae(e)}return v(u)}},()=>{o||i()})}function Dc(e,t){return ur(()=>t["System.Collections.Generic.IEnumerator`1.get_Current"](),()=>t["System.Collections.IEnumerator.MoveNext"](),()=>{try{G(t)}finally{}})}function ma(e,t,n){let r=!1,o,s=K(e());const i=()=>{if(s!=null){const u=v(s);try{n(u)}finally{s=void 0}}},a=()=>{try{i()}finally{o=void 0}};return ur(()=>(r||bo(),o!=null?v(o):Lr()),()=>{if(r||(r=!0),s!=null){const u=v(s);let l;try{l=t(u)}catch(f){throw a(),f}return l!=null?(o=l,!0):(a(),!1)}else return!1},i)}function Pc(e,t){let n,r=t;return ur(()=>{if(n!=null){const o=v(n)[0];return v(n)[1],o}else return bo()},()=>(n=e(r),n!=null?(v(n)[0],r=v(n)[1],!0):!1),()=>{})}function Oc(e,t){t==null&&Ec(e)}function Yt(e){return Ic(e)}function lt(e){return Oc("source",e),ae(e)}function N(e){return Yt(()=>ae(e()))}function pa(e){return Yt(()=>Nc(e))}function Uc(e,t){return Yt(()=>Pc(e,t))}function F(e){return N(()=>cc(e))}function Vc(e){return e instanceof we?yn(e):Array.from(e)}function $e(e){return je(e)?C(e):e instanceof we?e:wc(e)}function Hc(e,t,n){return Yt(()=>ma(e,t,n))}function _a(e,t,n){return Yt(()=>{let r=-1;return ma(e,o=>(r=r+1|0,t(r,o)),n)})}function fe(e,t){return pa([e,t])}function Bc(e,t,n){const r=lt(t);try{const o=lt(n);try{let s=0,i=r["System.Collections.IEnumerator.MoveNext"](),a=o["System.Collections.IEnumerator.MoveNext"]();for(;s===0&&i&&a;)s=e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),o["System.Collections.Generic.IEnumerator`1.get_Current"]())|0,s===0&&(i=r["System.Collections.IEnumerator.MoveNext"](),a=o["System.Collections.IEnumerator.MoveNext"]());return(s!==0?s:i?1:a?-1:0)|0}finally{G(o)}}finally{G(r)}}function Ft(e,t,n){const r=lt(t);try{let o=!1;for(;!o&&r["System.Collections.IEnumerator.MoveNext"]();)o=n.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return o}finally{G(r)}}function lr(e,t,n){const r=lt(n);try{let o=t;for(;r["System.Collections.IEnumerator.MoveNext"]();)o=e(o,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return o}finally{G(r)}}function cr(e,t){lr((n,r)=>{e(r)},void 0,t)}function pe(e,t){return Hc(()=>lt(t),n=>n["System.Collections.IEnumerator.MoveNext"]()?K(e(n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{G(n)})}function ga(e,t){return _a(()=>lt(t),(n,r)=>r["System.Collections.IEnumerator.MoveNext"]()?K(e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0,n=>{G(n)})}function Lc(e){return N(()=>fc(Vc(e)))}function jc(e,t){return Yt(()=>{const n=lt(t);try{for(let r=1;r<=e;r++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(ha+"\\nParameter name: source");return Dc(()=>{},n)}catch(r){throw G(n),r}})}function zc(e,t){return _a(()=>lt(t),(n,r)=>{if(n<e){if(r["System.Collections.IEnumerator.MoveNext"]())return K(r["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(ha+"\\nParameter name: source")}else return},n=>{G(n)})}function Gc(e,t){return N(()=>pa(pe(e,t)))}class wa{constructor(t,n){this.k=t,this.v=n}}function Lt(e,t){return new wa(e,t)}function Y(e){return e.k}function re(e){return e.v}class ne extends wa{constructor(t,n,r,o,s){super(t,n),this.left=r,this.right=o,this.h=s|0}}function pt(e,t,n,r,o){return new ne(e,t,n,r,o)}function Z(e){return e.left}function J(e){return e.right}function at(e){return e.h}function ya(e,t){e:for(;;){const n=e,r=t;if(r!=null){const o=v(r);if(o instanceof ne){const s=o;e=ya(n+1,Z(s)),t=J(s);continue e}else return n+1|0}else return n|0}}function Wc(e){return ya(0,e)}function ve(e,t,n,r){let o,s,i;const a=e;if(a!=null){const c=v(a);i=c instanceof ne?(o=c,at(o)):1}else i=0;let u;const l=r;if(l!=null){const c=v(l);u=c instanceof ne?(s=c,at(s)):1}else u=0;const f=(i<u?u:i)|0;return f===0?Lt(t,n):pt(t,n,e,r,f+1)}function zn(e,t,n,r){let o,s,i,a,u,l,f,c,m;const h=e;if(h!=null){const g=v(h);m=g instanceof ne?(o=g,at(o)):1}else m=0;let _;const y=r;if(y!=null){const g=v(y);_=g instanceof ne?(s=g,at(s)):1}else _=0;if(_>m+2){const g=v(r);if(g instanceof ne){const b=g;if(i=Z(b),(i!=null?(a=v(i),a instanceof ne?(u=a,at(u)):1):0)>m+1){const S=v(Z(b));if(S instanceof ne){const M=S;return ve(ve(e,t,n,Z(M)),Y(M),re(M),ve(J(M),Y(b),re(b),J(b)))}else throw new Error("internal error: Map.rebalance")}else return ve(ve(e,t,n,Z(b)),Y(b),re(b),J(b))}else throw new Error("internal error: Map.rebalance")}else if(m>_+2){const g=v(e);if(g instanceof ne){const b=g;if(l=J(b),(l!=null?(f=v(l),f instanceof ne?(c=f,at(c)):1):0)>_+1){const S=v(J(b));if(S instanceof ne){const M=S;return ve(ve(Z(b),Y(b),re(b),Z(M)),Y(M),re(M),ve(J(M),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return ve(Z(b),Y(b),re(b),ve(J(b),t,n,r))}else throw new Error("internal error: Map.rebalance")}else return ve(e,t,n,r)}function jt(e,t,n,r){if(r!=null){const o=v(r),s=e.Compare(t,Y(o))|0;if(o instanceof ne){const i=o;return s<0?zn(jt(e,t,n,Z(i)),Y(i),re(i),J(i)):s===0?pt(t,n,Z(i),J(i),at(i)):zn(Z(i),Y(i),re(i),jt(e,t,n,J(i)))}else return s<0?pt(t,n,void 0,r,2):s===0?Lt(t,n):pt(t,n,r,void 0,2)}else return Lt(t,n)}function ba(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s!=null){const i=v(s),a=r.Compare(o,Y(i))|0;if(a===0)return K(re(i));if(i instanceof ne){const u=i;e=r,t=o,n=a<0?Z(u):J(u);continue e}else return}else return}}function qc(e,t,n){const r=ba(e,t,n);if(r==null)throw new Error;return v(r)}function va(e){if(e!=null){const t=v(e);if(t instanceof ne){const n=t;if(Z(n)==null)return[Y(n),re(n),J(n)];{const r=va(Z(n));return[r[0],r[1],ve(r[2],Y(n),re(n),J(n))]}}else return[Y(t),re(t),void 0]}else throw new Error("internal error: Map.spliceOutSuccessor")}function jr(e,t,n,r){if(r!=null){const o=v(r);if(o instanceof ne){const s=o,i=e.Compare(t,Y(s))|0;if(i<0)return zn(jr(e,t,n,Z(s)),Y(s),re(s),J(s));if(i===0){const a=n(K(re(s)));if(a!=null)return pt(t,v(a),Z(s),J(s),at(s));if(Z(s)==null)return J(s);if(J(s)==null)return Z(s);{const u=va(J(s));return ve(Z(s),u[0],u[1],u[2])}}else return zn(Z(s),Y(s),re(s),jr(e,t,n,J(s)))}else{const s=e.Compare(t,Y(o))|0;if(s<0){const i=n(void 0);return i!=null?pt(t,v(i),void 0,r,2):r}else if(s===0){const i=n(K(re(o)));return i!=null?Lt(t,v(i)):void 0}else{const i=n(void 0);return i!=null?pt(t,v(i),r,void 0,2):r}}}else{const o=n(void 0);return o!=null?Lt(t,v(o)):r}}function Zc(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s!=null){const i=v(s),a=r.Compare(o,Y(i))|0;if(i instanceof ne){const u=i;if(a<0){e=r,t=o,n=Z(u);continue e}else{if(a===0)return!0;e=r,t=o,n=J(u);continue e}}else return a===0}else return!1}}function xa(e,t){e:for(;;){const n=e,r=t;if(r!=null){const o=v(r);if(o instanceof ne){const s=o;xa(n,Z(s)),n(Y(s),re(s)),e=n,t=J(s);continue e}else n(Y(o),re(o))}break}}function Jc(e,t){xa(e,t)}function Ca(e,t){e:for(;;){const n=e,r=t;if(r!=null){const o=v(r);if(o instanceof ne){const s=o,i=Ca(n,Z(s));if(i==null){const a=n(Y(s),re(s));if(a==null){e=n,t=J(s);continue e}else return a}else return i}else return n(Y(o),re(o))}else return}}function Yc(e,t){return Ca(e,t)}function Kc(e,t,n){let r=n;Jc((o,s)=>{Ge(t,r,[o,s]),r=r+1|0},e)}function Xc(e,t){return st((n,r)=>jt(e,r[0],r[1],n),void 0,t)}function Qc(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s["System.Collections.IEnumerator.MoveNext"]()){const i=s["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,t=jt(r,i[0],i[1],o),n=s;continue e}else return o}}function ef(e,t){let n=void 0;for(let r=0;r<=t.length-1;r++){const o=V(r,t);n=jt(e,o[0],o[1],n)}return n}function vo(e,t){if(je(t))return ef(e,t);if(t instanceof we)return Xc(e,t);{const n=ae(t);try{return Qc(e,void 0,n)}finally{G(n)}}}class tf extends q{constructor(t,n){super(),this.stack=t,this.started=n}}function Sa(e){e:for(;;){const t=e;if(R(t))return se();{const n=D(t),r=T(t);if(r!=null){const o=v(r);if(o instanceof ne){const s=o;e=Q([Z(s),Lt(Y(s),re(s)),J(s)],n);continue e}else return t}else{e=n;continue e}}}}function fs(e){return new tf(Sa(oe(e)),!1)}function nf(){throw new Error("enumeration not started")}function rf(){throw new Error("enumeration already finished")}function ds(e){if(e.started){const t=e.stack;if(R(t))return rf();if(T(t)!=null){const n=v(T(t));if(n instanceof ne)throw new Error("Please report error: Map iterator, unexpected stack for current");return[Y(n),re(n)]}else throw new Error("Please report error: Map iterator, unexpected stack for current")}else return nf()}function of(e){if(e.started){const t=e.stack;if(R(t))return!1;if(T(t)!=null){if(v(T(t))instanceof ne)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Sa(D(t)),!R(e.stack)}else throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}else return e.started=!0,!R(e.stack)}function hs(e){let t=fs(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return ds(t)},"System.Collections.IEnumerator.get_Current"(){return ds(t)},"System.Collections.IEnumerator.MoveNext"(){return of(t)},"System.Collections.IEnumerator.Reset"(){t=fs(e)},Dispose(){}}}class Gn{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return cf(this)|0}Equals(t){const n=this;if(t instanceof Gn){const r=t,o=ae(n);try{const s=ae(r);try{const i=()=>{const a=o["System.Collections.IEnumerator.MoveNext"]();if(a===s["System.Collections.IEnumerator.MoveNext"]())if(a){const u=o["System.Collections.Generic.IEnumerator`1.get_Current"](),l=s["System.Collections.Generic.IEnumerator`1.get_Current"]();return de(u[0],l[0])&&de(u[1],l[1])?i():!1}else return!0;else return!1};return i()}finally{G(s)}}finally{G(o)}}else return!1}toString(){return"map ["+E("; ",pe(n=>oc("({0}, {1})",n[0],n[1]),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){const t=this;return Array.from(t)}GetEnumerator(){return hs(this.tree)}[Symbol.iterator](){return Kn(ae(this))}"System.Collections.IEnumerable.GetEnumerator"(){return hs(this.tree)}CompareTo(t){const n=this;if(t instanceof Gn)return Bc((o,s)=>{const i=n.comparer.Compare(o[0],s[0])|0;return(i!==0?i:Me(o[1],s[1]))|0},n,t)|0;throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(t){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"(t){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const n=this;return ps(n,t[0])&&de(ms(n,t[0]),t[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){Kc(this.tree,t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return Sr(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return Sr(this)|0}get size(){return Sr(this)|0}clear(){throw new Error("Map cannot be mutated")}delete(t){throw new Error("Map cannot be mutated")}entries(){return pe(n=>[n[0],n[1]],this)}get(t){return ms(this,t)}has(t){return ps(this,t)}keys(){return pe(n=>n[0],this)}set(t,n){throw new Error("Map cannot be mutated")}values(){return pe(n=>n[1],this)}forEach(t,n){const r=this;cr(o=>{t(o[1],o[0],r)},r)}}function Kt(e,t){return new Gn(e,t)}function sf(e){return Kt(e,void 0)}function af(e,t,n){return Kt(e.comparer,jt(e.comparer,t,n,e.tree))}function uf(e,t,n){return Kt(e.comparer,jr(e.comparer,t,n,e.tree))}function ms(e,t){return qc(e.comparer,t,e.tree)}function lf(e,t){return Yc(t,e.tree)}function Sr(e){return Wc(e.tree)}function ps(e,t){return Zc(e.comparer,t,e.tree)}function ka(e,t){return ba(e.comparer,t,e.tree)}function cf(e){const t=(o,s)=>(o<<1)+s+631;let n=0;const r=ae(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const o=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=t(n,nt(o[0]))|0,n=t(n,nt(o[1]))|0}}finally{G(r)}return n|0}function Ea(e,t,n){return af(n,e,t)}function Aa(e,t,n){return uf(n,e,t)}function Ta(e,t){return ka(t,e)}function ff(e,t){return lf(t,e)}function df(e,t){return Kt(t,vo(t,e))}function hf(e,t){return Kt(t,vo(t,e))}function mf(e,t){return Kt(t,vo(t,e))}function fr(e){return sf(e)}function pf(e){return new d(0,[e])}function Fa(e){return new d(1,[e])}class d extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Ok","Error"]}}function ot(e,t){return t.tag===0?pf(e(t.fields[0])):Fa(t.fields[0])}function _f(e,t){return t.tag===0?e(t.fields[0]):Fa(t.fields[0])}const dt={None:0,LowerFirst:1,SnakeCase:2,SnakeCaseAllCaps:3,KebabCase:4};function kr(e,t){return e.replace(/[a-z]?[A-Z]/g,n=>n.length===1?n.toLowerCase():n.charAt(0)+t+n.charAt(1).toLowerCase())}function gf(e,t){switch(t){case dt.LowerFirst:return e.charAt(0).toLowerCase()+e.slice(1);case dt.SnakeCase:return kr(e,"_");case dt.SnakeCaseAllCaps:return kr(e,"_").toUpperCase();case dt.KebabCase:return kr(e,"-");case dt.None:default:return e}}function _s(e,t=dt.None){const n={},r=t;function o(i){throw new Error("Cannot infer key and value of "+String(i))}function s(i,a,u){i=gf(i,a),n[i]=u}for(let i of e){let a=dt.None;if(i==null&&o(i),i instanceof H){const u=i.cases()[i.tag];i=i.fields.length===0?u:[u].concat(i.fields),a=r}if(Array.isArray(i))switch(i.length){case 0:o(i);break;case 1:s(i[0],a,!0);break;case 2:const u=i[1];s(i[0],a,u);break;default:s(i[0],a,i.slice(1))}else typeof i=="string"?s(i,a,!0):o(i)}return n}class A extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class Re extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["PascalCase","CamelCase","SnakeCase"]}}function gs(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function $a(e,t){switch(e.tag){case 2:return ec(gs(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return gs(t)}}const wf=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,ws=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,yf=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function bf(e){function t(r){return r.replace(ws,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if(wf.test(n))return uc(n,"{","}","(",")");if(ws.test(n))return t(n);if(yf.test(n))return t(n.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}function vf(e,t){try{return t.contents=bf(e),!0}catch{return!1}}var zr;(function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"})(zr||(zr={}));function xf(e,t){const[,n,r,o]=e;return{sign:n||"",prefix:r||"",digits:o,radix:t}}function ys(e,t){switch(t){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 Cf(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.")}}function Sf(e,t){if(t&zr.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}}function kf(e,t,n){const o=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(o!=null){const[,,s,i]=o;if(n=n||Sf(s,t),!Cf(n).test(i))return xf(o,n)}return null}function Ef(e,t,n,r,o){const s=kf(e,t,o);if(s!=null){let i=Number.parseInt(s.sign+s.digits,s.radix);if(!Number.isNaN(i)){const[a,u]=ys(!0,r);!n&&s.radix!==10&&i>=a&&i<=u&&(i=i<<32-r>>32-r);const[l,f]=ys(n,r);if(i>=l&&i<=f)return i}}throw new Error(`The input string ${e} was not in a correct format.`)}function Xt(e,t,n,r,o){try{return o.contents=Ef(e,t,n,r),!0}catch{return!1}}function Ma(e,t){Af(t);const n=new Date(e);return n.offset=t??new Date().getTimezoneOffset()*-6e4,n}function Af(e){if(e!=null&&e!==0){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.")}}function Tf(){return Ma(-621355968e5,0)}function Ff(e){const[t,n]=oa(e),r=n==null?t.getTimezoneOffset()*-6e4:n==="Z"?0:n*6e4;return Ma(t.getTime(),r)}function $f(e,t){try{return t.contents=Ff(e),!0}catch{return!1}}function bn(e){return e<0?Math.ceil(e):Math.floor(e)}function bs(e=0,t=0,n=0,r=0,o=0){switch(arguments.length){case 1:return Mf(arguments[0]);case 3:e=0,t=arguments[0],n=arguments[1],r=arguments[2],o=0;break}return e*864e5+t*36e5+n*6e4+r*1e3+o}function Mf(e){return Number(BigInt(e)/10000n)}function If(e){return bn(e/864e5)}function Rf(e){return bn(e%864e5/36e5)}function Nf(e){return bn(e%36e5/6e4)}function Df(e){return bn(e%6e4/1e3)}function Pf(e){return bn(e%1e3)}function Of(e,t="c",n){if(["c","g","G"].indexOf(t)===-1)throw new Error("Custom formats are not supported");const r=Math.abs(If(e)),o=Math.abs(Rf(e)),s=Math.abs(Nf(e)),i=Math.abs(Df(e)),a=Math.abs(Pf(e));return`${e<0?"-":""}${r===0&&(t==="c"||t==="g")?"":t==="c"?r+".":r+":"}${t==="g"?o:O(o,2)}:${O(s,2)}:${O(i,2)}${a===0&&(t==="c"||t==="g")?"":t==="g"?"."+O(a,3):"."+il(a,3,7)}`}function Uf(e){const t=e.search("\\."),n=e.search("\\:");if(t===-1&&n===-1){const r=parseInt(e,0);if(isNaN(r))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return bs(r,0,0,0,0)}if(n>0){const r=/^(-?)((\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(r!=null&&r[4]!=null&&r[5]!=null){let o=0,s=0,i=0;const a=r[1]!=null&&r[1]==="-"?-1:1,u=+r[4],l=+r[5];if(r[3]!=null&&(o=+r[3]),r[7]!=null&&(i=+r[7]),r[8]!=null)switch(r[8].length){case 1:s=+r[8]*100;break;case 2:s=+r[8]*10;break;case 3:s=+r[8];break;case 4:s=+r[8]/10;break;case 5:s=+r[8]/100;break;case 6:s=+r[8]/1e3;break;case 7:s=+r[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return a*bs(o,u,l,i,s)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}function Vf(e,t){try{return t.contents=Uf(e),!0}catch{return!1}}class Ia{constructor(t){this.k=t}}function xe(e){return new Ia(e)}function $(e){return e.k}class P extends Ia{constructor(t,n,r,o){super(t),this.left=n,this.right=r,this.h=o|0}}function Ce(e,t,n,r){return new P(e,t,n,r)}function j(e){return e.left}function B(e){return e.right}function It(e){return e.h}function Ra(e,t){e:for(;;){const n=e,r=t;if(n!=null){const o=v(n);if(o instanceof P){const s=o;e=j(s),t=Ra(B(s),r+1);continue e}else return r+1|0}else return r|0}}function Hf(e){return Ra(e,0)}function Ne(e,t,n){let r,o,s;const i=e;if(i!=null){const f=v(i);s=f instanceof P?(r=f,It(r)):1}else s=0;let a;const u=n;if(u!=null){const f=v(u);a=f instanceof P?(o=f,It(o)):1}else a=0;const l=(s<a?a:s)|0;return l===0?xe(t):Ce(t,e,n,l+1)}function vs(e,t,n){let r,o,s,i,a,u,l,f,c;const m=e;if(m!=null){const y=v(m);c=y instanceof P?(r=y,It(r)):1}else c=0;let h;const _=n;if(_!=null){const y=v(_);h=y instanceof P?(o=y,It(o)):1}else h=0;if(h>c+2){const y=v(n);if(y instanceof P){const g=y;if(s=j(g),(s!=null?(i=v(s),i instanceof P?(a=i,It(a)):1):0)>c+1){const b=v(j(g));if(b instanceof P){const S=b;return Ne(Ne(e,t,j(S)),$(S),Ne(B(S),$(g),B(g)))}else throw new Error("internal error: Set.rebalance")}else return Ne(Ne(e,t,j(g)),$(g),B(g))}else throw new Error("internal error: Set.rebalance")}else if(c>h+2){const y=v(e);if(y instanceof P){const g=y;if(u=B(g),(u!=null?(l=v(u),l instanceof P?(f=l,It(f)):1):0)>h+1){const b=v(B(g));if(b instanceof P){const S=b;return Ne(Ne(j(g),$(g),j(S)),$(S),Ne(B(S),t,n))}else throw new Error("internal error: Set.rebalance")}else return Ne(j(g),$(g),Ne(B(g),t,n))}else throw new Error("internal error: Set.rebalance")}else return Ne(e,t,n)}function zt(e,t,n){if(n!=null){const r=v(n),o=e.Compare(t,$(r))|0;if(r instanceof P){const s=r;return o<0?vs(zt(e,t,j(s)),$(s),B(s)):o===0?n:vs(j(s),$(s),zt(e,t,B(s)))}else{const s=e.Compare(t,$(r))|0;return s<0?Ce(t,void 0,n,2):s===0?n:Ce(t,n,void 0,2)}}else return xe(t)}function Na(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s!=null){const i=v(s),a=r.Compare(o,$(i))|0;if(i instanceof P){const u=i;if(a<0){e=r,t=o,n=j(u);continue e}else{if(a===0)return!0;e=r,t=o,n=B(u);continue e}}else return a===0}else return!1}}function Da(e,t){e:for(;;){const n=e,r=t;if(r!=null){const o=v(r);if(o instanceof P){const s=o;Da(n,j(s)),n($(s)),e=n,t=B(s);continue e}else n($(o))}break}}class Bf extends q{constructor(t,n){super(),this.stack=t,this.started=n}}function Pa(e){e:for(;;){const t=e;if(R(t))return se();{const n=T(t),r=D(t);if(n!=null){const o=v(n);if(o instanceof P){const s=o;e=Q([j(s),xe($(s)),B(s)],r);continue e}else return t}else{e=r;continue e}}}}function xs(e){return new Bf(Pa(oe(e)),!1)}function Lf(){throw new Error("Enumeration not started")}function jf(){throw new Error("Enumeration already started")}function Cs(e){if(e.started){const t=e.stack;if(R(t))return jf();if(T(t)!=null){const n=v(T(t));return $(n)}else throw new Error("Please report error: Set iterator, unexpected stack for current")}else return Lf()}function zf(e){if(e.started){const t=e.stack;if(R(t))return!1;if(T(t)!=null){if(v(T(t))instanceof P)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=Pa(D(t)),!R(e.stack)}else throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}else return e.started=!0,!R(e.stack)}function Ss(e){let t=xs(e);return{"System.Collections.Generic.IEnumerator`1.get_Current"(){return Cs(t)},"System.Collections.IEnumerator.get_Current"(){return Cs(t)},"System.Collections.IEnumerator.MoveNext"(){return zf(t)},"System.Collections.IEnumerator.Reset"(){t=xs(e)},Dispose(){}}}function Gf(e,t,n){e:for(;;){const r=e,o=t,s=n;if(R(o))return R(s)?0:-1;if(R(s))return 1;if(T(s)!=null)if(T(o)!=null){const i=v(T(o)),a=v(T(s));if(i instanceof P){const u=i;if(j(u)==null)if(a instanceof P){const l=a;if(j(l)==null){const f=r.Compare($(u),$(l))|0;if(f!==0)return f|0;e=r,t=Te(B(u),D(o)),n=Te(B(l),D(s));continue e}else{let f,c,m,h,_;switch(R(o)?R(s)?f=2:T(s)!=null?(f=1,h=D(s),_=v(T(s))):f=2:T(o)!=null?(f=0,c=D(o),m=v(T(o))):R(s)?f=2:T(s)!=null?(f=1,h=D(s),_=v(T(s))):f=2,f){case 0:if(m instanceof P){const y=m;e=r,t=Q([j(y),Ce($(y),void 0,B(y),0)],c),n=s;continue e}else{e=r,t=Q([void 0,xe($(m))],c),n=s;continue e}case 1:if(_ instanceof P){const y=_;e=r,t=o,n=Q([j(y),Ce($(y),void 0,B(y),0)],h);continue e}else{e=r,t=o,n=Q([void 0,xe($(_))],h);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const l=r.Compare($(u),$(a))|0;if(l!==0)return l|0;e=r,t=Te(B(u),D(o)),n=Te(void 0,D(s));continue e}else{let l,f,c,m,h;switch(R(o)?R(s)?l=2:T(s)!=null?(l=1,m=D(s),h=v(T(s))):l=2:T(o)!=null?(l=0,f=D(o),c=v(T(o))):R(s)?l=2:T(s)!=null?(l=1,m=D(s),h=v(T(s))):l=2,l){case 0:if(c instanceof P){const _=c;e=r,t=Q([j(_),Ce($(_),void 0,B(_),0)],f),n=s;continue e}else{e=r,t=Q([void 0,xe($(c))],f),n=s;continue e}case 1:if(h instanceof P){const _=h;e=r,t=o,n=Q([j(_),Ce($(_),void 0,B(_),0)],m);continue e}else{e=r,t=o,n=Q([void 0,xe($(h))],m);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else if(a instanceof P){const u=a;if(j(u)==null){const l=r.Compare($(i),$(u))|0;if(l!==0)return l|0;e=r,t=Te(void 0,D(o)),n=Te(B(u),D(s));continue e}else{let l,f,c,m,h;switch(R(o)?R(s)?l=2:T(s)!=null?(l=1,m=D(s),h=v(T(s))):l=2:T(o)!=null?(l=0,f=D(o),c=v(T(o))):R(s)?l=2:T(s)!=null?(l=1,m=D(s),h=v(T(s))):l=2,l){case 0:if(c instanceof P){const _=c;e=r,t=Q([j(_),Ce($(_),void 0,B(_),0)],f),n=s;continue e}else{e=r,t=Q([void 0,xe($(c))],f),n=s;continue e}case 1:if(h instanceof P){const _=h;e=r,t=o,n=Q([j(_),Ce($(_),void 0,B(_),0)],m);continue e}else{e=r,t=o,n=Q([void 0,xe($(h))],m);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{const u=r.Compare($(i),$(a))|0;if(u!==0)return u|0;e=r,t=D(o),n=D(s);continue e}}else{v(T(s));let i,a,u,l,f;switch(R(o)?R(s)?i=2:T(s)!=null?(i=1,l=D(s),f=v(T(s))):i=2:T(o)!=null?(i=0,a=D(o),u=v(T(o))):R(s)?i=2:T(s)!=null?(i=1,l=D(s),f=v(T(s))):i=2,i){case 0:if(u instanceof P){const c=u;e=r,t=Q([j(c),Ce($(c),void 0,B(c),0)],a),n=s;continue e}else{e=r,t=Q([void 0,xe($(u))],a),n=s;continue e}case 1:if(f instanceof P){const c=f;e=r,t=o,n=Q([j(c),Ce($(c),void 0,B(c),0)],l);continue e}else{e=r,t=o,n=Q([void 0,xe($(f))],l);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else if(T(o)!=null){v(T(o));let i,a,u,l,f;switch(R(o)?R(s)?i=2:T(s)!=null?(i=1,l=D(s),f=v(T(s))):i=2:T(o)!=null?(i=0,a=D(o),u=v(T(o))):R(s)?i=2:T(s)!=null?(i=1,l=D(s),f=v(T(s))):i=2,i){case 0:if(u instanceof P){const c=u;e=r,t=Q([j(c),Ce($(c),void 0,B(c),0)],a),n=s;continue e}else{e=r,t=Q([void 0,xe($(u))],a),n=s;continue e}case 1:if(f instanceof P){const c=f;e=r,t=o,n=Q([j(c),Ce($(c),void 0,B(c),0)],l);continue e}else{e=r,t=o,n=Q([void 0,xe($(f))],l);continue e}default:throw new Error("unexpected state in SetTree.compareStacks")}}else{e=r,t=D(o),n=D(s);continue e}}}function ks(e,t,n){return t==null?n==null?0:-1:n==null?1:Gf(e,oe(t),oe(n))|0}function Wf(e,t,n){let r=n;Da(o=>{Ge(t,r,o),r=r+1|0},e)}function qf(e,t,n){e:for(;;){const r=e,o=t,s=n;if(s["System.Collections.IEnumerator.MoveNext"]()){e=r,t=zt(r,s["System.Collections.Generic.IEnumerator`1.get_Current"](),o),n=s;continue e}else return o}}function Zf(e,t){return ir((n,r)=>zt(e,r,n),void 0,t)}function Jf(e,t){return st((n,r)=>zt(e,r,n),void 0,t)}function Oa(e,t){if(je(t))return Zf(e,t);if(t instanceof we)return Jf(e,t);{const n=ae(t);try{return qf(e,void 0,n)}finally{G(n)}}}class xo{constructor(t,n){this.comparer=t,this.tree=n}GetHashCode(){return Xf(this)|0}Equals(t){let n;const r=this;return t instanceof xo&&(n=t,ks(Dt(r),De(r),De(n))===0)}toString(){return"set ["+E("; ",pe(n=>_e(n),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){const t=this;return Array.from(t)}CompareTo(t){const n=this;return ks(Dt(n),De(n),De(t))|0}"System.Collections.Generic.ICollection`1.Add2B595"(t){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(t){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(t){const n=this;return Na(Dt(n),t,De(n))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(t,n){Wf(De(this),t,n)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return Er(this)|0}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return Er(this)|0}GetEnumerator(){return Ss(De(this))}[Symbol.iterator](){return Kn(ae(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Ss(De(this))}get size(){return Er(this)|0}add(t){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(t){throw new Error("Set cannot be mutated")}has(t){return Ua(this,t)}keys(){return pe(n=>n,this)}values(){return pe(n=>n,this)}entries(){return pe(n=>[n,n],this)}forEach(t,n){const r=this;cr(o=>{t(o,o,r)},r)}}function dr(e,t){return new xo(e,t)}function Dt(e){return e.comparer}function De(e){return e.tree}function Yf(e){return dr(e,void 0)}function Kf(e,t){return dr(Dt(e),zt(Dt(e),t,De(e)))}function Er(e){return Hf(De(e))}function Ua(e,t){return Na(Dt(e),t,De(e))}function Xf(e){let t=0;const n=ae(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"]();t=(t<<1)+nt(r)+631|0}}finally{G(n)}return Math.abs(t)|0}function Gr(e,t){return Ua(t,e)}function Qf(e,t){return Kf(t,e)}function ed(e){return Yf(e)}function td(e,t){return dr(t,Oa(t,e))}function nd(e,t){return dr(t,Oa(t,e))}function nn(e,t,n){try{return"Expecting "+e+" but instead got:"+(n?`
4
+ `:" ")+(JSON.stringify(t,null,4)+"")}catch{return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(n?`
5
+ `:" ")}}function rd(e,t){const n=t.tag===2?nn(t.fields[0],t.fields[1],!0):t.tag===1?nn(t.fields[0],t.fields[1],!1)+`
6
+ Reason: `+t.fields[2]:t.tag===3?nn(t.fields[0],t.fields[1],!0):t.tag===4?nn(t.fields[0],t.fields[1],!0)+("\nNode `"+t.fields[2]+"` is unkown."):t.tag===5?"Expecting "+t.fields[0]+`.
7
+ `+(JSON.stringify(t.fields[1],null,4)+""):t.tag===7?`The following errors were found:
8
+
9
+ `+E(`
10
+
11
+ `,t.fields[0]):t.tag===6?"The following `failure` occurred with the decoder: "+t.fields[0]:nn(t.fields[0],t.fields[1],!1);return t.tag===7?n:"Error at: `"+e+"`\n"+n}function Va(e,t,n){const r=t(e,n);if(r.tag===1){const o=r.fields[0];return new d(1,[rd(o[0],o[1])])}else return new d(0,[r.fields[0]])}function Qt(e,t){try{return Va("$",e,JSON.parse(t))}catch(n){if(n instanceof SyntaxError)return new d(1,["Given an invalid JSON: "+n.message]);throw n}}function Ha(e,t){return typeof t=="string"?new d(0,[t]):new d(1,[[e,new A(0,["a string",t])]])}function od(e,t){if(typeof t=="string"){const n=t;return n.length===1?new d(0,[n[0]]):new d(1,[[e,new A(0,["a single character string",t])]])}else return new d(1,[[e,new A(0,["a char",t])]])}function sd(e,t){if(typeof t=="string"){let n,r="00000000-0000-0000-0000-000000000000";return n=[vf(t,new Ie(()=>r,o=>{r=o})),r],n[0]?new d(0,[n[1]]):new d(1,[[e,new A(0,["a guid",t])]])}else return new d(1,[[e,new A(0,["a guid",t])]])}function id(e,t){return t==null?new d(0,[void 0]):new d(1,[[e,new A(0,["null",t])]])}const Es=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?-128<=o&&o<=127?new d(0,[(o+128&255)-128]):new d(1,[[n,new A(1,["a sbyte",o,"Value was either too large or too small for a sbyte"])]]):new d(1,[[n,new A(1,["a sbyte",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Xt(r,511,!1,8,new Ie(()=>s,i=>{s=i|0})),s],o[0]?new d(0,[o[1]]):new d(1,[[n,new A(0,["a sbyte",r])]])}else return new d(1,[[n,new A(0,["a sbyte",r])]])},As=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?0<=o&&o<=255?new d(0,[o&255]):new d(1,[[n,new A(1,["a byte",o,"Value was either too large or too small for a byte"])]]):new d(1,[[n,new A(1,["a byte",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Xt(r,511,!0,8,new Ie(()=>s,i=>{s=i})),s],o[0]?new d(0,[o[1]]):new d(1,[[n,new A(0,["a byte",r])]])}else return new d(1,[[n,new A(0,["a byte",r])]])},Ts=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?-32768<=o&&o<=32767?new d(0,[(o+32768&65535)-32768]):new d(1,[[n,new A(1,["an int16",o,"Value was either too large or too small for an int16"])]]):new d(1,[[n,new A(1,["an int16",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Xt(r,511,!1,16,new Ie(()=>s,i=>{s=i|0})),s],o[0]?new d(0,[o[1]]):new d(1,[[n,new A(0,["an int16",r])]])}else return new d(1,[[n,new A(0,["an int16",r])]])},Fs=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?0<=o&&o<=65535?new d(0,[o&65535]):new d(1,[[n,new A(1,["an uint16",o,"Value was either too large or too small for an uint16"])]]):new d(1,[[n,new A(1,["an uint16",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Xt(r,511,!0,16,new Ie(()=>s,i=>{s=i})),s],o[0]?new d(0,[o[1]]):new d(1,[[n,new A(0,["an uint16",r])]])}else return new d(1,[[n,new A(0,["an uint16",r])]])},$s=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?-2147483648<=o&&o<=2147483647?new d(0,[~~o]):new d(1,[[n,new A(1,["an int",o,"Value was either too large or too small for an int"])]]):new d(1,[[n,new A(1,["an int",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Xt(r,511,!1,32,new Ie(()=>s,i=>{s=i|0})),s],o[0]?new d(0,[o[1]]):new d(1,[[n,new A(0,["an int",r])]])}else return new d(1,[[n,new A(0,["an int",r])]])},Ms=e=>t=>{const n=e,r=t;if(typeof r=="number"){const o=r;return isFinite(o)&&Math.floor(o)===o?0<=o&&o<=4294967295?new d(0,[o>>>0]):new d(1,[[n,new A(1,["an uint32",o,"Value was either too large or too small for an uint32"])]]):new d(1,[[n,new A(1,["an uint32",o,"Value is not an integral value"])]])}else if(typeof r=="string"){let o,s=0;return o=[Xt(r,511,!0,32,new Ie(()=>s,i=>{s=i})),s],o[0]?new d(0,[o[1]]):new d(1,[[n,new A(0,["an uint32",r])]])}else return new d(1,[[n,new A(0,["an uint32",r])]])};function ad(e,t){return typeof t=="boolean"?new d(0,[t]):new d(1,[[e,new A(0,["a boolean",t])]])}function ud(e,t){return typeof t=="number"?new d(0,[t]):new d(1,[[e,new A(0,["a float",t])]])}function ld(e,t){return typeof t=="number"?new d(0,[t]):new d(1,[[e,new A(0,["a float32",t])]])}function cd(e,t){if(typeof t=="string"){let n,r=Zl();return n=[Yl(t,new Ie(()=>r,o=>{r=o})),r],n[0]?new d(0,[Kl(n[1])]):new d(1,[[e,new A(0,["a datetime",t])]])}else return new d(1,[[e,new A(0,["a datetime",t])]])}function fd(e,t){if(typeof t=="string"){let n,r=Tf();return n=[$f(t,new Ie(()=>r,o=>{r=o})),r],n[0]?new d(0,[n[1]]):new d(1,[[e,new A(0,["a datetimeoffset",t])]])}else return new d(1,[[e,new A(0,["a datetime",t])]])}function dd(e,t){if(typeof t=="string"){let n,r=0;return n=[Vf(t,new Ie(()=>r,o=>{r=o})),r],n[0]?new d(0,[n[1]]):new d(1,[[e,new A(0,["a timespan",t])]])}else return new d(1,[[e,new A(0,["a timespan",t])]])}function Is(e,t,n,r){let o;const s=n+".["+mt(e)+"]";if(Array.isArray(r)){const i=r;return e<i.length?t(s,V(e,i)):new d(1,[[s,new A(5,["a longer array. Need index `"+mt(e)+"` but there are only `"+(o=i.length,mt(o))+"` entries",r])]])}else return new d(1,[[s,new A(0,["an array",r])]])}function hd(e,t,n){return n==null?new d(0,[void 0]):ot(K,e(t,n))}function Rs(e,t,n){if(Array.isArray(n)){let r=-1;return ot(wo,ir((o,s)=>{if(r=r+1|0,o.tag===0){const i=e(t+".["+mt(r)+"]",s);return i.tag===0?new d(0,[Te(i.fields[0],o.fields[0])]):new d(1,[i.fields[0]])}else return o},new d(0,[se()]),n))}else return new d(1,[[t,new A(0,["a list",n])]])}function md(e,t,n){if(Array.isArray(n)){let r=-1;return ot(Lc,ir((o,s)=>{if(r=r+1|0,o.tag===0){const i=e(t+".["+mt(r)+"]",s);return i.tag===0?new d(0,[fe([i.fields[0]],o.fields[0])]):new d(1,[i.fields[0]])}else return o},new d(0,[[]]),n))}else return new d(1,[[t,new A(0,["a seq",n])]])}function Ns(e,t,n){if(Array.isArray(n)){let r=-1;const o=n;return ir((s,i)=>{if(r=r+1|0,s.tag===0){const a=s.fields[0],u=e(t+".["+mt(r)+"]",i);return u.tag===0?(Ge(a,r,u.fields[0]),new d(0,[a])):new d(1,[u.fields[0]])}else return s},new d(0,[sr(new Array(o.length),0,o.length,null)]),o)}else return new d(1,[[t,new A(0,["an array",n])]])}function pd(e,t,n){return((o,s)=>{e:for(;;){const i=o,a=s;if(R(i))return new d(1,[[t,new A(7,[a])]]);{const u=Va(t,U(T(i)),n);if(u.tag===1){o=D(i),s=yo(a,oe(u.fields[0]));continue e}else return new d(0,[u.fields[0]])}}})(e,se())}function _d(e,t,n){return new d(0,[e])}function Ds(e,t,n,r){const o=t(n,r);return o.tag===0?e(o.fields[0],n,r):new d(1,[o.fields[0]])}function gd(e,t,n,r){const o=t(n,r);return o.tag===1?new d(1,[o.fields[0]]):new d(0,[e(o.fields[0])])}function wd(e,t){let n;const r=e;return n=o=>s=>Is(0,r,o,s),o=>s=>Ds(Ur(i=>{let a;const u=t;return a=l=>f=>Is(1,u,l,f),l=>f=>Ds((c,m,h)=>_d([i,c]),U(a),l,f)}),U(n),o,s)}function yd(e){return hf(e,{Compare:Me})}function bd(e){return nd(e,{Compare:Me})}function vd(e,t,n){return n!==null&&Object.getPrototypeOf(n||!1)===Object.prototype?da((r,o)=>{const s=r[0];return o.tag===0?ot(i=>Te(i,o.fields[0]),r[1](t+"."+s)(n[s])):o},e,new d(0,[se()])):new d(1,[[t,new A(0,["an object",n])]])}function xd(e,t,n,r){return r!==null&&Object.getPrototypeOf(r||!1)===Object.prototype?lr((o,s)=>{if(o.tag===0){const i=e(n,s);if(i.tag===0){const a=t(n+"."+s,r[s]);return a.tag===0?new d(0,[Te([i.fields[0],a.fields[0]],o.fields[0])]):new d(1,[a.fields[0]])}else return new d(1,[i.fields[0]])}else return o},new d(0,[se()]),Object.keys(r)):new d(1,[[n,new A(0,["an object",r])]])}function Ba(e,t,n,r){let o;const s=t.length+e|0;if(s!==r.length)return new d(1,[[n,new A(6,[(o=r.length|0,gt(rt("Expected array of length %i but got %i"))(s)(o))])]]);{let i=new d(0,[se()]);for(let a=e;a<=r.length-1;a++)if(i.tag===0){const u=i.fields[0],l=gt(rt("%s[%i]"))(n)(a),f=V(a-e,t),c=V(a,r);i=ot(m=>Te(m,u),f(l)(c))}return ot(wo,i)}}function Ps(e,t,n,r,o,s){const i=dc(a=>Rt(a)===r,Qi(n));if(i!=null){const a=i,u=Ct(l=>Pe(e,t,!1,l[1]),ra(a));return ot(l=>Nl(a,yn(l)),u.length===0&&s.length<=1?new d(0,[se()]):Ba(1,u,o,s))}else return new d(1,[[o,new A(6,["Cannot find case "+r+" in "+z(n)])]])}function Os(e,t,n,r){let o;const s=new Ie(te());let i;const a=z(r);i=a===""?e:Ea(a,s,e);let u;if(na(r)){const l=Ct(f=>[$a(t,Rt(f)),Pe(i,t,!1,f[1])],ln(r));u=f=>c=>ot(m=>Dl(r,yn(m)),vd(l,f,c))}else if(ta(r))u=l=>f=>{if(typeof f=="string")return Ps(i,t,r,f,l,[]);if(Array.isArray(f)){const c=f;return _f(m=>Ps(i,t,r,m,l,c),Ha(l+"[0]",V(0,c)))}else return new d(1,[[l,new A(0,["a string or array",f])]])};else if(n)u=l=>f=>new d(1,[[l,new A(2,["an extra coder for "+z(r),f])]]);else throw new Error((o=z(r),gt(rt(`Cannot generate auto decoder for %s. Please pass an extra decoder.
12
+
13
+ Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(o)));return s.contents=u,u}function Pe(e,t,n,r){let o,s,i,a;const u=z(r),l=Ta(u,e);if(l==null)if(Ji(r)){const f=Pe(e,t,!1,_n(r));return c=>m=>Ns(U(f),c,m)}else if(ho(r))switch(z(Xi(r))){case"System.SByte":return c=>m=>{const h=r,_=c,y=m,g=Es(_)(y);if(g.tag===1)return new d(1,[g.fields[0]]);{const b=g.fields[0]|0;return Ft(b,At(h),{Equals:(S,M)=>S===M,GetHashCode:Oe})?new d(0,[Tt(h,b.toString())]):new d(1,[[_,new A(1,[z(h),y,"Unkown value provided for the enum"])]])}};case"System.Byte":return c=>m=>{const h=r,_=c,y=m,g=As(_)(y);if(g.tag===1)return new d(1,[g.fields[0]]);{const b=g.fields[0];return Ft(b,At(h),{Equals:(S,M)=>S===M,GetHashCode:Oe})?new d(0,[Tt(h,b.toString())]):new d(1,[[_,new A(1,[z(h),y,"Unkown value provided for the enum"])]])}};case"System.Int16":return c=>m=>{const h=r,_=c,y=m,g=Ts(_)(y);if(g.tag===1)return new d(1,[g.fields[0]]);{const b=g.fields[0]|0;return Ft(b,At(h),{Equals:(S,M)=>S===M,GetHashCode:Oe})?new d(0,[Tt(h,al(b))]):new d(1,[[_,new A(1,[z(h),y,"Unkown value provided for the enum"])]])}};case"System.UInt16":return c=>m=>{const h=r,_=c,y=m,g=Fs(_)(y);if(g.tag===1)return new d(1,[g.fields[0]]);{const b=g.fields[0];return Ft(b,At(h),{Equals:(S,M)=>S===M,GetHashCode:Oe})?new d(0,[Tt(h,b.toString())]):new d(1,[[_,new A(1,[z(h),y,"Unkown value provided for the enum"])]])}};case"System.Int32":return c=>m=>{const h=r,_=c,y=m,g=$s(_)(y);if(g.tag===1)return new d(1,[g.fields[0]]);{const b=g.fields[0]|0;return Ft(b,At(h),{Equals:(S,M)=>S===M,GetHashCode:Oe})?new d(0,[Tt(h,mt(b))]):new d(1,[[_,new A(1,[z(h),y,"Unkown value provided for the enum"])]])}};case"System.UInt32":return c=>m=>{const h=r,_=c,y=m,g=Ms(_)(y);if(g.tag===1)return new d(1,[g.fields[0]]);{const b=g.fields[0];return Ft(b,At(h),{Equals:(S,M)=>S===M,GetHashCode:Oe})?new d(0,[Tt(h,b.toString())]):new d(1,[[_,new A(1,[z(h),y,"Unkown value provided for the enum"])]])}};default:{const c=z(r),m=aa(rt(`Cannot generate auto decoder for %s.
14
+ Thoth.Json.Net only support the following enum types:
15
+ - sbyte
16
+ - byte
17
+ - int16
18
+ - uint16
19
+ - int
20
+ - uint32
21
+ If you can't use one of these types, please pass an extra decoder.
22
+ `))(c);return h=>m(h)}}else if(Yi(r))if(mo(r)){const f=Ct(c=>Pe(e,t,!1,c),ea(r));return c=>m=>Array.isArray(m)?ot(h=>Pl(yn(h)),Ba(0,f,c,m)):new d(1,[[c,new A(0,["an array",m])]])}else switch(z(Ki(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return o=Pe(e,t,!0,V(0,Se(r))),c=>m=>hd(U(o),c,m);case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return s=Pe(e,t,!1,V(0,Se(r))),c=>m=>Rs(U(s),c,m);case"System.Collections.Generic.IEnumerable`1[System.Object]":return i=Pe(e,t,!1,V(0,Se(r))),c=>m=>md(U(i),c,m);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const c=Pe(e,t,!1,V(0,Se(r))),m=Pe(e,t,!1,V(1,Se(r)));let h;const _=C([y=>g=>xd(U(c),U(m),y,g),(a=wd(U(c),U(m)),y=>g=>Rs(U(a),y,g))]);return h=y=>g=>pd(_,y,g),y=>g=>gd(yd,U(h),y,g)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const c=Pe(e,t,!1,V(0,Se(r)));return m=>h=>{const _=Ns(U(c),m,h);return _.tag===0?new d(0,[bd(_.fields[0])]):new d(1,[_.fields[0]])}}default:return Os(e,t,n,r)}else switch(u){case"System.Boolean":return f=>c=>ad(f,c);case"Microsoft.FSharp.Core.Unit":return f=>c=>id(f,c);case"System.String":return f=>c=>Ha(f,c);case"System.Char":return f=>c=>od(f,c);case"System.SByte":return Es;case"System.Byte":return As;case"System.Int16":return Ts;case"System.UInt16":return Fs;case"System.Int32":return $s;case"System.UInt32":return Ms;case"System.Double":return f=>c=>ud(f,c);case"System.Single":return f=>c=>ld(f,c);case"System.DateTime":return f=>c=>cd(f,c);case"System.DateTimeOffset":return f=>c=>fd(f,c);case"System.TimeSpan":return f=>c=>dd(f,c);case"System.Guid":return f=>c=>sd(f,c);case"System.Object":return f=>c=>new d(0,[c]);default:return Os(e,t,n,r)}else{const f=l;return c=>m=>f.contents(c)(m)}}function Cd(e){return fr({Compare:er})}function en(e,t,n){const r=ze(t,new Re(0,[]));return Pe(Cd(),r,!1,e)}class Sd extends q{constructor(t,n,r){super(),this.PartnerId=t,this.AccountId=n,this.Funds=r}}function kd(){return xt("SuperSelection.AdminUI.Dto.PromotedFundOverride",[],Sd,()=>[["PartnerId",ce],["AccountId",fo(ce)],["Funds",Ht(ce)]])}class Ed extends q{constructor(t,n){super(),this.PartnerFunds=t,this.AccountFunds=n}}function Ad(){return xt("SuperSelection.AdminUI.Dto.PromotedFunds",[],Ed,()=>[["PartnerFunds",Ht(ce)],["AccountFunds",Ht(ce)]])}class La extends q{constructor(t,n){super(),this.DefaultFundUSI=t,this.FeatureSet=n}}function Td(){return xt("SuperSelection.AdminUI.Dto.AccountConfiguration",[],La,()=>[["DefaultFundUSI",fo(ce)],["FeatureSet",ja()]])}class Wn extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Basic","Promoted"]}}function ja(){return Tl("SuperSelection.AdminUI.Dto.FeatureSet",[],Wn,()=>[[],[]])}class Fd extends q{constructor(t,n){super(),this.Partner=t,this.Account=n}}function $d(){return xt("SuperSelection.AdminUI.Dto.PromotedFundDetail",[],Fd,()=>[["Partner",Id()],["Account",fo(Nd())]])}class Md extends q{constructor(t,n){super(),this.PartnerId=t,this.Name=n}}function Id(){return xt("SuperSelection.AdminUI.Dto.PartnerDetail",[],Md,()=>[["PartnerId",ce],["Name",ce]])}class Rd extends q{constructor(t,n){super(),this.AccountId=t,this.Name=n}}function Nd(){return xt("SuperSelection.AdminUI.Dto.AccountDetail",[],Rd,()=>[["AccountId",ce],["Name",ce]])}let Dd=class extends q{constructor(t,n,r,o){super(),this.Id=t,this.PartnerId=n,this.Enabled=r,this.Editor=o}};function Pd(){return xt("SuperSelection.AdminUI.Dto.FeatureFlag",[],Dd,()=>[["Id",ce],["PartnerId",ce],["Enabled",Zi],["Editor",ce]])}class vn extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AccessRole"]}}function Od(e){return new vn(e)}function Ud(e){return St(Od,e)}function za(e){if(ar(new vn("SuperSelection.Access"),e,{Equals:de,GetHashCode:Qn}))return K(void 0)}function qn(e){if(ar(new vn("SuperSelection.EditPanel"),e,{Equals:de,GetHashCode:Qn}))return K(void 0)}function Vd(e){if(ar(new vn("SuperSelection.ChangeDefaultFund"),e,{Equals:de,GetHashCode:Qn}))return K(void 0)}function Hd(e){if(ar(new vn("SuperSelection.ChangeFeatureSet"),e,{Equals:de,GetHashCode:Qn}))return K(void 0)}class Us extends q{constructor(t,n){super(),this.UserName=t,this.Roles=n}}function Ga(e){let t;const n=or(e??"",["."],void 0,0);if(!Br((r,o)=>r===o,n)&&n.length===3){let r;const o=V(1,n);r=atob(o),t=Qt(U(en(Jt(["Name",ce],["Roles",Fl(ce)]),new Re(1,[]))),r)}else t=new d(1,["Failed to identify the user"]);if(t.tag===1)return new Us(void 0,se());{const r=t.fields[0];return new Us(r.Name,Ud(C(r.Roles)))}}class Bd extends q{constructor(t,n){super(),this.PromotedFunds=t,this.Configuration=n}}class Wa extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["PartnerId"]}}class qa extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["AccountId"]}}function Ld(e){return e.fields[0]}function jd(e){return po(t=>new qa(t),e)}const zd=(e,t)=>{qt(()=>{const n=e();return()=>{n.Dispose()}},t)},Gd=e=>{vt(()=>{const t=e();return()=>{t.Dispose()}})},x=Bi,Za=zd,Wd=Gd;function qd(e,t,n,r){const o=x.memo(e,U(ze(po(Ke,n),te())));return cr(s=>{e.displayName=s},Bn(t)),s=>{const i=Zd(r,s);return x.createElement(o,i)}}function Zd(e,t){if(e==null)return t;{const n=e;return t.key=n(t),t}}function hr(e){return{Dispose(){e()}}}function Jd(e,t){Za(e,t)}function Yd(e){Wd(t=>(e(),hr(()=>{})))}function Co(e){const t=x.useRef(!1);Kd(()=>{t.current||(t.current=!0,e())},[])}function Ja(e){const t=x.useRef(void 0),n=x.useRef(!1),r=x.useRef(!1);n.current&&(r.current=!0),Jd(()=>{let o;return n.current?o=void 0:(n.current=!0,t.current=K(e()),o=r.current?t.current:void 0),{Dispose(){cr(s=>{G(s)},Bn(o))}}},[])}function Kd(e,t){Za(n=>(e(),hr(()=>{})),t)}function Xd(e,t){const n=ze(t,[]);return x.useCallback(e,n)}function Ya(e){return x.useRef(e)}function Qd(e,t,n){return qd(e,void 0,ns(n),ns(t))}function Ka(e){const t=Ya(e),n=Xd(r=>t.current(r),[]);return Yd(()=>{t.current=e}),n}function eh(e){return x.useState(e)}class Xa{constructor(t=!1){this._id=0,this._cancelled=t,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,t]of this._listeners)t()}}addListener(t){const n=this._id;return this._listeners.set(this._id++,t),n}removeListener(t){return this._listeners.delete(t)}register(t,n){const r=this,o=this.addListener(n==null?t:()=>t(n));return{Dispose(){r.removeListener(o)}}}Dispose(){}}class So extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,So.prototype)}}class ko{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>ko.maxTrampolineCallCount}hijack(t){this.callCount=0,setTimeout(t,0)}}function ht(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new So);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack(()=>{try{e(t)}catch(n){t.onError(On(n))}});else try{e(t)}catch(n){t.onError(On(n))}}}function th(e,t){return ht(n=>{e({onSuccess:r=>{try{t(r)(n)}catch(o){n.onError(On(o))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})})}function nh(e){return ht(t=>t.onSuccess(e))}class rh{Bind(t,n){return th(t,n)}Combine(t,n){return this.Bind(t,()=>n)}Delay(t){return ht(n=>t()(n))}For(t,n){const r=t[Symbol.iterator]();let o=r.next();return this.While(()=>!o.done,this.Delay(()=>{const s=n(o.value);return o=r.next(),s}))}Return(t){return nh(t)}ReturnFrom(t){return t}TryFinally(t,n){return ht(r=>{t({onSuccess:o=>{n(),r.onSuccess(o)},onError:o=>{n(),r.onError(o)},onCancel:o=>{n(),r.onCancel(o)},cancelToken:r.cancelToken,trampoline:r.trampoline})})}TryWith(t,n){return ht(r=>{t({onSuccess:r.onSuccess,onCancel:r.onCancel,cancelToken:r.cancelToken,trampoline:r.trampoline,onError:o=>{try{n(o)(r)}catch(s){r.onError(On(s))}}})})}Using(t,n){return this.TryFinally(n(t),()=>t.Dispose())}While(t,n){return t()?this.Bind(n,()=>this.While(t,n)):this.Return(void 0)}Zero(){return ht(t=>t.onSuccess(void 0))}}const w=new rh;function Ar(e){}function oh(e){return new Xa(!1)}function sh(e){e.cancel()}function ih(e){return e!=null&&e.isCancelled}const ah=new Xa;function uh(e){return ht(t=>e([t.onSuccess,t.onError,t.onCancel]))}function lh(e,t){return ch(e,t)}function Ue(e,t){return lh(e,t)}function ch(e,t,n,r,o){typeof t!="function"&&(o=t,t=void 0);const s=new ko;e({onSuccess:t||Ar,onError:Ar,onCancel:Ar,cancelToken:o||ah,trampoline:s})}class he extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function Qa(e,t){const n=Ya(oh());return Ja(()=>hr(()=>{sh(n.current)})),Ka(r=>{ih(n.current)||Ue(w.Delay(()=>w.TryWith(w.Delay(()=>(t(new he(1,[])),w.Bind(e(r),o=>(t(new he(2,[o])),w.Zero())))),o=>(t(new he(3,[o])),w.Zero()))),n.current)})}class He extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class fh extends H{constructor(t,n){super(),this.tag=0,this.fields=[t,n]}cases(){return["Header"]}}class xn extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Empty","Text","Binary","Form"]}}class Cn extends q{constructor(t,n,r,o,s,i,a,u){super(),this.url=t,this.method=n,this.headers=r,this.withCredentials=o,this.overridenMimeType=s,this.overridenResponseType=i,this.timeout=a,this.content=u}}class $t extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class eu extends q{constructor(t,n,r,o,s,i){super(),this.statusCode=t|0,this.responseText=n,this.responseType=r,this.responseUrl=o,this.responseHeaders=s,this.content=i}}function dh(e){return new fh("Authorization",e)}const ct=new Cn("",new He(0,[]),se(),!1,void 0,void 0,void 0,new xn(0,[]));new eu(0,"","","",fr({Compare:er}),new $t(0,[""]));function Vs(e,t){return sc(t)?new Array(0):or(t,[e],void 0,0)}function hh(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"}}function We(e){return new Cn(e,ct.method,ct.headers,ct.withCredentials,ct.overridenMimeType,ct.overridenResponseType,ct.timeout,ct.content)}function qe(e,t){return new Cn(t.url,e,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function mh(e,t){return new Cn(t.url,t.method,yo(t.headers,oe(e)),t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function mr(e,t){return new Cn(t.url,t.method,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,e)}function Hs(e){return uh(t=>{const n=new XMLHttpRequest;n.open(hh(e.method),e.url),n.onreadystatechange=()=>{let u,l,f,c,m,h,_;n.readyState===4&&t[0]((u=(l=n.responseType,l===""||l==="text"?n.responseText:""),f=n.status|0,c=n.responseType,m=(h=n.responseType,h===""?new $t(0,[n.responseText]):h==="text"?new $t(0,[n.responseText]):h==="arraybuffer"?new $t(2,[n.response]):h==="blob"?new $t(1,[n.response]):new $t(3,[n.response])),_=mf(hc(y=>{const g=C(Vs(":",y));if(!R(g))return[T(g).toLocaleLowerCase(),E(":",D(g)).trim()]},Vs(`\r
23
+ `,n.getAllResponseHeaders())),{Compare:er}),new eu(f,u,c,n.responseURL,_,m)))};const r=ae(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const u=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n.setRequestHeader(u.fields[0],u.fields[1])}}finally{G(r)}n.withCredentials=e.withCredentials;const o=e.overridenMimeType;if(o!=null){const u=o;n.overrideMimeType(u)}const s=e.overridenResponseType;if(s!=null)switch(s.tag){case 1:{n.responseType="blob";break}case 2:{n.responseType="arraybuffer";break}default:n.responseType="text"}const i=e.timeout;if(i!=null){const u=i|0;n.timeout=u|0}const a=e.content;switch(a.tag){case 1:{n.send(K(a.fields[0]));break}case 3:{n.send(K(a.fields[0]));break}case 2:{n.send(K(a.fields[0]));break}default:n.send()}})}function ph(e){return e}const tu=te();function Fn(e){return Array.from(e)}function _h(e){return rr(e,"O")}function gh(e){return Of(e)}function wh(){return te()}function yh(e){return rr(e,"O")}function pr(e,t){return JSON.stringify(t,void 0,K(e))}function bh(e){return t=>Ol(po(e,t),()=>tu)}function Bs(e,t,n,r){let o;const s=new Ie(te());let i;const a=z(r);i=a===""?e:Ea(a,s,e);let u;if(na(r)){const l=Ct(f=>{const c=$a(t,Rt(f)),m=Ye(i,t,n,f[1]);return h=>_=>{const y=Rl(h,f);return(!n||n&&y!=null)&&(_[c]=m(y)),_}},ln(r));u=f=>lr((c,m)=>m(f)(c),{},l)}else if(ta(r))u=l=>{const f=Il(l,r),c=f[0],m=f[1],h=m.length|0;if(h===0)return Rt(c);{const _=h|0,y=ra(c),g=sr(new Array(_+1),0,_+1,null);Ge(g,0,Rt(c));for(let b=1;b<=_;b++){const S=Ye(i,t,n,V(b-1,y)[1]);Ge(g,b,S(V(b-1,m)))}return g}};else throw new Error((o=z(r),gt(rt(`Cannot generate auto encoder for %s. Please pass an extra encoder.
24
+
25
+ Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders`))(o)));return s.contents=u,u}function Ye(e,t,n,r){const o=z(r),s=Ta(o,e);if(s==null)if(Ji(r)){const i=Ye(e,t,n,_n(r));return a=>Fn(pe(i,a))}else if(ho(r))switch(z(Xi(r))){case"System.SByte":return a=>a;case"System.Byte":return a=>a;case"System.Int16":return a=>a;case"System.UInt16":return a=>a;case"System.Int32":return a=>a;case"System.UInt32":return a=>a;default:{const a=z(r);return aa(rt(`Cannot generate auto encoder for %s.
26
+ Thoth.Json.Net only support the following enum types:
27
+ - sbyte
28
+ - byte
29
+ - int16
30
+ - uint16
31
+ - int
32
+ - uint32
33
+
34
+ If you can't use one of these types, please pass an extra encoder.
35
+
36
+ Documentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders
37
+ `))(a)}}else if(Yi(r))if(mo(r)){const i=Ct(a=>Ye(e,t,n,a),ea(r));return a=>Fn(ga((u,l)=>V(u,i)(l),a))}else{const i=z(Ki(r));if(i==="Microsoft.FSharp.Core.FSharpOption`1[System.Object]"){const a=new sl(()=>bh(Ye(e,t,n,V(0,Se(r)))));return u=>u==null?tu:a.Value(u)}else if(i==="Microsoft.FSharp.Collections.FSharpList`1[System.Object]"||i==="Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"||i==="System.Collections.Generic.IEnumerable`1[System.Object]"){const a=Ye(e,t,n,V(0,Se(r)));return u=>Fn(pe(a,u))}else if(i==="Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"){const a=V(0,Se(r)),u=Ye(e,t,n,V(1,Se(r)));if(z(a)==="System.String"||z(a)==="System.Guid")return l=>lr((f,c)=>{const m=c;return f[m[0]]=u(m[1]),f},{},l);{let l;return l=Ye(e,t,n,a),c=>Fn(pe(m=>{const h=m;return[l(h[0]),u(h[1])]},c))}}else return Bs(e,t,n,r)}else switch(o){case"System.Boolean":return i=>i;case"Microsoft.FSharp.Core.Unit":return wh;case"System.String":return i=>i;case"System.Char":return i=>i;case"System.SByte":return i=>i;case"System.Byte":return i=>i;case"System.Int16":return i=>i;case"System.UInt16":return i=>i;case"System.Int32":return i=>i;case"System.UInt32":return i=>i;case"System.Double":return i=>i;case"System.Single":return i=>i;case"System.DateTime":return yh;case"System.DateTimeOffset":return _h;case"System.TimeSpan":return gh;case"System.Guid":return ph;case"System.Object":return i=>i;default:return Bs(e,t,n,r)}else{const i=s;return a=>i.contents(a)}}function vh(e){return fr({Compare:er})}function _r(e,t,n,r){const o=ze(t,new Re(0,[])),s=ze(r,!0);return Ye(vh(),o,s,e)}function Ze(e){return`${e}/super-selection/admin`}function Je(e,t){return w.Delay(()=>{const n=mh(dh(gt(rt("Bearer %s"))(e)),t);let r;const o=Hs(n);return r=w.Bind(o,s=>w.Return(new d(0,[s]))),w.Bind(r,s=>{const i=s;if(i.tag===1)return w.Return(new d(1,[i.fields[0]]));{const a=i.fields[0];if(a.statusCode===429||a.statusCode>=500){const u=Hs(n);return w.Bind(u,l=>w.Return(new d(0,[l])))}else return w.Return(new d(0,[a]))}})})}function nu(e,t){return w.Delay(()=>{const n=Je(t,qe(new He(0,[]),We(`${Ze(e)}/promoted-funds`)));return w.Bind(n,r=>{const o=r;if(o.tag===1)return w.Return(new d(1,[o.fields[0]]));{const s=o.fields[0];switch(s.statusCode|0){case 200:{const a=Qt(U(en(Ht(kd()),new Re(1,[]))),s.responseText);return w.Return(a)}case 401:return w.Return(new d(1,["You do not have the appropriate permissions to view this information"]));default:return w.Return(new d(1,["Unexpected response from backend"]))}}})})}function ru(e,t,n,r){return w.Delay(()=>{let o;const s=Je(t,qe(new He(0,[]),We((r==null?i=>`${i}/promoted-funds/${n}`:(o=r,i=>`${i}/promoted-funds/${n}/${o}`))(Ze(e)))));return w.Bind(s,i=>{const a=i;if(a.tag===1)return w.Return(new d(1,[a.fields[0]]));{const u=a.fields[0];if(u.statusCode===200){const l=Qt(U(en(Ad(),new Re(1,[]))),u.responseText);return w.Return(l)}else return w.Return(new d(1,["Unexpected response from backend"]))}})})}function xh(e,t,n,r,o){return w.Delay(()=>{let s;const i=(r==null?u=>`${u}/promoted-funds/${n}`:(s=r,u=>`${u}/promoted-funds/${n}/${s}`))(Ze(e)),a=Je(t,qe(new He(1,[]),mr(new xn(1,[pr(0,_r(Jt(["Funds",Ht(ce)]),new Re(1,[]),void 0,void 0)(o))]),We(i))));return w.Bind(a,u=>{const l=u;if(l.tag===1)return w.Return(new d(1,[l.fields[0]]));{const f=l.fields[0];return f.statusCode===200?w.Return(new d(0,[void 0])):w.Return(new d(1,[f.responseText]))}})})}function Ch(e,t,n,r,o){return w.Delay(()=>{let s;const i=`${Ze(e)}/partner/${n}/feature-flags/${r}`,a=Je(t,qe(new He(2,[]),mr(new xn(1,[(s={Enabled:o,PartnerId:n},pr(0,_r(Jt(["Enabled",Zi],["PartnerId",ce]),new Re(1,[]),void 0,void 0)(s)))]),We(i))));return w.Bind(a,u=>{const l=u;if(l.tag===1)return w.Return(new d(1,[l.fields[0]]));{const f=l.fields[0];return f.statusCode===200?w.Return(new d(0,[void 0])):w.Return(new d(1,[f.responseText]))}})})}function ou(e,t,n,r){return w.Delay(()=>{let o;const s=Je(t,qe(new He(4,[]),We((r==null?i=>`${i}/promoted-funds/${n}`:(o=r,i=>`${i}/promoted-funds/${n}/${o}`))(Ze(e)))));return w.Bind(s,i=>{const a=i;if(a.tag===1)return w.Return(new d(1,[a.fields[0]]));{const u=a.fields[0];return u.statusCode===200?w.Return(new d(0,[void 0])):w.Return(new d(1,[u.responseText]))}})})}function Sh(e,t,n){return w.Delay(()=>{const r=Je(t,qe(new He(0,[]),We(`${Ze(e)}/configurations/${n}`)));return w.Bind(r,o=>{const s=o;if(s.tag===1)return w.Return(new d(1,[s.fields[0]]));{const i=s.fields[0];switch(i.statusCode|0){case 200:{const u=Qt(U(en(Td(),new Re(1,[]))),i.responseText);return w.Return(u)}case 404:{const u=new d(0,[new La(void 0,new Wn(1,[]))]);return w.Return(u)}default:return w.Return(new d(1,["Unexpected response from backend"]))}}})})}function kh(e,t,n,r){return w.Delay(()=>{let o;const s=Je(t,qe(new He(2,[]),mr(new xn(1,[(o={DefaultFundUsi:r},pr(0,_r(Jt(["DefaultFundUsi",ce]),new Re(1,[]),void 0,void 0)(o)))]),We(`${Ze(e)}/configurations/${n}/default-fund-usi`))));return w.Bind(s,i=>{const a=i;return a.tag===1?w.Return(new d(1,[a.fields[0]])):a.fields[0].statusCode===200?w.Return(new d(0,[void 0])):w.Return(new d(1,["Unexpected response from backend"]))})})}function Eh(e,t,n,r){return w.Delay(()=>{let o;const s=Je(t,qe(new He(2,[]),mr(new xn(1,[(o={FeatureSet:r},pr(0,_r(Jt(["FeatureSet",ja()]),new Re(1,[]),void 0,void 0)(o)))]),We(`${Ze(e)}/configurations/${n}/feature-set`))));return w.Bind(s,i=>{const a=i;return a.tag===1?w.Return(new d(1,[a.fields[0]])):a.fields[0].statusCode===200?w.Return(new d(0,[void 0])):w.Return(new d(1,["Unexpected response from backend"]))})})}function Ah(e,t,n,r){return w.Delay(()=>{let o;const s=Je(t,qe(new He(0,[]),We((r==null?i=>`${i}/account-registry/${n}`:(o=r,i=>`${i}/account-registry/${n}/${o}`))(Ze(e)))));return w.Bind(s,i=>{const a=i;if(a.tag===1)return w.Return(new d(1,[a.fields[0]]));{const u=a.fields[0];if(u.statusCode===200){const l=Qt(U(en($d(),new Re(1,[]))),u.responseText);return w.Return(l)}else return w.Return(new d(1,["Unexpected response from backend"]))}})})}function Th(e,t,n){return w.Delay(()=>{const r=Je(t,qe(new He(0,[]),We(`${Ze(e)}/partner/${n}/feature-flags`)));return w.Bind(r,o=>{const s=o;if(s.tag===1)return w.Return(new d(1,[s.fields[0]]));{const i=s.fields[0];switch(i.statusCode|0){case 200:{let u;const l=Qt(U(en(Jt(["Items",Ht(Pd())]),new Re(1,[]))),i.responseText);return u=w.Return(l),w.Bind(u,f=>{let c;const m=f;return c=m.tag===1?new d(1,[m.fields[0]]):new d(0,[m.fields[0].Items]),w.Return(c)})}case 404:return w.Return(new d(0,[se()]));default:return w.Return(new d(1,["Unexpected response from backend"]))}}})})}function Fh(e,t){console.error(K(e),t)}function Ls(e,t,n){jn(r=>{try{r(t)}catch(o){e(o)}},n)}function Fe(){return se()}function Ae(e){return oe(e)}class $h extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ColumnHeader"]}}function Mh(e){return new $h(e)}function Ih(e){return e.fields[0]}class Rh extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["RowCell"]}}function Eo(e){return new Rh(e)}function Nh(e){return e.fields[0]}function Dh(){return["scope","col"]}function $n(e){return Mh(p("th",k(C([["className","px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"],Dh(),["children",e]]))))}function js(e,t){let n;return Eo(p("td",k(C([["className","px-6 py-4 whitespace-nowrap text-sm"],(n=[p("a",{className:"text-indigo-600 hover:text-indigo-900",children:t,href:e})],["children",x.Children.toArray(Array.from(n))])]))))}function Tr(e,t){return Eo(p("td",{className:E(" ",fe(e,["px-6","py-4","whitespace-nowrap","text-sm"])),children:t}))}function Ph(e){return Eo(p("td",{className:E(" ",["flex justify-center py-2"]),children:x.Children.toArray([e])}))}function Oh(e,t){let n,r,o,s,i,a,u;return p("div",k(C([["className","flex flex-col mt-4"],(n=[p("div",k(C([["className","-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"],(r=[p("div",k(C([["className","py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"],(o=[p("div",k(C([["className","shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"],(s=[p("table",k(C([["className","min-w-full divide-y divide-gray-200"],(i=[p("thead",{className:"bg-gray-50",children:(a=pe(Ih,e),p("tr",{children:x.Children.toArray(Array.from(a))}))}),(u=ga((l,f)=>(c=>{let m;return p("tr",k(C([["className",l%2===0?"bg-white":"bg-gray-50"],(m=pe(Nh,c),["children",x.Children.toArray(Array.from(m))])])))})(f),t),p("tbody",{children:x.Children.toArray(Array.from(u))}))],["children",x.Children.toArray(Array.from(i))])])))],["children",x.Children.toArray(Array.from(s))])])))],["children",x.Children.toArray(Array.from(o))])])))],["children",x.Children.toArray(Array.from(r))])])))],["children",x.Children.toArray(Array.from(n))])])))}function sn(e,t){if(t.startsWith(e))return t}function zs(e,t){if(t.endsWith(e))return t}function Uh(e){return t=>{let n,r,o,s,i,a;return n=sn("/",t),n!=null?(r=n,"#"+r):(o=sn("#/",t),o!=null?(s=o,s):(i=sn("#",t),i!=null?(a=i,"#/"+la(a,1,a.length-1)):"#/"+t))}}function su(e,t){return Uh()(E("/",St(n=>n.indexOf("?")>=0||n.startsWith("#")||n.startsWith("/")?n:encodeURIComponent(n),e)))}function Vh(e,t){return yc(n=>{if(ic(n))return se();{const r=lc(n,"#");if(r==="?")return se();if(sn("?",r)!=null)return oe(r);{const o=r.split("?");if(!Br((s,i)=>s===i,o)&&o.length===1){const s=V(0,o);return oe(decodeURIComponent(s))}else if(!Br((s,i)=>s===i,o)&&o.length===2)if(V(1,o)===""){const s=V(0,o);return oe(decodeURIComponent(s))}else{const s=V(0,o),i=V(1,o);return C([decodeURIComponent(s),"?"+i])}else return se()}}},C(or(sn("#",e)!=null?la(e,1,e.length-1):t===1&&(zs("#",e)!=null||zs("#/",e)!=null)?"":e,["/"],void 0,0)))}function Hh(e,t,n){return t(Vh(e===2?window.location.pathname+window.location.search:window.location.hash,e))}Qd(e=>{const t=Ka(r=>{const o=ze(e.onUrlChanged,s=>{});Hh(ze(e.hashMode,1),o)});Ja(()=>(window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.addEventListener("hashchange",t):window.addEventListener("popstate",t),window.addEventListener("CUSTOM_NAVIGATION_EVENT",t),hr(()=>{window.navigator.userAgent.indexOf("Trident")>=0||window.navigator.userAgent.indexOf("MSIE")>=0?window.removeEventListener("hashchange",t):window.removeEventListener("popstate",t),window.removeEventListener("CUSTOM_NAVIGATION_EVENT",t)}))),Co(()=>{const r=document.createEvent("CustomEvent");r.initEvent("CUSTOM_NAVIGATION_EVENT",!0,!0),window.dispatchEvent(r)});const n=e.application;return n??te()});function Bh(e,t){return p("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:t},e),p("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"}))}const Lh=Yn(Bh);function jh(e,t){return p("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:t},e),p("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"}))}const zh=Yn(jh);class iu extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Pencil","Trash"]}}class Gh extends H{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ClassName"]}}function Wh(e,t){if(e.tag===1){const n=_s(t,1);return p(zh,n)}else{const n=_s(t,1);return p(Lh,n)}}class gr extends q{constructor(t,n){super(),this.Text=t,this.Action=n}}class kt extends q{constructor(t,n){super(),this.Text=t,this.Action=n}}class wr extends q{constructor(t,n){super(),this.Text=t,this.Action=n}}function au(e,t){return new gr(e.Text,Ke(e.Action)(t))}class uu extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Indigo","Red"]}}function lu(e,t,n){let r;return p("button",k(C([["className",E(" ",$e(N(()=>fe(F("mr-2 w-14 px-4 py-2 border border-transparent shadow-sm font-medium rounded-md text-white focus:outline-none sm:text-sm focus:ring-2 focus:ring-offset-2"),N(()=>t.tag===1?F("focus:ring-red-500 bg-red-600 hover:bg-red-700"):F("focus:ring-indigo-500 bg-indigo-600 hover:bg-indigo-700"))))))],["type","button"],["onClick",n],(r=[Wh(e,oe(new Gh("mr-3 flex-shrink-0 h-4 w-6")))],["children",x.Children.toArray(Array.from(r))])])))}const qh=e=>lu(new iu(0,[]),new uu(0,[]),e),cu=e=>lu(new iu(1,[]),new uu(1,[]),e);function Ao(e,t){return p("button",{className:E(" ",["w-full","inline-flex","justify-center","rounded-md","border","border-transparent","shadow-sm","px-4","py-2","text-base","font-medium","text-white","focus:outline-none","focus:ring-2","focus:ring-offset-2","sm:ml-3","sm:w-auto","sm:text-sm",`focus:ring-${e}-500`,`bg-${e}-600`,`hover:bg-${e}-700`]),type:"button",children:t.Text,onClick:t.Action})}function To(e){return p("button",{className:E(" ",["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:e.Text,onClick:e.Action})}function fu(e){return["strokeLinecap",e]}function du(e){return["strokeLinejoin",e]}const Zh=p("div",k(C([["className",E(" ",["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,t;const n=[p("svg",k(C([["className",E(" ",["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=oe(p("path",k(C([fu("round"),du("round"),(t="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",["d",t])])))),["children",x.Children.toArray(Array.from(e))])])))];return["children",x.Children.toArray(Array.from(n))]})()]))),hu=p("div",k(C([["className",E(" ",["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 t=[p("svg",k(C([["className",E(" ",["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=oe(p("path",k(C([fu("round"),du("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",x.Children.toArray(Array.from(e))])])))];return["children",x.Children.toArray(Array.from(t))]})()])));function Jh(e,t){let n;return p("div",k(C([["className",E(" ",["bg-gray-50","px-4","py-3","sm:px-6","sm:flex","sm:flex-row-reverse"])],(n=[Ao("red",e),To(t)],["children",x.Children.toArray(Array.from(n))])])))}function Yh(e){let t;return p("div",k(C([["className","mt-2"],(t=[p("p",{className:E(" ",["text-sm","text-gray-500"]),children:e})],["children",x.Children.toArray(Array.from(t))])])))}function Kh(e){return p("h3",{className:E(" ",["text-lg","leading-6","font-medium","text-gray-900"]),id:"modal-title",children:e})}function Xh(e,t,n,r){let o,s,i,a;return p("div",k(C([["className",E(" ",["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=[p("div",k(C([["className",E(" ",["bg-white","px-4","pt-5","pb-4","sm:p-6","sm:pb-4"])],(s=[p("div",k(C([["className",E(" ",["sm:flex","sm:items-start"])],(i=[Zh,p("div",k(C([["className",E(" ",["mt-3","text-center","sm:mt-0","sm:ml-4","sm:text-left"])],(a=[Kh(e),Yh(t)],["children",x.Children.toArray(Array.from(a))])])))],["children",x.Children.toArray(Array.from(i))])])))],["children",x.Children.toArray(Array.from(s))])]))),Jh(n,r)],["children",x.Children.toArray(Array.from(o))])])))}function Fo(e){let t,n,r;return p("div",k(C([["className",E(" ",["relative","z-10"])],["role",E(" ",["dialog"])],(t=[p("div",{className:E(" ",["fixed","inset-0","bg-gray-500","bg-opacity-75","transition-opacity"])}),p("div",k(C([["className",E(" ",["fixed","z-10","inset-0","overflow-y-auto"])],(n=[p("div",k(C([["className",E(" ",["flex","min-h-full","items-end","justify-center","p-4","text-center","sm:items-center","sm:p-0"])],(r=[p("span",{className:E(" ",["hidden","sm:inline-block","sm:align-middle","sm:h-screen"]),children:"​"}),Xh(e.HeadingText,e.BodyText,e.ConfirmAction,e.CancelAction)],["children",x.Children.toArray(Array.from(r))])])))],["children",x.Children.toArray(Array.from(n))])])))],["children",x.Children.toArray(Array.from(t))])])))}function Qh(){return se()}function $o(e){return E("/",e)}function e0(e,t){const n=new Error("Duplicate SubId");return e(["Duplicate SubId: "+$o(t),n])}function mu(e,t,n){try{G(n)}catch(r){e(["Error stopping subscription: "+$o(t),r])}}function t0(e,t,n,r){try{return[n,r(t)]}catch(o){e(["Error starting subscription: "+$o(n),o]);return}}function n0(e,t){jn(n=>{mu(e,n[0],n[1])},t)}function Gs(e,t,n,r,o,s){return jn(i=>{e0(e,i)},n),jn(i=>{mu(e,i[0],i[1])},r),yo(o,kc(i=>t0(e,t,i[0],i[1]),s))}function r0(){return[se(),ed({Compare:Me}),se()]}function o0(e,t,n,r,o){return Gr(e,r)?[Te(e,n),r,o]:[n,Qf(e,r),Te([e,t],o)]}function s0(e){return gc((t,n)=>o0(t[0],t[1],n[0],n[1],n[2]),e,r0())}const i0=se();function Ws(e,t){const n=td(St(i=>i[0],e),{Compare:Me}),r=s0(t),o=r[1],s=r[0];if(n.Equals(o))return[s,se(),e,se()];{const i=Sc(a=>Gr(a[0],o),e);return[s,i[1],i[0],Cc(a=>!Gr(a[0],n),r[2])]}}function a0(e,t,n,r){const o=Me(e,n)|0;if(o===0)throw new Error("The step of a range cannot be zero");const s=o>0;return i=>{const a=Me(i,t)|0;return s&&a<=0||!s&&a>=0?[i,r(i,e)]:void 0}}function u0(e,t,n,r,o){const s=a0(t,n,r,o);return N(()=>Uc(s,e))}function l0(e,t,n){return u0(e,t,n,0,(r,o)=>r+o)}class Pt extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Writable","ReadWritable"]}}class c0{constructor(t){this.state=new Pt(0,[sr(new Array(cs(t,10)),0,cs(t,10),null),0])}}function f0(e){return new c0(e)}function qs(e){const t=e.state;if(t.tag===1){const n=t.fields[1]|0,r=t.fields[2]|0,o=t.fields[0],s=(r+1)%o.length|0;return s===n?e.state=new Pt(0,[o,n]):e.state=new Pt(1,[o,n,s]),K(V(r,o))}else return}function d0(e,t){const n=e.state;if(n.tag===1){const r=n.fields[1]|0,o=n.fields[2]|0,s=n.fields[0];Ge(s,r,t);const i=(r+1)%s.length|0;i===o?e.state=new Pt(1,[h0(e,o,s),s.length,0]):e.state=new Pt(1,[s,i,o])}else{const r=n.fields[1]|0,o=n.fields[0];Ge(o,r,t);const s=(r+1)%o.length|0;e.state=new Pt(1,[o,s,r])}}function h0(e,t,n){return Array.from(N(()=>fe(jc(t,n),N(()=>fe(zc(t,n),N(()=>Gc(r=>F(te()),l0(0,1,n.length))))))))}class Mo extends q{constructor(t,n,r,o,s,i,a){super(),this.init=t,this.update=n,this.subscribe=r,this.view=o,this.setState=s,this.onError=i,this.termination=a}}function pu(e,t,n){return new Mo(e,t,r=>Qh(),n,U(r=>{const o=Ke(n)(r);return s=>{o(s)}}),r=>{Fh(r[0],r[1])},[r=>!1,r=>{}])}function m0(e,t){return new Mo(t.init,t.update,t.subscribe,t.view,e,t.onError,t.termination)}function p0(e){return e.init}function _0(e,t,n,r,o,s,i){const a=Ke(e)(i.init),u=xr(t)(Ke(i.update)),l=xr(n)(Ke(i.view)),f=xr(r)(Ke(i.setState));return new Mo(a,U(u),Ke(o)(i.subscribe),U(l),U(f),i.onError,s(i.termination))}function g0(e,t,n){let r;const o=n.init(t),s=o[0],i=n.subscribe(s),a=n.termination,u=f0(10);let l=!1,f=s,c=i0,m=!1;const h=g=>{m||(d0(u,g),l||(l=!0,y(),l=!1))},_=Ke(e)(h),y=()=>{let g,b=qs(u);for(;!m&&b!=null;){const S=v(b);if(a[0](S))n0(n.onError,c),a[1](f),m=!0;else{const M=n.update(S,f),X=M[0],ue=n.subscribe(X);n.setState(X,_),Ls(ie=>{n.onError([gt(rt("Error handling the message: %A"))(S),ie])},_,M[1]),f=X,c=(g=Ws(c,ue),Gs(n.onError,_,g[0],g[1],g[2],g[3])),b=qs(u)}}};l=!0,n.setState(s,_),Ls(g=>{n.onError([gt(rt("Error intitializing:")),g])},_,o[1]),c=(r=Ws(c,i),Gs(n.onError,_,r[0],r[1],r[2],r[3])),y(),l=!1}function w0(e,t){g0(U(n=>n),e,t)}function y0(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var _u={exports:{}},gu={};const b0=y0(el);/**
38
+ * @license React
39
+ * use-sync-external-store-shim.production.min.js
40
+ *
41
+ * Copyright (c) Facebook, Inc. and its affiliates.
42
+ *
43
+ * This source code is licensed under the MIT license found in the
44
+ * LICENSE file in the root directory of this source tree.
45
+ */var Gt=b0;function v0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var x0=typeof Object.is=="function"?Object.is:v0,C0=Gt.useState,S0=Gt.useEffect,k0=Gt.useLayoutEffect,E0=Gt.useDebugValue;function A0(e,t){var n=t(),r=C0({inst:{value:n,getSnapshot:t}}),o=r[0].inst,s=r[1];return k0(function(){o.value=n,o.getSnapshot=t,Fr(o)&&s({inst:o})},[e,n,t]),S0(function(){return Fr(o)&&s({inst:o}),e(function(){Fr(o)&&s({inst:o})})},[e]),E0(n),n}function Fr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!x0(e,n)}catch{return!0}}function T0(e,t){return t()}var F0=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?T0:A0;gu.useSyncExternalStore=Gt.useSyncExternalStore!==void 0?Gt.useSyncExternalStore:F0;_u.exports=gu;var $0=_u.exports;class M0{constructor(t,n,r){this.arg=n,this.dependencies=r;const o=t(),s=[];this.finalDispatch=void 0;let i;const a=p0(o)(this.arg);let u=a[0],l=a[1];i=[[u,f=>{const c=this.finalDispatch;c==null?s.push(f):c(f)},!1,s],l],this.state=i[0],this.cmd=i[1],this.subscribe=f=>{let c=!1;const m=Pr(this.state[0]);return w0(this.arg,m0((h,_)=>{const y=this.state;this.finalDispatch=_,this.state=[h,y[1],!0,s],h!==y[0]&&f()},_0((h,_)=>{const y=this.cmd;return this.cmd=Fe(),[this.state[0],y]},(h,_,y)=>h(_)(this.state[0]),Ur(h=>h),Ur(h=>h),U(h=>h),h=>[_=>h[0](_)?!0:m&&c,_=>{const y=_;Pr(y)?G(y):h[1](_)}],o))),()=>{c=!0}}}}function Zs(e,t,n){return new M0(e,t,n)}function I0(e){return e.state}function R0(e){return e.subscribe}function N0(e,t,n){return de(e.arg,t)?!de(e.dependencies,n):!0}function wu(e,t,n){const r=Wt(()=>Zs(e,t,n)),o=r[0];N0(o,t,n)&&r[1](Zs(e,t,n));const s=$0.useSyncExternalStore(R0(o),()=>I0(o)),i=s[2],a=s[3],u=s[1];return qt(()=>{if(i&&a.length>0){let l=ae(a);try{for(;l["System.Collections.IEnumerator.MoveNext"]();){const f=l["System.Collections.Generic.IEnumerator`1.get_Current"]();setTimeout(()=>{u(f)})}}finally{G(l)}pl(a)}},[i,a]),[s[0],u]}function yu(){const e=oe(p("span",{children:["Please wait..."]}));return p("div",{children:x.Children.toArray(Array.from(e))})}function Ot(e){const t=e.error,n=oe(p("span",{children:[t]}));return p("div",{children:x.Children.toArray(Array.from(n))})}const D0=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}@font-face{font-family:Inter}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.z-10{z-index:10}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-mb-px{margin-bottom:-1px}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.hidden{display:none}.h-12{height:3rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-full{height:100%}.min-h-full{min-height:100%}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-full{width:100%}.min-w-full{min-width:100%}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-lg{max-width:32rem}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.gap-4{gap:1rem}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity, 1))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.whitespace-nowrap{white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-75{--tw-bg-opacity: .75}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-4{padding-bottom:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.tracking-wider{letter-spacing:.05em}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:bg-indigo-700:hover{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity, 1))}.hover\\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.hover\\:text-indigo-900:hover{--tw-text-opacity: 1;color:rgb(49 46 129 / var(--tw-text-opacity, 1))}.focus\\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity, 1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity, 1))}.focus\\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity, 1))}.focus\\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}@media (min-width: 640px){.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:ml-10{margin-left:2.5rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:mt-px{margin-top:1px}.sm\\:inline-block{display:inline-block}.sm\\:flex{display:flex}.sm\\:grid{display:grid}.sm\\:h-10{height:2.5rem}.sm\\:h-screen{height:100vh}.sm\\:w-10{width:2.5rem}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:max-w-xs{max-width:20rem}.sm\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\\:flex-row-reverse{flex-direction:row-reverse}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:items-baseline{align-items:baseline}.sm\\:gap-4{gap:1rem}.sm\\:rounded-lg{border-radius:.5rem}.sm\\:border-b{border-bottom-width:1px}.sm\\:border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.sm\\:p-0{padding:0}.sm\\:p-6{padding:1.5rem}.sm\\:px-0{padding-left:0;padding-right:0}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.sm\\:pb-4{padding-bottom:1rem}.sm\\:pt-2{padding-top:.5rem}.sm\\:text-left{text-align:left}.sm\\:align-middle{vertical-align:middle}.sm\\:text-base{font-size:1rem;line-height:1.5rem}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\\:px-8{padding-left:2rem;padding-right:2rem}}`,bu=_e(D0);class P0 extends q{constructor(t,n){super(),this.PartnerId=t,this.AccountId=n}}function O0(e,t){const n=ka(e,[new Wa(t.PartnerId),jd(t.AccountId)]);let r,o;switch(n!=null&&n.tag===2&&n.fields[0].tag===0?(r=0,o=n.fields[0].fields[0]):r=1,r){case 0:return o;default:return}}function U0(e,t){let n;return ze((n=t,n==null?void 0:n.Partner.Name),e)}function V0(e,t){let n,r;return Ul((n=t,n==null?void 0:(r=n.Account,r==null?void 0:r.Name)),()=>e)}let yt=class extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["LoadData","LoadDetail","ShowResetModal","CloseModal","ResetPromotedFunds","Reload"]}},it=class extends q{constructor(t,n,r,o){super(),this.PromotedFundOverrides=t,this.FundLookup=n,this.User=r,this.ModalState=o}},Rn=class extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ShowModal","Hidden"]}};function H0(e){return nu(e.backendUrl,e.accessToken)}function B0(e,t){return w.Delay(()=>w.Bind(nu(e.backendUrl,e.accessToken),n=>(t(new yt(0,[new he(2,[n])])),w.Zero())))}function L0(e,t,n,r){return w.Delay(()=>w.Bind(ou(e.backendUrl,e.accessToken,t,n),o=>(r(new yt(5,[])),w.Zero())))}function j0(e,t,n,r){const o=[t,n];return w.Delay(()=>{let s;const i=o[1];return s=i==null?void 0:Ld(i),w.Bind(Ah(e.backendUrl,e.accessToken,o[0].fields[0],s),a=>(r(new yt(1,[o,new he(2,[a])])),w.Zero()))})}function z0(e,t,n,r){Ue(L0(e,t,n,r))}function G0(e,t){Ue(B0(e,t))}function vu(e,t,n){if(t!=null){const r=t;Ue(j0(e,r[0],r[1],n))}}function xu(e){const t=ff((n,r)=>{if(de(r,new he(0,[])))return K(n)},e);if(t==null)return[e,void 0];{const n=v(t);return[Aa(n,r=>{if(r!=null)return new he(1,[])},e),K(n)]}}function W0(e,t){return[new it(new he(0,[]),fr({Compare:tr}),Ga(e),new Rn(1,[])),Fe()]}function q0(e){let t;return[[new Wa(e.PartnerId),(t=e.AccountId,t==null?void 0:new qa(t))],new he(0,[])]}function Z0(e,t,n){const r=xu(df(St(q0,n),{Compare:tr}));return[new it(new he(2,[new d(0,[n])]),r[0],t.User,t.ModalState),Ae(o=>{vu(e,r[1],o)})]}function J0(e,t,n,r,o){const s=xu(Aa([n,r],i=>{if(i!=null)return o},t.FundLookup));return[new it(t.PromotedFundOverrides,s[0],t.User,t.ModalState),Ae(i=>{vu(e,s[1],i)})]}function Y0(e,t,n){let r,o,s,i,a,u,l;switch(t.tag){case 1:{r=2,i=t.fields[1],a=t.fields[0];break}case 2:{r=3,u=t.fields[0];break}case 3:{r=4;break}case 4:{r=5,l=t.fields[0];break}case 5:{r=6;break}default:t.fields[0].tag===2&&t.fields[0].fields[0].tag===0?(r=0,o=t.fields[0].fields[0].fields[0]):(r=1,s=t.fields[0])}switch(r){case 0:return Z0(e,n,o);case 1:return[new it(s,n.FundLookup,n.User,n.ModalState),Fe()];case 2:return J0(e,n,a[0],a[1],i);case 3:return[new it(n.PromotedFundOverrides,n.FundLookup,n.User,new Rn(0,[u])),Fe()];case 4:return[new it(n.PromotedFundOverrides,n.FundLookup,n.User,new Rn(1,[])),Fe()];case 5:return[new it(new he(1,[]),n.FundLookup,n.User,new Rn(1,[])),Ae(f=>{z0(e,l.PartnerId,l.AccountId,f)})];default:return[new it(new he(1,[]),n.FundLookup,n.User,n.ModalState),Ae(f=>{G0(e,f)})]}}const K0=C([$n("Partner"),$n("Account"),$n("Promoted Funds"),$n("")]);function X0(e){return su(C(["account-registry","partners",e,"super-configuration"]))}function Q0(e,t){return su(C(["account-registry","partners",e,"accounts",t,"super-configuration"]))}function em(e,t,n){return $e(N(()=>{let r;const o=O0(e,n),s=U0(n.PartnerId,o),i=V0(n.AccountId,o);return fe(F((r=[X0(n.PartnerId),s],js(r[0],r[1]))),N(()=>{let a,u,l,f;return fe((a=n.AccountId,a!=null?i!=null?(u=a,l=i,F((f=[Q0(n.PartnerId,u),l],js(f[0],f[1])))):F(Tr(["text-gray-500"],"-")):F(Tr(["text-gray-500"],"-"))),N(()=>fe(F(Tr(["text-gray-500"],E(", ",n.Funds))),N(()=>F(Ph(cu(c=>{t(new yt(2,[new P0(n.PartnerId,n.AccountId)]))})))))))}))}))}function tm(e,t){let n;return p(Fo,{BodyText:`Are you sure you want to reset the current promoted funds for ${n=e.AccountId,n==null?`Partner: ${e.PartnerId}`:`Account: ${n}`}? This action cannot be undone.`,CancelAction:new kt("Cancel",r=>{t(new yt(3,[]))}),ConfirmAction:new gr("Reset",r=>{t(new yt(4,[e]))}),HeadingText:"Reset Promoted Funds"})}function nm(e){let t;const n=wu(()=>pu(()=>W0(e.accessToken),(a,u)=>Y0(e,a,u),(a,u)=>{}),void 0,void 0),r=n[0],o=n[1];Co(Qa(()=>H0(e),a=>{o(new yt(0,[a]))}));let s;if(za(r.User.Roles)!=null){const a=r.PromotedFundOverrides;let u,l,f,c;switch(a.tag){case 2:{a.fields[0].tag===0?(u=3,c=a.fields[0].fields[0]):(u=1,l=a.fields[0].fields[0]);break}case 3:{u=2,f=a.fields[0];break}default:u=0}switch(u){case 0:{s=p(yu,null);break}case 1:{s=p(Ot,{error:l});break}case 2:{const m=_e(f);s=p(Ot,{error:m});break}default:s=p("div",k(oe((t=$e(N(()=>fe(F(p("h2",{className:"text-xl text-gray-900",children:"Promoted Fund Overrides"})),N(()=>{let m;return fe(F(p("p",k(C([["className","mt-2 text-sm text-gray-700"],(m="A list of all promoted fund overrides. This does not include accounts or partners that use the default configuration.",["children",m])])))),N(()=>fe(F(Oh(K0,St(h=>em(r.FundLookup,o,h),c))),N(()=>{const h=r.ModalState;return h.tag===0?F(tm(h.fields[0],o)):F(te())}))))})))),["children",x.Children.toArray(Array.from(t))]))))}}else s=p(Ot,{error:"You do not have the appropriate permissions to view this information"});const i=C([p("style",{children:[bu]}),s]);return p("div",{children:x.Children.toArray(Array.from(i))})}class Js extends q{constructor(t,n,r){super(),this.Id=t,this.PartnerId=n,this.Enabled=r}}const rm=C(["BringYourOwnFundCustomStep","FeaturedFunds"]);function om(e,t){return St(n=>{const r=vc(o=>o.Id===n,t);if(r==null)return new Js(n,e,!1);{const o=r;return new Js(o.Id,e,o.Enabled)}},rm)}class sm extends q{constructor(t,n){super(),this.PromotedFunds=t,this.FeatureFlags=n}}class Cu extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Account","Partner"]}}class me extends q{constructor(t,n,r){super(),this.Data=t,this.User=n,this.ModalState=r}}class Ee extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ResetModal","EditModal","Hidden"]}}class fn extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["DefaultUsi","FeatureSet","PromotedFunds","FeatureFlag"]}}class W extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["LoadData","ShowEditModal","ShowResetModal","ShowFeatureFlagModal","EnableFeatureFlag","DisableFeatureFlag","CloseModal","UpdateDefaultUsi","UpdateFeatureSet","UpdatePromotedFunds","ResetDefaultUsi","ResetPromotedFunds","PromotedFundsUpdate","FeatureFlagUpdate"]}}class an extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Default","Inherited","Config"]}}function Ys(e){switch(e.tag){case 1:return e.fields[0]+" (inherited)";case 2:return e.fields[0];default:return e.fields[0]+" (default)"}}function Ks(e){switch(e.tag){case 1:return"";case 2:return e.fields[0];default:return""}}const im=e=>ze(e,"-"),am=e=>ze(e,"");class um extends q{constructor(t,n,r,o,s,i){super(),this.UpdatePromotedFunds=t,this.DeletePromotedFunds=n,this.UpdateDefaultFundUsi=r,this.UpdateFeatureSet=o,this.UpdateFeatureFlag=s,this.ReloadData=i}}class Io extends H{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["TextInput","Select"]}}function lm(e){return p("h3",{className:E(" ",["text-lg","leading-6","font-medium","text-gray-900"]),id:"modal-title",children:e})}function cm(e,t,n,r){let o,s;return p("div",k(C([["className","mt-2 w-full h-full"],(o=[p("div",k(C([["className","h-30"],(s=$e(N(()=>fe(F(p("label",{className:"sr-only text-base",htmlFor:"field",children:t})),N(()=>{let i,a,u;const l=r;return l.tag===1?F(p("select",k(C([["name","field"],["id","field"],(i="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-base border-gray-300 rounded-md",["className",i]),["value",n],["onChange",f=>{e(f.target.value)}],(a=St(f=>p("option",{value:f,children:f}),l.fields[0]),["children",x.Children.toArray(Array.from(a))])])))):F(p("input",k(C([["type","text"],["name","field"],["id","field"],(u="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-base border-gray-300 rounded-md",["className",u]),["value",n],["onChange",f=>{e(f.target.value)}]]))))})))),["children",x.Children.toArray(Array.from(s))])])))],["children",x.Children.toArray(Array.from(o))])])))}function fm(e,t){let n;return p("div",k(C([["className",E(" ",["bg-gray-50","px-4","py-3","sm:px-6","sm:flex","sm:flex-row-reverse"])],(n=[Ao("indigo",e),To(t)],["children",x.Children.toArray(Array.from(n))])])))}function Ro(e){let t,n,r,o,s,i,a;const u=eh(e.FieldValue),l=u[0],f=au(e.ConfirmAction,l);return p("div",k(C([["className",E(" ",["relative","z-10"])],["role",E(" ",["dialog"])],(t=[p("div",{className:E(" ",["fixed","inset-0","bg-gray-500","bg-opacity-75","transition-opacity"])}),p("div",k(C([["className",E(" ",["fixed","z-10","inset-0","overflow-y-auto"])],(n=[p("div",k(C([["className",E(" ",["flex","min-h-full","items-end","justify-center","p-4","text-center","sm:items-center","sm:p-0"])],(r=[p("span",{className:E(" ",["hidden","sm:inline-block","sm:align-middle","sm:h-screen"]),children:"​"}),p("div",k(C([["className",E(" ",["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=[p("div",k(C([["className",E(" ",["bg-white","px-4","pt-5","pb-4","sm:p-6","sm:pb-4"])],(s=[p("div",k(C([["className",E(" ",["sm:flex","sm:items-start"])],(i=[hu,p("div",k(C([["className",E(" ",["mt-3","text-center","sm:mt-0","sm:ml-4","sm:text-left","w-full"])],(a=[lm(e.HeadingText),cm(u[1],e.FieldName,l,e.FieldType)],["children",x.Children.toArray(Array.from(a))])])))],["children",x.Children.toArray(Array.from(i))])])))],["children",x.Children.toArray(Array.from(s))])]))),fm(f,e.CancelAction)],["children",x.Children.toArray(Array.from(o))])])))],["children",x.Children.toArray(Array.from(r))])])))],["children",x.Children.toArray(Array.from(n))])])))],["children",x.Children.toArray(Array.from(t))])])))}function dm(e){return p("h3",{className:E(" ",["text-lg leading-6 font-medium text-gray-900"]),id:"modal-title",children:e})}function hm(e){let t,n,r,o;return p("div",k(C([["className","mt-2 w-full h-full"],(t=[p("div",k(C([["className","h-30"],(n=[p("p",k(C([(r="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-base border-gray-300 rounded-md",["className",r]),["value",e]]))),p("div",k(C([["className","mt-2"],(o=[p("p",{className:"text-sm text-gray-500",children:e})],["children",x.Children.toArray(Array.from(o))])])))],["children",x.Children.toArray(Array.from(n))])])))],["children",x.Children.toArray(Array.from(t))])])))}function mm(e,t){let n;return p("div",k(C([["className",E(" ",["bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"])],(n=[Ao("indigo",e),To(t)],["children",x.Children.toArray(Array.from(n))])])))}function pm(e){let t,n,r,o,s,i,a,u;const l=au(e.ConfirmAction,"");return p("div",k(C([["className","relative z-10"],["role",E(" ",["dialog"])],(t=[p("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"}),p("div",k(C([["className","fixed z-10 inset-0 overflow-y-auto"],(n=[p("div",k(C([["className","flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"],(r=[p("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen",children:"​"}),p("div",k(C([(o="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",["className",o]),(s=[p("div",k(C([["className","bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"],(i=[p("div",k(C([["className","sm:flex sm:items-start"],(a=[hu,p("div",k(C([["className","mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"],(u=[dm(e.HeadingText),hm(e.Subtext)],["children",x.Children.toArray(Array.from(u))])])))],["children",x.Children.toArray(Array.from(a))])])))],["children",x.Children.toArray(Array.from(i))])]))),mm(l,e.CancelAction)],["children",x.Children.toArray(Array.from(s))])])))],["children",x.Children.toArray(Array.from(r))])])))],["children",x.Children.toArray(Array.from(n))])])))],["children",x.Children.toArray(Array.from(t))])])))}function _m(e,t){return p(Ro,{CancelAction:new kt("Cancel",n=>{t(new W(6,[]))}),ConfirmAction:new wr("Save",(n,r)=>{t(new W(8,[n==="Basic"?new Wn(0,[]):new Wn(1,[])]))}),FieldName:"Feature Set",FieldType:new Io(1,[C(["Promoted","Basic"])]),FieldValue:_e(e),HeadingText:"Change Feature Set"})}function gm(e,t){return p(Ro,{CancelAction:new kt("Cancel",n=>{t(new W(6,[]))}),ConfirmAction:new wr("Save",(n,r)=>{t(new W(7,[n]))}),FieldName:"Default USI",FieldType:new Io(0,[]),FieldValue:e,HeadingText:"Edit Default USI"})}function Xs(e,t){return p(Ro,{CancelAction:new kt("Cancel",n=>{t(new W(6,[]))}),ConfirmAction:new wr("Save",(n,r)=>{t(new W(9,[n]))}),FieldName:"Promoted Funds",FieldType:new Io(0,[]),FieldValue:e,HeadingText:"Edit Promoted Funds"})}function Qs(e,t){const n=e.Enabled?["Disable",o=>new W(5,[o])]:["Enable",o=>new W(4,[o])],r=n[0];return p(pm,{CancelAction:new kt("Cancel",o=>{t(new W(6,[]))}),ConfirmAction:new wr(r,(o,s)=>{t(n[1](e))}),HeadingText:e.Id,Subtext:`This will ${r.toLocaleLowerCase()} the ${e.Id} feature`})}function wm(e){return p(Fo,{BodyText:"Are you sure you want to reset the current Default USI? This action cannot be undone.",CancelAction:new kt("Cancel",t=>{e(new W(6,[]))}),ConfirmAction:new gr("Reset",t=>{e(new W(10,[]))}),HeadingText:"Reset Default USI"})}function ei(e){return p(Fo,{BodyText:"Are you sure you want to reset the current promoted funds? This action cannot be undone.",CancelAction:new kt("Cancel",t=>{e(new W(6,[]))}),ConfirmAction:new gr("Reset",t=>{e(new W(11,[]))}),HeadingText:"Reset Promoted Funds"})}function ym(e,t){return[new me(new he(0,[]),Ga(e),new Ee(2,[])),Fe()]}function ti(e,t){Ue(e.ReloadData(t))}function bm(e,t,n){switch(t.tag){case 1:return[new me(n.Data,n.User,new Ee(1,[t.fields[0]])),Fe()];case 2:return[new me(n.Data,n.User,new Ee(0,[t.fields[0]])),Fe()];case 6:return[new me(n.Data,n.User,new Ee(2,[])),Fe()];case 7:return[new me(n.Data,n.User,new Ee(2,[])),Ae(r=>{Ue(e.UpdateDefaultFundUsi(t.fields[0],r))})];case 8:return[new me(n.Data,n.User,new Ee(2,[])),Ae(r=>{Ue(e.UpdateFeatureSet(t.fields[0],r))})];case 9:{const r=C(Ct(o=>o.trim(),or(t.fields[0],[","],void 0,0)));return[new me(n.Data,n.User,new Ee(2,[])),Ae(o=>{Ue(e.UpdatePromotedFunds({Funds:r},o))})]}case 10:return[new me(n.Data,n.User,new Ee(2,[])),Fe()];case 11:return[new me(n.Data,n.User,new Ee(2,[])),Ae(r=>{Ue(e.DeletePromotedFunds(r))})];case 12:return[new me(new he(1,[]),n.User,n.ModalState),Ae(r=>{ti(e,r)})];case 3:return[new me(n.Data,n.User,new Ee(1,[new fn(3,[t.fields[0]])])),Fe()];case 4:return[new me(n.Data,n.User,new Ee(2,[])),Ae(r=>{Ue(e.UpdateFeatureFlag([t.fields[0].Id,!0],r))})];case 5:return[new me(n.Data,n.User,new Ee(2,[])),Ae(r=>{Ue(e.UpdateFeatureFlag([t.fields[0].Id,!1],r))})];case 13:return[new me(new he(1,[]),n.User,n.ModalState),Ae(r=>{ti(e,r)})];default:return[new me(t.fields[0],n.User,n.ModalState),Fe()]}}function Su(e,t,n,r){return w.Delay(()=>{const o=ru(e,t,n,r);return w.Bind(o,s=>{const i=s;if(i.tag===1)return w.Return(new d(1,[i.fields[0]]));{const a=Sh(e,t,r);return w.Bind(a,u=>{let l;const f=u;return l=f.tag===1?new d(1,[f.fields[0]]):new d(0,[new Cu(0,[new Bd(i.fields[0],f.fields[0])])]),w.Return(l)})}})})}function ku(e,t,n){return w.Delay(()=>{const r=ru(e,t,n,void 0);return w.Bind(r,o=>{const s=o;if(s.tag===1)return w.Return(new d(1,[s.fields[0]]));{const i=Th(e,t,n);return w.Bind(i,a=>{let u;const l=a;return u=l.tag===1?new d(1,[l.fields[0]]):new d(0,[new Cu(1,[new sm(s.fields[0],om(n,l.fields[0]))])]),w.Return(u)})}})})}function vm(e,t){return w.Delay(()=>w.Bind(ou(e.backendUrl,e.accessToken,e.partnerId,e.accountId),n=>(t(new W(12,[n])),w.Zero())))}function xm(e,t,n){return w.Delay(()=>w.Bind(xh(e.backendUrl,e.accessToken,e.partnerId,e.accountId,t),r=>(n(new W(12,[r])),w.Zero())))}function Cm(e,t,n,r){return w.Delay(()=>w.Bind(Ch(e.backendUrl,e.accessToken,e.partnerId,t,n),o=>(r(new W(13,[o])),w.Zero())))}function Sm(e){const t=e.accountId;return t==null?ku(e.backendUrl,e.accessToken,e.partnerId):Su(e.backendUrl,e.accessToken,e.partnerId,t)}function km(e,t){return w.Delay(()=>{let n;return w.Bind((n=e.accountId,n==null?ku(e.backendUrl,e.accessToken,e.partnerId):Su(e.backendUrl,e.accessToken,e.partnerId,n)),r=>(t(new W(0,[new he(2,[r])])),w.Zero()))})}function Em(e,t,n){return w.Delay(()=>{const r=e.accountId;if(r==null)return w.Zero();{const o=r;return w.Bind(kh(e.backendUrl,e.accessToken,o,t),s=>(n(new W(12,[s])),w.Zero()))}})}function Am(e,t,n){return w.Delay(()=>{const r=e.accountId;if(r==null)return w.Zero();{const o=r;return w.Bind(Eh(e.backendUrl,e.accessToken,o,t),s=>(n(new W(12,[s])),w.Zero()))}})}function Tm(e){return new um((t,n)=>xm(e,t,n),t=>vm(e,t),(t,n)=>Em(e,t,n),(t,n)=>Am(e,t,n),(t,n)=>Cm(e,t[0],t[1],n),t=>km(e,t))}function Fm(e){const t=e.PartnerFunds,n=e.AccountFunds;let r,o;switch(R(t)?R(n)?r=0:(r=2,o=n):R(n)?r=1:(r=2,o=n),r){case 0:return new an(0,["mercermychoice"]);case 1:return new an(1,[E(", ",t)]);default:return new an(2,[E(", ",o)])}}function $m(e){const t=e.PartnerFunds;return R(t)?new an(0,["mercermychoice"]):new an(2,[E(", ",t)])}function No(e,t,n,r){let o,s,i,a,u;const l=C(Bn((o=n,o==null?void 0:qh(o)))),f=C(Bn((s=r,s==null?void 0:cu(s))));return p("div",k(C([["className",E(" ",["px-4","py-5","sm:grid","sm:grid-cols-5","sm:gap-4","sm:px-6"])],(i=[p("dt",{className:E(" ",["text-sm","font-medium","text-gray-500"]),children:e}),p("dd",k(C([["className",E(" ",["mt-1","text-sm","text-gray-900","sm:mt-0","sm:col-span-2"])],(a=[p("span",{className:"flex-grow",children:t})],["children",x.Children.toArray(Array.from(a))])]))),p("span",k(C([["className","flex-grow"],(u=$e(N(()=>fe(l,N(()=>f)))),["children",x.Children.toArray(Array.from(u))])])))],["children",x.Children.toArray(Array.from(i))])])))}function Mm(e,t,n){return No("Default USI",t,Vd(e)!=null?r=>{n(new W(1,[new fn(0,[])]))}:void 0,void 0)}function Im(e,t,n){const r=Hd(e)!=null?o=>{n(new W(1,[new fn(1,[])]))}:void 0;return No("Feature Set",_e(t),r,void 0)}function ni(e,t,n){return No("Funds",t,qn(e)!=null?r=>{n(new W(1,[new fn(2,[])]))}:void 0,qn(e)!=null?r=>{n(new W(2,[new fn(2,[])]))}:void 0)}function ri(e){let t;return p("div",k(C([["className",E(" ",["px-4 py-4 sm:px-0"])],(t=[p("h3",{className:E(" ",["text-lg font-semibold leading-7 text-gray-900"]),children:e})],["children",x.Children.toArray(Array.from(t))])])))}function Rm(e,t,n){let r,o,s;const i=qn(e)!=null?l=>{n(new W(3,[t]))}:l=>{},a=qn(e)==null,u=p("button",k(C([["className",E(" ",$e(N(()=>fe(F("relative inline-flex h-6 w-11 gap-4 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2"),N(()=>fe(F(a?"cursor-not-allowed":""),N(()=>t.Enabled?F("bg-indigo-600"):F("bg-gray-300"))))))))],["role",E(" ",["switch"])],["type","button"],["onClick",i],(r=[p("span",{className:E(" ",$e(N(()=>fe(F("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"),N(()=>t.Enabled?F("translate-x-5"):F("translate-x-0"))))))})],["children",x.Children.toArray(Array.from(r))])])));return p("div",k(C([["className",E(" ",["px-4 py-5 sm:grid sm:grid-cols-5 sm:gap-4 sm:px-6"])],(o=[p("dt",{className:E(" ",["text-sm font-medium text-gray-500"]),children:t.Id}),p("dd",k(C([["className",E(" ",["mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"])],(s=[p("span",{className:"flex-grow",children:x.Children.toArray([u])})],["children",x.Children.toArray(Array.from(s))])])))],["children",x.Children.toArray(Array.from(o))])])))}function Nm(e){let t,n;const r=Tm(e);n=f=>c=>bm(r,f,c);const o=wu(()=>pu(()=>ym(e.accessToken),U(n),(f,c)=>{}),void 0,void 0),s=o[0],i=o[1];Co(Qa(()=>Sm(e),f=>{i(new W(0,[f]))}));const a=s.User.Roles;let u;if(za(a)!=null){const f=s.Data;let c,m,h,_;switch(f.tag){case 2:{f.fields[0].tag===1?(c=2,h=f.fields[0].fields[0]):(c=1,m=f.fields[0].fields[0]);break}case 3:{c=3,_=f.fields[0];break}default:c=0}switch(c){case 0:{u=p(yu,null);break}case 1:{if(m.tag===1){const y=m.fields[0],g=$e(N(()=>{let b;const S=$m(y.PromotedFunds),M=$e(N(()=>pe(X=>Rm(a,X,i),y.FeatureFlags)));return F(p("div",k(oe((b=$e(N(()=>{let X,ue,ie;return fe(F(p("div",k(oe((X=[ri("Promoted Funds"),(ue=oe(ni(a,Ys(S),i)),p("dl",{children:x.Children.toArray(Array.from(ue))})),ri("Feature Flags"),(ie=$e(N(()=>M)),p("dl",{children:x.Children.toArray(Array.from(ie))}))],["children",x.Children.toArray(Array.from(X))]))))),N(()=>{const Et=s.ModalState;switch(Et.tag){case 1:{const ye=Et.fields[0];return ye.tag===1?F(te()):ye.tag===2?F(Xs(Ks(S),i)):ye.tag===3?F(Qs(ye.fields[0],i)):F(te())}case 2:return F(te());default:{const ye=Et.fields[0];return ye.tag===1?F(te()):ye.tag===2?F(ei(i)):(ye.tag===3,F(te()))}}}))})),["children",x.Children.toArray(Array.from(b))])))))}));u=p("div",{children:x.Children.toArray(Array.from(g))})}else{const y=m.fields[0],g=im(y.Configuration.DefaultFundUSI),b=am(y.Configuration.DefaultFundUSI),S=Fm(y.PromotedFunds);u=p("div",k(oe((t=$e(N(()=>{let M,X;return fe(F(p("div",k(oe((M=[(X=C([Mm(a,g,i),Im(a,y.Configuration.FeatureSet,i),ni(a,Ys(S),i)]),p("dl",{children:x.Children.toArray(Array.from(X))}))],["children",x.Children.toArray(Array.from(M))]))))),N(()=>{const ue=s.ModalState;switch(ue.tag){case 1:{const ie=ue.fields[0];return ie.tag===1?F(_m(y.Configuration.FeatureSet,i)):ie.tag===2?F(Xs(Ks(S),i)):ie.tag===3?F(Qs(ie.fields[0],i)):F(gm(b,i))}case 2:return F(te());default:{const ie=ue.fields[0];return ie.tag===1?F(te()):ie.tag===2?F(ei(i)):ie.tag===3?F(te()):F(wm(i))}}}))})),["children",x.Children.toArray(Array.from(t))]))))}break}case 2:{u=p(Ot,{error:h});break}default:{const y=_e(_);u=p(Ot,{error:y})}}}else u=p(Ot,{error:"You do not have the appropriate permissions to view this information"});const l=C([p("style",{children:[bu]}),u]);return p("div",{children:x.Children.toArray(Array.from(l))})}gi(e=>p(nm,e),"superhero-super-selection");gi(e=>p(Nm,e),"superhero-super-configuration");
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "@flarehr/superhero-super-selection",
3
- "version": "5.50.9011",
3
+ "version": "5.52.9712",
4
4
  "description": "Flare Superhero Super Selection Component",
5
5
  "license": "UNLICENSED",
6
+ "type": "module",
6
7
  "files": [
7
8
  "dist/"
8
9
  ],
9
10
  "scripts": {
10
- "start": "dotnet fable watch ./ -s --sourceMapsRoot ./ --run webpack serve --mode development",
11
- "build": "dotnet fable ./ && webpack --mode production --node-env production"
11
+ "postinstall": "dotnet tool restore",
12
+ "start": "dotnet fable watch . -s --run npx vite",
13
+ "build": "dotnet fable . -s --run vite build --emptyOutDir"
12
14
  },
13
15
  "dependencies": {
14
16
  "@heroicons/react": "^1.0.6",
@@ -17,10 +19,12 @@
17
19
  "use-sync-external-store": "^1.2.2"
18
20
  },
19
21
  "devDependencies": {
20
- "html-webpack-plugin": "^5.6.3",
21
- "source-map-loader": "^5.0.0",
22
- "webpack": "^5.96.1",
23
- "webpack-cli": "^5.1.4",
24
- "webpack-dev-server": "^5.1.0"
22
+ "@tailwindcss/forms": "^0.5.9",
23
+ "tailwindcss": "^3.4.15",
24
+ "autoprefixer": "^10.4.20",
25
+ "postcss": "^8.4.49",
26
+ "cssnano": "^7.0.6",
27
+ "@preact/preset-vite": "^2.9.1",
28
+ "vite": "^5.4.11"
25
29
  }
26
30
  }
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * use-sync-external-store-shim.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */